aboutsummaryrefslogtreecommitdiff
path: root/src/platform.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform.odin')
-rw-r--r--src/platform.odin15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/platform.odin b/src/platform.odin
index a071468..0e4d93b 100644
--- a/src/platform.odin
+++ b/src/platform.odin
@@ -10,9 +10,7 @@ Platform :: struct {
make_platform :: proc(rect: Rect) -> (Entity_Handle, ^Platform) {
handle, body := phys.make_body(transmute(phys.Rect)rect)
- return make_entity(&state.platform_list, Platform {
- body = handle,
- })
+ return make_entity(&state.platform_list, Platform{body = handle})
}
draw_platforms :: proc() {
@@ -36,18 +34,11 @@ clear_platforms :: proc() {
setup_map_collisions :: proc() {
clear_platforms()
- make_map_collisions :: proc(
- x: i32,
- y: i32,
- tile_id: u32,
- ) {
+ make_map_collisions :: proc(x: i32, y: i32, tile_id: u32) {
tile := tiles[tile_id]
for coll in tile.collisions {
- make_platform({
- coll.start + {f32(x), f32(y)},
- coll.size,
- })
+ make_platform({coll.start + {f32(x), f32(y)}, coll.size})
}
}