aboutsummaryrefslogtreecommitdiff
path: root/src/main.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.odin')
-rw-r--r--src/main.odin4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.odin b/src/main.odin
index e04b477..e1b13d5 100644
--- a/src/main.odin
+++ b/src/main.odin
@@ -11,6 +11,7 @@ import "phys"
import "fw"
Handle :: hm.Handle32
+
Vec2 :: fw.Vec2
Vec2i :: fw.Vec2i
Color :: fw.Color
@@ -130,7 +131,8 @@ frame :: proc() {
// Draw all collisions
body_it: int
color := Color{1, 0.25, 0.5, 0.25}
- for body in phys.iterate_bodies(&body_it) {
+ body_iter := hm.iterator_make(&phys.world.bodies)
+ for _, body in hm.iterate(&body_iter) {
rect := phys.get_rect(body)
rect.start += phys.get_position(body)
fw.draw_rect(rect.start, rect.size, color = color, lines = true)