Move musicclass cleanup to separate function musicclass::destroy()

This removes the music cleanup code from musicclass::init(), and
requires that we also call destroy() in Graphics::reloadresources().

This is because we'll need to re-use the musicclass cleanup code
elsewhere, and we don't want to copy-paste the cleanup code. Or at
least, I don't (but I'm not a game dev, game devs copy-paste all the
friggin' time).
This commit is contained in:
Misa
2021-02-15 16:24:21 -08:00
committed by Ethan Lee
parent b3679ce1e5
commit 0ea1a0e28e
3 changed files with 23 additions and 18 deletions

View File

@@ -3280,6 +3280,7 @@ void Graphics::reloadresources()
screenbuffer->LoadIcon();
}
music.destroy();
music.init();
}