package demonchime import "draw" import "phys" Platform :: struct { handle: Entity_Handle, body: phys.Body_Handle, } make_platform :: proc(rect: Rect) -> (Entity_Handle, ^Platform) { handle, body := phys.make_body(&state.physics_world, transmute(phys.Rect)rect) return make_entity(&state.platform_list, Platform { body = handle, }) } draw_platforms :: proc() { iter := iter_entity_list(state.platform_list) for p in entity_list_iter(&iter) { body := phys.get_body(state.physics_world, p.body) draw.rect(&state.renderer, cast(draw.Rect)body.rect) } }