From 0315465fde30ec6b0447de66cae7844fd870f8bc Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 28 Feb 2009 00:12:21 +0000 Subject: Elvira 1 uses slightly different font data table, shared for all languages. svn-id: r38942 --- engines/agos/charset-fontdata.cpp | 125 +++++++++++++++++++++++++++++++++++--- 1 file changed, 116 insertions(+), 9 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/charset-fontdata.cpp b/engines/agos/charset-fontdata.cpp index 9582a2c7f5..edc567df7b 100644 --- a/engines/agos/charset-fontdata.cpp +++ b/engines/agos/charset-fontdata.cpp @@ -1161,7 +1161,7 @@ static const byte spanish_simonFont[] = { 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, }; -static const byte english_commonFont[] = { +static const byte english_waxworksFont[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20, 0x00, 0x50, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, @@ -1262,7 +1262,7 @@ static const byte english_commonFont[] = { 0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x00, }; -static const byte french_commonFont[] = { +static const byte french_waxworksFont[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20, 0x00, 0x50, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, @@ -1363,7 +1363,7 @@ static const byte french_commonFont[] = { 0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x00, }; -static const byte italian_commonFont[] = { +static const byte italian_waxworksFont[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20, 0x00, 0x50, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, @@ -1464,7 +1464,7 @@ static const byte italian_commonFont[] = { 0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x00, }; -static const byte spanish_commonFont[] = { +static const byte spanish_waxworksFont[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20, 0x00, 0x50, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, @@ -1565,6 +1565,107 @@ static const byte spanish_commonFont[] = { 0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x00, }; +static const byte english_elvira1Font[] = { + 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, + 0x40, 0x20, 0x00, 0x60, 0x90, 0x90, 0x68, 0x00, + 0x20, 0x50, 0x00, 0x98, 0x90, 0x90, 0xE8, 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, + 0x20, 0x50, 0x00, 0x60, 0x90, 0x90, 0x68, 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, +}; + void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { const byte *src; byte color, *dst; @@ -1619,7 +1720,7 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { default: error("windowDrawChar: Unknown language %d\n", _language); } - } else { + } else if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) { dst = (byte *)screen->pixels + y * _dxSurfacePitch + x + window->textColumnOffset; h = 8; w = 6; @@ -1627,20 +1728,26 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { // TODO: Add font tables for German switch (_language) { case Common::ES_ESP: - src = spanish_commonFont + (chr - 32) * 8; + src = spanish_waxworksFont + (chr - 32) * 8; break; case Common::IT_ITA: - src = italian_commonFont + (chr - 32) * 8; + src = italian_waxworksFont + (chr - 32) * 8; break; case Common::FR_FRA: - src = french_commonFont + (chr - 32) * 8; + src = french_waxworksFont + (chr - 32) * 8; break; case Common::EN_ANY: - src = english_commonFont + (chr - 32) * 8; + src = english_waxworksFont + (chr - 32) * 8; break; default: error("windowDrawChar: Unknown language %d\n", _language); } + } else if (getGameType() == GType_ELVIRA1) { + dst = (byte *)screen->pixels + y * _dxSurfacePitch + x + window->textColumnOffset; + h = 8; + w = 6; + + src = english_elvira1Font + (chr - 32) * 8; } color = window->textColor; -- cgit v1.2.3