aboutsummaryrefslogtreecommitdiff
path: root/src/world.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.odin')
-rw-r--r--src/world.odin14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/world.odin b/src/world.odin
index d0e6c74..3248d65 100644
--- a/src/world.odin
+++ b/src/world.odin
@@ -16,8 +16,10 @@ open_room_at :: proc(pos: [2]i32) -> bool {
continue
}
- if pos.x >= room_pos.x && pos.x <= room_pos.x + room_pos.width \
- && pos.y >= room_pos.y && pos.y <= room_pos.y + room_pos.height {
+ if pos.x >= room_pos.x &&
+ pos.x <= room_pos.x + room_pos.width &&
+ pos.y >= room_pos.y &&
+ pos.y <= room_pos.y + room_pos.height {
current_room = room_pos
return true
}
@@ -42,13 +44,13 @@ draw_room :: proc(id: Room_Id) {
tileset := tilesets[tile.tileset]
rl.DrawTexturePro(
get_image(tileset.image),
- rl.Rectangle{
+ rl.Rectangle {
x = f32(tile.rect.start.x),
y = f32(tile.rect.start.y),
width = f32(tile.rect.size.x),
height = f32(tile.rect.size.y),
},
- rl.Rectangle{
+ rl.Rectangle {
x = f32(x),
y = f32(y),
width = f32(tile.rect.size.x),
@@ -59,11 +61,11 @@ draw_room :: proc(id: Room_Id) {
rl.WHITE,
)
}
-
+
iterate_room_tiles(id, draw_tile)
}
-Map_Iterate_Callback :: proc(i32, i32, u32)
+Map_Iterate_Callback :: proc(_: i32, _: i32, _: u32)
iterate_room_tiles :: proc(id: Room_Id, callback: Map_Iterate_Callback) {
room := get_room(id)