dsda: match button names to dsda
(except for weapon keys since they may mean different thing for non-doom) tweak doom mnemonics too and push core submodule
This commit is contained in:
parent
72070a63de
commit
918783126e
|
@ -67,7 +67,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
var specialValue = input[i++];
|
var specialValue = input[i++];
|
||||||
controller[playerPfx + "Fire"] = (specialValue & 0b00000001) is not 0;
|
controller[playerPfx + "Fire"] = (specialValue & 0b00000001) is not 0;
|
||||||
controller[playerPfx + "Action"] = (specialValue & 0b00000010) is not 0;
|
controller[playerPfx + "Use"] = (specialValue & 0b00000010) is not 0;
|
||||||
controller.AcceptNewAxis(playerPfx + "Weapon Select", (specialValue & 0b00011100) >> 2);
|
controller.AcceptNewAxis(playerPfx + "Weapon Select", (specialValue & 0b00011100) >> 2);
|
||||||
controller[playerPfx + "Alt Weapon"] = (specialValue & 0b00100000) is not 0;
|
controller[playerPfx + "Alt Weapon"] = (specialValue & 0b00100000) is not 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
var specialValue = input[i++];
|
var specialValue = input[i++];
|
||||||
controller[playerPfx + "Fire"] = (specialValue & 0b00000001) is not 0;
|
controller[playerPfx + "Fire"] = (specialValue & 0b00000001) is not 0;
|
||||||
controller[playerPfx + "Action"] = (specialValue & 0b00000010) is not 0;
|
controller[playerPfx + "Use"] = (specialValue & 0b00000010) is not 0;
|
||||||
controller.AcceptNewAxis(playerPfx + "Weapon Select", (specialValue & 0b00011100) >> 2);
|
controller.AcceptNewAxis(playerPfx + "Weapon Select", (specialValue & 0b00011100) >> 2);
|
||||||
controller[playerPfx + "Alt Weapon"] = (specialValue & 0b00100000) is not 0;
|
controller[playerPfx + "Alt Weapon"] = (specialValue & 0b00100000) is not 0;
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
var specialValue = input[i++];
|
var specialValue = input[i++];
|
||||||
controller[playerPfx + "Fire"] = (specialValue & 0b00000001) is not 0;
|
controller[playerPfx + "Fire"] = (specialValue & 0b00000001) is not 0;
|
||||||
controller[playerPfx + "Action"] = (specialValue & 0b00000010) is not 0;
|
controller[playerPfx + "Use"] = (specialValue & 0b00000010) is not 0;
|
||||||
controller.AcceptNewAxis(playerPfx + "Weapon Select", (specialValue & 0b00011100) >> 2);
|
controller.AcceptNewAxis(playerPfx + "Weapon Select", (specialValue & 0b00011100) >> 2);
|
||||||
controller[playerPfx + "Alt Weapon"] = (specialValue & 0b00100000) is not 0;
|
controller[playerPfx + "Alt Weapon"] = (specialValue & 0b00100000) is not 0;
|
||||||
|
|
||||||
|
|
|
@ -819,19 +819,19 @@ namespace BizHawk.Emulation.Common
|
||||||
["RESET"] = 'r',
|
["RESET"] = 'r',
|
||||||
},
|
},
|
||||||
[VSystemID.Raw.Doom] = new()
|
[VSystemID.Raw.Doom] = new()
|
||||||
{
|
{
|
||||||
["Action"] = 'A',
|
["Alt Weapon"] = 'X',
|
||||||
["Fire"] = 'F',
|
["Backward"] = 'v',
|
||||||
["Alt Weapon"] = 'X',
|
|
||||||
["Jump"] = 'J',
|
|
||||||
["End Player"] = 'E',
|
["End Player"] = 'E',
|
||||||
["Forward"] = 'f',
|
["Fire"] = 'F',
|
||||||
["Backward"] = 'b',
|
["Forward"] = '^',
|
||||||
|
["Jump"] = 'J',
|
||||||
|
["Run"] = 'R',
|
||||||
|
["Strafe Left"] = '<',
|
||||||
|
["Strafe Right"] = '>',
|
||||||
["Turn Left"] = 'l',
|
["Turn Left"] = 'l',
|
||||||
["Turn Right"] = 'r',
|
["Turn Right"] = 'r',
|
||||||
["Strafe Left"] = 'L',
|
["Use"] = 'U',
|
||||||
["Strafe Right"] = 'R',
|
|
||||||
["Shift Run"] = 's',
|
|
||||||
["Weapon Select 1"] = '1',
|
["Weapon Select 1"] = '1',
|
||||||
["Weapon Select 2"] = '2',
|
["Weapon Select 2"] = '2',
|
||||||
["Weapon Select 3"] = '3',
|
["Weapon Select 3"] = '3',
|
||||||
|
|
|
@ -257,14 +257,14 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
||||||
[Description("Sets strict mode restrictions, preventing TAS-only inputs.")]
|
[Description("Sets strict mode restrictions, preventing TAS-only inputs.")]
|
||||||
[DefaultValue(true)]
|
[DefaultValue(true)]
|
||||||
public bool StrictMode { get; set; }
|
public bool StrictMode { get; set; }
|
||||||
|
/*
|
||||||
[DisplayName("Auto Run")]
|
[DisplayName("Auto Run")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
[DefaultValue(true)]
|
[DefaultValue(true)]
|
||||||
public bool AutoRun { get; set; }
|
public bool AutoRun { get; set; }
|
||||||
|
*/
|
||||||
[DisplayName("Turning Resolution")]
|
[DisplayName("Turning Resolution")]
|
||||||
[Description("\"shorttics\" refers to decreased turning resolution used for demos, whereas \"longtics\" refers to the regular turning resolution outside of a demo-recording environment.")]
|
[Description("\"Shorttics\" refers to decreased turning resolution used for demos. \"Longtics\" refers to the regular turning resolution outside of a demo-recording environment.")]
|
||||||
[DefaultValue(TurningResolution.Longtics)]
|
[DefaultValue(TurningResolution.Longtics)]
|
||||||
public TurningResolution TurningResolution { get; set; }
|
public TurningResolution TurningResolution { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -49,22 +49,22 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
||||||
private static readonly string[] BaseDefinition =
|
private static readonly string[] BaseDefinition =
|
||||||
[
|
[
|
||||||
"Fire",
|
"Fire",
|
||||||
"Action",
|
"Use",
|
||||||
"Alt Weapon",
|
"Alt Weapon",
|
||||||
"Key Forward",
|
"Forward",
|
||||||
"Key Backward",
|
"Backward",
|
||||||
"Key Turn Left",
|
"Turn Left",
|
||||||
"Key Turn Right",
|
"Turn Right",
|
||||||
"Key Strafe Left",
|
"Strafe Left",
|
||||||
"Key Strafe Right",
|
"Strafe Right",
|
||||||
"Key Shift Run",
|
"Run",
|
||||||
"Key Weapon Select 1",
|
"Weapon Select 1",
|
||||||
"Key Weapon Select 2",
|
"Weapon Select 2",
|
||||||
"Key Weapon Select 3",
|
"Weapon Select 3",
|
||||||
"Key Weapon Select 4",
|
"Weapon Select 4",
|
||||||
"Key Weapon Select 5",
|
"Weapon Select 5",
|
||||||
"Key Weapon Select 6",
|
"Weapon Select 6",
|
||||||
"Key Weapon Select 7",
|
"Weapon Select 7",
|
||||||
];
|
];
|
||||||
|
|
||||||
public byte Read(IController c)
|
public byte Read(IController c)
|
||||||
|
@ -72,7 +72,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
||||||
byte result = 0;
|
byte result = 0;
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b0001; }
|
if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b0001; }
|
||||||
if (c.IsPressed($"P{PortNum} Action")) { result |= 0b0010; }
|
if (c.IsPressed($"P{PortNum} Use")) { result |= 0b0010; }
|
||||||
if (c.IsPressed($"P{PortNum} Alt Weapon")) { result |= 0b0100; }
|
if (c.IsPressed($"P{PortNum} Alt Weapon")) { result |= 0b0100; }
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -85,55 +85,55 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
||||||
// Handling running keys overriding axes values
|
// Handling running keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Run Speed")
|
if (Definition.Axes[pot] == $"P{PortNum} Run Speed")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Forward"))
|
if (c.IsPressed($"P{PortNum} Forward"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 50 : 25;
|
x = c.IsPressed($"P{PortNum} Run") ? 50 : 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Key Backward"))
|
if (c.IsPressed($"P{PortNum} Backward"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -50 : -25;
|
x = c.IsPressed($"P{PortNum} Run") ? -50 : -25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handling strafing keys overriding axes values
|
// Handling strafing keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Strafing Speed")
|
if (Definition.Axes[pot] == $"P{PortNum} Strafing Speed")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Strafe Right"))
|
if (c.IsPressed($"P{PortNum} Strafe Right"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 40 : 24;
|
x = c.IsPressed($"P{PortNum} Run") ? 40 : 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Key Strafe Left"))
|
if (c.IsPressed($"P{PortNum} Strafe Left"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -40 : -24;
|
x = c.IsPressed($"P{PortNum} Run") ? -40 : -24;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handling turning keys overriding axes values
|
// Handling turning keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Turning Speed")
|
if (Definition.Axes[pot] == $"P{PortNum} Turning Speed")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Turn Left"))
|
if (c.IsPressed($"P{PortNum} Turn Left"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 1280 : 320;
|
x = c.IsPressed($"P{PortNum} Run") ? 1280 : 320;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Key Turn Right"))
|
if (c.IsPressed($"P{PortNum} Turn Right"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -1280 : -320;
|
x = c.IsPressed($"P{PortNum} Run") ? -1280 : -320;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handling weapon select keys overriding axes values
|
// Handling weapon select keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Weapon Select")
|
if (Definition.Axes[pot] == $"P{PortNum} Weapon Select")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 1")) x = 1;
|
if (c.IsPressed($"P{PortNum} Weapon Select 1")) x = 1;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 2")) x = 2;
|
if (c.IsPressed($"P{PortNum} Weapon Select 2")) x = 2;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 3")) x = 3;
|
if (c.IsPressed($"P{PortNum} Weapon Select 3")) x = 3;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 4")) x = 4;
|
if (c.IsPressed($"P{PortNum} Weapon Select 4")) x = 4;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 5")) x = 5;
|
if (c.IsPressed($"P{PortNum} Weapon Select 5")) x = 5;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 6")) x = 6;
|
if (c.IsPressed($"P{PortNum} Weapon Select 6")) x = 6;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 7")) x = 7;
|
if (c.IsPressed($"P{PortNum} Weapon Select 7")) x = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
|
@ -168,22 +168,22 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
||||||
private static readonly string[] BaseDefinition =
|
private static readonly string[] BaseDefinition =
|
||||||
[
|
[
|
||||||
"Fire",
|
"Fire",
|
||||||
"Action",
|
"Use",
|
||||||
"Alt Weapon",
|
"Alt Weapon",
|
||||||
"Key Forward",
|
"Forward",
|
||||||
"Key Backward",
|
"Backward",
|
||||||
"Key Turn Left",
|
"Turn Left",
|
||||||
"Key Turn Right",
|
"Turn Right",
|
||||||
"Key Strafe Left",
|
"Strafe Left",
|
||||||
"Key Strafe Right",
|
"Strafe Right",
|
||||||
"Key Shift Run",
|
"Run",
|
||||||
"Key Weapon Select 1",
|
"Weapon Select 1",
|
||||||
"Key Weapon Select 2",
|
"Weapon Select 2",
|
||||||
"Key Weapon Select 3",
|
"Weapon Select 3",
|
||||||
"Key Weapon Select 4",
|
"Weapon Select 4",
|
||||||
"Key Weapon Select 5",
|
"Weapon Select 5",
|
||||||
"Key Weapon Select 6",
|
"Weapon Select 6",
|
||||||
"Key Weapon Select 7",
|
"Weapon Select 7",
|
||||||
];
|
];
|
||||||
|
|
||||||
public byte Read(IController c)
|
public byte Read(IController c)
|
||||||
|
@ -191,7 +191,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
||||||
byte result = 0;
|
byte result = 0;
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b0001; }
|
if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b0001; }
|
||||||
if (c.IsPressed($"P{PortNum} Action")) { result |= 0b0010; }
|
if (c.IsPressed($"P{PortNum} Use")) { result |= 0b0010; }
|
||||||
if (c.IsPressed($"P{PortNum} Alt Weapon")) { result |= 0b0100; }
|
if (c.IsPressed($"P{PortNum} Alt Weapon")) { result |= 0b0100; }
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -204,55 +204,55 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
||||||
// Handling running keys overriding axes values
|
// Handling running keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Run Speed")
|
if (Definition.Axes[pot] == $"P{PortNum} Run Speed")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Forward"))
|
if (c.IsPressed($"P{PortNum} Forward"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 50 : 25;
|
x = c.IsPressed($"P{PortNum} Run") ? 50 : 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Key Backward"))
|
if (c.IsPressed($"P{PortNum} Backward"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -50 : -25;
|
x = c.IsPressed($"P{PortNum} Run") ? -50 : -25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handling strafing keys overriding axes values
|
// Handling strafing keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Strafing Speed")
|
if (Definition.Axes[pot] == $"P{PortNum} Strafing Speed")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Strafe Right"))
|
if (c.IsPressed($"P{PortNum} Strafe Right"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 40 : 24;
|
x = c.IsPressed($"P{PortNum} Run") ? 40 : 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Key Strafe Left"))
|
if (c.IsPressed($"P{PortNum} Strafe Left"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -40 : -24;
|
x = c.IsPressed($"P{PortNum} Run") ? -40 : -24;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handling turning keys overriding axes values
|
// Handling turning keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Turning Speed")
|
if (Definition.Axes[pot] == $"P{PortNum} Turning Speed")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Turn Left"))
|
if (c.IsPressed($"P{PortNum} Turn Left"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 5 : 2;
|
x = c.IsPressed($"P{PortNum} Run") ? 5 : 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Key Turn Right"))
|
if (c.IsPressed($"P{PortNum} Turn Right"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -5 : -2;
|
x = c.IsPressed($"P{PortNum} Run") ? -5 : -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handling weapon select keys overriding axes values
|
// Handling weapon select keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Weapon Select")
|
if (Definition.Axes[pot] == $"P{PortNum} Weapon Select")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 1")) x = 1;
|
if (c.IsPressed($"P{PortNum} Weapon Select 1")) x = 1;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 2")) x = 2;
|
if (c.IsPressed($"P{PortNum} Weapon Select 2")) x = 2;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 3")) x = 3;
|
if (c.IsPressed($"P{PortNum} Weapon Select 3")) x = 3;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 4")) x = 4;
|
if (c.IsPressed($"P{PortNum} Weapon Select 4")) x = 4;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 5")) x = 5;
|
if (c.IsPressed($"P{PortNum} Weapon Select 5")) x = 5;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 6")) x = 6;
|
if (c.IsPressed($"P{PortNum} Weapon Select 6")) x = 6;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 7")) x = 7;
|
if (c.IsPressed($"P{PortNum} Weapon Select 7")) x = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
|
@ -287,21 +287,21 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
||||||
private static readonly string[] BaseDefinition =
|
private static readonly string[] BaseDefinition =
|
||||||
[
|
[
|
||||||
"Fire",
|
"Fire",
|
||||||
"Action",
|
"Use",
|
||||||
"Alt Weapon",
|
"Alt Weapon",
|
||||||
"Jump",
|
"Jump",
|
||||||
"End Player",
|
"End Player",
|
||||||
"Key Forward",
|
"Forward",
|
||||||
"Key Backward",
|
"Backward",
|
||||||
"Key Turn Left",
|
"Turn Left",
|
||||||
"Key Turn Right",
|
"Turn Right",
|
||||||
"Key Strafe Left",
|
"Strafe Left",
|
||||||
"Key Strafe Right",
|
"Strafe Right",
|
||||||
"Key Shift Run",
|
"Run",
|
||||||
"Key Weapon Select 1",
|
"Weapon Select 1",
|
||||||
"Key Weapon Select 2",
|
"Weapon Select 2",
|
||||||
"Key Weapon Select 3",
|
"Weapon Select 3",
|
||||||
"Key Weapon Select 4"
|
"Weapon Select 4"
|
||||||
];
|
];
|
||||||
|
|
||||||
public byte Read(IController c)
|
public byte Read(IController c)
|
||||||
|
@ -309,7 +309,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
||||||
byte result = 0;
|
byte result = 0;
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b00001; }
|
if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b00001; }
|
||||||
if (c.IsPressed($"P{PortNum} Action")) { result |= 0b00010; }
|
if (c.IsPressed($"P{PortNum} Use")) { result |= 0b00010; }
|
||||||
if (c.IsPressed($"P{PortNum} Alt Weapon")) { result |= 0b00100; }
|
if (c.IsPressed($"P{PortNum} Alt Weapon")) { result |= 0b00100; }
|
||||||
if (c.IsPressed($"P{PortNum} Jump")) { result |= 0b01000; }
|
if (c.IsPressed($"P{PortNum} Jump")) { result |= 0b01000; }
|
||||||
if (c.IsPressed($"P{PortNum} End Player")) { result |= 0b10000; }
|
if (c.IsPressed($"P{PortNum} End Player")) { result |= 0b10000; }
|
||||||
|
@ -324,52 +324,52 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
||||||
// Handling running keys overriding axes values
|
// Handling running keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Run Speed")
|
if (Definition.Axes[pot] == $"P{PortNum} Run Speed")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Forward"))
|
if (c.IsPressed($"P{PortNum} Forward"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 50 : 25;
|
x = c.IsPressed($"P{PortNum} Run") ? 50 : 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Key Backward"))
|
if (c.IsPressed($"P{PortNum} Backward"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -50 : -25;
|
x = c.IsPressed($"P{PortNum} Run") ? -50 : -25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handling strafing keys overriding axes values
|
// Handling strafing keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Strafing Speed")
|
if (Definition.Axes[pot] == $"P{PortNum} Strafing Speed")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Strafe Right"))
|
if (c.IsPressed($"P{PortNum} Strafe Right"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 40 : 24;
|
x = c.IsPressed($"P{PortNum} Run") ? 40 : 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Key Strafe Left"))
|
if (c.IsPressed($"P{PortNum} Strafe Left"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -40 : -24;
|
x = c.IsPressed($"P{PortNum} Run") ? -40 : -24;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handling turning keys overriding axes values
|
// Handling turning keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Turning Speed")
|
if (Definition.Axes[pot] == $"P{PortNum} Turning Speed")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Turn Left"))
|
if (c.IsPressed($"P{PortNum} Turn Left"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 5 : 2;
|
x = c.IsPressed($"P{PortNum} Run") ? 5 : 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.IsPressed($"P{PortNum} Key Turn Right"))
|
if (c.IsPressed($"P{PortNum} Turn Right"))
|
||||||
{
|
{
|
||||||
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -5 : -2;
|
x = c.IsPressed($"P{PortNum} Run") ? -5 : -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handling weapon select keys overriding axes values
|
// Handling weapon select keys overriding axes values
|
||||||
if (Definition.Axes[pot] == $"P{PortNum} Weapon Select")
|
if (Definition.Axes[pot] == $"P{PortNum} Weapon Select")
|
||||||
{
|
{
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 1")) x = 1;
|
if (c.IsPressed($"P{PortNum} Weapon Select 1")) x = 1;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 2")) x = 2;
|
if (c.IsPressed($"P{PortNum} Weapon Select 2")) x = 2;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 3")) x = 3;
|
if (c.IsPressed($"P{PortNum} Weapon Select 3")) x = 3;
|
||||||
if (c.IsPressed($"P{PortNum} Key Weapon Select 4")) x = 4;
|
if (c.IsPressed($"P{PortNum} Weapon Select 4")) x = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit e1a352844f260e61ac0aa75d2a63941b26c4ab0e
|
Subproject commit f34f64c861dde729e0990153715bef9b0cebc70c
|
Loading…
Reference in New Issue