diff options
Diffstat (limited to 'engines/agos/verb.cpp')
-rw-r--r-- | engines/agos/verb.cpp | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp index faedabcb32..7938cec0ab 100644 --- a/engines/agos/verb.cpp +++ b/engines/agos/verb.cpp @@ -190,34 +190,37 @@ void AGOSEngine_Feeble::clearName() { return; } -void AGOSEngine::clearName() { - if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) +void AGOSEngine_Simon2::clearName() { + if (getBitFlag(79)) { + sendSync(202); + _lastNameOn = NULL; return; + } - //if (_nameLocked == 1) - // return; + AGOSEngine_Simon1::clearName(); +} - HitArea *last; +void AGOSEngine_Simon1::clearName() { HitArea *ha; - if (getGameType() == GType_SIMON2) { - if (getBitFlag(79)) { - sendSync(202); - _lastNameOn = NULL; - return; - } - } + if (_currentVerbBox == _lastVerbOn) + return; - last = _currentVerbBox; + resetNameWindow(); + _lastVerbOn = _currentVerbBox; + + if (_currentVerbBox != NULL && (ha = findBox(200)) && (ha->flags & kBFBoxDead) && !(_currentVerbBox->flags & kBFBoxDead)) + printVerbOf(_currentVerbBox->id); +} - if (last == _lastVerbOn) +void AGOSEngine::clearName() { + if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) return; - resetNameWindow(); - _lastVerbOn = last; + if (_nameLocked == 1 || _lastNameOn == 0) + return; - if (last != NULL && (ha = findBox(200)) && (ha->flags & kBFBoxDead) && !(last->flags & kBFBoxDead)) - printVerbOf(last->id); + resetNameWindow(); } void AGOSEngine::printVerbOf(uint hitarea_id) { @@ -733,13 +736,13 @@ void AGOSEngine::boxController(uint x, uint y, uint mode) { } } - //if (_nameLocked == 0) { + if (getGameType() != GType_WW || _nameLocked == 0) { if (best_ha->flags & kBFNoTouchName) { clearName(); } else if (best_ha != _lastNameOn) { displayName(best_ha); } - //} + } if (best_ha->flags & kBFInvertTouch && !(best_ha->flags & kBFBoxSelected)) { hitarea_leave(best_ha, false); |