Merge pull request #803 from withmorten/master
add bInvertLook4Pad from VC
This commit is contained in:
commit
1686eb9871
Binary file not shown.
@ -15,6 +15,7 @@
|
||||
#include "FileLoader.h"
|
||||
#include "Collision.h"
|
||||
#include "ModelInfo.h"
|
||||
#include "Pad.h"
|
||||
|
||||
// Menu screens array is at the bottom of the file.
|
||||
|
||||
@ -76,6 +77,12 @@
|
||||
#define PIPELINES_SELECTOR
|
||||
#endif
|
||||
|
||||
#ifdef INVERT_LOOK_FOR_PAD
|
||||
#define INVERT_PAD_SELECTOR MENUACTION_CFO_SELECT, "FEC_IVP", { new CCFOSelect((int8*)&CPad::bInvertLook4Pad, "InvertPad", off_on, 2, false, nil) },
|
||||
#else
|
||||
#define INVERT_PAD_SELECTOR
|
||||
#endif
|
||||
|
||||
const char *filterNames[] = { "FEM_NON", "FEM_SIM", "FEM_NRM", "FEM_MOB" };
|
||||
const char *vehPipelineNames[] = { "FED_MFX", "FED_NEO" };
|
||||
const char *off_on[] = { "FEM_OFF", "FEM_ON" };
|
||||
@ -780,6 +787,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
|
||||
{ "FET_MTI", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, nil, nil,
|
||||
MENUACTION_MOUSESENS, "FEC_MSH", { nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS },
|
||||
MENUACTION_INVVERT, "FEC_IVV", { nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS },
|
||||
INVERT_PAD_SELECTOR
|
||||
MENUACTION_MOUSESTEER, "FET_MST", { nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS },
|
||||
MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
|
||||
},
|
||||
|
@ -59,6 +59,9 @@ bool CPad::bDisplayNoControllerMessage;
|
||||
bool CPad::bObsoleteControllerMessage;
|
||||
bool CPad::bOldDisplayNoControllerMessage;
|
||||
bool CPad::m_bMapPadOneToPadTwo;
|
||||
#ifdef INVERT_LOOK_FOR_PAD
|
||||
bool CPad::bInvertLook4Pad;
|
||||
#endif
|
||||
#ifdef GTA_PS2
|
||||
unsigned char act_direct[6];
|
||||
unsigned char act_align[6];
|
||||
@ -2534,10 +2537,20 @@ int16 CPad::SniperModeLookLeftRight(void)
|
||||
int16 CPad::SniperModeLookUpDown(void)
|
||||
{
|
||||
int16 axis = NewState.LeftStickY;
|
||||
int16 dpad;
|
||||
#ifdef FIX_BUGS
|
||||
axis = -axis;
|
||||
#endif
|
||||
int16 dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
|
||||
#ifndef INVERT_LOOK_FOR_PAD
|
||||
dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
|
||||
#else
|
||||
if (CPad::bInvertLook4Pad) {
|
||||
axis = -axis;
|
||||
dpad = (NewState.DPadDown - NewState.DPadUp) / 2;
|
||||
} else {
|
||||
dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( Abs(axis) > Abs(dpad) )
|
||||
return axis;
|
||||
@ -2567,6 +2580,10 @@ int16 CPad::LookAroundUpDown(void)
|
||||
#ifdef FIX_BUGS
|
||||
axis = -axis;
|
||||
#endif
|
||||
#ifdef INVERT_LOOK_FOR_PAD
|
||||
if (CPad::bInvertLook4Pad)
|
||||
axis = -axis;
|
||||
#endif
|
||||
|
||||
if ( Abs(axis) > 85 && !GetLookBehindForPed() )
|
||||
return (int16) ( (axis + ( ( axis > 0 ) ? -85 : 85) )
|
||||
|
@ -170,6 +170,9 @@ public:
|
||||
static bool bObsoleteControllerMessage;
|
||||
static bool bOldDisplayNoControllerMessage;
|
||||
static bool m_bMapPadOneToPadTwo;
|
||||
#ifdef INVERT_LOOK_FOR_PAD
|
||||
static bool bInvertLook4Pad;
|
||||
#endif
|
||||
|
||||
static CKeyboardState OldKeyState;
|
||||
static CKeyboardState NewKeyState;
|
||||
|
@ -275,6 +275,7 @@ enum Config {
|
||||
# define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
|
||||
# define CUTSCENE_BORDERS_SWITCH
|
||||
# define MULTISAMPLING // adds MSAA option
|
||||
# define INVERT_LOOK_FOR_PAD // add bInvertLook4Pad from VC
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -8061,6 +8061,9 @@ PS2
|
||||
[FEM_XBX]
|
||||
XBOX
|
||||
|
||||
[FEC_IVP]
|
||||
INVERT PAD VERTICALLY
|
||||
|
||||
{ end of file }
|
||||
|
||||
[DUMMY]
|
||||
|
Loading…
Reference in New Issue
Block a user