aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorathrxx2019-11-27 00:06:01 +0100
committerathrxx2019-12-18 20:50:45 +0100
commit3646aff6d454265fe01912dc6f6732164289d25b (patch)
treebfaa2e0b52ccf2da8f1a54d17bb3b1e1b11674bb
parent5a1162e99929d4a4d6351f91b8527fc0f205ad0f (diff)
downloadscummvm-rg350-3646aff6d454265fe01912dc6f6732164289d25b.tar.gz
scummvm-rg350-3646aff6d454265fe01912dc6f6732164289d25b.tar.bz2
scummvm-rg350-3646aff6d454265fe01912dc6f6732164289d25b.zip
KYRA: (EOB/PC98) - fix preferences menu
-rw-r--r--engines/kyra/engine/eobcommon.cpp1
-rw-r--r--engines/kyra/engine/eobcommon.h1
-rw-r--r--engines/kyra/gui/gui_eob.cpp36
-rw-r--r--engines/kyra/resource/staticres_eob.cpp15
4 files changed, 39 insertions, 14 deletions
diff --git a/engines/kyra/engine/eobcommon.cpp b/engines/kyra/engine/eobcommon.cpp
index fc0f563e1b..7e180ca8cc 100644
--- a/engines/kyra/engine/eobcommon.cpp
+++ b/engines/kyra/engine/eobcommon.cpp
@@ -227,6 +227,7 @@ EoBCoreEngine::EoBCoreEngine(OSystem *system, const GameFlags &flags) : KyraRpgE
_amigaLevelSoundList1 = _amigaLevelSoundList2 = 0;
_amigaSoundMap = 0;
_amigaCurSoundFile = -1;
+ _prefMenuPlatformOffset = 0;
memset(_cgaMappingLevel, 0, sizeof(_cgaMappingLevel));
memset(_expRequirementTables, 0, sizeof(_expRequirementTables));
memset(_saveThrowTables, 0, sizeof(_saveThrowTables));
diff --git a/engines/kyra/engine/eobcommon.h b/engines/kyra/engine/eobcommon.h
index b54e70b4f5..b266be7541 100644
--- a/engines/kyra/engine/eobcommon.h
+++ b/engines/kyra/engine/eobcommon.h
@@ -1139,6 +1139,7 @@ protected:
EoBMenuDef *_menuDefs;
const EoBMenuButtonDef *_menuButtonDefs;
+ int _prefMenuPlatformOffset;
bool _configMouse;
bool _config2431;
diff --git a/engines/kyra/gui/gui_eob.cpp b/engines/kyra/gui/gui_eob.cpp
index 37370b552d..bf8d04d060 100644
--- a/engines/kyra/gui/gui_eob.cpp
+++ b/engines/kyra/gui/gui_eob.cpp
@@ -2155,8 +2155,8 @@ void GUI_EoB::runCampMenu() {
if (prevHighlightButton) {
int dir = (inputFlag == _vm->_keyMap[Common::KEYCODE_UP]) ? -1 : 1;
int s = prevHighlightButton->index + dir;
- if (lastMenu == 2 && _vm->gameFlags().platform == Common::kPlatformFMTowns)
- s += 32;
+ if (lastMenu == 2)
+ s += _vm->_prefMenuPlatformOffset;
int a = _vm->_menuDefs[lastMenu].firstButtonStrId + 1;
int b = a + _vm->_menuDefs[lastMenu].numButtons - 1;
@@ -2170,8 +2170,8 @@ void GUI_EoB::runCampMenu() {
s += dir;
} while (!_vm->shouldQuit());
- if (lastMenu == 2 && _vm->gameFlags().platform == Common::kPlatformFMTowns)
- s -= 32;
+ if (lastMenu == 2)
+ s -= _vm->_prefMenuPlatformOffset;
highlightButton = _vm->gui_getButton(buttonList, s);
}
@@ -2267,21 +2267,35 @@ void GUI_EoB::runCampMenu() {
break;
case 0x800D:
- _vm->_configSounds ^= true;
- _vm->_configMusic = _vm->_configSounds ? 1 : 0;
+ if (_vm->gameFlags().platform == Common::kPlatformPC98) {
+ _vm->_configMusic ^= true;
+ if (_vm->_configMusic)
+ _vm->snd_playSong(_vm->_currentLevel + 1);
+ else
+ _vm->snd_playSong(0);
+ } else {
+ _vm->_configSounds ^= true;
+ _vm->_configMusic = _vm->_configSounds ? 1 : 0;
+ }
keepButtons = true;
newMenu = 2;
break;
case 0x800E:
- _vm->_configHpBarGraphs ^= true;
+ if (_vm->gameFlags().platform == Common::kPlatformPC98)
+ _vm->_configSounds ^= true;
+ else
+ _vm->_configHpBarGraphs ^= true;
newMenu = 2;
redrawPortraits = keepButtons = true;
break;
case 0x800F:
- if (_vm->gameFlags().platform == Common::kPlatformFMTowns) {
- _vm->_config2431 ^= true;
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) {
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns)
+ _vm->_config2431 ^= true;
+ else
+ _vm->_configHpBarGraphs ^= true;
newMenu = 2;
redrawPortraits = keepButtons = true;
} else {
@@ -4070,8 +4084,8 @@ Button *GUI_EoB::initMenu(int id) {
b->index = m->firstButtonStrId + i + 1;
if (id == 4 && _vm->game() == GI_EOB1)
b->index -= 14;
- else if (id == 2 && _vm->gameFlags().platform == Common::kPlatformFMTowns)
- b->index -= 32;
+ else if (id == 2)
+ b->index -= _vm->_prefMenuPlatformOffset;
b->data0Val2 = 12;
b->data1Val2 = b->data2Val2 = 15;
diff --git a/engines/kyra/resource/staticres_eob.cpp b/engines/kyra/resource/staticres_eob.cpp
index edfa6b3dfe..48c1c3f285 100644
--- a/engines/kyra/resource/staticres_eob.cpp
+++ b/engines/kyra/resource/staticres_eob.cpp
@@ -781,6 +781,11 @@ void EoBCoreEngine::initMenus() {
{ 18, 12, 20, 158, 14, 32, 3 },
{ 19, 12, 37, 158, 14, 50, 3 },
{ 20, 12, 54, 158, 14, 21, 3 },
+ { 8, 128, 122, 40, 14, 19, 7 },
+ // PC-98 options menu
+ { 17, 12, 20, 158, 14, 32, 3 },
+ { 18, 12, 37, 158, 14, 50, 3 },
+ { 19, 12, 54, 158, 14, 21, 3 },
{ 8, 128, 122, 40, 14, 19, 7 }
};
@@ -810,9 +815,13 @@ void EoBCoreEngine::initMenus() {
// assign FM-Towns style options menu
_menuDefs[2].numButtons = 4;
_menuDefs[2].firstButtonStrId = 44;
- }
-
- if (_flags.platform == Common::kPlatformAmiga) {
+ _prefMenuPlatformOffset = 32;
+ } else if (_flags.platform == Common::kPlatformPC98) {
+ // assign PC-98 style options menu
+ _menuDefs[2].numButtons = 4;
+ _menuDefs[2].firstButtonStrId = 48;
+ _prefMenuPlatformOffset = 36;
+ } else if (_flags.platform == Common::kPlatformAmiga) {
// assign Amiga text colors
_menuDefs[0].titleCol = _menuDefs[1].titleCol = _menuDefs[2].titleCol = _menuDefs[4].titleCol = _menuDefs[6].titleCol = guiSettings()->colors.guiColorLightBlue;
_menuDefs[3].titleCol = _menuDefs[5].titleCol = guiSettings()->colors.guiColorWhite;