Revert "add a bunch of mutexes and shit but still have racist conditions and panics LOL"

This reverts commit 220a451475.
This commit is contained in:
2025-01-23 09:42:42 +01:00
parent f966d538d3
commit fde07e3e48
7 changed files with 162 additions and 310 deletions

View File

@ -85,3 +85,19 @@ func LoadModels() ([]types.ModelAsset, error) {
func LoadMusic(filename string) (rl.Music, error) {
return rl.LoadMusicStream(filename), nil
}
func UnloadModels(models []types.ModelAsset) {
for _, model := range models {
if model.Animation != nil {
for i := int32(0); i < model.AnimFrames; i++ {
rl.UnloadModelAnimation(model.Animation[i])
}
}
rl.UnloadModel(model.Model)
rl.UnloadTexture(model.Texture)
}
}
func UnloadMusic(music rl.Music) {
rl.UnloadMusicStream(music)
}