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

@@ -13,6 +13,7 @@ class musicclass
public:
musicclass();
void init();
void destroy();
void play(int t, const double position_sec = 0.0, const int fadein_ms = 3000);
void resume(const int fadein_ms = 0);