aboutsummaryrefslogtreecommitdiff
path: root/saga/font.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2005-01-11 00:51:58 +0000
committerEugene Sandulenko2005-01-11 00:51:58 +0000
commit133ff34cb4fc6882233cccb40882fc2278558390 (patch)
tree7a974302e09fa9bd6264a4b60a53be76a137a730 /saga/font.cpp
parent2dd88384a17059cd418bc9a96eddf05fdae20cfa (diff)
downloadscummvm-rg350-133ff34cb4fc6882233cccb40882fc2278558390.tar.gz
scummvm-rg350-133ff34cb4fc6882233cccb40882fc2278558390.tar.bz2
scummvm-rg350-133ff34cb4fc6882233cccb40882fc2278558390.zip
o All fonts were mapped. Introduced new FONT_DONTMAP flag
o Implemented and tested converse drawing. Still some features like arrows and hardcoded values are present, and it is not used in scripts svn-id: r16536
Diffstat (limited to 'saga/font.cpp')
-rw-r--r--saga/font.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/saga/font.cpp b/saga/font.cpp
index 0b0bc67608..aca642b064 100644
--- a/saga/font.cpp
+++ b/saga/font.cpp
@@ -379,20 +379,20 @@ int Font::draw(int font_id, SURFACE *ds, const char *draw_str, size_t draw_str_c
font = _fonts[font_id];
if (flags & FONT_OUTLINE) {
- outFont(font->outline, ds, draw_str, draw_str_ct, text_x - 1, text_y - 1, effect_color);
- outFont(font->normal, ds, draw_str, draw_str_ct, text_x, text_y, color);
+ outFont(font->outline, ds, draw_str, draw_str_ct, text_x - 1, text_y - 1, effect_color, flags);
+ outFont(font->normal, ds, draw_str, draw_str_ct, text_x, text_y, color, flags);
} else if (flags & FONT_SHADOW) {
- outFont(font->normal, ds, draw_str, draw_str_ct, text_x - 1, text_y + 1, effect_color);
- outFont(font->normal, ds, draw_str, draw_str_ct, text_x, text_y, color);
+ outFont(font->normal, ds, draw_str, draw_str_ct, text_x - 1, text_y + 1, effect_color, flags);
+ outFont(font->normal, ds, draw_str, draw_str_ct, text_x, text_y, color, flags);
} else { // FONT_NORMAL
- outFont(font->normal, ds, draw_str, draw_str_ct, text_x, text_y, color);
+ outFont(font->normal, ds, draw_str, draw_str_ct, text_x, text_y, color, flags);
}
return SUCCESS;
}
int Font::outFont(FONT_STYLE * draw_font, SURFACE * ds, const char *draw_str, size_t draw_str_ct,
- int text_x, int text_y, int color) {
+ int text_x, int text_y, int color, int flags) {
const byte *draw_str_p;
byte *c_data_ptr;
int c_code;
@@ -424,7 +424,8 @@ int Font::outFont(FONT_STYLE * draw_font, SURFACE * ds, const char *draw_str, si
c_code = *draw_str_p & 0xFFU;
// Translate character
- c_code = _charMap[c_code];
+ if (!(flags & FONT_DONTMAP))
+ c_code = _charMap[c_code];
assert(c_code < FONT_CHARCOUNT);
// Check if character is defined