d_menu_dmap mostly done (#2456)

* d_menu_dmap mostly done

* d_npc_lib equivalent

* m_Do_printf matching
This commit is contained in:
TakaRikka
2025-05-25 13:29:53 -07:00
committed by GitHub
parent de30e871af
commit 0e35bbddb9
13 changed files with 2154 additions and 1375 deletions
+1
View File
@@ -47,6 +47,7 @@ public:
void setFirstWaitTime(s16 time) { mFirstWaitTime = time; }
s16 getYwaitTimer() { return mYwaitTimer; }
s16 getXwaitTimer() { return mXwaitTimer; }
/* 0x04 */ f32 mThreshold;
/* 0x08 */ f32 field_0x08;
+39 -25
View File
@@ -25,7 +25,7 @@ struct dMenu_DmapMapCtrl_c;
class renderingDmap_c : public renderingPlusDoor_c {
public:
/* 801C0380 */ virtual ~renderingDmap_c() {}
/* 801C051C */ renderingDmap_c();
/* 801C051C */ renderingDmap_c() {}
/* 801C0C48 */ virtual const GXColor* getColor(int);
/* 801C0C10 */ virtual int getLineWidth(int);
@@ -53,7 +53,8 @@ public:
/* 0x34 */ f32 field_0x34;
};
struct dMenu_DmapBg_c : public dDlst_base_c, public dMenuMapCommon_c {
class dMenu_DmapBg_c : public dDlst_base_c, public dMenuMapCommon_c {
public:
/* 801B7F20 */ dMenu_DmapBg_c(JKRExpHeap*, STControl*);
/* 801B8110 */ void mapScreenInit();
/* 801B884C */ void mapScreenAnime();
@@ -81,13 +82,21 @@ struct dMenu_DmapBg_c : public dDlst_base_c, public dMenuMapCommon_c {
/* 801BB464 */ void calcCursor();
/* 801BB468 */ void drawCursor();
f32 getMapWidth() { return field_0xda0; }
f32 getMapHeight() { return field_0xda4; }
J2DPicture* getMapPane() { return field_0xcc4; }
void setDPDFloorSelCurPos(s8 i_pos) { field_0xdd6 = i_pos; }
/* 0xC98 */ JKRExpHeap* field_0xc98;
f32 getMapWidth() { return mMapWidth; }
f32 getMapHeight() { return mMapHeight; }
J2DPicture* getMapPane() { return mMapPane; }
dMenu_ItemExplain_c* getItemExplainPtr() { return mpItemExplain; }
void setAllTrans(f32 param_0, f32 param_1) {
field_0xd94 = param_0;
field_0xd98 = param_1;
}
/* 0xC98 */ JKRExpHeap* mpHeap;
/* 0xC9C */ JKRExpHeap* mpTalkHeap;
/* 0xCA0 */ STControl* field_0xca0;
/* 0xCA0 */ STControl* mpStick;
/* 0xCA4 */ J2DScreen* mBaseScreen;
/* 0xCA8 */ J2DScreen* mMapScreen[2];
/* 0xCB0 */ int field_0xcb0;
@@ -95,7 +104,7 @@ struct dMenu_DmapBg_c : public dDlst_base_c, public dMenuMapCommon_c {
/* 0xCB8 */ J2DScreen* mDecorateScreen;
/* 0xCBC */ J2DScreen* mFloorScreen;
/* 0xCC0 */ dSelect_cursor_c* mpDrawCursor;
/* 0xCC4 */ J2DPicture* field_0xcc4;
/* 0xCC4 */ J2DPicture* mMapPane;
/* 0xCC8 */ dMsgString_c* mString;
/* 0xCCC */ CPaneMgrAlphaMorf* mpBaseRoot;
/* 0xCD0 */ CPaneMgrAlphaMorf* mpMapRoot[2];
@@ -113,14 +122,16 @@ struct dMenu_DmapBg_c : public dDlst_base_c, public dMenuMapCommon_c {
/* 0xD08 */ CPaneMgr* mpButtonAB[2];
/* 0xD10 */ CPaneMgr* mpButtonText[2];
/* 0xD18 */ dMenu_ItemExplain_c* mpItemExplain;
/* 0xD1C */ mDoDvdThd_mountArchive_c* field_0xd1c;
/* 0xD20 */ JKRArchive* field_0xd20;
/* 0xD1C */ mDoDvdThd_mountArchive_c* mpArchiveMount;
/* 0xD20 */ JKRArchive* mpArchive;
/* 0xD24 */ J2DPicture* mpBackTexture;
/* 0xD28 */ J2DAnmTextureSRTKey* field_0xd28[1];
/* 0xD2C */ u8 field_0xd2c[0xd30 - 0xd2c];
/* 0xD30 */ dMeterHaihai_c* mpMeterHaihai;
/* 0xD34 */ dMsgFlow_c field_0xd34;
/* 0xD80 */ u8 field_0xd80[0xc];
/* 0xD34 */ dMsgFlow_c mMsgFlow;
/* 0xD80 */ f32 field_0xd80;
/* 0xD84 */ f32 field_0xd84;
/* 0xD88 */ f32 field_0xd88;
/* 0xD8C */ u8 field_0xd8c;
/* 0xD8D */ u8 field_0xd8d;
/* 0xD8E */ u8 field_0xd8e;
@@ -132,8 +143,8 @@ struct dMenu_DmapBg_c : public dDlst_base_c, public dMenuMapCommon_c {
/* 0xD94 */ f32 field_0xd94;
/* 0xD98 */ f32 field_0xd98;
/* 0xD9C */ f32 field_0xd9c;
/* 0xDA0 */ f32 field_0xda0;
/* 0xDA4 */ f32 field_0xda4;
/* 0xDA0 */ f32 mMapWidth;
/* 0xDA4 */ f32 mMapHeight;
/* 0xDA8 */ f32 field_0xda8;
/* 0xDAC */ f32 field_0xdac;
/* 0xDB0 */ f32 field_0xdb0;
@@ -181,7 +192,7 @@ public:
/* 801BEAFC */ void itemInfo_init_proc();
/* 801BEB0C */ void itemInfo_proc();
/* 801BEB44 */ void itemSelect();
/* 801BEF28 */ void getNextItem(int);
/* 801BEF28 */ int getNextItem(int);
/* 801BEFCC */ void itemSelectAnmInit();
/* 801BF030 */ void itemSelectAnm();
/* 801BF180 */ void itemInfoOpenAnm();
@@ -189,7 +200,7 @@ public:
/* 801BF278 */ void itemInfoCloseAnm();
/* 801BF334 */ u8 getNextStatus();
/* 801BF410 */ bool isSync();
/* 801BF464 */ void isKeyCheck();
/* 801BF464 */ bool isKeyCheck();
/* 801BF4A4 */ void infoModeChange_init_proc();
/* 801BF528 */ void infoModeChange_proc();
/* 801BF688 */ void mapModeChange_init_proc();
@@ -200,7 +211,7 @@ public:
/* 801BF9E0 */ void mapMode_proc();
/* 801BFA84 */ void floorSelect_init_proc();
/* 801BFA88 */ void floorSelect_proc();
/* 801BFC78 */ void itemCarryCheck();
/* 801BFC78 */ int itemCarryCheck();
/* 801BFCAC */ void floorChange_init_proc();
/* 801BFD5C */ void floorChange_proc();
/* 801BFF84 */ void zoomWait_init_proc();
@@ -216,13 +227,16 @@ public:
u8 getZoomState() { return mZoomState; }
u16 getCMessasgeNum() { return mCMessageNum; }
s8 getBottomFloor() { return mBottomFloor; }
s8 getFloorAll() { return mFloorAll; }
s8 getFloorAll() { return (mFloorAll - mBottomFloor) + 1; }
s8 getFloorPos(s8 param_0) { return param_0 - mBottomFloor; }
u16 getCMessageNum() { return mCMessageNum; }
static dMenu_Dmap_c* myclass;
private:
/* 0x004 */ dMenu_DmapMapCtrl_c* mMapCtrl;
/* 0x008 */ dMenu_DmapBg_c* mpDrawBg[2];
/* 0x008 */ dMenu_DmapBg_c* mpDrawBg;
/* 0x00C */ u8 field_0xc[0x10 - 0xC];
/* 0x010 */ CPaneMgr* field_0x10;
/* 0x014 */ CPaneMgr* mSelFloor[8];
/* 0x034 */ CPaneMgr* mIconLinkPos[8];
@@ -233,8 +247,8 @@ private:
/* 0x094 */ CPaneMgr* field_0x94;
/* 0x098 */ CPaneMgr* field_0x98;
/* 0x09C */ u8 field_0x9c[0x44];
/* 0x0E0 */ mDoDvdThd_mountArchive_c* field_0xe0;
/* 0x0E4 */ JKRArchive* field_0xe4;
/* 0x0E0 */ mDoDvdThd_mountArchive_c* mpDresArchiveMount;
/* 0x0E4 */ JKRArchive* mpDresArchive;
/* 0x0E8 */ JKRExpHeap* field_0xe8;
/* 0x0EC */ JKRExpHeap* mDmapHeap;
/* 0x0F0 */ STControl* mSelStick;
@@ -260,7 +274,7 @@ private:
/* 0x16A */ u16 field_0x16a;
/* 0x16C */ s8 field_0x16c;
/* 0x16D */ s8 field_0x16d;
/* 0x16E */ u8 field_0x16e;
/* 0x16E */ s8 field_0x16e;
/* 0x16F */ u8 field_0x16f;
/* 0x170 */ s8 mFloorAll;
/* 0x171 */ s8 mBottomFloor;
@@ -271,8 +285,8 @@ private:
/* 0x178 */ u8 field_0x178;
/* 0x179 */ u8 field_0x179;
/* 0x17A */ u8 mInOutDir;
/* 0x17B */ u8 field_0x17b;
/* 0x17C */ u8 field_0x17c;
/* 0x17B */ u8 m_process;
/* 0x17C */ u8 m_itemSubProcess;
/* 0x17D */ u8 field_0x17d;
/* 0x17E */ u8 field_0x17e;
/* 0x17F */ u8 mZoomState;
@@ -281,7 +295,7 @@ private:
/* 0x182 */ u8 field_0x182;
/* 0x183 */ u8 field_0x183;
/* 0x184 */ bool field_0x184;
/* 0x185 */ u8 field_0x185;
/* 0x185 */ bool field_0x185;
};
#endif /* D_MENU_D_MENU_DMAP_H */
+76 -7
View File
@@ -6,13 +6,14 @@
class dMenu_DmapMap_c {
public:
/* 801C04AC */ virtual ~dMenu_DmapMap_c();
/* 801C04AC */ virtual ~dMenu_DmapMap_c() {}
/* 801C0CD8 */ void _create(u16, u16, u16, u16, void*);
/* 801C0D04 */ void _delete();
/* 801C0D70 */ void setTexture(u16, u16, u16, u16);
/* 801C0E4C */ void setPos(int, int, f32, f32, f32, bool, f32);
const renderingDmap_c* getRendPointer(int i_no) const { return &mRend[i_no]; }
ResTIMG* getResTIMGPointer(int i_no) const { return mResTIMG[i_no]; }
/* 0x04 */ renderingDmap_c mRend[2];
/* 0x74 */ ResTIMG* mResTIMG[2];
@@ -22,13 +23,57 @@ public:
class dMenu_StageMapCtrl_c : public dMenu_DmapMap_c {
public:
dMenu_StageMapCtrl_c() {
field_0x8c = NULL;
field_0x90 = 0.0f;
field_0x94 = 0.0f;
field_0x98 = 0.0f;
field_0x9c = 0.0f;
field_0xa0 = 0.0f;
field_0xa4 = 0.0f;
field_0xa8 = 0.0f;
field_0xac = 0.0f;
field_0xb0 = 0.0f;
field_0xb4 = 0.0f;
field_0xb8 = 0.0f;
field_0xbc = 0.0f;
field_0xc0 = 0.0f;
field_0xc4 = 0.0f;
field_0xc8 = 0.0f;
field_0xcc = 0.0f;
field_0xd0 = 0.0f;
field_0xd4 = 0.0f;
field_0xd8 = 0.0f;
field_0xe4 = 0;
field_0xe6 = 0;
field_0xe7 = 0;
field_0xe8 = 0;
field_0xe9 = 0;
field_0xea = 0;
field_0xeb = 0;
field_0xec = 0;
field_0xed = 0;
field_0xee = 0;
field_0xef = 0;
field_0xf0 = 0;
field_0xf1 = 0;
field_0xf2 = 0;
field_0xf3 = 0;
field_0xf4 = 0;
field_0xf5 = 0;
field_0xf6 = 0;
field_0xf7 = 0;
field_0xf8 = false;
field_0xf9 = false;
}
virtual ~dMenu_StageMapCtrl_c() {}
virtual bool isEnableZoomMove() const;
virtual void calcZoomCenter(f32*, f32*);
virtual void getInitWholeMapScale(f32*, f32, f32, f32, f32);
virtual void getInitDispCenter(f32*, f32*);
virtual void getZoomMinMaxCheck(f32*, f32*, f32*, f32*, bool*, bool*);
virtual f32 getZoomCmPerPixel();
virtual bool isEnableZoomMove() const = 0;
virtual void calcZoomCenter(f32*, f32*) = 0;
virtual void getInitWholeMapScale(f32*, f32, f32, f32, f32) = 0;
virtual void getInitDispCenter(f32*, f32*) = 0;
virtual void getZoomMinMaxCheck(f32*, f32*, f32*, f32*, bool*, bool*) = 0;
virtual f32 getZoomCmPerPixel() = 0;
virtual void draw();
/* 801C0EE0 */ f32 getMapBlendPer() const;
@@ -70,6 +115,25 @@ public:
u8 getDisableZoomMoveFlgX() const { return field_0xf8; }
u8 getDisableZoomMoveFlgZ() const { return field_0xf9; }
s8 getNowStayFloorNo() const { return field_0xe7; }
s8 getTopFloorNo() const { return field_0xed; }
s8 getBottomFloorNo() const { return field_0xee; }
s8 getDispFloorNo() const { return field_0xeb; }
s8 getDispFloor2No() const { return field_0xec; }
f32 getDispCenterX() const { return field_0x9c; }
f32 getDispCenterZ() const { return field_0xa0; }
f32 getStageMapSizeX() const { return dMpath_c::getSizeX(); }
f32 getStageMapSizeZ() const { return dMpath_c::getSizeZ(); }
f32 getZoomCenterMaxX() { return field_0xcc; }
f32 getZoomCenterMinX() { return field_0xc8; }
f32 getZoomCenterMaxZ() { return field_0xd4; }
f32 getZoomCenterMinZ() { return field_0xd0; }
f32 getPixelPerCm() const { return 1.0f / field_0xbc; }
f32 makeStayFloorBlendPer(int param_0, f32 param_1) {
return param_0 + param_1;
}
@@ -82,6 +146,11 @@ public:
return std::fmod(param_0, 1.0f);
}
bool isEndZoomIn() const { return field_0xf5 == 2; }
bool isEndZoomOut() const { return field_0xf5 == 0; }
ResTIMG* getResTIMGPointer(int i_no) const { return dMenu_DmapMap_c::getResTIMGPointer(i_no); }
static f32 m_zoomCenterMinX;
static f32 m_zoomCenterMaxX;
static f32 m_zoomCenterMinZ;
+52 -23
View File
@@ -7,7 +7,46 @@ class J2DPicture;
class JKRArchive;
class dSelect_cursor_c;
struct dMenuMapCommon_c {
enum dMenuMapIcon_e {
ICON_UNK_0_e,
ICON_UNK_1_e,
ICON_DUNGEON_WARP_e,
ICON_BOSS_GANON_e,
ICON_BOSS_e,
ICON_LIGHT_DROP_e,
ICON_LIGHT_BALL_e,
ICON_CANNON_BALL_e,
ICON_COPY_STATUE_e,
ICON_YETO_e,
ICON_YETA_e,
ICON_GOLD_WOLF_e,
ICON_MONKEY_e,
ICON_COACH_e,
ICON_KEY_e,
ICON_OOCCOO_e,
ICON_OOCCOO_JR_e,
ICON_LINK_e,
ICON_DESTINATION_e,
ICON_TREASURE_CHEST_e,
ICON_DUNGEON_ENTER_e,
ICON_LINK_ENTER_e,
ICON_LV8_WARP_e,
ICON_MAX_e,
};
class dMenuMapCommon_c {
public:
struct IconInfo_s {
/* 0x00 */ f32 pos_x;
/* 0x04 */ f32 pos_y;
/* 0x08 */ f32 scale;
/* 0x0C */ f32 rotation;
/* 0x10 */ f32 alpha_rate;
/* 0x14 */ u8 icon_no;
/* 0x15 */ u8 _15;
};
/* 801C2718 */ dMenuMapCommon_c();
/* 801C27B4 */ virtual ~dMenuMapCommon_c();
/* 801C28D8 */ void initiate(JKRArchive*);
@@ -18,8 +57,8 @@ struct dMenuMapCommon_c {
/* 801C4494 */ void setBlendRatio(u8, f32, f32);
/* 801C452C */ void blinkMove(s16);
/* 801C4600 */ void moveLightDropAnime();
/* 801C4738 */ float getIconSizeX(u8 index);
/* 801C4778 */ float getIconSizeY(u8 index);
/* 801C4738 */ f32 getIconSizeX(u8 index);
/* 801C4778 */ f32 getIconSizeY(u8 index);
/* 801C47C4 */ void debugIcon();
void setCenterPosX(f32 center_pos, u8 param_2) {
@@ -27,16 +66,6 @@ struct dMenuMapCommon_c {
_c90 = param_2;
}
struct data {
/* 0x00 */ float _0;
/* 0x04 */ float _4;
/* 0x08 */ float _8;
/* 0x0C */ float _C;
/* 0x10 */ float _10;
/* 0x14 */ u8 _14;
/* 0x15 */ u8 _15;
};
struct Stage_c {
// Incomplete class
@@ -73,21 +102,21 @@ struct dMenuMapCommon_c {
};
/* 0x004 */ J2DPicture* mPictures[23];
/* 0x060 */ J2DPicture* _60;
/* 0x060 */ J2DPicture* mLightDropPic;
/* 0x064 */ dSelect_cursor_c* mpDrawCursor;
/* 0x068 */ dSelect_cursor_c* mpPortalIcon;
/* 0x06C */ u32 _6c;
/* 0x070 */ data _70[128];
/* 0x070 */ IconInfo_s mIconInfo[128];
/* 0xC70 */ u16 mIconNum;
/* 0xC72 */ s16 _c72;
/* 0xC74 */ s16 _c74;
/* 0xC72 */ s16 mBlinkTimer;
/* 0xC74 */ s16 mLightDropFlashTimer;
/* 0xC76 */ u16 _c76;
/* 0xC78 */ float _c78;
/* 0xC7C */ float _c7c;
/* 0xC80 */ float _c80;
/* 0xC84 */ float _c84;
/* 0xC88 */ float _c88;
/* 0xC8C */ float mCenterPosX;
/* 0xC78 */ f32 mBlinkAlpha;
/* 0xC7C */ f32 _c7c;
/* 0xC80 */ f32 _c80;
/* 0xC84 */ f32 _c84;
/* 0xC88 */ f32 _c88;
/* 0xC8C */ f32 mCenterPosX;
/* 0xC90 */ u8 _c90;
};
+3 -3
View File
@@ -178,7 +178,7 @@ public:
mCollectCursorPosX = x;
mCollectCursorPosY = y;
}
void setMapDrugFlag(u8 flag) { mMapDrugFlag = flag; }
void setMapDrugFlag(bool flag) { mMapDrugFlag = flag; }
void offTempBit(int i_bit) { mTempBits &= ~(1 << i_bit); }
void onTempBit(int i_bit) { mTempBits |= (1 << i_bit); }
bool isTempBit(int bit) { return mTempBits & (1 << bit); }
@@ -276,7 +276,7 @@ public:
/* 0xE8 */ u8 mItemExplainWindowStatus;
/* 0xE9 */ char mSaveStageName[8];
/* 0xF1 */ bool mFloatingMessageWakuVisible;
/* 0xF2 */ u8 mMapDrugFlag;
/* 0xF2 */ bool mMapDrugFlag;
/* 0xF3 */ u8 unk243[5];
};
@@ -731,7 +731,7 @@ inline bool dMeter2Info_isShopTalkFlag() {
return g_meter2_info.isShopTalkFlag();
}
inline void dMeter2Info_setMapDrugFlag(u8 flag) {
inline void dMeter2Info_setMapDrugFlag(bool flag) {
g_meter2_info.setMapDrugFlag(flag);
}
+1 -1
View File
@@ -58,7 +58,7 @@ public:
/* 8009BE28 */ static void checkTreasureBox(dTres_c::data_s*);
/* 8009C168 */ static void onStatus(u8, int, int);
/* 8009C1F0 */ static void offStatus(u8, int, int);
/* 8009C27C */ static int getBossIconFloorNo(int*);
/* 8009C27C */ static bool getBossIconFloorNo(int*);
/* 8009C360 */ static typeGroupData_c* getFirstData(u8);
/* 8009C39C */ static typeGroupData_c* getNextData(dTres_c::typeGroupData_c*);
/* 8009C3B4 */ static typeGroupData_c* getNextData(dTres_c::typeGroupData_c const*);