aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-05-09 20:17:30 +0000
committerJohannes Schickel2010-05-09 20:17:30 +0000
commit0ace80fed4f2e6e3b03fce73fa14dc82ae3d4574 (patch)
tree8088811fe2cc50b9c183c80cc97013d956413a7b
parent57f2425b28575a06ae483b57afe316dd80c46323 (diff)
downloadscummvm-rg350-0ace80fed4f2e6e3b03fce73fa14dc82ae3d4574.tar.gz
scummvm-rg350-0ace80fed4f2e6e3b03fce73fa14dc82ae3d4574.tar.bz2
scummvm-rg350-0ace80fed4f2e6e3b03fce73fa14dc82ae3d4574.zip
Fix for bug #2995282 "FT: Cavefish Hideout Chase (Failure Cutscene) Crash".
The bug itself is actually a regression from r43577, the merge of the gsoc2009-16bit branch. svn-id: r48987
-rw-r--r--engines/scumm/akos.cpp6
-rw-r--r--engines/scumm/bomp.cpp4
-rw-r--r--engines/scumm/bomp.h2
3 files changed, 4 insertions, 8 deletions
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
index 403fe72ba6..d5d6b6182b 100644
--- a/engines/scumm/akos.cpp
+++ b/engines/scumm/akos.cpp
@@ -1065,11 +1065,7 @@ byte AkosRenderer::codec5(int xmoveCur, int ymoveCur) {
bdd.shadowMode = _shadow_mode;
bdd.shadowPalette = _vm->_shadowPalette;
- bdd.actorPalette = 0;
- if (_useBompPalette) {
- for (uint i = 0; i < 256; i++)
- bdd.actorPalette[i] = _palette[i];
- }
+ bdd.actorPalette = _useBompPalette ? _palette : 0;
bdd.mirror = !_mirror;
diff --git a/engines/scumm/bomp.cpp b/engines/scumm/bomp.cpp
index ddb6264ccc..18db89be1f 100644
--- a/engines/scumm/bomp.cpp
+++ b/engines/scumm/bomp.cpp
@@ -38,7 +38,7 @@ static void bompScaleFuncX(byte *line_buffer, byte *scaling_x_ptr, byte skip, in
static void bompApplyShadow0(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency, bool HE7Check);
static void bompApplyShadow1(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency);
static void bompApplyShadow3(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency);
-static void bompApplyActorPalette(byte *actorPalette, byte *line_buffer, int32 size);
+static void bompApplyActorPalette(uint16 *actorPalette, byte *line_buffer, int32 size);
@@ -172,7 +172,7 @@ void bompApplyShadow3(const byte *shadowPalette, const byte *line_buffer, byte *
}
}
-void bompApplyActorPalette(byte *actorPalette, byte *line_buffer, int32 size) {
+void bompApplyActorPalette(uint16 *actorPalette, byte *line_buffer, int32 size) {
actorPalette[255] = 255;
while (size-- > 0) {
*line_buffer = actorPalette[*line_buffer];
diff --git a/engines/scumm/bomp.h b/engines/scumm/bomp.h
index 0d76c370db..8f64b54f7c 100644
--- a/engines/scumm/bomp.h
+++ b/engines/scumm/bomp.h
@@ -54,7 +54,7 @@ struct BompDrawData {
uint16 shadowMode;
byte *shadowPalette;
- byte *actorPalette;
+ uint16 *actorPalette;
bool mirror;
};