diff options
author | D G Turner | 2012-02-24 06:02:03 +0000 |
---|---|---|
committer | D G Turner | 2012-02-24 15:04:15 +0000 |
commit | a397748aceab258ccfe36cb6719bdbbda1dee730 (patch) | |
tree | 148454ba507861d28e76209092d7c1ba29be4882 /engines | |
parent | bca22d4bee654a64fc1de9735dc45c1819e1d445 (diff) | |
download | scummvm-rg350-a397748aceab258ccfe36cb6719bdbbda1dee730.tar.gz scummvm-rg350-a397748aceab258ccfe36cb6719bdbbda1dee730.tar.bz2 scummvm-rg350-a397748aceab258ccfe36cb6719bdbbda1dee730.zip |
DREAMWEB: Migrate loadTextFile() to using datafile prefix variable.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamweb.h | 2 | ||||
-rw-r--r-- | engines/dreamweb/monitor.cpp | 22 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 13 |
3 files changed, 18 insertions, 19 deletions
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 762d6387a6..e80b5538ad 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -808,7 +808,7 @@ public: const uint8 *getTextInFile1(uint16 index); uint8 findNextColon(const uint8 **string); void allocateBuffers(); - void loadTextFile(TextFile &file, const char *fileName); + void loadTextFile(TextFile &file, const char *suffix); void loadGraphicsFile(GraphicsFile &file, const char *suffix); void loadGraphicsSegment(GraphicsFile &file, Common::File &inFile, unsigned int len); void loadTextSegment(TextFile &file, Common::File &inFile, unsigned int len); diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 61c23cda0e..cdef60e94d 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -383,21 +383,21 @@ void DreamWebEngine::printOuterMon() { void DreamWebEngine::loadPersonal() { if (_vars._location == 0 || _vars._location == 42) - loadTextFile(_textFile1, "DREAMWEB.T01"); // monitor file 1 + loadTextFile(_textFile1, "T01"); // monitor file 1 else - loadTextFile(_textFile1, "DREAMWEB.T02"); // monitor file 2 + loadTextFile(_textFile1, "T02"); // monitor file 2 } void DreamWebEngine::loadNews() { // textfile2 holds information accessible by anyone if (_vars._newsItem == 0) - loadTextFile(_textFile2, "DREAMWEB.T10"); // monitor file 10 + loadTextFile(_textFile2, "T10"); // monitor file 10 else if (_vars._newsItem == 1) - loadTextFile(_textFile2, "DREAMWEB.T11"); // monitor file 11 + loadTextFile(_textFile2, "T11"); // monitor file 11 else if (_vars._newsItem == 2) - loadTextFile(_textFile2, "DREAMWEB.T12"); // monitor file 12 + loadTextFile(_textFile2, "T12"); // monitor file 12 else - loadTextFile(_textFile2, "DREAMWEB.T13"); // monitor file 13 + loadTextFile(_textFile2, "T13"); // monitor file 13 } void DreamWebEngine::loadCart() { @@ -408,15 +408,15 @@ void DreamWebEngine::loadCart() { cartridgeId = getExAd(cartridgeIndex)->objId[3] + 1; if (cartridgeId == 0) - loadTextFile(_textFile3, "DREAMWEB.T20"); // monitor file 20 + loadTextFile(_textFile3, "T20"); // monitor file 20 else if (cartridgeId == 1) - loadTextFile(_textFile3, "DREAMWEB.T21"); // monitor file 21 + loadTextFile(_textFile3, "T21"); // monitor file 21 else if (cartridgeId == 2) - loadTextFile(_textFile3, "DREAMWEB.T22"); // monitor file 22 + loadTextFile(_textFile3, "T22"); // monitor file 22 else if (cartridgeId == 3) - loadTextFile(_textFile3, "DREAMWEB.T23"); // monitor file 23 + loadTextFile(_textFile3, "T23"); // monitor file 23 else - loadTextFile(_textFile3, "DREAMWEB.T24"); // monitor file 24 + loadTextFile(_textFile3, "T24"); // monitor file 24 } void DreamWebEngine::showKeys() { diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index e195ef3726..a542173e1d 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -728,8 +728,8 @@ void DreamWebEngine::dreamweb() { } } -void DreamWebEngine::loadTextFile(TextFile &file, const char *fileName) -{ +void DreamWebEngine::loadTextFile(TextFile &file, const char *suffix) { + Common::String fileName = getDatafilePrefix() + suffix; FileHeader header; Common::File f; @@ -1996,8 +1996,8 @@ void DreamWebEngine::readSetData() { loadGraphicsFile(_icons1, "G00"); loadGraphicsFile(_icons2, "G01"); loadGraphicsFile(_mainSprites, "S00"); - loadTextFile(_puzzleText, "DREAMWEB.T80"); - loadTextFile(_commandText, "DREAMWEB.T84"); + loadTextFile(_puzzleText, "T80"); + loadTextFile(_commandText, "T84"); useCharset1(); // FIXME: Why is this commented out? @@ -2236,12 +2236,11 @@ const uint8 *DreamWebEngine::getTextInFile1(uint16 index) { } void DreamWebEngine::loadTravelText() { - loadTextFile(_travelText, "DREAMWEB.T81"); // location descs + loadTextFile(_travelText, "T81"); // location descs } void DreamWebEngine::loadTempText(const char *suffix) { - Common::String fileName = getDatafilePrefix() + suffix; - loadTextFile(_textFile1, fileName.c_str()); + loadTextFile(_textFile1, suffix); } void DreamWebEngine::drawFloor() { |