Using new config file.
This commit is contained in:
+16
-6
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user