[Scummvm-cvs-logs] SF.net SVN: scummvm: [23925] scummvm/trunk/engines/scumm

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Sep 18 01:35:31 CEST 2006


Revision: 23925
          http://svn.sourceforge.net/scummvm/?rev=23925&view=rev
Author:   fingolfin
Date:     2006-09-17 16:35:09 -0700 (Sun, 17 Sep 2006)

Log Message:
-----------
renamed ScummEngine::restoreBG to restoreBackground; renamed and moved Gdi::copyVirtScreenBuffers to ScummEngine_v70he::restoreBackgroundHE

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/actor.cpp
    scummvm/trunk/engines/scumm/charset.cpp
    scummvm/trunk/engines/scumm/gfx.cpp
    scummvm/trunk/engines/scumm/gfx.h
    scummvm/trunk/engines/scumm/he/animation_he.cpp
    scummvm/trunk/engines/scumm/he/floodfill_he.cpp
    scummvm/trunk/engines/scumm/he/intern_he.h
    scummvm/trunk/engines/scumm/he/script_v100he.cpp
    scummvm/trunk/engines/scumm/he/script_v72he.cpp
    scummvm/trunk/engines/scumm/he/sprite_he.cpp
    scummvm/trunk/engines/scumm/he/wiz_he.cpp
    scummvm/trunk/engines/scumm/script_c64.cpp
    scummvm/trunk/engines/scumm/script_v2.cpp
    scummvm/trunk/engines/scumm/script_v5.cpp
    scummvm/trunk/engines/scumm/scumm.h
    scummvm/trunk/engines/scumm/string.cpp
    scummvm/trunk/engines/scumm/verbs.cpp

Modified: scummvm/trunk/engines/scumm/actor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/actor.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/actor.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -2095,7 +2095,7 @@
 		for (int i = 0; i < _auxBlocksNum; ++i) {
 			AuxBlock *ab = &_auxBlocks[i];
 			if (ab->r.top <= ab->r.bottom) {
-				_gdi->copyVirtScreenBuffers(ab->r);
+				restoreBackgroundHE(ab->r);
 			}
 		}
 	}

Modified: scummvm/trunk/engines/scumm/charset.cpp
===================================================================
--- scummvm/trunk/engines/scumm/charset.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/charset.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -24,6 +24,7 @@
 #include "scumm/scumm.h"
 #include "scumm/nut_renderer.h"
 #include "scumm/util.h"
+#include "scumm/he/intern_he.h"
 #include "scumm/he/wiz_he.h"
 
 namespace Scumm {
@@ -1429,7 +1430,7 @@
 
 		if (_blitAlso && vs->hasTwoBuffers) {
 			Common::Rect dst(_left, _top, _left + origWidth, _top + origHeight);
-			_vm->_gdi->copyVirtScreenBuffers(dst);
+			((ScummEngine_v71he *)_vm)->restoreBackgroundHE(dst);
 		}
 #endif
 	} else {

Modified: scummvm/trunk/engines/scumm/gfx.cpp
===================================================================
--- scummvm/trunk/engines/scumm/gfx.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/gfx.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -846,7 +846,7 @@
 	_gdi->drawBitmap(room + _IM00_offs, &virtscr[0], s, 0, _roomWidth, virtscr[0].h, s, num, 0);
 }
 
