aboutsummaryrefslogtreecommitdiff
path: root/queen/command.cpp
diff options
context:
space:
mode:
authorGregory Montoir2003-12-02 19:58:31 +0000
committerGregory Montoir2003-12-02 19:58:31 +0000
commita15fa0302aa935b28e6b4b9dcad43fb2f3e631ac (patch)
tree10efbd9dbe409c16f2fd28b2bd7165436aae65e0 /queen/command.cpp
parent25921847885051963adb4f0f1c81e9f7dfd52def (diff)
downloadscummvm-rg350-a15fa0302aa935b28e6b4b9dcad43fb2f3e631ac.tar.gz
scummvm-rg350-a15fa0302aa935b28e6b4b9dcad43fb2f3e631ac.tar.bz2
scummvm-rg350-a15fa0302aa935b28e6b4b9dcad43fb2f3e631ac.zip
fix a potiental journal issue
svn-id: r11478
Diffstat (limited to 'queen/command.cpp')
-rw-r--r--queen/command.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/queen/command.cpp b/queen/command.cpp
index 727dd6b9e3..e0527e3887 100644
--- a/queen/command.cpp
+++ b/queen/command.cpp
@@ -247,14 +247,12 @@ void Command::executeCurrentAction(bool walk) {
}
else if (cond >= 0) {
// we've had a successful Gamestate check, so we must now exit
- executeCommand(comId, cond);
+ cond = executeCommand(comId, cond);
break;
}
}
-
- if (_selCmd.action.value() == VERB_LOOK_AT) {
- // Look At, do standard look at routine
+ if (cond <= 0 && _selCmd.action.value() == VERB_LOOK_AT) {
look();
}
else {
@@ -358,7 +356,7 @@ void Command::readCommandsFrom(byte *&ptr) {
}
-void Command::executeCommand(uint16 comId, int16 condResult) {
+int16 Command::executeCommand(uint16 comId, int16 condResult) {
// execute.c l.313-452
debug(0, "Command::executeCommand() - cond = %X, com = %X", condResult, comId);
@@ -448,7 +446,7 @@ void Command::executeCommand(uint16 comId, int16 condResult) {
switch (com->specialSection) {
case 1:
_logic->useJournal();
- return;
+ return condResult;
case 2:
_logic->joeUseDress(true);
break;
@@ -477,6 +475,7 @@ void Command::executeCommand(uint16 comId, int16 condResult) {
if (condResult > 0) {
_logic->joeSpeak(condResult, true);
}
+ return condResult;
}