Even more conversion, lots of superfluous macro removal
This commit is contained in:
+11
-13
@@ -36,7 +36,7 @@ static void S_SoundList(void);
|
||||
|
||||
static void S_Update_(void);
|
||||
|
||||
void S_StopAllSounds(qboolean clear);
|
||||
void S_StopAllSounds(bool clear);
|
||||
|
||||
static void S_StopAllSoundsC(void);
|
||||
|
||||
@@ -48,7 +48,7 @@ channel_t snd_channels[MAX_CHANNELS];
|
||||
int total_channels;
|
||||
|
||||
static int snd_blocked = 0;
|
||||
static qboolean snd_initialized = false;
|
||||
static bool snd_initialized = false;
|
||||
|
||||
static dma_t sn;
|
||||
volatile dma_t *shm = NULL;
|
||||
@@ -73,7 +73,7 @@ static int num_sfx;
|
||||
|
||||
static sfx_t *ambient_sfx[NUM_AMBIENTS];
|
||||
|
||||
static qboolean sound_started = false;
|
||||
static bool sound_started = false;
|
||||
|
||||
convar bgmvolume = {"bgmvolume", "1", {.archive = true}};
|
||||
convar sfxvolume = {"volume", "0.7", {.archive = true}};
|
||||
@@ -153,8 +153,6 @@ S_Init
|
||||
================
|
||||
*/
|
||||
void S_Init(void) {
|
||||
int i;
|
||||
|
||||
if (snd_initialized) {
|
||||
Con_Printf("Sound is already initialized\n");
|
||||
return;
|
||||
@@ -174,7 +172,7 @@ void S_Init(void) {
|
||||
snd_mixspeed.inscribe();
|
||||
snd_filterquality.inscribe();
|
||||
|
||||
if (safemode || COM_CheckParm("-nosound"))
|
||||
if (safemode || common::check_param("-nosound").has_value())
|
||||
return;
|
||||
|
||||
Con_Printf("\nSound Initialization\n");
|
||||
@@ -185,14 +183,14 @@ void S_Init(void) {
|
||||
command::add("soundlist", S_SoundList);
|
||||
command::add("soundinfo", S_SoundInfo_f);
|
||||
|
||||
i = COM_CheckParm("-sndspeed");
|
||||
if (i && i < com_argc - 1) {
|
||||
sndspeed.set(com_argv[i + 1]);
|
||||
auto i = common::check_param("-sndspeed");
|
||||
if (i.has_value() && i.value() < com_argc - 1) {
|
||||
sndspeed.set(com_argv[i.value() + 1]);
|
||||
}
|
||||
|
||||
i = COM_CheckParm("-mixspeed");
|
||||
if (i && i < com_argc - 1) {
|
||||
snd_mixspeed.set(com_argv[i + 1]);
|
||||
i = common::check_param("-mixspeed");
|
||||
if (i.has_value() && i.value() < com_argc - 1) {
|
||||
snd_mixspeed.set(com_argv[i.value() + 1]);
|
||||
}
|
||||
|
||||
if (host_parms->memsize < 0x800000) {
|
||||
@@ -497,7 +495,7 @@ void S_StopSound(int entnum, int entchannel) {
|
||||
}
|
||||
}
|
||||
|
||||
void S_StopAllSounds(qboolean clear) {
|
||||
void S_StopAllSounds(bool clear) {
|
||||
int i;
|
||||
|
||||
if (!sound_started)
|
||||
|
||||
Reference in New Issue
Block a user