X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FSounds.cpp;h=735d93975fc58780c86bb929177a9378158a9a48;hb=c5dc3750efbc615b70917f19bb95cbd352cd00f6;hp=c2d4eb714863b86e334d5a86aa51e0b94318f843;hpb=7d89354018ef03ca4256ae63db3a8c89df5f277d;p=lugaru.git diff --git a/Source/Sounds.cpp b/Source/Sounds.cpp index c2d4eb7..735d939 100644 --- a/Source/Sounds.cpp +++ b/Source/Sounds.cpp @@ -20,6 +20,7 @@ along with Lugaru. If not, see . #include "Quaternions.h" #include "Sounds.h" #include "openal_wrapper.h" +#include "Utils/Folders.h" struct OPENAL_SAMPLE *samp[sounds_count]; @@ -57,10 +58,9 @@ static int snd_mode(int snd) void loadAllSounds() { for (int i = 0; i < sounds_count; i++) { - char buf[64]; - snprintf(buf, 64, ":Data:Sounds:%s", sound_data[i]); + std::string buf = std::string("Sounds/") + sound_data[i]; samp[i] = OPENAL_Sample_Load(OPENAL_FREE, - ConvertFileName(buf), + Folders::getResourcePath(buf).c_str(), snd_mode(i), 0, 0); }