Exemple #1
0
void SonicEngine::loadLanguageFiles(LoadProgress &progress, Aurora::Language language) {
	progress.step(Common::UString::format("Indexing language files (%s)",
				LangMan.getLanguageName(language).c_str()));

	loadLanguageFiles(language);
}
Exemple #2
0
void KotOR2Engine::initResources(LoadProgress &progress) {
	// In the Xbox version of KotOR2, TXB textures are actually TPCs
	if (_platform == Aurora::kPlatformXbox)
		ResMan.addTypeAlias(Aurora::kFileTypeTXB, Aurora::kFileTypeTPC);

	progress.step("Setting base directory");

	Common::UString baseDir = _target;
	if      (_platform == Aurora::kPlatformLinux)
		baseDir += "/steamassets";
	else if (_platform == Aurora::kPlatformMacOSX)
		baseDir += "/GameData";

	ResMan.registerDataBase(baseDir);

	progress.step("Adding extra archive directories");
	const Common::UString dataDir = (_platform == Aurora::kPlatformXbox) ? "dataxbox" : "data";
	const Common::UString rimsDir = (_platform == Aurora::kPlatformXbox) ? "rimsxbox" : "rims";

	indexMandatoryDirectory( dataDir , 0, 0, 2);
	indexMandatoryDirectory("lips"   , 0, 0, 3);
	indexMandatoryDirectory("modules", 0, 0, 4);

	indexOptionalDirectory(rimsDir, 0, 0, 5);

	if (_platform != Aurora::kPlatformXbox)
		indexMandatoryDirectory("texturepacks", 0, 0, 6);

	if (_platform == Aurora::kPlatformXbox)
		indexMandatoryDirectory("supermodels" , 0, 0, 7);

	progress.step("Loading main KEY");
	indexMandatoryArchive("chitin.key", 10);

	progress.step("Loading high-res texture packs");
	if (_platform != Aurora::kPlatformXbox)
		indexMandatoryArchive("swpc_tex_gui.erf", 50);

	progress.step("Indexing extra sound resources");
	indexMandatoryDirectory("streamsounds", 0, -1, 100);
	progress.step("Indexing extra voice resources");
	indexMandatoryDirectory("streamvoice" , 0, -1, 101);
	progress.step("Indexing extra music resources");
	indexMandatoryDirectory("streammusic" , 0, -1, 102);
	progress.step("Indexing extra movie resources");
	indexMandatoryDirectory("movies"      , 0, -1, 103);

	progress.step("Indexing platform-specific resources");
	if (_platform == Aurora::kPlatformWindows) {
		initCursorsRemap();
		indexMandatoryArchive("swkotor2.exe", 104);
	} else if (_platform == Aurora::kPlatformLinux) {
		indexMandatoryDirectory("../resources/cursors/", 0, 0, 104);
	} else if (_platform == Aurora::kPlatformMacOSX) {
		indexMandatoryDirectory("../Resources/Cursors/", 0, 0, 104);
	}

	// Texture packs at 400, in module.cpp

	progress.step("Indexing override files");
	indexOptionalDirectory("override", 0, 0, 500);

	if (EventMan.quitRequested())
		return;

	progress.step("Loading main talk table");
	TalkMan.addTable("dialog", "dialogf", false, 0);

	progress.step("Registering file formats");
	registerModelLoader(new KotOR2ModelLoader);
	FontMan.setFormat(Graphics::Aurora::kFontFormatTexture);
}
Exemple #3
0
void JadeEngine::initResources(LoadProgress &progress) {
	// Some new file types with the same function as old ones re-use the type ID
	ResMan.addTypeAlias(Aurora::kFileTypeBTC, Aurora::kFileTypeCRE);
	ResMan.addTypeAlias(Aurora::kFileTypeBTP, Aurora::kFileTypePLA);
	ResMan.addTypeAlias(Aurora::kFileTypeBTT, Aurora::kFileTypeTRG);

	progress.step("Setting base directory");
	ResMan.registerDataBase(_target);

	progress.step("Adding extra archive directories");
	indexMandatoryDirectory("data", 0, -1, 2);

	progress.step("Loading main KEY");
	indexMandatoryArchive("chitin.key", 10);

	progress.step("Loading global auxiliary resources");
	indexMandatoryArchive("loadscreens.mod"   , 50);
	indexMandatoryArchive("players.mod"       , 51);
	indexMandatoryArchive("global-a.rim"      , 52);
	indexMandatoryArchive("ingamemenu-a.rim"  , 53);
	indexMandatoryArchive("globalunload-a.rim", 54);
	indexMandatoryArchive("minigame-a.rim"    , 55);
	indexMandatoryArchive("miniglobal-a.rim"  , 56);
	indexMandatoryArchive("mmenu-a.rim"       , 57);

	progress.step("Indexing extra font resources");
	indexMandatoryDirectory("fonts"   , 0, -1, 100);
	progress.step("Indexing extra sound resources");
	indexMandatoryDirectory("sound"   , 0, -1, 101);
	progress.step("Indexing extra movie resources");
	indexMandatoryDirectory("movies"  , 0, -1, 102);
	progress.step("Indexing extra shader resources");
	indexMandatoryDirectory("shaderpc", 0, -1, 103);

	progress.step("Indexing override files");
	indexOptionalDirectory("override", 0, 0, 150);

	if (EventMan.quitRequested())
		return;

	progress.step("Loading main talk table");
	TalkMan.addTable("dialog", "dialogf", false, 0);

	progress.step("Registering file formats");
	registerModelLoader(new JadeModelLoader);
	FontMan.setFormat(Graphics::Aurora::kFontFormatABC);
	FontMan.addAlias("sava"   , "asian");
	FontMan.addAlias("cerigo" , "asian");
	FontMan.addAlias("fnt_gui", "asian");
}
Exemple #4
0
void DragonAge2Engine::initResources(LoadProgress &progress) {
	ResMan.setRIMsAreERFs(true);
	ResMan.setHashAlgo(Common::kHashFNV64);

	progress.step("Setting base directory");
	ResMan.registerDataBase(_target);

	progress.step("Adding extra archive directories");
	indexMandatoryDirectory("packages/core/data"     , 0,  0, 2);
	indexMandatoryDirectory("packages/core/textures/", 0, -1, 3);

	progress.step("Loading core resource files");
	indexMandatoryArchive("packages/core/data/2da.rim"                      , 10);
	indexMandatoryArchive("packages/core/data/al_char_stage.rim"            , 11);
	indexMandatoryArchive("packages/core/data/artfp.erf"                    , 12);
	indexMandatoryArchive("packages/core/data/artfpwin32.erf"               , 13);
	indexMandatoryArchive("packages/core/data/chargen.gpu.rim"              , 14);
	indexMandatoryArchive("packages/core/data/chargen.rim"                  , 15);
	indexMandatoryArchive("packages/core/data/designerresources.rim"        , 16);
	indexMandatoryArchive("packages/core/data/designerscripts.rim"          , 17);
	indexMandatoryArchive("packages/core/data/face.erf"                     , 18);
	indexMandatoryArchive("packages/core/data/fonts.erf"                    , 19);
	indexMandatoryArchive("packages/core/data/global-uncompressed.rim"      , 20);
	indexMandatoryArchive("packages/core/data/global.rim"                   , 21);
	indexMandatoryArchive("packages/core/data/globalani-core.rim"           , 22);
	indexMandatoryArchive("packages/core/data/globalchargen-core.rim"       , 23);
	indexMandatoryArchive("packages/core/data/globalchargendds-core.gpu.rim", 24);
	indexMandatoryArchive("packages/core/data/globaldds-core.gpu.rim"       , 25);
	indexMandatoryArchive("packages/core/data/globalmao-core.rim"           , 26);
	indexMandatoryArchive("packages/core/data/globalvfx-core.rim"           , 27);
	indexMandatoryArchive("packages/core/data/gui.erf"                      , 28);
	indexMandatoryArchive("packages/core/data/guiexport.erf"                , 29);
	indexMandatoryArchive("packages/core/data/layouts.erf"                  , 30);
	indexMandatoryArchive("packages/core/data/lightprobedata.erf"           , 31);
	indexMandatoryArchive("packages/core/data/maoinit.erf"                  , 32);
	indexMandatoryArchive("packages/core/data/materialdefinitions.erf"      , 33);
	indexMandatoryArchive("packages/core/data/materialobjects.rim"          , 34);
	indexMandatoryArchive("packages/core/data/misc.erf"                     , 35);
	indexMandatoryArchive("packages/core/data/models.erf"                   , 36);
	indexMandatoryArchive("packages/core/data/pathfindingpatches.rim"       , 37);
	indexMandatoryArchive("packages/core/data/resmetrics.erf"               , 38);
	indexMandatoryArchive("packages/core/data/scripts.erf"                  , 39);
	indexMandatoryArchive("packages/core/data/shaders.erf"                  , 40);
	indexMandatoryArchive("packages/core/data/subqueuefiles.erf"            , 41);
	indexMandatoryArchive("packages/core/data/summonwardog.gpu.rim"         , 42);
	indexMandatoryArchive("packages/core/data/summonwardog.rim"             , 43);
	indexMandatoryArchive("packages/core/data/tints.rim"                    , 44);

	progress.step("Loading core sound resource files");
	indexMandatoryDirectory("packages/core/audio/sound/"                     , 0, 0, 100);
	indexMandatoryArchive  ("packages/core/audio/sound/wwisebanks_core.erf"        , 101);
	indexMandatoryArchive  ("packages/core/audio/sound/wwisestreams_core.erf"      , 102);

	progress.step("Indexing extra core movie resources");
	indexMandatoryDirectory("packages/core/data/movies"    , 0,  0, 151);
	progress.step("Indexing extra core talktables");
	indexMandatoryDirectory("packages/core/data/talktables", 0,  0, 152);
	progress.step("Indexing extra core cursors");
	indexMandatoryDirectory("packages/core/data/cursors"   , 0,  0, 153);

	progress.step("Loading core patches");
	indexMandatoryDirectory("packages/core/patch",           0, 0, 200);
	indexOptionalArchive   ("packages/core/patch/patch.erf"      , 201);
	indexOptionalArchive   ("packages/core/patch/patch.rimp"     , 202);

	progress.step("Indexing extra single-player campaign resources");
	indexMandatoryDirectory("modules/campaign_base/data"           , 0,  0, 250);
	progress.step("Indexing extra single-player campaign movie resources");
	indexMandatoryDirectory("modules/campaign_base/data/movies"    , 0,  0, 251);
	progress.step("Indexing extra single-player campaign sound resources");
	indexMandatoryDirectory("modules/campaign_base/audio/sound"    , 0,  0, 252);
	progress.step("Indexing extra single-player campaign talktables");
	indexMandatoryDirectory("modules/campaign_base/data/talktables", 0,  0, 253);

	progress.step("Loading single-player campaign global resource files");
	indexMandatoryArchive("modules/campaign_base/data/global-campaign_base.rim", 300);

	progress.step("Loading single-player campaign patches");
	indexMandatoryDirectory("modules/campaign_base/patch"           , 0, 0, 400);
	indexOptionalArchive   ("modules/campaign_base/patch/patch.erf"       , 401);
	indexOptionalArchive   ("modules/campaign_base/patch/patch.rimp"      , 402);

	// TODO: DLC

	loadLanguageFiles(progress, _language);

	progress.step("Registering file formats");
	registerModelLoader(new DragonAge2ModelLoader);
}