diff options
author | Max Horn | 2002-12-23 23:30:14 +0000 |
---|---|---|
committer | Max Horn | 2002-12-23 23:30:14 +0000 |
commit | 6585425c890bcb65beb399d6fe5d07b1257cb904 (patch) | |
tree | 149961523c5a5d06e6cc8848800bdf1660db7b7c /scumm | |
parent | 4c8c6ff84e31ce7b920bb60d4d79619fcc01d9c4 (diff) | |
download | scummvm-rg350-6585425c890bcb65beb399d6fe5d07b1257cb904.tar.gz scummvm-rg350-6585425c890bcb65beb399d6fe5d07b1257cb904.tar.bz2 scummvm-rg350-6585425c890bcb65beb399d6fe5d07b1257cb904.zip |
set NUM_ACTORS to 80 for COMI; get rid of MAX_ACTORS (use NUM_ACTORS instead); some updates
svn-id: r6086
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/actor.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v8.cpp | 16 | ||||
-rw-r--r-- | scumm/scumm.h | 3 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 6 |
4 files changed, 18 insertions, 9 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index e8dd5f8644..b0793ae0b2 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -848,7 +848,7 @@ void Scumm::playActorSounds() void Scumm::processActors() { int i; - Actor *actors[MAX_ACTORS], *a, **ac, **ac2, *tmp, **end; + Actor *actors[NUM_ACTORS], *a, **ac, **ac2, *tmp, **end; int numactors = 0; // Make a list of all actors in this room diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index 8db0bb7fbc..a63f9d687f 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -239,7 +239,7 @@ void Scumm_v8::setupOpcodes() OPCODE(o6_walkActorToObj), /* A0 */ OPCODE(o6_walkActorTo), - OPCODE(o6_putActorInRoom), + OPCODE(o6_putActorInRoom), // FIXME - this seems to be wrong? at least we get actor indices from 31 to 79 here... OPCODE(o6_putActorAtObject), OPCODE(o6_faceActor), /* A4 */ @@ -697,7 +697,9 @@ void Scumm_v8::o8_cursorCommand() case 0xE4: // SO_CURSOR_IMAGE Set cursor image { int room, obj = popRoomAndObj(&room); - setCursorImg(obj, room, 1); + // FIXME + printf("setCursorImg(%d, %d, 1)\n", obj, room); +// setCursorImg(obj, room, 1); } break; case 0xE5: // SO_CURSOR_HOTSPOT Set cursor hotspot @@ -832,6 +834,12 @@ void Scumm_v8::o8_actorOps() byte subOp = fetchScriptByte(); Actor *a; + if (subOp == 0x7A) { + _curActor = pop(); + printf("Setting current actor to %d\n", _curActor); + return; + } + a = derefActorSafe(_curActor, "o8_actorOps"); if (!a) return; @@ -898,8 +906,8 @@ void Scumm_v8::o8_verbOps() byte subOp = fetchScriptByte(); VerbSlot *vs = NULL; - if (0 <= _curVerbSlot && _curVerbSlot < _maxVerbs) {} - vs = &_verbs[_curVerbSlot]; + if (0 <= _curVerbSlot && _curVerbSlot < _maxVerbs) + vs = &_verbs[_curVerbSlot]; switch (subOp) { case 0x96: // SO_VERB_INIT Choose verb number for editing diff --git a/scumm/scumm.h b/scumm/scumm.h index b6976390d0..08cec56057 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -51,7 +51,6 @@ enum { NUM_SCRIPT_SLOT = 40, NUM_LOCALSCRIPT = 60, NUM_SHADOW_PALETTE = 8, - MAX_ACTORS = 30, KEY_SET_OPTIONS = 3456 // WinCE }; @@ -365,7 +364,7 @@ public: /* Core class/array definitions */ Gdi gdi; - Actor *_actors; // Has MAX_ACTORS elements + Actor *_actors; // Has NUM_ACTORS elements uint16 *_inventory; byte *_arrays; diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 05fd844f86..f782041223 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -227,7 +227,7 @@ void Scumm::scummInit() setupCursor(); /* Allocate and initilise actors */ - _actors = new Actor[MAX_ACTORS]; + _actors = new Actor[NUM_ACTORS]; for (i = 1, a = getFirstActor(); ++a, i < NUM_ACTORS; i++) { a->number = i; a->initActorClass(this); @@ -1533,7 +1533,9 @@ void Scumm::launch() setupScummVars(); - if ((_features & GF_AFTER_V7) || (_gameId == GID_SAMNMAX)) + if (_features & GF_AFTER_V8) + NUM_ACTORS = 80; + else if ((_features & GF_AFTER_V7) || (_gameId == GID_SAMNMAX)) NUM_ACTORS = 30; else NUM_ACTORS = 13; |