[Scummvm-cvs-logs] SF.net SVN: scummvm:[41612] scummvm/branches/gsoc2009-draci/engines/draci
dkasak13 at users.sourceforge.net
dkasak13 at users.sourceforge.net
Wed Jun 17 23:07:59 CEST 2009
Revision: 41612
http://scummvm.svn.sourceforge.net/scummvm/?rev=41612&view=rev
Author: dkasak13
Date: 2009-06-17 21:07:59 +0000 (Wed, 17 Jun 2009)
Log Message:
-----------
Changed the _font DraciEngine member from a Font instance to a pointer to an instance. This way the default constructor is invoked in DraciEngine::init() and can properly initialize the fonts because the game data paths are set.
Modified Paths:
--------------
scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp
scummvm/branches/gsoc2009-draci/engines/draci/draci.h
Modified: scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp 2009-06-17 18:48:41 UTC (rev 41611)
+++ scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp 2009-06-17 21:07:59 UTC (rev 41612)
@@ -68,10 +68,11 @@
// Initialize graphics using following:
initGraphics(_screenWidth, _screenHeight, false);
- _screen = new Screen(this);
+ _screen = new Screen(this);
+ _font = new Font();
// Load default font
- _font.setFont(kFontBig);
+ _font->setFont(kFontBig);
// Basic archive test
debugC(2, kDraciGeneralDebugLevel, "Running archive tests...");
@@ -138,18 +139,18 @@
// Draw big string
Common::String testString = "Testing, testing, read all about it!";
Graphics::Surface *surf = _screen->getSurface();
- _font.drawString(surf, testString,
- (320 - _font.getStringWidth(testString, 1)) / 2, 130, 1);
+ _font->drawString(surf, testString,
+ (320 - _font->getStringWidth(testString, 1)) / 2, 130, 1);
// Draw small string
- _font.setFont(kFontSmall);
+ _font->setFont(kFontSmall);
testString = "I'm smaller than the font above me.";
- _font.drawString(surf, testString,
- (320 - _font.getStringWidth(testString, 1)) / 2, 150, 1);
+ _font->drawString(surf, testString,
+ (320 - _font->getStringWidth(testString, 1)) / 2, 150, 1);
// Overflow handling test
testString = "Checking overflooooooooooooooooooooooooow...";
- _font.drawString(surf, testString, 50, 170, 1);
+ _font->drawString(surf, testString, 50, 170, 1);
_screen->copyToScreen();
Modified: scummvm/branches/gsoc2009-draci/engines/draci/draci.h
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/draci.h 2009-06-17 18:48:41 UTC (rev 41611)
+++ scummvm/branches/gsoc2009-draci/engines/draci/draci.h 2009-06-17 21:07:59 UTC (rev 41612)
@@ -46,7 +46,7 @@
bool hasFeature(Engine::EngineFeature f) const;
- Font _font;
+ Font *_font;
Screen *_screen;
int _screenWidth;
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