mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
- refactored crosshairscale CVAR
This commit is contained in:
parent
bdf2d24b21
commit
edce0d33e3
12 changed files with 13 additions and 18 deletions
|
@ -301,7 +301,6 @@ void CONFIG_SetDefaults(void)
|
||||||
useprecache = 1;
|
useprecache = 1;
|
||||||
configversion = 0;
|
configversion = 0;
|
||||||
//ud.crosshair = 1;
|
//ud.crosshair = 1;
|
||||||
//ud.crosshairscale = 50;
|
|
||||||
//ud.default_skill = 1;
|
//ud.default_skill = 1;
|
||||||
gUpscaleFactor = 0;
|
gUpscaleFactor = 0;
|
||||||
//ud.display_bonus_screen = 1;
|
//ud.display_bonus_screen = 1;
|
||||||
|
|
|
@ -604,7 +604,7 @@ static char const s_Scale[] = "Scale:";
|
||||||
|
|
||||||
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.crosshair);
|
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.crosshair);
|
||||||
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option );
|
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option );
|
||||||
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &ud.crosshairscale, &MF_Redfont, 25, 100, 0, 16, 2 );
|
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( cl.crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 );
|
||||||
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 );
|
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 );
|
||||||
|
|
||||||
static int32_t vpsize;
|
static int32_t vpsize;
|
||||||
|
|
|
@ -32,6 +32,8 @@ CVARD(Bool, cl_viewvbob, true, CVAR_ARCHIVE, "enable/disable view vertical bobbi
|
||||||
CVARD(Bool, cl_interpolate, true, CVAR_ARCHIVE, "enable/disable view interpolation") // only implemented in Blood
|
CVARD(Bool, cl_interpolate, true, CVAR_ARCHIVE, "enable/disable view interpolation") // only implemented in Blood
|
||||||
CVARD(Bool, cl_slopetilting, false, CVAR_ARCHIVE, "enable/disable slope tilting") // only implemented in Blood
|
CVARD(Bool, cl_slopetilting, false, CVAR_ARCHIVE, "enable/disable slope tilting") // only implemented in Blood
|
||||||
CVARD(Bool, cl_showweapon, true, CVAR_ARCHIVE, "enable/disable show weapons") // only implemented in Blood
|
CVARD(Bool, cl_showweapon, true, CVAR_ARCHIVE, "enable/disable show weapons") // only implemented in Blood
|
||||||
|
CVARD(Bool, cl_crosshairscale, 50, CVAR_ARCHIVE, "changes the size of the crosshair")
|
||||||
|
|
||||||
|
|
||||||
CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE, "enable/disable weapon autoaim")
|
CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE, "enable/disable weapon autoaim")
|
||||||
{
|
{
|
||||||
|
@ -132,7 +134,6 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus
|
||||||
|
|
||||||
{ "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
{ "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
||||||
|
|
||||||
{ "crosshairscale","changes the size of the crosshair", (void *)&ud.crosshairscale, CVAR_INT, 10, 100 },
|
|
||||||
|
|
||||||
{ "fov", "change the field of view", (void *)&ud.fov, CVAR_INT, 60, 140 },
|
{ "fov", "change the field of view", (void *)&ud.fov, CVAR_INT, 60, 140 },
|
||||||
|
|
||||||
|
@ -210,8 +211,6 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus
|
||||||
{
|
{
|
||||||
{ "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
{ "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
||||||
|
|
||||||
{ "crosshairscale","changes the size of the crosshair", (void *)&ud.crosshairscale, CVAR_INT, 10, 100 },
|
|
||||||
|
|
||||||
{ "fov", "change the field of view", (void *)&ud.fov, CVAR_INT|CVAR_FUNCPTR, 75, 120 },
|
{ "fov", "change the field of view", (void *)&ud.fov, CVAR_INT|CVAR_FUNCPTR, 75, 120 },
|
||||||
|
|
||||||
{ "hud_althud", "enable/disable alternate mini-hud", (void *)&ud.althud, CVAR_BOOL, 0, 1 },
|
{ "hud_althud", "enable/disable alternate mini-hud", (void *)&ud.althud, CVAR_BOOL, 0, 1 },
|
||||||
|
@ -292,8 +291,7 @@ int32_t registerosdcommands(void)
|
||||||
|
|
||||||
//
|
//
|
||||||
// { "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
// { "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
||||||
//
|
|
||||||
// { "crosshairscale","changes the size of the crosshair", (void *)&ud.crosshairscale, CVAR_INT, 10, 100 },
|
|
||||||
// { "hud_althud", "enable/disable alternate mini-hud", (void *)&ud.althud, CVAR_BOOL, 0, 1 },
|
// { "hud_althud", "enable/disable alternate mini-hud", (void *)&ud.althud, CVAR_BOOL, 0, 1 },
|
||||||
// { "hud_custom", "change the custom hud", (void *)&ud.statusbarcustom, CVAR_INT, 0, ud.statusbarrange },
|
// { "hud_custom", "change the custom hud", (void *)&ud.statusbarcustom, CVAR_INT, 0, ud.statusbarrange },
|
||||||
// { "hud_position", "aligns the status bar to the bottom/top", (void *)&ud.hudontop, CVAR_BOOL, 0, 1 },
|
// { "hud_position", "aligns the status bar to the bottom/top", (void *)&ud.hudontop, CVAR_BOOL, 0, 1 },
|
||||||
|
|
|
@ -254,7 +254,6 @@ void CONFIG_SetDefaults(void)
|
||||||
ud.config.SmoothInput = 1;
|
ud.config.SmoothInput = 1;
|
||||||
ud.config.useprecache = 1;
|
ud.config.useprecache = 1;
|
||||||
ud.configversion = 0;
|
ud.configversion = 0;
|
||||||
ud.crosshairscale = 50;
|
|
||||||
ud.default_skill = 1;
|
ud.default_skill = 1;
|
||||||
ud.detail = 0;
|
ud.detail = 0;
|
||||||
ud.display_bonus_screen = 1;
|
ud.display_bonus_screen = 1;
|
||||||
|
|
|
@ -175,7 +175,7 @@ typedef struct {
|
||||||
#endif
|
#endif
|
||||||
int32_t const_visibility,uw_framerate;
|
int32_t const_visibility,uw_framerate;
|
||||||
int32_t camera_time,folfvel,folavel,folx,foly,fola;
|
int32_t camera_time,folfvel,folavel,folx,foly,fola;
|
||||||
int32_t reccnt,crosshairscale;
|
int32_t reccnt;
|
||||||
|
|
||||||
int32_t runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
|
int32_t runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
|
||||||
int32_t color,msgdisptime,statusbarmode;
|
int32_t color,msgdisptime,statusbarmode;
|
||||||
|
|
|
@ -1465,7 +1465,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
|
||||||
case USERDEFS_ANGLEINTERPOLATION: labelNum = ud.angleinterpolation; break;
|
case USERDEFS_ANGLEINTERPOLATION: labelNum = ud.angleinterpolation; break;
|
||||||
case USERDEFS_OBITUARIES: labelNum = cl_obituaries; break;
|
case USERDEFS_OBITUARIES: labelNum = cl_obituaries; break;
|
||||||
case USERDEFS_LEVELSTATS: labelNum = ud.levelstats; break;
|
case USERDEFS_LEVELSTATS: labelNum = ud.levelstats; break;
|
||||||
case USERDEFS_CROSSHAIRSCALE: labelNum = ud.crosshairscale; break;
|
case USERDEFS_CROSSHAIRSCALE: labelNum = cl_crosshairscale; break;
|
||||||
case USERDEFS_ALTHUD: labelNum = ud.althud; break;
|
case USERDEFS_ALTHUD: labelNum = ud.althud; break;
|
||||||
case USERDEFS_DISPLAY_BONUS_SCREEN: labelNum = ud.display_bonus_screen; break;
|
case USERDEFS_DISPLAY_BONUS_SCREEN: labelNum = ud.display_bonus_screen; break;
|
||||||
case USERDEFS_SHOW_LEVEL_TEXT: labelNum = ud.show_level_text; break;
|
case USERDEFS_SHOW_LEVEL_TEXT: labelNum = ud.show_level_text; break;
|
||||||
|
@ -1665,8 +1665,8 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
|
||||||
case USERDEFS_WEAPONSWAY: cl_weaponsway = iSet; break; //!!!
|
case USERDEFS_WEAPONSWAY: cl_weaponsway = iSet; break; //!!!
|
||||||
case USERDEFS_ANGLEINTERPOLATION: ud.angleinterpolation = iSet; break;
|
case USERDEFS_ANGLEINTERPOLATION: ud.angleinterpolation = iSet; break;
|
||||||
case USERDEFS_OBITUARIES: cl_obituaries = iSet; break; //!!!
|
case USERDEFS_OBITUARIES: cl_obituaries = iSet; break; //!!!
|
||||||
case USERDEFS_LEVELSTATS: ud.levelstats = iSet; break;
|
case USERDEFS_LEVELSTATS: ud.levelstats = iSet; break; //!!!
|
||||||
case USERDEFS_CROSSHAIRSCALE: ud.crosshairscale = iSet; break;
|
case USERDEFS_CROSSHAIRSCALE: cl_crosshairscale = iSet; break;
|
||||||
case USERDEFS_ALTHUD: ud.althud = iSet; break;
|
case USERDEFS_ALTHUD: ud.althud = iSet; break;
|
||||||
case USERDEFS_DISPLAY_BONUS_SCREEN: ud.display_bonus_screen = iSet; break;
|
case USERDEFS_DISPLAY_BONUS_SCREEN: ud.display_bonus_screen = iSet; break;
|
||||||
case USERDEFS_SHOW_LEVEL_TEXT: ud.show_level_text = iSet; break;
|
case USERDEFS_SHOW_LEVEL_TEXT: ud.show_level_text = iSet; break;
|
||||||
|
|
|
@ -603,7 +603,7 @@ static char const s_Scale[] = "Scale:";
|
||||||
|
|
||||||
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &cl_crosshair.Value);
|
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &cl_crosshair.Value);
|
||||||
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option );
|
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option );
|
||||||
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &ud.crosshairscale, &MF_Redfont, 25, 100, 0, 16, 2 );
|
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( cl.crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 );
|
||||||
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 );
|
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 );
|
||||||
|
|
||||||
static int32_t vpsize;
|
static int32_t vpsize;
|
||||||
|
|
|
@ -1119,7 +1119,7 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
vec2_t crosshairpos = { ud.returnvar[0], ud.returnvar[1] };
|
vec2_t crosshairpos = { ud.returnvar[0], ud.returnvar[1] };
|
||||||
uint8_t crosshair_pal = CROSSHAIR_PAL;
|
uint8_t crosshair_pal = CROSSHAIR_PAL;
|
||||||
uint32_t crosshair_o = 1|2;
|
uint32_t crosshair_o = 1|2;
|
||||||
uint32_t crosshair_scale = divscale16(ud.crosshairscale, 100);
|
uint32_t crosshair_scale = divscale16(cl.crosshairscale, 100);
|
||||||
|
|
||||||
auto const oyxaspect = yxaspect;
|
auto const oyxaspect = yxaspect;
|
||||||
if (FURY)
|
if (FURY)
|
||||||
|
|
|
@ -231,7 +231,6 @@ void CONFIG_SetDefaults(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ud.color = 0;
|
ud.color = 0;
|
||||||
ud.crosshairscale = 50;
|
|
||||||
ud.detail = 0;
|
ud.detail = 0;
|
||||||
ud.drawweapon = 1;
|
ud.drawweapon = 1;
|
||||||
ud.levelstats = 0;
|
ud.levelstats = 0;
|
||||||
|
|
|
@ -154,7 +154,7 @@ typedef struct {
|
||||||
vec3_t camerapos;
|
vec3_t camerapos;
|
||||||
int32_t const_visibility,uw_framerate;
|
int32_t const_visibility,uw_framerate;
|
||||||
int32_t camera_time,folfvel,folavel,folx,foly,fola;
|
int32_t camera_time,folfvel,folavel,folx,foly,fola;
|
||||||
int32_t reccnt,crosshairscale;
|
int32_t reccnt;
|
||||||
|
|
||||||
int32_t runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
|
int32_t runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
|
||||||
int32_t color,msgdisptime,statusbarmode;
|
int32_t color,msgdisptime,statusbarmode;
|
||||||
|
|
|
@ -581,7 +581,7 @@ static char const s_Scale[] = "Scale:";
|
||||||
|
|
||||||
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &cl_crosshair.Value);
|
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &cl_crosshair.Value);
|
||||||
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option );
|
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option );
|
||||||
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &ud.crosshairscale, &MF_Redfont, 25, 100, 0, 16, 2 );
|
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( cl.crosshairscale.Value, &MF_Redfont, 25, 100, 0, 16, 2 );
|
||||||
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 );
|
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 );
|
||||||
|
|
||||||
static int32_t vpsize;
|
static int32_t vpsize;
|
||||||
|
|
|
@ -1143,7 +1143,7 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
vec2_t crosshairpos = { (160<<16) - (g_player[myconnectindex].ps->look_ang<<15), 100<<16 };
|
vec2_t crosshairpos = { (160<<16) - (g_player[myconnectindex].ps->look_ang<<15), 100<<16 };
|
||||||
uint8_t crosshair_pal = CROSSHAIR_PAL;
|
uint8_t crosshair_pal = CROSSHAIR_PAL;
|
||||||
uint32_t crosshair_o = 1|2;
|
uint32_t crosshair_o = 1|2;
|
||||||
uint32_t crosshair_scale = divscale16(ud.crosshairscale, 100);
|
uint32_t crosshair_scale = divscale16(cl.crosshairscale, 100);
|
||||||
if (RR)
|
if (RR)
|
||||||
crosshair_scale >>= 1;
|
crosshair_scale >>= 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue