mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Bring back music_data handle, for srb2dd
This commit is contained in:
parent
691de18fbb
commit
8e05de17f0
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
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)
|
||||||
{
|
{
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue