From b6a4610a778e100ed0186ef702bb880ccaab2dbc Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 31 Mar 2004 18:00:46 +0000 Subject: be tolerant against abuse of ConfMan.getInt(); add missing default value for 'speech_volume' in bs1 svn-id: r13435 --- sword1/sword1.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sword1') diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp index 6fd61ad66f..ac5b8d95f8 100644 --- a/sword1/sword1.cpp +++ b/sword1/sword1.cpp @@ -113,18 +113,19 @@ void SwordEngine::initialize(void) { _logic = new Logic(_objectMan, _resMan, _screen, _mouse, _sound, _music, _menu, _system, _mixer); _mouse->useLogicAndMenu(_logic, _menu); + ConfMan.registerDefault("speech_volume", 192); + uint8 musicVol = (uint8)ConfMan.getInt("music_volume"); uint8 speechVol = (uint8)ConfMan.getInt("speech_volume"); uint8 sfxVol = (uint8)ConfMan.getInt("sfx_volume"); - if (!speechVol) - speechVol = 192; _music->setVolume(musicVol, musicVol); // these routines expect left and right volume, _sound->setSpeechVol(speechVol, speechVol); // but our config manager doesn't support it. _sound->setSfxVol(sfxVol, sfxVol); - _systemVars.justRestoredGame = _systemVars.currentCD = - _systemVars.gamePaused = 0; + _systemVars.justRestoredGame = 0; + _systemVars.currentCD = 0; + _systemVars.gamePaused = 0; _systemVars.deathScreenFlag = 3; _systemVars.forceRestart = false; _systemVars.wantFade = true; -- cgit v1.2.3