[Scummvm-cvs-logs] CVS: scummvm gameDetector.cpp,1.13,1.14 gameDetector.h,1.8,1.9 main.cpp,1.5,1.6 scummvm.cpp,1.111,1.112 sound.cpp,1.41,1.42

Ludvig Strigeus strigeus at users.sourceforge.net
Mon Apr 15 11:09:52 CEST 2002


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

Modified Files:
	gameDetector.cpp gameDetector.h main.cpp scummvm.cpp sound.cpp 
Log Message:
command line option for sfx volume

Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** gameDetector.cpp	14 Apr 2002 18:13:07 -0000	1.13
--- gameDetector.cpp	15 Apr 2002 18:07:55 -0000	1.14
***************
*** 42,45 ****
--- 42,46 ----
  	"\tp<path> - look for game in <path>\n"
  	"\tm<num>  - set music volume to <num> (0-100)\n"
+ 	"\ts<num>  - set sfx volume to <num> (0-255)\n"
  	"\te<mode> - set music engine. see readme.txt for details\n"
  	"\tr       - emulate roland mt32 instruments\n"
***************
*** 109,112 ****
--- 110,119 ----
  						goto NextArg;
  					}
+ 				case 's':{
+ 						if (*(s + 1) == '\0')
+ 							goto ShowHelpAndExit;
+ 						_sfx_volume = atoi(s + 1);
+ 						goto NextArg;
+ 					}
  				case 'r':{
  						_mt32emulate = true;
***************
*** 203,209 ****
  	for(i=0; i!=ARRAYSIZE(music_drivers); i++,md++) {
  		if (!scumm_stricmp(md->name, s)) {
- 			/* FIXME: when adlib driver is in use, propagate that to
- 			 * the IMuse class, and let it create an IMuseAdlib driver
- 			 * instead of IMuseGM driver */
  			if (md->id == -1) {
  				_use_adlib = true;
--- 210,213 ----
***************
*** 336,342 ****
  
  	_gfx_mode = GFX_DOUBLESIZE;
- 
  	_gfx_driver = GD_AUTO;
  
  #ifdef USE_NULL_DRIVER
  	_gfx_driver = GD_NULL;
--- 340,347 ----
  
  	_gfx_mode = GFX_DOUBLESIZE;
  	_gfx_driver = GD_AUTO;
  
+ 	_sfx_volume = 100;
+ 
  #ifdef USE_NULL_DRIVER
  	_gfx_driver = GD_NULL;
***************
*** 346,349 ****
--- 351,356 ----
  	_gameTempo = 0;
  	_soundCardType = 3;
+ 
+ 	
  
  	_midi_driver = MD_AUTO;

Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** gameDetector.h	14 Apr 2002 18:13:07 -0000	1.8
--- gameDetector.h	15 Apr 2002 18:07:55 -0000	1.9
***************
*** 36,39 ****
--- 36,40 ----
  
  	byte _music_volume;
+ 	byte _sfx_volume;
  	bool _mt32emulate;
  

Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/main.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** main.cpp	14 Apr 2002 19:43:11 -0000	1.5
--- main.cpp	15 Apr 2002 18:07:55 -0000	1.6
***************
*** 68,74 ****
  		MidiDriver *midi = detector.createMidi();
  		
! 		SimonState *simon = SimonState::create();
  		simon->_game = detector._gameId - GID_SIMON_FIRST;
! 		simon->go(system, midi);
  
  	} else {
--- 68,75 ----
  		MidiDriver *midi = detector.createMidi();
  		
! 		SimonState *simon = SimonState::create(system, midi);
  		simon->_game = detector._gameId - GID_SIMON_FIRST;
! 		simon->set_volume(detector._sfx_volume);
! 		simon->go();
  
  	} else {

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -d -r1.111 -r1.112
*** scummvm.cpp	15 Apr 2002 17:16:09 -0000	1.111
--- scummvm.cpp	15 Apr 2002 18:07:55 -0000	1.112
***************
*** 1302,1305 ****
--- 1302,1307 ----
  	scumm->_cdrom = detector->_cdrom;
  
+ 	scumm->_sound_volume_sfx = detector->_sfx_volume;
+ 
  	{
  		IMuse *imuse;

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** sound.cpp	14 Apr 2002 18:13:07 -0000	1.41
--- sound.cpp	15 Apr 2002 18:07:55 -0000	1.42
***************
*** 386,390 ****
  		se->set_master_volume(125);
  
- 		_sound_volume_sfx = 100;
  		_sound_volume_music = se->get_music_volume();
  		_sound_volume_master = (se->get_master_volume() / 127);
--- 386,389 ----





More information about the Scummvm-git-logs mailing list