[Scummvm-git-logs] scummvm master -> 0016fe5febaec2feb984ae80c38c4d318133bb7e

dreammaster noreply at scummvm.org
Mon May 22 04:02:36 UTC 2023


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

Summary:
1db125aa8e MM: MM1: Further tweaks to interface buttons
9e28b236aa MM: MM1: Show Unlock message when door not present
0016fe5feb MM: MM1: Update minimap after moving before specials trigger


Commit: 1db125aa8e58d8acb884529b33c613c1c7eab12a
    https://github.com/scummvm/scummvm/commit/1db125aa8e58d8acb884529b33c613c1c7eab12a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-21T20:33:22-07:00

Commit Message:
MM: MM1: Further tweaks to interface buttons

Changed paths:
    engines/mm/mm1/views_enh/game_commands.cpp


diff --git a/engines/mm/mm1/views_enh/game_commands.cpp b/engines/mm/mm1/views_enh/game_commands.cpp
index 80791eb1517..949a02a9e6e 100644
--- a/engines/mm/mm1/views_enh/game_commands.cpp
+++ b/engines/mm/mm1/views_enh/game_commands.cpp
@@ -30,27 +30,26 @@ GameCommands::GameCommands(UIElement *owner) :
 		ButtonContainer("GameCommands", owner),
 		_minimap(this) {
 	Shared::Xeen::SpriteResource *spr = &g_globals->_mainIcons;
-	_iconSprites.load("view.icn");
+	_iconSprites.load("cast.icn");
 
 	addButton(Common::Rect(235, 75, 259, 95), KEYBIND_SPELL, 2, spr);
 	addButton(Common::Rect(260, 75, 284, 95), KEYBIND_PROTECT, 10, spr);
 	addButton(Common::Rect(286, 75, 310, 95), KEYBIND_REST, 4, spr);
 
 	addButton(Common::Rect(235, 96, 259, 116), KEYBIND_BASH, 6, spr);
-	addButton(Common::Rect(260, 96, 284, 116), KEYBIND_SEARCH, 40, &_iconSprites);
-	addButton(Common::Rect(286, 96, 310, 116), KEYBIND_ORDER, 44, &_iconSprites);
+	addButton(Common::Rect(260, 96, 284, 116), KEYBIND_SEARCH, 2, &_iconSprites);
+	addButton(Common::Rect(286, 96, 310, 116), KEYBIND_UNLOCK, 14, spr);
 
 	addButton(Common::Rect(235, 117, 259, 137), KEYBIND_MAP, 12, spr);
-	addButton(Common::Rect(260, 117, 284, 137), KEYBIND_UNLOCK, 14, spr);
-	addButton(Common::Rect(286, 117, 310, 137), KEYBIND_QUICKREF, 16, spr);
+	addButton(Common::Rect(260, 117, 284, 137), KEYBIND_QUICKREF, 16, spr);
 
 	addButton(Common::Rect(109, 137, 122, 147), KEYBIND_MENU, 18, spr);
-	addButton(Common::Rect(235, 148, 259, 168), KEYBIND_TURN_LEFT, spr);
-	addButton(Common::Rect(260, 148, 284, 168), KEYBIND_FORWARDS, spr);
-	addButton(Common::Rect(286, 148, 310, 168), KEYBIND_TURN_RIGHT, spr);
-	addButton(Common::Rect(235, 169, 259, 189), KEYBIND_STRAFE_LEFT, spr);
-	addButton(Common::Rect(260, 169, 284, 189), KEYBIND_BACKWARDS, spr);
-	addButton(Common::Rect(286, 169, 310, 189), KEYBIND_STRAFE_RIGHT, spr);
+	addButton(Common::Rect(235, 148, 259, 168), KEYBIND_TURN_LEFT, 20, spr);
+	addButton(Common::Rect(260, 148, 284, 168), KEYBIND_FORWARDS, 22, spr);
+	addButton(Common::Rect(286, 148, 310, 168), KEYBIND_TURN_RIGHT, 24, spr);
+	addButton(Common::Rect(235, 169, 259, 189), KEYBIND_STRAFE_LEFT, 26, spr);
+	addButton(Common::Rect(260, 169, 284, 189), KEYBIND_BACKWARDS, 28, spr);
+	addButton(Common::Rect(286, 169, 310, 189), KEYBIND_STRAFE_RIGHT, 30, spr);
 
 	addButton(_minimap.getBounds(), KEYBIND_MINIMAP);
 }


Commit: 9e28b236aad66b1ad6f1cee14dce782d54df8e54
    https://github.com/scummvm/scummvm/commit/9e28b236aad66b1ad6f1cee14dce782d54df8e54
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-21T20:43:36-07:00

