diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-29 03:41:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-29 03:41:11 +0300 |
commit | 7c020abf511236e2c56fa1c6b6c1b8f248aa8582 (patch) | |
tree | aae0dbb1e1203ea33d1dbf1ff4185268d02a1943 /src/resources/sdlmusic.h | |
parent | fdfd38278cba5fa37d203d0d29b4981e400a529a (diff) | |
download | ManaVerse-7c020abf511236e2c56fa1c6b6c1b8f248aa8582.tar.gz ManaVerse-7c020abf511236e2c56fa1c6b6c1b8f248aa8582.tar.bz2 ManaVerse-7c020abf511236e2c56fa1c6b6c1b8f248aa8582.tar.xz ManaVerse-7c020abf511236e2c56fa1c6b6c1b8f248aa8582.zip |
Add name into memory usage tree for SDLMusic and SoundEffect.
Diffstat (limited to 'src/resources/sdlmusic.h')
-rw-r--r-- | src/resources/sdlmusic.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/resources/sdlmusic.h b/src/resources/sdlmusic.h index 6ba42796b..007a6acf1 100644 --- a/src/resources/sdlmusic.h +++ b/src/resources/sdlmusic.h @@ -37,6 +37,7 @@ class SDLMusic final : public Resource public: SDLMusic() : Resource(), + mName(), mMusic(nullptr), mRw(nullptr) { } @@ -56,7 +57,8 @@ class SDLMusic final : public Resource * @return <code>NULL</code> if the an error occurred, a valid pointer * otherwise. */ - static Resource *load(SDL_RWops *const rw) A_WARN_UNUSED; + static Resource *load(SDL_RWops *const rw, + const std::string &name) A_WARN_UNUSED; /** * Plays the music. @@ -72,12 +74,18 @@ class SDLMusic final : public Resource int calcMemoryLocal() const override final; + std::string getCounterName() const override final + { return mName; } + protected: /** * Constructor. */ - SDLMusic(Mix_Music *const music, SDL_RWops *const rw); + SDLMusic(Mix_Music *const music, + SDL_RWops *const rw, + const std::string &name); + std::string mName; Mix_Music *mMusic; SDL_RWops *mRw; }; |