MCPcopy Create free account
hub / github.com/ZDoom/Raze / SynthesizeFlagFields

Function SynthesizeFlagFields

source/core/thingdef_data.cpp:469–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469void SynthesizeFlagFields()
470{
471 // synthesize a symbol for each flag from the flag name tables to avoid redundant declaration of them.
472 for (auto &fl : FlagLists)
473 {
474 auto cls = const_cast<PClass*>(*fl.Type);
475 if (fl.Use & 2)
476 {
477 for (int i = 0; i < fl.NumDefs; i++)
478 {
479 if (fl.Defs[i].structoffset > 0) // skip the deprecated entries in this list
480 {
481 cls->VMType->AddNativeField(FStringf("b%s", fl.Defs[i].name), (fl.Defs[i].fieldsize == 4 ? TypeSInt32 : TypeSInt16), fl.Defs[i].structoffset, fl.Defs[i].varflags, fl.Defs[i].flagbit);
482 }
483 }
484 }
485 }
486}

Callers 1

LoadScriptsFunction · 0.85

Calls 2

FStringfClass · 0.85
AddNativeFieldMethod · 0.45

Tested by

no test coverage detected