[Scummvm-cvs-logs] SF.net SVN: scummvm: [21325] scummvm/trunk/engines/simon

kirben at users.sourceforge.net kirben at users.sourceforge.net
Wed Mar 15 20:11:03 CET 2006


Revision: 21325
Author:   kirben
Date:     2006-03-15 20:10:34 -0800 (Wed, 15 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21325&view=rev

Log Message:
-----------
Rename get draw buffer functions

Modified Paths:
--------------
    scummvm/trunk/engines/simon/charset.cpp
    scummvm/trunk/engines/simon/icons.cpp
    scummvm/trunk/engines/simon/simon.cpp
    scummvm/trunk/engines/simon/simon.h
    scummvm/trunk/engines/simon/vga.cpp
    scummvm/trunk/engines/simon/vga.h
Modified: scummvm/trunk/engines/simon/charset.cpp
===================================================================
--- scummvm/trunk/engines/simon/charset.cpp	2006-03-16 03:48:42 UTC (rev 21324)
+++ scummvm/trunk/engines/simon/charset.cpp	2006-03-16 04:10:34 UTC (rev 21325)
@@ -1196,7 +1196,7 @@
 
 	_lockWord |= 0x8000;
 
-	dst = dx_lock_2();
+	dst = getBackBuf();
 	dst += y * _dxSurfacePitch + x * 8 + fcs->textColumnOffset;
 
 	switch(_language) {

Modified: scummvm/trunk/engines/simon/icons.cpp
===================================================================
--- scummvm/trunk/engines/simon/icons.cpp	2006-03-16 03:48:42 UTC (rev 21324)
+++ scummvm/trunk/engines/simon/icons.cpp	2006-03-16 04:10:34 UTC (rev 21325)
@@ -160,7 +160,7 @@
 	byte *src;
 
 	_lockWord |= 0x8000;
-	dst = dx_lock_2();
+	dst = getBackBuf();
 
 	if (!(getGameType() == GType_SIMON2)) {
 		// Simon 1

Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp	2006-03-16 03:48:42 UTC (rev 21324)
+++ scummvm/trunk/engines/simon/simon.cpp	2006-03-16 04:10:34 UTC (rev 21325)
@@ -1935,7 +1935,7 @@
 				if (x_ >= 311)
 					continue;
 
-				dst = dx_lock_attached();
+				dst = getFrontBuf();
 
 				dst += (((_dxSurfacePitch / 4) * y_) * 4) + x_;
 
@@ -2386,7 +2386,6 @@
 	_lockWord |= 0x20;
 
 	if (vga_res_id == 0) {
-
 		if (getGameType() == GType_SIMON1) {
 			_unkPalFlag = true;
 		} else {
@@ -2734,7 +2733,7 @@
 }
 
 void SimonEngine::timer_vga_sprites_helper() {
-	byte *dst = dx_lock_2();
+	byte *dst = getBackBuf();
 	const byte *src;
 	uint x;
 
@@ -3100,7 +3099,7 @@
 
 	_lockWord |= 0x8000;
 
-	dst = dx_lock_2();
+	dst = getBackBuf();
 	dst += _dxSurfacePitch * fcs->y + fcs->x * 8;
 
 	h = fcs->height * 8;
@@ -3257,7 +3256,7 @@
 	uint w, h, i;
 
 	_lockWord |= 0x8000;
-	src = dx_lock_2() + ha->y * _dxSurfacePitch + ha->x;
+	src = getBackBuf() + ha->y * _dxSurfacePitch + ha->x;
 
 	w = ha->width;
 	h = ha->height;
@@ -3782,7 +3781,7 @@
 	byte *dst, *src;
 	uint i;
 
-	dst = dx_lock_2();
+	dst = getBackBuf();
 	src = _sdl_buf_3;
 
 	dst += y * _dxSurfacePitch;
@@ -4170,17 +4169,17 @@
 	}
 }
 
-byte *SimonEngine::dx_lock_2() {
+byte *SimonEngine::getBackBuf() {
 	_dxSurfacePitch = _screenWidth;
 	return _sdl_buf;
 }
 
-byte *SimonEngine::dx_lock_attached() {
+byte *SimonEngine::getFrontBuf() {
 	_dxSurfacePitch = _screenWidth;
 	return _dxUse3Or4ForLock ? _sdl_buf_3 : _sdl_buf_attached;
 }
 
-byte *SimonEngine::dx_lock_scaled() {
+byte *SimonEngine::getScaleBuf() {
 	_dxSurfacePitch = _screenWidth;
 	return _sdl_buf_scaled;
 }

Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h	2006-03-16 03:48:42 UTC (rev 21324)
+++ scummvm/trunk/engines/simon/simon.h	2006-03-16 04:10:34 UTC (rev 21325)
@@ -814,9 +814,9 @@
 
 	void dx_copy_rgn_from_3_to_2(uint b, uint r, uint y, uint x);
 
-	byte *dx_lock_2();
-	byte *dx_lock_attached();
-	byte *dx_lock_scaled();
+	byte *getBackBuf();
+	byte *getFrontBuf();
+	byte *getScaleBuf();
 
 	byte *read_vga_from_datfile_2(uint id, uint type);
 

Modified: scummvm/trunk/engines/simon/vga.cpp
===================================================================
--- scummvm/trunk/engines/simon/vga.cpp	2006-03-16 03:48:42 UTC (rev 21324)
+++ scummvm/trunk/engines/simon/vga.cpp	2006-03-16 04:10:34 UTC (rev 21325)
@@ -748,7 +748,7 @@
 
 		vcWriteVar(251, _scrollX);
 
-		dst = dx_lock_attached();
+		dst = getFrontBuf();
 		src = state.depack_src + _scrollX * 4;
 
 		for (w = 0; w < 40; w++) {
@@ -771,10 +771,10 @@
 	state.width = state.draw_width = width;	/* cl */
 	state.height = state.draw_height = height;	/* ch */
 
-	state.surf2_addr = dx_lock_2();
+	state.surf2_addr = getBackBuf();
 	state.surf2_pitch = _dxSurfacePitch;
 
-	state.surf_addr = dx_lock_attached();
+	state.surf_addr = getFrontBuf();
 	state.surf_pitch = _dxSurfacePitch;
 
 	if (getGameType() == GType_FF) {
@@ -848,7 +848,7 @@
 void SimonEngine::drawImages_Feeble(VC10_state *state) {
 	if (state->flags & kDFCompressed) {
 		if (state->flags & kDFScaled) {
-			state->surf_addr = dx_lock_scaled();
+			state->surf_addr = getScaleBuf();
 			state->surf_pitch = _dxSurfacePitch;
 
 			uint w, h;
@@ -887,7 +887,7 @@
 				scaleClip(state->height, state->width, state->y, state->x, _scrollY);
 			}
 		} else 	if (state->flags & kDFOverlayed) {
-			state->surf_addr = dx_lock_scaled();
+			state->surf_addr = getScaleBuf();
 			state->surf_pitch = _dxSurfacePitch;
 			state->surf_addr += state->x + state->y * state->surf_pitch;
 
@@ -1238,7 +1238,7 @@
 		}
 		/* vc10_helper_4 */
 	} else {
-		if (getGameType() == GType_SIMON2 && state->flags & 0x4 && _bitArray[10] & 0x800) {
+		if (getGameType() == GType_SIMON2 && state->flags & kDFUseBackBuf && _bitArray[10] & 0x800) {
 			state->surf_addr = state->surf2_addr;
 			state->surf_pitch = state->surf2_pitch;
 		}

Modified: scummvm/trunk/engines/simon/vga.h
===================================================================
--- scummvm/trunk/engines/simon/vga.h	2006-03-16 03:48:42 UTC (rev 21324)
+++ scummvm/trunk/engines/simon/vga.h	2006-03-16 04:10:34 UTC (rev 21325)
@@ -100,6 +100,7 @@
 enum DrawFlags {
 	kDFFlip           = 0x1,
 	kDFNonTrans       = 0x2,
+	kDFUseBackBuf     = 0x4,
 	kDFCompressed     = 0x8,
 	kDFCompressedFlip = 0x10,
 	kDFMasked         = 0x20,


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list