![]() |
omegalib
13.1
|
#include <Wiimote.h>
Public Types | |
| enum | input_report { IN_BUTTONS = 0x30, IN_BUTTONS_ACCEL = 0x31, IN_BUTTONS_ACCEL_IR = 0x33, IN_BUTTONS_ACCEL_EXT = 0x35, IN_BUTTONS_ACCEL_IR_EXT = 0x37, IN_BUTTONS_BALANCE_BOARD = 0x32 } |
| typedef wiimote_state_event | state_event |
| typedef std::list< state_event > | state_history |
Public Types inherited from wiimote_state | |
| enum | extension_type { NONE = 0, NUNCHUK, CLASSIC, GH3_GHWT_GUITAR, GHWT_DRUMS, BALANCE_BOARD, MOTION_PLUS, PARTIALLY_INSERTED } |
Public Member Functions | |
| wiimote () | |
| virtual | ~wiimote () |
| bool | operator== (const wiimote &remote) |
| bool | operator!= (const wiimote &remote) |
| bool | IsConnected () const |
| bool | ConnectionLost () const |
| bool | IsBalanceBoard () const |
| bool | NunchukConnected () const |
| bool | ClassicConnected () const |
| bool | MotionPlusConnected () const |
| bool | MotionPlusEnabled () const |
| bool | MotionPlusHasExtension () const |
| bool | IsPlayingAudio () const |
| bool | IsPlayingSample () const |
| bool | IsUsingHIDwrites () const |
| bool | IsRecordingState () const |
| virtual void | ChangedNotifier (state_change_flags changed, const wiimote_state &new_state) |
| bool | Connect (unsigned wiimote_index=FIRST_AVAILABLE, bool force_hidwrites=false) |
| void | Disconnect () |
| void | SetReportType (input_report type, bool continuous=false) |
| bool | EnableMotionPlus () |
| bool | DisableMotionPlus () |
| void | CalibrateAtRest () |
| state_change_flags | RefreshState () |
| void | Reset () |
| void | SetLEDs (BYTE led_bits) |
| void | SetRumble (bool on) |
| void | RumbleForAsync (unsigned milliseconds) |
| bool | MuteSpeaker (bool on) |
| bool | EnableSpeaker (bool on) |
| bool | PlaySquareWave (speaker_freq freq, BYTE volume=0x40) |
| bool | PlaySample (const wiimote_sample &sample, BYTE volume=0x40, speaker_freq freq_override=FREQ_NONE) |
| void | RecordState (state_history &events_out, unsigned max_time_ms=UNTIL_STOP, state_change_flags change_trigger=CHANGED_ALL) |
| void | StopRecording () |
Static Public Member Functions | |
| static unsigned | TotalConnected () |
| static const TCHAR * | GetButtonNameFromBit (unsigned index) |
| static const TCHAR * | GetClassicButtonNameFromBit (unsigned index) |
| static const unsigned | GetFreqLookup (unsigned index) |
| static bool | Load16bitMonoSampleWAV (const TCHAR *filepath, wiimote_sample &out) |
| static bool | Load16BitMonoSampleRAW (const TCHAR *filepath, bool _signed, speaker_freq freq, wiimote_sample &out) |
| static bool | Convert16bitMonoSamples (const short *samples, bool _signed, DWORD length, speaker_freq freq, wiimote_sample &out) |
Public Attributes | |
| QWORD | UniqueID |
| state_changed_callback | ChangedCallback |
| state_change_flags | CallbackTriggerFlags |
Public Attributes inherited from wiimote_state | |
| struct wiimote_state::calibration_info | CalibrationInfo |
| struct wiimote_state::buttons | Button |
| struct wiimote_state::acceleration | Acceleration |
| struct wiimote_state::ir | IR |
| struct wiimote_state::leds | LED |
| BYTE | BatteryRaw |
| BYTE | BatteryPercent |
| bool | bBatteryDrained |
| bool | bRumble |
| bool | bExtension |
| struct wiimote_state::speaker | Speaker |
| extension_type | ExtensionType |
| struct wiimote_state::nunchuk | Nunchuk |
| struct wiimote_state::classic_controller | ClassicController |
| struct wiimote_state::balance_board | BalanceBoard |
| struct wiimote_state::motion_plus | MotionPlus |
Static Public Attributes | |
| static const TCHAR * | ReportTypeName [] |
| static const TCHAR * | ButtonNameFromBit [TOTAL_BUTTON_BITS] |
| static const TCHAR * | ClassicButtonNameFromBit [TOTAL_BUTTON_BITS] |
| static const unsigned | FreqLookup [TOTAL_FREQUENCIES] |
| static const unsigned | FIRST_AVAILABLE = 0xffffffff |
| static const unsigned | UNTIL_STOP = 0xffffffff |
Additional Inherited Members | |
Protected Member Functions inherited from wiimote_state | |
| void | Clear (bool including_deadzones) |
Protected Attributes inherited from wiimote_state | |
| unsigned | WiimoteNearGUpdates |
| unsigned | NunchukNearGUpdates |
Inheritance diagram for wiimote:| typedef std::list<state_event> wiimote::state_history |
| wiimote::wiimote | ( | ) |
|
virtual |
| void wiimote::CalibrateAtRest | ( | ) |
|
inlinevirtual |
|
inline |
| bool wiimote::Connect | ( | unsigned | wiimote_index = FIRST_AVAILABLE, |
| bool | force_hidwrites = false |
||
| ) |
|
inline |
|
static |
| bool wiimote::DisableMotionPlus | ( | ) |
| void wiimote::Disconnect | ( | ) |
| bool wiimote::EnableMotionPlus | ( | ) |
| bool wiimote::EnableSpeaker | ( | bool | on | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
|
static |
|
inline |
|
inline |
|
inline |
| bool wiimote::MuteSpeaker | ( | bool | on | ) |
|
inline |
|
inline |
|
inline |
| bool wiimote::PlaySample | ( | const wiimote_sample & | sample, |
| BYTE | volume = 0x40, |
||
| speaker_freq | freq_override = FREQ_NONE |
||
| ) |
| bool wiimote::PlaySquareWave | ( | speaker_freq | freq, |
| BYTE | volume = 0x40 |
||
| ) |
| void wiimote::RecordState | ( | state_history & | events_out, |
| unsigned | max_time_ms = UNTIL_STOP, |
||
| state_change_flags | change_trigger = CHANGED_ALL |
||
| ) |
| state_change_flags wiimote::RefreshState | ( | ) |
| void wiimote::Reset | ( | ) |
| void wiimote::RumbleForAsync | ( | unsigned | milliseconds | ) |
| void wiimote::SetLEDs | ( | BYTE | led_bits | ) |
| void wiimote::SetReportType | ( | input_report | type, |
| bool | continuous = false |
||
| ) |
| void wiimote::SetRumble | ( | bool | on | ) |
| void wiimote::StopRecording | ( | ) |
|
inlinestatic |
|
static |
| state_change_flags wiimote::CallbackTriggerFlags |
| state_changed_callback wiimote::ChangedCallback |
|
static |
|
static |
|
static |
|
static |
| QWORD wiimote::UniqueID |
|
static |