[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.396,1.397 simon.h,1.117,1.118 vga.cpp,1.105,1.106

Travis Howell kirben at users.sourceforge.net
Tue Dec 23 01:00:02 CET 2003


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

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

Add var to track current subroutine been used.
Add work around to display one section of Simon the Sorcerer 1 introduction in lower half of screen.


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.396
retrieving revision 1.397
diff -u -d -r1.396 -r1.397
--- simon.cpp	23 Dec 2003 06:55:26 -0000	1.396
+++ simon.cpp	23 Dec 2003 08:59:30 -0000	1.397
@@ -314,6 +314,7 @@
 
 	_subroutine_list = 0;
 	_subroutine_list_org = 0;
+	_subroutine = 0;
 
 	_dx_surface_pitch = 0;
 
@@ -1237,16 +1238,20 @@
 Subroutine *SimonEngine::getSubroutineByID(uint subroutine_id) {
 	Subroutine *cur;
 
+	_subroutine = subroutine_id;
+
 	for (cur = _subroutine_list; cur; cur = cur->next) {
-		if (cur->id == subroutine_id)
+		if (cur->id == subroutine_id) {
 			return cur;
+		}
 	}
 
 	loadTablesIntoMem(subroutine_id);
 
 	for (cur = _subroutine_list; cur; cur = cur->next) {
-		if (cur->id == subroutine_id)
+		if (cur->id == subroutine_id) {
 			return cur;
+		}
 	}
 
 	debug(1,"getSubroutineByID: subroutine %d not found", subroutine_id);
@@ -2335,7 +2340,7 @@
 }
 
 void SimonEngine::set_video_mode_internal(uint mode, uint vga_res_id) {
-	uint num;
+	uint num, num_lines;
 	VgaPointersEntry *vpe;
 	byte *bb, *b;
 	uint16 c;
@@ -2403,7 +2408,7 @@
 
 	if (_game & GF_SIMON2) {
 		if (!_dx_use_3_or_4_for_lock) {
-			uint num_lines = _video_palette_mode == 4 ? 134 : 200;
+			num_lines = _video_palette_mode == 4 ? 134 : 200;
 			_vga_var8 = num_lines;
 			dx_copy_from_attached_to_2(0, 0, 320, num_lines);
 			dx_copy_from_attached_to_3(num_lines);
@@ -2411,7 +2416,12 @@
 		}
 		_dx_use_3_or_4_for_lock = false;
 	} else {
-		uint num_lines = _video_palette_mode == 4 ? 134 : 200;
+		// Allow one section of Simon the Sorcerer 1 introduction to be displayed
+		// in lower half of screen
+		if (_subroutine == 2926)
+			num_lines = 200;
+		else
+			num_lines = _video_palette_mode == 4 ? 134 : 200;
 		_vga_var8 = num_lines;
 		dx_copy_from_attached_to_2(0, 0, 320, num_lines);
 		dx_copy_from_attached_to_3(num_lines);

Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- simon.h	21 Dec 2003 18:50:44 -0000	1.117
+++ simon.h	23 Dec 2003 08:59:30 -0000	1.118
@@ -163,6 +163,7 @@
 	uint _tablesheap_curpos_new;
 
 	Subroutine *_subroutine_list, *_subroutine_list_org;
+	uint _subroutine;
 
 	uint _dx_surface_pitch;
 
@@ -274,7 +275,6 @@
 	uint _video_num_pal_colors;
 
 	uint _invoke_timer_callback;
-
 
 	uint _vga_sprite_changed;
 

Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- vga.cpp	23 Dec 2003 06:35:17 -0000	1.105
+++ vga.cpp	23 Dec 2003 08:59:30 -0000	1.106
@@ -731,8 +731,16 @@
 	state.surf_pitch = _dx_surface_pitch;
 
 	{
-		uint offs = ((vlut[0] - _video_windows[16]) * 2 + state.x) * 8;
-		uint offs2 = (vlut[1] - _video_windows[17] + state.y);
+		uint offs, offs2;
+		// Allow one section of Simon the Sorcerer 1 introduction to be displayed
+		// in lower half of screen
+		if (!(_game & GF_SIMON2) && _subroutine == 2926) {
+			offs = ((vlut[0]) * 2 + state.x) * 8;
+			offs2 = (vlut[1] + state.y);
+		} else {
+			offs = ((vlut[0] - _video_windows[16]) * 2 + state.x) * 8;
+			offs2 = (vlut[1] - _video_windows[17] + state.y);
+		}
 
 		state.surf2_addr += offs + offs2 * state.surf2_pitch;
 		state.surf_addr += offs + offs2 * state.surf_pitch;
@@ -1766,7 +1774,12 @@
 			_vc_ptr = vc_ptr_org;
 		}
 
-		dx_clear_surfaces(_video_palette_mode == 4 ? 134 : 200);
+		// Allow one section of Simon the Sorcerer 1 introduction to be displayed
+		// in lower half of screen
+		if (!(_game & GF_SIMON2) && _subroutine == 2926)
+			dx_clear_surfaces(200);
+		else
+			dx_clear_surfaces(_video_palette_mode == 4 ? 134 : 200);
 	}
 	if (_game & GF_SIMON2) {
 		if (_next_music_to_play != -1)





More information about the Scummvm-git-logs mailing list