diff options
author | James Brown | 2003-01-27 06:51:26 +0000 |
---|---|---|
committer | James Brown | 2003-01-27 06:51:26 +0000 |
commit | 7a4f4636ee0a4e8c57ece660d93464df5d055db0 (patch) | |
tree | 8337654b20e72b41b9cf6ae64d30dacd01f413e2 | |
parent | aa9f5ac10e28c2e6f32c5155a9219b2bb992072d (diff) | |
download | scummvm-rg350-7a4f4636ee0a4e8c57ece660d93464df5d055db0.tar.gz scummvm-rg350-7a4f4636ee0a4e8c57ece660d93464df5d055db0.tar.bz2 scummvm-rg350-7a4f4636ee0a4e8c57ece660d93464df5d055db0.zip |
Theoretically implement O_DRAW_OBJECT - although it doesn't seem to work
svn-id: r6560
-rw-r--r-- | scumm/intern.h | 1 | ||||
-rw-r--r-- | scumm/script_v8.cpp | 27 |
2 files changed, 27 insertions, 1 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 8bd4b05a92..f3e6f150bc 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -432,6 +432,7 @@ protected: void o8_getActorChore(); + void o8_drawObject(); void o8_getObjectImageX(); void o8_getObjectImageY(); void o8_getObjectImageWidth(); diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index ce30b23b7d..7185ded37a 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -229,7 +229,7 @@ void Scumm_v8::setupOpcodes() OPCODE(o6_printSystem), OPCODE(o8_blastText), /* 98 */ - OPCODE(o6_isSoundRunning), // FIXME should be O_DRAW_OBJECT + OPCODE(o8_drawObject), OPCODE(o6_invalid), OPCODE(o6_invalid), OPCODE(o6_invalid), @@ -1731,3 +1731,28 @@ void Scumm_v8::o8_getStringWidth() push(width); _scriptPointer += len + 1; } + +void Scumm_v8::o8_drawObject() +{ + int state = pop(), y = pop(), x = pop(), objnum = getObjectIndex(pop()); + ObjectData *od; + + if (!objnum) + return; + + od = &_objs[objnum]; + if (x != 0x7FFFFFFF) { + od->x_pos = x; + od->y_pos = y; + printf("setting position: 0x%X b 0x%X\n", x, y); + } + + addObjectToDrawQue(objnum); + + if (state == 255 || state == 254) + warning("o8_drawObject(%d, %d, %d, %d): extended attributes unimplemented", x, y, objnum, state); + else + warning("o8_drawObject(%d, %d, %d, %d)", x, y, objnum, state); + + putState(objnum, state); +} |