X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=snd_mem.c;h=482b7709493552d0e6c1f0fdeff86a17479df878;hb=3a237df932bf2f895e9a026f72cd155e70ae3c3d;hp=1098c2b67a817b0ec09c139b636ad42449b7590e;hpb=925dc3b341a087249ca6fa0be7c227e49d01b213;p=xonotic%2Fdarkplaces.git diff --git a/snd_mem.c b/snd_mem.c index 1098c2b6..482b7709 100644 --- a/snd_mem.c +++ b/snd_mem.c @@ -24,6 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "snd_main.h" #include "snd_ogg.h" #include "snd_wav.h" +#ifdef USEXMP +#include "snd_xmp.h" +#endif /* @@ -102,9 +105,9 @@ qboolean S_LoadSound (sfx_t *sfx, qboolean complain) if (developer_loading.integer) Con_Printf("loading sound %s\n", sfx->name); - SCR_PushLoadingScreen(true, sfx->name, 1); + SCR_PushLoadingScreen(sfx->name, 1); - // LordHavoc: if the sound filename does not begin with sound/, try adding it + // LadyHavoc: if the sound filename does not begin with sound/, try adding it if (strncasecmp(sfx->name, "sound/", 6)) { dpsnprintf (namebuffer, sizeof(namebuffer), "sound/%s", sfx->name); @@ -120,9 +123,16 @@ qboolean S_LoadSound (sfx_t *sfx, qboolean complain) if (OGG_LoadVorbisFile (namebuffer, sfx)) goto loaded; } +#ifdef USEXMP + else if (len >= 1) + { + if (XMP_LoadModFile (namebuffer, sfx)) + goto loaded; + } +#endif } - // LordHavoc: then try without the added sound/ as wav and ogg + // LadyHavoc: then try without the added sound/ as wav and ogg dpsnprintf (namebuffer, sizeof(namebuffer), "%s", sfx->name); len = strlen(namebuffer); // request foo.wav: tries foo.wav, then foo.ogg @@ -139,6 +149,13 @@ qboolean S_LoadSound (sfx_t *sfx, qboolean complain) if (OGG_LoadVorbisFile (namebuffer, sfx)) goto loaded; } +#ifdef USEXMP + else if (len >= 1) + { + if (XMP_LoadModFile (namebuffer, sfx)) + goto loaded; + } +#endif // Can't load the sound! sfx->flags |= SFXFLAG_FILEMISSING;