[Scummvm-cvs-logs] CVS: scummvm scumm.h,1.191,1.192 sound.cpp,1.116,1.117 scummvm.cpp,1.193,1.194 gameDetector.cpp,1.79,1.80

Max Horn fingolfin at users.sourceforge.net
Sun Jul 28 08:04:04 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv17618

Modified Files:
	scumm.h sound.cpp scummvm.cpp gameDetector.cpp 
Log Message:
added constants for the default volumes; changed the volume ranges from 0-255 to 0-256

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -d -r1.191 -r1.192
--- scumm.h	27 Jul 2002 21:06:50 -0000	1.191
+++ scumm.h	28 Jul 2002 15:03:45 -0000	1.192
@@ -61,6 +61,12 @@
     KEY_SET_OPTIONS = 3456 // WinCE
 };
 
+enum {
+	kDefaultMasterVolume = 192,
+	kDefaultSFXVolume = 192,
+	kDefaultMusicVolume = 192
+};
+
 struct ScummPoint {
 	int x, y;
 };

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound.cpp,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- sound.cpp	28 Jul 2002 12:42:32 -0000	1.116
+++ sound.cpp	28 Jul 2002 15:03:45 -0000	1.117
@@ -588,9 +588,9 @@
 	if (_imuse) {
 		_imuse->setBase(res.address[rtSound]);
 
-		_sound_volume_music = scummcfg->getInt("music_volume", 192);
-		_sound_volume_master = scummcfg->getInt("master_volume", 192);
-		_sound_volume_sfx = scummcfg->getInt("sfx_volume", 192);
+		_sound_volume_music = scummcfg->getInt("music_volume", kDefaultMusicVolume);
+		_sound_volume_master = scummcfg->getInt("master_volume", kDefaultMasterVolume);
+		_sound_volume_sfx = scummcfg->getInt("sfx_volume", kDefaultSFXVolume);
 
 		_imuse->set_master_volume(_sound_volume_master);
 		_imuse->set_music_volume(_sound_volume_music);

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -d -r1.193 -r1.194
--- scummvm.cpp	28 Jul 2002 01:40:24 -0000	1.193
+++ scummvm.cpp	28 Jul 2002 15:03:45 -0000	1.194
@@ -1529,8 +1529,8 @@
 			warning("Adlib music was selected, switching to midi null driver");   
 		}   
 	} 
-	scumm->_mixer->set_volume(128);
-	scumm->_mixer->set_music_volume(128);
+	scumm->_mixer->set_volume(kDefaultSFXVolume);
+	scumm->_mixer->set_music_volume(kDefaultMusicVolume);
 
 	/* HACK !!! */
 	g_scumm = scumm;

Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- gameDetector.cpp	27 Jul 2002 14:55:40 -0000	1.79
+++ gameDetector.cpp	28 Jul 2002 15:03:45 -0000	1.80
@@ -489,8 +489,8 @@
 #else
 	_gfx_mode = GFX_NORMAL;
 #endif
-	_sfx_volume = 192;
-	_music_volume = 192;
+	_sfx_volume = kDefaultSFXVolume;
+	_music_volume = kDefaultMusicVolume;
 
 #if defined(USE_NULL_DRIVER)
 	_gfx_driver = GD_NULL;





More information about the Scummvm-git-logs mailing list