[Scummvm-cvs-logs] SF.net SVN: scummvm:[53092] scummvm/trunk/engines/toon
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sat Oct 9 02:26:58 CEST 2010
Revision: 53092
http://scummvm.svn.sourceforge.net/scummvm/?rev=53092&view=rev
Author: lordhoto
Date: 2010-10-09 00:26:58 +0000 (Sat, 09 Oct 2010)
Log Message:
-----------
TOON: Make some static data tables const.
Modified Paths:
--------------
scummvm/trunk/engines/toon/character.cpp
scummvm/trunk/engines/toon/character.h
scummvm/trunk/engines/toon/font.cpp
Modified: scummvm/trunk/engines/toon/character.cpp
===================================================================
--- scummvm/trunk/engines/toon/character.cpp 2010-10-09 00:17:55 UTC (rev 53091)
+++ scummvm/trunk/engines/toon/character.cpp 2010-10-09 00:26:58 UTC (rev 53092)
@@ -314,7 +314,7 @@
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 @@
_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 @@
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);
Modified: scummvm/trunk/engines/toon/character.h
===================================================================
--- scummvm/trunk/engines/toon/character.h 2010-10-09 00:17:55 UTC (rev 53091)
+++ scummvm/trunk/engines/toon/character.h 2010-10-09 00:26:58 UTC (rev 53092)
@@ -97,7 +97,7 @@
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:
Modified: scummvm/trunk/engines/toon/font.cpp
===================================================================
--- scummvm/trunk/engines/toon/font.cpp 2010-10-09 00:17:55 UTC (rev 53091)
+++ scummvm/trunk/engines/toon/font.cpp 2010-10-09 00:26:58 UTC (rev 53092)
@@ -132,7 +132,7 @@
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,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list