mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
- in_mouseflip and in_mousesmoothing
in_mousemode removed from persistent state because of how it is used. Saving it makes no sense.
This commit is contained in:
parent
b73cf76f05
commit
e5d38b2d30
17 changed files with 50 additions and 59 deletions
|
@ -56,7 +56,6 @@ BEGIN_BLD_NS
|
|||
|
||||
hashtable_t h_gamefuncs = { NUMGAMEFUNCTIONS<<1, NULL };
|
||||
|
||||
int32_t SmoothInput;
|
||||
int32_t MouseFunctions[MAXMOUSEBUTTONS][2];
|
||||
int32_t MouseDigitalFunctions[MAXMOUSEAXES][2];
|
||||
int32_t MouseAnalogueAxes[MAXMOUSEAXES];
|
||||
|
@ -92,7 +91,6 @@ int32_t gMessageFont;
|
|||
int32_t gbAdultContent;
|
||||
char gzAdultPassword[9];
|
||||
int32_t gMouseSensitivity;
|
||||
int32_t gMouseAimingFlipped;
|
||||
bool gNoClip;
|
||||
bool gInfiniteAmmo;
|
||||
bool gFullMap;
|
||||
|
@ -281,7 +279,6 @@ void CONFIG_SetDefaults(void)
|
|||
CheckForUpdates = 1;
|
||||
gBrightness = 8;
|
||||
//ud.config.ShowWeapons = 0;
|
||||
SmoothInput = 1;
|
||||
|
||||
useprecache = 1;
|
||||
configversion = 0;
|
||||
|
@ -301,8 +298,6 @@ void CONFIG_SetDefaults(void)
|
|||
//ud.menu_slidebarmargin = 65536;
|
||||
//ud.menu_slidebarz = 65536;
|
||||
//ud.menu_slidecursorz = 65536;
|
||||
//ud.menubackground = 1;
|
||||
//ud.mouseflip = 1;
|
||||
//ud.msgdisptime = 120;
|
||||
//ud.pwlockout[0] = '\0';
|
||||
//ud.screen_size = 4;
|
||||
|
@ -335,8 +330,6 @@ void CONFIG_SetDefaults(void)
|
|||
gbAdultContent = 0;
|
||||
gzAdultPassword[0] = 0;
|
||||
|
||||
gMouseAimingFlipped = 0;
|
||||
gMouseAim = 1;
|
||||
cl_weaponswitch = 1;
|
||||
|
||||
Bstrcpy(szPlayerName, "Player");
|
||||
|
|
|
@ -38,7 +38,6 @@ BEGIN_BLD_NS
|
|||
#define MAXPLAYERNAME 16
|
||||
#define MAXMOUSEAXES 2
|
||||
|
||||
extern int32_t SmoothInput;
|
||||
extern int32_t MouseFunctions[MAXMOUSEBUTTONS][2];
|
||||
extern int32_t MouseDigitalFunctions[MAXMOUSEAXES][2];
|
||||
extern int32_t MouseAnalogueAxes[MAXMOUSEAXES];
|
||||
|
@ -71,7 +70,7 @@ extern int32_t gMessageFont;
|
|||
extern int32_t gbAdultContent;
|
||||
extern char gzAdultPassword[9];
|
||||
extern int32_t gMouseSensitivity;
|
||||
extern int32_t gMouseAimingFlipped;
|
||||
extern int32_t in_mouseflip;
|
||||
extern bool gNoClip;
|
||||
extern bool gInfiniteAmmo;
|
||||
extern bool gFullMap;
|
||||
|
|
|
@ -79,7 +79,7 @@ void ctrlInit(void)
|
|||
|
||||
CONTROL_JoystickEnabled = (in_joystick && CONTROL_JoyPresent);
|
||||
CONTROL_MouseEnabled = (in_mouse && CONTROL_MousePresent);
|
||||
CONTROL_SmoothMouse = SmoothInput;
|
||||
CONTROL_SmoothMouse = in_mousesmoothing;
|
||||
|
||||
// JBF 20040215: evil and nasty place to do this, but joysticks are evil and nasty too
|
||||
for (int i = 0; i < joystick.numAxes; i++)
|
||||
|
@ -492,7 +492,7 @@ void ctrlGetInput(void)
|
|||
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);
|
||||
if (!gMouseAimingFlipped)
|
||||
if (!in_mouseflip)
|
||||
gInput.q16mlook = -gInput.q16mlook;
|
||||
|
||||
if (KB_KeyPressed(sc_Pause)) // 0xc5 in disassembly
|
||||
|
|
|
@ -237,7 +237,7 @@ CGameMenuItemChain itemChainParentalLock("PARENTAL LOCK", 3, 0, 170, 320, 1, &me
|
|||
|
||||
CGameMenuItemTitle itemControlsTitle("CONTROLS", 1, 160, 20, 2038);
|
||||
CGameMenuItemSliderFloat sliderMouseSpeed("Mouse Sensitivity:", 1, 10, 70, 300, CONTROL_MouseSensitivity, 0.5f, 16.f, 0.5f, SetMouseSensitivity, -1,-1);
|
||||
CGameMenuItemZBool boolMouseFlipped("Invert Mouse Aim:", 1, 10, 90, 300, gMouseAimingFlipped, SetMouseAimFlipped, NULL, NULL);
|
||||
CGameMenuItemZBool boolMouseFlipped("Invert Mouse Aim:", 1, 10, 90, 300, in_mouseflip, SetMouseAimFlipped, NULL, NULL);
|
||||
CGameMenuItemSlider sliderTurnSpeed("Key Turn Speed:", 1, 10, 110, 300, gTurnSpeed, 64, 128, 4, SetTurnSpeed, -1, -1);
|
||||
CGameMenuItemChain itemChainKeyList("Configure Keys...", 1, 0, 130, 320, 1, &menuKeys, -1, NULL, 0);
|
||||
CGameMenuItemChain itemChainKeyReset("Reset Keys (default)...", 1, 0, 150, 320, 1, &menuKeys, -1, ResetKeys, 0);
|
||||
|
@ -733,7 +733,7 @@ void SetupControlsMenu(void)
|
|||
{
|
||||
sliderMouseSpeed.fValue = ClipRangeF(CONTROL_MouseSensitivity, sliderMouseSpeed.fRangeLow, sliderMouseSpeed.fRangeHigh);
|
||||
sliderTurnSpeed.nValue = ClipRange(gTurnSpeed, sliderTurnSpeed.nRangeLow, sliderTurnSpeed.nRangeHigh);
|
||||
boolMouseFlipped.at20 = gMouseAimingFlipped;
|
||||
boolMouseFlipped.at20 = in_mouseflip;
|
||||
menuControls.Add(&itemControlsTitle, false);
|
||||
menuControls.Add(&sliderMouseSpeed, true);
|
||||
menuControls.Add(&boolMouseFlipped, false);
|
||||
|
@ -1459,7 +1459,7 @@ void SetMouseSensitivity(CGameMenuItemSliderFloat *pItem)
|
|||
|
||||
void SetMouseAimFlipped(CGameMenuItemZBool *pItem)
|
||||
{
|
||||
gMouseAimingFlipped = pItem->at20;
|
||||
in_mouseflip = pItem->at20;
|
||||
}
|
||||
|
||||
void SetTurnSpeed(CGameMenuItemSlider *pItem)
|
||||
|
@ -1899,12 +1899,12 @@ void UpdatePlayerName(CGameMenuItemZEdit *pItem, CGameMenuEvent *pEvent)
|
|||
void SetMouseFilterInput(CGameMenuItemZBool *pItem)
|
||||
{
|
||||
CONTROL_SmoothMouse = pItem->at20;
|
||||
SmoothInput = pItem->at20;
|
||||
in_mousesmoothing = pItem->at20;
|
||||
}
|
||||
|
||||
void SetMouseAimMode(CGameMenuItemZBool *pItem)
|
||||
{
|
||||
gMouseAiming = pItem->at20;
|
||||
in_aimmode = pItem->at20;
|
||||
}
|
||||
|
||||
void SetMouseVerticalAim(CGameMenuItemZBool *pItem)
|
||||
|
@ -1970,16 +1970,16 @@ void SetupMouseMenu(CGameMenuItemChain *pItem)
|
|||
}
|
||||
}
|
||||
}
|
||||
itemOptionsControlMouseAimFlipped.at20 = gMouseAimingFlipped;
|
||||
itemOptionsControlMouseFilterInput.at20 = SmoothInput;
|
||||
itemOptionsControlMouseAimMode.at20 = gMouseAiming;
|
||||
itemOptionsControlMouseAimFlipped.at20 = in_mouseflip;
|
||||
itemOptionsControlMouseFilterInput.at20 = in_mousesmoothing;
|
||||
itemOptionsControlMouseAimMode.at20 = in_aimmode;
|
||||
itemOptionsControlMouseVerticalAim.at20 = gMouseAim;
|
||||
}
|
||||
|
||||
void PreDrawControlMouse(CGameMenuItem *pItem)
|
||||
{
|
||||
if (pItem == &itemOptionsControlMouseVerticalAim)
|
||||
pItem->bEnable = !gMouseAiming;
|
||||
pItem->bEnable = !in_aimmode;
|
||||
}
|
||||
|
||||
void SetMouseButton(CGameMenuItemZCycle *pItem)
|
||||
|
|
|
@ -888,9 +888,9 @@ static MenuEntry_t ME_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUENTRY("Aiming type:"
|
|||
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &g_myAimMode );
|
||||
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, &ud.mouseflip );
|
||||
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &in_mouseflip.Value );
|
||||
static MenuEntry_t ME_MOUSESETUP_INVERT = MAKE_MENUENTRY( "Invert aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_INVERT, Option );
|
||||
static MenuOption_t MEO_MOUSESETUP_SMOOTH = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &ud.config.SmoothInput );
|
||||
static MenuOption_t MEO_MOUSESETUP_SMOOTH = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &in_mousesmoothing.Value );
|
||||
static MenuEntry_t ME_MOUSESETUP_SMOOTH = MAKE_MENUENTRY( "Filter input:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_SMOOTH, Option );
|
||||
#ifndef EDUKE32_SIMPLE_MENU
|
||||
static MenuLink_t MEO_MOUSESETUP_ADVANCED = { MENU_MOUSEADVANCED, MA_Advance, };
|
||||
|
@ -3300,7 +3300,7 @@ static int32_t Menu_EntryOptionModify(MenuEntry_t *entry, int32_t newOption)
|
|||
else if (entry == &ME_SOUND_DUKETALK)
|
||||
snd_speech = (snd_speech&~1) | newOption;
|
||||
else if (entry == &ME_MOUSESETUP_SMOOTH)
|
||||
CONTROL_SmoothMouse = ud.config.SmoothInput;
|
||||
CONTROL_SmoothMouse = in_mousesmoothing;
|
||||
else if (entry == &ME_JOYSTICK_ENABLE)
|
||||
{
|
||||
if (newOption)
|
||||
|
|
|
@ -231,30 +231,35 @@ CUSTOM_CVARD(Bool, in_mouse, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCAL
|
|||
}
|
||||
|
||||
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")
|
||||
|
||||
CUSTOM_CVARD(Int, in_mousebias, 0, CVAR_INT|CVAR_GLOBALCONFIG|CVAR_ARCHIVE, "emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time")
|
||||
CUSTOM_CVARD(Int, in_mousebias, 0, CVAR_GLOBALCONFIG|CVAR_ARCHIVE, "emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time")
|
||||
{
|
||||
if (self < 0) self = 0;
|
||||
else if (self > 32) self = 32;
|
||||
}
|
||||
|
||||
CUSTOM_CVARD(Int, in_mousedeadzone, 0, CVAR_INT|CVAR_GLOBALCONFIG|CVAR_ARCHIVE, "amount of mouse movement to filter out")
|
||||
CUSTOM_CVARD(Int, in_mousedeadzone, 0, CVAR_GLOBALCONFIG|CVAR_ARCHIVE, "amount of mouse movement to filter out")
|
||||
{
|
||||
if (self < 0) self = 0;
|
||||
else if (self > 512) self = 512;
|
||||
}
|
||||
|
||||
CUSTOM_CVARD(Bool, in_mousesmoothing, false, CVAR_GLOBALCONFIG|CVAR_ARCHIVE, "enable/disable mouse input smoothing")
|
||||
{
|
||||
CONTROL_SmoothMouse = self;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
{ "in_mousesmoothing", , (void *)&in_mousesmoothing.Value, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "in_mousesmoothing", "enable/disable mouse input smoothing", (void *)&in_mousesmoothing.Value, CVAR_BOOL, 0, 1 },
|
||||
|
||||
// DN3D
|
||||
static osdcvardata_t cvars_game[] =
|
||||
{
|
||||
|
||||
{ "in_mouseflip", "invert vertical mouse movement", (void *)&ud.mouseflip, CVAR_BOOL, 0, 1 },
|
||||
{ "in_mousemode", "toggles vertical mouse view", (void *)&g_myAimMode, CVAR_BOOL, 0, 1 },
|
||||
{ "in_mousesmoothing", "enable/disable mouse input smoothing", (void *)&ud.config.SmoothInput, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },
|
||||
{ "r_drawweapon", "enable/disable weapon drawing", (void *)&ud.drawweapon, CVAR_INT, 0, 2 },
|
||||
{ "r_showfps", "show the frame rate counter", (void *)&ud.showfps, CVAR_INT, 0, 3 },
|
||||
|
@ -296,10 +301,6 @@ CUSTOM_CVARD(Int, in_mousedeadzone, 0, CVAR_INT|CVAR_GLOBALCONFIG|CVAR_ARCHIVE,
|
|||
|
||||
static osdcvardata_t cvars_game[] =
|
||||
{
|
||||
{ "in_mouseflip", "invert vertical mouse movement", (void *)&ud.mouseflip, CVAR_BOOL, 0, 1 },
|
||||
{ "in_mousemode", "toggles vertical mouse view", (void *)&g_myAimMode, CVAR_BOOL, 0, 1 },
|
||||
{ "in_mousesmoothing", "enable/disable mouse input smoothing", (void *)&ud.config.SmoothInput, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },
|
||||
{ "r_drawweapon", "enable/disable weapon drawing", (void *)&ud.drawweapon, CVAR_INT, 0, 2 },
|
||||
{ "r_showfps", "show the frame rate counter", (void *)&ud.showfps, CVAR_INT, 0, 3 },
|
||||
|
@ -344,9 +345,6 @@ int32_t registerosdcommands(void)
|
|||
char buffer[256];
|
||||
static osdcvardata_t cvars_game[] =
|
||||
{
|
||||
{ "in_mouseflip", "invert vertical mouse movement", (void *)&gMouseAimingFlipped, CVAR_BOOL, 0, 1 },
|
||||
{ "in_mousemode", "toggles vertical mouse view", (void *)&gMouseAim, CVAR_BOOL, 0, 1 },
|
||||
{ "in_mousesmoothing", "enable/disable mouse input smoothing", (void *)&SmoothInput, CVAR_BOOL, 0, 1 },
|
||||
//
|
||||
// { "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },
|
||||
// { "r_drawweapon", "enable/disable weapon drawing", (void *)&ud.drawweapon, CVAR_INT, 0, 2 },
|
||||
|
@ -410,5 +408,9 @@ int32_t registerosdcommands(void)
|
|||
// This needs some serious internal cleanup first, the implementation is all over the place and prone to whacking the user setting.
|
||||
{ "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 },
|
||||
|
||||
*/
|
||||
#endif
|
||||
|
|
|
@ -60,9 +60,12 @@ EXTERN_CVAR(Bool, r_horizcenter)
|
|||
|
||||
EXTERN_CVAR(Bool, in_joystick)
|
||||
EXTERN_CVAR(Bool, in_mouse)
|
||||
EXTERN_CVAR(Int, in_aimmode)
|
||||
EXTERN_CVAR(Bool, in_aimmode)
|
||||
EXTERN_CVAR(Int, in_mousebias)
|
||||
EXTERN_CVAR(Int, in_mousedeadzone)
|
||||
EXTERN_CVAR(Bool, in_mouseflip)
|
||||
EXTERN_CVAR(Bool, in_mousemode)
|
||||
EXTERN_CVAR(Bool, in_mousesmoothing)
|
||||
|
||||
extern int hud_statusbarrange; // will be set by the game's configuration setup.
|
||||
bool G_ChangeHudLayout(int direction);
|
||||
|
|
|
@ -244,7 +244,7 @@ void CONFIG_SetDefaults(void)
|
|||
ud.color = 0;
|
||||
ud.config.CheckForUpdates = 1;
|
||||
ud.config.ShowWeapons = 0;
|
||||
ud.config.SmoothInput = 1;
|
||||
in_mousesmoothing = 1;
|
||||
ud.config.useprecache = 1;
|
||||
ud.configversion = 0;
|
||||
ud.default_skill = 1;
|
||||
|
@ -261,7 +261,6 @@ void CONFIG_SetDefaults(void)
|
|||
ud.menu_slidebarz = 65536;
|
||||
ud.menu_slidecursorz = 65536;
|
||||
ud.menubackground = 1;
|
||||
ud.mouseflip = 1;
|
||||
ud.msgdisptime = 120;
|
||||
ud.pwlockout[0] = '\0';
|
||||
ud.runkey_mode = 0;
|
||||
|
|
|
@ -191,7 +191,7 @@ typedef struct {
|
|||
int32_t respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness;
|
||||
int32_t m_respawn_items,m_respawn_monsters,m_respawn_inventory,m_recstat,m_monsters_off,detail;
|
||||
int32_t m_ffire,ffire,m_player_skill,m_level_number,m_volume_number,multimode;
|
||||
int32_t player_skill,level_number,volume_number,m_marker,marker,mouseflip;
|
||||
int32_t player_skill,level_number,volume_number,m_marker,marker;
|
||||
int32_t music_episode, music_level, skill_voice;
|
||||
|
||||
int32_t playerbest;
|
||||
|
@ -219,7 +219,6 @@ typedef struct {
|
|||
struct {
|
||||
int32_t AutoAim;
|
||||
int32_t ShowWeapons;
|
||||
int32_t SmoothInput;
|
||||
|
||||
// JBF 20031211: Store the input settings because
|
||||
// (currently) mact can't regurgitate them
|
||||
|
|
|
@ -1445,7 +1445,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
|
|||
case USERDEFS_USER_MAP: labelNum = G_HaveUserMap(); break;
|
||||
case USERDEFS_M_MARKER: labelNum = ud.m_marker; break;
|
||||
case USERDEFS_MARKER: labelNum = ud.marker; break;
|
||||
case USERDEFS_MOUSEFLIP: labelNum = ud.mouseflip; break;
|
||||
case USERDEFS_MOUSEFLIP: labelNum = !in_mouseflip; break;
|
||||
case USERDEFS_STATUSBARSCALE: labelNum = ud.statusbarscale; break;
|
||||
case USERDEFS_DRAWWEAPON: labelNum = ud.drawweapon; break;
|
||||
case USERDEFS_MOUSEAIMING: labelNum = in_aimmode; break;
|
||||
|
@ -1646,7 +1646,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
|
|||
case USERDEFS_VOLUME_NUMBER: ud.volume_number = iSet; break;
|
||||
case USERDEFS_M_MARKER: ud.m_marker = iSet; break;
|
||||
case USERDEFS_MARKER: ud.marker = iSet; break;
|
||||
case USERDEFS_MOUSEFLIP: ud.mouseflip = iSet; break;
|
||||
case USERDEFS_MOUSEFLIP: in_mouseflip = !iSet; break;//!!!
|
||||
case USERDEFS_STATUSBARSCALE: ud.statusbarscale = iSet; break;
|
||||
case USERDEFS_DRAWWEAPON: ud.drawweapon = iSet; break;
|
||||
case USERDEFS_MOUSEAIMING: in_aoimmode = iSet; break;//!!!
|
||||
|
|
|
@ -887,9 +887,9 @@ static MenuEntry_t ME_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUENTRY("Aiming type:"
|
|||
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &g_myAimMode );
|
||||
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, &ud.mouseflip );
|
||||
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &in_mouseflip.Value );
|
||||
static MenuEntry_t ME_MOUSESETUP_INVERT = MAKE_MENUENTRY( "Invert aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_INVERT, Option );
|
||||
static MenuOption_t MEO_MOUSESETUP_SMOOTH = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &ud.config.SmoothInput );
|
||||
static MenuOption_t MEO_MOUSESETUP_SMOOTH = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &in_mousesmoothing.Value );
|
||||
static MenuEntry_t ME_MOUSESETUP_SMOOTH = MAKE_MENUENTRY( "Filter input:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_SMOOTH, Option );
|
||||
#ifndef EDUKE32_SIMPLE_MENU
|
||||
static MenuLink_t MEO_MOUSESETUP_ADVANCED = { MENU_MOUSEADVANCED, MA_Advance, };
|
||||
|
@ -3316,7 +3316,7 @@ static int32_t Menu_EntryOptionModify(MenuEntry_t *entry, int32_t newOption)
|
|||
else if (entry == &ME_SOUND_DUKETALK)
|
||||
snd_speech = (snd_speech&~1) | newOption;
|
||||
else if (entry == &ME_MOUSESETUP_SMOOTH)
|
||||
CONTROL_SmoothMouse = ud.config.SmoothInput;
|
||||
CONTROL_SmoothMouse = in_mousesmoothing;
|
||||
else if (entry == &ME_JOYSTICK_ENABLE)
|
||||
{
|
||||
if (newOption)
|
||||
|
|
|
@ -2973,7 +2973,7 @@ void P_GetInput(int const playerNum)
|
|||
else
|
||||
input.fvel = -(info.mousey >> 6);
|
||||
|
||||
if (ud.mouseflip) input.q16horz = -input.q16horz;
|
||||
if (!in_mouseflip) input.q16horz = -input.q16horz;
|
||||
|
||||
input.q16horz -= fix16_from_int(info.dpitch) / analogExtent * analogTurnAmount;
|
||||
input.svel -= info.dx * keyMove / analogExtent;
|
||||
|
|
|
@ -213,9 +213,8 @@ void CONFIG_SetDefaults(void)
|
|||
#endif
|
||||
ud.config.useprecache = 1;
|
||||
in_mousebias = 0;
|
||||
g_myAimMode = g_player[0].ps->aim_mode = 1;
|
||||
g_player[0].ps->aim_mode = 1;
|
||||
ud.config.ShowOpponentWeapons = 0;
|
||||
ud.config.SmoothInput = 1;
|
||||
ud.althud = 1;
|
||||
ud.automsg = 0;
|
||||
ud.brightness = 8;
|
||||
|
@ -238,7 +237,6 @@ void CONFIG_SetDefaults(void)
|
|||
ud.menu_slidebarz = 65536;
|
||||
ud.menu_slidebarmargin = RR ? 6 * 65536 : 65536;
|
||||
ud.menu_slidecursorz = RR ? 32768 : 65536;
|
||||
ud.mouseflip = 1;
|
||||
ud.msgdisptime = 120;
|
||||
ud.pwlockout[0] = '\0';
|
||||
ud.runkey_mode = 0;
|
||||
|
|
|
@ -170,7 +170,7 @@ typedef struct {
|
|||
int32_t respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness;
|
||||
int32_t m_respawn_items,m_respawn_monsters,m_respawn_inventory,m_recstat,m_monsters_off,detail;
|
||||
int32_t m_ffire,ffire,m_player_skill,m_level_number,m_volume_number,multimode;
|
||||
int32_t player_skill,level_number,volume_number,m_marker,marker,mouseflip;
|
||||
int32_t player_skill,level_number,volume_number,m_marker,marker;
|
||||
int32_t music_episode, music_level;
|
||||
|
||||
int32_t playerbest;
|
||||
|
@ -194,7 +194,6 @@ typedef struct {
|
|||
struct {
|
||||
int32_t AutoAim;
|
||||
int32_t ShowOpponentWeapons;
|
||||
int32_t SmoothInput;
|
||||
|
||||
// JBF 20031211: Store the input settings because
|
||||
// (currently) mact can't regurgitate them
|
||||
|
|
|
@ -841,9 +841,9 @@ static MenuEntry_t ME_MOUSESETUP_MOUSEAIMINGTYPE = MAKE_MENUENTRY("Aiming type:"
|
|||
static MenuOption_t MEO_MOUSESETUP_MOUSEAIMING = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &g_myAimMode );
|
||||
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, &ud.mouseflip );
|
||||
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &in_mouseflip.Value );
|
||||
static MenuEntry_t ME_MOUSESETUP_INVERT = MAKE_MENUENTRY( "Invert aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_INVERT, Option );
|
||||
static MenuOption_t MEO_MOUSESETUP_SMOOTH = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &ud.config.SmoothInput );
|
||||
static MenuOption_t MEO_MOUSESETUP_SMOOTH = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &in_mousesmoothing.Value );
|
||||
static MenuEntry_t ME_MOUSESETUP_SMOOTH = MAKE_MENUENTRY( "Filter input:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_SMOOTH, Option );
|
||||
#ifndef EDUKE32_SIMPLE_MENU
|
||||
static MenuLink_t MEO_MOUSESETUP_ADVANCED = { MENU_MOUSEADVANCED, MA_Advance, };
|
||||
|
@ -3721,7 +3721,7 @@ static int32_t Menu_EntryOptionModify(MenuEntry_t *entry, int32_t newOption)
|
|||
else if (entry == &ME_SOUND_DUKETALK)
|
||||
snd_speech = (snd_speech&~1) | newOption;
|
||||
else if (entry == &ME_MOUSESETUP_SMOOTH)
|
||||
CONTROL_SmoothMouse = ud.config.SmoothInput;
|
||||
CONTROL_SmoothMouse = in_mousesmoothing;
|
||||
else if (entry == &ME_JOYSTICKAXIS_ANALOG)
|
||||
CONTROL_MapAnalogAxis(M_JOYSTICKAXES.currentEntry, newOption, controldevice_joystick);
|
||||
else if (entry == &ME_NETOPTIONS_EPISODE)
|
||||
|
|
|
@ -2824,7 +2824,7 @@ void P_GetInput(int playerNum)
|
|||
else
|
||||
input.fvel = -(info.mousey >> 6);
|
||||
|
||||
if (ud.mouseflip) input.q16horz = -input.q16horz;
|
||||
if (!in_mouseflip) input.q16horz = -input.q16horz;
|
||||
|
||||
input.q16horz -= fix16_from_int(info.dpitch) / analogExtent * analogTurnAmount;
|
||||
input.svel -= info.dx * keyMove / analogExtent;
|
||||
|
@ -3113,7 +3113,7 @@ void P_GetInputMotorcycle(int playerNum)
|
|||
|
||||
input.q16horz = fix16_div(fix16_from_int(info.mousey), F16(64));
|
||||
|
||||
if (ud.mouseflip) input.q16horz = -input.q16horz;
|
||||
if (!in_mouseflip) input.q16horz = -input.q16horz;
|
||||
|
||||
input.q16horz -= fix16_from_int(info.dpitch) / analogExtent * analogTurnAmount;
|
||||
input.svel -= info.dx * keyMove / analogExtent;
|
||||
|
@ -3411,7 +3411,7 @@ void P_GetInputBoat(int playerNum)
|
|||
|
||||
input.q16horz = fix16_div(fix16_from_int(info.mousey), F16(64));
|
||||
|
||||
if (ud.mouseflip) input.q16horz = -input.q16horz;
|
||||
if (!in_mouseflip) input.q16horz = -input.q16horz;
|
||||
|
||||
input.q16horz -= fix16_from_int(info.dpitch) / analogExtent * analogTurnAmount;
|
||||
input.svel -= info.dx * keyMove / analogExtent;
|
||||
|
|
|
@ -237,7 +237,6 @@ 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_numObituaries;
|
||||
extern int32_t g_numSelfObituaries;
|
||||
extern int32_t mouseyaxismode;
|
||||
|
|
Loading…
Reference in a new issue