mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-10 10:43:41 -04:00
d_menu_fmap and d_menu_fmap2D OK (#2202)
This commit is contained in:
+34
-2
@@ -3,6 +3,40 @@
|
||||
|
||||
#include "d/map/d_map_path_dmap.h"
|
||||
|
||||
struct dMap_prm_res_s {
|
||||
/* 0x000 */ dMpath_RGB5A3_palDt_s palette_data[51];
|
||||
/* 0x198 */ u8 field_0x198;
|
||||
/* 0x199 */ u8 field_0x199;
|
||||
/* 0x19A */ u8 field_0x19a;
|
||||
/* 0x19B */ u8 field_0x19b;
|
||||
/* 0x19C */ u8 field_0x19c;
|
||||
/* 0x19D */ u8 field_0x19d;
|
||||
/* 0x19E */ u8 field_0x19e;
|
||||
/* 0x19F */ u8 field_0x19f;
|
||||
/* 0x1A0 */ u8 field_0x1a0;
|
||||
/* 0x1A1 */ u8 field_0x1a1;
|
||||
/* 0x1A2 */ u8 field_0x1a2;
|
||||
/* 0x1A3 */ u8 field_0x1a3;
|
||||
/* 0x1A4 */ u8 field_0x1a4;
|
||||
/* 0x1A5 */ u8 field_0x1a5;
|
||||
/* 0x1A6 */ u8 field_0x1a6;
|
||||
/* 0x1A7 */ u8 field_0x1a7;
|
||||
/* 0x1A8 */ u8 field_0x1a8;
|
||||
/* 0x1A9 */ u8 field_0x1a9;
|
||||
/* 0x1AA */ s16 field_0x1aa;
|
||||
/* 0x1AC */ s16 field_0x1ac;
|
||||
/* 0x1AE */ s16 field_0x1ae;
|
||||
/* 0x1B0 */ s16 field_0x1b0;
|
||||
/* 0x1B2 */ s16 field_0x1b2;
|
||||
/* 0x1B4 */ s16 field_0x1b4;
|
||||
/* 0x1B6 */ s16 field_0x1b6;
|
||||
/* 0x1B8 */ f32 cursor_size;
|
||||
};
|
||||
|
||||
struct dMap_HIO_prm_res_dst_s {
|
||||
static dMap_prm_res_s* m_res;
|
||||
};
|
||||
|
||||
class renderingAmap_c : public renderingPlusDoorAndCursor_c {
|
||||
public:
|
||||
/* 800288C4 */ int getDispType() const;
|
||||
@@ -48,8 +82,6 @@ private:
|
||||
/* 0x3C */ s32 field_0x3c;
|
||||
}; // Size: 0x40
|
||||
|
||||
struct dMap_prm_res_s;
|
||||
|
||||
class dMap_c : public renderingAmap_c {
|
||||
public:
|
||||
/* 8002974C */ void copyPalette();
|
||||
|
||||
+26
-15
@@ -20,7 +20,7 @@ public:
|
||||
}; // Size: 0x8
|
||||
|
||||
struct group_class {
|
||||
/* 0x00 */ u8 field_0x0;
|
||||
/* 0x00 */ u8 mSwbit;
|
||||
/* 0x01 */ u8 field_0x1;
|
||||
/* 0x02 */ u8 mLineNum;
|
||||
/* 0x03 */ u8 field_0x3;
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
/* 8002AD3C */ virtual ~dDrawPath_c() {}
|
||||
/* 8002ABF0 */ virtual bool isDrawType(int) { return true; }
|
||||
virtual const GXColor* getColor(int) = 0;
|
||||
/* 8002AD84 */ virtual GXColor* getLineColor(int param_0, int) { return (GXColor*)getColor(param_0); }
|
||||
/* 8002AD84 */ virtual const GXColor* getLineColor(int param_0, int) { return (GXColor*)getColor(param_0); }
|
||||
virtual int getLineWidth(int) = 0;
|
||||
virtual bool isSwitch(dDrawPath_c::group_class const*) = 0;
|
||||
virtual bool isRenderingFloor(int) = 0;
|
||||
@@ -91,11 +91,11 @@ public:
|
||||
field_0x4 = NULL;
|
||||
field_0x8 = 0.0f;
|
||||
field_0xc = 0.0f;
|
||||
field_0x10 = 0.0f;
|
||||
field_0x14 = 0.0f;
|
||||
mPosX = 0.0f;
|
||||
mPosZ = 0.0f;
|
||||
mCmPerTexel = 0.0f;
|
||||
field_0x1c = 0;
|
||||
field_0x1e = 0;
|
||||
mTexWidth = 0;
|
||||
mTexHeight = 0;
|
||||
field_0x20 = 0;
|
||||
field_0x22 = 0;
|
||||
}
|
||||
@@ -108,25 +108,25 @@ public:
|
||||
/* 8002ABF8 */ virtual ~dRenderingFDAmap_c() {}
|
||||
/* 8003D188 */ virtual void preRenderingMap();
|
||||
/* 8003D320 */ virtual void postRenderingMap();
|
||||
virtual GXColor* getBackColor() const = 0;
|
||||
virtual const GXColor* getBackColor() const = 0;
|
||||
/* 8003D68C */ virtual const GXColor* getDecoLineColor(int, int);
|
||||
/* 8003D6B8 */ virtual s32 getDecorationLineWidth(int);
|
||||
|
||||
bool isDrawAreaCheck(const Vec& param_0) {
|
||||
return (param_0.x >= field_0x10 - field_0x8 * 2.0f &&
|
||||
param_0.x <= field_0x10 + field_0x8 * 2.0f) &&
|
||||
(param_0.z >= field_0x14 - field_0xc * 2.0f &&
|
||||
param_0.z <= field_0x14 + field_0xc * 2.0f);
|
||||
return (param_0.x >= mPosX - field_0x8 * 2.0f &&
|
||||
param_0.x <= mPosX + field_0x8 * 2.0f) &&
|
||||
(param_0.z >= mPosZ - field_0xc * 2.0f &&
|
||||
param_0.z <= mPosZ + field_0xc * 2.0f);
|
||||
}
|
||||
|
||||
/* 0x04 */ u8* field_0x4;
|
||||
/* 0x08 */ f32 field_0x8;
|
||||
/* 0x0C */ f32 field_0xc;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
/* 0x10 */ f32 mPosX;
|
||||
/* 0x14 */ f32 mPosZ;
|
||||
/* 0x18 */ f32 mCmPerTexel;
|
||||
/* 0x1C */ u16 field_0x1c;
|
||||
/* 0x1E */ u16 field_0x1e;
|
||||
/* 0x1C */ u16 mTexWidth;
|
||||
/* 0x1E */ u16 mTexHeight;
|
||||
/* 0x20 */ u16 field_0x20;
|
||||
/* 0x22 */ u16 field_0x22;
|
||||
}; // Size: 0x24
|
||||
@@ -154,4 +154,15 @@ struct dMpath_n {
|
||||
|
||||
STATIC_ASSERT(sizeof(dMpath_n::dTexObjAggregate_c) == 28);
|
||||
|
||||
struct dMpath_RGB5A3_s {
|
||||
u16 color;
|
||||
};
|
||||
|
||||
struct dMpath_RGB5A3_palDt_s {
|
||||
/* 0x0 */ dMpath_RGB5A3_s field_0x0;
|
||||
/* 0x2 */ dMpath_RGB5A3_s field_0x2;
|
||||
/* 0x4 */ dMpath_RGB5A3_s field_0x4;
|
||||
/* 0x6 */ dMpath_RGB5A3_s field_0x6;
|
||||
};
|
||||
|
||||
#endif /* D_MAP_D_MAP_PATH_H */
|
||||
|
||||
+155
-18
@@ -12,7 +12,11 @@ public:
|
||||
mpNext = NULL;
|
||||
}
|
||||
|
||||
/* 8003EB70 */ ~fmpTresTypeGroupData_c();
|
||||
/* 8003EB70 */ ~fmpTresTypeGroupData_c() {
|
||||
if (mpNext != NULL) {
|
||||
delete mpNext;
|
||||
}
|
||||
}
|
||||
|
||||
void setTypeGroupNo(u8 i_no) { mTypeGroupNo = i_no; }
|
||||
void setNextData(fmpTresTypeGroupData_c* i_next) { mpNext = i_next; }
|
||||
@@ -31,6 +35,8 @@ public:
|
||||
/* 8003EB10 */ ~fmpTresTypeGroupDataList_c();
|
||||
/* 8003EC90 */ fmpTresTypeGroupDataList_c();
|
||||
|
||||
fmpTresTypeGroupData_c* getTypeGroupDataHead() { return mpTypeGroupDataHead; }
|
||||
|
||||
/* 0x0 */ fmpTresTypeGroupData_c* mpTypeGroupDataHead;
|
||||
/* 0x4 */ fmpTresTypeGroupData_c* mpNextData;
|
||||
};
|
||||
@@ -40,21 +46,34 @@ public:
|
||||
void addTypeGroupData(u8 i_typeGroupNo, const dTres_c::data_s* i_data) {
|
||||
mpTypeGroupData[i_typeGroupNo].addTypeGroupData(i_typeGroupNo, i_data);
|
||||
}
|
||||
fmpTresTypeGroupDataList_c* getTypeGroupDataList(int i_typeGroupNo) {
|
||||
return &mpTypeGroupData[i_typeGroupNo];
|
||||
}
|
||||
|
||||
/* 0x0 */ fmpTresTypeGroupDataList_c mpTypeGroupData[17];
|
||||
};
|
||||
|
||||
class dMenu_Fmap_data_c {
|
||||
public:
|
||||
dMenu_Fmap_data_c() {
|
||||
mp_tresure = NULL;
|
||||
m_fileList2 = NULL;
|
||||
mp_mapPath = NULL;
|
||||
mp_dzsData = NULL;
|
||||
}
|
||||
|
||||
dTres_c::list_class* getTresure() { return mp_tresure; }
|
||||
f32 getFilelist2MinX() { return m_fileList2->mLeftRmX; }
|
||||
f32 getFilelist2MinZ() { return m_fileList2->mInnerRmZ; }
|
||||
f32 getFilelist2MaxX() { return m_fileList2->mRightRmX; }
|
||||
f32 getFilelist2MaxZ() { return m_fileList2->mFrontRmZ; }
|
||||
dDrawPath_c::room_class* getMapPath() { return mp_mapPath; }
|
||||
void* getDzsData() { return mp_dzsData; }
|
||||
|
||||
void setFileList2(dStage_FileList2_dt_c* i_fileList) { m_fileList2 = i_fileList; }
|
||||
void setTresure(dTres_c::list_class* i_list) { mp_tresure = i_list; }
|
||||
void setMapPath(dDrawPath_c::room_class* i_path) { mp_mapPath = i_path; }
|
||||
void setDzsData(void* i_dzsData) { mp_dzsData = i_dzsData; }
|
||||
|
||||
/* 0x0 */ dTres_c::list_class* mp_tresure;
|
||||
/* 0x4 */ dStage_FileList2_dt_c* m_fileList2;
|
||||
@@ -69,12 +88,30 @@ public:
|
||||
/* 8003D868 */ void buildTresTypeGroup(int, int, int);
|
||||
/* 8003D92C */ void buildFmapRoomData(int, int, f32, f32, f32, f32);
|
||||
|
||||
dMenu_Fmap_room_data_c(u8 i_roomNo, dMenu_Fmap_stage_data_c* i_stageData,
|
||||
dMenu_Fmap_data_c* i_data) {
|
||||
mp_fmapData = i_data;
|
||||
mp_fmpTresTypeGroupDataListAll = NULL;
|
||||
mp_nextData = NULL;
|
||||
mp_parentStage = i_stageData;
|
||||
m_roomNo = i_roomNo;
|
||||
}
|
||||
|
||||
~dMenu_Fmap_room_data_c() {
|
||||
if (mp_fmpTresTypeGroupDataListAll != NULL) {
|
||||
delete mp_fmpTresTypeGroupDataListAll;
|
||||
}
|
||||
}
|
||||
|
||||
fmpTresTypeGroupDataListAll_c* getTypeGroupDataListAll() { return mp_fmpTresTypeGroupDataListAll; }
|
||||
f32 getFileList2MinX() { return mp_fmapData->getFilelist2MinX(); }
|
||||
f32 getFileList2MinZ() { return mp_fmapData->getFilelist2MinZ(); }
|
||||
f32 getFileList2MaxX() { return mp_fmapData->getFilelist2MaxX(); }
|
||||
f32 getFileList2MaxZ() { return mp_fmapData->getFilelist2MaxZ(); }
|
||||
dMenu_Fmap_room_data_c* getNextData() { return mp_nextData; }
|
||||
dMenu_Fmap_data_c* getFmapData() { return mp_fmapData; }
|
||||
int getRoomNo() { return m_roomNo; }
|
||||
void setNextData(dMenu_Fmap_room_data_c* i_nextData) { mp_nextData = i_nextData; }
|
||||
|
||||
/* 0x00 */ dMenu_Fmap_data_c* mp_fmapData;
|
||||
/* 0x04 */ fmpTresTypeGroupDataListAll_c* mp_fmpTresTypeGroupDataListAll;
|
||||
@@ -85,11 +122,14 @@ public:
|
||||
|
||||
class dMenu_Fmap_stage_arc_data_c {
|
||||
public:
|
||||
u8 getSaveTableNo() { return mSaveTableNo; }
|
||||
u8 getVisitedRoomSaveTableNo() { return mVisitedRoomSaveTableNo; }
|
||||
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
/* 0x0 */ u8 mSize;
|
||||
/* 0x1 */ u8 mSaveTableNo;
|
||||
/* 0x2 */ u8 mVisitedRoomSaveTableNo;
|
||||
/* 0x3 */ u8 field_0x3;
|
||||
/* 0x4 */ u8 mRoomNos[0];
|
||||
};
|
||||
|
||||
class dMenu_Fmap_stage_data_c {
|
||||
@@ -97,8 +137,47 @@ public:
|
||||
/* 8003D95C */ bool isArrival();
|
||||
/* 8003D9D8 */ int buildFmapStageData(int, f32, f32);
|
||||
|
||||
dMenu_Fmap_stage_data_c() {
|
||||
mpStageArc = NULL;
|
||||
mp_roomTop = NULL;
|
||||
mpNextData = NULL;
|
||||
m_stageMinX = 0.0f;
|
||||
m_stageMinZ = 0.0f;
|
||||
m_stageMaxX = 0.0f;
|
||||
m_stageMaxZ = 0.0f;
|
||||
m_offsetX = 0.0f;
|
||||
m_offsetZ = 0.0f;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
name[i] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
f32 getStageCenterX() { return (m_stageMaxX + m_stageMinX) * 0.5f; }
|
||||
f32 getStageCenterZ() { return (m_stageMaxZ + m_stageMinZ) * 0.5f; }
|
||||
f32 getStageCenterX_CoordRegion() { return m_offsetX + getStageCenterX(); }
|
||||
f32 getStageCenterZ_CoordRegion() { return m_offsetZ + getStageCenterZ(); }
|
||||
char* getStageName() { return name; }
|
||||
dMenu_Fmap_stage_arc_data_c* getStageArc() { return mpStageArc; }
|
||||
dMenu_Fmap_stage_data_c* getNextData() { return mpNextData; }
|
||||
dMenu_Fmap_room_data_c* getFmapRoomDataTop() { return mp_roomTop; }
|
||||
f32 getOffsetX() { return m_offsetX; }
|
||||
f32 getOffsetZ() { return m_offsetZ; }
|
||||
f32 getStageMinX() { return m_stageMinX; }
|
||||
f32 getStageMinZ() { return m_stageMinZ; }
|
||||
f32 getStageMaxX() { return m_stageMaxX; }
|
||||
f32 getStageMaxZ() { return m_stageMaxZ; }
|
||||
void setStageArc(dMenu_Fmap_stage_arc_data_c* i_stageArc) { mpStageArc = i_stageArc; }
|
||||
void setFmapRoomDataTop(dMenu_Fmap_room_data_c* i_roomTop) { mp_roomTop = i_roomTop; }
|
||||
void setNextData(dMenu_Fmap_stage_data_c* i_nextData) { mpNextData = i_nextData; }
|
||||
void setStageCntNo(int i_no) { m_stageCntNo = i_no; }
|
||||
void setOffsetX(f32 i_offsetX) { m_offsetX = i_offsetX; }
|
||||
void setOffsetZ(f32 i_offsetZ) { m_offsetZ = i_offsetZ; }
|
||||
|
||||
void setName(char* i_name) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
name[i] = i_name[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* 0x00 */ char name[8];
|
||||
/* 0x08 */ dMenu_Fmap_stage_arc_data_c* mpStageArc;
|
||||
@@ -116,8 +195,41 @@ public:
|
||||
class dMenu_Fmap_region_data_c {
|
||||
public:
|
||||
/* 8003DB48 */ dMenu_Fmap_stage_data_c* getMenuFmapStageData(int);
|
||||
/* 8003DB70 */ void getPointStagePathInnerNo(f32, f32, int, int*, int*);
|
||||
/* 8003DEE0 */ void buildFmapRegionData(int);
|
||||
/* 8003DB70 */ int getPointStagePathInnerNo(f32, f32, int, int*, int*);
|
||||
/* 8003DEE0 */ int buildFmapRegionData(int);
|
||||
|
||||
dMenu_Fmap_region_data_c(int i_no, dMenu_Fmap_stage_data_c* i_stageData,
|
||||
f32 i_offsetX, f32 i_offsetZ) {
|
||||
mpMenuFmapStageDataTop = i_stageData;
|
||||
mpNextData = NULL;
|
||||
mRegionOffsetX = i_offsetX;
|
||||
mRegionOffsetZ = i_offsetZ;
|
||||
mRegionMinX = 0.0f;
|
||||
mRegionMaxX = 0.0f;
|
||||
mRegionMinZ = 0.0f;
|
||||
mRegionMaxZ = 0.0f;
|
||||
mRegionNo = i_no;
|
||||
buildFmapRegionData(0);
|
||||
}
|
||||
|
||||
f32 getStageCenterX_CoordWorld(int i_stageNo) {
|
||||
return mRegionOffsetX + getMenuFmapStageData(i_stageNo)->getStageCenterX_CoordRegion();
|
||||
}
|
||||
|
||||
f32 getStageCenterZ_CoordWorld(int i_stageNo) {
|
||||
return mRegionOffsetZ + getMenuFmapStageData(i_stageNo)->getStageCenterZ_CoordRegion();
|
||||
}
|
||||
|
||||
dMenu_Fmap_stage_data_c* getMenuFmapStageDataTop() { return mpMenuFmapStageDataTop; }
|
||||
dMenu_Fmap_region_data_c* getNextData() { return mpNextData; }
|
||||
f32 getRegionOffsetX() { return mRegionOffsetX; }
|
||||
f32 getRegionOffsetZ() { return mRegionOffsetZ; }
|
||||
f32 getRegionMinX() { return mRegionMinX; }
|
||||
f32 getRegionMaxX() { return mRegionMaxX; }
|
||||
f32 getRegionMinZ() { return mRegionMinZ; }
|
||||
f32 getRegionMaxZ() { return mRegionMaxZ; }
|
||||
int getRegionNo() { return mRegionNo; }
|
||||
void setNextData(dMenu_Fmap_region_data_c* i_data) { mpNextData = i_data; }
|
||||
|
||||
/* 0x00 */ dMenu_Fmap_stage_data_c* mpMenuFmapStageDataTop;
|
||||
/* 0x04 */ dMenu_Fmap_region_data_c* mpNextData;
|
||||
@@ -130,9 +242,17 @@ public:
|
||||
/* 0x20 */ int mRegionNo;
|
||||
};
|
||||
|
||||
struct dMenu_Fmap_world_data_c {
|
||||
class dMenu_Fmap_world_data_c {
|
||||
public:
|
||||
/* 8003E028 */ void create(dMenu_Fmap_region_data_c*);
|
||||
/* 8003E04C */ void buildFmapWorldData();
|
||||
/* 8003E04C */ int buildFmapWorldData();
|
||||
|
||||
dMenu_Fmap_world_data_c(dMenu_Fmap_region_data_c* i_regionData) { create(i_regionData); }
|
||||
dMenu_Fmap_region_data_c* getMenuFmapRegionTop() { return mp_fmapRegionData; }
|
||||
f32 getWorldMinX() { return m_worldMinX; }
|
||||
f32 getWorldMinZ() { return m_worldMinZ; }
|
||||
f32 getWorldMaxX() { return m_worldMaxX; }
|
||||
f32 getWorldMaxZ() { return m_worldMaxZ; }
|
||||
|
||||
/* 0x00 */ dMenu_Fmap_region_data_c* mp_fmapRegionData;
|
||||
/* 0x04 */ f32 m_worldMinX;
|
||||
@@ -141,21 +261,38 @@ struct dMenu_Fmap_world_data_c {
|
||||
/* 0x10 */ f32 m_worldMaxZ;
|
||||
};
|
||||
|
||||
struct dMenuFmapIconPointer_c {
|
||||
/* 8003E114 */ void init(dMenu_Fmap_region_data_c*, dMenu_Fmap_stage_data_c*, u8, int, int);
|
||||
/* 8003E1C0 */ void getFirstData();
|
||||
/* 8003E2BC */ void getData();
|
||||
class dMenuFmapIconPointer_c {
|
||||
public:
|
||||
/* 8003E114 */ bool init(dMenu_Fmap_region_data_c*, dMenu_Fmap_stage_data_c*, u8, int, int);
|
||||
/* 8003E1C0 */ bool getFirstData();
|
||||
/* 8003E2BC */ bool getData();
|
||||
/* 8003E350 */ void getFirstRoomData();
|
||||
/* 8003E37C */ void getNextRoomData();
|
||||
/* 8003E3A4 */ void getNextStageData();
|
||||
/* 8003E3D8 */ void getNextData();
|
||||
/* 8003E490 */ void nextData();
|
||||
/* 8003E510 */ void getValidData();
|
||||
/* 8003E37C */ bool getNextRoomData();
|
||||
/* 8003E3A4 */ bool getNextStageData();
|
||||
/* 8003E3D8 */ bool getNextData();
|
||||
/* 8003E490 */ bool nextData();
|
||||
/* 8003E510 */ bool getValidData();
|
||||
|
||||
/* 0x00 */ int mStageNo;
|
||||
/* 0x04 */ int mStayStageNo;
|
||||
/* 0x08 */ int mStayRoomNo;
|
||||
/* 0x0C */ int mSaveTbl;
|
||||
/* 0x10 */ dMenu_Fmap_region_data_c* mpRegionData;
|
||||
/* 0x14 */ dMenu_Fmap_stage_data_c* mpStageData;
|
||||
/* 0x18 */ dMenu_Fmap_room_data_c* mpRoomData;
|
||||
/* 0x1C */ fmpTresTypeGroupDataListAll_c* mpFmpTresTypeGroupDataListAll;
|
||||
/* 0x20 */ fmpTresTypeGroupDataList_c* mpFmpTresTypeGroupDataList;
|
||||
/* 0x24 */ fmpTresTypeGroupData_c* mpFmpTresTypeGroupData;
|
||||
/* 0x28 */ dTres_c::typeGroupData_c* mpTresTypeGroupData;
|
||||
/* 0x2C */ const dTres_c::data_s* mpTresData;
|
||||
/* 0x30 */ u8 mTypeGroupNo;
|
||||
/* 0x31 */ u8 mType;
|
||||
};
|
||||
|
||||
struct dMenuFmapIconDisp_c {
|
||||
/* 8003E578 */ void getPosition(int*, int*, f32*, f32*, dTres_c::data_s const**);
|
||||
/* 8003E6E8 */ void isDrawDisp();
|
||||
class dMenuFmapIconDisp_c : public dMenuFmapIconPointer_c {
|
||||
public:
|
||||
/* 8003E578 */ bool getPosition(int*, int*, f32*, f32*, dTres_c::data_s const**);
|
||||
/* 8003E6E8 */ virtual bool isDrawDisp();
|
||||
};
|
||||
|
||||
#endif /* D_MAP_D_MAP_PATH_FMAP_H */
|
||||
|
||||
Reference in New Issue
Block a user