summaryrefslogtreecommitdiff
path: root/include/d
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2026-08-23 22:47:08 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2026-08-23 22:47:08 -0400
commita4e1d2bd4bdf431027367d6067bf4e52bb09f5b9 (patch)
tree88d45d0b1e3fb9b3f0e2995794d5076123f4a458 /include/d
parent19bf9bdc7723790812a3493c340a8a3325a5e5b5 (diff)
fmap and fmap_sv: Fix several mixups
Add missing aramCmapDat_c class (runtime version of the separate aramCmapDatPat_t struct) to fix inline signature. Fix inlines and fields for dMenu_FmapSv_c being mixed up.
Diffstat (limited to 'include/d')
-rw-r--r--include/d/d_menu_fmap.h110
-rw-r--r--include/d/d_menu_fmap2.h9
-rw-r--r--include/d/d_menu_fmap_sv.h137
3 files changed, 147 insertions, 109 deletions
diff --git a/include/d/d_menu_fmap.h b/include/d/d_menu_fmap.h
index a89a17f6..0dc70e89 100644
--- a/include/d/d_menu_fmap.h
+++ b/include/d/d_menu_fmap.h
@@ -5,6 +5,7 @@
#include "d/d_drawlist.h"
#include "d/d_lib.h"
#include "d/d_menu_fmap_sv.h"
+// #include "d/d_menu_fmapSv.h"
#include "dolphin/types.h"
#include "JSystem/JParticle/JPAEmitter.h"
#include "SSystem/SComponent/c_xyz.h"
@@ -25,27 +26,6 @@ struct cursorTable_t {
/* 0x6 */ s8 down;
};
-struct aramCmapSalvagePnt_t {
- /* 0x0 */ s16 field_0x0;
- /* 0x2 */ s16 field_0x2;
- /* 0x4 */ s16 x;
- /* 0x6 */ s16 y;
-}; // Size: 0x8
-
-struct aramCmapDatPnt_t {
- /* 0x00 */ s8 gridNo;
- /* 0x01 */ s8 collectMapNo;
- /* 0x02 */ s8 cmapIdx;
- /* 0x03 */ s8 field_0x3;
- /* 0x04 */ s16 field_0x4;
- /* 0x06 */ aramCmapSalvagePnt_t salvagePnt[4];
-}; // Size: 0x26
-
-struct aramCmapDatPat_t {
- /* 0x00 */ u32 m_0x0;
- /* 0x04 */ aramCmapDatPnt_t* m_0x4;
-};
-
enum FmapMode {
FMAP_MODE_NORMAL = 0,
FMAP_MODE_WARP = 1,
@@ -77,90 +57,78 @@ public:
virtual ~dMenu_Fmap_c() {}
void draw() { _draw(); }
- u8 getCtActive() {
+ u8 getCtDispMode() {
JUT_ASSERT(467, fmapSv != NULL);
- return fmapSv->active;
+ return fmapSv->dispMode;
}
- void setCtActive(u8 val) {
+ void setCtDispMode(u8 val) {
JUT_ASSERT(472, fmapSv != NULL);
- fmapSv->active = val;
+ fmapSv->dispMode = val;
}
- s8 getCtCmapSelNo() {
+ s8 getCtFmapZoom() {
JUT_ASSERT(478, fmapSv != NULL);
- return fmapSv->cmapSelNo;
+ return fmapSv->fmapZoom;
}
- void setCtCmapSelNo(s8 val) {
+ void setCtFmapZoom(u8 val) {
JUT_ASSERT(483, fmapSv != NULL);
- fmapSv->cmapSelNo = val;
+ fmapSv->fmapZoom = val;
}
- s8 getCtCurWX() {
+ s8 getCtCurX() {
JUT_ASSERT(489, fmapSv != NULL);
- return fmapSv->curWX;
+ return fmapSv->curX;
}
- void setCtCurWX(s8 val) {
+ void setCtCurX(s8 val) {
JUT_ASSERT(494, fmapSv != NULL);
- fmapSv->curWX = val;
+ fmapSv->curX = val;
}
- s8 getCtCurWY() {
+ s8 getCtCurY() {
JUT_ASSERT(500, fmapSv != NULL);
- return fmapSv->curWY;
+ return fmapSv->curY;
}
- void setCtCurWY(s8 val) {
+ void setCtCurY(s8 val) {
JUT_ASSERT(505, fmapSv != NULL);
- fmapSv->curWY = val;
+ fmapSv->curY = val;
}
- s8 getCtCurHX() {
+ s8 getCtCurWX() {
JUT_ASSERT(511, fmapSv != NULL);
- return fmapSv->curHX;
+ return fmapSv->curWX;
}
- void setCtCurHX(s8 val) {
+ void setCtCurWX(s8 val) {
JUT_ASSERT(516, fmapSv != NULL);
- fmapSv->curHX = val;
+ fmapSv->curWX = val;
}
- s8 getCtCurHY() {
+ s8 getCtCurWY() {
JUT_ASSERT(522, fmapSv != NULL);
- return fmapSv->curHY;
+ return fmapSv->curWY;
}
- void setCtCurHY(s8 val) {
+ void setCtCurWY(s8 val) {
JUT_ASSERT(527, fmapSv != NULL);
- fmapSv->curHY = val;
- }
- s8 getCtCurX() {
- JUT_ASSERT(533, fmapSv != NULL);
- return fmapSv->curX;
- }
- void setCtCurX(s8 val) {
- JUT_ASSERT(538, fmapSv != NULL);
- fmapSv->curX = val;
- }
- s8 getCtCurY() {
- JUT_ASSERT(543, fmapSv != NULL);
- return fmapSv->curY;
- }
- void setCtCurY(s8 val) {
- JUT_ASSERT(548, fmapSv != NULL);
- fmapSv->curY = val;
+ fmapSv->curWY = val;
}
s8 getCtZoomGridX() {
- JUT_ASSERT(553, fmapSv != NULL);
+ JUT_ASSERT(533, fmapSv != NULL);
return fmapSv->zoomGridX;
}
void setCtZoomGridX(s8 val) {
- JUT_ASSERT(559, fmapSv != NULL);
+ JUT_ASSERT(538, fmapSv != NULL);
fmapSv->zoomGridX = val;
}
s8 getCtZoomGridY() {
- JUT_ASSERT(563, fmapSv != NULL);
+ JUT_ASSERT(543, fmapSv != NULL);
return fmapSv->zoomGridY;
}
void setCtZoomGridY(s8 val) {
- JUT_ASSERT(569, fmapSv != NULL);
+ JUT_ASSERT(548, fmapSv != NULL);
fmapSv->zoomGridY = val;
}
- void getCtDispMode() {}
- void setCtDispMode(u8) {}
- void getCtFmapZoom() {}
- void setCtFmapZoom(u8) {}
+ void setCtCurHX(s8 val) {
+ JUT_ASSERT(559, fmapSv != NULL);
+ fmapSv->curHX = val;
+ }
+ void setCtCurHY(s8 val) {
+ JUT_ASSERT(569, fmapSv != NULL);
+ fmapSv->curHY = val;
+ }
void lineInter0to1(f32, f32, f32) {}
void lineInter0to1ForU8(u8, u8, f32) {}
void setFont(JUTFont* font, JUTFont* rfont) {
@@ -324,7 +292,7 @@ public:
/* 0x0024 */ dMenu_Fmap2_c mFmap2;
/* 0x2874 */ u8 padding_0x2874[0x2878 - 0x2874];
/* 0x2878 */ dMenu_FmapSv_c* fmapSv;
- /* 0x287C */ aramCmapDatPat_t mCmapDatPnt;
+ /* 0x287C */ aramCmapDat_c mCmapDatPnt;
/* 0x2884 */ dDlst_2DOutFont_c* outFont;
/* 0x2888 */ dDlst_2DOutFont_c* outFont2;
/* 0x288C */ fopMsgM_pane_class mFddmPane;
@@ -488,6 +456,8 @@ public:
dMf_HIO_c();
virtual ~dMf_HIO_c() {}
+ void genMessage(JORMContext* ctx) { UNUSED(ctx); }
+
public:
/* 0x004 */ s8 mNo;
/* 0x005 */ u8 field_0x05;
diff --git a/include/d/d_menu_fmap2.h b/include/d/d_menu_fmap2.h
index b351bf06..27eeed46 100644
--- a/include/d/d_menu_fmap2.h
+++ b/include/d/d_menu_fmap2.h
@@ -9,10 +9,9 @@ struct fopMsgM_pane_class;
class J2DScreen;
struct ResTIMG;
class aramCmapDat_c;
+class aramCmapDatPnt_t;
class dMenu_FmapSv_c;
-struct aramCmapDatPat_t;
-
class dDlst_FMAP2GS_c : public dDlst_base_c {
public:
virtual ~dDlst_FMAP2GS_c() {}
@@ -39,7 +38,7 @@ public:
void getCtCurY() {}
void getCtDispMode() {}
void lineInter0to1ForU8(unsigned char, unsigned char, float) {}
- void setAramCmapDat(aramCmapDatPat_t* i_ptr) { mpFmapDatPnt = i_ptr; }
+ void setAramCmapDat(aramCmapDat_c* i_ptr) { mpFmapDatPnt = i_ptr; }
void setCtActive(unsigned char) {}
void setCtCmapSelNo(signed char) {}
void setCtCurHX(signed char) {}
@@ -146,7 +145,7 @@ public:
void calcFinCollectMap();
void getNowCmapFirstNum();
void getNowCmapNextNum(signed char, int);
- aramCmapDatPat_t* getCmapDatPnt4(int);
+ aramCmapDatPnt_t* getCmapDatPnt4(int);
void readPaneCmapTexture(const ResTIMG*, int);
void readFmapTexture(const char*);
int getButtonIconMode();
@@ -161,7 +160,7 @@ public:
/* 0x0004 */ u8 padding_0x4[0x10 - 0x4];
/* 0x0010 */ dMenu_FmapSv_c* fmapSv;
/* 0x0014 */ u8 padding_0x14[0x1C - 0x14];
- /* 0x001C */ aramCmapDatPat_t* mpFmapDatPnt;
+ /* 0x001C */ aramCmapDat_c* mpFmapDatPnt;
/* 0x0020 */ dDlst_FMAP2_c mDlst;
/* 0x0024 */ u8 padding_0x24[0x28 - 0x24];
/* 0x0028 */ dDlst_FMAP2GS_c mDlstGs;
diff --git a/include/d/d_menu_fmap_sv.h b/include/d/d_menu_fmap_sv.h
index dfffba20..3e51b1ea 100644
--- a/include/d/d_menu_fmap_sv.h
+++ b/include/d/d_menu_fmap_sv.h
@@ -1,31 +1,104 @@
-#ifndef D_MENU_FMAP_SV_H
-#define D_MENU_FMAP_SV_H
+#ifndef D_MENU_FMAPSV_H
+#define D_MENU_FMAPSV_H
-#include "dolphin/types.h"
+#include "JSystem/JUtility/JUTAssert.h"
+#include "global.h"
+
+struct aramCmapSalvagePnt_t {
+ /* 0x0 */ s16 field_0x0;
+ /* 0x2 */ s16 field_0x2;
+ /* 0x4 */ s16 x;
+ /* 0x6 */ s16 y;
+}; // Size: 0x8
+
+struct aramCmapDatPnt_t {
+ /* 0x00 */ s8 gridNo;
+ /* 0x01 */ s8 collectMapNo;
+ /* 0x02 */ s8 cmapNo;
+ /* 0x03 */ s8 mapType;
+ /* 0x04 */ s16 field_0x4;
+ /* 0x06 */ aramCmapSalvagePnt_t salvagePnt[4];
+}; // Size: 0x26
+STATIC_ASSERT(sizeof(aramCmapDatPnt_t) == 0x26);
+
+struct aramCmapDatPat_t {
+ /* 0x00 */ int num;
+ /* 0x04 */ aramCmapDatPnt_t pnt[];
+}; // Size: 0x4+
+
+class aramCmapDat_c {
+public:
+ void init(aramCmapDatPat_t* a_pat) {
+ if (a_pat != NULL) {
+ mNum = a_pat->num;
+ mpPnt = a_pat->pnt;
+ } else {
+ JUT_ASSERT(252, FALSE);
+ }
+ }
+ void getAramCmapDatValue() {}
+ void getCmapDatPnt(int) {}
+ aramCmapDatPnt_t* getCmapDatPnt3(int i_gridIdx) {
+ aramCmapDatPnt_t* pnt = mpPnt;
+ int i;
+ for (i = 0; i < mNum; i++) {
+ if (pnt->gridNo == i_gridIdx + 1) {
+ break;
+ }
+ pnt++;
+ }
+ if (i < mNum) {
+ return pnt;
+ }
+ return NULL;
+ }
+ aramCmapDatPnt_t* getCmapDatPnt4(int i_cmapIdx) {
+ aramCmapDatPnt_t* pnt = mpPnt;
+ int i;
+ for (i = 0; i < mNum; i++) {
+ if (pnt->cmapNo == i_cmapIdx + 1) {
+ break;
+ }
+ pnt++;
+ }
+ if (i < mNum) {
+ return pnt;
+ }
+ return NULL;
+ }
+
+private:
+ /* 0x00 */ int mNum;
+ /* 0x04 */ aramCmapDatPnt_t* mpPnt;
+}; // Size: 0x8
class dMenu_FmapSv_c {
public:
dMenu_FmapSv_c() {
- active = 0;
- cmapSelNo = 0;
+ dispMode = 0;
+ fmapZoom = 0;
+ zoomGridX = -10;
+ zoomGridY = -10;
curX = -10;
curY = -10;
curWX = -10;
curWY = -10;
+ active = 0;
+ cmapSelNo = -1;
curHX = -10;
curHY = -10;
- dispMode = 0;
- fmapZoom = -1;
- zoomGridX = -10;
- zoomGridY = -10;
}
~dMenu_FmapSv_c() {}
- s8 getActive() { return active; }
- void setActive(s8 val) { active = val; }
- s8 getCmapSelNo() { return cmapSelNo; }
- void setCmapSelNo(s8 val) { cmapSelNo = val; }
+ u8 getDispMode() { return dispMode; }
+ void setDispMode(u8 val) { dispMode = val; }
+ u8 getFmapZoom() { return fmapZoom; }
+ void setFmapZoom(u8 val) { fmapZoom = val; }
+ s8 getZoomGridX() { return zoomGridX; }
+ void setZoomGridX(s8 val) { zoomGridX = val; }
+ s8 getZoomGridY() { return zoomGridY; }
+ void setZoomGridY(s8 val) { zoomGridY = val; }
s8 getCurX() { return curX; }
void setCurX(s8 val) { curX = val; }
s8 getCurY() { return curY; }
@@ -34,32 +107,28 @@ public:
void setCurWX(s8 val) { curWX = val; }
s8 getCurWY() { return curWY; }
void setCurWY(s8 val) { curWY = val; }
+ u8 getActive() { return active; }
+ void setActive(u8 val) { active = val; }
+ u8 getCmapSelNo() { return cmapSelNo; }
+ void setCmapSelNo(s8 val) { cmapSelNo = val; }
s8 getCurHX() { return curHX; }
void setCurHX(s8 val) { curHX = val; }
s8 getCurHY() { return curHY; }
void setCurHY(s8 val) { curHY = val; }
- s8 getDispMode() { return dispMode; }
- void setDispMode(s8 val) { dispMode = val; }
- s8 getFmapZoom() { return fmapZoom; }
- void setFmapZoom(s8 val) { fmapZoom = val; }
- s8 getZoomGridX() { return zoomGridX; }
- void setZoomGridX(s8 val) { zoomGridX = val; }
- s8 getZoomGridY() { return zoomGridY; }
- void setZoomGridY(s8 val) { zoomGridY = val; }
public:
- /* 0x0 */ s8 active;
- /* 0x1 */ s8 cmapSelNo;
- /* 0x2 */ s8 curX;
- /* 0x3 */ s8 curY;
- /* 0x4 */ s8 curWX;
- /* 0x5 */ s8 curWY;
- /* 0x6 */ s8 curHX;
- /* 0x7 */ s8 curHY;
- /* 0x8 */ s8 dispMode;
- /* 0x9 */ s8 fmapZoom;
- /* 0xA */ s8 zoomGridX;
- /* 0xB */ s8 zoomGridY;
+ /* 0x0 */ u8 dispMode;
+ /* 0x1 */ u8 fmapZoom;
+ /* 0x2 */ s8 zoomGridX;
+ /* 0x3 */ s8 zoomGridY;
+ /* 0x4 */ s8 curX;
+ /* 0x5 */ s8 curY;
+ /* 0x6 */ s8 curWX;
+ /* 0x7 */ s8 curWY;
+ /* 0x8 */ u8 active;
+ /* 0x9 */ s8 cmapSelNo;
+ /* 0xA */ s8 curHX;
+ /* 0xB */ s8 curHY;
};
-#endif //D_MENU_FMAP_SV_H
+#endif /* D_MENU_FMAPSV_H */