diff --git a/docs/recommended_todo.md b/docs/recommended_todo.md
index e0485bc9a..ab8d8e9d7 100644
--- a/docs/recommended_todo.md
+++ b/docs/recommended_todo.md
@@ -80,29 +80,29 @@
| aiEnter.cpp | 10852 | naviWhistle.cpp | 11601 |
| itemHoney.cpp | 12303 | aiBreakGate.cpp | 13960 |
| gameCaveInfo.cpp | 16141 | texCaster.cpp | 16211 |
-| singleGS_CaveResult.cpp | 19749 | itemCave.cpp | 20301 |
+| singleGS_CaveResult.cpp | 19794 | itemCave.cpp | 20301 |
| pathfinder.cpp | 20409 | itemPikihead.cpp | 23992 |
| gameCPlate.cpp | 24190 | dynCreature.cpp | 25766 |
| gameDynamics.cpp | 27114 | vsCardMgr.cpp | 30814 |
-| singleGS_MainGame.cpp | 31727 | itemBridge.cpp | 32179 |
+| singleGS_MainGame.cpp | 31937 | itemBridge.cpp | 32179 |
| itemGate.cpp | 32834 | gamePlayDataMemCard.cpp | 36029 |
| gameGeneratorCache.cpp | 36353 | piki.cpp | 36583 |
| gamePlayData.cpp | 36955 | routeMgr.cpp | 39142 |
| collinfo.cpp | 43044 | fakePiki.cpp | 50426 |
-| cellPyramid.cpp | 52719 | singleGS_CaveGame.cpp | 52841 |
+| cellPyramid.cpp | 52719 | singleGS_CaveGame.cpp | 52995 |
| aiFormation.cpp | 53253 | navi_demoCheck.cpp | 57727 |
| pelletState.cpp | 63200 | itemUjamushi.cpp | 63554 |
| itemPlant.cpp | 73149 | baseGameSection.cpp | 92608 |
| aiPrimitives.cpp | 117085 | pelletMgr.cpp | 141213 |
| navi.cpp | 152216 | pikiState.cpp | 155487 |
-| singleGS_Zukan.cpp | 163685 | gameMapParts.cpp | 164131 |
-| naviState.cpp | 182249 | | |
+| singleGS_Zukan.cpp | 163799 | gameMapParts.cpp | 164131 |
+| naviState.cpp | 182407 | | |
###
| File | Size (bytes) | File | Size (bytes) |
| ---- | ---- | ---- | ---- |
-| khCaveResult.cpp | 42208 | khFinalResult.cpp | 59951 |
-| khDayEndResult.cpp | 81617 | khWorldMap.cpp | 157282 |
+| khCaveResult.cpp | 42333 | khFinalResult.cpp | 59527 |
+| khDayEndResult.cpp | 81837 | khWorldMap.cpp | 158173 |
###
| File | Size (bytes) | File | Size (bytes) |
@@ -113,8 +113,8 @@
| panModoki.cpp | 44955 | kingChappyState.cpp | 50795 |
| umiMushi.cpp | 60143 | kingChappy.cpp | 64705 |
| hiScore2D.cpp | 103202 | blackMan.cpp | 121693 |
-| zukan2D.cpp | 133600 | challengeResult2D.cpp | 143588 |
-| challengeSelect2D.cpp | 185606 | vsSelect2D.cpp | 195832 |
+| zukan2D.cpp | 134239 | challengeResult2D.cpp | 143588 |
+| challengeSelect2D.cpp | 185921 | vsSelect2D.cpp | 196135 |
###
| File | Size (bytes) | File | Size (bytes) |
@@ -198,7 +198,7 @@
| PSMainSide_Sound.cpp | 11782 | PSMainSide_TrackMap.cpp | 17107 |
| menu.cpp | 17351 | PSMainSide_BossMgr.cpp | 17562 |
| PSMainSide_Director.cpp | 28380 | PSMainSide_DirectorMgr.cpp | 28495 |
-| PSMainSide_Se.cpp | 45041 | PSMainSide_Scene.cpp | 49598 |
+| PSMainSide_Se.cpp | 45066 | PSMainSide_Scene.cpp | 49598 |
| PSMainSide_ObjSound.cpp | 86634 | PSMainSide_Factory.cpp | 88157 |
diff --git a/include/Game/SingleGame.h b/include/Game/SingleGame.h
index cfaa57b36..597ff4374 100644
--- a/include/Game/SingleGame.h
+++ b/include/Game/SingleGame.h
@@ -545,6 +545,11 @@ struct SelectState : public State {
bool mNewLevelOpen; // _2C
};
+enum ZukanLoadType {
+ ZukanType_Item = 0,
+ ZukanType_Enemy = 1,
+};
+
struct ZukanStateArg : public StateArg {
u8 mZukanType;
int mCourseID;
diff --git a/include/Game/SingleGameSection.h b/include/Game/SingleGameSection.h
index 0266dc99e..7fea2e2e0 100644
--- a/include/Game/SingleGameSection.h
+++ b/include/Game/SingleGameSection.h
@@ -98,7 +98,7 @@ struct SingleGameSection : public BaseGameSection {
bool mDoEnd; // _1B5
DvdThreadCommand mDvdThread; // _1B8
Delegate* mLoadGameCallback; // _224
- u8 _228; // _228
+ u8 mIsGameStarted; // _228, used to tell if new entry effects should play on opening the world map
Game::CourseInfo* mCurrentCourseInfo; // _22C
ID32 mCaveID; // _230
bool mInCave; // _23C
diff --git a/include/Game/VsGame.h b/include/Game/VsGame.h
index 3f6e378ab..c33212f3f 100644
--- a/include/Game/VsGame.h
+++ b/include/Game/VsGame.h
@@ -513,7 +513,7 @@ struct ResultState : public State {
};
struct TitleArg : public StateArg {
- u8 _00; // _00, unknown
+ bool mDoNeedClearHeap; // _00
};
struct TitleState : public State {
diff --git a/include/Morimura/challengeSelect2d.h b/include/Morimura/challengeSelect2d.h
index d7ffd91ee..b22bc316e 100644
--- a/include/Morimura/challengeSelect2d.h
+++ b/include/Morimura/challengeSelect2d.h
@@ -7,6 +7,7 @@
#include "efx2d/T2DCursor.h"
#include "efx2d/T2DChalDive.h"
#include "Game/ChallengeGame.h"
+#include "Screen/Game2DMgr.h"
namespace og {
namespace Screen {
@@ -28,7 +29,7 @@ struct DispMemberChallengeSelect : public og::Screen::DispMemberBase {
mStageNumber = -1;
mSelectedStageIndex = 0;
mPlayType = 0;
- _1C = 0;
+ mStatus = Screen::Game2DMgr::CHECK2D_ChallengeSelect_Default;
mDispWorldMapInfoWin0 = nullptr;
}
@@ -43,7 +44,7 @@ struct DispMemberChallengeSelect : public og::Screen::DispMemberBase {
int mStageNumber; // _10
int mSelectedStageIndex; // _14
int mPlayType; // _18
- int _1C; // _1C
+ int mStatus; // _1C
og::Screen::DispMemberWorldMapInfoWin0* mDispWorldMapInfoWin0; // _20
};
diff --git a/include/PSM/WorldMapRocket.h b/include/PSM/WorldMapRocket.h
index d72a1409f..39583affb 100644
--- a/include/PSM/WorldMapRocket.h
+++ b/include/PSM/WorldMapRocket.h
@@ -14,14 +14,14 @@ struct WorldMapRocket : public JADHioNode {
* @size{0x4}
*/
enum rocketState {
- PSMRocket_0, // 0
- PSMRocket_1, // 1
- PSMRocket_2, // 2
- PSMRocket_3, // 3
- PSMRocket_4, // 4
- PSMRocket_5, // 5
- PSMRocket_6, // 6, in menu?
- PSMRocket_7, // 7
+ PSMRocket_Inactive, // 0
+ PSMRocket_Appear, // 1
+ PSMRocket_2, // 2
+ PSMRocket_3, // 3
+ PSMRocket_4, // 4
+ PSMRocket_Idle, // 5
+ PSMRocket_6, // 6, in menu?
+ PSMRocket_7, // 7
};
WorldMapRocket();
diff --git a/include/Screen/Game2DMgr.h b/include/Screen/Game2DMgr.h
index 299022db2..b2802f1e9 100644
--- a/include/Screen/Game2DMgr.h
+++ b/include/Screen/Game2DMgr.h
@@ -71,6 +71,109 @@ struct Game2DMgr : public JKRDisposer {
GOTITLE_PikminZero = 4,
};
+ // represents return values of "check" functions for all screens
+ enum CheckStatus {
+ CHECK2D_WorldMapInfoWin0_Cancel = 0,
+ CHECK2D_WorldMapInfoWin0_Confirm = 1,
+ CHECK2D_WorldMapInfoWin0_Error = 2,
+ CHECK2D_WorldMapInfoWin0_Active = 3,
+
+ CHECK2D_WorldMapInfoWin1_Confirm = 0,
+ CHECK2D_WorldMapInfoWin1_Cancel = 1,
+ CHECK2D_WorldMapInfoWin1_Error = 2,
+ CHECK2D_WorldMapInfoWin1_Active = 3,
+
+ CHECK2D_SMenu_Error = -1,
+ CHECK2D_SMenu_Opened = 0,
+ CHECK2D_SMenu_Cancel = 1,
+ CHECK2D_SMenu_GoToSunset = 2,
+ CHECK2D_SMenu_ReturnToFileSelect = 3,
+ CHECK2D_SMenu_EscapeCave = 4,
+ CHECK2D_SMenu_QuitChallenge = 5,
+
+ CHECK2D_CaveInMenu_Error_NoDisp = -2,
+ CHECK2D_CaveInMenu_Error_WrongDisp = -1,
+ CHECK2D_CaveInMenu_MenuOpen = 0,
+ CHECK2D_CaveInMenu_Confirm = 1,
+ CHECK2D_CaveInMenu_Cancel = 2,
+ CHECK2D_CaveInMenu_Unused = 3,
+
+ CHECK2D_KanketuMenu_Error_NoDisp = -2,
+ CHECK2D_KanketuMenu_Error_WrongDisp = -1,
+ CHECK2D_KanketuMenu_MenuOpen = 0,
+ CHECK2D_KanketuMenu_Confirm = 1,
+ CHECK2D_KanketuMenu_Cancel = 2,
+ CHECK2D_KanketuMenu_Unused = 3,
+
+ CHECK2D_CaveMoreMenu_Error_NoDisp = -2,
+ CHECK2D_CaveMoreMenu_Error_WrongDisp = -1,
+ CHECK2D_CaveMoreMenu_MenuOpen = 0,
+ CHECK2D_CaveMoreMenu_Confirm = 1,
+ CHECK2D_CaveMoreMenu_Cancel = 2,
+ CHECK2D_CaveMoreMenu_Unused = 3,
+
+ CHECK2D_FinalResult_Error = -1,
+ CHECK2D_FinalResult_MenuOpen = 0,
+ CHECK2D_FinalResult_Finished = 1,
+
+ CHECK2D_CaveResult_Error = -1,
+ CHECK2D_CaveResult_MenuOpen = 0,
+ CHECK2D_CaveResult_Finished = 1,
+
+ CHECK2D_DayResult_Error = -1,
+ CHECK2D_DayResult_MenuOpen = 0,
+ CHECK2D_DayResult_SaveFinished = 1,
+ CHECK2D_DayResult_ReturnToFileSelect = 2,
+
+ CHECK2D_PayDept_NotFinished = 0,
+ CHECK2D_PayDept_Finished = 1,
+
+ CHECK2D_Save_NotFinished = 0,
+ CHECK2D_Save_Finished = 1,
+
+ CHECK2D_FinalMessage_Error = -10,
+ CHECK2D_FinalMessage_NotOpen = 0,
+ CHECK2D_FinalMessage_Continue = 1,
+ CHECK2D_FinalMessage_ConfirmQuit = 2,
+
+ CHECK2D_ReadyGo_Error = -1,
+ CHECK2D_ReadyGo_NotFinished = 0,
+ CHECK2D_ReadyGo_Finished = 1,
+
+ CHECK2D_WinLoseReason_NotFinished = 0,
+ CHECK2D_WinLoseReason_Finished = 1,
+
+ CHECK2D_WinLose_Error = -1,
+ CHECK2D_WinLose_NotOpened = 0,
+ CHECK2D_WinLose_Opened = 1,
+ CHECK2D_WinLose_AnimDone = 2,
+ CHECK2D_WinLose_Finished = 3,
+
+ CHECK2D_Contena_Error = -1,
+ CHECK2D_Contena_MenuOpened = 0,
+ CHECK2D_Contena_Cancel = 1,
+ CHECK2D_Contena_Confirmed = 2,
+
+ CHECK2D_Ufo_Default = 0,
+ CHECK2D_Ufo_Cancel = 1,
+ CHECK2D_Ufo_Confirmed = 2,
+
+ CHECK2D_Zukan_Default = 0,
+ CHECK2D_Zukan_Changing = 1,
+ CHECK2D_Zukan_ExitStart = 2,
+ CHECK2D_Zukan_ExitFinished = 3,
+
+ CHECK2D_ChallengeSelect_Default = 0,
+ CHECK2D_ChallengeSelect_InDemo = 1,
+ CHECK2D_ChallengeSelect_CancelToTitle = 2,
+ CHECK2D_ChallengeSelect_ExitFinished = 3,
+
+ CHECK2D_VsSelect_Default = 0,
+ CHECK2D_VsSelect_InDemo = 1,
+ CHECK2D_VsSelect_CancelToTitle = 2,
+ CHECK2D_VsSelect_ExitFinished = 3,
+ };
+
virtual ~Game2DMgr(); // _08
static void create();
diff --git a/include/Screen/screenMgr.h b/include/Screen/screenMgr.h
index be7b75de8..52cc716ef 100644
--- a/include/Screen/screenMgr.h
+++ b/include/Screen/screenMgr.h
@@ -2,16 +2,24 @@
#define _SCREEN_SCREENMGR_H
#include "Screen/screenObj.h"
+#include "Screen/SceneInfoList.h"
-// no idea if theres a better place to put this, its kind of a random single function
-namespace kh {
+struct Controller;
+
+namespace og {
namespace Screen {
-::Screen::SceneBase* createScene_Koono(s32);
-} // namespace Screen
-} // namespace kh
+struct DispMemberBase;
+}
+} // namespace og
namespace Screen {
+struct SceneBase;
+struct SetSceneArg;
+struct StartSceneArg;
+struct EndSceneArg;
+struct MgrCommand;
+
ScreenOwnerID getSceneOwnerName(SceneBase* scene);
ScreenMemberID getSceneMemberName(SceneBase* scene);
@@ -139,4 +147,11 @@ struct Mgr : public Screen::Mgr {
};
} // namespace newScreen
+// no idea if theres a better place to put this, its kind of a random single function
+namespace kh {
+namespace Screen {
+::Screen::SceneBase* createScene_Koono(s32);
+} // namespace Screen
+} // namespace kh
+
#endif
diff --git a/include/kh/khDayEndResult.h b/include/kh/khDayEndResult.h
index c3733036c..0c04a75be 100644
--- a/include/kh/khDayEndResult.h
+++ b/include/kh/khDayEndResult.h
@@ -123,8 +123,8 @@ struct DispDayEndResultMail : public og::Screen::DispMemberBase {
JKRHeap* mHeap; // _08
JKRHeap* mBackupHeap; // _0C
MailCategory mMailCategory; // _10
- u32 _14; // _14, unknown
- u8 _18; // _18
+ u32 mExitStatus; // _14
+ bool mHasOpened; // _18
int mTodayMailID; // _1C
uint mDayCount; // _20
};
diff --git a/include/kh/khReadyGo.h b/include/kh/khReadyGo.h
index 29c411501..19e4afac3 100644
--- a/include/kh/khReadyGo.h
+++ b/include/kh/khReadyGo.h
@@ -3,6 +3,7 @@
#include "og/Screen/DispMember.h"
#include "Screen/screenObj.h"
+#include "Screen/Game2DMgr.h"
#include "P2DScreen.h"
struct JKRArchive;
@@ -17,7 +18,7 @@ struct DispReadyGo : public og::Screen::DispMemberBase {
DispReadyGo()
{
- mStatus = 0;
+ mStatus = ::Screen::Game2DMgr::CHECK2D_ReadyGo_NotFinished;
mIs2Player = false;
mIsFinalFloor = false;
mGameType = TYPE_2PBattle;
diff --git a/include/kh/khWinLose.h b/include/kh/khWinLose.h
index 3ac3b9a12..e47ebe46f 100644
--- a/include/kh/khWinLose.h
+++ b/include/kh/khWinLose.h
@@ -15,7 +15,7 @@ struct DispWinLose : public og::Screen::DispMemberBase {
DispWinLose(int type, int state)
{
mOutcome = type;
- _0C = state;
+ mStatus = state;
}
virtual u32 getSize() { return sizeof(DispWinLose); } // _08 (weak)
@@ -25,7 +25,7 @@ struct DispWinLose : public og::Screen::DispMemberBase {
// _00 = VTBL
// _00-_08 = DispMemberBase
int mOutcome; // _08
- int _0C; // _0C
+ int mStatus; // _0C
};
struct DispWinLoseReason : public og::Screen::DispMemberBase {
diff --git a/include/kh/khWorldMap.h b/include/kh/khWorldMap.h
index c7f1d9d0f..2648d09c7 100644
--- a/include/kh/khWorldMap.h
+++ b/include/kh/khWorldMap.h
@@ -66,11 +66,18 @@ struct InitArg {
u8 mDoNewEntriesEfx; // _16
};
-enum UpdateArgStatus { WMapUpdate_0, WMapUpdate_GoToLoad, WMapUpdate_2, WMapUpdate_GoToZukan, WMapUpdate_4, WMapUpdate_ReturnToTitle };
+enum UpdateArgStatus {
+ WMapUpdate_Null,
+ WMapUpdate_BeginGame,
+ WMapUpdate_UnusedZukan,
+ WMapUpdate_GoToZukanEnemy,
+ WMapUpdate_GoToZukanItem,
+ WMapUpdate_ReturnToTitle,
+};
struct UpdateArg {
CourseInfo* mCourseInfo; // _00
- int mStatus; // _04
+ int mStatus; // _04, see UpdateArgStatus
};
struct Base : public JKRDisposer {
@@ -108,22 +115,22 @@ struct WorldMap : public Game::WorldMap::Base {
WMAP_GoToZukanEnemy, // 7
WMAP_InSelReturnToTitle, // 8
WMAP_InSelLandHere, // 9
- WMAP_Unk10, // 10
- WMAP_Unk11, // 11
+ WMAP_BeginShipAppear, // 10
+ WMAP_BeginWait, // 11
WMAP_Unk12, // 12
- WMAP_Unk13, // 13
- WMAP_Unk14, // 14
+ WMAP_Begin, // 13
+ WMAP_LandingStart, // 14
};
enum WorldMapFlags {
- WMAPFLAG_Unk1 = 0x1,
- WMAPFLAG_Unk2 = 0x2,
- WMAPFLAG_IsFirstTimeEffect = 0x4,
- WMAPFLAG_Unk4 = 0x8,
- WMAPFLAG_Unk5 = 0x10,
- WMAPFLAG_Unk6 = 0x20,
- WMAPFLAG_Unk7 = 0x40,
- WMAPFLAG_Unk8 = 0x80,
+ WMAPFLAG_Unk1 = 0x1,
+ WMAPFLAG_Unk2 = 0x2,
+ WMAPFLAG_IsFirstTimeEffect = 0x4,
+ WMAPFLAG_Unk4 = 0x8,
+ WMAPFLAG_IsBackdropActive = 0x10, // if unset, lower backdrop alpha until it is 0
+ WMAPFLAG_IsBackdropBehindInfo = 0x20, // if set, backdrop is drawn before info screen, otherwise it is drawn after
+ WMAPFLAG_Unk7 = 0x40,
+ WMAPFLAG_Unk8 = 0x80,
};
enum RocketRotation {
@@ -212,7 +219,7 @@ struct WorldMap : public Game::WorldMap::Base {
f32 mAnimTimers[10]; // _68
f32 mCameraZoomMinFrame; // _90
f32 mCameraZoomX; // _94
- f32 _98; // _98
+ f32 mCameraZoomY; // _98, temp name
Vector2f mRocketPosition; // _9C
Vector2f mRocketPosition2; // _A4
JGeometry::TVec2f mRocketAngle; // _AC
@@ -285,7 +292,7 @@ struct WorldMap : public Game::WorldMap::Base {
_70.set(255, 128, 32, 255);
_74.set(255, 255, 128, 140);
mInputLockoutFrames = 8;
- _79 = 8;
+ mZukanFadeoutSpeed = 8;
}
f32 _00; // _00
@@ -311,7 +318,7 @@ struct WorldMap : public Game::WorldMap::Base {
JUtility::TColor _70; // _70
JUtility::TColor _74; // _74
u8 mInputLockoutFrames; // _78
- u8 _79; // _79
+ u8 mZukanFadeoutSpeed; // _79
} msVal;
};
} // namespace Screen
diff --git a/include/og/Screen/DispMember.h b/include/og/Screen/DispMember.h
index 25060443f..e430b4425 100644
--- a/include/og/Screen/DispMember.h
+++ b/include/og/Screen/DispMember.h
@@ -298,7 +298,7 @@ struct DispMemberDummy : public DispMemberBase {
// size 0xC
struct DispMemberFinalMessage : public DispMemberBase {
- inline DispMemberFinalMessage() { mFinalState = 0; }
+ inline DispMemberFinalMessage() { mFinalState = 0; } // ::Screen::Game2DMgr::CHECK2D_FinalMessage_NotOpen
virtual u32 getSize() { return sizeof(DispMemberFinalMessage); } // _08 (weak)
virtual u32 getOwnerID() { return OWNER_OGA; } // _0C (weak)
@@ -411,7 +411,7 @@ struct DispMemberKantei : public DispMemberBase {
mPelletMessageID = 0;
mPelletOffset = 0;
mTotalPokosCave = 5555;
- _28 = 0;
+ mIsPayDebt = false;
mSecondaryController = nullptr;
_29 = false;
mIsDone = false;
@@ -432,7 +432,7 @@ struct DispMemberKantei : public DispMemberBase {
u64 mPelletMessageID; // _18
u32 mPelletOffset; // _20
int mTotalPokosCave; // _24
- u8 _28; // _28
+ u8 mIsPayDebt; // _28
u8 _29; // _29
Controller* mSecondaryController; // _2C
u8 mIsDone; // _30
diff --git a/src/plugProjectEbisawaU/ebiOptionMgr.cpp b/src/plugProjectEbisawaU/ebiOptionMgr.cpp
index c122477f0..cc7e8abbf 100644
--- a/src/plugProjectEbisawaU/ebiOptionMgr.cpp
+++ b/src/plugProjectEbisawaU/ebiOptionMgr.cpp
@@ -185,10 +185,10 @@ void FSMState_WorldMapInfoWindow::do_init(TMgr* obj, Game::StateArg* arg)
void FSMState_WorldMapInfoWindow::do_exec(TMgr* obj)
{
switch (::Screen::gGame2DMgr->check_WorldMapInfoWin0()) {
- case 0:
+ case ::Screen::Game2DMgr::CHECK2D_WorldMapInfoWin0_Cancel:
transit(obj, ScreenWait, nullptr);
break;
- case 1:
+ case ::Screen::Game2DMgr::CHECK2D_WorldMapInfoWin0_Confirm:
obj->mOptionScreen.mOptionParamB.saveRam();
transit(obj, ScreenClose, nullptr);
break;
diff --git a/src/plugProjectKandoU/naviState.cpp b/src/plugProjectKandoU/naviState.cpp
index 9ba1e8b70..4c65aff16 100644
--- a/src/plugProjectKandoU/naviState.cpp
+++ b/src/plugProjectKandoU/naviState.cpp
@@ -4896,10 +4896,10 @@ void NaviContainerState::exec(Navi* navi)
if (mOnyon->mOnyonType == ONYON_TYPE_SHIP) {
switch (Screen::gGame2DMgr->check_UfoMenu()) {
- case 1:
+ case Screen::Game2DMgr::CHECK2D_Ufo_Cancel:
transit(navi, NSID_Walk, nullptr);
break;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_Ufo_Confirmed:
int a;
int b;
Screen::gGame2DMgr->result_UfoMenu(&a, &b);
@@ -4935,10 +4935,10 @@ void NaviContainerState::exec(Navi* navi)
}
} else {
switch (Screen::gGame2DMgr->check_Contena()) {
- case 1:
+ case Screen::Game2DMgr::CHECK2D_Contena_Cancel:
transit(navi, NSID_Walk, nullptr);
break;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_Contena_Confirmed:
int res = Screen::gGame2DMgr->result_Contena();
if (res < 0) {
Onyon* onyon = mOnyon;
diff --git a/src/plugProjectKandoU/singleGS_CaveGame.cpp b/src/plugProjectKandoU/singleGS_CaveGame.cpp
index 427e3ecea..8a5c3bb77 100644
--- a/src/plugProjectKandoU/singleGS_CaveGame.cpp
+++ b/src/plugProjectKandoU/singleGS_CaveGame.cpp
@@ -227,11 +227,11 @@ void CaveState::check_SMenu(SingleGameSection* game)
Screen::gGame2DMgr->setGamePad(game->mControllerP1);
int state = Screen::gGame2DMgr->check_SMenu();
switch (state) {
- case 1: // unpause and resume gameplay
+ case Screen::Game2DMgr::CHECK2D_SMenu_Cancel: // unpause and resume gameplay
gameSystem->setPause(false, "sm-canc", 3);
gameSystem->setMoviePause(false, "sm-canc");
return;
- case 4:
+ case Screen::Game2DMgr::CHECK2D_SMenu_EscapeCave:
gameSystem->resetFlag(GAMESYS_IsGameWorldActive);
gameSystem->setMoviePause(false, "sm-giveup");
if (moviePlayer->mDemoState != DEMOSTATE_Inactive)
@@ -261,7 +261,7 @@ void CaveState::check_SMenu(SingleGameSection* game)
}
}
return;
- case -1:
+ case Screen::Game2DMgr::CHECK2D_SMenu_Error:
// Conditions to open pause menu
if (!(gameSystem->isFlag(GAMESYS_DisablePause)) && moviePlayer->mDemoState == DEMOSTATE_Inactive && !gameSystem->paused()
&& game->mControllerP1->getButtonDown() & Controller::PRESS_START) {
@@ -274,7 +274,7 @@ void CaveState::check_SMenu(SingleGameSection* game)
gameSystem->setMoviePause(true, "open-sm");
}
break;
- case 0:
+ case Screen::Game2DMgr::CHECK2D_SMenu_Opened:
break;
default:
JUT_PANICLINE(854, "Illegal return value %d.", Screen::gGame2DMgr->check_SMenu());
diff --git a/src/plugProjectKandoU/singleGS_CaveResult.cpp b/src/plugProjectKandoU/singleGS_CaveResult.cpp
index 956046aeb..508efdf52 100644
--- a/src/plugProjectKandoU/singleGS_CaveResult.cpp
+++ b/src/plugProjectKandoU/singleGS_CaveResult.cpp
@@ -323,7 +323,7 @@ void CaveResultState::exec(SingleGameSection* section)
case 3:
switch (Screen::gGame2DMgr->check_CaveResult()) {
- case 1:
+ case Screen::Game2DMgr::CHECK2D_CaveResult_Finished:
LoadArg arg(mGameState, false, true, false);
section->loadMainMapSituation();
transit(section, SGS_Load, &arg);
diff --git a/src/plugProjectKandoU/singleGS_Ending.cpp b/src/plugProjectKandoU/singleGS_Ending.cpp
index af9d19881..c68ef5be3 100644
--- a/src/plugProjectKandoU/singleGS_Ending.cpp
+++ b/src/plugProjectKandoU/singleGS_Ending.cpp
@@ -217,16 +217,16 @@ void EndingState::exec(SingleGameSection* game)
case EndingStatus_ShowContinueMesg:
particle2dMgr->update();
switch (Screen::gGame2DMgr->check_FinalMessage()) {
- case 1:
+ case Screen::Game2DMgr::CHECK2D_FinalMessage_Continue:
PSGame::PikSceneMgr* mgr = static_cast(PSSystem::getSceneMgr());
mgr->checkScene();
mgr->mScenes->mChild->stopMainSeq(30);
Screen::gGame2DMgr->mScreenMgr->reset();
- mStatus = 7;
+ mStatus = EndingStatus_PlayMoviePostDebtStart;
mThpState = 1;
mTHPPlayer->load(THPPlayer::OPENING_PostDebtStart);
break;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_FinalMessage_ConfirmQuit:
game->flow_goto_title();
break;
}
diff --git a/src/plugProjectKandoU/singleGS_MainGame.cpp b/src/plugProjectKandoU/singleGS_MainGame.cpp
index 0f8cbb339..c4c4e5dbf 100644
--- a/src/plugProjectKandoU/singleGS_MainGame.cpp
+++ b/src/plugProjectKandoU/singleGS_MainGame.cpp
@@ -481,20 +481,20 @@ void GameState::exec(SingleGameSection* game)
// Check status of opened pause menu
int menustate = Screen::gGame2DMgr->check_SMenu();
switch (menustate) {
- case 0:
+ case Screen::Game2DMgr::CHECK2D_SMenu_Opened:
break;
- case 1: // cancel menu
+ case Screen::Game2DMgr::CHECK2D_SMenu_Cancel: // cancel menu
gameSystem->setMoviePause(false, "sm-canc");
gameSystem->setPause(false, "sm-canc", 3);
break;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_SMenu_GoToSunset:
gameSystem->resetFlag(GAMESYS_IsGameWorldActive);
gameSystem->setMoviePause(false, "sm-ugot");
gameSystem->setPause(false, "sm-ugot", 3);
DayEndArg arg(DayEndState::DETYPE_Normal);
transit(game, SGS_DayEnd, &arg);
return;
- case 3:
+ case Screen::Game2DMgr::CHECK2D_SMenu_ReturnToFileSelect:
P2ASSERTLINE(1304, Screen::gGame2DMgr->mScreenMgr->reset() == 1);
playData->mDeadNaviID = 0;
naviMgr->clearDeadCount();
@@ -504,7 +504,7 @@ void GameState::exec(SingleGameSection* game)
game->clearHeap();
transit(game, SGS_File, nullptr);
return;
- case 4:
+ case Screen::Game2DMgr::CHECK2D_SMenu_EscapeCave:
JUT_PANICLINE(1318, "smenu_escape\n");
break;
default:
diff --git a/src/plugProjectKandoU/singleGS_MainResult.cpp b/src/plugProjectKandoU/singleGS_MainResult.cpp
index 21d6dbdb1..396ef3580 100644
--- a/src/plugProjectKandoU/singleGS_MainResult.cpp
+++ b/src/plugProjectKandoU/singleGS_MainResult.cpp
@@ -144,10 +144,10 @@ void MainResultState::exec(SingleGameSection* game)
break;
case Result_ScreenActive:
switch (Screen::gGame2DMgr->check_DayEndResult()) {
- case 1:
+ case Screen::Game2DMgr::CHECK2D_DayResult_SaveFinished:
moviePlayer->unsuspend(1, false);
break;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_DayResult_ReturnToFileSelect:
moviePlayer->stop();
game->clearHeap();
transit(game, SGS_File, nullptr);
diff --git a/src/plugProjectKandoU/singleGS_WorldMap.cpp b/src/plugProjectKandoU/singleGS_WorldMap.cpp
index 880a1fc1f..70c3173c8 100644
--- a/src/plugProjectKandoU/singleGS_WorldMap.cpp
+++ b/src/plugProjectKandoU/singleGS_WorldMap.cpp
@@ -102,8 +102,8 @@ void SelectState::initNext(SingleGameSection* section)
arg.mHasNewPiklopediaEntries = playData->mTekiStatMgr.whatsNew();
arg.mHasNewTreasureHoardEntries = playData->hasPelletZukanWhatsNew();
- arg.mDoNewEntriesEfx = section->_228;
- section->_228 = 1;
+ arg.mDoNewEntriesEfx = section->mIsGameStarted;
+ section->mIsGameStarted = true;
static_cast(mWorldMap)->init(arg);
section->mDisplayWiper = section->mWipeInFader;
@@ -179,11 +179,11 @@ void SelectState::exec(SingleGameSection* game)
game->BaseHIOSection::doUpdate();
WorldMap::UpdateArg arg;
arg.mCourseInfo = nullptr;
- arg.mStatus = WorldMap::WMapUpdate_0;
+ arg.mStatus = WorldMap::WMapUpdate_Null;
static_cast(mWorldMap)->update(arg);
switch (arg.mStatus) {
- case WorldMap::WMapUpdate_GoToLoad: {
+ case WorldMap::WMapUpdate_BeginGame: {
mPreviousCourseID = -1;
ZukanState* state = static_cast(game->mFsm->getState(SGS_Zukan));
if (state) {
@@ -191,8 +191,8 @@ void SelectState::exec(SingleGameSection* game)
state->_114 = -1;
}
if (arg.mCourseInfo) {
- CourseInfo* info = arg.mCourseInfo;
- game->_228 = 0;
+ CourseInfo* info = arg.mCourseInfo;
+ game->mIsGameStarted = false;
playData->setPelletZukanOutOfDateAll();
playData->mTekiStatMgr.setOutOfDateAll();
game->mDisplayWiper = game->mWipeInFader;
@@ -203,22 +203,22 @@ void SelectState::exec(SingleGameSection* game)
}
break;
}
- case WorldMap::WMapUpdate_2: {
+ case WorldMap::WMapUpdate_UnusedZukan: {
ZukanStateArg sarg;
- sarg.mZukanType = 1;
- sarg.mCourseID = 0;
+ sarg.mZukanType = ZukanType_Enemy;
+ sarg.mCourseID = kh::Screen::WorldMap::COURSE_Tutorial;
transit(game, SGS_Zukan, &sarg);
break;
}
- case WorldMap::WMapUpdate_GoToZukan: {
+ case WorldMap::WMapUpdate_GoToZukanEnemy: {
ZukanStateArg sarg;
- sarg.mZukanType = 1;
- sarg.mCourseID = 0;
+ sarg.mZukanType = ZukanType_Enemy;
+ sarg.mCourseID = kh::Screen::WorldMap::COURSE_Tutorial;
if (arg.mCourseInfo) {
sarg.mCourseID = arg.mCourseInfo->mCourseIndex;
mPreviousCourseID = sarg.mCourseID;
} else {
- sarg.mCourseID = 2;
+ sarg.mCourseID = kh::Screen::WorldMap::COURSE_Yakushima;
}
transit(game, SGS_Zukan, &sarg);
break;
@@ -230,19 +230,19 @@ void SelectState::exec(SingleGameSection* game)
state->_110 = -1;
state->_114 = -1;
}
- game->_228 = 0;
+ game->mIsGameStarted = false;
game->flow_goto_title();
return;
}
- case WorldMap::WMapUpdate_4: {
+ case WorldMap::WMapUpdate_GoToZukanItem: {
ZukanStateArg sarg2;
- sarg2.mZukanType = 0;
- sarg2.mCourseID = 0;
+ sarg2.mZukanType = ZukanType_Item;
+ sarg2.mCourseID = kh::Screen::WorldMap::COURSE_Tutorial;
if (arg.mCourseInfo) {
sarg2.mCourseID = arg.mCourseInfo->mCourseIndex;
mPreviousCourseID = sarg2.mCourseID;
} else {
- sarg2.mCourseID = 2;
+ sarg2.mCourseID = kh::Screen::WorldMap::COURSE_Yakushima;
}
transit(game, SGS_Zukan, &sarg2);
break;
diff --git a/src/plugProjectKandoU/singleGS_Zukan.cpp b/src/plugProjectKandoU/singleGS_Zukan.cpp
index 889d6b1c0..1f82e261e 100644
--- a/src/plugProjectKandoU/singleGS_Zukan.cpp
+++ b/src/plugProjectKandoU/singleGS_Zukan.cpp
@@ -1407,8 +1407,9 @@ void ZukanState::exec(SingleGameSection* game)
execModeChange(game, ModePellet);
break;
case ModeTeki:
- int idk;
- if (!sys->dvdLoadSyncAllNoBlock() && Screen::gGame2DMgr->check_ZukanEnemyRequest(idk) == 3) {
+ int enemyID;
+ if (!sys->dvdLoadSyncAllNoBlock()
+ && Screen::gGame2DMgr->check_ZukanEnemyRequest(enemyID) == Screen::Game2DMgr::CHECK2D_Zukan_ExitFinished) {
clearHeaps();
transit(game, SGS_Select, nullptr);
} else {
@@ -1416,7 +1417,8 @@ void ZukanState::exec(SingleGameSection* game)
}
break;
case ModePellet:
- if (!sys->dvdLoadSyncAllNoBlock() && Screen::gGame2DMgr->check_ZukanItemRequest(idk) == 3) {
+ if (!sys->dvdLoadSyncAllNoBlock()
+ && Screen::gGame2DMgr->check_ZukanItemRequest(enemyID) == Screen::Game2DMgr::CHECK2D_Zukan_ExitFinished) {
clearHeaps();
transit(game, SGS_Select, nullptr);
} else {
diff --git a/src/plugProjectKandoU/singleGameSection.cpp b/src/plugProjectKandoU/singleGameSection.cpp
index a5c18dda0..7682d25e0 100644
--- a/src/plugProjectKandoU/singleGameSection.cpp
+++ b/src/plugProjectKandoU/singleGameSection.cpp
@@ -266,7 +266,7 @@ void SingleGameSection::flow_goto_title() { mDoEnd = true; }
*/
void SingleGameSection::onInit()
{
- _228 = 0;
+ mIsGameStarted = false;
gameSystem->mMode = GSM_STORY_MODE;
System::assert_fragmentation("SGS::onInit");
@@ -276,11 +276,11 @@ void SingleGameSection::onInit()
clearCaveMenus();
mUnusedFlag = false;
- mLoadGameCallback = new Delegate(this, setupFloatMemory);
+ mLoadGameCallback = new Delegate(this, setupFloatMemory);
mFsm = new SingleGame::FSM;
mFsm->init(this);
- mFsm->start(this, 0, nullptr);
+ mFsm->start(this, SingleGame::SGS_File, nullptr);
System::assert_fragmentation("SGS::FSM");
setupFixMemory();
@@ -807,9 +807,9 @@ bool SingleGameSection::updateCaveMenus()
u32 flag = mOpenMenuFlags;
if (flag & 1) {
switch (Screen::gGame2DMgr->check_CaveInMenu()) {
- case 0:
+ case Screen::Game2DMgr::CHECK2D_CaveInMenu_MenuOpen:
break;
- case 1:
+ case Screen::Game2DMgr::CHECK2D_CaveInMenu_Confirm:
playData->mNaviLifeMax[NAVIID_Olimar] = naviMgr->mNaviParms->mNaviParms.mMaxHealth;
playData->mNaviLifeMax[NAVIID_Louie] = naviMgr->mNaviParms->mNaviParms.mMaxHealth;
gameSystem->setPause(false, "cave-yes", 3);
@@ -817,20 +817,20 @@ bool SingleGameSection::updateCaveMenus()
mOpenMenuFlags &= ~1;
goCave(mCurrentCave);
return true;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_CaveInMenu_Cancel:
gameSystem->setPause(false, "cave-no", 3);
gameSystem->setMoviePause(false, "cave-no");
mOpenMenuFlags &= ~1;
break;
- case 3:
+ case Screen::Game2DMgr::CHECK2D_CaveInMenu_Unused:
gameSystem->setMoviePause(false, "cave-zenkai");
break;
}
} else if (flag & 2) {
switch (Screen::gGame2DMgr->check_CaveMoreMenu()) {
- case 0:
+ case Screen::Game2DMgr::CHECK2D_CaveMoreMenu_MenuOpen:
break;
- case 1:
+ case Screen::Game2DMgr::CHECK2D_CaveMoreMenu_Confirm:
playData->mNaviLifeMax[NAVIID_Olimar] = naviMgr->getAt(NAVIID_Olimar)->mHealth;
playData->mNaviLifeMax[NAVIID_Louie] = naviMgr->getAt(NAVIID_Louie)->mHealth;
gameSystem->setPause(false, "more-yes", 3);
@@ -838,27 +838,27 @@ bool SingleGameSection::updateCaveMenus()
mOpenMenuFlags &= ~2;
goNextFloor(mHole);
return true;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_CaveMoreMenu_Cancel:
gameSystem->setPause(false, "more-no", 3);
gameSystem->setMoviePause(false, "more-no");
mOpenMenuFlags &= ~2;
break;
- case 3:
+ case Screen::Game2DMgr::CHECK2D_CaveMoreMenu_Unused:
gameSystem->setMoviePause(false, "more-zenkai");
break;
}
} else if (flag & 4) {
switch (Screen::gGame2DMgr->check_KanketuMenu()) {
- case 1:
+ case Screen::Game2DMgr::CHECK2D_KanketuMenu_Confirm:
gameSystem->setPause(false, "kank-yes", 3);
gameSystem->setMoviePause(false, "kank-yes");
mOpenMenuFlags &= ~4;
goMainMap(mFountain);
return true;
- case 0:
- case 3:
+ case Screen::Game2DMgr::CHECK2D_KanketuMenu_MenuOpen:
+ case Screen::Game2DMgr::CHECK2D_KanketuMenu_Unused:
break;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_KanketuMenu_Cancel:
gameSystem->setPause(false, "kank-no", 3);
gameSystem->setMoviePause(false, "kank-no");
mOpenMenuFlags &= ~4;
diff --git a/src/plugProjectKandoU/vsGS_Game.cpp b/src/plugProjectKandoU/vsGS_Game.cpp
index 1eb8e2469..4e1bb442d 100644
--- a/src/plugProjectKandoU/vsGS_Game.cpp
+++ b/src/plugProjectKandoU/vsGS_Game.cpp
@@ -167,7 +167,7 @@ void GameState::exec(VsGameSection* section)
if (isFlag(VSGS_Unk8)) {
switch (Screen::gGame2DMgr->check_ReadyGo()) {
- case 1:
+ case Screen::Game2DMgr::CHECK2D_ReadyGo_Finished:
gameSystem->setPause(false, "vs-rg-arr", 3);
gameSystem->setMoviePause(false, "vs-rg-arr");
resetFlag(VSGS_Unk8);
@@ -224,7 +224,7 @@ void GameState::exec(VsGameSection* section)
section->mVsWinner = -1;
}
- kh::Screen::DispWinLose winLose(outcome, 1);
+ kh::Screen::DispWinLose winLose(outcome, ::Screen::Game2DMgr::CHECK2D_WinLose_Opened);
Screen::gGame2DMgr->open_WinLose(winLose);
return;
@@ -235,13 +235,13 @@ void GameState::exec(VsGameSection* section)
if (isFlag(VSGS_Unk10)) {
switch (Screen::gGame2DMgr->check_WinLose()) {
- case 0:
- case 1:
- case 2:
+ case Screen::Game2DMgr::CHECK2D_WinLose_NotOpened:
+ case Screen::Game2DMgr::CHECK2D_WinLose_Opened:
+ case Screen::Game2DMgr::CHECK2D_WinLose_AnimDone:
break;
- case 3:
+ case Screen::Game2DMgr::CHECK2D_WinLose_Finished:
TitleArg arg;
- arg._00 = 1;
+ arg.mDoNeedClearHeap = true;
transit(section, VGS_Title, &arg);
}
return;
@@ -269,11 +269,11 @@ void GameState::exec(VsGameSection* section)
if (isFlag(VSGS_Unk4)) {
switch (Screen::gGame2DMgr->check_WinLose()) {
- case 0:
- case 1:
- case 2:
+ case Screen::Game2DMgr::CHECK2D_WinLose_NotOpened:
+ case Screen::Game2DMgr::CHECK2D_WinLose_Opened:
+ case Screen::Game2DMgr::CHECK2D_WinLose_AnimDone:
break;
- case 3:
+ case Screen::Game2DMgr::CHECK2D_WinLose_Finished:
GameStat::alivePikis.clear();
ResultArg arg;
arg.mEndFlag.clear();
@@ -306,10 +306,10 @@ void GameState::exec(VsGameSection* section)
if (!isFlag(VSGS_Unk1) && section->mHole) {
switch (Screen::gGame2DMgr->check_CaveMoreMenu()) {
- case 0:
+ case Screen::Game2DMgr::CHECK2D_CaveMoreMenu_MenuOpen:
break;
- case 1:
+ case Screen::Game2DMgr::CHECK2D_CaveMoreMenu_Confirm:
gameSystem->resetFlag(GAMESYS_IsGameWorldActive);
gameSystem->setPause(false, "cmore-yes", 3);
gameSystem->setMoviePause(false, "cmore-yes");
@@ -317,12 +317,12 @@ void GameState::exec(VsGameSection* section)
setFlag(VSGS_Unk1);
return;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_CaveMoreMenu_Cancel:
gameSystem->setPause(false, "cmore-no", 3);
gameSystem->setMoviePause(false, "cmore-no");
break;
- case 3:
+ case Screen::Game2DMgr::CHECK2D_CaveInMenu_Unused:
gameSystem->resetFlag(GAMESYS_IsGameWorldActive);
gameSystem->setMoviePause(false, "cmore-zenk");
break;
@@ -419,27 +419,27 @@ void GameState::checkFindKeyDemo(VsGameSection* section)
void GameState::checkSMenu(VsGameSection* section)
{
switch (Screen::gGame2DMgr->check_SMenu()) {
- case 1:
+ case Screen::Game2DMgr::CHECK2D_SMenu_Cancel:
gameSystem->setPause(false, "sm-canc", 3);
gameSystem->setMoviePause(false, "sm-canc");
- case 0: // this is just cursed
+ case Screen::Game2DMgr::CHECK2D_SMenu_Opened:
return;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_SMenu_GoToSunset:
JUT_PANICLINE(617, "ありえないっす\n"); // 'impossible'
return;
- case 3:
+ case Screen::Game2DMgr::CHECK2D_SMenu_ReturnToFileSelect:
JUT_PANICLINE(620, "ない\n"); // 'no'
return;
- case 5:
+ case Screen::Game2DMgr::CHECK2D_SMenu_QuitChallenge:
gameSystem->setMoviePause(false, "sm-quit");
if (gameSystem->isVersusMode()) {
section->mVsWinner = -1;
gameSystem->resetFlag(GAMESYS_IsGameWorldActive);
TitleArg titleArg;
- titleArg._00 = 1;
+ titleArg.mDoNeedClearHeap = true;
transit(section, VGS_Title, &titleArg);
return;
}
@@ -480,7 +480,7 @@ void GameState::checkSMenu(VsGameSection* section)
}
} else if (gameSystem->isMultiplayerMode()) {
- if ((section->mControllerP2->isButtonDown(JUTGamePad::PRESS_START))) {
+ if (section->mControllerP2->isButtonDown(JUTGamePad::PRESS_START)) {
og::Screen::DispMemberSMenuAll sMenu;
int versus = 2;
if (gameSystem->isVersusMode()) {
@@ -810,7 +810,7 @@ void GameState::onMovieDone(VsGameSection* section, MovieConfig* config, u32 p1,
GameStat::alivePikis.clear();
moviePlayer->clearSuspendedDemo();
TitleArg arg;
- arg._00 = 1;
+ arg.mDoNeedClearHeap = true;
transit(section, VGS_Title, &arg);
} else if (config->is("s03_orimadown")) {
diff --git a/src/plugProjectKandoU/vsGS_Title.cpp b/src/plugProjectKandoU/vsGS_Title.cpp
index a81568213..37aa9760a 100644
--- a/src/plugProjectKandoU/vsGS_Title.cpp
+++ b/src/plugProjectKandoU/vsGS_Title.cpp
@@ -55,7 +55,7 @@ void TitleState::init(VsGameSection* section, StateArg* arg)
section->mCurrentFloor = 0;
TitleArg* titleArg = static_cast(arg);
- if (titleArg && titleArg->_00) {
+ if (titleArg && titleArg->mDoNeedClearHeap) {
section->clearHeap();
}
@@ -214,11 +214,11 @@ void TitleState::execChallenge(VsGameSection* section)
int playType;
int check = Screen::gGame2DMgr->check_ChallengeSelect(stageNumber, playType);
switch (check) {
- case 2:
+ case Screen::Game2DMgr::CHECK2D_ChallengeSelect_CancelToTitle:
section->mIsMenuRunning = true;
return;
- case 3:
+ case Screen::Game2DMgr::CHECK2D_ChallengeSelect_ExitFinished:
OSReport("from Morimun:STATE_GO:stageNo=%d:playType=%d\n", stageNumber, playType);
if (section->mIsVersusMode) {
@@ -330,10 +330,10 @@ void TitleState::execVs(VsGameSection* section)
int stageNumber;
int check = Screen::gGame2DMgr->check_VsSelect(stageNumber, section->mOlimarHandicap, section->mLouieHandicap);
switch (check) {
- case 2:
+ case Screen::Game2DMgr::CHECK2D_VsSelect_CancelToTitle:
section->mIsMenuRunning = true;
return;
- case 3:
+ case Screen::Game2DMgr::CHECK2D_VsSelect_ExitFinished:
gameSystem->mMode = GSM_VERSUS_MODE;
LoadArg load(0, 0, 0);
diff --git a/src/plugProjectKandoU/vsGameSection.cpp b/src/plugProjectKandoU/vsGameSection.cpp
index f0f56644e..31c92f14c 100644
--- a/src/plugProjectKandoU/vsGameSection.cpp
+++ b/src/plugProjectKandoU/vsGameSection.cpp
@@ -567,10 +567,10 @@ bool VsGameSection::updateCaveMenus()
{
if (mMenuFlags & 2) {
switch (Screen::gGame2DMgr->check_CaveMoreMenu()) {
- case 0:
+ case Screen::Game2DMgr::CHECK2D_CaveMoreMenu_MenuOpen:
break;
- case 1:
+ case Screen::Game2DMgr::CHECK2D_CaveMoreMenu_Confirm:
playData->mNaviLifeMax[NAVIID_Olimar] = naviMgr->getAt(NAVIID_Olimar)->mHealth;
playData->mNaviLifeMax[NAVIID_Louie] = naviMgr->getAt(NAVIID_Louie)->mHealth;
gameSystem->setPause(false, "more-yes", 3);
@@ -579,23 +579,23 @@ bool VsGameSection::updateCaveMenus()
goNextFloor(mHole);
return true;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_CaveMoreMenu_Cancel:
gameSystem->setPause(false, "more-no", 3);
gameSystem->setMoviePause(false, "more-no");
mMenuFlags &= ~2;
break;
- case 3:
+ case Screen::Game2DMgr::CHECK2D_CaveMoreMenu_Unused:
gameSystem->setMoviePause(false, "more-zenkai");
break;
}
} else if (mMenuFlags & 4) {
switch (Screen::gGame2DMgr->check_KanketuMenu()) {
- case 0:
+ case Screen::Game2DMgr::CHECK2D_KanketuMenu_MenuOpen:
break;
- case 1:
+ case Screen::Game2DMgr::CHECK2D_KanketuMenu_Confirm:
gameSystem->setPause(false, "kk-yes", 3);
gameSystem->setMoviePause(false, "kk-yes");
mMenuFlags &= ~4;
@@ -608,13 +608,13 @@ bool VsGameSection::updateCaveMenus()
moviePlayer->play(arg);
return true;
- case 2:
+ case Screen::Game2DMgr::CHECK2D_KanketuMenu_Cancel:
gameSystem->setPause(false, "kk-no", 3);
gameSystem->setMoviePause(false, "kk-no");
mMenuFlags &= ~4;
break;
- case 3:
+ case Screen::Game2DMgr::CHECK2D_KanketuMenu_Unused:
break;
}
}
diff --git a/src/plugProjectKonoU/khCaveResult.cpp b/src/plugProjectKonoU/khCaveResult.cpp
index 9fd05c7ad..b2243610d 100644
--- a/src/plugProjectKonoU/khCaveResult.cpp
+++ b/src/plugProjectKonoU/khCaveResult.cpp
@@ -14,6 +14,7 @@
#include "LoadResource.h"
#include "Controller.h"
#include "Dolphin/gx.h"
+#include "Screen/Game2DMgr.h"
namespace kh {
namespace Screen {
@@ -60,7 +61,7 @@ void DispCaveResult::init(Game::Result::TNode* node, u32 death, bool caveComp)
mDeadPikis = death;
mCaveComp = caveComp;
- mIsFinished = 0;
+ mIsFinished = ::Screen::Game2DMgr::CHECK2D_CaveResult_MenuOpen;
}
/**
@@ -295,7 +296,7 @@ bool ObjCaveResult::doUpdate()
switch (mSaveMgr->mCurrStateID) {
case 2:
case 0:
- disp->mIsFinished = 1;
+ disp->mIsFinished = ::Screen::Game2DMgr::CHECK2D_CaveResult_Finished;
break;
case 1:
diff --git a/src/plugProjectKonoU/khDayEndResult.cpp b/src/plugProjectKonoU/khDayEndResult.cpp
index cc57f2e85..f232bf240 100644
--- a/src/plugProjectKonoU/khDayEndResult.cpp
+++ b/src/plugProjectKonoU/khDayEndResult.cpp
@@ -11,6 +11,7 @@
#include "og/newScreen/ogUtil.h"
#include "Dolphin/rand.h"
#include "LoadResource.h"
+#include "Screen/Game2DMgr.h"
namespace kh {
namespace Screen {
@@ -125,8 +126,8 @@ DispDayEndResultMail::DispDayEndResultMail(JKRHeap* heap, MailCategory category)
mHeap = heap;
mBackupHeap = nullptr;
mMailCategory = category;
- _14 = 0;
- _18 = 0;
+ mExitStatus = ::Screen::Game2DMgr::CHECK2D_DayResult_MenuOpen;
+ mHasOpened = false;
mTodayMailID = -1;
mDayCount = Game::gameSystem->mTimeMgr->mDayCount;
}
@@ -1705,7 +1706,7 @@ void ObjDayEndResultMail::doCreate(JKRArchive* arc)
mFadePaneArrowR->set_init_alpha(0);
setInfAlpha(mScreenCharacter->search('NitemW'));
changeAlpha();
- if (dispResult->mMail._18) {
+ if (dispResult->mMail.mHasOpened) {
mStatus = MAILSTATUS_Normal;
mAlpha = 255;
changeAlpha();
@@ -1737,7 +1738,7 @@ bool ObjDayEndResultMail::doStart(const ::Screen::StartSceneArg* arg)
JUT_PANICLINE(2022, "disp member err");
}
DispDayEndResult* dispResult = static_cast(getDispMember());
- if (!dispResult->mMail._18) {
+ if (!dispResult->mMail.mHasOpened) {
PSSystem::spSysIF->playSystemSe(PSSE_SY_MAIL_RECIEVE, 0);
}
return true;
@@ -1788,7 +1789,7 @@ bool ObjDayEndResultMail::doUpdate()
switch (mSaveMgr->mCurrStateID) {
case 2:
case 0:
- dispResult->mMail._14 = 1;
+ dispResult->mMail.mExitStatus = ::Screen::Game2DMgr::CHECK2D_DayResult_SaveFinished;
break;
case 1:
@@ -1796,7 +1797,7 @@ bool ObjDayEndResultMail::doUpdate()
break;
case 3:
- dispResult->mMail._14 = 2;
+ dispResult->mMail.mExitStatus = ::Screen::Game2DMgr::CHECK2D_DayResult_ReturnToFileSelect;
break;
}
}
@@ -1994,7 +1995,7 @@ void ObjDayEndResultMail::statusWaitOpen()
JUT_PANICLINE(2289, "disp member err");
}
DispDayEndResult* dispResult = static_cast(getDispMember());
- dispResult->mMail._18 = 1;
+ dispResult->mMail.mHasOpened = true;
SceneDayEndResultMail* scene = static_cast(getOwner());
diff --git a/src/plugProjectKonoU/khFinalResult.cpp b/src/plugProjectKonoU/khFinalResult.cpp
index 2692b8956..d5d77f0f9 100644
--- a/src/plugProjectKonoU/khFinalResult.cpp
+++ b/src/plugProjectKonoU/khFinalResult.cpp
@@ -8,15 +8,11 @@
#include "LoadResource.h"
#include "JSystem/J2D/J2DAnmLoader.h"
#include "Dolphin/rand.h"
+#include "Screen/Game2DMgr.h"
#include "trig.h"
static void _Print(char* format, ...) { OSReport(format, __FILE__); }
-// char* bloNames[16] = { "result_final_image00.blo", "result_final_image01.blo", "result_final_image02.blo", "result_final_image03.blo",
-// "result_final_image04.blo", "result_final_image05.blo", "result_final_image06.blo", "result_final_image07.blo",
-// "result_final_image08.blo", "result_final_image09.blo", "result_final_image10.blo", "result_final_image11.blo",
-// "result_final_image12.blo", "result_final_image13.blo", "result_final_image14.blo", "result_final_image15.blo" };
-
namespace kh {
namespace Screen {
@@ -99,7 +95,7 @@ DispFinalResult::DispFinalResult(TotalResultData* data, DispFinalResult::ResultT
{
mTotalResultData = data;
mResultType = type;
- mExitStatus = 0;
+ mExitStatus = ::Screen::Game2DMgr::CHECK2D_FinalResult_MenuOpen;
mHeap = heap;
}
@@ -1166,7 +1162,7 @@ bool ObjFinalResult::doUpdate()
case 2:
JUT_ASSERTLINE(382, getDispMember()->isID(OWNER_KH, MEMBER_FINAL_RESULT), "disp member err");
DispFinalResult* disp = static_cast(getDispMember());
- disp->mExitStatus = 1;
+ disp->mExitStatus = ::Screen::Game2DMgr::CHECK2D_FinalResult_Finished;
break;
case 1:
mFlags &= ~SaveOpen;
diff --git a/src/plugProjectKonoU/khReadyGo.cpp b/src/plugProjectKonoU/khReadyGo.cpp
index a0a394089..39388e8be 100644
--- a/src/plugProjectKonoU/khReadyGo.cpp
+++ b/src/plugProjectKonoU/khReadyGo.cpp
@@ -8,8 +8,9 @@
#include "efx2d/T2DGo.h"
#include "Game/GameSystem.h"
#include "JSystem/J2D/J2DAnmLoader.h"
+#include "Screen/Game2DMgr.h"
-static const char pad[] = { "\0\0\0\0\0\0\0\0" };
+static const u32 padding[] = { 0, 0, 0 };
static void _Print(char* format, ...) { OSReport(format, __FILE__); }
namespace kh {
@@ -178,7 +179,7 @@ bool ObjReadyGo::updateAnimation()
// Set the status of the display member to 1 and start the main BGM if necessary
if (mAnimTime1[i] >= goalTime2) {
mIsAnimComplete = true;
- disp->mStatus = 1;
+ disp->mStatus = ::Screen::Game2DMgr::CHECK2D_ReadyGo_Finished;
}
}
diff --git a/src/plugProjectKonoU/khWinLose.cpp b/src/plugProjectKonoU/khWinLose.cpp
index 986d886ab..8aada56cd 100644
--- a/src/plugProjectKonoU/khWinLose.cpp
+++ b/src/plugProjectKonoU/khWinLose.cpp
@@ -4,6 +4,7 @@
#include "JSystem/JKernel/JKRArchive.h"
#include "utilityU.h"
#include "JSystem/J2D/J2DAnmLoader.h"
+#include "Screen/Game2DMgr.h"
static void _Print(char* format, ...) { OSReport(format, __FILE__); }
@@ -224,11 +225,11 @@ bool ObjWinLose::updateAnimation()
// Check if it's time to stop playing BGM and SEs
if (old > msVal.mEndBGMFrame) {
- disp->_0C = 3;
+ disp->mStatus = ::Screen::Game2DMgr::CHECK2D_WinLose_Finished;
PSStop2DStream();
PSMuteOffSE_on2D();
} else if (mFrameTimer > msVal.mFinishFrame) {
- disp->_0C = 2;
+ disp->mStatus = ::Screen::Game2DMgr::CHECK2D_WinLose_AnimDone;
}
return false;
diff --git a/src/plugProjectKonoU/khWorldMap.cpp b/src/plugProjectKonoU/khWorldMap.cpp
index e5dedcd78..97d401be9 100644
--- a/src/plugProjectKonoU/khWorldMap.cpp
+++ b/src/plugProjectKonoU/khWorldMap.cpp
@@ -166,7 +166,7 @@ WorldMap::WorldMap()
mAnimTimers[0] = 0.0f;
mCameraZoomX = 0.0f;
mCameraZoomMinFrame = 0.0f;
- _98 = 1.0f;
+ mCameraZoomY = 1.0f;
mRocketPosition.set(0.0f, 0.0f);
mRocketPosition2.set(0.0f, 0.0f);
@@ -209,7 +209,7 @@ WorldMap::WorldMap()
mColorAnim2 = nullptr;
mArrowBlink = nullptr;
// possibly a substruct?
- mCurrentState = WMAP_Unk13;
+ mCurrentState = WMAP_Begin;
mRocketAngleMode = ROT_Unk1;
mFlags = WMAPFLAG_IsFirstTimeEffect;
// end possible substruct
@@ -624,7 +624,7 @@ void WorldMap::loadResource()
* @note Address: 0x803F37D4
* @note Size: 0x1C20
*/
-void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
+void WorldMap::update(Game::WorldMap::UpdateArg& arg)
{
arg.mCourseInfo = mInitArg.mStages->getCourseInfo(mCurrentCourseIndex);
mKitaAnim1->mCurrentFrame = mAnimTimers[0];
@@ -750,7 +750,7 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
if (test < msVal._0C) {
mRocketMoveCounter = 0;
mCurrentState = WMAP_Idle;
- PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_5);
+ PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_Idle);
}
onyonMove();
changeState();
@@ -807,15 +807,15 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
} else if (dist > msVal._14) {
mCurrentState = WMAP_RocketMoving3;
- resetFlag(WMAPFLAG_Unk1 | WMAPFLAG_Unk4 | WMAPFLAG_Unk6);
- setFlag(WMAPFLAG_Unk5);
+ resetFlag(WMAPFLAG_Unk1 | WMAPFLAG_Unk4 | WMAPFLAG_IsBackdropBehindInfo);
+ setFlag(WMAPFLAG_IsBackdropActive);
mRocketMoveCounter = 0;
}
if (mRocketMoveCounter > 60 && dist > msVal._14) {
mCurrentState = WMAP_RocketMoving3;
- resetFlag(WMAPFLAG_Unk1 | WMAPFLAG_Unk4 | WMAPFLAG_Unk6);
- setFlag(WMAPFLAG_Unk5);
+ resetFlag(WMAPFLAG_Unk1 | WMAPFLAG_Unk4 | WMAPFLAG_IsBackdropBehindInfo);
+ setFlag(WMAPFLAG_IsBackdropActive);
mRocketMoveCounter = 0;
}
@@ -829,7 +829,7 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
break;
}
- case WMAP_Unk14: {
+ case WMAP_LandingStart: {
f32 test = rocketMove(cPointPane, true);
rocketUpdate(cWaitPane);
if (test < msVal._18) {
@@ -851,16 +851,16 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
rocketUpdate(cPointPane);
if (dist < msVal._14) {
mRocketMoveCounter = 0;
- arg.mStatus = 1;
+ arg.mStatus = Game::WorldMap::WMapUpdate_BeginGame;
finish();
break;
}
- if (mZukanFadeout < 255 - msVal._79) {
- mZukanFadeout += msVal._79 >> 1;
+ if (mZukanFadeout < 255 - msVal.mZukanFadeoutSpeed) {
+ mZukanFadeout += msVal.mZukanFadeoutSpeed >> 1;
}
if (mInitArg.mController->getButtonDown() & Controller::PRESS_B) {
mCurrentState = WMAP_InputTarget;
- resetFlag(WMAPFLAG_Unk1 | WMAPFLAG_Unk2 | WMAPFLAG_Unk5);
+ resetFlag(WMAPFLAG_Unk1 | WMAPFLAG_Unk2 | WMAPFLAG_IsBackdropActive);
mRocketMoveCounter = 0;
}
onyonMove();
@@ -877,7 +877,7 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
if (x * x + y * y < msVal._0C) {
postureControl(cWaitPane);
mCurrentState = WMAP_Idle;
- PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_5);
+ PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_Idle);
} else {
rocketMove(cWaitPane, true);
rocketUpdate(cWaitPane);
@@ -905,10 +905,10 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
postureControl(cWaitPane);
}
onyonMove();
- setFlag(WMAPFLAG_Unk5);
- mZukanFadeout += msVal._79;
- if (mZukanFadeout >= 255 - msVal._79) {
- arg.mStatus = 4;
+ setFlag(WMAPFLAG_IsBackdropActive);
+ mZukanFadeout += msVal.mZukanFadeoutSpeed;
+ if (mZukanFadeout >= 255 - msVal.mZukanFadeoutSpeed) {
+ arg.mStatus = Game::WorldMap::WMapUpdate_GoToZukanItem;
finish();
}
break;
@@ -921,10 +921,10 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
postureControl(cWaitPane);
}
onyonMove();
- setFlag(WMAPFLAG_Unk5);
- mZukanFadeout += msVal._79;
- if (mZukanFadeout >= 255 - msVal._79) {
- arg.mStatus = 3;
+ setFlag(WMAPFLAG_IsBackdropActive);
+ mZukanFadeout += msVal.mZukanFadeoutSpeed;
+ if (mZukanFadeout >= 255 - msVal.mZukanFadeoutSpeed) {
+ arg.mStatus = Game::WorldMap::WMapUpdate_GoToZukanEnemy;
finish();
}
break;
@@ -934,22 +934,22 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
rocketUpdate(cWaitPane);
onyonUpdate();
switch (::Screen::gGame2DMgr->check_WorldMapInfoWin0()) {
- case 0: {
+ case ::Screen::Game2DMgr::CHECK2D_WorldMapInfoWin0_Cancel: {
PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_7);
mCurrentState = WMAP_InputTarget;
- resetFlag(WMAPFLAG_Unk5);
+ resetFlag(WMAPFLAG_IsBackdropActive);
break;
}
- case 1: {
+ case ::Screen::Game2DMgr::CHECK2D_WorldMapInfoWin0_Confirm: {
PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_7);
- resetFlag(WMAPFLAG_Unk5);
- arg.mStatus = 5;
+ resetFlag(WMAPFLAG_IsBackdropActive);
+ arg.mStatus = Game::WorldMap::WMapUpdate_ReturnToTitle;
finish();
break;
}
}
if (mZukanFadeout < 180) {
- mZukanFadeout += msVal._79;
+ mZukanFadeout += msVal.mZukanFadeoutSpeed;
}
break;
}
@@ -958,27 +958,27 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
rocketUpdate(cWaitPane);
onyonUpdate();
switch (::Screen::gGame2DMgr->check_WorldMapInfoWin1()) {
- case 1: {
+ case ::Screen::Game2DMgr::CHECK2D_WorldMapInfoWin1_Cancel: {
PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_7);
mCurrentState = WMAP_InputTarget;
- resetFlag(WMAPFLAG_Unk5);
+ resetFlag(WMAPFLAG_IsBackdropActive);
break;
}
- case 0: {
+ case ::Screen::Game2DMgr::CHECK2D_WorldMapInfoWin1_Confirm: {
PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_2);
- mCurrentState = WMAP_Unk14;
- resetFlag(WMAPFLAG_Unk5);
+ mCurrentState = WMAP_LandingStart;
+ resetFlag(WMAPFLAG_IsBackdropActive);
mRocketMoveCounter = 0;
break;
}
}
if (mZukanFadeout < 180) {
- mZukanFadeout += msVal._79;
+ mZukanFadeout += msVal.mZukanFadeoutSpeed;
}
break;
}
- case WMAP_Unk10: {
+ case WMAP_BeginShipAppear: {
f32 angle = pikmin2_atan2f(mRocketAngle.x, -mRocketAngle.y);
if (mRocketAngleMode == ROT_Unk1 && angle > 0.0f) {
@@ -1048,7 +1048,7 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
break;
}
- case WMAP_Unk11: {
+ case WMAP_BeginWait: {
paneRocket->setOffset(1000.0f, 0.0f);
for (int i = 0; i < mOnyonCount; i++) {
mOnyonArray[i].mOnyonPane->setOffset(1000.0f, 0.0f);
@@ -1076,8 +1076,8 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
mOnyonArray[i].mOnyonPane->updateScale(mRocketScale);
}
mRocketMoveCounter = 0;
- mCurrentState = WMAP_Unk10;
- PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_1);
+ mCurrentState = WMAP_BeginShipAppear;
+ PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_Appear);
}
break;
}
@@ -1088,35 +1088,37 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
if (test < msVal._0C) {
mRocketMoveCounter = 0;
mCurrentState = WMAP_Idle;
- PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_5);
+ PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_Idle);
}
onyonMove();
break;
}
- case WMAP_Unk13: {
+ case WMAP_Begin: {
+ // hide ship/onions offscreen
paneRocket->setOffset(1000.0f, 0.0f);
for (int i = 0; i < mOnyonCount; i++) {
mOnyonArray[i].mOnyonPane->setOffset(1000.0f, 0.0f);
}
- _98 += msVal._48;
- mAnimTimers[0] = mCameraZoomMinFrame * (1.0f - (_98 * _98 * _98 * _98));
+
+ mCameraZoomY += msVal._48;
+ mAnimTimers[0] = mCameraZoomMinFrame * (1.0f - (mCameraZoomY * mCameraZoomY * mCameraZoomY * mCameraZoomY));
if (mCameraZoomMinFrame - mAnimTimers[0] < 2.0f) {
mAnimTimers[0] = mCameraZoomMinFrame;
- mCurrentState = WMAP_Unk11;
+ mCurrentState = WMAP_BeginWait;
}
break;
}
}
- if (!isFlag(WMAPFLAG_Unk5) && mZukanFadeout) {
- mZukanFadeout -= msVal._79;
- if (mZukanFadeout < msVal._79) {
+ if (!isFlag(WMAPFLAG_IsBackdropActive) && mZukanFadeout) {
+ mZukanFadeout -= msVal.mZukanFadeoutSpeed;
+ if (mZukanFadeout < msVal.mZukanFadeoutSpeed) {
mZukanFadeout = 0;
}
}
- if (mCurrentState != WMAP_Unk13 && mCurrentState != WMAP_Unk11 && mCurrentState != WMAP_NewMapOpened) {
+ if (mCurrentState != WMAP_Begin && mCurrentState != WMAP_BeginWait && mCurrentState != WMAP_NewMapOpened) {
// only show the "light" pane of the currently selected level
for (int i = 0; i < mOpenCourses; i++) {
if (mCurrentCourseIndex == i) {
@@ -1127,7 +1129,7 @@ void WorldMap::update(::Game::WorldMap::UpdateArg& arg)
}
}
- if (mCurrentState != WMAP_Unk13 && mCurrentState != WMAP_Unk11) {
+ if (mCurrentState != WMAP_Begin && mCurrentState != WMAP_BeginWait) {
PSMGetWorldMapRocket()->startRocketSE(mRocketPosition.x, mRocketPosition.y);
}
@@ -3201,7 +3203,7 @@ void WorldMap::draw3rd(Graphics& gfx)
mScreenKitagawa->search('Nhapa')->show();
mScreenKitagawa->draw(gfx, gfx.mPerspGraph);
- if (isFlag(WMAPFLAG_Unk6) && mZukanFadeout) {
+ if (isFlag(WMAPFLAG_IsBackdropBehindInfo) && mZukanFadeout) {
gfx.mOrthoGraph.setPort();
gfx.mOrthoGraph.setColor(JUtility::TColor(0, 0, 0, mZukanFadeout));
f32 zero = 0.0f;
@@ -3219,7 +3221,7 @@ void WorldMap::draw3rd(Graphics& gfx)
*/
void WorldMap::draw4th(Graphics& gfx)
{
- if (!isFlag(WMAPFLAG_Unk6) && mZukanFadeout) {
+ if (!isFlag(WMAPFLAG_IsBackdropBehindInfo) && mZukanFadeout) {
gfx.mOrthoGraph.setPort();
gfx.mOrthoGraph.setColor(JUtility::TColor(0, 0, 0, mZukanFadeout));
f32 zero = 0.0f;
@@ -3919,7 +3921,7 @@ bool WorldMap::changeState()
mCurrentState = WMAP_InSelReturnToTitle;
PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_6);
isStateChange = true;
- setFlag(WMAPFLAG_Unk5 | WMAPFLAG_Unk6);
+ setFlag(WMAPFLAG_IsBackdropActive | WMAPFLAG_IsBackdropBehindInfo);
}
} else if (mInitArg.mController->isButtonDown(Controller::PRESS_A)) {
@@ -3932,7 +3934,7 @@ bool WorldMap::changeState()
mCurrentState = WMAP_InSelLandHere;
PSMGetWorldMapRocket()->stateChange(PSM::WorldMapRocket::PSMRocket_6);
isStateChange = true;
- setFlag(WMAPFLAG_Unk5 | WMAPFLAG_Unk6);
+ setFlag(WMAPFLAG_IsBackdropActive | WMAPFLAG_IsBackdropBehindInfo);
}
} else if (mInitArg.mController->isButtonDown(Controller::PRESS_L)) {
diff --git a/src/plugProjectKonoU/newGame2DMgr.cpp b/src/plugProjectKonoU/newGame2DMgr.cpp
index b1aaee067..8c6b58159 100644
--- a/src/plugProjectKonoU/newGame2DMgr.cpp
+++ b/src/plugProjectKonoU/newGame2DMgr.cpp
@@ -391,7 +391,7 @@ bool Game2DMgr::open_SMenu_Sub(og::Screen::DispMemberSMenuAll& disp)
*/
int Game2DMgr::check_SMenu()
{
- int exit = -1;
+ int exit = CHECK2D_SMenu_Error;
switch (mScreenMgr->getSceneType()) {
case SCENE_PAUSE_MENU_CONTROLS:
case SCENE_PAUSE_MENU:
@@ -403,37 +403,37 @@ int Game2DMgr::check_SMenu()
int scene = mScreenMgr->getSceneFinishState();
switch (scene) {
case SceneBase::SB_WaitForResourceSync:
- exit = 0;
+ exit = CHECK2D_SMenu_Opened;
break;
case SceneBase::SB_Unknown2:
PSPause_StartMenuOff();
- exit = 1;
+ exit = CHECK2D_SMenu_Cancel;
break;
case SceneBase::SB_Started:
PSPause_StartMenuOff();
- exit = 2;
+ exit = CHECK2D_SMenu_GoToSunset;
break;
case SceneBase::SB_Unknown4:
PSPause_StartMenuOff();
- exit = 3;
+ exit = CHECK2D_SMenu_ReturnToFileSelect;
break;
case SceneBase::SB_Unknown5:
PSPause_StartMenuOff();
- exit = 1;
+ exit = CHECK2D_SMenu_Cancel;
break;
case SceneBase::SB_Unknown6:
PSPause_StartMenuOff();
- exit = 4;
+ exit = CHECK2D_SMenu_EscapeCave;
break;
case SceneBase::SB_Unknown7:
PSPause_StartMenuOff();
- exit = 5;
+ exit = CHECK2D_SMenu_QuitChallenge;
break;
default:
@@ -441,12 +441,12 @@ int Game2DMgr::check_SMenu()
break;
}
} else {
- exit = 0;
+ exit = CHECK2D_SMenu_Opened;
}
break;
}
default: {
- exit = -1;
+ exit = CHECK2D_SMenu_Error;
break;
}
}
@@ -475,16 +475,16 @@ bool Game2DMgr::open_WorldMapInfoWin0(og::Screen::DispMemberWorldMapInfoWin0& di
int Game2DMgr::check_WorldMapInfoWin0() const
{
if (mScreenMgr->getSceneType() != SCENE_WORLD_MAP_INFO_WINDOW_0) {
- return 2;
+ return CHECK2D_WorldMapInfoWin0_Error;
}
if (mScreenMgr->isSceneFinish()) {
int state = mScreenMgr->getSceneFinishState();
if (state == 0)
- return 0;
+ return CHECK2D_WorldMapInfoWin0_Cancel;
if (state == 1)
- return 1;
+ return CHECK2D_WorldMapInfoWin0_Confirm;
}
- return 3;
+ return CHECK2D_WorldMapInfoWin0_Active;
}
/**
@@ -509,16 +509,16 @@ bool Game2DMgr::open_WorldMapInfoWin1(og::Screen::DispMemberWorldMapInfoWin1& di
int Game2DMgr::check_WorldMapInfoWin1() const
{
if (mScreenMgr->getSceneType() != SCENE_WORLD_MAP_INFO_WINDOW_1) {
- return 2;
+ return CHECK2D_WorldMapInfoWin1_Error;
}
if (mScreenMgr->isSceneFinish()) {
int state = mScreenMgr->getSceneFinishState();
if (state == 0)
- return 0;
+ return CHECK2D_WorldMapInfoWin1_Confirm;
if (state == 1)
- return 1;
+ return CHECK2D_WorldMapInfoWin1_Cancel;
}
- return 3;
+ return CHECK2D_WorldMapInfoWin1_Active;
}
/**
@@ -534,12 +534,12 @@ void Game2DMgr::open_Kantei(og::Screen::DispMemberKantei& disp)
}
if (disp.mTotalPokos >= 10000) {
- disp._28 = 1;
+ disp.mIsPayDebt = 1;
} else {
- disp._28 = 0;
+ disp.mIsPayDebt = 0;
}
- if (disp._28) {
+ if (disp.mIsPayDebt) {
disp.mKanteiType = 1;
} else {
disp.mKanteiType = 0;
@@ -819,19 +819,19 @@ int Game2DMgr::check_CaveInMenu()
if (disp) {
if (disp->isID(OWNER_OGA, MEMBER_ANA_DEMO)) {
if (disp->mExitStatus) {
- ret = 0;
+ ret = CHECK2D_CaveInMenu_MenuOpen;
} else {
- int ret2 = 2;
+ int ret2 = CHECK2D_CaveInMenu_Cancel;
if (disp->mSelected)
- ret2 = 1;
+ ret2 = CHECK2D_CaveInMenu_Confirm;
ret = ret2;
PSPause_StartMenuOff();
}
} else {
- ret = -1;
+ ret = CHECK2D_CaveInMenu_Error_WrongDisp;
}
} else {
- ret = -2;
+ ret = CHECK2D_CaveInMenu_Error_NoDisp;
}
return ret;
}
@@ -888,19 +888,19 @@ int Game2DMgr::check_KanketuMenu()
if (disp) {
if (disp->isID(OWNER_OGA, MEMBER_KANKETU_MENU)) {
if (disp->mExitStatus) {
- ret = 0;
+ ret = CHECK2D_KanketuMenu_MenuOpen;
} else {
- int ret2 = 2;
+ int ret2 = CHECK2D_KanketuMenu_Cancel;
if (disp->mSelected)
- ret2 = 1;
+ ret2 = CHECK2D_KanketuMenu_Confirm;
ret = ret2;
PSPause_StartMenuOff();
}
} else {
- ret = -1;
+ ret = CHECK2D_KanketuMenu_Error_WrongDisp;
}
} else {
- ret = -2;
+ ret = CHECK2D_KanketuMenu_Error_NoDisp;
}
return ret;
}
@@ -937,19 +937,19 @@ int Game2DMgr::check_CaveMoreMenu()
if (disp) {
if (disp->isID(OWNER_OGA, MEMBER_CAVE_MORE)) {
if (disp->mExitStatus) {
- ret = 0;
+ ret = CHECK2D_CaveMoreMenu_MenuOpen;
} else {
- int ret2 = 2;
+ int ret2 = CHECK2D_CaveMoreMenu_Cancel;
if (disp->mSelected)
- ret2 = 1;
+ ret2 = CHECK2D_CaveMoreMenu_Confirm;
ret = ret2;
PSPause_StartMenuOff();
}
} else {
- ret = -1;
+ ret = CHECK2D_CaveMoreMenu_Error_WrongDisp;
}
} else {
- ret = -2;
+ ret = CHECK2D_CaveMoreMenu_Error_NoDisp;
}
return ret;
}
@@ -975,7 +975,7 @@ bool Game2DMgr::open_FinalResult(kh::Screen::DispFinalResult& disp)
int Game2DMgr::check_FinalResult() const
{
if (mScreenMgr->getSceneType() != SCENE_FINAL_RESULT) {
- return -1;
+ return CHECK2D_FinalResult_Error;
} else {
if (!mScreenMgr->getDispMember()->isID(OWNER_KH, MEMBER_FINAL_RESULT)) {
JUT_PANICLINE(1636, "disp member err");
@@ -1004,7 +1004,7 @@ bool Game2DMgr::open_CaveResult(kh::Screen::DispCaveResult& disp)
int Game2DMgr::check_CaveResult() const
{
if (mScreenMgr->getSceneType() != SCENE_CAVE_RESULT) {
- return -1;
+ return CHECK2D_CaveResult_Error;
} else {
if (!mScreenMgr->getDispMember()->isID(OWNER_KH, MEMBER_CAVE_RESULT)) {
JUT_PANICLINE(1656, "disp member err");
@@ -1035,13 +1035,13 @@ int Game2DMgr::check_DayEndResult() const
{
if (mScreenMgr->getSceneType() != SCENE_DAY_END_RESULT_ITEM && mScreenMgr->getSceneType() != SCENE_DAY_END_RESULT_INC_P
&& mScreenMgr->getSceneType() != SCENE_DAY_END_RESULT_MAIL) {
- return -1;
+ return CHECK2D_DayResult_Error;
}
if (!mScreenMgr->getDispMember()->isID(OWNER_KH, MEMBER_DAY_END_RESULT)) {
JUT_PANICLINE(1687, "disp member err");
}
- return reinterpret_cast(mScreenMgr->getDispMember())->mMail._14;
+ return reinterpret_cast(mScreenMgr->getDispMember())->mMail.mExitStatus;
}
/**
@@ -1063,9 +1063,9 @@ bool Game2DMgr::open_PayDept(kh::Screen::DispPayDept& disp)
*/
int Game2DMgr::check_PayDept() const
{
- int ret = 0;
+ int ret = CHECK2D_PayDept_NotFinished;
if (mScreenMgr->getSceneType() == SCENE_PAY_DEPT && mScreenMgr->isSceneFinish()) {
- ret = 1;
+ ret = CHECK2D_PayDept_Finished;
}
return ret;
}
@@ -1089,9 +1089,9 @@ bool Game2DMgr::open_Save(og::Screen::DispMemberSave& disp)
*/
int Game2DMgr::check_Save() const
{
- int ret = 0;
+ int ret = CHECK2D_Save_NotFinished;
if (mScreenMgr->getSceneType() == SCENE_SAVE && mScreenMgr->isSceneFinish()) {
- ret = 1;
+ ret = CHECK2D_Save_Finished;
}
return ret;
}
@@ -1115,9 +1115,9 @@ bool Game2DMgr::open_FinalMessage(og::Screen::DispMemberFinalMessage& disp)
*/
int Game2DMgr::check_FinalMessage() const
{
- int ret = 0;
+ int ret = CHECK2D_FinalMessage_NotOpen;
if (mScreenMgr->getSceneType() != SCENE_FINAL_MSG) {
- return -10;
+ return CHECK2D_FinalMessage_Error;
}
return mScreenMgr->getSceneFinishState();
}
@@ -1153,7 +1153,7 @@ void Game2DMgr::restartFinalFloorSound()
int Game2DMgr::check_ReadyGo() const
{
if (mScreenMgr->getSceneType() != SCENE_READY_GO) {
- return -1;
+ return CHECK2D_ReadyGo_Error;
} else {
if (!mScreenMgr->getDispMember()->isID(OWNER_KH, MEMBER_READY_GO)) {
JUT_PANICLINE(1766, "disp member err");
@@ -1183,12 +1183,13 @@ int Game2DMgr::check_WinLoseReason() const
{
int ret;
if (mScreenMgr->getSceneType() != SCENE_WIN_LOSE_REASON) {
- ret = 0;
+ ret = CHECK2D_WinLoseReason_NotFinished;
} else {
- ret = 0;
+ ret = CHECK2D_WinLoseReason_NotFinished;
+
kh::Screen::SceneWinLoseReason* scene = reinterpret_cast(mScreenMgr->mBackupScene);
if (scene->mDone[0] && scene->mDone[1]) {
- ret = 1;
+ ret = CHECK2D_WinLoseReason_Finished;
}
}
return ret;
@@ -1214,12 +1215,12 @@ bool Game2DMgr::open_WinLose(kh::Screen::DispWinLose& disp)
int Game2DMgr::check_WinLose() const
{
if (mScreenMgr->getSceneType() != SCENE_WIN_LOSE) {
- return -1;
+ return CHECK2D_WinLose_Error;
} else {
if (!mScreenMgr->getDispMember()->isID(OWNER_KH, MEMBER_WIN_LOSE)) {
JUT_PANICLINE(1801, "disp member err");
}
- return reinterpret_cast(mScreenMgr->getDispMember())->_0C;
+ return reinterpret_cast(mScreenMgr->getDispMember())->mStatus;
}
}
@@ -1229,7 +1230,7 @@ int Game2DMgr::check_WinLose() const
*/
bool Game2DMgr::open_TimeUp1P()
{
- kh::Screen::DispWinLose disp(Timeup1P, 1);
+ kh::Screen::DispWinLose disp(Timeup1P, CHECK2D_WinLose_Opened);
SetSceneArg arg(SCENE_WIN_LOSE, reinterpret_cast(&disp));
if (mScreenMgr->setScene(arg) && mScreenMgr->startScene(nullptr)) {
return true;
@@ -1243,7 +1244,7 @@ bool Game2DMgr::open_TimeUp1P()
*/
bool Game2DMgr::open_TimeUp2P()
{
- kh::Screen::DispWinLose disp(Timeup2P, 1);
+ kh::Screen::DispWinLose disp(Timeup2P, CHECK2D_WinLose_Opened);
SetSceneArg arg(SCENE_WIN_LOSE, reinterpret_cast(&disp));
if (mScreenMgr->setScene(arg) && mScreenMgr->startScene(nullptr)) {
return true;
@@ -1300,27 +1301,27 @@ bool Game2DMgr::open_Contena(og::Screen::DispMemberContena& disp)
*/
int Game2DMgr::check_Contena()
{
- int ret = -1;
+ int ret = CHECK2D_Contena_Error;
SceneType id = mScreenMgr->getSceneType();
if ((u32)(id + ~SCENE_FLOOR) <= 3 || id == SCENE_CONTENA_PURPLE) {
og::Screen::DispMemberContena* disp = static_cast(mScreenMgr->getDispMember());
if (disp->isID(OWNER_OGA, MEMBER_CONTENA)) {
switch (disp->mState) {
case 3:
- ret = 1;
+ ret = CHECK2D_Contena_Cancel;
break;
case 4:
- ret = 2;
+ ret = CHECK2D_Contena_Confirmed;
break;
default:
- ret = 0;
+ ret = CHECK2D_Contena_MenuOpened;
}
if (ret) {
PSPause_StartMenuOff();
}
} else {
- ret = -1;
+ ret = CHECK2D_Contena_Error;
}
}
return ret;
@@ -1392,36 +1393,36 @@ bool Game2DMgr::open_UfoMenu(og::Screen::DispMemberUfoGroup& disp)
*/
int Game2DMgr::check_UfoMenu()
{
- int ret = 0;
+ int ret = CHECK2D_Ufo_Default;
og::Screen::DispMemberUfoGroup* disp = static_cast(mScreenMgr->getDispMember());
switch (mScreenMgr->getSceneType()) {
case SCENE_UFO_MENU: {
if (!disp->mUfoMenu.mContenaType) {
- ret = 1;
+ ret = CHECK2D_Ufo_Cancel;
PSPause_StartMenuOff();
} else {
- ret = 0;
+ ret = CHECK2D_Ufo_Default;
}
break;
}
case SCENE_CONTENA_WHITE: {
switch (disp->mContena1.mState) {
case 4: {
- ret = 2;
+ ret = CHECK2D_Ufo_Confirmed;
PSPause_StartMenuOff();
break;
}
case 3: {
if (disp->mContena1.mExitSoundType) {
- ret = 0;
+ ret = CHECK2D_Ufo_Default;
} else {
- ret = 1;
+ ret = CHECK2D_Ufo_Cancel;
PSPause_StartMenuOff();
}
break;
}
default:
- ret = 0;
+ ret = CHECK2D_Ufo_Default;
break;
}
break;
@@ -1429,21 +1430,21 @@ int Game2DMgr::check_UfoMenu()
case SCENE_CONTENA_PURPLE: {
switch (disp->mContena2.mState) {
case 4: {
- ret = 2;
+ ret = CHECK2D_Ufo_Confirmed;
PSPause_StartMenuOff();
break;
}
case 3: {
if (disp->mContena2.mExitSoundType) {
- ret = 0;
+ ret = CHECK2D_Ufo_Default;
} else {
- ret = 1;
+ ret = CHECK2D_Ufo_Cancel;
PSPause_StartMenuOff();
}
break;
}
default:
- ret = 0;
+ ret = CHECK2D_Ufo_Default;
break;
}
break;
@@ -1517,12 +1518,12 @@ bool Game2DMgr::isZukanItem() { return (mScreenMgr->getSceneType() == SCENE_ZUKA
*/
int Game2DMgr::check_ZukanItemRequest(int& id)
{
- int ret = 0;
+ int ret = CHECK2D_Zukan_Default;
if (mScreenMgr->getSceneType() == SCENE_ZUKAN_ITEM) {
Morimura::TDItemScene* scene = static_cast(mScreenMgr->mBackupScene);
if (scene) {
Morimura::TZukanBase* obj = static_cast(scene->mObject);
- ret = (obj) ? obj->checkRequest(id) : 0;
+ ret = (obj) ? obj->checkRequest(id) : CHECK2D_Zukan_Default;
}
}
return ret;
@@ -1534,12 +1535,12 @@ int Game2DMgr::check_ZukanItemRequest(int& id)
*/
int Game2DMgr::check_ZukanEnemyRequest(int& id)
{
- int ret = 0;
+ int ret = CHECK2D_Zukan_Default;
if (mScreenMgr->getSceneType() == SCENE_ZUKAN_ENEMY) {
Morimura::TDEnemyScene* scene = static_cast(mScreenMgr->mBackupScene);
if (scene) {
Morimura::TZukanBase* obj = static_cast(scene->mObject);
- ret = (obj) ? obj->checkRequest(id) : 0;
+ ret = (obj) ? obj->checkRequest(id) : CHECK2D_Zukan_Default;
}
}
return ret;
@@ -1715,11 +1716,11 @@ int Game2DMgr::check_ChallengeSelect(int& ret1, int& ret2)
Morimura::DispMemberChallengeSelect* disp = reinterpret_cast(mScreenMgr->getDispMember());
- if (disp->_1C == 3) {
+ if (disp->mStatus == CHECK2D_ChallengeSelect_ExitFinished) {
ret1 = disp->mStageNumber;
ret2 = disp->mPlayType;
}
- return disp->_1C;
+ return disp->mStatus;
}
/**
@@ -1769,7 +1770,7 @@ u32 Game2DMgr::check_VsSelect(int& ret1, int& ret2, int& ret3)
Morimura::DispMemberVsSelect* disp = reinterpret_cast(mScreenMgr->getDispMember());
- if (disp->mState == 3) {
+ if (disp->mState == CHECK2D_VsSelect_ExitFinished) {
ret1 = disp->mSelectedStageIndex;
ret2 = disp->mOlimarHandicap;
ret3 = disp->mLouieHandicap;
diff --git a/src/plugProjectMorimuraU/challengeSelect2D.cpp b/src/plugProjectMorimuraU/challengeSelect2D.cpp
index 77b39aa6d..29ce07349 100644
--- a/src/plugProjectMorimuraU/challengeSelect2D.cpp
+++ b/src/plugProjectMorimuraU/challengeSelect2D.cpp
@@ -7,6 +7,7 @@
#include "JSystem/JKernel/JKRDvdRipper.h"
#include "PSSystem/PSSystemIF.h"
#include "Controller.h"
+#include "Screen/Game2DMgr.h"
namespace Morimura {
@@ -4279,7 +4280,8 @@ bool TChallengeSelect::doUpdate()
int oldSelState = mLevelNameMoveState;
int oldID = mCurrentSelection;
- if (mCanInput && mDisp->_1C == 0 && !static_cast(getOwner())->mConfirmEndWindow->mHasDrawn) {
+ if (mCanInput && mDisp->mStatus == Screen::Game2DMgr::CHECK2D_ChallengeSelect_Default
+ && !static_cast(getOwner())->mConfirmEndWindow->mHasDrawn) {
Controller* input = mControls;
if (input->getButtonDown() & Controller::PRESS_Z) {
if (mPlayModeScreen->mState == 0) {
@@ -4302,7 +4304,7 @@ bool TChallengeSelect::doUpdate()
if (!mIsSection) {
_134 = true;
demoStart();
- mDisp->_1C = 1;
+ mDisp->mStatus = Screen::Game2DMgr::CHECK2D_ChallengeSelect_InDemo;
}
mDisp->mStageNumber = mCurrentSelection;
mDisp->mPlayType = 0;
@@ -4448,8 +4450,8 @@ bool TChallengeSelect::doUpdate()
}
if (mDisp->mTitleInfo->mCount == 1 && !mIsSection) {
- _134 = false;
- mDisp->_1C = 1;
+ _134 = false;
+ mDisp->mStatus = Screen::Game2DMgr::CHECK2D_ChallengeSelect_InDemo;
getOwner()->endScene(nullptr);
}
@@ -6673,9 +6675,9 @@ void TChallengeSelect::doUpdateFadeoutFinish()
{
P2ASSERTLINE(2218, mDisp);
if (_134) {
- mDisp->_1C = 3;
+ mDisp->mStatus = Screen::Game2DMgr::CHECK2D_ChallengeSelect_ExitFinished;
} else {
- mDisp->_1C = 2;
+ mDisp->mStatus = Screen::Game2DMgr::CHECK2D_ChallengeSelect_CancelToTitle;
}
}
diff --git a/src/plugProjectMorimuraU/vsSelect2D.cpp b/src/plugProjectMorimuraU/vsSelect2D.cpp
index 428b8ec33..dbed3a572 100644
--- a/src/plugProjectMorimuraU/vsSelect2D.cpp
+++ b/src/plugProjectMorimuraU/vsSelect2D.cpp
@@ -5,6 +5,7 @@
#include "Game/gameChallenge2D.h"
#include "efx2d/T2DBattleDive.h"
#include "Dolphin/rand.h"
+#include "Screen/Game2DMgr.h"
#include "Controller.h"
static const char unusedName[] = "vsSelect2D";
@@ -3842,7 +3843,8 @@ bool TVsSelect::doUpdate()
rulesinactive = true;
}
- if (mCanInput && mDispMember->mState == 0 && !static_cast(getOwner())->mConfirmEndWindow->mHasDrawn) {
+ if (mCanInput && mDispMember->mState == Screen::Game2DMgr::CHECK2D_VsSelect_Default
+ && !static_cast(getOwner())->mConfirmEndWindow->mHasDrawn) {
if (mZoomState == 0) {
if (rulesinactive) {
if (mController->getButtonDown() & Controller::PRESS_R) {
@@ -3956,9 +3958,10 @@ bool TVsSelect::doUpdate()
}
}
- if (mDispMember->mState != 1 && mDispMember->mDispWorldMapInfoWin0->mResult == 1 && !mIsSection) {
+ if (mDispMember->mState != Screen::Game2DMgr::CHECK2D_VsSelect_InDemo && mDispMember->mDispWorldMapInfoWin0->mResult == 1
+ && !mIsSection) {
mIsDemoStarted = 0;
- mDispMember->mState = 1;
+ mDispMember->mState = Screen::Game2DMgr::CHECK2D_VsSelect_InDemo;
getOwner()->endScene(nullptr);
}
@@ -6441,9 +6444,9 @@ void TVsSelect::doUpdateFadeoutFinish()
mDispMember->mLouieHandicap = mHandicapSel[1];
mDispMember->mSelectedStageIndex = mIndexPaneList[mCurrActiveRowSel]->getIndex();
if (mIsDemoStarted) {
- mDispMember->mState = 3;
+ mDispMember->mState = Screen::Game2DMgr::CHECK2D_VsSelect_ExitFinished;
} else {
- mDispMember->mState = 2;
+ mDispMember->mState = Screen::Game2DMgr::CHECK2D_VsSelect_CancelToTitle;
}
}
@@ -6976,7 +6979,7 @@ void TVsSelect::doScreenEffect()
mEndDelayTimer += 1.0f;
if (mEndDelayTimer > 15.0f && !mIsSection) {
mZoomState = 0;
- mDispMember->mState = 1;
+ mDispMember->mState = Screen::Game2DMgr::CHECK2D_VsSelect_InDemo;
P2ASSERTLINE(2374, getOwner());
getOwner()->endScene(nullptr);
for (int i = 0; i < mNumActiveRows; i++) {
diff --git a/src/plugProjectMorimuraU/zukan2D.cpp b/src/plugProjectMorimuraU/zukan2D.cpp
index 7a420afdd..b49f7a3bf 100644
--- a/src/plugProjectMorimuraU/zukan2D.cpp
+++ b/src/plugProjectMorimuraU/zukan2D.cpp
@@ -8,6 +8,7 @@
#include "PSSystem/PSSystemIF.h"
#include "Dolphin/rand.h"
#include "efx2d/T2DChangesmoke.h"
+#include "Screen/Game2DMgr.h"
#include "nans.h"
static const int unusedArray[] = { 0, 0, 0 };
@@ -202,7 +203,7 @@ TZukanBase::TZukanBase(char* name)
, mInfoVal2(0)
, mInfoVal3(0)
, mDisplayIndex(0)
- , mState(0)
+ , mState(Screen::Game2DMgr::CHECK2D_Zukan_Default)
, mCurrObjectID(0)
{
@@ -404,10 +405,10 @@ bool TZukanBase::doUpdate()
doUpdateIn();
}
- if (!mIsInDemo && mState < 2) {
- mState = 0;
+ if (!mIsInDemo && mState < Screen::Game2DMgr::CHECK2D_Zukan_ExitStart) {
+ mState = Screen::Game2DMgr::CHECK2D_Zukan_Default;
if (mIsDrawScene) {
- mState = 1;
+ mState = Screen::Game2DMgr::CHECK2D_Zukan_Changing;
mIsDrawScene = false;
mIsEffectRequired = false;
if (mIsBigWindowOpened) {
@@ -419,7 +420,7 @@ bool TZukanBase::doUpdate()
&& mIndexPaneList[mCurrActiveRowSel]->getIndex() == mCurrIndex) {
if (!mIsEffectRequired) {
if (mRequestTimer > mRequestTimerMax) {
- mState = 1;
+ mState = Screen::Game2DMgr::CHECK2D_Zukan_Changing;
if (mIsSection) {
mIsEffectRequired = true;
}
@@ -463,11 +464,11 @@ bool TZukanBase::doUpdate()
}
bool isHorizontalScroll = false;
- if (!mIsInDemo && !mCanInput && mState < 2) {
+ if (!mIsInDemo && !mCanInput && mState < Screen::Game2DMgr::CHECK2D_Zukan_ExitStart) {
mIsInFadeInOut = true;
}
- if (!mIsInDemo && mCanInput && mState < 2 && !isOpenConfirmWindow()) {
+ if (!mIsInDemo && mCanInput && mState < Screen::Game2DMgr::CHECK2D_Zukan_ExitStart && !isOpenConfirmWindow()) {
mIsInFadeInOut = false;
if (!mIsBigWindowOpened && !mWindow->mState) {
Controller* pad = mController;
@@ -531,10 +532,10 @@ bool TZukanBase::doUpdate()
if (!mIndexGroup->mStateID && !isHorizontalScroll) {
Controller* pad = mController;
if (pad->getButtonDown() & Controller::PRESS_X) {
- mState = 1;
+ mState = Screen::Game2DMgr::CHECK2D_Zukan_Changing;
doPushXButton();
} else if (pad->getButtonDown() & Controller::PRESS_Y) {
- mState = 1;
+ mState = Screen::Game2DMgr::CHECK2D_Zukan_Changing;
doPushYButton();
} else if (pad->getButtonDown() & (Controller::PRESS_L | Controller::PRESS_R)) {
if (mIsBigWindowOpened) {
@@ -548,7 +549,7 @@ bool TZukanBase::doUpdate()
} else if (pad->getButtonDown() & Controller::PRESS_B) {
doPushBButton();
} else if (pad->getButtonDown() & Controller::PRESS_A) {
- mState = 1;
+ mState = Screen::Game2DMgr::CHECK2D_Zukan_Changing;
if (mCameraFadeInLevel < 0.5f) {
if (!mIsBigWindowOpened) {
PSSystem::spSysIF->playSystemSe(PSSE_SY_CAMERAVIEW_CHANGE, 0);
@@ -591,8 +592,8 @@ bool TZukanBase::doUpdate()
}
}
- if (getDispDataZukan()->mDispWorldMapInfoWin0->mResult == 1 && !mIsSection && mState < 2) {
- mState = 2;
+ if (getDispDataZukan()->mDispWorldMapInfoWin0->mResult == 1 && !mIsSection && mState < Screen::Game2DMgr::CHECK2D_Zukan_ExitStart) {
+ mState = Screen::Game2DMgr::CHECK2D_Zukan_ExitStart;
getOwner()->endScene(nullptr);
}
@@ -720,7 +721,7 @@ bool TZukanBase::doUpdate()
mPaneModel->setOffset(xpos, ypos);
mPaneWindowBack->setOffset(xpos, ypos);
mPaneWindowBack_Child->setOffset(xpos, ypos);
- if (mState == 1) {
+ if (mState == Screen::Game2DMgr::CHECK2D_Zukan_Changing) {
mCurrObjectID = getModelIndex(mIndexPaneList[mCurrActiveRowSel]->getIndex());
if (!mIsCurrentSelUnlocked) {
mCurrObjectID = -1;
@@ -940,8 +941,8 @@ void TZukanBase::doDraw(Graphics& gfx)
*/
void TZukanBase::doUpdateFadeoutFinish()
{
- if (mState == 2) {
- mState = 3;
+ if (mState == Screen::Game2DMgr::CHECK2D_Zukan_ExitStart) {
+ mState = Screen::Game2DMgr::CHECK2D_Zukan_ExitFinished;
}
}
diff --git a/src/plugProjectOgawaU/ogObjFinalMsg.cpp b/src/plugProjectOgawaU/ogObjFinalMsg.cpp
index 02b66fd06..655405b01 100644
--- a/src/plugProjectOgawaU/ogObjFinalMsg.cpp
+++ b/src/plugProjectOgawaU/ogObjFinalMsg.cpp
@@ -3,6 +3,7 @@
#include "og/Screen/ogScreen.h"
#include "og/Screen/MenuMgr.h"
#include "og/Screen/callbackNodes.h"
+#include "Screen/Game2DMgr.h"
#include "og/Sound.h"
#include "System.h"
#include "Controller.h"
@@ -139,16 +140,16 @@ bool ObjFinalMsg::menu()
} else if (input & Controller::PRESS_A) {
if (mCurrSel == 0) {
ret = true;
- mDisp->mFinalState = 1;
+ mDisp->mFinalState = ::Screen::Game2DMgr::CHECK2D_FinalMessage_Continue;
ogSound->setDecide();
} else if (mCurrSel == 1) {
ret = true;
- mDisp->mFinalState = 2;
+ mDisp->mFinalState = ::Screen::Game2DMgr::CHECK2D_FinalMessage_ConfirmQuit;
ogSound->setDecide();
}
} else if (input & Controller::PRESS_B) {
ret = true;
- mDisp->mFinalState = 2;
+ mDisp->mFinalState = ::Screen::Game2DMgr::CHECK2D_FinalMessage_ConfirmQuit;
ogSound->setClose();
}
return ret;
diff --git a/src/plugProjectOgawaU/ogSceneFinalMsg.cpp b/src/plugProjectOgawaU/ogSceneFinalMsg.cpp
index 12eb06afc..81d0cbe47 100644
--- a/src/plugProjectOgawaU/ogSceneFinalMsg.cpp
+++ b/src/plugProjectOgawaU/ogSceneFinalMsg.cpp
@@ -1,4 +1,5 @@
#include "og/newScreen/FinalMsg.h"
+#include "Screen/Game2DMgr.h"
namespace og {
namespace newScreen {
@@ -32,7 +33,7 @@ void FinalMsg::doCreateObj(JKRArchive* archive)
int FinalMsg::doGetFinishState()
{
Screen::DispMemberFinalMessage* dispMember = static_cast(mDispMember);
- int finalState = 0;
+ int finalState = ::Screen::Game2DMgr::CHECK2D_FinalMessage_NotOpen;
if (dispMember->isID(OWNER_OGA, MEMBER_FINAL_MSG)) {
finalState = dispMember->mFinalState;
diff --git a/src/utilityU/PSMainSide_Se.cpp b/src/utilityU/PSMainSide_Se.cpp
index 77c2e1239..7141e3133 100644
--- a/src/utilityU/PSMainSide_Se.cpp
+++ b/src/utilityU/PSMainSide_Se.cpp
@@ -91,7 +91,7 @@ PSSystem::ClusterSe::PartInitArg ClusterFactory::partInit(u8 unknownID)
WorldMapRocket::WorldMapRocket()
: JADHioNode(nullptr)
{
- mState = PSMRocket_0;
+ mState = PSMRocket_Inactive;
mStartPosX = 0.0f;
mEndPosX = 608.0f;
_10 = 4.0f;
@@ -138,7 +138,7 @@ JAISe* WorldMapRocket::startRocketSE(f32 posX, f32 posY)
}
switch (mState) {
- case PSMRocket_1:
+ case PSMRocket_Appear:
se->setVolume(1.0f, 2, SOUNDPARAM_Unk0);
se->setPitch(2.0f, 2, SOUNDPARAM_Unk0);
if (se->getPitch(SOUNDPARAM_Unk0) >= 2.0f) {
@@ -163,7 +163,7 @@ JAISe* WorldMapRocket::startRocketSE(f32 posX, f32 posY)
se->setVolume(0.5f, 30, SOUNDPARAM_Unk0);
se->setPitch(1.0f, 30, SOUNDPARAM_Unk0);
break;
- case PSMRocket_5:
+ case PSMRocket_Idle:
se->setVolume(0.5f, 10, SOUNDPARAM_Unk0);
se->setPitch(1.0f, 10, SOUNDPARAM_Unk0);
break;
@@ -178,13 +178,13 @@ JAISe* WorldMapRocket::startRocketSE(f32 posX, f32 posY)
se->setVolume(tmpVol, 5, SOUNDPARAM_Unk0);
if (se->getVolume(SOUNDPARAM_Unk0) == tmpVol) {
if (tmpVol < 0.5f) {
- mState = PSMRocket_5;
+ mState = PSMRocket_Idle;
} else {
mState = PSMRocket_4;
}
}
break;
- case PSMRocket_0:
+ case PSMRocket_Inactive:
se->setVolume(0.0f, 0, SOUNDPARAM_Unk0);
se->setPitch(0.0f, 0, SOUNDPARAM_Unk0);
break;
diff --git a/tools/progress.csv b/tools/progress.csv
index 181ebb6aa..60bbb8eba 100644
--- a/tools/progress.csv
+++ b/tools/progress.csv
@@ -985,3 +985,5 @@ You have 4528 out of 10000 Pokos and 112 out of 201 treasures.",2024-05-08 18:40
You have 4541 out of 10000 Pokos and 112 out of 201 treasures.",2024-05-14 22:14:35.311817
4563,2123316,0.4563962486071561,113,401409,0.563099700360241,"
You have 4563 out of 10000 Pokos and 113 out of 201 treasures.",2024-05-18 11:09:44.869209
+4563,2123316,0.4563962486071561,113,401412,0.5631039087838217,"
+You have 4563 out of 10000 Pokos and 113 out of 201 treasures.",2024-05-18 00:13:25.274465