making sure the world is cleaned up after main loop

This commit is contained in:
2026-02-16 18:23:45 -06:00
parent 9301fe2696
commit 087fc4a16c
2 changed files with 4 additions and 4 deletions

View File

@@ -13,11 +13,13 @@ main :: proc() {
raylib.SetConfigFlags(config_flags)
raylib.InitWindow(1920, 1080, "Game")
defer raylib.CloseWindow()
raylib.SetTargetFPS(60)
raylib.SetExitKey(nil)
init_world()
defer deinit_world()
player = {
position = {300, 300},
@@ -50,8 +52,6 @@ main :: proc() {
update(delta)
}
raylib.CloseWindow()
}
@(private = "file")

View File

@@ -14,7 +14,7 @@ interactables_tilemap_sheet: TilemapSpritesheet
init_world :: proc() {
world_base_color = {0, 150, 255, 255}
// world_base_color = {74, 132, 74, 255}
ground_tilemap_sheet = load_tilemap_sheet(
"assets/tiles/master_tilemap.png",
@@ -70,7 +70,7 @@ draw_world :: proc() {
&interactables_tilemap_sheet,
&interactables_layer_grid,
&player.camera,
raylib.WHITE,
world_base_color,
)
}