mirror of
https://gitlab.com/skmp/dca3-game.git
synced 2025-08-27 00:25:34 +02:00
Fixed controll bugs, Enabled controller config menu, PS2 like layout is finished, Testing is needed on Xbox and PS2 dual stick modes
This commit is contained in:

committed by
Stefanos Kornilios Mitsis Poiitidis
parent
c458e6c466
commit
1e03ff65d8
@@ -764,7 +764,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
|
|||||||
|
|
||||||
// MENUPAGE_OPTIONS = 41
|
// MENUPAGE_OPTIONS = 41
|
||||||
{ "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
|
{ "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
|
||||||
#ifdef GTA_HANDHELD
|
#ifdef RW_DC
|
||||||
MENUACTION_CHANGEMENU, "FET_CTL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
|
MENUACTION_CHANGEMENU, "FET_CTL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
|
||||||
#else
|
#else
|
||||||
MENUACTION_CHANGEMENU, "FET_CTL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC },
|
MENUACTION_CHANGEMENU, "FET_CTL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC },
|
||||||
|
@@ -1607,6 +1607,8 @@ int16 CPad::GetSteeringLeftRight(void)
|
|||||||
{
|
{
|
||||||
if (NewState.X)
|
if (NewState.X)
|
||||||
return 0;
|
return 0;
|
||||||
|
if (NewState.A && ((NewState.LeftStickX < -64) || (NewState.LeftStickX > 64)))
|
||||||
|
return 0;
|
||||||
return NewState.LeftStickX;
|
return NewState.LeftStickX;
|
||||||
}
|
}
|
||||||
case 1: //PS2 Mode
|
case 1: //PS2 Mode
|
||||||
@@ -1618,6 +1620,8 @@ int16 CPad::GetSteeringLeftRight(void)
|
|||||||
{
|
{
|
||||||
if (NewState.LeftTrigger > 128)
|
if (NewState.LeftTrigger > 128)
|
||||||
return 0;
|
return 0;
|
||||||
|
if (NewState.A && ((NewState.RightTrigger > 128) || (NewState.LeftTrigger > 128)))
|
||||||
|
return 0;
|
||||||
return NewState.LeftStickX;
|
return NewState.LeftStickX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2003,8 +2007,8 @@ bool CPad::GetLookLeft(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (NewState.A)
|
if (NewState.A && (NewState.LeftStickX < -64))
|
||||||
return CPad::GetPad(0)->GetAnaloguePadLeft();
|
return true;
|
||||||
}
|
}
|
||||||
case 1: //PS2 Mode
|
case 1: //PS2 Mode
|
||||||
if (CPad::GetPad(0)->IsDualAnalog)
|
if (CPad::GetPad(0)->IsDualAnalog)
|
||||||
@@ -2014,8 +2018,8 @@ bool CPad::GetLookLeft(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (NewState.B)
|
if (NewState.B && (NewState.LeftTrigger > 128))
|
||||||
return CPad::GetPad(0)->GetAnaloguePadLeft();
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -2024,6 +2028,8 @@ bool CPad::GetLookLeft(void)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPad::GetLookRight(void)
|
bool CPad::GetLookRight(void)
|
||||||
@@ -2041,8 +2047,8 @@ bool CPad::GetLookRight(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (NewState.A)
|
if (NewState.A && (NewState.LeftStickX > 64))
|
||||||
return CPad::GetPad(0)->GetAnaloguePadRight();
|
return true;
|
||||||
}
|
}
|
||||||
case 1: //PS2 Mode
|
case 1: //PS2 Mode
|
||||||
if (CPad::GetPad(0)->IsDualAnalog)
|
if (CPad::GetPad(0)->IsDualAnalog)
|
||||||
@@ -2052,8 +2058,8 @@ bool CPad::GetLookRight(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (NewState.B)
|
if (NewState.B && (NewState.RightTrigger > 128))
|
||||||
return CPad::GetPad(0)->GetAnaloguePadRight();
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -2061,6 +2067,8 @@ bool CPad::GetLookRight(void)
|
|||||||
return !!(NewState.RightShoulder2 && !NewState.LeftShoulder2);
|
return !!(NewState.RightShoulder2 && !NewState.LeftShoulder2);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2102,6 +2110,8 @@ bool CPad::GetLookBehindForCar(void)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPad::GetLookBehindForPed(void)
|
bool CPad::GetLookBehindForPed(void)
|
||||||
@@ -2136,6 +2146,8 @@ bool CPad::GetLookBehindForPed(void)
|
|||||||
return !!NewState.RightShock;
|
return !!NewState.RightShock;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPad::GetHorn(void)
|
bool CPad::GetHorn(void)
|
||||||
@@ -2424,11 +2436,13 @@ int16 CPad::GetBrake(void)
|
|||||||
case 1: //PS2 Mode
|
case 1: //PS2 Mode
|
||||||
if (CPad::GetPad(0)->IsDualAnalog)
|
if (CPad::GetPad(0)->IsDualAnalog)
|
||||||
{
|
{
|
||||||
return NewState.X;
|
if(NewState.X)
|
||||||
|
return 255;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NewState.X;
|
if(NewState.X)
|
||||||
|
return 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -2685,11 +2699,13 @@ int16 CPad::GetAccelerate(void)
|
|||||||
case 1: //PS2 Mode
|
case 1: //PS2 Mode
|
||||||
if (CPad::GetPad(0)->IsDualAnalog)
|
if (CPad::GetPad(0)->IsDualAnalog)
|
||||||
{
|
{
|
||||||
return NewState.A;
|
if(NewState.A)
|
||||||
|
return 255;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NewState.A;
|
if(NewState.A)
|
||||||
|
return 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3568,7 +3584,7 @@ float axis = 0;
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (NewState.X)
|
if (!NewState.X)
|
||||||
return 0;
|
return 0;
|
||||||
axis = NewState.LeftStickX;
|
axis = NewState.LeftStickX;
|
||||||
}
|
}
|
||||||
@@ -3579,7 +3595,7 @@ float axis = 0;
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (NewState.LeftTrigger > 128)
|
if (!(NewState.LeftTrigger > 128))
|
||||||
return 0;
|
return 0;
|
||||||
axis = NewState.LeftStickX;
|
axis = NewState.LeftStickX;
|
||||||
}
|
}
|
||||||
@@ -3614,7 +3630,7 @@ int16 axis = 0;
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (NewState.X)
|
if (!NewState.X)
|
||||||
return 0;
|
return 0;
|
||||||
axis = NewState.LeftStickY;
|
axis = NewState.LeftStickY;
|
||||||
}
|
}
|
||||||
@@ -3625,7 +3641,7 @@ int16 axis = 0;
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (NewState.LeftTrigger > 128)
|
if (!(NewState.LeftTrigger > 128))
|
||||||
return 0;
|
return 0;
|
||||||
axis = NewState.LeftStickY;
|
axis = NewState.LeftStickY;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user