[Scummvm-git-logs] scummvm master -> 63b504190ba126143ed7750da9473f2985a90239

AndywinXp noreply at scummvm.org
Thu Dec 29 10:20:02 UTC 2022


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b376f0010f SCUMM: GUI: Add support for Maniac NES
63b504190b NEWS: SCUMM: Update original GUI news entry


Commit: b376f0010f9f2ce5d7b04ee1821db5200cb6930b
    https://github.com/scummvm/scummvm/commit/b376f0010f9f2ce5d7b04ee1821db5200cb6930b
Author: AndywinXp (andywinxp at gmail.com)
Date: 2022-12-29T11:19:45+01:00

Commit Message:
SCUMM: GUI: Add support for Maniac NES

Changed paths:
    engines/scumm/input.cpp
    engines/scumm/scumm.cpp


diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index f0fb3e9afea..6dab8310fd4 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -253,7 +253,9 @@ void ScummEngine::parseEvent(Common::Event event) {
 		break;
 	case Common::EVENT_RETURN_TO_LAUNCHER:
 	case Common::EVENT_QUIT:
-		if (isUsingOriginalGUI() && _game.platform != Common::kPlatformSegaCD) {
+		if (isUsingOriginalGUI() &&
+			_game.platform != Common::kPlatformSegaCD &&
+			_game.platform != Common::kPlatformNES) {
 			if (!_quitByGUIPrompt && !_mainMenuIsActive) {
 				bool exitType = (event.type == Common::EVENT_RETURN_TO_LAUNCHER);
 				// If another message banner is currently on the screen, close it
@@ -804,10 +806,6 @@ void ScummEngine_v2::processKeyboard(Common::KeyState lastKeyHit) {
 			if (_game.id == GID_MANIAC && _game.version == 0) {
 				runScript(2, 0, 0, nullptr);
 			}
-
-			if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformNES) {
-				runScript(163, 0, 0, nullptr);
-			}
 		}
 	}
 
@@ -886,6 +884,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
 	bool snapScrollKeyEnabled = (_game.version >= 2 && _game.version <= 4);
 	bool optionKeysEnabled = !isUsingOriginalGUI();
 	bool isSegaCD = _game.platform == Common::kPlatformSegaCD;
+	bool isNES = _game.platform == Common::kPlatformNES;
 
 	// In FM-TOWNS games F8 / restart is always enabled
 	if (_game.platform == Common::kPlatformFMTowns)
@@ -921,6 +920,9 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
 				_cursor.state = oldCursorState;
 				return;
 			}
+		} else if (lastKeyHit.keycode == Common::KEYCODE_SPACE && isNES) {
+			runScript(163, 0, 0, nullptr);
+			return;
 		} else if (_game.version <= 2 && lastKeyHit.keycode == Common::KEYCODE_SPACE) {
 			printMessageAndPause(getGUIString(gsPause), 0, -1, true);
 			return;
@@ -939,8 +941,8 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
 		restartKeyPressed |= _game.platform == Common::kPlatformFMTowns && _game.version == 3 &&
 			lastKeyHit.keycode == Common::KEYCODE_F8 && lastKeyHit.hasFlags(0);
 
-		// ...but do not allow the restart banner to appear at all, if this is MI1 SegaCD.
-		restartKeyPressed &= _game.platform != Common::kPlatformSegaCD;
+		// ...but do not allow the restart banner to appear at all, if this is MI1 SegaCD or Maniac NES.
+		restartKeyPressed &= !isSegaCD && !isNES;
 
 		if (restartKeyPressed) {
 			queryRestart();
@@ -1086,6 +1088,9 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
 				showMainMenu();
 			}
 			return;
+		} else if (lastKeyHit.keycode == Common::KEYCODE_F5 && isNES) {
+			// We map the GMM to F5, while SPACE (which acts as our pause button) calls the original menu...
+			openMainMenuDialog();
 		} else if (lastKeyHit.keycode == Common::KEYCODE_F5 && _game.version == 3 && _game.platform == Common::kPlatformMacintosh) {
 			// We don't have original menus for Mac versions of LOOM and INDY3, so let's just open the GMM...
 			openMainMenuDialog();
@@ -1122,7 +1127,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
 		// The following ones serve no purpose whatsoever, but just for the sake of completeness...
 		// 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 < 7 && !isSegaCD && !isNES) {
 			if (_game.version == 6 && lastKeyHit.keycode == Common::KEYCODE_j && lastKeyHit.hasFlags(Common::KBD_CTRL)) {
 				showBannerAndPause(0, 90, getGUIString(gsRecalJoystick));
 				return;
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index a740ade7234..cdafe787402 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -3165,8 +3165,7 @@ bool ScummEngine::isUsingOriginalGUI() {
 	if (_game.id == GID_MONKEY2 && (_game.features & GF_DEMO))
 		return false;
 
-	if (_game.platform == Common::kPlatformNES ||
-		_game.platform == Common::kPlatformPCEngine ||
+	if (_game.platform == Common::kPlatformPCEngine ||
 		(_game.platform == Common::kPlatformAtariST && _game.version == 2))
 		return false;
 


Commit: 63b504190ba126143ed7750da9473f2985a90239
    https://github.com/scummvm/scummvm/commit/63b504190ba126143ed7750da9473f2985a90239
Author: AndywinXp (andywinxp at gmail.com)
Date: 2022-12-29T11:19:45+01:00

Commit Message:
NEWS: SCUMM: Update original GUI news entry

AtariST was removed because the only currently supported game is MI1

Changed paths:
    NEWS.md


diff --git a/NEWS.md b/NEWS.md
index c87c80d4631..19b46fccdd1 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -90,8 +90,7 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Improved support for Hebrew HE game localizations.
    - Fixed Roland MT-32 support in Sam & Max.
    - Implemented original GUI and save menus for LucasArts games (DOS, Windows,
-     Amiga, Macintosh, FM-Towns, Atari ST and Commodore 64 versions).
-   - Implemented original save/load menu for MI1 SegaCD.
+     Amiga, Macintosh, FM-Towns, SegaCD, NES and Commodore 64 versions).
 
  Sherlock:
    - Added support for Chinese Rose Tattoo.




More information about the Scummvm-git-logs mailing list