Basic multi animation support, with walking transition

This commit is contained in:
2016-06-23 21:34:38 +10:00
parent 7a2dc3da41
commit 7acf36cd59
4 changed files with 63 additions and 14 deletions
+5 -1
View File
@@ -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
+1 -3
View File
@@ -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