Skip to content
Snippets Groups Projects
Commit 8e05de17 authored by Marco Z's avatar Marco Z
Browse files

Bring back music_data handle, for srb2dd

parent 691de18f
No related branches found
No related tags found
No related merge requests found
...@@ -1215,6 +1215,7 @@ const char *compat_special_music_slots[16] = ...@@ -1215,6 +1215,7 @@ const char *compat_special_music_slots[16] =
#endif #endif
static char music_name[7]; // up to 6-character name static char music_name[7]; // up to 6-character name
static void *music_data;
static UINT16 music_flags; static UINT16 music_flags;
static boolean music_looping; static boolean music_looping;
...@@ -1333,6 +1334,7 @@ static boolean S_LoadMusic(const char *mname) ...@@ -1333,6 +1334,7 @@ static boolean S_LoadMusic(const char *mname)
{ {
strncpy(music_name, mname, 7); strncpy(music_name, mname, 7);
music_name[6] = 0; music_name[6] = 0;
music_data = mdata;
return true; return true;
} }
else else
...@@ -1343,6 +1345,10 @@ static void S_UnloadMusic(void) ...@@ -1343,6 +1345,10 @@ static void S_UnloadMusic(void)
{ {
I_UnloadSong(); I_UnloadSong();
music_name[0] = 0; music_name[0] = 0;
#ifndef HAVE_SDL //SDL uses RWOPS
Z_ChangeTag(music_data, PU_CACHE);
#endif
music_data = NULL;
music_flags = 0; music_flags = 0;
music_looping = false; music_looping = false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment