aboutsummaryrefslogtreecommitdiff
path: root/engines/teenagent/font.cpp
diff options
context:
space:
mode:
authorD G Turner2012-07-28 07:31:41 +0100
committerD G Turner2012-07-28 07:31:41 +0100
commitbe4be025b97f0dc58f90dff749002400579e75e9 (patch)
tree95a5b6220cf6c4110e715b21f9b9ef5447640499 /engines/teenagent/font.cpp
parent890b83e3d891eedb9b555b3f2e4828f7c81a80a7 (diff)
downloadscummvm-rg350-be4be025b97f0dc58f90dff749002400579e75e9.tar.gz
scummvm-rg350-be4be025b97f0dc58f90dff749002400579e75e9.tar.bz2
scummvm-rg350-be4be025b97f0dc58f90dff749002400579e75e9.zip
TEENAGENT: Add constant values for screen width and height.
It is unlikely these will be changed, but the symbols make the code more readable.
Diffstat (limited to 'engines/teenagent/font.cpp')
-rw-r--r--engines/teenagent/font.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/teenagent/font.cpp b/engines/teenagent/font.cpp
index cf3deadacb..e75d05c3ed 100644
--- a/engines/teenagent/font.cpp
+++ b/engines/teenagent/font.cpp
@@ -58,7 +58,7 @@ uint Font::render(Graphics::Surface *surface, int x, int y, char c, byte color)
byte *glyph = data + READ_LE_UINT16(data + idx * 2);
int h = glyph[0], w = glyph[1];
- if (surface == NULL || surface->pixels == NULL || y + h <= 0 || y >= 200 || x + w <= 0 || x >= 320)
+ if (surface == NULL || surface->pixels == NULL || y + h <= 0 || y >= screenHeight || x + w <= 0 || x >= screenWidth)
return w - width_pack;
int i0 = 0, j0 = 0;
@@ -119,7 +119,7 @@ uint Font::render(Graphics::Surface *surface, int x, int y, const Common::String
for (uint k = 0; k < line.size(); ++k) {
xp += render(surface, xp, y, line[k], color);
}
- } else if (y >= 200)
+ } else if (y >= screenHeight)
break;
y += height;