From 3b574466fa3cb28c521234f5460164ade91a8d50 Mon Sep 17 00:00:00 2001 From: athrxx Date: Fri, 24 Feb 2012 17:15:34 +0100 Subject: COMMON: distinguish between 256 colors and 16 colors PC-98 rendering modes KYRA 1 PC-98 supports both modes in the same target. The desired mode can now be selected in the rendering options. We did have good support for the 16 colors mode of KYRA 1 already. This mode could not really be selected though (except by manually modifying the config file or the code). --- common/util.cpp | 6 ++++-- common/util.h | 6 ++++-- engines/kyra/detection_tables.h | 8 ++++---- engines/kyra/kyra_lok.cpp | 2 +- gui/options.cpp | 3 ++- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/common/util.cpp b/common/util.cpp index 05d29fac94..5911f9b1a4 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -289,7 +289,8 @@ const RenderModeDescription g_renderModes[] = { { "vga", "VGA", kRenderVGA }, { "amiga", "Amiga", kRenderAmiga }, { "fmtowns", "FM-Towns", kRenderFMTowns }, - { "pc98", "PC-98", kRenderPC98 }, + { "pc9821", "PC-9821 (256 Colors)", kRenderPC9821 }, + { "pc9801", "PC-9801 (16 Colors)", kRenderPC9801 }, {0, 0, kRenderDefault} }; @@ -361,7 +362,8 @@ const struct GameOpt { { GUIO_RENDERVGA, "vga" }, { GUIO_RENDERAMIGA, "amiga" }, { GUIO_RENDERFMTOWNS, "fmtowns" }, - { GUIO_RENDERPC98, "pc98" }, + { GUIO_RENDERPC9821, "pc9821" }, + { GUIO_RENDERPC9801, "pc9801" }, { GUIO_NONE, 0 } }; diff --git a/common/util.h b/common/util.h index b6f63702d4..841280f7ae 100644 --- a/common/util.h +++ b/common/util.h @@ -108,7 +108,8 @@ template inline void SWAP(T &a, T &b) { T tmp = a; a = b; b = tmp; } #define GUIO_RENDERVGA "\034" #define GUIO_RENDERAMIGA "\035" #define GUIO_RENDERFMTOWNS "\036" -#define GUIO_RENDERPC98 "\037" +#define GUIO_RENDERPC9821 "\037" +#define GUIO_RENDERPC9801 "\040" #define GUIO0() (GUIO_NONE) #define GUIO1(a) (a) @@ -316,7 +317,8 @@ enum RenderMode { kRenderHercA = 5, kRenderAmiga = 6, kRenderFMTowns = 7, - kRenderPC98 = 8 + kRenderPC9821 = 8, + kRenderPC9801 = 9 }; struct RenderModeDescription { diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h index 44e604c44d..204c49cd2c 100644 --- a/engines/kyra/detection_tables.h +++ b/engines/kyra/detection_tables.h @@ -297,7 +297,7 @@ const KYRAGameDescription adGameDescs[] = { Common::JA_JPN, Common::kPlatformPC98, ADGF_NO_FLAGS, - GUIO3(GUIO_NOSPEECH, GUIO_MIDIPC98, GUIO_RENDERPC98) + GUIO4(GUIO_NOSPEECH, GUIO_MIDIPC98, GUIO_RENDERPC9821, GUIO_RENDERPC9801) }, KYRA1_TOWNS_SJIS_FLAGS }, @@ -743,7 +743,7 @@ const KYRAGameDescription adGameDescs[] = { Common::EN_ANY, Common::kPlatformPC98, ADGF_CD, - GUIO3(GUIO_NOSPEECH, GUIO_MIDIPC98, GUIO_RENDERPC98) + GUIO3(GUIO_NOSPEECH, GUIO_MIDIPC98, GUIO_RENDERPC9821) }, KYRA2_TOWNS_FLAGS }, @@ -755,7 +755,7 @@ const KYRAGameDescription adGameDescs[] = { Common::JA_JPN, Common::kPlatformPC98, ADGF_CD, - GUIO3(GUIO_NOSPEECH, GUIO_MIDIPC98, GUIO_RENDERPC98) + GUIO3(GUIO_NOSPEECH, GUIO_MIDIPC98, GUIO_RENDERPC9821) }, KYRA2_TOWNS_SJIS_FLAGS }, @@ -1418,7 +1418,7 @@ const KYRAGameDescription adGameDescs[] = { Common::JA_JPN, Common::kPlatformPC98, ADGF_NO_FLAGS, - GUIO3(GUIO_NOSPEECH, GUIO_MIDIPC98, GUIO_RENDERPC98) + GUIO3(GUIO_NOSPEECH, GUIO_MIDIPC98, GUIO_RENDERPC9801) }, LOL_PC98_SJIS_FLAGS }, diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp index 1dd53901e8..4ea686ae39 100644 --- a/engines/kyra/kyra_lok.cpp +++ b/engines/kyra/kyra_lok.cpp @@ -167,7 +167,7 @@ KyraEngine_LoK::~KyraEngine_LoK() { } Common::Error KyraEngine_LoK::init() { - if (_flags.platform == Common::kPlatformPC98 && _flags.useHiRes && ConfMan.getBool("16_color")) + if (Common::parseRenderMode(ConfMan.get("render_mode")) == Common::kRenderPC9801) _screen = new Screen_LoK_16(this, _system); else _screen = new Screen_LoK(this, _system); diff --git a/gui/options.cpp b/gui/options.cpp index bfad81c07b..be1c091b89 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -1050,7 +1050,8 @@ Common::String OptionsDialog::renderType2GUIO(uint32 renderType) { { Common::kRenderVGA, GUIO_RENDERVGA }, { Common::kRenderAmiga, GUIO_RENDERAMIGA }, { Common::kRenderFMTowns, GUIO_RENDERFMTOWNS }, - { Common::kRenderPC98, GUIO_RENDERPC98 } + { Common::kRenderPC9821, GUIO_RENDERPC9821 }, + { Common::kRenderPC9801, GUIO_RENDERPC9801 } }; Common::String res; -- cgit v1.2.3