MOHAWK: The ignoreNextMouseUp workaround is not necessary anymore
We now check the mouse up event happens on the same hotspot as the mouse down event.
This commit is contained in:
parent
c1331e124f
commit
9b2c90c0b3
3 changed files with 2 additions and 17 deletions
|
@ -56,7 +56,6 @@ MohawkEngine_Riven::MohawkEngine_Riven(OSystem *syst, const MohawkGameDescriptio
|
|||
_gameOver = false;
|
||||
_activatedPLST = false;
|
||||
_activatedSLST = false;
|
||||
_ignoreNextMouseUp = false;
|
||||
_extrasFile = nullptr;
|
||||
_curStack = kStackUnknown;
|
||||
_gfx = nullptr;
|
||||
|
@ -230,13 +229,8 @@ void MohawkEngine_Riven::handleEvents() {
|
|||
_card->onMouseDown(_eventMan->getMousePos());
|
||||
break;
|
||||
case Common::EVENT_LBUTTONUP:
|
||||
// See RivenScript::switchCard() for more information on why we sometimes
|
||||
// disable the next up event.
|
||||
if (!_ignoreNextMouseUp) {
|
||||
_card->onMouseUp(_eventMan->getMousePos());
|
||||
checkInventoryClick();
|
||||
}
|
||||
_ignoreNextMouseUp = false;
|
||||
_card->onMouseUp(_eventMan->getMousePos());
|
||||
checkInventoryClick();
|
||||
break;
|
||||
case Common::EVENT_KEYDOWN:
|
||||
switch (event.kbd.keycode) {
|
||||
|
|
|
@ -155,7 +155,6 @@ private:
|
|||
|
||||
// Miscellaneous
|
||||
bool _gameOver;
|
||||
bool _ignoreNextMouseUp;
|
||||
void checkSunnerAlertClick();
|
||||
|
||||
public:
|
||||
|
@ -183,7 +182,6 @@ public:
|
|||
|
||||
// Miscellaneous
|
||||
void setGameOver() { _gameOver = true; }
|
||||
void ignoreNextMouseUp() { _ignoreNextMouseUp = true; }
|
||||
Common::SeekableReadStream *getExtrasResource(uint32 tag, uint16 id);
|
||||
bool _activatedPLST;
|
||||
bool _activatedSLST;
|
||||
|
|
|
@ -303,13 +303,6 @@ void RivenSimpleCommand::drawBitmap(uint16 op, uint16 argc, uint16 *argv) {
|
|||
// Command 2: go to card (card id)
|
||||
void RivenSimpleCommand::switchCard(uint16 op, uint16 argc, uint16 *argv) {
|
||||
_vm->changeToCard(argv[0]);
|
||||
|
||||
// WORKAROUND: If we changed card on a mouse down event,
|
||||
// we want to ignore the next mouse up event so we don't
|
||||
// change card when lifting the mouse on the next card.
|
||||
// TODO: Restore
|
||||
// if (_scriptType == kMouseDownScript)
|
||||
// _vm->ignoreNextMouseUp();
|
||||
}
|
||||
|
||||
// Command 3: play an SLST from the script
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue