Documentation, cleanup

This commit is contained in:
robojumper
2025-12-05 12:52:22 +01:00
parent 83a1e0256e
commit 17c3ad4bb0
6 changed files with 226 additions and 217 deletions
+17 -17
View File
@@ -15437,22 +15437,22 @@ create__14dLytMiniGame_cFv = .text:0x80294830; // type:function size:0xA94
doDelete__14dLytMiniGame_cFv = .text:0x802952D0; // type:function size:0x31C
execute__14dLytMiniGame_cFv = .text:0x802955F0; // type:function size:0xD4
draw__14dLytMiniGame_cFv = .text:0x802956D0; // type:function size:0x6C
scoreRelatedExecute__14dLytMiniGame_cFv = .text:0x80295740; // type:function size:0x8C
scoreRelated__14dLytMiniGame_cFv = .text:0x802957D0; // type:function size:0x78
scoreRelatedInit__14dLytMiniGame_cFv = .text:0x80295740; // type:function size:0x8C
endScoreResult__14dLytMiniGame_cFv = .text:0x802957D0; // type:function size:0x78
setDisplayedPoints__14dLytMiniGame_cFl = .text:0x80295850; // type:function size:0xA8
fn_80295900__14dLytMiniGame_cFl = .text:0x80295900; // type:function size:0x38
startCountdown__14dLytMiniGame_cFv = .text:0x80295940; // type:function size:0x38
startFinish__14dLytMiniGame_cFv = .text:0x80295980; // type:function size:0x98
fn_80295A20__14dLytMiniGame_cFv = .text:0x80295A20; // type:function size:0x90
startTimeup__14dLytMiniGame_cFv = .text:0x80295A20; // type:function size:0x90
isStartCountdownDone__14dLytMiniGame_cFv = .text:0x80295AB0; // type:function size:0x20
isFinishAnimDone__14dLytMiniGame_cFv = .text:0x80295AD0; // type:function size:0x20
isTimeupAnimDone__14dLytMiniGame_cFv = .text:0x80295AF0; // type:function size:0x2C
fn_80295B20__14dLytMiniGame_cFl = .text:0x80295B20; // type:function size:0x8
fn_80295B30__14dLytMiniGame_cFl = .text:0x80295B30; // type:function size:0x8
timeRelatedExecute__14dLytMiniGame_cFv = .text:0x80295B40; // type:function size:0xA8
timeRelated__14dLytMiniGame_cFv = .text:0x80295BF0; // type:function size:0x24
setScoreUp__14dLytMiniGame_cFl = .text:0x80295B20; // type:function size:0x8
setScoreDown__14dLytMiniGame_cFl = .text:0x80295B30; // type:function size:0x8
timeRelatedInit__14dLytMiniGame_cFv = .text:0x80295B40; // type:function size:0xA8
endTimeResult__14dLytMiniGame_cFv = .text:0x80295BF0; // type:function size:0x24
setDisplayedTime__14dLytMiniGame_cFl = .text:0x80295C20; // type:function size:0x4C
setHighscore__14dLytMiniGame_cFl = .text:0x80295C70; // type:function size:0x38
setBestTime__14dLytMiniGame_cFl = .text:0x80295C70; // type:function size:0x38
setShowBestTime__14dLytMiniGame_cFb = .text:0x80295CB0; // type:function size:0x38
startBugsAllIconsIn__14dLytMiniGame_cFv = .text:0x80295CF0; // type:function size:0x8
set5Bugs__14dLytMiniGame_cFv = .text:0x80295D00; // type:function size:0xC
@@ -15471,15 +15471,15 @@ isInEvent__14dLytMiniGame_cCFv = .text:0x80295E10; // type:function size:0x34
isPopupOpen__14dLytMiniGame_cCFv = .text:0x80295E50; // type:function size:0x54
isPopupOpenExceptHelp__14dLytMiniGame_cCFv = .text:0x80295EB0; // type:function size:0x54
isFadingOut__14dLytMiniGame_cCFv = .text:0x80295F10; // type:function size:0x80
fn_80295F90__14dLytMiniGame_cFv = .text:0x80295F90; // type:function size:0x70
fn_80296000__14dLytMiniGame_cFv = .text:0x80296000; // type:function size:0x6C
fn_80296070__14dLytMiniGame_cFv = .text:0x80296070; // type:function size:0xE0
fn_80296150__14dLytMiniGame_cFv = .text:0x80296150; // type:function size:0xB8
fn_80296210__14dLytMiniGame_cFv = .text:0x80296210; // type:function size:0x88
fn_802962A0__14dLytMiniGame_cFv = .text:0x802962A0; // type:function size:0x88
fn_80296330__14dLytMiniGame_cFv = .text:0x80296330; // type:function size:0xA4
fn_802963E0__14dLytMiniGame_cFv = .text:0x802963E0; // type:function size:0x98
fn_80296480__14dLytMiniGame_cFv = .text:0x80296480; // type:function size:0x98
executeBambooCutting__14dLytMiniGame_cFv = .text:0x80295F90; // type:function size:0x70
executeFunFunIsland__14dLytMiniGame_cFv = .text:0x80296000; // type:function size:0x6C
executeThrillDigger__14dLytMiniGame_cFv = .text:0x80296070; // type:function size:0xE0
executeInsectCapture__14dLytMiniGame_cFv = .text:0x80296150; // type:function size:0xB8
executeSpiralChargeTutorial__14dLytMiniGame_cFv = .text:0x80296210; // type:function size:0x88
executePumpkinArchery__14dLytMiniGame_cFv = .text:0x802962A0; // type:function size:0x88
executeRollercoaster__14dLytMiniGame_cFv = .text:0x80296330; // type:function size:0xA4
executeBossRush__14dLytMiniGame_cFv = .text:0x802963E0; // type:function size:0x98
executeTrialTimeAttack__14dLytMiniGame_cFv = .text:0x80296480; // type:function size:0x98
init__14dLytMiniGame_cFv = .text:0x80296520; // type:function size:0x58
loadData__14dLytMiniGame_cFPCcl = .text:0x80296580; // type:function size:0x130
isLoading__14dLytMiniGame_cCFPCc = .text:0x802966B0; // type:function size:0x30
+22 -8
View File
@@ -202,6 +202,20 @@ protected:
};
class dMessage_c : public dBase_c {
public:
enum Minigame_e {
MG_THRILL_DIGGER = 0,
MG_BAMBOO_CUTTING,
MG_INSECT_CAPTURE,
MG_ROLLERCOASTER,
MG_PUMPKIN_ARCHERY,
MG_FUN_FUN_ISLAND,
MG_TRIAL_TIME_ATTACK,
MG_BOSS_RUSH,
MG_NONE,
};
public:
dMessage_c();
virtual ~dMessage_c() {
@@ -276,23 +290,23 @@ public:
}
void setMiniGameVariant(s32 v) {
mMiniGameVariant = v;
mMinigameVariant = v;
}
s32 getMiniGameVariant() const {
return mMiniGameVariant;
return mMinigameVariant;
}
void setField_0x344(s32 v) {
field_0x344 = v;
}
u8 getField_0x340() const {
return field_0x340;
bool hasSetMinigameResult() const {
return mHasSetMinigameResult;
}
void setField_0x340(u8 v) {
field_0x340 = v;
void setHasSetMinigameResult(bool v) {
mHasSetMinigameResult = v;
}
static bool isValidTextLabel(const char *name);
@@ -376,8 +390,8 @@ private:
/* 0x334 */ u32 mMinigameResultPoints;
/* 0x338 */ u32 mMinigameTime;
/* 0x33C */ s32 mMiniGameVariant;
/* 0x340 */ u8 field_0x340;
/* 0x33C */ s32 mMinigameVariant;
/* 0x340 */ bool mHasSetMinigameResult;
/* 0x344 */ s32 field_0x344;
};
+33 -38
View File
@@ -170,7 +170,7 @@ public:
mHighestDigitIndex(0),
field_0x7EC(false),
field_0x7ED(false),
field_0x7EE(false),
mResultMode(false),
mVariant(0),
field_0x7F4(0),
mIsVisible(false) {}
@@ -186,8 +186,8 @@ public:
mVariant = var;
}
void setField_0x7EE(bool v) {
field_0x7EE = v;
void setResultMode(bool v) {
mResultMode = v;
}
void fn_8028DD80();
@@ -253,7 +253,7 @@ private:
/* 0x7E4 */ s32 mHighestDigitIndex;
/* 0x7EC */ bool field_0x7EC;
/* 0x7ED */ bool field_0x7ED;
/* 0x7EE */ bool field_0x7EE;
/* 0x7EE */ bool mResultMode;
/* 0x7F0 */ s32 mVariant;
/* 0x7F4 */ u8 field_0x7F4;
/* 0x7F5 */ bool mIsVisible;
@@ -332,7 +332,7 @@ public:
field_0x810(0),
field_0x814(false),
field_0x815(false),
field_0x816(false),
mResultMode(false),
mVariant(SCORE_VARIANT_BAMBOO_CUTTING),
field_0x81C(0),
field_0x820(false),
@@ -354,8 +354,8 @@ public:
mVariant = var;
}
void setField_0x816(bool v) {
field_0x816 = v;
void setResultMode(bool v) {
mResultMode = v;
}
void setField_0x828(bool v) {
@@ -447,7 +447,7 @@ private:
/* 0x810 */ s32 field_0x810;
/* 0x814 */ bool field_0x814;
/* 0x815 */ bool field_0x815;
/* 0x816 */ bool field_0x816;
/* 0x816 */ bool mResultMode;
/* 0x818 */ s32 mVariant;
/* 0x81C */ s32 field_0x81C;
/* 0x820 */ bool field_0x820;
@@ -515,13 +515,13 @@ public:
// These are created by dFlow_c and correspond to above entries.
// They also cause things to behave a bit differently. What is the purpose
// of these special variants?
VARIANT_10,
VARIANT_11,
VARIANT_12,
VARIANT_13,
VARIANT_14,
VARIANT_15,
VARIANT_16,
VARIANT_BAMBOO_CUTTING_RESULT,
VARIANT_THRILL_DIGGER_RESULT,
VARIANT_INSECT_CAPTURE_RESULT,
VARIANT_PUMPKIN_ARCHERY_RESULT,
VARIANT_ROLLERCOASTER_RESULT,
VARIANT_BOSS_RUSH_RESULT,
VARIANT_TRIAL_TIME_ATTACK_RESULT,
};
private:
@@ -559,33 +559,28 @@ public:
return sInstance;
}
/** Updates some window */
void startCountdown();
/** ??? */
void startFinish();
void fn_80295A20();
/** Checks to see if in BAMBOO_CUTTING .. BOSS_RUSH and returns some boolean (start?) */
void startTimeup();
bool isStartCountdownDone();
/** Checks to see if in BAMBOO_CUTTING .. BOSS_RUSH and returns some boolean (end?) */
bool isFinishAnimDone();
bool isTimeupAnimDone();
void fn_80295B20(s32);
void fn_80295B30(s32);
void setScoreUp(s32 score);
void setScoreDown(s32);
void setHighscore(s32 time);
/** GUESS: sets the start for the high score? */
void setBestTime(s32 time);
void setShowBestTime(bool);
void timeRelatedExecute();
void scoreRelatedExecute();
void timeRelatedInit();
void scoreRelatedInit();
void setDisplayedTime(s32 time);
void setDisplayedPoints(s32 points);
void timeRelated();
void scoreRelated();
void endTimeResult();
void endScoreResult();
void fn_80295900(s32);
@@ -622,17 +617,17 @@ private:
bool isPopupOpenExceptHelp() const;
bool isFadingOut() const;
void fn_80295F90();
void fn_80296000();
void fn_80296070();
void fn_80296150();
void fn_80296210();
void fn_802962A0();
void fn_80296330();
void executeBambooCutting();
void executeFunFunIsland();
void executeThrillDigger();
void executeInsectCapture();
void executeSpiralChargeTutorial();
void executePumpkinArchery();
void executeRollercoaster();
// These two do the same thing
void fn_802963E0();
void fn_80296480();
void executeBossRush();
void executeTrialTimeAttack();
/* 0x0068 */ bool mLoadRequestStart;
/* 0x0069 */ bool mLoadRequestScore;
+3 -3
View File
@@ -71,8 +71,8 @@ int dTgSwordBattleGame_c::actorExecuteInEvent() {
dLytMiniGame_c::GetInstance()->startCountdown();
} else if (dLytMiniGame_c::GetInstance()->isStartCountdownDone()) {
dLytMiniGame_c::GetInstance()->timeRelatedExecute();
dLytMiniGame_c::GetInstance()->setHighscore(getBossHighscore());
dLytMiniGame_c::GetInstance()->timeRelatedInit();
dLytMiniGame_c::GetInstance()->setBestTime(getBossHighscore());
dLytMiniGame_c::GetInstance()->setShowBestTime(true);
mTimer.initUpCounter();
field_0x1A8 = true;
@@ -113,7 +113,7 @@ int dTgSwordBattleGame_c::actorExecuteInEvent() {
setCurrentBossNumber(mBossNumber + 1);
if (MinigameManager::endMinigame(MinigameManager::BOSS_RUSH)) {
dLytMiniGame_c::GetInstance()->startFinish();
dLytMiniGame_c::GetInstance()->timeRelated();
dLytMiniGame_c::GetInstance()->endTimeResult();
}
}
} break;
+55 -55
View File
@@ -480,17 +480,17 @@ bool dFlow_c::handleEventInternal(const MsbFlowInfo *element) {
break;
}
case EVENT_LYT_MINI_GAME: {
if (dMessage_c::getInstance()->getField_0x340() != 0) {
// cancel something minigame related if running
if (dMessage_c::getInstance()->hasSetMinigameResult()) {
// clear old result
clearMinigame();
}
// start something minigame related
// create new result
dMessage_c::getInstance()->setMiniGameVariant(params1n2);
createLytMiniGame();
break;
}
case EVENT_LYT_MINI_GAME_END:
// cancel something minigame related
// hide score/time
clearMinigame();
break;
case EVENT_46: dMessage_c::getInstance()->setField_0x344(params1n2); break;
@@ -1193,51 +1193,51 @@ void dFlow_c::clear() {
void dFlow_c::createLytMiniGame() {
if (dLytMiniGame_c::GetInstance() == nullptr) {
switch (dMessage_c::getInstance()->getMiniGameVariant()) {
case 0:
case dMessage_c::MG_THRILL_DIGGER:
dBase_c::createBase(
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(), dLytMiniGame_c::VARIANT_11,
fBase_c::OTHER
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(),
dLytMiniGame_c::VARIANT_THRILL_DIGGER_RESULT, fBase_c::OTHER
);
break;
case 1:
case dMessage_c::MG_BAMBOO_CUTTING:
dBase_c::createBase(
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(), dLytMiniGame_c::VARIANT_10,
fBase_c::OTHER
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(),
dLytMiniGame_c::VARIANT_BAMBOO_CUTTING_RESULT, fBase_c::OTHER
);
break;
case 2:
case dMessage_c::MG_INSECT_CAPTURE:
dBase_c::createBase(
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(), dLytMiniGame_c::VARIANT_12,
fBase_c::OTHER
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(),
dLytMiniGame_c::VARIANT_INSECT_CAPTURE_RESULT, fBase_c::OTHER
);
break;
case 3:
case dMessage_c::MG_ROLLERCOASTER:
dBase_c::createBase(
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(), dLytMiniGame_c::VARIANT_14,
fBase_c::OTHER
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(),
dLytMiniGame_c::VARIANT_ROLLERCOASTER_RESULT, fBase_c::OTHER
);
break;
case 4:
case dMessage_c::MG_PUMPKIN_ARCHERY:
dBase_c::createBase(
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(), dLytMiniGame_c::VARIANT_13,
fBase_c::OTHER
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(),
dLytMiniGame_c::VARIANT_PUMPKIN_ARCHERY_RESULT, fBase_c::OTHER
);
break;
case 5:
case dMessage_c::MG_FUN_FUN_ISLAND:
dBase_c::createBase(
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(), dLytMiniGame_c::VARIANT_FUN_FUN_ISLAND,
fBase_c::OTHER
);
break;
case 6:
case dMessage_c::MG_TRIAL_TIME_ATTACK:
dBase_c::createBase(
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(), dLytMiniGame_c::VARIANT_16,
fBase_c::OTHER
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(),
dLytMiniGame_c::VARIANT_TRIAL_TIME_ATTACK_RESULT, fBase_c::OTHER
);
break;
case 7:
case dMessage_c::MG_BOSS_RUSH:
dBase_c::createBase(
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(), dLytMiniGame_c::VARIANT_15,
fProfile::LYT_MINI_GAME, dLytControlGame_c::getInstance(), dLytMiniGame_c::VARIANT_BOSS_RUSH_RESULT,
fBase_c::OTHER
);
break;
@@ -1246,28 +1246,28 @@ void dFlow_c::createLytMiniGame() {
}
void dFlow_c::clearMinigame() {
if (dMessage_c::getInstance()->getField_0x340()) {
if (dMessage_c::getInstance()->hasSetMinigameResult()) {
switch (dMessage_c::getInstance()->getMiniGameVariant()) {
case 0:
case 1:
case 4:
case 5:
case dMessage_c::MG_THRILL_DIGGER:
case dMessage_c::MG_BAMBOO_CUTTING:
case dMessage_c::MG_PUMPKIN_ARCHERY:
case dMessage_c::MG_FUN_FUN_ISLAND:
if (dLytMiniGame_c::GetInstance() != nullptr) {
dLytMiniGame_c::GetInstance()->scoreRelated();
dLytMiniGame_c::GetInstance()->endScoreResult();
}
break;
case 2:
case 3:
case 6:
case 7:
case dMessage_c::MG_INSECT_CAPTURE:
case dMessage_c::MG_ROLLERCOASTER:
case dMessage_c::MG_TRIAL_TIME_ATTACK:
case dMessage_c::MG_BOSS_RUSH:
if (dLytMiniGame_c::GetInstance() != nullptr) {
dLytMiniGame_c::GetInstance()->timeRelated();
dLytMiniGame_c::GetInstance()->endTimeResult();
}
break;
}
}
dMessage_c::getInstance()->setField_0x340(0);
dMessage_c::getInstance()->setMiniGameVariant(8);
dMessage_c::getInstance()->setHasSetMinigameResult(false);
dMessage_c::getInstance()->setMiniGameVariant(dMessage_c::MG_NONE);
}
SPECIAL_BASE_PROFILE(MESSAGE, dMessage_c, fProfile::MESSAGE, 0x2A8, 0);
@@ -1755,29 +1755,29 @@ void dMessage_c::clearLightPillarRelatedArgs() {
}
void dMessage_c::executeMinigame() {
if (mMiniGameVariant == 8) {
if (mMinigameVariant == MG_NONE) {
return;
}
if (!dMessage_c::getInstance()->getField_0x340()) {
switch (mMiniGameVariant) {
case 0:
case 1:
case 4:
case 5:
if (!dMessage_c::getInstance()->hasSetMinigameResult()) {
switch (mMinigameVariant) {
case MG_THRILL_DIGGER:
case MG_BAMBOO_CUTTING:
case MG_PUMPKIN_ARCHERY:
case MG_FUN_FUN_ISLAND:
if (dLytMiniGame_c::GetInstance() != nullptr) {
dLytMiniGame_c::GetInstance()->scoreRelatedExecute();
dLytMiniGame_c::GetInstance()->scoreRelatedInit();
dLytMiniGame_c::GetInstance()->setDisplayedPoints(mMinigameResultPoints);
sInstance->field_0x340 = 1;
sInstance->mHasSetMinigameResult = true;
}
break;
case 2:
case 3:
case 6:
case 7:
case MG_INSECT_CAPTURE:
case MG_ROLLERCOASTER:
case MG_TRIAL_TIME_ATTACK:
case MG_BOSS_RUSH:
if (dLytMiniGame_c::GetInstance() != nullptr) {
dLytMiniGame_c::GetInstance()->timeRelatedExecute();
dLytMiniGame_c::GetInstance()->timeRelatedInit();
dLytMiniGame_c::GetInstance()->setDisplayedTime(mMinigameTime);
sInstance->field_0x340 = 1;
sInstance->mHasSetMinigameResult = true;
}
break;
}
@@ -1796,8 +1796,8 @@ void dMessage_c::init() {
void dMessage_c::reset() {
init();
mMiniGameVariant = 8;
field_0x340 = 0;
mMinigameVariant = MG_NONE;
mHasSetMinigameResult = false;
mMinigameResultPoints = 0;
mMinigameTime = 0;
}
+96 -96
View File
@@ -854,14 +854,14 @@ bool dLytMiniGameTime_c::execute() {
if (isAlphaInEndReached()) {
stopAlphaIn();
if (field_0x7EE) {
if (mResultMode) {
startLoop();
}
}
if (isAlphaOutEndReached()) {
stopAlphaOut();
if (field_0x7EE) {
if (mResultMode) {
stopLoop();
resetLoop();
}
@@ -1919,7 +1919,7 @@ bool dLytMiniGameScore_c::execute() {
if (mIsVisible) {
fn_80291BC0();
if (!field_0x816) {
if (!mResultMode) {
switch (mVariant) {
case SCORE_VARIANT_BAMBOO_CUTTING:
if (hasIncreasedScore()) {
@@ -1969,14 +1969,14 @@ bool dLytMiniGameScore_c::execute() {
if (isAlphaInEndReached()) {
stopAlphaIn();
if (field_0x816) {
if (mResultMode) {
startLoop();
}
}
if (isAlphaOutEndReached()) {
stopAlphaOut();
if (field_0x816) {
if (mResultMode) {
stopLoop();
resetLoop();
}
@@ -2001,7 +2001,7 @@ bool dLytMiniGameScore_c::execute() {
mLyt.calc();
}
if (!field_0x816 && mVariant == SCORE_VARIANT_BAMBOO_CUTTING && hasIncreasedScore()) {
if (!mResultMode && mVariant == SCORE_VARIANT_BAMBOO_CUTTING && hasIncreasedScore()) {
dSndSmallEffectMgr_c::GetInstance()->playMinigameScoreUpSound(mScore);
}
@@ -3381,7 +3381,7 @@ int dLytMiniGame_c::create() {
mStart.build(&mResAccStart);
break;
}
case VARIANT_10: {
case VARIANT_BAMBOO_CUTTING_RESULT: {
if (loadData(sMiniGameScore, SLOT_MINI_GAME_SCORE)) {
return NOT_READY;
}
@@ -3390,11 +3390,11 @@ int dLytMiniGame_c::create() {
}
attachLoadedData(sMiniGameScore, mResAccScore);
mScore.setVariant(dLytMiniGameScore_c::SCORE_VARIANT_BAMBOO_CUTTING);
mScore.setField_0x816(true);
mScore.setResultMode(true);
mScore.build(&mResAccScore);
break;
}
case VARIANT_11: {
case VARIANT_THRILL_DIGGER_RESULT: {
if (loadData(sMiniGameScore, SLOT_MINI_GAME_SCORE)) {
return NOT_READY;
}
@@ -3403,11 +3403,11 @@ int dLytMiniGame_c::create() {
}
attachLoadedData(sMiniGameScore, mResAccScore);
mScore.setVariant(dLytMiniGameScore_c::SCORE_VARIANT_THRILL_DIGGER);
mScore.setField_0x816(true);
mScore.setResultMode(true);
mScore.build(&mResAccScore);
break;
}
case VARIANT_12: {
case VARIANT_INSECT_CAPTURE_RESULT: {
if (loadData(sMiniGameTime, SLOT_MINI_GAME_TIME)) {
return NOT_READY;
}
@@ -3416,11 +3416,11 @@ int dLytMiniGame_c::create() {
}
attachLoadedData(sMiniGameTime, mResAccTime);
mTime.setVariant(dLytMiniGameTime_c::TIME_VARIANT_INSECT_CAPTURE);
mTime.setField_0x7EE(true);
mTime.setResultMode(true);
mTime.build(&mResAccTime);
break;
}
case VARIANT_13: {
case VARIANT_PUMPKIN_ARCHERY_RESULT: {
if (loadData(sMiniGameScore, SLOT_MINI_GAME_SCORE)) {
return NOT_READY;
}
@@ -3429,11 +3429,11 @@ int dLytMiniGame_c::create() {
}
attachLoadedData(sMiniGameScore, mResAccScore);
mScore.setVariant(dLytMiniGameScore_c::SCORE_VARIANT_PUMPKIN_ARCHERY);
mScore.setField_0x816(true);
mScore.setResultMode(true);
mScore.build(&mResAccScore);
break;
}
case VARIANT_14: {
case VARIANT_ROLLERCOASTER_RESULT: {
if (loadData(sMiniGameTime, SLOT_MINI_GAME_TIME)) {
return NOT_READY;
}
@@ -3442,11 +3442,11 @@ int dLytMiniGame_c::create() {
}
attachLoadedData(sMiniGameTime, mResAccTime);
mTime.setVariant(dLytMiniGameTime_c::TIME_VARIANT_ROLLERCOASTER);
mTime.setField_0x7EE(true);
mTime.setResultMode(true);
mTime.build(&mResAccTime);
break;
}
case VARIANT_15: {
case VARIANT_BOSS_RUSH_RESULT: {
if (loadData(sMiniGameTime, SLOT_MINI_GAME_TIME)) {
return NOT_READY;
}
@@ -3455,11 +3455,11 @@ int dLytMiniGame_c::create() {
}
attachLoadedData(sMiniGameTime, mResAccTime);
mTime.setVariant(dLytMiniGameTime_c::TIME_VARIANT_BOSS_RUSH);
mTime.setField_0x7EE(true);
mTime.setResultMode(true);
mTime.build(&mResAccTime);
break;
}
case VARIANT_16: {
case VARIANT_TRIAL_TIME_ATTACK_RESULT: {
if (loadData(sMiniGameTime, SLOT_MINI_GAME_TIME)) {
return NOT_READY;
}
@@ -3468,7 +3468,7 @@ int dLytMiniGame_c::create() {
}
attachLoadedData(sMiniGameTime, mResAccTime);
mTime.setVariant(dLytMiniGameTime_c::TIME_VARIANT_TRIAL_TIME_ATTACK);
mTime.setField_0x7EE(true);
mTime.setResultMode(true);
mTime.build(&mResAccTime);
break;
}
@@ -3562,37 +3562,37 @@ int dLytMiniGame_c::doDelete() {
unloadData(sMiniGameTime);
break;
}
case VARIANT_10: {
case VARIANT_BAMBOO_CUTTING_RESULT: {
mResAccScore.detach();
unloadData(sMiniGameScore);
break;
}
case VARIANT_11: {
case VARIANT_THRILL_DIGGER_RESULT: {
mResAccScore.detach();
unloadData(sMiniGameScore);
break;
}
case VARIANT_12: {
case VARIANT_INSECT_CAPTURE_RESULT: {
mResAccTime.detach();
unloadData(sMiniGameTime);
break;
}
case VARIANT_13: {
case VARIANT_PUMPKIN_ARCHERY_RESULT: {
mResAccScore.detach();
unloadData(sMiniGameScore);
break;
}
case VARIANT_14: {
case VARIANT_ROLLERCOASTER_RESULT: {
mResAccTime.detach();
unloadData(sMiniGameTime);
break;
}
case VARIANT_15: {
case VARIANT_BOSS_RUSH_RESULT: {
mResAccTime.detach();
unloadData(sMiniGameTime);
break;
}
case VARIANT_16: {
case VARIANT_TRIAL_TIME_ATTACK_RESULT: {
mResAccTime.detach();
unloadData(sMiniGameTime);
break;
@@ -3606,21 +3606,21 @@ int dLytMiniGame_c::doDelete() {
int dLytMiniGame_c::execute() {
switch (mVariant) {
case VARIANT_BAMBOO_CUTTING:
case VARIANT_10: fn_80295F90(); break;
case VARIANT_FUN_FUN_ISLAND: fn_80296000(); break;
case VARIANT_BAMBOO_CUTTING_RESULT: executeBambooCutting(); break;
case VARIANT_FUN_FUN_ISLAND: executeFunFunIsland(); break;
case VARIANT_THRILL_DIGGER:
case VARIANT_11: fn_80296070(); break;
case VARIANT_THRILL_DIGGER_RESULT: executeThrillDigger(); break;
case VARIANT_INSECT_CAPTURE:
case VARIANT_12: fn_80296150(); break;
case VARIANT_SPIRAL_CHARGE_TUTORIAL: fn_80296210(); break;
case VARIANT_INSECT_CAPTURE_RESULT: executeInsectCapture(); break;
case VARIANT_SPIRAL_CHARGE_TUTORIAL: executeSpiralChargeTutorial(); break;
case VARIANT_PUMPKIN_ARCHERY:
case VARIANT_13: fn_802962A0(); break;
case VARIANT_PUMPKIN_ARCHERY_RESULT: executePumpkinArchery(); break;
case VARIANT_ROLLERCOASTER:
case VARIANT_14: fn_80296330(); break;
case VARIANT_ROLLERCOASTER_RESULT: executeRollercoaster(); break;
case VARIANT_BOSS_RUSH:
case VARIANT_15: fn_802963E0(); break;
case VARIANT_BOSS_RUSH_RESULT: executeBossRush(); break;
case VARIANT_TRIAL_TIME_ATTACK:
case VARIANT_16: fn_80296480(); break;
case VARIANT_TRIAL_TIME_ATTACK_RESULT: executeTrialTimeAttack(); break;
}
mScore.execute();
@@ -3650,7 +3650,7 @@ int dLytMiniGame_c::draw() {
return SUCCEEDED;
}
void dLytMiniGame_c::scoreRelatedExecute() {
void dLytMiniGame_c::scoreRelatedInit() {
switch (mVariant) {
case VARIANT_BAMBOO_CUTTING:
case VARIANT_THRILL_DIGGER:
@@ -3664,13 +3664,13 @@ void dLytMiniGame_c::scoreRelatedExecute() {
mScore.setField_0x828(false);
}
break;
case VARIANT_10:
case VARIANT_11:
case VARIANT_13: mScore.startAlphaIn();
case VARIANT_BAMBOO_CUTTING_RESULT:
case VARIANT_THRILL_DIGGER_RESULT:
case VARIANT_PUMPKIN_ARCHERY_RESULT: mScore.startAlphaIn();
}
}
void dLytMiniGame_c::scoreRelated() {
void dLytMiniGame_c::endScoreResult() {
switch (mVariant) {
case VARIANT_FUN_FUN_ISLAND:
if (fn_80295DB0()) {
@@ -3679,9 +3679,9 @@ void dLytMiniGame_c::scoreRelated() {
mScore.startOut();
}
break;
case VARIANT_10:
case VARIANT_11:
case VARIANT_13: mScore.startAlphaOut(); break;
case VARIANT_BAMBOO_CUTTING_RESULT:
case VARIANT_THRILL_DIGGER_RESULT:
case VARIANT_PUMPKIN_ARCHERY_RESULT: mScore.startAlphaOut(); break;
}
}
@@ -3694,10 +3694,10 @@ void dLytMiniGame_c::setDisplayedPoints(s32 points) {
fn_80295DB0();
mScore.setScore(points);
break;
case VARIANT_THRILL_DIGGER: mScore.fn_80291D40(points); break;
case VARIANT_10:
case VARIANT_13: mScore.setScore(points); break;
case VARIANT_11:
case VARIANT_THRILL_DIGGER: mScore.fn_80291D40(points); break;
case VARIANT_BAMBOO_CUTTING_RESULT:
case VARIANT_PUMPKIN_ARCHERY_RESULT: mScore.setScore(points); break;
case VARIANT_THRILL_DIGGER_RESULT:
mScore.setScore(points);
field_0x3864 = true;
field_0x3865 = false;
@@ -3747,7 +3747,7 @@ void dLytMiniGame_c::startFinish() {
}
}
void dLytMiniGame_c::fn_80295A20() {
void dLytMiniGame_c::startTimeup() {
switch (mVariant) {
case VARIANT_BAMBOO_CUTTING:
case VARIANT_FUN_FUN_ISLAND:
@@ -3815,15 +3815,15 @@ bool dLytMiniGame_c::isTimeupAnimDone() {
return false;
}
void dLytMiniGame_c::fn_80295B20(s32 score) {
void dLytMiniGame_c::setScoreUp(s32 score) {
mScoreSd.setScoreUp(score);
}
void dLytMiniGame_c::fn_80295B30(s32 score) {
void dLytMiniGame_c::setScoreDown(s32 score) {
mScoreSd.setScoreDown(score);
}
void dLytMiniGame_c::timeRelatedExecute() {
void dLytMiniGame_c::timeRelatedInit() {
switch (mVariant) {
case VARIANT_INSECT_CAPTURE:
case VARIANT_PUMPKIN_ARCHERY:
@@ -3835,19 +3835,19 @@ void dLytMiniGame_c::timeRelatedExecute() {
mTime.fn_8028DD80();
}
break;
case VARIANT_12:
case VARIANT_14:
case VARIANT_15:
case VARIANT_16: mTime.startAlphaIn(); break;
case VARIANT_INSECT_CAPTURE_RESULT:
case VARIANT_ROLLERCOASTER_RESULT:
case VARIANT_BOSS_RUSH_RESULT:
case VARIANT_TRIAL_TIME_ATTACK_RESULT: mTime.startAlphaIn(); break;
}
}
void dLytMiniGame_c::timeRelated() {
void dLytMiniGame_c::endTimeResult() {
switch (mVariant) {
case VARIANT_12:
case VARIANT_14:
case VARIANT_15:
case VARIANT_16: mTime.startAlphaOut(); break;
case VARIANT_INSECT_CAPTURE_RESULT:
case VARIANT_ROLLERCOASTER_RESULT:
case VARIANT_BOSS_RUSH_RESULT:
case VARIANT_TRIAL_TIME_ATTACK_RESULT: mTime.startAlphaOut(); break;
}
}
@@ -3856,17 +3856,17 @@ void dLytMiniGame_c::setDisplayedTime(s32 time) {
case VARIANT_INSECT_CAPTURE:
case VARIANT_ROLLERCOASTER:
case VARIANT_BOSS_RUSH:
case VARIANT_TRIAL_TIME_ATTACK: mTime.setTimerValueInMilliSeconds(time); break;
case VARIANT_PUMPKIN_ARCHERY: mTime.setTimerSecondsValueInMilliSeconds(time); break;
case VARIANT_SPIRAL_CHARGE_TUTORIAL: mTime.setTimerSecondsValueInMilliSeconds(time); break;
case VARIANT_12:
case VARIANT_14:
case VARIANT_15:
case VARIANT_16: mTime.setTimerValueInMilliSeconds(time); break;
case VARIANT_TRIAL_TIME_ATTACK: mTime.setTimerValueInMilliSeconds(time); break;
case VARIANT_PUMPKIN_ARCHERY: mTime.setTimerSecondsValueInMilliSeconds(time); break;
case VARIANT_SPIRAL_CHARGE_TUTORIAL: mTime.setTimerSecondsValueInMilliSeconds(time); break;
case VARIANT_INSECT_CAPTURE_RESULT:
case VARIANT_ROLLERCOASTER_RESULT:
case VARIANT_BOSS_RUSH_RESULT:
case VARIANT_TRIAL_TIME_ATTACK_RESULT: mTime.setTimerValueInMilliSeconds(time); break;
}
}
void dLytMiniGame_c::setHighscore(s32 time) {
void dLytMiniGame_c::setBestTime(s32 time) {
switch (mVariant) {
case VARIANT_INSECT_CAPTURE:
case VARIANT_ROLLERCOASTER:
@@ -3874,10 +3874,10 @@ void dLytMiniGame_c::setHighscore(s32 time) {
case VARIANT_TRIAL_TIME_ATTACK:
// case VARIANT_SPIRAL_CHARGE_TUTORIAL:
case VARIANT_PUMPKIN_ARCHERY:
case VARIANT_12:
case VARIANT_14:
case VARIANT_15:
case VARIANT_16: mTime.setBestTime(time); break;
case VARIANT_INSECT_CAPTURE_RESULT:
case VARIANT_ROLLERCOASTER_RESULT:
case VARIANT_BOSS_RUSH_RESULT:
case VARIANT_TRIAL_TIME_ATTACK_RESULT: mTime.setBestTime(time); break;
}
}
@@ -3889,10 +3889,10 @@ void dLytMiniGame_c::setShowBestTime(bool show) {
case VARIANT_TRIAL_TIME_ATTACK:
// case VARIANT_SPIRAL_CHARGE_TUTORIAL:
case VARIANT_PUMPKIN_ARCHERY:
case VARIANT_12:
case VARIANT_14:
case VARIANT_15:
case VARIANT_16: mTime.setShowBestTime(show); break;
case VARIANT_INSECT_CAPTURE_RESULT:
case VARIANT_ROLLERCOASTER_RESULT:
case VARIANT_BOSS_RUSH_RESULT:
case VARIANT_TRIAL_TIME_ATTACK_RESULT: mTime.setShowBestTime(show); break;
}
}
@@ -3933,7 +3933,7 @@ bool dLytMiniGame_c::isBugCollected(s32 slot) const {
}
void dLytMiniGame_c::fn_80295D80() {
scoreRelatedExecute();
scoreRelatedInit();
}
void dLytMiniGame_c::fn_80295D90(s32 points) {
@@ -3948,13 +3948,13 @@ void dLytMiniGame_c::getPumpkin(const mVec3_c &pumpkinPos, s32 unk, bool doubleS
bool dLytMiniGame_c::fn_80295DB0() {
bool ret = false;
switch (mVariant) {
case VARIANT_10:
case VARIANT_11:
case VARIANT_12:
case VARIANT_13:
case VARIANT_14:
case VARIANT_15:
case VARIANT_16: ret = true; break;
case VARIANT_BAMBOO_CUTTING_RESULT:
case VARIANT_THRILL_DIGGER_RESULT:
case VARIANT_INSECT_CAPTURE_RESULT:
case VARIANT_PUMPKIN_ARCHERY_RESULT:
case VARIANT_ROLLERCOASTER_RESULT:
case VARIANT_BOSS_RUSH_RESULT:
case VARIANT_TRIAL_TIME_ATTACK_RESULT: ret = true; break;
case VARIANT_FUN_FUN_ISLAND:
if (!MinigameManager::GetInstance()->checkInFunFunIsland()) {
ret = true;
@@ -4001,7 +4001,7 @@ bool dLytMiniGame_c::isFadingOut() const {
return ret;
}
void dLytMiniGame_c::fn_80295F90() {
void dLytMiniGame_c::executeBambooCutting() {
if (fn_80295DB0()) {
// nothing
} else {
@@ -4017,11 +4017,11 @@ void dLytMiniGame_c::fn_80295F90() {
}
}
void dLytMiniGame_c::fn_80296000() {
void dLytMiniGame_c::executeFunFunIsland() {
if (fn_80295DB0()) {
mScore.setField_0x816(true);
mScore.setResultMode(true);
} else {
mScore.setField_0x816(false);
mScore.setResultMode(false);
if (isPopupOpen()) {
mScore.startOutTemp();
} else {
@@ -4030,7 +4030,7 @@ void dLytMiniGame_c::fn_80296000() {
}
}
void dLytMiniGame_c::fn_80296070() {
void dLytMiniGame_c::executeThrillDigger() {
if (fn_80295DB0()) {
if (field_0x3864 == true) {
s32 score = mScore.getScore();
@@ -4058,7 +4058,7 @@ void dLytMiniGame_c::fn_80296070() {
}
}
void dLytMiniGame_c::fn_80296150() {
void dLytMiniGame_c::executeInsectCapture() {
if (fn_80295DB0()) {
// nothing
} else {
@@ -4082,7 +4082,7 @@ void dLytMiniGame_c::fn_80296150() {
}
}
void dLytMiniGame_c::fn_80296210() {
void dLytMiniGame_c::executeSpiralChargeTutorial() {
if (isInEvent() || isPopupOpen()) {
mScore.startOutTemp();
mTime.startOutTemp();
@@ -4097,7 +4097,7 @@ void dLytMiniGame_c::fn_80296210() {
}
}
void dLytMiniGame_c::fn_802962A0() {
void dLytMiniGame_c::executePumpkinArchery() {
if (!fn_80295DB0()) {
if (isPopupOpen()) {
mScore.startOutTemp();
@@ -4114,7 +4114,7 @@ void dLytMiniGame_c::fn_802962A0() {
}
}
void dLytMiniGame_c::fn_80296330() {
void dLytMiniGame_c::executeRollercoaster() {
if (fn_80295DB0()) {
// nothing
} else {
@@ -4135,7 +4135,7 @@ void dLytMiniGame_c::fn_80296330() {
}
// These two do the same thing
void dLytMiniGame_c::fn_802963E0() {
void dLytMiniGame_c::executeBossRush() {
if (fn_80295DB0()) {
// nothing
} else {
@@ -4155,7 +4155,7 @@ void dLytMiniGame_c::fn_802963E0() {
}
}
void dLytMiniGame_c::fn_80296480() {
void dLytMiniGame_c::executeTrialTimeAttack() {
if (fn_80295DB0()) {
// nothing
} else {