From ab326af54e97206e88e53a95009345150f6b7bbb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 3 Aug 2004 01:12:08 +0000 Subject: Rename some class variables in Font class. Fix compilation. svn-id: r14452 --- saga/font.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'saga/font.cpp') diff --git a/saga/font.cpp b/saga/font.cpp index 0c6c5eed59..0de00a92f1 100644 --- a/saga/font.cpp +++ b/saga/font.cpp @@ -37,22 +37,22 @@ Font::Font(SagaEngine *vm) : _vm(vm), _initialized(false) { int i; // Load font module resource context - if (GAME_GetFileContext(&_font_ctxt, + if (GAME_GetFileContext(&_fontContext, R_GAME_RESOURCEFILE, 0) != R_SUCCESS) { error("Font::Font(): Couldn't get resource context."); } // Allocate font table - GAME_GetFontInfo(&gamefonts, &_n_fonts); + GAME_GetFontInfo(&gamefonts, &_nFonts); - assert(_n_fonts > 0); + assert(_nFonts > 0); - _fonts = (R_FONT **)malloc(_n_fonts * sizeof *_fonts); + _fonts = (R_FONT **)malloc(_nFonts * sizeof *_fonts); if (_fonts == NULL) { error("Font::Font(): Memory allocation failure."); } - for (i = 0; i < _n_fonts; i++) { + for (i = 0; i < _nFonts; i++) { loadFont(gamefonts[i].font_rn, gamefonts[i].font_id); } @@ -91,12 +91,12 @@ int Font::loadFont(uint32 font_rn, int font_id) { int nbits; int c; - if ((font_id < 0) || (font_id >= _n_fonts)) { + if ((font_id < 0) || (font_id >= _nFonts)) { return R_FAILURE; } // Load font resource - if (RSC_LoadResource(_font_ctxt, font_rn, &fontres_p, &fontres_len) != R_SUCCESS) { + if (RSC_LoadResource(_fontContext, font_rn, &fontres_p, &fontres_len) != R_SUCCESS) { error("Font::loadFont(): Couldn't load font resource."); return R_FAILURE; } @@ -182,7 +182,7 @@ int Font::getHeight(int font_id) { return R_FAILURE; } - if ((font_id < 0) || (font_id >= _n_fonts) || (_fonts[font_id] == NULL)) { + if ((font_id < 0) || (font_id >= _nFonts) || (_fonts[font_id] == NULL)) { error("Font::getHeight(): Invalid font id."); return R_FAILURE; } @@ -348,7 +348,7 @@ int Font::getStringWidth(int font_id, const char *test_str, size_t test_str_ct, return R_FAILURE; } - if ((font_id < 0) || (font_id >= _n_fonts) || (_fonts[font_id] == NULL)) { + if ((font_id < 0) || (font_id >= _nFonts) || (_fonts[font_id] == NULL)) { error("Font::getStringWidth(): Invalid font id."); return R_FAILURE; } @@ -383,7 +383,7 @@ int Font::draw(int font_id, R_SURFACE *ds, const char *draw_str, size_t draw_str return R_FAILURE; } - if ((font_id < 0) || (font_id >= _n_fonts) || (_fonts[font_id] == NULL)) { + if ((font_id < 0) || (font_id >= _nFonts) || (_fonts[font_id] == NULL)) { error("Font::draw(): Invalid font id."); return R_FAILURE; } -- cgit v1.2.3