From: <bal...@us...> - 2003-11-23 20:13:49
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1:/tmp/cvs-serv10576/plugins/Core Modified Files: CharAnimations.h CharAnimations.cpp Log Message: Module Rewritten : CharAnimations.cpp/.h : Totally renewed... need to write the code.. this is only the skeleton Index: CharAnimations.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/CharAnimations.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CharAnimations.h 14 Oct 2003 22:05:46 -0000 1.1.1.1 --- CharAnimations.h 23 Nov 2003 20:13:44 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- #include "Animation.h" + #include "../../includes/RGBAColor.h" #include <vector> *************** *** 17,41 **** #endif class GEM_EXPORT CharAnimations { public: ! std::vector<Animation*> a1HBattack; ! std::vector<Animation*> a2HBattack; ! std::vector<Animation*> a1HSattack; ! std::vector<Animation*> a2HSattack; ! std::vector<Animation*> a1HPattack; ! std::vector<Animation*> a2HPattack; ! std::vector<Animation*> a2WBattack; ! std::vector<Animation*> a2WSattack; ! std::vector<Animation*> a2WPattack; ! std::vector<Animation*> Bowattack; ! std::vector<Animation*> Throwattack; ! std::vector<Animation*> XBowattack; ! std::vector<Animation*> SpellCasts; ! std::vector<Animation*> Stands; ! std::vector<Animation*> Walk; public: ! CharAnimations(void); ~CharAnimations(void); }; --- 18,93 ---- #endif + #define IE_ANI_STAND 0 + #define IE_ANI_WALK 1 + #define IE_ANI_ATTACK 2 + #define IE_ANI_CAST 3 + #define IE_ANI_TAKEHIT 4 + #define IE_ANI_DEAD 5 + #define IE_ANI_SLEEP 6 + + #define IE_ANI_MIRROR 0x00000001 + #define IE_ANI_1H_BLUNT 0x00000002 + #define IE_ANI_2H_BLUNT 0x00000004 + #define IE_ANI_1H_SLASH 0x00000008 + #define IE_ANI_2H_SLASH 0x00000010 + #define IE_ANI_1H_PIERCE 0x00000020 + #define IE_ANI_2H_PIERCE 0x00000040 + #define IE_ANI_2W_BLUNT 0x00000080 //NOT SURE + #define IE_ANI_2W_SLASH 0x00000100 //NOT SURE + #define IE_ANI_2W_PIERCE 0x00000200 //NOT SURE + // I cannot really understand how the Casting Animations are coded... + // The last Idea was that they are one per Magic School... + /* + #define IE_ANI_CAST_STANDARD 0x00000400 + #define IE_ANI_CAST_ISTANT 0x00000800 + #define IE_ANI_CAST_DIVINE 0x00001000 //NOT SURE + #define IE_ANI_CAST_DIVINE_INST 0x00002000 //NOT SURE + #define IE_ANI_CAST_LONG 0x00004000 + */ + #define IE_ANI_CAST_ABJURATION 0x00000400 + #define IE_ANI_CAST_CONJURATION 0x00000800 + #define IE_ANI_CAST_DIVINATION 0x00001000 + #define IE_ANI_CAST_ENCHANTMENT 0x00002000 + #define IE_ANI_CAST_ILLUSIONISM 0x00004000 + #define IE_ANI_CAST_EVOCATION 0x00008000 + #define IE_ANI_CAST_NECROMANCY 0x00010000 + #define IE_ANI_CAST_TRANSMUTATION 0x00020000 + + #define IE_ANI_WALK_DISARMED 0x00040000 + + #define IE_ANI_STAND_LOOKING 0x00080000 + #define IE_ANI_STAND_2H_WEAPON 0x00100000 + + #define IE_ANI_TAKE_HIT_DISARMED 0x00200000 + #define IE_ANI_TAKE_HIT_1H_WEAPON 0x00400000 + + #define IE_ANI_COMPOSED_DEAD 0x00800000 + + #define IE_ANI_STAND_DISARMED 0x01000000 + #define IE_ANI_STAND_YAWNING 0x02000000 + + #define IE_ANI_DIEING 0x04000000 + + #define IE_ANI_BOW 0x08000000 + #define IE_ANI_LAUNCH 0x10000000 + #define IE_ANI_XBOW 0x20000000 + + #define IE_ANI_MIDRES 0x40000000 + #define IE_ANI_LOWRES 0x80000000 + + #define IE_ANI_ALL 0x3FFFFFFF + class GEM_EXPORT CharAnimations { public: ! Animation * Anims[30][16]; ! Color Palette[256]; ! unsigned long LoadedFlag; ! unsigned long SupportedAnims; ! char * ResRef; public: ! CharAnimations(char * BaseResRef, unsigned long AniType); ~CharAnimations(void); + Animation * GetAnimation(unsigned char AnimID, unsigned char Orient); }; Index: CharAnimations.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/CharAnimations.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CharAnimations.cpp 15 Oct 2003 17:53:13 -0000 1.2 --- CharAnimations.cpp 23 Nov 2003 20:13:45 -0000 1.3 *************** *** 2,10 **** #include "CharAnimations.h" ! CharAnimations::CharAnimations(void) { } CharAnimations::~CharAnimations(void) { } --- 2,22 ---- #include "CharAnimations.h" ! CharAnimations::CharAnimations(char * BaseResRef, unsigned long AniType) { + int len = strlen(BaseResRef); + ResRef = (char*)malloc(len+1); + memcpy(ResRef, BaseResRef, len+1); + SupportedAnims = AniType; + LoadedFlag = 0; } CharAnimations::~CharAnimations(void) { + free(ResRef); + } + + Animation * CharAnimations::GetAnimation(unsigned char AnimID, unsigned char Orient) + { + //TODO: Implement Auto Resource Loading + return NULL; } |