#include #include #include #include "game.h" #include "entity.h" extern struct game game; Rectangle get_entity_collider_world(const struct entity* entity) { return (Rectangle) { .x = entity->collider.x + entity->position.x, .y = entity->collider.y + entity->position.y, .width = entity->collider.width, .height = entity->collider.height }; } void entity_handle_collision ( struct entity*, struct entity*, enum direction ) { } void draw_entity(const struct entity* entity) { } void add_entity(const struct entity* e) { for (int i = 0; i < MAX_ENTITY_COUNT; i++) { struct entity* current = &game.entities[i]; if (entity_active(current)) continue; memcpy(current, e, sizeof(struct entity)); return; } }