summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-10-17 21:24:27 +0200
committerrobojumper <robojumper@gmail.com>2025-10-17 21:24:27 +0200
commitec6979b2113ec0b028110e198cc8bdbda719d4de (patch)
treeeda5daac7d92505fadce937a50407aa05f846c8b /include
parent126e026babdebf58cf291211b65e81f4056360b7 (diff)
More
Diffstat (limited to 'include')
-rw-r--r--include/d/d_camera.h12
-rw-r--r--include/d/d_message.h18
-rw-r--r--include/d/d_stage.h6
-rw-r--r--include/d/flag/storyflag_map.h2
-rw-r--r--include/d/lyt/d_lyt_map.h121
-rw-r--r--include/d/lyt/d_lyt_map_global.h14
-rw-r--r--include/d/lyt/d_lyt_map_markers.h8
-rw-r--r--include/toBeSorted/d_beacon.h3
-rw-r--r--include/toBeSorted/event_manager_util.h10
9 files changed, 119 insertions, 75 deletions
diff --git a/include/d/d_camera.h b/include/d/d_camera.h
index 5df35c1d..ef2cf73d 100644
--- a/include/d/d_camera.h
+++ b/include/d/d_camera.h
@@ -8,7 +8,9 @@
extern "C" bool fn_80081FE0(void *, const char *);
extern "C" bool fn_800918E0(void *, s32, s16);
extern "C" void fn_80080960(void *, s32, s32, s8, s32);
+extern "C" void fn_80093340(void *);
extern "C" void fn_80093360(void *);
+extern "C" void fn_80093380(void *);
class dCamera_c : public dBase_c {
public:
@@ -31,10 +33,18 @@ public:
return fn_800918E0(field_0xDA0, a1, a2);
}
+ void doFn_80093340() {
+ fn_80093340(field_0xDA4);
+ }
+
void doFn_80093360() {
fn_80093360(field_0xDA4);
}
+ void doFn_80093380() {
+ fn_80093380(field_0xDA4);
+ }
+
void setScreenShakeIntensity(f32 val) {
mScreenShakeIntensity = val;
}
@@ -47,6 +57,8 @@ public:
f32 getUnderwaterDepth() const;
void fn_8019E430();
+ void fn_8019E410();
+ mAng fn_8019E3B0() const;
private:
/* 0x068 */ u8 _0x068[0x6C - 0x068];
diff --git a/include/d/d_message.h b/include/d/d_message.h
index b832faad..a0729e2c 100644
--- a/include/d/d_message.h
+++ b/include/d/d_message.h
@@ -86,9 +86,9 @@ protected:
EVENT_SET_TEMPFLAG = 28,
EVENT_UNSET_TEMPFLAG = 29,
- EVENT_LIGHT_PILLAR_30 = 30,
+ EVENT_START_MAP_EVENT = 30,
- EVENT_LIGHT_PILLAR_34 = 34,
+ EVENT_END_MAP_EVENT = 34,
EVENT_SET_STORYFLAG_217 = 37,
EVENT_DEMO_METER_ITEM_SELECT = 38,
@@ -227,10 +227,6 @@ public:
void init();
void reset();
- bool getField_0x328() const {
- return field_0x328;
- }
-
bool getField_0x329() const {
return field_0x329;
}
@@ -243,8 +239,12 @@ public:
field_0x2FC = val;
}
- void setField_0x328(u8 val) {
- field_0x328 = val;
+ bool getInMapEvent() const {
+ return mInMapEvent;
+ }
+
+ void setInMapEvent(bool val) {
+ mInMapEvent = val;
}
s32 getField_0x32C() const {
@@ -362,7 +362,7 @@ private:
/* 0x300 */ u32 field_0x300[10];
- /* 0x328 */ bool field_0x328;
+ /* 0x328 */ bool mInMapEvent;
/* 0x329 */ bool field_0x329;
/* 0x32A */ bool field_0x32A;
diff --git a/include/d/d_stage.h b/include/d/d_stage.h
index 7744ae15..b0de4c98 100644
--- a/include/d/d_stage.h
+++ b/include/d/d_stage.h
@@ -67,13 +67,17 @@ public:
/* 0x1E9 */ u8 field_0x1E9;
/* 0x1EA */ s8 field_0x1EA;
/* 0x1EB */ u8 field_0x1EB;
- /* 0x1EC */ u8 field_0x1EC;
+ /* 0x1EC */ s8 field_0x1EC;
/* 0x1ED */ u8 field_0x1ED;
/* 0x1EE */ u8 field_0x1EE;
/* 0x1EF */ u8 field_0x1EF;
/* 0x1F0 */ u8 field_0x1F0;
public:
+ s8 getField_0x1EC() const {
+ return field_0x1EC;
+ }
+
u8 getField_0x1EE() const {
return field_0x1EE;
}
diff --git a/include/d/flag/storyflag_map.h b/include/d/flag/storyflag_map.h
index 56acd19d..b7d58a31 100644
--- a/include/d/flag/storyflag_map.h
+++ b/include/d/flag/storyflag_map.h
@@ -667,7 +667,7 @@ enum StoryFlags_e {
/** [Meeting Impa cutscene]
* Story Flag #130 (0x0082) - JP 805ACD64 0x01 / US 805A9AE4 0x01
*/
- STORYFLAG_130,
+ STORYFLAG_IMPA_MET,
/** [Imp 1 defeated (Skyloft layers 4&5)]
* Story Flag #131 (0x0083) - JP 805ACD64 0x02 / US 805A9AE4 0x02
diff --git a/include/d/lyt/d_lyt_map.h b/include/d/lyt/d_lyt_map.h
index 103d7191..f3c938ff 100644
--- a/include/d/lyt/d_lyt_map.h
+++ b/include/d/lyt/d_lyt_map.h
@@ -41,7 +41,7 @@ struct dMapSavedDataEntry {
/* 0x00 */ s32 mapMode;
/* 0x04 */ bool mapUpDirection;
/* 0x05 */ bool mapUpDirectionAfterZoomToDetail;
- /* 0x06 */ u8 field_0x06;
+ /* 0x06 */ bool isValid;
};
struct dMapSavedData {
@@ -537,10 +537,14 @@ public:
void remove();
void execute();
- bool isNotInvisible() const;
- bool isOpenMaybe() const;
- bool fn_80139EA0() const;
- void lightPillarRelated(s32, s32, s32);
+ bool checkClose() const;
+
+ bool isOpen() const;
+ bool canOpen() const;
+ bool isVisible() const;
+ void queueMapEvent(s32 mapEvent, s32 surfaceProvince, s32 c);
+ void startMapEvent(s32 mapEvent, s32 surfaceProvince, s32 c);
+ bool isVisibleNoIntro() const;
const dMapSaveObjDefinition *getSaveObjDefinition(s32 province, s32 statueIdx) const;
@@ -585,6 +589,23 @@ public:
STATE_FUNC_DECLARE(dLytMapMain_c, EventSaveObjConfirmMsgWindow);
STATE_FUNC_DECLARE(dLytMapMain_c, EventSaveObjDecide);
+ enum MapEvent_e {
+ MAP_EVENT_NONE = 0,
+ MAP_EVENT_1 = 1,
+ // ???
+ MAP_EVENT_SW_BANK_SMALL = 2,
+ MAP_EVENT_MAP_INTRO = 3,
+ MAP_EVENT_DUNGEON_MAP_GET = 4,
+ MAP_EVENT_FIELD_MAP_CHANGE_5 = 5,
+ MAP_EVENT_FOREST_MAP_CHANGE = 6,
+ MAP_EVENT_SIGNAL_ADD = 7,
+ MAP_EVENT_FIELD_MAP_CHANGE_8 = 8,
+ MAP_EVENT_GODDESS_CUBE = 9,
+ /** arg1 = surface province */
+ MAP_EVENT_SAVE_OBJ = 10,
+ MAP_EVENT_11 = 11,
+ };
+
private:
// TODO - need to come up with better names for all of these enums and concepts
@@ -613,22 +634,6 @@ private:
ROOMTYPE_MAX = 6,
};
- enum MapEvent_e {
- MAP_EVENT_NONE = 0,
- MAP_EVENT_1 = 1,
- // ???
- MAP_EVENT_SW_BANK_SMALL = 2,
- MAP_EVENT_MAP_INTRO = 3,
- MAP_EVENT_DUNGEON_MAP_GET = 4,
- MAP_EVENT_FIELD_MAP_CHANGE_5 = 5,
- MAP_EVENT_FOREST_MAP_CHANGE = 6,
- MAP_EVENT_SIGNAL_ADD = 7,
- MAP_EVENT_FIELD_MAP_CHANGE_8 = 8,
- MAP_EVENT_GODDESS_CUBE = 9,
- MAP_EVENT_SAVE_OBJ = 10,
- MAP_EVENT_11 = 11,
- };
-
dLytMapGlobal_c *getGlobal();
void checkScroll();
bool needsNav(s32 mapMode) const;
@@ -638,7 +643,7 @@ private:
bool canChangeUpDirection(s32 mapMode, bool) const;
bool canCenterCursor(s32 mapMode) const;
bool canCenterCursor1(s32 mapMode) const;
- bool canPlaceBeacons(s32 mapMode) const;
+ bool canPlaceBeacons(s32 mapMode);
bool canChangeFloor(s32 mapMode) const;
bool isPointingAtMainMap() const;
@@ -654,12 +659,14 @@ private:
bool fn_80141530() const;
bool fn_80142D10(s32, bool, mAng &);
void fn_80143060(mVec3_c &, const mVec3_c &, const mVec3_c &, const mAng &);
- void fn_80140B90();
+ void forceOut();
void fn_80143300();
void fn_80143120(s32);
void fn_801431E0();
void fn_8013AD50();
void fn_80143360();
+ void fn_80142C80(s32);
+ bool isMapIntroDone() const;
bool shouldDrawFootprints() const;
void zoomIn();
@@ -671,12 +678,14 @@ private:
void setupFlags();
void setupStage();
+ void setupEvent(s32 event, s32 arg1, s32 arg2);
+ void close();
void loadTextboxes();
- void saveUnkMapData();
- void initUnkMapData();
- void loadUnkMapData();
+ void saveMapState();
+ void initMapState();
+ void loadMapState();
void checkCursorPointedAtMap();
@@ -690,14 +699,22 @@ private:
void setSaveObjPanePtrs();
void initSaveObjs();
+ u8 getRoomAlpha(s32 roomid) const;
+
static dMapSavedData sSavedMapData;
static const dMapSavedData sDefaultMapData;
- bool isSomeFieldEq0Or1Or7Or9Or11() const {
+ bool isMapEventEq0Or1Or7Or9Or11() const {
return mMapEvent == MAP_EVENT_NONE || mMapEvent == MAP_EVENT_1 || mMapEvent == MAP_EVENT_SIGNAL_ADD ||
mMapEvent == MAP_EVENT_GODDESS_CUBE || mMapEvent == MAP_EVENT_11;
}
+ bool isMapEventEq1Or7Or8Or9Or11() const {
+ return mMapEvent == MAP_EVENT_1 || mMapEvent == MAP_EVENT_SIGNAL_ADD ||
+ mMapEvent == MAP_EVENT_FIELD_MAP_CHANGE_8 || mMapEvent == MAP_EVENT_GODDESS_CUBE ||
+ mMapEvent == MAP_EVENT_11;
+ }
+
/* 0x0010 */ UI_STATE_MGR_DECLARE(dLytMapMain_c);
/* 0x004C */ dFlowMgrBase_c mFlowMgr;
/* 0x00A4 */ dFlow_c mFlow;
@@ -778,17 +795,15 @@ private:
/* 0x8C93 */ u8 field_0x8C93;
/* 0x8C94 */ s32 mMapEvent;
/* 0x8C98 */ s32 mNextMapEvent;
- /* 0x8C9C */ s32 mSurfaceProvince;
-
- /* 0x8CA0 */ u8 _0x8CA0[0x8CA4 - 0x8CA0];
+ /* 0x8C9C */ s32 mMapEventArg1;
+ /* 0x8CA0 */ s32 mMapEventArg2;
/* 0x8CA4 */ s32 mCurrentMapMode;
/* 0x8CA8 */ s32 mNextMapMode;
/* 0x8CAC */ u8 field_0x8CAC;
- /* 0x8CAD */ u8 field_0x8CAD;
-
- /* 0x8CAE */ u8 _0x8CAE[0x8CB0 - 0x8CAE];
+ /* 0x8CAD */ bool mDoCameraTransition;
+ /* 0x8CAE */ bool field_0x8CAE;
/* 0x8CB0 */ u32 mEventTimer;
/* 0x8CB4 */ UNKWORD field_0x8CB4;
@@ -813,14 +828,14 @@ private:
/* 0x8D48 */ mAng field_0x8D48;
/* 0x8D4C */ f32 field_0x8D4C;
/* 0x8D50 */ f32 field_0x8D50;
- /* 0x8D54 */ s32 field_0x8D54;
- /* 0x8D58 */ s32 field_0x8D58;
- /* 0x8D5C */ UNKWORD field_0x8D5C;
- /* 0x8D60 */ s32 field_0x8D60;
- /* 0x8D64 */ UNKWORD field_0x8D64;
+ /* 0x8D54 */ s32 mNumTitleLines;
+ /* 0x8D58 */ s32 mCurrentFloor;
+ /* 0x8D5C */ UNKWORD mNumFloors;
+ /* 0x8D60 */ s32 mBaseFloorOffset;
+ /* 0x8D64 */ s32 field_0x8D64;
/* 0x8D68 */ mAng field_0x8D68;
- /* 0x8D6A */ u8 field_0x8D6A; // set at 0x8009e2d4
- /* 0x8D6B */ u8 field_0x8D6B;
+ /* 0x8D6A */ bool mEventCanceled; // set at 0x8009e2d4
+ /* 0x8D6B */ bool mEventDone;
/* 0x8D6C */ nw4r::lyt::Pane *mpRegionPane1;
/* 0x8D70 */ nw4r::lyt::Pane *mpRegionPane2;
/* 0x8D74 */ nw4r::lyt::Pane *mpZoomInOutPane;
@@ -838,8 +853,8 @@ private:
/* 0x8DB8 */ s32 mDisplayedBeaconCount;
/* 0x8DBC */ bool mShowIslandNames;
/* 0x8DBD */ bool field_0x8DBD;
- /* 0x8DBE */ u8 field_0x8DBE;
- /* 0x8DBF */ u8 field_0x8DBF;
+ /* 0x8DBE */ u8 mMapChangeAlpha;
+ /* 0x8DBF */ bool mIsVisible;
/* 0x8DC0 */ UNKWORD field_0x8DC0;
/* 0x8DC4 */ UNKWORD field_0x8DC4;
/* 0x8DC8 */ dLytMapGlobal_c mGlobal;
@@ -876,37 +891,37 @@ public:
return sInstance;
}
- bool isNotInvisible() const {
- return mMapMain.isNotInvisible();
+ bool isVisible() const {
+ return mMapMain.isVisible();
}
- bool isOpenMaybe() const {
- return mMapMain.isOpenMaybe();
+ bool isOpen() const {
+ return mMapMain.isOpen();
}
- bool getFn_80139EA0() const {
- return mMapMain.fn_80139EA0();
+ bool isVisibleNoIntro() const {
+ return mMapMain.isVisibleNoIntro();
}
void build();
- bool isSomeMapFieldEq2Or4Or5Or6() const {
+ bool isMapEventEq2Or4Or5Or6() const {
return mMapMain.mMapEvent == dLytMapMain_c::MAP_EVENT_SW_BANK_SMALL ||
mMapMain.mMapEvent == dLytMapMain_c::MAP_EVENT_DUNGEON_MAP_GET ||
mMapMain.mMapEvent == dLytMapMain_c::MAP_EVENT_FIELD_MAP_CHANGE_5 ||
mMapMain.mMapEvent == dLytMapMain_c::MAP_EVENT_FOREST_MAP_CHANGE;
}
- bool isSomeMapFieldEq10() const {
+ bool isMapEventSaveObj() const {
return mMapMain.mMapEvent == dLytMapMain_c::MAP_EVENT_SAVE_OBJ;
}
- void lightPillarRelated(s32 p1, s32 p2, s32 p3) {
- mMapMain.lightPillarRelated(p1, p2, p3);
+ void queueMapEvent(s32 mapEvent, s32 arg1, s32 arg2) {
+ mMapMain.queueMapEvent(mapEvent, arg1, arg2);
}
const dMapSaveObjDefinition *getSaveObjDefinition(s32 statueIdx) const {
- return mMapMain.getSaveObjDefinition(mMapMain.mSurfaceProvince, statueIdx);
+ return mMapMain.getSaveObjDefinition(mMapMain.mMapEventArg1, statueIdx);
}
void fn_80143A30();
diff --git a/include/d/lyt/d_lyt_map_global.h b/include/d/lyt/d_lyt_map_global.h
index fddf7bcc..fb0b25bf 100644
--- a/include/d/lyt/d_lyt_map_global.h
+++ b/include/d/lyt/d_lyt_map_global.h
@@ -80,6 +80,10 @@ public:
return field_0x55;
}
+ void setField_0x55(u8 v) {
+ field_0x55 = v;
+ }
+
const mAng &getField_0x56() const {
return field_0x56;
}
@@ -164,8 +168,12 @@ public:
field_0x4F = v;
}
- UNKWORD getField_0x50() const {
- return field_0x50;
+ s32 getMapEvent() const {
+ return mMapEvent;
+ }
+
+ void setMapEvent(s32 v) {
+ mMapEvent = v;
}
u8 getField_0x54() const {
@@ -204,7 +212,7 @@ private:
/* 0x4D */ u8 field_0x4D;
/* 0x4E */ u8 mAlpha;
/* 0x4F */ u8 field_0x4F;
- /* 0x50 */ UNKWORD field_0x50;
+ /* 0x50 */ s32 mMapEvent;
/* 0x54 */ u8 field_0x54;
/* 0x55 */ u8 field_0x55;
/* 0x56 */ mAng field_0x56;
diff --git a/include/d/lyt/d_lyt_map_markers.h b/include/d/lyt/d_lyt_map_markers.h
index 35113431..948b2ac7 100644
--- a/include/d/lyt/d_lyt_map_markers.h
+++ b/include/d/lyt/d_lyt_map_markers.h
@@ -492,6 +492,10 @@ public:
return field_0x0704;
}
+ void setLinkRot(const mAng3_c &rot) {
+ mLinkRot = rot;
+ }
+
private:
void resetPopups();
void loadPopups();
@@ -501,9 +505,7 @@ private:
/* 0x06F0 */ bool mShowIslandNames;
/* 0x06F4 */ mVec2_c field_0x06F4;
-
- /* 0x06FC */ u8 _0x6FC[0x0702 - 0x06FC];
-
+ /* 0x06FC */ mAng3_c mLinkRot;
/* 0x0702 */ u8 field_0x0702;
/* 0x0702 */ u8 field_0x0703;
/* 0x0704 */ f32 field_0x0704;
diff --git a/include/toBeSorted/d_beacon.h b/include/toBeSorted/d_beacon.h
index 27efce6a..b963d98a 100644
--- a/include/toBeSorted/d_beacon.h
+++ b/include/toBeSorted/d_beacon.h
@@ -16,4 +16,7 @@ void setBeaconPosition(const mVec3_c *position, u32 beaconIndex);
*/
void setBeaconPositionChecked(const mVec3_c *position, u32 beaconIndex);
+/** Checks whether the current stage is ineligible for beacon placement */
+bool doesStageForbidBeaconPlacement();
+
#endif
diff --git a/include/toBeSorted/event_manager_util.h b/include/toBeSorted/event_manager_util.h
index 9d38951f..d2f4670b 100644
--- a/include/toBeSorted/event_manager_util.h
+++ b/include/toBeSorted/event_manager_util.h
@@ -32,15 +32,15 @@ inline bool EventManagerIsInMap() {
}
inline bool EventManagerIsMapOpen() {
- return EventManagerIsInMap() && dLytMap_c::GetInstance()->isOpenMaybe();
+ return EventManagerIsInMap() && dLytMap_c::GetInstance()->isOpen();
}
-inline bool EventManagerIsMapOpenAndMessage() {
- return EventManagerIsMapOpen() && !dMessage_c::getInstance()->getField_0x328();
+inline bool EventManagerIsMapOpenNormal() {
+ return EventManagerIsMapOpen() && !dMessage_c::getInstance()->getInMapEvent();
}
-inline bool EventManagerIsMapOpenAnd0x9008Eq10() {
- return EventManagerIsMapOpen() && dLytMap_c::GetInstance()->isSomeMapFieldEq10();
+inline bool EventManagerIsMapEventSaveObj() {
+ return EventManagerIsMapOpen() && dLytMap_c::GetInstance()->isMapEventSaveObj();
}
#endif