aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorEugene Sandulenko2004-08-03 01:12:08 +0000
committerEugene Sandulenko2004-08-03 01:12:08 +0000
commitab326af54e97206e88e53a95009345150f6b7bbb (patch)
tree404200e8692710174900ed3c0246c2aa44de2e7e /saga
parentb197c3dac8e9872f188ffea80c069f4862e64fe0 (diff)
downloadscummvm-rg350-ab326af54e97206e88e53a95009345150f6b7bbb.tar.gz
scummvm-rg350-ab326af54e97206e88e53a95009345150f6b7bbb.tar.bz2
scummvm-rg350-ab326af54e97206e88e53a95009345150f6b7bbb.zip
Rename some class variables in Font class.
Fix compilation. svn-id: r14452
Diffstat (limited to 'saga')
-rw-r--r--saga/font.cpp20
-rw-r--r--saga/font.h4
-rw-r--r--saga/sprite.cpp1
3 files changed, 12 insertions, 13 deletions
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;
}
diff --git a/saga/font.h b/saga/font.h
index ac3439bbc6..49063174df 100644
--- a/saga/font.h
+++ b/saga/font.h
@@ -117,9 +117,9 @@ class Font {
SagaEngine *_vm;
bool _initialized;
- R_RSCFILE_CONTEXT *_font_ctxt;
+ R_RSCFILE_CONTEXT *_fontContext;
- int _n_fonts;
+ int _nFonts;
R_FONT **_fonts;
};
diff --git a/saga/sprite.cpp b/saga/sprite.cpp
index 43c4d751e3..38ad99c458 100644
--- a/saga/sprite.cpp
+++ b/saga/sprite.cpp
@@ -32,7 +32,6 @@
#include "saga/text.h"
#include "saga/font.h"
-#include "saga/sprite_mod.h"
#include "saga/sprite.h"
namespace Saga {