Merge pull request #17 from Indev450/always-show-music-credit

Always show music credit
This commit was merged in pull request #17.
This commit is contained in:
indev authored and GitHub committed 2023-08-12 17:29:43 +03:00
commit 172c49a968
3 files changed
+19 -7

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
@@ -1499,11 +1499,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;
@@ -1515,7 +1515,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;
@@ -1528,6 +1528,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
@@ -165,6 +165,7 @@ extern musicdef_t *musicdefstart;
void S_LoadMusicDefs(UINT16 wadnum);
void S_InitMusicDefs(void);
void S_ShowSpecifiedMusicCredit(const char *musname);
void S_ShowMusicCredit(void);
//