aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2019-08-17 21:53:09 +0300
committerFilippos Karapetis2019-08-17 21:56:13 +0300
commit62d1dbac659213b17d16764f31bf3a1124027284 (patch)
tree649ed1fdf40caa117d4dc8b856ff7a6d9daf5529
parentd74060e17a19f01ea78e71f794b2ddc8f3b7b277 (diff)
downloadscummvm-rg350-62d1dbac659213b17d16764f31bf3a1124027284.tar.gz
scummvm-rg350-62d1dbac659213b17d16764f31bf3a1124027284.tar.bz2
scummvm-rg350-62d1dbac659213b17d16764f31bf3a1124027284.zip
STARTREK: More explicit definition of text types
-rw-r--r--engines/startrek/room.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp
index 08609c52dc..5cc913a6b3 100644
--- a/engines/startrek/room.cpp
+++ b/engines/startrek/room.cpp
@@ -151,12 +151,13 @@ void Room::loadRoomMessage(const char *text) {
int messageNum;
bool isTalkMessage;
bool isLookWithTalkerMessage;
+ char textType = text[10]; // _ and U: talk message, N: look message, L: look with talker message
if (text[5] != '\\')
error("loadRoomMessage: Invalid message");
- isTalkMessage = (text[10] == '_' || text[10] == 'U'); // U = Uhura
- isLookWithTalkerMessage = (text[10] == 'L');
+ isTalkMessage = (textType == '_' || textType == 'U'); // U = Uhura
+ isLookWithTalkerMessage = (textType == 'L');
sscanf((const char *)(text + 11), "%3d", &messageNum);
if (text[14] != '#')