mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 02:42:20 +00:00
Reset captions where appropriate (including in S_StopSounds(), as it should have been doing all along).
This commit is contained in:
parent
e0d7b1ae24
commit
b1d5bc3190
3 changed files with 8 additions and 6 deletions
|
@ -8289,7 +8289,6 @@ static void M_ToggleSFX(INT32 choice)
|
|||
sound_disabled = true;
|
||||
S_StopSounds();
|
||||
OP_SoundOptionsMenu[6].status = IT_GRAYEDOUT;
|
||||
ResetCaptions();
|
||||
//M_StartMessage(M_GetText("SFX Disabled\n"), NULL, MM_NOTHING);
|
||||
}
|
||||
}
|
||||
|
@ -8845,6 +8844,8 @@ void M_QuitResponse(INT32 ch)
|
|||
return;
|
||||
if (!(netgame || cv_debug))
|
||||
{
|
||||
S_ResetCaptions();
|
||||
|
||||
mrand = M_RandomKey(sizeof(quitsounds)/sizeof(INT32));
|
||||
if (quitsounds[mrand]) S_StartSound(NULL, quitsounds[mrand]);
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ static consvar_t precachesound = {"precachesound", "Off", CV_SAVE, CV_OnOff, NUL
|
|||
|
||||
// actual general (maximum) sound & music volume, saved into the config
|
||||
consvar_t cv_soundvolume = {"soundvolume", "31", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_closedcaptioning = {"closedcaptioning", "Off", CV_SAVE|CV_CALL, CV_OnOff, ResetCaptions, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_closedcaptioning = {"closedcaptioning", "Off", CV_SAVE|CV_CALL, CV_OnOff, S_ResetCaptions, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_digmusicvolume = {"digmusicvolume", "18", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_midimusicvolume = {"midimusicvolume", "18", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
// number of channels available
|
||||
|
@ -132,7 +132,7 @@ static INT32 numofchannels = 0;
|
|||
|
||||
caption_t closedcaptions[NUMCAPTIONS];
|
||||
|
||||
void ResetCaptions(void)
|
||||
void S_ResetCaptions(void)
|
||||
{
|
||||
UINT8 i;
|
||||
for (i = 0; i < NUMCAPTIONS; i++)
|
||||
|
@ -301,7 +301,7 @@ static void SetChannelsNum(void)
|
|||
for (i = 0; i < numofchannels; i++)
|
||||
channels[i].sfxinfo = 0;
|
||||
|
||||
ResetCaptions();
|
||||
S_ResetCaptions();
|
||||
}
|
||||
|
||||
|
||||
|
@ -344,6 +344,8 @@ void S_StopSounds(void)
|
|||
for (cnum = 0; cnum < numofchannels; cnum++)
|
||||
if (channels[cnum].sfxinfo)
|
||||
S_StopChannel(cnum);
|
||||
|
||||
S_ResetCaptions();
|
||||
}
|
||||
|
||||
void S_StopSoundByID(void *origin, sfxenum_t sfx_id)
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
// mask used to indicate sound origin is player item pickup
|
||||
#define PICKUP_SOUND 0x8000
|
||||
|
||||
void ResetCaptions(void);
|
||||
|
||||
extern consvar_t stereoreverse;
|
||||
extern consvar_t cv_soundvolume, cv_closedcaptioning, cv_digmusicvolume, cv_midimusicvolume;
|
||||
extern consvar_t cv_numChannels;
|
||||
|
@ -92,6 +90,7 @@ typedef struct {
|
|||
|
||||
extern caption_t closedcaptions[NUMCAPTIONS];
|
||||
void S_StartCaption(sfxenum_t sfx_id, INT32 cnum, UINT16 lifespan);
|
||||
void S_ResetCaptions(void);
|
||||
|
||||
// register sound vars and commands at game startup
|
||||
void S_RegisterSoundStuff(void);
|
||||
|
|
Loading…
Reference in a new issue