77 DWORD valRGB[12] = { 0xFF0000E8, 0xFFF40000, 0xFF00C800, 0xFFFCF41C,
78 0xFFC48444, 0xFF784830, 0xFFA04400, 0xFFF08050,
79 0xFF848484, 0xFFFFFFFF, 0xFF0094F8, 0xFFBC00C0
81 if (Inside<int32_t>(iPrefColor, 0, 11))
83 return valRGB[iPrefColor];
97 if (!CompileFromBuf_LogWarn<StdCompilerINIRead>(*
this, Source, GrpName.
getData()))
127 if (!DecompileToBuf_Log<StdCompilerINIWrite>(*
this, &Source, Name.
getData()))
135 hGroup.
Delete(
"C4Player.ocb");
158 pComp->
Name(
"Player");
178 pComp->
Name(
"Preferences");
204 C4Def *pDef =
nullptr;
207 pDef = pDefs->
ID2Def(n_id);
299 int32_t iNextRankExp;
318 psNextRankName->
Copy(sRank);
330 *piNextRankExp = iNextRankExp;
391 bool ret = CompileFromBuf_LogWarn<StdCompilerINIRead>(
405 if (!DecompileToBuf_Log<StdCompilerINIWrite>(
#define C4CFN_PlayerInfoCore
#define C4CFN_ObjectInfoCore
const char * LoadResStr(const char *id)
unsigned int SCharCount(char cTarget, const char *szInStr, const char *cpUntil)
void SReplaceChar(char *str, char fc, char tc)
bool SCopySegment(const char *szString, int iSegment, char *sTarget, char cSeparator, int iMaxL, bool fSkipWhitespace)
void SCopy(const char *szSource, char *sTarget, size_t iMaxL)
int SClearFrontBack(char *szString, char cClear)
std::enable_if< std::is_nothrow_default_constructible< T >::value >::type InplaceReconstruct(T *obj)
StdParameterAdapt< T, P > mkParAdapt(T &&rObj, P &&rPar)
StdNamingAdapt< T > mkNamingAdapt(T &&rValue, const char *szName)
#define toC4CStr(szString)
C4RankSystem * pRankNames
StdStrBuf GetFullName() const
bool Add(const char *filename, const char *entry_name)
bool LoadEntryString(const char *entry_name, StdStrBuf *buffer)
bool Delete(const char *files, bool recursive=false)
static bool StripMarkup(char *szText)
bool Load(C4Group &hGroup)
void Promote(int32_t iRank, C4RankSystem &rRanks, bool fForceRankName)
void UpdateCustomRanks(C4DefList *pDefs)
bool Compile(const char *szSource)
bool Save(C4Group &hGroup, class C4DefList *pDefs)
char TypeName[C4MaxName+1+1]
void CompileFunc(StdCompiler *pComp)
char DeathMessage[C4MaxDeathMsg+1]
bool GetNextRankInfo(C4RankSystem &rDefaultRanks, int32_t *piNextRankExp, StdStrBuf *psNextRankName)
void Default(C4ID n_id=C4ID::None, class C4DefList *pDefs=nullptr, const char *cpNames=nullptr)
bool Decompile(StdStrBuf &Buf)
char Comment[C4MaxComment+1]
StdCopyStrBuf PrefControl
int32_t OldPrefControlStyle
bool Load(C4Group &hGroup)
void Promote(int32_t iRank, C4RankSystem &rRanks)
static DWORD GetPrefColorValue(int32_t iPrefColor)
char LeagueName[C4MaxName+1]
int32_t OldPrefAutoContextMenu
char RankName[C4MaxName+1]
void Default(C4RankSystem *pRanks=nullptr)
void CompileFunc(StdCompiler *pComp)
char PrefName[C4MaxName+1]
bool CheckPromotion(C4RankSystem &rRanks)
bool Save(C4Group &hGroup)
C4ScenarioParameters Achievements
const char * GetName() const override
StdStrBuf GetRankName(int iRank, bool fReturnLastIfOver)
int Experience(int iRank)
void CompileFunc(StdCompiler *pComp)
void Denumerate(C4ValueNumbers *)
void Value(const T &rStruct)
virtual void NameEnd(bool fBreak=false)
virtual bool isDeserializer()
virtual bool Name(const char *szName)
const char * getData() const
void Append(const char *pnData, size_t iChars)