diff options
author | Travis Howell | 2004-08-23 14:11:53 +0000 |
---|---|---|
committer | Travis Howell | 2004-08-23 14:11:53 +0000 |
commit | 6d62e7ec664974ea07c0a124cbd8186ac57a673b (patch) | |
tree | 2d3e042795f6246e71292e8be96b2addd1650e96 /scumm | |
parent | 25ccf3a0eedf1678b170362197e6be3f79f530dd (diff) | |
download | scummvm-rg350-6d62e7ec664974ea07c0a124cbd8186ac57a673b.tar.gz scummvm-rg350-6d62e7ec664974ea07c0a124cbd8186ac57a673b.tar.bz2 scummvm-rg350-6d62e7ec664974ea07c0a124cbd8186ac57a673b.zip |
Another stub
svn-id: r14720
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 3 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 88 |
3 files changed, 50 insertions, 43 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 43f4cbe41d..3b8edbba9f 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -660,12 +660,13 @@ protected: void o72_objectY(); void o72_startScript(); void o72_startObject(); + void o72_drawObject(); + void o72_unknown62(); void o72_unknown63(); void o72_arrayOps(); void o72_dimArray(); void o72_dim2dimArray(); void o72_jumpToScript(); - void o72_drawObject(); void o72_stringLen(); void o72_readINI(); void o72_unknownF4(); diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 00fc4703ac..d5bf4908a8 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -597,7 +597,7 @@ void ScummEngine_v6::o6_pushWord() { } void ScummEngine_v6::o6_pushByteVar() { - push(readVar(fetchScriptWord())); + push(readVar(fetchScriptByte())); } void ScummEngine_v6::o6_pushWordVar() { diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index a7e5118a7e..2659f33990 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -167,8 +167,8 @@ void ScummEngine_v72he::setupOpcodes() { OPCODE(o6_startScriptQuick), /* 60 */ OPCODE(o72_startObject), - OPCODE(o6_drawObject), - OPCODE(o6_drawObjectAt), + OPCODE(o72_drawObject), + OPCODE(o72_unknown62), OPCODE(o72_unknown63), /* 64 */ OPCODE(o6_invalid), @@ -437,6 +437,51 @@ void ScummEngine_v72he::o72_startObject() { runObjectScript(script, entryp, (flags == 199 || flags == 200), (flags == 195 || flags == 200), args); } +void ScummEngine_v72he::o72_drawObject() { + int subOp = fetchScriptByte(); + int state = 0, y = -1, x = -1; + + switch (subOp) { + case 62: + state = pop(); + y = pop(); + x = pop(); + break; + case 63: + state = pop(); + if (state == 0) + state = 1; + break; + case 65: + state = 1; + y = pop(); + x = pop(); + default: + warning("o72_drawObject: default case %d", subOp); + } + + int object = pop(); + int objnum = getObjectIndex(object); + if (objnum == -1) + return; + + if (y != -1 && x != -1) { + _objs[objnum].x_pos = x * 8; + _objs[objnum].y_pos = y * 8; + } + + if (state != -1) { + addObjectToDrawQue(objnum); + putState(object, state); + } +} + +void ScummEngine_v72he::o72_unknown62() { + int a = pop(); + // unknown62(a, 0, 0, 4); + warning("o72_unknown62 stub (%d)", a); +} + void ScummEngine_v72he::o72_unknown63() { int a = fetchScriptByte(); warning("o72_unknown63 stub (%d)", a); @@ -559,45 +604,6 @@ void ScummEngine_v72he::o72_jumpToScript() { runScript(script, (flags == 199 || flags == 200), (flags == 195 || flags == 200), args); } -void ScummEngine_v72he::o72_drawObject() { - int subOp = fetchScriptByte(); - int state = 0, y = -1, x = -1; - - switch (subOp) { - case 62: - state = pop(); - y = pop(); - x = pop(); - break; - case 63: - state = pop(); - if (state == 0) - state = 1; - break; - case 65: - state = 1; - y = pop(); - x = pop(); - default: - warning("o72_drawObject: default case %d", subOp); - } - - int object = pop(); - int objnum = getObjectIndex(object); - if (objnum == -1) - return; - - if (y != -1 && x != -1) { - _objs[objnum].x_pos = x * 8; - _objs[objnum].y_pos = y * 8; - } - - if (state != -1) { - addObjectToDrawQue(objnum); - putState(object, state); - } -} - void ScummEngine_v72he::o72_stringLen() { int a, len; byte *addr; |