Abstract add entity and animation into functions

This commit is contained in:
2016-07-08 17:44:41 +10:00
parent c9fc34aee1
commit fa7947fb90
3 changed files with 94 additions and 66 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ enum Direction
direction_null,
};
typedef struct SpriteAnim
typedef struct EntityAnim
{
v4 *rect;
i32 numRects;
@@ -22,7 +22,7 @@ typedef struct SpriteAnim
f32 duration;
f32 currDuration;
} SpriteAnim;
} EntityAnim;
typedef struct Entity
{
@@ -34,7 +34,7 @@ typedef struct Entity
b32 collides;
// TODO(doyle): String based access
SpriteAnim anim[16];
EntityAnim anim[16];
i32 freeAnimIndex;
i32 currAnimIndex;
} Entity;