[Scummvm-git-logs] scummvm master -> 9d6fe02c6ddc18ecddb59f5cc99822f41e776247
athrxx
noreply at scummvm.org
Mon Nov 15 00:02:13 UTC 2021
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2c4f9fcc95 KYRA: (Chinese) - refactor Chinese font code to allow better support for different formats
db2c959289 KYRA: (LoK/Traditional Chinese) - add static resources
f0255f3fe2 KYRA: (FM-Towns) - fix minor font glitch
a7fda28519 KYRA: (LoK/Traditional Chinese) - finish support
9d6fe02c6d NEWS: mention LoK/Chinese
Commit: 2c4f9fcc95603b087d70e4ca1ced1934d16a37f3
https://github.com/scummvm/scummvm/commit/2c4f9fcc95603b087d70e4ca1ced1934d16a37f3
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-15T01:00:48+01:00
Commit Message:
KYRA: (Chinese) - refactor Chinese font code to allow better support for different formats
(the Chinese font code is similiar enough between the KYRA games, but with some differences (e. g. LoK has the Ascii glyphs in an extra file, MR has these in the executable; LoK has a lookup table for the two-byte glyphs etc.)
Changed paths:
engines/kyra/graphics/screen.cpp
engines/kyra/graphics/screen.h
engines/kyra/graphics/screen_mr.cpp
diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp
index 5241a06d92..45914d2240 100644
--- a/engines/kyra/graphics/screen.cpp
+++ b/engines/kyra/graphics/screen.cpp
@@ -911,7 +911,7 @@ void Screen::setScreenPalette(const Palette &pal) {
Graphics::PixelFormat pixelFormat = _system->getScreenFormat();
for (int i = 0; i < 256; ++i)
_16bitConversionPalette[i] = pixelFormat.RGBToColor(screenPal[i * 3], screenPal[i * 3 + 1], screenPal[i * 3 + 2]);
- // The whole Surface has to be converted again after each palette chance
+ // The whole Surface has to be converted again after each palette change
_forceFullUpdate = true;
}
return;
@@ -1337,13 +1337,22 @@ bool Screen::loadFont(FontId fontId, const char *filename) {
int temp = 0;
if (!fnt) {
- if (_vm->game() == GI_KYRA1 && _isAmiga)
+ if (_vm->game() == GI_KYRA1 && _isAmiga) {
fnt = new AMIGAFont();
- else if (_vm->game() == GI_KYRA3 && fontId == FID_CHINESE_FNT)
- fnt = new Big5Font(_vm->staticres()->loadRawData(k3FontData, temp), SCREEN_W);
- else
+ } else if (fontId == FID_CHINESE_FNT) {
+ Common::Array<Font*> *fa = new Common::Array<Font*>;
+ fa->push_back(new ChineseOneByteFontMR(SCREEN_W));
+ fa->push_back(new ChineseTwoByteFontMR(SCREEN_W));
+ fnt = new MultiSubsetFont(fa);
+
+ if (_vm->game() == GI_KYRA3) {
+ const uint8 *oneByteData = _vm->staticres()->loadRawData(k3FontData, temp);
+ Common::MemoryReadStream str(oneByteData, temp);
+ fnt->load(str);
+ }
+ } else {
fnt = new DOSFont();
-
+ }
assert(fnt);
}
@@ -1352,6 +1361,7 @@ bool Screen::loadFont(FontId fontId, const char *filename) {
error("Font file '%s' is missing", filename);
bool ret = fnt->load(*file);
+
fnt->setColorMap(_textColorsMap);
delete file;
return ret;
@@ -3838,6 +3848,139 @@ void SJISFont::drawChar(uint16 c, byte *dst, int pitch, int) const {
_font->drawChar(dst, c, 640, 1, color1, color2, 640, 400);
}
+ChineseFont::ChineseFont(int pitch, int renderWidth, int renderHeight, int spacingWidth, int spacingHeight, int extraSpacingWidth, int extraSpacingHeight) : Font(),
+ _renderWidth(renderWidth), _renderHeight(renderHeight), _spacingWidth(spacingWidth), _spacingHeight(spacingHeight), _pitch(pitch), _border(false),
+ _borderExtraSpacingWidth(extraSpacingWidth), _borderExtraSpacingHeight(extraSpacingHeight), _glyphData(0), _glyphDataSize(0) {
+}
+
+ChineseFont::~ChineseFont() {
+ delete[] _glyphData;
+}
+
+bool ChineseFont::load(Common::SeekableReadStream &data) {
+ if (_glyphData)
+ return false;
+
+ if (!data.size())
+ return false;
+
+ _glyphDataSize = data.size();
+ uint8 *dst = new uint8[_glyphDataSize];
+ if (!dst)
+ return false;
+
+ data.read(dst, _glyphDataSize);
+ _glyphData = dst;
+
+ return true;
+}
+
+void ChineseFont::setColorMap(const uint8 *src) {
+ _colorMap = src;
+ processColorMap();
+}
+
+void ChineseFont::drawChar(uint16 c, byte *dst, int pitch, int) const {
+ static const int8 drawSeqNormal[4] = { 0, 0, 0, -1 };
+ static const int8 drawSeqOutline[19] = { 1, 0, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 0, -1 };
+
+ if (!hasGlyphForCharacter(c))
+ return;
+
+ uint32 offs = getFontOffset(c);
+ assert(offs < _glyphDataSize);
+ const uint8 *glyphData = _glyphData + offs;
+
+ for (const int8 *i = _border ? drawSeqOutline : drawSeqNormal; *i != -1; i += 3) {
+ const uint8 *data = glyphData;
+ uint8 *dst3 = dst;
+ dst = &dst3[i[0] + i[1] * _pitch];
+ for (int h = 0; h < _renderHeight; ++h) {
+ uint8 in = 0;
+ int bt = -1;
+ uint8 *dst2 = dst;
+ for (int x = 0; x < _renderWidth; ++x) {
+ if (bt == -1) {
+ in = *data++;
+ bt = 7;
+ }
+ if (in & (1 << (bt--)))
+ *(uint16*)dst = _textColor[i[2]];
+ dst++;
+ }
+ dst = dst2 + _pitch;
+ }
+ dst = dst3;
+ }
+}
+
+void ChineseOneByteFontLoK::processColorMap() {
+
+}
+
+bool ChineseTwoByteFontLoK::hasGlyphForCharacter(uint16 c) const {
+ return false;
+}
+
+uint32 ChineseTwoByteFontLoK::getFontOffset(uint16 c) const {
+ return 0;
+}
+
+void ChineseTwoByteFontLoK::processColorMap() {
+
+}
+
+MultiSubsetFont::~MultiSubsetFont() {
+ for (Common::Array<Font*>::const_iterator i = _subsets->begin(); i != _subsets->end(); ++i)
+ delete (*i);
+ delete _subsets;
+}
+
+bool MultiSubsetFont::load(Common::SeekableReadStream &data) {
+ for (Common::Array<Font*>::const_iterator i = _subsets->begin(); i != _subsets->end(); ++i)
+ if ((*i)->load(data))
+ return true;
+ return false;
+}
+
+void MultiSubsetFont::setStyles(int styles) {
+ for (Common::Array<Font*>::const_iterator i = _subsets->begin(); i != _subsets->end(); ++i)
+ (*i)->setStyles(styles);
+}
+
+int MultiSubsetFont::getHeight() const {
+ int res = 0;
+ for (Common::Array<Font*>::const_iterator i = _subsets->begin(); i != _subsets->end(); ++i)
+ res = MAX<int>(res, (*i)->getHeight());
+ return res;
+}
+
+int MultiSubsetFont::getWidth() const {
+ int res = 0;
+ for (Common::Array<Font*>::const_iterator i = _subsets->begin(); i != _subsets->end(); ++i)
+ res = MAX<int>(res, (*i)->getWidth());
+ return res;
+}
+
+int MultiSubsetFont::getCharWidth(uint16 c) const {
+ int res = 0;
+ for (Common::Array<Font*>::const_iterator i = _subsets->begin(); i != _subsets->end(); ++i) {
+ if ((res = (*i)->getCharWidth(c)) != -1)
+ break;
+ }
+ return res > 0 ? res : 0;
+}
+
+void MultiSubsetFont::setColorMap(const uint8 *src) {
+ for (Common::Array<Font*>::const_iterator i = _subsets->begin(); i != _subsets->end(); ++i)
+ (*i)->setColorMap(src);
+}
+
+void MultiSubsetFont::drawChar(uint16 c, byte *dst, int pitch, int) const {
+ for (Common::Array<Font*>::const_iterator i = _subsets->begin(); i != _subsets->end(); ++i)
+ (*i)->drawChar(c, dst, pitch, 0);
+}
+
#pragma mark -
Palette::Palette(const int numColors) : _palData(nullptr), _numColors(numColors) {
diff --git a/engines/kyra/graphics/screen.h b/engines/kyra/graphics/screen.h
index fc0ea505bb..9d479593ac 100644
--- a/engines/kyra/graphics/screen.h
+++ b/engines/kyra/graphics/screen.h
@@ -255,32 +255,127 @@ private:
const int _sjisWidthOffset;
};
-class Big5Font : public Font {
+class ChineseFont : public Font {
public:
- Big5Font(const uint8 *oneByteData, int pitch);
- ~Big5Font() override;
+ ChineseFont(int pitch, int renderWidth, int renderHeight, int spacingWidth, int spacingHeight, int extraSpacingWidth, int extraSpacingHeight);
+ ~ChineseFont() override;
+ bool load(Common::SeekableReadStream &data) override;
+
+ void setStyles(int styles) override { _border = (styles & kStyleBorder); }
+ int getHeight() const override { return _spacingHeight + (_border ? _borderExtraSpacingHeight : 0); }
+ int getWidth() const override { return _spacingWidth + (_border ? _borderExtraSpacingWidth : 0); }
+ int getCharWidth(uint16 c) const override { return hasGlyphForCharacter(c) ? getWidth() : -1; }
+ void setColorMap(const uint8 *src) override;
+ void drawChar(uint16 c, byte *dst, int pitch, int) const override;
+
+protected:
+ uint16 _textColor[2];
+ const uint8 *_colorMap;
+
+private:
+ virtual bool hasGlyphForCharacter(uint16 c) const = 0;
+ virtual uint32 getFontOffset(uint16 c) const = 0;
+ virtual void processColorMap() = 0;
+
+ const int _spacingWidth, _spacingHeight;
+ const int _borderExtraSpacingWidth, _borderExtraSpacingHeight;
+ const int _renderWidth, _renderHeight;
+
+ const uint8 *_glyphData;
+ uint32 _glyphDataSize;
+ const uint16 _pitch;
+ bool _border;
+};
+
+class ChineseOneByteFontLoK : public ChineseFont {
+public:
+ ChineseOneByteFontLoK(int pitch) : ChineseFont(pitch, 7, 14, 9, 14, 0, 2) {}
+ ~ChineseOneByteFontLoK() override {}
+ Type getType() const override { return kBIG5; }
+
+private:
+ bool hasGlyphForCharacter(uint16 c) const override { return !(c & 0x80); }
+ uint32 getFontOffset(uint16 c) const override { return (c & 0x7F) * 14; }
+ void processColorMap() override;
+};
+
+class ChineseTwoByteFontLoK : public ChineseFont {
+public:
+ ChineseTwoByteFontLoK(int pitch, const uint16 *lookupTable) : ChineseFont(pitch, 15, 14, 18, 14, 0, 2), _lookupTable(lookupTable) {}
+ ~ChineseTwoByteFontLoK() override {}
+ Type getType() const override { return kBIG5; }
+
+private:
+ bool hasGlyphForCharacter(uint16 c) const override;
+ uint32 getFontOffset(uint16 c) const override;
+ void processColorMap() override;
+
+ const uint16 *_lookupTable;
+};
+
+class ChineseOneByteFontMR : public ChineseFont {
+public:
+ ChineseOneByteFontMR(int pitch) : ChineseFont(pitch, 7, 14, 9, 14, 0, 2) {}
+ ~ChineseOneByteFontMR() override {}
+ Type getType() const override { return kBIG5; }
+
+private:
+ bool hasGlyphForCharacter(uint16 c) const override { return (c == 0x6187) || !(c & 0x80); }
+ uint32 getFontOffset(uint16 c) const override { return ((c == 0x6187) ? 128 : (c & 0x7F)) * 14; }
+ void processColorMap() override;
+};
+
+class ChineseTwoByteFontMR : public ChineseFont {
+public:
+ ChineseTwoByteFontMR(int pitch) : ChineseFont(pitch, 15, 14, 18, 14, 0, 2) {}
+ ~ChineseTwoByteFontMR() override {}
+ Type getType() const override { return kBIG5; }
+
+private:
+ bool hasGlyphForCharacter(uint16 c) const override { return (c != 0x6187) && (c & 0x80); }
+ uint32 getFontOffset(uint16 c) const override;
+ void processColorMap() override;
+};
+
+class MultiSubsetFont : public Font {
+public:
+ MultiSubsetFont(Common::Array<Font*> *subsets) : Font(), _subsets(subsets) {}
+ ~MultiSubsetFont() override;
Type getType() const override { return kBIG5; }
bool load(Common::SeekableReadStream &data) override;
- int getHeight() const override { return _border ? 16 : 14; }
- int getWidth() const override { return 18; }
+
+ void setStyles(int styles) override;
+ int getHeight() const override;
+ int getWidth() const override;
int getCharWidth(uint16 c) const override;
void setColorMap(const uint8 *src) override;
- void setStyles(int styles) override { _border = (styles & kStyleBorder); }
void drawChar(uint16 c, byte *dst, int pitch, int) const override;
private:
- const uint8 *_oneByteData;
- const uint8 *_twoByteData;
- uint32 _twoByteNumChar;
- uint32 _twoByteDataSize;
- const uint8 *_colorMap;
- uint16 _textColor[2];
- const uint16 _pitch;
- bool _border;
+ Common::Array<Font*> *_subsets;
};
+/*
+class ChineseFont : public Font {
+public:
+ ChineseFont(const uint8 *oneByteData, int pitch);
+ ~ChineseFont() override;
+
+
+
+
+
+ int getCharWidth(uint16 c) const override;
+ void setColorMap(const uint8 *src) override;
+ void setStyles(int styles) override { _border = (styles & kStyleBorder); }
+ void drawChar(uint16 c, byte *dst, int pitch, int) const override;
+
+private:
+
+};*/
+
/**
* A class that manages KYRA palettes.
*
diff --git a/engines/kyra/graphics/screen_mr.cpp b/engines/kyra/graphics/screen_mr.cpp
index 2471277970..346629b048 100644
--- a/engines/kyra/graphics/screen_mr.cpp
+++ b/engines/kyra/graphics/screen_mr.cpp
@@ -131,41 +131,7 @@ void Screen_MR::drawFilledBox(int x1, int y1, int x2, int y2, uint8 c1, uint8 c2
drawClippedLine(x1, y2-1, x2-1, y2-1, c3);
}
-Big5Font::Big5Font(const uint8 *oneByteData, int pitch) : Font(), _oneByteData(oneByteData), _twoByteData(nullptr), _twoByteDataSize(0), _twoByteNumChar(0), _pitch(pitch), _border(false) {
- assert(_oneByteData);
- _textColor[0] = _textColor[1] = 0;
-}
-
-Big5Font::~Big5Font() {
- delete[] _twoByteData;
-}
-
-bool Big5Font::load(Common::SeekableReadStream &data) {
- delete[] _twoByteData;
- _twoByteData = nullptr;
- _twoByteNumChar = _twoByteDataSize = 0;
-
- if (!data.size())
- return false;
-
- _twoByteDataSize = data.size();
- uint8 *dst = new uint8[_twoByteDataSize];
- if (!dst)
- return false;
-
- data.read(dst, _twoByteDataSize);
- _twoByteData = dst;
- _twoByteNumChar = _twoByteDataSize / 28;
-
- return true;
-}
-
-int Big5Font::getCharWidth(uint16 c) const {
- return (c & 0x80) ? 18 : 9;
-}
-
-void Big5Font::setColorMap(const uint8 *src) {
- _colorMap = src;
+void ChineseOneByteFontMR::processColorMap() {
_textColor[0] = _colorMap[1] | (_colorMap[1] << 8);
if (_textColor[0]) {
_textColor[0] -= 0x100;
@@ -176,42 +142,20 @@ void Big5Font::setColorMap(const uint8 *src) {
_textColor[1] = _colorMap[0] | (_colorMap[0] << 8);
}
-void Big5Font::drawChar(uint16 c, byte *dst, int pitch, int) const {
- static const int8 drawSeqNormal[4] = { 0, 0, 0, -1 };
- static const int8 drawSeqOutline[19] = { 1, 0, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 0, -1 };
- const uint8 *glyphData = &_oneByteData[(c & 0x7F) * 14];
- int w = 7;
-
- if (c == 0x6187) {
- glyphData = &_oneByteData[128];
- } else if (c & 0x80) {
- c = ((c & 0x7F00) >> 2) | (c & 0x3F);
- assert(c < _twoByteNumChar);
- glyphData = &_twoByteData[c * 28];
- w = 15;
- }
+uint32 ChineseTwoByteFontMR::getFontOffset(uint16 c) const {
+ c = ((c & 0x7F00) >> 2) | (c & 0x3F);
+ return c * 28;
+}
- for (const int8 *i = _border ? drawSeqOutline : drawSeqNormal; *i != -1; i += 3) {
- const uint8 *data = glyphData;
- uint8 *dst3 = dst;
- dst = &dst3[i[0] + i[1] * _pitch];
- for (int h = 0; h < 14; ++h) {
- uint8 in = 0;
- int bt = -1;
- uint8 *dst2 = dst;
- for (int x = 0; x < w; ++x) {
- if (bt == -1) {
- in = *data++;
- bt = 7;
- }
- if (in & (1 << (bt--)))
- *(uint16*)dst = _textColor[i[2]];
- dst++;
- }
- dst = dst2 + _pitch;
- }
- dst = dst3;
+void ChineseTwoByteFontMR::processColorMap() {
+ _textColor[0] = _colorMap[1] | (_colorMap[1] << 8);
+ if (_textColor[0]) {
+ _textColor[0] -= 0x100;
+ if (_colorMap[1] == 0xFF)
+ _textColor[0] -= 0x100;
}
+ _textColor[0] = TO_LE_16(_textColor[0]);
+ _textColor[1] = _colorMap[0] | (_colorMap[0] << 8);
}
} // End of namespace Kyra
Commit: db2c959289ff4588681f905c889abbb965dbdbe1
https://github.com/scummvm/scummvm/commit/db2c959289ff4588681f905c889abbb965dbdbe1
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-15T01:01:06+01:00
Commit Message:
KYRA: (LoK/Traditional Chinese) - add static resources
Changed paths:
A devtools/create_kyradat/resources/lok_dos_chinese_trad.h
devtools/create_kyradat/create_kyradat.cpp
devtools/create_kyradat/create_kyradat.h
devtools/create_kyradat/games.cpp
devtools/create_kyradat/resources.cpp
devtools/create_kyradat/resources/lok_dos.h
dists/engine-data/kyra.dat
engines/kyra/detection_tables.h
engines/kyra/graphics/screen.cpp
engines/kyra/graphics/screen.h
engines/kyra/resource/resource.h
engines/kyra/resource/staticres.cpp
diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp
index 2847638e00..44c85580ee 100644
--- a/devtools/create_kyradat/create_kyradat.cpp
+++ b/devtools/create_kyradat/create_kyradat.cpp
@@ -39,7 +39,7 @@
enum {
- kKyraDatVersion = 111
+ kKyraDatVersion = 112
};
const ExtractFilename extractFilenames[] = {
@@ -166,6 +166,10 @@ const ExtractFilename extractFilenames[] = {
{ k1PC98StoryStrings, kStringList, true },
{ k1PC98IntroSfx, kRawData, false },
+ // Chinese version specific
+ { k1TwoByteFontLookupTable, kRawDataBe16, true },
+ { k1TwoByteDummyGlyph, kRawData, true },
+
// AMIGA specific
{ k1AmigaIntroSFXTable, kAmigaSfxTable, false },
{ k1AmigaGameSFXTable, kAmigaSfxTable, false },
diff --git a/devtools/create_kyradat/create_kyradat.h b/devtools/create_kyradat/create_kyradat.h
index df2bc8dc77..0234e27783 100644
--- a/devtools/create_kyradat/create_kyradat.h
+++ b/devtools/create_kyradat/create_kyradat.h
@@ -146,6 +146,9 @@ enum kExtractID {
k1AmigaIntroSFXTable,
k1AmigaGameSFXTable,
+ k1TwoByteFontLookupTable,
+ k1TwoByteDummyGlyph,
+
k2SeqplayPakFiles,
k2SeqplayCredits,
k2SeqplayCreditsSpecial,
diff --git a/devtools/create_kyradat/games.cpp b/devtools/create_kyradat/games.cpp
index 67c3fc0f83..ed7d15b142 100644
--- a/devtools/create_kyradat/games.cpp
+++ b/devtools/create_kyradat/games.cpp
@@ -44,6 +44,7 @@ const Game kyra1Games[] = {
{ kKyra1, kPlatformDOS, kNoSpecial, IT_ITA },
{ kKyra1, kPlatformDOS, kNoSpecial, ES_ESP },
{ kKyra1, kPlatformDOS, kOldFloppy, RU_RUS },
+ { kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN },
{ kKyra1, kPlatformDOS, kTalkieVersion, EN_ANY },
{ kKyra1, kPlatformDOS, kTalkieVersion, DE_DEU },
@@ -264,6 +265,8 @@ const int kyra1FloppyNeed[] = {
k1ConfigStrings,
k1AudioTracks,
k1AudioTracksIntro,
+ k1TwoByteFontLookupTable,
+ k1TwoByteDummyGlyph,
-1
};
diff --git a/devtools/create_kyradat/resources.cpp b/devtools/create_kyradat/resources.cpp
index e9635c9718..b236c4d3b1 100644
--- a/devtools/create_kyradat/resources.cpp
+++ b/devtools/create_kyradat/resources.cpp
@@ -39,6 +39,7 @@
#include "resources/lok_dos_oldfloppy.h"
#include "resources/lok_dos_oldfloppy_russian.h"
#include "resources/lok_dos_spanish.h"
+#include "resources/lok_dos_chinese_trad.h"
#include "resources/lok_dos_cd.h"
#include "resources/lok_dos_cd_english.h"
@@ -334,6 +335,8 @@ static const ResourceProvider resourceProviders[] = {
{ k1GUIStrings, kKyra1, kPlatformDOS, kNoSpecial, EN_ANY, &k1GUIStringsDOSEnglishProvider },
{ k1NewGameString, kKyra1, kPlatformDOS, kNoSpecial, EN_ANY, &k1NewGameStringDOSEnglishProvider },
{ k1ConfigStrings, kKyra1, kPlatformDOS, kNoSpecial, EN_ANY, &k1ConfigStringsDOSEnglishProvider },
+ { k1TwoByteFontLookupTable, kKyra1, kPlatformDOS, kNoSpecial, EN_ANY, &k1TwoByteFontLookupTableDOSProvider },
+ { k1TwoByteDummyGlyph, kKyra1, kPlatformDOS, kNoSpecial, EN_ANY, &k1TwoByteDummyGlyphDOSProvider },
{ k1AudioTracks, kKyra1, kPlatformDOS, kNoSpecial, UNK_LANG, &k1AudioTracksDOSProvider },
{ k1AudioTracksIntro, kKyra1, kPlatformDOS, kNoSpecial, UNK_LANG, &k1AudioTracksIntroDOSProvider },
{ k1IntroStrings, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1IntroStringsDOSGermanProvider },
@@ -358,6 +361,8 @@ static const ResourceProvider resourceProviders[] = {
{ k1GUIStrings, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1GUIStringsDOSGermanProvider },
{ k1NewGameString, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1NewGameStringDOSGermanProvider },
{ k1ConfigStrings, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1ConfigStringsDOSGermanProvider },
+ { k1TwoByteFontLookupTable, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1TwoByteFontLookupTableDOSProvider },
+ { k1TwoByteDummyGlyph, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1TwoByteDummyGlyphDOSProvider },
{ k1IntroStrings, kKyra1, kPlatformDOS, kNoSpecial, FR_FRA, &k1IntroStringsDOSFrenchProvider },
{ k1ItemNames, kKyra1, kPlatformDOS, kNoSpecial, FR_FRA, &k1ItemNamesDOSFrenchProvider },
{ k1TakenStrings, kKyra1, kPlatformDOS, kNoSpecial, FR_FRA, &k1TakenStringsDOSFrenchProvider },
@@ -380,7 +385,8 @@ static const ResourceProvider resourceProviders[] = {
{ k1GUIStrings, kKyra1, kPlatformDOS, kNoSpecial, FR_FRA, &k1GUIStringsDOSFrenchProvider },
{ k1NewGameString, kKyra1, kPlatformDOS, kNoSpecial, FR_FRA, &k1NewGameStringDOSFrenchProvider },
{ k1ConfigStrings, kKyra1, kPlatformDOS, kNoSpecial, FR_FRA, &k1ConfigStringsDOSFrenchProvider },
-
+ { k1TwoByteFontLookupTable, kKyra1, kPlatformDOS, kNoSpecial, FR_FRA, &k1TwoByteFontLookupTableDOSProvider },
+ { k1TwoByteDummyGlyph, kKyra1, kPlatformDOS, kNoSpecial, FR_FRA, &k1TwoByteDummyGlyphDOSProvider },
{ k1IntroStrings, kKyra1, kPlatformDOS, kNoSpecial, IT_ITA, &k1IntroStringsDOSItalianProvider },
{ k1ItemNames, kKyra1, kPlatformDOS, kNoSpecial, IT_ITA, &k1ItemNamesDOSItalianProvider },
{ k1TakenStrings, kKyra1, kPlatformDOS, kNoSpecial, IT_ITA, &k1TakenStringsDOSItalianProvider },
@@ -403,7 +409,8 @@ static const ResourceProvider resourceProviders[] = {
{ k1GUIStrings, kKyra1, kPlatformDOS, kNoSpecial, IT_ITA, &k1GUIStringsDOSItalianProvider },
{ k1NewGameString, kKyra1, kPlatformDOS, kNoSpecial, IT_ITA, &k1NewGameStringDOSItalianProvider },
{ k1ConfigStrings, kKyra1, kPlatformDOS, kNoSpecial, IT_ITA, &k1ConfigStringsDOSItalianProvider },
-
+ { k1TwoByteFontLookupTable, kKyra1, kPlatformDOS, kNoSpecial, IT_ITA, &k1TwoByteFontLookupTableDOSProvider },
+ { k1TwoByteDummyGlyph, kKyra1, kPlatformDOS, kNoSpecial, IT_ITA, &k1TwoByteDummyGlyphDOSProvider },
{ k1IntroStrings, kKyra1, kPlatformDOS, kNoSpecial, ES_ESP, &k1IntroStringsDOSSpanishProvider },
{ k1ItemNames, kKyra1, kPlatformDOS, kNoSpecial, ES_ESP, &k1ItemNamesDOSSpanishProvider },
{ k1TakenStrings, kKyra1, kPlatformDOS, kNoSpecial, ES_ESP, &k1TakenStringsDOSSpanishProvider },
@@ -426,6 +433,32 @@ static const ResourceProvider resourceProviders[] = {
{ k1GUIStrings, kKyra1, kPlatformDOS, kNoSpecial, ES_ESP, &k1GUIStringsDOSSpanishProvider },
{ k1NewGameString, kKyra1, kPlatformDOS, kNoSpecial, ES_ESP, &k1NewGameStringDOSSpanishProvider },
{ k1ConfigStrings, kKyra1, kPlatformDOS, kNoSpecial, ES_ESP, &k1ConfigStringsDOSSpanishProvider },
+ { k1TwoByteFontLookupTable, kKyra1, kPlatformDOS, kNoSpecial, ES_ESP, &k1TwoByteFontLookupTableDOSProvider },
+ { k1TwoByteDummyGlyph, kKyra1, kPlatformDOS, kNoSpecial, ES_ESP, &k1TwoByteDummyGlyphDOSProvider },
+ { k1IntroStrings, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1IntroStringsDOSChineseTradProvider },
+ { k1ItemNames, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1ItemNamesDOSChineseTradProvider },
+ { k1TakenStrings, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1TakenStringsDOSChineseTradProvider },
+ { k1PlacedStrings, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1PlacedStringsDOSChineseTradProvider },
+ { k1DroppedStrings, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1DroppedStringsDOSChineseTradProvider },
+ { k1NoDropStrings, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1NoDropStringsDOSChineseTradProvider },
+ { k1PutDownString, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1PutDownStringDOSChineseTradProvider },
+ { k1WaitAmuletString, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1WaitAmuletStringDOSChineseTradProvider },
+ { k1BlackJewelString, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1BlackJewelStringDOSChineseTradProvider },
+ { k1HealingTipString, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1HealingTipStringDOSChineseTradProvider },
+ { k1PoisonGoneString, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1PoisonGoneStringDOSChineseTradProvider },
+ { k1ThePoisonStrings, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1ThePoisonStringsDOSChineseTradProvider },
+ { k1FluteStrings, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1FluteStringsDOSChineseTradProvider },
+ { k1WispJewelStrings, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1WispJewelStringsDOSChineseTradProvider },
+ { k1MagicJewelStrings, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1MagicJewelStringsDOSChineseTradProvider },
+ { k1FlaskFullString, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1FlaskFullStringDOSChineseTradProvider },
+ { k1FullFlaskString, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1FullFlaskStringDOSChineseTradProvider },
+ { k1OutroHomeString, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1OutroHomeStringDOSChineseTradProvider },
+ { k1VeryCleverString, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1VeryCleverStringDOSChineseTradProvider },
+ { k1GUIStrings, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1GUIStringsDOSChineseTradProvider },
+ { k1NewGameString, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1NewGameStringDOSChineseTradProvider },
+ { k1ConfigStrings, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1ConfigStringsDOSChineseTradProvider },
+ { k1TwoByteFontLookupTable, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1TwoByteFontLookupTableDOSChineseTradProvider },
+ { k1TwoByteDummyGlyph, kKyra1, kPlatformDOS, kNoSpecial, ZH_TWN, &k1TwoByteDummyGlyphDOSChineseTradProvider },
{ k1KallakWritingSeq, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1KallakWritingSeqDOSOldFloppyProvider },
{ k1MalcolmTreeSeq, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1MalcolmTreeSeqDOSOldFloppyProvider },
{ k1WestwoodLogoSeq, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1WestwoodLogoSeqDOSOldFloppyProvider },
diff --git a/devtools/create_kyradat/resources/lok_dos.h b/devtools/create_kyradat/resources/lok_dos.h
index 6bc9c2525f..f6b55ba7ee 100644
--- a/devtools/create_kyradat/resources/lok_dos.h
+++ b/devtools/create_kyradat/resources/lok_dos.h
@@ -1918,3 +1918,14 @@ static const char *const k1AudioTracksIntroDOS[1] = {
static const StringListProvider k1AudioTracksIntroDOSProvider = { ARRAYSIZE(k1AudioTracksIntroDOS), k1AudioTracksIntroDOS };
+static const uint16 k1TwoByteFontLookupTableDOS[] = {
+ 0
+};
+
+static const Uint16Provider k1TwoByteFontLookupTableDOSProvider = { ARRAYSIZE(k1TwoByteFontLookupTableDOS), k1TwoByteFontLookupTableDOS };
+
+static const uint8 k1TwoByteDummyGlyphDOS[] = {
+ 0
+};
+
+static const ByteProvider k1TwoByteDummyGlyphDOSProvider = { ARRAYSIZE(k1TwoByteDummyGlyphDOS), k1TwoByteDummyGlyphDOS };
diff --git a/devtools/create_kyradat/resources/lok_dos_chinese_trad.h b/devtools/create_kyradat/resources/lok_dos_chinese_trad.h
new file mode 100644
index 0000000000..47597af53a
--- /dev/null
+++ b/devtools/create_kyradat/resources/lok_dos_chinese_trad.h
@@ -0,0 +1,504 @@
+static const char *const k1IntroStringsDOSChineseTrad[51] = {
+ "This is a text test - 1",
+ "This is a text test - 2",
+ "\xa7""A""\xa6""n""\xb0\xda\xa1""I""\xb3\xcd\xb5\xdc\xa7""J""\xa1""K",
+ "\xa1""K""\xa4""O""\xb6""q""\xb1""j""\xa4""j""\xaa\xba\xac\xd3\xae""a""\xaf\xab\xaf\xb5\xbe\xc7\xb7""|""\xbb\xe2\xbe\xc9\xaa\xcc\xa1""I",
+ "\xa7\xda\xc0""~""\xa8\xec\xa7""A""\xa4""F""\xb6\xdc\xa1""H",
+ "\xba\xbf\xba\xb8\xb1""F""\xa1""I",
+ "\xa7\xda\xac""Q""\xa4\xd1\xc5\xa5\xa8\xec\xa7""A""\xa4""w""\xb8""g""\xb0""k""\xb2\xe6\xaa\xba\xae\xf8\xae\xa7\xa1""C",
+ "\xb4""N""\xaa\xbe\xb9""D""\xa7""A""\xa4""@""\xa9""w""\xb7""|""\xa8\xd3\xa7\xe4\xa7\xda\xa1""C",
+ "\xac\xb0\xac\xc6\xbb\xf2\xa7\xda\xad""n""\xbb\xb0\xae\xc9\xb6\xa1\xa1""H",
+ "\xb2""{""\xa6""b""\xac""O""\xa7\xda\xb2\xce\xaa""v""\xb3""o""\xad\xd3\xa4""j""\xb3\xb0\xa1""I",
+ "\xa7""A""\xa8\xba\xa5""i""\xaf\xba\xaa\xba\xb6""A""\xa9""G""\xa4""w""\xb8""g""\xb5""L""\xaa""k""\xb1\xb1\xa8\xee\xa7\xda\xa1""I",
+ "\xa6""n""\xa1""A""\xae\xf8\xb7\xc0\xa7\xda\xa7""a""\xa1""I",
+ "\xa7\xda\xaa\xba\xaa""k""\xa4""O""\xa4""w""\xb8""g""\xb3\xd1\xa4""U""\xa4\xa3\xa6""h""\xa1""C",
+ "\xa8""S""\xbf\xf9\xa1""I""\xa7\xda\xa5\xbf\xac""O""\xa8\xd3\xa7\xe4\xa7""A""\xb3\xf8\xa4\xb3\xa1""K",
+ "\xa1""K""\xb2""{""\xa6""b""\xa7""A""\xa4""w""\xb8""g""\xc5\xdc\xa6\xa8\xa5\xdb\xb9\xb3\xa1""K",
+ "\xa1""K""\xa6\xfd\xac""O""\xa7\xda\xab""O""\xaf""d""\xa7""A""\xaa\xba\xb2\xb4\xb7\xfa\xa1""C",
+ "\xa7\xda\xa4\xa3\xb7""|""\xac\xb0\xb3\xcd\xc4\xf5\xad""}""\xa8\xc8\xac""y""\xa4""U""\xa5\xf4\xa6\xf3\xb2\xb4\xb2""\\""\xa1""K",
+ "\xa1""K""\xa6\xfd\xac""O""\xa7\xda\xa4\xa3\xa7\xc6\xb1\xe6\xad\xe9\xb9\xdc\xa7""A""\xaa\xba\xb3""o""\xb6\xb5\xc5""v""\xa7""Q""\xa1""I",
+ "\xa7\xcb\xa6\xda\xba\xbf\xba\xb8\xb1""F""\xa4""w""\xb8""g""\xb1""o""\xa8\xec\xa6\xdb\xa5\xd1\xa1""I",
+ "\xa5""L""\xa4""w""\xb8""g""\xb1\xb1\xa8\xee\xa4""F""\xb3\xcd\xc4\xf5\xad""}""\xa8\xc8\xaa\xba\xaa""k""\xa4""O""\xa8\xd3\xb7\xbd\xa1""K",
+ "\xa1""K""\xb3\xcd\xb9""p""\xa4\xa7\xa5\xdb\xa1""I",
+ "",
+ "\xa7""A""\xb3\xba\xb4\xb1\xb2\xcc\xad\xcb\xa7\xda\xa1""I",
+ "\xb5\xa5\xa4""@""\xa4""U""\xa1""A""\xa7\xda\xa6\xb3\xa7\xf3\xa6""n""\xaa\xba\xa5""D""\xb7""N""\xa1""K",
+ "\xa4""@""\xad\xd3\xa6\xb3\xbd\xec\xaa\xba\xb3\xb4\xa8\xc0\xa1""I",
+ "\xa6\xfd\xac""O""\xa7\xda\xa5\xb2\xb6\xb7\xa8\xc6\xa5\xfd\xc4\xb5\xa7""i""\xa1""C",
+ "\xa4\xa3\xad""n""\xb8\xf5\xa8\xec\xa8\xba\xb4\xca\xbe\xf0\xa4""W""\xa1""I",
+ "\xa4\xa3\xad""n""\xaa\xa6\xa4""W""\xa5""h""\xa7""r""\xa1""A""\xa4""p""\xaa""Q""\xb9\xab\xa1""K",
+ "\xc0""~""\xa1""I",
+ "\xb3""o""\xbc\xcb\xa6\xb3\xbd\xec\xb1""o""\xa6""h""\xa4""F""\xa1""K",
+ "\xa1""K""\xa4\xa3\xac""O""\xb6\xdc\xa1""H",
+ "\xab\xa2\xa1""K""\xab\xa2\xa1""K""\xab\xa2\xa1""K",
+ "\xa7\xda\xaa\xba\xa4\xe2\xab\xfc\xa4""S""\xaf\xe0\xb0\xca\xa4""F""\xa1""H",
+ "\xaf\xe0\xac\xa1\xb5\xdb\xaf""u""\xac""O""\xa4\xd3\xa6""n""\xa4""F""\xa1""I",
+ "\xa5\xac\xc4\xf5\xb5""n""\xa1""I",
+ "\xb7\xdd\xb7\xdd\xa1""I""\xa7\xda\xad\xcc\xa6\xa8\xa5""\\""\xa4""F""\xa1""I",
+ "\xa4\xa3\xa1""I""\xa7""A""\xa6\xa8\xa5""\\""\xa4""F""\xa1""I",
+ "\xa5\xac\xc4\xf5\xb5""n""\xb0\xea\xa4\xfd\xb8""U""\xb7\xb3\xa1""I",
+ "\xac\xd3\xae""a""\xaf\xab\xaf\xb5\xbe\xc7\xaa\xcc\xb8""U""\xb7\xb3\xa1""I",
+ "\xb2""{""\xa6""b""\xa1""A""\xc5\xfd\xa7\xda\xad\xcc\xa7\xe2\xb3\xcd\xc4\xf5\xad""}""\xa8\xc8\xab\xec\xb4""_""\xad\xec\xaa\xac\xa1""I",
+ "\xaf""u""\xac""O""\xad\xd3\xa6""n""\xa5""D""\xb7""N""\xa1""I",
+ "\xa7\xda\xb5""n""\xa4""W""\xa4\xfd\xa6\xec\xab\xe1\xaa\xba\xb2\xc4\xa4""@""\xb9""D""\xa9""R""\xa5""O""\xa1""K",
+ "\xa1""K""\xb4""N""\xac""O""\xc5\xfd\xa9\xec\xbe""c""\xa6\xa8\xac\xb0\xb3\xcd\xc4\xf5\xad""}""\xa8\xc8\xaa\xba\xa5\xbf\xa6\xa1\xac\xef\xb5\xdb\xa1""I",
+ "\xae\xa5\xb3\xdf\xa7""A""\xa1""A""\xa5\xac\xc4\xf5\xb5""n""\xa1""I",
+ "\xa4""j""\xa6""a""\xa4""w""\xb8""g""\xa4\xa3\xa6""A""\xad\xfa\xaa""_""\xa1""K",
+ "\xa7""A""\xaa\xba\xaa""B""\xa4\xcd\xad\xcc\xa4""]""\xb3\xa3\xab\xec\xb4""_""\xa5\xbf\xb1""`""\xa4""F""\xa1""I",
+ "\xa5\xac\xb5\xdc\xae\xa6\xa1""K",
+ "\xa1""K""\xba\xbf\xba\xb8\xb1""F""\xa4""w""\xb8""g""\xb0""k""\xb2\xe6\xa4""F""\xa1""I",
+ "\xa5""L""\xab\xdc\xa7\xd6\xb4""N""\xb7""|""\xa8\xd3\xa7\xe4\xa7\xda\xa1""C",
+ "\xbd\xd0\xa9""p""\xc0\xb0\xa7""U""\xa5\xac\xc4\xf5\xb5""n""\xa1""K",
+ ""
+};
+
+static const StringListProvider k1IntroStringsDOSChineseTradProvider = { ARRAYSIZE(k1IntroStringsDOSChineseTrad), k1IntroStringsDOSChineseTrad };
+
+static const char *const k1ItemNamesDOSChineseTrad[107] = {
+ "\xcf""C""\xba""h""\xa5\xdb",
+ "\xb5\xb5\xa4\xf4\xb4\xb9",
+ "\xc2\xc5\xa4\xf4\xb4\xb9",
+ "\xc6""p""\xa5\xdb",
+ "\xbb""B""\xbb""A",
+ "\xac\xc3\xaf""]",
+ "\xac\xf5\xc4""_""\xa5\xdb",
+ "\xba\xf1\xbe\xf1\xc6""V""\xa5\xdb",
+ "\xc2\xc5\xc4""_""\xa5\xdb",
+ "\xb3""J""\xa5\xd5\xa5\xdb",
+ "\xb6\xc0\xa5\xc9",
+ "\xba\xbf\xb7\xea",
+ "\xa4\xd3\xb6\xa7\xa5\xdb",
+ "\xa4\xeb\xa4\xa7\xa5\xdb",
+ "\xb1""m""\xad""i""\xa5\xdb",
+ "\xa4\xd1\xb5""M""\xba\xcf\xa5\xdb",
+ "\xaa\xb4\xba\xc0",
+ "\xc6""{""\xaa\xf7\xad\xbb",
+ "\xc4\xf5\xaa\xe1",
+ "\xbb\xc8\xaa\xb4\xba\xc0",
+ "\xbb\xc8\xb6\xec\xb9\xb3",
+ "\xbb\xc8\xb9\xf4",
+ "\xaa\xf7\xb9\xf4",
+ "\xaa\xf7\xa7\xd9\xab\xfc",
+ "\xac\xd3\xae""a""\xb8""t""\xaa""M",
+ "\xaa""Q""\xaa""G",
+ "\xbe\xf3\xb9\xea",
+ "\xad""J""\xae\xe7",
+ "\xb5""o""\xa5\xfa\xaa\xba\xa4\xf5\xb2\xf9",
+ "\xa4\xf5\xb2\xf9",
+ "\xa4\xf5\xb2\xf9",
+ "\xa4\xf5\xb2\xf9",
+ "\xa4\xf5\xb2\xf9",
+ "\xa4\xf5\xb2\xf9",
+ "\xb3\xbd",
+ "\xb3\xbd\xb0\xa9",
+ "\xa6\xcf\xbb""L""\xa6\xd7",
+ "\xb0\xa9\xc0""Y",
+ "\xc4\xab\xaa""G",
+ "\xc4\xab\xaa""G""\xae\xd6",
+ "\xc2\xc5\xb2\xf9",
+ "\xc4\xa8\xdb\xa3",
+ "\xb5\xa7\xb0""O",
+ "\xbc""u""\xaf""]",
+ "\xbf\xf7\xa4""l",
+ "\xc5""@""\xb2\xc5",
+ "\xa6\xd0\xa4\xf2",
+ "\xb3""J",
+ "\xb8\xad\xa4""l",
+ "\xdc""`""\xbc\xdf\xaf\xf3",
+ "\xac""y""\xac""P",
+ "\xa4\xf4\xb4\xb9\xb2""y",
+ "\xb2""\\""\xba""w",
+ "\xc3\xe8\xa4""l",
+ "\xa6""B""\xa4\xf9",
+ "\xb1\xc6\xb2\xc3",
+ "\xa8""F""\xba""|",
+ "\xc5""K""\xc6""_""\xb0\xcd",
+ "\xa5\xc9\xc6""_""\xb0\xcd",
+ "\xb6\xc2\xc2""`""\xa5\xdb\xc6""_""\xb0\xcd",
+ "\xac\xf5\xa6\xe2\xc3\xc4\xbe\xaf",
+ "\xac\xf5\xa6\xe2\xc3\xc4\xbe\xaf",
+ "\xc2\xc5\xa6\xe2\xc3\xc4\xbe\xaf",
+ "\xc2\xc5\xa6\xe2\xc3\xc4\xbe\xaf",
+ "\xb6\xc0\xa6\xe2\xc3\xc4\xbe\xaf",
+ "\xb6\xc0\xa6\xe2\xc3\xc4\xbe\xaf",
+ "\xba\xf1\xa6\xe2\xc3\xc4\xbe\xaf",
+ "\xbe\xef\xa6\xe2\xc3\xc4\xbe\xaf",
+ "\xb5\xb5\xa6\xe2\xc3\xc4\xbe\xaf",
+ "\xb1""m""\xad""i""\xc3\xc4\xbe\xaf",
+ "\xac""u""\xa4\xf4",
+ "\xac""u""\xa4\xf4",
+ "\xc6""Q""\xa4\xf4",
+ "\xc6""Q""\xa4\xf4",
+ "\xc4""q""\xac""u""\xa4\xf4",
+ "\xc4""q""\xac""u""\xa4\xf4",
+ "\xc5""]""\xaa""k""\xa4\xf4",
+ "\xc5""]""\xaa""k""\xa4\xf4",
+ "\xaa\xc5\xb2""~",
+ "\xaa\xc5\xb2""~",
+ "\xa8\xf7\xb6""b",
+ "\xa8\xf7\xb6""b",
+ "\xa8\xf7\xb6""b",
+ "\xa8\xf7\xb6""b",
+ "\xa8\xf7\xb6""b",
+ "\xa8\xf7\xb6""b",
+ "\xa8\xf7\xb6""b",
+ "\xa8\xf7\xb6""b",
+ "\xa8\xf7\xb6""b",
+ "\xa8\xf7\xb6""b",
+ "\xa6\xcf\xa5\xd6\xaf\xc8\xb8""H""\xa4\xf9",
+ "\xa6\xcf\xa5\xd6\xaf\xc8\xb8""H""\xa4\xf9",
+ "\xa6\xcf\xa5\xd6\xaf\xc8\xb8""H""\xa4\xf9",
+ "\xa6\xcf\xa5\xd6\xaf\xc8\xb8""H""\xa4\xf9",
+ "\xa6\xcf\xa5\xd6\xaf\xc8\xb8""H""\xa4\xf9",
+ "\xac\xf5\xa6\xe2\xc5""]""\xaa""k""\xa5\xdb",
+ "\xbe\xef\xa6\xe2\xc5""]""\xaa""k""\xa5\xdb",
+ "\xb6\xc0\xa6\xe2\xc5""]""\xaa""k""\xa5\xdb",
+ "\xba\xf1\xa6\xe2\xc5""]""\xaa""k""\xa5\xdb",
+ "\xab""C""\xba\xf1\xa6\xe2\xc5""]""\xaa""k""\xa5\xdb",
+ "\xc2\xc5\xa6\xe2\xc5""]""\xaa""k""\xa5\xdb",
+ "\xb5\xb5\xa6\xe2\xc5""]""\xaa""k""\xa5\xdb",
+ "\xa5\xdb\xb6\xf4",
+ "\xac\xd3\xaa\xcc\xa4\xa7\xab""a",
+ "\xac\xd3\xae""a""\xc5""v""\xa7\xfa",
+ "\xaa\xf7\xc6""_""\xb0\xcd",
+ "\xa4\xa3\xaa\xbe\xa6""W""\xaa\xba\xaa\xab\xab""~"
+};
+
+static const StringListProvider k1ItemNamesDOSChineseTradProvider = { ARRAYSIZE(k1ItemNamesDOSChineseTrad), k1ItemNamesDOSChineseTrad };
+
+static const char *const k1TakenStringsDOSChineseTrad[2] = {
+ "\xae\xb3\xa8\xfa",
+ "\xae\xb3\xa8\xfa"
+};
+
+static const StringListProvider k1TakenStringsDOSChineseTradProvider = { ARRAYSIZE(k1TakenStringsDOSChineseTrad), k1TakenStringsDOSChineseTrad };
+
+static const char *const k1PlacedStringsDOSChineseTrad[1] = {
+ "\xa9\xf1\xb8""m"
+};
+
+static const StringListProvider k1PlacedStringsDOSChineseTradProvider = { ARRAYSIZE(k1PlacedStringsDOSChineseTrad), k1PlacedStringsDOSChineseTrad };
+
+static const char *const k1DroppedStringsDOSChineseTrad[1] = {
+ "\xa5\xe1\xb1\xf3"
+};
+
+static const StringListProvider k1DroppedStringsDOSChineseTradProvider = { ARRAYSIZE(k1DroppedStringsDOSChineseTrad), k1DroppedStringsDOSChineseTrad };
+
+static const char *const k1NoDropStringsDOSChineseTrad[2] = {
+ "\xb3""o""\xad\xd3\xb3\xf5\xb4\xba\xa4""w""\xb8""g""\xa9\xf1\xa4\xa3\xa4""U""\xa7\xf3\xa6""h""\xaa\xba\xaa\xab\xab""~""\xa4""F",
+ "\xa7""A""\xa4\xa3\xaf\xe0\xa7\xe2\xa5\xa6\xa9\xf1\xa6""b""\xa8\xba\xb8\xcc"
+};
+
+static const StringListProvider k1NoDropStringsDOSChineseTradProvider = { ARRAYSIZE(k1NoDropStringsDOSChineseTrad), k1NoDropStringsDOSChineseTrad };
+
+static const char *const k1PutDownStringDOSChineseTrad[1] = {
+ "\xa4""]""\xb3""\\""\xa7\xda\xc0\xb3\xb8\xd3\xa5\xfd\xa7\xe2\xa5\xa6\xa9\xf1\xa4""U""\xa8\xd3\xa1""C"
+};
+
+static const StringListProvider k1PutDownStringDOSChineseTradProvider = { ARRAYSIZE(k1PutDownStringDOSChineseTrad), k1PutDownStringDOSChineseTrad };
+
+static const char *const k1WaitAmuletStringDOSChineseTrad[1] = {
+ "\xa7\xda\xbb""{""\xac\xb0\xc0\xb3\xb8\xd3\xa5\xfd\xb5\xa5\xa7\xda\xaa\xba\xc5""@""\xa8\xad\xb2\xc5\xab\xec\xb4""_""\xaa""k""\xa4""O""\xa1""C"
+};
+
+static const StringListProvider k1WaitAmuletStringDOSChineseTradProvider = { ARRAYSIZE(k1WaitAmuletStringDOSChineseTrad), k1WaitAmuletStringDOSChineseTrad };
+
+static const char *const k1BlackJewelStringDOSChineseTrad[1] = {
+ "\xb3""o""\xac""O""\xa4""@""\xc1\xfb\xc4""_""\xa5\xdb\xa1""A""\xa6\xfd\xac""O""\xa5\xa6\xac\xb0\xac\xc6\xbb\xf2\xac""O""\xb6\xc2\xa6\xe2\xaa\xba\xa1""H"
+};
+
+static const StringListProvider k1BlackJewelStringDOSChineseTradProvider = { ARRAYSIZE(k1BlackJewelStringDOSChineseTrad), k1BlackJewelStringDOSChineseTrad };
+
+static const char *const k1HealingTipStringDOSChineseTrad[1] = {
+ "\xb6\xe2\xa1""A""\xb3""o""\xa6""b""\xa7\xda\xa8\xfc\xb6\xcb\xaa\xba\xae\xc9\xad\xd4\xab\xdc\xa6\xb3\xa5\xce\xa1""C"
+};
+
+static const StringListProvider k1HealingTipStringDOSChineseTradProvider = { ARRAYSIZE(k1HealingTipStringDOSChineseTrad), k1HealingTipStringDOSChineseTrad };
+
+static const char *const k1PoisonGoneStringDOSChineseTrad[2] = {
+ "\xaf""u""\xac""O""\xc5\xe5\xa4""H""\xa1""I",
+ "\xac""r""\xaf\xc0\xa4""w""\xb8""g""\xae\xf8\xb0""h""\xa4""F""\xa1""I"
+};
+
+static const StringListProvider k1PoisonGoneStringDOSChineseTradProvider = { ARRAYSIZE(k1PoisonGoneStringDOSChineseTrad), k1PoisonGoneStringDOSChineseTrad };
+
+static const char *const k1ThePoisonStringsDOSChineseTrad[4] = {
+ "\xac""r""\xa9\xca\xb5""o""\xa7""@""\xa1""K",
+ "\xa7\xda\xa4\xa3\xaf\xe0\xa9""I""\xa7""l""\xa4""F""\xa1""K",
+ "\xa7\xda\xc4\xb1\xb1""o""\xa6\xb3\xc2""I""\xa4\xa3\xb5\xce\xaa""A""\xa1""K",
+ "\xa8\xba\xb1\xf8\xb3""D""\xa4""@""\xa9""w""\xa6\xb3\xac""r""\xa1""I"
+};
+
+static const StringListProvider k1ThePoisonStringsDOSChineseTradProvider = { ARRAYSIZE(k1ThePoisonStringsDOSChineseTrad), k1ThePoisonStringsDOSChineseTrad };
+
+static const char *const k1FluteStringsDOSChineseTrad[2] = {
+ "\xc5\xa5\xb0""_""\xa8\xd3\xa4\xa3\xab\xe7\xbb\xf2\xbc\xcb\xa1""C",
+ "\xb3\xcc\xab\xe1\xa4""@""\xad\xd3\xad\xb5\xb2\xc5\xaa\xba\xad\xb5\xbd\xd5\xab""D""\xb1""`""\xb0\xaa\xa1""I"
+};
+
+static const StringListProvider k1FluteStringsDOSChineseTradProvider = { ARRAYSIZE(k1FluteStringsDOSChineseTrad), k1FluteStringsDOSChineseTrad };
+
+static const char *const k1WispJewelStringsDOSChineseTrad[3] = {
+ "\xa7\xda\xc4\xb1\xb1""o""\xb2""{""\xa6""b""\xae\xc9\xbe\xf7\xa4\xa3\xa4\xd3\xb9\xef\xa1""C",
+ "\xa4""]""\xb3\xa7\xda\xc0\xb3\xb8\xd3\xa5\xfd\xa9\xf1\xa4""U""\xa7\xda\xaa\xba",
+ "\xa6""A""\xbb\xa1\xa1""C"
+};
+
+static const StringListProvider k1WispJewelStringsDOSChineseTradProvider = { ARRAYSIZE(k1WispJewelStringsDOSChineseTrad), k1WispJewelStringsDOSChineseTrad };
+
+static const char *const k1MagicJewelStringsDOSChineseTrad[1] = {
+ "\xb3""o""\xad\xd3\xb7""P""\xc4\xb1\xaf""u""\xa9""_""\xa9\xc7\xa1""C"
+};
+
+static const StringListProvider k1MagicJewelStringsDOSChineseTradProvider = { ARRAYSIZE(k1MagicJewelStringsDOSChineseTrad), k1MagicJewelStringsDOSChineseTrad };
+
+static const char *const k1FlaskFullStringDOSChineseTrad[1] = {
+ "\xb3""o""\xad\xd3\xb2""~""\xa4""l""\xa4""w""\xb8""g""\xb8\xcb\xba\xa1\xa4""F""\xa1""C"
+};
+
+static const StringListProvider k1FlaskFullStringDOSChineseTradProvider = { ARRAYSIZE(k1FlaskFullStringDOSChineseTrad), k1FlaskFullStringDOSChineseTrad };
+
+static const char *const k1FullFlaskStringDOSChineseTrad[4] = {
+ "\xb3""o""\xad\xd3\xb2""~""\xa4""l""\xb8\xcb\xba\xa1\xa4""F""\xb7""s""\xc2""A""\xaa\xba\xa4\xf4\xa1""A""\xa6\xd3\xa5""B""\xb0""{""\xc4\xa3\xb5\xdb\xa5\xfa\xa8""~""\xa1""C",
+ "\xb3""o""\xad\xd3\xb2""~""\xa4""l""\xb8\xcb\xba\xa1\xa4""F""\xc6""Q""\xa4\xf4\xa1""C",
+ "\xb3""o""\xad\xd3\xb2""~""\xa4""l""\xb8\xcb\xba\xa1\xa4""F""\xc4""q""\xac""u""\xa4\xf4\xa1""C",
+ "\xc5""]""\xaa""k""\xa4\xf4\xa1""C"
+};
+
+static const StringListProvider k1FullFlaskStringDOSChineseTradProvider = { ARRAYSIZE(k1FullFlaskStringDOSChineseTrad), k1FullFlaskStringDOSChineseTrad };
+
+static const char *const k1OutroHomeStringDOSChineseTrad[1] = {
+ "\xa5\xac\xc4\xf5\xb5""n""\xae""a""\xb8\xcc"
+};
+
+static const StringListProvider k1OutroHomeStringDOSChineseTradProvider = { ARRAYSIZE(k1OutroHomeStringDOSChineseTrad), k1OutroHomeStringDOSChineseTrad };
+
+static const char *const k1VeryCleverStringDOSChineseTrad[1] = {
+ "\xab\xdc\xc1""o""\xa9\xfa\xa1""I""\xa6\xfd\xac""O""\xa7""A""\xb3""o""\xa8\xc7\xb5\xea\xae""z""\xaa\xba\xa7""V""\xa4""O""\xb3\xa3\xac""O""\xae""{""\xb3\xd2\xb5""L""\xa5\xa1""C",
+};
+
+static const StringListProvider k1VeryCleverStringDOSChineseTradProvider = { ARRAYSIZE(k1VeryCleverStringDOSChineseTrad), k1VeryCleverStringDOSChineseTrad };
+
+static const char *const k1GUIStringsDOSChineseTrad[28] = {
+ "\xb3\xcd"" ""\xc4\xf5"" ""\xad""} ""\xa8\xc8"" ""\xb6\xc7"" ""\xa9""_",
+ "\xa8\xfa\xa6""^""\xb9""C""\xc0\xb8\xb6""i""\xab\xd7",
+ "\xc0""x""\xa6""s""\xb9""C""\xc0\xb8\xb6""i""\xab\xd7",
+ "\xbd\xd5\xbe\xe3\xb9""C""\xc0\xb8\xb0\xd1\xbc\xc6",
+ "\xc2\xf7"" ""\xb6""} ""\xb9""C ""\xc0\xb8",
+ "\xa6""^""\xa8\xec\xb9""C""\xc0\xb8",
+ "\xbd\xd5\xbe\xe3\xb9""C""\xc0\xb8\xb0\xd1\xbc\xc6",
+ "\xa8\xfa"" ""\xa6""^ ""\xb9""C ""\xc0\xb8"" ""\xb6""i ""\xab\xd7",
+ "\xbf\xef"" ""\xbe\xdc"" ""\xa6""s ""\xa9\xf1"" ""\xc4\xe6"" ""\xa6\xec"" ""\xa1""G",
+ "[ ""\xaa\xc5"" ""\xa5\xd5"" ""\xc4\xe6"" ""\xa6\xec"" ]",
+ "\xa8\xfa"" ""\xae\xf8",
+ "\xbd\xd0\xbf\xe9\xa4""J""\xa5\xd8\xab""e""\xb6""i""\xab\xd7\xaa\xba\xbb\xa1\xa9\xfa\xa1""G",
+ "\xc0""x ""\xa6""s",
+ "\xa6""w""\xae\xa7\xa7""a""\xa1""A""\xa5\xac\xc4\xf5\xb5""n""\xa1""I",
+ "\xbd""T""\xa9""w""\xc2\xf7\xb6""}""\xb9""C""\xc0\xb8\xb6\xdc\xa1""H",
+ "XXX",
+ "XXX",
+ "XXXXXXX",
+ "XXXXXXXXX",
+ "\xa6""^""\xa5""D""\xbf\xef\xb3\xe6",
+ "\xa6\xb3",
+ "\xb5""L",
+ "\xac""O",
+ "\xa7""_",
+ "123456789012345678901234567890123456""\xa6\xe6\xa8\xab\xb3""t""\xab\xd7",
+ "\xb0""T""\xae\xa7\xb3""t""\xab\xd7",
+ "\xad\xb5\xa1""@""\xa1""@""\xbc\xd6",
+ "\xad\xb5\xa1""@""\xa1""@""\xae\xc4"
+};
+
+static const StringListProvider k1GUIStringsDOSChineseTradProvider = { ARRAYSIZE(k1GUIStringsDOSChineseTrad), k1GUIStringsDOSChineseTrad };
+
+static const char *const k1NewGameStringDOSChineseTrad[1] = {
+ "[ ""\xad\xab\xb7""s""\xb6""}""\xa9""l""\xb9""C""\xc0\xb8"" ]"
+};
+
+static const StringListProvider k1NewGameStringDOSChineseTradProvider = { ARRAYSIZE(k1NewGameStringDOSChineseTrad), k1NewGameStringDOSChineseTrad };
+
+static const char *const k1ConfigStringsDOSChineseTrad[9] = {
+ "\xb3\xcc\xba""C",
+ " ""\xba""C ",
+ "\xa5\xbf\xb1""`",
+ " ""\xa7\xd6"" ",
+ "\xb3\xcc\xa7\xd6",
+ " ""\xb3\xcc\xba""C ",
+ " ""\xa5\xbf\xb1""` ",
+ "\xa1""@""\xa7\xd6\xa1""@",
+ "\xa5""i""\xb1\xb1\xa8\xee"
+};
+
+static const StringListProvider k1ConfigStringsDOSChineseTradProvider = { ARRAYSIZE(k1ConfigStringsDOSChineseTrad), k1ConfigStringsDOSChineseTrad };
+
+static const uint16 k1TwoByteFontLookupTableDOSChineseTrad[] = {
+ 0xcdb3, 0xf5c4, 0x7dad, 0xc8a8, 0xc7b6, 0xa1bb, 0x5fa9, 0xfaa8,
+ 0x5ea6, 0x43b9, 0xb8c0, 0x69b6, 0xd7ab, 0x78c0, 0x73a6, 0xd5bd,
+ 0xe3be, 0xd1b0, 0xc6bc, 0xf7c2, 0x7db6, 0xeca8, 0xefbf, 0xdcbe,
+ 0xf1a9, 0xe6c4, 0xeca6, 0x47a1, 0xabad, 0x73b7, 0x6ca9, 0xc5aa,
+ 0xd5a5, 0xf8ae, 0xd0bd, 0xe9bf, 0x4aa4, 0xd8a5, 0x65ab, 0xbaaa,
+ 0xfaa9, 0x77a6, 0xa7ae, 0x61a7, 0x41a1, 0xaca5, 0x6eb5, 0x49a1,
+ 0x54bd, 0x77a9, 0xdcb6, 0x48a1, 0xe6b3, 0x44a5, 0xb3a6, 0x4cb5,
+ 0x4fac, 0x5fa7, 0xccb3, 0x43ba, 0xbfa5, 0x60b1, 0xd6a7, 0x40a1,
+ 0x69a5, 0xb1b1, 0xeea8, 0xe6a6, 0xaba8, 0x74b3, 0x54b0, 0xb5ad,
+ 0xd6bc, 0xc4ae, 0xa5c5, 0x5fb0, 0xd3a8, 0xa3a4, 0xe7ab, 0xf2bb,
+ 0xcbbc, 0x43a1, 0xe1ab, 0x40a4, 0xd3ad,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, 0x79a6, 0x55be, 0xe3ac,
+ 0x73a8, 0xefa7, 0x68b7, 0xccbd, 0x63ae, 0xc8a9, 0xa5b3, 0xb4bb,
+ 0x50be, 0xc5a8, 0x54b9, 0xeeb6, 0xcfa4, 0xd0b3, 0x46c6, 0x73c0,
+ 0xfaa4, 0xa6be, 0xeaa8, 0xaeb0, 0x62b2, 0xdfbf, 0x4dc3, 0xbda6,
+ 0xd9a6, 0xfac1, 0x42a8, 0x52a5, 0x4ba8, 0xb4a7, 0x43a6, 0xc9c1,
+ 0xf6ac, 0xc0a9, 0x49ad, 0x78ad, 0xabba, 0xe2b0, 0xcfb4, 0x4ac0,
+ 0xd1ad, 0xcebc, 0x71aa, 0xe0b3, 0xbec2, 0x7eb7, 0xc1b3, 0xb0b5,
+ 0x56bf, 0xbba7, 0xb6b0, 0x4fbb, 0x55b4, 0xaba4, 0xb1c3, 0x59aa,
+ 0x61ba, 0xb7b0, 0x64b1, 0xc7af, 0x60c1, 0xb4a4, 0xacc3, 0xe2ae,
+ 0xfebe, 0x73a7, 0xc8b4, 0xfba6, 0xcab6, 0xc9ad, 0x68ae, 0x5cb0,
+ 0xa8b3, 0x60ad, 0xb6bd, 0xd0dc, 0xe4bc, 0xc5b7, 0x78b7, 0xf4ab,
+ 0x58b3, 0xe5a4, 0x54aa, 0x57bc, 0x5fbe, 0x50ad, 0xb6ba, 0xa7b4,
+ 0xf9bb, 0x63a5, 0xcec2, 0xaea7, 0x6fc4, 0xeab6, 0xcaa5, 0xc7a4,
+ 0x79b5, 0x4cb7, 0xcfb9, 0x79b9, 0xbab6, 0x6db5, 0x7ba8, 0x7dba,
+ 0x7db5, 0x7daf, 0x7db8, 0xaea1, 0xbab9, 0xd7a1, 0x7bc1, 0x4bb1,
+ 0x69aa, 0xbdc2, 0xadad, 0x4ca6, 0x7dab, 0xb2a2
+};
+
+static const Uint16Provider k1TwoByteFontLookupTableDOSChineseTradProvider = { ARRAYSIZE(k1TwoByteFontLookupTableDOSChineseTrad), k1TwoByteFontLookupTableDOSChineseTrad };
+
+static const uint8 k1TwoByteDummyGlyphDOSChineseTrad[] = {
+ 0xff, 0xfe, 0x80, 0x02, 0xa2, 0xfa, 0xb2, 0x8a,
+ 0xaa, 0x8a, 0xa6, 0x8a, 0xa2, 0xfa, 0x80, 0x02,
+ 0xbb, 0xba, 0xaa, 0x92, 0xbb, 0x92, 0xa2, 0x92,
+ 0x80, 0x02, 0xff, 0xfe
+};
+
+static const ByteProvider k1TwoByteDummyGlyphDOSChineseTradProvider = { ARRAYSIZE(k1TwoByteDummyGlyphDOSChineseTrad), k1TwoByteDummyGlyphDOSChineseTrad };
diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat
index cba2622671..cff7303289 100644
Binary files a/dists/engine-data/kyra.dat and b/dists/engine-data/kyra.dat differ
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index 9ab4049b10..3dafe45edb 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -247,11 +247,11 @@ const KYRAGameDescription adGameDescs[] = {
{ // from trembyle
{
"kyra1",
- msg_missingLangResources, // Reason for being unsupported
+ "Extracted",
AD_ENTRY1("GEMCUT.EMC", "3f319d6908830a46ff42229a39a2c7ec"),
Common::ZH_TWN,
Common::kPlatformDOS,
- ADGF_UNSUPPORTED,
+ ADGF_NO_FLAGS,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
KYRA1_FLOPPY_FLAGS
diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp
index 45914d2240..939f15fc33 100644
--- a/engines/kyra/graphics/screen.cpp
+++ b/engines/kyra/graphics/screen.cpp
@@ -3915,7 +3915,12 @@ void ChineseFont::drawChar(uint16 c, byte *dst, int pitch, int) const {
}
void ChineseOneByteFontLoK::processColorMap() {
-
+ if (_textColor[0] == 12) {
+ _prvBorder = _border;
+ _border = false;
+ } else {
+ _border = _prvBorder;
+ }
}
bool ChineseTwoByteFontLoK::hasGlyphForCharacter(uint16 c) const {
diff --git a/engines/kyra/graphics/screen.h b/engines/kyra/graphics/screen.h
index 9d479593ac..854fad9782 100644
--- a/engines/kyra/graphics/screen.h
+++ b/engines/kyra/graphics/screen.h
@@ -272,6 +272,7 @@ public:
protected:
uint16 _textColor[2];
const uint8 *_colorMap;
+ bool _border;
private:
virtual bool hasGlyphForCharacter(uint16 c) const = 0;
@@ -285,12 +286,11 @@ private:
const uint8 *_glyphData;
uint32 _glyphDataSize;
const uint16 _pitch;
- bool _border;
};
class ChineseOneByteFontLoK : public ChineseFont {
public:
- ChineseOneByteFontLoK(int pitch) : ChineseFont(pitch, 7, 14, 9, 14, 0, 2) {}
+ ChineseOneByteFontLoK(int pitch) : ChineseFont(pitch, 7, 14, 9, 14, 0, 2), _prvBorder(false) {}
~ChineseOneByteFontLoK() override {}
Type getType() const override { return kBIG5; }
@@ -298,11 +298,13 @@ private:
bool hasGlyphForCharacter(uint16 c) const override { return !(c & 0x80); }
uint32 getFontOffset(uint16 c) const override { return (c & 0x7F) * 14; }
void processColorMap() override;
+
+ bool _prvBorder;
};
class ChineseTwoByteFontLoK : public ChineseFont {
public:
- ChineseTwoByteFontLoK(int pitch, const uint16 *lookupTable) : ChineseFont(pitch, 15, 14, 18, 14, 0, 2), _lookupTable(lookupTable) {}
+ ChineseTwoByteFontLoK(int pitch, const uint16 *lookupTable) : ChineseFont(pitch, 15, 14, 18, 14, 0, 2), _lookupTable(lookupTable), _prvBorder(false) {}
~ChineseTwoByteFontLoK() override {}
Type getType() const override { return kBIG5; }
@@ -312,6 +314,7 @@ private:
void processColorMap() override;
const uint16 *_lookupTable;
+ bool _prvBorder;
};
class ChineseOneByteFontMR : public ChineseFont {
diff --git a/engines/kyra/resource/resource.h b/engines/kyra/resource/resource.h
index b51d50ffc9..7edd76ff21 100644
--- a/engines/kyra/resource/resource.h
+++ b/engines/kyra/resource/resource.h
@@ -227,6 +227,9 @@ enum KyraResources {
k1AmigaIntroSFXTable,
k1AmigaGameSFXTable,
+ k1TwoByteFontLookupTable,
+ k1TwoByteDummyGlyph,
+
k2SeqplayPakFiles,
k2SeqplayCredits,
k2SeqplayCreditsSpecial,
diff --git a/engines/kyra/resource/staticres.cpp b/engines/kyra/resource/staticres.cpp
index 29d47ac544..57cd3e5a7f 100644
--- a/engines/kyra/resource/staticres.cpp
+++ b/engines/kyra/resource/staticres.cpp
@@ -39,7 +39,7 @@
namespace Kyra {
-#define RESFILE_VERSION 111
+#define RESFILE_VERSION 112
namespace {
bool checkKyraDat(Common::SeekableReadStream *file) {
Commit: f0255f3fe202ec6cdca87d901bf76584775861ab
https://github.com/scummvm/scummvm/commit/f0255f3fe202ec6cdca87d901bf76584775861ab
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-15T01:01:16+01:00
Commit Message:
KYRA: (FM-Towns) - fix minor font glitch
Changed paths:
engines/kyra/graphics/screen.cpp
engines/kyra/graphics/screen.h
engines/kyra/graphics/screen_eob.h
engines/kyra/graphics/screen_eob_towns.cpp
diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp
index 939f15fc33..8b25e86dd5 100644
--- a/engines/kyra/graphics/screen.cpp
+++ b/engines/kyra/graphics/screen.cpp
@@ -3802,24 +3802,21 @@ void AMIGAFont::unload() {
SJISFont::SJISFont(Common::SharedPtr<Graphics::FontSJIS> &font, const uint8 invisColor, bool is16Color, bool drawOutline, int extraSpacing)
: _colorMap(nullptr), _font(font), _invisColor(invisColor), _isTextMode(is16Color), _style(kStyleNone), _drawOutline(drawOutline), _sjisWidthOffset(extraSpacing) {
assert(_font);
- _sjisWidth = _font->getMaxFontWidth() >> 1;
- _fontHeight = _font->getFontHeight() >> 1;
- _asciiWidth = _font->getCharWidth('a') >> 1;
}
int SJISFont::getHeight() const {
- return _fontHeight;
+ return _font->getFontHeight() >> 1;
}
int SJISFont::getWidth() const {
- return _sjisWidth + _sjisWidthOffset;
+ return (_font->getMaxFontWidth() >> 1) + _sjisWidthOffset;
}
int SJISFont::getCharWidth(uint16 c) const {
if (c <= 0x7F || (c >= 0xA1 && c <= 0xDF))
- return _asciiWidth;
+ return _font->getCharWidth('a') >> 1;
else
- return _sjisWidth + _sjisWidthOffset;
+ return getWidth();
}
void SJISFont::setColorMap(const uint8 *src) {
diff --git a/engines/kyra/graphics/screen.h b/engines/kyra/graphics/screen.h
index 854fad9782..098b58cde4 100644
--- a/engines/kyra/graphics/screen.h
+++ b/engines/kyra/graphics/screen.h
@@ -240,8 +240,6 @@ public:
protected:
const uint8 *_colorMap;
Common::SharedPtr<Graphics::FontSJIS> _font;
- int _sjisWidth, _asciiWidth;
- int _fontHeight;
const bool _drawOutline;
int _style;
diff --git a/engines/kyra/graphics/screen_eob.h b/engines/kyra/graphics/screen_eob.h
index 5f6ab1bd93..c0b87d9243 100644
--- a/engines/kyra/graphics/screen_eob.h
+++ b/engines/kyra/graphics/screen_eob.h
@@ -381,6 +381,10 @@ public:
SJISFontLarge(Common::SharedPtr<Graphics::FontSJIS> &font);
~SJISFontLarge() override {}
+ int getHeight() const override;
+ int getWidth() const override;
+ int getCharWidth(uint16 c) const override;
+
bool usesOverlay() const override { return false; }
void drawChar(uint16 c, byte *dst, int pitch, int) const override;
};
diff --git a/engines/kyra/graphics/screen_eob_towns.cpp b/engines/kyra/graphics/screen_eob_towns.cpp
index ce2bbe19e8..a2e9a03c47 100644
--- a/engines/kyra/graphics/screen_eob_towns.cpp
+++ b/engines/kyra/graphics/screen_eob_towns.cpp
@@ -97,9 +97,21 @@ void Screen_EoB::shadeRect(int x1, int y1, int x2, int y2, int shadingLevel) {
}
SJISFontLarge::SJISFontLarge(Common::SharedPtr<Graphics::FontSJIS> &font) : SJISFont(font, 0, false, false, 0) {
- _sjisWidth = _font->getMaxFontWidth();
- _fontHeight = _font->getFontHeight();
- _asciiWidth = _font->getCharWidth('a');
+}
+
+int SJISFontLarge::getHeight() const {
+ return _font->getFontHeight();
+}
+
+int SJISFontLarge::getWidth() const {
+ return _font->getMaxFontWidth();
+}
+
+int SJISFontLarge::getCharWidth(uint16 c) const {
+ if (c <= 0x7F || (c >= 0xA1 && c <= 0xDF))
+ return _font->getCharWidth('a');
+ else
+ return getWidth();
}
void SJISFontLarge::drawChar(uint16 c, byte *dst, int pitch, int) const {
Commit: a7fda28519da6107908e2df43ea0d903d3a1e1db
https://github.com/scummvm/scummvm/commit/a7fda28519da6107908e2df43ea0d903d3a1e1db
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-15T01:01:25+01:00
Commit Message:
KYRA: (LoK/Traditional Chinese) - finish support
(add font drawing, gui and text formatting fixes etc.)
Changed paths:
engines/kyra/engine/kyra_lok.cpp
engines/kyra/engine/kyra_lok.h
engines/kyra/graphics/screen.cpp
engines/kyra/graphics/screen.h
engines/kyra/graphics/screen_lok.cpp
engines/kyra/gui/gui_lok.cpp
engines/kyra/resource/staticres.cpp
engines/kyra/script/script_lok.cpp
engines/kyra/sequence/seqplayer_lok.cpp
engines/kyra/sequence/sequences_lok.cpp
engines/kyra/text/text.cpp
engines/kyra/text/text_lok.cpp
diff --git a/engines/kyra/engine/kyra_lok.cpp b/engines/kyra/engine/kyra_lok.cpp
index 56989a6abb..4c90e67657 100644
--- a/engines/kyra/engine/kyra_lok.cpp
+++ b/engines/kyra/engine/kyra_lok.cpp
@@ -96,6 +96,8 @@ KyraEngine_LoK::KyraEngine_LoK(OSystem *system, const GameFlags &flags)
_malcolmFrame = 0;
_malcolmTimer1 = _malcolmTimer2 = 0;
+ _defaultFont = (_flags.lang == Common::ZH_TWN) ? Screen::FID_CHINESE_FNT : ((_flags.lang == Common::JA_JPN) ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
+ _defaultLineSpacing = (_flags.lang == Common::ZH_TWN) ? 2 : 0;
}
KyraEngine_LoK::~KyraEngine_LoK() {
@@ -299,7 +301,14 @@ Common::Error KyraEngine_LoK::go() {
_screen->loadFont(Screen::FID_6_FNT, "6.FNT");
_screen->loadFont(Screen::FID_8_FNT, "8FAT.FNT");
- _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
+ if (_flags.lang == Common::ZH_TWN) {
+ _screen->loadFont(Screen::FID_CHINESE_FNT, "ASCII.FNT");
+ _screen->loadFont(Screen::FID_CHINESE_FNT, "KYRANDIA.FNT");
+ _screen->setTextMarginRight(312);
+ }
+
+ _screen->setFont(_defaultFont);
+ _screen->_lineSpacing = _defaultLineSpacing;
_screen->setScreenDim(0);
@@ -348,7 +357,6 @@ void KyraEngine_LoK::startup() {
else
_sound->loadSoundFile(0);
-// _screen->setFont(Screen::FID_6_FNT);
_screen->setAnimBlockPtr(3750);
memset(_sceneAnimTable, 0, sizeof(_sceneAnimTable));
loadMouseShapes();
@@ -421,7 +429,8 @@ void KyraEngine_LoK::startup() {
saveGameStateIntern(0, "New game", nullptr);
}
} else {
- _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
+ _screen->setFont(_defaultFont);;
+ _screen->_lineSpacing = _defaultLineSpacing;
loadGameStateCheck(_gameToLoad);
_gameToLoad = -1;
}
diff --git a/engines/kyra/engine/kyra_lok.h b/engines/kyra/engine/kyra_lok.h
index c44d753d62..ec8698034e 100644
--- a/engines/kyra/engine/kyra_lok.h
+++ b/engines/kyra/engine/kyra_lok.h
@@ -480,6 +480,9 @@ protected:
uint8 _configTextspeed;
+ Screen::FontId _defaultFont;
+ int _defaultLineSpacing;
+
Animator_LoK *_animator;
SeqPlayer *_seq;
Sprites *_sprites;
diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp
index 8b25e86dd5..6cdf1dbbdf 100644
--- a/engines/kyra/graphics/screen.cpp
+++ b/engines/kyra/graphics/screen.cpp
@@ -1341,11 +1341,15 @@ bool Screen::loadFont(FontId fontId, const char *filename) {
fnt = new AMIGAFont();
} else if (fontId == FID_CHINESE_FNT) {
Common::Array<Font*> *fa = new Common::Array<Font*>;
- fa->push_back(new ChineseOneByteFontMR(SCREEN_W));
- fa->push_back(new ChineseTwoByteFontMR(SCREEN_W));
- fnt = new MultiSubsetFont(fa);
-
- if (_vm->game() == GI_KYRA3) {
+ if (_vm->game() == GI_KYRA1) {
+ const uint16 *lookupTable = _vm->staticres()->loadRawDataBe16(k1TwoByteFontLookupTable, temp);
+ fa->push_back(new ChineseOneByteFontLoK(SCREEN_W));
+ fa->push_back(new ChineseTwoByteFontLoK(SCREEN_W, lookupTable, temp));
+ fnt = new MultiSubsetFont(fa);
+ } else if (_vm->game() == GI_KYRA3) {
+ fa->push_back(new ChineseOneByteFontMR(SCREEN_W));
+ fa->push_back(new ChineseTwoByteFontMR(SCREEN_W));
+ fnt = new MultiSubsetFont(fa);
const uint8 *oneByteData = _vm->staticres()->loadRawData(k3FontData, temp);
Common::MemoryReadStream str(oneByteData, temp);
fnt->load(str);
@@ -3847,7 +3851,7 @@ void SJISFont::drawChar(uint16 c, byte *dst, int pitch, int) const {
ChineseFont::ChineseFont(int pitch, int renderWidth, int renderHeight, int spacingWidth, int spacingHeight, int extraSpacingWidth, int extraSpacingHeight) : Font(),
_renderWidth(renderWidth), _renderHeight(renderHeight), _spacingWidth(spacingWidth), _spacingHeight(spacingHeight), _pitch(pitch), _border(false),
- _borderExtraSpacingWidth(extraSpacingWidth), _borderExtraSpacingHeight(extraSpacingHeight), _glyphData(0), _glyphDataSize(0) {
+ _borderExtraSpacingWidth(extraSpacingWidth), _borderExtraSpacingHeight(extraSpacingHeight), _glyphData(0), _glyphDataSize(0), _pixelColorShading(true) {
}
ChineseFont::~ChineseFont() {
@@ -3901,8 +3905,12 @@ void ChineseFont::drawChar(uint16 c, byte *dst, int pitch, int) const {
in = *data++;
bt = 7;
}
- if (in & (1 << (bt--)))
- *(uint16*)dst = _textColor[i[2]];
+ if (in & (1 << (bt--))) {
+ if (_pixelColorShading)
+ *(uint16*)dst = _textColor[i[2]];
+ else
+ *dst = _textColor[i[2]] & 0xff;
+ }
dst++;
}
dst = dst2 + _pitch;
@@ -3911,27 +3919,6 @@ void ChineseFont::drawChar(uint16 c, byte *dst, int pitch, int) const {
}
}
-void ChineseOneByteFontLoK::processColorMap() {
- if (_textColor[0] == 12) {
- _prvBorder = _border;
- _border = false;
- } else {
- _border = _prvBorder;
- }
-}
-
-bool ChineseTwoByteFontLoK::hasGlyphForCharacter(uint16 c) const {
- return false;
-}
-
-uint32 ChineseTwoByteFontLoK::getFontOffset(uint16 c) const {
- return 0;
-}
-
-void ChineseTwoByteFontLoK::processColorMap() {
-
-}
-
MultiSubsetFont::~MultiSubsetFont() {
for (Common::Array<Font*>::const_iterator i = _subsets->begin(); i != _subsets->end(); ++i)
delete (*i);
diff --git a/engines/kyra/graphics/screen.h b/engines/kyra/graphics/screen.h
index 098b58cde4..f35d1c27bf 100644
--- a/engines/kyra/graphics/screen.h
+++ b/engines/kyra/graphics/screen.h
@@ -269,6 +269,7 @@ public:
protected:
uint16 _textColor[2];
+ bool _pixelColorShading;
const uint8 *_colorMap;
bool _border;
@@ -286,9 +287,9 @@ private:
const uint16 _pitch;
};
-class ChineseOneByteFontLoK : public ChineseFont {
+class ChineseOneByteFontLoK final : public ChineseFont {
public:
- ChineseOneByteFontLoK(int pitch) : ChineseFont(pitch, 7, 14, 9, 14, 0, 2), _prvBorder(false) {}
+ ChineseOneByteFontLoK(int pitch);
~ChineseOneByteFontLoK() override {}
Type getType() const override { return kBIG5; }
@@ -296,13 +297,11 @@ private:
bool hasGlyphForCharacter(uint16 c) const override { return !(c & 0x80); }
uint32 getFontOffset(uint16 c) const override { return (c & 0x7F) * 14; }
void processColorMap() override;
-
- bool _prvBorder;
};
-class ChineseTwoByteFontLoK : public ChineseFont {
+class ChineseTwoByteFontLoK final : public ChineseFont {
public:
- ChineseTwoByteFontLoK(int pitch, const uint16 *lookupTable) : ChineseFont(pitch, 15, 14, 18, 14, 0, 2), _lookupTable(lookupTable), _prvBorder(false) {}
+ ChineseTwoByteFontLoK(int pitch, const uint16 *lookupTable, uint32 lookupTableSize);
~ChineseTwoByteFontLoK() override {}
Type getType() const override { return kBIG5; }
@@ -312,10 +311,10 @@ private:
void processColorMap() override;
const uint16 *_lookupTable;
- bool _prvBorder;
+ uint32 _lookupTableSize;
};
-class ChineseOneByteFontMR : public ChineseFont {
+class ChineseOneByteFontMR final : public ChineseFont {
public:
ChineseOneByteFontMR(int pitch) : ChineseFont(pitch, 7, 14, 9, 14, 0, 2) {}
~ChineseOneByteFontMR() override {}
@@ -327,7 +326,7 @@ private:
void processColorMap() override;
};
-class ChineseTwoByteFontMR : public ChineseFont {
+class ChineseTwoByteFontMR final : public ChineseFont {
public:
ChineseTwoByteFontMR(int pitch) : ChineseFont(pitch, 15, 14, 18, 14, 0, 2) {}
~ChineseTwoByteFontMR() override {}
@@ -339,12 +338,17 @@ private:
void processColorMap() override;
};
-class MultiSubsetFont : public Font {
+class MultiSubsetFont final : public Font {
public:
MultiSubsetFont(Common::Array<Font*> *subsets) : Font(), _subsets(subsets) {}
~MultiSubsetFont() override;
Type getType() const override { return kBIG5; }
+ // Caveat: This method will try to load a font into the first subset slot it finds.
+ // It expects the load method of the subset font to return false if the slot has
+ // already been filled. It will then try the next slot. So, unlike other fonts the
+ // subset fonts cannot be allowed to call the load method as often as they want
+ // (which we never did anyway - we only ever load each font exactly one time).
bool load(Common::SeekableReadStream &data) override;
void setStyles(int styles) override;
@@ -358,25 +362,6 @@ private:
Common::Array<Font*> *_subsets;
};
-/*
-class ChineseFont : public Font {
-public:
- ChineseFont(const uint8 *oneByteData, int pitch);
- ~ChineseFont() override;
-
-
-
-
-
- int getCharWidth(uint16 c) const override;
- void setColorMap(const uint8 *src) override;
- void setStyles(int styles) override { _border = (styles & kStyleBorder); }
- void drawChar(uint16 c, byte *dst, int pitch, int) const override;
-
-private:
-
-};*/
-
/**
* A class that manages KYRA palettes.
*
diff --git a/engines/kyra/graphics/screen_lok.cpp b/engines/kyra/graphics/screen_lok.cpp
index 5fe81eab55..4e2ae34bdd 100644
--- a/engines/kyra/graphics/screen_lok.cpp
+++ b/engines/kyra/graphics/screen_lok.cpp
@@ -484,4 +484,54 @@ void Screen_LoK_16::set16ColorPalette(const uint8 *pal) {
_system->getPaletteManager()->setPalette(palette, 0, 16);
}
+ChineseOneByteFontLoK::ChineseOneByteFontLoK(int pitch) : ChineseFont(pitch, 8, 14, 9, 17, 0, 0) {
+ _border = _pixelColorShading = false;
+}
+
+void ChineseOneByteFontLoK::processColorMap() {
+ _textColor[0] = _colorMap[1];
+ _textColor[1] = _colorMap[0];
+}
+
+ChineseTwoByteFontLoK::ChineseTwoByteFontLoK(int pitch, const uint16 *lookupTable, uint32 lookupTableSize) : ChineseFont(pitch, 15, 14, 18, 17, 0, 0),
+_lookupTable(lookupTable), _lookupTableSize(lookupTableSize) {
+ assert(lookupTable);
+}
+
+bool ChineseTwoByteFontLoK::hasGlyphForCharacter(uint16 c) const {
+ for (uint32 i = 0; i < _lookupTableSize; ++i) {
+ if (_lookupTable[i] == c)
+ return true;
+ }
+ return false;
+}
+
+uint32 ChineseTwoByteFontLoK::getFontOffset(uint16 c) const {
+ for (uint32 i = 0; i < _lookupTableSize; ++i) {
+ if (_lookupTable[i] == c)
+ return i * 28;
+ }
+ return 0;
+}
+
+void ChineseTwoByteFontLoK::processColorMap() {
+ _border = (_colorMap[0] == 12);
+ uint8 cs = _colorMap[1];
+
+ if (_colorMap[1] == 9)
+ cs = 83;
+ else if (_colorMap[1] == 5)
+ cs = 207;
+ else if (_colorMap[1] == 2)
+ cs = 74;
+ else if (_colorMap[1] == 15)
+ cs = 161;
+ else if (_colorMap[1] > 15 && _colorMap[1] < 248)
+ cs += 1;
+
+ _textColor[0] = _colorMap[1] | (cs << 8);
+ _textColor[0] = TO_LE_16(_textColor[0]);
+ _textColor[1] = _colorMap[0] | (_colorMap[0] << 8);
+}
+
} // End of namespace Kyra
diff --git a/engines/kyra/gui/gui_lok.cpp b/engines/kyra/gui/gui_lok.cpp
index b144d3c3a9..d246c05782 100644
--- a/engines/kyra/gui/gui_lok.cpp
+++ b/engines/kyra/gui/gui_lok.cpp
@@ -687,12 +687,12 @@ int GUI_LoK::loadGameMenu(Button *button) {
}
void GUI_LoK::redrawTextfield() {
- _screen->fillRect(38, 91, 287, 102, _vm->gameFlags().platform == Common::kPlatformAmiga ? 18 : 250);
+ _screen->fillRect(38, 91, 287, _vm->gameFlags().lang == Common::ZH_TWN ? 107 : 102, _vm->gameFlags().platform == Common::kPlatformAmiga ? 18 : 250);
_text->printText(_savegameName, 38, 92, 253, 0, 0);
_screen->_charSpacing = -2;
int width = _screen->getTextWidth(_savegameName);
- _screen->fillRect(39 + width, 93, 45 + width, 100, _vm->gameFlags().platform == Common::kPlatformAmiga ? 31 : 254);
+ _screen->fillRect(39 + width, 93, 45 + width, _vm->gameFlags().lang == Common::ZH_TWN ? 105 : 100, _vm->gameFlags().platform == Common::kPlatformAmiga ? 31 : 254);
_screen->_charSpacing = 0;
_screen->updateScreen();
@@ -745,7 +745,7 @@ int GUI_LoK::saveGame(Button *button) {
_displaySubMenu = true;
_cancelSubMenu = false;
- Screen::FontId cf = _screen->setFont(Screen::FID_8_FNT);
+ Screen::FontId cf = _screen->setFont(_vm->gameFlags().lang == Common::ZH_TWN ? Screen::FID_CHINESE_FNT : Screen::FID_8_FNT);
if (_savegameOffset == 0 && _vm->_gameToLoad == 0) {
_savegameName[0] = 0;
@@ -763,7 +763,7 @@ int GUI_LoK::saveGame(Button *button) {
while (_displaySubMenu && !_vm->shouldQuit()) {
checkTextfieldInput();
- cf = _screen->setFont(Screen::FID_8_FNT);
+ cf = _screen->setFont(_vm->gameFlags().lang == Common::ZH_TWN ? Screen::FID_CHINESE_FNT : Screen::FID_8_FNT);
updateSavegameString();
_screen->setFont(cf);
processHighlights(_menu[3]);
diff --git a/engines/kyra/resource/staticres.cpp b/engines/kyra/resource/staticres.cpp
index 57cd3e5a7f..b18d1e3101 100644
--- a/engines/kyra/resource/staticres.cpp
+++ b/engines/kyra/resource/staticres.cpp
@@ -951,23 +951,15 @@ void KyraEngine_LoK::loadButtonShapes() {
void KyraEngine_LoK::loadMainScreen(int page) {
_screen->clearPage(page);
- if (((_flags.lang == Common::EN_ANY || _flags.lang == Common::RU_RUS) && !_flags.isTalkie && _flags.platform == Common::kPlatformDOS) || _flags.platform == Common::kPlatformAmiga)
- _screen->loadBitmap("MAIN15.CPS", page, page, &_screen->getPalette(0));
- else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN || (_flags.isTalkie && _flags.lang == Common::IT_ITA))
- _screen->loadBitmap("MAIN_ENG.CPS", page, page, nullptr);
- else if (_flags.lang == Common::FR_FRA || (_flags.lang == Common::ES_ESP && _flags.isTalkie) /* Spanish fan made over French CD version */ )
- _screen->loadBitmap("MAIN_FRE.CPS", page, page, nullptr);
- else if (_flags.lang == Common::DE_DEU)
- _screen->loadBitmap("MAIN_GER.CPS", page, page, nullptr);
- else if (_flags.lang == Common::ES_ESP)
- _screen->loadBitmap("MAIN_SPA.CPS", page, page, nullptr);
- else if (_flags.lang == Common::IT_ITA)
- _screen->loadBitmap("MAIN_ITA.CPS", page, page, nullptr);
- else if (_flags.lang == Common::RU_RUS)
- _screen->loadBitmap("MAIN_ENG.CPS", page, page, nullptr);
- else if (_flags.lang == Common::HE_ISR)
- _screen->loadBitmap("MAIN_HEB.CPS", page, page, nullptr);
- else
+ bool success = false;
+ static const char *pattern[] = { "15", "_ENG", "_FRE", "_GER", "_SPA", "_ITA", "_HEB", "" };
+ for (int i = 0; i < ARRAYSIZE(pattern) && !success; ++i) {
+ Common::String tryFile = Common::String::format("MAIN%s.CPS", pattern[i]);
+ if ((success = _res->exists(tryFile.c_str())))
+ _screen->loadBitmap(tryFile.c_str(), page, page, i == 0 ? &_screen->getPalette(0) : 0);
+ }
+
+ if (!success)
warning("no main graphics file found");
_screen->copyRegion(0, 0, 0, 0, 320, 200, page, 0, Screen::CR_NO_P_CHECK);
@@ -1127,52 +1119,68 @@ void GUI_LoK::initStaticResource() {
Button::Callback loadGameMenuFunctor = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::loadGameMenu);
Button::Callback cancelSubMenuFunctor = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::cancelSubMenu);
- GUI_V1_MENU(_menu[0], -1, -1, 0x100, 0x8B, 248, 249, 250, nullptr, 251, -1, 8, 0, 5, -1, -1, -1, -1);
- GUI_V1_MENU_ITEM(_menu[0].item[0], 1, 0, 0, 0, -1, -1, 0x1E, 0xDC, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[0].item[1], 1, 0, 0, 0, -1, -1, 0x2F, 0xDC, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[0].item[2], 1, 0, 0, 0, -1, -1, 0x40, 0xDC, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[0].item[3], 1, 0, 0, 0, -1, -1, 0x51, 0xDC, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[0].item[4], 1, 0, 0, 0, -1, 0, 0x6E, 0xDC, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
+ int menuItemYStart = _vm->gameFlags().lang == Common::ZH_TWN ? 27 : 30;
+ int menuItemYInc = _vm->gameFlags().lang == Common::ZH_TWN ? 20 : 17;
+ int menuItemHeight = _vm->gameFlags().lang == Common::ZH_TWN ? 19 : 15;
+
+ GUI_V1_MENU(_menu[0], -1, -1, 0x100, 0x8B, 248, 249, 250, 0, 251, -1, 8, 0, 5, -1, -1, -1, -1);
+ GUI_V1_MENU_ITEM(_menu[0].item[0], 1, 0, 0, 0, -1, -1, menuItemYStart, 0xDC, menuItemHeight, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[0].item[1], 1, 0, 0, 0, -1, -1, menuItemYStart + menuItemYInc, 0xDC, menuItemHeight, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[0].item[2], 1, 0, 0, 0, -1, -1, menuItemYStart + menuItemYInc * 2, 0xDC, menuItemHeight, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[0].item[3], 1, 0, 0, 0, -1, -1, menuItemYStart + menuItemYInc * 3, 0xDC, menuItemHeight, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[0].item[4], 1, 0, 0, 0, -1, 0, 0x6E, 0xDC, menuItemHeight, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
_menu[0].item[0].callback = loadGameMenuFunctor;
_menu[0].item[1].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::saveGameMenu);
_menu[0].item[2].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::gameControlsMenu);
_menu[0].item[3].callback = quitPlayingFunctor;
_menu[0].item[4].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::resumeGame);
- GUI_V1_MENU(_menu[1], -1, -1, 0x140, 0x38, 248, 249, 250, nullptr, 254, -1, 8, 0, 2, -1, -1, -1, -1);
- GUI_V1_MENU_ITEM(_menu[1].item[0], 1, 0, 0, 0, 0x18, 0, 0x1E, 0x48, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[1].item[1], 1, 0, 0, 0, 0xD8, 0, 0x1E, 0x48, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
+ GUI_V1_MENU(_menu[1], -1, -1, 0x140, 0x38, 248, 249, 250, 0, 254, -1, 8, 0, 2, -1, -1, -1, -1);
+ GUI_V1_MENU_ITEM(_menu[1].item[0], 1, 0, 0, 0, 0x18, 0, 0x1E, 0x48, menuItemHeight, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[1].item[1], 1, 0, 0, 0, 0xD8, 0, 0x1E, 0x48, menuItemHeight, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
_menu[1].item[0].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::quitConfirmYes);
_menu[1].item[1].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::quitConfirmNo);
- GUI_V1_MENU(_menu[2], -1, -1, 0x120, 0xA0, 248, 249, 250, nullptr, 251, -1, 8, 0, 6, 132, 22, 132, 124);
- GUI_V1_MENU_ITEM(_menu[2].item[0], 1, 0, 0, 0, -1, 255, 0x27, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[2].item[1], 1, 0, 0, 0, -1, 255, 0x38, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[2].item[2], 1, 0, 0, 0, -1, 255, 0x49, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[2].item[3], 1, 0, 0, 0, -1, 255, 0x5A, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[2].item[4], 1, 0, 0, 0, -1, 255, 0x6B, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[2].item[5], 1, 0, 0, 0, 0xB8, 0, 0x86, 0x58, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
+ menuItemYStart = _vm->gameFlags().lang == Common::ZH_TWN ? 40 : 39;
+ int labelYStart = _vm->gameFlags().lang == Common::ZH_TWN ? 5 : 8;
+
+ GUI_V1_MENU(_menu[2], -1, -1, 0x120, 0xA0, 248, 249, 250, 0, 251, -1, labelYStart, 0, 6, 132, 22, 132, 124);
+ GUI_V1_MENU_ITEM(_menu[2].item[0], 1, 0, 0, 0, -1, 255, menuItemYStart, 0x100, menuItemHeight, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[2].item[1], 1, 0, 0, 0, -1, 255, menuItemYStart + menuItemYInc, 0x100, menuItemHeight, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[2].item[2], 1, 0, 0, 0, -1, 255, menuItemYStart + menuItemYInc * 2, 0x100, menuItemHeight, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[2].item[3], 1, 0, 0, 0, -1, 255, menuItemYStart + menuItemYInc * 3, 0x100, menuItemHeight, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[2].item[4], 1, 0, 0, 0, -1, 255, menuItemYStart + menuItemYInc * 4, 0x100, menuItemHeight, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[2].item[5], 1, 0, 0, 0, 0xB8, 0, 0x86, 0x58, menuItemHeight, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
_menu[2].item[5].callback = cancelSubMenuFunctor;
- GUI_V1_MENU(_menu[3], -1, -1, 288, 67, 248, 249, 250, nullptr, 251, -1, 8, 0, 2, -1, -1, -1, -1);
- GUI_V1_MENU_ITEM(_menu[3].item[0], 1, 0, 0, 0, 24, 0, 44, 85, 15, 252, 253, -1, 255, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[3].item[1], 1, 0, 0, 0, 179, 0, 44, 85, 15, 252, 253, -1, 255, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
+ int menuHeight = _vm->gameFlags().lang == Common::ZH_TWN ? 80 : 67;
+ labelYStart = _vm->gameFlags().lang == Common::ZH_TWN ? 50 : 44;
+
+ GUI_V1_MENU(_menu[3], -1, -1, 288, menuHeight, 248, 249, 250, 0, 251, -1, 8, 0, 2, -1, -1, -1, -1);
+ GUI_V1_MENU_ITEM(_menu[3].item[0], 1, 0, 0, 0, 22/*24*/, 0, labelYStart, 88, menuItemHeight, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[3].item[1], 1, 0, 0, 0, 184/*179*/, 0, labelYStart, 88, menuItemHeight, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
_menu[3].item[0].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::savegameConfirm);
_menu[3].item[1].callback = cancelSubMenuFunctor;
- GUI_V1_MENU(_menu[4], -1, -1, 0xD0, 0x4C, 248, 249, 250, nullptr, 251, -1, 8, 0, 2, -1, -1, -1, -1);
- GUI_V1_MENU_ITEM(_menu[4].item[0], 1, 0, 0, 0, -1, -1, 0x1E, 0xB4, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
- GUI_V1_MENU_ITEM(_menu[4].item[1], 1, 0, 0, 0, -1, -1, 0x2F, 0xB4, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
+ menuItemYInc = _vm->gameFlags().lang == Common::ZH_TWN ? 21 : 17;
+
+ GUI_V1_MENU(_menu[4], -1, -1, 0xD0, 0x4C, 248, 249, 250, 0, 251, -1, 8, 0, 2, -1, -1, -1, -1);
+ GUI_V1_MENU_ITEM(_menu[4].item[0], 1, 0, 0, 0, -1, -1, 0x1E, 0xB4, menuItemHeight, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[4].item[1], 1, 0, 0, 0, -1, -1, 0x1E + menuItemYInc, 0xB4, menuItemHeight, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
_menu[4].item[0].callback = loadGameMenuFunctor;
_menu[4].item[1].callback = quitPlayingFunctor;
- GUI_V1_MENU(_menu[5], -1, -1, 0x130, 0x99, 248, 249, 250, nullptr, 251, -1, 8, 0, 6, -1, -1, -1, -1);
- GUI_V1_MENU_ITEM(_menu[5].item[0], 1, 0, 0, 0, 0xA5, 0, 0x1E, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, nullptr, 0x10, 0x20, 0, 0);
- GUI_V1_MENU_ITEM(_menu[5].item[1], 1, 0, 0, 0, 0xA5, 0, 0x2F, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, nullptr, 0x10, 0x31, 0, 0);
- GUI_V1_MENU_ITEM(_menu[5].item[2], 1, 0, 0, 0, 0xA5, 0, 0x40, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, nullptr, 0x10, 0x42, 0, 0);
- GUI_V1_MENU_ITEM(_menu[5].item[3], 1, 0, 0, 0, 0xA5, 0, 0x51, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, nullptr, 0x10, 0x53, 0, 0);
- GUI_V1_MENU_ITEM(_menu[5].item[4], 1, 0, 0, 0, 0xA5, 0, 0x62, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, nullptr, 0x10, 0x65, 0, 0);
- GUI_V1_MENU_ITEM(_menu[5].item[5], 1, 0, 0, 0, -1, 0, 0x7F, 0x6C, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, nullptr, 0, 0, 0, 0);
+ menuItemYStart = _vm->gameFlags().lang == Common::ZH_TWN ? 27 : 30;
+ menuItemYInc = _vm->gameFlags().lang == Common::ZH_TWN ? 20 : 17;
+ labelYStart = _vm->gameFlags().lang == Common::ZH_TWN ? 29 : 32;
+
+ GUI_V1_MENU(_menu[5], -1, -1, 0x130, 0x99, 248, 249, 250, 0, 251, -1, 8, 0, 6, -1, -1, -1, -1);
+ GUI_V1_MENU_ITEM(_menu[5].item[0], 1, 0, 0, 0, 0xA5, 0, menuItemYStart, 0x80, menuItemHeight, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, labelYStart, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[5].item[1], 1, 0, 0, 0, 0xA5, 0, menuItemYStart + menuItemYInc, 0x80, menuItemHeight, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, labelYStart + menuItemYInc, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[5].item[2], 1, 0, 0, 0, 0xA5, 0, menuItemYStart + menuItemYInc * 2, 0x80, menuItemHeight, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, labelYStart + menuItemYInc * 2, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[5].item[3], 1, 0, 0, 0, 0xA5, 0, menuItemYStart + menuItemYInc * 3, 0x80, menuItemHeight, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, labelYStart + menuItemYInc * 3, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[5].item[4], 1, 0, 0, 0, 0xA5, 0, menuItemYStart + menuItemYInc * 4, 0x80, menuItemHeight, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, 0x65, 0, 0);
+ GUI_V1_MENU_ITEM(_menu[5].item[5], 1, 0, 0, 0, -1, 0, 0x7F, 0x6C, menuItemHeight, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
_menu[5].item[0].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeMusic);
_menu[5].item[1].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeSounds);
_menu[5].item[2].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeWalk);
diff --git a/engines/kyra/script/script_lok.cpp b/engines/kyra/script/script_lok.cpp
index 3e5e0a51d8..a1afb34e1f 100644
--- a/engines/kyra/script/script_lok.cpp
+++ b/engines/kyra/script/script_lok.cpp
@@ -1043,7 +1043,7 @@ int KyraEngine_LoK::o1_specialEventDisplayBrynnsNote(EMCState *script) {
_screen->updateScreen();
_screen->showMouse();
- if (_flags.platform != Common::kPlatformAmiga && !_flags.isTalkie && _flags.lang != Common::JA_JPN)
+ if (_flags.platform != Common::kPlatformAmiga && !_flags.isTalkie && _flags.lang != Common::JA_JPN && _flags.lang != Common::ZH_TWN)
_screen->setFont(Screen::FID_6_FNT);
return 0;
}
@@ -1056,7 +1056,7 @@ int KyraEngine_LoK::o1_specialEventRemoveBrynnsNote(EMCState *script) {
_screen->updateScreen();
_screen->showMouse();
- if (_flags.platform != Common::kPlatformAmiga && !_flags.isTalkie && _flags.lang != Common::JA_JPN)
+ if (_flags.platform != Common::kPlatformAmiga && !_flags.isTalkie && _flags.lang != Common::JA_JPN && _flags.lang != Common::ZH_TWN)
_screen->setFont(Screen::FID_8_FNT);
return 0;
}
diff --git a/engines/kyra/sequence/seqplayer_lok.cpp b/engines/kyra/sequence/seqplayer_lok.cpp
index 57c59b766c..d6364e40dd 100644
--- a/engines/kyra/sequence/seqplayer_lok.cpp
+++ b/engines/kyra/sequence/seqplayer_lok.cpp
@@ -636,9 +636,11 @@ bool SeqPlayer::playSequence(const uint8 *seqData, bool skipSeq) {
charIdx++;
}
charStr[1] = charStr[2] = '\0';
- if (_vm->gameFlags().lang == Common::JA_JPN)
+ if (_vm->gameFlags().lang == Common::JA_JPN || _vm->gameFlags().lang == Common::ZH_TWN) {
charStr[1] = _vm->seqTextsTable()[_seqDisplayedText][++_seqDisplayedChar];
- if (_vm->gameFlags().lang == Common::HE_ISR) {
+ _screen->printText(charStr, _seqDisplayedTextX, 180, 0xF, 0xC);
+ _seqDisplayedTextX += _screen->getTextWidth(charStr);
+ } else if (_vm->gameFlags().lang == Common::HE_ISR) {
_seqDisplayedTextX -= _screen->getCharWidth((uint8)charStr[0]);
_screen->printText(revBuffer, _seqDisplayedTextX, 180, 0xF, 0xC);
} else {
diff --git a/engines/kyra/sequence/sequences_lok.cpp b/engines/kyra/sequence/sequences_lok.cpp
index f193aef349..8401b6932b 100644
--- a/engines/kyra/sequence/sequences_lok.cpp
+++ b/engines/kyra/sequence/sequences_lok.cpp
@@ -105,7 +105,7 @@ void KyraEngine_LoK::seq_intro() {
}
_seq->setCopyViewOffs(true);
- _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
+ _screen->setFont(_defaultFont);
if (_flags.platform == Common::kPlatformDOS || _flags.platform == Common::kPlatformMacintosh)
snd_playTheme(0, 2);
_text->setTalkCoords(144);
@@ -250,25 +250,15 @@ bool KyraEngine_LoK::seq_introStory() {
if (!textEnabled() && speechEnabled() && _flags.lang != Common::IT_ITA)
return false;
- if (((_flags.lang == Common::EN_ANY || _flags.lang == Common::RU_RUS) && !_flags.isTalkie && _flags.platform == Common::kPlatformDOS) || _flags.platform == Common::kPlatformAmiga)
- _screen->loadBitmap("TEXT.CPS", 3, 3, &_screen->getPalette(0));
- else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN)
- _screen->loadBitmap("TEXT_ENG.CPS", 3, 3, &_screen->getPalette(0));
- else if (_flags.lang == Common::DE_DEU)
- _screen->loadBitmap("TEXT_GER.CPS", 3, 3, &_screen->getPalette(0));
- else if (_flags.lang == Common::FR_FRA || (_flags.lang == Common::ES_ESP && _flags.isTalkie) /* Spanish fan made over French CD version */ )
- _screen->loadBitmap("TEXT_FRE.CPS", 3, 3, &_screen->getPalette(0));
- else if (_flags.lang == Common::ES_ESP)
- _screen->loadBitmap("TEXT_SPA.CPS", 3, 3, &_screen->getPalette(0));
- else if (_flags.lang == Common::IT_ITA && !_flags.isTalkie)
- _screen->loadBitmap("TEXT_ITA.CPS", 3, 3, &_screen->getPalette(0));
- else if (_flags.lang == Common::IT_ITA && _flags.isTalkie)
- _screen->loadBitmap("TEXT_ENG.CPS", 3, 3, &_screen->getPalette(0));
- else if (_flags.lang == Common::RU_RUS && _flags.isTalkie)
- _screen->loadBitmap("TEXT_ENG.CPS", 3, 3, &_screen->getPalette(0));
- else if (_flags.lang == Common::HE_ISR)
- _screen->loadBitmap("TEXT_HEB.CPS", 3, 3, &_screen->getPalette(0));
- else
+ bool success = false;
+ static const char *pattern[] = { "", "_ENG", "_FRE", "_GER", "_SPA", "_ITA", "_HEB" };
+ for (int i = 0; i < ARRAYSIZE(pattern) && !success; ++i) {
+ Common::String tryFile = Common::String::format("TEXT%s.CPS", pattern[i]);
+ if ((success = _res->exists(tryFile.c_str())))
+ _screen->loadBitmap(tryFile.c_str(), 3, 3, &_screen->getPalette(0));
+ }
+
+ if (!success)
warning("no story graphics file found");
if (_flags.platform == Common::kPlatformAmiga)
diff --git a/engines/kyra/text/text.cpp b/engines/kyra/text/text.cpp
index 6e0f9ccd82..c72b5ce025 100644
--- a/engines/kyra/text/text.cpp
+++ b/engines/kyra/text/text.cpp
@@ -90,6 +90,10 @@ char *TextDisplayer::preprocessString(const char *str) {
assert(strlen(str) < sizeof(_talkBuffer) - 1);
strcpy(_talkBuffer, str);
}
+
+ if (_vm->gameFlags().lang == Common::ZH_TWN)
+ return _talkBuffer;
+
char *p = _talkBuffer;
while (*p) {
if (*p == '\r') {
@@ -98,6 +102,7 @@ char *TextDisplayer::preprocessString(const char *str) {
++p;
}
p = _talkBuffer;
+
Screen::FontId curFont = _screen->setFont(Screen::FID_8_FNT);
_screen->_charSpacing = -2;
int textWidth = _screen->getTextWidth(p);
@@ -118,6 +123,7 @@ char *TextDisplayer::preprocessString(const char *str) {
}
}
_screen->setFont(curFont);
+
return _talkBuffer;
}
@@ -175,15 +181,27 @@ void TextDisplayer::restoreTalkTextMessageBkgd(int srcPage, int dstPage) {
void TextDisplayer::printTalkTextMessage(const char *text, int x, int y, uint8 color, int srcPage, int dstPage) {
char *str = preprocessString(text);
int lineCount = buildMessageSubstrings(str);
- int top = y - lineCount * 10;
- if (top < 0) {
- top = 0;
+ // For Chinese we call this before recalculating the line count
+ int w = getWidestLineWidth(lineCount);
+ int marginTop = 0;
+ if (_vm->gameFlags().lang == Common::ZH_TWN) {
+ lineCount = (strlen(str) + 31) >> 5;
+ marginTop = 10;
+ w = MIN<int>(w, 302);
}
+
+ int top = y - lineCount * (_screen->getFontHeight() + _screen->_lineSpacing);
+ if (top < marginTop)
+ top = marginTop;
+
_talkMessageY = top;
- _talkMessageH = lineCount * 10;
- int w = getWidestLineWidth(lineCount);
- int x1, x2;
- calcWidestLineBounds(x1, x2, w, x);
+ _talkMessageH = lineCount * (_screen->getFontHeight() + _screen->_lineSpacing);
+
+ int x1 = 12;
+ int x2 = Screen::SCREEN_W - 12;
+ if (_vm->gameFlags().lang != Common::ZH_TWN || lineCount == 1)
+ calcWidestLineBounds(x1, x2, w, x);
+
_talkCoords.x = x1;
_talkCoords.w = w + 2;
_screen->copyRegion(_talkCoords.x, _talkMessageY, _talkCoords.x, _talkCoords.y, _talkCoords.w, _talkMessageH, srcPage, dstPage, Screen::CR_NO_P_CHECK);
@@ -193,11 +211,16 @@ void TextDisplayer::printTalkTextMessage(const char *text, int x, int y, uint8 c
if (_vm->gameFlags().platform == Common::kPlatformAmiga)
setTextColor(color);
- for (int i = 0; i < lineCount; ++i) {
- top = i * 10 + _talkMessageY;
- char *msg = &_talkSubstrings[i * TALK_SUBSTRING_LEN];
- int left = getCenterStringX(msg, x1, x2);
- printText(msg, left, top, color, 0xC, 0);
+ if (_vm->gameFlags().lang == Common::ZH_TWN && lineCount > 1) {
+ // The Chinese version leaves the wrapping to the default font handling
+ printText(_talkSubstrings, 12, top, color, 0xC, 0xC);
+ } else {
+ for (int i = 0; i < lineCount; ++i) {
+ top = i * (_screen->getFontHeight() + _screen->_lineSpacing) + _talkMessageY;
+ char *msg = &_talkSubstrings[i * TALK_SUBSTRING_LEN];
+ int left = getCenterStringX(msg, x1, x2);
+ printText(msg, left, top, color, 0xC, _vm->gameFlags().lang == Common::ZH_TWN ? 0xC : 0);
+ }
}
_screen->_curPage = curPage;
_talkMessagePrinted = true;
@@ -215,8 +238,11 @@ void TextDisplayer::printText(const Common::String &str, int x, int y, uint8 c0,
colorMap[3] = c1;
_screen->setTextColor(colorMap, 0, 3);
_screen->_charSpacing = -2;
+ _screen->_lineSpacing = 0;
_screen->printText(tmp, x, y, c0, c2);
_screen->_charSpacing = 0;
+ if (_vm->gameFlags().lang == Common::ZH_TWN)
+ _screen->_lineSpacing = 2;
}
void TextDisplayer::printCharacterText(const char *text, int8 charNum, int charX) {
@@ -225,9 +251,18 @@ void TextDisplayer::printCharacterText(const char *text, int8 charNum, int charX
text = preprocessString(text);
int lineCount = buildMessageSubstrings(text);
+ // For Chinese we call this before recalculating the line count
w = getWidestLineWidth(lineCount);
- x = charX;
- calcWidestLineBounds(x1, x2, w, x);
+
+ if (_vm->gameFlags().lang == Common::ZH_TWN) {
+ lineCount = (strlen(text) + 31) >> 5;
+ w = MIN<int>(w, 302);
+ }
+
+ if (_vm->gameFlags().lang != Common::ZH_TWN || lineCount == 1) {
+ x = charX;
+ calcWidestLineBounds(x1, x2, w, x);
+ }
uint8 color = 0;
if (_vm->gameFlags().platform == Common::kPlatformAmiga) {
@@ -240,11 +275,17 @@ void TextDisplayer::printCharacterText(const char *text, int8 charNum, int charX
color = colorTable[charNum];
}
+ if (_vm->gameFlags().lang == Common::ZH_TWN && lineCount > 1) {
+ // The Chinese version leaves the wrapping to the default font handling
+ printText(_talkSubstrings, 12, _talkMessageY, color, 0xC, 0xC);
+ return;
+ }
+
for (int i = 0; i < lineCount; ++i) {
- top = i * 10 + _talkMessageY;
+ top = i * (_screen->getFontHeight() + _screen->_lineSpacing) + _talkMessageY;
msg = &_talkSubstrings[i * TALK_SUBSTRING_LEN];
left = getCenterStringX(msg, x1, x2);
- printText(msg, left, top, color, 0xC, 0);
+ printText(msg, left, top, color, 0xC, _vm->gameFlags().lang == Common::ZH_TWN ? 0xC : 0);
}
}
diff --git a/engines/kyra/text/text_lok.cpp b/engines/kyra/text/text_lok.cpp
index 6146778e85..4b90793fd4 100644
--- a/engines/kyra/text/text_lok.cpp
+++ b/engines/kyra/text/text_lok.cpp
@@ -277,27 +277,23 @@ void KyraEngine_LoK::characterSays(int vocFile, const char *chatStr, int8 charNu
char *processedString = _text->preprocessString(chatStr);
int lineNum = _text->buildMessageSubstrings(processedString);
+ if (_flags.lang == Common::ZH_TWN)
+ lineNum = (strlen(chatStr) + 31) >> 5;
int16 yPos = _characterList[charNum].y1;
yPos -= ((_scaleTable[yPos] * _characterList[charNum].height) >> 8);
yPos -= 8;
- yPos -= lineNum * 10;
+ yPos -= lineNum * (_screen->getFontHeight() + _screen->_lineSpacing);
- if (yPos < 11)
- yPos = 11;
-
- if (yPos > 100)
- yPos = 100;
-
- _text->_talkMessageY = yPos;
- _text->_talkMessageH = lineNum * 10;
+ _text->_talkMessageY = (_flags.lang == Common::ZH_TWN) ? CLIP<int>(yPos, 10, 80) : CLIP<int>(yPos, 11, 100);;
+ _text->_talkMessageH = lineNum * (_screen->getFontHeight() + _screen->_lineSpacing);
const bool printText = textEnabled();
if (printText) {
_animator->restoreAllObjectBackgrounds();
- _screen->copyRegion(12, _text->_talkMessageY, 12, 136, 296, _text->_talkMessageH, 2, 2);
+ _screen->copyRegion(8, _text->_talkMessageY, 8, 136, 304, _text->_talkMessageH, 2, 2);
_text->printCharacterText(processedString, charNum, _characterList[charNum].x1);
}
@@ -314,11 +310,11 @@ void KyraEngine_LoK::characterSays(int vocFile, const char *chatStr, int8 charNu
if (printText) {
_animator->restoreAllObjectBackgrounds();
- _screen->copyRegion(12, 136, 12, _text->_talkMessageY, 296, _text->_talkMessageH, 2, 2);
+ _screen->copyRegion(8, 136, 8, _text->_talkMessageY, 304, _text->_talkMessageH, 2, 2);
_animator->preserveAllBackgrounds();
_animator->prepDrawAllObjects();
- _screen->copyRegion(12, _text->_talkMessageY, 12, _text->_talkMessageY, 296, _text->_talkMessageH, 2, 0);
+ _screen->copyRegion(8, _text->_talkMessageY, 8, _text->_talkMessageY, 304, _text->_talkMessageH, 2, 0);
_animator->flagAllObjectsForRefresh();
_animator->copyChangedObjectsForward(0);
}
@@ -330,7 +326,17 @@ void KyraEngine_LoK::characterSays(int vocFile, const char *chatStr, int8 charNu
}
void KyraEngine_LoK::drawSentenceCommand(const char *sentence, int color) {
- _screen->fillRect(8, 143, 311, 152, _flags.platform == Common::kPlatformAmiga ? 19 : 12);
+ int boxY1 = 143;
+ int boxY2 = 152;
+ int col2 = _flags.platform == Common::kPlatformAmiga ? 19 : 12;
+
+ if (_flags.lang == Common::ZH_TWN) {
+ boxY1 = 140;
+ boxY2 = 153;
+ col2 = 0;
+ }
+
+ _screen->fillRect(8, boxY1, 311, boxY2, _flags.platform == Common::kPlatformAmiga ? 19 : 12);
if (_flags.platform == Common::kPlatformAmiga) {
if (color != 19) {
@@ -351,10 +357,10 @@ void KyraEngine_LoK::drawSentenceCommand(const char *sentence, int color) {
}
if (_flags.lang != Common::HE_ISR) {
- _text->printText(sentence, 8, 143, 0xFF, _flags.platform == Common::kPlatformAmiga ? 19 : 12, 0);
+ _text->printText(sentence, 8, boxY1, 0xFF, col2, 0);
} else {
_screen->_charSpacing = -2;
- _text->printText(sentence, 311 - _screen->getTextWidth(sentence), 143, 0xFF, _flags.platform == Common::kPlatformAmiga ? 19 : 12, 0);
+ _text->printText(sentence, 311 - _screen->getTextWidth(sentence), boxY1, 0xFF, col2, 0);
_screen->_charSpacing = 0;
}
setTextFadeTimerCountdown(15);
@@ -363,14 +369,18 @@ void KyraEngine_LoK::drawSentenceCommand(const char *sentence, int color) {
void KyraEngine_LoK::updateSentenceCommand(const char *str1, const char *str2, int color) {
char sentenceCommand[500];
- if (_flags.lang != Common::HE_ISR) {
- Common::strlcpy(sentenceCommand, str1, sizeof(sentenceCommand));
+ if (_flags.lang == Common::ZH_TWN) {
+ Common::strlcpy(sentenceCommand, str2 ? str2 : str1, sizeof(sentenceCommand));
if (str2)
- Common::strlcat(sentenceCommand, str2, sizeof(sentenceCommand));
- } else {
+ Common::strlcat(sentenceCommand, str1, sizeof(sentenceCommand));
+ } else if (_flags.lang == Common::HE_ISR) {
if (str2)
Common::strlcpy(sentenceCommand, str2, sizeof(sentenceCommand));
Common::strlcat(sentenceCommand, str1, sizeof(sentenceCommand));
+ } else {
+ Common::strlcpy(sentenceCommand, str1, sizeof(sentenceCommand));
+ if (str2)
+ Common::strlcat(sentenceCommand, str2, sizeof(sentenceCommand));
}
drawSentenceCommand(sentenceCommand, color);
Commit: 9d6fe02c6ddc18ecddb59f5cc99822f41e776247
https://github.com/scummvm/scummvm/commit/9d6fe02c6ddc18ecddb59f5cc99822f41e776247
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-15T01:01:34+01:00
Commit Message:
NEWS: mention LoK/Chinese
Changed paths:
NEWS.md
diff --git a/NEWS.md b/NEWS.md
index 52957fbb2f..884183d6ab 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -18,7 +18,7 @@ For a more comprehensive changelog of the latest experimental code, see:
- Added text to speech for dialogs and object descriptions.
Kyra:
- - Added support for the Traditional Chinese version of Legend of Kyrandia 3.
+ - Added support for the Traditional Chinese versions of Legend of Kyrandia 1 and 3.
- Added sound support for the Macintosh version of Legend of Kyrandia.
Supernova:
More information about the Scummvm-git-logs
mailing list