diff options
author | Max Horn | 2007-03-18 14:33:13 +0000 |
---|---|---|
committer | Max Horn | 2007-03-18 14:33:13 +0000 |
commit | 8bf795383962b299b824f5f08be2a8860a09e67c (patch) | |
tree | 327531b318ab0591f839e8ce01fda34b943c8ddf /engines/agos | |
parent | 003dfed001023d657ceba50dd1aa47eb6271c44d (diff) | |
download | scummvm-rg350-8bf795383962b299b824f5f08be2a8860a09e67c.tar.gz scummvm-rg350-8bf795383962b299b824f5f08be2a8860a09e67c.tar.bz2 scummvm-rg350-8bf795383962b299b824f5f08be2a8860a09e67c.zip |
Refactoring AGOSEngine::waitForInput some more (in baby steps, so that if I break something, it'll be easier to figure out at which point I did it :)
svn-id: r26210
Diffstat (limited to 'engines/agos')
-rw-r--r-- | engines/agos/input.cpp | 86 |
1 files changed, 45 insertions, 41 deletions
diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp index 54ad8af05e..6ec2bd7690 100644 --- a/engines/agos/input.cpp +++ b/engines/agos/input.cpp @@ -202,59 +202,63 @@ startOver: goto startOver; if (_lastHitArea3 != 0) break; - if (_dragMode != 0) { - ha = _lastClickRem; + if (_dragMode != 0) + break; + hitarea_stuff_helper(); + delay(100); + } - if (ha == 0 || ha->item_ptr == NULL || !(ha->flags & kBFDragBox)) { + if (_lastHitArea3 != 0) { + // ... + } else if (_dragMode != 0) { + ha = _lastClickRem; + + if (ha == 0 || ha->item_ptr == NULL || !(ha->flags & kBFDragBox)) { + _dragFlag = 0; + _dragMode = 0; + _dragCount = 0; + _dragEnd = 0; + goto startOver; + } + + _hitAreaSubjectItem = ha->item_ptr; + _verbHitArea = 500; + + do { + processSpecialKeys(); + hitarea_stuff_helper(); + delay(100); + + if (_dragFlag == 0) { _dragFlag = 0; _dragMode = 0; _dragCount = 0; _dragEnd = 0; goto startOver; } - - _hitAreaSubjectItem = ha->item_ptr; - _verbHitArea = 500; - - for (;;) { - processSpecialKeys(); - hitarea_stuff_helper(); - delay(100); - - if (_dragFlag == 0) { - _dragFlag = 0; - _dragMode = 0; - _dragCount = 0; - _dragEnd = 0; - goto startOver; - } - - if (_dragEnd != 0) - break; - } - - _dragFlag = 0; - _dragMode = 0; - _dragCount = 0; - _dragEnd = 0; - - boxController(_mouse.x, _mouse.y, 1); - - if (_currentBox != NULL) { - _hitAreaObjectItem = _currentBox->item_ptr; - setVerbText(ha); - } - - goto out_of_here; + } while (!_dragEnd); + + _dragFlag = 0; + _dragMode = 0; + _dragCount = 0; + _dragEnd = 0; + + boxController(_mouse.x, _mouse.y, 1); + + if (_currentBox != NULL) { + _hitAreaObjectItem = _currentBox->item_ptr; + setVerbText(ha); } - hitarea_stuff_helper(); - delay(100); + + goto out_of_here; } ha = _lastHitArea; + if (_lastHitArea == NULL) { + continue; + } - if (ha == NULL) { - } else if (ha->id == 0x7FFB) { + if (ha->id == 0x7FFB) { inventoryUp(ha->window); } else if (ha->id == 0x7FFC) { inventoryDown(ha->window); |