making sure the world is cleaned up after main loop
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user