aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/agos.cpp
diff options
context:
space:
mode:
authorTravis Howell2006-10-19 05:37:22 +0000
committerTravis Howell2006-10-19 05:37:22 +0000
commit8c72861de463e0db36b234750fb19904e5f04d3b (patch)
tree9b8139009ee2510033fc3392f2daab1d8b737e35 /engines/agos/agos.cpp
parented3c6871f967ab15321df14ca6a026e08d96fae1 (diff)
downloadscummvm-rg350-8c72861de463e0db36b234750fb19904e5f04d3b.tar.gz
scummvm-rg350-8c72861de463e0db36b234750fb19904e5f04d3b.tar.bz2
scummvm-rg350-8c72861de463e0db36b234750fb19904e5f04d3b.zip
Add option to load a module via stream
svn-id: r24387
Diffstat (limited to 'engines/agos/agos.cpp')
-rw-r--r--engines/agos/agos.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 92c6acc138..c55aed0221 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -34,6 +34,7 @@
#include "agos/vga.h"
#include "sound/mididrv.h"
+#include "sound/mods/protracker.h"
#ifdef PALMOS_68K
#include "globals.h"
@@ -386,6 +387,7 @@ AGOSEngine::AGOSEngine(OSystem *syst)
_vgaTickCounter = 0;
+ _modPlayer = 0;
_moviePlay = 0;
_sound = 0;
@@ -510,9 +512,12 @@ int AGOSEngine::init() {
setupGame();
_debugger = new Debugger(this);
- _moviePlay = new MoviePlayer(this, _mixer);
+ _modPlayer = new Modules::ProtrackerPlayer();
_sound = new Sound(this, gss, _mixer);
+ _modPlayer->init(_system);
+ _moviePlay = new MoviePlayer(this, _mixer);
+
if (ConfMan.hasKey("sfx_mute") && ConfMan.getBool("sfx_mute") == 1) {
if (getGameId() == GID_SIMON1DOS)
midi._enable_sfx ^= 1;
@@ -757,6 +762,7 @@ AGOSEngine::~AGOSEngine() {
delete [] _windowList;
delete _debugger;
+ delete _modPlayer;
delete _moviePlay;
delete _sound;
}
@@ -1353,8 +1359,7 @@ startOver:
if (getGameType() != GType_FF && getGameType() != GType_PP && _keyPressed == 35)
displayBoxStars();
if (processSpecialKeys() != 0) {
- _needHitAreaRecalc++;
- return;
+ goto out_of_here;
}
if (_lastHitArea3 == (HitArea *) -1)
goto startOver;
@@ -1472,6 +1477,7 @@ startOver:
}
}
+out_of_here:
if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW)
clearMenuStrip();
@@ -2434,7 +2440,6 @@ void AGOSEngine::loadMusic(uint music) {
if (getPlatform() == Common::kPlatformAtariST) {
// TODO: Add support for music format used by Elvira 2
} else if (getPlatform() == Common::kPlatformAmiga) {
- /*
_modPlayer->stop();
char filename[15];
@@ -2447,7 +2452,7 @@ void AGOSEngine::loadMusic(uint music) {
f.open(filename);
if (f.isOpen() == false) {
- error("loadMusic: Can't load music from '%s'", filename);
+ error("loadMusic: Can't load module from '%s'", filename);
}
if (!(getGameType() == GType_ELVIRA1 && getFeatures() & GF_DEMO) &&
@@ -2468,7 +2473,6 @@ void AGOSEngine::loadMusic(uint music) {
_modPlayer->loadModuleStream(f);
}
_modPlayer->start();
- */
} else if (getGameType() == GType_SIMON2) {
midi.stop();
_gameFile->seek(_gameOffsetsPtr[_musicIndexBase + music - 1], SEEK_SET);