diff options
author | Travis Howell | 2006-05-07 00:32:00 +0000 |
---|---|---|
committer | Travis Howell | 2006-05-07 00:32:00 +0000 |
commit | 58cd5ec5d5fb49d8ce12def6fd73802eda00e3c1 (patch) | |
tree | 4de8d68a2b427ede1623f6a35af7731e9d16138f /engines | |
parent | 3e0cb0dfd0821a8ff9881e5fe572c8a893fd04cc (diff) | |
download | scummvm-rg350-58cd5ec5d5fb49d8ce12def6fd73802eda00e3c1.tar.gz scummvm-rg350-58cd5ec5d5fb49d8ce12def6fd73802eda00e3c1.tar.bz2 scummvm-rg350-58cd5ec5d5fb49d8ce12def6fd73802eda00e3c1.zip |
Fix slowFadeIn, the code of original Windows version was flawed
svn-id: r22372
Diffstat (limited to 'engines')
-rw-r--r-- | engines/simon/draw.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/engines/simon/draw.cpp b/engines/simon/draw.cpp index 7ab3f22cbf..4e3837f696 100644 --- a/engines/simon/draw.cpp +++ b/engines/simon/draw.cpp @@ -467,20 +467,23 @@ void SimonEngine::slowFadeIn() { _fastFadeInFlag &= 0x7fff; _paletteFlag = false; - memset(_videoBuf1, 0, 768); - memcpy(_currentPalette, _displayPalette, 768); - memcpy(_videoBuf1 + 768, _displayPalette, 768); + memset(_videoBuf1, 0, 1024); + memcpy(_currentPalette, _displayPalette, 1024); + memcpy(_videoBuf1 + 1024, _displayPalette, 1024); for (c = 255; c >= 0; c -= 4) { - src = _videoBuf1 + 768; + src = _videoBuf1 + 1024; dst = _videoBuf1; - for (p = _fastFadeInFlag; p !=0 ; p--) { - if (*src >= c) - *dst = *dst + 4; - - src++; - dst++; + for (p = _fastFadeInFlag; p !=0 ; p -= 3) { + if (src[0] >= c) + dst[0] += 4; + if (src[1] >= c) + dst[1] += 4; + if (src[2] >= c) + dst[2] += 4; + src += 4; + dst += 4; } _system->setPalette(_videoBuf1, 0, _fastFadeCount); delay(5); |