summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-21 20:48:28 +0100
committeraap <aap@papnet.eu>2020-12-21 20:48:28 +0100
commit88b0134e72077b89c172fe857bf8a2735cb47cf3 (patch)
treea7282da87b98d33390991219bce4e18a671f83a2 /src/core
parentfix sizeof (diff)
downloadre3-88b0134e72077b89c172fe857bf8a2735cb47cf3.tar
re3-88b0134e72077b89c172fe857bf8a2735cb47cf3.tar.gz
re3-88b0134e72077b89c172fe857bf8a2735cb47cf3.tar.bz2
re3-88b0134e72077b89c172fe857bf8a2735cb47cf3.tar.lz
re3-88b0134e72077b89c172fe857bf8a2735cb47cf3.tar.xz
re3-88b0134e72077b89c172fe857bf8a2735cb47cf3.tar.zst
re3-88b0134e72077b89c172fe857bf8a2735cb47cf3.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Cam.cpp4
-rw-r--r--src/core/Camera.cpp4
-rw-r--r--src/core/Frontend.cpp6
-rw-r--r--src/core/MenuScreens.cpp2
-rw-r--r--src/core/MenuScreensCustom.cpp2
-rw-r--r--src/core/config.h1
6 files changed, 19 insertions, 0 deletions
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index 9b4715b2..2cf1748c 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -180,9 +180,11 @@ CCam::Process(void)
Process_BehindCar(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
break;
case MODE_FOLLOWPED:
+#ifdef PC_PLAYER_CONTROLS
if(CCamera::m_bUseMouse3rdPerson)
Process_FollowPedWithMouse(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
else
+#endif
#ifdef FREE_CAM
if(CCamera::bFreeCam)
Process_FollowPed_Rotation(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
@@ -3735,6 +3737,7 @@ CCam::Process_Fixed(const CVector &CameraTarget, float, float, float)
}
}
+#ifdef PC_PLAYER_CONTROLS
if(FrontEndMenuManager.m_ControlMethod == CONTROL_STANDARD && Using3rdPersonMouseCam()){
CPed *player = FindPlayerPed();
if(player && player->CanStrafeOrMouseControl()){
@@ -3745,6 +3748,7 @@ CCam::Process_Fixed(const CVector &CameraTarget, float, float, float)
TheCamera.pTargetEntity->GetMatrix().UpdateRW();
}
}
+#endif
}
void
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 531c3417..e11410e2 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -69,7 +69,11 @@ enum
// NB: removed explicit TheCamera from all functions
CCamera TheCamera;
+#ifdef PC_PLAYER_CONTROLS
bool CCamera::m_bUseMouse3rdPerson = true;
+#else
+bool CCamera::m_bUseMouse3rdPerson = false;
+#endif
bool bDidWeProcessAnyCinemaCam;
static bool bSwitchedToObbeCam;
float CCamera::m_fMouseAccelHorzntl;
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 18554a4d..b16f511b 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -493,7 +493,11 @@ CMenuManager::CMenuManager()
m_PrefsDMA = 1;
OS_Language = LANG_ENGLISH;
m_ControlMethod = CONTROL_STANDARD;
+#ifdef PC_PLAYER_CONTROLS
CCamera::m_bUseMouse3rdPerson = true;
+#else
+ CCamera::m_bUseMouse3rdPerson = false;
+#endif
m_lastWorking3DAudioProvider = 0;
m_nFirstVisibleRowOnList = 0;
m_nScrollbarTopMargin = 0.0f;
@@ -3019,7 +3023,9 @@ CMenuManager::LoadSettings()
CFileMgr::CloseFile(fileHandle);
CFileMgr::SetDir("");
+#ifdef PC_PLAYER_CONTROLS
CCamera::m_bUseMouse3rdPerson = m_ControlMethod == CONTROL_STANDARD;
+#endif
#ifdef LEGACY_MENU_OPTIONS
m_PrefsVsync = m_PrefsVsyncDisp;
#endif
diff --git a/src/core/MenuScreens.cpp b/src/core/MenuScreens.cpp
index d4d028c9..173de805 100644
--- a/src/core/MenuScreens.cpp
+++ b/src/core/MenuScreens.cpp
@@ -215,7 +215,9 @@ CMenuScreen aScreens[] = {
// MENUPAGE_CONTROLLER_PC = 26
{ "FET_CTL", MENUPAGE_OPTIONS, 0,
+#ifdef PC_PLAYER_CONTROLS
MENUACTION_CTRLMETHOD, "FET_STI", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, 320, 150, MENUALIGN_CENTER,
+#endif
MENUACTION_KEYBOARDCTRLS,"FEC_RED", SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS, 0, 0, MENUALIGN_CENTER,
MENUACTION_CHANGEMENU, "FEC_MOU", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS, 0, 0, MENUALIGN_CENTER,
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, 0, 0, MENUALIGN_CENTER,
diff --git a/src/core/MenuScreensCustom.cpp b/src/core/MenuScreensCustom.cpp
index c14f938b..e35a7751 100644
--- a/src/core/MenuScreensCustom.cpp
+++ b/src/core/MenuScreensCustom.cpp
@@ -566,7 +566,9 @@ CMenuScreenCustom aScreens[] = {
// MENUPAGE_CONTROLLER_PC = 26
{ "FET_CTL", MENUPAGE_OPTIONS, new CCustomScreenLayout({0, 0, MENU_DEFAULT_LINE_HEIGHT, false, false, 150}), nil,
+#ifdef PC_PLAYER_CONTROLS
MENUACTION_CTRLMETHOD, "FET_STI", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC}, 320, 150, MENUALIGN_CENTER,
+#endif
MENUACTION_KEYBOARDCTRLS,"FEC_RED", {nil, SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS}, 0, 0, MENUALIGN_CENTER,
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
MENUACTION_CHANGEMENU, "FEC_JOD", {nil, SAVESLOT_NONE, MENUPAGE_DETECT_JOYSTICK}, 0, 0, MENUALIGN_CENTER,
diff --git a/src/core/config.h b/src/core/config.h
index 7742999f..ae2189e2 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -208,6 +208,7 @@ enum Config {
# define RANDOMSPLASH // use random splash as on PS2
# define PS2_MATFX
# endif
+# define PC_PLAYER_CONTROLS // mouse player/cam mode
# define GTA_REPLAY
# define GTA_SCENE_EDIT
#elif defined GTA_XBOX