diff options
| author | elijah-thomas774 <elijahthomas774@gmail.com> | 2026-09-24 17:30:31 -0400 |
|---|---|---|
| committer | elijah-thomas774 <elijahthomas774@gmail.com> | 2026-09-24 17:30:31 -0400 |
| commit | c1a336a3b3feef2a258e7ec06fb90a37b58fa593 (patch) | |
| tree | 45ec0ff5c7ad4fb9029db3673e32af00601ac4e3 /include/d | |
| parent | 10e14b54f1deaf75295e75fee9529c2e533c8fa1 (diff) | |
| parent | 7b3cec08716d9b0fc89d9d279d3b7ef6cb855570 (diff) | |
Merge remote-tracking branch 'upstream/HEAD' into d_a_obj_bomb
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/a/d_a_salbage_obj.h | 8 | ||||
| -rw-r--r-- | include/d/a/e/d_a_en_base.h | 5 | ||||
| -rw-r--r-- | include/d/a/obj/d_a_obj_base.h | 4 | ||||
| -rw-r--r-- | include/d/d_stage.h | 7 | ||||
| -rw-r--r-- | include/d/flag/storyflag_map.h | 30 | ||||
| -rw-r--r-- | include/d/t/d_t_alldie.h | 32 | ||||
| -rw-r--r-- | include/d/t/d_t_view_clip.h | 49 |
7 files changed, 118 insertions, 17 deletions
diff --git a/include/d/a/d_a_salbage_obj.h b/include/d/a/d_a_salbage_obj.h index 742224bd..70b1d082 100644 --- a/include/d/a/d_a_salbage_obj.h +++ b/include/d/a/d_a_salbage_obj.h @@ -17,11 +17,17 @@ class dAcSalbageObj_c; enum SalvageObj_e { + SALVAGE_OBJ_NONE = -1, + SALVAGE_OBJ_PROPERA = 0, SALVAGE_OBJ_ROULETTE = 1, SALVAGE_OBJ_DIVINER_CRYSTAL = 2, + SALVAGE_OBJ_SALVAGE_MORRY = 3, + SALVAGE_OBJ_MOLE_ELDER = 4, SALVAGE_OBJ_WATER_JAR = 5, SALVAGE_OBJ_POT = 6, + + SALVAGE_OBJ_MAX = 7, }; class dSalvageIfObj_c : public dSalvageIf_c { @@ -176,7 +182,7 @@ protected: /* 0x908 */ mMtx_c mWorldSRMtx; /* 0x938 */ f32 field_0x938; /* 0x93C */ DowsingTarget mDowsingTarget; - /* 0x95C */ mVec3_c field_0x95C; + /* 0x95C */ mVec3_c mDowsingOffset; /* 0x968 */ bool mIsDowsingRegistered; /* 0x96C */ const sStateID_c *mpNextStateId; }; diff --git a/include/d/a/e/d_a_en_base.h b/include/d/a/e/d_a_en_base.h index 1c1382e8..8d60823a 100644 --- a/include/d/a/e/d_a_en_base.h +++ b/include/d/a/e/d_a_en_base.h @@ -5,6 +5,7 @@ #include "d/a/obj/d_a_obj_base.h" #include "d/a/obj/d_a_obj_bomb.h" #include "d/d_cc.h" +#include "f/f_list_mg.h" #include "m/m3d/m_mdl.h" #include "m/m_angle.h" #include "m/m_vec.h" @@ -96,6 +97,10 @@ public: bool ChkCrossPlayer(f32 height); + static dAcEnBase_c *GetNextEnemy(dAcEnBase_c *pParent) { + return static_cast<dAcEnBase_c *>(getNextObject(&sEnemyList, pParent)); + } + protected: // TODO: Make accessors for this list to auto-convert to dAcEnBase? static fLiMgBa_c sEnemyList; diff --git a/include/d/a/obj/d_a_obj_base.h b/include/d/a/obj/d_a_obj_base.h index 1d8eff2e..d82181ef 100644 --- a/include/d/a/obj/d_a_obj_base.h +++ b/include/d/a/obj/d_a_obj_base.h @@ -164,6 +164,10 @@ public: mLinkage.field_0xA0 = pCol; } + dSalvageIf_c *getSalvageIf() const { + return mpSalvageIf; + } + // could be their own thing? static void *getOarcFile(const char *oarcName, const char *fileName); static void *getOarcSubEntry(const char *oarcName, const char *fileName); diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 5b69d38d..c3d95b9e 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -163,8 +163,13 @@ public: s8 getCurrRoomId() const { return curr_room_id; } + bool isRoomID(s32 id) const { + return curr_room_id == id; + } - dFader_c& getFader() { return mFader; } + dFader_c &getFader() { + return mFader; + } bool fn_801B3EE0(); void fn_801B3F20(); diff --git a/include/d/flag/storyflag_map.h b/include/d/flag/storyflag_map.h index a8c617a8..785184a9 100644 --- a/include/d/flag/storyflag_map.h +++ b/include/d/flag/storyflag_map.h @@ -1640,12 +1640,12 @@ enum StoryFlags_e { /** [Windmill Propeller picked up] * Story Flag #324 (0x0144) - JP 805ACD7F 0x04 / US 805A9AFF 0x04 */ - STORYFLAG_324, + STORYFLAG_PROPERA_PICKUP, /** [Village Windmill reparation cutscene] * Story Flag #325 (0x0145) - JP 805ACD7F 0x08 / US 805A9AFF 0x08 */ - STORYFLAG_325, + STORYFLAG_WINDMILL_REPAIRED, /** [Wyrna's 5 gratitude crystals collected (not the crystals themselves)] * Story Flag #326 (0x0146) - JP 805ACD7F 0x10 / US 805A9AFF 0x10 @@ -1842,12 +1842,12 @@ enum StoryFlags_e { /** [Spiral Charge Ability] * Story Flag #364 (0x016C) - JP 805ACD83 0x04 / US 805A9B03 0x04 */ - STORYFLAG_364, + STORYFLAG_SPIRAL_CHARGE_UNLOCKED, /** [Pumpkin Soup for Levias Collected, unset by picking up something else] * Story Flag #365 (0x016D) - JP 805ACD83 0x08 / US 805A9B03 0x08 */ - STORYFLAG_365, + STORYFLAG_PUMPKIN_SOUP_PICKUP, /** [Unset when Scrapper has a job, set when he has finished it] * Story Flag #366 (0x016E) - JP 805ACD83 0x10 / US 805A9B03 0x10 @@ -1877,17 +1877,17 @@ enum StoryFlags_e { /** [Accepting the Fortune Teller Crystal Sidequest] * Story Flag #371 (0x0173) - JP 805ACD82 0x02 / US 805A9B02 0x02 */ - STORYFLAG_371, + STORYFLAG_CRYSTAL_QUEST_STARTED, /** [Sets after Sprapper picked the Crystal Ball up] * Story Flag #372 (0x0174) - JP 805ACD82 0x04 / US 805A9B02 0x04 */ - STORYFLAG_372, + STORYFLAG_CRYSTAL_PICKUP, /** [Sets before the Fortune Teller gives his Crystals] * Story Flag #373 (0x0175) - JP 805ACD82 0x08 / US 805A9B02 0x08 */ - STORYFLAG_373, + STORYFLAG_CRYSTAL_DELIVERED, /** [Sets when talking to the Fortune Teller in the Bazzar after 8x08 (Fortunes only cost half)] * Story Flag #374 (0x0176) - JP 805ACD82 0x10 / US 805A9B02 0x10 @@ -2002,17 +2002,17 @@ enum StoryFlags_e { /** [Search for Party Wheel Crystal Quest started] * Story Flag #396 (0x018C) - JP 805ACD8F 0x20 / US 805A9B0F 0x20 */ - STORYFLAG_396, + STORYFLAG_PARTY_WHEEL_QUEST_STARTED, /** [Set after Scrapper picks up Party Wheel] * Story Flag #397 (0x018D) - JP 805ACD8F 0x80 / US 805A9B0F 0x80 */ - STORYFLAG_397, + STORYFLAG_PARTY_WHEEL_PICKUP, /** [Set before Fun Fun Owner gives his Crystals] * Story Flag #398 (0x018E) - JP 805ACD8E 0x01 / US 805A9B0E 0x01 */ - STORYFLAG_398, + STORYFLAG_PARTY_WHEEL_DELIVERED, /** [Sets after you get a free try at Diveing game] * Story Flag #399 (0x018F) - JP 805ACD91 0x80 / US 805A9B11 0x80 @@ -2357,7 +2357,7 @@ enum StoryFlags_e { /** [Goron Text near Big Frog] * Story Flag #467 (0x01D3) - JP 805ACD8F 0x10 / US 805A9B0F 0x10 */ - STORYFLAG_467, + STORYFLAG_WATER_BASIN_QUEST_STARTED, /** [Goron Text after Watering 1st Frog] * Story Flag #468 (0x01D4) - JP 805ACD8F 0x40 / US 805A9B0F 0x40 @@ -2372,17 +2372,17 @@ enum StoryFlags_e { /** [Kina's Crystal Quest started] * Story Flag #470 (0x01D6) - JP 805ACD8E 0x04 / US 805A9B0E 0x04 */ - STORYFLAG_470, + STORYFLAG_MOLE_ELDER_QUEST_STARTED, /** [Guld picked up (unsets after)] * Story Flag #471 (0x01D7) - JP 805ACD8E 0x08 / US 805A9B0E 0x08 */ - STORYFLAG_471, + STORYFLAG_MOLE_ELDER_PICKUP, /** [Kina's Crystal Quest related] * Story Flag #472 (0x01D8) - JP 805ACD8E 0x10 / US 805A9B0E 0x10 */ - STORYFLAG_472, + STORYFLAG_MOLE_ELDER_DELIVERED, /** [Kina's Crystal Quest related] * Story Flag #473 (0x01D9) - JP 805ACD8E 0x20 / US 805A9B0E 0x20 @@ -2417,7 +2417,7 @@ enum StoryFlags_e { /** [Owlans Crystal Sidequest started] * Story Flag #479 (0x01DF) - JP 805ACD91 0x08 / US 805A9B11 0x08 */ - STORYFLAG_479, + STORYFLAG_PLANT_SPECIES_QUEST_STARTED, /** [] * Story Flag #480 (0x01E0) - JP 805ACD91 0x10 / US 805A9B11 0x10 diff --git a/include/d/t/d_t_alldie.h b/include/d/t/d_t_alldie.h new file mode 100644 index 00000000..3fe18e82 --- /dev/null +++ b/include/d/t/d_t_alldie.h @@ -0,0 +1,32 @@ +#ifndef D_T_ALL_DIE_H +#define D_T_ALL_DIE_H + +#include "d/t/d_tg.h" +#include "m/m_mtx.h" +#include "toBeSorted/time_area_mgr.h" + +class dTgAllDie_c : public dTg_c { +public: + dTgAllDie_c() {} + virtual ~dTgAllDie_c() {} + + virtual int create() override; + virtual int doDelete() override; + virtual int draw() override; + virtual int actorExecute() override; + + static dTgAllDie_c *getNearestToPlayer(s32 roomId); + +private: + /* 0x0FC */ mMtx_c mArea; + /* 0x12C */ TimeAreaStruct mTimeArea; + /* 0x138 */ s32 mNumEnemiesInArea; + /* 0x13C */ u16 mTimer0x13C; + /* 0x13E */ u8 mType; + /* 0x13F */ u8 mSceneflag; + /* 0x140 */ u8 mTimer0x140; + /* 0x144 */ u32 field_0x144; + /* 0x145 */ u8 field_0x148; +}; + +#endif diff --git a/include/d/t/d_t_view_clip.h b/include/d/t/d_t_view_clip.h new file mode 100644 index 00000000..0b81b35c --- /dev/null +++ b/include/d/t/d_t_view_clip.h @@ -0,0 +1,49 @@ +#ifndef D_T_VIEW_CLIP_H +#define D_T_VIEW_CLIP_H + +#include "d/t/d_tg.h" +#include "m/m_mtx.h" + +class dTgViewClip_c : public dTg_c { +public: + static const s32 sNumEntries = 0x40; + + enum Flag_e { + FLAG_NORMAL = 0, + FLAG_FORCE_ON = (1 << 0), + FLAG_FORCE_OFF = (1 << 1), + }; + + enum Type_e { + TYPE_FORCE_ON, + TYPE_FORCE_OFF, + }; + + dTgViewClip_c() {} + virtual ~dTgViewClip_c() {} + + virtual int create() override; + virtual int doDelete() override; + virtual int draw() override; + virtual int actorExecute() override; + + void setViewClip(u8 setBit); + static void resetViewClip(); + static f32 getCull(s32 idx, f32 cullDistance); + static bool checkForceOn(s32 idx); + + static u8 getViewClipBit(s32 idx, u8 setBit); + static void setViewClipBit(s32 idx, u8 setBit); + + static void setViewClip(s32 idx, u8 value); + +private: + /* 0x0DC */ mMtx_c mArea; + /* 0x12C */ u8 mIndex; + /* 0x12D */ u8 mType; + /* 0x12E */ u8 mAreaIndex; + + static u8 sViewClips[sNumEntries]; +}; + +#endif |
