]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Person.h
Simplify sleep animations
[lugaru.git] / Source / Person.h
index 5c5a96983c2c17abffd02dc568d22232c8736183..1749a565791c561d4936c3940edb3d178feb62d8 100644 (file)
@@ -33,6 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "Sprite.h"
 #include <cmath>
 #include "Weapons.h"
+#include "Animation.h"
 
 #define passivetype 0
 #define guardtype 1
@@ -322,13 +323,25 @@ class Person
                void DoBloodBig(float howmuch, int which);
                bool DoBloodBigWhere(float howmuch, int which, XYZ where);
                
-               bool wasIdle();
-               bool isIdle();
+               bool wasIdle()
+               {
+                 return animation_bits[currentanimation] & ab_idle;
+               }
+               bool isIdle()
+               {
+                 return animation_bits[targetanimation] & ab_idle;
+               }
                int getIdle();
                
-               bool isSitting();
-               bool isSleeping();
-               
+               bool isSitting()
+               {
+                 return animation_bits[targetanimation] & ab_sit;
+               }
+
+               bool isSleeping()
+               {
+                 return animation_bits[targetanimation] & ab_sleep;
+               }
                
                bool wasCrouch();
                bool isCrouch();