- added proper definitions for all exported native fields.

- synthesize native fields for all declared flags, not just for AActor.
This commit is contained in:
Christoph Oelckers 2016-11-22 23:42:32 +01:00
commit 099b9970ef
23 changed files with 453 additions and 247 deletions

View file

@ -64,12 +64,15 @@ ClassReg DObject::RegistrationInfo =
&DVMObject<DObject>::RegistrationInfo, // VMExport
nullptr, // Pointers
&DObject::InPlaceConstructor, // ConstructNative
&DObject::InitNativeFields, // InitNatives
nullptr,
sizeof(DObject), // SizeOf
CLASSREG_PClass, // MetaClassNum
};
_DECLARE_TI(DObject)
// This bit is needed in the playsim - but give it a less crappy name.
DEFINE_FIELD_BIT(DObject,ObjectFlags, bDestroyed, OF_EuthanizeMe)
//==========================================================================
//
//
@ -347,18 +350,6 @@ DObject::~DObject ()
//
//==========================================================================
void DObject::InitNativeFields()
{
auto meta = RUNTIME_CLASS(DObject);
meta->AddNativeField("bDestroyed", TypeSInt32, myoffsetof(DObject, ObjectFlags), VARF_ReadOnly, OF_EuthanizeMe);
}
//==========================================================================
//
//
//
//==========================================================================
void DObject::Destroy ()
{
ObjectFlags = (ObjectFlags & ~OF_Fixed) | OF_EuthanizeMe;