[Scummvm-git-logs] scummvm master -> e7e18b79f7e0ab56e52165fec5779f354c6fd542

AndywinXp noreply at scummvm.org
Sun Oct 8 21:04:20 UTC 2023


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

Summary:
e7e18b79f7 SWORD1: Allow for immediate object look and combine


Commit: e7e18b79f7e0ab56e52165fec5779f354c6fd542
    https://github.com/scummvm/scummvm/commit/e7e18b79f7e0ab56e52165fec5779f354c6fd542
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-10-08T23:04:15+02:00

Commit Message:
SWORD1: Allow for immediate object look and combine

This stops George from walking or beginning its rest animation
when we perform an object look or combine on the top menu.
This is on the original code but we never implemented it...

Changed paths:
    engines/sword1/mouse.cpp


diff --git a/engines/sword1/mouse.cpp b/engines/sword1/mouse.cpp
index 65615900873..b83782a4da6 100644
--- a/engines/sword1/mouse.cpp
+++ b/engines/sword1/mouse.cpp
@@ -171,10 +171,25 @@ void Mouse::engine(uint16 x, uint16 y, uint16 eventFlags) {
 		Logic::_scriptVars[SPECIAL_ITEM] = 0;
 	if (_state & MOUSE_DOWN_MASK) {
 		if (_inTopMenu) {
-			if (Logic::_scriptVars[SECOND_ITEM])
+			if (Logic::_scriptVars[SECOND_ITEM]) {
+				if (Logic::_scriptVars[GEORGE_DOING_REST_ANIM] == 1) {
+					Logic::_scriptVars[GEORGE_DOING_REST_ANIM] = 0;
+				} else if (Logic::_scriptVars[GEORGE_WALKING]) {
+					Logic::_scriptVars[GEORGE_WALKING] = 2;
+				}
+
 				_logic->runMouseScript(NULL, _menu->_objectDefs[Logic::_scriptVars[SECOND_ITEM]].useScript);
-			if (Logic::_scriptVars[MENU_LOOKING])
+			}
+
+			if (Logic::_scriptVars[MENU_LOOKING]) {
+				if (Logic::_scriptVars[GEORGE_DOING_REST_ANIM] == 1) {
+					Logic::_scriptVars[GEORGE_DOING_REST_ANIM] = 0;
+				} else if (Logic::_scriptVars[GEORGE_WALKING]) {
+					Logic::_scriptVars[GEORGE_WALKING] = 2;
+				}
+
 				_logic->cfnPresetScript(NULL, -1, PLAYER, SCR_menu_look, 0, 0, 0, 0);
+			}
 		}
 
 		Logic::_scriptVars[MOUSE_BUTTON] = _state & MOUSE_DOWN_MASK;




More information about the Scummvm-git-logs mailing list