aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter van Niftrik2016-03-18 23:41:42 +0100
committerWalter van Niftrik2016-06-06 20:35:49 +0200
commitd09247bacaea68af05703218373479cdb0f558bd (patch)
tree0b4c75a22626cdf306f274dea1b9f6281392a809
parentee8c63183d82aa4deebf87ca6c7a63671684d25f (diff)
downloadscummvm-rg350-d09247bacaea68af05703218373479cdb0f558bd.tar.gz
scummvm-rg350-d09247bacaea68af05703218373479cdb0f558bd.tar.bz2
scummvm-rg350-d09247bacaea68af05703218373479cdb0f558bd.zip
ADL: Fix move counter
-rw-r--r--engines/adl/adl.cpp6
-rw-r--r--engines/adl/adl.h4
-rw-r--r--engines/adl/adl_v2.cpp2
-rw-r--r--engines/adl/hires1.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index 778d8212be..036e8f1049 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -294,7 +294,7 @@ void AdlEngine::setupOpcodeTables() {
Opcode(o1_isItemInRoom);
// 0x04
OpcodeUnImpl();
- Opcode(o1_isMovesGrEq);
+ Opcode(o1_isMovesGT);
Opcode(o1_isVarEq);
OpcodeUnImpl();
// 0x08
@@ -859,8 +859,8 @@ int AdlEngine::o1_isItemInRoom(ScriptEnv &e) {
return 2;
}
-int AdlEngine::o1_isMovesGrEq(ScriptEnv &e) {
- if (e.arg(1) > _state.moves)
+int AdlEngine::o1_isMovesGT(ScriptEnv &e) {
+ if (e.arg(1) >= _state.moves)
return -1;
return 1;
}
diff --git a/engines/adl/adl.h b/engines/adl/adl.h
index 9e29d1f08a..b6e8dfac59 100644
--- a/engines/adl/adl.h
+++ b/engines/adl/adl.h
@@ -145,7 +145,7 @@ struct State {
uint16 moves;
bool isDark;
- State() : room(1), moves(0), isDark(false) { }
+ State() : room(1), moves(1), isDark(false) { }
};
typedef Common::List<Command> Commands;
@@ -178,7 +178,7 @@ protected:
// Opcodes
int o1_isItemInRoom(ScriptEnv &e);
- int o1_isMovesGrEq(ScriptEnv &e);
+ int o1_isMovesGT(ScriptEnv &e);
int o1_isVarEq(ScriptEnv &e);
int o1_isCurPicEq(ScriptEnv &e);
int o1_isItemPicEq(ScriptEnv &e);
diff --git a/engines/adl/adl_v2.cpp b/engines/adl/adl_v2.cpp
index 3a938b3ae5..1e5553a22a 100644
--- a/engines/adl/adl_v2.cpp
+++ b/engines/adl/adl_v2.cpp
@@ -51,7 +51,7 @@ void AdlEngine_v2::setupOpcodeTables() {
Opcode(o2_isItemInRoom);
// 0x04
Opcode(o2_isNounNotInRoom);
- Opcode(o1_isMovesGrEq);
+ Opcode(o1_isMovesGT);
Opcode(o1_isVarEq);
OpcodeUnImpl();
// 0x08
diff --git a/engines/adl/hires1.cpp b/engines/adl/hires1.cpp
index 9527d4e8aa..f7f16c0cd3 100644
--- a/engines/adl/hires1.cpp
+++ b/engines/adl/hires1.cpp
@@ -210,7 +210,7 @@ void HiRes1Engine::initState() {
Common::File f;
_state.room = 1;
- _state.moves = 0;
+ _state.moves = 1;
_state.isDark = false;
_state.vars.clear();