[Scummvm-cvs-logs] CVS: scummvm/simon vga.cpp,1.65,1.66

Jamieson Christian jamieson630 at users.sourceforge.net
Mon Jul 14 05:01:16 CEST 2003


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

Modified Files:
	vga.cpp 
Log Message:
Fixed error that resulted in bad script tracking
when creating sprites during a savegame load
after having been at certain locations.

(If that sounds convoluted, it's because I don't
know why I fixed what I did, only that the code
we had was not quite constructed properly from
assembler references.)

Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- vga.cpp	13 Jul 2003 06:29:49 -0000	1.65
+++ vga.cpp	14 Jul 2003 12:00:20 -0000	1.66
@@ -270,6 +270,7 @@
 	VgaSprite *vsp;
 	VgaPointersEntry *vpe;
 	byte *p, *pp;
+	byte *old_file_1;
 
 	a = vc_read_next_word();			/* 0 */
 
@@ -303,6 +304,7 @@
 	vsp->id = b;
 	vsp->unk7 = res = f;
 
+	old_file_1 = _cur_vga_file_1;
 	for (;;) {
 		vpe = &_vga_buffer_pointers[res];
 		_cur_vga_file_1 = vpe->vgaFile1;
@@ -310,7 +312,7 @@
 		if (vpe->vgaFile1 != NULL)
 			break;
 		if (res != _vga_cur_file_2)
-			_video_var_7 = res;
+			_video_var_7 = _vga_cur_file_2;
 
 		ensureVgaResLoaded(res);
 		_video_var_7 = 0xFFFF;
@@ -346,6 +348,7 @@
 	//dump_vga_script(_cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x6*)p)->script_offs), res, b);
 
 	add_vga_timer(gss->VGA_DELAY_BASE, _cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->script_offs), b, res);
+	_cur_vga_file_1 = old_file_1;
 }
 
 void SimonEngine::vc_4_dummy_op() {





More information about the Scummvm-git-logs mailing list