diff options
Diffstat (limited to 'src/platform.odin')
| -rw-r--r-- | src/platform.odin | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platform.odin b/src/platform.odin index a974811..38ce950 100644 --- a/src/platform.odin +++ b/src/platform.odin @@ -1,5 +1,6 @@ package demonchime +import "fw" import "phys" Platform :: struct { @@ -8,18 +9,17 @@ Platform :: struct { } make_platform :: proc(rect: Rect) -> (Entity_Handle, ^Platform) { - body := phys.make_body(transmute(phys.Rect)rect) - return make_entity(&state.platform_list, Platform{body = body}) + handle := phys.make_body(transmute(phys.Rect)rect) + return make_entity(&state.platform_list, Platform{body = handle}) } draw_platforms :: proc() { iter := iter_entity_list(state.platform_list) - renderer.tint = {1, 0, 0, 0.25} + color := Color{1, 0, 0, 0.25} for p in entity_list_iter(&iter) { rect := phys.get_rect(p.body) - draw_rect(cast(Rect)rect) + fw.draw_rect(rect.start, rect.size, color = color) } - renderer.tint = {1, 1, 1, 1} } clear_platforms :: proc() { |
