[Scummvm-cvs-logs] SF.net SVN: scummvm:[49560] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Jun 10 09:41:48 CEST 2010
Revision: 49560
http://scummvm.svn.sourceforge.net/scummvm/?rev=49560&view=rev
Author: thebluegr
Date: 2010-06-10 07:41:48 +0000 (Thu, 10 Jun 2010)
Log Message:
-----------
Fixed compilation with the old music code
Modified Paths:
--------------
scummvm/trunk/engines/sci/sci.cpp
scummvm/trunk/engines/sci/sci.h
Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp 2010-06-10 07:32:05 UTC (rev 49559)
+++ scummvm/trunk/engines/sci/sci.cpp 2010-06-10 07:41:48 UTC (rev 49560)
@@ -234,10 +234,7 @@
_gamestate->_soundCmd = new SoundCommandParser(_resMan, segMan, _kernel, _audio, soundVersion);
#ifdef USE_OLD_MUSIC_FUNCTIONS
- if (game_init_sound(_gamestate, 0, soundVersion)) {
- warning("Game initialization failed: Error in sound subsystem. Aborting...");
- return Common::kUnknownError;
- }
+ initGameSound(0, soundVersion);
#endif
syncSoundSettings();
@@ -334,7 +331,7 @@
#ifdef USE_OLD_MUSIC_FUNCTIONS
if (_gamestate->sfx_init_flags & SFX_STATE_FLAG_NOSOUND)
- game_init_sound(_gamestate, 0, _features->detectDoSoundType());
+ initGameSound(0, _features->detectDoSoundType());
#endif
// Load game language into printLang property of game object
@@ -345,6 +342,18 @@
return true;
}
+#ifdef USE_OLD_MUSIC_FUNCTIONS
+
+void SciEngine::initGameSound(int sound_flags, SciVersion soundVersion) {
+ if (getSciVersion() > SCI_VERSION_0_LATE)
+ sound_flags |= SFX_STATE_FLAG_MULTIPLAY;
+
+ _gamestate->sfx_init_flags = sound_flags;
+ _gamestate->_sound.sfx_init(_resMan, sound_flags, soundVersion);
+}
+
+#endif
+
void SciEngine::initStackBaseWithSelector(Selector selector) {
_gamestate->stack_base[0] = make_reg(0, (uint16)selector);
_gamestate->stack_base[1] = NULL_REG;
@@ -392,7 +401,7 @@
#ifdef USE_OLD_MUSIC_FUNCTIONS
_gamestate->_sound.sfx_exit();
// Reinit because some other code depends on having a valid state
- game_init_sound(_gamestate, SFX_STATE_FLAG_NOSOUND, _features->detectDoSoundType());
+ initGameSound(SFX_STATE_FLAG_NOSOUND, _features->detectDoSoundType());
#else
_audio->stopAllAudio();
_gamestate->_soundCmd->clearPlayList();
Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h 2010-06-10 07:32:05 UTC (rev 49559)
+++ scummvm/trunk/engines/sci/sci.h 2010-06-10 07:41:48 UTC (rev 49560)
@@ -253,9 +253,8 @@
* @param[in] s The state to initialize the sound in
* @param[in] sound_flags Flags to pass to the sound subsystem
* @param[in] soundVersion sound-version that got detected during game init
- * @return 0 on success, 1 if an error occured
*/
- int game_init_sound(EngineState *s, int sound_flags, SciVersion soundVersion);
+ void initGameSound(int sound_flags, SciVersion soundVersion);
#endif
void initStackBaseWithSelector(Selector selector);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list