diff options
author | Travis Howell | 2004-08-24 15:25:32 +0000 |
---|---|---|
committer | Travis Howell | 2004-08-24 15:25:32 +0000 |
commit | 35a354bab7316fad0638533b35b487d35212c68f (patch) | |
tree | 7a9868585076a725372617338c2830eefe15956f /scumm | |
parent | 467b72479829ebbd15dc2aecbade516ff08dd1a5 (diff) | |
download | scummvm-rg350-35a354bab7316fad0638533b35b487d35212c68f.tar.gz scummvm-rg350-35a354bab7316fad0638533b35b487d35212c68f.tar.bz2 scummvm-rg350-35a354bab7316fad0638533b35b487d35212c68f.zip |
That should not have been removed
svn-id: r14731
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 2 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 31 |
2 files changed, 30 insertions, 3 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 769dd58a7e..9e50aa44b5 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -656,6 +656,8 @@ protected: /* Version 7 script opcodes */ void o72_getString(); void o72_compareStackList(); + void o72_objectX(); + void o72_objectY(); void o72_startScript(); void o72_startObject(); void o72_drawObject(); diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 942ffd866d..b29000f304 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -151,8 +151,8 @@ void ScummEngine_v72he::setupOpcodes() { OPCODE(o6_invalid), OPCODE(o6_wordArrayInc), /* 54 */ - OPCODE(o6_getObjectX), - OPCODE(o6_getObjectY), + OPCODE(o72_objectX), + OPCODE(o72_objectY), OPCODE(o6_byteVarDec), OPCODE(o6_wordVarDec), /* 58 */ @@ -396,7 +396,7 @@ void ScummEngine_v72he::o72_compareStackList() { int value = pop(); if (num) { - for (i = 1; i < 128; i++) { + for (i = 1; i < num; i++) { if (args[i] == value) { push(1); break; @@ -407,6 +407,31 @@ void ScummEngine_v72he::o72_compareStackList() { } } +void ScummEngine_v72he::o72_objectX() { + int object = pop(); + int objnum = getObjectIndex(object); + + if (objnum == -1) { + push(0); + return; + } + + push(_objs[objnum].x_pos); +} + + +void ScummEngine_v72he::o72_objectY() { + int object = pop(); + int objnum = getObjectIndex(object); + + if (objnum == -1) { + push(0); + return; + } + + push(_objs[objnum].y_pos); +} + void ScummEngine_v72he::o72_startScript() { int args[16]; int script, flags; |