Change Animation names, stop input parse on attack

This commit is contained in:
2016-07-19 13:32:31 +10:00
parent b8b76cecd3
commit 403999b566
5 changed files with 73 additions and 68 deletions
+1 -2
View File
@@ -60,9 +60,8 @@ typedef struct TexAtlas
typedef struct Animation
{
Texture *tex;
TexAtlas *atlas;
i32 *atlasIndexes;
i32 *frameIndex;
i32 numFrames;
f32 frameDuration;
} Animation;
+4 -6
View File
@@ -78,6 +78,10 @@ typedef struct Entity
b32 collides;
// TODO(doyle): String based access
// TODO(doyle): Separate animation refs from curr animation state, entity
// only ever has one active current animation. ATM every entity animation
// has a currframe and duration .. either that or we stop resetting
// animation on entity context switch
EntityAnim_ anim[16];
i32 currAnimId;
u32 currAnimCyclesCompleted;
@@ -85,10 +89,4 @@ typedef struct Entity
EntityStats *stats;
} Entity;
INTERNAL inline v4 getEntityScreenRect(Entity entity)
{
v4 result = math_getRect(entity.pos, entity.hitboxSize);
return result;
}
#endif