aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/engine
diff options
context:
space:
mode:
authorathrxx2019-11-24 00:35:58 +0100
committerathrxx2019-12-18 20:50:43 +0100
commit512fe083670e0fa1d37b88876d8b612017714c27 (patch)
treef74239beeaa95bf517888bb05d49da030fc7588f /engines/kyra/engine
parentfeca6f5a26c912e443d59700b7eda31cc8b2db26 (diff)
downloadscummvm-rg350-512fe083670e0fa1d37b88876d8b612017714c27.tar.gz
scummvm-rg350-512fe083670e0fa1d37b88876d8b612017714c27.tar.bz2
scummvm-rg350-512fe083670e0fa1d37b88876d8b612017714c27.zip
KYRA: (EOB/PC98) - allow both graphics mode / text mode text display for sjis font
The assumption till now was that PC-9801 games in 16 color mode will always use text mode for text display. However, EOB1 uses text mode for intro and ending sequence and graphics mode for ingame. Add new font variant for this and also do some cleanup, since the text displayer code really needs it. (The problem is that at least 3 different Japanese publishers did the Japanese ports for the various games and every one of them did his own hacks for his specific target.)
Diffstat (limited to 'engines/kyra/engine')
-rw-r--r--engines/kyra/engine/kyra_rpg.cpp8
-rw-r--r--engines/kyra/engine/kyra_rpg.h1
-rw-r--r--engines/kyra/engine/lol.cpp8
3 files changed, 12 insertions, 5 deletions
diff --git a/engines/kyra/engine/kyra_rpg.cpp b/engines/kyra/engine/kyra_rpg.cpp
index a2f0460a45..35cdfa27a3 100644
--- a/engines/kyra/engine/kyra_rpg.cpp
+++ b/engines/kyra/engine/kyra_rpg.cpp
@@ -124,6 +124,12 @@ KyraRpgEngine::KyraRpgEngine(OSystem *system, const GameFlags &flags) : KyraEngi
_environmentSfx = _environmentSfxVol = _envSfxDistThreshold = 0;
_monsterStepCounter = _monsterStepMode = 0;
+
+ _buttonFont = Screen::FID_6_FNT;
+ if (_flags.use16ColorMode)
+ _buttonFont = _flags.gameID == GI_LOL ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_SJIS_FNT;
+ else if (_flags.gameID == GI_EOB2 && _flags.platform == Common::kPlatformFMTowns)
+ _buttonFont = Screen::FID_8_FNT;
}
KyraRpgEngine::~KyraRpgEngine() {
@@ -222,7 +228,7 @@ bool KyraRpgEngine::posWithinRect(int posX, int posY, int x1, int y1, int x2, in
void KyraRpgEngine::drawDialogueButtons() {
int cp = screen()->setCurPage(0);
- Screen::FontId of = screen()->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_FNT : ((_flags.gameID == GI_EOB2 && _flags.platform == Common::kPlatformFMTowns) ? Screen::FID_8_FNT : Screen::FID_6_FNT));
+ Screen::FontId of = screen()->setFont(_buttonFont);
for (int i = 0; i < _dialogueNumButtons; i++) {
int x = _dialogueButtonPosX[i];
diff --git a/engines/kyra/engine/kyra_rpg.h b/engines/kyra/engine/kyra_rpg.h
index af1d27f993..81b5645461 100644
--- a/engines/kyra/engine/kyra_rpg.h
+++ b/engines/kyra/engine/kyra_rpg.h
@@ -368,6 +368,7 @@ protected:
bool _dialogueField;
bool _dialogueFieldAmiga;
+ Screen::FontId _buttonFont;
const char *_dialogueButtonString[9];
const uint16 *_dialogueButtonPosX;
diff --git a/engines/kyra/engine/lol.cpp b/engines/kyra/engine/lol.cpp
index c80d7fe6f4..bd79941299 100644
--- a/engines/kyra/engine/lol.cpp
+++ b/engines/kyra/engine/lol.cpp
@@ -524,7 +524,7 @@ Common::Error LoLEngine::go() {
// the prologue code we need to setup them manually here.
if (_gameToLoad != -1 && action != 3) {
preInit();
- _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
+ _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
}
// We have three sound.dat files, one for the intro, one for the
@@ -695,7 +695,7 @@ int LoLEngine::mainMenu() {
{ 0, 0, 0, 0, 0 },
{ 0x01, 0x04, 0x0C, 0x04, 0x00, 0xC1, 0xE1 },
{ 0xCC, 0xDD, 0xDD, 0xDD },
- Screen::FID_SJIS_FNT, 1
+ Screen::FID_SJIS_TEXTMODE_FNT, 1
}
};
@@ -4191,7 +4191,7 @@ void LoLEngine::drawMapPage(int pageNum) {
_screen->copyRegion(236, 16, 236 + xOffset, 16, -xOffset, 1, pageNum, pageNum, Screen::CR_NO_P_CHECK);
int cp = _screen->setCurPage(pageNum);
- Screen::FontId of = _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_9_FNT);
+ Screen::FontId of = _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_9_FNT);
_screen->printText(getLangString(_autoMapStrings[_currentMapLevel]), 236 + xOffset, 8, 1, 0);
uint16 blX = mapGetStartPosX();
uint16 bl = (mapGetStartPosY() << 5) + blX;
@@ -4251,7 +4251,7 @@ void LoLEngine::drawMapPage(int pageNum) {
_screen->setFont(of);
_screen->setCurPage(cp);
- of = _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_FNT : Screen::FID_6_FNT);
+ of = _screen->setFont((_flags.lang == Common::JA_JPN && _flags.use16ColorMode) ? Screen::FID_SJIS_TEXTMODE_FNT : Screen::FID_6_FNT);
int tY = 0;
sx = mapGetStartPosX();