]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Sounds.cpp
Switched all data access to the new methods
[lugaru.git] / Source / Sounds.cpp
index c2d4eb714863b86e334d5a86aa51e0b94318f843..735d93975fc58780c86bb929177a9378158a9a48 100644 (file)
@@ -20,6 +20,7 @@ along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 #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);
     }