68 std::vector<Aurora::Language> &languages)
const {
86 languages.push_back(language);
136 progress.
step(
"Declare languages");
139 progress.
step(
"Detecting game version");
145 warning(
"Failed to detect this game's language");
149 progress.
step(
"Loading user game config");
161 progress.
step(
"Loading game cursors");
167 progress.
step(
"Initializing internal game config");
170 GfxMan.setPerspective(55.0, 0.1, 10000.0);
172 progress.
step(
"Successfully initialized the engine");
179 status(
"This is Star Wars: Knights of the Old Republic %s v%s",
183 warning(
"Your version of Star Wars: Knights of the Old Republic is too old");
184 warning(
"Please update to v%s for optimal support",
_version->getOptimumVersionString().c_str());
186 warning(
"Your version of Star Wars: Knights of the Old Republic is too new!?");
187 warning(
"Please contact us with detailed information about your version");
191 warning(
"Failed to detect the patch version of your Star Wars: Knights of the Old Republic installation");
209 LangMan.addLanguages(kLanguageDeclarations,
ARRAYSIZE(kLanguageDeclarations));
217 progress.
step(
"Setting base directory");
220 progress.
step(
"Adding extra archive directories");
232 progress.
step(
"Loading main KEY");
238 progress.
step(
"Loading global auxiliary resources");
253 progress.
step(
"Loading Xbox textures");
257 progress.
step(
"Loading GUI textures");
261 progress.
step(
"Indexing extra sound resources");
263 progress.
step(
"Indexing extra voice resources");
265 progress.
step(
"Indexing extra music resources");
267 progress.
step(
"Indexing extra movie resources");
271 progress.
step(
"Indexing Windows-specific resources");
275 progress.
step(
"Indexing Mac-specific resources");
279 progress.
step(
"Indexing Xbox-specific resources");
291 progress.
step(
"Indexing override files");
298 progress.
step(
"Loading main talk table");
299 TalkMan.addTable(
"dialog",
"dialogf",
false, 0);
302 TalkMan.addTable(
"live1",
"live1f",
true, 0);
304 progress.
step(
"Registering file formats");
309 FontMan.addAlias(
"fnt_d16x16",
"fnt_d16x16b");
313 std::vector<Common::UString> cursorRemap;
315 cursorRemap.push_back(
"gui_mp_defaultu");
316 cursorRemap.push_back(
"gui_mp_defaultd");
317 cursorRemap.push_back(
"gui_mp_walku");
318 cursorRemap.push_back(
"gui_mp_walkd");
319 cursorRemap.push_back(
"gui_mp_invalidu");
320 cursorRemap.push_back(
"gui_mp_invalidd");
321 cursorRemap.push_back(
"gui_mp_bashu");
322 cursorRemap.push_back(
"gui_mp_bashd");
323 cursorRemap.push_back(
"gui_mp_bashup");
324 cursorRemap.push_back(
"gui_mp_bashdp");
325 cursorRemap.push_back(
"gui_mp_talku");
326 cursorRemap.push_back(
"gui_mp_talkd");
327 cursorRemap.push_back(
"gui_mp_notalku");
328 cursorRemap.push_back(
"gui_mp_notalkd");
329 cursorRemap.push_back(
"gui_mp_followu");
330 cursorRemap.push_back(
"gui_mp_followd");
331 cursorRemap.push_back(
"gui_mp_examineu");
332 cursorRemap.push_back(
"gui_mp_examined");
333 cursorRemap.push_back(
"gui_mp_noexamu");
334 cursorRemap.push_back(
"gui_mp_noexamd");
335 cursorRemap.push_back(
"gui_mp_transu");
336 cursorRemap.push_back(
"gui_mp_transd");
337 cursorRemap.push_back(
"gui_mp_dooru");
338 cursorRemap.push_back(
"gui_mp_doord");
339 cursorRemap.push_back(
"gui_mp_useu");
340 cursorRemap.push_back(
"gui_mp_used");
341 cursorRemap.push_back(
"gui_mp_useup");
342 cursorRemap.push_back(
"gui_mp_usedp");
343 cursorRemap.push_back(
"gui_mp_magicu");
344 cursorRemap.push_back(
"gui_mp_magicd");
345 cursorRemap.push_back(
"gui_mp_nomagicu");
346 cursorRemap.push_back(
"gui_mp_nomagicd");
347 cursorRemap.push_back(
"gui_mp_dismineu");
348 cursorRemap.push_back(
"gui_mp_dismined");
349 cursorRemap.push_back(
"gui_mp_dismineup");
350 cursorRemap.push_back(
"gui_mp_disminedp");
351 cursorRemap.push_back(
"gui_mp_recmineu");
352 cursorRemap.push_back(
"gui_mp_recmined");
353 cursorRemap.push_back(
"gui_mp_recmineup");
354 cursorRemap.push_back(
"gui_mp_recminedp");
355 cursorRemap.push_back(
"gui_mp_locku");
356 cursorRemap.push_back(
"gui_mp_lockd");
357 cursorRemap.push_back(
"gui_mp_doorup");
358 cursorRemap.push_back(
"gui_mp_doordp");
359 cursorRemap.push_back(
"gui_mp_selectu");
360 cursorRemap.push_back(
"gui_mp_selectd");
361 cursorRemap.push_back(
"gui_mp_createu");
362 cursorRemap.push_back(
"gui_mp_created");
363 cursorRemap.push_back(
"gui_mp_nocreatu");
364 cursorRemap.push_back(
"gui_mp_nocreatd");
365 cursorRemap.push_back(
"gui_mp_killu");
366 cursorRemap.push_back(
"gui_mp_killd");
367 cursorRemap.push_back(
"gui_mp_nokillu");
368 cursorRemap.push_back(
"gui_mp_nokilld");
369 cursorRemap.push_back(
"gui_mp_healu");
370 cursorRemap.push_back(
"gui_mp_heald");
371 cursorRemap.push_back(
"gui_mp_nohealu");
372 cursorRemap.push_back(
"gui_mp_noheald");
373 cursorRemap.push_back(
"gui_mp_arrun00");
374 cursorRemap.push_back(
"gui_mp_arrun01");
375 cursorRemap.push_back(
"gui_mp_arrun02");
376 cursorRemap.push_back(
"gui_mp_arrun03");
377 cursorRemap.push_back(
"gui_mp_arrun04");
378 cursorRemap.push_back(
"gui_mp_arrun05");
379 cursorRemap.push_back(
"gui_mp_arrun06");
380 cursorRemap.push_back(
"gui_mp_arrun07");
381 cursorRemap.push_back(
"gui_mp_arrun08");
382 cursorRemap.push_back(
"gui_mp_arrun09");
383 cursorRemap.push_back(
"gui_mp_arrun10");
384 cursorRemap.push_back(
"gui_mp_arrun11");
385 cursorRemap.push_back(
"gui_mp_arrun12");
386 cursorRemap.push_back(
"gui_mp_arrun13");
387 cursorRemap.push_back(
"gui_mp_arrun14");
388 cursorRemap.push_back(
"gui_mp_arrun15");
389 cursorRemap.push_back(
"gui_mp_arwalk00");
390 cursorRemap.push_back(
"gui_mp_arwalk01");
391 cursorRemap.push_back(
"gui_mp_arwalk02");
392 cursorRemap.push_back(
"gui_mp_arwalk03");
393 cursorRemap.push_back(
"gui_mp_arwalk04");
394 cursorRemap.push_back(
"gui_mp_arwalk05");
395 cursorRemap.push_back(
"gui_mp_arwalk06");
396 cursorRemap.push_back(
"gui_mp_arwalk07");
397 cursorRemap.push_back(
"gui_mp_arwalk08");
398 cursorRemap.push_back(
"gui_mp_arwalk09");
399 cursorRemap.push_back(
"gui_mp_arwalk10");
400 cursorRemap.push_back(
"gui_mp_arwalk11");
401 cursorRemap.push_back(
"gui_mp_arwalk12");
402 cursorRemap.push_back(
"gui_mp_arwalk13");
403 cursorRemap.push_back(
"gui_mp_arwalk14");
404 cursorRemap.push_back(
"gui_mp_arwalk15");
405 cursorRemap.push_back(
"gui_mp_pickupu");
406 cursorRemap.push_back(
"gui_mp_pickupd");
408 ResMan.setCursorRemap(cursorRemap);
415 CursorMan.add(
"gui_mp_defaultd" ,
"default" ,
"down");
416 CursorMan.add(
"gui_mp_defaultu" ,
"default" ,
"up" );
418 CursorMan.add(
"gui_mp_bashd" ,
"bash" ,
"down");
419 CursorMan.add(
"gui_mp_bashu" ,
"bash" ,
"up" );
420 CursorMan.add(
"gui_mp_bashdp" ,
"bash+" ,
"down");
421 CursorMan.add(
"gui_mp_bashup" ,
"bash+" ,
"up" );
422 CursorMan.add(
"gui_mp_dismined" ,
"dismine" ,
"down");
423 CursorMan.add(
"gui_mp_dismineu" ,
"dismine" ,
"up" );
424 CursorMan.add(
"gui_mp_disminedp",
"dismine+" ,
"down");
425 CursorMan.add(
"gui_mp_dismineup",
"dismine+" ,
"up" );
426 CursorMan.add(
"gui_mp_doord" ,
"door" ,
"down");
427 CursorMan.add(
"gui_mp_dooru" ,
"door" ,
"up" );
428 CursorMan.add(
"gui_mp_doordp" ,
"door+" ,
"down");
429 CursorMan.add(
"gui_mp_doorup" ,
"door+" ,
"up" );
430 CursorMan.add(
"gui_mp_invalidd" ,
"invalid" ,
"down");
431 CursorMan.add(
"gui_mp_invalidu" ,
"invalid" ,
"up" );
432 CursorMan.add(
"gui_mp_killd" ,
"kill" ,
"down");
433 CursorMan.add(
"gui_mp_killu" ,
"kill" ,
"up" );
434 CursorMan.add(
"gui_mp_recmined" ,
"recmine" ,
"down");
435 CursorMan.add(
"gui_mp_recmineu" ,
"recmine" ,
"up" );
436 CursorMan.add(
"gui_mp_recminedp",
"recmine+" ,
"down");
437 CursorMan.add(
"gui_mp_recmineup",
"recmine+" ,
"up" );
438 CursorMan.add(
"gui_mp_selectd" ,
"select" ,
"down");
439 CursorMan.add(
"gui_mp_selectu" ,
"select" ,
"up" );
440 CursorMan.add(
"gui_mp_talkd" ,
"talk" ,
"down");
441 CursorMan.add(
"gui_mp_talku" ,
"talk" ,
"up" );
442 CursorMan.add(
"gui_mp_used" ,
"use" ,
"down");
443 CursorMan.add(
"gui_mp_useu" ,
"use" ,
"up" );
444 CursorMan.add(
"gui_mp_usedp" ,
"use+" ,
"down");
445 CursorMan.add(
"gui_mp_useup" ,
"use+" ,
"up" );
#define ResMan
Shortcut for accessing the sound manager.
Aurora::Platform _platform
void playVideo(const Common::UString &video)
Play this video resource.
Game & getGame()
Return the context running the actual game.
Generic Aurora engines resource utility functions.
#define TalkMan
Shortcut for accessing the talk manager.
A class holding an UTF-8 string.
Temporary game settings/properties.
Common::ScopedPtr< Game > _game
The global config manager.
Common::ScopedPtr< Console > _console
bool indexOptionalArchive(const Common::UString &file, uint32 priority, const std::vector< byte > &password, Common::ChangeID *changeID)
bool evaluateLanguage(bool find, Aurora::Language &language) const
#define ARRAYSIZE(x)
Macro which determines the number of entries in a fixed size array.
bool indexOptionalDirectory(const Common::UString &dir, const char *glob, int depth, uint32 priority, Common::ChangeID *changeID)
Add a directory to the resource manager, if it exists.
bool changeLanguage()
Change the game's current language.
Android mobile phones and tablets.
UString findFirst(const UString &str, bool caseInsensitive) const
Find the first file ending with the given string.
void indexMandatoryArchive(const Common::UString &file, uint32 priority, const std::vector< byte > &password, Common::ChangeID *changeID)
Aurora::Language _language
Star Wars: Knights of the Old Republic (debug) console.
#define ConfigMan
Shortcut for accessing the config manager.
Common::ScopedPtr< Version > _version
bool getLanguage(Aurora::Language &language) const
Return the game's current language.
Windows codepage 950 (Traditional Chinese, similar to Big5).
The context handling the gameplay in Star Wars: Knights of the Old Republic.
Utility templates and functions.
Engine class handling Star Wars: Knights of the Old Republic.
Star Wars: Knights of the Old Republic model loader.
void unregisterModelLoader()
The global events manager.
Types and functions related to language.
Star Wars: Knights of the Old Republic installation version detection.
bool empty() const
Is the string empty?
Handling BioWare's TLK talk tables.
void warning(const char *s,...)
#define CursorMan
Shortcut for accessing the cursor manager.
bool detectLanguages(Aurora::GameID game, const Common::UString &target, Aurora::Platform platform, std::vector< Aurora::Language > &languages) const
Detect which languages this game instance supports.
#define EventMan
Shortcut for accessing the events manager.
bool hasYavin4Module() const
void initResources(LoadProgress &progress)
The Aurora cursor manager.
Displaying the progress in loading a game.
Textured font, used by NWN and KotOR/KotOR2.
void indexMandatoryDirectory(const Common::UString &dir, const char *glob, int depth, uint32 priority, Common::ChangeID *changeID)
Add a directory to the resource manager, erroring out if it does not exist.
void registerModelLoader(ModelLoader *loader)
Application or game defaults.
#define LangMan
Shortcut for accessing the language manager.
Windows codepage 932 (Japanese, extended Shift-JIS).
The global talk manager for Aurora strings.
void step(const Common::UString &description)
Take a step in advancing the progress.
void status(const char *s,...)
void checkConfigInt(const Common::UString &key, int min, int max)
Make sure that an int config value is in the right range.
Windows codepage 1250 (Eastern European, Latin alphabet).
bool addDirectory(const UString &directory, int recurseDepth=0)
Add a directory to the list.
Generic Aurora engines utility functions.
Windows codepage 1252 (Western European, Latin alphabet).
Windows codepage 949 (Korean, similar to EUC-KR).
uint32 getLanguageID() const
Return the language ID (ungendered) of the talk table.
Windows codepage 936 (Simplified Chinese, extended GB2312 with GBK codepoints).
iOS, Apple mobile phones and tablets.
#define GfxMan
Shortcut for accessing the graphics manager.
The global resource manager for Aurora resources.
Utility class for manipulating file paths.
#define FontMan
Shortcut for accessing the font manager.
static UString findSubDirectory(const UString &directory, const UString &subDirectory, bool caseInsensitive=false)
Find a directory's subdirectory.
Generic Aurora engines model functions.