aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorJohannes Schickel2011-02-19 19:57:19 +0100
committerJohannes Schickel2011-02-19 19:57:19 +0100
commit1606ff1d4eee88b9616cf849fce54e172cb4a8ba (patch)
tree0fa51f24d23fb6ab316529a0f740cf3cf5c7d749 /engines/saga
parent55a6e5af760aa365ecd74564a9a5ec94cbf4f873 (diff)
downloadscummvm-rg350-1606ff1d4eee88b9616cf849fce54e172cb4a8ba.tar.gz
scummvm-rg350-1606ff1d4eee88b9616cf849fce54e172cb4a8ba.tar.bz2
scummvm-rg350-1606ff1d4eee88b9616cf849fce54e172cb4a8ba.zip
SAGA: Convert Gfx::palFade to the setPalette RGBA->RGB change too.
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/gfx.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/saga/gfx.cpp b/engines/saga/gfx.cpp
index 6b484af1e7..c46da4cd4e 100644
--- a/engines/saga/gfx.cpp
+++ b/engines/saga/gfx.cpp
@@ -413,10 +413,10 @@ void Gfx::palFade(PalEntry *srcPal, int16 from, int16 to, int16 start, int16 num
if (from > to)
percent = 1.0 - percent;
- byte fadePal[PAL_ENTRIES * 4];
+ byte fadePal[PAL_ENTRIES * 3];
// Use the correct percentage change per frame for each palette entry
- for (i = start, ppal = fadePal + start * 4; i < start + numColors; i++, ppal += 4) {
+ for (i = start, ppal = fadePal + start * 3; i < start + numColors; i++, ppal += 3) {
palE = &srcPal[i];
new_entry = (int)(palE->red * percent);
@@ -442,13 +442,12 @@ void Gfx::palFade(PalEntry *srcPal, int16 from, int16 to, int16 start, int16 num
} else {
ppal[2] = (byte) new_entry;
}
- ppal[3] = 0;
}
// Color 0 should always be black in IHNM
- memset(&fadePal[0 * 4], 0, 4);
+ memset(&fadePal[0 * 3], 0, 3);
- _system->getPaletteManager()->setPalette(&fadePal[start * 4], start, numColors);
+ _system->getPaletteManager()->setPalette(&fadePal[start * 3], start, numColors);
}
#endif