aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2006-10-22 16:04:14 +0000
committerMax Horn2006-10-22 16:04:14 +0000
commitb635a2fb842ab4d5d9a048dfe52b731469e0c28d (patch)
tree8bfb283bf94e430e603001688da0b37d488a7891
parent23ed856a38f20732c4b04ffd4bf2f42bb696d18f (diff)
downloadscummvm-rg350-b635a2fb842ab4d5d9a048dfe52b731469e0c28d.tar.gz
scummvm-rg350-b635a2fb842ab4d5d9a048dfe52b731469e0c28d.tar.bz2
scummvm-rg350-b635a2fb842ab4d5d9a048dfe52b731469e0c28d.zip
Only instantiate ProtrackerPlayer if it is actually needed
svn-id: r24445
-rw-r--r--engines/agos/agos.cpp8
-rw-r--r--engines/agos/res_snd.cpp1
2 files changed, 7 insertions, 2 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index e9d748458b..d85819ba56 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -524,10 +524,14 @@ int AGOSEngine::init() {
setupGame();
_debugger = new Debugger(this);
- _modPlayer = new Modules::ProtrackerPlayer();
_sound = new Sound(this, gss, _mixer);
- _modPlayer->init(_system);
+ if (getPlatform() == Common::kPlatformAmiga) {
+ _modPlayer = new Modules::ProtrackerPlayer();
+ _modPlayer->init(_system);
+ } else {
+ _modPlayer = 0;
+ }
_moviePlay = new MoviePlayer(this, _mixer);
if (ConfMan.hasKey("sfx_mute") && ConfMan.getBool("sfx_mute") == 1) {
diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp
index 37b34c2269..56d88351f0 100644
--- a/engines/agos/res_snd.cpp
+++ b/engines/agos/res_snd.cpp
@@ -118,6 +118,7 @@ void AGOSEngine::loadMusic(uint music) {
if (getPlatform() == Common::kPlatformAtariST) {
// TODO: Add support for music format used by Elvira 2
} else if (getPlatform() == Common::kPlatformAmiga) {
+ assert(_modPlayer);
_modPlayer->stop();
char filename[15];