Always show music credit #17

Merged
Indev450 merged 3 commits from always-show-music-credit into Saturn 2023-08-12 16:29:43 +02:00
3 changed files with 19 additions and 7 deletions

No files matched your search

+4 -3
View File
@@ -2463,9 +2463,6 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
else
S_FadeMusicFromVolume(fadetarget, fadesource, postfadems);
if (!(line->flags & ML_EFFECT3))
S_ShowMusicCredit();
if (position)
S_SetMusicPosition(position);
}
@@ -2497,6 +2494,10 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
}
}
// Show credit
if (!(line->flags & ML_EFFECT3) && !musicsame && sides[line->sidenum[0]].text[0] && leveltime >= starttime)
S_ShowSpecifiedMusicCredit(sides[line->sidenum[0]].text);
// Except, you can use the ML_BLOCKMONSTERS flag to change this behavior.
// if (mapmusflags & MUSIC_RELOADRESET) then it will reset the music in G_PlayerReborn.
}
+14 -4
View File
@@ -1485,11 +1485,11 @@ void S_InitMusicDefs(void)
}
//
// S_ShowMusicCredit
// S_ShowSpecifiedMusicCredit
//
// Display current song's credit on screen
// Display song's credit on screen
//
void S_ShowMusicCredit(void)
void S_ShowSpecifiedMusicCredit(const char *musname)
{
musicdef_t *def = musicdefstart;
@@ -1501,7 +1501,7 @@ void S_ShowMusicCredit(void)
while (def)
{
if (!stricmp(def->name, music_name))
if (!stricmp(def->name, musname))
{
cursongcredit.def = def;
cursongcredit.anim = 5*TICRATE;
@@ -1514,6 +1514,16 @@ void S_ShowMusicCredit(void)
}
}
//
// S_ShowMusicCredit
//
// Display current song's credit on screen
//
void S_ShowMusicCredit(void)
{
S_ShowSpecifiedMusicCredit(music_name);
}
/// ------------------------
/// Music Status
/// ------------------------
+1
View File
@@ -154,6 +154,7 @@ extern musicdef_t *musicdefstart;
void S_LoadMusicDefs(UINT16 wadnum);
void S_InitMusicDefs(void);
void S_ShowSpecifiedMusicCredit(const char *musname);
void S_ShowMusicCredit(void);
//