diff options
author | Johannes Schickel | 2008-08-02 14:32:05 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-08-02 14:32:05 +0000 |
commit | a023dba94147aaaeacf72c2f80ac00e09fe723fb (patch) | |
tree | 63778ed0ad1d29ed788781b4eadbd4eea8bb98a6 /engines | |
parent | 0cbaaf736b44c758422ede4c2a09adec5b1b24bb (diff) | |
download | scummvm-rg350-a023dba94147aaaeacf72c2f80ac00e09fe723fb.tar.gz scummvm-rg350-a023dba94147aaaeacf72c2f80ac00e09fe723fb.tar.bz2 scummvm-rg350-a023dba94147aaaeacf72c2f80ac00e09fe723fb.zip |
Fixed regressions in kyra1 amiga.
svn-id: r33522
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/screen.cpp | 9 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 74f7bc6de9..0cde066cc0 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -413,7 +413,9 @@ void Screen::fadePalette(const uint8 *palData, int delay, const UpdateFunctor *u void Screen::getFadeParams(const uint8 *palette, int delay, int &delayInc, int &diff) { debugC(9, kDebugLevelScreen, "Screen::getFadeParams(%p, %d, %p, %p)", (const void *)palette, delay, (const void *)&delayInc, (const void *)&diff); uint8 maxDiff = 0; - for (int i = 0; i < 768; ++i) { + + const int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : 256) * 3; + for (int i = 0; i < colors; ++i) { diff = ABS(palette[i] - _screenPalette[i]); maxDiff = MAX<uint8>(maxDiff, diff); } @@ -438,7 +440,8 @@ int Screen::fadePalStep(const uint8 *palette, int diff) { memcpy(fadePal, _screenPalette, 768); bool needRefresh = false; - for (int i = 0; i < 768; ++i) { + const int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : 256) * 3; + for (int i = 0; i < colors; ++i) { int c1 = palette[i]; int c2 = fadePal[i]; if (c1 != c2) { @@ -476,7 +479,7 @@ void Screen::setPaletteIndex(uint8 index, uint8 red, uint8 green, uint8 blue) { void Screen::setScreenPalette(const uint8 *palData) { debugC(9, kDebugLevelScreen, "Screen::setScreenPalette(%p)", (const void *)palData); - int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : 256); + const int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : 256); if (palData != _screenPalette) memcpy(_screenPalette, palData, colors*3); diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 9a4b40902e..38d8d4d284 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -1068,7 +1068,8 @@ void KyraEngine_LoK::initStaticResource() { _soundData = soundData_TOWNS; else if (_flags.platform == Common::kPlatformPC98) _soundData = soundData_TOWNS/*soundData_PC98*/; - + else + _soundData = 0; } void KyraEngine_LoK::loadMouseShapes() { |