mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 20:21:38 +00:00
Misc. fixes. bound() is now defined, make dist works properly it seems,
missed a basepath/userpath, and fixed up the menu.
This commit is contained in:
parent
e1e329733c
commit
d5f18435ec
3 changed files with 64 additions and 174 deletions
|
@ -35,7 +35,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#ifndef min
|
#ifndef min
|
||||||
# define min(a,b) ((a) < (b) ? (a) : (b))
|
# define min(a,b) ((a) < (b) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef bound
|
||||||
|
# define bound(a,b,c) (max(a, min(b, c)))
|
||||||
|
#endif
|
||||||
/* This fixes warnings when compiling with -pedantic */
|
/* This fixes warnings when compiling with -pedantic */
|
||||||
#if defined(__GNUC__) && !defined(inline)
|
#if defined(__GNUC__) && !defined(inline)
|
||||||
# define inline __inline__
|
# define inline __inline__
|
||||||
|
|
|
@ -90,3 +90,10 @@ qf_client_glx_LDADD= $(GLX_LIBS) $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $
|
||||||
|
|
||||||
EXTRA_DIST = makefile.winc makefile.wingl makefile.wins \
|
EXTRA_DIST = makefile.winc makefile.wingl makefile.wins \
|
||||||
qw_client.dsp qw_server.dsp
|
qw_client.dsp qw_server.dsp
|
||||||
|
|
||||||
|
qf_server_DEPENDENCIES=libqfsys_sv.a
|
||||||
|
qf_client_mgl_DEPENDENCIES=libqfsys_cl.a libqfsnd.a libqfcd.a
|
||||||
|
qf_client_ggi_DEPENDENCIES=libqfsys_cl.a libqfsnd.a libqfcd.a
|
||||||
|
qf_client_svga_DEPENDENCIES=libqfsys_cl.a libqfsnd.a libqfcd.a
|
||||||
|
qf_client_x11_DEPENDENCIES=libqfsys_cl.a libqfsnd.a libqfcd.a
|
||||||
|
qf_client_glx_DEPENDENCIES=libqfsys_cl.a libqfsnd.a libqfcd.a
|
||||||
|
|
219
source/menu.c
219
source/menu.c
|
@ -404,161 +404,66 @@ void M_AdjustSliders (int dir)
|
||||||
{
|
{
|
||||||
S_LocalSound ("misc/menu3.wav");
|
S_LocalSound ("misc/menu3.wav");
|
||||||
|
|
||||||
switch (options_cursor)
|
switch (options_cursor) {
|
||||||
{
|
case 3: // screen size
|
||||||
case 3: // screen size
|
Cvar_Set(scr_viewsize, va("%d",
|
||||||
/* scr_viewsize.value += dir * 10;
|
bound(30, (int)scr_viewsize->value + (dir * 10), 120)));
|
||||||
CVAR_FIXME */
|
break;
|
||||||
scr_viewsize->value += dir * 10;
|
case 4: // gamma
|
||||||
/* if (scr_viewsize.value < 30)
|
Cvar_Set(v_gamma, va("%f",
|
||||||
CVAR_FIXME */
|
bound(0.5, v_gamma->value - (dir * 0.05), 1)));
|
||||||
if (scr_viewsize->value < 30)
|
break;
|
||||||
/* scr_viewsize.value = 30;
|
case 5: // mouse speed
|
||||||
CVAR_FIXME */
|
Cvar_Set(sensitivity, va("%f",
|
||||||
scr_viewsize->value = 30;
|
bound(1, sensitivity->value + dir, 25)));
|
||||||
/* if (scr_viewsize.value > 120)
|
break;
|
||||||
CVAR_FIXME */
|
case 6: // music volume
|
||||||
if (scr_viewsize->value > 120)
|
Cvar_Set(bgmvolume, va("%f",
|
||||||
/* scr_viewsize.value = 120;
|
|
||||||
CVAR_FIXME */
|
|
||||||
Cvar_SetValue (scr_viewsize, 120);
|
|
||||||
/* Cvar_SetValue (viewsize, scr_viewsize.value);
|
|
||||||
CVAR_FIXME */
|
|
||||||
break;
|
|
||||||
case 4: // gamma
|
|
||||||
/* v_gamma.value -= dir * 0.05;
|
|
||||||
CVAR_FIXME */
|
|
||||||
v_gamma->value -= dir * 0.05;
|
|
||||||
/* if (v_gamma.value < 0.5)
|
|
||||||
CVAR_FIXME */
|
|
||||||
if (v_gamma->value < 0.5)
|
|
||||||
/* v_gamma.value = 0.5;
|
|
||||||
CVAR_FIXME */
|
|
||||||
v_gamma->value = 0.5;
|
|
||||||
/* if (v_gamma.value > 1)
|
|
||||||
CVAR_FIXME */
|
|
||||||
if (v_gamma->value > 1)
|
|
||||||
/* v_gamma.value = 1;
|
|
||||||
CVAR_FIXME */
|
|
||||||
Cvar_SetValue (v_gamma, 1);
|
|
||||||
/* Cvar_SetValue ("gamma", v_gamma.value);
|
|
||||||
CVAR_FIXME */
|
|
||||||
break;
|
|
||||||
case 5: // mouse speed
|
|
||||||
/* sensitivity.value += dir * 0.5;
|
|
||||||
CVAR_FIXME */
|
|
||||||
sensitivity->value += dir * 0.5;
|
|
||||||
/* if (sensitivity.value < 1)
|
|
||||||
CVAR_FIXME */
|
|
||||||
if (sensitivity->value < 1)
|
|
||||||
/* sensitivity.value = 1;
|
|
||||||
CVAR_FIXME */
|
|
||||||
sensitivity->value = 1;
|
|
||||||
/* if (sensitivity.value > 11)
|
|
||||||
CVAR_FIXME */
|
|
||||||
if (sensitivity->value > 11)
|
|
||||||
/* sensitivity.value = 11;
|
|
||||||
CVAR_FIXME */
|
|
||||||
Cvar_SetValue (sensitivity, 11);
|
|
||||||
/* Cvar_SetValue ("sensitivity", sensitivity.value);
|
|
||||||
CVAR_FIXME */
|
|
||||||
break;
|
|
||||||
case 6: // music volume
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
/* bgmvolume.value += dir * 1.0;
|
bound(0, bgmvolume->value + dir, 1)));
|
||||||
CVAR_FIXME */
|
|
||||||
Cvar_SetValue (bgmvolume, bgmvolume->value + dir * 1.0);
|
|
||||||
#else
|
#else
|
||||||
/* bgmvolume.value += dir * 0.1;
|
bound(0, bgmvolume->value + (dir * 0.1), 1)));
|
||||||
CVAR_FIXME */
|
|
||||||
Cvar_SetValue (bgmvolume, bgmvolume->value + dir * 0.1);
|
|
||||||
#endif
|
#endif
|
||||||
/* if (bgmvolume.value < 0)
|
break;
|
||||||
CVAR_FIXME */
|
case 7: // sfx volume
|
||||||
if (bgmvolume->value < 0)
|
Cvar_Set(volume, va("%f", bound(0, volume->value + (dir * 0.1), 1)));
|
||||||
/* bgmvolume.value = 0;
|
break;
|
||||||
CVAR_FIXME */
|
|
||||||
Cvar_SetValue (bgmvolume, 0);
|
|
||||||
/* if (bgmvolume.value > 1)
|
|
||||||
CVAR_FIXME */
|
|
||||||
if (bgmvolume->value > 1)
|
|
||||||
/* bgmvolume.value = 1;
|
|
||||||
CVAR_FIXME */
|
|
||||||
Cvar_SetValue (bgmvolume, 1);
|
|
||||||
/* Cvar_SetValue ("bgmvolume", bgmvolume.value);
|
|
||||||
CVAR_FIXME */
|
|
||||||
break;
|
|
||||||
case 7: // sfx volume
|
|
||||||
/* volume.value += dir * 0.1;
|
|
||||||
CVAR_FIXME */
|
|
||||||
Cvar_SetValue (volume, volume->value + dir * 0.1);
|
|
||||||
/* if (volume.value < 0)
|
|
||||||
CVAR_FIXME */
|
|
||||||
if (volume->value < 0)
|
|
||||||
/* volume.value = 0;
|
|
||||||
CVAR_FIXME */
|
|
||||||
Cvar_SetValue (volume, 0);
|
|
||||||
/* if (volume.value > 1)
|
|
||||||
CVAR_FIXME */
|
|
||||||
if (volume->value > 1)
|
|
||||||
/* volume.value = 1;
|
|
||||||
CVAR_FIXME */
|
|
||||||
Cvar_SetValue (volume, 1);
|
|
||||||
/*CVAR_FIXME */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 8: // allways run
|
case 8: // allways run
|
||||||
/* if (cl_forwardspeed.value > 200)
|
if (cl_forwardspeed->value > 200) {
|
||||||
CVAR_FIXME */
|
Cvar_Set(cl_forwardspeed, va("%d", 200));
|
||||||
if (cl_forwardspeed->value > 200)
|
Cvar_Set(cl_backspeed, va("%d", 200));
|
||||||
{
|
} else {
|
||||||
Cvar_SetValue (cl_forwardspeed, 200);
|
Cvar_Set(cl_forwardspeed, va("%d", 400));
|
||||||
Cvar_SetValue (cl_backspeed, 200);
|
Cvar_Set(cl_backspeed, va("%d", 400));
|
||||||
}
|
}
|
||||||
else
|
break;
|
||||||
{
|
|
||||||
Cvar_SetValue (cl_forwardspeed, 400);
|
|
||||||
Cvar_SetValue (cl_backspeed, 400);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 9: // invert mouse
|
case 9: // invert mouse
|
||||||
/* m_pitch- -m_pitch.value);
|
Cvar_Set(m_pitch, va("%f", -m_pitch->value));
|
||||||
CVAR_FIXME */
|
break;
|
||||||
Cvar_SetValue (m_pitch, -m_pitch->value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 10: // lookspring
|
case 10: // lookspring
|
||||||
/* Cvar_SetValue ("lookspring", !lookspring.value);
|
Cvar_SetValue(lookspring, !lookspring->value);
|
||||||
CVAR_FIXME */
|
break;
|
||||||
Cvar_SetValue (lookspring, !lookspring->value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 11: // lookstrafe
|
case 11: // lookstrafe
|
||||||
/* Cvar_SetValue ("lookstrafe", !lookstrafe.value);
|
Cvar_SetValue(lookstrafe, !lookstrafe->value);
|
||||||
CVAR_FIXME */
|
break;
|
||||||
Cvar_SetValue (lookstrafe, !lookstrafe->value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 12:
|
case 12: // Use old-style sbar
|
||||||
/* Cvar_SetValue ("cl_sbar", !cl_sbar.value);
|
Cvar_SetValue(cl_sbar, !cl_sbar->value);
|
||||||
CVAR_FIXME */
|
break;
|
||||||
Cvar_SetValue (cl_sbar, !cl_sbar->value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 13:
|
case 13: // HUD on left side
|
||||||
/* Cvar_SetValue ("cl_hudswap", !cl_hudswap.value);
|
Cvar_SetValue (cl_hudswap, !cl_hudswap->value);
|
||||||
CVAR_FIXME */
|
break;
|
||||||
Cvar_SetValue (cl_hudswap, !cl_hudswap->value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 15: // _windowed_mouse
|
case 15: // _windowed_mouse
|
||||||
if (_windowed_mouse) {
|
if (_windowed_mouse->value) {
|
||||||
/* Cvar_SetValue ("_windowed_mouse", !_windowed_mouse.value);
|
Cvar_SetValue (_windowed_mouse, !_windowed_mouse->value);
|
||||||
CVAR_FIXME */
|
}
|
||||||
Cvar_SetValue (_windowed_mouse, !_windowed_mouse->value);
|
break;
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,63 +511,41 @@ void M_Options_Draw (void)
|
||||||
M_Print (16, 48, " Reset to defaults");
|
M_Print (16, 48, " Reset to defaults");
|
||||||
|
|
||||||
M_Print (16, 56, " Screen size");
|
M_Print (16, 56, " Screen size");
|
||||||
/* r = (scr_viewsize.value - 30) / (120 - 30);
|
|
||||||
CVAR_FIXME */
|
|
||||||
r = (scr_viewsize->value - 30) / (120 - 30);
|
r = (scr_viewsize->value - 30) / (120 - 30);
|
||||||
M_DrawSlider (220, 56, r);
|
M_DrawSlider (220, 56, r);
|
||||||
|
|
||||||
M_Print (16, 64, " Brightness");
|
M_Print (16, 64, " Brightness");
|
||||||
/* r = (1.0 - v_gamma.value) / 0.5;
|
|
||||||
CVAR_FIXME */
|
|
||||||
r = (1.0 - v_gamma->value) / 0.5;
|
r = (1.0 - v_gamma->value) / 0.5;
|
||||||
M_DrawSlider (220, 64, r);
|
M_DrawSlider (220, 64, r);
|
||||||
|
|
||||||
M_Print (16, 72, " Mouse Speed");
|
M_Print (16, 72, " Mouse Speed");
|
||||||
/* r = (sensitivity.value - 1)/10;
|
|
||||||
CVAR_FIXME */
|
|
||||||
r = (sensitivity->value - 1)/10;
|
r = (sensitivity->value - 1)/10;
|
||||||
M_DrawSlider (220, 72, r);
|
M_DrawSlider (220, 72, r);
|
||||||
|
|
||||||
M_Print (16, 80, " CD Music Volume");
|
M_Print (16, 80, " CD Music Volume");
|
||||||
/* r = bgmvolume.value;
|
|
||||||
CVAR_FIXME */
|
|
||||||
r = bgmvolume->value;
|
r = bgmvolume->value;
|
||||||
M_DrawSlider (220, 80, r);
|
M_DrawSlider (220, 80, r);
|
||||||
|
|
||||||
M_Print (16, 88, " Sound Volume");
|
M_Print (16, 88, " Sound Volume");
|
||||||
/* r = volume.value;
|
|
||||||
CVAR_FIXME */
|
|
||||||
r = volume->value;
|
r = volume->value;
|
||||||
M_DrawSlider (220, 88, r);
|
M_DrawSlider (220, 88, r);
|
||||||
|
|
||||||
M_Print (16, 96, " Always Run");
|
M_Print (16, 96, " Always Run");
|
||||||
/* M_DrawCheckbox (220, 96, cl_forwardspeed.value > 200);
|
|
||||||
CVAR_FIXME */
|
|
||||||
M_DrawCheckbox (220, 96, cl_forwardspeed->value > 200);
|
M_DrawCheckbox (220, 96, cl_forwardspeed->value > 200);
|
||||||
|
|
||||||
M_Print (16, 104, " Invert Mouse");
|
M_Print (16, 104, " Invert Mouse");
|
||||||
/* M_DrawCheckbox (220, 104, m_pitch.value < 0);
|
|
||||||
CVAR_FIXME */
|
|
||||||
M_DrawCheckbox (220, 104, m_pitch->value < 0);
|
M_DrawCheckbox (220, 104, m_pitch->value < 0);
|
||||||
|
|
||||||
M_Print (16, 112, " Lookspring");
|
M_Print (16, 112, " Lookspring");
|
||||||
/* M_DrawCheckbox (220, 112, lookspring.value);
|
|
||||||
CVAR_FIXME */
|
|
||||||
M_DrawCheckbox (220, 112, lookspring->value);
|
M_DrawCheckbox (220, 112, lookspring->value);
|
||||||
|
|
||||||
M_Print (16, 120, " Lookstrafe");
|
M_Print (16, 120, " Lookstrafe");
|
||||||
/* M_DrawCheckbox (220, 120, lookstrafe.value);
|
|
||||||
CVAR_FIXME */
|
|
||||||
M_DrawCheckbox (220, 120, lookstrafe->value);
|
M_DrawCheckbox (220, 120, lookstrafe->value);
|
||||||
|
|
||||||
M_Print (16, 128, " Use old status bar");
|
M_Print (16, 128, " Use old status bar");
|
||||||
/* M_DrawCheckbox (220, 128, cl_sbar.value);
|
|
||||||
CVAR_FIXME */
|
|
||||||
M_DrawCheckbox (220, 128, cl_sbar->value);
|
M_DrawCheckbox (220, 128, cl_sbar->value);
|
||||||
|
|
||||||
M_Print (16, 136, " HUD on left side");
|
M_Print (16, 136, " HUD on left side");
|
||||||
/* M_DrawCheckbox (220, 136, cl_hudswap.value);
|
|
||||||
CVAR_FIXME */
|
|
||||||
M_DrawCheckbox (220, 136, cl_hudswap->value);
|
M_DrawCheckbox (220, 136, cl_hudswap->value);
|
||||||
|
|
||||||
if (vid_menudrawfn)
|
if (vid_menudrawfn)
|
||||||
|
@ -674,8 +557,6 @@ void M_Options_Draw (void)
|
||||||
#endif
|
#endif
|
||||||
if (_windowed_mouse) {
|
if (_windowed_mouse) {
|
||||||
M_Print (16, 152, " Use Mouse");
|
M_Print (16, 152, " Use Mouse");
|
||||||
/* M_DrawCheckbox (220, 152, _windowed_mouse.value);
|
|
||||||
CVAR_FIXME */
|
|
||||||
M_DrawCheckbox (220, 152, _windowed_mouse->value);
|
M_DrawCheckbox (220, 152, _windowed_mouse->value);
|
||||||
}
|
}
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
Loading…
Reference in a new issue