aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/sound.h2
-rw-r--r--engines/parallaction/sound_ns.cpp9
2 files changed, 8 insertions, 3 deletions
diff --git a/engines/parallaction/sound.h b/engines/parallaction/sound.h
index 985ed77ccc..01eebfcc2d 100644
--- a/engines/parallaction/sound.h
+++ b/engines/parallaction/sound.h
@@ -136,7 +136,9 @@ class DosSoundMan_ns : public SoundMan_ns {
int _musicData1;
bool isLocationSilent(const char *locationName);
+ bool locationHasOwnSoftMusic(const char *locationName);
+
public:
DosSoundMan_ns(Parallaction_ns *vm, MidiDriver *midiDriver);
~DosSoundMan_ns();
diff --git a/engines/parallaction/sound_ns.cpp b/engines/parallaction/sound_ns.cpp
index 3c1858b062..431d2a1f4c 100644
--- a/engines/parallaction/sound_ns.cpp
+++ b/engines/parallaction/sound_ns.cpp
@@ -284,13 +284,16 @@ void DosSoundMan_ns::pause(bool p) {
_midiPlayer->pause(p);
}
+bool DosSoundMan_ns::locationHasOwnSoftMusic(const char *locationName) {
+ return !scumm_stricmp(locationName, "night") || !scumm_stricmp(locationName, "intsushi");
+}
+
void DosSoundMan_ns::playCharacterMusic(const char *character) {
if (character == NULL) {
return;
}
- if (!scumm_stricmp(_vm->_location._name, "night") ||
- !scumm_stricmp(_vm->_location._name, "intsushi")) {
+ if (locationHasOwnSoftMusic(_vm->_location._name)) {
return;
}
@@ -319,7 +322,7 @@ void DosSoundMan_ns::playLocationMusic(const char *location) {
debugC(2, kDebugExec, "changeLocation: started character specific music");
}
- if (!scumm_stricmp(location, "night") || !scumm_stricmp(location, "intsushi")) {
+ if (locationHasOwnSoftMusic(location)) {
setMusicFile("soft");
playMusic();