- a few more CVARs

This commit is contained in:
Christoph Oelckers 2019-10-23 01:30:43 +02:00
parent 5dec4736ce
commit 63f020996e
31 changed files with 80 additions and 215 deletions

View file

@ -78,7 +78,6 @@ char CommbatMacro[MAXRIDECULE][MAXRIDECULELENGTH];
char szPlayerName[MAXPLAYERNAME];
int32_t gTurnSpeed;
int32_t gDetail;
int32_t gMouseAim;
int32_t cl_weaponswitch;
int32_t gAutoRun;
int32_t gFollowMap;
@ -303,7 +302,6 @@ void CONFIG_SetDefaults(void)
//ud.screen_tilting = 1;
//ud.screenfade = 1;
//ud.shadow_pal = 4;
//ud.shadows = 1;
//ud.show_level_text = 1;
//ud.slidebar_paldisabled = 1;
//ud.statusbarflags = STATUSBAR_NOSHRINK;

View file

@ -188,18 +188,18 @@ void ctrlGetInput(void)
CONTROL_ProcessBinds();
if (gMouseAiming)
gMouseAim = 0;
if (in_aimmode)
g_MyAimMode = 0;
if (BUTTON(gamefunc_Mouse_Aiming))
{
if (gMouseAiming)
gMouseAim = 1;
if (in_aimmode)
g_MyAimMode = 1;
else
{
CONTROL_ClearButton(gamefunc_Mouse_Aiming);
gMouseAim = !gMouseAim;
if (gMouseAim)
g_MyAimMode = !g_MyAimMode;
if (g_MyAimMode)
{
if (!bSilentAim)
viewSetMessage("Mouse aiming ON");
@ -212,7 +212,7 @@ void ctrlGetInput(void)
}
}
}
else if (gMouseAiming)
else if (in_aimmode)
gInput.keyFlags.lookCenter = 1;
CONTROL_GetInput(&info);
@ -488,7 +488,7 @@ void ctrlGetInput(void)
else
gInput.mlook = ClipRange(info.dz>>7, -127, 127);
#endif
if (gMouseAim)
if (g_MyAimMode)
gInput.q16mlook = fix16_clamp(fix16_div(fix16_from_int(info.mousey), F16(128)), F16(-127)>>2, F16(127)>>2);
else
forward = ClipRange(forward - info.mousey, -2048, 2048);

View file

@ -105,7 +105,6 @@ struct GINPUT
extern GINPUT gInput;
extern bool bSilentAim;
extern int32_t gMouseAim; // Should be an int32 due to being passed to OSD
int32_t ctrlCheckAllInput(void);
void ctrlClearAllInput(void);

View file

@ -488,7 +488,7 @@ CGameMenuItemTitle itemOptionsDisplayColorTitle("COLOR CORRECTION", 1, 160, 20,
CGameMenuItemSliderFloat itemOptionsDisplayColorGamma("GAMMA:", 3, 66, 140, 180, &g_videoGamma, 0.3f, 4.f, 0.1f, UpdateVideoColorMenu, -1, -1, kMenuSliderValue);
CGameMenuItemSliderFloat itemOptionsDisplayColorContrast("CONTRAST:", 3, 66, 150, 180, &g_videoContrast, 0.1f, 2.7f, 0.05f, UpdateVideoColorMenu, -1, -1, kMenuSliderValue);
CGameMenuItemSliderFloat itemOptionsDisplayColorBrightness("BRIGHTNESS:", 3, 66, 160, 180, &g_videoBrightness, -0.8f, 0.8f, 0.05f, UpdateVideoColorMenu, -1, -1, kMenuSliderValue);
CGameMenuItemSliderFloat itemOptionsDisplayColorVisibility("VISIBILITY:", 3, 66, 170, 180, &r_ambientlight, 0.125f, 4.f, 0.125f, UpdateVideoColorMenu, -1, -1, kMenuSliderValue);
CGameMenuItemSliderFloat itemOptionsDisplayColorVisibility("VISIBILITY:", 3, 66, 170, 180, &r_ambientlight.Value, 0.125f, 4.f, 0.125f, UpdateVideoColorMenu, -1, -1, kMenuSliderValue);
CGameMenuItemChain itemOptionsDisplayColorReset("RESET TO DEFAULTS", 3, 66, 180, 180, 0, NULL, 0, ResetVideoColor, 0);
const char *pzTextureModeStrings[] = {
@ -1665,7 +1665,6 @@ void UpdateVideoColorMenu(CGameMenuItemSliderFloat *pItem)
g_videoContrast = itemOptionsDisplayColorContrast.fValue;
g_videoBrightness = itemOptionsDisplayColorBrightness.fValue;
r_ambientlight = itemOptionsDisplayColorVisibility.fValue;
r_ambientlightrecip = 1.f/r_ambientlight;
gBrightness = GAMMA_CALC<<2;
videoSetPalette(gBrightness>>2, gLastPal, 0);
}
@ -1685,7 +1684,7 @@ void ResetVideoColor(CGameMenuItemChain *pItem)
g_videoContrast = DEFAULT_CONTRAST;
g_videoBrightness = DEFAULT_BRIGHTNESS;
gBrightness = 0;
r_ambientlight = r_ambientlightrecip = 1.f;
r_ambientlight = 1.f;
videoSetPalette(gBrightness>>2, gLastPal, 0);
}
@ -1909,7 +1908,7 @@ void SetMouseAimMode(CGameMenuItemZBool *pItem)
void SetMouseVerticalAim(CGameMenuItemZBool *pItem)
{
gMouseAim = pItem->at20;
in_mousemode = pItem->at20;
}
void SetMouseXScale(CGameMenuItemSlider *pItem)
@ -1973,7 +1972,7 @@ void SetupMouseMenu(CGameMenuItemChain *pItem)
itemOptionsControlMouseAimFlipped.at20 = in_mouseflip;
itemOptionsControlMouseFilterInput.at20 = in_mousesmoothing;
itemOptionsControlMouseAimMode.at20 = in_aimmode;
itemOptionsControlMouseVerticalAim.at20 = gMouseAim;
itemOptionsControlMouseVerticalAim.at20 = g_MyAimMode;
}
void PreDrawControlMouse(CGameMenuItem *pItem)

