Export DecalBase

Allows setting this between Actors with type safety. Now also serializes these fields.
This commit is contained in:
Boondorl 2025-07-27 17:56:44 -04:00 committed by Ricardo Luís Vaz Silva
commit b6b3c311e1
8 changed files with 61 additions and 2 deletions

View file

@ -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);