#include "entity.h" #include void entity_draw_hitbox(struct Entity *e) { const int x = e->x + e->hb_x; const int y = e->y + e->hb_y; drect_border(e->x, e->y, e->x + 2, e->y + 2, C_NONE, 1, e->hb_color); drect_border(x, y, x + e->hb_w - 1, y + e->hb_h - 1, C_NONE, 1, e->hb_color); } void entity_grid_draw_hitboxes(void) { int i; i = ENTITY_GRID_SIZE; while (i-- > 0) if (g_entity_grid[i] != NULL) entity_draw_hitbox(g_entity_grid[i]); }