void C4PlayerInfoCore::Default(C4RankSystem *pRanks)
{
	*Comment='\0';
	*RankName='\0';
	TotalScore=0;
	Rounds=RoundsWon=RoundsLost=0;
	TotalPlayingTime=0;
	*LeagueName='\0';
	LastRound.Default();
	ExtraData = C4ValueMapData();
	PrefControl.Clear();
	Rank=0;
	SCopy("Neuling",PrefName);
	if (pRanks) SCopy(pRanks->GetRankName(Rank,false).getData(),RankName);
	else SCopy("Rang",RankName);
	PrefClonkSkin=0;
	PrefColor=0;
	PrefColorDw=0xff;
	PrefColor2Dw=0;
	OldPrefControl=0;
	PrefPosition=0;
	PrefMouse=1;
	OldPrefControlStyle = 0;
	OldPrefAutoContextMenu = 0;
	PrefControl.Clear();
	ExtraData.Reset();
}
void C4ObjectInfoCore::CompileFunc(StdCompiler *pComp)
{
	C4ValueNumbers numbers;
	pComp->Value(mkNamingAdapt(id,          "id",               C4ID::None));
	pComp->Value(mkNamingAdapt(toC4CStr(Name),          "Name",             "Clonk"));
	pComp->Value(mkNamingAdapt(toC4CStr(DeathMessage),  "DeathMessage",     ""));
	pComp->Value(mkNamingAdapt(Rank,                    "Rank",             0));
	pComp->Value(mkNamingAdapt(sRankName,               "RankName",         "Clonk"));
	pComp->Value(mkNamingAdapt(sNextRankName,           "NextRankName",     ""));
	pComp->Value(mkNamingAdapt(toC4CStr(TypeName),      "TypeName",         "Clonk"));
	pComp->Value(mkNamingAdapt(Participation,           "Participation",    1));
	pComp->Value(mkNamingAdapt(Experience,              "Experience",       0));
	pComp->Value(mkNamingAdapt(NextRankExp,             "NextRankExp",      0));
	pComp->Value(mkNamingAdapt(Rounds,                  "Rounds",           0));
	pComp->Value(mkNamingAdapt(DeathCount,              "DeathCount",       0));
	pComp->Value(mkNamingAdapt(Birthday,                "Birthday",         0));
	pComp->Value(mkNamingAdapt(TotalPlayingTime,        "TotalPlayingTime", 0));
	pComp->Value(mkNamingAdapt(Age,                     "Age",              0));
	pComp->Value(mkNamingAdapt(mkParAdapt(ExtraData, &numbers), "ExtraData", C4ValueMapData()));
	pComp->Value(mkNamingAdapt(numbers,                 "ExtraDataValues"));
	if (pComp->isCompiler())
	{
		numbers.Denumerate();
		ExtraData.Denumerate(&numbers);
	}
}
Beispiel #3
0
void C4PlayerInfoCore::CompileFunc(StdCompiler *pComp)
	{

	pComp->Name("Player");
	pComp->Value(mkNamingAdapt(toC4CStr(PrefName),"Name",									"Neuling"));
	pComp->Value(mkNamingAdapt(toC4CStr(Comment),	"Comment",							""));
	pComp->Value(mkNamingAdapt(Rank,							"Rank",									0));
	pComp->Value(mkNamingAdapt(toC4CStr(RankName),"RankName",							/*pRanks ? pRanks->Name(Rank,false) :*/ LoadResStr("IDS_MSG_RANK"))); // TODO: check if this would be desirable
	pComp->Value(mkNamingAdapt(Score,							"Score",								0));
	pComp->Value(mkNamingAdapt(Rounds,						"Rounds",								0));
	pComp->Value(mkNamingAdapt(RoundsWon,					"RoundsWon",						0));
	pComp->Value(mkNamingAdapt(RoundsLost,				"RoundsLost",						0));
	pComp->Value(mkNamingAdapt(TotalPlayingTime,	"TotalPlayingTime",			0));
	pComp->Value(mkNamingAdapt(ExtraData,					"ExtraData",						C4ValueMapData()));
	pComp->Value(mkNamingAdapt(toC4CStr(LeagueName),"LeagueName",					""));
	pComp->NameEnd();

	pComp->Name("Preferences");
	pComp->Value(mkNamingAdapt(PrefColor,						"Color",							0));
	pComp->Value(mkNamingAdapt(PrefColorDw,					"ColorDw",						0xffu));
	pComp->Value(mkNamingAdapt(PrefColor2Dw,				"AlternateColorDw",		0u));
	pComp->Value(mkNamingAdapt(PrefControl,					"Control",						C4P_Control_Keyboard2));
	pComp->Value(mkNamingAdapt(PrefControlStyle,		"AutoStopControl",		0));
	pComp->Value(mkNamingAdapt(PrefAutoContextMenu,	"AutoContextMenu",		-1)); // compiling default is -1  (if this is detected, AutoContextMenus will be defaulted by control style)
	pComp->Value(mkNamingAdapt(PrefPosition,				"Position",						0));
	pComp->Value(mkNamingAdapt(PrefMouse,						"Mouse",							1));
	pComp->NameEnd();

	pComp->Value(mkNamingAdapt(LastRound,						"LastRound"						));

	}
