From fee8d3cc047006dae6a2c63167f677d12b0018c2 Mon Sep 17 00:00:00 2001 From: Jason Hilder Date: Fri, 10 Jul 2026 08:27:40 +0200 Subject: [PATCH] Using new config file. --- src/game.odin | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/game.odin b/src/game.odin index 39a6768..263ed37 100644 --- a/src/game.odin +++ b/src/game.odin @@ -2,12 +2,8 @@ package game import rl "vendor:raylib" -WINDOW_WIDTH :: 1280 -WINDOW_HEIGHT :: 720 -WINDOW_TITLE :: "Graveyard" - Game :: struct { - // Game state lives here. Empty for now. + assets: Asset_Manager, } game_init :: proc() -> Game { @@ -16,6 +12,13 @@ game_init :: proc() -> Game { rl.InitWindow(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_TITLE) rl.SetTargetFPS(60) + // sub systems + game.assets = asset_manager_init() + + if DEBUG_MODE { + rl.TraceLog(.INFO, "Game initialized") + } + return game } @@ -33,11 +36,18 @@ game_draw :: proc(game: ^Game) { rl.BeginDrawing() // Do Draw Calls here - rl.ClearBackground(rl.WHITE) + rl.ClearBackground(rl.DARKGRAY) + + if DEBUG_MODE { + rl.DrawFPS(20, 20) + } rl.EndDrawing() } game_close :: proc(game: ^Game) { + // cleanup sub systems + asset_manager_destroy(&game.assets) + rl.CloseWindow() } \ No newline at end of file