diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/charset.cpp | 2 | ||||
-rw-r--r-- | scumm/resource.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v8.cpp | 3 | ||||
-rw-r--r-- | scumm/scumm.h | 10 |
4 files changed, 13 insertions, 4 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 57c242f71e..8cef34e422 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -397,7 +397,7 @@ CharsetRendererNut::CharsetRendererNut(Scumm *vm) for (int i = 0; i < 4; i++) { char fontname[256]; - sprintf(fontname, "resource/font%d.nut", i); + sprintf(fontname, "font%d.nut", i); warning("Loading charset %s\n", fontname); _fr[i] = new NutRenderer(_vm); if (!(_fr[i]->loadFont(fontname, _vm->getGameDataPath()))) { diff --git a/scumm/resource.cpp b/scumm/resource.cpp index ce34b10936..217bf86da6 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -194,7 +194,7 @@ bool Scumm::openResourceFile(const char *filename) } strcpy(buf, filename); - _fileHandle.open(buf, getGameDataPath(), 1, _encbyte); + _fileHandle.open(buf, getResDataPath(), 1, _encbyte); return _fileHandle.isOpen(); } diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index 3305260f09..b74f2cabca 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -1283,8 +1283,7 @@ void Scumm_v8::o8_startVideo() char dirName[255]; int len = resStrLen((char*)_scriptPointer); - sprintf(dirName, "%s/resource/", getGameDataPath()); - warning("o8_startVideo(%s/%s)\n", dirName, (char*)_scriptPointer); + warning("o8_startVideo(%s/%s)\n", getGameDataPath(), (char*)_scriptPointer); //ScummRenderer * sr = new ScummRenderer(this, 1000/14); //SmushPlayer * sp = new SmushPlayer(sr); diff --git a/scumm/scumm.h b/scumm/scumm.h index 50ee8aff45..7b98989772 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -280,6 +280,16 @@ public: int scummLoop(int delta); void initScummVars(); + const char *getResDataPath() const {return _gameDataPath;} + const char *getGameDataPath() const { + if (_features & GF_AFTER_V8) { + char resourcePath[255]; + sprintf(resourcePath, "%s/resource", _gameDataPath); + return resourcePath; + } + return _gameDataPath; + } + void pauseGame(bool user); void shutDown(int i); void setOptions(void); |