Add hitbox size/render size notion

This commit is contained in:
2016-07-18 20:37:14 +10:00
parent c52d872058
commit e00ef52f8a
4 changed files with 40 additions and 39 deletions
+3 -2
View File
@@ -81,7 +81,8 @@ typedef struct Entity
{
v2 pos; // Position
v2 dPos; // Velocity
v2 size;
v2 hitboxSize;
v2 renderSize;
enum EntityState state;
enum EntityType type;
@@ -100,7 +101,7 @@ typedef struct Entity
INTERNAL inline v4 getEntityScreenRect(Entity entity)
{
v4 result = math_getRect(entity.pos, entity.size);
v4 result = math_getRect(entity.pos, entity.hitboxSize);
return result;
}
+1 -1
View File
@@ -51,6 +51,6 @@ inline void renderer_staticString(Renderer *const renderer, Font *const font,
}
void renderer_entity(Renderer *renderer, v4 cameraBounds, Entity *entity,
v2 entityRenderSize, f32 rotate, v4 color);
f32 rotate, v4 color);
#endif