diff options
Diffstat (limited to 'src/engine/entity.h')
-rw-r--r-- | src/engine/entity.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/engine/entity.h b/src/engine/entity.h index b2a0c49..dee4aed 100644 --- a/src/engine/entity.h +++ b/src/engine/entity.h @@ -1,6 +1,7 @@ #pragma once #include <stdint.h> +#include <stdbool.h> #include "engine/maths.h" @@ -8,6 +9,7 @@ typedef struct { vec2 pos, vec; bool is_grounded; int8_t hp; + int8_t speed; //armor/block? }hh_entity; @@ -15,10 +17,10 @@ typedef struct { /// @param pos1 position of environment tile to be checked /// @param pos2 position entity /// @return true if collision between enity and environment -bool hh_collision(vec2* pos1, vec2* pos2); +bool hh_collision(vec2 pos1, vec2 pos2); /// @brief solve collisions /// @param environment position /// @param entity position /// @return solved new entity position -void hh_solve_collision(vec2* pos_environment, hh_entity* entity); +void hh_solve_collision(vec2 pos_environment, hh_entity* entity); |