aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2007-02-08 08:39:33 +0000
committerJohannes Schickel2007-02-08 08:39:33 +0000
commitaa38257840579adbef694a454769e4d4a7a85fc6 (patch)
tree5e80645658bbb392f4658fedd3e31d016e54e470 /engines
parent6854f25740df9d460d2c412c78657f9b7058f000 (diff)
downloadscummvm-rg350-aa38257840579adbef694a454769e4d4a7a85fc6.tar.gz
scummvm-rg350-aa38257840579adbef694a454769e4d4a7a85fc6.tar.bz2
scummvm-rg350-aa38257840579adbef694a454769e4d4a7a85fc6.zip
- fixed crash in FM-Towns version when entering the grotto
- fixed some palette issues svn-id: r25423
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/script_v1.cpp7
-rw-r--r--engines/kyra/sound.cpp4
2 files changed, 4 insertions, 7 deletions
diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp
index ea7dc77651..0551d2aab2 100644
--- a/engines/kyra/script_v1.cpp
+++ b/engines/kyra/script_v1.cpp
@@ -622,9 +622,7 @@ int KyraEngine::o1_restoreAllObjectBackgrounds(ScriptState *script) {
int KyraEngine::o1_setCustomPaletteRange(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "o1_setCustomPaletteRange(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2));
- uint8 *screenPal = _screen->_currentPalette;
- memcpy(&screenPal[stackPos(1)*3], _specialPalettes[stackPos(0)], stackPos(2)*3);
- _screen->setScreenPalette(screenPal);
+ memcpy(_screen->getPalette(1) + stackPos(1)*3, _specialPalettes[stackPos(0)], stackPos(2)*3);
return 0;
}
@@ -1265,8 +1263,7 @@ int KyraEngine::o1_setFireberryGlowPalette(ScriptState *script) {
}
}
const uint8 *palette = _specialPalettes[palIndex];
- memcpy(&_screen->_currentPalette[684], palette, 44);
- _screen->setScreenPalette(_screen->_currentPalette);
+ memcpy(_screen->getPalette(1) + 684, palette, 44);
return 0;
}
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index d323e4ce49..e2e04142b8 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -55,7 +55,7 @@ void Sound::voicePlay(const char *file) {
_compressHandle.close();
_engine->resource()->getFileHandle(filenamebuffer, &fileSize, _compressHandle);
- if (!_compressHandle.isOpen())
+ if (!_compressHandle.isOpen())
continue;
_currentVocFile = _supportedCodes[i].streamFunc(&_compressHandle, fileSize);
@@ -454,7 +454,7 @@ void KyraEngine::snd_playSoundEffect(int track) {
if (track == 49) {
snd_playWanderScoreViaMap(56, 1);
return;
- } else if (track == 10) {
+ } else if (track == 0 || track == 1 || track == 10) {
// I don't know what's supposed to happen here, but calling playSoundEffect will lead to crash
return;
}