[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,1.12,1.13 scumm.h,1.28,1.29 scummvm.cpp,1.35,1.36

Max Horn fingolfin at users.sourceforge.net
Tue Sep 24 16:46:04 CEST 2002


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

Modified Files:
	imuse.cpp scumm.h scummvm.cpp 
Log Message:
removed even the last traces of Scumm dependencies from NewGUI. Yes, you heard right NewGUI is now 100% Scumm free and we can go for the launcher/message dialogs!

Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- imuse.cpp	22 Sep 2002 02:53:15 -0000	1.12
+++ imuse.cpp	24 Sep 2002 23:45:25 -0000	1.13
@@ -3110,7 +3110,7 @@
 
 void Part::set_pitchbend(int value)
 {
-	_pitchbend = value * _pitchbend_factor >> 6;
+	_pitchbend = value;
 	changed(IMuseDriver::pcMod);
 }
 
@@ -3993,7 +3993,7 @@
 	if (what & pcMod) {
 		for (mc = part->_mc->adl(); mc; mc = mc->_next) {
 			adlib_note_on(mc->_channel, mc->_note + part->_transpose_eff,
-										part->_pitchbend + part->_detune_eff);
+			              (part->_pitchbend * part->_pitchbend_factor >> 6) + part->_detune_eff);
 		}
 	}
 
@@ -4278,7 +4278,7 @@
 
 	if (_midi_pitchbend_last[chan] != pitchbend) {
 		_midi_pitchbend_last[chan] = pitchbend;
-		tmp = (pitchbend << 2) + 0x2000;
+		tmp = pitchbend + 0x2000;
 		_md->send(((tmp >> 7) & 0x7F) << 16 | (tmp & 0x7F) << 8 | 0xE0 | chan);
 	}
 }
@@ -4570,8 +4570,9 @@
 
 	if (what & pcMod)
 		midiPitchBend(mc->_chan,
-									clamp(part->_pitchbend + part->_detune_eff +
-												(part->_transpose_eff << 7), -2048, 2047));
+		              clamp(part->_pitchbend +
+					        (part->_detune_eff * 64 / 12) +
+		                    (part->_transpose_eff * 8192 / 12), -8192, 8191));
 
 	if (what & pcVolume)
 		midiVolume(mc->_chan, part->_vol_eff);

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- scumm.h	24 Sep 2002 15:46:09 -0000	1.28
+++ scumm.h	24 Sep 2002 23:45:25 -0000	1.29
@@ -401,6 +401,7 @@
 	Dialog *_optionsDialog;
 	Dialog *_saveLoadDialog;
 
+	void runDialog(Dialog *dialog);
 	void pauseDialog();
 	void saveloadDialog();
 	void optionsDialog();

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- scummvm.cpp	24 Sep 2002 04:29:54 -0000	1.35
+++ scummvm.cpp	24 Sep 2002 23:45:25 -0000	1.36
@@ -103,7 +103,7 @@
 	_gui = new Gui();
 	_gui->init(this);
 	
-	_newgui = new NewGui(this);
+	_newgui = new NewGui(_system);
 	_bundle = new Bundle();
 	_sound = new Sound(this);
 	_timer = Engine::_timer;
@@ -917,28 +917,42 @@
 	//_newgui->optionsDialog();
 }
 
+void Scumm::runDialog(Dialog *dialog)
+{
+	// Pause sound put
+	bool old_soundsPaused = _sound->_soundsPaused;
+	_sound->pauseSounds(true);
+
+	// Open & run the dialog
+	dialog->open();
+	_newgui->runLoop();
+
+	// Restore old cursor
+	updateCursor();
+
+	// Resume sound output
+	_sound->pauseSounds(old_soundsPaused);
+}
+
 void Scumm::pauseDialog()
 {
 	if (!_pauseDialog)
 		_pauseDialog = new PauseDialog(_newgui, this);
-	_pauseDialog->open();
-	_newgui->runLoop();
+	runDialog(_pauseDialog);
 }
 
 void Scumm::saveloadDialog()
 {
 	if (!_saveLoadDialog)
 		_saveLoadDialog = new SaveLoadDialog(_newgui, this);
-	_saveLoadDialog->open();
-	_newgui->runLoop();
+	runDialog(_saveLoadDialog);
 }
 
 void Scumm::optionsDialog()
 {
 	if (!_optionsDialog)
 		_optionsDialog = new OptionsDialog(_newgui, this);
-	_optionsDialog->open();
-	_newgui->runLoop();
+	runDialog(_optionsDialog);
 }
 
 void Scumm::shutDown(int i)





More information about the Scummvm-git-logs mailing list