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;
|
_gameOver = false;
|
||||||
_activatedPLST = false;
|
_activatedPLST = false;
|
||||||
_activatedSLST = false;
|
_activatedSLST = false;
|
||||||
_ignoreNextMouseUp = false;
|
|
||||||
_extrasFile = nullptr;
|
_extrasFile = nullptr;
|
||||||
_curStack = kStackUnknown;
|
_curStack = kStackUnknown;
|
||||||
_gfx = nullptr;
|
_gfx = nullptr;
|
||||||
|
@ -230,13 +229,8 @@ void MohawkEngine_Riven::handleEvents() {
|
||||||
_card->onMouseDown(_eventMan->getMousePos());
|
_card->onMouseDown(_eventMan->getMousePos());
|
||||||
break;
|
break;
|
||||||
case Common::EVENT_LBUTTONUP:
|
case Common::EVENT_LBUTTONUP:
|
||||||
// See RivenScript::switchCard() for more information on why we sometimes
|
_card->onMouseUp(_eventMan->getMousePos());
|
||||||
// disable the next up event.
|
checkInventoryClick();
|
||||||
if (!_ignoreNextMouseUp) {
|
|
||||||
_card->onMouseUp(_eventMan->getMousePos());
|
|
||||||
checkInventoryClick();
|
|
||||||
}
|
|
||||||
_ignoreNextMouseUp = false;
|
|
||||||
break;
|
break;
|
||||||
case Common::EVENT_KEYDOWN:
|
case Common::EVENT_KEYDOWN:
|
||||||
switch (event.kbd.keycode) {
|
switch (event.kbd.keycode) {
|
||||||
|
|
|
@ -155,7 +155,6 @@ private:
|
||||||
|
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
bool _gameOver;
|
bool _gameOver;
|
||||||
bool _ignoreNextMouseUp;
|
|
||||||
void checkSunnerAlertClick();
|
void checkSunnerAlertClick();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -183,7 +182,6 @@ public:
|
||||||
|
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
void setGameOver() { _gameOver = true; }
|
void setGameOver() { _gameOver = true; }
|
||||||
void ignoreNextMouseUp() { _ignoreNextMouseUp = true; }
|
|
||||||
Common::SeekableReadStream *getExtrasResource(uint32 tag, uint16 id);
|
Common::SeekableReadStream *getExtrasResource(uint32 tag, uint16 id);
|
||||||
bool _activatedPLST;
|
bool _activatedPLST;
|
||||||
bool _activatedSLST;
|
bool _activatedSLST;
|
||||||
|
|
|
@ -303,13 +303,6 @@ void RivenSimpleCommand::drawBitmap(uint16 op, uint16 argc, uint16 *argv) {
|
||||||
// Command 2: go to card (card id)
|
// Command 2: go to card (card id)
|
||||||
void RivenSimpleCommand::switchCard(uint16 op, uint16 argc, uint16 *argv) {
|
void RivenSimpleCommand::switchCard(uint16 op, uint16 argc, uint16 *argv) {
|
||||||
_vm->changeToCard(argv[0]);
|
_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
|
// Command 3: play an SLST from the script
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue