diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-29 22:00:35 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-29 22:00:35 +0000 |
commit | 5352c44d1ab542c64c421afcc690b200f7231a9d (patch) | |
tree | 4695c79a788c3ab9daeaf2972052a6ea9821bf13 /src/resources/soundeffect.cpp | |
parent | 52a7af6227d0b2ff94ff2c8fecd708d4d6a71466 (diff) | |
download | mana-client-5352c44d1ab542c64c421afcc690b200f7231a9d.tar.gz mana-client-5352c44d1ab542c64c421afcc690b200f7231a9d.tar.bz2 mana-client-5352c44d1ab542c64c421afcc690b200f7231a9d.tar.xz mana-client-5352c44d1ab542c64c421afcc690b200f7231a9d.zip |
Clean up of the ConfigListener and Resource interfaces.
Diffstat (limited to 'src/resources/soundeffect.cpp')
-rw-r--r-- | src/resources/soundeffect.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/soundeffect.cpp b/src/resources/soundeffect.cpp index 30d405d3..7c77d5b7 100644 --- a/src/resources/soundeffect.cpp +++ b/src/resources/soundeffect.cpp @@ -23,8 +23,8 @@ #include "soundeffect.h" -SoundEffect::SoundEffect(Mix_Chunk *soundEffect): - soundEffect(soundEffect) +SoundEffect::SoundEffect(const std::string &idPath, Mix_Chunk *soundEffect): + Resource(idPath), soundEffect(soundEffect) { } @@ -34,7 +34,7 @@ SoundEffect::~SoundEffect() soundEffect = NULL; } -SoundEffect* SoundEffect::load(void* buffer, unsigned int bufferSize) +SoundEffect* SoundEffect::load(void* buffer, unsigned int bufferSize, const std::string &idPath) { // Load the raw file data from the buffer in an RWops structure SDL_RWops *rw = SDL_RWFromMem(buffer, bufferSize); @@ -45,7 +45,7 @@ SoundEffect* SoundEffect::load(void* buffer, unsigned int bufferSize) // Now free the SDL_RWops data SDL_FreeRW(rw); - return new SoundEffect(tmpSoundEffect); + return new SoundEffect(idPath, tmpSoundEffect); } bool SoundEffect::play(int loops, int volume) |