NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_game_key.hpp
1#pragma once
2
3#include <types.h>
4#include <lib/egg/core/eggHeap.h>
5
6class Remocon {
7public:
8 /// @unofficial
10 EXTENSION_NONE = 0, ///< No Wii remote extension is connected.
11 EXTENSION_NUNCHUK, ///< The nunchuck controller is connected.
12 EXTENSION_UNKNOWN = 3, ///< It has not been checked yet whether an extension is connected.
13 };
14
15 virtual ~Remocon();
16
17 int mIndex;
18 EXTENSION_TYPE_e mAttachedExtension;
19 char mPad1[8];
20 int mDownButtons; ///< The buttons currently pressed down.
21 char mPad2[4];
22 int mTriggeredButtons; ///< The buttons newly pressed down.
23 char mPad3[0x6c];
24 bool mIsShaking;
25};
26
27class dGameKeyCore_c : public Remocon {
28public:
29 u32 getAccVerticalAngleX();
30};
31
33public:
34 virtual ~dGameKey_c();
35
36 void read();
37
38 short getAccVerticalAngleX(int plNo) {
39 return mRemocon[plNo]->getAccVerticalAngleX() / 65536;
40 }
41
42 static void createInstance(EGG::Heap *heap);
43
44 dGameKeyCore_c *mRemocon[4];
45
46 static dGameKey_c *m_instance;
47};
int mTriggeredButtons
The buttons newly pressed down.
@ EXTENSION_NONE
No Wii remote extension is connected.
@ EXTENSION_NUNCHUK
The nunchuck controller is connected.
@ EXTENSION_UNKNOWN
It has not been checked yet whether an extension is connected.
int mDownButtons
The buttons currently pressed down.