Atari - hook up console select and reset buttons to config file. Still TODO: add to input config dialog, modify mnemonics

This commit is contained in:
andres.delikat 2012-03-30 16:40:52 +00:00
parent 4240c119b6
commit 724fe704fc
4 changed files with 24 additions and 2 deletions

View File

@ -193,7 +193,7 @@ namespace BizHawk
{
byte value = 0xFF;
bool select = false;
bool select = Controller["Select"];
bool reset = Controller["Reset"];
bool bw = false;
bool p0difficulty = true;

View File

@ -39,7 +39,7 @@ namespace BizHawk
{
"P1 Up", "P1 Down", "P1 Left", "P1 Right", "P1 Button",
"P2 Up", "P2 Down", "P2 Left", "P2 Right", "P2 Button",
"Reset",
"Reset", "Select"
}
};

View File

@ -27,6 +27,7 @@ namespace BizHawk.MultiClient
Atari2600Controller[1] = new Atari2600ControllerTemplate(false);
Atari2600AutoController[0] = new Atari2600ControllerTemplate(false);
Atari2600AutoController[1] = new Atari2600ControllerTemplate(false);
Atari2600ConsoleButtons[0] = new Atari2600ConsoleButtonsTemplate(true);
NESAutoController[0] = new NESControllerTemplate(false);
NESAutoController[1] = new NESControllerTemplate(false);
@ -487,6 +488,7 @@ namespace BizHawk.MultiClient
//Atari 2600 Settings
public Atari2600ControllerTemplate[] Atari2600Controller = new Atari2600ControllerTemplate[2];
public Atari2600ControllerTemplate[] Atari2600AutoController = new Atari2600ControllerTemplate[2];
public Atari2600ConsoleButtonsTemplate[] Atari2600ConsoleButtons = new Atari2600ConsoleButtonsTemplate[1];
//GameBoy Settings
public NESControllerTemplate GameBoyController = new NESControllerTemplate(true);
@ -723,6 +725,24 @@ namespace BizHawk.MultiClient
}
}
public class Atari2600ConsoleButtonsTemplate
{
public string Reset = "";
public string Select = "";
public bool Enabled;
public Atari2600ConsoleButtonsTemplate() { }
public Atari2600ConsoleButtonsTemplate(bool defaults)
{
if (defaults)
{
Enabled = true;
Reset = "";
Select = "";
}
}
}
public class TI83ControllerTemplate
{
public string _0;

View File

@ -694,6 +694,8 @@ namespace BizHawk.MultiClient
a2600Controls.BindMulti("P2 Right", Global.Config.Atari2600Controller[1].Right);
a2600Controls.BindMulti("P2 Down", Global.Config.Atari2600Controller[1].Down);
a2600Controls.BindMulti("P2 Button", Global.Config.Atari2600Controller[1].Button);
a2600Controls.BindMulti("Reset", Global.Config.Atari2600ConsoleButtons[0].Reset);
a2600Controls.BindMulti("Select", Global.Config.Atari2600ConsoleButtons[0].Select);
Global.Atari2600Controls = a2600Controls;
var autofireA2600Controls = new AutofireController(Atari2600.Atari2600ControllerDefinition);