From a4a3ad123cb407fc9862acb43d3ca2ea27d2da2b Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Wed, 15 Jul 2009 18:16:54 +0000 Subject: Renamed Font::setFont() to loadFont(). Removed DraciEngine::_font and added _smallFont and _bigFont so each font can be handled separately. svn-id: r42514 --- engines/draci/draci.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'engines/draci/draci.cpp') diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp index e9df63f9cd..1575ee2545 100644 --- a/engines/draci/draci.cpp +++ b/engines/draci/draci.cpp @@ -85,16 +85,16 @@ int DraciEngine::init() { _overlaysArchive = new BArchive(overlaysPath); _animationsArchive = new BArchive(animationsPath); + // Load the game's fonts + _smallFont = new Font(kFontSmall); + _bigFont = new Font(kFontBig); + _screen = new Screen(this); - _font = new Font(); _anims = new AnimationManager(this); _mouse = new Mouse(this); _script = new Script(this); _game = new Game(this); - // Load default font - _font->setFont(kFontBig); - if(!_objectsArchive->isOpen()) { debugC(2, kDraciGeneralDebugLevel, "ERROR - Opening objects archive failed"); return Common::kUnknownError; @@ -166,8 +166,11 @@ DraciEngine::~DraciEngine() { // Dispose your resources here // TODO: Investigate possibility of using sharedPtr or similar + + delete _smallFont; + delete _bigFont; + delete _screen; - delete _font; delete _mouse; delete _game; delete _script; -- cgit v1.2.3