1
0
Fork 0

feat: initialize and use audio subsystem.

This commit is contained in:
Henrik Hautakoski 2025-09-21 11:11:34 +02:00
parent 1c31fd43ac
commit 173adadb84

View file

@ -5,6 +5,7 @@ import (
"image/color"
"tetris/assets"
"tetris/engine/audio"
"tetris/engine/core"
"tetris/engine/graphics"
"tetris/engine/render"
@ -118,6 +119,11 @@ func main() {
})
defer render.Exit()
audio.Init()
defer audio.Exit()
audio.LoadLibrary(assets.LoadSound())
// Load texture
texture := graphics.LoadTextureFromMemory(".png", assets.Sprite)
defer rl.UnloadTexture(texture)
@ -129,6 +135,7 @@ func main() {
SpawnShape()
for !rl.WindowShouldClose() {
audio.Update()
Update(rl.GetFrameTime())
Render()
}