diff options
author | Filippos Karapetis | 2019-12-27 01:30:31 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-12-27 01:33:27 +0200 |
commit | 26fcce1e4174d528829d42196a27667c0996108d (patch) | |
tree | 532e1e62e355b92db7f64ee808021033af29b021 /engines | |
parent | 4512845d58d048598a7824a000cef526cb8ef757 (diff) | |
download | scummvm-rg350-26fcce1e4174d528829d42196a27667c0996108d.tar.gz scummvm-rg350-26fcce1e4174d528829d42196a27667c0996108d.tar.bz2 scummvm-rg350-26fcce1e4174d528829d42196a27667c0996108d.zip |
STARTREK: Fix texts in the MUDD mission
Diffstat (limited to 'engines')
-rw-r--r-- | engines/startrek/room.cpp | 5 | ||||
-rw-r--r-- | engines/startrek/room.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp index a34af48b0b..9fc0431e81 100644 --- a/engines/startrek/room.cpp +++ b/engines/startrek/room.cpp @@ -49,6 +49,7 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm), _awayMissi int size = rdfFile->size(); _rdfData = new byte[size]; + _rdfSize = size; rdfFile->read(_rdfData, size); delete rdfFile; @@ -279,7 +280,9 @@ Common::String Room::patchRoomMessage(const char *text) { void Room::loadOtherRoomMessages() { uint16 startOffset = readRdfWord(14); - uint16 endOffset = readRdfWord(16); + // Some RDF files, lile MUDD0, contain text beyond the end offset, + // so we read up to the end of the file + uint16 endOffset = _rdfSize; // readRdfWord(16); uint16 offset = startOffset; const char *validPrefixes[] = { "BRI", "COM", "DEM", "FEA", "GEN", "LOV", "MUD", "SIN", "TRI", "TUG", "VEN" diff --git a/engines/startrek/room.h b/engines/startrek/room.h index f507b9fd0d..6aeed92c41 100644 --- a/engines/startrek/room.h +++ b/engines/startrek/room.h @@ -149,10 +149,11 @@ public: */ Common::Point getSpawnPosition(int crewmanIndex); -public: byte *_rdfData; private: + uint16 _rdfSize; + StarTrekEngine *_vm; AwayMission *_awayMission; |