diff options
Diffstat (limited to 'engines/teenagent/font.cpp')
-rw-r--r-- | engines/teenagent/font.cpp | 4 |
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; |