Support Oeka Kids Tablet in virtualpads and bk2 mnemonics, oh yeah

This commit is contained in:
adelikat 2014-06-25 00:44:22 +00:00
parent 9045f8402c
commit fbb14175f9
2 changed files with 58 additions and 2 deletions

View File

@ -118,6 +118,8 @@ namespace BizHawk.Client.Common
{ "PP10", 'A' },
{ "PP11", 'B' },
{ "PP12", 'C' },
{ "Click", 'C' },
{ "Touch", 'T' },
}
},
{

View File

@ -25,6 +25,22 @@ namespace BizHawk.Client.EmuHawk
switch (ss.Controls.FamicomExpPort)
{
default:
case "UnpluggedFam":
break;
case "Zapper":
yield return new VirtualPad(Zapper(3));
break;
case "ArkanoidFam":
yield return new VirtualPad(ArkanoidPaddle(3));
break;
case "Famicom4P":
yield return new VirtualPad(StandardController(3));
yield return new VirtualPad(StandardController(4));
break;
case "FamilyBasicKeyboard":
break;
case "OekaKids":
yield return new VirtualPad(OekaKidsTablet(3));
break;
}
}
@ -35,7 +51,6 @@ namespace BizHawk.Client.EmuHawk
{
default:
case "UnpluggedNES":
case "UnpluggedFam":
break;
case "ControllerNES":
yield return new VirtualPad(StandardController(1));
@ -302,7 +317,6 @@ namespace BizHawk.Client.EmuHawk
};
}
// TODO
private static PadSchema PowerPad(int controller)
{
return new PadSchema
@ -400,5 +414,45 @@ namespace BizHawk.Client.EmuHawk
}
};
}
private static PadSchema OekaKidsTablet(int controller)
{
return new PadSchema
{
DisplayName = "Zapper",
IsConsole = false,
DefaultSize = new Size(356, 260),
MaxSize = new Size(356, 260),
Buttons = new[]
{
new PadSchema.ButtonScema
{
Name = "P" + controller + " Pen X",
Location = new Point(14, 17),
Type = PadSchema.PadInputType.TargetedPair,
TargetSize = new Size(256, 240),
SecondaryNames = new []
{
"P" + controller + " Pen Y",
"P" + controller + " Click",
}
},
new PadSchema.ButtonScema
{
Name = "P" + controller + " Click",
DisplayName = "Click",
Location = new Point(284, 17),
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "P" + controller + " Touch",
DisplayName = "Touch",
Location = new Point(284, 48),
Type = PadSchema.PadInputType.Boolean
}
}
};
}
}
}