コード例 #1
0
ファイル: game.cpp プロジェクト: vincele/xoreos
void Game::loadResources(const Common::UString &dir, uint32 priority, ChangeList &res) {
	indexOptionalDirectory(dir + "/data"           , 0,  0, priority + 10, res);
	indexOptionalDirectory(dir + "/data/movies"    , 0,  0, priority + 11, res);
	indexOptionalDirectory(dir + "/data/talktables", 0,  0, priority + 12, res);
	indexOptionalDirectory(dir + "/data/cursors"   , 0,  0, priority + 13, res);
	indexOptionalDirectory(dir + "/textures"       , 0, -1, priority + 14, res);
	indexOptionalDirectory(dir + "/audio"          , 0, -1, priority + 15, res);
	indexOptionalDirectory(dir + "/env"            , 0, -1, priority + 16, res);
	indexOptionalDirectory(dir + "/patch"          , 0,  0, priority + 17, res);

	loadResourceDir(dir + "/data"          , priority + 100, res);
	loadResourceDir(dir + "/data/abilities", priority + 200, res);

	loadResourceDir(dir + "/patch", 0x40000000 | priority, res);

	indexOptionalDirectory(dir + "/override", 0, -1, 0x40000000 | (priority + 499), res);
}
コード例 #2
0
ファイル: jade.cpp プロジェクト: Glyth/xoreos
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");
}
コード例 #3
0
ファイル: jade.cpp プロジェクト: DeejStar/xoreos
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");
}
コード例 #4
0
ファイル: nwn2.cpp プロジェクト: clone2727/xoreos
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);
}
コード例 #5
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);
}
コード例 #6
0
ファイル: nwn.cpp プロジェクト: cc9cii/xoreos
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);
}
コード例 #7
0
ファイル: kotor.cpp プロジェクト: jjardon/eos
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);
}
コード例 #8
0
ファイル: witcher.cpp プロジェクト: Supermanu/xoreos
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);
}
コード例 #9
0
ファイル: thewitcher.cpp プロジェクト: mclark4386/xoreos
void TheWitcherEngine::init() {
	status("Setting base directory");
	ResMan.registerDataBaseDir(_baseDirectory);

	status("Adding extra archive directories");
	ResMan.addArchiveDir(Aurora::kArchiveEXE, "system");
	ResMan.addArchiveDir(Aurora::kArchiveKEY, "data");
	ResMan.addArchiveDir(Aurora::kArchiveBIF, "data");
	ResMan.addArchiveDir(Aurora::kArchiveBIF, "data/voices");
	ResMan.addArchiveDir(Aurora::kArchiveERF, "data/modules/!final");

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

	status("Loading the localized base KEY");
	indexMandatoryArchive(Aurora::kArchiveKEY, "localized.key", 10);

	status("Loading the English language KEYs");
	indexMandatoryArchive(Aurora::kArchiveKEY, "lang_3.key", 20);
	indexMandatoryArchive(Aurora::kArchiveKEY, "M1_3.key"  , 21);
	indexMandatoryArchive(Aurora::kArchiveKEY, "M2_3.key"  , 22);

	status("Indexing extra resources");
	indexOptionalDirectory("data/movies"   , 0, -1, 30);
	indexOptionalDirectory("data/music"    , 0, -1, 31);
	indexOptionalDirectory("data/sounds"   , 0, -1, 32);
	indexOptionalDirectory("data/cutscenes", 0, -1, 33);
	indexOptionalDirectory("data/dialogues", 0, -1, 34);
	indexOptionalDirectory("data/fx"       , 0, -1, 35);
	indexOptionalDirectory("data/meshes"   , 0, -1, 36);
	indexOptionalDirectory("data/quests"   , 0, -1, 37);
	indexOptionalDirectory("data/scripts"  , 0, -1, 38);
	indexOptionalDirectory("data/templates", 0, -1, 39);
	indexOptionalDirectory("data/textures" , 0, -1, 40);

	indexOptionalDirectory("data", ".*\\.bik", 0, 41);

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

	status("Indexing override files");
	indexOptionalDirectory("data/override", 0, 0, 50);

	registerModelLoader(new TheWitcherModelLoader);

	FontMan.setFormat(Graphics::Aurora::kFontFormatTTF);
}
コード例 #10
0
ファイル: kotor2.cpp プロジェクト: mclark4386/xoreos
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);
}
コード例 #11
0
ファイル: nwn2.cpp プロジェクト: mclark4386/xoreos
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);
}