[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.267,1.268 simon.h,1.83,1.84 vga.cpp,1.73,1.74

Jamieson Christian jamieson630 at users.sourceforge.net
Wed Jul 30 02:37:28 CEST 2003


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

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

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.267
retrieving revision 1.268
diff -u -d -r1.267 -r1.268
--- simon.cpp	30 Jul 2003 01:43:28 -0000	1.267
+++ simon.cpp	30 Jul 2003 09:36:48 -0000	1.268
@@ -438,6 +438,7 @@
 	_sdl_buf = 0;
 	_sdl_buf_attached = 0;
 
+	_vc_10_base_ptr_old = 0;
 
 	// Setup midi driver
 	if (!driver)

Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- simon.h	27 Jul 2003 12:05:08 -0000	1.83
+++ simon.h	30 Jul 2003 09:36:48 -0000	1.84
@@ -350,6 +350,7 @@
 
 	RandomSource _rnd;
 
+	byte *_vc_10_base_ptr_old;
 
 public:
 	SimonEngine(GameDetector *detector, OSystem *syst);
@@ -752,6 +753,7 @@
 	void shutdown();
 
 	byte *vc_10_depack_swap(byte *src, uint w, uint h);
+	byte *vc_10_no_depack_swap(byte *src, uint w, uint h);
 
 	Item *getNextItemPtrStrange();
 

Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- vga.cpp	28 Jul 2003 11:48:07 -0000	1.73
+++ vga.cpp	30 Jul 2003 09:36:48 -0000	1.74
@@ -511,10 +511,26 @@
 	return _video_buf_1;
 }
 
-byte *vc_10_no_depack_swap(byte *src) {
-	// TODO Add vc_10_no_depack_swap support, should be very similar to 
-	// vc_10_depack_swap but without the depacking
-	return NULL;
+byte *SimonEngine::vc_10_no_depack_swap(byte *src, uint w, uint h) {
+	if (src == _vc_10_base_ptr_old)
+		return _video_buf_1;
+
+	_vc_10_base_ptr_old = src;
+	h *= 8;
+	byte *dst = _video_buf_1 + h - 1;
+
+	// loc_40F57F
+	uint h_cur = h;
+	do {
+		do {
+			*dst = *src << 4;
+			(*dst--) |= (*src++) >> 4;
+		} while (--h_cur != 0);
+		h_cur = h;
+		dst += h * 2;
+	} while (--w != 0);
+
+	return _video_buf_1;
 }
 
 /* must not be const */
@@ -656,10 +672,9 @@
 	if (state.e & 0x10) {
 		state.depack_src = vc_10_depack_swap(state.depack_src, width, height);
 	} else if (state.e & 1) {
-		// FIXME: vc_10_no_depack_swap should be called but is currently not supported
-		//state.depack_src = vc_10_no_depack_swap(state.depack_src);
-		debug(5,"vc_10_no_depack_swap unimpl");
-		state.depack_src = vc_10_depack_swap(state.depack_src, width, height);
+		state.depack_src = vc_10_no_depack_swap(state.depack_src, width, height);
+//		debug(5,"vc_10_no_depack_swap unimpl");
+//		state.depack_src = vc_10_depack_swap(state.depack_src, width, height);
 	}
 
 	vlut = &_video_windows[_video_palette_mode * 4];





More information about the Scummvm-git-logs mailing list