diff options
author | Filippos Karapetis | 2016-01-14 23:19:45 +0200 |
---|---|---|
committer | Filippos Karapetis | 2016-01-14 23:41:34 +0200 |
commit | e8d1100fec554377d012da2d21eb88e19156274d (patch) | |
tree | c4a80d07b9c862f30977a8c29df8b953ca2d9d0e | |
parent | 280bd0f7c2d426a1725118067db08ca2ca917e43 (diff) | |
download | scummvm-rg350-e8d1100fec554377d012da2d21eb88e19156274d.tar.gz scummvm-rg350-e8d1100fec554377d012da2d21eb88e19156274d.tar.bz2 scummvm-rg350-e8d1100fec554377d012da2d21eb88e19156274d.zip |
LAB: Allow the game to be launched from the GAME folder
The FONTS folder is pretty much useless, so if a user points ScummVM
to the GAME folder, handle the game files properly
-rw-r--r-- | engines/lab/lab.cpp | 6 | ||||
-rw-r--r-- | engines/lab/resource.cpp | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp index 0ecfc99d29..048082cce6 100644 --- a/engines/lab/lab.cpp +++ b/engines/lab/lab.cpp @@ -28,6 +28,7 @@ * */ +#include "common/config-manager.h" #include "common/debug-channels.h" #include "common/error.h" @@ -129,6 +130,9 @@ LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc) for (int i = 0; i < 20; i++) _highPalette[i] = 0; _introPlaying = false; + + const Common::FSNode gameDataDir(ConfMan.get("path")); + SearchMan.addSubDirectoryMatching(gameDataDir, "game", 0, 4); } LabEngine::~LabEngine() { @@ -172,7 +176,7 @@ Common::Error LabEngine::run() { // Check if this is the Wyrmkeep trial Common::File roomFile; bool knownVersion = true; - bool roomFileOpened = roomFile.open("game/rooms/48"); + bool roomFileOpened = roomFile.open("rooms/48"); if (!roomFileOpened) knownVersion = false; diff --git a/engines/lab/resource.cpp b/engines/lab/resource.cpp index 8883cefe10..23de58b1f7 100644 --- a/engines/lab/resource.cpp +++ b/engines/lab/resource.cpp @@ -154,9 +154,9 @@ Common::String Resource::translateFileName(const Common::String filename) { if (upperFilename.hasPrefix("P:") || upperFilename.hasPrefix("F:")) { if (_vm->_isHiRes) - fileNameStrFinal = "GAME/SPICT/"; + fileNameStrFinal = "SPICT/"; else - fileNameStrFinal = "GAME/PICT/"; + fileNameStrFinal = "PICT/"; if (_vm->getPlatform() == Common::kPlatformAmiga) { if (upperFilename.hasPrefix("P:")) { @@ -167,13 +167,9 @@ Common::String Resource::translateFileName(const Common::String filename) { } } } else if (upperFilename.hasPrefix("LAB:")) { - if (_vm->getPlatform() != Common::kPlatformAmiga) - fileNameStrFinal = "GAME/"; + // Look inside the game folder } else if (upperFilename.hasPrefix("MUSIC:")) { - if (_vm->getPlatform() != Common::kPlatformAmiga) - fileNameStrFinal = "GAME/MUSIC/"; - else - fileNameStrFinal = "MUSIC/"; + fileNameStrFinal = "MUSIC/"; } if (upperFilename.contains(':')) { |