diff options
author | Gregory Montoir | 2006-03-09 22:37:19 +0000 |
---|---|---|
committer | Gregory Montoir | 2006-03-09 22:37:19 +0000 |
commit | 2cf5859404fe91e19c2d18d57c1955d314c5da06 (patch) | |
tree | cea410cf373e690ba2c94fd68bf3c390af5c023f /engines/cine/cine.cpp | |
parent | f0106cd59c90d22799bb1517575a2d92a9027abe (diff) | |
download | scummvm-rg350-2cf5859404fe91e19c2d18d57c1955d314c5da06.tar.gz scummvm-rg350-2cf5859404fe91e19c2d18d57c1955d314c5da06.tar.bz2 scummvm-rg350-2cf5859404fe91e19c2d18d57c1955d314c5da06.zip |
oo'ified sound code and added basic support for OS adlib music.
svn-id: r21186
Diffstat (limited to 'engines/cine/cine.cpp')
-rw-r--r-- | engines/cine/cine.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp index 8ec2a86c96..426ccc4a18 100644 --- a/engines/cine/cine.cpp +++ b/engines/cine/cine.cpp @@ -46,8 +46,8 @@ namespace Cine { -Audio::Mixer * cine_g_mixer; -AdlibMusic *g_cine_adlib; +SoundDriver *g_soundDriver; +SfxPlayer *g_sfxPlayer; static void initialize(); @@ -131,7 +131,6 @@ CineEngine::CineEngine(GameDetector *detector, OSystem *syst) : Engine(syst) { warning("Sound initialization failed."); } - cine_g_mixer = _mixer; _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); @@ -163,7 +162,12 @@ int CineEngine::init(GameDetector &detector) { _system->initSize(320, 200); _system->endGFXTransaction(); - g_cine_adlib = new AdlibMusic(_mixer); + if (gameType == GID_FW) { + g_soundDriver = new AdlibSoundDriverINS(_mixer); + } else { + g_soundDriver = new AdlibSoundDriverADL(_mixer); + } + g_sfxPlayer = new SfxPlayer(g_soundDriver); initialize(); @@ -178,8 +182,8 @@ int CineEngine::go() { if (gameType == Cine::GID_FW) snd_clearBasesonEntries(); - delete g_cine_adlib; - + delete g_soundDriver; + delete g_sfxPlayer; return 0; } @@ -196,7 +200,8 @@ static void initialize() { partBuffer = (PartBuffer *)malloc(255 * sizeof(PartBuffer)); loadTextData("texte.dat", textDataPtr); - snd_loadBasesonEntries("BASESON.SND"); + if (gameType == Cine::GID_FW) + snd_loadBasesonEntries("BASESON.SND"); for (i = 0; i < NUM_MAX_OBJECT; i++) { objectTable[i].part = 0; |