diff options
author | Filippos Karapetis | 2019-08-26 02:44:24 +0300 |
---|---|---|
committer | Filippos Karapetis | 2019-08-26 02:45:33 +0300 |
commit | cb3030508eb3820f3e5f7f4ef779871621deb04b (patch) | |
tree | bc9c275d0e9e5d38f8b43f4dec5bc37b1f451ea8 /engines/startrek/room.cpp | |
parent | b0c8b368a907f7e3d183d50dcaf259e898ac70a6 (diff) | |
download | scummvm-rg350-cb3030508eb3820f3e5f7f4ef779871621deb04b.tar.gz scummvm-rg350-cb3030508eb3820f3e5f7f4ef779871621deb04b.tar.bz2 scummvm-rg350-cb3030508eb3820f3e5f7f4ef779871621deb04b.zip |
STARTREK: Read most strings for the LOV mission from its RDF files
Diffstat (limited to 'engines/startrek/room.cpp')
-rw-r--r-- | engines/startrek/room.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp index 0cffed9e57..b8bb6ad8fb 100644 --- a/engines/startrek/room.cpp +++ b/engines/startrek/room.cpp @@ -128,9 +128,10 @@ void Room::loadRoomMessages() { // TODO: There are some more messages which are not stored in that offset uint16 messagesOffset = readRdfWord(32); const char *text = (const char *)_rdfData + messagesOffset; + const char roomIndexChar = '0' + _vm->_roomIndex; do { - while (text[0] != '#' || text[1] != _vm->_missionName[0]) + while (text[0] != '#' || text[1] != _vm->_missionName[0] && text[4] != roomIndexChar) text++; if (text[5] == '\\') @@ -609,7 +610,7 @@ Common::String Room::getCrewmanAnimFilename(int object, const Common::String &st return _vm->getCrewmanAnimFilename(object, str); } -void Room::spockScan(int direction, TextRef text, bool changeDirection) { +void Room::spockScan(int direction, TextRef text, bool changeDirection, bool fromRDF) { const char *dirs = "nsew"; Common::String anim = "sscan_"; anim.setChar(dirs[direction], 5); @@ -621,10 +622,10 @@ void Room::spockScan(int direction, TextRef text, bool changeDirection) { playSoundEffectIndex(SND_TRICORDER); if (text != -1) - showText(TX_SPEAKER_SPOCK, text); + showText(TX_SPEAKER_SPOCK, text, fromRDF); } -void Room::mccoyScan(int direction, TextRef text, bool changeDirection) { +void Room::mccoyScan(int direction, TextRef text, bool changeDirection, bool fromRDF) { const char *dirs = "nsew"; Common::String anim = "mscan_"; anim.setChar(dirs[direction], 5); @@ -636,7 +637,7 @@ void Room::mccoyScan(int direction, TextRef text, bool changeDirection) { playSoundEffectIndex(SND_TRICORDER); if (text != -1) - showText(TX_SPEAKER_MCCOY, text); + showText(TX_SPEAKER_MCCOY, text, fromRDF); } } // End of namespace StarTrek |