aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/charset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agos/charset.cpp')
-rw-r--r--engines/agos/charset.cpp273
1 files changed, 254 insertions, 19 deletions
diff --git a/engines/agos/charset.cpp b/engines/agos/charset.cpp
index 40b0a84390..9a37d90c33 100644
--- a/engines/agos/charset.cpp
+++ b/engines/agos/charset.cpp
@@ -25,9 +25,13 @@
#include "common/stdafx.h"
+#include "common/system.h"
+
#include "agos/agos.h"
#include "agos/intern.h"
+#include "graphics/surface.h"
+
namespace AGOS {
void AGOSEngine_Feeble::doOutput(const byte *src, uint len) {
@@ -539,19 +543,7 @@ void AGOSEngine::justifyOutPut(byte chr) {
doOutput(&chr, 1);
clsCheck(_textWindow);
} else if (chr == 0 || chr == ' ' || chr == 10) {
- bool fit;
-
- // Note that in FF, _printCharCurPos may be greater than
- // _printCharMaxPos. In Simon, that is probably prevented by
- // testing if _printCharCurPos == _printCharMaxPos below.
-
- if (getGameType() == GType_FF || getGameType() == GType_PP) {
- fit = _printCharMaxPos > _printCharCurPos + _printCharPixelCount;
- } else {
- fit = _printCharMaxPos - _printCharCurPos >= _printCharPixelCount;
- }
-
- if (fit) {
+ if (_printCharMaxPos - _printCharCurPos >= _printCharPixelCount) {
_printCharCurPos += _printCharPixelCount;
doOutput(_lettersToPrintBuf, _numLettersToPrint);
@@ -707,17 +699,48 @@ void AGOSEngine_Feeble::windowNewLine(WindowBlock *window) {
void AGOSEngine::windowNewLine(WindowBlock *window) {
window->textColumn = 0;
- window->textColumnOffset = 0;
+ window->textColumnOffset = (getGameType() == GType_ELVIRA2) ? 4 : 0;
window->textLength = 0;
if (window->textRow == window->height) {
- // TODO
- debug(0, "Window Scroll");
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2 ||
+ getGameType() == GType_WW) {
+ windowScroll(window);
+ }
} else {
window->textRow++;
}
}
+void AGOSEngine::windowScroll(WindowBlock *window) {
+ _lockWord |= 0x8000;
+
+ if (window->height != 1) {
+ Graphics::Surface *screen = _system->lockScreen();
+
+ byte *src, *dst;
+ uint16 w, h;
+
+ w = window->width * 8;
+ h = (window->height -1) * 8;
+
+ dst = (byte *)screen->pixels + window->y * _screenWidth + window->x * 8;
+ src = dst + 8 * _screenWidth;
+
+ do {
+ memcpy(dst, src, w);
+ src += _screenWidth;
+ dst += _screenWidth;
+ } while (--h);
+
+ _system->unlockScreen();
+ }
+
+ colorBlock(window, window->x * 8, (window->height - 1) * 8 + window->y, window->width * 8, 8);
+
+ _lockWord &= ~0x8000;
+}
+
#ifdef PALMOS_68K
static const byte *feeble_windowFont;
static const byte *czech_simonFont;
@@ -729,6 +752,8 @@ static const byte *hebrew_simonFont;
static const byte *italian_simonFont;
static const byte *spanish_simonFont;
static const byte *english_simonFont;
+static const byte *spanish_commonFont;
+static const byte *italian_commonFont;
static const byte *french_commonFont;
static const byte *english_commonFont;
#else
@@ -1839,6 +1864,208 @@ static const byte english_simonFont[] = {
240, 240, 240, 240, 240, 240, 240, 240,
};
+static const byte spanish_commonFont[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20,
+ 0x00, 0x50, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x90, 0x00, 0x60, 0x90, 0x90, 0x68, 0x00,
+ 0x00, 0x90, 0x00, 0x60, 0x90, 0x90, 0x60, 0x00,
+ 0x00, 0x90, 0x00, 0x90, 0x90, 0x90, 0x60, 0x00,
+ 0x00, 0x10, 0x28, 0x10, 0x2A, 0x44, 0x3A, 0x00,
+ 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00,
+ 0x00, 0x20, 0x10, 0x10, 0x10, 0x10, 0x20, 0x00,
+ 0x00, 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14, 0x00,
+ 0x00, 0x70, 0x88, 0xF0, 0x88, 0x88, 0xF0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10,
+ 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
+ 0x10, 0x20, 0x00, 0x78, 0x70, 0x40, 0x38, 0x00,
+ 0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00,
+ 0x00, 0x20, 0x60, 0x20, 0x20, 0x20, 0x70, 0x00,
+ 0x00, 0x70, 0x88, 0x10, 0x20, 0x48, 0xF8, 0x00,
+ 0x00, 0x70, 0x88, 0x30, 0x08, 0x88, 0x70, 0x00,
+ 0x00, 0x10, 0x20, 0x40, 0x90, 0xF8, 0x10, 0x00,
+ 0x00, 0xF8, 0x80, 0x70, 0x08, 0x88, 0x70, 0x00,
+ 0x00, 0x70, 0x88, 0x80, 0xF0, 0x88, 0x70, 0x00,
+ 0x00, 0xF8, 0x08, 0x10, 0x20, 0x40, 0x40, 0x00,
+ 0x00, 0x70, 0x88, 0x70, 0x88, 0x88, 0x70, 0x00,
+ 0x00, 0x70, 0x88, 0x78, 0x08, 0x88, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00,
+ 0x20, 0x40, 0x00, 0x60, 0x90, 0x90, 0x68, 0x00,
+ 0x20, 0x40, 0x00, 0x60, 0x20, 0x28, 0x30, 0x00,
+ 0x20, 0x40, 0x00, 0x60, 0x90, 0x90, 0x60, 0x00,
+ 0x20, 0x40, 0x00, 0x98, 0x90, 0x90, 0xE8, 0x00,
+ 0x00, 0x3C, 0x42, 0x04, 0x08, 0x00, 0x08, 0x00,
+ 0x28, 0x50, 0x00, 0xD8, 0x68, 0x48, 0x48, 0x00,
+ 0x20, 0x50, 0x50, 0x70, 0x50, 0x50, 0x88, 0x00,
+ 0xF0, 0x48, 0x48, 0x70, 0x48, 0x48, 0xF0, 0x00,
+ 0x30, 0x48, 0x80, 0x80, 0x80, 0x48, 0x30, 0x00,
+ 0xF0, 0x48, 0x48, 0x48, 0x48, 0x48, 0xF0, 0x00,
+ 0xF8, 0x40, 0x40, 0x70, 0x40, 0x40, 0xF8, 0x00,
+ 0xF8, 0x40, 0x40, 0x70, 0x40, 0x40, 0xE0, 0x00,
+ 0x38, 0x40, 0x80, 0x98, 0x88, 0x48, 0x30, 0x00,
+ 0xC8, 0x48, 0x48, 0x78, 0x48, 0x48, 0xC8, 0x00,
+ 0x70, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00,
+ 0x78, 0x10, 0x10, 0x10, 0x90, 0x90, 0x60, 0x00,
+ 0xC8, 0x50, 0x60, 0x40, 0x60, 0x50, 0xC8, 0x00,
+ 0xE0, 0x40, 0x40, 0x40, 0x40, 0x48, 0xF8, 0x00,
+ 0x88, 0xD8, 0xA8, 0x88, 0x88, 0x88, 0x88, 0x00,
+ 0xC8, 0x48, 0x68, 0x58, 0x58, 0x48, 0xC8, 0x00,
+ 0x70, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00,
+ 0xF0, 0x48, 0x48, 0x70, 0x40, 0x40, 0xC0, 0x00,
+ 0x60, 0x90, 0x90, 0x90, 0xB0, 0x90, 0x68, 0x00,
+ 0xF0, 0x48, 0x48, 0x70, 0x50, 0x48, 0xC8, 0x00,
+ 0x70, 0x88, 0x80, 0x60, 0x10, 0x88, 0x70, 0x00,
+ 0xF8, 0xA8, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00,
+ 0x88, 0x50, 0x50, 0x50, 0x50, 0x50, 0x20, 0x00,
+ 0x88, 0x88, 0x88, 0x50, 0x50, 0x50, 0x20, 0x00,
+ 0x88, 0x88, 0x88, 0x88, 0xA8, 0xD8, 0x88, 0x00,
+ 0x88, 0x50, 0x70, 0x20, 0x70, 0x50, 0x88, 0x00,
+ 0x88, 0x48, 0x30, 0x20, 0x40, 0x80, 0xC0, 0x00,
+ 0xF8, 0x88, 0x10, 0x20, 0x40, 0x80, 0xF8, 0x00,
+ 0x00, 0x0E, 0x08, 0x08, 0x08, 0x08, 0x0E, 0x00,
+ 0x00, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x00,
+ 0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x70, 0x00,
+ 0x00, 0x20, 0x00, 0x20, 0x40, 0x88, 0x70, 0x00,
+ 0x20, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x00, 0x90, 0x00, 0x90, 0x90, 0x90, 0x60, 0x00,
+ 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x68, 0x00,
+ 0x40, 0x40, 0x50, 0x68, 0x48, 0x48, 0xF0, 0x00,
+ 0x00, 0x00, 0x30, 0x48, 0x40, 0x48, 0x30, 0x00,
+ 0x10, 0x10, 0x70, 0x90, 0x90, 0x90, 0x68, 0x00,
+ 0x00, 0x00, 0x70, 0x48, 0x70, 0x40, 0x38, 0x00,
+ 0x10, 0x38, 0x20, 0x70, 0x20, 0x20, 0x20, 0x40,
+ 0x00, 0x00, 0x78, 0x90, 0x90, 0x90, 0x70, 0x10,
+ 0xC0, 0x40, 0x58, 0x68, 0x48, 0x48, 0xC8, 0x00,
+ 0x20, 0x00, 0x60, 0x20, 0x20, 0x28, 0x30, 0x00,
+ 0x10, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x60,
+ 0x40, 0x40, 0x70, 0x48, 0x70, 0x50, 0xC8, 0x00,
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x50, 0x60, 0x00,
+ 0x00, 0x00, 0xA8, 0xF8, 0xA8, 0xA8, 0xA8, 0x00,
+ 0x00, 0x00, 0xD8, 0x68, 0x48, 0x48, 0x48, 0x00,
+ 0x00, 0x00, 0x30, 0x48, 0x48, 0x48, 0x30, 0x00,
+ 0x00, 0x00, 0xF0, 0x48, 0x48, 0x70, 0x40, 0xC0,
+ 0x00, 0x00, 0x70, 0x90, 0x90, 0x70, 0x18, 0x10,
+ 0x00, 0x00, 0xD8, 0x68, 0x40, 0x40, 0xE0, 0x00,
+ 0x00, 0x00, 0x38, 0x40, 0x30, 0x08, 0x70, 0x00,
+ 0x20, 0x20, 0x70, 0x20, 0x20, 0x28, 0x30, 0x00,
+ 0x00, 0x00, 0x98, 0x90, 0x90, 0x90, 0xE8, 0x00,
+ 0x00, 0x00, 0x88, 0x88, 0x50, 0x50, 0x20, 0x00,
+ 0x00, 0x00, 0xA8, 0xA8, 0xA8, 0xF8, 0xA8, 0x00,
+ 0x00, 0x00, 0x88, 0x50, 0x20, 0x50, 0x88, 0x00,
+ 0x00, 0x00, 0x98, 0x90, 0x90, 0x70, 0x10, 0x60,
+ 0x00, 0x00, 0x78, 0x10, 0x20, 0x40, 0x78, 0x00,
+ 0x20, 0x50, 0x00, 0x60, 0x90, 0x90, 0x60, 0x00,
+ 0x00, 0x0E, 0x08, 0x30, 0x08, 0x08, 0x0E, 0x00,
+ 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+ 0x00, 0x70, 0x10, 0x0C, 0x10, 0x10, 0x70, 0x00,
+ 0x00, 0x14, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
+ 0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x00,
+};
+
+static const byte italian_commonFont[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20,
+ 0x00, 0x50, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x90, 0x00, 0x60, 0x90, 0x90, 0x68, 0x00,
+ 0x00, 0x90, 0x00, 0x60, 0x90, 0x90, 0x60, 0x00,
+ 0x40, 0x20, 0x00, 0x60, 0x90, 0x90, 0x60, 0x00,
+ 0x00, 0x10, 0x28, 0x10, 0x2A, 0x44, 0x3A, 0x00,
+ 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00,
+ 0x00, 0x20, 0x10, 0x10, 0x10, 0x10, 0x20, 0x00,
+ 0x00, 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14, 0x00,
+ 0x40, 0x20, 0x00, 0x60, 0x20, 0x28, 0x30, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10,
+ 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
+ 0x10, 0x20, 0x00, 0x78, 0x70, 0x40, 0x38, 0x00,
+ 0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00,
+ 0x00, 0x20, 0x60, 0x20, 0x20, 0x20, 0x70, 0x00,
+ 0x00, 0x70, 0x88, 0x10, 0x20, 0x48, 0xF8, 0x00,
+ 0x00, 0x70, 0x88, 0x30, 0x08, 0x88, 0x70, 0x00,
+ 0x00, 0x10, 0x20, 0x40, 0x90, 0xF8, 0x10, 0x00,
+ 0x00, 0xF8, 0x80, 0x70, 0x08, 0x88, 0x70, 0x00,
+ 0x00, 0x70, 0x88, 0x80, 0xF0, 0x88, 0x70, 0x00,
+ 0x00, 0xF8, 0x08, 0x10, 0x20, 0x40, 0x40, 0x00,
+ 0x00, 0x70, 0x88, 0x70, 0x88, 0x88, 0x70, 0x00,
+ 0x00, 0x70, 0x88, 0x78, 0x08, 0x88, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00,
+ 0x40, 0x20, 0x00, 0x60, 0x90, 0x90, 0x68, 0x00,
+ 0x40, 0x20, 0x00, 0x60, 0x90, 0x90, 0x60, 0x00,
+ 0x20, 0x10, 0x00, 0x78, 0x70, 0x40, 0x38, 0x00,
+ 0x20, 0x50, 0x00, 0x78, 0x70, 0x40, 0x38, 0x00,
+ 0x00, 0x3C, 0x42, 0x04, 0x08, 0x00, 0x08, 0x00,
+ 0x20, 0x50, 0x00, 0x60, 0x20, 0x28, 0x30, 0x00,
+ 0x20, 0x50, 0x50, 0x70, 0x50, 0x50, 0x88, 0x00,
+ 0xF0, 0x48, 0x48, 0x70, 0x48, 0x48, 0xF0, 0x00,
+ 0x30, 0x48, 0x80, 0x80, 0x80, 0x48, 0x30, 0x00,
+ 0xF0, 0x48, 0x48, 0x48, 0x48, 0x48, 0xF0, 0x00,
+ 0xF8, 0x40, 0x40, 0x70, 0x40, 0x40, 0xF8, 0x00,
+ 0xF8, 0x40, 0x40, 0x70, 0x40, 0x40, 0xE0, 0x00,
+ 0x38, 0x40, 0x80, 0x98, 0x88, 0x48, 0x30, 0x00,
+ 0xC8, 0x48, 0x48, 0x78, 0x48, 0x48, 0xC8, 0x00,
+ 0x70, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00,
+ 0x78, 0x10, 0x10, 0x10, 0x90, 0x90, 0x60, 0x00,
+ 0xC8, 0x50, 0x60, 0x40, 0x60, 0x50, 0xC8, 0x00,
+ 0xE0, 0x40, 0x40, 0x40, 0x40, 0x48, 0xF8, 0x00,
+ 0x88, 0xD8, 0xA8, 0x88, 0x88, 0x88, 0x88, 0x00,
+ 0xC8, 0x48, 0x68, 0x58, 0x58, 0x48, 0xC8, 0x00,
+ 0x70, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00,
+ 0xF0, 0x48, 0x48, 0x70, 0x40, 0x40, 0xC0, 0x00,
+ 0x60, 0x90, 0x90, 0x90, 0xB0, 0x90, 0x68, 0x00,
+ 0xF0, 0x48, 0x48, 0x70, 0x50, 0x48, 0xC8, 0x00,
+ 0x70, 0x88, 0x80, 0x60, 0x10, 0x88, 0x70, 0x00,
+ 0xF8, 0xA8, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00,
+ 0x88, 0x50, 0x50, 0x50, 0x50, 0x50, 0x20, 0x00,
+ 0x88, 0x88, 0x88, 0x50, 0x50, 0x50, 0x20, 0x00,
+ 0x88, 0x88, 0x88, 0x88, 0xA8, 0xD8, 0x88, 0x00,
+ 0x88, 0x50, 0x70, 0x20, 0x70, 0x50, 0x88, 0x00,
+ 0x88, 0x48, 0x30, 0x20, 0x40, 0x80, 0xC0, 0x00,
+ 0xF8, 0x88, 0x10, 0x20, 0x40, 0x80, 0xF8, 0x00,
+ 0x00, 0x0E, 0x08, 0x08, 0x08, 0x08, 0x0E, 0x00,
+ 0x00, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x00,
+ 0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x70, 0x00,
+ 0x00, 0x30, 0x48, 0x40, 0x48, 0x30, 0x10, 0x30,
+ 0x00, 0x50, 0x00, 0x60, 0x20, 0x28, 0x30, 0x00,
+ 0x20, 0x10, 0x00, 0x98, 0x90, 0x90, 0xE8, 0x00,
+ 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x68, 0x00,
+ 0x40, 0x40, 0x50, 0x68, 0x48, 0x48, 0xF0, 0x00,
+ 0x00, 0x00, 0x30, 0x48, 0x40, 0x48, 0x30, 0x00,
+ 0x10, 0x10, 0x70, 0x90, 0x90, 0x90, 0x68, 0x00,
+ 0x00, 0x00, 0x70, 0x48, 0x70, 0x40, 0x38, 0x00,
+ 0x10, 0x38, 0x20, 0x70, 0x20, 0x20, 0x20, 0x40,
+ 0x00, 0x00, 0x78, 0x90, 0x90, 0x90, 0x70, 0x10,
+ 0xC0, 0x40, 0x58, 0x68, 0x48, 0x48, 0xC8, 0x00,
+ 0x20, 0x00, 0x60, 0x20, 0x20, 0x28, 0x30, 0x00,
+ 0x10, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x60,
+ 0x40, 0x40, 0x70, 0x48, 0x70, 0x50, 0xC8, 0x00,
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x50, 0x60, 0x00,
+ 0x00, 0x00, 0xA8, 0xF8, 0xA8, 0xA8, 0xA8, 0x00,
+ 0x00, 0x00, 0xD8, 0x68, 0x48, 0x48, 0x48, 0x00,
+ 0x00, 0x00, 0x30, 0x48, 0x48, 0x48, 0x30, 0x00,
+ 0x00, 0x00, 0xF0, 0x48, 0x48, 0x70, 0x40, 0xC0,
+ 0x00, 0x00, 0x70, 0x90, 0x90, 0x70, 0x18, 0x10,
+ 0x00, 0x00, 0xD8, 0x68, 0x40, 0x40, 0xE0, 0x00,
+ 0x00, 0x00, 0x38, 0x40, 0x30, 0x08, 0x70, 0x00,
+ 0x20, 0x20, 0x70, 0x20, 0x20, 0x28, 0x30, 0x00,
+ 0x00, 0x00, 0x98, 0x90, 0x90, 0x90, 0xE8, 0x00,
+ 0x00, 0x00, 0x88, 0x88, 0x50, 0x50, 0x20, 0x00,
+ 0x00, 0x00, 0xA8, 0xA8, 0xA8, 0xF8, 0xA8, 0x00,
+ 0x00, 0x00, 0x88, 0x50, 0x20, 0x50, 0x88, 0x00,
+ 0x00, 0x00, 0x98, 0x90, 0x90, 0x70, 0x10, 0x60,
+ 0x00, 0x00, 0x78, 0x10, 0x20, 0x40, 0x78, 0x00,
+ 0x20, 0x50, 0x00, 0x60, 0x90, 0x90, 0x60, 0x00,
+ 0x00, 0x0E, 0x08, 0x30, 0x08, 0x08, 0x0E, 0x00,
+ 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+ 0x00, 0x70, 0x10, 0x0C, 0x10, 0x10, 0x70, 0x00,
+ 0x00, 0x14, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
+ 0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x00,
+};
+
static const byte french_commonFont[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20,
@@ -2052,14 +2279,16 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) {
_lockWord |= 0x8000;
- dst = getFrontBuf() + y * _dxSurfacePitch + x + window->textColumnOffset;
+ Graphics::Surface *screen = _system->lockScreen();
if (getGameType() == GType_FF || getGameType() == GType_PP) {
+ dst = getBackGround() + y * _dxSurfacePitch + x + window->textColumnOffset;
h = 13;
w = feebleFontSize[chr - 0x20];
src = feeble_windowFont + (chr - 0x20) * 13;
} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
+ dst = (byte *)screen->pixels + y * _dxSurfacePitch + x + window->textColumnOffset;
h = 8;
w = 6;
@@ -2095,13 +2324,17 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) {
error("windowDrawChar: Unknown language %d\n", _language);
}
} else {
+ dst = (byte *)screen->pixels + y * _dxSurfacePitch + x + window->textColumnOffset;
h = 8;
w = 6;
- // TODO: Add font tables for German and Spanish
+ // TODO: Add font tables for German
switch (_language) {
case Common::ES_ESP:
- src = english_commonFont + (chr - 0x20) * 8;
+ src = spanish_commonFont + (chr - 0x20) * 8;
+ break;
+ case Common::IT_ITA:
+ src = italian_commonFont + (chr - 0x20) * 8;
break;
case Common::FR_FRA:
src = french_commonFont + (chr - 0x20) * 8;
@@ -2139,6 +2372,8 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) {
dst += _dxSurfacePitch;
} while (--h);
+ _system->unlockScreen();
+
_lockWord &= ~0x8000;
}