aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorVladimir Menshakov2009-09-13 09:54:03 +0000
committerVladimir Menshakov2009-09-13 09:54:03 +0000
commit94d7dad3affff49d014c1985955466ec4931f15b (patch)
tree4ceb058d449c7478089ef3a0b3d477e4281887bb /engines
parente9303da6368abda1ed7c234e70e3d974ebcd3f1e (diff)
downloadscummvm-rg350-94d7dad3affff49d014c1985955466ec4931f15b.tar.gz
scummvm-rg350-94d7dad3affff49d014c1985955466ec4931f15b.tar.bz2
scummvm-rg350-94d7dad3affff49d014c1985955466ec4931f15b.zip
added shadow_color, height and packed width parameters for fonts.
svn-id: r44046
Diffstat (limited to 'engines')
-rw-r--r--engines/teenagent/font.cpp9
-rw-r--r--engines/teenagent/font.h3
2 files changed, 6 insertions, 6 deletions
diff --git a/engines/teenagent/font.cpp b/engines/teenagent/font.cpp
index 5f0cd1c42d..ee97f18b47 100644
--- a/engines/teenagent/font.cpp
+++ b/engines/teenagent/font.cpp
@@ -27,7 +27,7 @@
namespace TeenAgent {
-Font::Font() : grid_color(0xd0), color(0xd1), data(0) {
+Font::Font() : grid_color(0xd0), color(0xd1), shadow_color(0), height(0), width_pack(0), data(0) {
}
void Font::load(int id) {
@@ -54,7 +54,7 @@ uint Font::render(Graphics::Surface *surface, int x, int y, char c) {
uint h = glyph[0], w = glyph[1];
if (surface == NULL || surface->pixels == NULL)
- return w - 1;
+ return w - width_pack;
//debug(0, "char %c, width: %dx%d", c, w, h);
glyph += 2;
@@ -64,7 +64,7 @@ uint Font::render(Graphics::Surface *surface, int x, int y, char c) {
byte v = *glyph++;
switch(v) {
case 1:
- dst[j] = 0;
+ dst[j] = shadow_color;
break;
case 2:
dst[j] = color;
@@ -73,7 +73,7 @@ uint Font::render(Graphics::Surface *surface, int x, int y, char c) {
}
dst += surface->pitch;
}
- return w - 1;
+ return w - width_pack;
}
static uint find_in_str(const Common::String &str, char c, uint pos = 0) {
@@ -82,7 +82,6 @@ static uint find_in_str(const Common::String &str, char c, uint pos = 0) {
}
uint Font::render(Graphics::Surface *surface, int x, int y, const Common::String &str, bool show_grid) {
- const int height = 10;
if (surface != NULL) {
uint max_w = render(NULL, 0, 0, str, false);
if (show_grid)
diff --git a/engines/teenagent/font.h b/engines/teenagent/font.h
index 7bfbca7237..b18defefc3 100644
--- a/engines/teenagent/font.h
+++ b/engines/teenagent/font.h
@@ -31,7 +31,8 @@ namespace TeenAgent {
class Font {
public:
- byte grid_color, color;
+ byte grid_color, color, shadow_color;
+ byte height, width_pack;
Font();
void load(int id);