mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +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));
|
||||
}
|
||||
|
||||
// EngineAPI doesn't work with SimObjectPtr
|
||||
TORQUE_API SimObjectPtr<SimObject>* fnWrapObject (SimObject* pObject)
|
||||
// EngineAPI doesn't work with SimObjectPtr, so use a void* as a transport
|
||||
DefineNewEngineFunction(WrapObject, void*, (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