aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v2.cpp
diff options
context:
space:
mode:
authorMax Horn2003-05-22 22:42:44 +0000
committerMax Horn2003-05-22 22:42:44 +0000
commit2b13ad92e4f21f5d91c2bb711b8ec12aea3ca5da (patch)
tree0639b5e4118ac928c4eb044b0a69bab373a116f8 /scumm/script_v2.cpp
parent1383ccbdbe0de2a7777c9d8b5d786d7b8a48b67e (diff)
downloadscummvm-rg350-2b13ad92e4f21f5d91c2bb711b8ec12aea3ca5da.tar.gz
scummvm-rg350-2b13ad92e4f21f5d91c2bb711b8ec12aea3ca5da.tar.bz2
scummvm-rg350-2b13ad92e4f21f5d91c2bb711b8ec12aea3ca5da.zip
fixed Zak cashcard
svn-id: r7836
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r--scumm/script_v2.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 632a3c2ffe..5cfda5026a 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -105,7 +105,7 @@ void Scumm_v2::setupOpcodes() {
/* 38 */
OPCODE(o5_lessOrEqual),
OPCODE(o2_doSentence),
- OPCODE(o5_subtract),
+ OPCODE(o2_subtract),
OPCODE(o2_waitForActor),
/* 3C */
OPCODE(o5_stopSound),
@@ -145,7 +145,7 @@ void Scumm_v2::setupOpcodes() {
/* 58 */
OPCODE(o2_beginOverride),
OPCODE(o2_doSentence),
- OPCODE(o5_add),
+ OPCODE(o2_add),
OPCODE(o2_setBitVar),
/* 5C */
OPCODE(o2_dummy),
@@ -265,7 +265,7 @@ void Scumm_v2::setupOpcodes() {
/* B8 */
OPCODE(o5_lessOrEqual),
OPCODE(o2_doSentence),
- OPCODE(o5_subtract),
+ OPCODE(o2_subtract),
OPCODE(o2_waitForActor),
/* BC */
OPCODE(o5_stopSound),
@@ -305,7 +305,7 @@ void Scumm_v2::setupOpcodes() {
/* D8 */
OPCODE(o5_printEgo),
OPCODE(o2_doSentence),
- OPCODE(o5_add),
+ OPCODE(o2_add),
OPCODE(o2_setBitVar),
/* DC */
OPCODE(o2_dummy),
@@ -627,6 +627,20 @@ void Scumm_v2::o2_subIndirect() {
_scummVars[_resultVarNumber] -= a;
}
+void Scumm_v2::o2_add() {
+ int a;
+ getResultPos();
+ a = getVarOrDirectWord(0x80);
+ _scummVars[_resultVarNumber] += a;
+}
+
+void Scumm_v2::o2_subtract() {
+ int a;
+ getResultPos();
+ a = getVarOrDirectWord(0x80);
+ _scummVars[_resultVarNumber] -= a;
+}
+
void Scumm_v2::o2_waitForActor() {
if (derefActorSafe(getVarOrDirectByte(0x80), "o2_waitForActor")->moving) {
_scriptPointer -= 2;