void C4Team::CompileFunc(StdCompiler *pComp) { if (pComp->isCompiler()) Clear(); pComp->Value(mkNamingAdapt(iID, "id", 0)); pComp->Value(mkNamingAdapt(mkStringAdaptMA(Name), "Name", "")); pComp->Value(mkNamingAdapt(iPlrStartIndex, "PlrStartIndex", 0)); pComp->Value(mkNamingAdapt(iPlayerCount, "PlayerCount", 0)); if (pComp->isCompiler()) { delete [] piPlayers; piPlayers = new int32_t [iPlayerCapacity = iPlayerCount]; ZeroMem(piPlayers, sizeof(*piPlayers) * iPlayerCount); } pComp->Value(mkNamingAdapt(mkArrayAdapt(piPlayers, iPlayerCount, -1), "Players")); pComp->Value(mkNamingAdapt(dwClr, "Color", 0u)); pComp->Value(mkNamingAdapt(mkParAdapt(sIconSpec, StdCompiler::RCT_All), "IconSpec", StdCopyStrBuf())); pComp->Value(mkNamingAdapt(iMaxPlayer, "MaxPlayer", 0)); }
void C4Shape::CompileFunc(StdCompiler *pComp, bool fRuntime) { // Note: Compiled directly into "Object" and "DefCore"-categories, so beware // of name clashes // (see C4Object::CompileFunc and C4DefCore::CompileFunc) pComp->Value(mkNamingAdapt(Wdt, "Width", 0)); pComp->Value(mkNamingAdapt(Hgt, "Height", 0)); pComp->Value(mkNamingAdapt(mkArrayAdapt(&x, 2, 0), "Offset")); pComp->Value(mkNamingAdapt(VtxNum, "Vertices", 0)); pComp->Value(mkNamingAdapt(toC4CArr(VtxX), "VertexX")); pComp->Value(mkNamingAdapt(toC4CArr(VtxY), "VertexY")); pComp->Value(mkNamingAdapt(toC4CArr(VtxCNAT), "VertexCNAT")); pComp->Value(mkNamingAdapt(toC4CArr(VtxFriction), "VertexFriction")); pComp->Value(mkNamingAdapt(ContactDensity, "ContactDensity", C4M_Solid)); pComp->Value(mkNamingAdapt(FireTop, "FireTop", 0)); if (fRuntime) { pComp->Value(mkNamingAdapt(iAttachX, "AttachX", 0)); pComp->Value(mkNamingAdapt(iAttachY, "AttachY", 0)); pComp->Value(mkNamingAdapt(iAttachVtx, "AttachVtx", 0)); } }
void C4PacketResDiscover::CompileFunc(StdCompiler *pComp) { pComp->Value(mkNamingAdapt(mkIntPackAdapt(iDisIDCnt), "DiscoverCnt", 0)); pComp->Value(mkNamingAdapt(mkArrayAdapt(iDisIDs, iDisIDCnt), "Discovers", -1)); }