diff options
author | Johannes Schickel | 2011-04-11 00:31:24 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-04-11 00:31:24 +0200 |
commit | 8fe9f8e73a0ac0a4f0a18a94db705f934f58ad34 (patch) | |
tree | 06f13c92e3664f69505469edfb7d5c69f92e0e2a | |
parent | ee4699a49557ab47a4c6660ce97e968676bb5f8b (diff) | |
download | scummvm-rg350-8fe9f8e73a0ac0a4f0a18a94db705f934f58ad34.tar.gz scummvm-rg350-8fe9f8e73a0ac0a4f0a18a94db705f934f58ad34.tar.bz2 scummvm-rg350-8fe9f8e73a0ac0a4f0a18a94db705f934f58ad34.zip |
KYRA: Cleanup.
-rw-r--r-- | engines/kyra/kyra_hof.cpp | 58 | ||||
-rw-r--r-- | engines/kyra/kyra_hof.h | 2 | ||||
-rw-r--r-- | engines/kyra/kyra_mr.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/kyra_mr.h | 2 | ||||
-rw-r--r-- | engines/kyra/kyra_v2.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/kyra_v2.h | 2 |
6 files changed, 34 insertions, 34 deletions
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 4fef760028..c73792ef8e 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -1279,14 +1279,14 @@ int KyraEngine_HoF::getCharacterWalkspeed() const { return _timer->getDelay(0); } -void KyraEngine_HoF::updateCharAnimFrame(int charId, int *table) { - static const int unkTable2[] = { 17, 0 }; - static const int unkTable3[] = { 10, 0 }; - static const int unkTable4[] = { 24, 0 }; - static const int unkTable5[] = { 19, 0 }; - static const int unkTable6[] = { 21, 0 }; - static const int unkTable7[] = { 31, 0 }; - static const int unkTable8[] = { 26, 0 }; +void KyraEngine_HoF::updateCharAnimFrame(int *table) { + static const int unkFrame1 = 17; + static const int unkFrame2 = 10; + static const int unkFrame3 = 24; + static const int unkFrame4 = 19; + static const int unkFrame5 = 21; + static const int unkFrame6 = 31; + static const int unkFrame7 = 26; Character *character = &_mainCharacter; ++character->animFrame; @@ -1301,46 +1301,46 @@ void KyraEngine_HoF::updateCharAnimFrame(int charId, int *table) { } if (!facing) { - ++_characterFacingCountTable[charId]; + ++_characterFacingCountTable[0]; } else if (facing == 4) { - ++_characterFacingCountTable[charId+1]; + ++_characterFacingCountTable[1]; } else if (facing == 7 || facing == 1 || facing == 5 || facing == 3) { if (facing == 7 || facing == 1) { - if (_characterFacingCountTable[charId] > 2) + if (_characterFacingCountTable[0] > 2) facing = 0; } else { - if (_characterFacingCountTable[charId+1] > 2) + if (_characterFacingCountTable[1] > 2) facing = 4; } - _characterFacingCountTable[charId] = 0; - _characterFacingCountTable[charId+1] = 0; + _characterFacingCountTable[0] = 0; + _characterFacingCountTable[1] = 0; } if (facing == 0) { - if (character->animFrame < unkTable8[charId]) - character->animFrame = unkTable8[charId]; + if (character->animFrame < unkFrame7) + character->animFrame = unkFrame7; - if (character->animFrame > unkTable7[charId]) - character->animFrame = unkTable8[charId]; + if (character->animFrame > unkFrame6) + character->animFrame = unkFrame7; } else if (facing == 4) { - if (character->animFrame < unkTable5[charId]) - character->animFrame = unkTable5[charId]; + if (character->animFrame < unkFrame4) + character->animFrame = unkFrame4; - if (character->animFrame > unkTable4[charId]) - character->animFrame = unkTable5[charId]; + if (character->animFrame > unkFrame3) + character->animFrame = unkFrame4; } else { - if (character->animFrame > unkTable5[charId]) - character->animFrame = unkTable6[charId]; + if (character->animFrame > unkFrame4) + character->animFrame = unkFrame5; - if (character->animFrame == unkTable2[charId]) - character->animFrame = unkTable3[charId]; + if (character->animFrame == unkFrame1) + character->animFrame = unkFrame2; - if (character->animFrame > unkTable2[charId]) - character->animFrame = unkTable3[charId] + 2; + if (character->animFrame > unkFrame1) + character->animFrame = unkFrame2 + 2; } - updateCharacterAnim(charId); + updateCharacterAnim(0); } bool KyraEngine_HoF::checkCharCollision(int x, int y) { diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index 3040107fc4..308698484d 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -583,7 +583,7 @@ protected: int _characterFacingCountTable[2]; int getCharacterWalkspeed() const; - void updateCharAnimFrame(int num, int *table); + void updateCharAnimFrame(int *table); bool checkCharCollision(int x, int y); diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index fee7835881..65e78448a5 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -788,7 +788,7 @@ int KyraEngine_MR::getCharacterWalkspeed() const { return _mainCharacter.walkspeed; } -void KyraEngine_MR::updateCharAnimFrame(int character, int *table) { +void KyraEngine_MR::updateCharAnimFrame(int *table) { ++_mainCharacter.animFrame; int facing = _mainCharacter.facing; diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index f5ff3772ba..912c615757 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -386,7 +386,7 @@ private: // character int getCharacterWalkspeed() const; - void updateCharAnimFrame(int character, int *table); + void updateCharAnimFrame(int *table); int8 _characterAnimTable[2]; static const uint8 _characterFrameTable[]; diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 53c57c21cd..6477b68c84 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -236,7 +236,7 @@ int KyraEngine_v2::updateCharPos(int *table, int force) { return 0; _mainCharacter.x1 += _charAddXPosTable[_mainCharacter.facing]; _mainCharacter.y1 += _charAddYPosTable[_mainCharacter.facing]; - updateCharAnimFrame(0, table); + updateCharAnimFrame(table); _updateCharPosNextUpdate = _system->getMillis() + getCharacterWalkspeed() * _tickLength; return 1; } diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index 084b159ee2..bce11c898b 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -340,7 +340,7 @@ protected: uint32 _updateCharPosNextUpdate; virtual int getCharacterWalkspeed() const = 0; - virtual void updateCharAnimFrame(int num, int *table) = 0; + virtual void updateCharAnimFrame(int *table) = 0; // chat int _vocHigh; |