31 #ifndef CRAB_WALKFRAMES_H 32 #define CRAB_WALKFRAMES_H 34 #include "crab/timer.h" 35 #include "crab/ai/movement.h" 36 #include "crab/animation/animframe.h" 37 #include "crab/people/personbase.h" 41 namespace pyrodactyl {
55 void load(rapidxml::xml_node<char> *node) {
56 frames[DIRECTION_DOWN].load(node->first_node(
"down"));
57 frames[DIRECTION_UP].load(node->first_node(
"up"));
58 frames[DIRECTION_LEFT].load(node->first_node(
"left"));
59 frames[DIRECTION_RIGHT].load(node->first_node(
"right"));
64 WalkFrameSet _set[WT_TOTAL];
73 void updateClip(WalkAnimType type, Direction d);
82 void load(rapidxml::xml_node<char> *node);
84 bool updateClip(Direction d,
bool reset);
85 void resetClip(Direction d);
87 void type(WalkAnimType type) {
95 bool type(
const Vector2f &vel, Direction &dir,
const pyrodactyl::people::PersonState &pst,
const bool &first_x);
97 const Rect &clip(Direction d) {
98 return _set[_cur].frames[d].currentFrame()._clip;
101 const Rect &boxV(Direction d) {
102 return _set[_cur].frames[d].currentFrame()._boxV;
105 const TextureFlipType &flip(Direction d) {
106 return _set[_cur].frames[d]._flip;
110 return _set[_cur].frames[d]._shadow;
113 int anchorX(Direction d) {
114 return _set[_cur].frames[d].currentFrame()._anchor.x;
117 int anchorY(Direction d) {
118 return _set[_cur].frames[d].currentFrame()._anchor.y;
122 Rect dialogClip(
const pyrodactyl::people::PersonState &state);
123 void updateClip(
const pyrodactyl::people::PersonState &state);
130 #endif // CRAB_WALKFRAMES_H Definition: Rectangle.h:42
Definition: walkframes.h:51
Definition: animframe.h:63
Definition: moveeffect.h:37