2010-07-05 13:51:01 +00:00
|
|
|
#ifndef NUNCHUCK_H
|
|
|
|
#define NUNCHUCK_H
|
2010-04-13 05:15:38 +00:00
|
|
|
|
2010-07-05 13:51:01 +00:00
|
|
|
#include "Attachment.h"
|
2010-04-13 05:15:38 +00:00
|
|
|
|
2010-07-14 17:33:14 +00:00
|
|
|
class UDPWrapper;
|
|
|
|
|
2010-04-13 05:15:38 +00:00
|
|
|
namespace WiimoteEmu
|
|
|
|
{
|
|
|
|
|
|
|
|
class Nunchuk : public Attachment
|
|
|
|
{
|
|
|
|
public:
|
2010-07-14 17:33:14 +00:00
|
|
|
Nunchuk(UDPWrapper * wrp);
|
2010-07-05 13:51:01 +00:00
|
|
|
virtual void GetState( u8* const data, const bool focus );
|
2010-04-13 05:15:38 +00:00
|
|
|
|
2010-07-09 22:11:12 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
BUTTON_C = 0x02,
|
|
|
|
BUTTON_Z = 0x01,
|
|
|
|
};
|
|
|
|
|
2010-04-13 05:15:38 +00:00
|
|
|
private:
|
|
|
|
Tilt* m_tilt;
|
|
|
|
Force* m_swing;
|
|
|
|
|
|
|
|
Buttons* m_shake;
|
|
|
|
|
|
|
|
Buttons* m_buttons;
|
|
|
|
AnalogStick* m_stick;
|
2010-04-22 07:11:49 +00:00
|
|
|
|
2010-04-29 18:51:04 +00:00
|
|
|
unsigned int m_shake_step[3];
|
2010-07-14 17:33:14 +00:00
|
|
|
|
2010-07-26 05:30:50 +00:00
|
|
|
UDPWrapper* const m_udpWrap;
|
2010-04-13 05:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2010-07-05 13:51:01 +00:00
|
|
|
|
2010-07-22 03:29:35 +00:00
|
|
|
#endif
|