Basic multi animation support, with walking transition
This commit is contained in:
@@ -31,7 +31,11 @@ typedef struct Entity
|
||||
v2 size;
|
||||
enum Direction direction;
|
||||
Texture *tex;
|
||||
SpriteAnim anim;
|
||||
|
||||
// TODO(doyle): String based access
|
||||
SpriteAnim anim[16];
|
||||
i32 freeAnimIndex;
|
||||
i32 currAnimIndex;
|
||||
} Entity;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include <math.h>
|
||||
|
||||
#define squared(x) (x * x)
|
||||
|
||||
// TODO(doyle): Use this instead of window's math file ...
|
||||
//#define abs(x) ((x) > 0 ? (x) : -(x))
|
||||
#define absolute(x) ((x) > 0 ? (x) : -(x))
|
||||
|
||||
/* VECTORS */
|
||||
typedef union v2
|
||||
|
||||
Reference in New Issue
Block a user