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);
|
setBitFlag(94, false);
|
||||||
bltOracleText();
|
bltOracleText();
|
||||||
}
|
}
|
||||||
if (_currentBoxNumber != 600 || _leftButtonDown)
|
if (_currentBoxNumber != 600 || !_leftButtonDown)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ void SimonEngine::oracleTextDown() {
|
||||||
setBitFlag(93, false);
|
setBitFlag(93, false);
|
||||||
bltOracleText();
|
bltOracleText();
|
||||||
}
|
}
|
||||||
if (_currentBoxNumber != 600 || _leftButtonDown)
|
if (_currentBoxNumber != 601 || !_leftButtonDown)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1948,7 +1948,7 @@ startOver:
|
||||||
if (ha->flags & 1)
|
if (ha->flags & 1)
|
||||||
id = ha->flags / 256;
|
id = ha->flags / 256;
|
||||||
_variableArray[60] = id;
|
_variableArray[60] = id;
|
||||||
new_current_hitarea(ha);
|
displayName(ha);
|
||||||
if (_verbHitArea != 0)
|
if (_verbHitArea != 0)
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -653,9 +653,9 @@ protected:
|
||||||
uint get_fcs_ptr_3_index(WindowBlock *window);
|
uint get_fcs_ptr_3_index(WindowBlock *window);
|
||||||
|
|
||||||
void setup_hitarea_from_pos(uint x, uint y, uint mode);
|
void setup_hitarea_from_pos(uint x, uint y, uint mode);
|
||||||
void new_current_hitarea(HitArea * ha);
|
void displayName(HitArea * ha);
|
||||||
bool hitarea_proc_2(uint a);
|
bool printTextOf(uint a);
|
||||||
bool hitarea_proc_3(Item *item);
|
bool printNameOf(Item *item);
|
||||||
void f10_key();
|
void f10_key();
|
||||||
void hitarea_stuff();
|
void hitarea_stuff();
|
||||||
|
|
||||||
|
|
|
@ -192,6 +192,14 @@ void SimonEngine::defocusHitarea() {
|
||||||
HitArea *last;
|
HitArea *last;
|
||||||
HitArea *ha;
|
HitArea *ha;
|
||||||
|
|
||||||
|
if (getGameType() == GType_FF) {
|
||||||
|
if (getBitFlag(79)) {
|
||||||
|
o_sync(202);
|
||||||
|
_lastHitArea2Ptr = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (getGameType() == GType_SIMON2) {
|
if (getGameType() == GType_SIMON2) {
|
||||||
if (getBitFlag(79)) {
|
if (getBitFlag(79)) {
|
||||||
o_sync(202);
|
o_sync(202);
|
||||||
|
@ -568,7 +576,7 @@ void SimonEngine::inventoryUp(WindowBlock *window) {
|
||||||
checkUp(window);
|
checkUp(window);
|
||||||
loadSprite(4, 9 ,21 ,0 ,0, 0);
|
loadSprite(4, 9 ,21 ,0 ,0, 0);
|
||||||
while(1) {
|
while(1) {
|
||||||
if (_currentBoxNumber != 32763 || _leftButtonDown)
|
if (_currentBoxNumber != 0x7FFB || !_leftButtonDown)
|
||||||
break;
|
break;
|
||||||
checkUp(window);
|
checkUp(window);
|
||||||
}
|
}
|
||||||
|
@ -594,7 +602,7 @@ void SimonEngine::inventoryDown(WindowBlock *window) {
|
||||||
checkDown(window);
|
checkDown(window);
|
||||||
loadSprite(4, 9, 23, 0, 0, 0);
|
loadSprite(4, 9, 23, 0, 0, 0);
|
||||||
while(1) {
|
while(1) {
|
||||||
if (_currentBoxNumber != 32764 || _leftButtonDown)
|
if (_currentBoxNumber != 0x7FFC || !_leftButtonDown)
|
||||||
break;
|
break;
|
||||||
checkDown(window);
|
checkDown(window);
|
||||||
}
|
}
|
||||||
|
@ -646,6 +654,8 @@ void SimonEngine::setup_hitarea_from_pos(uint x, uint y, uint mode) {
|
||||||
}
|
}
|
||||||
} while (ha++, --count);
|
} while (ha++, --count);
|
||||||
|
|
||||||
|
_currentBoxNumber = 0;
|
||||||
|
|
||||||
if (best_ha == NULL) {
|
if (best_ha == NULL) {
|
||||||
defocusHitarea();
|
defocusHitarea();
|
||||||
return;
|
return;
|
||||||
|
@ -662,7 +672,7 @@ void SimonEngine::setup_hitarea_from_pos(uint x, uint y, uint mode) {
|
||||||
if (best_ha->flags & 4) {
|
if (best_ha->flags & 4) {
|
||||||
defocusHitarea();
|
defocusHitarea();
|
||||||
} else if (best_ha != _lastHitArea2Ptr) {
|
} else if (best_ha != _lastHitArea2Ptr) {
|
||||||
new_current_hitarea(best_ha);
|
displayName(best_ha);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (best_ha->flags & 8 && !(best_ha->flags & 2)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimonEngine::new_current_hitarea(HitArea *ha) {
|
void SimonEngine::displayName(HitArea *ha) {
|
||||||
bool result;
|
bool result;
|
||||||
|
|
||||||
hitareaChangedHelper();
|
hitareaChangedHelper();
|
||||||
if (ha->flags & 1) {
|
if (ha->flags & 1) {
|
||||||
result = hitarea_proc_2(ha->flags >> 8);
|
result = printTextOf(ha->flags >> 8);
|
||||||
} else {
|
} else {
|
||||||
result = hitarea_proc_3(ha->item_ptr);
|
result = printNameOf(ha->item_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
_lastHitArea2Ptr = ha;
|
_lastHitArea2Ptr = ha;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SimonEngine::hitarea_proc_2(uint a) {
|
bool SimonEngine::printTextOf(uint a) {
|
||||||
uint x;
|
uint x;
|
||||||
const byte *string_ptr;
|
const byte *string_ptr;
|
||||||
|
|
||||||
|
@ -716,7 +726,7 @@ bool SimonEngine::hitarea_proc_2(uint a) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SimonEngine::hitarea_proc_3(Item *item) {
|
bool SimonEngine::printNameOf(Item *item) {
|
||||||
Child2 *child2;
|
Child2 *child2;
|
||||||
uint x;
|
uint x;
|
||||||
const byte *string_ptr;
|
const byte *string_ptr;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue