#include <C4DefList.h>
Public Types | |
typedef std::map< C4ID, C4Def * > | Table |
Public Member Functions | |
C4DefList () | |
~C4DefList () override | |
void | Default () |
void | Clear () |
int32_t | Load (C4Group &hGroup, DWORD dwLoadWhat, const char *szLanguage, C4SoundSystem *pSoundSystem=nullptr, bool fOverload=false, bool fSearchMessage=false, int32_t iMinProgress=0, int32_t iMaxProgress=0, bool fLoadSysGroups=true) |
int32_t | Load (const char *szFilename, DWORD dwLoadWhat, const char *szLanguage, C4SoundSystem *pSoundSystem=nullptr, bool fOverload=false, int32_t iMinProgress=0, int32_t iMaxProgress=0) |
C4Def * | ID2Def (C4ID id) |
C4Def * | GetDef (int32_t Index) |
std::vector< C4Def * > | GetAllDefs (C4String *filter_property=nullptr) const |
C4Def * | GetByPath (const char *szPath) |
C4Def * | GetByName (const StdStrBuf &) |
int32_t | GetDefCount () |
int32_t | GetIndex (C4ID id) |
int32_t | RemoveTemporary () |
int32_t | CheckEngineVersion (int32_t ver1, int32_t ver2) |
int32_t | CheckRequireDef () |
void | Draw (C4ID id, C4Facet &cgo, bool fSelected, int32_t iColor) |
void | Remove (C4Def *def) |
bool | Remove (C4ID id) |
bool | Reload (C4Def *pDef, DWORD dwLoadWhat, const char *szLanguage, C4SoundSystem *pSoundSystem=nullptr) |
bool | Add (C4Def *ndef, bool fOverload) |
void | BuildTable () |
void | ResetIncludeDependencies () |
void | CallEveryDefinition () |
void | SortByPriority () |
void | Synchronize () |
void | AppendAndIncludeSkeletons () |
StdMeshSkeletonLoader & | GetSkeletonLoader () |
const char * | GetLocalizedGroupFolderName (const char *folder_path) const |
bool | DrawFontImage (const char *szImageTag, C4Facet &rTarget, C4DrawTransform *pTransform) override |
float | GetFontImageAspect (const char *szImageTag) override |
Public Attributes | |
bool | LoadFailure |
Table | table |
Protected Attributes | |
C4Def * | FirstDef |
std::map< StdCopyStrBuf, StdCopyStrBuf > | localized_group_folder_names |
Definition at line 25 of file C4DefList.h.
typedef std::map<C4ID, C4Def*> C4DefList::Table |
Definition at line 32 of file C4DefList.h.
C4DefList::C4DefList | ( | ) |
Definition at line 42 of file c4def-handle.cpp.
References FirstDef.
|
override |
Definition at line 47 of file c4def-handle.cpp.
References Clear().
bool C4DefList::Add | ( | C4Def * | ndef, |
bool | fOverload | ||
) |
Definition at line 96 of file c4def-handle.cpp.
References FirstDef, C4Def::id, ID2Def(), and C4Def::Next.
Referenced by c4_mapgen_handle_set_map_library(), and Load().
void C4DefList::AppendAndIncludeSkeletons | ( | ) |
Definition at line 521 of file C4DefList.cpp.
Referenced by C4Game::InitDefs(), and Reload().
void C4DefList::BuildTable | ( | ) |
Definition at line 514 of file C4DefList.cpp.
References FirstDef, C4Def::id, C4Def::Next, and table.
Referenced by C4Game::InitDefs(), Reload(), and RemoveTemporary().
void C4DefList::CallEveryDefinition | ( | ) |
Definition at line 77 of file stub-handle.cpp.
Referenced by C4AulScriptEngine::Link().
int32_t C4DefList::CheckEngineVersion | ( | int32_t | ver1, |
int32_t | ver2 | ||
) |
Definition at line 365 of file C4DefList.cpp.
References CompareVersion(), FirstDef, C4Def::Next, and C4Def::rC4XVer.
Referenced by C4Game::InitDefs().
int32_t C4DefList::CheckRequireDef | ( | ) |
Definition at line 384 of file C4DefList.cpp.
References FirstDef, C4IDList::GetID(), GetIndex(), C4IDList::GetNumberOfIDs(), C4Def::Next, and C4Def::RequireDef.
Referenced by C4Game::InitDefs().
void C4DefList::Clear | ( | ) |
Definition at line 52 of file c4def-handle.cpp.
References FirstDef, and C4Def::Next.
Referenced by c4_mapgen_handle_set_map_library(), C4Game::Clear(), and ~C4DefList().
void C4DefList::Default | ( | ) |
Definition at line 413 of file C4DefList.cpp.
References FirstDef, LoadFailure, and table.
Referenced by C4Game::Default().
Definition at line 407 of file C4DefList.cpp.
References C4Def::Draw(), and ID2Def().
Referenced by C4IDList::Draw().
|
overridevirtual |
Implements CStdFontCustomImages.
Definition at line 79 of file stub-handle.cpp.
Definition at line 304 of file C4DefList.cpp.
References FirstDef, C4PropList::GetPropertyByS(), C4Def::Next, and table.
Definition at line 71 of file c4def-handle.cpp.
References ID2Def().
Referenced by C4ScriptHost::ResolveAppends(), and C4ScriptHost::ResolveIncludes().
C4Def * C4DefList::GetByPath | ( | const char * | szPath | ) |
Definition at line 323 of file C4DefList.cpp.
References C4Config::AtRelativePath(), Config, C4Def::Filename, FirstDef, C4Def::Next, SEqual2NoCase(), and SLen().
Referenced by C4Game::ReloadFile().
C4Def * C4DefList::GetDef | ( | int32_t | Index | ) |
Definition at line 76 of file c4def-handle.cpp.
References FirstDef, and C4Def::Next.
Referenced by C4ScriptHost::ResolveAppends().
int C4DefList::GetDefCount | ( | ) |
Definition at line 88 of file c4def-handle.cpp.
References FirstDef, and C4Def::Next.
Referenced by C4ScriptHost::ResolveAppends().
|
overridevirtual |
Implements CStdFontCustomImages.
Definition at line 80 of file stub-handle.cpp.
int32_t C4DefList::GetIndex | ( | C4ID | id | ) |
Definition at line 275 of file C4DefList.cpp.
References FirstDef, C4Def::id, and C4Def::Next.
Referenced by CheckRequireDef().
const char * C4DefList::GetLocalizedGroupFolderName | ( | const char * | folder_path | ) | const |
Definition at line 531 of file C4DefList.cpp.
References localized_group_folder_names.
StdMeshSkeletonLoader & C4DefList::GetSkeletonLoader | ( | ) |
Definition at line 526 of file C4DefList.cpp.
Definition at line 62 of file c4def-handle.cpp.
References FirstDef, C4Def::id, and C4Def::Next.
Referenced by Add(), C4Id2Def(), C4DefGraphicsAdapt::CompileFunc(), C4Object::CompileFunc(), C4IDList::ConsolidateValids(), C4ObjectInfoCore::Default(), Draw(), C4RoundResults::EvaluateGoals(), GetByName(), C4IDList::GetCount(), C4IDList::GetID(), C4ObjectInfoList::GetIdle(), C4ObjectList::GetNameList(), C4IDList::GetNumberOfIDs(), C4Game::InitValueOverloads(), C4ObjectInfoList::New(), C4ObjectInfo::Recruit(), C4Game::ReloadDef(), C4ObjectInfo::Save(), C4IDList::SetCount(), C4ObjectInfoList::Strip(), and C4ObjectInfoCore::UpdateCustomRanks().
int32_t C4DefList::Load | ( | C4Group & | hGroup, |
DWORD | dwLoadWhat, | ||
const char * | szLanguage, | ||
C4SoundSystem * | pSoundSystem = nullptr , |
||
bool | fOverload = false , |
||
bool | fSearchMessage = false , |
||
int32_t | iMinProgress = 0 , |
||
int32_t | iMaxProgress = 0 , |
||
bool | fLoadSysGroups = true |
||
) |
Definition at line 71 of file C4DefList.cpp.
References _MAX_FNAME_LEN, Add(), AltDirectorySeparator, C4CFN_DefFiles, C4CFN_Title, C4Group::Close(), Config, DirectorySeparator, C4Group::FindNextEntry(), Game, C4Config::General, GetExtension(), GetFilename(), C4Group::GetFullName(), C4ComponentHost::GetLanguageString(), C4Group::GetName(), iResult, C4ConfigGeneral::LanguageEx, C4Def::Load(), C4Game::LoadAdditionalSystemGroup(), C4Language::LoadComponentHost(), LoadResStr(), localized_group_folder_names, LogF(), C4Group::OpenAsChild(), StdStrBuf::ReplaceChar(), C4Group::ResetSearch(), SEqualNoCase(), and C4Game::SetInitProgress().
Referenced by C4Game::DropFile(), C4Game::InitDefs(), and Load().
int32_t C4DefList::Load | ( | const char * | szFilename, |
DWORD | dwLoadWhat, | ||
const char * | szLanguage, | ||
C4SoundSystem * | pSoundSystem = nullptr , |
||
bool | fOverload = false , |
||
int32_t | iMinProgress = 0 , |
||
int32_t | iMaxProgress = 0 |
||
) |
Definition at line 153 of file C4DefList.cpp.
References C4Group::Close(), FormatString(), Game, Load(), LoadFailure, LoadResStr(), LogFatal(), C4Reloc::Open(), Reloc, and C4Game::SetInitProgress().
bool C4DefList::Reload | ( | C4Def * | pDef, |
DWORD | dwLoadWhat, | ||
const char * | szLanguage, | ||
C4SoundSystem * | pSoundSystem = nullptr |
||
) |
Definition at line 420 of file C4DefList.cpp.
References C4DefGraphicsPtrBackup::Add(), AppendAndIncludeSkeletons(), C4DefGraphicsPtrBackup::AssignUpdate(), BuildTable(), C4Def::Clear(), C4Group::Close(), C4Def::Filename, C4Group::GetName(), C4Def::Graphics, C4Def::Load(), and C4Group::Open().
Referenced by C4Game::ReloadDef().
void C4DefList::Remove | ( | C4Def * | def | ) |
Definition at line 220 of file C4DefList.cpp.
References FirstDef, and C4Def::Next.
Referenced by C4Game::ReloadDef().
bool C4DefList::Remove | ( | C4ID | id | ) |
int32_t C4DefList::RemoveTemporary | ( | ) |
Definition at line 343 of file C4DefList.cpp.
References BuildTable(), FirstDef, C4Def::Next, and C4Def::Temporary.
void C4DefList::ResetIncludeDependencies | ( | ) |
Definition at line 78 of file stub-handle.cpp.
Referenced by C4AulScriptEngine::ReLink().
void C4DefList::SortByPriority | ( | ) |
Definition at line 76 of file stub-handle.cpp.
Referenced by C4AulScriptEngine::Link().
void C4DefList::Synchronize | ( | ) |
Definition at line 458 of file C4DefList.cpp.
References table.
Referenced by C4Game::Synchronize().
|
protected |
Definition at line 35 of file C4DefList.h.
Referenced by Add(), BuildTable(), C4DefList(), CheckEngineVersion(), CheckRequireDef(), Clear(), Default(), GetAllDefs(), GetByPath(), GetDef(), GetDefCount(), GetIndex(), ID2Def(), Remove(), and RemoveTemporary().
bool C4DefList::LoadFailure |
Definition at line 31 of file C4DefList.h.
Referenced by Default(), C4Game::InitDefs(), and Load().
|
protected |
Definition at line 38 of file C4DefList.h.
Referenced by GetLocalizedGroupFolderName(), and Load().
Table C4DefList::table |
Definition at line 33 of file C4DefList.h.
Referenced by C4DefGraphicsPtrBackup::AssignUpdate(), BuildTable(), Default(), GetAllDefs(), and Synchronize().