void C4PlayerInfoCore::CompileFunc(StdCompiler *pComp)
{
	C4ValueNumbers numbers;
	pComp->Name("Player");
	pComp->Value(mkNamingAdapt(toC4CStr(PrefName),"Name",                 "Neuling"));
	pComp->Value(mkNamingAdapt(toC4CStr(Comment), "Comment",              ""));
	pComp->Value(mkNamingAdapt(Rank,              "Rank",                 0));
	pComp->Value(mkNamingAdapt(toC4CStr(RankName),"RankName",            LoadResStr("IDS_MSG_RANK"))); // TODO: check if this would be desirable
	pComp->Value(mkNamingAdapt(TotalScore,        "Score",                0));
	pComp->Value(mkNamingAdapt(Rounds,            "Rounds",               0));
	pComp->Value(mkNamingAdapt(RoundsWon,         "RoundsWon",            0));
	pComp->Value(mkNamingAdapt(RoundsLost,        "RoundsLost",           0));
	pComp->Value(mkNamingAdapt(TotalPlayingTime,  "TotalPlayingTime",     0));
	pComp->Value(mkNamingAdapt(mkParAdapt(ExtraData, &numbers), "ExtraData", C4ValueMapData()));
	pComp->Value(mkNamingAdapt(numbers,           "ExtraDataValues"));
	if (pComp->isCompiler())
	{
		numbers.Denumerate();
		ExtraData.Denumerate(&numbers);
	}
	pComp->Value(mkNamingAdapt(toC4CStr(LeagueName),"LeagueName",         ""));
	pComp->NameEnd();

	pComp->Name("Preferences");
	pComp->Value(mkNamingAdapt(PrefColor,                "Color",            0));
	pComp->Value(mkNamingAdapt(PrefColorDw,              "ColorDw",          0xffu));
	pComp->Value(mkNamingAdapt(PrefColor2Dw,             "AlternateColorDw", 0u));
	pComp->Value(mkNamingAdapt(PrefPosition,             "Position",         0));
	pComp->Value(mkNamingAdapt(PrefMouse,                "Mouse",            1));
	pComp->Value(mkNamingAdapt(OldPrefControl,           "Control",          1));
	pComp->Value(mkNamingAdapt(OldPrefControlStyle,      "AutoStopControl",  0));
	pComp->Value(mkNamingAdapt(OldPrefAutoContextMenu,   "AutoContextMenu",  -1)); // compiling default is -1  (if this is detected, AutoContextMenus will be defaulted by control style)
	pComp->Value(mkNamingAdapt(PrefControl,              "ControlSet",       StdStrBuf()));
	pComp->Value(mkNamingAdapt(PrefClonkSkin,            "ClonkSkin",        0));
	pComp->NameEnd();

	pComp->Value(mkNamingAdapt(LastRound,                "LastRound"));

	pComp->Value(mkNamingAdapt(Achievements,                "Achievements"));
}
Beispiel #5
0
void C4ObjectInfoCore::CompileFunc(StdCompiler *pComp)
	{
	pComp->Value(mkNamingAdapt(mkC4IDAdapt(id),					"id",								C4ID_None));
	pComp->Value(mkNamingAdapt(toC4CStr(Name),					"Name",							"Clonk"));
	pComp->Value(mkNamingAdapt(toC4CStr(DeathMessage),	"DeathMessage",			""));
	pComp->Value(mkNamingAdapt(toC4CStr(PortraitFile),	"PortraitFile",			""));
	pComp->Value(mkNamingAdapt(Rank,										"Rank",							0));
	pComp->Value(mkNamingAdapt(sRankName,								"RankName",					"Clonk"));
	pComp->Value(mkNamingAdapt(sNextRankName,						"NextRankName",			""));
	pComp->Value(mkNamingAdapt(toC4CStr(TypeName),			"TypeName",					"Clonk"));
	pComp->Value(mkNamingAdapt(Participation,						"Participation",		1));
	pComp->Value(mkNamingAdapt(Experience,							"Experience",				0));
	pComp->Value(mkNamingAdapt(NextRankExp,							"NextRankExp",			0));
	pComp->Value(mkNamingAdapt(Rounds,									"Rounds",						0));
	pComp->Value(mkNamingAdapt(DeathCount,							"DeathCount",				0));
	pComp->Value(mkNamingAdapt(Birthday,								"Birthday",					0));
	pComp->Value(mkNamingAdapt(TotalPlayingTime,				"TotalPlayingTime",	0));
	pComp->Value(mkNamingAdapt(Age,											"Age",							0));
	pComp->Value(mkNamingAdapt(ExtraData,								"ExtraData",				C4ValueMapData()));

	pComp->FollowName("Physical");
	pComp->Value(Physical);
	}