New Super Mario Bros. U Headers
Loading...
Searching...
No Matches
MainGame.h
Go to the documentation of this file.
1#pragma once
2
3#include <heap/seadDisposer.h>
4#include <prim/seadBitFlag.h>
5
6#include <system/SaveMgr.h>
7
17static_assert(sizeof(CourseExitType) == 4, "CourseExitType size mismatch");
18
20{
24 cCourseBeatenType_TreasureChestFail // Maybe for when Nabbit steals the treasure chest for idling too long on the ambush??
25};
26static_assert(sizeof(CourseBeatenType) == 4, "CourseBeatenType size mismatch");
27
29{
30 // createInstance() Address: 0x029CDCAC
31 // deleteInstance() Address: Deleted
32 // sInstance Address: 0x101E7D7C
33 // SingletonDisposer_::~SingletonDisposer_() Address: 0x029CEBF0
34 // SingletonDisposer_::sStaticDisposer Address: 0x101E7D80
35 // SingletonDisposer_::vtbl Address: 0x1018A110
37
38public:
39 // Address: 0x029CD2E8
41
42 // Address: 0x029CEAD4
43 void initMiiIconRenderBuffer(sead::Heap* heap = nullptr);
44
45 bool isSinglePlayerDRC() const
46 {
47 return mIsSinglePlayerDRC;
48 }
49
50 bool isMultiplayer() const
51 {
52 return !mIsSinglePlayerDRC;
53 }
54
55 bool isNewGame() const
56 {
57 return mIsNewGame;
58 }
59
60 void setNewGame(bool new_game)
61 {
62 mIsNewGame = new_game;
63 }
64
65 bool isShadowkunQuest() const
66 {
67 return mIsShadowkunQuest;
68 }
69
71 {
72 return mCourseExitType;
73 }
74
76 {
77 mCourseExitType = type;
78 }
79
84
89
90 bool isOtehon() const
91 {
92 return mReplayFlag.isOnBit(0);
93 }
94
96 {
97 return mLevelStat;
98 }
99
100protected:
109 u32 _30[(0x31C - 0x30) / sizeof(u32)];
111 u32 _3d8[(0x21DDC - 0x3D8) / sizeof(u32)];
114 u32 _21dfc[(0x21E18 - 0x21DFC) / sizeof(u32)];
115};
116static_assert(sizeof(MainGame) == 0x21E18, "MainGame size mismatch");
CourseBeatenType
Definition MainGame.h:20
@ cCourseBeatenType_Secret
Definition MainGame.h:22
@ cCourseBeatenType_TreasureChestFail
Definition MainGame.h:24
@ cCourseBeatenType_TreasureChest
Definition MainGame.h:23
@ cCourseBeatenType_Normal
Definition MainGame.h:21
CourseExitType
Definition MainGame.h:9
@ cCourseExitType_Dead
Definition MainGame.h:13
@ cCourseExitType_Beaten
Definition MainGame.h:12
@ cCourseExitType_OtehonReplay
Definition MainGame.h:14
@ cCourseExitType_InsideCourse
Definition MainGame.h:15
@ cCourseExitType_Exit
Definition MainGame.h:11
@ cCourseExitType_ChallengeRetry
Definition MainGame.h:10
Definition MainGame.h:29
u32 _30[(0x31C - 0x30)/sizeof(u32)]
Definition MainGame.h:109
u32 _18
Definition MainGame.h:103
bool isOtehon() const
Definition MainGame.h:90
u32 _3d8[(0x21DDC - 0x3D8)/sizeof(u32)]
Definition MainGame.h:111
u32 _28
Definition MainGame.h:107
SaveData::LevelStat & getLevelStat()
Definition MainGame.h:95
void initMiiIconRenderBuffer(sead::Heap *heap=nullptr)
void setCourseExitType(CourseExitType type)
Definition MainGame.h:75
bool mIsShadowkunQuest
Definition MainGame.h:113
CourseExitType getCourseExitType() const
Definition MainGame.h:70
u32 _21dfc[(0x21E18 - 0x21DFC)/sizeof(u32)]
Definition MainGame.h:114
CourseBeatenType getCourseBeatenType() const
Definition MainGame.h:80
bool mIsNewGame
Definition MainGame.h:104
bool isNewGame() const
Definition MainGame.h:55
bool isMultiplayer() const
Definition MainGame.h:50
sead::BitFlag32 mReplayFlag
Definition MainGame.h:108
bool isSinglePlayerDRC() const
Definition MainGame.h:45
void setCourseBeatenType(CourseBeatenType type)
Definition MainGame.h:85
u32 _10
Definition MainGame.h:101
SaveData::LevelStat mLevelStat
Definition MainGame.h:110
CourseBeatenType mCourseBeatenType
Definition MainGame.h:106
void setNewGame(bool new_game)
Definition MainGame.h:60
bool mIsSinglePlayerDRC
Definition MainGame.h:102
bool isShadowkunQuest() const
Definition MainGame.h:65
u8 _21ddc[30]
Definition MainGame.h:112
CourseExitType mCourseExitType
Definition MainGame.h:105