[Scummvm-cvs-logs] scummvm master -> f857859041e15d36a88e7843d289024962ddb1b1

dreammaster dreammaster at scummvm.org
Fri Dec 11 02:21:30 CET 2015


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:
f857859041 ACCESS: Fix showing inventory after loading a close-up savegame


Commit: f857859041e15d36a88e7843d289024962ddb1b1
    https://github.com/scummvm/scummvm/commit/f857859041e15d36a88e7843d289024962ddb1b1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-12-10T20:20:51-05:00

Commit Message:
ACCESS: Fix showing inventory after loading a close-up savegame

Changed paths:
    engines/access/asurface.cpp
    engines/access/asurface.h



diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp
index abae6bf..cb51431 100644
--- a/engines/access/asurface.cpp
+++ b/engines/access/asurface.cpp
@@ -294,6 +294,13 @@ void ASurface::copyBlock(ASurface *src, const Common::Rect &bounds) {
 	copyRectToSurface(*src, bounds.left, bounds.top, bounds);
 }
 
+void ASurface::copyTo(ASurface *dest) { 
+	if (dest->empty())
+		dest->create(this->w, this->h);
+
+	dest->blitFrom(*this); 
+}
+
 void ASurface::saveBlock(const Common::Rect &bounds) {
 	_savedBounds = bounds;
 	_savedBounds.clip(Common::Rect(0, 0, this->w, this->h));
diff --git a/engines/access/asurface.h b/engines/access/asurface.h
index ce9928c..dd05c80 100644
--- a/engines/access/asurface.h
+++ b/engines/access/asurface.h
@@ -63,6 +63,8 @@ public:
 
 	void create(uint16 width, uint16 height);
 
+	bool empty() const { return w == 0 || h == 0 || pixels == nullptr; }
+
 	void clearBuffer();
 
 	bool clip(Common::Rect &r);
@@ -113,7 +115,7 @@ public:
 
 	virtual void addDirtyRect(const Common::Rect &r) {}
 
-	void copyTo(ASurface *dest) { dest->blitFrom(*this); }
+	void copyTo(ASurface *dest);
 
 	void saveBlock(const Common::Rect &bounds);
 






More information about the Scummvm-git-logs mailing list