SNES - hook up autofire controllers, also probably hooked up player 3 & 4 that were probably not working up to now

This commit is contained in:
adelikat 2012-09-26 01:20:11 +00:00
parent 1f931b1551
commit 2f8ce5e1d1
5 changed files with 33 additions and 7 deletions

View File

@ -49,6 +49,11 @@ namespace BizHawk.MultiClient
PCEAutoController[3] = new PCEControllerTemplate(false);
PCEAutoController[4] = new PCEControllerTemplate(false);
SNESAutoController[0] = new SNESControllerTemplate(false);
SNESAutoController[1] = new SNESControllerTemplate(false);
SNESAutoController[2] = new SNESControllerTemplate(false);
SNESAutoController[3] = new SNESControllerTemplate(false);
ColecoController = new ColecoVisionControllerTemplate(true);
}
@ -611,6 +616,7 @@ namespace BizHawk.MultiClient
//SNES settings
public SNESControllerTemplate[] SNESController = new SNESControllerTemplate[4];
public SNESControllerTemplate[] SNESAutoController = new SNESControllerTemplate[4];
//TI 83 settings
public TI83ControllerTemplate[] TI83Controller = new TI83ControllerTemplate[1];

View File

@ -37,6 +37,7 @@ namespace BizHawk.MultiClient
public static AutofireController AutofireNullControls;
public static AutofireController AutofireNESControls;
public static AutofireController AutofireSNESControls;
public static AutofireController AutofireSMSControls;
public static AutofireController AutofirePCEControls;
public static AutofireController AutofireGBControls;

View File

@ -747,7 +747,7 @@ namespace BizHawk.MultiClient
var snesControls = new Controller(LibsnesCore.SNESController);
for (int i = 0; i < 2 /*TODO*/; i++)
for (int i = 0; i < 4; i++)
{
snesControls.BindMulti("P" + (i + 1) + " Up", Global.Config.SNESController[i].Up);
snesControls.BindMulti("P" + (i + 1) + " Down", Global.Config.SNESController[i].Down);
@ -764,8 +764,28 @@ namespace BizHawk.MultiClient
}
Global.SNESControls = snesControls;
var nesControls = new Controller(NES.NESController);
var asnesControls = new AutofireController(LibsnesCore.SNESController);
asnesControls.Autofire = true;
for (int i = 0; i < 4; i++)
{
asnesControls.BindMulti("P" + (i + 1) + " Up", Global.Config.SNESAutoController[i].Up);
asnesControls.BindMulti("P" + (i + 1) + " Down", Global.Config.SNESAutoController[i].Down);
asnesControls.BindMulti("P" + (i + 1) + " Left", Global.Config.SNESAutoController[i].Left);
asnesControls.BindMulti("P" + (i + 1) + " Right", Global.Config.SNESAutoController[i].Right);
asnesControls.BindMulti("P" + (i + 1) + " A", Global.Config.SNESAutoController[i].A);
asnesControls.BindMulti("P" + (i + 1) + " B", Global.Config.SNESAutoController[i].B);
asnesControls.BindMulti("P" + (i + 1) + " X", Global.Config.SNESAutoController[i].X);
asnesControls.BindMulti("P" + (i + 1) + " Y", Global.Config.SNESAutoController[i].Y);
asnesControls.BindMulti("P" + (i + 1) + " L", Global.Config.SNESAutoController[i].L);
asnesControls.BindMulti("P" + (i + 1) + " R", Global.Config.SNESAutoController[i].R);
asnesControls.BindMulti("P" + (i + 1) + " Select", Global.Config.SNESAutoController[i].Select);
asnesControls.BindMulti("P" + (i + 1) + " Start", Global.Config.SNESAutoController[i].Start);
}
Global.AutofireSNESControls = asnesControls;
var nesControls = new Controller(NES.NESController);
for (int i = 0; i < 2 /*TODO*/; i++)
{
nesControls.BindMulti("P" + (i + 1) + " Up", Global.Config.NESController[i].Up);
@ -1186,6 +1206,7 @@ namespace BizHawk.MultiClient
break;
case "SNES":
Global.ActiveController = Global.SNESControls;
Global.AutoFireController = Global.AutofireSNESControls;
break;
case "GB":
Global.ActiveController = Global.GBControls;
@ -2725,7 +2746,7 @@ namespace BizHawk.MultiClient
"Genesis (experimental)", "*.gen;*.smd;*.bin;*.md;*.cue;%ARCH%",
"Gameboy", "*.gb;*.gbc;%ARCH%",
"Colecovision (very experimental)", "*.col;%ARCH%",
"Intellivision (very experimental)", "*.int;*.bin;*.rom;%ARCH%",
"Intellivision (very experimental)", "*.int;*.bin;*.rom;%ARCH%",
"PSX Executables (very experimental)", "*.exe",
"All Files", "*.*");
}

View File

@ -125,6 +125,7 @@ namespace BizHawk.MultiClient
case "SNES":
ControllerImage.Image = BizHawk.MultiClient.Properties.Resources.SNES_Controller;
controller = Global.Config.SNESController;
autoController = Global.Config.SNESAutoController;
break;
default:
return;
@ -296,6 +297,7 @@ namespace BizHawk.MultiClient
break;
case "SNES":
controller = Global.Config.SNESController;
autoController = Global.Config.SNESAutoController;
break;
case "PC Engine / SuperGrafx":
controller = Global.Config.PCEController;

View File

@ -12,12 +12,8 @@ namespace BizHawk.MultiClient
public partial class MessageConfig : Form
{
//TODO:
//Implement message position as a variable
//Make a checkbox to enable/disable the stacking effect of message label
//Deal with typing into Numerics properly
//Have some method of binding a display object to top/bottom/left/right instead of an absolute position
//Bug: restore defaults doesn't restore the y value of whatever radio is checked
//Implement Multitrack messages counter config
int DispFPSx = Global.Config.DispFPSx;
int DispFPSy = Global.Config.DispFPSy;