diff options
author | Florian Kagerer | 2009-05-21 16:46:40 +0000 |
---|---|---|
committer | Florian Kagerer | 2009-05-21 16:46:40 +0000 |
commit | 6bd5dea027245d617687b7e4a4b76b52d84ce52d (patch) | |
tree | 763080d033fb4e8c4209742f907df481029e1b8d /engines/kyra/screen_lol.cpp | |
parent | 6e93825b2e4d512d082bc8748ee169a09a234a94 (diff) | |
download | scummvm-rg350-6bd5dea027245d617687b7e4a4b76b52d84ce52d.tar.gz scummvm-rg350-6bd5dea027245d617687b7e4a4b76b52d84ce52d.tar.bz2 scummvm-rg350-6bd5dea027245d617687b7e4a4b76b52d84ce52d.zip |
LOL: - implemented freeze spell
- fixed saveload code
- added some opcode for the swamp
svn-id: r40763
Diffstat (limited to 'engines/kyra/screen_lol.cpp')
-rw-r--r-- | engines/kyra/screen_lol.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp index edc95fd36a..2f7a938374 100644 --- a/engines/kyra/screen_lol.cpp +++ b/engines/kyra/screen_lol.cpp @@ -815,20 +815,20 @@ bool Screen_LoL::fadeColor(int dstColorIndex, int srcColorIndex, uint32 elapsedT return res; } -bool Screen_LoL::fadePalSpecial(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 targetTime) { +bool Screen_LoL::fadePaletteStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 targetTime) { uint8 tpal[768]; - uint8 *p1 = _palettes[1]; + uint8 *p1 = _palettes[0]; bool res = false; for (int i = 0; i < 768; i++) { uint8 out = 0; if (elapsedTime < targetTime) { - int d = (pal2[i] & 0x3f) - (pal1[i] & 0x3f); + int32 d = ((pal2[i] & 0x3f) - (pal1[i] & 0x3f)); if (d) res = true; - int val = ((((d << 8) / targetTime) * elapsedTime) >> 8) & 0xff; - out = ((pal1[i] & 0x3f) + val) & 0xff; + int32 val = ((((d << 8) / (int32)targetTime) * (int32)elapsedTime) >> 8); + out = ((pal1[i] & 0x3f) + (int8)val); } else { out = p1[i] = (pal2[i] & 0x3f); res = false; |