WiimoteEmu: Reimplement tilt/swing/camera/orientation data using matrix math.

This commit is contained in:
Jordan Woyak 2019-01-29 14:39:14 -06:00
commit 4db4840d7c
22 changed files with 897 additions and 476 deletions

View file

@ -10,24 +10,12 @@ namespace Config
// WiimoteInput.Settings
const ConfigInfo<double> WIIMOTE_INPUT_SWING_INTENSITY_FAST{{System::WiiPad, "Swing", "Fast"}, 4.5};
const ConfigInfo<double> WIIMOTE_INPUT_SWING_INTENSITY_MEDIUM{{System::WiiPad, "Swing", "Medium"},
2.5};
const ConfigInfo<double> WIIMOTE_INPUT_SWING_INTENSITY_SLOW{{System::WiiPad, "Swing", "Slow"}, 1.5};
const ConfigInfo<double> WIIMOTE_INPUT_SHAKE_INTENSITY_HARD{{System::WiiPad, "Shake", "Hard"}, 5.0};
const ConfigInfo<double> WIIMOTE_INPUT_SHAKE_INTENSITY_MEDIUM{{System::WiiPad, "Shake", "Medium"},
3.0};
const ConfigInfo<double> WIIMOTE_INPUT_SHAKE_INTENSITY_SOFT{{System::WiiPad, "Shake", "Soft"}, 2.0};
// Dynamic settings
const ConfigInfo<int> WIIMOTE_INPUT_SWING_DYNAMIC_FRAMES_HELD_FAST{
{System::WiiPad, "Dynamic_Swing", "FramesHeldFast"}, 100};
const ConfigInfo<int> WIIMOTE_INPUT_SWING_DYNAMIC_FRAMES_HELD_SLOW{
{System::WiiPad, "Dynamic_Swing", "FramesHeldSlow"}, 30};
const ConfigInfo<int> WIIMOTE_INPUT_SWING_DYNAMIC_FRAMES_LENGTH{
{System::WiiPad, "Dynamic_Swing", "FrameCount"}, 30};
const ConfigInfo<int> WIIMOTE_INPUT_SHAKE_DYNAMIC_FRAMES_HELD_HARD{
{System::WiiPad, "Dynamic_Shake", "FramesHeldHard"}, 45};
const ConfigInfo<int> WIIMOTE_INPUT_SHAKE_DYNAMIC_FRAMES_HELD_SOFT{
@ -36,18 +24,10 @@ const ConfigInfo<int> WIIMOTE_INPUT_SHAKE_DYNAMIC_FRAMES_LENGTH{
{System::WiiPad, "Dynamic_Shake", "FrameCount"}, 30};
// NunchuckInput.Settings
const ConfigInfo<double> NUNCHUK_INPUT_SWING_INTENSITY_FAST{
{System::WiiPad, "Nunchuk_Swing", "Fast"}, 4.5};
const ConfigInfo<double> NUNCHUK_INPUT_SWING_INTENSITY_MEDIUM{
{System::WiiPad, "Nunchuk_Swing", "Medium"}, 2.5};
const ConfigInfo<double> NUNCHUK_INPUT_SWING_INTENSITY_SLOW{
{System::WiiPad, "Nunchuk_Swing", "Slow"}, 1.5};
const ConfigInfo<double> NUNCHUK_INPUT_SHAKE_INTENSITY_HARD{
{System::WiiPad, "Nunchuk_Shake", "Hard"}, 5.0};
const ConfigInfo<double> NUNCHUK_INPUT_SHAKE_INTENSITY_MEDIUM{
{System::WiiPad, "Nunchuk_Shake", "Medium"}, 3.0};
const ConfigInfo<double> NUNCHUK_INPUT_SHAKE_INTENSITY_SOFT{
{System::WiiPad, "Nunchuk_Shake", "Soft"}, 2.0};
}
} // namespace Config

View file

@ -11,24 +11,11 @@ namespace Config
// Configuration Information
// WiimoteInput.Settings
extern const ConfigInfo<double> WIIMOTE_INPUT_SWING_INTENSITY_FAST;
extern const ConfigInfo<double> WIIMOTE_INPUT_SWING_INTENSITY_MEDIUM;
extern const ConfigInfo<double> WIIMOTE_INPUT_SWING_INTENSITY_SLOW;
extern const ConfigInfo<double> WIIMOTE_INPUT_SHAKE_INTENSITY_HARD;
extern const ConfigInfo<double> WIIMOTE_INPUT_SHAKE_INTENSITY_MEDIUM;
extern const ConfigInfo<double> WIIMOTE_INPUT_SHAKE_INTENSITY_SOFT;
// Below settings are for dynamic input only (based on how long the user holds a button)
extern const ConfigInfo<int>
WIIMOTE_INPUT_SWING_DYNAMIC_FRAMES_HELD_FAST; // How long button held constitutes a fast swing
extern const ConfigInfo<int>
WIIMOTE_INPUT_SWING_DYNAMIC_FRAMES_HELD_SLOW; // How long button held constitutes a slow swing
extern const ConfigInfo<int>
WIIMOTE_INPUT_SWING_DYNAMIC_FRAMES_LENGTH; // How long to execute the swing
extern const ConfigInfo<int>
WIIMOTE_INPUT_SHAKE_DYNAMIC_FRAMES_HELD_HARD; // How long button held constitutes a hard shake
extern const ConfigInfo<int>
@ -37,11 +24,6 @@ extern const ConfigInfo<int>
WIIMOTE_INPUT_SHAKE_DYNAMIC_FRAMES_LENGTH; // How long to execute a shake
// NunchuckInput.Settings
extern const ConfigInfo<double> NUNCHUK_INPUT_SWING_INTENSITY_FAST;
extern const ConfigInfo<double> NUNCHUK_INPUT_SWING_INTENSITY_MEDIUM;
extern const ConfigInfo<double> NUNCHUK_INPUT_SWING_INTENSITY_SLOW;
extern const ConfigInfo<double> NUNCHUK_INPUT_SHAKE_INTENSITY_HARD;
extern const ConfigInfo<double> NUNCHUK_INPUT_SHAKE_INTENSITY_MEDIUM;
extern const ConfigInfo<double> NUNCHUK_INPUT_SHAKE_INTENSITY_SOFT;