aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-03-07 17:34:48 +0100
committerStrangerke2014-03-07 17:34:48 +0100
commit854635c5c1b191aa4af28ef46230441adf4ddd95 (patch)
tree05ab6fba8445ad96670c8b8829701b57de633978 /engines
parentfe2e33e5851b07996b27f2f532ff9701b6fa0704 (diff)
downloadscummvm-rg350-854635c5c1b191aa4af28ef46230441adf4ddd95.tar.gz
scummvm-rg350-854635c5c1b191aa4af28ef46230441adf4ddd95.tar.bz2
scummvm-rg350-854635c5c1b191aa4af28ef46230441adf4ddd95.zip
TUCKER: Start renaming struct members to follow coding/naming conventions
Diffstat (limited to 'engines')
-rw-r--r--engines/tucker/locations.cpp976
-rw-r--r--engines/tucker/resource.cpp86
-rw-r--r--engines/tucker/tucker.cpp266
-rw-r--r--engines/tucker/tucker.h102
4 files changed, 715 insertions, 715 deletions
diff --git a/engines/tucker/locations.cpp b/engines/tucker/locations.cpp
index 81632695fb..ca23279cc5 100644
--- a/engines/tucker/locations.cpp
+++ b/engines/tucker/locations.cpp
@@ -130,48 +130,48 @@ void TuckerEngine::execData3PostUpdate_locationNum1() {
void TuckerEngine::updateSprite_locationNum2() {
if (_flagsTable[9] == 2) {
- _spritesTable[0].state = -1;
+ _spritesTable[0]._state = -1;
return;
}
if (_flagsTable[9] == 1) {
if (_flagsTable[10] == 1) {
- _spritesTable[0].state = -1;
+ _spritesTable[0]._state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].state = 4;
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._state = 4;
+ _spritesTable[0]._needUpdate = 1;
} else {
- _spritesTable[0].needUpdate = 0;
- _spritesTable[0].state = 5;
+ _spritesTable[0]._needUpdate = 0;
+ _spritesTable[0]._state = 5;
_flagsTable[10] = 1;
- _spritesTable[0].gfxBackgroundOffset = 0;
+ _spritesTable[0]._gfxBackgroundOffset = 0;
}
return;
}
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].state = 3;
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._state = 3;
+ _spritesTable[0]._needUpdate = 1;
return;
}
if (_csDataHandled) {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = 0;
if (_flagsTable[199] == 0) {
_flagsTable[199] = 1;
setCharacterAnimation(0, 0);
} else if (getRandomNumber() > 20000) {
- _spritesTable[0].state = 6;
+ _spritesTable[0]._state = 6;
} else {
- _spritesTable[0].state = 3;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._state = 3;
+ _spritesTable[0]._updateDelay = 5;
}
} else {
if (_flagsTable[199] == 0) {
_flagsTable[199] = 1;
setCharacterAnimation(1, 0);
} else if (getRandomNumber() < 20000) {
- _spritesTable[0].state = 1;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._state = 1;
+ _spritesTable[0]._updateDelay = 5;
} else {
- _spritesTable[0].state = 1;
+ _spritesTable[0]._state = 1;
}
}
}
@@ -243,9 +243,9 @@ void TuckerEngine::updateSprite_locationNum3_0(int i) {
int num;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
num = 5;
- _spritesTable[i].needUpdate = 1;
- } else if (_spritesTable[i].prevState == 5 && _spritesTable[i].animationFrame == 1) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 1;
+ } else if (_spritesTable[i]._prevState == 5 && _spritesTable[i]._animationFrame == 1) {
+ _spritesTable[i]._needUpdate = 0;
int r = getRandomNumber();
if (r < 12000) {
num = 3;
@@ -256,11 +256,11 @@ void TuckerEngine::updateSprite_locationNum3_0(int i) {
}
} else {
num = 5;
- _spritesTable[i].animationFrame = 1;
- _spritesTable[i].updateDelay = 10;
+ _spritesTable[i]._animationFrame = 1;
+ _spritesTable[i]._updateDelay = 10;
}
- _spritesTable[i].state = num;
- _spritesTable[i].prevAnimationFrame = 1;
+ _spritesTable[i]._state = num;
+ _spritesTable[i]._prevAnimationFrame = 1;
}
void TuckerEngine::updateSprite_locationNum3_1(int i) {
@@ -268,44 +268,44 @@ void TuckerEngine::updateSprite_locationNum3_1(int i) {
if (_flagsTable[207] == 1) {
num = -1;
} else if (_flagsTable[203] == 1) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
num = 20;
_flagsTable[203] = 2;
} else if (_flagsTable[203] == 2) {
num = 12;
} else if (_flagsTable[203] == 3) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
num = 19;
_flagsTable[203] = 0;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
if (_flagsTable[21] == 0) {
num = 7;
} else {
num = 8;
}
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
if (_csDataHandled) {
num = 6;
if (getRandomNumber() < 32000) {
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- } else if (_spritesTable[i].state == 6 && _spritesTable[i].animationFrame == 1) {
+ } else if (_spritesTable[i]._state == 6 && _spritesTable[i]._animationFrame == 1) {
if (getRandomNumber() < 20000) {
num = 11;
- _spritesTable[i].defaultUpdateDelay = 5;
+ _spritesTable[i]._defaultUpdateDelay = 5;
} else {
num = 10;
}
} else {
num = 6;
- _spritesTable[i].animationFrame = 1;
- _spritesTable[i].updateDelay = 10;
+ _spritesTable[i]._animationFrame = 1;
+ _spritesTable[i]._updateDelay = 10;
}
}
- _spritesTable[i].state = num;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = num;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum3_2(int i) {
@@ -314,32 +314,32 @@ void TuckerEngine::updateSprite_locationNum3_2(int i) {
_flagsTable[205] = 0;
num = 18;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
num = 17;
} else if (_flagsTable[45] == 1) {
_flagsTable[45] = 2;
num = 16;
} else if (_flagsTable[45] == 2) {
num = 17;
- _spritesTable[i].updateDelay = 5;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._updateDelay = 5;
+ _spritesTable[i]._needUpdate = 0;
} else if (_flagsTable[45] == 3) {
_flagsTable[45] = 0;
num = 16;
_updateSpriteFlag2 = 1;
} else {
- _spritesTable[i].needUpdate = 0;
- ++_spritesTable[i].counter;
- if (_spritesTable[i].counter <= 5) {
+ _spritesTable[i]._needUpdate = 0;
+ ++_spritesTable[i]._counter;
+ if (_spritesTable[i]._counter <= 5) {
num = 14;
} else {
- if (_spritesTable[i].counter > 8) {
- _spritesTable[i].counter = 0;
+ if (_spritesTable[i]._counter > 8) {
+ _spritesTable[i]._counter = 0;
}
num = 15;
}
}
- _spritesTable[i].state = num;
+ _spritesTable[i]._state = num;
}
void TuckerEngine::execData3PreUpdate_locationNum3() {
@@ -362,13 +362,13 @@ void TuckerEngine::updateSprite_locationNum4(int i) {
if (_flagsTable[9] == 2) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 1;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else {
state = 2;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum4() {
@@ -380,18 +380,18 @@ void TuckerEngine::execData3PreUpdate_locationNum4() {
}
void TuckerEngine::updateSprite_locationNum5_0() {
- ++_spritesTable[0].counter;
- if (_spritesTable[0].counter > 100) {
- _spritesTable[0].counter = 0;
- _spritesTable[0].state = 1;
+ ++_spritesTable[0]._counter;
+ if (_spritesTable[0]._counter > 100) {
+ _spritesTable[0]._counter = 0;
+ _spritesTable[0]._state = 1;
_locationSoundsTable[1].type = 2;
startSound(_locationSoundsTable[1].offset, 1, _locationSoundsTable[1].volume);
- } else if (_spritesTable[0].counter == 50) {
+ } else if (_spritesTable[0]._counter == 50) {
_locationSoundsTable[1].type = 2;
- _spritesTable[0].state = 2;
+ _spritesTable[0]._state = 2;
startSound(_locationSoundsTable[1].offset, 1, _locationSoundsTable[1].volume);
} else {
- _spritesTable[0].state = -1;
+ _spritesTable[0]._state = -1;
if (isSoundPlaying(1)) {
stopSound(1);
}
@@ -399,7 +399,7 @@ void TuckerEngine::updateSprite_locationNum5_0() {
}
void TuckerEngine::updateSprite_locationNum5_1(int i) {
- _spritesTable[i].state = 3;
+ _spritesTable[i]._state = 3;
}
void TuckerEngine::updateSprite_locationNum6_0(int i) {
@@ -410,29 +410,29 @@ void TuckerEngine::updateSprite_locationNum6_0(int i) {
state = 14;
} else if (_flagsTable[26] == 4 || _flagsTable[26] == 5) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._needUpdate = 1;
state = 3;
- _spritesTable[0].counter = 0;
+ _spritesTable[0]._counter = 0;
} else if (_xPosCurrent < 370 && _flagsTable[26] == 4) {
state = 2;
- } else if (_spritesTable[0].counter == 0) {
+ } else if (_spritesTable[0]._counter == 0) {
setCharacterAnimation(0, 0);
_updateSpriteFlag1 = 1;
- ++_spritesTable[0].counter;
+ ++_spritesTable[0]._counter;
return;
} else {
state = 1;
- _spritesTable[0].updateDelay = 2;
- ++_spritesTable[0].counter;
- if (_spritesTable[0].counter > 100) {
- _spritesTable[0].counter = 0;
+ _spritesTable[0]._updateDelay = 2;
+ ++_spritesTable[0]._counter;
+ if (_spritesTable[0]._counter > 100) {
+ _spritesTable[0]._counter = 0;
}
}
} else {
state = -1;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum6_1(int i) {
@@ -440,18 +440,18 @@ void TuckerEngine::updateSprite_locationNum6_1(int i) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
if (_flagsTable[209] == 1) {
state = 9;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 10;
}
} else {
if (getRandomNumber() < 30000 || (_csDataHandled && _xPosCurrent == 248)) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 7;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 7;
_miscSoundFxNum[0] = 3;
_miscSoundFxDelayCounter[0] = 70;
@@ -459,7 +459,7 @@ void TuckerEngine::updateSprite_locationNum6_1(int i) {
_miscSoundFxDelayCounter[1] = 25;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum6_2(int i) {
@@ -467,13 +467,13 @@ void TuckerEngine::updateSprite_locationNum6_2(int i) {
if (_flagsTable[26] < 5 || _flagsTable[207] > 0) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 12;
} else {
state = 12;
- _spritesTable[i].updateDelay = 2;
+ _spritesTable[i]._updateDelay = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum6() {
@@ -483,11 +483,11 @@ void TuckerEngine::execData3PreUpdate_locationNum6() {
if (_flagsTable[26] == 2) {
_currentSpriteAnimationLength = 2;
_currentSpriteAnimationFrame = 112;
- if (_spritesTable[0].xSource < 45) {
+ if (_spritesTable[0]._xSource < 45) {
_currentSpriteAnimationFrame2 = 144;
- } else if (_spritesTable[0].xSource > 80) {
+ } else if (_spritesTable[0]._xSource > 80) {
_currentSpriteAnimationFrame2 = 147;
- } else if (_spritesTable[0].xSource < 60) {
+ } else if (_spritesTable[0]._xSource < 60) {
_currentSpriteAnimationFrame2 = 145;
} else {
_currentSpriteAnimationFrame2 = 146;
@@ -583,37 +583,37 @@ void TuckerEngine::execData3PostUpdate_locationNum6() {
void TuckerEngine::updateSprite_locationNum7_0(int i) {
int state;
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 4;
} else {
- _spritesTable[i].needUpdate = 0;
- if (_spritesTable[i].counter > 0) {
+ _spritesTable[i]._needUpdate = 0;
+ if (_spritesTable[i]._counter > 0) {
state = 2;
- _spritesTable[i].counter = 0;
+ _spritesTable[i]._counter = 0;
} else {
state = 1;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum7_1(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 5;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum8_0(int i) {
- _spritesTable[i].state = (_flagsTable[28] < 20) ? -1 : 7;
+ _spritesTable[i]._state = (_flagsTable[28] < 20) ? -1 : 7;
}
void TuckerEngine::updateSprite_locationNum8_1(int i) {
@@ -622,20 +622,20 @@ void TuckerEngine::updateSprite_locationNum8_1(int i) {
state = -1;
} else if (_flagsTable[28] == 18) {
state = 6;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
} else if (_flagsTable[29] == 0) {
state = 1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 1) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 3;
}
if (_flagsTable[28] == 19) {
_flagsTable[28] = 20;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PostUpdate_locationNum8() {
@@ -674,37 +674,37 @@ void TuckerEngine::execData3PostUpdate_locationNum8() {
void TuckerEngine::updateSprite_locationNum9_0(int i) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[i].needUpdate = 1;
- _spritesTable[i].state = 3;
+ _spritesTable[i]._needUpdate = 1;
+ _spritesTable[i]._state = 3;
} else if (_updateLocationCounter2 > 0 || getRandomNumber() > 30000) {
- _spritesTable[i].state = 1;
+ _spritesTable[i]._state = 1;
if (_updateLocationCounter2 == 0) {
_updateLocationCounter2 = 6;
}
} else if (getRandomNumber() > 30000) {
- _spritesTable[i].state = 2;
- _spritesTable[i].defaultUpdateDelay = 5;
+ _spritesTable[i]._state = 2;
+ _spritesTable[i]._defaultUpdateDelay = 5;
} else {
- _spritesTable[i].state = 1;
- _spritesTable[i].animationFrame = 1;
- _spritesTable[i].updateDelay = 10;
+ _spritesTable[i]._state = 1;
+ _spritesTable[i]._animationFrame = 1;
+ _spritesTable[i]._updateDelay = 10;
}
}
void TuckerEngine::updateSprite_locationNum9_1(int i) {
- ++_spritesTable[i].counter;
- if (_spritesTable[i].counter > 10) {
- _spritesTable[i].counter = 0;
- _spritesTable[i].state = 5;
- _spritesTable[i].defaultUpdateDelay = 5;
+ ++_spritesTable[i]._counter;
+ if (_spritesTable[i]._counter > 10) {
+ _spritesTable[i]._counter = 0;
+ _spritesTable[i]._state = 5;
+ _spritesTable[i]._defaultUpdateDelay = 5;
} else {
- _spritesTable[i].state = 4;
+ _spritesTable[i]._state = 4;
}
}
void TuckerEngine::updateSprite_locationNum9_2(int i) {
- _spritesTable[i].state = 6;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = 6;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum9() {
@@ -729,27 +729,27 @@ void TuckerEngine::execData3PreUpdate_locationNum9() {
}
void TuckerEngine::execData3PostUpdate_locationNum9() {
- if (_spritesTable[1].state == 4) {
- if (_spritesTable[1].flipX == 1) {
+ if (_spritesTable[1]._state == 4) {
+ if (_spritesTable[1]._flipX == 1) {
--_updateLocationXPosTable2[0];
if (_updateLocationXPosTable2[0] < -50) {
- _spritesTable[1].flipX = 0;
+ _spritesTable[1]._flipX = 0;
_updateLocationXPosTable2[0] = -50;
}
} else {
++_updateLocationXPosTable2[0];
if (_updateLocationXPosTable2[0] > 500) {
- _spritesTable[1].flipX = 1;
+ _spritesTable[1]._flipX = 1;
_updateLocationXPosTable2[0] = 500;
}
}
}
- _spritesTable[1].gfxBackgroundOffset = _updateLocationXPosTable2[0] + 8320;
+ _spritesTable[1]._gfxBackgroundOffset = _updateLocationXPosTable2[0] + 8320;
for (int i = 1; i < 3; ++i) {
- _spritesTable[i].colorType = 1;
- _spritesTable[i].yMaxBackground = 60;
+ _spritesTable[i]._colorType = 1;
+ _spritesTable[i]._yMaxBackground = 60;
drawSprite(i);
- _spritesTable[i].colorType = 0;
+ _spritesTable[i]._colorType = 0;
}
}
@@ -759,7 +759,7 @@ void TuckerEngine::updateSprite_locationNum10() {
if (_flagsTable[99] == 1) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._needUpdate = 1;
if (r < 26000) {
state = 1;
} else if (r < 29000) {
@@ -769,12 +769,12 @@ void TuckerEngine::updateSprite_locationNum10() {
}
} else if (_csDataHandled) {
state = 2;
- _spritesTable[0].updateDelay = 4;
+ _spritesTable[0]._updateDelay = 4;
} else {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = 0;
if (r > 26000) {
state = 5;
- _spritesTable[0].prevAnimationFrame = 1;
+ _spritesTable[0]._prevAnimationFrame = 1;
} else if (r > 24000) {
state = 6;
_miscSoundFxDelayCounter[0] = 120;
@@ -783,7 +783,7 @@ void TuckerEngine::updateSprite_locationNum10() {
setCharacterAnimation(0, 0);
}
}
- _spritesTable[0].state = state;
+ _spritesTable[0]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum10() {
@@ -797,7 +797,7 @@ void TuckerEngine::execData3PreUpdate_locationNum10() {
if (_flagsTable[47] == 1 && _inventoryItemsState[26] == 1) {
_flagsTable[47] = 2;
}
- if (_spritesTable[0].state == 6 && _spritesTable[0].animationFrame == 18 && !isSoundPlaying(0)) {
+ if (_spritesTable[0]._state == 6 && _spritesTable[0]._animationFrame == 18 && !isSoundPlaying(0)) {
startSound(_locationSoundsTable[0].offset, 0, _locationSoundsTable[0].volume);
}
if (_flagsTable[230] == 1 && getRandomNumber() > 32000) {
@@ -808,52 +808,52 @@ void TuckerEngine::execData3PreUpdate_locationNum10() {
void TuckerEngine::updateSprite_locationNum11_0(int i) {
const int r = getRandomNumber();
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
- _spritesTable[i].state = 2;
+ _spritesTable[i]._needUpdate = 1;
+ _spritesTable[i]._state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
if (r > 28000) {
- _spritesTable[i].state = 3;
+ _spritesTable[i]._state = 3;
} else if (r > 20000) {
- _spritesTable[i].state = 4;
+ _spritesTable[i]._state = 4;
} else {
- _spritesTable[i].state = 3;
- _spritesTable[i].animationFrame = 1;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._state = 3;
+ _spritesTable[i]._animationFrame = 1;
+ _spritesTable[i]._updateDelay = 5;
}
}
}
void TuckerEngine::updateSprite_locationNum11_1(int i) {
if (getRandomNumber() > 20000) {
- _spritesTable[i].state = 5;
+ _spritesTable[i]._state = 5;
} else {
- _spritesTable[i].animationFrame = 14;
+ _spritesTable[i]._animationFrame = 14;
_updateSpriteFlag1 = 1;
- _spritesTable[i].state = 5;
+ _spritesTable[i]._state = 5;
}
}
void TuckerEngine::updateSprite_locationNum11_2(int i) {
if (getRandomNumber() > 20000) {
- _spritesTable[i].state = 6;
+ _spritesTable[i]._state = 6;
} else {
- _spritesTable[i].animationFrame = 17;
- _spritesTable[i].state = 6;
+ _spritesTable[i]._animationFrame = 17;
+ _spritesTable[i]._state = 6;
_updateSpriteFlag1 = 1;
}
}
void TuckerEngine::updateSprite_locationNum11_3(int i) {
- _spritesTable[i].state = 7;
+ _spritesTable[i]._state = 7;
}
void TuckerEngine::updateSprite_locationNum11_4(int i) {
if (getRandomNumber() > 30000 && _flagsTable[55] < 2) {
- _spritesTable[i].state = 1;
+ _spritesTable[i]._state = 1;
startSound(_locationSoundsTable[6].offset, 6, _locationSoundsTable[6].volume);
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
}
@@ -866,10 +866,10 @@ void TuckerEngine::updateSprite_locationNum12_0(int i) {
if (_flagsTable[207] > 0) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
if (_updateLocationCounter2 < 4) {
state = 1;
} else if (_updateLocationCounter2 < 8) {
@@ -878,7 +878,7 @@ void TuckerEngine::updateSprite_locationNum12_0(int i) {
state = 4;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum12_1(int i) {
@@ -891,7 +891,7 @@ void TuckerEngine::updateSprite_locationNum12_1(int i) {
} else {
state = 8;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum12() {
@@ -917,23 +917,23 @@ void TuckerEngine::updateSprite_locationNum13(int i) {
if (_flagsTable[202] == 0) {
_flagsTable[202] = 1;
state = 3;
- _spritesTable[i].stateIndex = -1;
+ _spritesTable[i]._stateIndex = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 4;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 5;
}
} else if (_flagsTable[202] == 1) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
_flagsTable[202] = 0;
state = 6;
} else {
setCharacterAnimation(0, 0);
return;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum13() {
@@ -946,15 +946,15 @@ void TuckerEngine::execData3PreUpdate_locationNum13() {
}
}
_flagsTable[8] = 2;
- if (_spritesTable[0].state == 1) {
- if (_spritesTable[0].animationFrame > 10 && _spritesTable[0].animationFrame < 20) {
+ if (_spritesTable[0]._state == 1) {
+ if (_spritesTable[0]._animationFrame > 10 && _spritesTable[0]._animationFrame < 20) {
if (!isSoundPlaying(0)) {
startSound(_locationSoundsTable[0].offset, 0, _locationSoundsTable[0].volume);
}
}
}
if (isSoundPlaying(0)) {
- if (_spritesTable[0].animationFrame > 10 && _spritesTable[0].animationFrame < 20) {
+ if (_spritesTable[0]._animationFrame > 10 && _spritesTable[0]._animationFrame < 20) {
stopSound(0);
}
}
@@ -963,12 +963,12 @@ void TuckerEngine::execData3PreUpdate_locationNum13() {
void TuckerEngine::updateSprite_locationNum14(int i) {
int state = 2;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = (getRandomNumber() < 12000) ? 1 : 3;
} else if (getRandomNumber() < 26000) {
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum14() {
@@ -1063,41 +1063,41 @@ void TuckerEngine::execData3PostUpdate_locationNum14() {
}
void TuckerEngine::updateSprite_locationNum15_0(int i) {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
void TuckerEngine::updateSprite_locationNum15_1(int i) {
int state;
int r = getRandomNumber();
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 6;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
if (r < 26000) {
state = 5;
} else if (r < 29000) {
state = 2;
- _spritesTable[i].prevAnimationFrame = 1;
+ _spritesTable[i]._prevAnimationFrame = 1;
} else {
state = 4;
- _spritesTable[4].counter = 1;
+ _spritesTable[4]._counter = 1;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum15_2(int i) {
- _spritesTable[i].state = 3;
- if (_spritesTable[4].counter > 0) {
- ++_spritesTable[4].counter;
- if (_spritesTable[4].counter > 6) {
- _spritesTable[4].counter = 0;
+ _spritesTable[i]._state = 3;
+ if (_spritesTable[4]._counter > 0) {
+ ++_spritesTable[4]._counter;
+ if (_spritesTable[4]._counter > 6) {
+ _spritesTable[4]._counter = 0;
} else {
- _spritesTable[i].updateDelay = 2;
+ _spritesTable[i]._updateDelay = 2;
}
} else {
- _spritesTable[i].updateDelay = 2;
+ _spritesTable[i]._updateDelay = 2;
}
}
@@ -1123,21 +1123,21 @@ void TuckerEngine::updateSprite_locationNum16_0(int i) {
} else if (_flagsTable[82] == 2) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- if (_spritesTable[0].needUpdate == 0) {
- _spritesTable[0].needUpdate = 1;
+ if (_spritesTable[0]._needUpdate == 0) {
+ _spritesTable[0]._needUpdate = 1;
state = 1;
} else {
state = 1;
- _spritesTable[0].animationFrame = 2;
+ _spritesTable[0]._animationFrame = 2;
_updateSpriteFlag1 = 1;
}
} else if (_csDataHandled) {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = 0;
state = 4;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._updateDelay = 5;
} else if (r < 30000) {
state = 4;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._updateDelay = 5;
} else if (r < 31000) {
state = 4;
if (_xPosCurrent < 300) {
@@ -1149,7 +1149,7 @@ void TuckerEngine::updateSprite_locationNum16_0(int i) {
} else {
state = 6;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum16_1(int i) {
@@ -1174,8 +1174,8 @@ void TuckerEngine::updateSprite_locationNum16_1(int i) {
startSound(_locationSoundsTable[0].offset, 0, _locationSoundsTable[0].volume);
}
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum16_2(int i) {
@@ -1188,22 +1188,22 @@ void TuckerEngine::updateSprite_locationNum16_2(int i) {
}
} else if (_flagsTable[78] == 1) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 8;
} else {
if (getRandomNumber() > 32000) {
state = 7;
} else if (getRandomNumber() > 10000) {
state = 13;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
state = 13;
}
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
}
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum16() {
@@ -1218,26 +1218,26 @@ void TuckerEngine::updateSprite_locationNum17() {
} else if (_flagsTable[82] == 2) {
_flagsTable[82] = 3;
_disableCharactersPath = true;
- _spritesTable[0].gfxBackgroundOffset = 100;
+ _spritesTable[0]._gfxBackgroundOffset = 100;
state = 1;
- _spritesTable[0].backgroundOffset = -1;
- } else if (_spritesTable[0].gfxBackgroundOffset < -160) {
+ _spritesTable[0]._backgroundOffset = -1;
+ } else if (_spritesTable[0]._gfxBackgroundOffset < -160) {
state = -1;
} else {
state = 1;
- _spritesTable[0].yMaxBackground = 0;
- _spritesTable[0].colorType = 1;
+ _spritesTable[0]._yMaxBackground = 0;
+ _spritesTable[0]._colorType = 1;
}
- _spritesTable[0].state = state;
+ _spritesTable[0]._state = state;
}
void TuckerEngine::updateSprite_locationNum18() {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._needUpdate = 1;
state = 2;
} else {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = 0;
state = 1;
const int r = getRandomNumber();
if (r > 31000) {
@@ -1246,54 +1246,54 @@ void TuckerEngine::updateSprite_locationNum18() {
state = 4;
}
}
- _spritesTable[0].gfxBackgroundOffset = 0;
- _spritesTable[0].backgroundOffset = 0;
- _spritesTable[0].state = state;
+ _spritesTable[0]._gfxBackgroundOffset = 0;
+ _spritesTable[0]._backgroundOffset = 0;
+ _spritesTable[0]._state = state;
}
void TuckerEngine::updateSprite_locationNum19_0(int i) {
int state;
if (_flagsTable[206] == 1) {
state = 7;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
_flagsTable[206] = 0;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- ++_spritesTable[i].counter;
- _spritesTable[i].needUpdate = 1;
- if (_spritesTable[i].counter > 10) {
- _spritesTable[i].counter = 0;
+ ++_spritesTable[i]._counter;
+ _spritesTable[i]._needUpdate = 1;
+ if (_spritesTable[i]._counter > 10) {
+ _spritesTable[i]._counter = 0;
state = 2;
} else {
state = 1;
}
} else {
- _spritesTable[i].needUpdate = 0;
- if (_spritesTable[i].counter > 10) {
- _spritesTable[i].counter = 0;
+ _spritesTable[i]._needUpdate = 0;
+ if (_spritesTable[i]._counter > 10) {
+ _spritesTable[i]._counter = 0;
}
- if (_spritesTable[i].counter == 2) {
+ if (_spritesTable[i]._counter == 2) {
state = 4;
- _spritesTable[i].prevAnimationFrame = 1;
- } else if (_spritesTable[i].counter == 5) {
+ _spritesTable[i]._prevAnimationFrame = 1;
+ } else if (_spritesTable[i]._counter == 5) {
state = 5;
- _spritesTable[i].prevAnimationFrame = 1;
+ _spritesTable[i]._prevAnimationFrame = 1;
} else {
state = 5;
- _spritesTable[i].updateDelay = 6;
+ _spritesTable[i]._updateDelay = 6;
}
}
- _spritesTable[i].state = state;
- _spritesTable[i].prevAnimationFrame = 1;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._prevAnimationFrame = 1;
}
void TuckerEngine::updateSprite_locationNum19_1(int i) {
- _spritesTable[i].state = 9;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = 9;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum19_2(int i) {
- _spritesTable[i].gfxBackgroundOffset = 320;
- _spritesTable[i].state = -1;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = -1;
}
void TuckerEngine::updateSprite_locationNum19_3(int i) {
@@ -1319,7 +1319,7 @@ void TuckerEngine::updateSprite_locationNum21() {
state = 7;
_locationSoundsTable[4].volume = 60;
} else if (_flagsTable[59] == 4) {
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._needUpdate = 1;
_flagsTable[59] = 2;
state = 2;
setVolumeSound(2, 0);
@@ -1328,21 +1328,21 @@ void TuckerEngine::updateSprite_locationNum21() {
state = 4;
setVolumeSound(2, _locationSoundsTable[2].volume);
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._needUpdate = 1;
state = 3;
} else if (_flagsTable[59] == 2) {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = 0;
state = 3;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._updateDelay = 5;
} else if (_flagsTable[15] == 1) {
state = 3;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._updateDelay = 5;
} else {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = 0;
state = 1;
}
- _spritesTable[0].state = state;
- _spritesTable[0].gfxBackgroundOffset = 320;
+ _spritesTable[0]._state = state;
+ _spritesTable[0]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum21() {
@@ -1367,14 +1367,14 @@ void TuckerEngine::execData3PreUpdate_locationNum21() {
startSound(_locationSoundsTable[num].offset, num, _locationSoundsTable[num].volume);
}
}
- if (_spritesTable[0].state == 6) {
- if (_spritesTable[0].animationFrame < 18) {
- _spritesTable[0].gfxBackgroundOffset = 320 + _spritesTable[0].animationFrame * 638;
+ if (_spritesTable[0]._state == 6) {
+ if (_spritesTable[0]._animationFrame < 18) {
+ _spritesTable[0]._gfxBackgroundOffset = 320 + _spritesTable[0]._animationFrame * 638;
} else {
- _spritesTable[0].gfxBackgroundOffset = 11840 - _spritesTable[0].animationFrame * 2;
+ _spritesTable[0]._gfxBackgroundOffset = 11840 - _spritesTable[0]._animationFrame * 2;
}
} else {
- _spritesTable[0].gfxBackgroundOffset = 320;
+ _spritesTable[0]._gfxBackgroundOffset = 320;
}
if (_inventoryItemsState[19] > 0) {
_flagsTable[43] = 1;
@@ -1404,13 +1404,13 @@ void TuckerEngine::execData3PreUpdate_locationNum22() {
void TuckerEngine::updateSprite_locationNum22() {
if (_flagsTable[207] == 1) {
- _spritesTable[0].state = -1;
+ _spritesTable[0]._state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].needUpdate = 1;
- _spritesTable[0].state = 2;
+ _spritesTable[0]._needUpdate = 1;
+ _spritesTable[0]._state = 2;
} else {
- _spritesTable[0].needUpdate = 0;
- _spritesTable[0].state = 1;
+ _spritesTable[0]._needUpdate = 0;
+ _spritesTable[0]._state = 1;
}
}
@@ -1421,37 +1421,37 @@ void TuckerEngine::updateSprite_locationNum23_0(int i) {
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum23_1(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 14;
} else if (getRandomNumber() < 30000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 25;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 13;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum23_2(int i) {
int state = 0;
if (_flagsTable[210] == 0) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 6;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = (getRandomNumber() < 25000) ? 4 : 5;
}
} else if (_flagsTable[210] == 1) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
if (_flagsTable[211] == 10) {
state = 34;
} else if (_flagsTable[211] == 0) {
@@ -1461,7 +1461,7 @@ void TuckerEngine::updateSprite_locationNum23_2(int i) {
state = 31;
}
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
if (_flagsTable[211] == 1) {
state = 32;
_flagsTable[211] = 0;
@@ -1471,10 +1471,10 @@ void TuckerEngine::updateSprite_locationNum23_2(int i) {
}
} else if (_flagsTable[210] == 2) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 33;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
if (_flagsTable[212] == 0) {
state = 3;
_flagsTable[212] = 1;
@@ -1488,7 +1488,7 @@ void TuckerEngine::updateSprite_locationNum23_2(int i) {
} else {
state = 24;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum23_3(int i) {
@@ -1496,13 +1496,13 @@ void TuckerEngine::updateSprite_locationNum23_3(int i) {
if (_flagsTable[210] == 0 || _flagsTable[210] == 2) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 8;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 9;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum24_0(int i) {
@@ -1512,40 +1512,40 @@ void TuckerEngine::updateSprite_locationNum24_0(int i) {
state = 5;
} else if (_flagsTable[103] == 0) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 2;
} else {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 1;
if (getRandomNumber() < 30000) {
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
}
} else if (_flagsTable[103] == 1 || _flagsTable[103] == 3) {
state = -1;
} else {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 4;
} else {
if (getRandomNumber() < 30000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 6;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 6;
}
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum24_1(int i) {
if (_flagsTable[103] > 1) {
- _spritesTable[i].state = 3;
+ _spritesTable[i]._state = 3;
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
}
@@ -1554,11 +1554,11 @@ void TuckerEngine::updateSprite_locationNum24_2(int i) {
if (_flagsTable[214] > 1) {
state = -1;
} else if (_flagsTable[214] == 1) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
_flagsTable[214] = 2;
state = 9;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
if (_flagsTable[213] == 1) {
state = 10;
} else if (_flagsTable[213] == 2) {
@@ -1567,10 +1567,10 @@ void TuckerEngine::updateSprite_locationNum24_2(int i) {
state = 8;
}
} else {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 7;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum24_3(int i) {
@@ -1585,7 +1585,7 @@ void TuckerEngine::updateSprite_locationNum24_3(int i) {
} else {
state = 11;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum24() {
@@ -1619,9 +1619,9 @@ void TuckerEngine::updateSprite_locationNum26_0(int i) {
if (_flagsTable[125] > 0 && _flagsTable[125] < 300) {
_flagsTable[126] = 1;
}
- _spritesTable[i].gfxBackgroundOffset = _flagsTable[125];
- _spritesTable[i].state = 1;
- _spritesTable[i].colorType = 99;
+ _spritesTable[i]._gfxBackgroundOffset = _flagsTable[125];
+ _spritesTable[i]._state = 1;
+ _spritesTable[i]._colorType = 99;
}
void TuckerEngine::updateSprite_locationNum26_1(int i) {
@@ -1630,19 +1630,19 @@ void TuckerEngine::updateSprite_locationNum26_1(int i) {
state = -1;
} else if (_flagsTable[125] > 299) {
state = 2;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
state = 2;
}
- _spritesTable[i].gfxBackgroundOffset = _flagsTable[125];
- _spritesTable[i].colorType = 1;
- _spritesTable[i].state = state;
+ _spritesTable[i]._gfxBackgroundOffset = _flagsTable[125];
+ _spritesTable[i]._colorType = 1;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum26() {
_characterPrevBackFrontFacing = 1;
- _spritesTable[1].gfxBackgroundOffset = _flagsTable[125];
- _spritesTable[0].gfxBackgroundOffset = _flagsTable[125];
+ _spritesTable[1]._gfxBackgroundOffset = _flagsTable[125];
+ _spritesTable[0]._gfxBackgroundOffset = _flagsTable[125];
if (_flagsTable[125] > 0 && _flagsTable[125] < 300) {
if (!isSoundPlaying(5)) {
startSound(_locationSoundsTable[5].offset, 5, _locationSoundsTable[5].volume);
@@ -1674,17 +1674,17 @@ void TuckerEngine::updateSprite_locationNum27(int i) {
state = 1;
_flagsTable[155] = 4;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 2;
} else if (getRandomNumber() < 30000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 3;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 3;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum27() {
@@ -1701,36 +1701,36 @@ void TuckerEngine::updateSprite_locationNum28_0(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 4;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else {
- _spritesTable[i].needUpdate = 0;
- ++_spritesTable[i].counter;
- if (_spritesTable[i].counter > 30) {
- _spritesTable[i].counter = 0;
+ _spritesTable[i]._needUpdate = 0;
+ ++_spritesTable[i]._counter;
+ if (_spritesTable[i]._counter > 30) {
+ _spritesTable[i]._counter = 0;
}
if (_flagsTable[86] == 1) {
- if (_spritesTable[i].counter == 16 || _spritesTable[i].counter == 27) {
+ if (_spritesTable[i]._counter == 16 || _spritesTable[i]._counter == 27) {
state = 3;
} else {
state = 3;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
} else {
- if (_spritesTable[i].counter == 5 || _spritesTable[i].counter == 11) {
+ if (_spritesTable[i]._counter == 5 || _spritesTable[i]._counter == 11) {
state = 5;
- } else if (_spritesTable[i].counter == 16 || _spritesTable[i].counter == 27) {
+ } else if (_spritesTable[i]._counter == 16 || _spritesTable[i]._counter == 27) {
state = 6;
} else {
state = 6;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum28_1(int i) {
- _spritesTable[i].state = (_flagsTable[86] == 1) ? 1 : -1;
+ _spritesTable[i]._state = (_flagsTable[86] == 1) ? 1 : -1;
}
void TuckerEngine::updateSprite_locationNum28_2(int i) {
@@ -1741,7 +1741,7 @@ void TuckerEngine::updateSprite_locationNum28_2(int i) {
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum28() {
@@ -1762,21 +1762,21 @@ void TuckerEngine::execData3PostUpdate_locationNum28() {
}
void TuckerEngine::updateSprite_locationNum29_0(int i) {
- _spritesTable[i].state = (getRandomNumber() < 32000) ? -1 : 2;
+ _spritesTable[i]._state = (getRandomNumber() < 32000) ? -1 : 2;
}
void TuckerEngine::updateSprite_locationNum29_1(int i) {
int state = -1;
if (getRandomNumber() >= 32000) {
state = 1;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum29_2(int i) {
- _spritesTable[i].state = 3;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = 3;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum29() {
@@ -1807,7 +1807,7 @@ void TuckerEngine::execData3PreUpdate_locationNum29() {
}
void TuckerEngine::updateSprite_locationNum30_34(int i) {
- _spritesTable[i].state = i + 1;
+ _spritesTable[i]._state = i + 1;
}
void TuckerEngine::execData3PreUpdate_locationNum30() {
@@ -1829,7 +1829,7 @@ void TuckerEngine::execData3PreUpdate_locationNum31() {
}
void TuckerEngine::execData3PreUpdate_locationNum32() {
- if (_spritesTable[0].state == 12 && _spritesTable[0].animationFrame < 22) {
+ if (_spritesTable[0]._state == 12 && _spritesTable[0]._animationFrame < 22) {
_flagsTable[113] = 1;
} else {
_flagsTable[113] = 0;
@@ -1843,16 +1843,16 @@ void TuckerEngine::execData3PostUpdate_locationNum32() {
}
void TuckerEngine::updateSprite_locationNum31_0(int i) {
- _spritesTable[i].state = (getRandomNumber() < 32000) ? 3 : 1;
+ _spritesTable[i]._state = (getRandomNumber() < 32000) ? 3 : 1;
}
void TuckerEngine::updateSprite_locationNum31_1(int i) {
- _spritesTable[i].state = (_flagsTable[86] == 1) ? 2 : -1;
+ _spritesTable[i]._state = (_flagsTable[86] == 1) ? 2 : -1;
}
void TuckerEngine::updateSprite_locationNum32_0(int i) {
static const uint8 stateTable[] = { 12, 1, 11, 1, 11, 2, 1, 5, 5, 11, 1, 5, 5, 5 };
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
if (_flagsTable[123] == 2) {
_flagsTable[123] = 0;
}
@@ -1862,7 +1862,7 @@ void TuckerEngine::updateSprite_locationNum32_0(int i) {
_flagsTable[222] = 2;
} else if (_flagsTable[222] == 2) {
state = 19;
- _spritesTable[i].animationFrame = 23;
+ _spritesTable[i]._animationFrame = 23;
_updateSpriteFlag1 = 1;
} else if (_flagsTable[123] == 1) {
state = 17;
@@ -1870,34 +1870,34 @@ void TuckerEngine::updateSprite_locationNum32_0(int i) {
} else if (_flagsTable[222] == 3) {
state = 18;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 4;
} else if (_csDataHandled) {
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
- if (_spritesTable[i].counter > 13) {
- _spritesTable[i].counter = 0;
+ _spritesTable[i]._needUpdate = 0;
+ if (_spritesTable[i]._counter > 13) {
+ _spritesTable[i]._counter = 0;
}
- state = stateTable[_spritesTable[i].counter];
+ state = stateTable[_spritesTable[i]._counter];
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum33_0(int i) {
int state = 5;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 7;
} else if (_flagsTable[87] == 1) {
state = 8;
} else if (_flagsTable[222] == 5) {
state = 4;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = (getRandomNumber() < 30000) ? 5 : 6;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum33_1(int i) {
@@ -1909,7 +1909,7 @@ void TuckerEngine::updateSprite_locationNum33_1(int i) {
} else {
state = 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum33_2(int i) {
@@ -1921,7 +1921,7 @@ void TuckerEngine::updateSprite_locationNum33_2(int i) {
} else {
state = 9;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum33() {
@@ -1962,7 +1962,7 @@ void TuckerEngine::execData3PreUpdate_locationNum35() {
}
void TuckerEngine::updateSprite_locationNum36(int i) {
- _spritesTable[i].state = (getRandomNumber() < 32000) ? 1 : 2;
+ _spritesTable[i]._state = (getRandomNumber() < 32000) ? 1 : 2;
}
void TuckerEngine::execData3PreUpdate_locationNum36() {
@@ -1978,12 +1978,12 @@ void TuckerEngine::execData3PreUpdate_locationNum36() {
void TuckerEngine::updateSprite_locationNum37(int i) {
int j = i + 1;
int offset = 200 - i * 45;
- ++_spritesTable[i].counter;
- if (_spritesTable[i].counter > offset) {
- _spritesTable[i].state = j;
- _spritesTable[i].counter = 0;
+ ++_spritesTable[i]._counter;
+ if (_spritesTable[i]._counter > offset) {
+ _spritesTable[i]._state = j;
+ _spritesTable[i]._counter = 0;
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
}
@@ -2001,16 +2001,16 @@ void TuckerEngine::updateSprite_locationNum41(int i) {
state = 1;
_flagsTable[158] = 2;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 3;
} else if (getRandomNumber() < 30000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 4;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum41() {
@@ -2076,13 +2076,13 @@ void TuckerEngine::updateSprite_locationNum42(int i) {
_flagsTable[223] = 3;
} else if (_flagsTable[223] == 3) {
state = 5;
- _spritesTable[i].updateDelay = 5;
- _spritesTable[i].state = _spritesTable[i].firstFrame - 1; // FIXME: bug, fxNum ?
+ _spritesTable[i]._updateDelay = 5;
+ _spritesTable[i]._state = _spritesTable[i]._firstFrame - 1; // FIXME: bug, fxNum ?
_updateSpriteFlag1 = 1;
} else {
state = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum42() {
@@ -2094,18 +2094,18 @@ void TuckerEngine::updateSprite_locationNum43_2(int i) {
if (_flagsTable[237] > 0) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 5;
- } else if (_csDataHandled || _spritesTable[i].counter == 2) {
- _spritesTable[i].needUpdate = 0;
+ } else if (_csDataHandled || _spritesTable[i]._counter == 2) {
+ _spritesTable[i]._needUpdate = 0;
state = 6;
- } else if (_spritesTable[i].counter == 0) {
+ } else if (_spritesTable[i]._counter == 0) {
state = 3;
} else {
state = 4;
- _spritesTable[i].counter = 2;
+ _spritesTable[i]._counter = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum43_3(int i) {
@@ -2114,12 +2114,12 @@ void TuckerEngine::updateSprite_locationNum43_3(int i) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 7;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else {
state = 8;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum43_4(int i) {
@@ -2128,20 +2128,20 @@ void TuckerEngine::updateSprite_locationNum43_4(int i) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 9;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else {
state = 10;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum43_5(int i) {
- _spritesTable[i].state = (_flagsTable[236] < 4) ? -1 : 11;
+ _spritesTable[i]._state = (_flagsTable[236] < 4) ? -1 : 11;
}
void TuckerEngine::updateSprite_locationNum43_6(int i) {
- _spritesTable[i].state = (_flagsTable[236] < 4) ? -1 : 12;
+ _spritesTable[i]._state = (_flagsTable[236] < 4) ? -1 : 12;
}
void TuckerEngine::execData3PreUpdate_locationNum43() {
@@ -2150,8 +2150,8 @@ void TuckerEngine::execData3PreUpdate_locationNum43() {
_csDataLoaded = 0;
_nextAction = 5;
}
- if (_xPosCurrent > 55 && _spritesTable[2].counter == 0) {
- _spritesTable[2].counter = 1;
+ if (_xPosCurrent > 55 && _spritesTable[2]._counter == 0) {
+ _spritesTable[2]._counter = 1;
}
}
@@ -2182,14 +2182,14 @@ void TuckerEngine::updateSprite_locationNum48(int i) {
_flagsTable[160] = 3;
state = 3;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 2;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum49(int i) {
@@ -2211,20 +2211,20 @@ void TuckerEngine::updateSprite_locationNum49(int i) {
_flagsTable[185] = 0;
state = 4;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
if (getRandomNumber() < 30000 || _backgroundSpriteCurrentAnimation <= -1) {
state = 3;
- _spritesTable[i].updateDelay = 1;
+ _spritesTable[i]._updateDelay = 1;
} else if (getRandomNumber() < 16000) {
state = 5;
} else {
state = 6;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum49() {
@@ -2272,31 +2272,31 @@ void TuckerEngine::updateSprite_locationNum50(int i) {
_flagsTable[240] = 1;
}
} else {
- _spritesTable[i].animationFrame = _spritesTable[i].firstFrame - 1;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._animationFrame = _spritesTable[i]._firstFrame - 1;
+ _spritesTable[i]._updateDelay = 5;
_updateSpriteFlag1 = 1;
state = i + 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum51(int i) {
if (i == 2) {
- _spritesTable[i].state = 1;
+ _spritesTable[i]._state = 1;
} else if (i == 0) {
static const int stateTable[] = { 3, 3, 4, 5, 3, 3, 5, 4, 3, 3, 4, 5, 4, 4 };
- ++_spritesTable[i].counter;
- if (_spritesTable[i].counter > 13) {
- _spritesTable[i].counter = 0;
+ ++_spritesTable[i]._counter;
+ if (_spritesTable[i]._counter > 13) {
+ _spritesTable[i]._counter = 0;
}
- _spritesTable[i].state = stateTable[_spritesTable[i].counter];
+ _spritesTable[i]._state = stateTable[_spritesTable[i]._counter];
} else {
i = 1;
- _spritesTable[i].state = 6;
+ _spritesTable[i]._state = 6;
}
- _spritesTable[i].colorType = 1;
- _spritesTable[i].yMaxBackground = 0;
+ _spritesTable[i]._colorType = 1;
+ _spritesTable[i]._yMaxBackground = 0;
}
@@ -2313,21 +2313,21 @@ void TuckerEngine::updateSprite_locationNum53_0(int i) {
}
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 1;
} else if (_flagsTable[197] == 1) {
state = 3;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
_flagsTable[197] = 2;
} else if (_flagsTable[192] == 1) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 5;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum53_1(int i) {
@@ -2339,7 +2339,7 @@ void TuckerEngine::updateSprite_locationNum53_1(int i) {
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum53() {
@@ -2355,39 +2355,39 @@ void TuckerEngine::execData3PreUpdate_locationNum53() {
void TuckerEngine::updateSprite_locationNum54(int i) {
if (_flagsTable[141] == 2) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
setCharacterAnimation(0, i);
_flagsTable[141] = 1;
- _spritesTable[i].counter = 0;
- } else if (_flagsTable[141] == 1 && _spritesTable[i].counter < 40) {
+ _spritesTable[i]._counter = 0;
+ } else if (_flagsTable[141] == 1 && _spritesTable[i]._counter < 40) {
setCharacterAnimation(1, i);
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
} else if (_flagsTable[141] == 1) {
setCharacterAnimation(2, i);
_flagsTable[141] = 3;
} else {
int state = 3;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 2;
+ _spritesTable[i]._needUpdate = 2;
state = (getRandomNumber() < 12000) ? 2 : 4;
} else if (_flagsTable[141] == 3) {
_flagsTable[141] = 0;
_flagsTable[224] = 1;
- _spritesTable[i].counter = 0;
+ _spritesTable[i]._counter = 0;
if (_panelLockedFlag == 0 && _xPosCurrent > 130 && _inventoryItemsState[17] == 0) {
_nextAction = 18;
_csDataLoaded = false;
}
} else if (getRandomNumber() < 26000) {
- _spritesTable[i].needUpdate = 0;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._needUpdate = 0;
+ _spritesTable[i]._updateDelay = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
}
if (_inventoryItemsState[17] == 1) {
_flagsTable[224] = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
}
@@ -2399,7 +2399,7 @@ void TuckerEngine::updateSprite_locationNum55(int i) {
++_flagsTable[193];
}
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
if (_flagsTable[193] == 14) {
_flagsTable[193] = 15;
}
@@ -2408,26 +2408,26 @@ void TuckerEngine::updateSprite_locationNum55(int i) {
void TuckerEngine::updateSprite_locationNum56(int i) {
int state;
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
if (_flagsTable[153] == 1) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum57_0(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
if (getRandomNumber() < 30000) {
state = 1;
} else if (getRandomNumber() < 16000) {
@@ -2436,15 +2436,15 @@ void TuckerEngine::updateSprite_locationNum57_0(int i) {
state = 2;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum57_1(int i) {
int state = 6;
if (getRandomNumber() < 30000) {
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum57() {
@@ -2469,8 +2469,8 @@ void TuckerEngine::updateSprite_locationNum58(int i) {
_flagsTable[190] = 3;
}
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum58() {
@@ -2495,27 +2495,27 @@ void TuckerEngine::updateSprite_locationNum59(int i) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 3;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else if (_csDataHandled) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
if (_flagsTable[199] == 0) {
_flagsTable[199] = 1;
setCharacterAnimation(0, 0);
return;
}
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 3;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else if (_flagsTable[199] == 1) {
_flagsTable[199] = 0;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
setCharacterAnimation(1, 0);
return;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum60_0(int i) {
@@ -2523,34 +2523,34 @@ void TuckerEngine::updateSprite_locationNum60_0(int i) {
if (_flagsTable[186] > 0) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 9;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = (getRandomNumber() > 32000) ? 8 : 7;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum60_1(int i) {
int state;
if (_flagsTable[186] == 1) {
_flagsTable[186] = 2;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 2;
} else if (_flagsTable[186] == 2) {
state = 6;
_flagsTable[187] = 1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 1;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = (getRandomNumber() > 32000) ? 5 : 4;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PostUpdate_locationNum60() {
@@ -2566,19 +2566,19 @@ void TuckerEngine::updateSprite_locationNum61_0(int i) {
} else if (_flagsTable[88] == 2) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- if (_spritesTable[i].needUpdate == 0) {
- _spritesTable[i].needUpdate = 1;
+ if (_spritesTable[i]._needUpdate == 0) {
+ _spritesTable[i]._needUpdate = 1;
state = 2;
} else {
state = 2;
- _spritesTable[0].animationFrame = 2;
+ _spritesTable[0]._animationFrame = 2;
_updateSpriteFlag1 = 1;
}
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
if (r < 30000) {
state = 7;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else if (r < 31000) {
state = 7;
} else if (r < 32000) {
@@ -2587,7 +2587,7 @@ void TuckerEngine::updateSprite_locationNum61_0(int i) {
state = 6;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum61_1(int i) {
@@ -2595,19 +2595,19 @@ void TuckerEngine::updateSprite_locationNum61_1(int i) {
if (_flagsTable[151] == 1) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 14;
} else if (_csDataHandled || getRandomNumber() < 29000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 12;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else if (getRandomNumber() < 20000) {
state = 12;
} else {
state = 13;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum61_2(int i) {
@@ -2648,8 +2648,8 @@ void TuckerEngine::updateSprite_locationNum61_2(int i) {
if (_flagsTable[136] != 2) {
_flagsTable[150] = 0;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum61() {
@@ -2673,13 +2673,13 @@ void TuckerEngine::updateSprite_locationNum63_0(int i) {
} else if (_flagsTable[132] != 2 || _flagsTable[133] != 1 || _flagsTable[136] > 0) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 6;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum63_1(int i) {
@@ -2691,16 +2691,16 @@ void TuckerEngine::updateSprite_locationNum63_1(int i) {
state = 8;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum63_2(int i) {
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
int state = -1;
if (_flagsTable[132] == 2 && _flagsTable[133] == 1 && _flagsTable[136] <= 0) {
if (_flagsTable[226] == 0) {
state = 9;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else if (_flagsTable[226] == 1) {
state = 9;
_flagsTable[226] = 2;
@@ -2711,16 +2711,16 @@ void TuckerEngine::updateSprite_locationNum63_2(int i) {
state = 10;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum63_3(int i) {
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
int state = -1;
if (_flagsTable[132] == 2 && _flagsTable[133] == 1 && _flagsTable[136] <= 0) {
- if (_spritesTable[i].counter > 80) {
+ if (_spritesTable[i]._counter > 80) {
state = 7;
- _spritesTable[i].counter = 0;
+ _spritesTable[i]._counter = 0;
} else if (getRandomNumber() > 32000) {
state = 2;
} else if (getRandomNumber() > 32000) {
@@ -2729,7 +2729,7 @@ void TuckerEngine::updateSprite_locationNum63_3(int i) {
state = 8;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum63_4(int i) {
@@ -2737,7 +2737,7 @@ void TuckerEngine::updateSprite_locationNum63_4(int i) {
if (_flagsTable[132] == 2 && _flagsTable[133] == 1 && _flagsTable[136] == 0) {
state = 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum63() {
@@ -2804,7 +2804,7 @@ void TuckerEngine::updateSprite_locationNum65(int i) {
if (_flagsTable[188] == 1) {
_flagsTable[188] = 2;
state = 1;
- _spritesTable[i].gfxBackgroundOffset = 100;
+ _spritesTable[i]._gfxBackgroundOffset = 100;
} else if (_flagsTable[188] > 0 && _flagsTable[189] > 0) {
state = -1;
if (_xPosCurrent < 150 || _yPosCurrent > 240) {
@@ -2823,7 +2823,7 @@ void TuckerEngine::updateSprite_locationNum65(int i) {
_flagsTable[189] = 0;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum65() {
@@ -2833,56 +2833,56 @@ void TuckerEngine::execData3PreUpdate_locationNum65() {
void TuckerEngine::updateSprite_locationNum66_0(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 2;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum66_1(int i) {
int state;
if (_flagsTable[191] == 0 && _xPosCurrent > 568) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 8;
} else {
state = 10;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
}
} else {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 9;
} else if (getRandomNumber() > 30000) {
state = 6;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 7;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum66_2(int i) {
- _spritesTable[i].disabled = 1;
- _spritesTable[i].state = 3;
+ _spritesTable[i]._disabled = 1;
+ _spritesTable[i]._state = 3;
}
void TuckerEngine::updateSprite_locationNum66_3(int i) {
- _spritesTable[i].state = 4;
+ _spritesTable[i]._state = 4;
}
void TuckerEngine::updateSprite_locationNum66_4(int i) {
- _spritesTable[i].state = 5;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = 5;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum66() {
@@ -2904,25 +2904,25 @@ void TuckerEngine::execData3PreUpdate_locationNum66() {
}
void TuckerEngine::execData3PostUpdate_locationNum66() {
- if (_spritesTable[2].flipX == 1) {
+ if (_spritesTable[2]._flipX == 1) {
--_updateLocationXPosTable2[0];
if (_updateLocationXPosTable2[0] < -50) {
- _spritesTable[2].flipX = 0;
+ _spritesTable[2]._flipX = 0;
_updateLocationXPosTable2[0] = -50;
}
} else {
++_updateLocationXPosTable2[0];
if (_updateLocationXPosTable2[0] > 500) {
- _spritesTable[2].flipX = 1;
+ _spritesTable[2]._flipX = 1;
_updateLocationXPosTable2[0] = 500;
}
}
- _spritesTable[2].gfxBackgroundOffset = _updateLocationXPosTable2[0] + 8320;
+ _spritesTable[2]._gfxBackgroundOffset = _updateLocationXPosTable2[0] + 8320;
const int spr = 2;
- _spritesTable[spr].colorType = 1;
- _spritesTable[spr].yMaxBackground = 0;
+ _spritesTable[spr]._colorType = 1;
+ _spritesTable[spr]._yMaxBackground = 0;
drawSprite(spr);
- _spritesTable[spr].colorType = 0;
+ _spritesTable[spr]._colorType = 0;
}
void TuckerEngine::updateSprite_locationNum69_1(int i) {
@@ -2936,10 +2936,10 @@ void TuckerEngine::updateSprite_locationNum69_1(int i) {
} else if (_flagsTable[236] == 4) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 9;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else {
state = 14;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
}
} else if (_flagsTable[236] == 5) {
state = 7;
@@ -2947,7 +2947,7 @@ void TuckerEngine::updateSprite_locationNum69_1(int i) {
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum69_2(int i) {
@@ -2963,10 +2963,10 @@ void TuckerEngine::updateSprite_locationNum69_2(int i) {
} else if (_flagsTable[237] == 4 || _flagsTable[237] == 2 || _flagsTable[237] == 3 || _flagsTable[237] == 7) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 10;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else {
state = 12;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
}
} else if (_flagsTable[237] == 5) {
state = 16;
@@ -2980,7 +2980,7 @@ void TuckerEngine::updateSprite_locationNum69_2(int i) {
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum69_3(int i) {
@@ -2994,15 +2994,15 @@ void TuckerEngine::updateSprite_locationNum69_3(int i) {
_flagsTable[238] = 1;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 11;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else {
state = 13;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
}
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum70() {
@@ -3101,17 +3101,17 @@ void TuckerEngine::updateSprite_locationNum71(int i) {
if (_flagsTable[155] != 6 || _flagsTable[207] == 1) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 1;
} else if (getRandomNumber() < 30000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 2;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum72(int i) {
@@ -3119,13 +3119,13 @@ void TuckerEngine::updateSprite_locationNum72(int i) {
if (_flagsTable[155] == 7 || _flagsTable[207] == 1) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum74(int i) {
@@ -3135,12 +3135,12 @@ void TuckerEngine::updateSprite_locationNum74(int i) {
if (_updateLocationFlag == 0) {
_updateLocationFlag = 1;
} else {
- _spritesTable[i].animationFrame = _spritesTable[i].firstFrame - 1;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._animationFrame = _spritesTable[i]._firstFrame - 1;
+ _spritesTable[i]._updateDelay = 5;
_updateSpriteFlag1 = 1;
}
}
- _spritesTable[i].state = stateTable[num] + i;
+ _spritesTable[i]._state = stateTable[num] + i;
}
void TuckerEngine::updateSprite_locationNum79(int i) {
@@ -3150,43 +3150,43 @@ void TuckerEngine::updateSprite_locationNum79(int i) {
_flagsTable[227] = 1;
} else if (_flagsTable[227] == 1 && _charSpeechSoundCounter > 0) {
state = 2;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else if (_flagsTable[227] == 2) {
state = 3;
_flagsTable[227] = 3;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else {
- _spritesTable[i].animationFrame = _spritesTable[i].firstFrame - 1;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._animationFrame = _spritesTable[i]._firstFrame - 1;
+ _spritesTable[i]._updateDelay = 5;
_updateSpriteFlag1 = 1;
state = 3;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum81_0(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
state = 3;
_flagsTable[288] = 1;
} else if (_flagsTable[288] < 2) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
state = 2;
if (_flagsTable[288] == 1) {
_flagsTable[288] = 2;
}
} else {
- _spritesTable[i].animationFrame = _spritesTable[i].firstFrame - 1;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._animationFrame = _spritesTable[i]._firstFrame - 1;
+ _spritesTable[i]._updateDelay = 5;
_updateSpriteFlag1 = 1;
state = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum81_1(int i) {
- _spritesTable[i].state = 1;
+ _spritesTable[i]._state = 1;
}
void TuckerEngine::updateSprite_locationNum82(int i) {
@@ -3194,20 +3194,20 @@ void TuckerEngine::updateSprite_locationNum82(int i) {
if (_charSpeechSoundCounter > 0) {
state = 1;
_flagsTable[229] = 1;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = 1;
} else if (_flagsTable[229] == 0) {
state = 1;
} else if (_flagsTable[229] == 1) {
state = 2;
_flagsTable[229] = 2;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = 0;
} else {
- _spritesTable[i].animationFrame = _spritesTable[i].firstFrame - 1;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._animationFrame = _spritesTable[i]._firstFrame - 1;
+ _spritesTable[i]._updateDelay = 5;
_updateSpriteFlag1 = 1;
state = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
} // namespace Tucker
diff --git a/engines/tucker/resource.cpp b/engines/tucker/resource.cpp
index 48ddefe455..306b6160d1 100644
--- a/engines/tucker/resource.cpp
+++ b/engines/tucker/resource.cpp
@@ -408,8 +408,8 @@ void TuckerEngine::loadBudSpr(int startOffset) {
loadImage(filename.c_str(), _loadTempBuf, 0);
++frame;
}
- int sz = Graphics::encodeRLE(_loadTempBuf + _spriteFramesTable[i].sourceOffset, _spritesGfxBuf + spriteOffset, _spriteFramesTable[i].xSize, _spriteFramesTable[i].ySize);
- _spriteFramesTable[i].sourceOffset = spriteOffset;
+ int sz = Graphics::encodeRLE(_loadTempBuf + _spriteFramesTable[i]._sourceOffset, _spritesGfxBuf + spriteOffset, _spriteFramesTable[i]._xSize, _spriteFramesTable[i]._ySize);
+ _spriteFramesTable[i]._sourceOffset = spriteOffset;
spriteOffset += sz;
}
}
@@ -431,16 +431,16 @@ int TuckerEngine::loadCTable01(int index, int firstSpriteNum, int *framesCount)
}
const int y = t.getNextInteger();
SpriteFrame *c = &_spriteFramesTable[lastSpriteNum++];
- c->sourceOffset = y * 320 + x;
- c->xSize = t.getNextInteger();
- c->ySize = t.getNextInteger();
- c->xOffset = t.getNextInteger();
- if (c->xOffset > 300) {
- c->xOffset -= 500;
+ c->_sourceOffset = y * 320 + x;
+ c->_xSize = t.getNextInteger();
+ c->_ySize = t.getNextInteger();
+ c->_xOffset = t.getNextInteger();
+ if (c->_xOffset > 300) {
+ c->_xOffset -= 500;
}
- c->yOffset = t.getNextInteger();
- if (c->yOffset > 300) {
- c->yOffset -= 500;
+ c->_yOffset = t.getNextInteger();
+ if (c->_yOffset > 300) {
+ c->_yOffset -= 500;
}
}
}
@@ -455,17 +455,17 @@ void TuckerEngine::loadCTable02(int fl) {
loadFile("ctable02.c", _loadTempBuf);
DataTokenizer t(_loadTempBuf, _fileLoadSize);
while (t.findNextToken(kDataTokenDw)) {
- _spriteAnimationsTable[entry].numParts = t.getNextInteger();
- if (_spriteAnimationsTable[entry].numParts < 1) {
+ _spriteAnimationsTable[entry]._numParts = t.getNextInteger();
+ if (_spriteAnimationsTable[entry]._numParts < 1) {
return;
}
- _spriteAnimationsTable[entry].rotateFlag = t.getNextInteger();
+ _spriteAnimationsTable[entry]._rotateFlag = t.getNextInteger();
int num = t.getNextInteger();
if (num != fl) {
continue;
}
int start = 0;
- _spriteAnimationsTable[entry].firstFrameIndex = i;
+ _spriteAnimationsTable[entry]._firstFrameIndex = i;
while (start != 999) {
start = t.getNextInteger();
if (start == 9999) { // end marker in the demo version
@@ -726,20 +726,20 @@ void TuckerEngine::loadActionFile() {
int keyD = t.getNextInteger();
int keyE = t.getNextInteger();
Action *action = &_actionsTable[_actionsCount++];
- action->key = keyE * 1000000 + keyD * 100000 + keyA * 10000 + keyB * 1000 + keyC;
- action->testFlag1Num = t.getNextInteger();
- action->testFlag1Value = t.getNextInteger();
- action->testFlag2Num = t.getNextInteger();
- action->testFlag2Value = t.getNextInteger();
- action->speech = t.getNextInteger();
- action->flipX = t.getNextInteger();
- action->index = t.getNextInteger();
- action->delay = t.getNextInteger();
- action->setFlagNum = t.getNextInteger();
- assert(action->setFlagNum >= 0 && action->setFlagNum < kFlagsTableSize);
- action->setFlagValue = t.getNextInteger();
- action->fxNum = t.getNextInteger();
- action->fxDelay = t.getNextInteger();
+ action->_key = keyE * 1000000 + keyD * 100000 + keyA * 10000 + keyB * 1000 + keyC;
+ action->_testFlag1Num = t.getNextInteger();
+ action->_testFlag1Value = t.getNextInteger();
+ action->_testFlag2Num = t.getNextInteger();
+ action->_testFlag2Value = t.getNextInteger();
+ action->_speech = t.getNextInteger();
+ action->_flipX = t.getNextInteger();
+ action->_index = t.getNextInteger();
+ action->_delay = t.getNextInteger();
+ action->_setFlagNum = t.getNextInteger();
+ assert(action->_setFlagNum >= 0 && action->_setFlagNum < kFlagsTableSize);
+ action->_setFlagValue = t.getNextInteger();
+ action->_fxNum = t.getNextInteger();
+ action->_fxDelay = t.getNextInteger();
}
}
}
@@ -756,17 +756,17 @@ void TuckerEngine::loadCharPos() {
}
assert(_charPosCount < 4);
CharPos *charPos = &_charPosTable[_charPosCount++];
- charPos->xPos = i;
- charPos->yPos = t.getNextInteger();
- charPos->xSize = t.getNextInteger();
- charPos->ySize = t.getNextInteger();
- charPos->xWalkTo = t.getNextInteger();
- charPos->yWalkTo = t.getNextInteger();
- charPos->flagNum = t.getNextInteger();
- charPos->flagValue = t.getNextInteger();
- charPos->direction = t.getNextInteger();
- charPos->name = t.getNextInteger();
- charPos->description = t.getNextInteger();
+ charPos->_xPos = i;
+ charPos->_yPos = t.getNextInteger();
+ charPos->_xSize = t.getNextInteger();
+ charPos->_ySize = t.getNextInteger();
+ charPos->_xWalkTo = t.getNextInteger();
+ charPos->_yWalkTo = t.getNextInteger();
+ charPos->_flagNum = t.getNextInteger();
+ charPos->_flagValue = t.getNextInteger();
+ charPos->_direction = t.getNextInteger();
+ charPos->_name = t.getNextInteger();
+ charPos->_description = t.getNextInteger();
}
int quitLoop = 0;
size_t count = 0;
@@ -835,8 +835,8 @@ void TuckerEngine::loadSprC02_01() {
_spritesCount = _sprC02LookupTable2[_locationNum];
for (int i = 0; i < kMaxCharacters; ++i) {
memset(&_spritesTable[i], 0, sizeof(Sprite));
- _spritesTable[i].state = -1;
- _spritesTable[i].stateIndex = -1;
+ _spritesTable[i]._state = -1;
+ _spritesTable[i]._stateIndex = -1;
}
}
@@ -1005,7 +1005,7 @@ void TuckerEngine::loadActionsTable() {
}
}
} else {
- if (_spritesTable[_csDataTableCount - 1].firstFrame - 1 != _spritesTable[_csDataTableCount - 1].animationFrame) {
+ if (_spritesTable[_csDataTableCount - 1]._firstFrame - 1 != _spritesTable[_csDataTableCount - 1]._animationFrame) {
break;
}
}
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index 0e1188031b..e00c6e43aa 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -352,7 +352,7 @@ void TuckerEngine::mainLoop() {
_flagsTable[219] = 1;
_flagsTable[105] = 1;
- _spriteAnimationFrameIndex = _spriteAnimationsTable[14].firstFrameIndex;
+ _spriteAnimationFrameIndex = _spriteAnimationsTable[14]._firstFrameIndex;
if (ConfMan.hasKey("save_slot")) {
const int slot = ConfMan.getInt("save_slot");
@@ -466,10 +466,10 @@ void TuckerEngine::mainLoop() {
}
_currentGfxBackground = _quadBackgroundGfxBuf + (_currentGfxBackgroundCounter / 10) * 44800;
if (_fadePaletteCounter < 34 && _locationNum == 22) {
- _spritesTable[0].gfxBackgroundOffset = (_currentGfxBackgroundCounter / 10) * 640;
+ _spritesTable[0]._gfxBackgroundOffset = (_currentGfxBackgroundCounter / 10) * 640;
_mainSpritesBaseOffset = _currentGfxBackgroundCounter / 10;
if (_locationNum == 22 && _currentGfxBackgroundCounter <= 29) {
- _spritesTable[0].gfxBackgroundOffset = 640;
+ _spritesTable[0]._gfxBackgroundOffset = 640;
_mainSpritesBaseOffset = 1;
}
}
@@ -489,7 +489,7 @@ void TuckerEngine::mainLoop() {
drawData3();
execData3PreUpdate();
for (int i = 0; i < _spritesCount; ++i) {
- if (!_spritesTable[i].disabled) {
+ if (!_spritesTable[i]._disabled) {
drawSprite(i);
}
}
@@ -842,8 +842,8 @@ void TuckerEngine::updateCharPosition() {
break;
case 2:
_characterSpeechDataPtr = _ptTextBuf;
- _speechSoundNum = 2175 + _charPosTable[_selectedCharacterNum].description;
- if (_charPosTable[_selectedCharacterNum].description != 0) {
+ _speechSoundNum = 2175 + _charPosTable[_selectedCharacterNum]._description;
+ if (_charPosTable[_selectedCharacterNum]._description != 0) {
updateCharPositionHelper();
return;
}
@@ -856,27 +856,27 @@ void TuckerEngine::updateCharPosition() {
Action *action = 0;
for (int i = 0; i < _actionsCount && skip == 0; ++i) {
action = &_actionsTable[i];
- if (action->key == actionKey) {
+ if (action->_key == actionKey) {
skip = 1;
- if (action->testFlag1Num != 0) {
- if (action->testFlag1Num < 500) {
- if (_flagsTable[action->testFlag1Num] != action->testFlag1Value) {
+ if (action->_testFlag1Num != 0) {
+ if (action->_testFlag1Num < 500) {
+ if (_flagsTable[action->_testFlag1Num] != action->_testFlag1Value) {
skip = 0;
}
- } else if (_inventoryItemsState[action->testFlag1Num - 500] != action->testFlag1Value) {
+ } else if (_inventoryItemsState[action->_testFlag1Num - 500] != action->_testFlag1Value) {
skip = 0;
}
- debug(3, "updateCharPosition() flag1 %d value %d", action->testFlag1Num, action->testFlag1Value);
+ debug(3, "updateCharPosition() flag1 %d value %d", action->_testFlag1Num, action->_testFlag1Value);
}
- if (action->testFlag2Num != 0) {
- if (action->testFlag2Num < 500) {
- if (_flagsTable[action->testFlag2Num] != action->testFlag2Value) {
+ if (action->_testFlag2Num != 0) {
+ if (action->_testFlag2Num < 500) {
+ if (_flagsTable[action->_testFlag2Num] != action->_testFlag2Value) {
skip = 0;
}
- } else if (_inventoryItemsState[action->testFlag2Num - 500] != action->testFlag2Value) {
+ } else if (_inventoryItemsState[action->_testFlag2Num - 500] != action->_testFlag2Value) {
skip = 0;
}
- debug(3, "updateCharPosition() flag2 %d value %d", action->testFlag2Num, action->testFlag2Value);
+ debug(3, "updateCharPosition() flag2 %d value %d", action->_testFlag2Num, action->_testFlag2Value);
}
}
}
@@ -886,25 +886,25 @@ void TuckerEngine::updateCharPosition() {
return;
}
assert(action);
- if (action->speech != 6) {
- if (action->speech < 100) {
- _spriteAnimationFrameIndex = _spriteAnimationsTable[action->speech].firstFrameIndex;
- _currentSpriteAnimationLength = _spriteAnimationsTable[action->speech].numParts;
- _mirroredDrawing = action->flipX;
+ if (action->_speech != 6) {
+ if (action->_speech < 100) {
+ _spriteAnimationFrameIndex = _spriteAnimationsTable[action->_speech]._firstFrameIndex;
+ _currentSpriteAnimationLength = _spriteAnimationsTable[action->_speech]._numParts;
+ _mirroredDrawing = action->_flipX;
_characterFacingDirection = 5;
_mainLoopCounter2 = 0;
} else {
- _backgroundSpriteCurrentAnimation = action->speech - 100;
+ _backgroundSpriteCurrentAnimation = action->_speech - 100;
_backgroundSpriteCurrentFrame = 0;
_mirroredDrawing = 0;
}
}
- _pendingActionDelay = action->delay;
- _charPositionFlagNum = action->setFlagNum;
- _charPositionFlagValue = action->setFlagValue;
- _pendingActionIndex = action->index;
- _characterSoundFxDelayCounter = action->fxDelay;
- _characterSoundFxNum = action->fxNum;
+ _pendingActionDelay = action->_delay;
+ _charPositionFlagNum = action->_setFlagNum;
+ _charPositionFlagValue = action->_setFlagValue;
+ _pendingActionIndex = action->_index;
+ _characterSoundFxDelayCounter = action->_fxDelay;
+ _characterSoundFxNum = action->_fxNum;
_previousActionVerb = _currentActionVerb;
_currentActionVerb = 0;
}
@@ -1244,13 +1244,13 @@ void TuckerEngine::updateSfxData3_1() {
LocationSound *s = &_locationSoundsTable[i];
if ((s->type == 6 || s->type == 7) && s->updateType == 1) {
for (int j = 0; j < _spritesCount; ++j) {
- if (_spritesTable[j].animationFrame == s->startFxSpriteNum && _spritesTable[j].state == s->startFxSpriteState) {
+ if (_spritesTable[j]._animationFrame == s->startFxSpriteNum && _spritesTable[j]._state == s->startFxSpriteState) {
if (s->type == 7) {
_flagsTable[s->flagNum] = s->flagValueStartFx;
}
startSound(s->offset, i, s->volume);
} else if (s->type == 7) {
- if (_spritesTable[j].animationFrame == s->stopFxSpriteNum && _spritesTable[j].state == s->stopFxSpriteState) {
+ if (_spritesTable[j]._animationFrame == s->stopFxSpriteNum && _spritesTable[j]._state == s->stopFxSpriteState) {
_flagsTable[s->flagNum] = s->flagValueStopFx;
stopSound(i);
}
@@ -1750,28 +1750,28 @@ void TuckerEngine::drawCurrentSprite() {
// Workaround original game glitch: location 14 contains some colors from [0xE0-0xF8] in a walkable area (tracker item #3106542)
const bool color248Only = (_locationNum == 14);
SpriteFrame *chr = &_spriteFramesTable[_currentSpriteAnimationFrame];
- int yPos = _yPosCurrent + _mainSpritesBaseOffset - 54 + chr->yOffset;
+ int yPos = _yPosCurrent + _mainSpritesBaseOffset - 54 + chr->_yOffset;
int xPos = _xPosCurrent;
if (_mirroredDrawing == 0) {
- xPos += chr->xOffset - 14;
+ xPos += chr->_xOffset - 14;
} else {
- xPos -= chr->xSize + chr->xOffset - 14;
+ xPos -= chr->_xSize + chr->_xOffset - 14;
}
- Graphics::decodeRLE_248(_locationBackgroundGfxBuf + yPos * 640 + xPos, _spritesGfxBuf + chr->sourceOffset, chr->xSize, chr->ySize,
- chr->yOffset, _locationHeightTable[_locationNum], _mirroredDrawing != 0, color248Only);
- addDirtyRect(xPos, yPos, chr->xSize, chr->ySize);
+ Graphics::decodeRLE_248(_locationBackgroundGfxBuf + yPos * 640 + xPos, _spritesGfxBuf + chr->_sourceOffset, chr->_xSize, chr->_ySize,
+ chr->_yOffset, _locationHeightTable[_locationNum], _mirroredDrawing != 0, color248Only);
+ addDirtyRect(xPos, yPos, chr->_xSize, chr->_ySize);
if (_currentSpriteAnimationLength > 1) {
SpriteFrame *chr2 = &_spriteFramesTable[_currentSpriteAnimationFrame2];
- yPos = _yPosCurrent + _mainSpritesBaseOffset - 54 + chr2->yOffset;
+ yPos = _yPosCurrent + _mainSpritesBaseOffset - 54 + chr2->_yOffset;
xPos = _xPosCurrent;
if (_mirroredDrawing == 0) {
- xPos += chr2->xOffset - 14;
+ xPos += chr2->_xOffset - 14;
} else {
- xPos -= chr2->xSize + chr2->xOffset - 14;
+ xPos -= chr2->_xSize + chr2->_xOffset - 14;
}
- Graphics::decodeRLE_248(_locationBackgroundGfxBuf + yPos * 640 + xPos, _spritesGfxBuf + chr2->sourceOffset, chr2->xSize, chr2->ySize,
- chr2->yOffset, _locationHeightTable[_locationNum], _mirroredDrawing != 0, color248Only);
- addDirtyRect(xPos, yPos, chr2->xSize, chr2->ySize);
+ Graphics::decodeRLE_248(_locationBackgroundGfxBuf + yPos * 640 + xPos, _spritesGfxBuf + chr2->_sourceOffset, chr2->_xSize, chr2->_ySize,
+ chr2->_yOffset, _locationHeightTable[_locationNum], _mirroredDrawing != 0, color248Only);
+ addDirtyRect(xPos, yPos, chr2->_xSize, chr2->_ySize);
}
}
@@ -1894,25 +1894,25 @@ void TuckerEngine::redrawPanelItemsHelper() {
void TuckerEngine::drawSprite(int num) {
Sprite *s = &_spritesTable[num];
- if (s->animationFrame <= s->firstFrame && s->animationFrame > 0 && s->state != -1) {
- const uint8 *p = s->animationData;
+ if (s->_animationFrame <= s->_firstFrame && s->_animationFrame > 0 && s->_state != -1) {
+ const uint8 *p = s->_animationData;
if (!p) {
return;
}
- int frameOffset = READ_LE_UINT24(p + s->animationFrame * 4);
+ int frameOffset = READ_LE_UINT24(p + s->_animationFrame * 4);
int srcW = READ_LE_UINT16(p + frameOffset);
int srcH = READ_LE_UINT16(p + frameOffset + 2);
int srcX = READ_LE_UINT16(p + frameOffset + 8);
int srcY = READ_LE_UINT16(p + frameOffset + 10);
- int xPos = s->gfxBackgroundOffset + srcX;
+ int xPos = s->_gfxBackgroundOffset + srcX;
if (xPos < 600 && (_scrollOffset + 320 < xPos || _scrollOffset - srcW > xPos)) {
return;
}
- s->xSource = srcX;
- s->gfxBackgroundOffset += s->backgroundOffset;
+ s->_xSource = srcX;
+ s->_gfxBackgroundOffset += s->_backgroundOffset;
uint8 *dstPtr = _locationBackgroundGfxBuf + srcY * 640 + xPos;
const uint8 *srcPtr = p + frameOffset + 12;
- switch (s->colorType) {
+ switch (s->_colorType) {
case 0:
Graphics::decodeRLE(dstPtr, srcPtr, srcW, srcH);
break;
@@ -1920,11 +1920,11 @@ void TuckerEngine::drawSprite(int num) {
Graphics::decodeRLE_224(dstPtr, srcPtr, srcW, srcH);
break;
default:
- Graphics::decodeRLE_248(dstPtr, srcPtr, srcW, srcH, 0, s->yMaxBackground, s->flipX != 0);
+ Graphics::decodeRLE_248(dstPtr, srcPtr, srcW, srcH, 0, s->_yMaxBackground, s->_flipX != 0);
break;
}
- const int xR = srcX + (s->gfxBackgroundOffset % 640);
- const int yR = srcY + (s->gfxBackgroundOffset / 640);
+ const int xR = srcX + (s->_gfxBackgroundOffset % 640);
+ const int yR = srcY + (s->_gfxBackgroundOffset / 640);
addDirtyRect(xR, yR, srcW, srcH);
}
}
@@ -2227,14 +2227,14 @@ void TuckerEngine::updateCharacterAnimation() {
break;
}
}
- _currentSpriteAnimationLength = _spriteAnimationsTable[num].numParts;
- _spriteAnimationFrameIndex = _spriteAnimationsTable[num].firstFrameIndex;
+ _currentSpriteAnimationLength = _spriteAnimationsTable[num]._numParts;
+ _spriteAnimationFrameIndex = _spriteAnimationsTable[num]._firstFrameIndex;
frame = _spriteAnimationFramesTable[_spriteAnimationFrameIndex];
}
if (_characterAnimationNum > 0) {
num = _characterAnimationNum;
- _currentSpriteAnimationLength = _spriteAnimationsTable[num].numParts;
- _spriteAnimationFrameIndex = _spriteAnimationsTable[num].firstFrameIndex;
+ _currentSpriteAnimationLength = _spriteAnimationsTable[num]._numParts;
+ _spriteAnimationFrameIndex = _spriteAnimationsTable[num]._firstFrameIndex;
frame = _spriteAnimationFramesTable[_spriteAnimationFrameIndex];
_characterAnimationNum = 0;
}
@@ -2372,79 +2372,79 @@ void TuckerEngine::handleMap() {
void TuckerEngine::clearSprites() {
memset(_spritesTable, 0, sizeof(_spritesTable));
for (int i = 0; i < kMaxCharacters; ++i) {
- _spritesTable[i].state = -1;
- _spritesTable[i].stateIndex = -1;
+ _spritesTable[i]._state = -1;
+ _spritesTable[i]._stateIndex = -1;
}
}
void TuckerEngine::updateSprites() {
const int count = (_locationNum == 9) ? 3 : _spritesCount;
for (int i = 0; i < count; ++i) {
- if (_spritesTable[i].stateIndex > -1) {
- ++_spritesTable[i].stateIndex;
- if (_characterStateTable[_spritesTable[i].stateIndex] == 99) {
- _spritesTable[i].stateIndex = -1;
- _spritesTable[i].state = -1;
+ if (_spritesTable[i]._stateIndex > -1) {
+ ++_spritesTable[i]._stateIndex;
+ if (_characterStateTable[_spritesTable[i]._stateIndex] == 99) {
+ _spritesTable[i]._stateIndex = -1;
+ _spritesTable[i]._state = -1;
updateSprite(i);
} else {
- _spritesTable[i].animationFrame = _characterStateTable[_spritesTable[i].stateIndex];
+ _spritesTable[i]._animationFrame = _characterStateTable[_spritesTable[i]._stateIndex];
}
continue;
}
- if (_spritesTable[i].state == -1) {
+ if (_spritesTable[i]._state == -1) {
updateSprite(i);
continue;
}
- if (_charSpeechSoundCounter > 0 && i == _actionCharacterNum && _spritesTable[i].needUpdate == 0) {
+ if (_charSpeechSoundCounter > 0 && i == _actionCharacterNum && _spritesTable[i]._needUpdate == 0) {
updateSprite(i);
continue;
}
- if (_charSpeechSoundCounter == 0 && _spritesTable[i].needUpdate > 0) {
+ if (_charSpeechSoundCounter == 0 && _spritesTable[i]._needUpdate > 0) {
updateSprite(i);
continue;
}
- if (_spritesTable[i].updateDelay > 0) {
- --_spritesTable[i].updateDelay;
- if (_spritesTable[i].updateDelay == 0) {
+ if (_spritesTable[i]._updateDelay > 0) {
+ --_spritesTable[i]._updateDelay;
+ if (_spritesTable[i]._updateDelay == 0) {
updateSprite(i);
}
continue;
}
- if (_spritesTable[i].defaultUpdateDelay > 0) {
- _spritesTable[i].updateDelay = _spritesTable[i].defaultUpdateDelay - 1;
- ++_spritesTable[i].animationFrame;
- if (_spritesTable[i].animationFrame == _spritesTable[i].firstFrame) {
+ if (_spritesTable[i]._defaultUpdateDelay > 0) {
+ _spritesTable[i]._updateDelay = _spritesTable[i]._defaultUpdateDelay - 1;
+ ++_spritesTable[i]._animationFrame;
+ if (_spritesTable[i]._animationFrame == _spritesTable[i]._firstFrame) {
updateSprite(i);
}
continue;
}
- if (_spritesTable[i].nextAnimationFrame == 0) {
- ++_spritesTable[i].animationFrame;
- if (_spritesTable[i].firstFrame - 1 < _spritesTable[i].animationFrame) {
- if (_spritesTable[i].prevAnimationFrame == 1) {
- --_spritesTable[i].animationFrame;
- _spritesTable[i].nextAnimationFrame = 1;
+ if (_spritesTable[i]._nextAnimationFrame == 0) {
+ ++_spritesTable[i]._animationFrame;
+ if (_spritesTable[i]._firstFrame - 1 < _spritesTable[i]._animationFrame) {
+ if (_spritesTable[i]._prevAnimationFrame == 1) {
+ --_spritesTable[i]._animationFrame;
+ _spritesTable[i]._nextAnimationFrame = 1;
} else {
updateSprite(i);
}
}
continue;
}
- --_spritesTable[i].animationFrame;
- if (_spritesTable[i].animationFrame == 0) {
+ --_spritesTable[i]._animationFrame;
+ if (_spritesTable[i]._animationFrame == 0) {
updateSprite(i);
}
}
}
void TuckerEngine::updateSprite(int i) {
- _spritesTable[i].prevState = _spritesTable[i].state;
- _spritesTable[i].prevAnimationFrame = 0;
- _spritesTable[i].nextAnimationFrame = 0;
+ _spritesTable[i]._prevState = _spritesTable[i]._state;
+ _spritesTable[i]._prevAnimationFrame = 0;
+ _spritesTable[i]._nextAnimationFrame = 0;
_updateSpriteFlag1 = 0;
_updateSpriteFlag2 = 0;
- _spritesTable[i].defaultUpdateDelay = 0;
- _spritesTable[i].updateDelay = 0;
+ _spritesTable[i]._defaultUpdateDelay = 0;
+ _spritesTable[i]._updateDelay = 0;
switch (_locationNum) {
case 2:
updateSprite_locationNum2();
@@ -2634,7 +2634,7 @@ void TuckerEngine::updateSprite(int i) {
if (i == 0) {
updateSprite_locationNum32_0(0);
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
break;
case 33:
@@ -2645,7 +2645,7 @@ void TuckerEngine::updateSprite(int i) {
} else if (i == 2) {
updateSprite_locationNum33_2(2);
} else {
- _spritesTable[i].state = 12;
+ _spritesTable[i]._state = 12;
}
break;
case 34:
@@ -2656,7 +2656,7 @@ void TuckerEngine::updateSprite(int i) {
break;
case 37:
if (i == 0) {
- _spritesTable[0].state = -1;
+ _spritesTable[0]._state = -1;
} else {
updateSprite_locationNum37(i);
}
@@ -2672,9 +2672,9 @@ void TuckerEngine::updateSprite(int i) {
updateSprite_locationNum43_2(i);
} else if (i < 2) {
if (_flagsTable[236] < 4) {
- _spritesTable[i].state = i + 1;
+ _spritesTable[i]._state = i + 1;
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
} else if (i == 3) {
updateSprite_locationNum43_3(3);
@@ -2687,10 +2687,10 @@ void TuckerEngine::updateSprite(int i) {
}
break;
case 45:
- _spritesTable[0].state = 1;
+ _spritesTable[0]._state = 1;
break;
case 47:
- _spritesTable[i].state = i + 1;
+ _spritesTable[i]._state = i + 1;
break;
case 48:
updateSprite_locationNum48(0);
@@ -2702,7 +2702,7 @@ void TuckerEngine::updateSprite(int i) {
if (i < 6) {
updateSprite_locationNum50(i);
} else {
- _spritesTable[i].state = i + 1;
+ _spritesTable[i]._state = i + 1;
}
break;
case 51:
@@ -2784,7 +2784,7 @@ void TuckerEngine::updateSprite(int i) {
break;
case 69:
if (i == 0) {
- _spritesTable[0].state = 1;
+ _spritesTable[0]._state = 1;
} else if (i == 1) {
updateSprite_locationNum69_1(1);
} else if (i == 2) {
@@ -2816,23 +2816,23 @@ void TuckerEngine::updateSprite(int i) {
updateSprite_locationNum82(0);
break;
case 98:
- _spritesTable[0].state = 1;
+ _spritesTable[0]._state = 1;
break;
}
- if (_spritesTable[i].stateIndex <= -1) {
+ if (_spritesTable[i]._stateIndex <= -1) {
if (_updateSpriteFlag1 == 0) {
- _spritesTable[i].animationFrame = 1;
+ _spritesTable[i]._animationFrame = 1;
}
- if (_spritesTable[i].state < 0 || !_sprC02Table[_spritesTable[i].state]) {
+ if (_spritesTable[i]._state < 0 || !_sprC02Table[_spritesTable[i]._state]) {
// warning("Invalid state %d for sprite %d location %d", _spritesTable[i].state, i, _locationNum);
return;
}
- _spritesTable[i].animationData = _sprC02Table[_spritesTable[i].state];
- _spritesTable[i].firstFrame = READ_LE_UINT16(_spritesTable[i].animationData);
+ _spritesTable[i]._animationData = _sprC02Table[_spritesTable[i]._state];
+ _spritesTable[i]._firstFrame = READ_LE_UINT16(_spritesTable[i]._animationData);
if (_updateSpriteFlag2 == 1) {
- _spritesTable[i].state = _spritesTable[i].firstFrame;
- _spritesTable[i].nextAnimationFrame = 1;
- _spritesTable[i].prevAnimationFrame = 1;
+ _spritesTable[i]._state = _spritesTable[i]._firstFrame;
+ _spritesTable[i]._nextAnimationFrame = 1;
+ _spritesTable[i]._prevAnimationFrame = 1;
}
}
}
@@ -3125,7 +3125,7 @@ int TuckerEngine::executeTableInstruction() {
return 0;
case kCode_bub:
i = readTableInstructionParam(3);
- _spriteAnimationFrameIndex = _spriteAnimationsTable[i].firstFrameIndex;
+ _spriteAnimationFrameIndex = _spriteAnimationsTable[i]._firstFrameIndex;
_characterFacingDirection = 5;
_mainLoopCounter2 = 0;
return 0;
@@ -3171,14 +3171,14 @@ int TuckerEngine::executeTableInstruction() {
_yPosCurrent = readTableInstructionParam(3);
return 0;
case kCode_c0a:
- _spritesTable[index].state = readTableInstructionParam(3);
- if (_spritesTable[index].state == 999) {
- _spritesTable[index].state = -1;
+ _spritesTable[index]._state = readTableInstructionParam(3);
+ if (_spritesTable[index]._state == 999) {
+ _spritesTable[index]._state = -1;
}
_mainLoopCounter1 = 0;
- _spritesTable[index].updateDelay = 0;
- _spritesTable[index].nextAnimationFrame = 0;
- _spritesTable[index].prevAnimationFrame = 0;
+ _spritesTable[index]._updateDelay = 0;
+ _spritesTable[index]._nextAnimationFrame = 0;
+ _spritesTable[index]._prevAnimationFrame = 0;
return 0;
case kCode_c0c:
setCharacterAnimation(readTableInstructionParam(3), index);
@@ -3437,8 +3437,8 @@ void TuckerEngine::setSelectedObjectKey() {
_selectedObject.yPos = _locationAnimationsTable[_selectedCharacterNum].standY;
break;
case 2:
- _selectedObject.xPos = _charPosTable[_selectedCharacterNum].xWalkTo;
- _selectedObject.yPos = _charPosTable[_selectedCharacterNum].yWalkTo;
+ _selectedObject.xPos = _charPosTable[_selectedCharacterNum]._xWalkTo;
+ _selectedObject.yPos = _charPosTable[_selectedCharacterNum]._yWalkTo;
break;
case 3:
_selectedObject.xPos = _xPosCurrent;
@@ -3479,20 +3479,20 @@ void TuckerEngine::setSelectedObjectKey() {
}
void TuckerEngine::setCharacterAnimation(int count, int spr) {
- _spritesTable[spr].animationFrame = 0;
- _spritesTable[spr].stateIndex = 0;
+ _spritesTable[spr]._animationFrame = 0;
+ _spritesTable[spr]._stateIndex = 0;
for (int i = 0; i < count; ++i) {
- while (_characterStateTable[_spritesTable[spr].stateIndex] != 99) {
- ++_spritesTable[spr].stateIndex;
+ while (_characterStateTable[_spritesTable[spr]._stateIndex] != 99) {
+ ++_spritesTable[spr]._stateIndex;
}
- ++_spritesTable[spr].stateIndex;
+ ++_spritesTable[spr]._stateIndex;
}
- _spritesTable[spr].state = _characterStateTable[_spritesTable[spr].stateIndex];
- ++_spritesTable[spr].stateIndex;
- _spritesTable[spr].animationFrame = _characterStateTable[_spritesTable[spr].stateIndex];
- ++_spritesTable[spr].stateIndex;
- _spritesTable[spr].animationData = _sprC02Table[_spritesTable[spr].state];
- _spritesTable[spr].firstFrame = READ_LE_UINT16(_spritesTable[spr].animationData);
+ _spritesTable[spr]._state = _characterStateTable[_spritesTable[spr]._stateIndex];
+ ++_spritesTable[spr]._stateIndex;
+ _spritesTable[spr]._animationFrame = _characterStateTable[_spritesTable[spr]._stateIndex];
+ ++_spritesTable[spr]._stateIndex;
+ _spritesTable[spr]._animationData = _sprC02Table[_spritesTable[spr]._state];
+ _spritesTable[spr]._firstFrame = READ_LE_UINT16(_spritesTable[spr]._animationData);
}
int TuckerEngine::testLocationMaskArea(int xBase, int yBase, int xPos, int yPos) {
@@ -3587,23 +3587,23 @@ int TuckerEngine::setCharacterUnderCursor() {
return -1;
}
for (int i = 0; i < _charPosCount; ++i) {
- if (_mousePosX + _scrollOffset <= _charPosTable[i].xPos) {
+ if (_mousePosX + _scrollOffset <= _charPosTable[i]._xPos) {
continue;
}
- if (_mousePosX + _scrollOffset >= _charPosTable[i].xPos + _charPosTable[i].xSize) {
+ if (_mousePosX + _scrollOffset >= _charPosTable[i]._xPos + _charPosTable[i]._xSize) {
continue;
}
- if (_mousePosY <= _charPosTable[i].yPos) {
+ if (_mousePosY <= _charPosTable[i]._yPos) {
continue;
}
- if (_mousePosY >= _charPosTable[i].yPos + _charPosTable[i].ySize) {
+ if (_mousePosY >= _charPosTable[i]._yPos + _charPosTable[i]._ySize) {
continue;
}
- if (_charPosTable[i].flagNum == 0 || _flagsTable[_charPosTable[i].flagNum] == _charPosTable[i].flagValue) {
+ if (_charPosTable[i]._flagNum == 0 || _flagsTable[_charPosTable[i]._flagNum] == _charPosTable[i]._flagValue) {
_selectedObjectType = 2;
- _selectedCharacterDirection = _charPosTable[i].direction;
+ _selectedCharacterDirection = _charPosTable[i]._direction;
_selectedCharacterNum = i;
- return _charPosTable[i].name;
+ return _charPosTable[i]._name;
}
}
return -1;
diff --git a/engines/tucker/tucker.h b/engines/tucker/tucker.h
index 1a970e3a0c..c473702164 100644
--- a/engines/tucker/tucker.h
+++ b/engines/tucker/tucker.h
@@ -53,69 +53,69 @@ class RewindableAudioStream;
namespace Tucker {
struct Action {
- int key;
- int testFlag1Num;
- int testFlag1Value;
- int testFlag2Num;
- int testFlag2Value;
- int speech;
- int flipX;
- int index;
- int delay;
- int setFlagNum;
- int setFlagValue;
- int fxNum;
- int fxDelay;
+ int _key;
+ int _testFlag1Num;
+ int _testFlag1Value;
+ int _testFlag2Num;
+ int _testFlag2Value;
+ int _speech;
+ int _flipX;
+ int _index;
+ int _delay;
+ int _setFlagNum;
+ int _setFlagValue;
+ int _fxNum;
+ int _fxDelay;
};
struct Sprite {
- int state;
- int gfxBackgroundOffset;
- int updateDelay;
- int backgroundOffset;
- int needUpdate;
- int stateIndex;
- int counter;
- int disabled;
- int colorType;
- int animationFrame;
- int firstFrame;
- uint8 *animationData;
- int prevState;
- int nextAnimationFrame;
- int prevAnimationFrame;
- int defaultUpdateDelay;
- int xSource;
- int yMaxBackground;
- int flipX;
+ int _state;
+ int _gfxBackgroundOffset;
+ int _updateDelay;
+ int _backgroundOffset;
+ int _needUpdate;
+ int _stateIndex;
+ int _counter;
+ int _disabled;
+ int _colorType;
+ int _animationFrame;
+ int _firstFrame;
+ uint8 *_animationData;
+ int _prevState;
+ int _nextAnimationFrame;
+ int _prevAnimationFrame;
+ int _defaultUpdateDelay;
+ int _xSource;
+ int _yMaxBackground;
+ int _flipX;
};
struct CharPos {
- int xPos;
- int yPos;
- int xSize;
- int ySize;
- int xWalkTo;
- int yWalkTo;
- int flagNum;
- int flagValue;
- int direction;
- int name;
- int description;
+ int _xPos;
+ int _yPos;
+ int _xSize;
+ int _ySize;
+ int _xWalkTo;
+ int _yWalkTo;
+ int _flagNum;
+ int _flagValue;
+ int _direction;
+ int _name;
+ int _description;
};
struct SpriteFrame {
- int sourceOffset;
- int xOffset;
- int yOffset;
- int xSize;
- int ySize;
+ int _sourceOffset;
+ int _xOffset;
+ int _yOffset;
+ int _xSize;
+ int _ySize;
};
struct SpriteAnimation {
- int numParts;
- int rotateFlag;
- int firstFrameIndex;
+ int _numParts;
+ int _rotateFlag;
+ int _firstFrameIndex;
};
struct Data {