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

kirben at users.sourceforge.net kirben at users.sourceforge.net
Wed Mar 22 05:55:08 CET 2006


Revision: 21406
Author:   kirben
Date:     2006-03-22 05:54:26 -0800 (Wed, 22 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21406&view=rev

Log Message:
-----------
Rename draw buffers correctly

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-22 11:57:46 UTC (rev 21405)
+++ scummvm/trunk/engines/simon/charset.cpp	2006-03-22 13:54:26 UTC (rev 21406)
@@ -1196,7 +1196,7 @@
 
 	_lockWord |= 0x8000;
 
-	dst = getBackBuf();
+	dst = getFrontBuf();
 	dst += y * _dxSurfacePitch + x * 8 + fcs->textColumnOffset;
 
 	switch(_language) {

Modified: scummvm/trunk/engines/simon/icons.cpp
===================================================================
--- scummvm/trunk/engines/simon/icons.cpp	2006-03-22 11:57:46 UTC (rev 21405)
+++ scummvm/trunk/engines/simon/icons.cpp	2006-03-22 13:54:26 UTC (rev 21406)
@@ -160,7 +160,7 @@
 	byte *src;
 
 	_lockWord |= 0x8000;
-	dst = getBackBuf();
+	dst = getFrontBuf();
 
 	if (!(getGameType() == GType_SIMON2)) {
 		// Simon 1

Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp	2006-03-22 11:57:46 UTC (rev 21405)
+++ scummvm/trunk/engines/simon/simon.cpp	2006-03-22 13:54:26 UTC (rev 21406)
@@ -1950,7 +1950,7 @@
 				if (x_ >= 311)
 					continue;
 
-				dst = getFrontBuf();
+				dst = getBackBuf();
 
 				dst += (((_dxSurfacePitch / 4) * y_) * 4) + x_;
 
@@ -2750,7 +2750,7 @@
 }
 
 void SimonEngine::timer_vga_sprites_helper() {
-	byte *dst = getBackBuf();
+	byte *dst = getFrontBuf();
 	const byte *src;
 	uint x;
 
@@ -3112,7 +3112,7 @@
 
 	_lockWord |= 0x8000;
 
-	dst = getBackBuf();
+	dst = getFrontBuf();
 	dst += _dxSurfacePitch * fcs->y + fcs->x * 8;
 
 	h = fcs->height * 8;
@@ -3269,7 +3269,7 @@
 	uint w, h, i;
 
 	_lockWord |= 0x8000;
-	src = getBackBuf() + ha->y * _dxSurfacePitch + ha->x;
+	src = getFrontBuf() + ha->y * _dxSurfacePitch + ha->x;
 
 	w = ha->width;
 	h = ha->height;
@@ -3839,7 +3839,7 @@
 	byte *dst, *src;
 	uint i;
 
-	dst = getBackBuf();
+	dst = getFrontBuf();
 	src = _sdl_buf_3;
 
 	dst += y * _dxSurfacePitch;
@@ -4227,12 +4227,12 @@
 	}
 }
 
-byte *SimonEngine::getBackBuf() {
+byte *SimonEngine::getFrontBuf() {
 	_dxSurfacePitch = _screenWidth;
 	return _sdl_buf;
 }
 
-byte *SimonEngine::getFrontBuf() {
+byte *SimonEngine::getBackBuf() {
 	_dxSurfacePitch = _screenWidth;
 	return _dxUse3Or4ForLock ? _sdl_buf_3 : _sdl_buf_attached;
 }

Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h	2006-03-22 11:57:46 UTC (rev 21405)
+++ scummvm/trunk/engines/simon/simon.h	2006-03-22 13:54:26 UTC (rev 21406)
@@ -813,8 +813,8 @@
 
 	void restoreBlock(uint b, uint r, uint y, uint x);
 
+	byte *getFrontBuf();
 	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-22 11:57:46 UTC (rev 21405)
+++ scummvm/trunk/engines/simon/vga.cpp	2006-03-22 13:54:26 UTC (rev 21406)
@@ -748,7 +748,7 @@
 
 		vcWriteVar(251, _scrollX);
 
-		dst = getFrontBuf();
+		dst = getBackBuf();
 		src = state.depack_src + _scrollX * 4;
 
 		for (w = 0; w < 40; w++) {
@@ -774,10 +774,10 @@
 	state.x_skip = 0;				/* colums to skip = bh */
 	state.y_skip = 0;				/* rows to skip   = bl */
 
-	state.surf2_addr = getBackBuf();
+	state.surf2_addr = getFrontBuf();
 	state.surf2_pitch = _dxSurfacePitch;
 
-	state.surf_addr = getFrontBuf();
+	state.surf_addr = getBackBuf();
 	state.surf_pitch = _dxSurfacePitch;
 
 	if (getGameType() == GType_FF) {
@@ -881,7 +881,7 @@
 			} else {
 				scaleClip(state->height, state->width, state->y, state->x, state->y + _scrollY);
 			}
-		} else 	if (state->flags & kDFOverlayed) {
+		} else if (state->flags & kDFOverlayed) {
 			state->surf_addr = getScaleBuf();
 			state->surf_pitch = _dxSurfacePitch;
 			state->surf_addr += state->x + state->y * state->surf_pitch;
@@ -912,7 +912,7 @@
 			} while (++w != state->draw_width);
 
 			_vgaCurSpritePriority /= 10;
-			if (_vgaCurSpritePriority != 900) {
+			if (_vgaCurSpritePriority == 900) {
 				scaleClip(_scaleHeight, _scaleWidth, _scaleY, _scaleX, _scaleY + _scrollY);
 			}
 		} else {
@@ -1136,7 +1136,7 @@
 		do {
 			mask = vc10_depack_column(state);	/* esi */
 			src = state->surf2_addr + w * 2;	/* ebx */
-			dst = state->surf_addr + w * 2;	/* edi */
+			dst = state->surf_addr + w * 2;		/* edi */
 
 			h = state->draw_height;
 			if ((getGameType() == GType_SIMON1) && vcGetBit(88)) {
@@ -1280,7 +1280,7 @@
 		}
 		/* vc10_helper_4 */
 	} else {
-		if (getGameType() == GType_SIMON2 && state->flags & kDFUseBackBuf && _bitArray[10] & 0x800) {
+		if (getGameType() == GType_SIMON2 && state->flags & kDFUseFrontBuf && _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-22 11:57:46 UTC (rev 21405)
+++ scummvm/trunk/engines/simon/vga.h	2006-03-22 13:54:26 UTC (rev 21406)
@@ -100,7 +100,7 @@
 enum DrawFlags {
 	kDFFlip           = 0x1,
 	kDFNonTrans       = 0x2,
-	kDFUseBackBuf     = 0x4,
+	kDFUseFrontBuf    = 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