Update EngineAPI, use fixed_tuple as main underlying data structure

This also fixes a few issues related to type conversions before data is sent to the engine function.
Squash
This commit is contained in:
Lukas Joergensen 2019-08-03 13:41:02 +02:00 committed by Lukas Aldershaab
parent 4eabbd5bb0
commit 6a9c09f145
3 changed files with 79 additions and 71 deletions

View file

@ -26,6 +26,7 @@
namespace Con
{
/* Consumer Callback is not defined as EngineType yet, until then we have to define these methods directly.
DefineNewEngineFunction(AddConsumer, void, (ConsumerCallback cb), , "")
{
addConsumer(cb);
@ -35,6 +36,17 @@ namespace Con
{
removeConsumer(cb);
}
*/
TORQUE_API void fnAddConsumer(ConsumerCallback cb)
{
addConsumer(cb);
}
TORQUE_API void fnRemoveConsumer(ConsumerCallback cb)
{
removeConsumer(cb);
}
DefineNewEngineFunction(GetConsoleString, String, (String name),, "")
{
@ -75,4 +87,4 @@ namespace Con
{
setBoolVariable(StringTable->insert(name), value);
}
}
}