aboutsummaryrefslogtreecommitdiff
path: root/src/world.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.odin')
-rw-r--r--src/world.odin22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/world.odin b/src/world.odin
index 9456534..d333a44 100644
--- a/src/world.odin
+++ b/src/world.odin
@@ -2,7 +2,7 @@ package demonchime
import "core:log"
-import rl "vendor:raylib"
+import "fw"
Object_Spawner :: proc(Object_Resource)
Room_Change_Callback :: proc(Room_Id)
@@ -100,23 +100,13 @@ open_room :: proc(id: Room_Id) -> bool {
draw_room :: proc(id: Room_Id) {
draw_tile :: proc(x: i32, y: i32, tile_id: u32) {
tile := tiles[tile_id]
- rl.DrawTexturePro(
+ fw.draw_tile(
get_image(tile.image),
- 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),
+ Vec2{f32(x), f32(y)},
+ Rect{
+ {f32(tile.rect.start.x), f32(tile.rect.start.y)},
+ {f32(tile.rect.size.x), f32(tile.rect.size.y)},
},
- rl.Rectangle {
- x = f32(x),
- y = f32(y),
- width = f32(tile.rect.size.x),
- height = f32(tile.rect.size.y),
- },
- {0, 0},
- 0,
- rl.WHITE,
)
}