diff options
author | Travis Howell | 2006-04-06 08:21:44 +0000 |
---|---|---|
committer | Travis Howell | 2006-04-06 08:21:44 +0000 |
commit | 3023f6f76ee0bcbbd8dd82849f4ed2b7afb7e4c9 (patch) | |
tree | 08f8b5f1f6995df61a114281d6db8e9fa5597171 /engines/simon | |
parent | 7e1618e329bc19eb07e27ae5cc084ea701bfcbfd (diff) | |
download | scummvm-rg350-3023f6f76ee0bcbbd8dd82849f4ed2b7afb7e4c9.tar.gz scummvm-rg350-3023f6f76ee0bcbbd8dd82849f4ed2b7afb7e4c9.tar.bz2 scummvm-rg350-3023f6f76ee0bcbbd8dd82849f4ed2b7afb7e4c9.zip |
Minor cleanup and fixes for FF
svn-id: r21638
Diffstat (limited to 'engines/simon')
-rw-r--r-- | engines/simon/oracle.cpp | 4 | ||||
-rw-r--r-- | engines/simon/simon.cpp | 2 | ||||
-rw-r--r-- | engines/simon/simon.h | 6 | ||||
-rw-r--r-- | engines/simon/verb.cpp | 26 |
4 files changed, 24 insertions, 14 deletions
diff --git a/engines/simon/oracle.cpp b/engines/simon/oracle.cpp index d7e0bc101a..f1998d8946 100644 --- a/engines/simon/oracle.cpp +++ b/engines/simon/oracle.cpp @@ -115,7 +115,7 @@ void SimonEngine::oracleTextUp() { setBitFlag(94, false); bltOracleText(); } - if (_currentBoxNumber != 600 || _leftButtonDown) + if (_currentBoxNumber != 600 || !_leftButtonDown) break; } } @@ -149,7 +149,7 @@ void SimonEngine::oracleTextDown() { setBitFlag(93, false); bltOracleText(); } - if (_currentBoxNumber != 600 || _leftButtonDown) + if (_currentBoxNumber != 601 || !_leftButtonDown) break; } } diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index ab38dfc137..dde392d131 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -1948,7 +1948,7 @@ startOver: if (ha->flags & 1) id = ha->flags / 256; _variableArray[60] = id; - new_current_hitarea(ha); + displayName(ha); if (_verbHitArea != 0) break; } else { diff --git a/engines/simon/simon.h b/engines/simon/simon.h index 824a1cf84d..d1addbd497 100644 --- a/engines/simon/simon.h +++ b/engines/simon/simon.h @@ -653,9 +653,9 @@ protected: uint get_fcs_ptr_3_index(WindowBlock *window); void setup_hitarea_from_pos(uint x, uint y, uint mode); - void new_current_hitarea(HitArea * ha); - bool hitarea_proc_2(uint a); - bool hitarea_proc_3(Item *item); + void displayName(HitArea * ha); + bool printTextOf(uint a); + bool printNameOf(Item *item); void f10_key(); void hitarea_stuff(); diff --git a/engines/simon/verb.cpp b/engines/simon/verb.cpp index a8eb7d7f77..3cf0b4fd94 100644 --- a/engines/simon/verb.cpp +++ b/engines/simon/verb.cpp @@ -192,6 +192,14 @@ void SimonEngine::defocusHitarea() { HitArea *last; HitArea *ha; + if (getGameType() == GType_FF) { + if (getBitFlag(79)) { + o_sync(202); + _lastHitArea2Ptr = NULL; + return; + } + } + if (getGameType() == GType_SIMON2) { if (getBitFlag(79)) { o_sync(202); @@ -568,7 +576,7 @@ void SimonEngine::inventoryUp(WindowBlock *window) { checkUp(window); loadSprite(4, 9 ,21 ,0 ,0, 0); while(1) { - if (_currentBoxNumber != 32763 || _leftButtonDown) + if (_currentBoxNumber != 0x7FFB || !_leftButtonDown) break; checkUp(window); } @@ -594,7 +602,7 @@ void SimonEngine::inventoryDown(WindowBlock *window) { checkDown(window); loadSprite(4, 9, 23, 0, 0, 0); while(1) { - if (_currentBoxNumber != 32764 || _leftButtonDown) + if (_currentBoxNumber != 0x7FFC || !_leftButtonDown) break; checkDown(window); } @@ -646,6 +654,8 @@ void SimonEngine::setup_hitarea_from_pos(uint x, uint y, uint mode) { } } while (ha++, --count); + _currentBoxNumber = 0; + if (best_ha == NULL) { defocusHitarea(); return; @@ -662,7 +672,7 @@ void SimonEngine::setup_hitarea_from_pos(uint x, uint y, uint mode) { if (best_ha->flags & 4) { defocusHitarea(); } else if (best_ha != _lastHitArea2Ptr) { - new_current_hitarea(best_ha); + displayName(best_ha); } if (best_ha->flags & 8 && !(best_ha->flags & 2)) { @@ -673,21 +683,21 @@ void SimonEngine::setup_hitarea_from_pos(uint x, uint y, uint mode) { return; } -void SimonEngine::new_current_hitarea(HitArea *ha) { +void SimonEngine::displayName(HitArea *ha) { bool result; hitareaChangedHelper(); if (ha->flags & 1) { - result = hitarea_proc_2(ha->flags >> 8); + result = printTextOf(ha->flags >> 8); } else { - result = hitarea_proc_3(ha->item_ptr); + result = printNameOf(ha->item_ptr); } if (result) _lastHitArea2Ptr = ha; } -bool SimonEngine::hitarea_proc_2(uint a) { +bool SimonEngine::printTextOf(uint a) { uint x; const byte *string_ptr; @@ -716,7 +726,7 @@ bool SimonEngine::hitarea_proc_2(uint a) { return true; } -bool SimonEngine::hitarea_proc_3(Item *item) { +bool SimonEngine::printNameOf(Item *item) { Child2 *child2; uint x; const byte *string_ptr; |