diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 65b11ee4029..b66e2ee598f 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -1247,7 +1247,7 @@ bool Gui::processEvent(Common::Event &event) { bool Gui::processCommandEvents(WindowClick click, Common::Event &event) { if (event.type == Common::EVENT_LBUTTONUP) { if (_engine->needsClickToContinue()) { - _engine->activateCommand(kClickToContinue); + _engine->selectControl(kClickToContinue); return true; } @@ -1271,7 +1271,6 @@ bool Gui::processCommandEvents(WindowClick click, Common::Event &event) { } _engine->selectControl(data.getData().refcon); - _engine->activateCommand(data.getData().refcon); _engine->refreshReady(); _engine->preparedToRun(); } diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp index 2eb3115bb44..48511c9330f 100644 --- a/engines/macventure/macventure.cpp +++ b/engines/macventure/macventure.cpp @@ -270,21 +270,13 @@ void MacVentureEngine::requestUnpause() { void MacVentureEngine::selectControl(ControlAction id) { debugC(2, kMVDebugMain, "Select control %x", id); - _selectedControl = id; -} - -void MacVentureEngine::activateCommand(ControlAction id) { if (id == kClickToContinue) { _clickToContinue = false; _paused = true; return; } - if (id != _activeControl) { - if (_activeControl) - _activeControl = kNoCommand; - _activeControl = id; - } - debugC(2, kMVDebugMain, "Activating Command %x... Command %x is active", id, _activeControl); + + _selectedControl = id; refreshReady(); } @@ -408,7 +400,6 @@ void MacVentureEngine::handleObjectSelect(ObjID objID, WindowReference win, bool setDeltaPoint(Common::Point(0, 0)); if (!_cmdReady) { selectControl(kActivateObject); - _activeControl = kActivateObject; _cmdReady = true; } } else { @@ -426,7 +417,6 @@ void MacVentureEngine::handleObjectDrop(ObjID objID, Common::Point delta, ObjID _destObject = newParent; setDeltaPoint(delta); selectControl(kMoveObject); - activateCommand(kMoveObject); refreshReady(); preparedToRun(); } @@ -655,16 +645,14 @@ void MacVentureEngine::playSounds(bool pause) { } void MacVentureEngine::updateControls() { - if (_activeControl) - _activeControl = kNoCommand; + _selectedControl = kNoCommand; _gui->clearControls(); toggleExits(); resetVars(); } void MacVentureEngine::resetVars() { - _selectedControl = kNoCommand; - _activeControl = kNoCommand; + selectControl(kNoCommand); _currentSelection.clear(); _destObject = 0; setDeltaPoint(Common::Point(0, 0)); diff --git a/engines/macventure/macventure.h b/engines/macventure/macventure.h index a87af743336..72d09a8b119 100644 --- a/engines/macventure/macventure.h +++ b/engines/macventure/macventure.h @@ -201,7 +201,6 @@ public: void requestQuit(); void requestUnpause(); void selectControl(ControlAction action); - void activateCommand(ControlAction id); void refreshReady(); void preparedToRun(); void gameChanged(); @@ -344,7 +343,6 @@ private: // Attributes // Selections ObjID _destObject; ControlAction _selectedControl; - ControlAction _activeControl; Common::Array _currentSelection; Common::Array _selectedObjs; Common::Point _deltaPoint; diff --git a/engines/macventure/script.cpp b/engines/macventure/script.cpp index d191cefa124..a051ca8f75b 100644 --- a/engines/macventure/script.cpp +++ b/engines/macventure/script.cpp @@ -1083,7 +1083,7 @@ void ScriptEngine::opd5DLOG(EngineState * state, EngineFrame * frame) { } void ScriptEngine::opd6ACMD(EngineState * state, EngineFrame * frame) { - _engine->activateCommand((ControlAction)state->pop()); + _engine->selectControl((ControlAction)state->pop()); } void ScriptEngine::opd7LOSE(EngineState * state, EngineFrame * frame) {