-void ScummEngine::restoreBG(Common::Rect rect, byte backColor) {
+void ScummEngine::restoreBackground(Common::Rect rect, byte backColor) {
 	VirtScreen *vs;
 	byte *screenBuf;
 
@@ -898,7 +898,7 @@
 		_left = -1;
 
 		// Restore background on the whole text area. This code is based on
-		// restoreBG(), but was changed to only restore those parts which are
+		// restoreBackground(), but was changed to only restore those parts which are
 		// currently covered by the charset mask.
 
 		VirtScreen *vs = &_vm->virtscr[_textScreenID];
@@ -1730,7 +1730,7 @@
 		debug(0, "Gdi::drawBMAPBg: default case %d", code);
 	}
 
-	copyVirtScreenBuffers(Common::Rect(vs->w, vs->h));
+	((ScummEngine_v71he *)_vm)->restoreBackgroundHE(Common::Rect(vs->w, vs->h));
 
 	int numzbuf = getZPlanes(ptr, zplane_list, true);
 	if (numzbuf <= 1)
@@ -1798,14 +1798,14 @@
 		rect1.top -= rect2.top;
 		rect1.bottom -= rect2.top;
 		
-		copyVirtScreenBuffers(rect1);
+		((ScummEngine_v71he *)_vm)->restoreBackgroundHE(rect1);
 	}
 #endif
 }
 
