Export DecalBase
Allows setting this between Actors with type safety. Now also serializes these fields.
This commit is contained in:
parent
4acc5f2a7d
commit
b6b3c311e1
8 changed files with 61 additions and 2 deletions
|
|
@ -58,6 +58,7 @@
|
|||
#include "types.h"
|
||||
#include "dictionary.h"
|
||||
#include "events.h"
|
||||
#include "decallib.h"
|
||||
|
||||
static TArray<FPropertyInfo*> properties;
|
||||
static TArray<AFuncDesc> AFTable;
|
||||
|
|
@ -779,6 +780,21 @@ void InitThingdef()
|
|||
skillstruct->Size = sizeof(FSkillInfo);
|
||||
skillstruct->Align = alignof(FSkillInfo);
|
||||
|
||||
auto decalbasestruct = NewStruct("DecalBase", nullptr, true);
|
||||
decalbasestruct->Size = sizeof(FDecalBase);
|
||||
decalbasestruct->Align = alignof(FDecalBase);
|
||||
NewPointer(decalbasestruct, false)->InstallHandlers(
|
||||
[](FSerializer& ar, const char* key, const void* addr)
|
||||
{
|
||||
ar(key, *(FDecalBase**)addr);
|
||||
},
|
||||
[](FSerializer& ar, const char* key, void* addr)
|
||||
{
|
||||
Serialize<FDecalBase>(ar, key, *(FDecalBase**)addr, nullptr);
|
||||
return true;
|
||||
}
|
||||
);
|
||||
|
||||
PStruct *pstruct = NewStruct("PlayerInfo", nullptr, true);
|
||||
pstruct->Size = sizeof(player_t);
|
||||
pstruct->Align = alignof(player_t);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue