New Super Mario Bros. U Headers
Loading...
Searching...
No Matches
PlayerKey.h
Go to the documentation of this file.
1#pragma once
2
3#include <input/PadCommon.h>
4#include <utility/Direction.h>
5
7{
8public:
9 enum Status
10 {
11 cStatus_NoInput = 1, // NSMBW: Bit 0
12 cStatus_NoCross, // NSMBW: Bit 1
14
15 cStatus_ForceJump = 5, // NSMBW: Bit 3
16 cStatus_NoJump, // NSMBW: Bit 4
17
18 cStatus_Demo = 10 // NSMBW: Bit 7
19 };
20
27
28public:
30
31 void setPlayerNo(s32 player_no);
32
33 void update();
34 void updateEnd();
35
36 bool triggerJump() const;
37
38 bool buttonUp() const;
39 bool buttonDown() const;
40 bool buttonLeft() const;
41 bool buttonRight() const;
42 bool buttonCross() const;
43
44 bool triggerUp() const;
45 bool triggerDown() const;
46 bool triggerLeft() const;
47 bool triggerRight() const;
48 bool triggerCross() const;
49
50 bool buttonDush() const;
51 bool buttonWalk(DirType* dir = nullptr) const;
52
53 bool buttonJump() const;
54
55 bool buttonCrouch() const;
56
57 bool triggerShakeJump() const;
58 bool triggerA() const;
59 bool triggerAttack() const;
60 bool triggerSwim() const;
61 bool triggerJumpBuf(s32 buf_frame) const;
62 bool triggerEat() const;
63
64 bool buttonHipAttack() const;
65
66 void onStatus(s32 bit);
67 void offStatus(s32 bit);
68
69 void onDemoTrigger(s32 key);
70 void offDemoTrigger(s32 key);
71
72private:
73 u8 _0[0x94];
74};
75static_assert(sizeof(PlayerKey) == 0x94);
Definition PlayerKey.h:7
bool triggerJumpBuf(s32 buf_frame) const
bool buttonCrouch() const
void onDemoTrigger(s32 key)
bool triggerEat() const
bool buttonLeft() const
bool buttonUp() const
void onStatus(s32 bit)
bool triggerUp() const
bool triggerCross() const
bool triggerDown() const
void offDemoTrigger(s32 key)
void update()
u8 _0[0x94]
Definition PlayerKey.h:73
bool buttonDush() const
void setPlayerNo(s32 player_no)
void updateEnd()
bool triggerSwim() const
bool triggerLeft() const
void offStatus(s32 bit)
Status
Definition PlayerKey.h:10
@ cStatus_NoShakeJump
Definition PlayerKey.h:13
@ cStatus_NoCross
Definition PlayerKey.h:12
@ cStatus_Demo
Definition PlayerKey.h:18
@ cStatus_NoJump
Definition PlayerKey.h:16
@ cStatus_NoInput
Definition PlayerKey.h:11
@ cStatus_ForceJump
Definition PlayerKey.h:15
bool triggerShakeJump() const
bool triggerJump() const
bool buttonCross() const
bool buttonJump() const
bool triggerAttack() const
bool buttonHipAttack() const
bool buttonRight() const
bool buttonWalk(DirType *dir=nullptr) const
bool triggerRight() const
bool buttonDown() const
bool triggerA() const
Key
Definition PlayerKey.h:22
@ cKey_Left
Definition PlayerKey.h:24
@ cKey_Right
Definition PlayerKey.h:25
@ cKey_Jump
Definition PlayerKey.h:23