diff options
-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); +} |