diff options
author | Travis Howell | 2006-05-05 05:53:36 +0000 |
---|---|---|
committer | Travis Howell | 2006-05-05 05:53:36 +0000 |
commit | 54eeb8aeed1d7d8d5fcf89f59efe3810bd7654bb (patch) | |
tree | d9f175b469ff036dfb1a7c3e29f63ce03781fc59 /engines/simon/items.cpp | |
parent | eed7d3e41333fc5da292264b5dda150eaea40e4a (diff) | |
download | scummvm-rg350-54eeb8aeed1d7d8d5fcf89f59efe3810bd7654bb.tar.gz scummvm-rg350-54eeb8aeed1d7d8d5fcf89f59efe3810bd7654bb.tar.bz2 scummvm-rg350-54eeb8aeed1d7d8d5fcf89f59efe3810bd7654bb.zip |
Match fade code of original games and minor cleanup
svn-id: r22359
Diffstat (limited to 'engines/simon/items.cpp')
-rw-r--r-- | engines/simon/items.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/engines/simon/items.cpp b/engines/simon/items.cpp index c8e2292d7a..700546c6a4 100644 --- a/engines/simon/items.cpp +++ b/engines/simon/items.cpp @@ -1622,20 +1622,18 @@ void SimonEngine::o1_specialFade() { // 187: fade to black uint i; - memcpy(_videoBuf1, _paletteBackup, 1024); - - i = NUM_PALETTE_FADEOUT; - do { - paletteFadeOut((uint32 *)_videoBuf1, 32); - paletteFadeOut((uint32 *)_videoBuf1 + 32 + 16, 144); - paletteFadeOut((uint32 *)_videoBuf1 + 32 + 16 + 144 + 16, 48); + memcpy(_videoBuf1, _currentPalette, 1024); + for (i = 32; i != 0; --i) { + paletteFadeOut(_videoBuf1, 32, 4); + paletteFadeOut(_videoBuf1 + 64, 144, 4); + paletteFadeOut(_videoBuf1 + 128, 48, 4); _system->setPalette(_videoBuf1, 0, 256); delay(5); - } while (--i); + } - memcpy(_paletteBackup, _videoBuf1, 1024); - memcpy(_palette, _videoBuf1, 1024); + memcpy(_currentPalette, _videoBuf1, 1024); + memcpy(_displayPalette, _videoBuf1, 1024); } // ----------------------------------------------------------------------- @@ -2132,9 +2130,9 @@ void SimonEngine::o3_setColour() { uint g = getVarOrByte(); uint b = getVarOrByte(); - _palette[c + 0] = r; - _palette[c + 1] = g; - _palette[c + 2] = b; + _displayPalette[c + 0] = r; + _displayPalette[c + 1] = g; + _displayPalette[c + 2] = b; _paletteFlag = 2; } |