LILLIPUT: Some more renaming

This commit is contained in:
Strangerke 2012-07-01 01:58:15 +02:00 committed by Eugene Sandulenko
parent 9f93ceb8aa
commit 4efebbbeee
4 changed files with 14 additions and 16 deletions

View file

@ -821,7 +821,7 @@ void LilliputEngine::displayRefreshScreen() {
sub16EBC(); sub16EBC();
sub171CF(); sub171CF();
handleGameMouseClick(); handleGameMouseClick();
sub12FE5(); checkInterfaceActivationDelay();
displayHeroismIndicator(); displayHeroismIndicator();
} }
} }
@ -2344,24 +2344,24 @@ void LilliputEngine::sub171CF() {
} }
} }
void LilliputEngine::sub12FE5() { void LilliputEngine::checkInterfaceActivationDelay() {
debugC(2, kDebugEngine, "sub12FE5()"); debugC(2, kDebugEngine, "checkInterfaceActivationDelay()");
if (_animationTick != 1) if (_animationTick != 1)
return; return;
int count = 0; bool needRedraw = false;
for (int i = 0; i < _interfaceHotspotNumb; i++) { for (int i = 0; i < _interfaceHotspotNumb; i++) {
if (_scriptHandler->_array122FD[i] != 0) { if (_scriptHandler->_interfaceButtonActivationDelay[i] != 0) {
--_scriptHandler->_array122FD[i]; --_scriptHandler->_interfaceButtonActivationDelay[i];
if (_scriptHandler->_array122FD[i] == 0) { if (_scriptHandler->_interfaceButtonActivationDelay[i] == 0) {
_scriptHandler->_interfaceHotspotStatus[i] = kHotspotEnabled; _scriptHandler->_interfaceHotspotStatus[i] = kHotspotEnabled;
++count; needRedraw = true;
} }
} }
} }
if (count != 0) if (needRedraw)
displayInterfaceHotspots(); displayInterfaceHotspots();
} }

View file

@ -286,7 +286,7 @@ public:
void sub16CA0(); void sub16CA0();
byte sub166DD(int index, Common::Point var1); byte sub166DD(int index, Common::Point var1);
void sub171CF(); void sub171CF();
void sub12FE5(); void checkInterfaceActivationDelay();
int16 sub16DD5(int x1, int y1, int x2, int y2); int16 sub16DD5(int x1, int y1, int x2, int y2);
void displayCharactersOnMap(); void displayCharactersOnMap();
void restoreMapPoints(); void restoreMapPoints();

View file

@ -53,7 +53,7 @@ LilliputScript::LilliputScript(LilliputEngine *vm) : _vm(vm), _currScript(NULL)
for (int i = 0; i < 20; i++) { for (int i = 0; i < 20; i++) {
_interfaceHotspotStatus[i] = kHotspotOff; _interfaceHotspotStatus[i] = kHotspotOff;
_array122FD[i] = 0; _interfaceButtonActivationDelay[i] = 0;
} }
for (int i = 0; i < 32; i++) for (int i = 0; i < 32; i++)
@ -2803,9 +2803,7 @@ void LilliputScript::OC_setInterfaceHotspot() {
uint16 curWord = _currScript->readUint16LE(); uint16 curWord = _currScript->readUint16LE();
_interfaceHotspotStatus[index] = (curWord & 0xFF); _interfaceHotspotStatus[index] = (curWord & 0xFF);
_array122FD[index] = (curWord >> 8); _interfaceButtonActivationDelay[index] = (curWord >> 8);
if (_array122FD[index] != 0)
warning("debug - OC_setInterfaceHotspot - _array122FD[index] = %d", _array122FD[index]);
_vm->displayInterfaceHotspots(); _vm->displayInterfaceHotspots();
} }
@ -3095,7 +3093,7 @@ void LilliputScript::OC_disableInterfaceHotspot() {
debugC(1, kDebugScript, "OC_disableInterfaceHotspot()"); debugC(1, kDebugScript, "OC_disableInterfaceHotspot()");
int index = _currScript->readUint16LE(); int index = _currScript->readUint16LE();
_array122FD[index] = (_currScript->readUint16LE() & 0xFF); _interfaceButtonActivationDelay[index] = (_currScript->readUint16LE() & 0xFF);
_interfaceHotspotStatus[index] = kHotspotDisabled; _interfaceHotspotStatus[index] = kHotspotDisabled;
_vm->displayInterfaceHotspots(); _vm->displayInterfaceHotspots();

View file

@ -72,7 +72,7 @@ public:
int8 _characterTilePosY[40]; int8 _characterTilePosY[40];
int8 _array12811[40]; int8 _array12811[40];
int8 _array10AB1[40]; int8 _array10AB1[40];
byte _array122FD[20]; byte _interfaceButtonActivationDelay[20];
byte _array122C1[40]; byte _array122C1[40];
byte _array10A39[40]; byte _array10A39[40];
int16 _array10B51[40 * 40]; int16 _array10B51[40 * 40];