feat: initialize and use audio subsystem.
This commit is contained in:
parent
1c31fd43ac
commit
173adadb84
1 changed files with 7 additions and 0 deletions
7
main.go
7
main.go
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue