[Scummvm-git-logs] scummvm master -> 70f95082958785d00ffa6744ce244f656e471901
mgerhardy
noreply at scummvm.org
Tue Jun 30 14:49:10 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
f67c3e750b MACS2: fixed scriptResetToSceneScript which broke scene 17 after preparing the jumping crackers
70f9508295 MACS2: added macs2_translation.dat
Commit: f67c3e750beb7c89032e17040f9aa7d7f55265d2
https://github.com/scummvm/scummvm/commit/f67c3e750beb7c89032e17040f9aa7d7f55265d2
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2026-06-30T16:49:00+02:00
Commit Message:
MACS2: fixed scriptResetToSceneScript which broke scene 17 after preparing the jumping crackers
Changed paths:
engines/macs2/scriptexecutor.cpp
engines/macs2/view1.cpp
engines/macs2/view1.h
diff --git a/engines/macs2/scriptexecutor.cpp b/engines/macs2/scriptexecutor.cpp
index 4110f11e7c1..da5990d9ea5 100644
--- a/engines/macs2/scriptexecutor.cpp
+++ b/engines/macs2/scriptexecutor.cpp
@@ -2388,6 +2388,7 @@ void Script::ScriptExecutor::scriptDismissAllPanels() {
currentView->_uiPanelState = View1::kUiPanelNone;
currentView->_pendingPanelRequest = View1::kPanelRequestNone;
currentView->_isDialogueChoiceInputActive = false;
+ currentView->_activeInventoryItem = nullptr;
currentView->clearClickedButtonIndex();
}
@@ -2399,6 +2400,7 @@ void Script::ScriptExecutor::scriptResetToSceneScript() {
_executingObjectIndex = Scenes::instance()._currentSceneIndex;
_scriptExecutionState = ScriptExecutionState::ExecutingSceneScript;
setCurrentSceneScriptAt(0);
+ _expectedEndLocation = 0;
}
void Script::ScriptExecutor::scriptLoadOverlayFont() {
diff --git a/engines/macs2/view1.cpp b/engines/macs2/view1.cpp
index a0cd2cacba7..b4086595442 100644
--- a/engines/macs2/view1.cpp
+++ b/engines/macs2/view1.cpp
@@ -1086,6 +1086,21 @@ bool View1::msgFocus(const FocusMessage &msg) {
return true;
}
+void View1::runInventoryPanelScriptIfPending(bool excludeCloseButton) {
+ if (_pendingPanelRequest != kPanelRequestNone) {
+ _uiBackgroundRestorePending = true;
+ }
+ redraw();
+ if (_pendingPanelRequest == kPanelRequestNone) {
+ return;
+ }
+ if (excludeCloseButton && _clickedButtonIndex == 6) {
+ return;
+ }
+ g_engine->runScriptExecutor(false);
+ _pendingPanelRequest = kPanelRequestNone;
+}
+
bool View1::handleInventoryClick(const MouseDownMessage &msg) {
// Binary handleInventoryClick (1008:4d07): only when g_wClickedButtonIndex == 0.
if (_clickedButtonIndex != 0) {
@@ -1195,8 +1210,8 @@ bool View1::handleInventoryClick(const MouseDownMessage &msg) {
g_engine->_scriptExecutor->_interactedObjectID = 0x400 + clickedObject->_index;
g_engine->_scriptExecutor->_interactedInventoryItemId = 0;
_clickedButtonIndex = 5;
- _uiBackgroundRestorePending = true;
- g_engine->runScriptExecutor(false);
+ _pendingPanelRequest = kPanelRequestInventory;
+ runInventoryPanelScriptIfPending(true);
return true;
}
if (clickedObject != nullptr && g_engine->_scriptExecutor->_cursorMode == Script::MouseMode::Use) {
@@ -1217,14 +1232,13 @@ bool View1::handleInventoryClick(const MouseDownMessage &msg) {
if (_activeInventoryItem != nullptr && clickedObject != nullptr) {
// Use item on item (combine): from handleInventoryClick grid hit-test, mode 0x17.
// Binary sets interactedObjectId (source) + interactedInventoryItemId (target),
- // then triggers runScriptExecutor via g_wHasSavedUiBackground. Does NOT set
- // g_wInventoryCombineFlag here (that's only in the Drop button path).
- // Panel state stays at 2 (inventory) - draw cycle hides panel when text shows.
+ // g_wPendingPanelRequest=1, then epilogue runScriptExecutor (clears pending after return).
+ // Does NOT set g_wInventoryCombineFlag here (that's only in the Drop button path).
g_engine->_scriptExecutor->_interactedObjectID = 0x400 + _activeInventoryItem->_index;
g_engine->_scriptExecutor->_interactedInventoryItemId = 0x400 + clickedObject->_index;
_clickedButtonIndex = 5;
- _uiBackgroundRestorePending = true;
- g_engine->runScriptExecutor(false);
+ _pendingPanelRequest = kPanelRequestInventory;
+ runInventoryPanelScriptIfPending(true);
}
return true;
@@ -1302,13 +1316,11 @@ bool View1::handleContainerInventoryClick(const MouseDownMessage &msg) {
GameObject *clickedObject = getClickedInventoryItem(msg._pos);
if (clickedObject != nullptr && g_engine->_scriptExecutor->_cursorMode == Script::MouseMode::Look) {
- // Binary: Look on container item triggers runScriptExecutor immediately
- // (g_wPendingPanelRequest = 1 path in original)
g_engine->_scriptExecutor->_interactedObjectID = 0x400 + clickedObject->_index;
g_engine->_scriptExecutor->_interactedInventoryItemId = 0;
_clickedButtonIndex = 5;
- _uiBackgroundRestorePending = true;
- g_engine->runScriptExecutor(false);
+ _pendingPanelRequest = kPanelRequestInventory;
+ runInventoryPanelScriptIfPending(false);
return true;
}
if (clickedObject != nullptr && g_engine->_scriptExecutor->_cursorMode == Script::MouseMode::Use) {
diff --git a/engines/macs2/view1.h b/engines/macs2/view1.h
index f670d5597f4..697abc98571 100644
--- a/engines/macs2/view1.h
+++ b/engines/macs2/view1.h
@@ -262,6 +262,9 @@ private:
bool handleInventoryClick(const MouseDownMessage &msg);
bool handleContainerInventoryClick(const MouseDownMessage &msg);
+ // Binary handleInventoryClick / handleContainerInventoryClick epilogue:
+ // if pending != 0 -> uiBackgroundRestorePending=1; flip; runScriptExecutor; pending=0.
+ void runInventoryPanelScriptIfPending(bool excludeCloseButton);
bool handleActionBarClick(const MouseDownMessage &msg);
// Input state machine from handleInput (1008:e8bf).
Commit: 70f95082958785d00ffa6744ce244f656e471901
https://github.com/scummvm/scummvm/commit/70f95082958785d00ffa6744ce244f656e471901
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2026-06-30T16:49:00+02:00
Commit Message:
MACS2: added macs2_translation.dat
Changed paths:
A dists/engine-data/macs2_translation.dat
diff --git a/dists/engine-data/macs2_translation.dat b/dists/engine-data/macs2_translation.dat
new file mode 100644
index 00000000000..61df7641bbb
Binary files /dev/null and b/dists/engine-data/macs2_translation.dat differ
More information about the Scummvm-git-logs
mailing list