New Super Mario Bros. U Headers
Loading...
Searching...
No Matches
InputMgr.h
Go to the documentation of this file.
1#pragma once
2
3#include <input/SysController.h>
4#include <utility/Angle.h>
5
6#include <controller/seadControllerBase.h>
7#include <heap/seadDisposer.h>
8#include <random/seadRandom.h>
9
11{
12 // createInstance() Address: 0x0250C348
13 // deleteInstance() Address: Deleted
14 // sInstance Address: 0x101D2DF8
15 // SingletonDisposer_::~SingletonDisposer_() Address: 0x0250E978
16 // SingletonDisposer_::sStaticDisposer Address: 0x101D2DFC
17 // SingletonDisposer_::vtbl Address: 0x100BED44
19
20public:
22 {
23 public:
24 // Address: 0x0250EC54
26
27 // Address: 0x0250ECAC
28 Angle getTilt(const Angle& dead_zone = Angle(5.0f), f32 scale = 1.0f);
29
30 private:
33 };
34 static_assert(sizeof(Controller) == 0x134, "InputMgr::Controller size mismatch");
35
36public:
37 // Address: 0x0250C1A0
39
40 Controller& getController(s32 player_no)
41 {
42 return mControllers[player_no];
43 }
44
45 const Controller& getController(s32 player_no) const
46 {
47 return mControllers[player_no];
48 }
49
51 {
52 return mRandom;
53 }
54
56 {
57 return mBgmBeatTrg;
58 }
59
60 bool isBgmBeatTrg(u8 trg) const
61 {
62 return trg == mBgmBeatTrg;
63 }
64
66 {
67 return mBgmAccentSign;
68 }
69
70 bool isBgmAccentSign(u8 mask) const
71 {
72 return mBgmAccentSign & mask;
73 }
74
76 {
77 return mBgmAccentSignCredit;
78 }
79
81 {
82 return mBgmTempo;
83 }
84
85 bool isPlayerControllerConnected(s32 player_no) const
86 {
87 return (mControllerConnectionInfo & (1 << player_no)) != 0;
88 }
89
90 bool isFadein() const
91 {
92 return (mControllerConnectionInfo & (1 << 7)) != 0;
93 }
94
95 bool isAreaSceneSwitch() const
96 {
97 return mIsAreaSceneSwitch;
98 }
99
100 bool isInputEnabled() const
101 {
103 }
104
105protected:
112 bool _518;
121 u32 _544[(0x56C - 0x544) / sizeof(u32)];
124 u32 _570[(0x57C - 0x570) / sizeof(u32)];
125};
126static_assert(sizeof(InputMgr) == 0x57C, "InputMgr size mismatch");
127
128#define GAME_RANDOM (InputMgr::instance()->getRandom())
Definition InputMgr.h:11
bool isPlayerControllerConnected(s32 player_no) const
Definition InputMgr.h:85
bool isInputEnabled() const
Definition InputMgr.h:100
bool mControllersRegistered
Definition InputMgr.h:116
u32 _4f0
Definition InputMgr.h:108
const Controller & getController(s32 player_no) const
Definition InputMgr.h:45
u8 getBgmAccentSignCredit() const
Definition InputMgr.h:75
bool isBgmAccentSign(u8 mask) const
Definition InputMgr.h:70
bool isBgmBeatTrg(u8 trg) const
Definition InputMgr.h:60
u16 getBgmTempo() const
Definition InputMgr.h:80
u8 mBgmBeatTrg
Definition InputMgr.h:118
bool _518
Definition InputMgr.h:112
u32 _504[4]
Definition InputMgr.h:110
Controller & getController(s32 player_no)
Definition InputMgr.h:40
u8 getBgmAccentSign() const
Definition InputMgr.h:65
sead::Random mRandom
Definition InputMgr.h:115
bool isFadein() const
Definition InputMgr.h:90
u8 mBgmAccentSign
Definition InputMgr.h:119
Controller mControllers[4]
Definition InputMgr.h:106
bool isAreaSceneSwitch() const
Definition InputMgr.h:95
u16 mBgmTempo
Definition InputMgr.h:117
u8 mBgmAccentSignCredit
Definition InputMgr.h:120
u32 _514
Definition InputMgr.h:111
u32 _570[(0x57C - 0x570)/sizeof(u32)]
Definition InputMgr.h:124
u32 _4f4[4]
Definition InputMgr.h:109
u32 _4e0[4]
Definition InputMgr.h:107
u8 getBgmBeatTrg() const
Definition InputMgr.h:55
u8 _519[3]
Definition InputMgr.h:113
u32 _51c[4]
Definition InputMgr.h:114
u32 _544[(0x56C - 0x544)/sizeof(u32)]
Definition InputMgr.h:121
u8 mControllerConnectionInfo
Definition InputMgr.h:122
bool mIsAreaSceneSwitch
Definition InputMgr.h:123
sead::Random & getRandom()
Definition InputMgr.h:50