2002-12-25 21:04:47 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2006-01-18 17:39:49 +00:00
|
|
|
* Copyright (C) 2001-2006 The ScummVM project
|
2002-12-25 21:04:47 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-12-25 21:04:47 +00:00
|
|
|
*
|
2006-02-11 09:55:41 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2002-12-25 21:04:47 +00:00
|
|
|
*/
|
|
|
|
|
2005-06-24 15:23:51 +00:00
|
|
|
#include "common/stdafx.h"
|
2003-10-03 18:33:57 +00:00
|
|
|
#include "scumm/charset.h"
|
|
|
|
#include "scumm/scumm.h"
|
|
|
|
#include "scumm/nut_renderer.h"
|
2005-04-10 12:59:17 +00:00
|
|
|
#include "scumm/util.h"
|
2006-02-15 00:57:50 +00:00
|
|
|
#include "scumm/he/wiz_he.h"
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
namespace Scumm {
|
|
|
|
|
2004-09-20 22:04:06 +00:00
|
|
|
void ScummEngine::loadCJKFont() {
|
2005-05-10 22:56:25 +00:00
|
|
|
Common::File fp;
|
2004-09-20 22:04:06 +00:00
|
|
|
_useCJKMode = false;
|
2004-10-23 23:08:53 +00:00
|
|
|
if (_language == Common::JA_JPN && _version <= 5) { // FM-TOWNS v3 / v5 Kanji
|
|
|
|
int numChar = 256 * 32;
|
|
|
|
_2byteWidth = 16;
|
|
|
|
_2byteHeight = 16;
|
|
|
|
// use FM-TOWNS font rom, since game files don't have kanji font resources
|
2005-05-10 22:56:25 +00:00
|
|
|
if (fp.open("fmt_fnt.rom", Common::File::kFileReadMode)) {
|
2004-10-23 23:08:53 +00:00
|
|
|
_useCJKMode = true;
|
|
|
|
debug(2, "Loading FM-TOWNS Kanji rom");
|
|
|
|
_2byteFontPtr = new byte[((_2byteWidth + 7) / 8) * _2byteHeight * numChar];
|
|
|
|
fp.read(_2byteFontPtr, ((_2byteWidth + 7) / 8) * _2byteHeight * numChar);
|
|
|
|
fp.close();
|
|
|
|
}
|
|
|
|
} else if (_language == Common::KO_KOR || _language == Common::JA_JPN || _language == Common::ZH_TWN) {
|
|
|
|
int numChar = 0;
|
2004-09-20 22:04:06 +00:00
|
|
|
const char *fontFile = NULL;
|
2004-10-23 23:08:53 +00:00
|
|
|
|
2004-10-22 10:25:56 +00:00
|
|
|
switch (_language) {
|
2004-09-20 22:04:06 +00:00
|
|
|
case Common::KO_KOR:
|
|
|
|
fontFile = "korean.fnt";
|
2004-10-23 23:08:53 +00:00
|
|
|
numChar = 2350;
|
2004-09-20 22:04:06 +00:00
|
|
|
break;
|
|
|
|
case Common::JA_JPN:
|
|
|
|
fontFile = (_gameId == GID_DIG) ? "kanji16.fnt" : "japanese.fnt";
|
2004-10-23 23:08:53 +00:00
|
|
|
numChar = 1024; //FIXME
|
2004-09-20 22:04:06 +00:00
|
|
|
break;
|
|
|
|
case Common::ZH_TWN:
|
|
|
|
if (_gameId == GID_CMI) {
|
|
|
|
fontFile = "chinese.fnt";
|
2004-10-23 23:08:53 +00:00
|
|
|
numChar = 1; //FIXME
|
2004-09-20 22:04:06 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (fontFile && fp.open(fontFile)) {
|
|
|
|
debug(2, "Loading CJK Font");
|
|
|
|
_useCJKMode = true;
|
|
|
|
fp.seek(2, SEEK_CUR);
|
|
|
|
_2byteWidth = fp.readByte();
|
|
|
|
_2byteHeight = fp.readByte();
|
|
|
|
|
|
|
|
_2byteFontPtr = new byte[((_2byteWidth + 7) / 8) * _2byteHeight * numChar];
|
|
|
|
fp.read(_2byteFontPtr, ((_2byteWidth + 7) / 8) * _2byteHeight * numChar);
|
|
|
|
fp.close();
|
2004-10-23 23:08:53 +00:00
|
|
|
} else {
|
2005-08-14 01:41:52 +00:00
|
|
|
error("Couldn't load any font");
|
2004-09-20 22:04:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-10-23 23:08:53 +00:00
|
|
|
static int SJIStoFMTChunk(int f, int s) { //converts sjis code to fmt font offset
|
2004-09-20 22:04:06 +00:00
|
|
|
enum {
|
|
|
|
KANA = 0,
|
|
|
|
KANJI = 1,
|
|
|
|
EKANJI = 2
|
|
|
|
};
|
2004-10-23 23:08:53 +00:00
|
|
|
int base = s - ((s + 1) % 32);
|
|
|
|
int c = 0, p = 0, chunk_f = 0, chunk = 0, cr = 0, kanjiType = KANA;
|
2004-09-20 22:04:06 +00:00
|
|
|
|
|
|
|
if (f >= 0x81 && f <= 0x84) kanjiType = KANA;
|
|
|
|
if (f >= 0x88 && f <= 0x9f) kanjiType = KANJI;
|
|
|
|
if (f >= 0xe0 && f <= 0xea) kanjiType = EKANJI;
|
|
|
|
|
|
|
|
if ((f > 0xe8 || (f == 0xe8 && base >= 0x9f)) || (f > 0x90 || (f == 0x90 && base >= 0x9f))) {
|
|
|
|
c = 48; //correction
|
|
|
|
p = -8; //correction
|
|
|
|
}
|
|
|
|
|
|
|
|
if (kanjiType == KANA) {//Kana
|
|
|
|
chunk_f = (f - 0x81) * 2;
|
|
|
|
} else if (kanjiType == KANJI) {//Standard Kanji
|
|
|
|
p += f - 0x88;
|
|
|
|
chunk_f = c + 2 * p;
|
|
|
|
} else if (kanjiType == EKANJI) {//Enhanced Kanji
|
|
|
|
p += f - 0xe0;
|
|
|
|
chunk_f = c + 2 * p;
|
|
|
|
}
|
|
|
|
|
2004-10-23 23:08:53 +00:00
|
|
|
// Base corrections
|
2004-09-20 22:04:06 +00:00
|
|
|
if (base == 0x7f && s == 0x7f)
|
2004-10-23 23:08:53 +00:00
|
|
|
base -= 0x20;
|
|
|
|
if (base == 0x9f && s == 0xbe)
|
|
|
|
base += 0x20;
|
|
|
|
if (base == 0xbf && s == 0xde)
|
|
|
|
base += 0x20;
|
|
|
|
//if (base == 0x7f && s == 0x9e)
|
|
|
|
// base += 0x20;
|
2004-09-20 22:04:06 +00:00
|
|
|
|
2004-10-22 10:25:56 +00:00
|
|
|
switch (base) {
|
2004-09-20 22:04:06 +00:00
|
|
|
case 0x3f:
|
|
|
|
cr = 0; //3f
|
|
|
|
if (kanjiType == KANA) chunk = 1;
|
|
|
|
else if (kanjiType == KANJI) chunk = 31;
|
|
|
|
else if (kanjiType == EKANJI) chunk = 111;
|
|
|
|
break;
|
|
|
|
case 0x5f:
|
|
|
|
cr = 0; //5f
|
|
|
|
if (kanjiType == KANA) chunk = 17;
|
|
|
|
else if (kanjiType == KANJI) chunk = 47;
|
|
|
|
else if (kanjiType == EKANJI) chunk = 127;
|
|
|
|
break;
|
|
|
|
case 0x7f:
|
|
|
|
cr = -1; //80
|
|
|
|
if (kanjiType == KANA) chunk = 9;
|
|
|
|
else if (kanjiType == KANJI) chunk = 63;
|
|
|
|
else if (kanjiType == EKANJI) chunk = 143;
|
|
|
|
break;
|
|
|
|
case 0x9f:
|
|
|
|
cr = 1; //9e
|
|
|
|
if (kanjiType == KANA) chunk = 2;
|
|
|
|
else if (kanjiType == KANJI) chunk = 32;
|
|
|
|
else if (kanjiType == EKANJI) chunk = 112;
|
|
|
|
break;
|
|
|
|
case 0xbf:
|
|
|
|
cr = 1; //be
|
|
|
|
if (kanjiType == KANA) chunk = 18;
|
|
|
|
else if (kanjiType == KANJI) chunk = 48;
|
|
|
|
else if (kanjiType == EKANJI) chunk = 128;
|
|
|
|
break;
|
|
|
|
case 0xdf:
|
|
|
|
cr = 1; //de
|
|
|
|
if (kanjiType == KANA) chunk = 10;
|
|
|
|
else if (kanjiType == KANJI) chunk = 64;
|
|
|
|
else if (kanjiType == EKANJI) chunk = 144;
|
|
|
|
break;
|
|
|
|
default:
|
2005-11-27 10:32:21 +00:00
|
|
|
debug(4, "Invalid Char! f %x s %x base %x c %d p %d", f, s, base, c, p);
|
2004-09-20 22:04:06 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-10-23 23:08:53 +00:00
|
|
|
debug(6, "Kanji: %c%c f 0x%x s 0x%x base 0x%x c %d p %d chunk %d cr %d index %d", f, s, f, s, base, c, p, chunk, cr, ((chunk_f + chunk) * 32 + (s - base)) + cr);
|
2004-09-20 22:04:06 +00:00
|
|
|
return ((chunk_f + chunk) * 32 + (s - base)) + cr;
|
|
|
|
}
|
|
|
|
|
|
|
|
byte *ScummEngine::get2byteCharPtr(int idx) {
|
2004-10-22 10:25:56 +00:00
|
|
|
switch (_language) {
|
2004-09-20 22:04:06 +00:00
|
|
|
case Common::KO_KOR:
|
|
|
|
idx = ((idx % 256) - 0xb0) * 94 + (idx / 256) - 0xa1;
|
|
|
|
break;
|
|
|
|
case Common::JA_JPN:
|
|
|
|
idx = SJIStoFMTChunk((idx % 256), (idx / 256));
|
|
|
|
break;
|
|
|
|
case Common::ZH_TWN:
|
|
|
|
default:
|
|
|
|
idx = 0;
|
|
|
|
}
|
|
|
|
return _2byteFontPtr + ((_2byteWidth + 7) / 8) * _2byteHeight * idx;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#pragma mark -
|
|
|
|
|
|
|
|
|
2003-10-02 22:42:03 +00:00
|
|
|
CharsetRenderer::CharsetRenderer(ScummEngine *vm) {
|
2003-05-20 15:12:33 +00:00
|
|
|
|
|
|
|
_nextLeft = 0;
|
|
|
|
_nextTop = 0;
|
|
|
|
|
|
|
|
_top = 0;
|
|
|
|
_left = 0;
|
|
|
|
_startLeft = 0;
|
|
|
|
_right = 0;
|
|
|
|
|
|
|
|
_color = 0;
|
|
|
|
|
|
|
|
_center = false;
|
|
|
|
_hasMask = false;
|
2004-04-08 23:41:10 +00:00
|
|
|
_textScreenID = kMainVirtScreen;
|
2003-05-20 15:12:33 +00:00
|
|
|
_blitAlso = false;
|
|
|
|
_firstChar = false;
|
|
|
|
_disableOffsX = false;
|
|
|
|
|
|
|
|
_vm = vm;
|
|
|
|
_curId = 0;
|
2005-03-25 01:52:20 +00:00
|
|
|
|
|
|
|
const int size = _vm->_screenWidth * _vm->_screenHeight;
|
|
|
|
_textSurface.pixels = malloc(size);
|
|
|
|
_textSurface.w = _vm->_screenWidth;
|
|
|
|
_textSurface.h = _vm->_screenHeight;
|
|
|
|
_textSurface.pitch = _vm->_screenWidth;
|
|
|
|
_textSurface.bytesPerPixel = 1;
|
2005-04-05 07:53:46 +00:00
|
|
|
clearTextSurface();
|
2005-03-25 01:52:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CharsetRenderer::~CharsetRenderer() {
|
|
|
|
free(_textSurface.pixels);
|
2003-05-20 15:12:33 +00:00
|
|
|
}
|
2004-08-30 11:52:33 +00:00
|
|
|
|
2005-06-04 16:10:39 +00:00
|
|
|
CharsetRendererCommon::CharsetRendererCommon(ScummEngine *vm)
|
2005-11-06 08:56:50 +00:00
|
|
|
: CharsetRenderer(vm), _bitDepth(0), _fontHeight(0), _numChars(0) {
|
2005-06-04 16:10:39 +00:00
|
|
|
_shadowMode = kNoShadowMode;
|
|
|
|
_shadowColor = 0;
|
|
|
|
}
|
|
|
|
|
2003-03-06 17:58:13 +00:00
|
|
|
void CharsetRendererCommon::setCurID(byte id) {
|
2003-12-26 23:11:35 +00:00
|
|
|
checkRange(_vm->_numCharsets - 1, 0, id, "Printing with bad charset %d");
|
2002-12-26 00:21:19 +00:00
|
|
|
|
2002-12-25 21:04:47 +00:00
|
|
|
_curId = id;
|
|
|
|
|
2002-12-26 00:21:19 +00:00
|
|
|
_fontPtr = _vm->getResourceAddress(rtCharset, id);
|
2003-05-01 11:03:41 +00:00
|
|
|
if (_fontPtr == 0)
|
2003-07-13 16:22:17 +00:00
|
|
|
error("CharsetRendererCommon::setCurID: charset %d not found!", id);
|
2003-05-01 11:03:41 +00:00
|
|
|
|
2003-06-07 00:13:26 +00:00
|
|
|
if (_vm->_version == 4)
|
2002-12-26 00:21:19 +00:00
|
|
|
_fontPtr += 17;
|
2002-12-25 21:04:47 +00:00
|
|
|
else
|
2002-12-26 00:21:19 +00:00
|
|
|
_fontPtr += 29;
|
2005-05-26 16:38:02 +00:00
|
|
|
|
2005-11-06 08:56:50 +00:00
|
|
|
_bitDepth = _fontPtr[0];
|
2005-05-26 16:38:02 +00:00
|
|
|
_fontHeight = _fontPtr[1];
|
|
|
|
_numChars = READ_LE_UINT16(_fontPtr + 2);
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
|
|
|
|
2003-05-08 22:44:46 +00:00
|
|
|
void CharsetRendererV3::setCurID(byte id) {
|
2003-12-26 23:11:35 +00:00
|
|
|
checkRange(_vm->_numCharsets - 1, 0, id, "Printing with bad charset %d");
|
2003-05-08 22:44:46 +00:00
|
|
|
|
|
|
|
_curId = id;
|
|
|
|
|
|
|
|
_fontPtr = _vm->getResourceAddress(rtCharset, id);
|
|
|
|
if (_fontPtr == 0)
|
2003-07-13 16:22:17 +00:00
|
|
|
error("CharsetRendererCommon::setCurID: charset %d not found!", id);
|
2003-05-08 22:44:46 +00:00
|
|
|
|
2005-11-06 08:56:50 +00:00
|
|
|
_bitDepth = 1;
|
2004-08-23 08:37:55 +00:00
|
|
|
_numChars = _fontPtr[4];
|
2005-05-26 16:38:02 +00:00
|
|
|
_fontHeight = _fontPtr[5];
|
|
|
|
|
2003-05-08 22:44:46 +00:00
|
|
|
_fontPtr += 6;
|
|
|
|
_widthTable = _fontPtr;
|
2004-08-23 08:37:55 +00:00
|
|
|
_fontPtr += _numChars;
|
2003-05-08 22:44:46 +00:00
|
|
|
}
|
|
|
|
|
2004-10-23 23:08:53 +00:00
|
|
|
int CharsetRendererCommon::getFontHeight() {
|
2005-05-08 21:49:52 +00:00
|
|
|
if (_vm->_useCJKMode)
|
2005-05-26 16:38:02 +00:00
|
|
|
return MAX(_vm->_2byteHeight + 1, _fontHeight);
|
2004-10-23 23:08:53 +00:00
|
|
|
else
|
2005-05-26 16:38:02 +00:00
|
|
|
return _fontHeight;
|
2004-10-23 23:08:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int CharsetRendererV3::getFontHeight() {
|
2005-05-08 21:49:52 +00:00
|
|
|
if (_vm->_useCJKMode)
|
2005-05-26 16:38:02 +00:00
|
|
|
return MAX(_vm->_2byteHeight + 1, _fontHeight);
|
2004-10-23 23:08:53 +00:00
|
|
|
else
|
2005-05-26 16:38:02 +00:00
|
|
|
return _fontHeight;
|
2004-10-23 23:08:53 +00:00
|
|
|
}
|
|
|
|
|
2002-12-25 21:04:47 +00:00
|
|
|
// do spacing for variable width old-style font
|
2003-03-06 17:58:13 +00:00
|
|
|
int CharsetRendererClassic::getCharWidth(byte chr) {
|
2004-09-18 22:42:45 +00:00
|
|
|
if (chr >= 0x80 && _vm->_useCJKMode)
|
2004-10-23 23:08:53 +00:00
|
|
|
return _vm->_2byteWidth / 2;
|
2002-12-25 21:04:47 +00:00
|
|
|
int spacing = 0;
|
2002-12-25 21:57:01 +00:00
|
|
|
|
2002-12-26 00:21:19 +00:00
|
|
|
int offs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
|
2002-12-25 21:57:01 +00:00
|
|
|
if (offs) {
|
2003-06-04 14:37:43 +00:00
|
|
|
spacing = _fontPtr[offs] + (signed char)_fontPtr[offs + 2];
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2002-12-25 21:57:01 +00:00
|
|
|
return spacing;
|
|
|
|
}
|
|
|
|
|
2003-05-21 16:28:02 +00:00
|
|
|
int CharsetRenderer::getStringWidth(int arg, const byte *text) {
|
2002-12-25 21:42:22 +00:00
|
|
|
int pos = 0;
|
2002-12-26 00:21:19 +00:00
|
|
|
int width = 1;
|
2002-12-25 21:04:47 +00:00
|
|
|
byte chr;
|
2003-06-19 11:13:11 +00:00
|
|
|
int oldID = getCurID();
|
2004-08-31 07:32:53 +00:00
|
|
|
int code = (_vm->_heversion >= 80) ? 127 : 64;
|
2002-12-25 21:04:47 +00:00
|
|
|
|
|
|
|
while ((chr = text[pos++]) != 0) {
|
2005-11-04 23:52:01 +00:00
|
|
|
if (chr == '\n' || chr == '\r')
|
|
|
|
break;
|
2005-11-04 13:09:57 +00:00
|
|
|
if (_vm->_heversion >= 72) {
|
|
|
|
if (chr == code) {
|
|
|
|
chr = text[pos++];
|
2005-11-04 23:52:01 +00:00
|
|
|
if (chr == 84 || chr == 116) { // Strings of speech offset/size
|
2005-11-04 13:09:57 +00:00
|
|
|
while (chr != code)
|
|
|
|
chr = text[pos++];
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (chr == 119) // 'Wait'
|
|
|
|
break;
|
|
|
|
if (chr == 104|| chr == 110) // 'Newline'
|
2002-12-25 21:04:47 +00:00
|
|
|
break;
|
|
|
|
}
|
2005-11-04 13:09:57 +00:00
|
|
|
} else {
|
|
|
|
if (chr == '@')
|
2002-12-25 21:04:47 +00:00
|
|
|
continue;
|
2005-11-04 13:09:57 +00:00
|
|
|
if (chr == 255 || (_vm->_version <= 6 && chr == 254)) {
|
|
|
|
chr = text[pos++];
|
|
|
|
if (chr == 3) // 'WAIT'
|
|
|
|
break;
|
|
|
|
if (chr == 8) { // 'Verb on next line'
|
|
|
|
if (arg == 1)
|
|
|
|
break;
|
|
|
|
while (text[pos++] == ' ')
|
|
|
|
;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (chr == 10 || chr == 21 || chr == 12 || chr == 13) {
|
|
|
|
pos += 2;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (chr == 9 || chr == 1 || chr == 2) // 'Newline'
|
|
|
|
break;
|
|
|
|
if (chr == 14) {
|
|
|
|
int set = text[pos] | (text[pos + 1] << 8);
|
|
|
|
pos += 2;
|
|
|
|
setCurID(set);
|
|
|
|
continue;
|
|
|
|
}
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
|
|
|
}
|
2004-10-23 23:08:53 +00:00
|
|
|
if ((chr & 0x80) && _vm->_useCJKMode) {
|
|
|
|
pos++;
|
|
|
|
width += _vm->_2byteWidth;
|
|
|
|
} else {
|
|
|
|
width += getCharWidth(chr);
|
|
|
|
}
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
|
|
|
|
2002-12-26 00:21:19 +00:00
|
|
|
setCurID(oldID);
|
|
|
|
|
2002-12-25 21:04:47 +00:00
|
|
|
return width;
|
|
|
|
}
|
|
|
|
|
2003-03-06 17:58:13 +00:00
|
|
|
void CharsetRenderer::addLinebreaks(int a, byte *str, int pos, int maxwidth) {
|
2002-12-25 21:04:47 +00:00
|
|
|
int lastspace = -1;
|
|
|
|
int curw = 1;
|
|
|
|
byte chr;
|
2003-06-19 11:13:11 +00:00
|
|
|
int oldID = getCurID();
|
2004-08-31 07:32:53 +00:00
|
|
|
int code = (_vm->_heversion >= 80) ? 127 : 64;
|
2002-12-25 21:04:47 +00:00
|
|
|
|
|
|
|
while ((chr = str[pos++]) != 0) {
|
2005-11-04 13:09:57 +00:00
|
|
|
if (_vm->_heversion >= 72) {
|
|
|
|
if (chr == code) {
|
|
|
|
chr = str[pos++];
|
2005-11-04 23:52:01 +00:00
|
|
|
if (chr == 84 || chr == 116) { // Strings of speech offset/size
|
2005-11-04 13:09:57 +00:00
|
|
|
while (chr != code)
|
|
|
|
chr = str[pos++];
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (chr == 119) // 'Wait'
|
|
|
|
break;
|
|
|
|
if (chr == 110) { // 'Newline'
|
2002-12-25 21:04:47 +00:00
|
|
|
curw = 1;
|
2005-11-04 13:09:57 +00:00
|
|
|
continue;
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
2005-11-04 13:09:57 +00:00
|
|
|
if (chr == 104) // 'Don't terminate with \n'
|
|
|
|
break;
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
2005-11-04 13:09:57 +00:00
|
|
|
} else {
|
|
|
|
if (chr == '@')
|
2002-12-25 21:04:47 +00:00
|
|
|
continue;
|
2005-11-04 13:09:57 +00:00
|
|
|
if (chr == 255 || (_vm->_version <= 6 && chr == 254)) {
|
|
|
|
chr = str[pos++];
|
|
|
|
if (chr == 3) // 'Wait'
|
|
|
|
break;
|
|
|
|
if (chr == 8) { // 'Verb on next line'
|
|
|
|
if (a == 1) {
|
|
|
|
curw = 1;
|
|
|
|
} else {
|
|
|
|
while (str[pos] == ' ')
|
|
|
|
str[pos++] = '@';
|
|
|
|
}
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (chr == 10 || chr == 21 || chr == 12 || chr == 13) {
|
|
|
|
pos += 2;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (chr == 1) { // 'Newline'
|
|
|
|
curw = 1;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (chr == 2) // 'Don't terminate with \n'
|
|
|
|
break;
|
|
|
|
if (chr == 14) {
|
|
|
|
int set = str[pos] | (str[pos + 1] << 8);
|
|
|
|
pos += 2;
|
|
|
|
setCurID(set);
|
|
|
|
continue;
|
|
|
|
}
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (chr == ' ')
|
|
|
|
lastspace = pos - 1;
|
|
|
|
|
2004-10-23 23:08:53 +00:00
|
|
|
if ((chr & 0x80) && _vm->_useCJKMode) {
|
|
|
|
pos++;
|
|
|
|
curw += _vm->_2byteWidth;
|
|
|
|
} else {
|
|
|
|
curw += getCharWidth(chr);
|
|
|
|
}
|
2002-12-25 21:04:47 +00:00
|
|
|
if (lastspace == -1)
|
|
|
|
continue;
|
|
|
|
if (curw > maxwidth) {
|
|
|
|
str[lastspace] = 0xD;
|
|
|
|
curw = 1;
|
|
|
|
pos = lastspace + 1;
|
|
|
|
lastspace = -1;
|
|
|
|
}
|
|
|
|
}
|
2002-12-26 00:21:19 +00:00
|
|
|
|
|
|
|
setCurID(oldID);
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
|
|
|
|
2005-09-03 16:31:37 +00:00
|
|
|
#ifdef PALMOS_68K
|
2003-06-19 10:38:30 +00:00
|
|
|
static byte *englishCharsetDataV2;
|
2003-06-04 09:33:01 +00:00
|
|
|
static byte *germanCharsetDataV2;
|
|
|
|
static byte *frenchCharsetDataV2;
|
2003-06-19 10:38:30 +00:00
|
|
|
static byte *italianCharsetDataV2;
|
|
|
|
static byte *spanishCharsetDataV2;
|
2003-06-04 09:33:01 +00:00
|
|
|
#else
|
2003-06-19 10:14:58 +00:00
|
|
|
// English Zak font
|
|
|
|
static byte englishCharsetDataV2[] = {
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x01, 0x03, 0x06, 0x0C, 0x18, 0x3E, 0x03, 0x00,
|
|
|
|
0x80, 0xC0, 0x60, 0x30, 0x18, 0x7C, 0xC0, 0x00,
|
|
|
|
0x00, 0x03, 0x3E, 0x18, 0x0C, 0x06, 0x03, 0x01,
|
|
|
|
0x00, 0xC0, 0x7C, 0x18, 0x30, 0x60, 0xC0, 0x80,
|
|
|
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
|
|
|
0x03, 0x03, 0x03, 0x07, 0x07, 0x0F, 0x1F, 0x7F,
|
|
|
|
0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0,
|
|
|
|
0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07,
|
|
|
|
0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0C, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x30, 0x18,
|
|
|
|
0x18, 0x30, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x0C, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x1F, 0x1F, 0x18, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xF8, 0xF8, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xF8, 0xF8, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x1F, 0x1F, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x03, 0x07, 0x0C, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xC0, 0xE0, 0x30, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x30, 0xE0, 0xC0, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x0C, 0x07, 0x03, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x1F, 0x1F, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xF8, 0xF8, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xFF, 0xFF, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0xFF, 0xFF, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xFF, 0xFF, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x3C, 0x66, 0xC3, 0xC3, 0x66, 0x3C, 0x18,
|
|
|
|
0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x7E, 0x3C, 0x18,
|
|
|
|
0x18, 0x66, 0xC3, 0xDB, 0xDB, 0xC3, 0x66, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x66, 0x66, 0xFF, 0x66, 0xFF, 0x66, 0x66, 0x00,
|
|
|
|
0x18, 0x3E, 0x58, 0x3C, 0x1A, 0x7C, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x49, 0x00,
|
|
|
|
0x3C, 0x66, 0x3C, 0x38, 0x67, 0x66, 0x3F, 0x00,
|
|
|
|
0x06, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x0C, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0C, 0x00,
|
|
|
|
0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x18, 0x30, 0x00,
|
|
|
|
0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00,
|
|
|
|
0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30,
|
|
|
|
0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
|
|
|
|
0x00, 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x00,
|
|
|
|
0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00,
|
|
|
|
0x18, 0x18, 0x38, 0x18, 0x18, 0x18, 0x7E, 0x00,
|
|
|
|
0x3C, 0x66, 0x06, 0x0C, 0x30, 0x60, 0x7E, 0x00,
|
|
|
|
0x3C, 0x66, 0x06, 0x1C, 0x06, 0x66, 0x3C, 0x00,
|
|
|
|
0x06, 0x0E, 0x1E, 0x66, 0x7F, 0x06, 0x06, 0x00,
|
|
|
|
0x7E, 0x60, 0x7C, 0x06, 0x06, 0x66, 0x3C, 0x00,
|
|
|
|
0x3C, 0x66, 0x60, 0x7C, 0x66, 0x66, 0x3C, 0x00,
|
|
|
|
0x7E, 0x66, 0x0C, 0x18, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x3C, 0x66, 0x66, 0x3C, 0x66, 0x66, 0x3C, 0x00,
|
|
|
|
0x3C, 0x66, 0x66, 0x3E, 0x06, 0x66, 0x3C, 0x00,
|
|
|
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30,
|
|
|
|
0x0E, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0E, 0x00,
|
|
|
|
0x7C, 0x82, 0xBA, 0xA2, 0xBA, 0x82, 0x7C, 0x00,
|
|
|
|
0x70, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x70, 0x00,
|
|
|
|
0x3C, 0x66, 0x06, 0x0C, 0x18, 0x00, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x3C, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x7C, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x7C, 0x00,
|
|
|
|
0x3C, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3C, 0x00,
|
|
|
|
0x78, 0x6C, 0x66, 0x66, 0x66, 0x6C, 0x78, 0x00,
|
|
|
|
0x7E, 0x60, 0x60, 0x78, 0x60, 0x60, 0x7E, 0x00,
|
|
|
|
0x7E, 0x60, 0x60, 0x78, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x3C, 0x66, 0x60, 0x6E, 0x66, 0x66, 0x3C, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x3C, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00,
|
|
|
|
0x1E, 0x0C, 0x0C, 0x0C, 0x0C, 0x6C, 0x38, 0x00,
|
|
|
|
0x66, 0x6C, 0x78, 0x70, 0x78, 0x6C, 0x66, 0x00,
|
|
|
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7E, 0x00,
|
|
|
|
0x63, 0x77, 0x7F, 0x6B, 0x63, 0x63, 0x63, 0x00,
|
|
|
|
0x66, 0x76, 0x7E, 0x7E, 0x6E, 0x66, 0x66, 0x00,
|
|
|
|
0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00,
|
|
|
|
0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x3C, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x0E, 0x00,
|
|
|
|
0x7C, 0x66, 0x66, 0x7C, 0x78, 0x6C, 0x66, 0x00,
|
|
|
|
0x3C, 0x66, 0x60, 0x3C, 0x06, 0x66, 0x3C, 0x00,
|
|
|
|
0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00,
|
|
|
|
0x63, 0x63, 0x63, 0x6B, 0x7F, 0x77, 0x63, 0x00,
|
|
|
|
0x66, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x66, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x7E, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x7E, 0x00,
|
|
|
|
0x3C, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3C, 0x00,
|
|
|
|
0x0C, 0x12, 0x30, 0x7C, 0x30, 0x62, 0xFC, 0x00,
|
|
|
|
0x3C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x3C, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xDB, 0xDB, 0x00,
|
|
|
|
0x00, 0x10, 0x30, 0x7F, 0x7F, 0x30, 0x10, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00,
|
|
|
|
0x00, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x7C, 0x00,
|
|
|
|
0x00, 0x00, 0x3C, 0x60, 0x60, 0x60, 0x3C, 0x00,
|
|
|
|
0x00, 0x06, 0x06, 0x3E, 0x66, 0x66, 0x3E, 0x00,
|
|
|
|
0x00, 0x00, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00,
|
|
|
|
0x00, 0x0E, 0x18, 0x3E, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x7C,
|
|
|
|
0x00, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x00, 0x18, 0x00, 0x38, 0x18, 0x18, 0x3C, 0x00,
|
|
|
|
0x00, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x3C,
|
|
|
|
0x00, 0x60, 0x60, 0x6C, 0x78, 0x6C, 0x66, 0x00,
|
|
|
|
0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x7F, 0x7F, 0x6B, 0x63, 0x00,
|
|
|
|
0x00, 0x00, 0x7C, 0x66, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00,
|
|
|
|
0x00, 0x00, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60,
|
|
|
|
0x00, 0x00, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x06,
|
|
|
|
0x00, 0x00, 0x7C, 0x66, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x00, 0x00, 0x3E, 0x60, 0x3C, 0x06, 0x7C, 0x00,
|
|
|
|
0x00, 0x18, 0x7E, 0x18, 0x18, 0x18, 0x0E, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x63, 0x6B, 0x7F, 0x3E, 0x36, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x0C, 0x78,
|
|
|
|
0x00, 0x00, 0x7E, 0x0C, 0x18, 0x30, 0x7E, 0x00,
|
|
|
|
0x01, 0x03, 0x06, 0x6C, 0x78, 0x70, 0x60, 0x00,
|
|
|
|
0x18, 0x3C, 0x7E, 0xFF, 0x18, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0x18, 0xFF, 0x7E, 0x3C, 0x18,
|
|
|
|
0x10, 0x30, 0x70, 0xFF, 0xFF, 0x70, 0x30, 0x10,
|
|
|
|
0x08, 0x0C, 0x0E, 0xFF, 0xFF, 0x0E, 0x0C, 0x08,
|
|
|
|
};
|
|
|
|
|
|
|
|
// German Zak font
|
2003-05-25 20:21:28 +00:00
|
|
|
static byte germanCharsetDataV2[] = {
|
2003-05-08 22:44:46 +00:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2003-06-19 11:13:11 +00:00
|
|
|
0x01, 0x03, 0x06, 0x0c, 0x18, 0x3e, 0x03, 0x00,
|
|
|
|
0x80, 0xc0, 0x60, 0x30, 0x18, 0x7c, 0xc0, 0x00,
|
|
|
|
0x00, 0x03, 0x3e, 0x18, 0x0c, 0x06, 0x03, 0x01,
|
|
|
|
0x00, 0xc0, 0x7c, 0x18, 0x30, 0x60, 0xc0, 0x80,
|
|
|
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
|
|
|
0x03, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x1f, 0x7f,
|
|
|
|
0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0,
|
|
|
|
0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07,
|
|
|
|
0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0c, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x18,
|
|
|
|
0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x0c, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xc0, 0xe0, 0x30, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x30, 0xe0, 0xc0, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x3c, 0x66, 0xc3, 0xc3, 0x66, 0x3c, 0x18,
|
|
|
|
0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x3c, 0x18,
|
|
|
|
0x18, 0x66, 0xc3, 0xdb, 0xdb, 0xc3, 0x66, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x66, 0x66, 0xff, 0x66, 0xff, 0x66, 0x66, 0x00,
|
|
|
|
0x18, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x18, 0x00,
|
|
|
|
0x62, 0x66, 0x0c, 0x18, 0x30, 0x66, 0x46, 0x00,
|
|
|
|
0x3c, 0x66, 0x3c, 0x38, 0x67, 0x66, 0x3f, 0x00,
|
|
|
|
0x30, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x0c, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00,
|
|
|
|
0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00,
|
|
|
|
0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00,
|
|
|
|
0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30,
|
|
|
|
0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
|
|
|
|
0x00, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x18, 0x18, 0x38, 0x18, 0x18, 0x18, 0x7e, 0x00,
|
|
|
|
0x3c, 0x66, 0x06, 0x0c, 0x30, 0x60, 0x7e, 0x00,
|
|
|
|
0x3c, 0x66, 0x06, 0x1c, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x06, 0x0e, 0x1e, 0x66, 0x7f, 0x06, 0x06, 0x00,
|
|
|
|
0x7e, 0x60, 0x7c, 0x06, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x7c, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x7e, 0x66, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x3e, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30,
|
|
|
|
0x0e, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0e, 0x00,
|
|
|
|
0x7c, 0x82, 0xba, 0xa2, 0xa2, 0xba, 0x82, 0x7c,
|
|
|
|
0x70, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x70, 0x00,
|
|
|
|
0x3c, 0x66, 0x06, 0x0c, 0x18, 0x00, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x3c, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x7c, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3c, 0x00,
|
|
|
|
0x78, 0x6c, 0x66, 0x66, 0x66, 0x6c, 0x78, 0x00,
|
|
|
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x7e, 0x00,
|
|
|
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x6e, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x6c, 0x38, 0x00,
|
|
|
|
0x66, 0x6c, 0x78, 0x70, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7e, 0x00,
|
|
|
|
0x63, 0x77, 0x7f, 0x6b, 0x63, 0x63, 0x63, 0x00,
|
|
|
|
0x66, 0x76, 0x7e, 0x7e, 0x6e, 0x66, 0x66, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x0e, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x3c, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00,
|
|
|
|
0x63, 0x63, 0x63, 0x6b, 0x7f, 0x77, 0x63, 0x00,
|
|
|
|
0x66, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x66, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x7e, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x7e, 0x00,
|
|
|
|
0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x66, 0x00, 0x3c, 0x06, 0x3e, 0x66, 0x3e, 0x00,
|
|
|
|
0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xdb, 0x00,
|
|
|
|
0x00, 0x10, 0x30, 0x7f, 0x7f, 0x30, 0x10, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x06, 0x3e, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x7c, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x60, 0x60, 0x60, 0x3c, 0x00,
|
|
|
|
0x00, 0x06, 0x06, 0x3e, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
|
|
|
0x00, 0x0e, 0x18, 0x3e, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x3e, 0x66, 0x66, 0x3e, 0x06, 0x7c,
|
|
|
|
0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x00, 0x18, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x00, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x3c,
|
|
|
|
0x00, 0x60, 0x60, 0x6c, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x7f, 0x7f, 0x6b, 0x63, 0x00,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x66, 0x7c, 0x60, 0x60,
|
|
|
|
0x00, 0x00, 0x3e, 0x66, 0x66, 0x3e, 0x06, 0x06,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x00, 0x00, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x00,
|
|
|
|
0x00, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x0e, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x63, 0x6b, 0x7f, 0x3e, 0x36, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3e, 0x0c, 0x78,
|
|
|
|
0x00, 0x00, 0x7e, 0x0c, 0x18, 0x30, 0x7e, 0x00,
|
|
|
|
0x66, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x66, 0x18, 0x3c, 0x66, 0x7e, 0x66, 0x66, 0x00,
|
|
|
|
0x42, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x1c, 0x36, 0x36, 0x7c, 0x66, 0x66, 0x7c, 0x40,
|
|
|
|
0x08, 0x0c, 0x0e, 0xff, 0xff, 0x0e, 0x0c, 0x08,
|
2003-05-08 22:44:46 +00:00
|
|
|
};
|
|
|
|
|
2003-06-19 10:14:58 +00:00
|
|
|
// French Zak font.
|
2003-05-25 20:21:28 +00:00
|
|
|
static byte frenchCharsetDataV2[] = {
|
2003-06-19 11:13:11 +00:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x01, 0x03, 0x06, 0x0c, 0x18, 0x3e, 0x03, 0x00,
|
|
|
|
0x80, 0xc0, 0x60, 0x30, 0x18, 0x7c, 0xc0, 0x00,
|
|
|
|
0x00, 0x03, 0x3e, 0x18, 0x0c, 0x06, 0x03, 0x01,
|
|
|
|
0x00, 0xc0, 0x7c, 0x18, 0x30, 0x60, 0xc0, 0x80,
|
|
|
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
|
|
|
0x03, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x1f, 0x7f,
|
|
|
|
0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0,
|
|
|
|
0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07,
|
|
|
|
0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0c, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x18,
|
|
|
|
0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x0c, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xc0, 0xe0, 0x30, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x30, 0xe0, 0xc0, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x3c, 0x66, 0xc3, 0xc3, 0x66, 0x3c, 0x18,
|
|
|
|
0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x3c, 0x18,
|
|
|
|
0x18, 0x66, 0xc3, 0xdb, 0xdb, 0xc3, 0x66, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x66, 0x66, 0xff, 0x66, 0xff, 0x66, 0x66, 0x00,
|
|
|
|
0x18, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x18, 0x00,
|
|
|
|
0x62, 0x66, 0x0c, 0x18, 0x30, 0x66, 0x46, 0x00,
|
|
|
|
0x3c, 0x66, 0x3c, 0x38, 0x67, 0x66, 0x3f, 0x00,
|
|
|
|
0x30, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x0c, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00,
|
|
|
|
0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00,
|
|
|
|
0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00,
|
|
|
|
0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30,
|
|
|
|
0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
|
|
|
|
0x00, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x18, 0x18, 0x38, 0x18, 0x18, 0x18, 0x7e, 0x00,
|
|
|
|
0x3c, 0x66, 0x06, 0x0c, 0x30, 0x60, 0x7e, 0x00,
|
|
|
|
0x3c, 0x66, 0x06, 0x1c, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x06, 0x0e, 0x1e, 0x66, 0x7f, 0x06, 0x06, 0x00,
|
|
|
|
0x7e, 0x60, 0x7c, 0x06, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x7c, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x7e, 0x66, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x3e, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30,
|
|
|
|
0x10, 0x08, 0x3c, 0x06, 0x3e, 0x66, 0x3e, 0x00,
|
|
|
|
0x18, 0x24, 0x3c, 0x06, 0x3e, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x60, 0x60, 0x3c, 0x18, 0x38,
|
|
|
|
0x3c, 0x66, 0x06, 0x0c, 0x18, 0x00, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x3c, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x7c, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3c, 0x00,
|
|
|
|
0x78, 0x6c, 0x66, 0x66, 0x66, 0x6c, 0x78, 0x00,
|
|
|
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x7e, 0x00,
|
|
|
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x6e, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x6c, 0x38, 0x00,
|
|
|
|
0x66, 0x6c, 0x78, 0x70, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7e, 0x00,
|
|
|
|
0x63, 0x77, 0x7f, 0x6b, 0x63, 0x63, 0x63, 0x00,
|
|
|
|
0x66, 0x76, 0x7e, 0x7e, 0x6e, 0x66, 0x66, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x0e, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x3c, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00,
|
|
|
|
0x63, 0x63, 0x63, 0x6b, 0x7f, 0x77, 0x63, 0x00,
|
|
|
|
0x66, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x66, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x7e, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x7e, 0x00,
|
|
|
|
0x08, 0x10, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
|
|
|
0x10, 0x08, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
|
|
|
0x18, 0x24, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xdb, 0x00,
|
|
|
|
0x00, 0x6c, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x06, 0x3e, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x7c, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x60, 0x60, 0x60, 0x3c, 0x00,
|
|
|
|
0x00, 0x06, 0x06, 0x3e, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
|
|
|
0x00, 0x0e, 0x18, 0x3e, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x3e, 0x66, 0x66, 0x3e, 0x06, 0x7c,
|
|
|
|
0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x00, 0x18, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x00, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x3c,
|
|
|
|
0x00, 0x60, 0x60, 0x6c, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x7f, 0x7f, 0x6b, 0x63, 0x00,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x66, 0x7c, 0x60, 0x60,
|
|
|
|
0x00, 0x00, 0x3e, 0x66, 0x66, 0x3e, 0x06, 0x06,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x00, 0x00, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x00,
|
|
|
|
0x00, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x0e, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x63, 0x6b, 0x7f, 0x3e, 0x36, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3e, 0x0c, 0x78,
|
|
|
|
0x00, 0x00, 0x7e, 0x0c, 0x18, 0x30, 0x7e, 0x00,
|
|
|
|
0x18, 0x24, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x18, 0x24, 0x00, 0x3c, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x10, 0x08, 0x00, 0x66, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x18, 0x24, 0x00, 0x66, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x08, 0x0c, 0x0e, 0xff, 0xff, 0x0e, 0x0c, 0x08,
|
2003-05-25 20:21:28 +00:00
|
|
|
};
|
2003-06-19 10:14:58 +00:00
|
|
|
|
|
|
|
// Italian Zak font.
|
|
|
|
static byte italianCharsetDataV2[] = {
|
2003-06-19 11:13:11 +00:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x01, 0x03, 0x06, 0x0c, 0x18, 0x3e, 0x03, 0x00,
|
|
|
|
0x80, 0xc0, 0x60, 0x30, 0x18, 0x7c, 0xc0, 0x00,
|
|
|
|
0x00, 0x03, 0x3e, 0x18, 0x0c, 0x06, 0x03, 0x01,
|
|
|
|
0x00, 0xc0, 0x7c, 0x18, 0x30, 0x60, 0xc0, 0x80,
|
|
|
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
|
|
|
0x03, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x1f, 0x7f,
|
|
|
|
0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0,
|
|
|
|
0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07,
|
|
|
|
0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0c, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x18,
|
|
|
|
0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x0c, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xc0, 0xe0, 0x30, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x30, 0xe0, 0xc0, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x3c, 0x66, 0xc3, 0xc3, 0x66, 0x3c, 0x18,
|
|
|
|
0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x3c, 0x18,
|
|
|
|
0x18, 0x66, 0xc3, 0xdb, 0xdb, 0xc3, 0x66, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x66, 0x66, 0xff, 0x66, 0xff, 0x66, 0x66, 0x00,
|
|
|
|
0x18, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x18, 0x00,
|
|
|
|
0x62, 0x66, 0x0c, 0x18, 0x30, 0x66, 0x46, 0x00,
|
|
|
|
0x3c, 0x66, 0x3c, 0x38, 0x67, 0x66, 0x3f, 0x00,
|
|
|
|
0x30, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x0c, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00,
|
|
|
|
0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00,
|
|
|
|
0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00,
|
|
|
|
0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30,
|
|
|
|
0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
|
|
|
|
0x00, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x18, 0x18, 0x38, 0x18, 0x18, 0x18, 0x7e, 0x00,
|
|
|
|
0x3c, 0x66, 0x06, 0x0c, 0x30, 0x60, 0x7e, 0x00,
|
|
|
|
0x3c, 0x66, 0x06, 0x1c, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x06, 0x0e, 0x1e, 0x66, 0x7f, 0x06, 0x06, 0x00,
|
|
|
|
0x7e, 0x60, 0x7c, 0x06, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x7c, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x7e, 0x66, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x3e, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30,
|
|
|
|
0x10, 0x08, 0x3c, 0x06, 0x3e, 0x66, 0x3e, 0x00,
|
|
|
|
0x08, 0x10, 0x3c, 0x06, 0x3e, 0x66, 0x3e, 0x00,
|
|
|
|
0x10, 0x08, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
|
|
|
0x3c, 0x66, 0x06, 0x0c, 0x18, 0x00, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x3c, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x7c, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3c, 0x00,
|
|
|
|
0x78, 0x6c, 0x66, 0x66, 0x66, 0x6c, 0x78, 0x00,
|
|
|
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x7e, 0x00,
|
|
|
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x6e, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x6c, 0x38, 0x00,
|
|
|
|
0x66, 0x6c, 0x78, 0x70, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7e, 0x00,
|
|
|
|
0x63, 0x77, 0x7f, 0x6b, 0x63, 0x63, 0x63, 0x00,
|
|
|
|
0x66, 0x76, 0x7e, 0x7e, 0x6e, 0x66, 0x66, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x0e, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x3c, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00,
|
|
|
|
0x63, 0x63, 0x63, 0x6b, 0x7f, 0x77, 0x63, 0x00,
|
|
|
|
0x66, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x66, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x7e, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x7e, 0x00,
|
|
|
|
0x08, 0x10, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
|
|
|
0x10, 0x08, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
|
|
|
0x18, 0x24, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xdb, 0x00,
|
|
|
|
0x00, 0x6c, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x06, 0x3e, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x7c, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x60, 0x60, 0x60, 0x3c, 0x00,
|
|
|
|
0x00, 0x06, 0x06, 0x3e, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
|
|
|
0x00, 0x0e, 0x18, 0x3e, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x3e, 0x66, 0x66, 0x3e, 0x06, 0x7c,
|
|
|
|
0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x00, 0x18, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x00, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x3c,
|
|
|
|
0x00, 0x60, 0x60, 0x6c, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x7f, 0x7f, 0x6b, 0x63, 0x00,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x66, 0x7c, 0x60, 0x60,
|
|
|
|
0x00, 0x00, 0x3e, 0x66, 0x66, 0x3e, 0x06, 0x06,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x00, 0x00, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x00,
|
|
|
|
0x00, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x0e, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x63, 0x6b, 0x7f, 0x3e, 0x36, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3e, 0x0c, 0x78,
|
|
|
|
0x00, 0x00, 0x7e, 0x0c, 0x18, 0x30, 0x7e, 0x00,
|
|
|
|
0x10, 0x08, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x10, 0x08, 0x00, 0x3c, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x10, 0x08, 0x00, 0x66, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x18, 0x24, 0x00, 0x66, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x08, 0x0c, 0x0e, 0xff, 0xff, 0x0e, 0x0c, 0x08,
|
2003-06-19 10:29:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Spanish Zak font.
|
2005-07-30 21:11:48 +00:00
|
|
|
// FIXME: This is identical to germanCharsetDataV2 it seems?!
|
2003-06-19 10:29:38 +00:00
|
|
|
static byte spanishCharsetDataV2[] = {
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x01, 0x03, 0x06, 0x0c, 0x18, 0x3e, 0x03, 0x00,
|
|
|
|
0x80, 0xc0, 0x60, 0x30, 0x18, 0x7c, 0xc0, 0x00,
|
|
|
|
0x00, 0x03, 0x3e, 0x18, 0x0c, 0x06, 0x03, 0x01,
|
|
|
|
0x00, 0xc0, 0x7c, 0x18, 0x30, 0x60, 0xc0, 0x80,
|
|
|
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
|
|
|
0x03, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x1f, 0x7f,
|
|
|
|
0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0,
|
|
|
|
0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07,
|
|
|
|
0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0c, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x18,
|
|
|
|
0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x0c, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xc0, 0xe0, 0x30, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x30, 0xe0, 0xc0, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18,
|
|
|
|
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x3c, 0x66, 0xc3, 0xc3, 0x66, 0x3c, 0x18,
|
|
|
|
0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x3c, 0x18,
|
|
|
|
0x18, 0x66, 0xc3, 0xdb, 0xdb, 0xc3, 0x66, 0x18,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x66, 0x66, 0xff, 0x66, 0xff, 0x66, 0x66, 0x00,
|
|
|
|
0x18, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x18, 0x00,
|
|
|
|
0x62, 0x66, 0x0c, 0x18, 0x30, 0x66, 0x46, 0x00,
|
|
|
|
0x3c, 0x66, 0x3c, 0x38, 0x67, 0x66, 0x3f, 0x00,
|
|
|
|
0x30, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x0c, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00,
|
|
|
|
0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00,
|
|
|
|
0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00,
|
|
|
|
0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30,
|
|
|
|
0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
|
|
|
|
0x00, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x18, 0x18, 0x38, 0x18, 0x18, 0x18, 0x7e, 0x00,
|
|
|
|
0x3c, 0x66, 0x06, 0x0c, 0x30, 0x60, 0x7e, 0x00,
|
|
|
|
0x3c, 0x66, 0x06, 0x1c, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x06, 0x0e, 0x1e, 0x66, 0x7f, 0x06, 0x06, 0x00,
|
|
|
|
0x7e, 0x60, 0x7c, 0x06, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x7c, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x7e, 0x66, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x3e, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30,
|
|
|
|
0x0e, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0e, 0x00,
|
|
|
|
0x7c, 0x82, 0xba, 0xa2, 0xa2, 0xba, 0x82, 0x7c,
|
|
|
|
0x70, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x70, 0x00,
|
|
|
|
0x3c, 0x66, 0x06, 0x0c, 0x18, 0x00, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
|
|
|
0x18, 0x3c, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x7c, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3c, 0x00,
|
|
|
|
0x78, 0x6c, 0x66, 0x66, 0x66, 0x6c, 0x78, 0x00,
|
|
|
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x7e, 0x00,
|
|
|
|
0x7e, 0x60, 0x60, 0x78, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x6e, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x6c, 0x38, 0x00,
|
|
|
|
0x66, 0x6c, 0x78, 0x70, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7e, 0x00,
|
|
|
|
0x63, 0x77, 0x7f, 0x6b, 0x63, 0x63, 0x63, 0x00,
|
|
|
|
0x66, 0x76, 0x7e, 0x7e, 0x6e, 0x66, 0x66, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x0e, 0x00,
|
|
|
|
0x7c, 0x66, 0x66, 0x7c, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x3c, 0x66, 0x60, 0x3c, 0x06, 0x66, 0x3c, 0x00,
|
|
|
|
0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00,
|
|
|
|
0x63, 0x63, 0x63, 0x6b, 0x7f, 0x77, 0x63, 0x00,
|
|
|
|
0x66, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x66, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x7e, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x7e, 0x00,
|
|
|
|
0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x66, 0x00, 0x3c, 0x06, 0x3e, 0x66, 0x3e, 0x00,
|
|
|
|
0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xdb, 0x00,
|
|
|
|
0x00, 0x10, 0x30, 0x7f, 0x7f, 0x30, 0x10, 0x00,
|
|
|
|
0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x06, 0x3e, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x7c, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x60, 0x60, 0x60, 0x3c, 0x00,
|
|
|
|
0x00, 0x06, 0x06, 0x3e, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00,
|
|
|
|
0x00, 0x0e, 0x18, 0x3e, 0x18, 0x18, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x3e, 0x66, 0x66, 0x3e, 0x06, 0x7c,
|
|
|
|
0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x00, 0x18, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x00, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x3c,
|
|
|
|
0x00, 0x60, 0x60, 0x6c, 0x78, 0x6c, 0x66, 0x00,
|
|
|
|
0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x7f, 0x7f, 0x6b, 0x63, 0x00,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x00,
|
|
|
|
0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x66, 0x7c, 0x60, 0x60,
|
|
|
|
0x00, 0x00, 0x3e, 0x66, 0x66, 0x3e, 0x06, 0x06,
|
|
|
|
0x00, 0x00, 0x7c, 0x66, 0x60, 0x60, 0x60, 0x00,
|
|
|
|
0x00, 0x00, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x00,
|
|
|
|
0x00, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x0e, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00,
|
|
|
|
0x00, 0x00, 0x63, 0x6b, 0x7f, 0x3e, 0x36, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x00,
|
|
|
|
0x00, 0x00, 0x66, 0x66, 0x66, 0x3e, 0x0c, 0x78,
|
|
|
|
0x00, 0x00, 0x7e, 0x0c, 0x18, 0x30, 0x7e, 0x00,
|
|
|
|
0x66, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x66, 0x18, 0x3c, 0x66, 0x7e, 0x66, 0x66, 0x00,
|
|
|
|
0x42, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00,
|
|
|
|
0x1c, 0x36, 0x36, 0x7c, 0x66, 0x66, 0x7c, 0x40,
|
|
|
|
0x08, 0x0c, 0x0e, 0xff, 0xff, 0x0e, 0x0c, 0x08,
|
2003-06-19 10:14:58 +00:00
|
|
|
};
|
2003-06-04 09:33:01 +00:00
|
|
|
#endif
|
2003-05-25 20:21:28 +00:00
|
|
|
|
2004-01-08 17:41:11 +00:00
|
|
|
CharsetRendererV2::CharsetRendererV2(ScummEngine *vm, Common::Language language)
|
|
|
|
: CharsetRendererV3(vm) {
|
2003-05-25 20:21:28 +00:00
|
|
|
|
2005-05-26 16:38:02 +00:00
|
|
|
_fontHeight = 8;
|
|
|
|
|
2004-01-08 17:41:11 +00:00
|
|
|
switch (language) {
|
2003-10-17 15:35:46 +00:00
|
|
|
case Common::DE_DEU:
|
2003-05-25 20:38:44 +00:00
|
|
|
_fontPtr = germanCharsetDataV2;
|
|
|
|
break;
|
2003-10-17 15:35:46 +00:00
|
|
|
case Common::FR_FRA:
|
2003-05-25 20:38:44 +00:00
|
|
|
_fontPtr = frenchCharsetDataV2;
|
|
|
|
break;
|
2003-10-17 15:35:46 +00:00
|
|
|
case Common::IT_ITA:
|
2003-06-19 10:14:58 +00:00
|
|
|
_fontPtr = italianCharsetDataV2;
|
|
|
|
break;
|
2003-10-17 15:35:46 +00:00
|
|
|
case Common::ES_ESP:
|
2003-06-19 10:29:38 +00:00
|
|
|
_fontPtr = spanishCharsetDataV2;
|
|
|
|
break;
|
2003-05-25 20:38:44 +00:00
|
|
|
default:
|
2003-06-19 10:14:58 +00:00
|
|
|
_fontPtr = englishCharsetDataV2;
|
2003-05-25 20:38:44 +00:00
|
|
|
break;
|
|
|
|
}
|
2003-05-14 16:38:55 +00:00
|
|
|
|
|
|
|
#if 0
|
|
|
|
// Decompress weird encoding in which the Zak executable contains the font.
|
|
|
|
// I leave the code around in case we need to use it again (e.g. we might
|
|
|
|
// have to include different fonts for french/spanish/russian/... version
|
|
|
|
// of MM / Zak
|
|
|
|
//
|
|
|
|
int count = 0, len;
|
|
|
|
byte b;
|
2003-06-19 10:29:38 +00:00
|
|
|
const byte *data = spanishCharsetDataV2;
|
|
|
|
const int size = sizeof(spanishCharsetDataV2);
|
2003-05-25 20:21:28 +00:00
|
|
|
for (int offset = 0; offset < size; offset++) {
|
|
|
|
if (data[offset+1] == 0x00 && data[offset+2] == 0xB2 &&
|
|
|
|
data[offset+5] == 0x00 && data[offset+6] == 0xB0) {
|
|
|
|
b = data[offset+3];
|
|
|
|
len = data[offset+4];
|
2003-05-14 16:38:55 +00:00
|
|
|
while (len--) {
|
|
|
|
printf("0x%02x, ", b);
|
|
|
|
count++;
|
|
|
|
if (count % 8 == 0)
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
offset += 6;
|
|
|
|
} else {
|
2003-05-25 20:21:28 +00:00
|
|
|
printf("0x%02x, ", data[offset]);
|
2003-05-14 16:38:55 +00:00
|
|
|
count++;
|
|
|
|
if (count % 8 == 0)
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
printf("\n");
|
2003-06-19 10:14:58 +00:00
|
|
|
_vm->_system->quit();
|
2003-05-14 16:38:55 +00:00
|
|
|
#endif
|
2003-05-08 22:44:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int CharsetRendererV3::getCharWidth(byte chr) {
|
2004-10-23 23:08:53 +00:00
|
|
|
if (chr & 0x80 && _vm->_useCJKMode)
|
|
|
|
return _vm->_2byteWidth / 2;
|
2003-05-08 22:44:46 +00:00
|
|
|
int spacing = 0;
|
|
|
|
|
|
|
|
spacing = *(_widthTable + chr);
|
|
|
|
|
|
|
|
return spacing;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CharsetRendererV3::setColor(byte color)
|
2003-04-27 18:49:27 +00:00
|
|
|
{
|
2005-06-04 16:10:39 +00:00
|
|
|
bool useShadow = false;
|
2003-04-27 18:49:27 +00:00
|
|
|
_color = color;
|
2005-06-04 16:10:39 +00:00
|
|
|
|
2006-01-23 20:09:25 +00:00
|
|
|
// FM-TOWNS version of Loom uses old color method as well
|
|
|
|
if ((_vm->_version >= 2) && (_vm->_features & GF_16COLOR || (_vm->_gameId == GID_LOOM && _vm->_version == 3))) {
|
2005-06-04 16:10:39 +00:00
|
|
|
useShadow = ((_color & 0xF0) != 0);
|
2003-04-27 18:49:27 +00:00
|
|
|
_color &= 0x0f;
|
2003-09-14 00:37:47 +00:00
|
|
|
} else if (_vm->_features & GF_OLD256) {
|
2005-06-04 16:10:39 +00:00
|
|
|
useShadow = ((_color & 0x80) != 0);
|
2003-09-14 00:37:47 +00:00
|
|
|
_color &= 0x7f;
|
2003-04-27 18:49:27 +00:00
|
|
|
} else
|
2005-06-04 16:10:39 +00:00
|
|
|
useShadow = false;
|
|
|
|
|
|
|
|
enableShadow(useShadow);
|
2005-02-20 00:17:22 +00:00
|
|
|
|
|
|
|
translateColor();
|
2003-04-27 18:49:27 +00:00
|
|
|
}
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2005-06-04 16:10:39 +00:00
|
|
|
void CharsetRendererCommon::enableShadow(bool enable) {
|
|
|
|
if (enable) {
|
|
|
|
if (_vm->_platform == Common::kPlatformFMTowns) {
|
|
|
|
_shadowColor = 8;
|
|
|
|
_shadowMode = kFMTOWNSShadowMode;
|
|
|
|
} else {
|
|
|
|
_shadowColor = 0;
|
|
|
|
_shadowMode = kNormalShadowMode;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
_shadowMode = kNoShadowMode;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-01-10 00:28:10 +00:00
|
|
|
void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
|
2003-04-28 17:17:39 +00:00
|
|
|
// Indy3 / Zak256 / Loom
|
2004-10-23 23:08:53 +00:00
|
|
|
int width, height, origWidth, origHeight;
|
2002-12-25 21:04:47 +00:00
|
|
|
VirtScreen *vs;
|
2004-10-23 23:08:53 +00:00
|
|
|
byte *charPtr, *dst;
|
|
|
|
int is2byte = (chr >= 0x80 && _vm->_useCJKMode) ? 1 : 0;
|
2003-04-27 18:30:35 +00:00
|
|
|
|
2003-12-26 23:11:35 +00:00
|
|
|
checkRange(_vm->_numCharsets - 1, 0, _curId, "Printing with bad charset %d");
|
2002-12-25 21:04:47 +00:00
|
|
|
|
|
|
|
if ((vs = _vm->findVirtScreen(_top)) == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (chr == '@')
|
|
|
|
return;
|
|
|
|
|
2004-10-23 23:08:53 +00:00
|
|
|
if (is2byte) {
|
|
|
|
charPtr = _vm->get2byteCharPtr(chr);
|
|
|
|
width = _vm->_2byteWidth;
|
|
|
|
height = _vm->_2byteHeight;
|
|
|
|
} else {
|
|
|
|
charPtr = _fontPtr + chr * 8;
|
|
|
|
// width = height = 8;
|
|
|
|
width = getCharWidth(chr);
|
|
|
|
height = 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
origWidth = width;
|
|
|
|
origHeight = height;
|
|
|
|
|
2005-06-04 16:10:39 +00:00
|
|
|
if (_shadowMode != kNoShadowMode) {
|
2004-10-23 23:08:53 +00:00
|
|
|
width++;
|
|
|
|
height++;
|
|
|
|
}
|
|
|
|
|
2002-12-25 21:04:47 +00:00
|
|
|
if (_firstChar) {
|
2003-05-15 22:30:32 +00:00
|
|
|
_str.left = _left;
|
|
|
|
_str.top = _top;
|
|
|
|
_str.right = _left;
|
|
|
|
_str.bottom = _top;
|
2002-12-25 21:04:47 +00:00
|
|
|
_firstChar = false;
|
|
|
|
}
|
2003-04-07 14:38:26 +00:00
|
|
|
|
2004-10-23 23:08:53 +00:00
|
|
|
int drawTop = _top - vs->topline;
|
2003-04-28 17:17:39 +00:00
|
|
|
|
2004-04-06 22:02:02 +00:00
|
|
|
_vm->markRectAsDirty(vs->number, _left, _left + width, drawTop, drawTop + height);
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2006-01-10 00:28:10 +00:00
|
|
|
if (!ignoreCharsetMask) {
|
2003-04-28 17:17:39 +00:00
|
|
|
_hasMask = true;
|
2004-04-08 23:41:10 +00:00
|
|
|
_textScreenID = vs->number;
|
|
|
|
}
|
2006-01-10 00:28:10 +00:00
|
|
|
if (ignoreCharsetMask || !vs->hasTwoBuffers) {
|
2004-10-23 23:08:53 +00:00
|
|
|
dst = vs->getPixels(_left, drawTop);
|
|
|
|
drawBits1(*vs, dst, charPtr, drawTop, origWidth, origHeight);
|
2004-08-08 22:10:38 +00:00
|
|
|
} else {
|
2005-03-25 01:27:28 +00:00
|
|
|
dst = (byte *)_textSurface.pixels + _top * _textSurface.pitch + _left;
|
|
|
|
drawBits1(_textSurface, dst, charPtr, drawTop, origWidth, origHeight);
|
2004-08-08 22:10:38 +00:00
|
|
|
}
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2003-05-15 22:30:32 +00:00
|
|
|
if (_str.left > _left)
|
|
|
|
_str.left = _left;
|
2003-04-27 18:30:35 +00:00
|
|
|
|
2004-10-23 23:08:53 +00:00
|
|
|
_left += origWidth;
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2003-05-15 22:30:32 +00:00
|
|
|
if (_str.right < _left) {
|
|
|
|
_str.right = _left;
|
2005-06-04 16:10:39 +00:00
|
|
|
if (_shadowMode != kNoShadowMode)
|
2003-05-15 22:30:32 +00:00
|
|
|
_str.right++;
|
2003-04-27 18:30:35 +00:00
|
|
|
}
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2004-04-06 22:02:02 +00:00
|
|
|
if (_str.bottom < _top + height)
|
|
|
|
_str.bottom = _top + height;
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
|
|
|
|
2004-08-23 08:37:55 +00:00
|
|
|
void CharsetRendererV3::drawChar(int chr, const Graphics::Surface &s, int x, int y) {
|
2004-10-23 23:08:53 +00:00
|
|
|
byte *charPtr, *dst;
|
|
|
|
int width, height;
|
|
|
|
int is2byte = (chr >= 0x80 && _vm->_useCJKMode) ? 1 : 0;
|
|
|
|
if (is2byte) {
|
|
|
|
charPtr = _vm->get2byteCharPtr(chr);
|
|
|
|
width = _vm->_2byteWidth;
|
|
|
|
height = _vm->_2byteHeight;
|
|
|
|
} else {
|
|
|
|
charPtr = _fontPtr + chr * 8;
|
|
|
|
// width = height = 8;
|
|
|
|
width = getCharWidth(chr);
|
|
|
|
height = 8;
|
|
|
|
}
|
|
|
|
dst = (byte *)s.pixels + y * s.pitch + x;
|
|
|
|
drawBits1(s, dst, charPtr, y, width, height);
|
2004-08-23 08:37:55 +00:00
|
|
|
}
|
|
|
|
|
2005-02-20 00:17:22 +00:00
|
|
|
void CharsetRenderer::translateColor() {
|
|
|
|
// Based on disassembly
|
|
|
|
if (_vm->_renderMode == Common::kRenderCGA) {
|
2005-07-30 21:11:48 +00:00
|
|
|
static byte CGAtextColorMap[16] = {0, 3, 3, 3, 5, 5, 5, 15,
|
2005-02-20 00:17:22 +00:00
|
|
|
15, 3, 3, 3, 5, 5, 15, 15};
|
|
|
|
_color = CGAtextColorMap[_color & 0x0f];
|
|
|
|
}
|
|
|
|
|
2005-03-02 21:46:51 +00:00
|
|
|
if (_vm->_renderMode == Common::kRenderHercA || _vm->_renderMode == Common::kRenderHercG) {
|
2005-07-30 21:11:48 +00:00
|
|
|
static byte HercTextColorMap[16] = {0, 15, 2, 15, 15, 5, 15, 15,
|
2005-02-20 00:17:22 +00:00
|
|
|
8, 15, 15, 15, 15, 15, 15, 15};
|
|
|
|
_color = HercTextColorMap[_color & 0x0f];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-08-23 08:37:55 +00:00
|
|
|
|
2006-01-10 00:28:10 +00:00
|
|
|
void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
|
2003-06-04 14:37:43 +00:00
|
|
|
int width, height, origWidth, origHeight;
|
2002-12-25 21:14:26 +00:00
|
|
|
int offsX, offsY;
|
2002-12-25 21:04:47 +00:00
|
|
|
VirtScreen *vs;
|
2003-06-04 14:37:43 +00:00
|
|
|
const byte *charPtr;
|
2004-09-18 22:42:45 +00:00
|
|
|
int is2byte = (chr >= 0x80 && _vm->_useCJKMode) ? 1 : 0;
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2003-12-26 23:11:35 +00:00
|
|
|
checkRange(_vm->_numCharsets - 1, 1, _curId, "Printing with bad charset %d");
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2003-06-08 15:17:14 +00:00
|
|
|
if ((vs = _vm->findVirtScreen(_top)) == NULL && (vs = _vm->findVirtScreen(_top + getFontHeight())) == NULL)
|
2002-12-25 21:04:47 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
if (chr == '@')
|
|
|
|
return;
|
|
|
|
|
2005-02-20 00:17:22 +00:00
|
|
|
translateColor();
|
|
|
|
|
2002-12-26 00:21:19 +00:00
|
|
|
_vm->_charsetColorMap[1] = _color;
|
2003-11-08 21:59:32 +00:00
|
|
|
|
2003-06-07 00:49:36 +00:00
|
|
|
if (is2byte) {
|
2005-06-04 16:10:39 +00:00
|
|
|
enableShadow(true);
|
2003-12-27 14:03:07 +00:00
|
|
|
charPtr = _vm->get2byteCharPtr(chr);
|
|
|
|
width = _vm->_2byteWidth;
|
|
|
|
height = _vm->_2byteHeight;
|
2003-06-04 14:37:43 +00:00
|
|
|
offsX = offsY = 0;
|
|
|
|
} else {
|
|
|
|
uint32 charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
|
|
|
|
assert(charOffs < 0x10000);
|
|
|
|
if (!charOffs)
|
|
|
|
return;
|
|
|
|
charPtr = _fontPtr + charOffs;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2003-06-04 14:37:43 +00:00
|
|
|
width = charPtr[0];
|
|
|
|
height = charPtr[1];
|
|
|
|
|
|
|
|
if (_disableOffsX) {
|
|
|
|
offsX = 0;
|
|
|
|
} else {
|
|
|
|
offsX = (signed char)charPtr[2];
|
|
|
|
}
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2003-06-04 14:37:43 +00:00
|
|
|
offsY = (signed char)charPtr[3];
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2003-06-04 14:37:43 +00:00
|
|
|
charPtr += 4; // Skip over char header
|
|
|
|
}
|
|
|
|
origWidth = width;
|
|
|
|
origHeight = height;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-06-04 16:10:39 +00:00
|
|
|
if (_shadowMode != kNoShadowMode) {
|
2003-06-04 14:37:43 +00:00
|
|
|
width++;
|
|
|
|
height++;
|
|
|
|
}
|
2002-12-25 21:04:47 +00:00
|
|
|
if (_firstChar) {
|
2003-05-15 22:30:32 +00:00
|
|
|
_str.left = 0;
|
|
|
|
_str.top = 0;
|
|
|
|
_str.right = 0;
|
|
|
|
_str.bottom = 0;
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
|
|
|
|
2002-12-25 21:14:26 +00:00
|
|
|
_top += offsY;
|
|
|
|
_left += offsX;
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2003-06-04 14:37:43 +00:00
|
|
|
if (_left + origWidth > _right + 1 || _left < 0) {
|
|
|
|
_left += origWidth;
|
2002-12-25 21:14:26 +00:00
|
|
|
_top -= offsY;
|
2002-12-25 21:04:47 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
_disableOffsX = false;
|
|
|
|
|
|
|
|
if (_firstChar) {
|
2003-05-15 22:30:32 +00:00
|
|
|
_str.left = _left;
|
|
|
|
_str.top = _top;
|
|
|
|
_str.right = _left;
|
|
|
|
_str.bottom = _top;
|
2002-12-25 21:04:47 +00:00
|
|
|
_firstChar = false;
|
|
|
|
}
|
|
|
|
|
2003-05-15 22:30:32 +00:00
|
|
|
if (_left < _str.left)
|
|
|
|
_str.left = _left;
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2003-05-15 22:30:32 +00:00
|
|
|
if (_top < _str.top)
|
|
|
|
_str.top = _top;
|
2002-12-25 21:04:47 +00:00
|
|
|
|
|
|
|
int drawTop = _top - vs->topline;
|
|
|
|
|
2004-10-09 00:33:35 +00:00
|
|
|
_vm->markRectAsDirty(vs->number, _left, _left + width, drawTop, drawTop + height);
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2004-10-05 05:52:48 +00:00
|
|
|
byte *dstPtr;
|
2004-08-23 08:50:54 +00:00
|
|
|
byte *back = NULL;
|
2004-08-08 22:10:38 +00:00
|
|
|
|
2006-01-10 00:28:10 +00:00
|
|
|
if (!ignoreCharsetMask) {
|
2002-12-25 21:04:47 +00:00
|
|
|
_hasMask = true;
|
2004-04-08 23:41:10 +00:00
|
|
|
_textScreenID = vs->number;
|
|
|
|
}
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-11-06 08:56:50 +00:00
|
|
|
if ((_vm->_heversion >= 71 && _bitDepth >= 8) || (_vm->_heversion >= 90 && _bitDepth == 0)) {
|
2005-05-14 14:06:37 +00:00
|
|
|
#ifndef DISABLE_HE
|
2006-01-10 00:28:10 +00:00
|
|
|
if (ignoreCharsetMask || !vs->hasTwoBuffers) {
|
2005-04-23 14:32:40 +00:00
|
|
|
dstPtr = vs->getPixels(0, 0);
|
|
|
|
} else {
|
|
|
|
dstPtr = (byte *)_textSurface.pixels;
|
2004-10-06 01:01:44 +00:00
|
|
|
}
|
2004-10-05 23:37:59 +00:00
|
|
|
|
2005-04-23 14:32:40 +00:00
|
|
|
if (_blitAlso && vs->hasTwoBuffers) {
|
|
|
|
dstPtr = vs->getBackPixels(0, 0);
|
2004-10-06 01:01:44 +00:00
|
|
|
}
|
2004-10-05 23:37:59 +00:00
|
|
|
|
2005-04-23 14:32:40 +00:00
|
|
|
Common::Rect rScreen(vs->w, vs->h);
|
2005-11-06 08:56:50 +00:00
|
|
|
if (_bitDepth >= 8) {
|
2005-04-23 14:32:40 +00:00
|
|
|
byte imagePalette[256];
|
|
|
|
memset(imagePalette, 0, sizeof(imagePalette));
|
2005-11-06 11:30:17 +00:00
|
|
|
memcpy(imagePalette, _vm->_charsetColorMap, 4);
|
2005-11-05 13:05:52 +00:00
|
|
|
Wiz::copyWizImage(dstPtr, charPtr, vs->w, vs->h, _left, _top, origWidth, origHeight, &rScreen, 0, imagePalette);
|
2005-04-23 14:32:40 +00:00
|
|
|
} else {
|
|
|
|
Wiz::copyWizImage(dstPtr, charPtr, vs->w, vs->h, _left, _top, origWidth, origHeight, &rScreen);
|
|
|
|
}
|
2004-10-05 05:52:48 +00:00
|
|
|
|
2005-04-23 14:32:40 +00:00
|
|
|
if (_blitAlso && vs->hasTwoBuffers) {
|
|
|
|
Common::Rect dst(_left, _top, _left + origWidth, _top + origHeight);
|
|
|
|
_vm->gdi.copyVirtScreenBuffers(dst);
|
|
|
|
}
|
2005-05-14 14:06:37 +00:00
|
|
|
#endif
|
2005-04-23 14:32:40 +00:00
|
|
|
} else {
|
|
|
|
Graphics::Surface dstSurface;
|
|
|
|
Graphics::Surface backSurface;
|
2006-01-10 00:28:10 +00:00
|
|
|
if (ignoreCharsetMask || !vs->hasTwoBuffers) {
|
2005-04-23 14:32:40 +00:00
|
|
|
dstSurface = *vs;
|
|
|
|
dstPtr = vs->getPixels(_left, drawTop);
|
|
|
|
} else {
|
|
|
|
dstSurface = _textSurface;
|
|
|
|
dstPtr = (byte *)_textSurface.pixels + (_top - _vm->_screenTop) * _textSurface.pitch + _left;
|
|
|
|
}
|
2004-10-05 05:52:48 +00:00
|
|
|
|
2005-04-23 14:32:40 +00:00
|
|
|
if (_blitAlso && vs->hasTwoBuffers) {
|
|
|
|
backSurface = dstSurface;
|
|
|
|
back = dstPtr;
|
|
|
|
dstSurface = *vs;
|
|
|
|
dstPtr = vs->getBackPixels(_left, drawTop);
|
|
|
|
}
|
2004-10-05 05:52:48 +00:00
|
|
|
|
2006-01-10 00:28:10 +00:00
|
|
|
if (!ignoreCharsetMask && vs->hasTwoBuffers) {
|
2005-04-23 14:32:40 +00:00
|
|
|
drawTop = _top - _vm->_screenTop;
|
|
|
|
}
|
2004-10-05 05:52:48 +00:00
|
|
|
|
|
|
|
if (is2byte) {
|
|
|
|
drawBits1(dstSurface, dstPtr, charPtr, drawTop, origWidth, origHeight);
|
|
|
|
} else {
|
|
|
|
drawBitsN(dstSurface, dstPtr, charPtr, *_fontPtr, drawTop, origWidth, origHeight);
|
2004-09-27 20:42:10 +00:00
|
|
|
}
|
2004-10-05 05:52:48 +00:00
|
|
|
|
|
|
|
if (_blitAlso && vs->hasTwoBuffers) {
|
|
|
|
// FIXME: Revisiting this code, I think the _blitAlso mode is likely broken
|
|
|
|
// right now -- we are copying stuff from "dstPtr" to "back", but "dstPtr" really
|
2005-07-30 21:11:48 +00:00
|
|
|
// only conatains charset data...
|
2004-10-05 05:52:48 +00:00
|
|
|
// One way to fix this: don't copy etc.; rather simply render the char twice,
|
|
|
|
// once to each of the two buffers. That should hypothetically yield
|
|
|
|
// identical results, though I didn't try it and right now I don't know
|
|
|
|
// any spots where I can test this...
|
2006-01-10 00:28:10 +00:00
|
|
|
if (!ignoreCharsetMask)
|
2004-10-05 05:52:48 +00:00
|
|
|
warning("This might be broken -- please report where you encountered this to Fingolfin");
|
|
|
|
|
|
|
|
// Perform some clipping
|
|
|
|
int w = MIN(width, dstSurface.w - _left);
|
|
|
|
int h = MIN(height, dstSurface.h - drawTop);
|
|
|
|
if (_left < 0) {
|
|
|
|
w += _left;
|
|
|
|
back -= _left;
|
|
|
|
dstPtr -= _left;
|
|
|
|
}
|
|
|
|
if (drawTop < 0) {
|
|
|
|
h += drawTop;
|
|
|
|
back -= drawTop * backSurface.pitch;
|
|
|
|
dstPtr -= drawTop * dstSurface.pitch;
|
|
|
|
}
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-10-05 05:52:48 +00:00
|
|
|
// Blit the image data
|
|
|
|
if (w > 0) {
|
|
|
|
while (h-- > 0) {
|
|
|
|
memcpy(back, dstPtr, w);
|
|
|
|
back += backSurface.pitch;
|
|
|
|
dstPtr += dstSurface.pitch;
|
|
|
|
}
|
2004-09-29 00:04:38 +00:00
|
|
|
}
|
|
|
|
}
|
2005-07-30 21:11:48 +00:00
|
|
|
}
|
2004-10-05 05:52:48 +00:00
|
|
|
|
2003-06-04 14:37:43 +00:00
|
|
|
_left += origWidth;
|
|
|
|
|
|
|
|
if (_str.right < _left) {
|
2003-05-15 22:30:32 +00:00
|
|
|
_str.right = _left;
|
2005-06-04 16:10:39 +00:00
|
|
|
if (_shadowMode != kNoShadowMode)
|
2003-06-04 14:37:43 +00:00
|
|
|
_str.right++;
|
|
|
|
}
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2003-06-04 14:37:43 +00:00
|
|
|
if (_str.bottom < _top + height)
|
2003-05-15 22:30:32 +00:00
|
|
|
_str.bottom = _top + height;
|
2002-12-25 21:04:47 +00:00
|
|
|
|
2002-12-25 21:14:26 +00:00
|
|
|
_top -= offsY;
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
|
|
|
|
2004-08-23 08:37:55 +00:00
|
|
|
void CharsetRendererClassic::drawChar(int chr, const Graphics::Surface &s, int x, int y) {
|
|
|
|
const byte *charPtr;
|
|
|
|
byte *dst;
|
2004-10-23 23:08:53 +00:00
|
|
|
int width, height;
|
|
|
|
int is2byte = (chr >= 0x80 && _vm->_useCJKMode) ? 1 : 0;
|
2004-08-23 08:37:55 +00:00
|
|
|
|
2004-10-23 23:08:53 +00:00
|
|
|
if (is2byte) {
|
2005-06-04 16:10:39 +00:00
|
|
|
enableShadow(true);
|
2004-10-23 23:08:53 +00:00
|
|
|
charPtr = _vm->get2byteCharPtr(chr);
|
|
|
|
width = _vm->_2byteWidth;
|
|
|
|
height = _vm->_2byteHeight;
|
|
|
|
} else {
|
|
|
|
uint32 charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
|
|
|
|
assert(charOffs < 0x10000);
|
|
|
|
if (!charOffs)
|
|
|
|
return;
|
|
|
|
charPtr = _fontPtr + charOffs;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-10-23 23:08:53 +00:00
|
|
|
width = charPtr[0];
|
|
|
|
height = charPtr[1];
|
2004-08-23 08:37:55 +00:00
|
|
|
|
2004-10-23 23:08:53 +00:00
|
|
|
charPtr += 4; // Skip over char header
|
|
|
|
}
|
2004-08-23 08:37:55 +00:00
|
|
|
|
|
|
|
dst = (byte *)s.pixels + y * s.pitch + x;
|
2004-10-23 23:08:53 +00:00
|
|
|
|
|
|
|
if (is2byte) {
|
|
|
|
drawBits1(s, dst, charPtr, y, width, height);
|
|
|
|
} else {
|
|
|
|
drawBitsN(s, dst, charPtr, *_fontPtr, y, width, height);
|
|
|
|
}
|
2004-08-23 08:37:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CharsetRendererClassic::drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height) {
|
2002-12-25 21:04:47 +00:00
|
|
|
int y, x;
|
|
|
|
int color;
|
|
|
|
byte numbits, bits;
|
|
|
|
|
2003-06-19 11:13:11 +00:00
|
|
|
assert(bpp == 1 || bpp == 2 || bpp == 4 || bpp == 8);
|
2003-06-04 14:37:43 +00:00
|
|
|
bits = *src++;
|
2002-12-25 21:04:47 +00:00
|
|
|
numbits = 8;
|
|
|
|
|
2004-08-23 08:37:55 +00:00
|
|
|
for (y = 0; y < height && y + drawTop < s.h; y++) {
|
2002-12-25 21:04:47 +00:00
|
|
|
for (x = 0; x < width; x++) {
|
2003-06-04 14:37:43 +00:00
|
|
|
color = (bits >> (8 - bpp)) & 0xFF;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2003-06-08 15:17:14 +00:00
|
|
|
if (color && y + drawTop >= 0) {
|
2003-06-04 14:37:43 +00:00
|
|
|
*dst = _vm->_charsetColorMap[color];
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
|
|
|
dst++;
|
2003-06-04 14:37:43 +00:00
|
|
|
bits <<= bpp;
|
|
|
|
numbits -= bpp;
|
2002-12-25 21:04:47 +00:00
|
|
|
if (numbits == 0) {
|
2003-06-04 14:37:43 +00:00
|
|
|
bits = *src++;
|
2002-12-25 21:04:47 +00:00
|
|
|
numbits = 8;
|
|
|
|
}
|
|
|
|
}
|
2004-08-23 08:37:55 +00:00
|
|
|
dst += s.pitch - width;
|
2002-12-25 21:04:47 +00:00
|
|
|
}
|
|
|
|
}
|
2002-12-26 01:47:40 +00:00
|
|
|
|
2004-08-23 08:37:55 +00:00
|
|
|
void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height) {
|
2003-06-04 14:37:43 +00:00
|
|
|
int y, x;
|
|
|
|
byte bits = 0;
|
|
|
|
|
2004-08-23 08:37:55 +00:00
|
|
|
for (y = 0; y < height && y + drawTop < s.h; y++) {
|
2003-06-04 14:37:43 +00:00
|
|
|
for (x = 0; x < width; x++) {
|
2003-06-07 00:49:36 +00:00
|
|
|
if ((x % 8) == 0)
|
2003-06-04 14:37:43 +00:00
|
|
|
bits = *src++;
|
2005-05-15 10:40:28 +00:00
|
|
|
if ((bits & revBitMask(x % 8)) && y + drawTop >= 0) {
|
2005-06-04 16:10:39 +00:00
|
|
|
if (_shadowMode != kNoShadowMode) {
|
2003-06-26 21:41:53 +00:00
|
|
|
*(dst + 1) = _shadowColor;
|
2004-08-23 08:37:55 +00:00
|
|
|
*(dst + s.pitch) = _shadowColor;
|
2005-06-04 16:10:39 +00:00
|
|
|
if (_shadowMode != kFMTOWNSShadowMode)
|
|
|
|
*(dst + s.pitch + 1) = _shadowColor;
|
2005-07-30 21:11:48 +00:00
|
|
|
}
|
2003-06-26 21:41:53 +00:00
|
|
|
*dst = _color;
|
2003-06-04 14:37:43 +00:00
|
|
|
}
|
|
|
|
dst++;
|
|
|
|
}
|
|
|
|
|
2004-08-23 08:37:55 +00:00
|
|
|
dst += s.pitch - width;
|
2003-06-04 14:37:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-06-18 15:44:40 +00:00
|
|
|
#ifndef DISABLE_SCUMM_7_8
|
2003-10-02 22:42:03 +00:00
|
|
|
CharsetRendererNut::CharsetRendererNut(ScummEngine *vm)
|
2003-03-06 17:58:13 +00:00
|
|
|
: CharsetRenderer(vm) {
|
2002-12-26 01:47:40 +00:00
|
|
|
_current = 0;
|
2003-03-04 02:43:43 +00:00
|
|
|
|
2002-12-31 21:41:24 +00:00
|
|
|
for (int i = 0; i < 5; i++) {
|
2002-12-26 01:47:40 +00:00
|
|
|
char fontname[256];
|
2003-11-18 02:09:51 +00:00
|
|
|
if ((_vm->_gameId == GID_CMI) && (_vm->_features & GF_DEMO) && (i == 4))
|
|
|
|
break;
|
2002-12-27 00:11:01 +00:00
|
|
|
sprintf(fontname, "font%d.nut", i);
|
2002-12-26 01:47:40 +00:00
|
|
|
_fr[i] = new NutRenderer(_vm);
|
2004-06-27 21:52:25 +00:00
|
|
|
if (!(_fr[i]->loadFont(fontname))) {
|
2002-12-26 01:47:40 +00:00
|
|
|
delete _fr[i];
|
|
|
|
_fr[i] = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-06 17:58:13 +00:00
|
|
|
CharsetRendererNut::~CharsetRendererNut() {
|
2003-11-18 05:14:18 +00:00
|
|
|
for (int i = 0; i < 5; i++) {
|
|
|
|
if ((_vm->_gameId == GID_CMI) && (_vm->_features & GF_DEMO) && (i == 4))
|
|
|
|
break;
|
2002-12-26 01:47:40 +00:00
|
|
|
delete _fr[i];
|
2003-11-18 05:14:18 +00:00
|
|
|
}
|
2002-12-26 01:47:40 +00:00
|
|
|
}
|
|
|
|
|
2003-03-06 17:58:13 +00:00
|
|
|
void CharsetRendererNut::setCurID(byte id) {
|
2002-12-31 21:41:24 +00:00
|
|
|
assert(id < 5);
|
2002-12-26 01:47:40 +00:00
|
|
|
_curId = id;
|
|
|
|
_current = _fr[id];
|
2003-03-04 02:43:43 +00:00
|
|
|
assert(_current);
|
2002-12-26 01:47:40 +00:00
|
|
|
}
|
|
|
|
|
2005-05-26 12:26:03 +00:00
|
|
|
int CharsetRendererNut::getCharHeight(byte chr) {
|
|
|
|
assert(_current);
|
|
|
|
return _current->getCharHeight(chr);
|
|
|
|
}
|
|
|
|
|
2003-03-06 17:58:13 +00:00
|
|
|
int CharsetRendererNut::getCharWidth(byte chr) {
|
2002-12-26 01:47:40 +00:00
|
|
|
assert(_current);
|
|
|
|
return _current->getCharWidth(chr);
|
|
|
|
}
|
|
|
|
|
2003-03-06 17:58:13 +00:00
|
|
|
int CharsetRendererNut::getFontHeight() {
|
2002-12-26 01:47:40 +00:00
|
|
|
// FIXME / TODO: how to implement this properly???
|
|
|
|
assert(_current);
|
|
|
|
return _current->getCharHeight('|');
|
|
|
|
}
|
|
|
|
|
2006-01-10 00:28:10 +00:00
|
|
|
void CharsetRendererNut::printChar(int chr, bool ignoreCharsetMask) {
|
2004-01-08 03:10:16 +00:00
|
|
|
Common::Rect shadow;
|
2003-06-15 15:19:22 +00:00
|
|
|
|
2002-12-26 01:47:40 +00:00
|
|
|
assert(_current);
|
|
|
|
if (chr == '@')
|
|
|
|
return;
|
|
|
|
|
2004-01-08 03:10:16 +00:00
|
|
|
shadow.left = _left - 1;
|
|
|
|
shadow.top = _top - 1;
|
2003-06-15 15:19:22 +00:00
|
|
|
|
|
|
|
// Note that the character is drawn with a shadow, so it is slightly
|
|
|
|
// larger than the advertised dimensions. See drawShadowChar() for
|
|
|
|
// details.
|
|
|
|
|
2002-12-26 01:47:40 +00:00
|
|
|
if (_firstChar) {
|
2004-04-03 23:44:06 +00:00
|
|
|
_str.left = (shadow.left >= 0) ? shadow.left : 0;
|
|
|
|
_str.top = (shadow.top >= 0) ? shadow.top : 0;
|
|
|
|
_str.right = _str.left;
|
|
|
|
_str.bottom = _str.top;
|
2002-12-26 01:47:40 +00:00
|
|
|
_firstChar = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
int width = _current->getCharWidth(chr);
|
|
|
|
int height = _current->getCharHeight(chr);
|
|
|
|
|
2004-09-18 22:42:45 +00:00
|
|
|
if (chr >= 256 && _vm->_useCJKMode)
|
2004-10-23 23:08:53 +00:00
|
|
|
width = _vm->_2byteWidth;
|
2003-06-04 14:37:43 +00:00
|
|
|
|
2004-01-08 03:10:16 +00:00
|
|
|
shadow.right = _left + width + 2;
|
|
|
|
shadow.bottom = _top + height + 2;
|
2003-06-15 15:19:22 +00:00
|
|
|
|
2004-08-08 22:10:38 +00:00
|
|
|
Graphics::Surface s;
|
2006-01-10 00:28:10 +00:00
|
|
|
if (!ignoreCharsetMask) {
|
2004-04-08 01:38:07 +00:00
|
|
|
_hasMask = true;
|
2004-04-08 23:41:10 +00:00
|
|
|
_textScreenID = kMainVirtScreen;
|
|
|
|
}
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-10-01 09:06:12 +00:00
|
|
|
int drawTop = _top;
|
2006-01-10 00:28:10 +00:00
|
|
|
if (ignoreCharsetMask) {
|
2004-08-08 22:10:38 +00:00
|
|
|
VirtScreen *vs = &_vm->virtscr[kMainVirtScreen];
|
2004-08-14 19:42:00 +00:00
|
|
|
s = *vs;
|
2004-10-01 09:06:12 +00:00
|
|
|
s.pixels = vs->getPixels(0, 0);
|
2004-08-08 22:10:38 +00:00
|
|
|
} else {
|
2005-03-25 01:27:28 +00:00
|
|
|
s = _textSurface;
|
2004-10-01 09:06:12 +00:00
|
|
|
drawTop -= _vm->_screenTop;
|
2004-08-08 22:10:38 +00:00
|
|
|
}
|
2004-04-08 01:38:07 +00:00
|
|
|
|
2004-10-01 09:06:12 +00:00
|
|
|
_current->drawShadowChar(s, chr, _left, drawTop, _color, _curId != 3);
|
2004-01-08 03:24:41 +00:00
|
|
|
_vm->markRectAsDirty(kMainVirtScreen, shadow);
|
2002-12-26 01:47:40 +00:00
|
|
|
|
2004-01-08 02:16:27 +00:00
|
|
|
if (_str.left > _left)
|
|
|
|
_str.left = _left;
|
|
|
|
|
2002-12-26 01:47:40 +00:00
|
|
|
_left += width;
|
|
|
|
|
2004-02-22 21:02:06 +00:00
|
|
|
if (_str.right < shadow.right)
|
2004-01-08 03:10:16 +00:00
|
|
|
_str.right = shadow.right;
|
2003-06-15 15:19:22 +00:00
|
|
|
|
2004-01-08 03:10:16 +00:00
|
|
|
if (_str.bottom < shadow.bottom)
|
|
|
|
_str.bottom = shadow.bottom;
|
2002-12-26 01:47:40 +00:00
|
|
|
}
|
2005-06-18 15:44:40 +00:00
|
|
|
#endif
|
2002-12-26 01:47:40 +00:00
|
|
|
|
2006-01-10 00:28:10 +00:00
|
|
|
void CharsetRendererNES::printChar(int chr, bool ignoreCharsetMask) {
|
2005-03-16 03:20:32 +00:00
|
|
|
int width, height, origWidth, origHeight;
|
|
|
|
VirtScreen *vs;
|
|
|
|
byte *charPtr, *dst;
|
|
|
|
|
2005-05-20 22:49:09 +00:00
|
|
|
// Init it here each time since it is cheap and fixes bug with
|
|
|
|
// charset after game load
|
|
|
|
_trTable = _vm->getResourceAddress(rtCostume, 77) + 2;
|
2005-04-10 09:58:37 +00:00
|
|
|
|
2005-03-24 04:53:28 +00:00
|
|
|
// HACK: how to set it properly?
|
|
|
|
if (_top == 0)
|
|
|
|
_top = 16;
|
|
|
|
|
2005-03-16 03:20:32 +00:00
|
|
|
if ((vs = _vm->findVirtScreen(_top)) == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (chr == '@')
|
|
|
|
return;
|
|
|
|
|
2005-03-24 03:22:32 +00:00
|
|
|
charPtr = _vm->_NESPatTable[1] + _trTable[chr - 32] * 16;
|
2005-03-16 03:20:32 +00:00
|
|
|
width = getCharWidth(chr);
|
|
|
|
height = 8;
|
|
|
|
|
|
|
|
origWidth = width;
|
|
|
|
origHeight = height;
|
|
|
|
|
|
|
|
if (_firstChar) {
|
|
|
|
_str.left = _left;
|
|
|
|
_str.top = _top;
|
|
|
|
_str.right = _left;
|
|
|
|
_str.bottom = _top;
|
|
|
|
_firstChar = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
int drawTop = _top - vs->topline;
|
|
|
|
|
|
|
|
_vm->markRectAsDirty(vs->number, _left, _left + width, drawTop, drawTop + height);
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2006-01-10 00:28:10 +00:00
|
|
|
if (!ignoreCharsetMask) {
|
2005-03-16 03:20:32 +00:00
|
|
|
_hasMask = true;
|
|
|
|
_textScreenID = vs->number;
|
|
|
|
}
|
2005-03-23 04:22:11 +00:00
|
|
|
|
2006-01-10 00:28:10 +00:00
|
|
|
if (ignoreCharsetMask || !vs->hasTwoBuffers) {
|
2005-03-23 04:22:11 +00:00
|
|
|
dst = vs->getPixels(_left, drawTop);
|
|
|
|
drawBits1(*vs, dst, charPtr, drawTop, origWidth, origHeight);
|
|
|
|
} else {
|
2005-03-25 01:27:28 +00:00
|
|
|
dst = (byte *)_textSurface.pixels + _top * _textSurface.pitch + _left;
|
|
|
|
drawBits1(_textSurface, dst, charPtr, drawTop, origWidth, origHeight);
|
2005-03-23 04:22:11 +00:00
|
|
|
}
|
2005-03-16 03:20:32 +00:00
|
|
|
|
|
|
|
if (_str.left > _left)
|
|
|
|
_str.left = _left;
|
|
|
|
|
|
|
|
_left += origWidth;
|
|
|
|
|
|
|
|
if (_str.right < _left) {
|
|
|
|
_str.right = _left;
|
2005-06-04 16:10:39 +00:00
|
|
|
if (_shadowMode != kNoShadowMode)
|
2005-03-16 03:20:32 +00:00
|
|
|
_str.right++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_str.bottom < _top + height)
|
|
|
|
_str.bottom = _top + height;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CharsetRendererNES::drawChar(int chr, const Graphics::Surface &s, int x, int y) {
|
|
|
|
byte *charPtr, *dst;
|
|
|
|
int width, height;
|
|
|
|
|
2005-04-10 09:58:37 +00:00
|
|
|
if (!_trTable)
|
|
|
|
_trTable = _vm->getResourceAddress(rtCostume, 77) + 2;
|
|
|
|
|
2005-03-24 03:22:32 +00:00
|
|
|
charPtr = _vm->_NESPatTable[1] + _trTable[chr - 32] * 16;
|
2005-03-16 03:20:32 +00:00
|
|
|
width = getCharWidth(chr);
|
|
|
|
height = 8;
|
|
|
|
|
|
|
|
dst = (byte *)s.pixels + y * s.pitch + x;
|
|
|
|
drawBits1(s, dst, charPtr, y, width, height);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CharsetRendererNES::drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height) {
|
|
|
|
for (int i = 0; i < 8; i++) {
|
|
|
|
byte c0 = src[i];
|
|
|
|
byte c1 = src[i + 8];
|
|
|
|
for (int j = 0; j < 8; j++)
|
2005-03-24 03:22:32 +00:00
|
|
|
dst[j] = _vm->_NESPalette[0][((c0 >> (7 - j)) & 1) | (((c1 >> (7 - j)) & 1) << 1) |
|
2005-03-21 23:51:48 +00:00
|
|
|
(_color ? 12 : 8)];
|
2005-03-16 03:20:32 +00:00
|
|
|
dst += s.pitch;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-10-09 14:17:06 +00:00
|
|
|
} // End of namespace Scumm
|
|
|
|
|
2005-09-03 16:31:37 +00:00
|
|
|
#ifdef PALMOS_68K
|
2003-08-18 10:59:21 +00:00
|
|
|
#include "scumm_globals.h"
|
|
|
|
|
|
|
|
_GINIT(Charset)
|
2003-10-09 14:17:06 +00:00
|
|
|
_GSETPTR(Scumm::germanCharsetDataV2, GBVARS_GERMANCHARSETDATAV2_INDEX, byte, GBVARS_SCUMM)
|
|
|
|
_GSETPTR(Scumm::frenchCharsetDataV2, GBVARS_FRENCHCHARSETDATAV2_INDEX, byte, GBVARS_SCUMM)
|
|
|
|
_GSETPTR(Scumm::englishCharsetDataV2, GBVARS_ENGLISHCHARSETDATAV2_INDEX, byte, GBVARS_SCUMM)
|
|
|
|
_GSETPTR(Scumm::italianCharsetDataV2, GBVARS_ITALIANCHARSETDATAV2_INDEX, byte, GBVARS_SCUMM)
|
|
|
|
_GSETPTR(Scumm::spanishCharsetDataV2, GBVARS_SPANISHCHARSETDATAV2_INDEX, byte, GBVARS_SCUMM)
|
2003-08-18 10:59:21 +00:00
|
|
|
_GEND
|
|
|
|
|
|
|
|
_GRELEASE(Charset)
|
|
|
|
_GRELEASEPTR(GBVARS_GERMANCHARSETDATAV2_INDEX, GBVARS_SCUMM)
|
|
|
|
_GRELEASEPTR(GBVARS_FRENCHCHARSETDATAV2_INDEX, GBVARS_SCUMM)
|
|
|
|
_GRELEASEPTR(GBVARS_ENGLISHCHARSETDATAV2_INDEX, GBVARS_SCUMM)
|
|
|
|
_GRELEASEPTR(GBVARS_ITALIANCHARSETDATAV2_INDEX, GBVARS_SCUMM)
|
|
|
|
_GRELEASEPTR(GBVARS_SPANISHCHARSETDATAV2_INDEX, GBVARS_SCUMM)
|
|
|
|
_GEND
|
|
|
|
|
2003-06-04 09:33:01 +00:00
|
|
|
#endif
|