Commit Message:
MM: MM1: Show Unlock message when door not present

Changed paths:
    devtools/create_mm/files/mm1/strings_en.yml
    engines/mm/mm1/views_enh/game_messages.cpp
    engines/mm/mm1/views_enh/unlock.cpp


diff --git a/devtools/create_mm/files/mm1/strings_en.yml b/devtools/create_mm/files/mm1/strings_en.yml
index 3ac90390dbb..830c4bce461 100644
--- a/devtools/create_mm/files/mm1/strings_en.yml
+++ b/devtools/create_mm/files/mm1/strings_en.yml
@@ -278,6 +278,7 @@ dialogs:
 	unlock:
 		success: "Success!"
 		failed: "Unlock failed!"
+		none: "Unlock: No door present"
 	view_characters:
 		title: "View all characters"
 		legend1: "'a'-'%c' to view a character"
diff --git a/engines/mm/mm1/views_enh/game_messages.cpp b/engines/mm/mm1/views_enh/game_messages.cpp
index 9873ef42d2a..f728ab9cc55 100644
--- a/engines/mm/mm1/views_enh/game_messages.cpp
+++ b/engines/mm/mm1/views_enh/game_messages.cpp
@@ -156,7 +156,8 @@ bool GameMessages::msgMouseDown(const MouseDownMessage &msg) {
 	// If yes/no prompting, also pass events to buttons view
 	if (_yCallback)
 		return send("MessagesYesNo", msg);
-	return false;
+
+	return msgAction(KeybindingAction(KEYBIND_SELECT));
 }
 
 bool GameMessages::msgMouseUp(const MouseUpMessage &msg) {
diff --git a/engines/mm/mm1/views_enh/unlock.cpp b/engines/mm/mm1/views_enh/unlock.cpp
index ccd571b3d55..30195f3cbb1 100644
--- a/engines/mm/mm1/views_enh/unlock.cpp
+++ b/engines/mm/mm1/views_enh/unlock.cpp
@@ -39,10 +39,9 @@ bool Unlock::msgGame(const GameMessage &msg) {
 
 	byte walls = g_maps->_currentWalls & g_maps->_forwardMask;
 
-	if (!(g_maps->_currentState & 0x55 & g_maps->_forwardMask) || !walls) {
-		g_globals->_party.checkPartyDead();
-		return true;
-	}
+	bool canUnlock = true;
+	if (!(g_maps->_currentState & 0x55 & g_maps->_forwardMask) || !walls)
+		canUnlock = false;
 
 	int offset;
 	if (!(walls & 0x55)) {
@@ -53,12 +52,15 @@ bool Unlock::msgGame(const GameMessage &msg) {
 		offset = 2;
 	}
 
-	if (g_maps->_currentMap->dataByte(30 + offset) != 1) {
-		g_globals->_party.checkPartyDead();
-		return true;
+	if (g_maps->_currentMap->dataByte(30 + offset) != 1)
+		canUnlock = false;
+
+	if (canUnlock) {
+		WhoWillTry::display(charSelected);
+	} else {
+		g_events->send(InfoMessage(STRING["dialogs.unlock.none"]));
 	}
 
-	WhoWillTry::display(charSelected);
 	return true;
 }
 


Commit: 0016fe5febaec2feb984ae80c38c4d318133bb7e
    https://github.com/scummvm/scummvm/commit/0016fe5febaec2feb984ae80c38c4d318133bb7e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-21T21:02:27-07:00

Commit Message:
MM: MM1: Update minimap after moving before specials trigger

Changed paths:
    engines/mm/mm1/game/view_base.cpp


diff --git a/engines/mm/mm1/game/view_base.cpp b/engines/mm/mm1/game/view_base.cpp
index a77481f1753..985e3efab80 100644
--- a/engines/mm/mm1/game/view_base.cpp
+++ b/engines/mm/mm1/game/view_base.cpp
@@ -55,6 +55,11 @@ darkness:
 		_isDark = true;
 	}
 
+	// Refresh the view immediately, so things like the minimap will
+	// update before special actions run
+	g_events->redraw();
+	g_events->drawElements();
+
 	// Encounter checks
 	g_globals->_encounters._encounterType = NORMAL_SURPRISED;
 	if (maps._currentState & Maps::CELL_SPECIAL) {
@@ -71,9 +76,6 @@ darkness:
 	} else {
 		g_globals->_party.checkPartyDead();
 	}
-
-	// Flag to redraw the screen
-	g_events->redraw();
 }
 
 bool ViewBase::msgAction(const ActionMessage &msg) {




More information about the Scummvm-git-logs mailing list