Exclude font data tables for The Feeble Files, when AGOS2 games are disabled.

svn-id: r48174
This commit is contained in:
Travis Howell 2010-03-07 11:46:03 +00:00
parent e7765c983a
commit 0e41ec67d1
2 changed files with 50 additions and 25 deletions

View File

@ -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();

View File

@ -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;