diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/monsterinfo.cpp | 8 | ||||
-rw-r--r-- | src/resources/monsterinfo.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/resources/monsterinfo.cpp b/src/resources/monsterinfo.cpp index 1808d1c8..43aac32a 100644 --- a/src/resources/monsterinfo.cpp +++ b/src/resources/monsterinfo.cpp @@ -48,14 +48,16 @@ MonsterInfo::addSound (SoundEvent event, std::string filename) mSounds[event] = new std::vector<std::string>;
}
- mSounds[event]->push_back(filename);
+ mSounds[event]->push_back("sfx/" + filename);
}
std::string
-MonsterInfo::getSound (SoundEvent event)
+MonsterInfo::getSound (SoundEvent event) const
{
- std::map<SoundEvent, std::vector<std::string>* >::iterator i = mSounds.find(event);
+ std::map<SoundEvent, std::vector<std::string>* >::const_iterator i;
+
+ i = mSounds.find(event);
if (i == mSounds.end())
{
diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h index c5ded375..413dafa0 100644 --- a/src/resources/monsterinfo.h +++ b/src/resources/monsterinfo.h @@ -61,7 +61,7 @@ class MonsterInfo getSprite () const { return mSprite; };
std::string
- getSound (SoundEvent event);
+ getSound (SoundEvent event) const;
private:
|