[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.12,1.13
James Brown
ender at users.sourceforge.net
Wed Oct 2 02:17:34 CEST 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv32414
Modified Files:
actor.cpp
Log Message:
Very very nasty hack to get the FT fuel-tower scene working correctly.
Someone -please- fix this properly :)
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- actor.cpp 24 Sep 2002 15:23:57 -0000 1.12
+++ actor.cpp 2 Oct 2002 09:14:59 -0000 1.13
@@ -1337,7 +1337,16 @@
}
akos = _vm->getResourceAddress(rtCostume, costume);
+ if (!akos) {
+ warning("Can't remap actor %d, costume %d not found", number, costume);
+ return;
+ }
+
akpl = findResource(MKID('AKPL'), akos);
+ if (!akpl) {
+ warning("Can't remap actor %d, costume %d doesn't contain an AKPL block", number, costume);
+ return;
+ }
//get num palette entries
akpl_size = RES_SIZE(akpl) - 8;
@@ -1353,6 +1362,17 @@
}
// skip resource header
rgbs = RES_DATA(rgbs);
+
+ // FIXME!!! - Ender's hack to workaround a crash in Full Throttle.
+ // After touching the ladder at the Fuel Tower, memory
+ // gets trashed when the police fly down to the tower.
+ // This seems to happen with an akpl 256 supposidly 256
+ // bytes long, but which in reality is less than 65 bytes?!?
+ // Someone -please- fix this properly.
+ if (akpl_size > 255) {
+ warning("Actor palette for actor %d/costume %d is %d bytes - too big!", number, costume, akpl_size);
+ return;
+ }
for (i = 0; i < akpl_size; i++) {
r = *rgbs++;
More information about the Scummvm-git-logs
mailing list