diff options
author | Strangerke | 2012-05-10 19:26:16 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | 872c9ea2fc6caddde9753df545f3572b01ac5e81 (patch) | |
tree | 643a3faeca4641b59734945d44b6e8a618320af5 /engines/lilliput | |
parent | aedc95231ddab06af6cb15d75c8cbccdcb80e0c4 (diff) | |
download | scummvm-rg350-872c9ea2fc6caddde9753df545f3572b01ac5e81.tar.gz scummvm-rg350-872c9ea2fc6caddde9753df545f3572b01ac5e81.tar.bz2 scummvm-rg350-872c9ea2fc6caddde9753df545f3572b01ac5e81.zip |
LILLIPUT: double check some more function, renaming
Diffstat (limited to 'engines/lilliput')
-rw-r--r-- | engines/lilliput/lilliput.cpp | 28 | ||||
-rw-r--r-- | engines/lilliput/lilliput.h | 2 |
2 files changed, 14 insertions, 16 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index f436466318..8d189cd2bb 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -590,7 +590,6 @@ void LilliputEngine::displayFunction12() { _system->copyRectToScreen((byte *)_mainSurface->getPixels(), 320, 0, 0, 320, 200); _system->updateScreen(); - displayFunction6(); displayFunction7(); displayInterfaceHotspots(); @@ -659,7 +658,7 @@ void LilliputEngine::restoreMapPoints() { void LilliputEngine::displayCharactersOnMap() { debugC(2, kDebugEngineTBC, "displayCharactersOnMap()"); - sub16217(); + moveCharacters(); restoreSurfaceUnderMousePointer(); byte *buf = (byte *)_mainSurface->getPixels(); @@ -676,8 +675,8 @@ void LilliputEngine::displayCharactersOnMap() { displayMousePointer(); } -void LilliputEngine::sub16217() { - debugC(2, kDebugEngineTBC, "sub16217()"); +void LilliputEngine::moveCharacters() { + debugC(2, kDebugEngine, "moveCharacters()"); _numCharactersToDisplay = 0; int index = _numCharacters - 1; @@ -711,8 +710,8 @@ void LilliputEngine::sub16217() { _characterPositionY[i] = var4; } - _scriptHandler->_array16123PosX[i] = _characterPositionX[i] >> 3; - _scriptHandler->_array1614BPosY[i] = _characterPositionY[i] >> 3; + _scriptHandler->_array16123PosX[i] = (_characterPositionX[i] >> 3); + _scriptHandler->_array1614BPosY[i] = (_characterPositionY[i] >> 3); _characterRelativePositionX[i] = 0xFF; _characterRelativePositionY[i] = 0xFF; _characterDisplayX[i] = 0xFF; @@ -737,7 +736,7 @@ void LilliputEngine::sub16217() { } void LilliputEngine::setNextDisplayCharacter(int var1) { - debugC(2, kDebugEngineTBC, "setNextDisplayCharacter(%d)", var1); + debugC(2, kDebugEngine, "setNextDisplayCharacter(%d)", var1); byte charNum = var1 & 0xFF; if ( charNum < _numCharactersToDisplay) { @@ -751,7 +750,7 @@ void LilliputEngine::setNextDisplayCharacter(int var1) { void LilliputEngine::displayFunction15() { debugC(2, kDebugEngineTBC, "displayFunction15()"); - sub16217(); + moveCharacters(); _currentDisplayCharacter = 0; setNextDisplayCharacter(0); @@ -964,7 +963,7 @@ void LilliputEngine::sub15F31(bool &forceReturnFl) { sub130B6(); displayFunction12(); _scriptHandler->_heroismLevel = 0; - sub16217(); + moveCharacters(); paletteFadeIn(); forceReturnFl = true; } @@ -1135,14 +1134,13 @@ void LilliputEngine::displayChar(int index, int var1) { } void LilliputEngine::sortCharacters() { - debugC(2, kDebugEngineTBC, "sortCharacters()"); + debugC(2, kDebugEngine, "sortCharacters()"); if (_numCharactersToDisplay <= 1) return; - int var3; - for (int var4 = _numCharactersToDisplay - 1; var4 != 0; var4--) { - var3 = 0; + for (int var4 = _numCharactersToDisplay - 1; var4 > 0; var4--) { + bool found = false; for (int var2 = 0; var2 < var4; var2++) { int index1 = _charactersToDisplay[var2]; @@ -1169,10 +1167,10 @@ void LilliputEngine::sortCharacters() { byte tmpVal = _charactersToDisplay[var2]; _charactersToDisplay[var2] = _charactersToDisplay[var2 + 1]; _charactersToDisplay[var2 + 1] = tmpVal; - ++var3; + found = true; } - if (var3 == 0) + if (!found) return; } } diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h index 870ebcb70c..62ed4badaf 100644 --- a/engines/lilliput/lilliput.h +++ b/engines/lilliput/lilliput.h @@ -346,7 +346,7 @@ public: void pollEvent(); void sub170EE(int index); void sub130DD(); - void sub16217(); + void moveCharacters(); void setNextDisplayCharacter(int var1); void handleGameScripts(); |