[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.200,1.201 vga.cpp,1.51,1.52

Travis Howell kirben at users.sourceforge.net
Wed May 21 04:50:14 CEST 2003


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

Modified Files:
	simon.cpp vga.cpp 
Log Message:

Set midi vars to -1 by default to prevent simon2dos trying to load music during copy protection
Correct vc_62 so it is closer to diasm.


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -d -r1.200 -r1.201
--- simon.cpp	21 May 2003 07:49:41 -0000	1.200
+++ simon.cpp	21 May 2003 11:49:41 -0000	1.201
@@ -322,8 +322,8 @@
 	_video_var_9 = 0;
 
 	_midi_sfx = 0;
-	_last_music_played = 0;
-	_next_music_to_play = 0;
+	_last_music_played = -1;
+	_next_music_to_play = -1;
 
 	_show_preposition = 0;
 	_showmessage_flag = 0;

Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- vga.cpp	21 May 2003 11:23:53 -0000	1.51
+++ vga.cpp	21 May 2003 11:49:41 -0000	1.52
@@ -1691,62 +1691,63 @@
 	vc_29_stop_all_sounds();
 
 	if (!_video_var_3) {
-		if (_game & GF_SIMON2) {
-			if (_next_music_to_play != -1)
-				loadMusic(_next_music_to_play);
-		}
-	} else
 		_video_var_3 = true;
 
-	_video_num_pal_colors = 256;
-	if (_video_palette_mode == 4)
-		_video_num_pal_colors = 208;
-
-	memcpy(_video_buf_1, _palette_backup, _video_num_pal_colors * sizeof(uint32));
-	for (i = NUM_PALETTE_FADEOUT; i != 0; --i) {
-		palette_fadeout((uint32 *)_video_buf_1, _video_num_pal_colors);
-		_system->set_palette(_video_buf_1, 0, _video_num_pal_colors);
-		_system->update_screen();
-		delay(5);
-	}
+		_video_num_pal_colors = 256;
+		if (_video_palette_mode == 4)
+			_video_num_pal_colors = 208;
 
-	if (!(_game & GF_SIMON2)) {
-		uint16 params[5];						/* parameters to vc_10_draw */
-		VgaSprite *vsp;
-		VgaPointersEntry *vpe;
+		memcpy(_video_buf_1, _palette_backup, _video_num_pal_colors * sizeof(uint32));
+		for (i = NUM_PALETTE_FADEOUT; i != 0; --i) {
+			palette_fadeout((uint32 *)_video_buf_1, _video_num_pal_colors);
+			_system->set_palette(_video_buf_1, 0, _video_num_pal_colors);
+			_system->update_screen();
+			delay(5);
+		}
 
-		vsp = _vga_sprites;
-		while (vsp->id != 0) {
-			if (vsp->id == 128) {
-				byte *f1 = _cur_vga_file_1;
-				byte *f2 = _cur_vga_file_2;
-				uint palmode = _video_palette_mode;
+		if (!(_game & GF_SIMON2)) {
+			uint16 params[5];						/* parameters to vc_10_draw */
+			VgaSprite *vsp;
+			VgaPointersEntry *vpe;
 
-				vpe = &_vga_buffer_pointers[vsp->unk7];
-				_cur_vga_file_1 = vpe->vgaFile1;
-				_cur_vga_file_2 = vpe->vgaFile2;
-				_video_palette_mode = vsp->unk6;
+			vsp = _vga_sprites;
+			while (vsp->id != 0) {
+				if (vsp->id == 128) {
+					byte *f1 = _cur_vga_file_1;
+					byte *f2 = _cur_vga_file_2;
+					uint palmode = _video_palette_mode;
+	
+					vpe = &_vga_buffer_pointers[vsp->unk7];
+					_cur_vga_file_1 = vpe->vgaFile1;
+					_cur_vga_file_2 = vpe->vgaFile2;
+					_video_palette_mode = vsp->unk6;
 
-				params[0] = READ_BE_UINT16_UNALIGNED(&vsp->image);
-				params[1] = READ_BE_UINT16_UNALIGNED(&vsp->base_color);
-				params[2] = READ_BE_UINT16_UNALIGNED(&vsp->x);
-				params[3] = READ_BE_UINT16_UNALIGNED(&vsp->y);
-				params[4] = READ_BE_UINT16_UNALIGNED(&vsp->unk4);
-				_vc_ptr = (byte *)params;
-				vc_10_draw();
+					params[0] = READ_BE_UINT16_UNALIGNED(&vsp->image);
+					params[1] = READ_BE_UINT16_UNALIGNED(&vsp->base_color);
+					params[2] = READ_BE_UINT16_UNALIGNED(&vsp->x);
+					params[3] = READ_BE_UINT16_UNALIGNED(&vsp->y);
+					params[4] = READ_BE_UINT16_UNALIGNED(&vsp->unk4);
+					_vc_ptr = (byte *)params;
+					vc_10_draw();
 
-				_video_palette_mode = palmode;
-				_cur_vga_file_1 = f1;
-				_cur_vga_file_2 = f2;
-				break;
+					_video_palette_mode = palmode;
+					_cur_vga_file_1 = f1;
+					_cur_vga_file_2 = f2;
+					break;
+				}
+				vsp++;
 			}
-			vsp++;
 		}
-	}
 
-	dx_clear_surfaces(_video_palette_mode == 4 ? 134 : 200);
+		dx_clear_surfaces(_video_palette_mode == 4 ? 134 : 200);
+
+		_vc_ptr = vc_ptr_org;
+	}
+	if (_game & GF_SIMON2) {
+		if (_next_music_to_play != -1)
+			loadMusic(_next_music_to_play);
+	}
 
-	_vc_ptr = vc_ptr_org;
 }
 
 void SimonState::vc_63_palette_thing_2() {





More information about the Scummvm-git-logs mailing list