aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek/room.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2019-10-29 13:31:36 +0200
committerFilippos Karapetis2019-10-29 17:46:13 +0200
commita0fb6deb298caa0b74f285f6122e8392193a53dd (patch)
treee9d6d93edad71074c499877011989c09bd9f054b /engines/startrek/room.cpp
parentf2726730156b0f2efadabf9d48b4795818440907 (diff)
downloadscummvm-rg350-a0fb6deb298caa0b74f285f6122e8392193a53dd.tar.gz
scummvm-rg350-a0fb6deb298caa0b74f285f6122e8392193a53dd.tar.bz2
scummvm-rg350-a0fb6deb298caa0b74f285f6122e8392193a53dd.zip
STARTREK: Read the text for the SINS mission from RDF files
Diffstat (limited to 'engines/startrek/room.cpp')
-rw-r--r--engines/startrek/room.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp
index 0cc2a444be..bd70898781 100644
--- a/engines/startrek/room.cpp
+++ b/engines/startrek/room.cpp
@@ -157,12 +157,12 @@ void Room::loadRoomMessage(const char *text) {
Common::String patchedText = patchRoomMessage(text);
text = patchedText.c_str();
- char textType = text[10]; // _ and U: talk message, N: look message, L: look with talker message
+ char textType = text[10]; // _, U and S: talk message, N: look message, L: look with talker message
if (text[5] != '\\')
error("loadRoomMessage: Invalid message");
- isTalkMessage = (textType == '_' || textType == 'U'); // U = Uhura
+ isTalkMessage = (textType == '_' || textType == 'U' || textType == 'S'); // U = Uhura, S = Scotty
isLookMessage = (textType == 'N');
isLookWithTalkerMessage = (textType == 'L');
@@ -175,6 +175,11 @@ void Room::loadRoomMessage(const char *text) {
messageNum += COMMON_MESSAGE_OFFSET;
}
+ // For some reason, Uhura's messages (Uxx) follow the same numbering as the
+ // rest, but Scott's don't, and start from one.
+ if (textType == 'S')
+ messageNum += SCOTTY_MESSAGE_OFFSET;
+
if (isTalkMessage)
_talkMessages[messageNum] = text;
else if (isLookMessage)
@@ -213,6 +218,9 @@ Common::String Room::patchRoomMessage(const char *text) {
{ "#FEA6\\FEA6_017#", "isn't that just great", "isn't this just great" },
{ "#FEA6\\FEA6_019#", "that action, Captain It may", "that action, Captain. It may" },
{ "#FEA6\\FEA6N016#", "that attack you", "that attacked you" },
+ { "#SIN2\\SIN2_012#", "I'm a surgeon not a alien", "I'm a surgeon, not an alien" },
+ { "#SIN4\\SIN4_023#", "to bypass it's lock system", "to bypass its lock system" },
+ { "#SIN5\\SIN5N012#", "Sparks explode and", "Sparks fly and" },
{ "", "", "" }
};