aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/script_v2.cpp2
-rw-r--r--engines/kyra/sound.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp
index 8bd4bb9df7..1a381978f2 100644
--- a/engines/kyra/script_v2.cpp
+++ b/engines/kyra/script_v2.cpp
@@ -458,7 +458,7 @@ int KyraEngine_v2::o2_checkForItem(ScriptState *script) {
int KyraEngine_v2::o2_loadSoundFile(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_loadSoundFile(%p) (%d)", (const void *)script, stackPos(0));
- if (_sound->hasTrack(stackPos(0)))
+ if (_sound->hasSoundFile(stackPos(0)))
snd_playTheme(stackPos(0));
return 0;
}
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index abbffe16d2..0c40dec323 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -110,7 +110,7 @@ public:
* @param track track number
* @return true if available, false otherwise
*/
- virtual bool hasTrack(uint file) { return (fileListEntry(file) != 0); }
+ virtual bool hasSoundFile(uint file) { return (fileListEntry(file) != 0); }
/**
* Load a specifc sound file for use of
@@ -460,6 +460,7 @@ public:
void updateVolumeSettings() { _music->updateVolumeSettings(); _sfx->updateVolumeSettings(); }
void setSoundList(const AudioDataStruct * list) { _music->setSoundList(list); _sfx->setSoundList(list); }
+ bool hasSoundFile(uint file) const { return _music->hasSoundFile(file) && _sfx->hasSoundFile(file); }
void loadSoundFile(uint file) { _music->loadSoundFile(file); _sfx->loadSoundFile(file); }
void playTrack(uint8 track) { _music->playTrack(track); }