Example #1
0
void DragonAge2Engine::init() {
	ResMan.setRIMsAreERFs(true);

	status("Setting base directory");
	ResMan.registerDataBaseDir(_baseDirectory);

	status("Adding extra archive directories");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "packages/core/data");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "packages/core/textures/medium");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "packages/core/textures/high");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "packages/core/audio/sound/");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "packages/core/patch");

	status("Loading core resource files");
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/2da.rim"                      ,  1);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/al_char_stage.rim"            ,  2);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/artfp.erf"                    ,  3);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/artfpwin32.erf"               ,  4);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/chargen.gpu.rim"              ,  5);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/chargen.rim"                  ,  6);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/designerresources.rim"        ,  7);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/designerscripts.rim"          ,  8);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/face.erf"                     ,  9);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/fonts.erf"                    , 10);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/global-uncompressed.rim"      , 11);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/global.rim"                   , 12);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/globalani-core.rim"           , 13);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/globalchargen-core.rim"       , 14);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/globalchargendds-core.gpu.rim", 15);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/globaldds-core.gpu.rim"       , 16);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/globalmao-core.rim"           , 17);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/globalvfx-core.rim"           , 18);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/gui.erf"                      , 19);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/guiexport.erf"                , 20);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/layouts.erf"                  , 21);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/lightprobedata.erf"           , 22);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/maoinit.erf"                  , 23);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/materialdefinitions.erf"      , 24);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/materialobjects.rim"          , 25);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/misc.erf"                     , 26);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/models.erf"                   , 27);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/pathfindingpatches.rim"       , 28);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/resmetrics.erf"               , 29);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/scripts.erf"                  , 30);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/shaders.erf"                  , 31);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/subqueuefiles.erf"            , 32);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/summonwardog.gpu.rim"         , 33);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/summonwardog.rim"             , 34);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/data/tints.rim"                    , 35);

	status("Loading core sound resource files");
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/audio/sound/wwisebanks_core.erf"  , 40);
	indexMandatoryArchive(Aurora::kArchiveERF, "packages/core/audio/sound/wwisestreams_core.erf", 41);

	status("Indexing extra core movie resources");
	indexMandatoryDirectory("packages/core/data/movies" , 0, 0, 101);
	status("Indexing extra core cursors");
	indexMandatoryDirectory("packages/core/data/cursors", 0, 0, 102);
}
Example #2
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");
}
Example #3
0
void JadeEngine::init() {
	status("Setting base directory");
	ResMan.registerDataBaseDir(_baseDirectory);
	indexMandatoryDirectory("", 0, 0, 1);

	status("Adding extra archive directories");
	ResMan.addArchiveDir(Aurora::kArchiveBIF, "data");
	ResMan.addArchiveDir(Aurora::kArchiveRIM, "data");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "data");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "data/bips");

	ResMan.addArchiveDir(Aurora::kArchiveRIM, "data", true);

	status("Loading main KEY");
	indexMandatoryArchive(Aurora::kArchiveKEY, "chitin.key", 1);

	status("Loading global auxiliary resources");
	indexMandatoryArchive(Aurora::kArchiveERF, "loadscreens.mod"   , 10);
	indexMandatoryArchive(Aurora::kArchiveERF, "players.mod"       , 11);
	indexMandatoryArchive(Aurora::kArchiveRIM, "global-a.rim"      , 12);
	indexMandatoryArchive(Aurora::kArchiveRIM, "ingamemenu-a.rim"  , 13);
	indexMandatoryArchive(Aurora::kArchiveRIM, "globalunload-a.rim", 14);
	indexMandatoryArchive(Aurora::kArchiveRIM, "minigame-a.rim"    , 15);
	indexMandatoryArchive(Aurora::kArchiveRIM, "miniglobal-a.rim"  , 16);
	indexMandatoryArchive(Aurora::kArchiveRIM, "mmenu-a.rim"       , 17);

	status("Indexing extra font resources");
	indexMandatoryDirectory("fonts"   , 0, -1, 20);
	status("Indexing extra sound resources");
	indexMandatoryDirectory("sound"   , 0, -1, 21);
	status("Indexing extra movie resources");
	indexMandatoryDirectory("movies"  , 0, -1, 22);
	status("Indexing extra shader resources");
	indexMandatoryDirectory("shaderpc", 0, -1, 23);

	status("Indexing override files");
	indexOptionalDirectory("override", 0, 0, 30);

	if (EventMan.quitRequested())
		return;

	status("Loading main talk table");
	TalkMan.addMainTable("dialog");

	FontMan.setFormat(Graphics::Aurora::kFontFormatABC);
	FontMan.addAlias("sava"   , "asian");
	FontMan.addAlias("cerigo" , "asian");
	FontMan.addAlias("fnt_gui", "asian");
}
Example #4
0
void WitcherEngine::initResources(LoadProgress &progress) {
	progress.step("Setting base directory");
	ResMan.registerDataBase(_target);

	progress.step("Adding extra archive directories");
	indexMandatoryDirectory("system"        , 0,  0, 2);
	indexMandatoryDirectory("system/scripts", 0,  0, 3);
	indexMandatoryDirectory("data"          , 0,  0, 4);
	indexMandatoryDirectory("data/modules"  , 0, -1, 5);

	// Contains BIFs with voices for the two premium modules
	indexOptionalDirectory("data/voices", 0, 0, 6);

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

	progress.step("Loading the localized base KEY");
	indexMandatoryArchive("localized.key", 50);

	// Language files at 100-102

	progress.step("Indexing extra resources");
	indexOptionalDirectory("data/movies"   , 0, -1, 150);
	indexOptionalDirectory("data/music"    , 0, -1, 151);
	indexOptionalDirectory("data/sounds"   , 0, -1, 152);
	indexOptionalDirectory("data/cutscenes", 0, -1, 153);
	indexOptionalDirectory("data/dialogues", 0, -1, 154);
	indexOptionalDirectory("data/fx"       , 0, -1, 155);
	indexOptionalDirectory("data/meshes"   , 0, -1, 156);
	indexOptionalDirectory("data/quests"   , 0, -1, 157);
	indexOptionalDirectory("data/scripts"  , 0, -1, 158);
	indexOptionalDirectory("data/templates", 0, -1, 159);
	indexOptionalDirectory("data/textures" , 0, -1, 160);

	progress.step("Indexing Windows-specific resources");
	indexMandatoryArchive("witcher.exe", 250);

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

	loadLanguageFiles(progress, _languageText, _languageVoice);

	progress.step("Registering file formats");
	registerModelLoader(new WitcherModelLoader);
	FontMan.setFormat(Graphics::Aurora::kFontFormatTTF);
}
Example #5
0
void NWN2Engine::initResources(LoadProgress &progress) {
	// NWN2's new file types overlap with other engines in the 3000s block
	ResMan.addTypeAlias((Aurora::FileType) 3000, Aurora::kFileTypeOSC);
	ResMan.addTypeAlias((Aurora::FileType) 3001, Aurora::kFileTypeUSC);
	ResMan.addTypeAlias((Aurora::FileType) 3002, Aurora::kFileTypeTRN);
	ResMan.addTypeAlias((Aurora::FileType) 3003, Aurora::kFileTypeUTR);
	ResMan.addTypeAlias((Aurora::FileType) 3004, Aurora::kFileTypeUEN);
	ResMan.addTypeAlias((Aurora::FileType) 3005, Aurora::kFileTypeULT);
	ResMan.addTypeAlias((Aurora::FileType) 3006, Aurora::kFileTypeSEF);
	ResMan.addTypeAlias((Aurora::FileType) 3007, Aurora::kFileTypePFX);
	ResMan.addTypeAlias((Aurora::FileType) 3008, Aurora::kFileTypeCAM);
	ResMan.addTypeAlias((Aurora::FileType) 3009, Aurora::kFileTypeLFX);
	ResMan.addTypeAlias((Aurora::FileType) 3010, Aurora::kFileTypeBFX);
	ResMan.addTypeAlias((Aurora::FileType) 3011, Aurora::kFileTypeUPE);
	ResMan.addTypeAlias((Aurora::FileType) 3012, Aurora::kFileTypeROS);
	ResMan.addTypeAlias((Aurora::FileType) 3013, Aurora::kFileTypeRST);
	ResMan.addTypeAlias((Aurora::FileType) 3014, Aurora::kFileTypeIFX);
	ResMan.addTypeAlias((Aurora::FileType) 3015, Aurora::kFileTypePFB);
	ResMan.addTypeAlias((Aurora::FileType) 3016, Aurora::kFileTypeZIP);
	ResMan.addTypeAlias((Aurora::FileType) 3017, Aurora::kFileTypeWMP);
	ResMan.addTypeAlias((Aurora::FileType) 3018, Aurora::kFileTypeBBX);
	ResMan.addTypeAlias((Aurora::FileType) 3019, Aurora::kFileTypeTFX);
	ResMan.addTypeAlias((Aurora::FileType) 3020, Aurora::kFileTypeWLK);
	ResMan.addTypeAlias((Aurora::FileType) 3021, Aurora::kFileTypeXML);
	ResMan.addTypeAlias((Aurora::FileType) 3022, Aurora::kFileTypeSCC);
	ResMan.addTypeAlias((Aurora::FileType) 3033, Aurora::kFileTypePTX);
	ResMan.addTypeAlias((Aurora::FileType) 3034, Aurora::kFileTypeLTX);
	ResMan.addTypeAlias((Aurora::FileType) 3035, Aurora::kFileTypeTRX);

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

	progress.step("Adding extra archive directories");
	indexMandatoryDirectory("data"   , 0, 0, 2);
	indexMandatoryDirectory("modules", 0, 0, 3);
	indexMandatoryDirectory("hak"    , 0, 0, 4);

	progress.step("Loading main resource files");

	indexMandatoryArchive("2da.zip"           , 10);
	indexMandatoryArchive("actors.zip"        , 11);
	indexMandatoryArchive("animtags.zip"      , 12);
	indexMandatoryArchive("convo.zip"         , 13);
	indexMandatoryArchive("ini.zip"           , 14);
	indexMandatoryArchive("lod-merged.zip"    , 15);
	indexMandatoryArchive("music.zip"         , 16);
	indexMandatoryArchive("nwn2_materials.zip", 17);
	indexMandatoryArchive("nwn2_models.zip"   , 18);
	indexMandatoryArchive("nwn2_vfx.zip"      , 19);
	indexMandatoryArchive("prefabs.zip"       , 20);
	indexMandatoryArchive("scripts.zip"       , 21);
	indexMandatoryArchive("sounds.zip"        , 22);
	indexMandatoryArchive("soundsets.zip"     , 23);
	indexMandatoryArchive("speedtree.zip"     , 24);
	indexMandatoryArchive("templates.zip"     , 25);
	indexMandatoryArchive("vo.zip"            , 26);
	indexMandatoryArchive("walkmesh.zip"      , 27);

	progress.step("Loading expansion 1 resource files");

	// Expansion 1: Mask of the Betrayer (MotB)
	_hasXP1 = ResMan.hasArchive("2da_x1.zip");
	indexOptionalArchive("2da_x1.zip"           , 50);
	indexOptionalArchive("actors_x1.zip"        , 51);
	indexOptionalArchive("animtags_x1.zip"      , 52);
	indexOptionalArchive("convo_x1.zip"         , 53);
	indexOptionalArchive("ini_x1.zip"           , 54);
	indexOptionalArchive("lod-merged_x1.zip"    , 55);
	indexOptionalArchive("music_x1.zip"         , 56);
	indexOptionalArchive("nwn2_materials_x1.zip", 57);
	indexOptionalArchive("nwn2_models_x1.zip"   , 58);
	indexOptionalArchive("nwn2_vfx_x1.zip"      , 59);
	indexOptionalArchive("prefabs_x1.zip"       , 60);
	indexOptionalArchive("scripts_x1.zip"       , 61);
	indexOptionalArchive("soundsets_x1.zip"     , 62);
	indexOptionalArchive("sounds_x1.zip"        , 63);
	indexOptionalArchive("speedtree_x1.zip"     , 64);
	indexOptionalArchive("templates_x1.zip"     , 65);
	indexOptionalArchive("vo_x1.zip"            , 66);
	indexOptionalArchive("walkmesh_x1.zip"      , 67);

	progress.step("Loading expansion 2 resource files");

	// Expansion 2: Storm of Zehir (SoZ)
	_hasXP2 = ResMan.hasArchive("2da_x2.zip");
	indexOptionalArchive("2da_x2.zip"           , 100);
	indexOptionalArchive("actors_x2.zip"        , 101);
	indexOptionalArchive("animtags_x2.zip"      , 102);
	indexOptionalArchive("lod-merged_x2.zip"    , 103);
	indexOptionalArchive("music_x2.zip"         , 104);
	indexOptionalArchive("nwn2_materials_x2.zip", 105);
	indexOptionalArchive("nwn2_models_x2.zip"   , 106);
	indexOptionalArchive("nwn2_vfx_x2.zip"      , 107);
	indexOptionalArchive("prefabs_x2.zip"       , 108);
	indexOptionalArchive("scripts_x2.zip"       , 109);
	indexOptionalArchive("soundsets_x2.zip"     , 110);
	indexOptionalArchive("sounds_x2.zip"        , 111);
	indexOptionalArchive("speedtree_x2.zip"     , 112);
	indexOptionalArchive("templates_x2.zip"     , 113);
	indexOptionalArchive("vo_x2.zip"            , 114);

	// Expansion 3: Mysteries of Westgate
	_hasXP3 = ResMan.hasArchive("westgate.hak");

	progress.step("Loading patch resource files");

	indexOptionalArchive("actors_v103x1.zip"         , 150);
	indexOptionalArchive("actors_v106.zip"           , 151);
	indexOptionalArchive("lod-merged_v101.zip"       , 152);
	indexOptionalArchive("lod-merged_v107.zip"       , 153);
	indexOptionalArchive("lod-merged_v121.zip"       , 154);
	indexOptionalArchive("lod-merged_x1_v121.zip"    , 155);
	indexOptionalArchive("lod-merged_x2_v121.zip"    , 156);
	indexOptionalArchive("nwn2_materials_v103x1.zip" , 157);
	indexOptionalArchive("nwn2_materials_v104.zip"   , 158);
	indexOptionalArchive("nwn2_materials_v106.zip"   , 159);
	indexOptionalArchive("nwn2_materials_v107.zip"   , 160);
	indexOptionalArchive("nwn2_materials_v110.zip"   , 161);
	indexOptionalArchive("nwn2_materials_v112.zip"   , 162);
	indexOptionalArchive("nwn2_materials_v121.zip"   , 163);
	indexOptionalArchive("nwn2_materials_x1_v113.zip", 164);
	indexOptionalArchive("nwn2_materials_x1_v121.zip", 165);
	indexOptionalArchive("nwn2_models_v103x1.zip"    , 166);
	indexOptionalArchive("nwn2_models_v104.zip"      , 167);
	indexOptionalArchive("nwn2_models_v105.zip"      , 168);
	indexOptionalArchive("nwn2_models_v106.zip"      , 169);
	indexOptionalArchive("nwn2_models_v107.zip"      , 160);
	indexOptionalArchive("nwn2_models_v112.zip"      , 171);
	indexOptionalArchive("nwn2_models_v121.zip"      , 172);
	indexOptionalArchive("nwn2_models_x1_v121.zip"   , 173);
	indexOptionalArchive("nwn2_models_x2_v121.zip"   , 174);
	indexOptionalArchive("templates_v112.zip"        , 175);
	indexOptionalArchive("templates_v122.zip"        , 176);
	indexOptionalArchive("templates_x1_v122.zip"     , 177);
	indexOptionalArchive("vo_103x1.zip"              , 178);
	indexOptionalArchive("vo_106.zip"                , 179);

	progress.step("Indexing extra sound resources");
	indexMandatoryDirectory("ambient"   , 0,  0, 200);
	indexOptionalDirectory ("ambient_x1", 0,  0, 201);
	indexOptionalDirectory ("ambient_x2", 0,  0, 202);
	progress.step("Indexing extra music resources");
	indexMandatoryDirectory("music"     , 0,  0, 203);
	indexOptionalDirectory ("music_x1"  , 0,  0, 204);
	indexOptionalDirectory ("music_x2"  , 0,  0, 205);
	progress.step("Indexing extra movie resources");
	indexMandatoryDirectory("movies"    , 0,  0, 206);
	progress.step("Indexing extra effects resources");
	indexMandatoryDirectory("effects"   , 0,  0, 207);
	progress.step("Indexing extra character resources");
	indexMandatoryDirectory("localvault", 0,  0, 208);
	progress.step("Indexing extra UI resources");
	indexMandatoryDirectory("ui"        , 0, -1, 209);

	progress.step("Indexing Windows-specific resources");
	indexMandatoryArchive("nwn2main.exe", 250);

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

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

	progress.step("Registering file formats");
	registerModelLoader(new NWN2ModelLoader);
	FontMan.setFormat(Graphics::Aurora::kFontFormatTTF);
}
Example #6
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(_platform == Aurora::kPlatformXbox));
	FontMan.setFormat(Graphics::Aurora::kFontFormatTexture);
}
Example #7
0
void NWNEngine::initResources(LoadProgress &progress) {
	progress.step("Setting base directory");
	ResMan.registerDataBaseDir(_target);
	indexMandatoryDirectory("", 0, 0, 1);

	progress.step("Adding extra archive directories");
	ResMan.addArchiveDir(Aurora::kArchiveBIF, "data");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "nwm");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "modules");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "hak");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "texturepacks");

	progress.step("Loading main KEY");
	indexMandatoryArchive(Aurora::kArchiveKEY, "chitin.key", 1);

	progress.step("Loading expansions and patch KEYs");

	// Base game patch
	indexOptionalArchive(Aurora::kArchiveKEY, "patch.key", 2);

	// Expansion 1: Shadows of Undrentide (SoU)
	_hasXP1 = indexOptionalArchive(Aurora::kArchiveKEY, "xp1.key", 3);
	indexOptionalArchive(Aurora::kArchiveKEY, "xp1patch.key", 4);

	// Expansion 2: Hordes of the Underdark (HotU)
	_hasXP2 = indexOptionalArchive(Aurora::kArchiveKEY, "xp2.key", 5);
	indexOptionalArchive(Aurora::kArchiveKEY, "xp2patch.key", 6);

	// Expansion 3: Kingmaker (resources also included in the final 1.69 patch)
	_hasXP3 = indexOptionalArchive(Aurora::kArchiveKEY, "xp3.key", 7);
	indexOptionalArchive(Aurora::kArchiveKEY, "xp3patch.key", 8);

	progress.step("Loading GUI textures");
	indexMandatoryArchive(Aurora::kArchiveERF, "gui_32bit.erf"   , 10);
	indexOptionalArchive (Aurora::kArchiveERF, "xp1_gui.erf"     , 11);
	indexOptionalArchive (Aurora::kArchiveERF, "xp2_gui.erf"     , 12);

	progress.step("Indexing extra sound resources");
	indexMandatoryDirectory("ambient"   , 0, 0, 20);
	progress.step("Indexing extra music resources");
	indexMandatoryDirectory("music"     , 0, 0, 21);
	progress.step("Indexing extra movie resources");
	indexMandatoryDirectory("movies"    , 0, 0, 22);
	progress.step("Indexing extra image resources");
	indexOptionalDirectory ("portraits" , 0, 0, 23);
	progress.step("Indexing extra talktables");
	indexOptionalDirectory ("tlk"       , 0, 0, 25);
	progress.step("Indexing databases");
	indexOptionalDirectory ("database"  , 0, 0, 26);

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

	if (EventMan.quitRequested())
		return;

	progress.step("Loading main talk table");
	TalkMan.addMainTable("dialog");

	progress.step("Registering file formats");
	registerModelLoader(new NWNModelLoader);
	FontMan.setFormat(Graphics::Aurora::kFontFormatTexture);

	// Blacklist the DDS version of the galahad14 font, because in versions of NWN coming
	// with a Cyrillic one, the DDS file is still Latin.
	ResMan.blacklist("fnt_galahad14", Aurora::kFileTypeDDS);
}
Example #8
0
void KotOREngine::initResources() {
	status("Setting base directory");
	ResMan.registerDataBaseDir(_baseDirectory);

	// In the Xbox version of KotOR, TXB textures are actually TPCs
	if (_platform == Aurora::kPlatformXbox)
		ResMan.addTypeAlias(Aurora::kFileTypeTXB, Aurora::kFileTypeTPC);

	indexMandatoryDirectory("", 0, 0, 0);

	status("Adding extra archive directories");
	ResMan.addArchiveDir(Aurora::kArchiveBIF, (_platform == Aurora::kPlatformXbox) ? "dataxbox" : "data");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "lips");

	if (_platform != Aurora::kPlatformXbox)
		ResMan.addArchiveDir(Aurora::kArchiveERF, "texturepacks");

	ResMan.addArchiveDir(Aurora::kArchiveERF, "modules");
	ResMan.addArchiveDir(Aurora::kArchiveRIM, (_platform == Aurora::kPlatformXbox) ? "rimsxbox" : "rims");
	ResMan.addArchiveDir(Aurora::kArchiveRIM, "modules");

	status("Loading main KEY");
	indexMandatoryArchive(Aurora::kArchiveKEY, "chitin.key", 0);

	if (indexOptionalArchive(Aurora::kArchiveKEY, "live1.key", 1)) {
		status("Loading Xbox DLC KEY");
		_hasLiveKey = true;
	}

	status("Loading global auxiliary resources");
	indexMandatoryArchive(Aurora::kArchiveRIM, "mainmenu.rim"    , 10);
	indexMandatoryArchive(Aurora::kArchiveRIM, "mainmenudx.rim"  , 11);
	indexMandatoryArchive(Aurora::kArchiveRIM, "legal.rim"       , 12);
	indexMandatoryArchive(Aurora::kArchiveRIM, "legaldx.rim"     , 13);
	indexMandatoryArchive(Aurora::kArchiveRIM, "global.rim"      , 14);
	indexMandatoryArchive(Aurora::kArchiveRIM, "subglobaldx.rim" , 15);
	indexMandatoryArchive(Aurora::kArchiveRIM, "miniglobaldx.rim", 16);
	indexMandatoryArchive(Aurora::kArchiveRIM, "globaldx.rim"    , 17);
	indexMandatoryArchive(Aurora::kArchiveRIM, "chargen.rim"     , 18);
	indexMandatoryArchive(Aurora::kArchiveRIM, "chargendx.rim"   , 19);

	if (_platform == Aurora::kPlatformXbox) {
		// The Xbox version has most of its textures in "textures.bif"
		// Some, however, reside in "players.erf"
		status("Loading Xbox textures");
		indexMandatoryArchive(Aurora::kArchiveERF, "players.erf", 20);
	} else {
		// The Windows/Mac versions have the GUI textures here
		status("Loading GUI textures");
		indexMandatoryArchive(Aurora::kArchiveERF, "swpc_tex_gui.erf", 20);
	}

	status("Indexing extra sound resources");
	indexMandatoryDirectory("streamsounds", 0, -1, 30);
	status("Indexing extra voice resources");
	indexMandatoryDirectory("streamwaves" , 0, -1, 31);
	status("Indexing extra music resources");
	indexMandatoryDirectory("streammusic" , 0, -1, 32);
	status("Indexing extra movie resources");
	indexMandatoryDirectory("movies"      , 0, -1, 33);

	if (_platform == Aurora::kPlatformWindows) {
		status("Indexing Windows-specific resources");
		initCursorsRemap();
		indexMandatoryArchive(Aurora::kArchiveEXE, "swkotor.exe", 34);
	} else if (_platform == Aurora::kPlatformMacOSX) {
		status("Indexing Mac-specific resources");
		indexMandatoryDirectory("Knights of the Old Republic.app/Contents/Resources",         0, -1, 34);
		indexMandatoryDirectory("Knights of the Old Republic.app/Contents/Resources/Cursors", 0, -1, 35);
	} else if (_platform == Aurora::kPlatformXbox) {
		status("Indexing Xbox-specific resources");
		indexMandatoryDirectory("errortex"  , 0, -1, 34);
		indexMandatoryDirectory("localvault", 0, -1, 35);
		indexMandatoryDirectory("media"     , 0, -1, 36);

		// For the DLC, we need to index the "sound" directory as well
		if (_hasLiveKey)
			indexMandatoryDirectory("sound", 0, -1, 37);
	}

	status("Indexing override files");
	indexOptionalDirectory("override", 0, 0, 40);

	if (EventMan.quitRequested())
		return;

	status("Loading main talk table");
	TalkMan.addMainTable("dialog");

	if (_hasLiveKey) {
		status("Loading Xbox DLC talk table");
		TalkMan.addAltTable("live1");
	}

	registerModelLoader(new KotORModelLoader);

	FontMan.setFormat(Graphics::Aurora::kFontFormatTexture);
}
Example #9
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);
}
Example #10
0
void DragonAgeEngine::init() {
	ResMan.setRIMsAreERFs(true);

	status("Setting base directory");
	ResMan.registerDataBaseDir(_baseDirectory);

	status("Adding extra archive directories");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "packages/core/data");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "packages/core/data/abilities");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "packages/core/textures");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "packages/core/env");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "modules/single player/data");

	status("Loading core resource files");
	indexMandatoryArchive(Aurora::kArchiveERF, "2da.erf"               ,  1);
	indexMandatoryArchive(Aurora::kArchiveERF, "anims.erf"             ,  2);
	indexMandatoryArchive(Aurora::kArchiveERF, "chargen.gpu.rim"       ,  3);
	indexMandatoryArchive(Aurora::kArchiveERF, "chargen.rim"           ,  4);
	indexMandatoryArchive(Aurora::kArchiveERF, "consolescripts.erf"    ,  5);
	indexMandatoryArchive(Aurora::kArchiveERF, "designerareas.erf"     ,  6);
	indexMandatoryArchive(Aurora::kArchiveERF, "designercreatures.erf" ,  7);
	indexMandatoryArchive(Aurora::kArchiveERF, "designercutscenes.erf" ,  8);
	indexMandatoryArchive(Aurora::kArchiveERF, "designerdialogs.erf"   ,  9);
	indexMandatoryArchive(Aurora::kArchiveERF, "designeritems.erf"     , 10);
	indexMandatoryArchive(Aurora::kArchiveERF, "designerplaceables.erf", 11);
	indexMandatoryArchive(Aurora::kArchiveERF, "designerplots.erf"     , 12);
	indexMandatoryArchive(Aurora::kArchiveERF, "designerscripts.rim"   , 13);
	indexMandatoryArchive(Aurora::kArchiveERF, "designertriggers.erf"  , 14);
	indexMandatoryArchive(Aurora::kArchiveERF, "face.erf"              , 15);
	indexMandatoryArchive(Aurora::kArchiveERF, "global.rim"            , 16);
	indexMandatoryArchive(Aurora::kArchiveERF, "globalvfx.rim"         , 17);
	indexMandatoryArchive(Aurora::kArchiveERF, "gui.erf"               , 18);
	indexMandatoryArchive(Aurora::kArchiveERF, "guiexport.erf"         , 19);
	indexMandatoryArchive(Aurora::kArchiveERF, "iterationtests.erf"    , 20);
	indexMandatoryArchive(Aurora::kArchiveERF, "lightprobedata.erf"    , 21);
	indexMandatoryArchive(Aurora::kArchiveERF, "materialobjects.erf"   , 22);
	indexMandatoryArchive(Aurora::kArchiveERF, "materials.erf"         , 23);
	indexMandatoryArchive(Aurora::kArchiveERF, "misc.erf"              , 24);
	indexMandatoryArchive(Aurora::kArchiveERF, "modelhierarchies.erf"  , 25);
	indexMandatoryArchive(Aurora::kArchiveERF, "modelmeshdata.erf"     , 26);
	indexMandatoryArchive(Aurora::kArchiveERF, "pathfindingpatches.erf", 27);
	indexMandatoryArchive(Aurora::kArchiveERF, "postprocesseffects.erf", 28);
	indexMandatoryArchive(Aurora::kArchiveERF, "resmetrics.erf"        , 29);
	indexMandatoryArchive(Aurora::kArchiveERF, "scripts.erf"           , 30);
	indexMandatoryArchive(Aurora::kArchiveERF, "shaders.erf"           , 31);
	indexMandatoryArchive(Aurora::kArchiveERF, "states.erf"            , 32);
	indexMandatoryArchive(Aurora::kArchiveERF, "subqueuefiles.erf"     , 33);
	indexMandatoryArchive(Aurora::kArchiveERF, "textures.erf"          , 34);
	indexMandatoryArchive(Aurora::kArchiveERF, "tints.erf"             , 35);

	status("Loading core ability resource files");
	indexMandatoryArchive(Aurora::kArchiveERF, "bearform.rim"    , 40);
	indexMandatoryArchive(Aurora::kArchiveERF, "burningform.rim" , 41);
	indexMandatoryArchive(Aurora::kArchiveERF, "golemform.rim"   , 42);
	indexMandatoryArchive(Aurora::kArchiveERF, "mouseform.rim"   , 43);
	indexMandatoryArchive(Aurora::kArchiveERF, "spiderform.rim"  , 44);
	indexMandatoryArchive(Aurora::kArchiveERF, "spiritform.rim"  , 45);
	indexMandatoryArchive(Aurora::kArchiveERF, "summonbear.rim"  , 46);
	indexMandatoryArchive(Aurora::kArchiveERF, "summonspider.rim", 47);
	indexMandatoryArchive(Aurora::kArchiveERF, "summonwolf.rim"  , 48);

	status("Indexing extra core sound resources");
	indexMandatoryDirectory("packages/core/audio"          , 0, -1, 100);
	status("Indexing extra core movie resources");
	indexMandatoryDirectory("packages/core/data/movies"    , 0,  0, 101);
	status("Indexing extra core talktables");
	indexMandatoryDirectory("packages/core/data/talktables", 0,  0, 102);
	status("Indexing extra core cursors");
	indexMandatoryDirectory("packages/core/data/cursors"   , 0,  0, 103);

	status("Indexing extra environments");
	indexMandatoryDirectory("packages/core/env", 0, 0, 110);

	status("Loading single-player campaign global resource files");
	indexMandatoryArchive(Aurora::kArchiveERF, "moduleglobal.rim", 50);

	status("Indexing extra single-player campaign movie resources");
	indexMandatoryDirectory("modules/single player/data"           , 0, -1, 120);
	status("Indexing extra single-player campaign sound resources");
	indexMandatoryDirectory("modules/single player/data/movies"    , 0,  0, 121);
	status("Indexing extra single-player campaign talktables");
	indexMandatoryDirectory("modules/single player/data/talktables", 0,  0, 122);
}
Example #11
0
void KotOR2Engine::initResources() {
	status("Setting base directory");
	ResMan.registerDataBaseDir(_baseDirectory);

	// In the Xbox version of KotOR, TXB textures are actually TPCs
	if (_platform == Aurora::kPlatformXbox)
		ResMan.addTypeAlias(Aurora::kFileTypeTXB, Aurora::kFileTypeTPC);

	indexMandatoryDirectory("", 0, 0, 1);

	status("Adding extra archive directories");
	ResMan.addArchiveDir(Aurora::kArchiveBIF, (_platform == Aurora::kPlatformXbox) ? "dataxbox" : "data");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "lips");

	if (_platform != Aurora::kPlatformXbox)
		ResMan.addArchiveDir(Aurora::kArchiveERF, "texturepacks");

	ResMan.addArchiveDir(Aurora::kArchiveERF, "modules");
	ResMan.addArchiveDir(Aurora::kArchiveRIM, (_platform == Aurora::kPlatformXbox) ? "rimsxbox" : "rims");
	ResMan.addArchiveDir(Aurora::kArchiveRIM, "modules");

	if (_platform == Aurora::kPlatformXbox)
		ResMan.addArchiveDir(Aurora::kArchiveERF, "SuperModels");

	status("Loading main KEY");
	indexMandatoryArchive(Aurora::kArchiveKEY, "chitin.key", 1);

	if (_platform != Aurora::kPlatformXbox) {
		status("Loading high-res texture packs");
		indexMandatoryArchive(Aurora::kArchiveERF, "swpc_tex_gui.erf", 10);
		indexMandatoryArchive(Aurora::kArchiveERF, "swpc_tex_tpa.erf", 11);
	}

	status("Indexing extra sound resources");
	indexMandatoryDirectory("streamsounds", 0, -1, 20);
	status("Indexing extra voice resources");
	indexMandatoryDirectory("streamvoice" , 0, -1, 21);
	status("Indexing extra music resources");
	indexMandatoryDirectory("streammusic" , 0, -1, 22);
	status("Indexing extra movie resources");
	indexMandatoryDirectory("movies"      , 0, -1, 23);

	if (_platform == Aurora::kPlatformWindows) {
		status("Indexing Windows-specific resources");
		initCursorsRemap();
		indexMandatoryArchive(Aurora::kArchiveEXE, "swkotor2.exe", 24);
	}

	status("Indexing override files");
	indexOptionalDirectory("override", 0, 0, 30);

	if (EventMan.quitRequested())
		return;

	status("Loading main talk table");
	TalkMan.addMainTable("dialog");

	registerModelLoader(new KotOR2ModelLoader);

	FontMan.setFormat(Graphics::Aurora::kFontFormatTexture);
}
Example #12
0
void NWN2Engine::init() {
	status("Setting base directory");
	ResMan.registerDataBaseDir(_baseDirectory);

	status("Adding extra archive directories");
	ResMan.addArchiveDir(Aurora::kArchiveZIP, "data");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "modules");

	status("Loading main resource files");

	indexMandatoryArchive(Aurora::kArchiveZIP, "2da.zip"           ,  1);
	indexMandatoryArchive(Aurora::kArchiveZIP, "actors.zip"        ,  2);
	indexMandatoryArchive(Aurora::kArchiveZIP, "animtags.zip"      ,  3);
	indexMandatoryArchive(Aurora::kArchiveZIP, "convo.zip"         ,  4);
	indexMandatoryArchive(Aurora::kArchiveZIP, "ini.zip"           ,  5);
	indexMandatoryArchive(Aurora::kArchiveZIP, "lod-merged.zip"    ,  6);
	indexMandatoryArchive(Aurora::kArchiveZIP, "music.zip"         ,  7);
	indexMandatoryArchive(Aurora::kArchiveZIP, "nwn2_materials.zip",  8);
	indexMandatoryArchive(Aurora::kArchiveZIP, "nwn2_models.zip"   ,  9);
	indexMandatoryArchive(Aurora::kArchiveZIP, "nwn2_vfx.zip"      , 10);
	indexMandatoryArchive(Aurora::kArchiveZIP, "prefabs.zip"       , 11);
	indexMandatoryArchive(Aurora::kArchiveZIP, "scripts.zip"       , 12);
	indexMandatoryArchive(Aurora::kArchiveZIP, "sounds.zip"        , 13);
	indexMandatoryArchive(Aurora::kArchiveZIP, "soundsets.zip"     , 14);
	indexMandatoryArchive(Aurora::kArchiveZIP, "speedtree.zip"     , 15);
	indexMandatoryArchive(Aurora::kArchiveZIP, "templates.zip"     , 16);
	indexMandatoryArchive(Aurora::kArchiveZIP, "vo.zip"            , 17);
	indexMandatoryArchive(Aurora::kArchiveZIP, "walkmesh.zip"      , 18);

	status("Loading expansions resource files");

	// Expansion 1: Mask of the Betrayer (MotB)
	indexOptionalArchive(Aurora::kArchiveZIP, "2da_x1.zip"           , 20);
	indexOptionalArchive(Aurora::kArchiveZIP, "actors_x1.zip"        , 21);
	indexOptionalArchive(Aurora::kArchiveZIP, "animtags_x1.zip"      , 22);
	indexOptionalArchive(Aurora::kArchiveZIP, "convo_x1.zip"         , 23);
	indexOptionalArchive(Aurora::kArchiveZIP, "ini_x1.zip"           , 24);
	indexOptionalArchive(Aurora::kArchiveZIP, "lod-merged_x1.zip"    , 25);
	indexOptionalArchive(Aurora::kArchiveZIP, "music_x1.zip"         , 26);
	indexOptionalArchive(Aurora::kArchiveZIP, "nwn2_materials_x1.zip", 27);
	indexOptionalArchive(Aurora::kArchiveZIP, "nwn2_models_x1.zip"   , 28);
	indexOptionalArchive(Aurora::kArchiveZIP, "nwn2_vfx_x1.zip"      , 29);
	indexOptionalArchive(Aurora::kArchiveZIP, "prefabs_x1.zip"       , 30);
	indexOptionalArchive(Aurora::kArchiveZIP, "scripts_x1.zip"       , 31);
	indexOptionalArchive(Aurora::kArchiveZIP, "soundsets_x1.zip"     , 32);
	indexOptionalArchive(Aurora::kArchiveZIP, "sounds_x1.zip"        , 33);
	indexOptionalArchive(Aurora::kArchiveZIP, "speedtree_x1.zip"     , 34);
	indexOptionalArchive(Aurora::kArchiveZIP, "templates_x1.zip"     , 35);
	indexOptionalArchive(Aurora::kArchiveZIP, "vo_x1.zip"            , 36);
	indexOptionalArchive(Aurora::kArchiveZIP, "walkmesh_x1.zip"      , 37);

	// Expansion 2: Storm of Zehir (SoZ)
	indexOptionalArchive(Aurora::kArchiveZIP, "2da_x2.zip"           , 40);
	indexOptionalArchive(Aurora::kArchiveZIP, "actors_x2.zip"        , 41);
	indexOptionalArchive(Aurora::kArchiveZIP, "animtags_x2.zip"      , 42);
	indexOptionalArchive(Aurora::kArchiveZIP, "lod-merged_x2.zip"    , 43);
	indexOptionalArchive(Aurora::kArchiveZIP, "music_x2.zip"         , 44);
	indexOptionalArchive(Aurora::kArchiveZIP, "nwn2_materials_x2.zip", 45);
	indexOptionalArchive(Aurora::kArchiveZIP, "nwn2_models_x2.zip"   , 46);
	indexOptionalArchive(Aurora::kArchiveZIP, "nwn2_vfx_x2.zip"      , 47);
	indexOptionalArchive(Aurora::kArchiveZIP, "prefabs_x2.zip"       , 48);
	indexOptionalArchive(Aurora::kArchiveZIP, "scripts_x2.zip"       , 49);
	indexOptionalArchive(Aurora::kArchiveZIP, "soundsets_x2.zip"     , 50);
	indexOptionalArchive(Aurora::kArchiveZIP, "sounds_x2.zip"        , 51);
	indexOptionalArchive(Aurora::kArchiveZIP, "speedtree_x2.zip"     , 52);
	indexOptionalArchive(Aurora::kArchiveZIP, "templates_x2.zip"     , 53);
	indexOptionalArchive(Aurora::kArchiveZIP, "vo_x2.zip"            , 54);

	warning("TODO: Mysteries of Westgate (MoW) resource files");
	warning("TODO: Patch resource files");

	status("Indexing extra sound resources");
	indexMandatoryDirectory("ambient"   , 0,  0, 60);
	indexOptionalDirectory ("ambient_x1", 0,  0, 61);
	indexOptionalDirectory ("ambient_x2", 0,  0, 62);
	status("Indexing extra music resources");
	indexMandatoryDirectory("music"     , 0,  0, 63);
	indexOptionalDirectory ("music_x1"  , 0,  0, 64);
	indexOptionalDirectory ("music_x2"  , 0,  0, 65);
	status("Indexing extra movie resources");
	indexMandatoryDirectory("movies"    , 0,  0, 66);
	status("Indexing extra effects resources");
	indexMandatoryDirectory("effects"   , 0,  0, 67);
	status("Indexing extra character resources");
	indexMandatoryDirectory("localvault", 0,  0, 68);
	status("Indexing extra UI resources");
	indexMandatoryDirectory("ui"        , 0, -1, 69);

	status("Indexing Windows-specific resources");
	indexMandatoryArchive(Aurora::kArchiveEXE, "nwn2main.exe", 70);

	status("Indexing override files");
	indexOptionalDirectory("override", 0, 0, 100);

	registerModelLoader(new NWN2ModelLoader);

	FontMan.setFormat(Graphics::Aurora::kFontFormatTTF);
}