aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kasak2009-07-01 01:25:48 +0000
committerDenis Kasak2009-07-01 01:25:48 +0000
commit4c86646db67d8f7d66f96e633af0bd1ca8e14f25 (patch)
treee8bd03ad3353b92177f166cabef315d776f9e093
parentd7f8cbf17068b4e0a8fa97cf11e72a0fc51e6908 (diff)
downloadscummvm-rg350-4c86646db67d8f7d66f96e633af0bd1ca8e14f25.tar.gz
scummvm-rg350-4c86646db67d8f7d66f96e633af0bd1ca8e14f25.tar.bz2
scummvm-rg350-4c86646db67d8f7d66f96e633af0bd1ca8e14f25.zip
Changed intro animation to render text via the new Text class.
svn-id: r41983
-rw-r--r--engines/draci/draci.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index 5ace58c8bc..da81074655 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -121,20 +121,34 @@ int DraciEngine::go() {
_screen->fillScreen(225);
// Draw big string
- 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);
+ uint16 xpos;
+ uint16 ypos;
+
+ Common::String testString = "Testing, testing, read all about it!";
+ 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);
+
+ txt2.draw(surf);
- // Overflow handling test
+ // 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();