]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Animation/Animation.cpp
Rename all C++ headers with .hpp extension
[lugaru.git] / Source / Animation / Animation.cpp
index af6c31955293c23826739819478f8f8832b26d92..27b82ada685716e76d1882be2c2591dd2d1f5fab 100644 (file)
@@ -17,10 +17,11 @@ You should have received a copy of the GNU General Public License
 along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include "Animation/Skeleton.h"
-#include "Animation/Animation.h"
-#include "Utils/Folders.h"
-#include "Game.h"
+#include "Animation/Animation.hpp"
+
+#include "Animation/Skeleton.hpp"
+#include "Game.hpp"
+#include "Utils/Folders.hpp"
 
 extern bool visibleloading;
 
@@ -28,8 +29,7 @@ std::vector<Animation> 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 +73,8 @@ void AnimationFrame::loadWeaponTarget(FILE* tfile)
 }
 
 Animation::Animation():
-    height(0),
-    attack(0),
+    height(lowheight),
+    attack(neutral),
     numjoints(0)
 {
 }
@@ -82,7 +82,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 +150,3 @@ Animation::Animation(const std::string& filename, int aheight, int aattack):
     offset = endoffset;
     offset.y = 0;
 }
-
-Animation::~Animation()
-{
-}