예제 #1
0
void C4SLandscape::CompileFunc(StdCompiler *pComp)
{
	pComp->Value(mkNamingAdapt(ExactLandscape,          "ExactLandscape",        false));
	pComp->Value(mkNamingAdapt(Vegetation,              "Vegetation",            C4IDList()));
	pComp->Value(mkNamingAdapt(VegLevel,                "VegetationLevel",       C4SVal(50,30,0,100), true));
	pComp->Value(mkNamingAdapt(InEarth,                 "InEarth",               C4IDList()));
	pComp->Value(mkNamingAdapt(InEarthLevel,            "InEarthLevel",          C4SVal(50,0,0,100), true));
	pComp->Value(mkNamingAdapt(mkStringAdaptMA(SkyDef), "Sky",                   ""));
	pComp->Value(mkNamingAdapt(mkArrayAdaptDM(SkyDefFade,0),"SkyFade"            ));
	pComp->Value(mkNamingAdapt(BottomOpen,              "BottomOpen",            0));
	pComp->Value(mkNamingAdapt(TopOpen,                 "TopOpen",               1));
	pComp->Value(mkNamingAdapt(LeftOpen,                "LeftOpen",              0));
	pComp->Value(mkNamingAdapt(RightOpen,               "RightOpen",             0));
	pComp->Value(mkNamingAdapt(AutoScanSideOpen,        "AutoScanSideOpen",      true));
	pComp->Value(mkNamingAdapt(MapWdt,                  "MapWidth",              C4SVal(100,0,64,250), true));
	pComp->Value(mkNamingAdapt(MapHgt,                  "MapHeight",             C4SVal(50,0,40,250), true));
	pComp->Value(mkNamingAdapt(MapZoom,                 "MapZoom",               C4SVal(8,0,5,15), true));
	pComp->Value(mkNamingAdapt(Amplitude,               "Amplitude",             C4SVal(0)));
	pComp->Value(mkNamingAdapt(Phase,                   "Phase",                 C4SVal(50)));
	pComp->Value(mkNamingAdapt(Period,                  "Period",                C4SVal(15)));
	pComp->Value(mkNamingAdapt(Random,                  "Random",                C4SVal(0)));
	pComp->Value(mkNamingAdapt(mkStringAdaptMA(Material),"Material",             "Earth"));
	pComp->Value(mkNamingAdapt(mkStringAdaptMA(Liquid), "Liquid",                "Water"));
	pComp->Value(mkNamingAdapt(LiquidLevel,             "LiquidLevel",           C4SVal()));
	pComp->Value(mkNamingAdapt(MapPlayerExtend,         "MapPlayerExtend",       0));
	pComp->Value(mkNamingAdapt(Layers,                  "Layers",                C4NameList()));
	pComp->Value(mkNamingAdapt(Gravity,                 "Gravity",               C4SVal(100,0,10,200), true));
	pComp->Value(mkNamingAdapt(NoScan,                  "NoScan",                false));
	pComp->Value(mkNamingAdapt(KeepMapCreator,          "KeepMapCreator",        false));
	pComp->Value(mkNamingAdapt(SkyScrollMode,           "SkyScrollMode",         0));
	pComp->Value(mkNamingAdapt(MaterialZoom,            "MaterialZoom",          4));
	pComp->Value(mkNamingAdapt(FlatChunkShapes,         "FlatChunkShapes",       false));
}
예제 #2
0
void C4SHead::CompileFunc(StdCompiler *pComp, bool fSection)
{
	if (!fSection)
	{
		pComp->Value(mkNamingAdapt(Icon,                      "Icon",                 18));
		pComp->Value(mkNamingAdapt(mkStringAdaptMA(Title),    "Title",                "Default Title"));
		pComp->Value(mkNamingAdapt(mkStringAdaptMA(Loader),   "Loader",               ""));
		pComp->Value(mkNamingAdapt(mkStringAdaptMA(Font),     "Font",                 ""));
		pComp->Value(mkNamingAdapt(mkArrayAdaptDM(C4XVer,0),  "Version"               ));
		pComp->Value(mkNamingAdapt(Difficulty,                "Difficulty",           0));
		pComp->Value(mkNamingAdapt(MaxPlayer,                 "MaxPlayer",            C4S_MaxPlayerDefault));
		pComp->Value(mkNamingAdapt(MaxPlayerLeague,           "MaxPlayerLeague",      MaxPlayer));
		pComp->Value(mkNamingAdapt(MinPlayer,                 "MinPlayer",            0));
		pComp->Value(mkNamingAdapt(SaveGame,                  "SaveGame",             false));
		pComp->Value(mkNamingAdapt(Replay,                    "Replay",               false));
		pComp->Value(mkNamingAdapt(Film,                      "Film",                 0));
	}
	pComp->Value(mkNamingAdapt(NoInitialize,              "NoInitialize",         false));
	pComp->Value(mkNamingAdapt(RandomSeed,                "RandomSeed",           0));
	if (!fSection)
	{
		pComp->Value(mkNamingAdapt(mkStringAdaptMA(Engine),   "Engine",               ""));
		pComp->Value(mkNamingAdapt(mkStringAdaptMA(MissionAccess), "MissionAccess", ""));
		pComp->Value(mkNamingAdapt(Secret,                    "Secret",               false));
		pComp->Value(mkNamingAdapt(NetworkGame,               "NetworkGame",          false));
		pComp->Value(mkNamingAdapt(NetworkRuntimeJoin,        "NetworkRuntimeJoin",   false));
		pComp->Value(mkNamingAdapt(mkStrValAdapt(mkParAdapt(Origin, StdCompiler::RCT_All), C4InVal::VAL_SubPathFilename),  "Origin",  StdCopyStrBuf()));
		// windows needs backslashes in Origin; other systems use forward slashes
		if (pComp->isCompiler()) Origin.ReplaceChar(AltDirectorySeparator, DirectorySeparator);
	}
}
예제 #3
0
void C4SPlrStart::CompileFunc(StdCompiler *pComp)
{
	C4IDList crewDefault;
	crewDefault.SetIDCount(C4ID::Clonk,1,true);
	pComp->Value(mkNamingAdapt(Wealth,                  "Wealth",                C4SVal(0, 0, 0,250), true));
	pComp->Value(mkNamingAdapt(mkArrayAdaptDM(Position,-1), "Position"           ));
	pComp->Value(mkNamingAdapt(EnforcePosition,         "EnforcePosition",       0));
	pComp->Value(mkNamingAdapt(ReadyCrew,               "Crew",                  crewDefault));
	pComp->Value(mkNamingAdapt(ReadyBase,               "Buildings",             C4IDList()));
	pComp->Value(mkNamingAdapt(ReadyVehic,              "Vehicles",              C4IDList()));
	pComp->Value(mkNamingAdapt(ReadyMaterial,           "Material",              C4IDList()));
	pComp->Value(mkNamingAdapt(BuildKnowledge,          "Knowledge",             C4IDList()));
	pComp->Value(mkNamingAdapt(BaseMaterial,        "BaseMaterial",      C4IDList()));
	pComp->Value(mkNamingAdapt(BaseProduction,      "BaseProduction",    C4IDList()));
}
예제 #4
0
void C4SPlrStart::CompileFunc(StdCompiler *pComp)
  {
  pComp->Value(mkNamingAdapt(mkC4IDAdapt(NativeCrew), "StandardCrew",          C4ID_None));
  pComp->Value(mkNamingAdapt(Crew,                    "Clonks",                C4SVal(1, 0, 1, 10), true));
  pComp->Value(mkNamingAdapt(Wealth,                  "Wealth",                C4SVal(0, 0, 0,250), true));
  pComp->Value(mkNamingAdapt(mkArrayAdaptDM(Position,-1), "Position"           ));
  pComp->Value(mkNamingAdapt(EnforcePosition,         "EnforcePosition",       0));
  pComp->Value(mkNamingAdapt(ReadyCrew,               "Crew",                  C4IDList()));
  pComp->Value(mkNamingAdapt(ReadyBase,               "Buildings",             C4IDList()));
  pComp->Value(mkNamingAdapt(ReadyVehic,              "Vehicles",              C4IDList()));
  pComp->Value(mkNamingAdapt(ReadyMaterial,           "Material",              C4IDList()));
  pComp->Value(mkNamingAdapt(BuildKnowledge,          "Knowledge",             C4IDList()));
  pComp->Value(mkNamingAdapt(HomeBaseMaterial,        "HomeBaseMaterial",      C4IDList()));
  pComp->Value(mkNamingAdapt(HomeBaseProduction,      "HomeBaseProduction",    C4IDList()));
  pComp->Value(mkNamingAdapt(Magic,                   "Magic",                 C4IDList()));
  }
