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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Mar 26 23:26:59 CET 2008


Revision: 31256
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31256&view=rev
Author:   fingolfin
Date:     2008-03-26 15:26:59 -0700 (Wed, 26 Mar 2008)

Log Message:
-----------
Init the _fmtownsBuf in the constructor, not in setupScumm() (fixes a leak, and ensure that _fmtownsBuf always is inited)

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/scumm.cpp

Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2008-03-26 21:58:56 UTC (rev 31255)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2008-03-26 22:26:59 UTC (rev 31256)
@@ -528,6 +528,11 @@
 	else
 		_compositeBuf = 0;
 
+	_fmtownsBuf = 0;
+	if (_game.platform == Common::kPlatformFMTowns && _language == Common::JA_JPN) {
+		_fmtownsBuf = (byte *)malloc(_screenWidth * _textSurfaceMultiplier * _screenHeight * _textSurfaceMultiplier);
+	}
+
 	_herculesBuf = 0;
 	if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
 		_herculesBuf = (byte *)malloc(Common::kHercW * Common::kHercH);
@@ -1198,11 +1203,6 @@
 	Graphics::initfonts();
 #endif
 
-	_fmtownsBuf = 0;
-	if (_game.platform == Common::kPlatformFMTowns && _language == Common::JA_JPN) {
-		_fmtownsBuf = (byte *)malloc(_screenWidth * _textSurfaceMultiplier * _screenHeight * _textSurfaceMultiplier);
-	}
-
 	free(_compositeBuf);
 	_compositeBuf = (byte *)malloc(_screenWidth * _textSurfaceMultiplier * _screenHeight * _textSurfaceMultiplier);
 }


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