mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
ULTIMA8: Make loading work with different path configurations
This commit is contained in:
1 parent
a51f5e9c1a
commit
12f8e8679e
2 files changed
+11
-6
No files matched your search
@@ -47,8 +47,13 @@ FileSystem::~FileSystem() {
|
||||
// Open a streaming file as readable. Streamed (0 on failure)
|
||||
Common::SeekableReadStream *FileSystem::ReadFile(const string &vfn) {
|
||||
Common::SeekableReadStream *readStream;
|
||||
if (!rawOpen(readStream, vfn))
|
||||
return nullptr;
|
||||
if (!rawOpen(readStream, vfn)) {
|
||||
// Some games have some files in a "data" subdir.
|
||||
string altpath = string::format("data/%s", vfn.c_str());
|
||||
if (!rawOpen(readStream, altpath)) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
return readStream;
|
||||
}
|
||||
|
||||
@@ -75,8 +75,8 @@ bool RemorseGame::loadFiles() {
|
||||
if (!loadPalette("static/gamepal.pal", PaletteManager::Pal_Game))
|
||||
return false;
|
||||
if (GAME_IS_REGRET) {
|
||||
if (!loadPalette("static/cred.pal", PaletteManager::Pal_Cred))
|
||||
return false;
|
||||
// This one is not used at the moment, so allowed to fail
|
||||
loadPalette("static/cred.pal", PaletteManager::Pal_Cred);
|
||||
}
|
||||
if (!loadPalette("static/diff.pal", PaletteManager::Pal_Diff))
|
||||
return false;
|
||||
@@ -84,8 +84,8 @@ bool RemorseGame::loadFiles() {
|
||||
return false;
|
||||
if (!loadPalette("static/misc2.pal", PaletteManager::Pal_Misc2))
|
||||
return false;
|
||||
if (!loadPalette("static/star.pal", PaletteManager::Pal_Star))
|
||||
return false;
|
||||
// We don't use his one at the moment, ok to fail.
|
||||
loadPalette("static/star.pal", PaletteManager::Pal_Star);
|
||||
|
||||
pout << "Load GameData" << Std::endl;
|
||||
GameData::get_instance()->loadRemorseData();
|
||||
|
||||
Reference in new issue
Block a user