[Scummvm-cvs-logs] SF.net SVN: scummvm:[41983] scummvm/branches/gsoc2009-draci/engines/draci/ draci.cpp
dkasak13 at users.sourceforge.net
dkasak13 at users.sourceforge.net
Wed Jul 1 03:25:48 CEST 2009
Revision: 41983
http://scummvm.svn.sourceforge.net/scummvm/?rev=41983&view=rev
Author: dkasak13
Date: 2009-07-01 01:25:48 +0000 (Wed, 01 Jul 2009)
Log Message:
-----------
Changed intro animation to render text via the new Text class.
Modified Paths:
--------------
scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp
Modified: scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp 2009-07-01 01:18:22 UTC (rev 41982)
+++ scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp 2009-07-01 01:25:48 UTC (rev 41983)
@@ -121,21 +121,35 @@
_screen->fillScreen(225);
// Draw big string
+
+ Surface *surf = _screen->getSurface();
+ uint16 xpos;
+ uint16 ypos;
+
Common::String testString = "Testing, testing, read all about it!";
- Surface *surf = _screen->getSurface();
- _font->drawString(surf, testString,
- (kScreenWidth - _font->getStringWidth(testString, 1)) / 2, 130, 1);
+ xpos = (kScreenWidth - _font->getStringWidth(testString, 1)) / 2;
+ ypos = 130;
+ Text txt1(testString, _font, kFontColour1, xpos, ypos, 1);
+
+ txt1.draw(surf);
// Draw small string
_font->setFont(kFontSmall);
testString = "I'm smaller than the font above me.";
- _font->drawString(surf, testString,
- (kScreenWidth - _font->getStringWidth(testString, 1)) / 2, 150, 1);
+ xpos = (kScreenWidth - _font->getStringWidth(testString, 1)) / 2;
+ ypos += 20;
+ Text txt2(testString, _font, kFontColour1, xpos, ypos, 1);
- // Overflow handling test
+ txt2.draw(surf);
+
+ // Overflow handling test
testString = "Checking overflooooooooooooooooooooooooow...";
- _font->drawString(surf, testString, 50, 170, 1);
+ xpos = 50;
+ ypos += 20;
+ Text txt3(testString, _font, kFontColour1, xpos, ypos, 1);
+ txt3.draw(surf);
+
_screen->copyToScreen();
// Draw and animate the dragon
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