justifier

This commit is contained in:
nattthebear 2017-04-22 10:41:45 -04:00
parent 9a0493c287
commit 12b4be4fbc
1 changed files with 12 additions and 6 deletions

View File

@ -384,18 +384,24 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
BoolButtons = new List<string> BoolButtons = new List<string>
{ {
"0Trigger", "0Trigger",
"0Start" "0Start",
"1Trigger",
"1Start"
}, },
FloatControls = FloatControls =
{ {
"0Justifier X", "0Justifier X",
"0Justifier Y" "0Justifier Y",
"1Justifier X",
"1Justifier Y",
}, },
FloatRanges = FloatRanges =
{ {
// problem: when you're in 240 line mode, the limit on Y needs to be 240. // problem: when you're in 240 line mode, the limit on Y needs to be 240.
// when you're in 224 mode, it needs to be 224. perhaps the deck needs to account for this... // when you're in 224 mode, it needs to be 224. perhaps the deck needs to account for this...
new[] { 0f, 128f, 256f }, new[] { 0f, 128f, 256f },
new[] { 0f, 0f, 240f },
new[] { 0f, 128f, 256f },
new[] { 0f, 0f, 240f } new[] { 0f, 0f, 240f }
} }
}; };
@ -409,15 +415,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
default: default:
return 0; return 0;
case 0: case 0:
var x = (int)controller.GetFloat("0Justifier X"); var x = (int)controller.GetFloat(index + "Justifier X");
return (short)x; return (short)x;
case 1: case 1:
var y = (int)controller.GetFloat("0Justifier Y"); var y = (int)controller.GetFloat(index + "Justifier Y");
return (short)y; return (short)y;
case 2: case 2:
return (short)(controller.IsPressed("0Trigger") ? 1 : 0); return (short)(controller.IsPressed(index + "Trigger") ? 1 : 0);
case 3: case 3:
return (short)(controller.IsPressed("0Start") ? 1 : 0); return (short)(controller.IsPressed(index + "Start") ? 1 : 0);
} }
} }
} }