SCUMM: GUI: Implement missing banners for v6 games

This commit is contained in:
AndywinXp 2022-12-20 22:38:26 +01:00
parent d86fb3bf6e
commit 4d6d76b60b
3 changed files with 23 additions and 2 deletions

View File

@ -185,7 +185,10 @@ static const ResString string_map_table_v6[] = {
{0, "Music Volume Low ========= High"},
{0, "Voice Volume Low ========= High"},
{0, "SFX Volume Low ========= High"},
{0, "Heap %dK"}
{0, "Heap %dK"},
{0, "Recalibrating Joystick"},
{0, "Joystick Mode"}, // SAMNMAX Floppy
{0, "Mouse Mode"}
};
#pragma mark -

View File

@ -3858,6 +3858,16 @@ const char *ScummEngine_v6::getGUIString(int stringId) {
case gsHeap:
resStringId = 35;
break;
case gsRecalJoystick:
if (_game.id == GID_SAMNMAX && !strcmp(_game.variant, "Floppy")) {
resStringId = 37;
} else {
resStringId = 36;
}
break;
case gsMouseMode:
resStringId = 38;
break;
default:
break;
}

View File

@ -1120,7 +1120,10 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
// Also, some of these were originally mapped with the CTRL flag, but they would clash with other
// internal ScummVM commands, so they are instead available with the SHIFT flag.
if (_game.version < 7 && !isSegaCD) {
if (_game.version >= 4 && lastKeyHit.keycode == Common::KEYCODE_j && lastKeyHit.hasFlags(Common::KBD_SHIFT)) {
if (_game.version == 6 && lastKeyHit.keycode == Common::KEYCODE_j && lastKeyHit.hasFlags(Common::KBD_CTRL)) {
showBannerAndPause(0, 90, getGUIString(gsRecalJoystick));
return;
} else if (_game.version >= 4 && lastKeyHit.keycode == Common::KEYCODE_j && lastKeyHit.hasFlags(Common::KBD_SHIFT)) {
if (_game.version == 4) {
showOldStyleBannerAndPause(getGUIString(gsRecalJoystick), 2, 90);
} else {
@ -1129,6 +1132,11 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
return;
}
if (_game.version == 6 && lastKeyHit.keycode == Common::KEYCODE_n && lastKeyHit.hasFlags(Common::KBD_CTRL)) {
showBannerAndPause(0, 90, getGUIString(gsMouseMode));
return;
}
if (_game.version >= 4 && lastKeyHit.keycode == Common::KEYCODE_m && lastKeyHit.hasFlags(Common::KBD_SHIFT)) {
if (_game.version == 4) {
showOldStyleBannerAndPause(getGUIString(gsMouseMode), 2, 90);