diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-25 22:15:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-25 22:15:32 +0300 |
commit | 5ad5c94f789fec341d7103d9853b64ec6213081d (patch) | |
tree | 58dfad3cfbb9fdfddd9e06c9d0098cd68a2af747 /src/resources | |
parent | 8910645b6941f7295dee704fd47933d9ec6927b6 (diff) | |
download | plus-5ad5c94f789fec341d7103d9853b64ec6213081d.tar.gz plus-5ad5c94f789fec341d7103d9853b64ec6213081d.tar.bz2 plus-5ad5c94f789fec341d7103d9853b64ec6213081d.tar.xz plus-5ad5c94f789fec341d7103d9853b64ec6213081d.zip |
Add memory count function into SDLMusic.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/sdlmusic.cpp | 7 | ||||
-rw-r--r-- | src/resources/sdlmusic.h | 2 |
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. |