Skip to content

Commit

Permalink
STARTREK: More explicit definition of text types
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegr committed Aug 17, 2019
1 parent d74060e commit 62d1dba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engines/startrek/room.cpp
Expand Up @@ -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] != '#')
Expand Down

0 comments on commit 62d1dba

Please sign in to comment.