-void Gdi::copyVirtScreenBuffers(Common::Rect rect, int dirtybit) {
+void ScummEngine_v70he::restoreBackgroundHE(Common::Rect rect, int dirtybit) {
 	byte *src, *dst;
-	VirtScreen *vs = &_vm->virtscr[0];
+	VirtScreen *vs = &virtscr[0];
 
 	if (rect.top > vs->h || rect.bottom < 0)
 		return;
@@ -1831,13 +1831,13 @@
 	if (rw == 0 || rh == 0)
 		return;
 
-	src = _vm->virtscr[0].getBackPixels(rect.left, rect.top);
-	dst = _vm->virtscr[0].getPixels(rect.left, rect.top);
+	src = virtscr[0].getBackPixels(rect.left, rect.top);
+	dst = virtscr[0].getPixels(rect.left, rect.top);
 	
-	assert(rw <= _vm->_screenWidth && rw > 0);
-	assert(rh <= _vm->_screenHeight && rh > 0);
-	blit(dst, _vm->virtscr[0].pitch, src, _vm->virtscr[0].pitch, rw, rh);
-	_vm->markRectAsDirty(kMainVirtScreen, rect, dirtybit);
+	assert(rw <= _screenWidth && rw > 0);
+	assert(rh <= _screenHeight && rh > 0);
+	blit(dst, virtscr[0].pitch, src, virtscr[0].pitch, rw, rh);
+	markRectAsDirty(kMainVirtScreen, rect, dirtybit);
 }
 
 /**

Modified: scummvm/trunk/engines/scumm/gfx.h
===================================================================
--- scummvm/trunk/engines/scumm/gfx.h	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/gfx.h	2006-09-17 23:35:09 UTC (rev 23925)
@@ -280,8 +280,6 @@
 	void drawBMAPBg(const byte *ptr, VirtScreen *vs);
 	void drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, int w, int h);
 
-	void copyVirtScreenBuffers(Common::Rect rect, int dirtybit = 0);
-
 	byte *getMaskBuffer(int x, int y, int z);
 	void disableZBuffer() { _zbufferDisabled = true; }
 	void enableZBuffer() { _zbufferDisabled = false; }

Modified: scummvm/trunk/engines/scumm/he/animation_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/animation_he.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/he/animation_he.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -93,7 +93,7 @@
 		copyFrameToBuffer(pvs->getBackPixels(0, 0), 0, 0, _vm->_screenWidth);
 		
 		Common::Rect imageRect(_width, _height);
-		_vm->_gdi->copyVirtScreenBuffers(imageRect);
+		_vm->restoreBackgroundHE(imageRect);
 	} else {
 		copyFrameToBuffer(pvs->getPixels(0, 0), 0, 0, _vm->_screenWidth);
 

Modified: scummvm/trunk/engines/scumm/he/floodfill_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/floodfill_he.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/he/floodfill_he.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -220,7 +220,7 @@
 	
 	if (r.left <= r.right && r.top <= r.bottom) {
 		if (ffp->flags & 0x8000) {
-			vm->_gdi->copyVirtScreenBuffers(r);
+			vm->restoreBackgroundHE(r);
 		} else {
 			++r.bottom;
 			vm->markRectAsDirty(kMainVirtScreen, r);

Modified: scummvm/trunk/engines/scumm/he/intern_he.h
===================================================================
--- scummvm/trunk/engines/scumm/he/intern_he.h	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/he/intern_he.h	2006-09-17 23:35:09 UTC (rev 23925)
@@ -142,6 +142,8 @@
 	byte *heFindResource(uint32 tag, byte *ptr);
 	byte *findWrappedBlock(uint32 tag, byte *ptr, int state, bool flagError);
 
+	void restoreBackgroundHE(Common::Rect rect, int dirtybit = 0);
+
 protected:
 	virtual void setupOpcodes();
 	virtual void executeOpcode(byte i);

Modified: scummvm/trunk/engines/scumm/he/script_v100he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v100he.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/he/script_v100he.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -2151,7 +2151,7 @@
 		debug(0, "Start executable (%s)", string);
 		break;
 	case 75:
-		_gdi->copyVirtScreenBuffers(Common::Rect(_screenWidth, _screenHeight));
+		restoreBackgroundHE(Common::Rect(_screenWidth, _screenHeight));
 		updatePalette();
 		break;
 	default:

Modified: scummvm/trunk/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v72he.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/he/script_v72he.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -1528,7 +1528,7 @@
 		clearDrawObjectQueue();
 		break;
 	case 26: // HE80+
-		_gdi->copyVirtScreenBuffers(Common::Rect(_screenWidth, _screenHeight));
+		restoreBackgroundHE(Common::Rect(_screenWidth, _screenHeight));
 		updatePalette();
 		break;
 	case 158:

Modified: scummvm/trunk/engines/scumm/he/sprite_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/sprite_he.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/he/sprite_he.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -1066,7 +1066,7 @@
 		resetGroup(curGrp);
 
 	if (refreshScreen) {
-		_vm->_gdi->copyVirtScreenBuffers(Common::Rect(_vm->_screenWidth, _vm->_screenHeight));
+		_vm->restoreBackgroundHE(Common::Rect(_vm->_screenWidth, _vm->_screenHeight));
 	}
 	_numSpritesToProcess = 0;
 }
@@ -1084,7 +1084,7 @@
 			spi->flags &= ~kSFChanged;
 			if (spi->bbox.left <= spi->bbox.right && spi->bbox.top <= spi->bbox.bottom) {
 				if (spi->flags & kSFBlitDirectly) {
-					_vm->_gdi->copyVirtScreenBuffers(spi->bbox, USAGE_BIT_RESTORED);
+					_vm->restoreBackgroundHE(spi->bbox, USAGE_BIT_RESTORED);
 				} else if (firstLoop) {
 					xmin = spi->bbox.left;
 					ymin = spi->bbox.top;
@@ -1113,7 +1113,7 @@
 		}
 	}
 	if (refreshScreen) {
-		_vm->_gdi->copyVirtScreenBuffers(Common::Rect(xmin, ymin, xmax, ymax), USAGE_BIT_RESTORED);
+		_vm->restoreBackgroundHE(Common::Rect(xmin, ymin, xmax, ymax), USAGE_BIT_RESTORED);
 	}
 }
 

Modified: scummvm/trunk/engines/scumm/he/wiz_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/wiz_he.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/he/wiz_he.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -1226,7 +1226,7 @@
 				++rImage.bottom;
 				_vm->markRectAsDirty(kMainVirtScreen, rImage);
 			} else {
-				_vm->_gdi->copyVirtScreenBuffers(rImage);
+				_vm->restoreBackgroundHE(rImage);
 			}
 		}
 	}
@@ -1485,7 +1485,7 @@
 		if (flags & kWIFMarkBufferDirty) {
 			_vm->markRectAsDirty(kMainVirtScreen, bound);
 		} else {
-			_vm->_gdi->copyVirtScreenBuffers(bound);
+			_vm->restoreBackgroundHE(bound);
 		}
 
 		free(srcWizBuf);

Modified: scummvm/trunk/engines/scumm/script_c64.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_c64.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/script_c64.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -557,7 +557,7 @@
 	sentenceline.bottom = virtscr[kVerbVirtScreen].topline + 8;
 	sentenceline.left = 0;
 	sentenceline.right = virtscr[kVerbVirtScreen].w - 1;
-	restoreBG(sentenceline);
+	restoreBackground(sentenceline);
 
 	drawString(2, (byte*)string);
 }

Modified: scummvm/trunk/engines/scumm/script_v2.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v2.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/script_v2.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -1095,7 +1095,7 @@
 		sentenceline.left = 0;
 		sentenceline.right = virtscr[kVerbVirtScreen].w - 1;
 	}
-	restoreBG(sentenceline);
+	restoreBackground(sentenceline);
 
 	drawString(2, (byte*)string);
 }
@@ -1608,7 +1608,7 @@
 	} else {
 		rect.left = 0;
 	}
-	restoreBG(rect);
+	restoreBackground(rect);
 
 	// Draw all verbs and inventory
 	redrawVerbs();

Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/script_v5.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -2793,7 +2793,7 @@
 				// For now, we force a redraw of the screen background. This
 				// way the Zak end credits seem to work mostly correct.
 				VirtScreen *vs = &virtscr[0];
-				restoreBG(Common::Rect(0,vs->topline, vs->w, vs->topline + vs->h));
+				restoreBackground(Common::Rect(0,vs->topline, vs->w, vs->topline + vs->h));
 				vs->setDirtyRange(0, vs->h);
 				updateDirtyScreen(kMainVirtScreen);
 

Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/scumm.h	2006-09-17 23:35:09 UTC (rev 23925)
@@ -1011,7 +1011,7 @@
 
 	void moveScreen(int dx, int dy, int height);
 
-	void restoreBG(Common::Rect rect, byte backcolor = 0);
+	void restoreBackground(Common::Rect rect, byte backcolor = 0);
 	void redrawBGStrip(int start, int num);
 	virtual void redrawBGAreas();
 
@@ -1109,7 +1109,7 @@
 	 * needs to be redrawn.
 	 *
 	 * The second leftmost bit is set by removeBlastObject() and
-	 * restoreBG(), but I'm not yet sure why.
+	 * restoreBackground(), but I'm not yet sure why.
 	 */
 	uint32 gfxUsageBits[410 * 3];
 

Modified: scummvm/trunk/engines/scumm/string.cpp
===================================================================
--- scummvm/trunk/engines/scumm/string.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/string.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -184,7 +184,7 @@
 	int i;
 
 	for (i = 0; i < _blastTextQueuePos; i++) {
-		restoreBG(_blastTextQueue[i].rect);
+		restoreBackground(_blastTextQueue[i].rect);
 	}
 	_blastTextQueuePos = 0;
 }

Modified: scummvm/trunk/engines/scumm/verbs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/verbs.cpp	2006-09-17 22:22:50 UTC (rev 23924)
+++ scummvm/trunk/engines/scumm/verbs.cpp	2006-09-17 23:35:09 UTC (rev 23925)
@@ -365,7 +365,7 @@
 	inventoryBox.bottom = vs->topline + virtscr[kVerbVirtScreen].h;
 	inventoryBox.left = 0;
 	inventoryBox.right = vs->w;
-	restoreBG(inventoryBox);
+	restoreBackground(inventoryBox);
 
 	_string[1].charset = 1;
 
@@ -795,7 +795,7 @@
 	vs = &_verbs[verb];
 
 	if (vs->oldRect.left != -1) {
-		restoreBG(vs->oldRect, vs->bkcolor);
+		restoreBackground(vs->oldRect, vs->bkcolor);
 		vs->oldRect.left = -1;
 	}
 }


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