aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/agos.h3
-rw-r--r--engines/agos/charset-fontdata.cpp72
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;