2014-06-23 13:44:06 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
|
2016-12-06 01:33:21 +00:00
|
|
|
|
using BizHawk.Emulation.Common;
|
2014-06-22 15:43:45 +00:00
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.EmuHawk
|
|
|
|
|
{
|
2017-07-12 19:40:10 +00:00
|
|
|
|
[Schema("PCECD")]
|
2017-04-15 20:37:30 +00:00
|
|
|
|
public class PceCdSchema : PceSchema { }
|
2016-07-11 02:13:40 +00:00
|
|
|
|
|
2017-07-12 19:40:10 +00:00
|
|
|
|
[Schema("PCE")]
|
2014-06-23 13:44:06 +00:00
|
|
|
|
public class PceSchema : IVirtualPadSchema
|
2014-06-22 15:43:45 +00:00
|
|
|
|
{
|
2016-12-06 01:33:21 +00:00
|
|
|
|
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core)
|
2014-06-23 13:44:06 +00:00
|
|
|
|
{
|
2016-12-06 01:33:21 +00:00
|
|
|
|
for (var i = 0; i < core.ControllerDefinition.PlayerCount; i++)
|
2014-06-28 15:56:20 +00:00
|
|
|
|
{
|
2014-06-29 13:05:10 +00:00
|
|
|
|
yield return StandardController(i + 1);
|
2014-06-28 15:56:20 +00:00
|
|
|
|
}
|
2014-06-23 13:44:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
2017-05-24 14:07:03 +00:00
|
|
|
|
private static PadSchema StandardController(int controller)
|
2014-06-22 15:43:45 +00:00
|
|
|
|
{
|
|
|
|
|
return new PadSchema
|
|
|
|
|
{
|
2014-06-23 01:43:33 +00:00
|
|
|
|
IsConsole = false,
|
2014-06-28 22:50:57 +00:00
|
|
|
|
DefaultSize = new Size(174, 90),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Buttons = new[]
|
|
|
|
|
{
|
2017-04-29 20:41:27 +00:00
|
|
|
|
new PadSchema.ButtonSchema
|
2014-06-23 01:43:33 +00:00
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " Up",
|
|
|
|
|
DisplayName = "",
|
|
|
|
|
Icon = Properties.Resources.BlueUp,
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(14, 12),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
2017-04-29 20:41:27 +00:00
|
|
|
|
new PadSchema.ButtonSchema
|
2014-06-23 01:43:33 +00:00
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " Down",
|
|
|
|
|
DisplayName = "",
|
|
|
|
|
Icon = Properties.Resources.BlueDown,
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(14, 56),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
2017-04-29 20:41:27 +00:00
|
|
|
|
new PadSchema.ButtonSchema
|
2014-06-23 01:43:33 +00:00
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " Left",
|
|
|
|
|
DisplayName = "",
|
|
|
|
|
Icon = Properties.Resources.Back,
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(2, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
2017-04-29 20:41:27 +00:00
|
|
|
|
new PadSchema.ButtonSchema
|
2014-06-23 01:43:33 +00:00
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " Right",
|
|
|
|
|
DisplayName = "",
|
|
|
|
|
Icon = Properties.Resources.Forward,
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(24, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
2017-04-29 20:41:27 +00:00
|
|
|
|
new PadSchema.ButtonSchema
|
2014-06-23 01:43:33 +00:00
|
|
|
|
{
|
2014-08-01 01:39:07 +00:00
|
|
|
|
Name = "P" + controller + " B2",
|
2014-06-23 01:43:33 +00:00
|
|
|
|
DisplayName = "II",
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(122, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
2017-04-29 20:41:27 +00:00
|
|
|
|
new PadSchema.ButtonSchema
|
2014-06-23 01:43:33 +00:00
|
|
|
|
{
|
2014-08-01 01:39:07 +00:00
|
|
|
|
Name = "P" + controller + " B1",
|
2014-06-23 01:43:33 +00:00
|
|
|
|
DisplayName = "I",
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(146, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
2017-04-29 20:41:27 +00:00
|
|
|
|
new PadSchema.ButtonSchema
|
2014-06-23 01:43:33 +00:00
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " Select",
|
|
|
|
|
DisplayName = "s",
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(52, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
2017-04-29 20:41:27 +00:00
|
|
|
|
new PadSchema.ButtonSchema
|
2014-06-23 01:43:33 +00:00
|
|
|
|
{
|
2014-08-01 01:39:07 +00:00
|
|
|
|
Name = "P" + controller + " Run",
|
2014-06-23 01:43:33 +00:00
|
|
|
|
DisplayName = "R",
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(74, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-06-22 15:43:45 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|