예제 #5
0
파일: C4Scenario.cpp 프로젝트: ev1313/yaC
void C4SHead::CompileFunc(StdCompiler *pComp, bool fSection) {
  if (!fSection) {
    pComp->Value(mkNamingAdapt(Icon, "Icon", 18));
    pComp->Value(
        mkNamingAdapt(mkStringAdaptMA(Title), "Title", "Default Title"));
    pComp->Value(mkNamingAdapt(mkStringAdaptMA(Loader), "Loader", ""));
    pComp->Value(mkNamingAdapt(mkStringAdaptMA(Font), "Font", ""));
    pComp->Value(mkNamingAdapt(mkArrayAdaptDM(C4XVer, 0), "Version"));
    pComp->Value(mkNamingAdapt(Difficulty, "Difficulty", 0));
    pComp->Value(mkNamingAdapt(EnableUnregisteredAccess, "Access", FALSE));
    pComp->Value(mkNamingAdapt(MaxPlayer, "MaxPlayer", C4S_MaxPlayerDefault));
    pComp->Value(mkNamingAdapt(MaxPlayerLeague, "MaxPlayerLeague", MaxPlayer));
    pComp->Value(mkNamingAdapt(MinPlayer, "MinPlayer", 0));
    pComp->Value(mkNamingAdapt(SaveGame, "SaveGame", FALSE));
    pComp->Value(mkNamingAdapt(Replay, "Replay", FALSE));
    pComp->Value(mkNamingAdapt(Film, "Film", FALSE));
    pComp->Value(mkNamingAdapt(DisableMouse, "DisableMouse", FALSE));
    pComp->Value(mkNamingAdapt(IgnoreSyncChecks, "IgnoreSyncChecks", FALSE));
  }
  pComp->Value(mkNamingAdapt(NoInitialize, "NoInitialize", FALSE));
  pComp->Value(mkNamingAdapt(RandomSeed, "RandomSeed", 0));
  if (!fSection) {
    pComp->Value(mkNamingAdapt(mkStringAdaptMA(Engine), "Engine", ""));
    pComp->Value(
        mkNamingAdapt(mkStringAdaptMA(MissionAccess), "MissionAccess", ""));
    pComp->Value(mkNamingAdapt(NetworkGame, "NetworkGame", false));
    pComp->Value(
        mkNamingAdapt(NetworkRuntimeJoin, "NetworkRuntimeJoin", false));
    pComp->Value(mkNamingAdapt(ForcedGfxMode, "ForcedGfxMode", 0));
    pComp->Value(mkNamingAdapt(ForcedFairCrew, "ForcedNoCrew", 0));
    pComp->Value(mkNamingAdapt(FairCrewStrength, "DefCrewStrength", 0));
    pComp->Value(
        mkNamingAdapt(ForcedAutoContextMenu, "ForcedAutoContextMenu", -1));
    pComp->Value(
        mkNamingAdapt(ForcedControlStyle, "ForcedAutoStopControl", -1));
    pComp->Value(
        mkNamingAdapt(mkStrValAdapt(mkParAdapt(Origin, StdCompiler::RCT_All),
                                    C4InVal::VAL_SubPathFilename),
                      "Origin", StdCopyStrBuf()));
    // windows needs backslashes in Origin; other systems use forward slashes
    if (pComp->isCompiler())
      Origin.ReplaceChar(AltDirectorySeparator, DirectorySeparator);
  }
}
예제 #6
0
void C4MaterialCore::CompileFunc(StdCompiler *pComp)
{
	assert(pComp->hasNaming());
	if (pComp->isCompiler()) Clear();
	pComp->Name("Material");
	pComp->Value(mkNamingAdapt(toC4CStr(Name),      "Name",                ""));

	const StdEnumEntry<C4MaterialCoreShape> Shapes[] =
	{
		{ "Flat",     C4M_Flat },
		{ "TopFlat",  C4M_TopFlat },
		{ "Smooth",   C4M_Smooth },
		{ "Rough",    C4M_Rough },
		{ "Octagon",  C4M_Octagon },
		{ "Smoother", C4M_Smoother },
		{ NULL, C4M_Flat }
	};
	pComp->Value(mkNamingAdapt(mkEnumAdaptT<uint8_t>(MapChunkType, Shapes),
	                                                "Shape",               C4M_Flat));
	pComp->Value(mkNamingAdapt(Density,             "Density",             0));
	pComp->Value(mkNamingAdapt(Friction,            "Friction",            0));
	pComp->Value(mkNamingAdapt(DigFree,             "DigFree",             0));
	pComp->Value(mkNamingAdapt(BlastFree,           "BlastFree",           0));
	pComp->Value(mkNamingAdapt(Blast2Object,        "Blast2Object",        C4ID::None));
	pComp->Value(mkNamingAdapt(Dig2Object,          "Dig2Object",          C4ID::None));
	pComp->Value(mkNamingAdapt(Dig2ObjectRatio,     "Dig2ObjectRatio",     0));
	pComp->Value(mkNamingAdapt(Dig2ObjectCollect,   "Dig2ObjectCollect",   0));
	pComp->Value(mkNamingAdapt(Blast2ObjectRatio,   "Blast2ObjectRatio",   0));
	pComp->Value(mkNamingAdapt(Blast2PXSRatio,      "Blast2PXSRatio",      0));
	pComp->Value(mkNamingAdapt(Instable,            "Instable",            0));
	pComp->Value(mkNamingAdapt(MaxAirSpeed,         "MaxAirSpeed",         0));
	pComp->Value(mkNamingAdapt(MaxSlide,            "MaxSlide",            0));
	pComp->Value(mkNamingAdapt(WindDrift,           "WindDrift",           0));
	pComp->Value(mkNamingAdapt(Inflammable,         "Inflammable",         0));
	if (pComp->isCompiler())
	{
		// The value used to have a wrong spelling ("Incindiary"). If there's
		// no "Incendiary" value, use the wrong spelling instead
		try
		{
			pComp->Value(mkNamingAdapt(Incendiary, "Incendiary"));
		}
		catch (StdCompiler::NotFoundException *ex)
		{
			delete ex;
			pComp->Value(mkNamingAdapt(Incendiary, "Incindiary", 0));
		}
	}
	else
	{
		// When serializing, write both spellings because some script might be
		// calling GetMaterialVal with the wrong one
		pComp->Value(mkNamingAdapt(Incendiary, "Incendiary"));
		pComp->Value(mkNamingAdapt(Incendiary, "Incindiary"));
	}
	pComp->Value(mkNamingAdapt(Corrode,             "Corrode",             0));
	pComp->Value(mkNamingAdapt(Corrosive,           "Corrosive",           0));
	pComp->Value(mkNamingAdapt(Extinguisher,        "Extinguisher",        0));
	pComp->Value(mkNamingAdapt(Soil,                "Soil",                0));
	pComp->Value(mkNamingAdapt(Placement,           "Placement",           0));
	pComp->Value(mkNamingAdapt(Light,               "Light",               0));
	pComp->Value(mkNamingAdapt(mkParAdapt(sTextureOverlay, StdCompiler::RCT_IdtfAllowEmpty),
	                                                "TextureOverlay",      ""));
	pComp->Value(mkNamingAdapt(OverlayType,         "OverlayType",         0));
	pComp->Value(mkNamingAdapt(mkParAdapt(sPXSGfx, StdCompiler::RCT_IdtfAllowEmpty),
	                                                "PXSGfx",              ""));
	pComp->Value(mkNamingAdapt(PXSGfxRt,            "PXSGfxRt",            TargetRect0));
	pComp->Value(mkNamingAdapt(PXSGfxSize,          "PXSGfxSize",          PXSGfxRt.Wdt));
	pComp->Value(mkNamingAdapt(TempConvStrength,    "TempConvStrength",    0));
	pComp->Value(mkNamingAdapt(mkParAdapt(sBlastShiftTo, StdCompiler::RCT_IdtfAllowEmpty),
	                                                "BlastShiftTo",        ""));
	pComp->Value(mkNamingAdapt(mkParAdapt(sInMatConvert, StdCompiler::RCT_IdtfAllowEmpty),
	                                                "InMatConvert",        ""));
	pComp->Value(mkNamingAdapt(mkParAdapt(sInMatConvertTo, StdCompiler::RCT_IdtfAllowEmpty),
	                                                "InMatConvertTo",      ""));
	pComp->Value(mkNamingAdapt(InMatConvertDepth,   "InMatConvertDepth",   0));
	pComp->Value(mkNamingAdapt(AboveTempConvert,    "AboveTempConvert",    0));
	pComp->Value(mkNamingAdapt(AboveTempConvertDir, "AboveTempConvertDir", 0));
	pComp->Value(mkNamingAdapt(mkParAdapt(sAboveTempConvertTo, StdCompiler::RCT_IdtfAllowEmpty),
	                                                "AboveTempConvertTo",  ""));
	pComp->Value(mkNamingAdapt(BelowTempConvert,    "BelowTempConvert",    0));
	pComp->Value(mkNamingAdapt(BelowTempConvertDir, "BelowTempConvertDir", 0));
	pComp->Value(mkNamingAdapt(mkParAdapt(sBelowTempConvertTo, StdCompiler::RCT_IdtfAllowEmpty),
	                                                "BelowTempConvertTo",  ""));
	pComp->Value(mkNamingAdapt(MinHeightCount,      "MinHeightCount",      0));
	pComp->Value(mkNamingAdapt(SplashRate,          "SplashRate",          10));
	pComp->Value(mkNamingAdapt(KeepSinglePixels,    "KeepSinglePixels",    false));
	pComp->Value(mkNamingAdapt(AnimationSpeed,      "AnimationSpeed",      100));
	pComp->Value(mkNamingAdapt(LightAngle,          "LightAngle",          255));
	pComp->Value(mkNamingAdapt(mkArrayAdaptDM(LightEmit, 0), "LightEmit"));
	pComp->Value(mkNamingAdapt(mkArrayAdaptDM(LightSpot, 16),"LightSpot"));
	pComp->Value(mkNamingAdapt(MinShapeOverlap,     "MinShapeOverlap",     25));
	pComp->NameEnd();
	// material reactions
	pComp->Value(mkNamingAdapt(mkSTLContainerAdapt(CustomReactionList),
	                                                "Reaction",            std::vector<C4MaterialReaction>()));
}