#include #include "wall.h" void add_wall(float xpos, float ypos, float width, float height) { struct entity wall = { .type = Wall_Entity, .flags = (ENTITY_ACTIVE | ENTITY_COLLISION_ACTIVE | ENTITY_VISIBLE), .position = { .x = xpos, .y = ypos }, .velocity = (Vector2) {0}, .collider = (Rectangle) { .x = xpos - width / 2, .y = ypos - height / 2, .width = width, .height = height }, }; add_entity(&wall); } void draw_wall(const struct entity* wall) { DrawRectangleRec(get_entity_collider_world(wall), RED); }