Using new config file.

This commit is contained in:
2026-07-10 08:27:40 +02:00
parent f7f34e79ed
commit fee8d3cc04
+16 -6
View File
@@ -2,12 +2,8 @@ package game
import rl "vendor:raylib" import rl "vendor:raylib"
WINDOW_WIDTH :: 1280
WINDOW_HEIGHT :: 720
WINDOW_TITLE :: "Graveyard"
Game :: struct { Game :: struct {
// Game state lives here. Empty for now. assets: Asset_Manager,
} }
game_init :: proc() -> Game { game_init :: proc() -> Game {
@@ -16,6 +12,13 @@ game_init :: proc() -> Game {
rl.InitWindow(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_TITLE) rl.InitWindow(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_TITLE)
rl.SetTargetFPS(60) rl.SetTargetFPS(60)
// sub systems
game.assets = asset_manager_init()
if DEBUG_MODE {
rl.TraceLog(.INFO, "Game initialized")
}
return game return game
} }
@@ -33,11 +36,18 @@ game_draw :: proc(game: ^Game) {
rl.BeginDrawing() rl.BeginDrawing()
// Do Draw Calls here // Do Draw Calls here
rl.ClearBackground(rl.WHITE) rl.ClearBackground(rl.DARKGRAY)
if DEBUG_MODE {
rl.DrawFPS(20, 20)
}
rl.EndDrawing() rl.EndDrawing()
} }
game_close :: proc(game: ^Game) { game_close :: proc(game: ^Game) {
// cleanup sub systems
asset_manager_destroy(&game.assets)
rl.CloseWindow() rl.CloseWindow()
} }