summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-25 22:15:32 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-25 22:15:32 +0300
commit5ad5c94f789fec341d7103d9853b64ec6213081d (patch)
tree58dfad3cfbb9fdfddd9e06c9d0098cd68a2af747
parent8910645b6941f7295dee704fd47933d9ec6927b6 (diff)
downloadmanaverse-5ad5c94f789fec341d7103d9853b64ec6213081d.tar.gz
manaverse-5ad5c94f789fec341d7103d9853b64ec6213081d.tar.bz2
manaverse-5ad5c94f789fec341d7103d9853b64ec6213081d.tar.xz
manaverse-5ad5c94f789fec341d7103d9853b64ec6213081d.zip
Add memory count function into SDLMusic.
-rw-r--r--src/resources/sdlmusic.cpp7
-rw-r--r--src/resources/sdlmusic.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/resources/sdlmusic.cpp b/src/resources/sdlmusic.cpp
index e98a1bdd4..af0fbf3a0 100644
--- a/src/resources/sdlmusic.cpp
+++ b/src/resources/sdlmusic.cpp
@@ -73,3 +73,10 @@ bool SDLMusic::play(const int loops, const int fadeIn)
else
return Mix_FadeInMusicPos(mMusic, loops, 0, 0.0);
}
+
+int SDLMusic::calcMemoryLocal()
+{
+ // +++ not used size of SDL_RWops
+ return sizeof(SDLMusic) +
+ Resource::calcMemoryLocal();
+}
diff --git a/src/resources/sdlmusic.h b/src/resources/sdlmusic.h
index c1a34f7da..b6f8f3150 100644
--- a/src/resources/sdlmusic.h
+++ b/src/resources/sdlmusic.h
@@ -70,6 +70,8 @@ class SDLMusic final : public Resource
*/
bool play(const int loops = -1, const int fadeIn = 0);
+ int calcMemoryLocal() override final;
+
protected:
/**
* Constructor.