aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorJames Brown2002-10-02 09:14:59 +0000
committerJames Brown2002-10-02 09:14:59 +0000
commit39a5160985555adda2364ced1cb02cc2dc95965a (patch)
tree732f1adc47765ac3f4876cb1d76d956a38f33c19 /scumm
parente10366ec3d1f02a40d70d8ed6da2224b89e42c05 (diff)
downloadscummvm-rg350-39a5160985555adda2364ced1cb02cc2dc95965a.tar.gz
scummvm-rg350-39a5160985555adda2364ced1cb02cc2dc95965a.tar.bz2
scummvm-rg350-39a5160985555adda2364ced1cb02cc2dc95965a.zip
Very very nasty hack to get the FT fuel-tower scene working correctly.
Someone -please- fix this properly :) svn-id: r5071
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 7ec823e3dc..eb03393b0f 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1337,7 +1337,16 @@ void Actor::remapActorPalette(int r_fact, int g_fact, int b_fact, int threshold)
}
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;
@@ -1354,6 +1363,17 @@ void Actor::remapActorPalette(int r_fact, int g_fact, int b_fact, int threshold)
// 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++;
g = *rgbs++;