diff options
author | Travis Howell | 2006-10-22 07:43:11 +0000 |
---|---|---|
committer | Travis Howell | 2006-10-22 07:43:11 +0000 |
commit | 16005872a2ac17992cb941650ff018513da10986 (patch) | |
tree | 483997f6f0666e7c41f69a13fbedfd5660582a0f | |
parent | 196c2bf2545ac1a95c09c02078c29b0db7125ba5 (diff) | |
download | scummvm-rg350-16005872a2ac17992cb941650ff018513da10986.tar.gz scummvm-rg350-16005872a2ac17992cb941650ff018513da10986.tar.bz2 scummvm-rg350-16005872a2ac17992cb941650ff018513da10986.zip |
Cleanup
svn-id: r24430
-rw-r--r-- | engines/agos/agos.h | 4 | ||||
-rw-r--r-- | engines/agos/input.cpp | 58 |
2 files changed, 29 insertions, 33 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 5c3f1184f4..f7631b5ebb 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -662,6 +662,9 @@ protected: void unfreezeBottom(); TextLocation *getTextLocation(uint a); + + uint setVerbText(HitArea *ha); + void waitForInput(); void setup_cond_c_helper(); uint16 getBackExit(int n); @@ -756,7 +759,6 @@ protected: void displayName(HitArea * ha); void resetNameWindow(); void displayBoxStars(); - void waitForInput(); void invertBox_FF(HitArea *ha, bool state); void invertBox(HitArea * ha, byte a, byte b, byte c, byte d); diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp index d00bbe10b3..76562977d5 100644 --- a/engines/agos/input.cpp +++ b/engines/agos/input.cpp @@ -31,9 +31,32 @@ namespace AGOS { +uint AGOSEngine::setVerbText(HitArea *ha) { + uint id = 0xFFFF; + + if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) + return id; + + if (ha->flags & kBFTextBox) { + if (getGameType() == GType_PP) + id = ha->id; + else if (getGameType() == GType_FF && (_lastHitArea->flags & kBFHyperBox)) + id = ha->data; + else + id = ha->flags / 256; + } + if (getGameType() == GType_PP) + _variableArray[199] = id; + else if (getGameType() == GType_WW) + _variableArray[10] = id; + else + _variableArray[60] = id; + + return id; +} + void AGOSEngine::setup_cond_c_helper() { HitArea *last; - uint id; _noRightClick = 1; @@ -128,21 +151,7 @@ void AGOSEngine::setup_cond_c_helper() { inventoryDown(_lastHitArea->window); } else if (_lastHitArea->item_ptr != NULL) { _hitAreaObjectItem = _lastHitArea->item_ptr; - id = 0xFFFF; - if (_lastHitArea->flags & kBFTextBox) { - if (getGameType() == GType_PP) - id = _lastHitArea->id; - else if (getGameType() == GType_FF && (_lastHitArea->flags & kBFHyperBox)) - id = _lastHitArea->data; - else - id = _lastHitArea->flags / 256; - } - if (getGameType() == GType_PP) - _variableArray[199] = id; - else if (getGameType() == GType_WW) - _variableArray[10] = id; - else - _variableArray[60] = id; + setVerbText(_lastHitArea); break; } } @@ -241,22 +250,7 @@ startOver: ha->item_ptr) { if_1:; _hitAreaSubjectItem = ha->item_ptr; - id = 0xFFFF; - if (ha->flags & kBFTextBox) { - if (getGameType() == GType_PP) - id = _lastHitArea->id; - else if (getGameType() == GType_FF && (ha->flags & kBFHyperBox)) - id = ha->data; - else - id = ha->flags / 256; - } - if (getGameType() == GType_PP) - _variableArray[199] = id; - else if (getGameType() == GType_WW) - _variableArray[10] = id; - else - _variableArray[60] = id; - + id = setVerbText(ha); _nameLocked = 2; displayName(ha); _nameLocked = 1; |