- put the state pointer serializer in a virtual function so that types.cpp can operate without any knowledge of Doom states.
This commit is contained in:
parent
1ce11ff02a
commit
ef8b4c7d5e
5 changed files with 78 additions and 51 deletions
|
|
@ -445,6 +445,18 @@ FSerializer &FSerializer::Sprite(const char *key, int32_t &spritenum, int32_t *d
|
|||
return *this;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// only here so that it can be virtually overridden. Without reference this cannot save anything.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FSerializer& FSerializer::StatePointer(const char* key, void* ptraddr, bool *res)
|
||||
{
|
||||
if (res) *res = false;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
|
|
|||
|
|
@ -93,6 +93,9 @@ public:
|
|||
FCompressedBuffer GetCompressedOutput();
|
||||
// The sprite serializer is a special case because it is needed by the VM to handle its 'spriteid' type.
|
||||
virtual FSerializer &Sprite(const char *key, int32_t &spritenum, int32_t *def);
|
||||
// This is only needed by the type system.
|
||||
virtual FSerializer& StatePointer(const char* key, void* ptraddr, bool *res);
|
||||
|
||||
FSerializer &StringPtr(const char *key, const char *&charptr); // This only retrieves the address but creates no permanent copy of the string unlike the regular char* serializer.
|
||||
FSerializer &AddString(const char *key, const char *charptr);
|
||||
const char *GetString(const char *key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue