[Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,2.75,2.76
Max Horn
fingolfin at users.sourceforge.net
Fri May 16 18:02:01 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv5962
Modified Files:
script_v2.cpp
Log Message:
disable assert in o2_putActor for now (is triggered in Zak intro); cleanup
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.75
retrieving revision 2.76
diff -u -d -r2.75 -r2.76
--- script_v2.cpp 16 May 2003 23:50:56 -0000 2.75
+++ script_v2.cpp 17 May 2003 01:01:05 -0000 2.76
@@ -403,8 +403,6 @@
}
*ptr = 0;
- printf("TODO: Scumm_v2::decodeParseString(\"%s\") from %d\n", buffer, vm.slot[_currentScript].number);
-
// For now, always use textSlot 0. Not sure if there are any situations where we might
// need to us another one?
int textSlot = 0;
@@ -928,14 +926,20 @@
}
void Scumm_v2::o2_putActor() {
+ int act = getVarOrDirectByte(0x80);
int x, y;
Actor *a;
- a = derefActorSafe(getVarOrDirectByte(0x80), "o2_putActor");
+ a = derefActorSafe(act, "o2_putActor");
x = getVarOrDirectByte(0x40) * 8;
y = getVarOrDirectByte(0x20) * 2;
- assert(a);
+ if (!a) {
+ // FIXME - this shouldn't be necessary but for now works around problems
+ // in the Zak intro.
+ warning("o2_putActor: actor %d not found", act);
+ return;
+ }
a->putActor(x, y, a->room);
}
@@ -945,8 +949,7 @@
}
void Scumm_v2::o2_panCameraTo() {
- panCameraTo(getVarOrDirectByte(0x80) * 8, 0); // FIXME: I'm pretty sure we actually pan
- // by strip, not X/Y, here. Hence *8
+ panCameraTo(getVarOrDirectByte(0x80) * 8, 0);
}
void Scumm_v2::o2_walkActorToObject() {
@@ -954,6 +957,7 @@
Actor *a;
a = derefActorSafe(getVarOrDirectByte(0x80), "o2_walkActorToObject");
+ assert(a);
obj = getVarOrDirectByte(0x40);
if (whereIsObject(obj) != WIO_NOT_FOUND) {
int x, y, dir;
More information about the Scummvm-git-logs
mailing list