Skip to content

Commit e86e971

Browse files
committed
Disable game mode option when n/a
1 parent 1331904 commit e86e971

File tree

3 files changed

+33
-8
lines changed

3 files changed

+33
-8
lines changed

include/Sports2/Cmn/Sp2CmnStaticMem.h

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,45 @@
33
#include <Pack/RPSystem.h>
44
#include <Sports2/Sp2Types.h>
55

6+
#include <egg/core.h>
7+
68
namespace Sp2 {
79
namespace Cmn {
810

9-
class StaticMem {
11+
enum EPlayStyle { EPlayStyle_Team, EPlayStyle_Solo };
12+
enum EPlayTeam { EPlayTeam_Blue, EPlayTeam_Red };
13+
14+
/**
15+
* @brief Static memory region
16+
* @details Used for passing data between scenes
17+
*/
18+
class StaticMem /* : EGG::Singleton */ {
1019
RP_SINGLETON_DECL(StaticMem);
1120

1221
public:
1322
u32 getVariable(u32 index, bool local = false);
1423
void setVariable(u32 index, u32 value, bool local = false);
1524

16-
u32 getSceneSeq() const {
25+
s32 getSceneSeq() const {
1726
return mSequenceNo;
1827
}
19-
void setSceneSeq(u32 seq);
28+
void setSceneSeq(s32 seq) {
29+
mSequenceNo = seq;
30+
}
2031

2132
u32 getSceneGroup() const {
2233
return mGroupNo;
2334
}
24-
void setSceneGroup(u32 group);
35+
void setSceneGroup(u32 group) {
36+
mGroupNo = group;
37+
}
38+
39+
u32 getStageNo() const {
40+
return mStageNo;
41+
}
42+
void setStageNo(u32 stage) {
43+
mStageNo = stage;
44+
}
2545

2646
RPSysScene::ETime getIslandTime() const {
2747
return mIslandTime;
@@ -32,10 +52,14 @@ class StaticMem {
3252

3353
private:
3454
char _04[0x14 - 0x4];
35-
u32 mGroupNo; // at 0x14
36-
u32 mSequenceNo; // at 0x18
37-
char _1C[0x380 - 0x1C];
55+
s32 mGroupNo; // at 0x14
56+
u32 mSequenceNo; // at 0x18
57+
u32 mStageNo; // at 0x1C
58+
EPlayStyle mPlayStyle; // at 0x20
59+
EPlayTeam mPlayTeams[4]; // at 0x24
60+
char _34[0x380 - 0x34];
3861
RPSysScene::ETime mIslandTime; // at 0x380
62+
// . . .
3963
};
4064

4165
} // namespace Cmn

src/core/CosmeticMgr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void CosmeticMgr::Debug() {
5656
}
5757

5858
kiwi::Shuffle(mRandomBgmMapping, K_LENGTHOF(mRandomBgmMapping));
59-
mRandomBgmFlag = true;
59+
mRandomBgmFlag = false;
6060
}
6161

6262
} // namespace AP

src/scene/DebugRootScene/SeqSelectPage.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ void SeqSelectPage::SetNextScene(s32 scene) {
118118
case kiwi::ESceneID_Sp2##S##Scene: { \
119119
mGameMode.SetEnumValues(GameMode_Keys_##S); \
120120
mGameMode.SetRange(0, LENGTHOF(GameMode_Keys_##S) - 1); \
121+
mGameMode.SetEnabled(LENGTHOF(GameMode_Keys_##S) != 1); \
121122
break; \
122123
}
123124

0 commit comments

Comments
 (0)