diff options
| author | elijah-thomas774 <elijahthomas774@gmail.com> | 2025-11-28 04:36:54 -0500 |
|---|---|---|
| committer | elijah-thomas774 <elijahthomas774@gmail.com> | 2025-11-28 04:36:54 -0500 |
| commit | b568957bb4e7fec942f2b8e2882c488fae6ae6f4 (patch) | |
| tree | 055ed4e58a84a3ddfc196131716678fd2cee8b8c /include/d | |
| parent | 74e25480514ba0f2b94d1f6d19dff1cff76b2423 (diff) | |
d_t_sword_battle_game OK - function order issue
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/flag/storyflag_map.h | 10 | ||||
| -rw-r--r-- | include/d/lyt/d_lyt_mini_game.h | 22 | ||||
| -rw-r--r-- | include/d/t/d_t_sword_battle_game.h | 83 |
3 files changed, 105 insertions, 10 deletions
diff --git a/include/d/flag/storyflag_map.h b/include/d/flag/storyflag_map.h index 64ca1504..ec35a8d1 100644 --- a/include/d/flag/storyflag_map.h +++ b/include/d/flag/storyflag_map.h @@ -2883,7 +2883,7 @@ enum StoryFlags_e { /** [In Boss Rush mode (can be unset)] * Story Flag #572 (0x023C) - JP 805ACD98 0x08 / US 805A9B18 0x08 */ - STORYFLAG_572, + STORYFLAG_BOSSRUSH_ACTIVE, /** [In redoing slient realm mode?] * Story Flag #573 (0x023D) - JP 805ACD98 0x10 / US 805A9B18 0x10 @@ -3538,17 +3538,17 @@ enum StoryFlags_e { /** [Sets when you refight imp 1 (Sealed Grounds layer 2)] * Story Flag #703 (0x02BF) - JP 805ACDA2 0x08 / US 805A9B22 0x08 */ - STORYFLAG_703, + STORYFLAG_IMPRISONED1_BOSSRUSH, /** [Sets when you refight imp 2 (Sealed Grounds layer 3)] * Story Flag #704 (0x02C0) - JP 805ACDA2 0x10 / US 805A9B22 0x10 */ - STORYFLAG_704, + STORYFLAG_IMPRISONED2_BOSSRUSH, /** [Sets when you refight imp3 (Sealed Grounds layer 4)] * Story Flag #705 (0x02C1) - JP 805ACDA2 0x20 / US 805A9B22 0x20 */ - STORYFLAG_705, + STORYFLAG_IMPRISONED3_BOSSRUSH, /** [Minecart Escort done (Lanayru Gorge layer 2)] * Story Flag #706 (0x02C2) - JP 805ACDA2 0x40 / US 805A9B22 0x40 @@ -3653,7 +3653,7 @@ enum StoryFlags_e { /** [[Gets Set in a refight](Hylia's Realm layer 4)] * Story Flag #726 (0x02D6) - JP 805ACDA4 0x40 / US 805A9B24 0x40 */ - STORYFLAG_726, + STORYFLAG_DEMISE_BOSSRUSH, /** [Talking to Fi after filling Wallet] * Story Flag #727 (0x02D7) - JP 805ACDA4 0x80 / US 805A9B24 0x80 diff --git a/include/d/lyt/d_lyt_mini_game.h b/include/d/lyt/d_lyt_mini_game.h index a8065496..bfb19692 100644 --- a/include/d/lyt/d_lyt_mini_game.h +++ b/include/d/lyt/d_lyt_mini_game.h @@ -9,6 +9,20 @@ public: return sInstance; } + /** Updates some window */ + void fn_80295940(); + /** ??? */ + void fn_80295980(); + /** Checks to see if in BAMBOO_CUTTING .. BOSS_RUSH and returns some boolean (start?) */ + bool fn_80295AB0(); + /** Checks to see if in BAMBOO_CUTTING .. BOSS_RUSH and returns some boolean (end?) */ + bool fn_80295AD0(); + + void setHighscore(s32 time); + + /** GUESS: sets the start for the high score? */ + void fn_80295CB0(bool); + void timeRelatedExecute(); void scoreRelatedExecute(); @@ -18,7 +32,15 @@ public: void timeRelated(); void scoreRelated(); + /** GUESS: Assumption based on function caller */ + void setComplete() { + field_0x3866 = true; + } + private: + u8 _0x0000[0x3866 - 0x0000]; + bool field_0x3866; + static dLytMiniGame_c *sInstance; }; diff --git a/include/d/t/d_t_sword_battle_game.h b/include/d/t/d_t_sword_battle_game.h index cfe7ff90..3f1255b2 100644 --- a/include/d/t/d_t_sword_battle_game.h +++ b/include/d/t/d_t_sword_battle_game.h @@ -1,17 +1,90 @@ #ifndef D_T_SWORD_BATTLE_GAME_H #define D_T_SWORD_BATTLE_GAME_H -#include "d/a/d_a_base.h" +#include "d/flag/storyflag_manager.h" +#include "d/t/d_tg.h" #include "s/s_State.hpp" -#include "s/s_StateMgr.hpp" +#include "toBeSorted/actor_event.h" +#include "toBeSorted/timekeeper.h" -class dTgSwordBattleGame_c : public dAcBase_c { +class dTgSwordBattleGame_c : public dTg_c { public: - dTgSwordBattleGame_c() : mStateMgr(*this, sStateID::null) {} + dTgSwordBattleGame_c() : mStateMgr(*this, sStateID::null), mEventRelated(*this, 0) {} virtual ~dTgSwordBattleGame_c() {} + virtual int create() override; + virtual int doDelete() override; + virtual int draw() override; + virtual int actorExecute() override; + virtual int actorExecuteInEvent() override; + + /* vt 0x74-0x80*/ STATE_VIRTUAL_FUNC_DECLARE(dTgSwordBattleGame_c, Wait); + /* vt 0x80-0x88*/ STATE_VIRTUAL_FUNC_DECLARE(dTgSwordBattleGame_c, Manage); + void init(); + + bool checkInEvent(const char *eventName); + + static bool checkInBossRushFlag(); + void unsetInBossRushFlag(); + void setInBossRushFlag(); + + static bool checkInBossRushMinigame(); + + void unsetEarlyFightFlags() const; + void unsetImprisonedFightFlags() const; + void unsetDemiseFightFlag() const; + + s32 getCurrentTime() const; + void saveCurrentTime(s32 time) const; + + s32 getBossIdx() const; + s32 getBossHighscore() const; + + /** Index 0 */ + s32 getGhirahim1Highscore() const; + /** Index 1 */ + s32 getScalderaHighscore() const; + /** Index 2 */ + s32 getMolderachHighscore() const; + /** Index 3 */ + s32 getImprisoned1Highscore() const; + /** Index 4 */ + s32 getKoloktosHighscore() const; + /** Index 5 */ + s32 getTentalusHighscore() const; + /** Index 6 */ + s32 getGhirahim2Highscore() const; + /** Index 7 */ + s32 getImprisoned2Highscore() const; + /** Index 8 */ + s32 getImprisoned3Highscore() const; + /** Index 9 */ + s32 getHordeHighscore() const; + /** Index 10 */ + s32 getGhirahim3Highscore() const; + /** Index 11 */ + s32 getDemiseHighscore() const; + + s32 getCurrentBossNumber() const; + void setCurrentBossNumber(s32 num); + + void notifyBossDeath(bool ghirahim_related = false); + bool checkFightStarted() const; + private: - /* 0x??? */ STATE_MGR_DECLARE(dTgSwordBattleGame_c); + /* 0x0FC */ STATE_MGR_DECLARE(dTgSwordBattleGame_c); + /* 0x138 */ ActorEventRelated mEventRelated; + /* 0x188 */ Timekeeper mTimer; + /* 0x1A8 */ bool field_0x1A8; + /* 0x1A9 */ bool field_0x1A9; + /* 0x1AA */ bool field_0x1AA; + /* 0x1AB */ bool field_0x1AB; ///< set if current boss is complete + /* 0x1AC */ bool field_0x1AC; + /* 0x1AD */ u8 field_0x1AD; + /* 0x1AE */ u8 field_0x1AE; + /* 0x1B0 */ u32 mBossNumber; + + // Note: Gets padded to 0x1B8 due to Timekeepers 8-byte alignment }; #endif |
