xoreos  0.0.5
util.cpp
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #include "src/common/util.h"
26 #include "src/common/ustring.h"
27 #include "src/common/filepath.h"
28 
29 #include "src/aurora/util.h"
30 
32 
33 namespace Aurora {
34 
36  {kFileTypeNone, "" },
37  {kFileTypeRES, ".res"},
38  {kFileTypeBMP, ".bmp"},
39  {kFileTypeMVE, ".mve"},
40  {kFileTypeTGA, ".tga"},
41  {kFileTypeWAV, ".wav"},
42  {kFileTypePLT, ".plt"},
43  {kFileTypeINI, ".ini"},
44  {kFileTypeBMU, ".bmu"},
45  {kFileTypeMPG, ".mpg"},
46  {kFileTypeTXT, ".txt"},
47  {kFileTypeWMA, ".wma"},
48  {kFileTypeWMV, ".wmv"},
49  {kFileTypeXMV, ".xmv"},
50  {kFileTypePLH, ".plh"},
51  {kFileTypeTEX, ".tex"},
52  {kFileTypeMDL, ".mdl"},
53  {kFileTypeTHG, ".thg"},
54  {kFileTypeFNT, ".fnt"},
55  {kFileTypeLUA, ".lua"},
56  {kFileTypeSLT, ".slt"},
57  {kFileTypeNSS, ".nss"},
58  {kFileTypeNCS, ".ncs"},
59  {kFileTypeMOD, ".mod"},
60  {kFileTypeARE, ".are"},
61  {kFileTypeSET, ".set"},
62  {kFileTypeIFO, ".ifo"},
63  {kFileTypeBIC, ".bic"},
64  {kFileTypeWOK, ".wok"},
65  {kFileType2DA, ".2da"},
66  {kFileTypeTLK, ".tlk"},
67  {kFileTypeTXI, ".txi"},
68  {kFileTypeGIT, ".git"},
69  {kFileTypeBTI, ".bti"},
70  {kFileTypeUTI, ".uti"},
71  {kFileTypeBTC, ".btc"},
72  {kFileTypeUTC, ".utc"},
73  {kFileTypeDLG, ".dlg"},
74  {kFileTypeITP, ".itp"},
75  {kFileTypeBTT, ".btt"},
76  {kFileTypeUTT, ".utt"},
77  {kFileTypeDDS, ".dds"},
78  {kFileTypeBTS, ".bts"},
79  {kFileTypeUTS, ".uts"},
80  {kFileTypeLTR, ".ltr"},
81  {kFileTypeGFF, ".gff"},
82  {kFileTypeFAC, ".fac"},
83  {kFileTypeBTE, ".bte"},
84  {kFileTypeUTE, ".ute"},
85  {kFileTypeBTD, ".btd"},
86  {kFileTypeUTD, ".utd"},
87  {kFileTypeBTP, ".btp"},
88  {kFileTypeUTP, ".utp"},
89  {kFileTypeDFT, ".dft"},
90  {kFileTypeDTF, ".dtf"},
91  {kFileTypeGIC, ".gic"},
92  {kFileTypeGUI, ".gui"},
93  {kFileTypeCSS, ".css"},
94  {kFileTypeCCS, ".ccs"},
95  {kFileTypeBTM, ".btm"},
96  {kFileTypeUTM, ".utm"},
97  {kFileTypeDWK, ".dwk"},
98  {kFileTypePWK, ".pwk"},
99  {kFileTypeBTG, ".btg"},
100  {kFileTypeUTG, ".utg"},
101  {kFileTypeJRL, ".jrl"},
102  {kFileTypeSAV, ".sav"},
103  {kFileTypeUTW, ".utw"},
104  {kFileType4PC, ".4pc"},
105  {kFileTypeSSF, ".ssf"},
106  {kFileTypeHAK, ".hak"},
107  {kFileTypeNWM, ".nwm"},
108  {kFileTypeBIK, ".bik"},
109  {kFileTypeNDB, ".ndb"},
110  {kFileTypePTM, ".ptm"},
111  {kFileTypePTT, ".ptt"},
112  {kFileTypeNCM, ".ncm"},
113  {kFileTypeMFX, ".mfx"},
114  {kFileTypeMAT, ".mat"},
115  {kFileTypeMDB, ".mdb"},
116  {kFileTypeSAY, ".say"},
117  {kFileTypeTTF, ".ttf"},
118  {kFileTypeTTC, ".ttc"},
119  {kFileTypeCUT, ".cut"},
120  {kFileTypeKA, ".ka" },
121  {kFileTypeJPG, ".jpg"},
122  {kFileTypeICO, ".ico"},
123  {kFileTypeOGG, ".ogg"},
124  {kFileTypeSPT, ".spt"},
125  {kFileTypeSPW, ".spw"},
126  {kFileTypeWFX, ".wfx"},
127  {kFileTypeUGM, ".ugm"},
128  {kFileTypeQDB, ".qdb"},
129  {kFileTypeQST, ".qst"},
130  {kFileTypeNPC, ".npc"},
131  {kFileTypeSPN, ".spn"},
132  {kFileTypeUTX, ".utx"},
133  {kFileTypeMMD, ".mmd"},
134  {kFileTypeSMM, ".smm"},
135  {kFileTypeUTA, ".uta"},
136  {kFileTypeMDE, ".mde"},
137  {kFileTypeMDV, ".mdv"},
138  {kFileTypeMDA, ".mda"},
139  {kFileTypeMBA, ".mba"},
140  {kFileTypeOCT, ".oct"},
141  {kFileTypeBFX, ".bfx"},
142  {kFileTypePDB, ".pdb"},
143  {kFileTypeTheWitcherSave, ".TheWitcherSave"},
144  {kFileTypePVS, ".pvs"},
145  {kFileTypeCFX, ".cfx"},
146  {kFileTypeLUC, ".luc"},
147  {kFileTypePRB, ".prb"},
148  {kFileTypeCAM, ".cam"},
149  {kFileTypeVDS, ".vds"},
150  {kFileTypeBIN, ".bin"},
151  {kFileTypeWOB, ".wob"},
152  {kFileTypeAPI, ".api"},
153  {kFileTypeProperties, ".properties"},
154  {kFileTypePNG, ".png"},
155  {kFileTypeLYT, ".lyt"},
156  {kFileTypeVIS, ".vis"},
157  {kFileTypeRIM, ".rim"},
158  {kFileTypePTH, ".pth"},
159  {kFileTypeLIP, ".lip"},
160  {kFileTypeBWM, ".bwm"},
161  {kFileTypeTXB, ".txb"},
162  {kFileTypeTPC, ".tpc"},
163  {kFileTypeMDX, ".mdx"},
164  {kFileTypeRSV, ".rsv"},
165  {kFileTypeSIG, ".sig"},
166  {kFileTypeMAB, ".mab"},
167  {kFileTypeQST2, ".qst2"},
168  {kFileTypeSTO, ".sto"},
169  {kFileTypeHEX, ".hex"},
170  {kFileTypeMDX2, ".mdx2"},
171  {kFileTypeTXB2, ".txb2"},
172  {kFileTypeFSM, ".fsm"},
173  {kFileTypeART, ".art"},
174  {kFileTypeAMP, ".amp"},
175  {kFileTypeCWA, ".cwa"},
176  {kFileTypeBIP, ".bip"},
177  {kFileTypeMDB2, ".mdb2"},
178  {kFileTypeMDA2, ".mda2"},
179  {kFileTypeSPT2, ".spt2"},
180  {kFileTypeGR2, ".gr2"},
181  {kFileTypeFXA, ".fxa"},
182  {kFileTypeFXE, ".fxe"},
183  {kFileTypeJPG2, ".jpg2"},
184  {kFileTypePWC, ".pwc"},
185  {kFileType1DA, ".1da"},
186  {kFileTypeERF, ".erf"},
187  {kFileTypeBIF, ".bif"},
188  {kFileTypeKEY, ".key"},
189 
190  {kFileTypeEXE, ".exe"},
191  {kFileTypeDBF, ".dbf"},
192  {kFileTypeCDX, ".cdx"},
193  {kFileTypeFPT, ".fpt"},
194 
195  {kFileTypeZIP, ".zip"},
196  {kFileTypeFXM, ".fxm"},
197  {kFileTypeFXS, ".fxs"},
198  {kFileTypeXML, ".xml"},
199  {kFileTypeWLK, ".wlk"},
200  {kFileTypeUTR, ".utr"},
201  {kFileTypeSEF, ".sef"},
202  {kFileTypePFX, ".pfx"},
203  {kFileTypeTFX, ".tfx"},
204  {kFileTypeIFX, ".ifx"},
205  {kFileTypeLFX, ".lfx"},
206  {kFileTypeBBX, ".bbx"},
207  {kFileTypePFB, ".pfb"},
208  {kFileTypeUPE, ".upe"},
209  {kFileTypeUSC, ".usc"},
210  {kFileTypeULT, ".ult"},
211  {kFileTypeFX , ".fx" },
212  {kFileTypeMAX, ".max"},
213  {kFileTypeDOC, ".doc"},
214  {kFileTypeSCC, ".scc"},
215  {kFileTypeWMP, ".wmp"},
216  {kFileTypeOSC, ".osc"},
217  {kFileTypeTRN, ".trn"},
218  {kFileTypeUEN, ".uen"},
219  {kFileTypeROS, ".ros"},
220  {kFileTypeRST, ".rst"},
221  {kFileTypePTX, ".ptx"},
222  {kFileTypeLTX, ".ltx"},
223  {kFileTypeTRX, ".trx"},
224 
225  {kFileTypeNDS, ".nds"},
226  {kFileTypeHERF, ".herf"},
227  {kFileTypeDICT, ".dict"},
228  {kFileTypeSMALL, ".small"},
229  {kFileTypeCBGT, ".cbgt"},
230  {kFileTypeCDPTH, ".cdpth"},
231  {kFileTypeEMIT, ".emit"},
232  {kFileTypeITM, ".itm"},
233  {kFileTypeNANR, ".nanr"},
234  {kFileTypeNBFP, ".nbfp"},
235  {kFileTypeNBFS, ".nbfs"},
236  {kFileTypeNCER, ".ncer"},
237  {kFileTypeNCGR, ".ncgr"},
238  {kFileTypeNCLR, ".nclr"},
239  {kFileTypeNFTR, ".nftr"},
240  {kFileTypeNSBCA, ".nsbca"},
241  {kFileTypeNSBMD, ".nsbmd"},
242  {kFileTypeNSBTA, ".nsbta"},
243  {kFileTypeNSBTP, ".nsbtp"},
244  {kFileTypeNSBTX, ".nsbtx"},
245  {kFileTypePAL, ".pal"},
246  {kFileTypeRAW, ".raw"},
247  {kFileTypeSADL, ".sadl"},
248  {kFileTypeSDAT, ".sdat"},
249  {kFileTypeSMP, ".smp"},
250  {kFileTypeSPL, ".spl"},
251  {kFileTypeVX, ".vx"},
252 
253  {kFileTypeANB, ".anb"},
254  {kFileTypeANI, ".ani"},
255  {kFileTypeCNS, ".cns"},
256  {kFileTypeCUR, ".cur"},
257  {kFileTypeEVT, ".evt"},
258  {kFileTypeFDL, ".fdl"},
259  {kFileTypeFXO, ".fxo"},
260  {kFileTypeGAD, ".gad"},
261  {kFileTypeGDA, ".gda"},
262  {kFileTypeGFX, ".gfx"},
263  {kFileTypeLDF, ".ldf"},
264  {kFileTypeLST, ".lst"},
265  {kFileTypeMAL, ".mal"},
266  {kFileTypeMAO, ".mao"},
267  {kFileTypeMMH, ".mmh"},
268  {kFileTypeMOP, ".mop"},
269  {kFileTypeMOR, ".mor"},
270  {kFileTypeMSH, ".msh"},
271  {kFileTypeMTX, ".mtx"},
272  {kFileTypeNCC, ".ncc"},
273  {kFileTypePHY, ".phy"},
274  {kFileTypePLO, ".plo"},
275  {kFileTypeSTG, ".stg"},
276  {kFileTypeTBI, ".tbi"},
277  {kFileTypeTNT, ".tnt"},
278  {kFileTypeARL, ".arl"},
279  {kFileTypeFEV, ".fev"},
280  {kFileTypeFSB, ".fsb"},
281  {kFileTypeOPF, ".opf"},
282  {kFileTypeCRF, ".crf"},
283  {kFileTypeRIMP, ".rimp"},
284  {kFileTypeMET, ".met"},
285  {kFileTypeMETA, ".meta"},
286  {kFileTypeFXR, ".fxr"},
287  {kFileTypeFXT, ".fxt"},
288  {kFileTypeCIF, ".cif"},
289  {kFileTypeCUB, ".cub"},
290  {kFileTypeDLB, ".dlb"},
291  {kFileTypeNSC, ".nsc"},
292 
293  {kFileTypeMOV, ".mov"},
294  {kFileTypeCURS, ".curs"},
295  {kFileTypePICT, ".pict"},
296  {kFileTypeRSRC, ".rsrc"},
297  {kFileTypePLIST, ".plist"},
298 
299  {kFileTypeCRE, ".cre"},
300  {kFileTypePSO, ".pso"},
301  {kFileTypeVSO, ".vso"},
302  {kFileTypeABC, ".abc"},
303  {kFileTypeSBM, ".sbm"},
304  {kFileTypePVD, ".pvd"},
305  {kFileTypePLA, ".pla"},
306  {kFileTypeTRG, ".trg"},
307  {kFileTypePK, ".pk" },
308 
309  {kFileTypeALS, ".als"},
310  {kFileTypeAPL, ".apl"},
311  {kFileTypeAssembly, ".assembly"},
312  {kFileTypeBAK, ".bak"},
313  {kFileTypeBNK, ".bnk"},
314  {kFileTypeCL, ".cl"},
315  {kFileTypeCNV, ".cnv"},
316  {kFileTypeCON, ".con"},
317  {kFileTypeDAT, ".dat"},
318  {kFileTypeDX11, ".dx11"},
319  {kFileTypeIDS, ".ids"},
320  {kFileTypeLOG, ".log"},
321  {kFileTypeMAP, ".map"},
322  {kFileTypeMML, ".mml"},
323  {kFileTypeMP3, ".mp3"},
324  {kFileTypePCK, ".pck"},
325  {kFileTypeRML, ".rml"},
326  {kFileTypeS, ".s" },
327  {kFileTypeSTA, ".sta"},
328  {kFileTypeSVR, ".svr"},
329  {kFileTypeVLM, ".vlm"},
330  {kFileTypeWBD, ".wbd"},
331  {kFileTypeXBX, ".xbx"},
332  {kFileTypeXLS, ".xls"},
333 
334  {kFileTypeBZF, ".bzf"},
335 
336  {kFileTypeADV, ".adv"},
337 
338  {kFileTypeJSON, ".json"},
339  {kFileTypeTLK_EXPERT, ".tlk_expert"},
340  {kFileTypeTLK_MOBILE, ".tlk_mobile"},
341  {kFileTypeTLK_TOUCH, ".tlk_touch"},
342  {kFileTypeOTF, ".otf"},
343  {kFileTypePAR, ".par"},
344 
345  {kFileTypeXWB, ".xwb"},
346  {kFileTypeXSB, ".xsb"},
347 
348  {kFileTypeXDS, ".xds"},
349  {kFileTypeWND, ".wnd"},
350 
351  {kFileTypeXEOSITEX, ".xoreositex"}
352 };
353 
354 
356 }
357 
359 }
360 
363 
365 
366  ExtensionLookup::const_iterator t = _extensionLookup.find(ext);
367  if (t != _extensionLookup.end())
368  return t->second->type;
369 
370  return kFileTypeNone;
371 }
372 
374  return setFileType(path + ".", type);
375 }
376 
378  buildTypeLookup();
379 
380  Common::UString ext;
381  TypeLookup::const_iterator t = _typeLookup.find(type);
382  if (t != _typeLookup.end())
383  ext = t->second->extension;
384 
385  return Common::FilePath::changeExtension(path, ext);
386 }
387 
389  if ((algo < 0) || (algo >= Common::kHashMAX))
390  return kFileTypeNone;
391 
392  buildHashLookup(algo);
393 
394  HashLookup::const_iterator t = _hashLookup[algo].find(hashedExtension);
395  if (t != _hashLookup[algo].end())
396  return t->second->type;
397 
398  return kFileTypeNone;
399 }
400 
402  if (!_extensionLookup.empty())
403  return;
404 
405  for (size_t i = 0; i < ARRAYSIZE(types); i++)
406  _extensionLookup.insert(std::make_pair(Common::UString(types[i].extension), &types[i]));
407 }
408 
410  if (!_typeLookup.empty())
411  return;
412 
413  for (size_t i = 0; i < ARRAYSIZE(types); i++)
414  _typeLookup.insert(std::make_pair(types[i].type, &types[i]));
415 }
416 
418  if (!_hashLookup[algo].empty())
419  return;
420 
421  for (size_t i = 0; i < ARRAYSIZE(types); i++) {
422  const char *ext = types[i].extension;
423  if (ext[0] == '.')
424  ext++;
425 
426  _hashLookup[algo].insert(std::make_pair(Common::hashString(ext, algo), &types[i]));
427  }
428 }
429 
431  static const char * const names[] = {
432  "Windows", "Mac OS X", "GNU/Linux", "Xbox", "Xbox 360", "PlayStation 3", "Nintendo DS",
433  "Android", "iOS", "Unknown"
434  };
435 
436  return names[platform];
437 }
438 
439 } // End of namespace Aurora
ExtensionLookup _extensionLookup
Definition: util.h:72
Plot information.
Definition: types.h:304
Sound template (BioWare), GFF.
Definition: types.h:99
Placeable walk mesh.
Definition: types.h:119
Icon, Windows ICO.
Definition: types.h:143
Table data, 2-dimensional text array.
Definition: types.h:86
Plot wizard template, GFF.
Definition: types.h:132
Compressed file, Nintendo LZSS.
Definition: types.h:257
Script, NWScript source.
Definition: types.h:78
void buildExtensionLookup()
Definition: util.cpp:401
Image, raw.
Definition: types.h:275
Packed layer texture.
Definition: types.h:63
Head Morph.
Definition: types.h:299
Video, Windows media.
Definition: types.h:69
Placeable template (BioWare), GFF.
Definition: types.h:108
A class holding an UTF-8 string.
Definition: ustring.h:48
Geometry, BioWare model.
Definition: types.h:73
Talk table for extra mobile port strings, plain text.
Definition: types.h:376
Texture information.
Definition: types.h:88
Waypoint template, GFF.
Definition: types.h:124
Game resource data.
Definition: types.h:208
static UString getExtension(const UString &p)
Return a file name&#39;s extension.
Definition: filepath.cpp:93
Script, compiled client script.
Definition: types.h:302
Image, Nitro CEll Resource.
Definition: types.h:265
uint64_t uint64
Definition: types.h:206
NWScript client script source.
Definition: types.h:321
Game save in The Witcher.
Definition: types.h:164
Texture.
Definition: types.h:386
Trigger template (user), GFF.
Definition: types.h:97
Texture, custom 16-bit RGBA.
Definition: types.h:125
Material Object.
Definition: types.h:296
Script, conditional compiled script.
Definition: types.h:115
Crowd attributes, GFF.
Definition: types.h:196
Default values.
Definition: types.h:110
Game resource index.
Definition: types.h:209
Item template (BioWare), GFF.
Definition: types.h:90
Module resources, RIM.
Definition: types.h:178
const char * extension
Definition: util.h:63
Animation, Nitro ANimation Resource.
Definition: types.h:262
Random item generator template (user), GFF.
Definition: types.h:121
Utility functions to handle files used in BioWare&#39;s Aurora engine.
Default value file, INI.
Definition: types.h:111
Image, JPEG.
Definition: types.h:142
#define ARRAYSIZE(x)
Macro which determines the number of entries in a fixed size array.
Definition: util.h:131
Particle effect.
Definition: types.h:230
XACT SoundBank.
Definition: types.h:383
Area data, room layout.
Definition: types.h:176
Area list.
Definition: types.h:294
Texture.
Definition: types.h:182
Generic GFF.
Definition: types.h:58
Geometry, model mesh data.
Definition: types.h:184
Special effect file.
Definition: types.h:229
Walk mesh.
Definition: types.h:227
Face metadata, FaceFX.
Definition: types.h:224
Script, LUA bytecode.
Definition: types.h:167
Texture part.
Definition: types.h:272
Mac property list (XML).
Definition: types.h:328
Sound template (user), GFF.
Definition: types.h:100
FoxPro database memo file.
Definition: types.h:220
Quest, GFF.
Definition: types.h:188
Random item generator template (BioWare), GFF.
Definition: types.h:120
Face bone definitions, FaceFX Actor.
Definition: types.h:223
Module resources.
Definition: types.h:207
Lipsync data.
Definition: types.h:180
Common::UString addFileType(const Common::UString &path, FileType type)
Return the file name with an added extensions according to the specified file type.
Definition: util.cpp:373
Journal data, GFF.
Definition: types.h:122
Prefab blueprint.
Definition: types.h:235
Letter combo probability information.
Definition: types.h:101
Cursor, Windows cursor.
Definition: types.h:286
Common::UString setFileType(const Common::UString &path, FileType type)
Return the file name with a swapped extensions according to the specified file type.
Definition: util.cpp:377
Image, Portable Network Graphics.
Definition: types.h:175
xBase database.
Definition: types.h:218
Video, MPEG.
Definition: types.h:66
Palette, Nitro CoLoR.
Definition: types.h:267
Area environment settings, INI.
Definition: types.h:194
Texture animation.
Definition: types.h:271
Door template (BioWare), GFF.
Definition: types.h:106
Texture.
Definition: types.h:72
Area layout.
Definition: types.h:308
Store template (user), GFF.
Definition: types.h:117
Script, conditional source script.
Definition: types.h:114
Extensible Markup Language.
Definition: types.h:226
Font, character bitmap data.
Definition: types.h:335
Face metadata, FaceFX.
Definition: types.h:225
Geometry, model mesh data.
Definition: types.h:191
Animation event.
Definition: types.h:287
GOB Animation Data.
Definition: types.h:290
Audio, FMOD sound bank.
Definition: types.h:310
Video, Actimagine.
Definition: types.h:280
Game save, ERF.
Definition: types.h:123
Audio, Sound DATa.
Definition: types.h:277
Campaign information.
Definition: types.h:169
Material, binary.
Definition: types.h:187
Lipsync data, binary LIP.
Definition: types.h:197
Utility templates and functions.
Script, LUA source.
Definition: types.h:76
Dialog tree, GFF.
Definition: types.h:94
Door walk mesh.
Definition: types.h:118
#define DECLARE_SINGLETON(T)
Note that you need to use this macro from the global namespace.
Definition: singleton.h:122
Video, Infinity Engine.
Definition: types.h:60
HashLookup _hashLookup[Common::kHashMAX]
Definition: util.h:74
Walk mesh.
Definition: types.h:85
Placeable template (user), GFF.
Definition: types.h:109
Tree template (user), GFF.
Definition: types.h:228
Model Mesh Hierarchy.
Definition: types.h:297
For range checks.
Definition: hash.h:43
Image, Windows bitmap.
Definition: types.h:59
Talk table for extra touch control strings, plain text.
Definition: types.h:377
Font, True Type.
Definition: types.h:138
Light template (user), GFF.
Definition: types.h:238
Audio, Ogg Vorbis.
Definition: types.h:144
Script, client script source.
Definition: types.h:285
Resource meta information.
Definition: types.h:314
Game resource data, LZMA-compressed BIF.
Definition: types.h:368
Image, Map, Nitro Basic File Screen.
Definition: types.h:264
HashAlgo
The algorithm used for hashing.
Definition: hash.h:37
Placeable, GFF.
Definition: types.h:337
Geometry, BioWare model.
Definition: types.h:136
Material.
Definition: types.h:135
Archive, Nintendo DS ROM file.
Definition: types.h:254
Sound Set File.
Definition: types.h:126
static uint64 hashString(const UString &string, HashAlgo algo)
Hash the string with the given algorithm, as a series of UTF-8 characters.
Definition: hash.h:218
Texture.
Definition: types.h:183
Trigger, GFF.
Definition: types.h:338
Talk table.
Definition: types.h:87
Cursor, Mac CURS format.
Definition: types.h:325
Cutscene, GFF.
Definition: types.h:140
Intermediate texture.
Definition: types.h:390
World map, GFF.
Definition: types.h:243
Module information, GFF.
Definition: types.h:83
static const Type types[]
Definition: util.h:66
Resource hak pak, ERF.
Definition: types.h:127
Quest, GFF.
Definition: types.h:150
Material tint.
Definition: types.h:307
XACT WaveBank.
Definition: types.h:382
Video, QuickTime/MPEG-4.
Definition: types.h:324
Tileset.
Definition: types.h:82
Generic GFF.
Definition: types.h:102
Animation blend.
Definition: types.h:283
Windows PE EXE file.
Definition: types.h:217
Encounter template (user), GFF.
Definition: types.h:105
Palette, Nitro Basic File Palette.
Definition: types.h:263
Trigger template (BioWare), GFF.
Definition: types.h:96
FileType getFileType(const Common::UString &path)
Return the file type of a file name, detected by its extension.
Definition: util.cpp:361
Unicode string handling.
Line effect.
Definition: types.h:233
Extra adventure modules, ERF.
Definition: types.h:371
Video, RAD Game Tools Bink.
Definition: types.h:129
void buildHashLookup(Common::HashAlgo algo)
Definition: util.cpp:417
Creature, GFF.
Definition: types.h:331
Table data, GFF&#39;d 2DA, 2-dimensional text array.
Definition: types.h:291
FMOD Event.
Definition: types.h:309
OpenType Font.
Definition: types.h:378
UString toLower() const
Return a lowercased copy of the string.
Definition: ustring.cpp:481
Neverwinter Nights original campaign module, ERF.
Definition: types.h:128
Dynamic area data, GFF.
Definition: types.h:89
Store template (BioWare), GFF.
Definition: types.h:116
Script, NWScript bytecode.
Definition: types.h:79
Cutscene stage.
Definition: types.h:305
Toolset "palette" (tree of tiles or object templates), GFF.
Definition: types.h:95
Plot instance/manager, GFF.
Definition: types.h:131
Campaign Information File, GFF4.
Definition: types.h:318
Face metadata, FaceFX.
Definition: types.h:316
Hex grid file.
Definition: types.h:190
Module, ERF.
Definition: types.h:80
Item template (user), GFF.
Definition: types.h:91
Faction information, GFF.
Definition: types.h:103
Static area data, GFF.
Definition: types.h:81
Creature template (BioWare), GFF.
Definition: types.h:92
Audio, Windows media.
Definition: types.h:68
Physics, Novodex collision info.
Definition: types.h:303
GUI definition, GFF.
Definition: types.h:113
Talk table for extra expert-level control strings, plain text.
Definition: types.h:375
FileType
Various file types used by the Aurora engine and found in archives.
Definition: types.h:56
Material Library.
Definition: types.h:295
Karma, XML.
Definition: types.h:141
Script debugger file.
Definition: types.h:130
Table data, 1-dimensional text array.
Definition: types.h:206
Trail effect.
Definition: types.h:231
Image, Truevision TARGA image.
Definition: types.h:61
Door template (user), GFF.
Definition: types.h:107
Font, character descriptions.
Definition: types.h:334
Vector graphics animation, Scaleform GFx.
Definition: types.h:292
Video, Xbox.
Definition: types.h:70
Configuration, Windows INI.
Definition: types.h:64
Common::UString getPlatformDescription(Platform platform)
Return the human readable string of a Platform.
Definition: util.cpp:430
Image, Mac PICT format.
Definition: types.h:326
Archive, hashed ERF.
Definition: types.h:255
Model Animation.
Definition: types.h:269
Image, Nitro Character Graphic Resource.
Definition: types.h:266
HERF file name -> hashes dictionary.
Definition: types.h:256
TypeLookup _typeLookup
Definition: util.h:73
Billboard effect.
Definition: types.h:234
Quest database, GFF.
Definition: types.h:149
Character data, GFF.
Definition: types.h:84
Language definition file.
Definition: types.h:293
Spells, 2DA.
Definition: types.h:279
Face metadata, FaceFX.
Definition: types.h:317
Encounter template (BioWare), GFF.
Definition: types.h:104
FoxPro database index.
Definition: types.h:219
Creature template (user), GFF.
Definition: types.h:93
Game instance comments, GFF.
Definition: types.h:112
Platform
Definition: types.h:429
Resource meta information.
Definition: types.h:315
Palette.
Definition: types.h:274
Path finder data, GFF.
Definition: types.h:179
Texture, DirectDraw Surface.
Definition: types.h:98
Audio, Waveform.
Definition: types.h:62
Utility class for manipulating file paths.
Brightening control.
Definition: types.h:195
Items, 2DA.
Definition: types.h:261
Finite State Machine data.
Definition: types.h:193
Text, raw.
Definition: types.h:67
Tree data SpeedTree.
Definition: types.h:145
static UString changeExtension(const UString &p, const UString &ext="")
Change a file name&#39;s extension.
Definition: filepath.cpp:99
Animation sequence.
Definition: types.h:284
Mac resource fork.
Definition: types.h:327
Woot effect class, XML.
Definition: types.h:147
JavaScript Object Notation.
Definition: types.h:374
Audio, MP3 with extra header.
Definition: types.h:65
Area data, room visibilities.
Definition: types.h:177