From 61d741514e72d12d62248d6523cb149c37f7d51e Mon Sep 17 00:00:00 2001 From: David Symonds Date: Sat, 6 Jan 2007 05:11:41 +0000 Subject: Extended text rendering code to allow "checkerboarding", and switch menu code to using this checkerboard effect for disabled menu items (this is how Sierra's interpreter works). svn-id: r25024 --- engines/agi/text.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/agi/text.cpp') diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp index b35217b7ae..b0ef2a630b 100644 --- a/engines/agi/text.cpp +++ b/engines/agi/text.cpp @@ -31,7 +31,7 @@ namespace Agi { void AgiEngine::print_text2(int l, const char *msg, int foff, int xoff, int yoff, - int len, int fg, int bg) { + int len, int fg, int bg, bool checkerboard) { int x1, y1; int maxx, minx, ofoff; int update; @@ -47,7 +47,7 @@ void AgiEngine::print_text2(int l, const char *msg, int foff, int xoff, int yoff /* FR: strings with len == 1 were not printed */ if (len == 1) { - _gfx->putTextCharacter(l, xoff + foff, yoff, *msg, fg, bg); + _gfx->putTextCharacter(l, xoff + foff, yoff, *msg, fg, bg, checkerboard); maxx = 1; minx = 0; ofoff = foff; @@ -73,7 +73,7 @@ void AgiEngine::print_text2(int l, const char *msg, int foff, int xoff, int yoff if (xpos >= GFX_WIDTH) continue; - _gfx->putTextCharacter(l, xpos, ypos, *m, fg, bg); + _gfx->putTextCharacter(l, xpos, ypos, *m, fg, bg, checkerboard); if (x1 > maxx) maxx = x1; @@ -189,13 +189,13 @@ void AgiEngine::erase_textbox() { /** * Print text in the AGI engine screen. */ -void AgiEngine::print_text(const char *msg, int f, int x, int y, int len, int fg, int bg) { +void AgiEngine::print_text(const char *msg, int f, int x, int y, int len, int fg, int bg, bool checkerboard) { f *= CHAR_COLS; x *= CHAR_COLS; y *= CHAR_LINES; debugC(4, kDebugLevelText, "%s, %d, %d, %d, %d, %d, %d", msg, f, x, y, len, fg, bg); - print_text2(0, agi_sprintf(msg), f, x, y, len, fg, bg); + print_text2(0, agi_sprintf(msg), f, x, y, len, fg, bg, checkerboard); } /** -- cgit v1.2.3