TUCKER: cleanup, removed unused variables
This commit is contained in:
parent
c53abb0aba
commit
855b676cd4
4 changed files with 9 additions and 13 deletions
|
@ -383,12 +383,14 @@ void TuckerEngine::loadPanel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TuckerEngine::loadBudSpr(int startOffset) {
|
void TuckerEngine::loadBudSpr(int startOffset) {
|
||||||
int endOffset = loadCTable01(0, startOffset);
|
int framesCount[20];
|
||||||
|
memset(framesCount, 0, sizeof(framesCount));
|
||||||
|
int endOffset = loadCTable01(0, startOffset, framesCount);
|
||||||
loadCTable02(0);
|
loadCTable02(0);
|
||||||
int frame = 0;
|
int frame = 0;
|
||||||
int spriteOffset = 0;
|
int spriteOffset = 0;
|
||||||
for (int i = startOffset; i < endOffset; ++i) {
|
for (int i = startOffset; i < endOffset; ++i) {
|
||||||
if (_ctable01Table_sprite[frame] == i) {
|
if (framesCount[frame] == i) {
|
||||||
char filename[40];
|
char filename[40];
|
||||||
switch (_flagsTable[137]) {
|
switch (_flagsTable[137]) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -414,7 +416,7 @@ void TuckerEngine::loadBudSpr(int startOffset) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int TuckerEngine::loadCTable01(int index, int firstSpriteNum) {
|
int TuckerEngine::loadCTable01(int index, int firstSpriteNum, int *framesCount) {
|
||||||
loadFile("ctable01.c", _loadTempBuf);
|
loadFile("ctable01.c", _loadTempBuf);
|
||||||
DataTokenizer t(_loadTempBuf, _fileLoadSize);
|
DataTokenizer t(_loadTempBuf, _fileLoadSize);
|
||||||
int lastSpriteNum = firstSpriteNum;
|
int lastSpriteNum = firstSpriteNum;
|
||||||
|
@ -425,7 +427,7 @@ int TuckerEngine::loadCTable01(int index, int firstSpriteNum) {
|
||||||
if (x < 0) {
|
if (x < 0) {
|
||||||
break;
|
break;
|
||||||
} else if (x == 999) {
|
} else if (x == 999) {
|
||||||
_ctable01Table_sprite[count] = lastSpriteNum;
|
framesCount[count] = lastSpriteNum;
|
||||||
++count;
|
++count;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -444,7 +446,7 @@ int TuckerEngine::loadCTable01(int index, int firstSpriteNum) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ctable01Table_sprite[count] = -1;
|
framesCount[count] = -1;
|
||||||
return lastSpriteNum;
|
return lastSpriteNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,6 @@ void TuckerEngine::handleCreditsSequence() {
|
||||||
}
|
}
|
||||||
redrawScreen(0);
|
redrawScreen(0);
|
||||||
waitForTimer(3);
|
waitForTimer(3);
|
||||||
_timerCounter1 = 0;
|
|
||||||
counter4 = _timerCounter2 / 3;
|
counter4 = _timerCounter2 / 3;
|
||||||
if (counter4 == _creditsSequenceTimecounts[num]) {
|
if (counter4 == _creditsSequenceTimecounts[num]) {
|
||||||
_fadePaletteCounter = 0;
|
_fadePaletteCounter = 0;
|
||||||
|
|
|
@ -127,7 +127,7 @@ void TuckerEngine::restart() {
|
||||||
_syncCounter = 0;
|
_syncCounter = 0;
|
||||||
_lastFrameTime = _system->getMillis();
|
_lastFrameTime = _system->getMillis();
|
||||||
_mainLoopCounter1 = _mainLoopCounter2 = 0;
|
_mainLoopCounter1 = _mainLoopCounter2 = 0;
|
||||||
_timerCounter1 = _timerCounter2 = 0;
|
_timerCounter2 = 0;
|
||||||
_partNum = _currentPartNum = 0;
|
_partNum = _currentPartNum = 0;
|
||||||
_locationNum = 0;
|
_locationNum = 0;
|
||||||
_nextLocationNum = ConfMan.getInt("boot_param");
|
_nextLocationNum = ConfMan.getInt("boot_param");
|
||||||
|
@ -273,7 +273,6 @@ void TuckerEngine::restart() {
|
||||||
_xPosCurrent = 160;
|
_xPosCurrent = 160;
|
||||||
_characterSpeechDataPtr = 0;
|
_characterSpeechDataPtr = 0;
|
||||||
_ptTextOffset = 0;
|
_ptTextOffset = 0;
|
||||||
memset(_ctable01Table_sprite, 0, sizeof(_ctable01Table_sprite));
|
|
||||||
memset(_characterAnimationsTable, 0, sizeof(_characterAnimationsTable));
|
memset(_characterAnimationsTable, 0, sizeof(_characterAnimationsTable));
|
||||||
memset(_characterStateTable, 0, sizeof(_characterStateTable));
|
memset(_characterStateTable, 0, sizeof(_characterStateTable));
|
||||||
_backgroundSprOffset = 0;
|
_backgroundSprOffset = 0;
|
||||||
|
@ -589,13 +588,11 @@ void TuckerEngine::mainLoop() {
|
||||||
void TuckerEngine::waitForTimer(int ticksCount) {
|
void TuckerEngine::waitForTimer(int ticksCount) {
|
||||||
uint32 end = _lastFrameTime + ticksCount * 1000 / 46;
|
uint32 end = _lastFrameTime + ticksCount * 1000 / 46;
|
||||||
do {
|
do {
|
||||||
++_timerCounter1;
|
|
||||||
parseEvents();
|
parseEvents();
|
||||||
_system->delayMillis(10);
|
_system->delayMillis(10);
|
||||||
_lastFrameTime = _system->getMillis();
|
_lastFrameTime = _system->getMillis();
|
||||||
} while (!_fastMode && _lastFrameTime < end);
|
} while (!_fastMode && _lastFrameTime < end);
|
||||||
_timerCounter2 += ticksCount;
|
_timerCounter2 += ticksCount;
|
||||||
_timerCounter1 = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TuckerEngine::parseEvents() {
|
void TuckerEngine::parseEvents() {
|
||||||
|
|
|
@ -593,7 +593,7 @@ protected:
|
||||||
void loadCharSizeDta();
|
void loadCharSizeDta();
|
||||||
void loadPanel();
|
void loadPanel();
|
||||||
void loadBudSpr(int startOffset);
|
void loadBudSpr(int startOffset);
|
||||||
int loadCTable01(int index, int firstSpriteNum);
|
int loadCTable01(int index, int firstSpriteNum, int *framesCount);
|
||||||
void loadCTable02(int fl);
|
void loadCTable02(int fl);
|
||||||
void loadLoc();
|
void loadLoc();
|
||||||
void loadObj();
|
void loadObj();
|
||||||
|
@ -624,7 +624,6 @@ protected:
|
||||||
uint32 _lastFrameTime;
|
uint32 _lastFrameTime;
|
||||||
int _mainLoopCounter1;
|
int _mainLoopCounter1;
|
||||||
int _mainLoopCounter2;
|
int _mainLoopCounter2;
|
||||||
int _timerCounter1;
|
|
||||||
int _timerCounter2;
|
int _timerCounter2;
|
||||||
int _flagsTable[kFlagsTableSize];
|
int _flagsTable[kFlagsTableSize];
|
||||||
int _partNum;
|
int _partNum;
|
||||||
|
@ -803,7 +802,6 @@ protected:
|
||||||
int _yPosCurrent;
|
int _yPosCurrent;
|
||||||
const uint8 *_characterSpeechDataPtr;
|
const uint8 *_characterSpeechDataPtr;
|
||||||
int _ptTextOffset;
|
int _ptTextOffset;
|
||||||
int _ctable01Table_sprite[20];
|
|
||||||
int _characterAnimationsTable[200];
|
int _characterAnimationsTable[200];
|
||||||
int _characterStateTable[200];
|
int _characterStateTable[200];
|
||||||
int _backgroundSprOffset;
|
int _backgroundSprOffset;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue