mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
renamed cvar variable volume to sfxvolume in order to avoid shadowing.
(console name is still volume, no changes to that.) git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@180 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
a68e196950
commit
80a3a0df30
4 changed files with 12 additions and 12 deletions
14
Quake/menu.c
14
Quake/menu.c
|
@ -1087,12 +1087,12 @@ void M_AdjustSliders (int dir)
|
|||
Cvar_SetValue ("bgmvolume", bgmvolume.value);
|
||||
break;
|
||||
case 7: // sfx volume
|
||||
volume.value += dir * 0.1;
|
||||
if (volume.value < 0)
|
||||
volume.value = 0;
|
||||
else if (volume.value > 1)
|
||||
volume.value = 1;
|
||||
Cvar_SetValue ("volume", volume.value);
|
||||
sfxvolume.value += dir * 0.1;
|
||||
if (sfxvolume.value < 0)
|
||||
sfxvolume.value = 0;
|
||||
else if (sfxvolume.value > 1)
|
||||
sfxvolume.value = 1;
|
||||
Cvar_SetValue ("volume", sfxvolume.value);
|
||||
break;
|
||||
|
||||
case 8: // always run
|
||||
|
@ -1182,7 +1182,7 @@ void M_Options_Draw (void)
|
|||
M_DrawSlider (220, 80, r);
|
||||
|
||||
M_Print (16, 88, " Sound Volume");
|
||||
r = volume.value;
|
||||
r = sfxvolume.value;
|
||||
M_DrawSlider (220, 88, r);
|
||||
|
||||
M_Print (16, 96, " Always Run");
|
||||
|
|
|
@ -62,7 +62,7 @@ sfx_t *ambient_sfx[NUM_AMBIENTS];
|
|||
qboolean sound_started = false;
|
||||
|
||||
cvar_t bgmvolume = {"bgmvolume", "1", true};
|
||||
cvar_t volume = {"volume", "0.7", true};
|
||||
cvar_t sfxvolume = {"volume", "0.7", true};
|
||||
|
||||
cvar_t nosound = {"nosound", "0"};
|
||||
cvar_t precache = {"precache", "1"};
|
||||
|
@ -135,7 +135,7 @@ void S_Init (void)
|
|||
}
|
||||
|
||||
Cvar_RegisterVariable(&nosound, NULL);
|
||||
Cvar_RegisterVariable(&volume, NULL);
|
||||
Cvar_RegisterVariable(&sfxvolume, NULL);
|
||||
Cvar_RegisterVariable(&precache, NULL);
|
||||
Cvar_RegisterVariable(&loadas8bit, NULL);
|
||||
Cvar_RegisterVariable(&bgmvolume, NULL);
|
||||
|
|
|
@ -61,7 +61,7 @@ void S_TransferStereo16 (int endtime)
|
|||
int lpos;
|
||||
int lpaintedtime;
|
||||
|
||||
snd_vol = volume.value * 256;
|
||||
snd_vol = sfxvolume.value * 256;
|
||||
|
||||
snd_p = (int *) paintbuffer;
|
||||
lpaintedtime = paintedtime;
|
||||
|
@ -104,7 +104,7 @@ void S_TransferPaintBuffer(int endtime)
|
|||
out_mask = shm->samples - 1;
|
||||
out_idx = paintedtime * shm->channels & out_mask;
|
||||
step = 3 - shm->channels;
|
||||
snd_vol = volume.value * 256;
|
||||
snd_vol = sfxvolume.value * 256;
|
||||
|
||||
if (shm->samplebits == 16)
|
||||
{
|
||||
|
|
|
@ -174,7 +174,7 @@ extern vec_t sound_nominal_clip_dist;
|
|||
|
||||
extern cvar_t loadas8bit;
|
||||
extern cvar_t bgmvolume;
|
||||
extern cvar_t volume;
|
||||
extern cvar_t sfxvolume;
|
||||
extern cvar_t sndspeed;
|
||||
|
||||
extern qboolean snd_initialized;
|
||||
|
|
Loading…
Reference in a new issue