openbsd-ports/games/frogatto/patches/patch-src_sound_cpp
ajacoutot ceb779450c Import frogatto-1.0.3
Frogatto is an open-source "platformer" or "jump-and-run" videogame.
Like in many classic games, the world is viewed as a cross-section seen
from the side, and your character (in this case, a small green fellow
named Frogatto) walks and jumps between solid platforms, whilst
avoiding monsters.

Based on the frogatto FreeBSD port.

ok sthen@
2010-09-23 11:30:55 +00:00

31 lines
1.2 KiB
Plaintext

$OpenBSD: patch-src_sound_cpp,v 1.1.1.1 2010/09/23 11:30:56 ajacoutot Exp $
--- src/sound.cpp.orig Thu Sep 23 08:02:09 2010
+++ src/sound.cpp Thu Sep 23 08:01:33 2010
@@ -356,7 +356,7 @@ int play_internal(const std::string& file, int loops,
#if !TARGET_IPHONE_SIMULATOR && !TARGET_OS_IPHONE
Mix_Chunk*& chunk = cache[file];
if(chunk == NULL) {
- chunk = Mix_LoadWAV(("sounds/" + file).c_str());
+ chunk = Mix_LoadWAV(("${TRUEPREFIX}/share/frogatto/sounds/" + file).c_str());
if(chunk == NULL) {
return -1;
}
@@ -544,7 +544,7 @@ void play_music(const std::string& file)
}
current_music_name() = file;
- current_mix_music = Mix_LoadMUS(("music/" + file).c_str());
+ current_mix_music = Mix_LoadMUS(("${TRUEPREFIX}/share/frogatto/music/" + file).c_str());
if(!current_mix_music) {
std::cerr << "Mix_LoadMUS ERROR loading " << file << ": " << Mix_GetError() << "\n";
return;
@@ -597,7 +597,7 @@ void play_music_interrupt(const std::string& file)
return;
}
- current_mix_music = Mix_LoadMUS(("music/" + file).c_str());
+ current_mix_music = Mix_LoadMUS(("${TRUEPREFIX}/share/frogatto/music/" + file).c_str());
if(!current_mix_music) {
std::cerr << "Mix_LoadMUS ERROR loading " << file << ": " << Mix_GetError() << "\n";
return;