Minor cleanup and fixes for FF
svn-id: r21638
This commit is contained in:
parent
7e1618e329
commit
3023f6f76e
4 changed files with 24 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue