Classes | Public Types | Public Attributes | Protected Member Functions | Protected Attributes | Friends

wiimote_state Struct Reference

#include <wiimote_state.h>

Inheritance diagram for wiimote_state:
Inheritance graph
[legend]
Collaboration diagram for wiimote_state:
Collaboration graph
[legend]

List of all members.

Classes

struct  acceleration
struct  balance_board
struct  buttons
struct  calibration_info
struct  classic_controller
struct  ir
struct  joystick
struct  leds
struct  motion_plus
struct  nunchuk
struct  speaker

Public Types

enum  extension_type {
  NONE = 0, NUNCHUK, CLASSIC, GH3_GHWT_GUITAR,
  GHWT_DRUMS, BALANCE_BOARD, MOTION_PLUS, PARTIALLY_INSERTED
}

Public Attributes

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

Protected Member Functions

void Clear (bool including_deadzones)

Protected Attributes

unsigned WiimoteNearGUpdates
unsigned NunchukNearGUpdates

Friends

class wiimote

Detailed Description

Definition at line 25 of file wiimote_state.h.


Member Enumeration Documentation

Enumerator:
NONE 
NUNCHUK 
CLASSIC 
GH3_GHWT_GUITAR 
GHWT_DRUMS 
BALANCE_BOARD 
MOTION_PLUS 
PARTIALLY_INSERTED 

Definition at line 169 of file wiimote_state.h.

                {
                NONE = 0,
                NUNCHUK,
                CLASSIC,
                GH3_GHWT_GUITAR, // GH3 or GHWT Guitar (treated as Classic)
                GHWT_DRUMS,              // not yet used
                BALANCE_BOARD,
                MOTION_PLUS,
                PARTIALLY_INSERTED,
                };

Member Function Documentation

void wiimote_state::Clear ( bool  including_deadzones ) [inline, protected]

Definition at line 355 of file wiimote_state.h.

References ClassicController, wiimote_state::joystick::DeadZone, wiimote_state::nunchuk::Joystick, wiimote_state::classic_controller::JoystickL, wiimote_state::classic_controller::JoystickR, and Nunchuk.

Referenced by wiimote::Connect(), wiimote::Disconnect(), and wiimote::wiimote().

                        {
                        joystick::deadzone nunchuk_deadzone,
                                                           classic_joyl_deadzone,
                                                           classic_joyr_deadzone;
                
                        // preserve the deadzone settings?
                        if(!including_deadzones) {
                                nunchuk_deadzone          = Nunchuk.Joystick.DeadZone;
                                classic_joyl_deadzone = ClassicController.JoystickL.DeadZone;
                                classic_joyr_deadzone = ClassicController.JoystickR.DeadZone;
                                }

                        memset(this, 0, sizeof(wiimote_state));

                        // restore the deadzones?
                        if(!including_deadzones) {
                                Nunchuk.Joystick.DeadZone                        = nunchuk_deadzone;
                                ClassicController.JoystickL.DeadZone = classic_joyl_deadzone;
                                ClassicController.JoystickR.DeadZone = classic_joyr_deadzone;
                                }
                        }

Friends And Related Function Documentation

friend class wiimote [friend]

Definition at line 27 of file wiimote_state.h.


Member Data Documentation

Definition at line 154 of file wiimote_state.h.

Definition at line 153 of file wiimote_state.h.

Definition at line 155 of file wiimote_state.h.

Definition at line 156 of file wiimote_state.h.

Referenced by wiimote::SetRumble().

Referenced by wiimote::Connect().

Referenced by Clear(), and wiimote::RefreshState().

Referenced by wiimote::SetLEDs().

Referenced by Clear(), and wiimote::RefreshState().

unsigned wiimote_state::NunchukNearGUpdates [protected]

Definition at line 353 of file wiimote_state.h.

unsigned wiimote_state::WiimoteNearGUpdates [protected]

Definition at line 352 of file wiimote_state.h.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines