export TMap<FString, FString> to ZScript

This commit is contained in:
Alexander Kromm 2019-12-29 17:35:06 +07:00 committed by Christoph Oelckers
commit 703686beee
8 changed files with 178 additions and 0 deletions

View file

@ -55,6 +55,7 @@
#include "wi_stuff.h"
#include "a_dynlight.h"
#include "types.h"
#include "utility/dictionary.h"
static TArray<FPropertyInfo*> properties;
static TArray<AFuncDesc> AFTable;
@ -841,6 +842,21 @@ void InitThingdef()
wbplayerstruct->Size = sizeof(wbplayerstruct_t);
wbplayerstruct->Align = alignof(wbplayerstruct_t);
auto dictionarystruct = NewStruct("Dictionary", nullptr, true);
dictionarystruct->Size = sizeof(Dictionary);
dictionarystruct->Align = alignof(Dictionary);
NewPointer(dictionarystruct, false)->InstallHandlers(
[](FSerializer &ar, const char *key, const void *addr)
{
ar(key, *(Dictionary **)addr);
},
[](FSerializer &ar, const char *key, void *addr)
{
Serialize<Dictionary>(ar, key, *(Dictionary **)addr, nullptr);
return true;
}
);
FAutoSegIterator probe(CRegHead, CRegTail);
while (*++probe != NULL)