From 31ceb0bb71d2f6446a54aa4d9c7896472e1534de Mon Sep 17 00:00:00 2001 From: Andrew Kurushin Date: Sun, 9 Jan 2005 23:41:22 +0000 Subject: - GameModule is gone - structures renamed - SagaEngine class gives all current game descriptions regression : "verb" is broken cause work in progress svn-id: r16511 --- saga/font.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'saga/font.cpp') diff --git a/saga/font.cpp b/saga/font.cpp index d28db992d6..0b0bc67608 100644 --- a/saga/font.cpp +++ b/saga/font.cpp @@ -33,7 +33,6 @@ namespace Saga { Font::Font(SagaEngine *vm) : _vm(vm), _initialized(false) { - GAME_FONTDESC *gamefonts; int i; // Load font module resource context @@ -42,10 +41,9 @@ Font::Font(SagaEngine *vm) : _vm(vm), _initialized(false) { error("Font::Font(): Couldn't get resource context."); } - // Allocate font table - _vm->getFontInfo(&gamefonts, &_nFonts); + assert(_vm->getFontsCount() > 0); - assert(_nFonts > 0); + _nFonts = _vm->getFontsCount(); _fonts = (FONT **)malloc(_nFonts * sizeof(*_fonts)); if (_fonts == NULL) { @@ -53,7 +51,7 @@ Font::Font(SagaEngine *vm) : _vm(vm), _initialized(false) { } for (i = 0; i < _nFonts; i++) { - loadFont(gamefonts[i].font_rn, gamefonts[i].font_id); + loadFont(_vm->getFontDescription(i)->font_rn, _vm->getFontDescription(i)->font_id); } _initialized = true; -- cgit v1.2.3