aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFlorian Kagerer2009-10-18 17:28:00 +0000
committerFlorian Kagerer2009-10-18 17:28:00 +0000
commit237b66becad31decb5230389ac91459f19db7545 (patch)
treed45ea5a66560a655cebd762b446176982ccdb7bf /engines
parente392f939b6c8025c33c37b489d161286db250100 (diff)
downloadscummvm-rg350-237b66becad31decb5230389ac91459f19db7545.tar.gz
scummvm-rg350-237b66becad31decb5230389ac91459f19db7545.tar.bz2
scummvm-rg350-237b66becad31decb5230389ac91459f19db7545.zip
LOL: - added some updateInputs to spell animation code
- improved sfx volume code svn-id: r45227
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/lol.cpp8
-rw-r--r--engines/kyra/sound_lol.cpp10
2 files changed, 8 insertions, 10 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index d947346c4d..e356187007 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -3216,18 +3216,20 @@ void LoLEngine::playSpellAnimation(WSAMovie_v2 *mov, int firstFrame, int lastFra
if (del) {
delay(step);
del -= step;
+ } else {
+ updateInput();
}
continue;
}
- if (!_screen->fadePaletteStep(pal1, pal2, _system->getMillis() - startTime, _tickLength * fadeDelay) && !mov) {
- updateInput();
+ if (!_screen->fadePaletteStep(pal1, pal2, _system->getMillis() - startTime, _tickLength * fadeDelay) && !mov)
return;
- }
if (del) {
delay(step);
del -= step;
+ } else {
+ updateInput();
}
} while (del);
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp
index 52fb9eeb43..41a3936172 100644
--- a/engines/kyra/sound_lol.cpp
+++ b/engines/kyra/sound_lol.cpp
@@ -167,15 +167,11 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) {
if (track == -1)
return;
+ volume &= 0xff;
int16 volIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2 + 1]);
- if (volIndex > 0)
- volume = (volIndex * volume) >> 8;
- else if (volIndex < 0)
- volume = -volIndex;
-
- // volume TODO
- volume = 254 - volume;
+ volume = (volIndex > 0) ? (volIndex * volume) >> 8 : -volIndex;
+ volume = CLIP(volume >> 4, 2, 13) * 7 + 164;
int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]);