- 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
|
|
@ -165,6 +165,27 @@ FSerializer &FDoomSerializer::Sprite(const char *key, int32_t &spritenum, int32_
|
|||
return *this;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FSerializer& FDoomSerializer::StatePointer(const char* key, void* ptraddr, bool *res)
|
||||
{
|
||||
if (isWriting())
|
||||
{
|
||||
if (res) *res = true;
|
||||
(*this)(key, *(FState**)ptraddr);
|
||||
}
|
||||
else
|
||||
{
|
||||
::Serialize(*this, key, *(FState**)ptraddr, nullptr, res);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<> FSerializer &Serialize(FSerializer &ar, const char *key, FPolyObj *&value, FPolyObj **defval)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue