[Scummvm-git-logs] scummvm master -> 37b305c1fe41ea8d57d4abd347b353733ac79bb5
bluegr
bluegr at gmail.com
Tue Nov 17 16:03:54 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ea6806dfe7 STARTREK: Add music loading stubs for non-DOS versions
37b305c1fe STARTREK: Rewrite the resource loader, and add more console commands
Commit: ea6806dfe7497f8efc229514810d887c7d23ea43
https://github.com/scummvm/scummvm/commit/ea6806dfe7497f8efc229514810d887c7d23ea43
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2020-11-17T18:00:03+02:00
Commit Message:
STARTREK: Add music loading stubs for non-DOS versions
Changed paths:
engines/startrek/sound.cpp
diff --git a/engines/startrek/sound.cpp b/engines/startrek/sound.cpp
index 8fec588a17..8bb0c3df52 100644
--- a/engines/startrek/sound.cpp
+++ b/engines/startrek/sound.cpp
@@ -154,16 +154,15 @@ void Sound::loadMusicFile(const Common::String &baseSoundName) {
_loadedMidiFilename = baseSoundName;
- /*
- if (_vm->getPlatform() == Common::kPlatformAmiga)
- playAmigaSound(baseSoundName);
- else if (_vm->getPlatform() == Common::kPlatformMacintosh)
- playMacSMFSound(baseSoundName);
- else if (_vm->getFeatures() & GF_DEMO)
- playSMFSound(baseSoundName);
- else
- */
- loadPCMusicFile(baseSoundName);
+ if (_vm->getPlatform() == Common::kPlatformDOS) {
+ loadPCMusicFile(baseSoundName);
+ } else if (_vm->getPlatform() == Common::kPlatformAmiga) {
+ //playAmigaSound(baseSoundName);
+ } else if (_vm->getPlatform() == Common::kPlatformMacintosh) {
+ //playMacSMFSound(baseSoundName);
+ } else if (_vm->getFeatures() & GF_DEMO) {
+ //playSMFSound(baseSoundName);
+ }
}
void Sound::playMidiMusicTracks(int startTrack, int loopTrack) {
Commit: 37b305c1fe41ea8d57d4abd347b353733ac79bb5
https://github.com/scummvm/scummvm/commit/37b305c1fe41ea8d57d4abd347b353733ac79bb5
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2020-11-17T18:03:20+02:00
Commit Message:
STARTREK: Rewrite the resource loader, and add more console commands
Changed paths:
engines/startrek/actors.cpp
engines/startrek/console.cpp
engines/startrek/console.h
engines/startrek/menu.cpp
engines/startrek/resource.cpp
engines/startrek/resource.h
engines/startrek/saveload.cpp
engines/startrek/startrek.cpp
diff --git a/engines/startrek/actors.cpp b/engines/startrek/actors.cpp
index 42a32df73e..92cdfd4a16 100644
--- a/engines/startrek/actors.cpp
+++ b/engines/startrek/actors.cpp
@@ -169,9 +169,10 @@ void StarTrekEngine::updateActorAnimations() {
actor->animFile->seek(actor->animFrame * 22, SEEK_SET);
char animFrameFilename[16];
actor->animFile->read(animFrameFilename, 16);
- sprite->setBitmap(loadAnimationFrame(animFrameFilename, actor->scale));
-
actor->bitmapFilename = animFrameFilename;
+ actor->bitmapFilename.trim();
+
+ sprite->setBitmap(loadAnimationFrame(actor->bitmapFilename, actor->scale));
actor->animFile->seek(10 + actor->animFrame * 22, SEEK_SET);
uint16 xOffset = actor->animFile->readUint16();
@@ -469,8 +470,9 @@ void StarTrekEngine::drawActorToScreen(Actor *actor, const Common::String &_anim
if (addSprite)
_gfx->addSprite(sprite);
- sprite->setBitmap(loadAnimationFrame(firstFrameFilename, scale));
actor->bitmapFilename = firstFrameFilename;
+ actor->bitmapFilename.trim();
+ sprite->setBitmap(loadAnimationFrame(actor->bitmapFilename, scale));
actor->scale = scale;
actor->animFile->seek(10, SEEK_SET);
diff --git a/engines/startrek/console.cpp b/engines/startrek/console.cpp
index 19e3ace766..70eaf2518b 100644
--- a/engines/startrek/console.cpp
+++ b/engines/startrek/console.cpp
@@ -34,7 +34,8 @@ Console::Console(StarTrekEngine *vm) : GUI::Debugger(), _vm(vm) {
registerCmd("actions", WRAP_METHOD(Console, Cmd_Actions));
registerCmd("text", WRAP_METHOD(Console, Cmd_Text));
registerCmd("bg", WRAP_METHOD(Console, Cmd_Bg));
- registerCmd("dumpfile", WRAP_METHOD(Console, Cmd_DumpFile));
+ registerCmd("filedump", WRAP_METHOD(Console, Cmd_DumpFile));
+ registerCmd("filesearch", WRAP_METHOD(Console, Cmd_SearchFile));
}
Console::~Console() {
@@ -134,7 +135,12 @@ bool Console::Cmd_DumpFile(int argc, const char **argv) {
debugPrintf("Dumping %s...\n", argv[1]);
- Common::MemoryReadStreamEndian *stream = _vm->_resource->loadFile(argv[1]);
+ Common::MemoryReadStreamEndian *stream = _vm->_resource->loadFile(argv[1], 0, false);
+ if (!stream) {
+ debugPrintf("File not found\n");
+ return true;
+ }
+
uint32 size = stream->size();
byte *data = new byte[size];
stream->read(data, size);
@@ -150,6 +156,23 @@ bool Console::Cmd_DumpFile(int argc, const char **argv) {
return true;
}
+bool Console::Cmd_SearchFile(int argc, const char **argv) {
+ if (argc < 2) {
+ debugPrintf("Usage: %s <file name>\n", argv[0]);
+ return true;
+ }
+
+ Common::String filename = argv[1];
+ filename.toUppercase();
+
+ Common::List<ResourceIndex> records = _vm->_resource->searchIndex(filename);
+ debugPrintf("Found:\n");
+ for (Common::List<ResourceIndex>::const_iterator i = records.begin(), end = records.end(); i != end; ++i) {
+ debugPrintf("%s, offset: %d\n", i->fileName.c_str(), i->indexOffset);
+ }
+
+ return true;
+}
Common::String Console::EventToString(uint32 action) {
const char *actions[] = {
diff --git a/engines/startrek/console.h b/engines/startrek/console.h
index 28d1890576..e96e83a42d 100644
--- a/engines/startrek/console.h
+++ b/engines/startrek/console.h
@@ -42,6 +42,7 @@ private:
bool Cmd_Text(int argc, const char **argv);
bool Cmd_Bg(int argc, const char **argv);
bool Cmd_DumpFile(int argc, const char **argv);
+ bool Cmd_SearchFile(int argc, const char **argv);
Common::String EventToString(uint32 action);
Common::String ItemToString(byte index);
diff --git a/engines/startrek/menu.cpp b/engines/startrek/menu.cpp
index 95fd921476..650f213702 100644
--- a/engines/startrek/menu.cpp
+++ b/engines/startrek/menu.cpp
@@ -518,13 +518,11 @@ void StarTrekEngine::loadMenuButtons(String mnuFilename, int xpos, int ypos) {
char bitmapBasename[11];
stream->seek(i * 16, SEEK_SET);
stream->read(bitmapBasename, 10);
- for (int j = 0; j < 10; j++) {
- if (bitmapBasename[j] == ' ')
- bitmapBasename[j] = '\0';
- }
bitmapBasename[10] = '\0';
+ Common::String bitmapName = bitmapBasename;
+ bitmapName.trim();
- _activeMenu->sprites[i].setBitmap(_resource->loadBitmapFile(bitmapBasename));
+ _activeMenu->sprites[i].setBitmap(_resource->loadBitmapFile(bitmapName));
_activeMenu->sprites[i].pos.x = stream->readUint16() + xpos;
_activeMenu->sprites[i].pos.y = stream->readUint16() + ypos;
_activeMenu->retvals[i] = stream->readUint16();
diff --git a/engines/startrek/resource.cpp b/engines/startrek/resource.cpp
index 782afc1acb..d705b711d2 100644
--- a/engines/startrek/resource.cpp
+++ b/engines/startrek/resource.cpp
@@ -40,27 +40,114 @@ Resource::Resource(Common::Platform platform, bool isDemo) : _platform(platform)
error("Could not load Star Trek Data");
assert(_macResFork->hasDataFork() && _macResFork->hasResFork());
}
+
+ readIndexFile();
}
Resource::~Resource() {
delete _macResFork;
}
-/**
- * TODO:
- * - Should return nullptr on failure to open a file?
- * - This is supposed to cache results, return same FileStream on multiple accesses.
- * - This is supposed to read from a "patches" folder which overrides files in the
- * packed blob.
- */
-Common::MemoryReadStreamEndian *Resource::loadFile(Common::String filename, int fileIndex) {
- filename.toUppercase();
+void Resource::readIndexFile() {
+ Common::SeekableReadStream *indexFile;
- Common::String basename, extension;
+ if (_platform == Common::kPlatformAmiga) {
+ indexFile = SearchMan.createReadStreamForMember("data000.dir");
+ } else if (_platform == Common::kPlatformMacintosh) {
+ indexFile = _macResFork->getResource("Directory");
+ } else {
+ indexFile = SearchMan.createReadStreamForMember("data.dir");
+ }
- bool bigEndian = _platform == Common::kPlatformAmiga;
+ if (!indexFile)
+ error("Could not open directory file");
+
+ while (!indexFile->eos() && !indexFile->err()) {
+ _resources.push_back(getIndexEntry(indexFile));
+ }
- for (int i = filename.size() - 1; ; i--) {
+ delete indexFile;
+}
+
+Common::List<ResourceIndex> Resource::searchIndex(Common::String filename) {
+ Common::List<ResourceIndex> result;
+
+ for (Common::List<ResourceIndex>::const_iterator i = _resources.begin(), end = _resources.end(); i != end; ++i) {
+ if (i->fileName.contains(filename)) {
+ result.push_back(*i);
+ }
+ }
+
+ return result;
+}
+
+ResourceIndex Resource::getIndex(Common::String filename) {
+ ResourceIndex index;
+
+ for (Common::List<ResourceIndex>::const_iterator i = _resources.begin(), end = _resources.end(); i != end; ++i) {
+ if (filename.matchString(i->fileName, true)) {
+ index = *i;
+ index.foundData = true;
+ return index;
+ }
+ }
+
+ return index;
+}
+
+ResourceIndex Resource::getIndexEntry(Common::SeekableReadStream *indexFile) {
+ ResourceIndex index;
+
+ index.indexOffset = 0;
+ index.foundData = false;
+ index.fileCount = 1;
+ index.uncompressedSize = 0;
+
+ Common::String currentFile;
+ for (byte i = 0; i < 8; i++) {
+ char c = indexFile->readByte();
+ if (c)
+ currentFile += c;
+ }
+ currentFile += '.';
+
+ // Read extension
+ for (byte i = 0; i < 3; i++)
+ currentFile += indexFile->readByte();
+
+ index.fileName = currentFile;
+
+ if (_isDemo && _platform == Common::kPlatformDOS) {
+ indexFile->readByte(); // Always 0?
+ index.fileCount = indexFile->readUint16LE(); // Always 1
+ assert(index.fileCount == 1);
+ index.indexOffset = indexFile->readUint32LE();
+ index.uncompressedSize = indexFile->readUint16LE();
+ } else {
+ if (_platform == Common::kPlatformAmiga)
+ index.indexOffset = (indexFile->readByte() << 16) + (indexFile->readByte() << 8) + indexFile->readByte();
+ else
+ index.indexOffset = indexFile->readByte() + (indexFile->readByte() << 8) + (indexFile->readByte() << 16);
+
+ if (index.indexOffset & (1 << 23)) {
+ index.fileCount = (index.indexOffset >> 16) & 0x7F;
+ index.indexOffset = index.indexOffset & 0xFFFF;
+ if (index.fileCount == 0)
+ error("fileCount is 0 for %s", index.fileName.c_str());
+ } else {
+ index.fileCount = 1;
+ }
+ }
+
+ return index;
+}
+
+// Files can be accessed "sequentially" if their filenames are the same except for
+// the last character being incremented by one.
+Common::MemoryReadStreamEndian *Resource::loadSequentialFile(Common::String filename, int fileIndex) {
+ Common::String basename, extension;
+
+ for (int i = filename.size() - 1;; i--) {
if (filename[i] == '.') {
basename = filename;
extension = filename;
@@ -70,151 +157,99 @@ Common::MemoryReadStreamEndian *Resource::loadFile(Common::String filename, int
}
}
- // FIXME: don't know if this is right, or if it goes here
- while (!basename.empty() && basename.lastChar() == ' ') {
- basename.erase(basename.size() - 1, 1);
+ if ((basename.lastChar() >= '1' && basename.lastChar() <= '9') ||
+ (basename.lastChar() >= 'b' && basename.lastChar() <= 'z') ||
+ (basename.lastChar() >= 'B' && basename.lastChar() <= 'Z')) {
+ basename.setChar(basename.lastChar() - 1, basename.size() - 1);
+ return loadFile(basename + "." + extension, fileIndex + 1);
+ } else {
+ return nullptr;
}
+}
- filename = basename + '.' + extension;
+uint32 Resource::getSequentialFileOffset(uint32 offset, int fileIndex) {
+ Common::SeekableReadStream *dataRunFile = SearchMan.createReadStreamForMember("data.run"); // FIXME: Amiga & Mac need this implemented
+ if (!dataRunFile)
+ error("Could not open sequential file");
- // TODO: Re-enable this when more work has been done on the demo
- /*
- // The Judgment Rites demo has its files not in the standard archive
- if (getGameType() == GType_STJR && _isDemo) {
- Common::File *file = new Common::File();
- if (!file->open(filename.c_str())) {
- delete file;
- error("Could not find file \'%s\'", filename.c_str());
- }
- int32 size = file->size();
- byte *data = (byte *)malloc(size);
- file->read(data, size);
- delete file;
- return new Common::MemoryReadStreamEndian(data, size, bigEndian, DisposeAfterUse::YES);
- }
- */
+ dataRunFile->seek(offset);
- Common::SeekableReadStream *indexFile = 0;
+ offset = dataRunFile->readByte() + (dataRunFile->readByte() << 8) + (dataRunFile->readByte() << 16);
+ //offset &= 0xFFFFFE;
- if (_platform == Common::kPlatformAmiga) {
- indexFile = SearchMan.createReadStreamForMember("data000.dir");
- if (!indexFile)
- error("Could not open data000.dir");
- } else if (_platform == Common::kPlatformMacintosh) {
- indexFile = _macResFork->getResource("Directory");
- if (!indexFile)
- error("Could not find 'Directory' resource in 'Star Trek Data'");
- } else {
- indexFile = SearchMan.createReadStreamForMember("data.dir");
- if (!indexFile)
- error("Could not open data.dir");
+ for (uint16 i = 0; i < fileIndex; i++) {
+ offset += dataRunFile->readUint16LE();
}
- uint32 indexOffset = 0;
- bool foundData = false;
- uint16 fileCount = 1;
- uint16 uncompressedSize = 0;
-
- while (!indexFile->eos() && !indexFile->err()) {
- Common::String testfile;
- for (byte i = 0; i < 8; i++) {
- char c = indexFile->readByte();
- if (c)
- testfile += c;
- }
- testfile += '.';
+ delete dataRunFile;
- for (byte i = 0; i < 3; i++)
- testfile += indexFile->readByte();
+ return offset;
+}
- if (_isDemo && _platform == Common::kPlatformDOS) {
- indexFile->readByte(); // Always 0?
- fileCount = indexFile->readUint16LE(); // Always 1
- indexOffset = indexFile->readUint32LE();
- uncompressedSize = indexFile->readUint16LE();
- } else {
- if (_platform == Common::kPlatformAmiga)
- indexOffset = (indexFile->readByte() << 16) + (indexFile->readByte() << 8) + indexFile->readByte();
- else
- indexOffset = indexFile->readByte() + (indexFile->readByte() << 8) + (indexFile->readByte() << 16);
-
- if (indexOffset & (1 << 23)) {
- fileCount = (indexOffset >> 16) & 0x7F;
- indexOffset = indexOffset & 0xFFFF;
- assert(fileCount > 1);
- } else {
- fileCount = 1;
- }
- }
+/**
+ * TODO:
+ * - This is supposed to cache results, return same FileStream on multiple accesses.
+ */
+Common::MemoryReadStreamEndian *Resource::loadFile(Common::String filename, int fileIndex, bool errorOnNotFound) {
+ bool bigEndian = _platform == Common::kPlatformAmiga;
- if (filename.matchString(testfile)) {
- foundData = true;
- break;
- }
+ // Load external patches
+ if (Common::File::exists(filename)) {
+ Common::File *patch = new Common::File();
+ patch->open(filename);
+ int32 size = patch->size();
+ byte *data = (byte *)malloc(size);
+ patch->read(data, size);
+ delete patch;
+ return new Common::MemoryReadStreamEndian(data, size, bigEndian, DisposeAfterUse::YES);
}
- delete indexFile;
+ ResourceIndex index = getIndex(filename);
- if (!foundData) {
- // Files can be accessed "sequentially" if their filenames are the same except for
- // the last character being incremented by one.
- if ((basename.lastChar() >= '1' && basename.lastChar() <= '9') ||
- (basename.lastChar() >= 'B' && basename.lastChar() <= 'Z')) {
- basename.setChar(basename.lastChar() - 1, basename.size() - 1);
- return loadFile(basename + "." + extension, fileIndex + 1);
- } else
- error("Could not find file \'%s\'", filename.c_str());
+ if (!index.foundData) {
+ Common::MemoryReadStreamEndian *result = loadSequentialFile(filename, fileIndex);
+ if (result) {
+ return result;
+ } else {
+ if (errorOnNotFound)
+ error("Could not find file \'%s\'", filename.c_str());
+ else
+ return nullptr;
+ }
}
- if (fileIndex >= fileCount)
- error("Tried to access file index %d for file '%s' which doesn't exist.", fileIndex, filename.c_str());
+ if (fileIndex >= index.fileCount)
+ error("Tried to access file index %d for file '%s', which doesn't exist.", fileIndex, filename.c_str());
Common::SeekableReadStream *dataFile = 0;
- Common::SeekableReadStream *dataRunFile = 0; // FIXME: Amiga & Mac need this implemented
if (_platform == Common::kPlatformAmiga) {
dataFile = SearchMan.createReadStreamForMember("data.000");
- if (!dataFile)
- error("Could not open data.000");
} else if (_platform == Common::kPlatformMacintosh) {
dataFile = _macResFork->getDataFork();
- if (!dataFile)
- error("Could not get 'Star Trek Data' data fork");
} else {
dataFile = SearchMan.createReadStreamForMember("data.001");
- if (!dataFile)
- error("Could not open data.001");
- dataRunFile = SearchMan.createReadStreamForMember("data.run");
- if (!dataFile)
- error("Could not open data.run");
}
+ if (!dataFile)
+ error("Could not open data file");
+
Common::SeekableReadStream *stream;
if (_isDemo && _platform == Common::kPlatformDOS) {
- assert(fileCount == 1); // Sanity check...
- stream = dataFile->readStream(uncompressedSize);
+ stream = dataFile->readStream(index.uncompressedSize);
} else {
- if (fileCount != 1) {
- dataRunFile->seek(indexOffset);
-
- indexOffset = dataRunFile->readByte() + (dataRunFile->readByte() << 8) + (dataRunFile->readByte() << 16);
- //indexOffset &= 0xFFFFFE;
-
- for (uint16 i = 0; i < fileIndex; i++) {
- uint16 size = dataRunFile->readUint16LE();
- indexOffset += size;
- }
+ if (index.fileCount != 1) {
+ index.indexOffset = getSequentialFileOffset(index.indexOffset, fileIndex);
}
- dataFile->seek(indexOffset);
+ dataFile->seek(index.indexOffset);
- uncompressedSize = (_platform == Common::kPlatformAmiga) ? dataFile->readUint16BE() : dataFile->readUint16LE();
- uint16 compressedSize = (_platform == Common::kPlatformAmiga) ? dataFile->readUint16BE() : dataFile->readUint16LE();
+ uint16 uncompressedSize = (_platform == Common::kPlatformAmiga) ? dataFile->readUint16BE() : dataFile->readUint16LE();
+ uint16 compressedSize = (_platform == Common::kPlatformAmiga) ? dataFile->readUint16BE() : dataFile->readUint16LE();
stream = decodeLZSS(dataFile->readStream(compressedSize), uncompressedSize);
}
delete dataFile;
- delete dataRunFile;
int32 size = stream->size();
byte *data = (byte *)malloc(size);
diff --git a/engines/startrek/resource.h b/engines/startrek/resource.h
index a6d8bffd97..a81f85f65a 100644
--- a/engines/startrek/resource.h
+++ b/engines/startrek/resource.h
@@ -36,13 +36,33 @@ class MacResManager;
namespace StarTrek {
+struct ResourceIndex {
+ uint32 indexOffset;
+ bool foundData;
+ uint16 fileCount;
+ uint16 uncompressedSize; // used in the demo
+ Common::String fileName;
+
+ ResourceIndex() {
+ indexOffset = 0;
+ foundData = 0;
+ fileCount = 0;
+ uncompressedSize = 0;
+ fileName = "";
+ }
+};
+
class Resource {
public:
Resource(Common::Platform platform, bool isDemo);
virtual ~Resource();
- Common::MemoryReadStreamEndian *loadFile(Common::String filename, int fileIndex = 0);
+ ResourceIndex getIndex(Common::String filename);
+ Common::List<ResourceIndex> searchIndex(Common::String filename);
+ Common::MemoryReadStreamEndian *loadFile(Common::String filename, int fileIndex = 0, bool errorOnNotFound = true);
+ Common::MemoryReadStreamEndian *loadSequentialFile(Common::String filename, int fileIndex = 0);
Common::MemoryReadStreamEndian *loadBitmapFile(Common::String baseName);
+ uint32 getSequentialFileOffset(uint32 offset, int fileIndex);
/**
* TODO: Figure out what the extra parameters are, and if they're important.
@@ -60,11 +80,15 @@ public:
}
private:
+ void readIndexFile();
+ ResourceIndex getIndexEntry(Common::SeekableReadStream *indexFile);
+
//IWFile *_iwFile;
Common::MacResManager *_macResFork;
Common::Platform _platform;
bool _isDemo;
Common::String _txtFilename;
+ Common::List<ResourceIndex> _resources;
};
} // End of namespace StarTrek
diff --git a/engines/startrek/saveload.cpp b/engines/startrek/saveload.cpp
index 436eb9c2bb..d753135902 100644
--- a/engines/startrek/saveload.cpp
+++ b/engines/startrek/saveload.cpp
@@ -250,6 +250,7 @@ bool StarTrekEngine::saveOrLoadGameData(Common::SeekableReadStream *in, Common::
for (uint j = 0; j < 16 - a->animFilename.size() - 1; ++j)
ser.syncAsByte(filler); // make sure that exactly 16 bytes are synced
}
+ a->animFilename.trim();
ser.syncAsUint16LE(a->animType);
@@ -261,6 +262,8 @@ bool StarTrekEngine::saveOrLoadGameData(Common::SeekableReadStream *in, Common::
for (uint j = 0; j < 10 - a->bitmapFilename.size() - 1; ++j)
ser.syncAsByte(filler); // make sure that exactly 10 bytes are synced
}
+ a->bitmapFilename.trim();
+
a->scale.saveLoadWithSerializer(ser);
// Can't save "animFile" (will be reloaded)
ser.syncAsUint16LE(a->numAnimFrames);
diff --git a/engines/startrek/startrek.cpp b/engines/startrek/startrek.cpp
index 0462fc0813..009969688e 100644
--- a/engines/startrek/startrek.cpp
+++ b/engines/startrek/startrek.cpp
@@ -60,7 +60,7 @@ StarTrekEngine::StarTrekEngine(OSystem *syst, const StarTrekGameDescription *gam
if (getPlatform() != Common::kPlatformDOS)
error("Only DOS versions of Star Trek: 25th Anniversary are currently supported");
else if (getGameType() == GType_STJR)
- error("Star Trek: Judgment Rites not yet supported");
+ error("Star Trek: Judgment Rites is not yet supported");
DebugMan.addDebugChannel(kDebugSound, "sound", "Sound");
DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics");
@@ -110,6 +110,9 @@ StarTrekEngine::StarTrekEngine(OSystem *syst, const StarTrekGameDescription *gam
for (int i = 0; i < MAX_BAN_FILES; i++)
_banFiles[i] = nullptr;
+
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "patches");
}
StarTrekEngine::~StarTrekEngine() {
More information about the Scummvm-git-logs
mailing list