[Scummvm-cvs-logs] SF.net SVN: scummvm:[35658] scummvm/trunk/engines/gob/video.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Jan 2 01:50:53 CET 2009


Revision: 35658
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35658&view=rev
Author:   lordhoto
Date:     2009-01-02 00:50:53 +0000 (Fri, 02 Jan 2009)

Log Message:
-----------
Cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/gob/video.cpp

Modified: scummvm/trunk/engines/gob/video.cpp
===================================================================
--- scummvm/trunk/engines/gob/video.cpp	2009-01-01 23:54:09 UTC (rev 35657)
+++ scummvm/trunk/engines/gob/video.cpp	2009-01-02 00:50:53 UTC (rev 35658)
@@ -557,11 +557,7 @@
 	uint32 color = 0x2;
 	Graphics::Surface surf;
 
-	surf.w = g_system->getWidth();
-	surf.h = font.getFontHeight();
-	surf.pitch = surf.w;
-	surf.bytesPerPixel = 1;
-	surf.pixels = calloc(surf.w, surf.h);
+	surf.create(g_system->getWidth(), font.getFontHeight(), surf.bytesPerPixel);
 
 	font.drawString(&surf, text, 0, 0, surf.w, color, Graphics::kTextAlignCenter);
 
@@ -569,7 +565,7 @@
 	g_system->copyRectToScreen((byte *)surf.pixels, surf.pitch, 0, y, surf.w, surf.h);
 	g_system->updateScreen();
 
-	free(surf.pixels);
+	surf.free();
 }
 
 } // End of namespace Gob


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