mirror of
https://github.com/zeldaret/tp
synced 2026-08-22 06:44:53 -04:00
d_map debug (#3066)
This commit is contained in:
+103
-39
@@ -4,33 +4,45 @@
|
||||
#include "d/d_map_path_dmap.h"
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
|
||||
struct dMap_HIO_prm_res_src_s {
|
||||
|
||||
};
|
||||
|
||||
class dMap_HIO_list_c : public dMpath_HIO_n::hioList_c {
|
||||
public:
|
||||
virtual void copySrcToHio();
|
||||
virtual void copyHioToDst();
|
||||
virtual void copyBufToHio(const char*);
|
||||
};
|
||||
|
||||
class dMap_HIO_c : public dMpath_HIO_file_base_c {
|
||||
public:
|
||||
dMap_HIO_c();
|
||||
virtual void listenPropertyEvent(const JORPropertyEvent*);
|
||||
virtual void genMessage(JORMContext*);
|
||||
virtual u32 addString(char*, u32, u32);
|
||||
virtual u32 addData(char*, u32, u32);
|
||||
virtual void copyReadBufToData(const char*, s32);
|
||||
virtual u32 addStringBinary(char*, u32, u32);
|
||||
|
||||
/* 0x04 */ u8 field_0x4[0x08 - 0x04];
|
||||
/* 0x08 */ dMap_HIO_list_c mList;
|
||||
|
||||
static dMap_HIO_c* mMySelfPointer;
|
||||
static dMpath_HIO_n::list_s l_list;
|
||||
static dMap_HIO_prm_res_src_s* m_res_src_p;
|
||||
struct dMap_HIO_prm_other_s {
|
||||
/* 0x00 */ u8 field_0x0;
|
||||
/* 0x04 */ f32 field_0x4;
|
||||
/* 0x08 */ u8 field_0x8;
|
||||
/* 0x0C */ f32 field_0xc;
|
||||
/* 0x10 */ u8 field_0x10;
|
||||
/* 0x11 */ u8 field_0x11;
|
||||
/* 0x12 */ u8 field_0x12;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
/* 0x18 */ f32 field_0x18;
|
||||
/* 0x1C */ u8 field_0x1c;
|
||||
/* 0x1D */ u8 field_0x1d;
|
||||
/* 0x1E */ u8 field_0x1e;
|
||||
/* 0x1F */ u8 field_0x1f;
|
||||
/* 0x20 */ u8 field_0x20;
|
||||
/* 0x21 */ u8 field_0x21;
|
||||
/* 0x22 */ u8 field_0x22;
|
||||
/* 0x23 */ u8 field_0x23;
|
||||
/* 0x24 */ u8 field_0x24[0x2C - 0x24];
|
||||
/* 0x2C */ u8 field_0x2c;
|
||||
/* 0x30 */ f32 field_0x30;
|
||||
/* 0x34 */ u8 field_0x34;
|
||||
/* 0x35 */ u8 field_0x35;
|
||||
/* 0x36 */ s16 field_0x36;
|
||||
/* 0x38 */ u8 field_0x38;
|
||||
/* 0x38 */ s16 field_0x3a;
|
||||
/* 0x3C */ u8 field_0x3c;
|
||||
/* 0x3D */ u8 field_0x3d;
|
||||
/* 0x3E */ s16 field_0x3e;
|
||||
/* 0x40 */ u8 field_0x40;
|
||||
/* 0x41 */ u8 field_0x41[0x44 - 0x41];
|
||||
/* 0x44 */ f32 field_0x44[17];
|
||||
/* 0x88 */ u8 field_0x88;
|
||||
/* 0x89 */ u8 field_0x89;
|
||||
/* 0x8A */ u8 field_0x8a;
|
||||
/* 0x8C */ f32 field_0x8c[17];
|
||||
/* 0xD0 */ u8 field_0xd0[0x114 - 0xD0];
|
||||
/* 0x114 */ dTres_c::typeGroupData_c field_0x114[1];
|
||||
/* 0x130 */ u8 field_0x130[0x2f0 - 0x130];
|
||||
};
|
||||
|
||||
struct dMap_prm_res_s {
|
||||
@@ -63,8 +75,19 @@ struct dMap_prm_res_s {
|
||||
/* 0x1B8 */ f32 cursor_size;
|
||||
};
|
||||
|
||||
struct dMap_prm_hio_s {
|
||||
/* 0x00 */ GXColor field_0x0[51];
|
||||
/* 0xCC */ u8 field_0xcc[0x24];
|
||||
/* 0xF0 */ dMap_HIO_prm_other_s field_0xf0;
|
||||
};
|
||||
|
||||
struct dMap_HIO_prm_res_src_s {
|
||||
static const u8 m_other[0x2f0];
|
||||
};
|
||||
|
||||
struct dMap_HIO_prm_res_dst_s {
|
||||
static dMap_prm_res_s* m_res;
|
||||
static dMap_HIO_prm_other_s m_other;
|
||||
};
|
||||
|
||||
class renderingAmap_c : public renderingPlusDoorAndCursor_c {
|
||||
@@ -104,7 +127,11 @@ public:
|
||||
virtual void setAmapPaletteColor(int, u8, u8, u8, u8) = 0;
|
||||
virtual bool isSpecialOutline() = 0;
|
||||
|
||||
#if DEBUG
|
||||
static const int PALETTE_NUMBER = 51;
|
||||
#else
|
||||
static const int PALETTE_NUMBER = 50;
|
||||
#endif
|
||||
|
||||
private:
|
||||
/* 0x34 */ s32 m_outSideBlackLineCnt;
|
||||
@@ -130,7 +157,12 @@ public:
|
||||
void _move(f32, f32, int, f32);
|
||||
void _draw();
|
||||
|
||||
virtual ~dMap_c() { _remove(); }
|
||||
virtual ~dMap_c() {
|
||||
#if DEBUG
|
||||
m_mySelfPointer = NULL;
|
||||
#endif
|
||||
_remove();
|
||||
}
|
||||
virtual bool isDrawType(int);
|
||||
virtual const GXColor* getColor(int);
|
||||
virtual bool isRendAllRoom() const;
|
||||
@@ -143,6 +175,11 @@ public:
|
||||
virtual void setAmapPaletteColor(int, u8, u8, u8, u8);
|
||||
virtual bool isSpecialOutline();
|
||||
|
||||
#if DEBUG
|
||||
virtual bool isSwitch(const dDrawPath_c::group_class*);
|
||||
virtual void beforeDrawPath();
|
||||
#endif
|
||||
|
||||
bool isDraw() const { return renderingDAmap_c::isDraw(); }
|
||||
|
||||
ResTIMG* getResTIMGPointer() { return mResTIMG; }
|
||||
@@ -150,7 +187,7 @@ public:
|
||||
f32 getPackPlusZ() { return mPackPlusZ; }
|
||||
f32 getPackZ() const { return mPackZ; }
|
||||
f32 getTexelPerCm() const { return 1.0f / field_0x58; }
|
||||
u16 getTexSizeY() const { return mTexSizeH; }
|
||||
u16 getTexSizeY() const { return mTexSizeY; }
|
||||
f32 getRightEdgePlus() { return mRightEdgePlus; }
|
||||
f32 getPackX() const { return mPackX; }
|
||||
int getStayRoomNo() const { return mStayRoomNo; }
|
||||
@@ -173,8 +210,8 @@ private:
|
||||
/* 0x6C */ f32 mRightEdgePlus;
|
||||
/* 0x70 */ f32 mTopEdgePlus;
|
||||
/* 0x74 */ int field_0x74;
|
||||
/* 0x78 */ u16 mTexSizeW;
|
||||
/* 0x7A */ u16 mTexSizeH;
|
||||
/* 0x78 */ u16 mTexSizeX;
|
||||
/* 0x7A */ u16 mTexSizeY;
|
||||
/* 0x7C */ int mStayRoomNo;
|
||||
/* 0x80 */ int field_0x80;
|
||||
/* 0x84 */ int field_0x84;
|
||||
@@ -184,17 +221,44 @@ private:
|
||||
/* 0x8E */ u8 field_0x8e;
|
||||
/* 0x8F */ u8 field_0x8f;
|
||||
/* 0x90 */ u8 field_0x90;
|
||||
/* 0x91 */ u8 field_0x91;
|
||||
}; // Size: 0x94
|
||||
|
||||
#if DEBUG
|
||||
class dMpath_RGBA_c {
|
||||
class dMap_HIO_list_c : public dMpath_HIO_n::hioList_c {
|
||||
public:
|
||||
GXColor getGXColor() { return mColor; }
|
||||
|
||||
GXColor mColor;
|
||||
|
||||
virtual ~dMpath_RGBA_c() {}
|
||||
virtual void copySrcToHio();
|
||||
virtual void copyHioToDst();
|
||||
virtual void copyBufToHio(const char*);
|
||||
};
|
||||
|
||||
class dMap_HIO_c : public dMpath_HIO_file_base_c {
|
||||
public:
|
||||
dMap_HIO_c();
|
||||
virtual void listenPropertyEvent(const JORPropertyEvent*);
|
||||
virtual void genMessage(JORMContext*);
|
||||
virtual u32 addString(char* param_1, u32 param_2, u32 param_3) { return mList.addString(param_1, param_2, param_3); }
|
||||
virtual u32 addData(char* param_1, u32 param_2, u32 param_3) {
|
||||
UNUSED(param_2);
|
||||
UNUSED(param_3);
|
||||
memcpy(param_1, dMap_HIO_prm_res_dst_s::m_res, 0x1bc);
|
||||
return 0x1bc;
|
||||
}
|
||||
virtual void copyReadBufToData(const char* param_1, s32 param_2) {
|
||||
UNUSED(param_2);
|
||||
mList.copyBufToHio(param_1);
|
||||
}
|
||||
virtual u32 addStringBinary(char* param_1, u32 param_2, u32 param_3) {
|
||||
return mList.addStringBinary(param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
/* 0x04 */ u8 field_0x4[0x08 - 0x04];
|
||||
/* 0x08 */ dMap_HIO_list_c mList;
|
||||
|
||||
static dMap_HIO_c* mMySelfPointer;
|
||||
static const u8 l_listData[];
|
||||
static const dMpath_HIO_n::list_s l_list;
|
||||
static dMap_prm_res_s* m_res_src_p;
|
||||
static dMap_prm_hio_s m_prm_hio;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* D_MAP_D_MAP_H */
|
||||
|
||||
+77
-19
@@ -4,22 +4,50 @@
|
||||
#include "d/d_drawlist.h"
|
||||
#include "JSystem/JHostIO/JORMContext.h"
|
||||
|
||||
struct dMpath_RGB5A3_s {
|
||||
u16 color;
|
||||
};
|
||||
|
||||
namespace dMpath_ColorCnv_n {
|
||||
void convertRGB5A3_To_GXColor(_GXColor&, const dMpath_RGB5A3_s&);
|
||||
}
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
class dMpath_RGBA_c {
|
||||
public:
|
||||
GXColor mColor;
|
||||
|
||||
dMpath_RGBA_c() {}
|
||||
virtual ~dMpath_RGBA_c() {}
|
||||
GXColor getGXColor() const { return mColor; }
|
||||
void setGXColor(const GXColor&);
|
||||
void setRGB5A3_palDt(const dMpath_RGB5A3_palDt_s&);
|
||||
};
|
||||
|
||||
namespace dMpath_HIO_n {
|
||||
struct list_s {
|
||||
/* 0x00 */ void* field_0x0;
|
||||
/* 0x00 */ const void* field_0x0;
|
||||
/* 0x04 */ u32 field_0x4;
|
||||
};
|
||||
|
||||
class hioList_c {
|
||||
public:
|
||||
/* 0x00 */ list_s mList;
|
||||
struct resData_s {};
|
||||
struct hioList_s : public list_s, resData_s {};
|
||||
|
||||
// RTTI does not match debug
|
||||
class hioList_c : public hioList_s {
|
||||
public:
|
||||
virtual ~hioList_c() {}
|
||||
virtual void copySrcToHio() = 0;
|
||||
virtual void copyHioToDst() = 0;
|
||||
virtual void copyBufToHio(const char*) = 0;
|
||||
|
||||
void set(const list_s& param_1) { mList = param_1; }
|
||||
void set(const list_s& param_1) { *static_cast<list_s*>(this) = param_1; }
|
||||
void gen(JORMContext*);
|
||||
void update(JORMContext*);
|
||||
u32 addString(char*, u32, u32) const;
|
||||
@@ -44,6 +72,42 @@ public:
|
||||
bool readBinaryFile(const char*);
|
||||
};
|
||||
|
||||
class dMpath_RGB5A3_c {
|
||||
public:
|
||||
dMpath_RGB5A3_s mColor;
|
||||
|
||||
dMpath_RGB5A3_c(GXColor c) { set(c); }
|
||||
virtual ~dMpath_RGB5A3_c() {}
|
||||
void set(u8 r, u8 g, u8 b, u8 a) {
|
||||
u32 color;
|
||||
if (a >= 224) {
|
||||
color = (r & 0xf8) << 7 | (g & 0xf8) << 2 | (b & 0xf8) >> 3 | 0x8000;
|
||||
} else {
|
||||
color = (r & 0xf0) << 4 | g & 0xf0 | (b & 0xf0) >> 4 | (a & 0xe0) << 7;
|
||||
}
|
||||
mColor.color = color;
|
||||
}
|
||||
void set(const GXColor& c) { set(c.r, c.g, c.b, c.a); }
|
||||
const dMpath_RGB5A3_s& getRGB5A3() const { return mColor; }
|
||||
};
|
||||
|
||||
class dMpath_RGB5A3_palDt_c {
|
||||
public:
|
||||
dMpath_RGB5A3_palDt_s field_0x0;
|
||||
|
||||
dMpath_RGB5A3_palDt_c() {}
|
||||
virtual ~dMpath_RGB5A3_palDt_c() {}
|
||||
dMpath_RGB5A3_palDt_s& getRGB5A3_palDt_s() { return field_0x0; }
|
||||
|
||||
void setGXColor(const GXColor& c) {
|
||||
dMpath_RGB5A3_c rgb5a3(c);
|
||||
field_0x0.field_0x0 = rgb5a3.getRGB5A3();
|
||||
field_0x0.field_0x2 = rgb5a3.getRGB5A3();
|
||||
field_0x0.field_0x4 = rgb5a3.getRGB5A3();
|
||||
field_0x0.field_0x6 = rgb5a3.getRGB5A3();
|
||||
}
|
||||
};
|
||||
|
||||
class dDrawPath_c : public dDlst_base_c {
|
||||
public:
|
||||
struct line_class {
|
||||
@@ -176,19 +240,24 @@ public:
|
||||
struct dMpath_n {
|
||||
class dTexObjAggregate_c {
|
||||
public:
|
||||
static const int TEX_OBJ_NUMBER = 7;
|
||||
|
||||
void create();
|
||||
void remove();
|
||||
~dTexObjAggregate_c() { remove(); };
|
||||
|
||||
GXTexObj* getTexObjPointer(int i_no) { return mp_texObj[i_no]; }
|
||||
GXTexObj* getTexObjPointer(int i_no) {
|
||||
JUT_ASSERT(44, i_no >= 0 && i_no < TEX_OBJ_NUMBER);
|
||||
return mp_texObj[i_no];
|
||||
}
|
||||
|
||||
dTexObjAggregate_c() {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
for (int i = 0; i < TEX_OBJ_NUMBER; i++) {
|
||||
mp_texObj[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* 0x0 */ GXTexObj* mp_texObj[7];
|
||||
/* 0x0 */ GXTexObj* mp_texObj[TEX_OBJ_NUMBER];
|
||||
};
|
||||
|
||||
static dTexObjAggregate_c m_texObjAgg;
|
||||
@@ -196,15 +265,4 @@ 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 */
|
||||
|
||||
@@ -74,9 +74,9 @@ public:
|
||||
static void remove();
|
||||
|
||||
static s8 getNowStayFloorNo() {
|
||||
JUT_ASSERT(0, mNowStayFloorNoDecisionFlg);
|
||||
|
||||
s8 floor_no = 0;
|
||||
JUT_ASSERT(195, mNowStayFloorNoDecisionFlg);
|
||||
|
||||
if (mNowStayFloorNoDecisionFlg) {
|
||||
floor_no = mNowStayFloorNo;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1543,11 +1543,11 @@ inline u16 dStage_FileList_dt_GetMsg(dStage_FileList_dt_c* p_fList) {
|
||||
return p_fList->mMsg;
|
||||
}
|
||||
|
||||
inline f32 dStage_FileList2_dt_GetLeftRmX(dStage_FileList2_dt_c* p_fList2) {
|
||||
inline f32 dStage_FileList2_dt_GetLeftRmX(const dStage_FileList2_dt_c* p_fList2) {
|
||||
return p_fList2->mLeftRmX;
|
||||
}
|
||||
|
||||
inline f32 dStage_FileList2_dt_GetRightRmX(dStage_FileList2_dt_c* p_fList2) {
|
||||
inline f32 dStage_FileList2_dt_GetRightRmX(const dStage_FileList2_dt_c* p_fList2) {
|
||||
return p_fList2->mRightRmX;
|
||||
}
|
||||
|
||||
|
||||
+16
-7
@@ -5,6 +5,8 @@
|
||||
|
||||
class dTres_c {
|
||||
public:
|
||||
static const int TYPE_GROUP_ENUM_NUMBER = 17;
|
||||
|
||||
struct data_s {
|
||||
/* 0x00 */ u8 mNo;
|
||||
/* 0x01 */ s8 mRoomNo;
|
||||
@@ -21,18 +23,25 @@ public:
|
||||
public:
|
||||
data_s* getDataPointer() { return (data_s*)this; }
|
||||
const data_s* getConstDataPointer() const { return (data_s*)this; }
|
||||
typeGroupData_c* getNextDataPointer() const { return mNextData; }
|
||||
void setNextDataPointer(typeGroupData_c* data) { mNextData = data; }
|
||||
void setTypeGroupNo(u8 no) { mTypeGroupNo = no; }
|
||||
u8 getNo() const { return mNo; }
|
||||
void setNo(u8 no) { mNo = no; }
|
||||
s8 getRoomNo() const { return mRoomNo; }
|
||||
void setRoomNo(s8 roomNo) { mRoomNo = roomNo; }
|
||||
u8 getStatus() const { return mStatus; }
|
||||
void setStatus(u8 status) { mStatus = status; }
|
||||
void setRoomNo(s8 roomNo) { mRoomNo = roomNo; }
|
||||
s8 getRoomNo() const { return mRoomNo; }
|
||||
void setArg1(u8 arg1) { mArg1 = arg1; }
|
||||
const Vec* getPos() const { return &mPos; }
|
||||
void setPos(const Vec& pos) { mPos = pos; }
|
||||
u8 getSwBit() const { return mSwBit; }
|
||||
const Vec* getPos() const { return &mPos; }
|
||||
void setSwBit(u8 swBit) { mSwBit = swBit; }
|
||||
void setType(u8 type) { mType = type; }
|
||||
void setArg2(u8 arg2) { mArg2 = arg2; }
|
||||
int getAngleY() const { return mAngleY; }
|
||||
void setAngleY(s8 angleY) { mAngleY = angleY; }
|
||||
typeGroupData_c* getNextDataPointer() const { return mNextData; }
|
||||
void setNextDataPointer(typeGroupData_c* data) { mNextData = data; }
|
||||
u8 getTypeGroupNo() { return mTypeGroupNo; }
|
||||
void setTypeGroupNo(u8 no) { mTypeGroupNo = no; }
|
||||
|
||||
/* 0x14 */ typeGroupData_c* mNextData;
|
||||
/* 0x18 */ u8 mTypeGroupNo;
|
||||
@@ -63,7 +72,7 @@ public:
|
||||
static typeGroupData_c* getNextData(dTres_c::typeGroupData_c*);
|
||||
static typeGroupData_c* getNextData(dTres_c::typeGroupData_c const*);
|
||||
static void setPosition(int, u8, Vec const*, int);
|
||||
static int getTypeGroupNoToType(u8);
|
||||
static u8 getTypeGroupNoToType(u8);
|
||||
static u8 getTypeToTypeGroupNo(u8);
|
||||
|
||||
static int getTypeGroupNumber(int index) {
|
||||
|
||||
Reference in New Issue
Block a user