X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAnimation%2FAnimation.h;h=4a74c5c1d0afbcdacb0fc8d9e0ad04319b75bd0d;hb=f83c7bc4ef12b0bbdc1cfa6bdce35d9665510e6c;hp=3633de9e373d67231d05092e3102a830ae8c0243;hpb=4d0ec1838440e55f24e8ec9501a62348cd9e2ec3;p=lugaru.git diff --git a/Source/Animation/Animation.h b/Source/Animation/Animation.h index 3633de9..4a74c5c 100644 --- a/Source/Animation/Animation.h +++ b/Source/Animation/Animation.h @@ -56,35 +56,43 @@ 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(); - Animation & operator = (const Animation & ani); - -protected: - void deallocate(); + Animation(const std::string& fileName, anim_height_type aheight, anim_attack_type aattack); }; #endif