From 4c86646db67d8f7d66f96e633af0bd1ca8e14f25 Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Wed, 1 Jul 2009 01:25:48 +0000 Subject: Changed intro animation to render text via the new Text class. svn-id: r41983 --- engines/draci/draci.cpp | 28 +++++++++++++++++++++------- 1 file 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(); -- cgit v1.2.3