[Scummvm-cvs-logs] scummvm master -> 300a04700a94a3899f76300cfe7eda3a5756caef

dreammaster dreammaster at scummvm.org
Mon Jan 2 00:18:14 CET 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
300a04700a TSAGE: Implemented changes for dirty rect handling needed for R2R


Commit: 300a04700a94a3899f76300cfe7eda3a5756caef
    https://github.com/scummvm/scummvm/commit/300a04700a94a3899f76300cfe7eda3a5756caef
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2012-01-01T15:17:44-08:00

Commit Message:
TSAGE: Implemented changes for dirty rect handling needed for R2R

Changed paths:
    engines/tsage/graphics.cpp
    engines/tsage/graphics.h



diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 4b9a4ad..8436afe 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -1301,6 +1301,25 @@ int GfxManager::getAngle(const Common::Point &p1, const Common::Point &p2) {
 		return result;
 	}
 }
+
+
+void GfxManager::copyFrom(GfxSurface &src, Rect destBounds, Region *priorityRegion) {
+	if (&_surface == &(GLOBALS._screenSurface))
+		_surface.setBounds(Rect(0, 0, _bounds.width(), _bounds.height()));
+	else
+		_surface.setBounds(_bounds);
+
+	_surface.copyFrom(src, destBounds, priorityRegion);
+}
+void GfxManager::copyFrom(GfxSurface &src, int destX, int destY) {
+	if (&_surface == &(GLOBALS._screenSurface))
+		_surface.setBounds(Rect(0, 0, _bounds.width(), _bounds.height()));
+	else
+		_surface.setBounds(_bounds);
+
+	_surface.copyFrom(src, destX, destY);
+}
+
 /*--------------------------------------------------------------------------*/
 
 
diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h
index ba40903..9c6f13e 100644
--- a/engines/tsage/graphics.h
+++ b/engines/tsage/graphics.h
@@ -83,7 +83,6 @@ private:
 	Common::List<Rect> _dirtyRects;
 
 	void mergeDirtyRects();
-	bool looseIntersectRectangle(const Rect &src1, const Rect &src2);
 	bool unionRectangle(Common::Rect &destRect, const Rect &src1, const Rect &src2);
 
 public:
@@ -302,14 +301,9 @@ public:
 	virtual void set(byte *dest, int size, byte val) {
 		Common::fill(dest, dest + size, val);
 	}
-	void copyFrom(GfxSurface &src, Rect destBounds, Region *priorityRegion = NULL) {
-		_surface.setBounds(_bounds);
-		_surface.copyFrom(src, destBounds, priorityRegion);
-	}
-	void copyFrom(GfxSurface &src, int destX, int destY) {
-		_surface.setBounds(_bounds);
-		_surface.copyFrom(src, destX, destY);
-	}
+	void copyFrom(GfxSurface &src, Rect destBounds, Region *priorityRegion = NULL);
+	void copyFrom(GfxSurface &src, int destX, int destY);
+
 	GfxSurface &getSurface() {
 		_surface.setBounds(_bounds);
 		return _surface;






More information about the Scummvm-git-logs mailing list