Skip to content

Commit

Permalink
Added Wii Drums support.
Browse files Browse the repository at this point in the history
  • Loading branch information
CristobalPenaloza committed Apr 21, 2020
1 parent aa213b8 commit 131541a
Show file tree
Hide file tree
Showing 10 changed files with 609 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Nintroller/INPUT_NAMES.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,25 @@ public static class WII_GUITAR
public const string HOME = "wgtHOME";
}

public static class WII_DRUMS
{
public const string G = "wdrG";
public const string R = "wdrR";
public const string Y = "wdrY";
public const string B = "wdrB";
public const string O = "wdrO";
public const string BASS = "wdrBASS";

public const string UP = "wdrUP";
public const string DOWN = "wdrDOWN";
public const string LEFT = "wdrLEFT";
public const string RIGHT = "wdrRIGHT";

public const string SELECT = "wdrSELECT";
public const string START = "wdrSTART";
public const string HOME = "wdrHOME";
}

public static class PRO_CONTROLLER
{
public const string A = "proA";
Expand Down
15 changes: 15 additions & 0 deletions Nintroller/Nintroller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,21 @@ private void ParseReport(byte[] report)
//break;

case ControllerType.Drums:
_state = new WiiDrums(_calibrations.WiimoteCalibration);

if (_calibrations.ClassicProCalibration.CalibrationEmpty) {
_state.SetCalibration(Calibrations.CalibrationPreset.None);
} else {
_state.SetCalibration(_calibrations.ClassicProCalibration);
}

#if LOW_BANDWIDTH
applyReport = InputReport.BtnsIRExt;
#else
applyReport = InputReport.BtnsAccIRExt;
#endif
break;

case ControllerType.TaikoDrum:
// TODO: New: Musicals
break;
Expand Down
1 change: 1 addition & 0 deletions Nintroller/Nintroller.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
<Compile Include="Interfaces.cs" />
<Compile Include="Nintroller.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WiiDrums.cs" />
<Compile Include="WiiGuitar.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
Loading

0 comments on commit 131541a

Please sign in to comment.