OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4DefList.cpp
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 1998-2000, Matthes Bender
5  * Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de/
6  * Copyright (c) 2009-2016, The OpenClonk Team and contributors
7  *
8  * Distributed under the terms of the ISC license; see accompanying file
9  * "COPYING" for details.
10  *
11  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
12  * See accompanying file "TRADEMARK" for details.
13  *
14  * To redistribute this file separately, substitute the full license texts
15  * for the above references.
16  */
17 
18 /* Object definition */
19 
20 #include "C4Include.h"
21 #include "object/C4DefList.h"
22 
23 #include "c4group/C4Components.h"
24 #include "control/C4Record.h"
25 #include "game/C4GameScript.h"
26 #include "game/C4GameVersion.h"
27 #include "lib/StdMeshLoader.h"
28 #include "object/C4Def.h"
29 #include "platform/C4FileMonitor.h"
30 
31 namespace
32 {
33  class C4SkeletonManager : public StdMeshSkeletonLoader
34  {
35  StdMeshSkeleton* GetSkeletonByDefinition(const char* definition) const override
36  {
37  // find the definition
38  C4Def* def = ::Definitions.ID2Def(C4ID(definition));
39  if (!def)
40  {
41  DebugLogF("WARNING: Looking up skeleton from definition '%s' failed, because there is no such definition with that ID", definition);
42  return nullptr;
43  }
44 
45  // append animations, if the definition has a mesh
46  if (!def->Graphics.IsMesh())
47  {
48  DebugLogF("WARNING: Looking up skeleton from definition '%s' failed, because the definition has no mesh", definition);
49  return nullptr;
50  }
51  else
52  {
53  StdMesh* mesh = def->Graphics.Mesh;
54 
55  return &(mesh->GetSkeleton());
56  }
57  }
58  };
59 }
60 
61 C4DefList::C4DefList() : SkeletonLoader(new C4SkeletonManager)
62 {
63  Default();
64 }
65 
67 {
68  Clear();
69 }
70 
71 int32_t C4DefList::Load(C4Group &hGroup, DWORD dwLoadWhat,
72  const char *szLanguage,
73  C4SoundSystem *pSoundSystem,
74  bool fOverload,
75  bool fSearchMessage, int32_t iMinProgress, int32_t iMaxProgress, bool fLoadSysGroups)
76 {
77  int32_t iResult=0;
78  C4Def *nDef = nullptr;
79  char szEntryname[_MAX_FNAME+1];
80  C4Group hChild;
81  bool fPrimaryDef=false;
82  bool fThisSearchMessage=false;
83  bool can_be_primary_def = SEqualNoCase(GetExtension(hGroup.GetName()), "ocd");
84 
85  // This search message
86  if (fSearchMessage)
87  if (can_be_primary_def
88  || SEqualNoCase(GetExtension(hGroup.GetName()),"ocs")
89  || SEqualNoCase(GetExtension(hGroup.GetName()),"ocf"))
90  {
91  fThisSearchMessage=true;
92  fSearchMessage=false;
93  }
94 
95  if (fThisSearchMessage) { LogF("%s...",GetFilename(hGroup.GetName())); }
96 
97  // Load primary definition
98  if (can_be_primary_def)
99  {
100  if ((nDef = new C4Def))
101  {
102  if (nDef->Load(hGroup, *SkeletonLoader, dwLoadWhat, szLanguage, pSoundSystem) && Add(nDef, fOverload))
103  {
104  iResult++; fPrimaryDef = true;
105  }
106  else
107  {
108  delete nDef;
109  nDef = nullptr;
110  }
111  }
112  }
113 
114  // Remember localized name for pure definition groups
115  if (!nDef)
116  {
117  C4ComponentHost title_file;
118  StdCopyStrBuf title;
120  if (title_file.GetLanguageString(Config.General.LanguageEx, title))
121  {
122  StdCopyStrBuf group_path(hGroup.GetFullName());
124  localized_group_folder_names[group_path] = title;
125  }
126  }
127 
128  // Load sub definitions
129  int i = 0;
130  hGroup.ResetSearch();
131  while (hGroup.FindNextEntry(C4CFN_DefFiles,szEntryname))
132  if (hChild.OpenAsChild(&hGroup,szEntryname))
133  {
134  // Hack: Assume that there are sixteen sub definitions to avoid unnecessary I/O
135  int iSubMinProgress = std::min(iMaxProgress, iMinProgress + ((iMaxProgress - iMinProgress) * i) / 16);
136  int iSubMaxProgress = std::min(iMaxProgress, iMinProgress + ((iMaxProgress - iMinProgress) * (i + 1)) / 16);
137  ++i;
138  iResult += Load(hChild,dwLoadWhat,szLanguage,pSoundSystem,fOverload,fSearchMessage,iSubMinProgress,iSubMaxProgress);
139  hChild.Close();
140  }
141 
142  // load additional system scripts for def groups only
143  if (!fPrimaryDef && fLoadSysGroups) Game.LoadAdditionalSystemGroup(hGroup);
144 
145  if (fThisSearchMessage) { LogF(LoadResStr("IDS_PRC_DEFSLOADED"),iResult); }
146 
147  // progress (could go down one level of recursion...)
148  if (iMinProgress != iMaxProgress) Game.SetInitProgress(float(iMaxProgress));
149 
150  return iResult;
151 }
152 
153 int32_t C4DefList::Load(const char *szFilename,
154  DWORD dwLoadWhat, const char *szLanguage,
155  C4SoundSystem *pSoundSystem,
156  bool fOverload, int32_t iMinProgress, int32_t iMaxProgress)
157 {
158  // Load from specified file
159  C4Group hGroup;
160  if (!Reloc.Open(hGroup, szFilename))
161  {
162  // Specified file not found (failure)
163  LogFatal(FormatString(LoadResStr("IDS_PRC_DEFNOTFOUND"), szFilename).getData());
164  LoadFailure=true;
165  return 0; // 0 definitions loaded
166  }
167  int32_t nDefs = Load(hGroup,dwLoadWhat,szLanguage,pSoundSystem,fOverload,true,iMinProgress,iMaxProgress);
168  hGroup.Close();
169 
170  // progress (could go down one level of recursion...)
171  if (iMinProgress != iMaxProgress) Game.SetInitProgress(float(iMaxProgress));
172 
173  return nDefs;
174 }
175 
176 bool C4DefList::Add(C4Def *pDef, bool fOverload)
177 {
178  if (!pDef) return false;
179 
180  // Check old def to overload
181  C4Def *pLastDef = ID2Def(pDef->id);
182  if (pLastDef && !fOverload) return false;
183 
184  // Log overloaded def
186  if (pLastDef)
187  {
188  LogF(LoadResStr("IDS_PRC_DEFOVERLOAD"),pDef->GetName(),pLastDef->id.ToString());
190  {
191  LogF(" Old def at %s",pLastDef->Filename);
192  LogF(" Overload by %s",pDef->Filename);
193  }
194  }
195 
196  // Remove old def
197  Remove(pDef->id);
198 
199  // Add new def
200  pDef->Next=FirstDef;
201  FirstDef=pDef;
202 
203  return true;
204 }
205 
207 {
208  C4Def *cdef,*prev;
209  for (cdef=FirstDef,prev=nullptr; cdef; prev=cdef,cdef=cdef->Next)
210  if (cdef->id==id)
211  {
212  if (prev) prev->Next=cdef->Next;
213  else FirstDef=cdef->Next;
214  delete cdef;
215  return true;
216  }
217  return false;
218 }
219 
221 {
222  C4Def *cdef,*prev;
223  for (cdef=FirstDef,prev=nullptr; cdef; prev=cdef,cdef=cdef->Next)
224  if (cdef==def)
225  {
226  if (prev) prev->Next=cdef->Next;
227  else FirstDef=cdef->Next;
228  delete cdef;
229  return;
230  }
231 }
232 
233 void C4DefList::Clear()
234 {
235  C4Def *cdef,*next;
236  for (cdef=FirstDef; cdef; cdef=next)
237  {
238  next=cdef->Next;
239  delete cdef;
240  }
241  FirstDef=nullptr;
242  // clear quick access table
243  table.clear();
244  // clear localized group names table
246  // clear loaded skeletons
247  SkeletonLoader->Clear();
248 }
249 
251 {
252  if (id==C4ID::None) return nullptr;
253  if (table.empty())
254  {
255  // table not yet built: search list
256  C4Def *cdef;
257  for (cdef=FirstDef; cdef; cdef=cdef->Next)
258  if (cdef->id==id) return cdef;
259  }
260  else
261  {
262  Table::const_iterator it = table.find(id);
263  if (it != table.end())
264  return it->second;
265  }
266  // none found
267  return nullptr;
268 }
269 
270 C4Def * C4DefList::GetByName(const StdStrBuf & name)
271 {
272  return ID2Def(C4ID(name));
273 }
274 
276 {
277  C4Def *cdef;
278  int32_t cindex;
279  for (cdef=FirstDef,cindex=0; cdef; cdef=cdef->Next,cindex++)
280  if (cdef->id==id) return cindex;
281  return -1;
282 }
283 
284 int32_t C4DefList::GetDefCount()
285 {
286  C4Def *cdef; int32_t ccount=0;
287  for (cdef=FirstDef; cdef; cdef=cdef->Next)
288  ccount++;
289  return ccount;
290 }
291 
292 C4Def* C4DefList::GetDef(int32_t iIndex)
293 {
294  C4Def *pDef; int32_t iCurrentIndex;
295  if (iIndex<0) return nullptr;
296  for (pDef=FirstDef,iCurrentIndex=-1; pDef; pDef=pDef->Next)
297  {
298  iCurrentIndex++;
299  if (iCurrentIndex==iIndex) return pDef;
300  }
301  return nullptr;
302 }
303 
304 std::vector<C4Def*> C4DefList::GetAllDefs(C4String *filter_property) const
305 {
306  // Collect vector of all definitions
307  // Filter for those where property evaluates to true if filter_property!=nullptr
308  std::vector<C4Def*> result;
309  result.reserve(filter_property ? 32 : table.size());
310  C4Value prop_val;
311  for (C4Def *def = FirstDef; def; def = def->Next)
312  {
313  if (filter_property)
314  {
315  if (!def->GetPropertyByS(filter_property, &prop_val)) continue;
316  if (!prop_val) continue;
317  }
318  result.push_back(def);
319  }
320  return result;
321 }
322 
323 C4Def *C4DefList::GetByPath(const char *szPath)
324 {
325  // search defs
326  const char *szDefPath;
327  for (C4Def *pDef = FirstDef; pDef; pDef = pDef->Next)
328  if ((szDefPath = Config.AtRelativePath(pDef->Filename)))
329  if (SEqual2NoCase(szPath, szDefPath))
330  {
331  // the definition itself?
332  if (!szPath[SLen(szDefPath)])
333  return pDef;
334  // or a component?
335  else if (szPath[SLen(szDefPath)] == '\\')
336  if (!strchr(szPath + SLen(szDefPath) + 1, '\\'))
337  return pDef;
338  }
339  // not found
340  return nullptr;
341 }
342 
344 {
345  C4Def *cdef,*prev,*next;
346  int32_t removed=0;
347  for (cdef=FirstDef,prev=nullptr; cdef; cdef=next)
348  {
349  next=cdef->Next;
350  if (cdef->Temporary)
351  {
352  if (prev) prev->Next=next;
353  else FirstDef=next;
354  delete cdef;
355  removed++;
356  }
357  else
358  prev=cdef;
359  }
360  // rebuild quick access table
361  BuildTable();
362  return removed;
363 }
364 
365 int32_t C4DefList::CheckEngineVersion(int32_t ver1, int32_t ver2)
366 {
367  int32_t rcount=0;
368  C4Def *cdef,*prev,*next;
369  for (cdef=FirstDef,prev=nullptr; cdef; cdef=next)
370  {
371  next=cdef->Next;
372  if (CompareVersion(cdef->rC4XVer[0],cdef->rC4XVer[1],ver1,ver2) > 0)
373  {
374  if (prev) prev->Next=cdef->Next;
375  else FirstDef=cdef->Next;
376  delete cdef;
377  rcount++;
378  }
379  else prev=cdef;
380  }
381  return rcount;
382 }
383 
385 {
386  int32_t rcount=0, rcount2;
387  C4Def *cdef,*prev,*next;
388  do
389  {
390  rcount2 = rcount;
391  for (cdef=FirstDef,prev=nullptr; cdef; cdef=next)
392  {
393  next=cdef->Next;
394  for (int32_t i = 0; i < cdef->RequireDef.GetNumberOfIDs(); i++)
395  if (GetIndex(cdef->RequireDef.GetID(i)) < 0)
396  {
397  (prev ? prev->Next : FirstDef) = cdef->Next;
398  delete cdef;
399  rcount++;
400  }
401  }
402  }
403  while (rcount != rcount2);
404  return rcount;
405 }
406 
407 void C4DefList::Draw(C4ID id, C4Facet &cgo, bool fSelected, int32_t iColor)
408 {
409  C4Def *cdef = ID2Def(id);
410  if (cdef) cdef->Draw(cgo,fSelected,iColor);
411 }
412 
414 {
415  FirstDef=nullptr;
416  LoadFailure=false;
417  table.clear();
418 }
419 
420 bool C4DefList::Reload(C4Def *pDef, DWORD dwLoadWhat, const char *szLanguage, C4SoundSystem *pSoundSystem)
421 {
422  // Safety
423  if (!pDef) return false;
424  // backup graphics names and pointers
425  // GfxBackup-dtor will ensure that upon loading-failure all graphics are reset to default
426  C4DefGraphicsPtrBackup GfxBackup;
427  GfxBackup.Add(&pDef->Graphics);
428  // Clear def
429  pDef->Clear(); // Assume filename is being kept
430  // Reload def
431  C4Group hGroup;
432  if (!hGroup.Open(pDef->Filename)) return false;
433  // clear all skeletons in that group, so that deleted skeletons are also deleted in the engine
434  SkeletonLoader->RemoveSkeletonsInGroup(hGroup.GetName());
435  // load the definition
436  if (!pDef->Load(hGroup, *SkeletonLoader, dwLoadWhat, szLanguage, pSoundSystem, &GfxBackup)) return false;
437  hGroup.Close();
438  // rebuild quick access table
439  BuildTable();
440  // handle skeleton appends and includes
442  // restore graphics
443  GfxBackup.AssignUpdate();
444  // Success
445  return true;
446 }
447 
448 bool C4DefList::DrawFontImage(const char* szImageTag, C4Facet& cgo, C4DrawTransform* pTransform)
449 {
450  return Game.DrawTextSpecImage(cgo, szImageTag, pTransform);
451 }
452 
453 float C4DefList::GetFontImageAspect(const char* szImageTag)
454 {
455  return Game.GetTextSpecImageAspect(szImageTag);
456 }
457 
459 {
460  for (auto & it : table)
461  it.second->Synchronize();
462 }
463 
465 {
466  for (auto & it : table)
467  it.second->ResetIncludeDependencies();
468 }
469 
471 {
472  // Sort all definitions by DefinitionPriority property (descending)
473  // Build vector of definitions
474  int32_t n = GetDefCount();
475  if (!n) return;
476  std::vector<C4Def *> def_vec;
477  def_vec.reserve(n);
478  for (C4Def *def = FirstDef; def; def = def->Next)
479  def_vec.push_back(def);
480  // Sort it
481  std::stable_sort(def_vec.begin(), def_vec.end(), [](C4Def *a, C4Def *b) {
482  return b->GetPropertyInt(P_DefinitionPriority) < a->GetPropertyInt(P_DefinitionPriority);
483  });
484  // Restore linked list in new definition order
485  C4Def *prev_def = nullptr;
486  for (C4Def *def : def_vec)
487  {
488  if (prev_def)
489  prev_def->Next = def;
490  else
491  FirstDef = def;
492  prev_def = def;
493  }
494  if (prev_def) prev_def->Next = nullptr;
495 }
496 
498 {
499  for (C4Def *def = FirstDef; def; def = def->Next)
500  {
501  if (Config.General.DebugRec)
502  {
503  // TODO: Might not be synchronous on runtime join since is run by joining
504  // client but not by host. Might need to go to Synchronize().
505  char sz[32+1];
506  strncpy(sz, def->id.ToString(), 32+1);
507  AddDbgRec(RCT_Definition, sz, 32);
508  }
509  C4AulParSet Pars(def);
510  def->Call(PSF_Definition, &Pars);
511  }
512 }
513 
515 {
516  table.clear();
517  for (C4Def *def = FirstDef; def; def = def->Next)
518  table.insert(std::make_pair(def->id, def));
519 }
520 
522 {
523  SkeletonLoader->ResolveIncompleteSkeletons();
524 }
525 
527 {
528  return *SkeletonLoader;
529 }
530 
531 const char *C4DefList::GetLocalizedGroupFolderName(const char *folder_path) const
532 {
533  // lookup in map
534  auto iter = localized_group_folder_names.find(StdCopyStrBuf(folder_path));
535  if (iter == localized_group_folder_names.end()) return nullptr;
536  return iter->second.getData();
537 }
char * GetFilename(char *szPath)
Definition: StdFile.cpp:45
C4Def * ID2Def(C4ID id)
void SetInitProgress(float fToProgress)
Definition: C4Game.cpp:3385
bool Load(C4Group &hGroup, StdMeshSkeletonLoader &loader, DWORD dwLoadWhat, const char *szLanguage, class C4SoundSystem *pSoundSystem=nullptr, C4DefGraphicsPtrBackup *gfx_backup=nullptr)
C4ID id
Definition: C4Def.h:101
C4Config Config
Definition: C4Config.cpp:833
std::map< StdCopyStrBuf, StdCopyStrBuf > localized_group_folder_names
Definition: C4DefList.h:38
float GetTextSpecImageAspect(const char *szSpec)
Definition: C4Game.cpp:3759
int32_t VerboseObjectLoading
Definition: C4Config.h:99
C4Game Game
Definition: C4Globals.cpp:52
C4Def * GetDef(int32_t Index)
~C4DefList() override
#define b
C4ConfigGeneral General
Definition: C4Config.h:251
void BuildTable()
Definition: C4DefList.cpp:514
C4Def * GetByPath(const char *szPath)
Definition: C4DefList.cpp:323
int CompareVersion(int iVer1, int iVer2, int iRVer1=C4XVER1, int iRVer2=C4XVER2)
Definition: C4GameVersion.h:51
bool Add(C4Def *ndef, bool fOverload)
bool SEqualNoCase(const char *szStr1, const char *szStr2, int iLen)
Definition: Standard.cpp:185
int32_t GetDefCount()
const StdMeshSkeleton & GetSkeleton() const
Definition: StdMesh.h:203
bool Reload(C4Def *pDef, DWORD dwLoadWhat, const char *szLanguage, C4SoundSystem *pSoundSystem=nullptr)
Definition: C4DefList.cpp:420
C4Def * Next
Definition: C4Def.h:199
#define a
size_t SLen(const char *sptr)
Definition: Standard.h:74
bool DrawFontImage(const char *szImageTag, C4Facet &rTarget, C4DrawTransform *pTransform) override
Definition: stub-handle.cpp:79
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
const char * GetName() const override
Definition: C4PropList.cpp:267
bool GetLanguageString(const char *szLanguage, StdStrBuf &rTarget)
void Add(C4DefGraphics *pGraphics)
#define AltDirectorySeparator
bool Temporary
Definition: C4Def.h:200
C4ConfigGraphics Graphics
Definition: C4Config.h:253
static bool LoadComponentHost(C4ComponentHost *host, C4Group &hGroup, const char *szFilename, const char *szLanguage)
Definition: C4Language.cpp:232
StdMeshSkeletonLoader & GetSkeletonLoader()
Definition: C4DefList.cpp:526
int iResult
Definition: C4GroupMain.cpp:39
#define C4CFN_Title
Definition: C4Components.h:82
void Clear()
Definition: C4Def.cpp:324
float GetFontImageAspect(const char *szImageTag) override
Definition: stub-handle.cpp:80
bool DebugLogF(const char *strMessage...)
Definition: C4Log.cpp:278
void AppendAndIncludeSkeletons()
Definition: C4DefList.cpp:521
bool IsMesh() const
Definition: C4DefGraphics.h:73
const char * GetName() const
Definition: C4Group.cpp:1845
virtual bool GetPropertyByS(const C4String *k, C4Value *pResult) const
Definition: C4PropList.cpp:753
StdStrBuf GetFullName() const
Definition: C4Group.cpp:2078
void Remove(C4Def *def)
Definition: C4DefList.cpp:220
void CallEveryDefinition()
Definition: stub-handle.cpp:77
int32_t CheckRequireDef()
Definition: C4DefList.cpp:384
bool Open(const char *szGroupName, bool fCreate=false)
Definition: C4Group.cpp:514
static const C4ID None
Definition: C4Id.h:39
void Draw(C4Facet &cgo, bool fSelected=false, DWORD iColor=0, C4Object *pObj=nullptr, int32_t iPhaseX=0, int32_t iPhaseY=0, C4DrawTransform *trans=nullptr, const char *graphicsName=nullptr)
Definition: C4Def.cpp:599
void AddDbgRec(C4RecordChunkType eType, const void *pData, int iSize)
Definition: C4Record.cpp:32
Definition: C4Def.h:98
bool Close()
Definition: C4Group.cpp:755
bool Open(C4Group &hGroup, const char *filename) const
Definition: C4Reloc.cpp:68
bool LogFatal(const char *szMessage)
Definition: C4Log.cpp:227
#define _MAX_FNAME
void Clear()
char * GetExtension(char *szFilename)
Definition: StdFile.cpp:121
int32_t rC4XVer[2]
Definition: C4Def.h:102
C4Def * GetByName(const StdStrBuf &)
char LanguageEx[CFG_MaxString+1]
Definition: C4Config.h:37
Definition: C4Id.h:25
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)
Definition: C4DefList.cpp:71
int ReplaceChar(char cOld, char cNew)
Definition: StdBuf.cpp:336
bool LoadFailure
Definition: C4DefList.h:31
C4Reloc Reloc
Definition: C4Reloc.cpp:21
void ResetIncludeDependencies()
Definition: stub-handle.cpp:78
void Draw(C4ID id, C4Facet &cgo, bool fSelected, int32_t iColor)
Definition: C4DefList.cpp:407
void Default()
Definition: C4DefList.cpp:413
void SortByPriority()
Definition: stub-handle.cpp:76
void Synchronize()
Definition: C4DefList.cpp:458
C4IDList RequireDef
Definition: C4Def.h:103
int32_t GetIndex(C4ID id)
Definition: C4DefList.cpp:275
bool FindNextEntry(const char *szWildCard, StdStrBuf *sFileName=nullptr, size_t *iSize=nullptr, bool fStartAtFilename=false)
Definition: C4Group.cpp:1780
const char * ToString() const
Definition: C4Id.h:59
int32_t CheckEngineVersion(int32_t ver1, int32_t ver2)
Definition: C4DefList.cpp:365
bool SEqual2NoCase(const char *szStr1, const char *szStr2, int iLen)
Definition: Standard.cpp:198
#define PSF_Definition
Definition: C4GameScript.h:126
int32_t GetPropertyInt(C4PropertyName k, int32_t default_val=0) const
Definition: C4PropList.cpp:882
char Filename[_MAX_FNAME+1]
Definition: C4Def.h:177
#define C4CFN_DefFiles
Definition: C4Components.h:166
int32_t DebugRec
Definition: C4Config.h:60
void ResetSearch(bool reload_contents=false)
Definition: C4Group.cpp:1013
C4DefList Definitions
Definition: C4Globals.cpp:49
bool LoadAdditionalSystemGroup(class C4Group &parent_group)
Definition: C4Game.cpp:2884
const char * AtRelativePath(const char *szFilename)
Definition: C4Config.cpp:656
C4ID GetID(size_t index, int32_t *ipCount=nullptr) const
Definition: C4IDList.cpp:99
int32_t RemoveTemporary()
Definition: C4DefList.cpp:343
uint32_t DWORD
#define DirectorySeparator
int32_t GetNumberOfIDs() const
Definition: C4IDList.cpp:197
bool LogF(const char *strMessage,...)
Definition: C4Log.cpp:250
C4DefGraphics Graphics
Definition: C4Def.h:192
std::vector< C4Def * > GetAllDefs(C4String *filter_property=nullptr) const
Definition: C4DefList.cpp:304
C4Def * FirstDef
Definition: C4DefList.h:35
bool OpenAsChild(C4Group *pMother, const char *szEntryName, bool fExclusive=false, bool fCreate=false)
Definition: C4Group.cpp:1585
Table table
Definition: C4DefList.h:33
bool DrawTextSpecImage(C4Facet &fctTarget, const char *szSpec, class C4DrawTransform *pTransform, uint32_t dwClr=0xff)
Definition: C4Game.cpp:3737
virtual StdMeshSkeleton * GetSkeletonByDefinition(const char *definition) const =0
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:270
const char * GetLocalizedGroupFolderName(const char *folder_path) const
Definition: C4DefList.cpp:531
C4Value Call(C4PropertyName k, C4AulParSet *pPars=nullptr, bool fPassErrors=false)
Definition: C4PropList.h:110