X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAnimation%2FAnimation.cpp;h=83e2c0e1da31e199f9fb978c3f3b81642bb48dd2;hb=1a2ba15f8d736428892d2fae8206a1a51eb11c9f;hp=af6c31955293c23826739819478f8f8832b26d92;hpb=9bd0be2befdf81aa4b5d377eaf29656935044faf;p=lugaru.git diff --git a/Source/Animation/Animation.cpp b/Source/Animation/Animation.cpp index af6c319..83e2c0e 100644 --- a/Source/Animation/Animation.cpp +++ b/Source/Animation/Animation.cpp @@ -28,8 +28,7 @@ std::vector Animation::animations; void Animation::loadAll() { - int i = 0; -#define DECLARE_ANIM(id, file, height, attack, ...) if (i++ < loadable_anim_end) animations.emplace_back(file, height, attack); +#define DECLARE_ANIM(id, file, height, attack, ...) if (id < loadable_anim_end) animations.emplace_back(file, height, attack); #include "Animation.def" #undef DECLARE_ANIM } @@ -73,8 +72,8 @@ void AnimationFrame::loadWeaponTarget(FILE* tfile) } Animation::Animation(): - height(0), - attack(0), + height(lowheight), + attack(neutral), numjoints(0) { } @@ -82,7 +81,7 @@ Animation::Animation(): /* EFFECT * load an animation from file */ -Animation::Animation(const std::string& filename, int aheight, int aattack): +Animation::Animation(const std::string& filename, anim_height_type aheight, anim_attack_type aattack): Animation() { FILE *tfile; @@ -150,7 +149,3 @@ Animation::Animation(const std::string& filename, int aheight, int aattack): offset = endoffset; offset.y = 0; } - -Animation::~Animation() -{ -}