View file

@ -885,7 +885,7 @@ static char const *MEOSN_MOUSESETUP_AIM_TYPE [] = { "Toggle", "Hold" };
static MenuOptionSet_t MEOS_MOUSESETUP_AIM_TYPE = MAKE_MENUOPTIONSET(MEOSN_MOUSESETUP_AIM_TYPE, NULL, 0x2);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_MOUSESETUP_AIM_TYPE, &in_aimmode.Value);
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUENTRY("Aiming type:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMINGTYPE, Option);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &g_myAimMode );
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &n_mousemode.Value );
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( "Vertical aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMING, Option );
#endif
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &in_mouseflip.Value );
@ -1093,7 +1093,7 @@ static MenuEntry_t ME_COLCORR_RESET = MAKE_MENUENTRY( "Reset To Defaults", &MF_R
#define MINVIS 0.125f
#endif
#ifndef EDUKE32_SIMPLE_MENU
static MenuRangeFloat_t MEO_COLCORR_AMBIENT = MAKE_MENURANGE( &r_ambientlight, &MF_Bluefont, MINVIS, 4.f, 0.f, 32, 1 );
static MenuRangeFloat_t MEO_COLCORR_AMBIENT = MAKE_MENURANGE( &r_ambientlight.Value, &MF_Bluefont, MINVIS, 4.f, 0.f, 32, 1 );
static MenuEntry_t ME_COLCORR_AMBIENT = MAKE_MENUENTRY( "Visibility:", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_AMBIENT, RangeFloat );
#endif
static MenuEntry_t *MEL_COLCORR[] = {
@ -3700,7 +3700,7 @@ static void Menu_Verify(int32_t input)
g_videoContrast = DEFAULT_CONTRAST;
g_videoBrightness = DEFAULT_BRIGHTNESS;
ud.brightness = 0;
r_ambientlight = r_ambientlightrecip = 1.f;
r_ambientlight = 1.f;
videoSetPalette(ud.brightness>>2,g_player[myconnectindex].ps->palette,0);
}
break;

View file

@ -784,12 +784,6 @@ static int osdcmd_cvar_set_game(osdcmdptr_t parm)
if (r_maxfps != 0) r_maxfps = clamp(r_maxfps, 30, 1000);
g_frameDelay = calcFrameDelay(r_maxfps + r_maxfpsoffset);
}
else if (!Bstrcasecmp(parm->name, "r_ambientlight"))
{
if (r_ambientlight == 0)
r_ambientlightrecip = 256.f;
else r_ambientlightrecip = 1.f/r_ambientlight;
}
else if (!Bstrcasecmp(parm->name, "vid_gamma"))
{
gBrightness = GAMMA_CALC;
@ -801,12 +795,6 @@ static int osdcmd_cvar_set_game(osdcmdptr_t parm)
videoSetPalette(gBrightness>>2,gLastPal,0);
}
#if 0
else if (!Bstrcasecmp(parm->name, "hud_scale")
|| !Bstrcasecmp(parm->name, "hud_statusbarmode")
|| !Bstrcasecmp(parm->name, "r_rotatespritenowidescreen"))
{
G_UpdateScreenArea();
}
else if (!Bstrcasecmp(parm->name, "skill"))
{
if (numplayers > 1)

View file

@ -29,8 +29,6 @@ void onvideomodechange(int32_t newmode);
void GAME_onshowosd(int32_t shown);
void GAME_clearbackground(int32_t numcols, int32_t numrows);
// extern float r_ambientlight,r_ambientlightrecip;
extern const char *const ConsoleButtons[];
END_BLD_NS

View file

@ -3033,7 +3033,6 @@ int viewFPSLimit(void)
return 0;
}
float r_ambientlight = 1.0, r_ambientlightrecip = 1.0;
int gLastPal = 0;

