From c93b7904064b51402b8a75a4a5fab4e235ce10bc Mon Sep 17 00:00:00 2001 From: Jason Hilder Date: Tue, 21 Jul 2026 07:41:59 +0200 Subject: [PATCH] Code formatting cleanup. --- src/map.odin | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/map.odin b/src/map.odin index d954825..50f41c5 100644 --- a/src/map.odin +++ b/src/map.odin @@ -23,10 +23,17 @@ Tile_Def :: struct { // awesome odin sets the fixed size to the ammount of enum options tile_defs: [Tile_Type]Tile_Def = { .FLOOR = { solid = false }, - .WALL = { solid = true, collider_offset_x = 0, collider_offset_y = 0, collider_w = TILE_SIZE, collider_h = TILE_SIZE }, - .LOW_WALL = { solid = true, collider_offset_x = 0, collider_offset_y = TILE_SIZE/2, collider_w = TILE_SIZE, collider_h = TILE_SIZE/2 }, .PICKUP = { solid = false }, - + .WALL = { + solid = true, + collider_offset_x = 0, collider_offset_y = 0, + collider_w = TILE_SIZE, collider_h = TILE_SIZE + }, + .LOW_WALL = { + solid = true, + collider_offset_x = 0, collider_offset_y = TILE_SIZE/2, + collider_w = TILE_SIZE, collider_h = TILE_SIZE/2 + }, } Game_Map :: struct { @@ -147,7 +154,12 @@ check_map_collision :: proc(rect: rl.Rectangle, game_map: Game_Map) -> bool { def := tile_defs[tile] if def.solid { - tile_rect := get_world_tile_rect( f32(gx), f32(gy), def.collider_offset_x, def.collider_offset_y, def.collider_w, def.collider_h); + tile_rect := get_world_tile_rect( + f32(gx), f32(gy), + def.collider_offset_x, def.collider_offset_y, + def.collider_w, def.collider_h + ); + if rl.CheckCollisionRecs(rect, tile_rect) { return true }