Add NES controllers to config and Input dialog.
This commit is contained in:
parent
3cf44657c1
commit
2b145b5d6e
|
@ -300,6 +300,9 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="config\ControllerImages\GENController.png" />
|
<None Include="config\ControllerImages\GENController.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="config\ControllerImages\NESController.PNG" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|
|
@ -11,6 +11,10 @@
|
||||||
PCEController[2] = new PCEControllerTemplate(false);
|
PCEController[2] = new PCEControllerTemplate(false);
|
||||||
PCEController[3] = new PCEControllerTemplate(false);
|
PCEController[3] = new PCEControllerTemplate(false);
|
||||||
PCEController[4] = new PCEControllerTemplate(false);
|
PCEController[4] = new PCEControllerTemplate(false);
|
||||||
|
NESController[0] = new NESControllerTemplate(true);
|
||||||
|
NESController[1] = new NESControllerTemplate(false);
|
||||||
|
NESController[2] = new NESControllerTemplate(false);
|
||||||
|
NESController[3] = new NESControllerTemplate(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// General Client Settings
|
// General Client Settings
|
||||||
|
@ -118,7 +122,9 @@
|
||||||
public string GenP1Start = "J1 B10, Return";
|
public string GenP1Start = "J1 B10, Return";
|
||||||
|
|
||||||
//GameBoy Settings
|
//GameBoy Settings
|
||||||
public NESControllerTemplate GameBoyController = new NESControllerTemplate();
|
public NESControllerTemplate GameBoyController = new NESControllerTemplate(true);
|
||||||
|
|
||||||
|
public NESControllerTemplate[] NESController = new NESControllerTemplate[4];
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SMSControllerTemplate
|
public class SMSControllerTemplate
|
||||||
|
@ -201,16 +207,31 @@
|
||||||
public string B;
|
public string B;
|
||||||
public string Start;
|
public string Start;
|
||||||
public string Select;
|
public string Select;
|
||||||
public NESControllerTemplate()
|
public NESControllerTemplate() { }
|
||||||
|
public NESControllerTemplate(bool defaults)
|
||||||
{
|
{
|
||||||
Up = "J1 Up";
|
if (defaults)
|
||||||
Down = "J1 Down";
|
{
|
||||||
Left = "J1 Left";
|
Up = "J1 Up, UpArrow";
|
||||||
Right = "J1 Right";
|
Down = "J1 Down, DownArrow";
|
||||||
A = "J1 B1, Z";
|
Left = "J1 Left, LeftArrow";
|
||||||
B = "J1 B2, X";
|
Right = "J1 Right, RightArrow";
|
||||||
Start = "J1 B10, Return";
|
A = "J1 B1, Z";
|
||||||
Select = "J1 B9, Space";
|
B = "J1 B2, X";
|
||||||
|
Start = "J1 B10, Return";
|
||||||
|
Select = "J1 B9, Space";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Up = "";
|
||||||
|
Down = "";
|
||||||
|
Right = "";
|
||||||
|
Left = "";
|
||||||
|
A = "";
|
||||||
|
B = "";
|
||||||
|
Start = "";
|
||||||
|
Select = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:2.0.50727.3615
|
// Runtime Version:2.0.50727.3053
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
|
@ -109,6 +109,13 @@ namespace BizHawk.MultiClient.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap NESController {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("NESController", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static System.Drawing.Bitmap PCEngineController {
|
internal static System.Drawing.Bitmap PCEngineController {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("PCEngineController", resourceCulture);
|
object obj = ResourceManager.GetObject("PCEngineController", resourceCulture);
|
||||||
|
|
|
@ -136,6 +136,9 @@
|
||||||
<data name="GENController" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="GENController" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\config\ControllerImages\GENController.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\config\ControllerImages\GENController.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="NESController" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\config\ControllerImages\NESController.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="InserSeparator" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="InserSeparator" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\images\InserSeparator.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\images\InserSeparator.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
|
@ -149,7 +149,8 @@
|
||||||
"PC Engine / SGX",
|
"PC Engine / SGX",
|
||||||
"Gameboy",
|
"Gameboy",
|
||||||
"Sega Genesis",
|
"Sega Genesis",
|
||||||
"TI-83"});
|
"TI-83",
|
||||||
|
"NES"});
|
||||||
this.SystemComboBox.Location = new System.Drawing.Point(6, 19);
|
this.SystemComboBox.Location = new System.Drawing.Point(6, 19);
|
||||||
this.SystemComboBox.Name = "SystemComboBox";
|
this.SystemComboBox.Name = "SystemComboBox";
|
||||||
this.SystemComboBox.Size = new System.Drawing.Size(146, 21);
|
this.SystemComboBox.Size = new System.Drawing.Size(146, 21);
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace BizHawk.MultiClient
|
||||||
if (x != -1)
|
if (x != -1)
|
||||||
return oldmap.Substring(0, x + 2) + button;
|
return oldmap.Substring(0, x + 2) + button;
|
||||||
else
|
else
|
||||||
return oldmap + ", " + button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DoSMS()
|
private void DoSMS()
|
||||||
|
@ -133,8 +133,7 @@ namespace BizHawk.MultiClient
|
||||||
ButtonMappings[4] = TruncateButtonMapping(Global.Config.PCEController[jpad].I);
|
ButtonMappings[4] = TruncateButtonMapping(Global.Config.PCEController[jpad].I);
|
||||||
ButtonMappings[5] = TruncateButtonMapping(Global.Config.PCEController[jpad].II);
|
ButtonMappings[5] = TruncateButtonMapping(Global.Config.PCEController[jpad].II);
|
||||||
ButtonMappings[6] = TruncateButtonMapping(Global.Config.PCEController[jpad].Run);
|
ButtonMappings[6] = TruncateButtonMapping(Global.Config.PCEController[jpad].Run);
|
||||||
ButtonMappings[7] = TruncateButtonMapping(Global.Config.PCEController[jpad].Select);
|
ButtonMappings[7] = TruncateButtonMapping(Global.Config.PCEController[jpad].Select);
|
||||||
Changed = true;
|
|
||||||
Labels.Clear();
|
Labels.Clear();
|
||||||
TextBoxes.Clear();
|
TextBoxes.Clear();
|
||||||
for (int i = 0; i < PCEControlList.Length; i++)
|
for (int i = 0; i < PCEControlList.Length; i++)
|
||||||
|
@ -200,7 +199,37 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
private void DoNES()
|
private void DoNES()
|
||||||
{
|
{
|
||||||
|
Label TempLabel;
|
||||||
|
InputWidget TempTextBox;
|
||||||
this.Text = ControllerStr + "NES";
|
this.Text = ControllerStr + "NES";
|
||||||
|
ControllerImage.Image = BizHawk.MultiClient.Properties.Resources.NESController;
|
||||||
|
int jpad = this.ControllComboBox.SelectedIndex;
|
||||||
|
string[] ButtonMappings = new string[NESControlList.Length];
|
||||||
|
ButtonMappings[0] = TruncateButtonMapping(Global.Config.NESController[jpad].Up);
|
||||||
|
ButtonMappings[1] = TruncateButtonMapping(Global.Config.NESController[jpad].Down);
|
||||||
|
ButtonMappings[2] = TruncateButtonMapping(Global.Config.NESController[jpad].Left);
|
||||||
|
ButtonMappings[3] = TruncateButtonMapping(Global.Config.NESController[jpad].Right);
|
||||||
|
ButtonMappings[4] = TruncateButtonMapping(Global.Config.NESController[jpad].A);
|
||||||
|
ButtonMappings[5] = TruncateButtonMapping(Global.Config.NESController[jpad].B);
|
||||||
|
ButtonMappings[6] = TruncateButtonMapping(Global.Config.NESController[jpad].Start);
|
||||||
|
ButtonMappings[7] = TruncateButtonMapping(Global.Config.NESController[jpad].Select);
|
||||||
|
Changed = true;
|
||||||
|
Labels.Clear();
|
||||||
|
TextBoxes.Clear();
|
||||||
|
for (int i = 0; i < NESControlList.Length; i++)
|
||||||
|
{
|
||||||
|
TempLabel = new Label();
|
||||||
|
TempLabel.Text = NESControlList[i];
|
||||||
|
TempLabel.Location = new Point(8, 20 + (i * 24));
|
||||||
|
Labels.Add(TempLabel);
|
||||||
|
TempTextBox = new InputWidget();
|
||||||
|
TempTextBox.Location = new Point(48, 20 + (i * 24));
|
||||||
|
TextBoxes.Add(TempTextBox);
|
||||||
|
TempTextBox.Text = ButtonMappings[i];
|
||||||
|
ButtonsGroupBox.Controls.Add(TempTextBox);
|
||||||
|
ButtonsGroupBox.Controls.Add(TempLabel);
|
||||||
|
}
|
||||||
|
Changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DoGameBoy()
|
private void DoGameBoy()
|
||||||
|
@ -315,7 +344,7 @@ namespace BizHawk.MultiClient
|
||||||
UpdatePCE(CurSelectController);
|
UpdatePCE(CurSelectController);
|
||||||
break;
|
break;
|
||||||
case "Gameboy":
|
case "Gameboy":
|
||||||
//UpdateGB();
|
UpdateGameBoy();
|
||||||
break;
|
break;
|
||||||
case "Sega Genesis":
|
case "Sega Genesis":
|
||||||
//UpdateGenesis();
|
//UpdateGenesis();
|
||||||
|
@ -346,13 +375,15 @@ namespace BizHawk.MultiClient
|
||||||
UpdatePCE(CurSelectController);
|
UpdatePCE(CurSelectController);
|
||||||
break;
|
break;
|
||||||
case "Gameboy":
|
case "Gameboy":
|
||||||
//UpdateGB();
|
UpdateGameBoy();
|
||||||
break;
|
break;
|
||||||
case "Sega Genesis":
|
case "Sega Genesis":
|
||||||
//UpdateGenesis();
|
//UpdateGenesis();
|
||||||
break;
|
break;
|
||||||
case "TI-83":
|
case "TI-83":
|
||||||
//Update TI-83();
|
//Update TI-83();
|
||||||
|
break;
|
||||||
|
case "NES":
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Changed = false;
|
Changed = false;
|
||||||
|
@ -373,8 +404,11 @@ namespace BizHawk.MultiClient
|
||||||
joypads = 8;
|
joypads = 8;
|
||||||
break;
|
break;
|
||||||
case "TI-83":
|
case "TI-83":
|
||||||
joypads = 1;
|
joypads = 1;
|
||||||
break;
|
break;
|
||||||
|
case "NES":
|
||||||
|
joypads = 4;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
ControllComboBox.Items.Clear();
|
ControllComboBox.Items.Clear();
|
||||||
for (int i = 0; i < joypads; i++)
|
for (int i = 0; i < joypads; i++)
|
||||||
|
@ -395,10 +429,10 @@ namespace BizHawk.MultiClient
|
||||||
UpdateSMS(CurSelectController);
|
UpdateSMS(CurSelectController);
|
||||||
break;
|
break;
|
||||||
case "PC Engine / SGX":
|
case "PC Engine / SGX":
|
||||||
//UpdatePCE(CurSelectController);
|
UpdatePCE(CurSelectController);
|
||||||
break;
|
break;
|
||||||
case "Gameboy":
|
case "Gameboy":
|
||||||
//UpdateGB();
|
UpdateGameBoy();
|
||||||
break;
|
break;
|
||||||
case "Sega Genesis":
|
case "Sega Genesis":
|
||||||
//UpdateGenesis();
|
//UpdateGenesis();
|
||||||
|
|
Loading…
Reference in New Issue