Integrate new CInterface into the engine-console

This commit is contained in:
Lukas Joergensen 2018-04-21 10:24:41 +02:00
parent ae1f5a3c89
commit 870ee9fb5b
6 changed files with 67 additions and 8 deletions

View file

@ -42,12 +42,13 @@ namespace Sim
return Sim::getDataBlockGroup()->findObject(StringTable->insert(pName));
}
DefineNewEngineFunction(WrapObject, SimObjectPtr<SimObject>*, (SimObject* pObject), , "")
// EngineAPI doesn't work with SimObjectPtr
TORQUE_API SimObjectPtr<SimObject>* fnWrapObject (SimObject* pObject)
{
return new SimObjectPtr<SimObject>(pObject);
}
DefineNewEngineFunction(DeleteObjectPtr, void, (SimObjectPtr<SimObject>* pObjectPtr), , "")
TORQUE_API void fnDeleteObjectPtr(SimObjectPtr<SimObject>* pObjectPtr)
{
delete pObjectPtr;
}

View file

@ -20,8 +20,6 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "c_simobjectInterface.h"
#include "console/engineAPI.h"
#include "console/simObject.h"