View file

@ -101,7 +101,6 @@ extern bool g_isAlterDefaultCrosshair;
extern int32_t r_maxfps;
extern int32_t r_maxfpsoffset;
extern double g_frameDelay;
extern float r_ambientlight, r_ambientlightrecip;
extern int gLastPal;

View file

@ -734,7 +734,6 @@ enum {
EXTERN char showinvisibility;
EXTERN int32_t g_visibility, parallaxvisibility;
EXTERN int32_t g_rotatespriteNoWidescreen;
// blendtable[1] to blendtable[numalphatabs] are considered to be
// alpha-blending tables:

View file

@ -6871,7 +6871,7 @@ static void dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t
int32_t ouryxaspect, ourxyaspect;
if (g_rotatespriteNoWidescreen)
if (r_rotatespritenowidescreen)
{
dastat |= RS_STRETCH;
dastat &= ~RS_ALIGN_MASK;

View file

@ -230,6 +230,12 @@ CUSTOM_CVARD(Bool, in_mouse, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCAL
CONTROL_MouseEnabled = (self && CONTROL_MousePresent);
}
int32_t g_MyAimMode = 1;
CUSTOM_CVARD(Bool, in_mousemode, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "toggles vertical mouse view")
{
g_MyAimMode = self; // Needs to be copied to a shadow variable because the input code messes around with this setting - but that should not affect the user's original choice.
}
CVARD(Bool, in_aimmode, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "0:toggle, 1:hold to aim")
CVARD(Bool, in_mouseflip, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "invert vertical mouse movement")
@ -265,19 +271,33 @@ CUSTOM_CVARD(Int, r_showfpsperiod, 0, 0, "time in seconds before averaging min a
if (self < 0 || self > 5) self = 1;
}
float r_ambientlightrecip;
CUSTOM_CVARD(Float, r_ambientlight, 1.0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "sets the global map light level")
{
if (self < 0.1f) self = 0.1f;
else if (self > 10.f) self = 10.f;
else r_ambientlightrecip = 1.f / self;
}
CVARD(Bool, r_shadows, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable sprite and model shadows")//, (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
// Gross hack stuff. Only settable from the command line
CVARD(Bool, r_rotatespritenowidescreen, false, CVAR_NOSET, "pass bit 1024 to all CON rotatesprite calls")
#if 0
// DN3D
static osdcvardata_t cvars_game[] =
{
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&useprecache, CVAR_BOOL, 0, 1 },
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
{ "r_maxfps", "limit the frame rate",(void *)&r_maxfps, CVAR_INT|CVAR_FUNCPTR, 0, 1000 },
{ "r_maxfpsoffset", "menu-controlled offset for r_maxfps",(void *)&r_maxfpsoffset, CVAR_INT|CVAR_FUNCPTR, -10, 10 },
{ "r_maxfps", "limit the frame rate",(void *)&r_maxfps, CVAR_INT|CVAR_FUNCPTR, 0, 1000 },
{ "r_maxfpsoffset", "menu-controlled offset for r_maxfps",(void *)&r_maxfpsoffset, CVAR_INT|CVAR_FUNCPTR, -10, 10 },
{ "r_maxfpsoffset", "menu-controlled offset for r_maxfps",(void *)&r_maxfpsoffset, CVAR_INT|CVAR_FUNCPTR, -10, 10 },
{ "sensitivity","changes the mouse sensitivity", (void *)&CONTROL_MouseSensitivity, CVAR_FLOAT|CVAR_FUNCPTR, 0, 25 },
@ -288,99 +308,6 @@ CUSTOM_CVARD(Int, r_showfpsperiod, 0, 0, "time in seconds before averaging min a
{ "wchoice","sets weapon autoselection order", (void *)ud.wchoice, CVAR_STRING|CVAR_FUNCPTR, 0, MAX_WEAPONS },
};
osdcmd_cheatsinfo_stat.cheatnum = -1;
for (auto & cv : cvars_game)
{
switch (cv.flags & (CVAR_FUNCPTR|CVAR_MULTI))
{
case CVAR_FUNCPTR:
OSD_RegisterCvar(&cv, osdcmd_cvar_set_game); break;
case CVAR_MULTI:
case CVAR_FUNCPTR|CVAR_MULTI:
OSD_RegisterCvar(&cv, osdcmd_cvar_set_multi); break;
default:
OSD_RegisterCvar(&cv, osdcmd_cvar_set); break;
}
}
// RR
static osdcvardata_t cvars_game[] =
{
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
{ "r_maxfps", "limit the frame rate",(void *)&r_maxfps, CVAR_INT|CVAR_FUNCPTR, 0, 1000 },
{ "r_maxfpsoffset", "menu-controlled offset for r_maxfps",(void *)&r_maxfpsoffset, CVAR_INT|CVAR_FUNCPTR, -10, 10 },
{ "sensitivity","changes the mouse sensitivity", (void *)&CONTROL_MouseSensitivity, CVAR_FLOAT|CVAR_FUNCPTR, 0, 25 },
{ "skill","changes the game skill setting", (void *)&ud.m_player_skill, CVAR_INT|CVAR_FUNCPTR|CVAR_NOSAVE/*|CVAR_NOMULTI*/, 0, 5 },
{ "team","change team in multiplayer", (void *)&ud.team, CVAR_INT|CVAR_MULTI, 0, 3 },
{ "wchoice","sets weapon autoselection order", (void *)ud.wchoice, CVAR_STRING|CVAR_FUNCPTR, 0, MAX_WEAPONS },
};
osdcmd_cheatsinfo_stat.cheatnum = -1;
for (auto & cv : cvars_game)
{
switch (cv.flags & (CVAR_FUNCPTR|CVAR_MULTI))
{
case CVAR_FUNCPTR:
OSD_RegisterCvar(&cv, osdcmd_cvar_set_game); break;
case CVAR_MULTI:
case CVAR_FUNCPTR|CVAR_MULTI:
OSD_RegisterCvar(&cv, osdcmd_cvar_set_multi); break;
default:
OSD_RegisterCvar(&cv, osdcmd_cvar_set); break;
}
}
// Blood
int32_t registerosdcommands(void)
{
char buffer[256];
static osdcvardata_t cvars_game[] =
{
// { "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
// { "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
},
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&useprecache, CVAR_BOOL, 0, 1 },
//
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
{ "r_maxfps", "limit the frame rate",(void *)&r_maxfps, CVAR_INT|CVAR_FUNCPTR, 0, 1000 },
{ "r_maxfpsoffset", "menu-controlled offset for r_maxfps",(void *)&r_maxfpsoffset, CVAR_INT|CVAR_FUNCPTR, -10, 10 },
{ "sensitivity","changes the mouse sensitivity", (void *)&CONTROL_MouseSensitivity, CVAR_FLOAT|CVAR_FUNCPTR, 0, 25 },
//
// { "skill","changes the game skill setting", (void *)&ud.m_player_skill, CVAR_INT|CVAR_FUNCPTR|CVAR_NOSAVE/*|CVAR_NOMULTI*/, 0, 5 },
//
// { "wchoice","sets weapon autoselection order", (void *)ud.wchoice, CVAR_STRING|CVAR_FUNCPTR, 0, MAX_WEAPONS },
};
//
// osdcmd_cheatsinfo_stat.cheatnum = -1;
//
for (auto & cv : cvars_game)
{
switch (cv.flags & (CVAR_FUNCPTR|CVAR_MULTI))
{
case CVAR_FUNCPTR:
OSD_RegisterCvar(&cv, osdcmd_cvar_set_game); break;
case CVAR_MULTI:
case CVAR_FUNCPTR|CVAR_MULTI:
OSD_RegisterCvar(&cv, osdcmd_cvar_set_multi); break;
default:
OSD_RegisterCvar(&cv, osdcmd_cvar_set); break;
}
}
// These I don't care about.
//{ "r_upscalefactor", "increase performance by rendering at upscalefactor less than the screen resolution and upscale to the full resolution in the software renderer", (void *)&ud.detail, CVAR_INT|CVAR_FUNCPTR, 1, 16 },
//{ "r_upscalefactor", "increase performance by rendering at upscalefactor less than the screen resolution and upscale to the full resolution in the software renderer", (void *)&gUpscaleFactor, CVAR_INT|CVAR_FUNCPTR, 1, 16
@ -408,8 +335,6 @@ int32_t registerosdcommands(void)
{ "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
// This one gets changed at run time by the game code, so making it persistent does not work
{ "in_mousemode", "toggles vertical mouse view", (void *)&in_mousemode.Value, CVAR_BOOL, 0, 1 },
{ "in_mousemode", "toggles vertical mouse view", (void *)&gMouseAim, CVAR_BOOL, 0, 1 },
// This option is not really useful anymore
{ "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },

View file

@ -60,6 +60,9 @@ EXTERN_CVAR(Bool, r_horizcenter)
EXTERN_CVAR(Int, r_drawweapon)
EXTERN_CVAR(Int, r_showfps)
EXTERN_CVAR(Int, r_showfpsperiod)
EXTERN_CVAR(Int, r_ambientlight)
EXTERN_CVAR(Int, r_shadows)
EXTERN_CVAR(Bool, in_joystick)
EXTERN_CVAR(Bool, in_mouse)
@ -69,7 +72,10 @@ EXTERN_CVAR(Int, in_mousedeadzone)
EXTERN_CVAR(Bool, in_mouseflip)
EXTERN_CVAR(Bool, in_mousemode)
EXTERN_CVAR(Bool, in_mousesmoothing)
extern int32_t g_MyAimMode;
EXTERN_CVAR(Bool, in_mousemode)
extern float r_ambientlightrecip;
extern int hud_statusbarrange; // will be set by the game's configuration setup.
bool G_ChangeHudLayout(int direction);
bool G_CheckAutorun(bool button);

View file

@ -507,12 +507,6 @@ void G_CheckCommandLine(int32_t argc, char const * const * argv)
i++;
continue;
}
if (!Bstrcasecmp(c+1, "rotatesprite-no-widescreen"))
{
g_rotatespriteNoWidescreen = 1;
i++;
continue;
}
if (!Bstrcasecmp(c+1, "usecwd"))
{
i++;

View file

@ -227,7 +227,6 @@ void CONFIG_SetDefaults(void)
ud.camera_time = 0;//4;
g_myAimMode = 1;
g_player[0].ps->aim_mode = 1;
ud.setup.forcesetup = 1;
@ -265,7 +264,6 @@ void CONFIG_SetDefaults(void)
ud.screen_tilting = 1;
ud.screenfade = 1;
ud.shadow_pal = 4;
ud.shadows = 1;
ud.show_level_text = 1;
ud.slidebar_paldisabled = 1;
ud.statusbarflags = 0;//STATUSBAR_NOSHRINK;

View file

@ -4241,7 +4241,7 @@ skip:
if (actor[i].flags & SFLAG_NOFLOORSHADOW)
continue;
if (ud.shadows && spritesortcnt < (maxspritesonscreen-2)
if (r_shadows && spritesortcnt < (maxspritesonscreen-2)
#ifdef POLYMER
&& !(videoGetRenderMode() == REND_POLYMER && pr_lighting != 0)
#endif

View file

@ -184,7 +184,7 @@ typedef struct {
int32_t menu_slidebarz, menu_slidebarmargin, menu_slidecursorz;
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;
int32_t entered_name,screen_tilting,shadows,fta_on,executions;
int32_t entered_name,screen_tilting,fta_on,executions;
int32_t m_coop,coop,screen_size,lockout;
int32_t playerai,angleinterpolation;
@ -287,8 +287,6 @@ extern const char *G_DefaultRtsFile(void);
extern char ror_protectedsectors[MAXSECTORS];
#endif
extern float r_ambientlight;
extern int32_t g_Debug;
extern int32_t g_Shareware;
#if !defined LUNATIC

View file

@ -1408,12 +1408,12 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
case USERDEFS_RECCNT: labelNum = ud.reccnt; break;
case USERDEFS_ENTERED_NAME: labelNum = ud.entered_name; break;
case USERDEFS_SCREEN_TILTING: labelNum = ud.screen_tilting; break;
case USERDEFS_SHADOWS: labelNum = ud.shadows; break;
case USERDEFS_SHADOWS: labelNum = r_shadows; break;
case USERDEFS_FTA_ON: labelNum = ud.fta_on; break;
case USERDEFS_EXECUTIONS: labelNum = ud.executions; break;
case USERDEFS_AUTO_RUN: labelNum = cl_autorun; break;
case USERDEFS_COORDS: labelNum = cl_showcoords; break;
case USERDEFS_TICKRATE: labelNum = r_showfps; break;
case USERDEFS_TICKRATE: labelNum = r_showfps; break;
case USERDEFS_M_COOP: labelNum = ud.m_coop; break;
case USERDEFS_COOP: labelNum = ud.coop; break;
case USERDEFS_SCREEN_SIZE: labelNum = ud.screen_size; break;
@ -1604,7 +1604,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
case USERDEFS_RECCNT: ud.reccnt = iSet; break;
case USERDEFS_ENTERED_NAME: ud.entered_name = iSet; break;
case USERDEFS_SCREEN_TILTING: ud.screen_tilting = iSet; break;
case USERDEFS_SHADOWS: ud.shadows = iSet; break;
case USERDEFS_SHADOWS: r_shadows = iSet; break;//!!!
case USERDEFS_FTA_ON: ud.fta_on = iSet; break;
case USERDEFS_EXECUTIONS: ud.executions = iSet; break;
case USERDEFS_AUTO_RUN: cl_autorun = iSet; break; //!!!
@ -1649,7 +1649,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
case USERDEFS_MOUSEFLIP: in_mouseflip = !iSet; break;//!!!
case USERDEFS_STATUSBARSCALE: ud.statusbarscale = iSet; break;
case USERDEFS_DRAWWEAPON: r_drawweapon = iSet; break;//!!!
case USERDEFS_MOUSEAIMING: in_aoimmode = iSet; break;//!!!
case USERDEFS_MOUSEAIMING: in_aimmode = iSet; break;//!!!
case USERDEFS_WEAPONSWITCH: cl_weaponswitch = iSet; break; //!!!
case USERDEFS_DEMOCAMS: cl_democams = iSet; break;
case USERDEFS_COLOR: ud.color = iSet; break;

View file

@ -884,7 +884,7 @@ static char const *MEOSN_MOUSESETUP_AIM_TYPE [] = { "Toggle", "Hold" };
static MenuOptionSet_t MEOS_MOUSESETUP_AIM_TYPE = MAKE_MENUOPTIONSET(MEOSN_MOUSESETUP_AIM_TYPE, NULL, 0x2);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_MOUSESETUP_AIM_TYPE, &in_aimmode.Value);
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUENTRY("Aiming type:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMINGTYPE, Option);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &g_myAimMode );
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &in_mousemode.Value );
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( "Vertical aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMING, Option );
#endif
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &in_mouseflip.Value );
@ -1092,7 +1092,7 @@ static MenuEntry_t ME_COLCORR_RESET = MAKE_MENUENTRY( "Reset To Defaults", &MF_R
#define MINVIS 0.125f
#endif
#ifndef EDUKE32_SIMPLE_MENU
static MenuRangeFloat_t MEO_COLCORR_AMBIENT = MAKE_MENURANGE( &r_ambientlight, &MF_Bluefont, MINVIS, 4.f, 0.f, 32, 1 );
static MenuRangeFloat_t MEO_COLCORR_AMBIENT = MAKE_MENURANGE( &r_ambientlight.Value, &MF_Bluefont, MINVIS, 4.f, 0.f, 32, 1 );
static MenuEntry_t ME_COLCORR_AMBIENT = MAKE_MENUENTRY( "Visibility:", &MF_Redfont, &MEF_ColorCorrect, &MEO_COLCORR_AMBIENT, RangeFloat );
#endif
static MenuEntry_t *MEL_COLCORR[] = {
@ -3716,7 +3716,7 @@ static void Menu_Verify(int32_t input)
g_videoContrast = DEFAULT_CONTRAST;
g_videoBrightness = DEFAULT_BRIGHTNESS;
ud.brightness = 0;
r_ambientlight = r_ambientlightrecip = 1.f;
r_ambientlight = 1.f;
videoSetPalette(ud.brightness>>2,g_player[myconnectindex].ps->palette,0);
}
break;

View file

@ -39,7 +39,6 @@ BEGIN_DUKE_NS
struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat;
float r_ambientlight = 1.0, r_ambientlightrecip = 1.0;
static inline int osdcmd_quit(osdcmdptr_t UNUSED(parm))
{
@ -1451,12 +1450,6 @@ static int osdcmd_cvar_set_game(osdcmdptr_t parm)
if (r_maxfps != 0) r_maxfps = clamp(r_maxfps, 30, 1000);
g_frameDelay = calcFrameDelay(r_maxfps + r_maxfpsoffset);
}
else if (!Bstrcasecmp(parm->name, "r_ambientlight"))
{
if (r_ambientlight == 0)
r_ambientlightrecip = 256.f;
else r_ambientlightrecip = 1.f/r_ambientlight;
}
else if (!Bstrcasecmp(parm->name, "vid_gamma"))
{
ud.brightness = GAMMA_CALC;
@ -1467,10 +1460,6 @@ static int osdcmd_cvar_set_game(osdcmdptr_t parm)
{
videoSetPalette(ud.brightness>>2,g_player[myconnectindex].ps->palette,0);
}
else if (!Bstrcasecmp(parm->name, "r_rotatespritenowidescreen"))
{
G_UpdateScreenArea();
}
else if (!Bstrcasecmp(parm->name, "skill"))
{
if (numplayers > 1)

View file

@ -36,7 +36,6 @@ extern struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat;
int32_t registerosdcommands(void);
void onvideomodechange(int32_t newmode);
extern float r_ambientlight,r_ambientlightrecip;
extern const char *const ConsoleButtons[];

View file

@ -2884,7 +2884,7 @@ enddisplayweapon:
#define MAXANGVEL 1024
#define MAXHORIZ 256
int32_t g_myAimMode = 0, g_myAimStat = 0, g_oldAimStat = 0;
int32_t g_myAimStat = 0, g_oldAimStat = 0;
int32_t mouseyaxismode = -1;
void P_GetInput(int const playerNum)
@ -2908,7 +2908,7 @@ void P_GetInput(int const playerNum)
CONTROL_ProcessBinds();
if (in_aimmode)
g_myAimMode = BUTTON(gamefunc_Mouse_Aiming);
g_MyAimMode = BUTTON(gamefunc_Mouse_Aiming);
else
{
g_oldAimStat = g_myAimStat;
@ -2916,8 +2916,8 @@ void P_GetInput(int const playerNum)
if (g_myAimStat > g_oldAimStat)
{
g_myAimMode ^= 1;
P_DoQuote(QUOTE_MOUSE_AIMING_OFF + g_myAimMode, pPlayer);
g_MyAimMode ^= 1;
P_DoQuote(QUOTE_MOUSE_AIMING_OFF + g_MyAimMode, pPlayer);
}
}
@ -2968,7 +2968,7 @@ void P_GetInput(int const playerNum)
input.q16avel += fix16_from_int(info.dyaw) / analogExtent * (analogTurnAmount << 1);
}
if (g_myAimMode)
if (g_MyAimMode)
input.q16horz = fix16_div(fix16_from_int(info.mousey), F16(64));
else
input.fvel = -(info.mousey >> 6);
@ -3091,7 +3091,7 @@ void P_GetInput(int const playerNum)
localInput.bits |= BUTTON(gamefunc_Quick_Kick) << SK_QUICK_KICK;
localInput.bits |= BUTTON(gamefunc_TurnAround) << SK_TURNAROUND;
localInput.bits |= (g_myAimMode << SK_AIMMODE);
localInput.bits |= (g_MyAimMode << SK_AIMMODE);
localInput.bits |= (g_gameQuit << SK_GAMEQUIT);
localInput.bits |= KB_KeyPressed(sc_Pause) << SK_PAUSE;
localInput.bits |= ((uint32_t)KB_KeyPressed(sc_Escape)) << SK_ESCAPE;

View file

@ -319,7 +319,7 @@ extern playerdata_t *const g_player;
extern int16_t WeaponPickupSprites[MAX_WEAPONS];
extern hudweapon_t hudweap;
extern int32_t g_levelTextTime;
extern int32_t g_myAimMode;
extern int32_t g_MyAimMode;
extern int32_t g_numObituaries;
extern int32_t g_numSelfObituaries;
extern int32_t mouseyaxismode;

View file

@ -484,12 +484,6 @@ void G_CheckCommandLine(int32_t argc, char const * const * argv)
i++;
continue;
}
if (!Bstrcasecmp(c+1, "rotatesprite-no-widescreen"))
{
g_rotatespriteNoWidescreen = 1;
i++;
continue;
}
if (!Bstrcasecmp(c+1, "usecwd"))
{
i++;

View file

@ -235,8 +235,7 @@ void CONFIG_SetDefaults(void)
ud.pwlockout[0] = '\0';
ud.runkey_mode = 0;
ud.screen_size = 4;
ud.screen_tilting = 1;
ud.shadows = 1;
ud.screen_tilting = 1;
ud.statusbarflags = STATUSBAR_NOSHRINK;
ud.statusbarmode = 1;
ud.statusbarscale = 100;

View file

@ -5648,7 +5648,7 @@ skip:
if (actor[i].flags & SFLAG_NOFLOORSHADOW)
continue;
if (ud.shadows && spritesortcnt < (maxspritesonscreen-2)
if (r_shadows && spritesortcnt < (maxspritesonscreen-2)
#ifdef POLYMER
&& !(videoGetRenderMode() == REND_POLYMER && pr_lighting != 0)
#endif

View file

@ -163,7 +163,7 @@ typedef struct {
int32_t menu_slidebarz, menu_slidebarmargin, menu_slidecursorz;
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;
int32_t entered_name,screen_tilting,shadows,fta_on,executions;
int32_t entered_name,screen_tilting,fta_on,executions;
int32_t m_coop,coop,screen_size,lockout,crosshair;
int32_t playerai,angleinterpolation;
@ -259,7 +259,6 @@ extern const char *G_DefaultRtsFile(void);
extern char ror_protectedsectors[MAXSECTORS];
#endif
extern float r_ambientlight;
extern int32_t g_Debug;
extern int32_t g_Shareware;

View file

@ -838,7 +838,7 @@ static char const *MEOSN_MOUSESETUP_AIM_TYPE [] = { "Toggle", "Hold" };
static MenuOptionSet_t MEOS_MOUSESETUP_AIM_TYPE = MAKE_MENUOPTIONSET(MEOSN_MOUSESETUP_AIM_TYPE, NULL, 0x2);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUOPTION(&MF_Redfont, &MEOS_MOUSESETUP_AIM_TYPE, &in_aimmode.Value);
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUENTRY("Aiming type:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMINGTYPE, Option);
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &g_myAimMode );
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &n_mousemode.Value );
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( "Vertical aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMING, Option );
#endif
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &in_mouseflip.Value );
@ -3645,7 +3645,7 @@ static void Menu_EntryLinkActivate(MenuEntry_t *entry)
g_videoContrast = DEFAULT_CONTRAST;
g_videoBrightness = DEFAULT_BRIGHTNESS;
ud.brightness = 0;
r_ambientlight = r_ambientlightrecip = 1.f;
r_ambientlight = 1.f;
videoSetPalette(ud.brightness>>2,g_player[myconnectindex].ps->palette,0);
}
else if (entry == &ME_KEYBOARDSETUP_RESET)

View file

@ -34,7 +34,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_RR_NS
struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat;
float r_ambientlight = 1.0, r_ambientlightrecip = 1.0;
static inline int osdcmd_quit(osdcmdptr_t UNUSED(parm))
{
@ -1238,12 +1237,6 @@ static int osdcmd_cvar_set_game(osdcmdptr_t parm)
if (r_maxfps != 0) r_maxfps = clamp(r_maxfps, 30, 1000);
g_frameDelay = calcFrameDelay(r_maxfps + r_maxfpsoffset);
}
else if (!Bstrcasecmp(parm->name, "r_ambientlight"))
{
if (r_ambientlight == 0)
r_ambientlightrecip = 256.f;
else r_ambientlightrecip = 1.f/r_ambientlight;
}
else if (!Bstrcasecmp(parm->name, "vid_gamma"))
{
ud.brightness = GAMMA_CALC;
@ -1254,12 +1247,6 @@ static int osdcmd_cvar_set_game(osdcmdptr_t parm)
{
videoSetPalette(ud.brightness>>2,g_player[myconnectindex].ps->palette,0);
}
else if (!Bstrcasecmp(parm->name, "hud_scale")
|| !Bstrcasecmp(parm->name, "hud_statusbarmode")
|| !Bstrcasecmp(parm->name, "r_rotatespritenowidescreen"))
{
G_UpdateScreenArea();
}
else if (!Bstrcasecmp(parm->name, "skill"))
{
if (numplayers > 1)

View file

@ -35,8 +35,6 @@ extern struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat;
int32_t registerosdcommands(void);
void onvideomodechange(int32_t newmode);
extern float r_ambientlight,r_ambientlightrecip;
// key bindings stuff
typedef struct {
const char *name;

View file

@ -2734,7 +2734,7 @@ enddisplayweapon:
#define MAXANGVEL 1024
#define MAXHORIZ 256
int32_t g_myAimMode = 0, g_myAimStat = 0, g_oldAimStat = 0;
int32_t g_myAimStat = 0, g_oldAimStat = 0;
int32_t mouseyaxismode = -1;
void P_GetInput(int playerNum)
@ -2758,7 +2758,7 @@ void P_GetInput(int playerNum)
CONTROL_ProcessBinds();
if (in_aimmode)
g_myAimMode = BUTTON(gamefunc_Mouse_Aiming);
g_MyAimMode = BUTTON(gamefunc_Mouse_Aiming);
else
{
g_oldAimStat = g_myAimStat;
@ -2766,8 +2766,8 @@ void P_GetInput(int playerNum)
if (g_myAimStat > g_oldAimStat)
{
g_myAimMode ^= 1;
P_DoQuote(QUOTE_MOUSE_AIMING_OFF + g_myAimMode, pPlayer);
g_MyAimMode ^= 1;
P_DoQuote(QUOTE_MOUSE_AIMING_OFF + g_MyAimMode, pPlayer);
}
}
@ -2819,7 +2819,7 @@ void P_GetInput(int playerNum)
input.q16avel += fix16_from_int(info.dyaw) / analogExtent * (analogTurnAmount << 1);
}
if (g_myAimMode)
if (g_MyAimMode)
input.q16horz = fix16_div(fix16_from_int(info.mousey), F16(64));
else
input.fvel = -(info.mousey >> 6);
@ -2984,7 +2984,7 @@ void P_GetInput(int playerNum)
localInput.bits |= BUTTON(gamefunc_Quick_Kick) << SK_QUICK_KICK;
localInput.bits |= BUTTON(gamefunc_TurnAround) << SK_TURNAROUND;
localInput.bits |= (g_myAimMode << SK_AIMMODE);
localInput.bits |= (g_MyAimMode << SK_AIMMODE);
localInput.bits |= (g_gameQuit << SK_GAMEQUIT);
localInput.bits |= KB_KeyPressed(sc_Pause) << SK_PAUSE;
localInput.bits |= ((uint32_t)KB_KeyPressed(sc_Escape)) << SK_ESCAPE;
@ -3064,7 +3064,7 @@ void P_GetInputMotorcycle(int playerNum)
CONTROL_ProcessBinds();
if (in_aimmode)
g_myAimMode = BUTTON(gamefunc_Mouse_Aiming);
g_MyAimMode = BUTTON(gamefunc_Mouse_Aiming);
else
{
g_oldAimStat = g_myAimStat;
@ -3072,8 +3072,8 @@ void P_GetInputMotorcycle(int playerNum)
if (g_myAimStat > g_oldAimStat)
{
g_myAimMode ^= 1;
P_DoQuote(QUOTE_MOUSE_AIMING_OFF + g_myAimMode, pPlayer);
g_MyAimMode ^= 1;
P_DoQuote(QUOTE_MOUSE_AIMING_OFF + g_MyAimMode, pPlayer);
}
}
@ -3362,7 +3362,7 @@ void P_GetInputBoat(int playerNum)
CONTROL_ProcessBinds();
if (in_aimmode)
g_myAimMode = BUTTON(gamefunc_Mouse_Aiming);
g_MyAimMode = BUTTON(gamefunc_Mouse_Aiming);
else
{
g_oldAimStat = g_myAimStat;
@ -3370,8 +3370,8 @@ void P_GetInputBoat(int playerNum)
if (g_myAimStat > g_oldAimStat)
{
g_myAimMode ^= 1;
P_DoQuote(QUOTE_MOUSE_AIMING_OFF + g_myAimMode, pPlayer);
g_MyAimMode ^= 1;
P_DoQuote(QUOTE_MOUSE_AIMING_OFF + g_MyAimMode, pPlayer);
}
}