[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.245,1.246

Max Horn fingolfin at users.sourceforge.net
Sat Jun 21 08:33:03 CEST 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv23133

Modified Files:
	simon.cpp 
Log Message:
init some member vars previously not inited

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -d -r1.245 -r1.246
--- simon.cpp	15 Jun 2003 14:07:53 -0000	1.245
+++ simon.cpp	21 Jun 2003 15:32:35 -0000	1.246
@@ -173,7 +173,29 @@
 	: Engine(detector, syst), midi (syst) {
 	MidiDriver *driver = detector->createMidi();
 	
+	_vc_ptr = 0;
+	_game_offsets_ptr = 0;
+	
+	_game = (byte)detector->_game.features;
+
+	if (_game == GAME_SIMON2MAC) {
+		gss = &simon2mac_settings;
+	} else if (_game == GAME_SIMON2TALKIE || _game == GAME_SIMON2WIN) {
+		gss = &simon2win_settings;
+	} else if (_game == GAME_SIMON2DOS) {
+		gss = &simon2dos_settings;
+	} else if (_game & GF_AMIGA) {
+		gss = &simon1amiga_settings;
+	} else if (_game == GAME_SIMON1DEMO) {
+		gss = &simon1demo_settings;
+	} else {
+		gss = &simon1_settings;
+	}
+
+	_key_pressed = 0;
+
 	_game_file = 0;
+	
 	_stripped_txt_mem = 0;
 	_text_size = 0;
 	_stringtab_num = 0;
@@ -416,8 +438,6 @@
 	if (ret)
 		warning ("MIDI Player init failed: \"%s\"", midi.getErrorName (ret));
 
-	_game = (byte)detector->_game.features;
-
 	// Setup mixer
 	if (!_mixer->bindToSystem(syst))
 		warning("Sound initialization failed. "
@@ -4329,20 +4349,6 @@
 	_sdl_buf_3 = (byte *)calloc(320 * 200, 1);
 	_sdl_buf = (byte *)calloc(320 * 200, 1);
 	_sdl_buf_attached = (byte *)calloc(320 * 200, 1);
-
-	if (_game == GAME_SIMON2MAC) {
-		gss = &simon2mac_settings;
-	} else if (_game == GAME_SIMON2TALKIE || _game == GAME_SIMON2WIN) {
-		gss = &simon2win_settings;
-	} else if (_game == GAME_SIMON2DOS) {
-		gss = &simon2dos_settings;
-	} else if (_game & GF_AMIGA) {
-		gss = &simon1amiga_settings;
-	} else if (_game == GAME_SIMON1DEMO) {
-		gss = &simon1demo_settings;
-	} else {
-		gss = &simon1_settings;
-	}
 
 	allocItemHeap();
 	allocTablesHeap();





More information about the Scummvm-git-logs mailing list