Example #1
0
void C4SGame::CompileFunc(StdCompiler *pComp, bool fSection)
  {
	pComp->Value(mkNamingAdapt(Mode,                     "Mode",                C4S_Cooperative));
	pComp->Value(mkNamingAdapt(Elimination,              "Elimination",         C4S_EliminateCrew));
	pComp->Value(mkNamingAdapt(CooperativeGoal,          "CooperativeGoal",     C4S_NoGoal));
	pComp->Value(mkNamingAdapt(CreateObjects,            "CreateObjects",       C4IDList()));
	pComp->Value(mkNamingAdapt(ClearObjects,             "ClearObjects",        C4IDList()));
	pComp->Value(mkNamingAdapt(ClearMaterial,            "ClearMaterials",      C4NameList()));
	pComp->Value(mkNamingAdapt(ValueGain,                "ValueGain",           0));
	pComp->Value(mkNamingAdapt(EnableRemoveFlag,         "EnableRemoveFlag",    FALSE));
	pComp->Value(mkNamingAdapt(Realism.ConstructionNeedsMaterial, "StructNeedMaterial",  FALSE));
	pComp->Value(mkNamingAdapt(Realism.StructuresNeedEnergy,      "StructNeedEnergy",    TRUE));
	if (!fSection)
		{
		pComp->Value(mkNamingAdapt(Realism.ValueOverloads,            "ValueOverloads",      C4IDList()));
		}
	pComp->Value(mkNamingAdapt(mkRuntimeValueAdapt(Realism.LandscapePushPull),         "LandscapePushPull",   FALSE));
	pComp->Value(mkNamingAdapt(mkRuntimeValueAdapt(Realism.LandscapeInsertThrust),     "LandscapeInsertThrust",TRUE));

	const StdBitfieldEntry<int32_t> BaseFunctionalities[] = {
		{ "BASEFUNC_AutoSellContents",								BASEFUNC_AutoSellContents		},
		{ "BASEFUNC_RegenerateEnergy",								BASEFUNC_RegenerateEnergy		},
		{ "BASEFUNC_Buy",															BASEFUNC_Buy								},
		{ "BASEFUNC_Sell",														BASEFUNC_Sell								},
		{ "BASEFUNC_RejectEntrance",									BASEFUNC_RejectEntrance			},
		{ "BASEFUNC_Extinguish",											BASEFUNC_Extinguish					},
		{ "BASEFUNC_Default",													BASEFUNC_Default						},
		{ NULL, 0 } };

	pComp->Value(mkNamingAdapt(mkRuntimeValueAdapt(mkBitfieldAdapt<int32_t>(Realism.BaseFunctionality, BaseFunctionalities)), "BaseFunctionality",   BASEFUNC_Default));
	pComp->Value(mkNamingAdapt(mkRuntimeValueAdapt(Realism.BaseRegenerateEnergyPrice), "BaseRegenerateEnergyPrice",BASE_RegenerateEnergyPrice));
  pComp->Value(mkNamingAdapt(Goals,                    "Goals",               C4IDList()));
  pComp->Value(mkNamingAdapt(Rules,                    "Rules",               C4IDList()));
  pComp->Value(mkNamingAdapt(FoWColor,                 "FoWColor",            0u));
  }
Example #2
0
void C4SGame::CompileFunc(StdCompiler *pComp, bool fSection)
{
	if (!fSection)
	{
		pComp->Value(mkNamingAdapt(Realism.ValueOverloads,            "ValueOverloads",      C4IDList()));
	}
	pComp->Value(mkNamingAdapt(mkRuntimeValueAdapt(Realism.LandscapePushPull),         "LandscapePushPull",   false));
	pComp->Value(mkNamingAdapt(mkRuntimeValueAdapt(Realism.LandscapeInsertThrust),     "LandscapeInsertThrust",true));

	pComp->Value(mkNamingAdapt(mkParAdapt(Mode, StdCompiler::RCT_IdtfAllowEmpty), "Mode",        StdCopyStrBuf()));
	pComp->Value(mkNamingAdapt(Goals,                                             "Goals",       C4IDList()));
	pComp->Value(mkNamingAdapt(Rules,                                             "Rules",       C4IDList()));
	pComp->Value(mkNamingAdapt(FoWEnabled,                                        "FoWEnabled",  true));
}