more V8 opcodes (mostly rerouting to V6 ones)

svn-id: r6088
This commit is contained in:
Max Horn 2002-12-24 00:41:59 +00:00
parent fcb708e165
commit 2da14e0fa1
3 changed files with 35 additions and 23 deletions

View File

@ -361,7 +361,7 @@ protected:
void o6_kernelFunction();
void o6_getAnimateVariable();
void o6_drawBlastObject();
void o6_getActorPriority();
void o6_getActorLayer();
void o6_unknownCD();
void o6_bor();
void o6_band();

View File

@ -337,7 +337,7 @@ void Scumm_v6::setupOpcodes()
OPCODE(o6_invalid),
OPCODE(o6_invalid),
/* EC */
OPCODE(o6_getActorPriority),
OPCODE(o6_getActorLayer),
OPCODE(o6_getObjectNewDir),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
@ -1223,7 +1223,11 @@ void Scumm_v6::o6_getRandomNumberRange()
void Scumm_v6::o6_getActorMoving()
{
push(derefActorSafe(pop(), "o6_getActorMoving")->moving);
Actor *a = derefActorSafe(pop(), "o6_getActorMoving");
if (a)
push(a->moving);
else
push(0);
}
void Scumm_v6::o6_isScriptRunning()
@ -1238,7 +1242,11 @@ void Scumm_v6::o6_isRoomScriptRunning()
void Scumm_v6::o6_getActorRoom()
{
push(derefActorSafe(pop(), "o6_getActorRoom")->room);
Actor *a = derefActorSafe(pop(), "o6_getActorRoom");
if (a)
push(a->room);
else
push(0);
}
void Scumm_v6::o6_getObjectX()
@ -2875,11 +2883,11 @@ void Scumm_v6::o6_pickOneOfDefault()
push(i);
}
void Scumm_v6::o6_getActorPriority()
void Scumm_v6::o6_getActorLayer()
{
Actor *a;
a = derefActorSafe(pop(), "getActorPriority");
a = derefActorSafe(pop(), "getActorLayer");
push(a->layer);
}

View File

@ -291,8 +291,8 @@ void Scumm_v8::setupOpcodes()
/* C8 */
OPCODE(o6_startScript),
OPCODE(o6_startObject),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_pickOneOf),
OPCODE(o6_pickOneOfDefault),
/* CC */
OPCODE(o6_invalid),
OPCODE(o6_isAnyOf),
@ -317,27 +317,27 @@ void Scumm_v8::setupOpcodes()
OPCODE(o6_findObject),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_findInventory),
/* E0 */
OPCODE(o6_getInventoryCount),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_getActorRoom),
OPCODE(o6_getActorWalkBox),
/* E4 */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_getActorMoving),
OPCODE(o6_getActorCostume),
OPCODE(o6_getActorScaleX),
OPCODE(o6_getActorLayer),
/* E8 */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_getActorElevation),
OPCODE(o6_getActorWidth),
OPCODE(o6_getObjectNewDir), // FIXME: is this right?
OPCODE(o6_getObjectX),
/* EC */
OPCODE(o6_getObjectY),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_distObjectObject),
OPCODE(o6_distPtPt),
/* F0 */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
@ -1004,7 +1004,11 @@ void Scumm_v8::o8_cameraOps()
byte subOp = fetchScriptByte();
switch (subOp) {
case 0x32: // SO_CAMERA_PAUSE
warning("freezeCamera NYI");
break;
case 0x33: // SO_CAMERA_RESUME
warning("unfreezeCamera NYI");
break;
default:
error("o8_cameraOps: default case %d", subOp);
}