diff options
| author | robojumper <robojumper@gmail.com> | 2025-10-10 22:36:37 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-10-10 22:36:37 +0200 |
| commit | 631d950d13fb73b2f7ec7fd53d25df4edaa8479b (patch) | |
| tree | 6238d4c5f2028f0cadef340d85545912b2a3fd91 /include | |
| parent | 6d7a7007c057a5fbbdc88f12f44aab6ec7a8d030 (diff) | |
More, documentation
Diffstat (limited to 'include')
| -rw-r--r-- | include/d/d_bzs_types.h | 2 | ||||
| -rw-r--r-- | include/d/d_sc_game.h | 7 | ||||
| -rw-r--r-- | include/d/d_stage_mgr.h | 35 | ||||
| -rw-r--r-- | include/d/flag/storyflag_map.h | 32 | ||||
| -rw-r--r-- | include/d/lyt/d_lyt_map.h | 45 | ||||
| -rw-r--r-- | include/d/lyt/d_lyt_map_global.h | 4 |
6 files changed, 85 insertions, 40 deletions
diff --git a/include/d/d_bzs_types.h b/include/d/d_bzs_types.h index 638d98e0..9b31058c 100644 --- a/include/d/d_bzs_types.h +++ b/include/d/d_bzs_types.h @@ -193,7 +193,7 @@ struct STIF { /* 0x08 */ f32 defaultCullingDistance; /* 0x0C */ u16 flagIndex; /* 0x0E */ u8 areaType; - /* 0x0F */ u8 field_0x0F; + /* 0x0F */ u8 area; /* 0x10 */ u8 field_0x10; /* 0x11 */ u8 field_0x11; /* 0x12 */ s8 mapNameId; diff --git a/include/d/d_sc_game.h b/include/d/d_sc_game.h index 01b0f7bc..af9973dd 100644 --- a/include/d/d_sc_game.h +++ b/include/d/d_sc_game.h @@ -135,7 +135,8 @@ public: void triggerExit(s32 room, u16 exitIndex, s32 forcedNight = 2, s32 forcedTrial = 2); void triggerEntrance( - const char *stageName, u8 roomid, u8 layer, u8 entrance, int forcedNight = SpawnInfo::RETAIN_TOD, int forcedTrial = SpawnInfo::RETAIN_TRIAL, u8 transitionType = dFader_c::FADER_BLACK, + const char *stageName, u8 roomid, u8 layer, u8 entrance, int forcedNight = SpawnInfo::RETAIN_TOD, + int forcedTrial = SpawnInfo::RETAIN_TRIAL, u8 transitionType = dFader_c::FADER_BLACK, u16 transitionFadeFrames = 15, s8 field0x28 = -1 ); // void triggerEntrance(const char *stageName, u8 room, ); @@ -213,6 +214,10 @@ public: return mScreen1.fn_801BBEC0(); } + void setTargetingScreenPrio(u8 prio) { + mScreen1.setPriority(prio); + } + static bool sCopyFileBToCurrentAfterRespawn; static bool sDoSomethingWithFileAOnTransition; static bool sPreventClearingSomeFlag; diff --git a/include/d/d_stage_mgr.h b/include/d/d_stage_mgr.h index 57aad744..a455b10a 100644 --- a/include/d/d_stage_mgr.h +++ b/include/d/d_stage_mgr.h @@ -59,15 +59,32 @@ public: bool isAreaTypeOverworldOrSkyloft() const; s32 getSTIFunk1() const; - s32 getSTIFbyte4() const; - bool isSTIFbyte4_2or3or4() const; - bool isSTIFbyte4_5or6() const; - bool isSTIFbyte4_7or8or9or10or11() const; - bool isSTIFbyte4_1() const { - return getSTIFbyte4() == 1; - } - bool isSTIFbyte4_0() const { - return getSTIFbyte4() == 0; + // Individually revealed areas on the main world map + enum StifArea_e { + STIF_AREA_SKY = 0, + // also applies to isle of songs, goddess statue + STIF_AREA_SEALED_GROUNDS = 1, + STIF_AREA_FARON_WOODS = 2, + STIF_AREA_DEEP_WOODS = 3, + STIF_AREA_LAKE_FLORIA = 4, + STIF_AREA_VOLCANO_SOUTH = 5, + STIF_AREA_VOLCANO_NORTH = 6, + STIF_AREA_LANAYRU_MINE = 7, + STIF_AREA_LANAYRU_DESERT = 8, + STIF_AREA_LANAYRU_SAND_SEA = 9, + STIF_AREA_LANAYRU_CAVES = 10, + STIF_AREA_LANAYRU_GORGE = 11, + }; + + s32 getSTIFArea() const; + bool isSTIFAreaFaron() const; + bool isSTIFAreaEldin() const; + bool isSTIFAreaLanayru() const; + bool isSTIFAreaSealedGrounds() const { + return getSTIFArea() == STIF_AREA_SEALED_GROUNDS; + } + bool isSTIFAreaSky() const { + return getSTIFArea() == STIF_AREA_SKY; } s32 getAreaType() const; diff --git a/include/d/flag/storyflag_map.h b/include/d/flag/storyflag_map.h index 11c5a099..56acd19d 100644 --- a/include/d/flag/storyflag_map.h +++ b/include/d/flag/storyflag_map.h @@ -452,17 +452,17 @@ enum StoryFlags_e { /** [Faron Woods introductory cutscene (Behind The Temple layer 2)] * Story Flag #87 (0x0057) - JP 805ACD6C 0x02 / US 805A9AEC 0x02 */ - STORYFLAG_87, + STORYFLAG_FARON_WOODS_DISCOVERED, /** [Lake Floria Introductory Cutscene] * Story Flag #88 (0x0058) - JP 805ACD6C 0x04 / US 805A9AEC 0x04 */ - STORYFLAG_88, + STORYFLAG_LAKE_FLORIA_DISCOVERED, /** [Skyview Introductory cutscene] * Story Flag #89 (0x0059) - JP 805ACD6C 0x08 / US 805A9AEC 0x08 */ - STORYFLAG_89, + STORYFLAG_SKYVIEW_DISCOVERED, /** [Sets after the Robot upgrades your Beetle] * Story Flag #90 (0x005A) - JP 805ACD6F 0x80 / US 805A9AEF 0x80 @@ -472,12 +472,12 @@ enum StoryFlags_e { /** [Deep Woods Introductory cutscene] * Story Flag #91 (0x005B) - JP 805ACD71 0x01 / US 805A9AF1 0x01 */ - STORYFLAG_91, + STORYFLAG_DEEP_WOODS_DISCOVERED, /** [Lanayru Desert Introductory Cutscene] * Story Flag #92 (0x005C) - JP 805ACD71 0x02 / US 805A9AF1 0x02 */ - STORYFLAG_92, + STORYFLAG_LANAYRU_DESERT_DISCOVERED, /** [Faron's Trial Gate Fi Singing Cutscene] * Story Flag #93 (0x005D) - JP 805ACD71 0x04 / US 805A9AF1 0x04 @@ -793,17 +793,17 @@ enum StoryFlags_e { /** [Ancient Cistern Introductory Cutscene (lilypad outside AC appears) (Outside AC layer 2)] * Story Flag #155 (0x009B) - JP 805ACD60 0x02 / US 805A9AE0 0x02 */ - STORYFLAG_155, + STORYFLAG_ANCIENT_CISTERN_DISCOVERED, /** [Sandship Introductory Cutscene] * Story Flag #156 (0x009C) - JP 805ACD60 0x04 / US 805A9AE0 0x04 */ - STORYFLAG_156, + STORYFLAG_SANDSHIP_DISCOVERED, /** [Ancient Harbour Introductory Cutscene] * Story Flag #157 (0x009D) - JP 805ACD60 0x08 / US 805A9AE0 0x08 */ - STORYFLAG_157, + STORYFLAG_ANCIENT_HARBOR_DISCOVERED, /** [First Time in Sand Sea] * Story Flag #158 (0x009E) - JP 805ACD60 0x10 / US 805A9AE0 0x10 @@ -813,7 +813,7 @@ enum StoryFlags_e { /** [Sky Keep Introductory Cutscene] * Story Flag #159 (0x009F) - JP 805ACD60 0x20 / US 805A9AE0 0x20 */ - STORYFLAG_159, + STORYFLAG_SKY_KEEP_DISCOVERED, /** [Mogma Mitts restricted by Bokoblin Base] * Story Flag #160 (0x00A0) - JP 805ACD60 0x80 / US 805A9AE0 0x80 @@ -883,7 +883,7 @@ enum StoryFlags_e { /** [Fire Sanctuary Introductory Cutscene] * Story Flag #173 (0x00AD) - JP 805ACD62 0x10 / US 805A9AE2 0x10 */ - STORYFLAG_173, + STORYFLAG_FIRE_SANCTUARY_DISCOVERED, /** [] * Story Flag #174 (0x00AE) - JP 805ACD62 0x20 / US 805A9AE2 0x20 @@ -933,7 +933,7 @@ enum StoryFlags_e { /** [Earth Temple Introductory Cutscene] * Story Flag #183 (0x00B7) - JP 805ACD66 0x40 / US 805A9AE6 0x40 */ - STORYFLAG_183, + STORYFLAG_EARTH_TEMPLE_DISCOVERED, /** [Impa Cutscene at Bridge in Eldin] * Story Flag #184 (0x00B8) - JP 805ACD66 0x80 / US 805A9AE6 0x80 @@ -1075,7 +1075,7 @@ enum StoryFlags_e { /** [LMF Introductory Cutscene (The loading zone to LMF now exists AND the opened Lanayru Gate of Time now appears * in the Harp Cutscene)] Story Flag #211 (0x00D3) - JP 805ACD70 0x80 / US 805A9AF0 0x80 */ - STORYFLAG_211, + STORYFLAG_LMF_DISCOVERED, /** [] * Story Flag #212 (0x00D4) - JP 805ACD73 0x01 / US 805A9AF3 0x01 @@ -2327,7 +2327,7 @@ enum StoryFlags_e { /** [Panning Camera Cutscene in Lanayru Caves showing crawlspace to Lanayru Gorge] * Story Flag #461 (0x01CD) - JP 805ACD8C 0x20 / US 805A9B0C 0x20 */ - STORYFLAG_461, + STORYFLAG_LANAYRU_CAVES_DISCOVERED, /** [Set when Thunder Dragon teaches SotH part] * Story Flag #462 (0x01CE) - JP 805ACD8C 0x40 / US 805A9B0C 0x40 @@ -2442,7 +2442,7 @@ enum StoryFlags_e { /** [Goddess Statue falling onto the Sealed Grounds Cutscene] * Story Flag #484 (0x01E4) - JP 805ACD90 0x04 / US 805A9B10 0x04 */ - STORYFLAG_484, + STORYFLAG_GODDESS_STATUE_FALLEN, /** [Groose goes back to the Groosenator after defeating Imp 3] * Story Flag #485 (0x01E5) - JP 805ACD90 0x08 / US 805A9B10 0x08 @@ -2652,7 +2652,7 @@ enum StoryFlags_e { /** [Lanayru Gorge Introductory Cutscene] * Story Flag #526 (0x020E) - JP 805ACD94 0x08 / US 805A9B14 0x08 */ - STORYFLAG_526, + STORYFLAG_LANAYRU_GORGE_DISCOVERED, /** [Flooded Faron Woods Introductory Cutscene] * Story Flag #527 (0x020F) - JP 805ACD94 0x10 / US 805A9B14 0x10 @@ -2833,7 +2833,7 @@ enum StoryFlags_e { /** [Volcano Summit Introductory Cutscene] * Story Flag #562 (0x0232) - JP 805ACD99 0x08 / US 805A9B19 0x08 */ - STORYFLAG_562, + STORYFLAG_VOLCANO_SUMMIT_DISCOVERED, /** [(not implemented yet -- 74B3)] * Story Flag #563 (0x0233) - JP from 805ACE40 0x08 to 805ACE40 0x40 / US from 805A9BC0 0x08 to 805A9BC0 0x40 diff --git a/include/d/lyt/d_lyt_map.h b/include/d/lyt/d_lyt_map.h index 8a0551d6..89b0e35e 100644 --- a/include/d/lyt/d_lyt_map.h +++ b/include/d/lyt/d_lyt_map.h @@ -492,6 +492,10 @@ public: void setPosition(const mVec2_c &pos); void setScale(f32 scale); + void setVisible(bool visible) { + mVisible = visible; + } + private: /* 0x04 */ d2d::LytBase_c mLyt; /* 0x94 */ bool mVisible; @@ -558,11 +562,20 @@ public: STATE_FUNC_DECLARE(dLytMapMain_c, EventSaveObjDecide); private: - // TODO - used elsewhere? - enum Province_e { - PROVINCE_FARON = 0, - PROVINCE_ELDIN = 1, - PROVINCE_LANAYRU = 2, + // TODO - need to come up with better names + enum SurfaceProvince_e { + SURFACE_PROVINCE_FARON = 0, + SURFACE_PROVINCE_ELDIN = 1, + SURFACE_PROVINCE_LANAYRU = 2, + }; + + enum AreaGroup_e { + AREAGROUP_SKY = 1, + AREAGROUP_FARON = 2, + AREAGROUP_ELDIN = 3, + AREAGROUP_LANAYRU = 4, + AREAGROUP_SEALED_GROUNDS = 5, + AREAGROUP_MAX = 6, }; dLytMapGlobal_c *getGlobal(); @@ -577,6 +590,8 @@ private: bool canPlaceBeacons(s32 mapMode) const; bool isPointingAtMainMap() const; + s32 getAreaGroup(s32 stifArea) const; + s32 getSelectedSaveObjIdx() const; f32 fn_80142D90(s32); @@ -598,6 +613,8 @@ private: void setButtonMessages(s32 currentMapMode, bool currentUpDirection, s32 nextMapMode, bool nextUpDirection); void setCursorType(); + void setupFlags(); + void loadTextboxes(); void saveUnkMapData(); @@ -660,8 +677,8 @@ private: /* 0x8854 */ nw4r::lyt::Pane *mpPanes[11]; /* 0x8880 */ d2d::AnmGroup_c *field_0x8880[11]; // ??? /* 0x88AC */ UNKWORD field_0x88AC; - /* 0x88B0 */ nw4r::lyt::Pane *mpUnkPanes1[7]; - /* 0x88CC */ nw4r::lyt::Pane *mpUnkPanes2[7]; + /* 0x88B0 */ nw4r::lyt::Pane *mpDungeonPanes[7]; + /* 0x88CC */ nw4r::lyt::Pane *mpDungeonPics[7]; /* 0x88E8 */ nw4r::lyt::Pane *mpPaneBgAll01; /* 0x88EC */ nw4r::lyt::Pane *mpPaneBgAll02; @@ -682,7 +699,7 @@ private: /* 0x8C60 */ s32 mMaxBeaconCount; /* 0x8C64 */ s32 field_0x8C64; /* 0x8C68 */ s32 field_0x8C68; - /* 0x8C6C */ s32 field_0x8C6C; + /* 0x8C6C */ s32 mAreaGroup; /* 0x8C70 */ u32 field_0x8C70; /* 0x8C74 */ u8 _0x8C74[0x8C88 - 0x8C74]; @@ -695,7 +712,7 @@ private: /* 0x8C93 */ u8 field_0x8C93; /* 0x8C94 */ s32 field_0x8C94; /* 0x8C98 */ UNKWORD field_0x8C98; - /* 0x8C9C */ s32 mProvince; + /* 0x8C9C */ s32 mSurfaceProvince; /* 0x8CA0 */ u8 _0x8CA0[0x8CA4 - 0x8CA0]; @@ -730,7 +747,7 @@ private: /* 0x8D48 */ mAng field_0x8D48; /* 0x8D4C */ f32 field_0x8D4C; /* 0x8D50 */ f32 field_0x8D50; - /* 0x8D54 */ u8 _0x8D54[0x8D58 - 0x8D54]; + /* 0x8D54 */ s32 field_0x8D54; /* 0x8D58 */ s32 field_0x8D58; /* 0x8D5C */ UNKWORD field_0x8D5C; /* 0x8D60 */ s32 field_0x8D60; @@ -738,8 +755,8 @@ private: /* 0x8D68 */ mAng field_0x8D68; /* 0x8D6A */ u8 field_0x8D6A; // set at 0x8009e2d4 /* 0x8D6B */ u8 field_0x8D6B; - /* 0x8D6C */ UNKWORD field_0x8D6C; - /* 0x8D70 */ UNKWORD field_0x8D70; + /* 0x8D6C */ nw4r::lyt::Pane *mpRegionPane1; + /* 0x8D70 */ nw4r::lyt::Pane *mpRegionPane2; /* 0x8D74 */ nw4r::lyt::Pane *mpZoomInOutPane; /* 0x8D78 */ f32 field_0x8D78; /* 0x8D7C */ f32 field_0x8D7C; @@ -821,9 +838,11 @@ public: } const dMapSaveObjDefinition *getSaveObjDefinition(s32 statueIdx) const { - return mMapMain.getSaveObjDefinition(mMapMain.mProvince, statueIdx); + return mMapMain.getSaveObjDefinition(mMapMain.mSurfaceProvince, statueIdx); } + void fn_80143A30(); + private: /* 0x0004 */ d2d::ResAccIf_c mResAcc; /* 0x0374 */ dLytMapMain_c mMapMain; diff --git a/include/d/lyt/d_lyt_map_global.h b/include/d/lyt/d_lyt_map_global.h index 63a464f7..ba74cf78 100644 --- a/include/d/lyt/d_lyt_map_global.h +++ b/include/d/lyt/d_lyt_map_global.h @@ -88,6 +88,10 @@ public: return mAlpha; } + void setAlpha(u8 alpha) { + mAlpha = alpha; + } + s32 getCurrentMapMode() const { return mCurrentMapMode; } |
