[Scummvm-cvs-logs] scummvm master -> 2b2dffc02ce4c37466b1d31cf53ddb963a05e185

dreammaster dreammaster at scummvm.org
Fri May 27 12:01:54 CEST 2016


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

Summary:
e68de1d3b5 ACCESS: Remove redundant allocation in surface creation
f582548516 MADS: Remove redundant allocation in surface creation
2b2dffc02c SHERLOCK: Remove redundant allocation in surface creation


Commit: e68de1d3b57baae7b67e20113c365fb64b46e0b6
    https://github.com/scummvm/scummvm/commit/e68de1d3b57baae7b67e20113c365fb64b46e0b6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-05-27T06:00:48-04:00

Commit Message:
ACCESS: Remove redundant allocation in surface creation

Changed paths:
    engines/access/asurface.cpp



diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp
index e92869b..37f4c70 100644
--- a/engines/access/asurface.cpp
+++ b/engines/access/asurface.cpp
@@ -110,7 +110,8 @@ void ImageEntryList::addToList(ImageEntry &ie) {
 int BaseSurface::_clipWidth;
 int BaseSurface::_clipHeight;
 
-BaseSurface::BaseSurface(): Graphics::Screen() {
+BaseSurface::BaseSurface(): Graphics::Screen(0, 0) {
+	free();		// Free the 0x0 surface allocated by Graphics::Screen
 	_leftSkip = _rightSkip = 0;
 	_topSkip = _bottomSkip = 0;
 	_lastBoundsX = _lastBoundsY = 0;


Commit: f582548516fa09d04f381445ce35b03e2fae5b59
    https://github.com/scummvm/scummvm/commit/f582548516fa09d04f381445ce35b03e2fae5b59
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-05-27T06:00:58-04:00

Commit Message:
MADS: Remove redundant allocation in surface creation

Changed paths:
    engines/mads/msurface.h



diff --git a/engines/mads/msurface.h b/engines/mads/msurface.h
index 733a29d..5b5a1d6 100644
--- a/engines/mads/msurface.h
+++ b/engines/mads/msurface.h
@@ -74,7 +74,9 @@ public:
 	/**
 	 * Basic constructor
 	 */
-	BaseSurface() : Graphics::Screen() {}
+	BaseSurface() : Graphics::Screen(0, 0) {
+		free();		// Free the 0x0 surface allocated by Graphics::Screen
+	}
 
 	/**
 	 * Constructor for a surface with fixed dimensions


Commit: 2b2dffc02ce4c37466b1d31cf53ddb963a05e185
    https://github.com/scummvm/scummvm/commit/2b2dffc02ce4c37466b1d31cf53ddb963a05e185
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-05-27T06:01:15-04:00

Commit Message:
SHERLOCK: Remove redundant allocation in surface creation

Changed paths:
    engines/sherlock/screen.cpp
    engines/sherlock/surface.cpp



diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp
index a79f5f4..a829ab2 100644
--- a/engines/sherlock/screen.cpp
+++ b/engines/sherlock/screen.cpp
@@ -40,7 +40,9 @@ Screen *Screen::init(SherlockEngine *vm) {
 		return new Scalpel::ScalpelScreen(vm);
 }
 
-Screen::Screen(SherlockEngine *vm) : BaseSurface(), _vm(vm) {
+Screen::Screen(SherlockEngine *vm) : BaseSurface(), _vm(vm),
+		_backBuffer1(vm->getGameID() == GType_RoseTattoo ? 640 : 320, vm->getGameID() == GType_RoseTattoo ? 480 : 200),
+		_backBuffer2(vm->getGameID() == GType_RoseTattoo ? 640 : 320, vm->getGameID() == GType_RoseTattoo ? 480 : 200) {
 	_transitionSeed = 1;
 	_fadeStyle = false;
 	Common::fill(&_cMap[0], &_cMap[PALETTE_SIZE], 0);
@@ -55,6 +57,7 @@ Screen::Screen(SherlockEngine *vm) : BaseSurface(), _vm(vm) {
 	_oldFadePercent = 0;
 	_flushScreen = false;
 
+	create(_backBuffer1.w, _backBuffer1.h);
 	_backBuffer.create(_backBuffer1, _backBuffer1.getBounds());
 }
 
diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp
index 92ebdb6..93bc001 100644
--- a/engines/sherlock/surface.cpp
+++ b/engines/sherlock/surface.cpp
@@ -25,7 +25,8 @@
 
 namespace Sherlock {
 
-BaseSurface::BaseSurface() : Graphics::Screen(), Fonts() {
+BaseSurface::BaseSurface() : Graphics::Screen(0, 0), Fonts() {
+	free();		// Free the 0x0 surface allocated by Graphics::Screen
 }
 
 BaseSurface::BaseSurface(int width, int height) : Graphics::Screen(width, height),






More information about the Scummvm-git-logs mailing list