[Scummvm-cvs-logs] CVS: scummvm gui.cpp,1.62,1.63 newgui.cpp,1.24,1.25 newgui.h,1.19,1.20

Max Horn fingolfin at users.sourceforge.net
Thu Jul 25 17:42:02 CEST 2002


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

Modified Files:
	gui.cpp newgui.cpp newgui.h 
Log Message:
added painelf's (still unfinished) sound dialog in NewGUI. Beware, this is work in progress, don't report problems with it just yet, we already know they are there :-)

Index: gui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- gui.cpp	22 Jul 2002 01:07:31 -0000	1.62
+++ gui.cpp	26 Jul 2002 00:41:06 -0000	1.63
@@ -624,9 +624,11 @@
 		// (s)he is at it, HiFi equipment uses logarithmic volume controls
 		// (not linear ones as we do) since they match the human ear better.
 
-		_s->_sound_volume_master = _gui_variables[0];	// Master
-		_s->_sound_volume_music = _gui_variables[1];	// Music
-		_s->_sound_volume_sfx = _gui_variables[2];	// SFX
+		// The * 256 / 100 is a quick recalibration hack, it will go
+		// away when we move to newgui
+		_s->_sound_volume_master = _gui_variables[0] * 255 / 100;	// Master
+		_s->_sound_volume_music = _gui_variables[1] * 255 / 100;	// Music
+		_s->_sound_volume_sfx = _gui_variables[2] * 255 / 100;		// SFX
 
 		_s->_imuse->set_music_volume(_s->_sound_volume_music);
 		_s->_imuse->set_master_volume(_s->_sound_volume_master);

Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/newgui.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- newgui.cpp	19 Jul 2002 10:10:02 -0000	1.24
+++ newgui.cpp	26 Jul 2002 00:41:06 -0000	1.25
@@ -72,6 +72,13 @@
 	openDialog(_optionsDialog);
 }
 
+void NewGui::soundDialog()
+{
+	if (!_soundDialog)
+		_soundDialog = new SoundDialog(this);
+	openDialog(_soundDialog);
+}
+
 void NewGui::loop()
 {
 	Dialog *activeDialog = _dialogStack.top();

Index: newgui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/newgui.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- newgui.h	18 Jul 2002 20:26:35 -0000	1.19
+++ newgui.h	26 Jul 2002 00:41:06 -0000	1.20
@@ -61,6 +61,7 @@
 	void saveloadDialog();
 	void aboutDialog();
 	void optionsDialog();
+	void soundDialog();
 
 	void loop();
 
@@ -83,6 +84,7 @@
 	Dialog		*_saveLoadDialog;
 	Dialog		*_aboutDialog;
 	Dialog		*_optionsDialog;
+	Dialog		*_soundDialog;
 
 	// for continuous events (keyDown)
 	int			_currentKeyDown, _currentKeyDownFlags;





More information about the Scummvm-git-logs mailing list