summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTakaRikka <38417346+TakaRikka@users.noreply.github.com>2025-04-23 00:08:13 -0700
committerGitHub <noreply@github.com>2025-04-23 10:08:13 +0300
commit556bfc958c7448656abacda51d710f59ab1c424a (patch)
tree1892da46bdba38453f6428ed2851e04a96ec90e0 /include
parentd3bf501777536ade7d6cfac2744a5fd28089812d (diff)
d_menu_dmap_map equivalent / update dtk-template (#2409)
* d_menu_dmap_map equivalent * update dtk-template
Diffstat (limited to 'include')
-rw-r--r--include/d/d_map_path_dmap.h11
-rw-r--r--include/d/d_menu_dmap.h31
-rw-r--r--include/d/d_menu_dmap_map.h135
3 files changed, 146 insertions, 31 deletions
diff --git a/include/d/d_map_path_dmap.h b/include/d/d_map_path_dmap.h
index d7fc6edf93..4b9c5b1407 100644
--- a/include/d/d_map_path_dmap.h
+++ b/include/d/d_map_path_dmap.h
@@ -17,6 +17,7 @@ public:
/* 8003FB70 */ static void create();
/* 8003FBD0 */ static void reset();
/* 8003FC70 */ static void remove();
+
static dDrawPath_c::room_class* getRoomPointer(int layerNo, int roomNo) {
return mLayerList->mRooms[layerNo][roomNo];
}
@@ -26,6 +27,12 @@ public:
static f32 getMaxX() { return mMaxX; }
static f32 getMaxZ() { return mMaxZ; }
+ static f32 getSizeX() { return mAllSizeX; }
+ static f32 getSizeZ() { return mAllSizeZ; }
+
+ static f32 getCenterX() { return mAllCenterX; }
+ static f32 getCenterZ() { return mAllCenterZ; }
+
static dDrawPath_c::layer_data* mLayerList; // this doesn't seem right, but can't figure it out atm
static f32 mMinX;
static f32 mMaxX;
@@ -76,6 +83,10 @@ public:
return floor_no;
}
+ static u8 getNowStayFloorNoDecisionFlg() {
+ return mNowStayFloorNoDecisionFlg;
+ }
+
static void setNextRoomNoForMapPat0(int i_roomNo) { mNextRoomNo = i_roomNo; }
static int getNextRoomNoForMapPat0() { return mNextRoomNo; }
diff --git a/include/d/d_menu_dmap.h b/include/d/d_menu_dmap.h
index 8cb7a265ca..405daae162 100644
--- a/include/d/d_menu_dmap.h
+++ b/include/d/d_menu_dmap.h
@@ -3,8 +3,8 @@
#include "d/d_select_cursor.h"
#include "d/d_msg_flow.h"
-#include "d/d_menu_dmap_map.h"
#include "d/d_menu_map_common.h"
+#include "d/d_map_path_dmap.h"
#include "dolphin/types.h"
class CPaneMgr;
@@ -20,10 +20,37 @@ class dMsgString_c;
class dMeterHaihai_c;
class dMenu_ItemExplain_c;
class J2DPictureEx;
+struct dMenu_DmapMapCtrl_c;
-struct renderingDmap_c {
+class renderingDmap_c : public renderingPlusDoor_c {
+public:
/* 801C0380 */ virtual ~renderingDmap_c() {}
/* 801C051C */ renderingDmap_c();
+
+ /* 801C0C48 */ virtual const GXColor* getColor(int);
+ /* 801C0C10 */ virtual int getLineWidth(int);
+ /* 801C25E4 */ virtual void beforeDrawPath();
+ /* 801C0CB8 */ virtual void afterDrawPath();
+ /* 801C084C */ virtual bool hasMap() const;
+ /* 801C2614 */ virtual bool isRendAllRoom() const;
+ /* 801C261C */ virtual bool isRendDoor() const;
+ /* 801C2624 */ virtual bool isCheckFloor() const;
+ /* 801C086C */ virtual bool isDrawIconSingle2(dTres_c::data_s const*, bool, bool, int) const;
+ /* 801C262C */ virtual bool isRendRestart() const;
+ /* 801C2634 */ virtual bool isRendCursor() const;
+ /* 801C263C */ virtual bool isRendIcon() const;
+ /* 801C0B40 */ virtual f32 getPlayerCursorSize();
+ /* 801C25E8 */ virtual f32 getRestartCursorSize();
+
+ /* 801C0B48 */ int getLineWidthZoomBig(int);
+ /* 801C0BAC */ int getLineWidthZoomSmall(int);
+
+ void entry(f32 param_0, f32 param_1, f32 param_2, s8 param_3, s8 param_4, f32 param_5) {
+ field_0x34 = param_5;
+ renderingDAmap_c::entry(param_0, param_1, param_2, param_3, param_4);
+ }
+
+ /* 0x34 */ f32 field_0x34;
};
struct dMenu_DmapBg_c : public dDlst_base_c, public dMenuMapCommon_c {
diff --git a/include/d/d_menu_dmap_map.h b/include/d/d_menu_dmap_map.h
index b04cf17bf9..95ee5b9c86 100644
--- a/include/d/d_menu_dmap_map.h
+++ b/include/d/d_menu_dmap_map.h
@@ -1,15 +1,41 @@
#ifndef D_MENU_D_MENU_DMAP_MAP_H
#define D_MENU_D_MENU_DMAP_MAP_H
-#include "dolphin/types.h"
+#include "d/d_menu_dmap.h"
+#include <cmath.h>
+
+class dMenu_DmapMap_c {
+public:
+ /* 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]; }
+
+ /* 0x04 */ renderingDmap_c mRend[2];
+ /* 0x74 */ ResTIMG* mResTIMG[2];
+ /* 0x7C */ u8* mMapImage_p[2];
+ /* 0x84 */ int field_0x84;
+};
+
+class dMenu_StageMapCtrl_c : public dMenu_DmapMap_c {
+public:
+ 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 void draw();
-struct dMenu_StageMapCtrl_c {
- /* 801C042C */ virtual ~dMenu_StageMapCtrl_c() {}
/* 801C0EE0 */ f32 getMapBlendPer() const;
- /* 801C0F24 */ void getPixelStageSizeX() const;
- /* 801C0F3C */ void getPixelStageSizeZ() const;
- /* 801C0F54 */ void getPixelCenterX() const;
- /* 801C0F74 */ void getPixelCenterZ() const;
+ /* 801C0F24 */ f32 getPixelStageSizeX() const;
+ /* 801C0F3C */ f32 getPixelStageSizeZ() const;
+ /* 801C0F54 */ f32 getPixelCenterX() const;
+ /* 801C0F74 */ f32 getPixelCenterZ() const;
/* 801C0F94 */ void initGetTreasureList(u8, s8);
/* 801C0FF8 */ bool getTreasureList(f32*, f32*, s8*, u8*, s8*);
/* 801C1128 */ void cnvPosTo2Dpos(f32, f32, f32*, f32*) const;
@@ -32,40 +58,91 @@ struct dMenu_StageMapCtrl_c {
/* 801C2198 */ void zoomOut_init_proc();
/* 801C21AC */ void zoomOut_proc();
/* 801C2234 */ void move();
- /* 801C22F8 */ void getPlayerStayFloorNo() const;
+ /* 801C22F8 */ s8 getPlayerStayFloorNo() const;
/* 801C231C */ void _create(u16, u16, u16, u16, void*);
/* 801C235C */ void _create(u16, u16, u16, u16, s8, void*);
/* 801C2518 */ void _delete();
- /* 801C2538 */ void isEnableZoomIn();
- /* 801C2578 */ void isEnableZoomOut();
+ /* 801C2538 */ bool isEnableZoomIn();
+ /* 801C2578 */ bool isEnableZoomOut();
/* 801C2588 */ void setPlusZoomCenterX(f32);
/* 801C2590 */ void setPlusZoomCenterZ(f32);
+ u8 getDisableZoomMoveFlgX() const { return field_0xf8; }
+ u8 getDisableZoomMoveFlgZ() const { return field_0xf9; }
+
+ f32 makeStayFloorBlendPer(int param_0, f32 param_1) {
+ return param_0 + param_1;
+ }
+
+ int getFloorNo(f32 param_0) const {
+ return std::ceil(param_0);
+ }
+
+ f32 getBlendPer(f32 param_0) const {
+ return std::fmod(param_0, 1.0f);
+ }
+
static f32 m_zoomCenterMinX;
static f32 m_zoomCenterMaxX;
static f32 m_zoomCenterMinZ;
- static f32 m_zoomCenterMaxZ[1 + 1 /* padding */];
-};
+ static f32 m_zoomCenterMaxZ;
-struct dMenu_DmapMapCtrl_c : public dMenu_StageMapCtrl_c {
- /* 801BD144 */ virtual ~dMenu_DmapMapCtrl_c() {}
- /* 801C18C0 */ void getZoomMinMaxCheck(f32*, f32*, f32*, f32*, bool*, bool*);
- /* 801C1B14 */ void calcZoomCenter(f32*, f32*);
- /* 801C1BA4 */ void getZoomCmPerPixel();
- /* 801C2028 */ void isEnableZoomMove() const;
- /* 801C22A8 */ void draw();
- /* 801C2598 */ void getInitWholeMapScale(f32*, f32, f32, f32, f32);
- /* 801C25C0 */ void getInitDispCenter(f32*, f32*);
+ /* 0x88 */ u8 field_0x88[0x8C - 0x88];
+ /* 0x8C */ dTres_c::typeGroupData_c* field_0x8c;
+ /* 0x90 */ f32 field_0x90;
+ /* 0x94 */ f32 field_0x94;
+ /* 0x98 */ f32 field_0x98;
+ /* 0x9C */ f32 field_0x9c;
+ /* 0xA0 */ f32 field_0xa0;
+ /* 0xA4 */ f32 field_0xa4;
+ /* 0xA8 */ f32 field_0xa8;
+ /* 0xAC */ f32 field_0xac;
+ /* 0xB0 */ f32 field_0xb0;
+ /* 0xB4 */ f32 field_0xb4;
+ /* 0xB8 */ f32 field_0xb8;
+ /* 0xBC */ f32 field_0xbc;
+ /* 0xC0 */ f32 field_0xc0;
+ /* 0xC4 */ f32 field_0xc4;
+ /* 0xC8 */ f32 field_0xc8;
+ /* 0xCC */ f32 field_0xcc;
+ /* 0xD0 */ f32 field_0xd0;
+ /* 0xD4 */ f32 field_0xd4;
+ /* 0xD8 */ f32 field_0xd8;
+ /* 0xDC */ f32 field_0xdc;
+ /* 0xE0 */ f32 field_0xe0;
+ /* 0xE4 */ u16 field_0xe4;
+ /* 0xE6 */ s8 field_0xe6;
+ /* 0xE7 */ s8 field_0xe7;
+ /* 0xE8 */ s8 field_0xe8;
+ /* 0xE9 */ u8 field_0xe9;
+ /* 0xEA */ s8 field_0xea;
+ /* 0xEB */ s8 field_0xeb;
+ /* 0xEC */ s8 field_0xec;
+ /* 0xED */ s8 field_0xed;
+ /* 0xEE */ s8 field_0xee;
+ /* 0xEF */ u8 field_0xef;
+ /* 0xF0 */ u8 field_0xf0;
+ /* 0xF1 */ u8 field_0xf1;
+ /* 0xF2 */ u8 field_0xf2;
+ /* 0xF3 */ u8 field_0xf3;
+ /* 0xF4 */ s8 field_0xf4;
+ /* 0xF5 */ u8 field_0xf5;
+ /* 0xF6 */ u8 field_0xf6;
+ /* 0xF7 */ s8 field_0xf7;
+ /* 0xF8 */ bool field_0xf8;
+ /* 0xF9 */ bool field_0xf9;
};
-struct dMenu_DmapMap_c {
- /* 801C04AC */ ~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);
+class dMenu_DmapMapCtrl_c : public dMenu_StageMapCtrl_c {
+public:
+ /* 801BD144 */ virtual ~dMenu_DmapMapCtrl_c() {}
+ /* 801C2028 */ virtual bool isEnableZoomMove() const;
+ /* 801C1B14 */ virtual void calcZoomCenter(f32*, f32*);
+ /* 801C2598 */ virtual void getInitWholeMapScale(f32*, f32, f32, f32, f32);
+ /* 801C25C0 */ virtual void getInitDispCenter(f32*, f32*);
+ /* 801C18C0 */ virtual void getZoomMinMaxCheck(f32*, f32*, f32*, f32*, bool*, bool*);
+ /* 801C1BA4 */ virtual f32 getZoomCmPerPixel();
+ /* 801C22A8 */ virtual void draw();
};
-
-
#endif /* D_MENU_D_MENU_DMAP_MAP_H */