[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.40,1.41 script_v8.cpp,2.19,2.20 scumm.h,1.94,1.95 scummvm.cpp,2.3,2.4
Max Horn
fingolfin at users.sourceforge.net
Mon Dec 23 15:31:08 CET 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv4405
Modified Files:
actor.cpp script_v8.cpp scumm.h scummvm.cpp
Log Message:
set NUM_ACTORS to 80 for COMI; get rid of MAX_ACTORS (use NUM_ACTORS instead); some updates
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- actor.cpp 23 Dec 2002 18:30:11 -0000 1.40
+++ actor.cpp 23 Dec 2002 23:30:13 -0000 1.41
@@ -848,7 +848,7 @@
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
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.19
retrieving revision 2.20
diff -u -d -r2.19 -r2.20
--- script_v8.cpp 23 Dec 2002 22:13:06 -0000 2.19
+++ script_v8.cpp 23 Dec 2002 23:30:14 -0000 2.20
@@ -239,7 +239,7 @@
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 @@
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 @@
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 @@
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
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- scumm.h 23 Dec 2002 19:03:08 -0000 1.94
+++ scumm.h 23 Dec 2002 23:30:14 -0000 1.95
@@ -51,7 +51,6 @@
NUM_SCRIPT_SLOT = 40,
NUM_LOCALSCRIPT = 60,
NUM_SHADOW_PALETTE = 8,
- MAX_ACTORS = 30,
KEY_SET_OPTIONS = 3456 // WinCE
};
@@ -365,7 +364,7 @@
/* Core class/array definitions */
Gdi gdi;
- Actor *_actors; // Has MAX_ACTORS elements
+ Actor *_actors; // Has NUM_ACTORS elements
uint16 *_inventory;
byte *_arrays;
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.3
retrieving revision 2.4
diff -u -d -r2.3 -r2.4
--- scummvm.cpp 23 Dec 2002 17:20:28 -0000 2.3
+++ scummvm.cpp 23 Dec 2002 23:30:14 -0000 2.4
@@ -227,7 +227,7 @@
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 @@
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;
More information about the Scummvm-git-logs
mailing list