]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Person.h
Simplify landhard and flip animations
[lugaru.git] / Source / Person.h
index 28f21b559b6cc57250e7840010bec627b14528fb..a4eeae9bc457c6119ad6c47e645cc12bbd2c5217 100644 (file)
@@ -353,8 +353,14 @@ class Person
                }
                int getCrouch();
                
-               bool wasStop();
-               bool isStop();
+               bool wasStop()
+               {
+                 return animation_bits[currentanimation] & ab_stop;
+               }
+               bool isStop()
+               {
+                 return animation_bits[targetanimation] & ab_stop;
+               }
                int getStop();
                
                bool wasSneak();
@@ -370,18 +376,36 @@ class Person
                  return animation_bits[targetanimation] & ab_run;
                }
                int getRun();
-               
-               bool wasLanding();
-               bool isLanding();
+
+               bool wasLanding()
+               {
+                 return animation_bits[currentanimation] & ab_land;
+               }
+               bool isLanding()
+               {
+                 return animation_bits[targetanimation] & ab_land;
+               }
                int getLanding();
-               
-               bool wasLandhard();
-               bool isLandhard();
+
+               bool wasLandhard()
+               {
+                 return animation_bits[currentanimation] & ab_landhard;
+               }
+               bool isLandhard()
+               {
+                 return animation_bits[targetanimation] & ab_landhard;
+               }
                int getLandhard();
-               
-               bool isFlip();
-               bool wasFlip();
-               
+
+               bool wasFlip()
+               {
+                 return animation_bits[currentanimation] & ab_flip;
+               }
+               bool isFlip()
+               {
+                 return animation_bits[targetanimation] & ab_flip;;
+               }
+
                bool jumpclimb;
                
                bool isWallJump();