]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_xmp.c
cvar: Don't memset cvar->aliases before it's even allocated
[xonotic/darkplaces.git] / snd_xmp.c
index 2985112b639c4f1afbfa28552122bc21c17b290b..9876803d571fbcfc8c0922ba1d513b5100d1f2d5 100644 (file)
--- a/snd_xmp.c
+++ b/snd_xmp.c
  */
 
 
-#include "quakedef.h"
+#include "darkplaces.h"
 #include "snd_main.h"
 #include "snd_xmp.h"
+#include "sound.h"
 
 #ifdef LINK_TO_LIBXMP
 #include <xmp.h>
@@ -69,7 +70,7 @@
 
 #define xmp_dll 1
 
-qboolean XMP_OpenLibrary (void) {return true;}
+qbool XMP_OpenLibrary (void) {return true;}
 void XMP_CloseLibrary (void) {}
 #else
 
@@ -345,7 +346,7 @@ XMP_OpenLibrary
 Try to load the libxmp DLL
 ====================
 */
-qboolean XMP_OpenLibrary (void)
+qbool XMP_OpenLibrary (void)
 {
        const char* dllnames_xmp [] =
        {
@@ -370,12 +371,12 @@ qboolean XMP_OpenLibrary (void)
                return false;
 
        // Load the DLL
-       if (Sys_LoadLibrary (dllnames_xmp, &xmp_dll, xmpfuncs))
+       if (Sys_LoadDependency (dllnames_xmp, &xmp_dll, xmpfuncs))
        {
                if (*qxmp_vercode < 0x040200)
                {
                        Con_Printf("Found incompatible XMP library version %s, not loading. (4.2.0 or higher required)\n", *qxmp_version);
-                       Sys_UnloadLibrary (&xmp_dll);
+                       Sys_FreeLibrary (&xmp_dll);
                        return false;
                }
                if (developer_loading.integer >= 1)
@@ -396,7 +397,7 @@ Unload the libxmp DLL
 */
 void XMP_CloseLibrary (void)
 {
-       Sys_UnloadLibrary (&xmp_dll);
+       Sys_FreeLibrary (&xmp_dll);
 }
 
 #endif
@@ -592,7 +593,7 @@ XMP_LoadModFile
 Load an XMP module file into memory
 ===============
 */
-qboolean XMP_LoadModFile(const char *filename, sfx_t *sfx)
+qbool XMP_LoadModFile(const char *filename, sfx_t *sfx)
 {
        fs_offset_t filesize;
        unsigned char *data;