From 491dd07e6812074a960ec81e12752eb12a1a6f51 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 21 Mar 2018 08:08:06 +0100 Subject: LILLUPUT: Add missing kActionType values --- engines/lilliput/lilliput.cpp | 8 ++++---- engines/lilliput/script.cpp | 4 ++-- engines/lilliput/script.h | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index 8275cacfbb..2e3ff0ae39 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -911,7 +911,7 @@ void LilliputEngine::sub15F75() { return; _savedMousePosDivided = Common::Point(newX, newY); - _actionType = 5; + _actionType = kCubeSelected; } void LilliputEngine::unselectInterfaceHotspots() { @@ -1954,7 +1954,7 @@ void LilliputEngine::checkClickOnGameArea(Common::Point pos) { arrowX += _scriptHandler->_viewportPos.x; arrowY += _scriptHandler->_viewportPos.y; _savedMousePosDivided = Common::Point(arrowX, arrowY); - _actionType = 5; + _actionType = kCubeSelected; } } @@ -2011,7 +2011,7 @@ void LilliputEngine::handleInterfaceHotspot(byte index, byte button) { if (button == 2) { if (!_delayedReactivationAction) { _scriptHandler->_interfaceHotspotStatus[index] = kHotspotEnabled; - _actionType = 2; + _actionType = kButtonReleased; displayInterfaceHotspots(); } return; @@ -2028,7 +2028,7 @@ void LilliputEngine::handleInterfaceHotspot(byte index, byte button) { _delayedReactivationAction = true; _displayGreenHand = true; } else { - _actionType = 1; + _actionType = kButtonPressed; } displayInterfaceHotspots(); diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index 255f1309ea..4721f0e75a 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -1840,7 +1840,7 @@ byte LilliputScript::OC_checkLastInterfaceHotspotIndexMenu13() { byte tmpVal = (_currScript->readUint16LE() & 0xFF); - if ((_vm->_actionType != 1) && (_vm->_actionType != kActionTalk)) + if ((_vm->_actionType != kButtonPressed) && (_vm->_actionType != kActionTalk)) return 0; if (tmpVal == _vm->_lastInterfaceHotspotIndex) @@ -1854,7 +1854,7 @@ byte LilliputScript::OC_checkLastInterfaceHotspotIndexMenu2() { int8 hotspotIndex = (_currScript->readUint16LE() & 0xFF); - if ((_vm->_actionType == 2) && (hotspotIndex == _vm->_lastInterfaceHotspotIndex)) + if ((_vm->_actionType == kButtonReleased) && (hotspotIndex == _vm->_lastInterfaceHotspotIndex)) return 1; return 0; diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h index 51f313ec57..ad40806c25 100644 --- a/engines/lilliput/script.h +++ b/engines/lilliput/script.h @@ -36,8 +36,11 @@ class LilliputEngine; enum kActionType { kActionNone = 0, + kButtonPressed = 1, + kButtonReleased = 2, kActionTalk = 3, kActionGoto = 4, + kCubeSelected = 5, kCodeEntered = 6 }; -- cgit v1.2.3