Add microphone button for melonDS
This changes the behavior so the user just has to press the microphone button to blow the mic, where the volume of the blowing can be controlled with the mic volume axis (but now the neutral value of mic volume is 100 rather than 0)
This commit is contained in:
parent
1ce8b855c7
commit
aeda8f1659
|
@ -145,7 +145,8 @@
|
|||
"R": "E, J1 B6, X1 RightShoulder",
|
||||
"Select": "Space, J1 B9, X1 Back",
|
||||
"Start": "Enter, J1 B10, X1 Start",
|
||||
"Touch": "WMouse L"
|
||||
"Touch": "WMouse L",
|
||||
"Microphone": "M"
|
||||
},
|
||||
"Atari 2600 Basic Controller": {
|
||||
"Reset": "D, J1 B9, X1 Back",
|
||||
|
|
|
@ -510,6 +510,7 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
["LidOpen"] = 'o',
|
||||
["LidClose"] = 'c',
|
||||
["Microphone"] = 'M',
|
||||
["Touch"] = 'T'
|
||||
},
|
||||
[VSystemID.Raw.O2] = new()
|
||||
|
|
|
@ -15,10 +15,10 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
BoolButtons =
|
||||
{
|
||||
"Up", "Down", "Left", "Right", "Start", "Select", "B", "A", "Y", "X", "L", "R", "LidOpen", "LidClose", "Touch", "Power"
|
||||
"Up", "Down", "Left", "Right", "Start", "Select", "B", "A", "Y", "X", "L", "R", "LidOpen", "LidClose", "Touch", "Microphone", "Power"
|
||||
}
|
||||
}.AddXYPair("Touch {0}", AxisPairOrientation.RightAndUp, 0.RangeTo(255), 128, 0.RangeTo(191), 96) //TODO verify direction against hardware
|
||||
.AddAxis("Mic Volume", 0.RangeTo(100), 0)
|
||||
.AddAxis("Mic Volume", 0.RangeTo(100), 100)
|
||||
.AddAxis("GBA Light Sensor", 0.RangeTo(10), 0)
|
||||
.MakeImmutable();
|
||||
|
||||
|
@ -97,6 +97,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
controller["LidOpen"] = false;
|
||||
controller["LidClose"] = false;
|
||||
controller["Microphone"] = false;
|
||||
controller["Power"] = false;
|
||||
|
||||
string[] sections = line.Split(new[] {'|'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
@ -131,7 +132,7 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
("Touch X", touchX),
|
||||
("Touch Y", touchY),
|
||||
("Mic Volume", 0),
|
||||
("Mic Volume", 100),
|
||||
("GBA Light Sensor", 0),
|
||||
});
|
||||
}
|
||||
|
|
|
@ -416,10 +416,10 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
|||
{
|
||||
BoolButtons =
|
||||
{
|
||||
"Up", "Down", "Left", "Right", "Start", "Select", "B", "A", "Y", "X", "L", "R", "LidOpen", "LidClose", "Touch", "Power"
|
||||
"Up", "Down", "Left", "Right", "Start", "Select", "B", "A", "Y", "X", "L", "R", "LidOpen", "LidClose", "Touch", "Microphone", "Power"
|
||||
}
|
||||
}.AddXYPair("Touch {0}", AxisPairOrientation.RightAndUp, 0.RangeTo(255), 128, 0.RangeTo(191), 96)
|
||||
.AddAxis("Mic Volume", (0).RangeTo(100), 0)
|
||||
.AddAxis("Mic Volume", 0.RangeTo(100), 100)
|
||||
.AddAxis("GBA Light Sensor", 0.RangeTo(10), 0)
|
||||
.MakeImmutable();
|
||||
|
||||
|
@ -480,7 +480,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
|||
Keys = GetButtons(controller),
|
||||
TouchX = (byte)controller.AxisValue("Touch X"),
|
||||
TouchY = (byte)controller.AxisValue("Touch Y"),
|
||||
MicVolume = (byte)controller.AxisValue("Mic Volume"),
|
||||
MicVolume = (byte)(controller.IsPressed("Microphone") ? controller.AxisValue("Mic Volume") : 0),
|
||||
GBALightSensor = (byte)controller.AxisValue("GBA Light Sensor"),
|
||||
ConsiderAltLag = (byte)(_settings.ConsiderAltLag ? 1 : 0),
|
||||
};
|
||||
|
|
|
@ -52,7 +52,8 @@ namespace BizHawk.Emulation.Cores
|
|||
{
|
||||
new ButtonSchema(8, 18, "LidOpen") { DisplayName = "Lid Open" },
|
||||
new ButtonSchema(68, 18, "LidClose") { DisplayName = "Lid Close" },
|
||||
new ButtonSchema(128, 18, "Power"),
|
||||
new ButtonSchema(128, 18, "Microphone") { DisplayName = "Mic" },
|
||||
new ButtonSchema(163, 18, "Power"),
|
||||
|
||||
new SingleAxisSchema(10, 63, "Mic Volume")
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue