Added typeinfogen with state system

This commit is contained in:
Justin Marshall
2026-05-18 21:35:07 -07:00
parent 4686349b62
commit b841fcb33b
27 changed files with 21899 additions and 194 deletions
+24
View File
@@ -97,6 +97,8 @@ public: \
static idClass *CreateInstance( void ); \
virtual idTypeInfo *GetType( void ) const; \
static idTypeInfo &GetClassType( void ); \
virtual intptr_t Invoke(const char* functionName, void *param1) override; \
virtual bool HasNativeFunction(const char* functionName) override; \
static idEventFunc<nameofclass> eventCallbacks[]
/*
@@ -205,6 +207,28 @@ public:
const char* GetSuperclass(void) const;
void FindUninitializedMemory(void);
// jmarshall
template< typename T >
T* Cast(void)
{
return this ? (IsType(T::Type) ? static_cast<T*>(this) : NULL) : NULL;
}
template< typename T >
const T* Cast(void) const
{
return this ? (IsType(T::Type) ? static_cast<const T*>(this) : NULL) : NULL;
}
virtual void StateThreadChanged(void) {};
virtual idClass* InvokeChild()
{
return NULL;
}
virtual intptr_t Invoke(const char* functionName, void* param1);
virtual bool HasNativeFunction(const char* functionName);
// jmarshall end
void Save(idSaveGame* savefile) const {};
void Restore(idRestoreGame* savefile) {};