Fixed regressions in kyra1 amiga.

svn-id: r33522
This commit is contained in:
Johannes Schickel 2008-08-02 14:32:05 +00:00
parent 0cbaaf736b
commit a023dba941
2 changed files with 8 additions and 4 deletions

View file

@ -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);

View file

@ -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() {