From 531e73418f6122be327123f168b837ad7eddddab Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 8 Jan 2003 23:41:27 +0000 Subject: our File class already makes sure we find stuff in the resource subdirectory. Plus, it handles different cases right. So now COMI works from CD on Mac OS X, too svn-id: r6363 --- scumm/resource.cpp | 4 ++-- scumm/scumm.h | 13 +------------ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 0d7d719848..3720763621 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -195,7 +195,7 @@ bool Scumm::openResourceFile(const char *filename) } strcpy(buf, filename); - _fileHandle.open(buf, getResDataPath(), 1, _encbyte); + _fileHandle.open(buf, getGameDataPath(), 1, _encbyte); return _fileHandle.isOpen(); } @@ -207,7 +207,7 @@ void Scumm::askForDisk(const char *filename, int disknum) if (_features & GF_AFTER_V8) { char result; - sprintf(buf, "Cannot find file: '%s'\nInsert disk %d into drive %s\nHit Ok to retry, Cancel to exit", filename, disknum, getResDataPath()); + sprintf(buf, "Cannot find file: '%s'\nInsert disk %d into drive %s\nHit Ok to retry, Cancel to exit", filename, disknum, getGameDataPath()); result = displayError(true, buf); if (result == 2) diff --git a/scumm/scumm.h b/scumm/scumm.h index edd0c67d77..1e5a45669a 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -291,18 +291,7 @@ public: bool _insaneState; bool _videoFinished; - const char *getResDataPath() const { return _gameDataPath; } - const char *getGameDataPath() const { - if (_features & GF_AFTER_V8) { - static char resourcePath[256]; - if (_gameDataPath[0] == '\0') - return "resource"; - - sprintf(resourcePath, "%sresource", _gameDataPath); - return resourcePath; - } - return _gameDataPath; - } + const char *getGameDataPath() const { return _gameDataPath; } void pauseGame(bool user); void shutDown(int i); -- cgit v1.2.3