mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
Expose SimObjectPtr C-API functions using EngineAPI
This commit is contained in:
parent
8748a2cac8
commit
87c6884433
1 changed files with 5 additions and 5 deletions
|
|
@ -42,14 +42,14 @@ namespace Sim
|
||||||
return Sim::getDataBlockGroup()->findObject(StringTable->insert(pName));
|
return Sim::getDataBlockGroup()->findObject(StringTable->insert(pName));
|
||||||
}
|
}
|
||||||
|
|
||||||
// EngineAPI doesn't work with SimObjectPtr
|
// EngineAPI doesn't work with SimObjectPtr, so use a void* as a transport
|
||||||
TORQUE_API SimObjectPtr<SimObject>* fnWrapObject (SimObject* pObject)
|
DefineNewEngineFunction(WrapObject, void*, (SimObject* pObject), , "")
|
||||||
{
|
{
|
||||||
return new SimObjectPtr<SimObject>(pObject);
|
return new SimObjectPtr<SimObject>(pObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
TORQUE_API void fnDeleteObjectPtr(SimObjectPtr<SimObject>* pObjectPtr)
|
DefineNewEngineFunction(DeleteObjectPtr, void, (void* pObjectPtr), , "")
|
||||||
{
|
{
|
||||||
delete pObjectPtr;
|
delete static_cast<SimObjectPtr<SimObject>*>(pObjectPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue