diff options
author | Johannes Schickel | 2010-10-09 00:26:58 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-10-09 00:26:58 +0000 |
commit | 2a984d1d3f2a3df03dea4a269b3b88b85b017e30 (patch) | |
tree | 59815d653da659dfc777d2ea9e40f88b9fe823a8 /engines/toon | |
parent | 0fc6572b65908f7d3a7d13537afac67f1cc8a68b (diff) | |
download | scummvm-rg350-2a984d1d3f2a3df03dea4a269b3b88b85b017e30.tar.gz scummvm-rg350-2a984d1d3f2a3df03dea4a269b3b88b85b017e30.tar.bz2 scummvm-rg350-2a984d1d3f2a3df03dea4a269b3b88b85b017e30.zip |
TOON: Make some static data tables const.
svn-id: r53092
Diffstat (limited to 'engines/toon')
-rw-r--r-- | engines/toon/character.cpp | 8 | ||||
-rw-r--r-- | engines/toon/character.h | 2 | ||||
-rw-r--r-- | engines/toon/font.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index 67221607c6..6c006ae8f8 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -314,7 +314,7 @@ void Character::update(int32 timeIncrement) { int32 currentFrame = _animationInstance->getFrame(); - SpecialCharacterAnimation *anim = getSpecialAnimation(_id, animId); + const SpecialCharacterAnimation *anim = getSpecialAnimation(_id, animId); if ((_animFlags & 0x10) == 0) { if (_animScriptId != -1 && currentFrame > 0 && !_vm->getSceneAnimationScript(_animScriptId)->_frozen) { @@ -601,11 +601,11 @@ void Character::stopWalk() { _currentPathNodeCount = 0; } -SpecialCharacterAnimation *Character::getSpecialAnimation(int32 characterId, int32 animationId) { +const SpecialCharacterAnimation *Character::getSpecialAnimation(int32 characterId, int32 animationId) { debugC(6, kDebugCharacter, "getSpecialAnimation(%d, %d)", characterId, animationId); // very nice animation list hardcoded in the executable... - static SpecialCharacterAnimation anims[] = { + static const SpecialCharacterAnimation anims[] = { { "TLK547_?", 9, 0, 0, 0, 0, 0, 1, 5, 8, 1, 8, 0, 255 }, { "TLK555_?", 16, 0, 0, 0, 0, 6, 8, 10, 255, 6, 11, 2, 255 }, { "LST657_?", 14, 0, 0, 0, 0, 255, 255, 255, 255, 5, 11, 0, 255 }, @@ -934,7 +934,7 @@ void Character::playAnim(int32 animId, int32 unused, int32 flags) { animId = _animSpecialDefaultId; // get the anim to load - SpecialCharacterAnimation *anim = getSpecialAnimation(_id, animId); + const SpecialCharacterAnimation *anim = getSpecialAnimation(_id, animId); char animName[20]; strcpy(animName, anim->_filename); diff --git a/engines/toon/character.h b/engines/toon/character.h index e02e28fe22..d87217d7a9 100644 --- a/engines/toon/character.h +++ b/engines/toon/character.h @@ -97,7 +97,7 @@ public: virtual int32 getRandomIdleAnim() { return 0; }; int32 getFacingFromDirection(int32 dx, int32 dy); - static SpecialCharacterAnimation *getSpecialAnimation(int32 characterId, int32 animationId); + static const SpecialCharacterAnimation *getSpecialAnimation(int32 characterId, int32 animationId); protected: diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp index 603d91d9d3..4cc8c2569a 100644 --- a/engines/toon/font.cpp +++ b/engines/toon/font.cpp @@ -132,7 +132,7 @@ void FontRenderer::setFontColorByCharacter(int32 characterId) { debugC(5, kDebugFont, "setFontColorByCharacter(%d)", characterId); // unfortunately this table was hardcoded in the original executable - static byte colorsByCharacters[] = { + static const byte colorsByCharacters[] = { 0xe0, 0xdc, 0xc8, 0xd6, 0xc1, 0xc8, 0xe9, 0xde, 0xc8, 0xeb, 0xe8, 0xc8, 0xd1, 0xcf, 0xc8, 0xd8, 0xd5, 0xc8, 0xfb, 0xfa, 0xc8, 0xd9, 0xd7, 0xc8, 0xe8, 0xe4, 0xc8, 0xe9, 0xfa, 0xc8, 0xeb, 0xe4, 0xc8, 0xeb, 0xe4, 0xc8, |