mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- dictionary can also go to 'common'.
This commit is contained in:
parent
f6bd2e4f76
commit
1ce11ff02a
4 changed files with 50 additions and 46 deletions
|
@ -1037,7 +1037,6 @@ set (PCH_SOURCES
|
|||
r_data/models/models_voxel.cpp
|
||||
r_data/models/models_ue1.cpp
|
||||
r_data/models/models_obj.cpp
|
||||
scripting/dictionary.cpp
|
||||
scripting/vmiterators.cpp
|
||||
scripting/vmthunks.cpp
|
||||
scripting/vmthunks_actors.cpp
|
||||
|
@ -1151,6 +1150,7 @@ set (PCH_SOURCES
|
|||
common/objects/dobject.cpp
|
||||
common/objects/dobjgc.cpp
|
||||
common/objects/dobjtype.cpp
|
||||
common/scripting/core/dictionary.cpp
|
||||
common/scripting/core/symbols.cpp
|
||||
common/scripting/core/types.cpp
|
||||
common/scripting/core/scopebarrier.cpp
|
||||
|
|
|
@ -39,8 +39,6 @@
|
|||
#include "printf.h"
|
||||
#include "textureid.h"
|
||||
#include "version.h"
|
||||
#include "info.h"
|
||||
#include "serializer_doom.h"
|
||||
|
||||
|
||||
FTypeTable TypeTable;
|
||||
|
@ -1439,49 +1437,6 @@ PPointer *NewPointer(PClass *cls, bool isconst)
|
|||
return static_cast<PPointer *>(ptype);
|
||||
}
|
||||
|
||||
/* PStatePointer **********************************************************/
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// PStatePointer Default Constructor
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
PStatePointer::PStatePointer()
|
||||
{
|
||||
mDescriptiveName = "Pointer<State>";
|
||||
PointedType = NewStruct(NAME_State, nullptr, true);
|
||||
IsConst = true;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// PStatePointer :: WriteValue
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void PStatePointer::WriteValue(FSerializer &ar, const char *key, const void *addr) const
|
||||
{
|
||||
#ifdef GZDOOM
|
||||
ar(key, *(FState **)addr);
|
||||
#endif
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// PStatePointer :: ReadValue
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool PStatePointer::ReadValue(FSerializer &ar, const char *key, void *addr) const
|
||||
{
|
||||
bool res = false;
|
||||
#ifdef GZDOOM
|
||||
::Serialize(ar, key, *(FState **)addr, nullptr, &res);
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* PClassPointer **********************************************************/
|
||||
|
@ -2569,3 +2524,52 @@ CCMD(typetable)
|
|||
DumpTypeTable();
|
||||
}
|
||||
|
||||
// fixme: The VM depends on this but it's engine specific. Needs a better solution.
|
||||
|
||||
/* PStatePointer **********************************************************/
|
||||
#ifdef GZDOOM
|
||||
#include "info.h"
|
||||
#include "serializer_doom.h"
|
||||
#endif
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// PStatePointer Default Constructor
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
PStatePointer::PStatePointer()
|
||||
{
|
||||
mDescriptiveName = "Pointer<State>";
|
||||
PointedType = NewStruct(NAME_State, nullptr, true);
|
||||
IsConst = true;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// PStatePointer :: WriteValue
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void PStatePointer::WriteValue(FSerializer& ar, const char* key, const void* addr) const
|
||||
{
|
||||
#ifdef GZDOOM
|
||||
ar(key, *(FState**)addr);
|
||||
#endif
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// PStatePointer :: ReadValue
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool PStatePointer::ReadValue(FSerializer& ar, const char* key, void* addr) const
|
||||
{
|
||||
bool res = false;
|
||||
#ifdef GZDOOM
|
||||
::Serialize(ar, key, *(FState**)addr, nullptr, &res);
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue