diff --git a/script_v1.cpp b/script_v1.cpp index 422083291e8..2cf216077a7 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -144,7 +144,7 @@ void Scumm::setupOpcodes() &Scumm::o5_divide, /* 5C */ &Scumm::o5_oldRoomEffect, - &Scumm::o5_actorSetClass, + &Scumm::o5_setClass, &Scumm::o5_walkActorTo, &Scumm::o5_isActorInBox, /* 60 */ @@ -304,7 +304,7 @@ void Scumm::setupOpcodes() &Scumm::o5_divide, /* DC */ &Scumm::o5_oldRoomEffect, - &Scumm::o5_actorSetClass, + &Scumm::o5_setClass, &Scumm::o5_walkActorTo, &Scumm::o5_isActorInBox, /* E0 */ @@ -467,7 +467,7 @@ void Scumm::setupOpcodes() "o5_divide", /* 5C */ "o5_oldRoomEffect", - "o5_actorSetClass", + "o5_setClass", "o5_walkActorTo", "o5_isActorInBox", /* 60 */ @@ -627,7 +627,7 @@ void Scumm::setupOpcodes() "o5_divide", /* DC */ "o5_oldRoomEffect", - "o5_actorSetClass", + "o5_setClass", "o5_walkActorTo", "o5_isActorInBox", /* E0 */ @@ -833,33 +833,27 @@ void Scumm::o5_actorSet() } } -void Scumm::o5_actorSetClass() +void Scumm::o5_setClass() { - int act = getVarOrDirectWord(0x80); + int obj = getVarOrDirectWord(0x80); int newClass; while ((_opcode = fetchScriptByte()) != 0xFF) { newClass = getVarOrDirectWord(0x80); if (newClass == 0) { - _classData[act] = 0; - if ((_features & GF_SMALL_HEADER) && act <= NUM_ACTORS) { + _classData[obj] = 0; + if ((_features & GF_SMALL_HEADER) && obj <= NUM_ACTORS) { Actor *a; - a = derefActorSafe(act, "actorSetClass"); + a = derefActorSafe(obj, "setClass"); a->forceClip = 0; } continue; } - if (_gameId == GID_INDY3_256) - newClass--; - - if (newClass & 0x80) - putClass(act, newClass, 1); - else - putClass(act, newClass, 0); + putClass(obj, newClass, (newClass & 0x80)); } } diff --git a/scumm.h b/scumm.h index 40c5ee0350f..9746f81fc5e 100644 --- a/scumm.h +++ b/scumm.h @@ -1267,7 +1267,6 @@ public: void o5_actorFollowCamera(); void o5_actorFromPos(); void o5_actorSet(); - void o5_actorSetClass(); void o5_add(); void o5_and(); void o5_animateActor(); @@ -1344,6 +1343,7 @@ public: void o5_roomOps(); void o5_saveRestoreVerbs(); void o5_setCameraAt(); + void o5_setClass(); void o5_setObjectName(); void o5_setOwnerOf(); void o5_setState();