diff options
author | Travis Howell | 2010-03-07 11:46:03 +0000 |
---|---|---|
committer | Travis Howell | 2010-03-07 11:46:03 +0000 |
commit | 0e41ec67d15122a41c318191accbd10056569c5b (patch) | |
tree | c7e80dd663fbf66d885ce49617fb6915e242cae2 | |
parent | e7765c983a65168178b9e18dbbe10e711906ccbc (diff) | |
download | scummvm-rg350-0e41ec67d15122a41c318191accbd10056569c5b.tar.gz scummvm-rg350-0e41ec67d15122a41c318191accbd10056569c5b.tar.bz2 scummvm-rg350-0e41ec67d15122a41c318191accbd10056569c5b.zip |
Exclude font data tables for The Feeble Files, when AGOS2 games are disabled.
svn-id: r48174
-rw-r--r-- | engines/agos/agos.h | 3 | ||||
-rw-r--r-- | engines/agos/charset-fontdata.cpp | 72 |
2 files changed, 50 insertions, 25 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h index bd8278303e..164107620f 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1236,7 +1236,7 @@ protected: virtual void windowNewLine(WindowBlock *window); void windowScroll(WindowBlock *window); - void windowDrawChar(WindowBlock *window, uint x, uint y, byte chr); + virtual void windowDrawChar(WindowBlock *window, uint x, uint y, byte chr); void loadMusic(uint16 track); void playModule(uint16 music); @@ -1975,6 +1975,7 @@ protected: void invertBox(HitArea *ha, bool state); virtual void windowNewLine(WindowBlock *window); + virtual void windowDrawChar(WindowBlock *window, uint x, uint y, byte chr); virtual void clearName(); diff --git a/engines/agos/charset-fontdata.cpp b/engines/agos/charset-fontdata.cpp index 156baa663b..dbd61a3b46 100644 --- a/engines/agos/charset-fontdata.cpp +++ b/engines/agos/charset-fontdata.cpp @@ -89,6 +89,7 @@ uint AGOSEngine::getFeebleFontSize(byte chr) { } } +#ifdef ENABLE_AGOS2 static const byte polish4CD_feeble_windowFont[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, @@ -683,6 +684,51 @@ static const byte feeble_windowFont[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +void AGOSEngine_Feeble::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { + const byte *src; + byte color, *dst; + uint dstPitch, h, w, i; + + if (_noOracleScroll) + return; + + _videoLockOut |= 0x8000; + + dst = getBackGround(); + dstPitch = _backGroundBuf->pitch; + h = 13; + w = getFeebleFontSize(chr); + + if (_language == Common::PL_POL) { + if (!strcmp(getExtra(), "4CD")) + src = polish4CD_feeble_windowFont + (chr - 32) * 13; + else + src = polish2CD_feeble_windowFont + (chr - 32) * 13; + } else { + src = feeble_windowFont + (chr - 32) * 13; + } + dst += y * dstPitch + x + window->textColumnOffset; + + color = window->textColor; + + do { + int8 b = *src++; + i = 0; + do { + if (b < 0) { + if (dst[i] == 0) + dst[i] = color; + } + + b <<= 1; + } while (++i != w); + dst += dstPitch; + } while (--h); + + _videoLockOut &= ~0x8000; +} +#endif + static const byte czech_simonFont[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x70, 0x20, 0x20, 0x00, 0x20, 0x00, @@ -2304,28 +2350,11 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { byte color, *dst; uint dstPitch, h, w, i; - if (_noOracleScroll) - return; - _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); - if (getGameType() == GType_FF || getGameType() == GType_PP) { - dst = getBackGround(); - dstPitch = _backGroundBuf->pitch; - h = 13; - w = getFeebleFontSize(chr); - - if (_language == Common::PL_POL) { - if (!strcmp(getExtra(), "4CD")) - src = polish4CD_feeble_windowFont + (chr - 32) * 13; - else - src = polish2CD_feeble_windowFont + (chr - 32) * 13; - } else { - src = feeble_windowFont + (chr - 32) * 13; - } - } else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { + if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { dst = (byte *)screen->pixels; dstPitch = screen->pitch; h = 8; @@ -2413,12 +2442,7 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { i = 0; do { if (b < 0) { - if (getGameType() == GType_FF || getGameType() == GType_PP) { - if (dst[i] == 0) - dst[i] = color; - } else { - dst[i] = color; - } + dst[i] = color; } b <<= 1; |