X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAnimation%2FAnimation.h;h=91bdd4ce80bdb6fa75b9124d064f696bc1cb6b8d;hb=1991e81a5c3bcc9cd0d6d49f56ebd8bcbd76e7b4;hp=3633de9e373d67231d05092e3102a830ae8c0243;hpb=4d0ec1838440e55f24e8ec9501a62348cd9e2ec3;p=lugaru.git diff --git a/Source/Animation/Animation.h b/Source/Animation/Animation.h index 3633de9..91bdd4c 100644 --- a/Source/Animation/Animation.h +++ b/Source/Animation/Animation.h @@ -56,35 +56,44 @@ static const int animation_bits[animation_count] = { #undef DECLARE_ANIM }; +struct AnimationFrameJointInfo +{ + XYZ position; + float twist; + float twist2; + bool onground; +}; + +struct AnimationFrame +{ + void loadBaseInfo(FILE* tfile); + void loadTwist2(FILE* tfile); + void loadLabel(FILE* tfile); + void loadWeaponTarget(FILE* tfile); + + std::vector joints; + XYZ forward; + int label; + XYZ weapontarget; + float speed; +}; + class Animation { public: static std::vector animations; static void loadAll(); - int numframes; - int height; - int attack; - int joints; - int weapontargetnum; - - XYZ** position; - float** twist; - float** twist2; - float* speed; - bool** onground; - XYZ* forward; - int* label; - XYZ* weapontarget; + anim_height_type height; + anim_attack_type attack; + int numjoints; + + std::vector frames; XYZ offset; Animation(); - Animation(const std::string& fileName, int aheight, int aattack); + Animation(const std::string& fileName, anim_height_type aheight, anim_attack_type aattack); ~Animation(); - Animation & operator = (const Animation & ani); - -protected: - void deallocate(); }; #endif