mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-27 07:47:31 -04:00
d_menu_dmap (#1166)
* initial structure from ghidra
* dMd_HIO_c fields and constructor
* screenSet progress
* More screenSet
* boss door
* initialize
* treasureDraw
* largest method ever
* alphas
* cursors
* notes
* itemScale
* so many pointers
* pls no more string logic
* boss animes
* deletes are weird in ghidra
* _draw()
* cleanup for review, configure matching
* fix dMap_GetFloorNoForDmap
* not matching GZLJ01
* different fix for d_map.h
* GZLJ01
* GZLP01
* D44J01
* missing import
* replace !=0 with != NULL for pointers
* Revert "D44J01"
This reverts commit b0ce19b9f1.
This commit is contained in:
+1
-1
@@ -636,7 +636,7 @@ config.libs = [
|
||||
Object(Matching, "d/d_level_se.cpp"),
|
||||
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_menu_cloth.cpp"),
|
||||
Object(NonMatching, "d/d_menu_collect.cpp"),
|
||||
Object(NonMatching, "d/d_menu_dmap.cpp"),
|
||||
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_menu_dmap.cpp"),
|
||||
Object(NonMatching, "d/d_menu_fmap.cpp"),
|
||||
Object(NonMatching, "d/d_menu_fmap2.cpp"),
|
||||
Object(NonMatching, "d/d_menu_item.cpp"),
|
||||
|
||||
@@ -36,14 +36,14 @@ public:
|
||||
void drawContentsTexture(f32, f32, f32, f32);
|
||||
void setTevMode(JUTTexture*, JUtility::TColor, JUtility::TColor);
|
||||
|
||||
void getBlack() const {}
|
||||
const JUtility::TColor& getBlack() const { return mBlack; }
|
||||
void getContentsColor(TContentsColor& param_0) const {
|
||||
param_0.mTL = mColorTL;
|
||||
param_0.mTR = mColorTR;
|
||||
param_0.mBL = mColorBL;
|
||||
param_0.mBR = mColorBR;
|
||||
}
|
||||
void getWhite() const {}
|
||||
const JUtility::TColor& getWhite() const { return mWhite; }
|
||||
void setBlack(JUtility::TColor black) { mBlack = black; }
|
||||
void setContentsColor(TContentsColor param_0) { setContentsColor(param_0.mTL, param_0.mTR, param_0.mBL, param_0.mBR); }
|
||||
void setContentsColor(JUtility::TColor param_0) { setContentsColor(param_0, param_0, param_0, param_0); }
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "d/d_drawlist.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "d/d_stage.h"
|
||||
|
||||
struct ResTIMG;
|
||||
struct dmap_dmap_tlut_s;
|
||||
@@ -337,6 +338,19 @@ public:
|
||||
void setFloorTextureOne(u8);
|
||||
void init(s16, s16, s16, s16, s16, s16, s16, s16, s16, u8, u8, u8, u8, u8);
|
||||
virtual void draw();
|
||||
|
||||
public:
|
||||
/* 0x004 */ u8 field_0x4[0x2A0 - 0x4];
|
||||
/* 0x2A0 */ JKRArchive* field_0x2A0;
|
||||
/* 0x2A4 */ u8 field_0x2A4[0x2B6 - 0x2A4];
|
||||
/* 0x2B6 */ u8 field_0x2B6;
|
||||
/* 0x2B7 */ u8 field_0x2B7[0x35C - 0x2B7];
|
||||
/* 0x35C */ s16 field_0x35C;
|
||||
/* 0x35E */ s16 field_0x35E;
|
||||
/* 0x360 */ u8 field_0x360[0x364 - 0x360];
|
||||
/* 0x364 */ s16 field_0x364;
|
||||
/* 0x366 */ s16 field_0x366;
|
||||
/* 0x368 */ u8 field_0x368[0x368 + 0x2B8 - 0x368];
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -523,6 +537,9 @@ public:
|
||||
static dMap_RoomInfo_c* mNowRoomInfoP;
|
||||
};
|
||||
|
||||
BOOL dMap_GetTopBottomFloorNo(dStage_dt_c* stag, u8* bottom_p, u8* top_p);
|
||||
u8 dMap_GetFloorNo(dStage_dt_c*, f32);
|
||||
|
||||
inline void dMap_drawPoint(u8 param_1, f32 param_2, f32 param_3, f32 param_4, s8 param_5, s16 param_6, u8 param_7, u8 param_8, u8 param_9) {
|
||||
dMap_c::drawPointSingle(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8, param_9);
|
||||
}
|
||||
|
||||
+158
-30
@@ -1,19 +1,36 @@
|
||||
#ifndef D_MENU_DMAP_H
|
||||
#define D_MENU_DMAP_H
|
||||
|
||||
#include "JSystem/J2DGraph/J2DPicture.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "d/d_menu_base.h"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "m_Do/m_Do_hostIO.h"
|
||||
|
||||
class J2DPane;
|
||||
class J2DScreen;
|
||||
struct fopMsgM_pane_class;
|
||||
class JKRArchive;
|
||||
class JUTFont;
|
||||
class STControl;
|
||||
class dMap_Dmap_c;
|
||||
struct ResTIMG;
|
||||
|
||||
struct dMap_pane_c {
|
||||
/* 0x00 */ J2DPicture* ppane;
|
||||
/* 0x04 */ f32 posX;
|
||||
/* 0x08 */ f32 posY;
|
||||
/* 0x0C */ f32 width;
|
||||
/* 0x10 */ f32 height;
|
||||
/* 0x14 */ s16 angle;
|
||||
/* 0x16 */ u8 exists;
|
||||
}; // Size: 0x18
|
||||
|
||||
class dMenu_Dmap_c : public dMenu_base_c {
|
||||
public:
|
||||
void alphaChange(fopMsgM_pane_class*, float) {}
|
||||
virtual void draw() {}
|
||||
void alphaChange(fopMsgM_pane_class*, f32) {}
|
||||
virtual ~dMenu_Dmap_c() {}
|
||||
virtual void draw() { _draw(); }
|
||||
void setArchive(JKRArchive* arc) { mpArc = arc; }
|
||||
void setFont(JUTFont* font, JUTFont* rfont) {
|
||||
mFont = font;
|
||||
@@ -21,12 +38,12 @@ public:
|
||||
}
|
||||
void setItemTexBuffer(int, void*) {}
|
||||
void setTextArea(char* name0, char* name1, char* note0, char* note1, char* dummy0, char* dummy1) {
|
||||
name[0] = name0;
|
||||
name[1] = name1;
|
||||
note[0] = note0;
|
||||
note[1] = note1;
|
||||
dummy[0] = dummy0;
|
||||
dummy[1] = dummy1;
|
||||
mTxtName[0] = name0;
|
||||
mTxtName[1] = name1;
|
||||
mTxtNote[0] = note0;
|
||||
mTxtNote[1] = note1;
|
||||
mTxtDummy[0] = dummy0;
|
||||
mTxtDummy[1] = dummy1;
|
||||
}
|
||||
|
||||
void changeFloorTexture(J2DPane*, int);
|
||||
@@ -34,9 +51,9 @@ public:
|
||||
void initialize();
|
||||
void treasureSet();
|
||||
void treasureDraw();
|
||||
void paneMove(float);
|
||||
void paneAlpha(float);
|
||||
void decAlpha(float);
|
||||
void paneMove(f32);
|
||||
void paneAlpha(f32);
|
||||
void decAlpha(f32);
|
||||
void cursorMove();
|
||||
void cursorAnime();
|
||||
void noteInit();
|
||||
@@ -44,13 +61,15 @@ public:
|
||||
void noteAppear();
|
||||
void noteOpen();
|
||||
void noteClose();
|
||||
void noteOpenProc(short);
|
||||
void noteOpenProc(s16);
|
||||
void itemScale();
|
||||
void floorInit();
|
||||
void mapMove();
|
||||
void mapOffsetY();
|
||||
f32 mapOffsetY();
|
||||
void itemnameMove();
|
||||
#if VERSION > VERSION_JPN
|
||||
void dnameSet();
|
||||
#endif
|
||||
void itemnameSet();
|
||||
void itemnoteSet();
|
||||
void outFontInit();
|
||||
@@ -65,33 +84,142 @@ public:
|
||||
virtual bool _close();
|
||||
|
||||
public:
|
||||
/* 0x0004 */ u8 field_0x0004[0x972 - 0x4];
|
||||
/* 0x0972 */ s16 field_0x0972;
|
||||
/* 0x0974 */ u8 field_0x0974[0x14A4 - 0x974];
|
||||
/* 0x0004 */ J2DScreen* scrn;
|
||||
/* 0x0008 */ J2DScreen* scrn2;
|
||||
/* 0x000C */ fopMsgM_pane_class mFtPanes[15];
|
||||
/* 0x0354 */ fopMsgM_pane_class mFdPanes[15];
|
||||
/* 0x069C */ fopMsgM_pane_class mCarPanes[4];
|
||||
/* 0x077C */ fopMsgM_pane_class mNm00Pane;
|
||||
/* 0x07B4 */ fopMsgM_pane_class mNm01Pane;
|
||||
/* 0x07EC */ fopMsgM_pane_class mItnmPane;
|
||||
/* 0x0824 */ fopMsgM_pane_class mItnkPane;
|
||||
/* 0x085C */ fopMsgM_pane_class mMsk0Pane;
|
||||
/* 0x0894 */ fopMsgM_pane_class mStr0Pane;
|
||||
/* 0x08CC */ fopMsgM_pane_class mSt00Pane;
|
||||
/* 0x0904 */ fopMsgM_pane_class mNt00Pane;
|
||||
/* 0x093C */ fopMsgM_pane_class mNk00Pane;
|
||||
/* 0x0974 */ fopMsgM_pane_class mNo11Pane;
|
||||
/* 0x09AC */ fopMsgM_pane_class mDtlePane;
|
||||
/* 0x09E4 */ fopMsgM_pane_class mDt00Pane;
|
||||
/* 0x0A1C */ fopMsgM_pane_class mDk00Pane;
|
||||
/* 0x0A54 */ fopMsgM_pane_class mItPanes[3];
|
||||
/* 0x0AFC */ fopMsgM_pane_class mIkPanes[3];
|
||||
/* 0x0BA4 */ fopMsgM_pane_class mIpPanes[3];
|
||||
/* 0x0C4C */ fopMsgM_pane_class mIp01Pane;
|
||||
/* 0x0C84 */ fopMsgM_pane_class mLnkPanes[3];
|
||||
/* 0x0D2C */ fopMsgM_pane_class mBey1Pane;
|
||||
/* 0x0D64 */ fopMsgM_pane_class mBey2Pane;
|
||||
/* 0x0D9C */ fopMsgM_pane_class mBossPane;
|
||||
/* 0x0DD4 */ fopMsgM_pane_class mBos2Pane;
|
||||
/* 0x0E0C */ fopMsgM_pane_class field_0xE0C[2];
|
||||
/* 0x0E7C */ fopMsgM_pane_class mFlPanes[6];
|
||||
/* 0x0FCC */ fopMsgM_pane_class mFbPanes[6];
|
||||
/* 0x111C */ fopMsgM_pane_class mFbkPanes[6];
|
||||
/* 0x126C */ fopMsgM_pane_class mFw00Pane;
|
||||
/* 0x12A4 */ fopMsgM_pane_class mFw01Pane;
|
||||
/* 0x12DC */ fopMsgM_pane_class mCc38Pane;
|
||||
/* 0x1314 */ fopMsgM_pane_class mCc31Pane;
|
||||
/* 0x134C */ fopMsgM_pane_class mCc24Pane;
|
||||
/* 0x1384 */ fopMsgM_pane_class mCc17Pane;
|
||||
/* 0x13BC */ fopMsgM_pane_class mCc10Pane;
|
||||
/* 0x13F4 */ fopMsgM_pane_class mCc05Pane;
|
||||
/* 0x142C */ fopMsgM_pane_class mCc00Pane;
|
||||
/* 0x1464 */ fopMsgM_pane_class mMskPane;
|
||||
/* 0x149C */ STControl* stick;
|
||||
/* 0x14A0 */ dMap_Dmap_c* dmap_c;
|
||||
/* 0x14A4 */ JKRArchive* mpArc;
|
||||
/* 0x14A8 */ JUTFont* mFont;
|
||||
/* 0x14AC */ JUTFont* mRFont;
|
||||
/* 0x14B0 */ u8 field_0x14B0[0x14B4 - 0x14B0];
|
||||
/* 0x14B4 */ JUtility::TColor color_0x14B4;
|
||||
/* 0x14B8 */ JUtility::TColor color_0x14B8;
|
||||
/* 0x14BC */ JUtility::TColor color_0x14BC;
|
||||
/* 0x14C0 */ JUtility::TColor color_0x14C0;
|
||||
/* 0x14C4 */ JUtility::TColor color_0x14C4;
|
||||
/* 0x14C8 */ JUtility::TColor color_0x14C8;
|
||||
/* 0x14CC */ u8 padding_0x14CC[0x1AFC - 0x14CC];
|
||||
/* 0x1AFC */ void* arr_0x1AFC[3];
|
||||
/* 0x14B4 */ JUtility::TColor mFb5ContentsColor;
|
||||
/* 0x14B8 */ JUtility::TColor mFb0ContentsColor;
|
||||
/* 0x14BC */ JUtility::TColor mFb5White;
|
||||
/* 0x14C0 */ JUtility::TColor mFb0White;
|
||||
/* 0x14C4 */ JUtility::TColor mFb5Black;
|
||||
/* 0x14C8 */ JUtility::TColor mFb0Black;
|
||||
/* 0x14CC */ dMap_pane_c treasure_p[32];
|
||||
/* 0x17CC */ dMap_pane_c door_p[32];
|
||||
/* 0x1ACC */ dMap_pane_c npc_p;
|
||||
/* 0x1AE4 */ dMap_pane_c boss_p;
|
||||
/* 0x1AFC */ ResTIMG* mpTIMG[3];
|
||||
/* 0x1B08 */ fopMsgM_msgDataProc_c mMsgProc;
|
||||
/* 0x1DA8 */ char* name[2];
|
||||
/* 0x1DB0 */ char* note[2];
|
||||
/* 0x1DB8 */ char* dummy[2];
|
||||
/* 0x1DC0 */ u8 padding_0x1DC0[0x1E38 - 0x1DC0];
|
||||
/* 0x1DA8 */ char* mTxtName[2];
|
||||
/* 0x1DB0 */ char* mTxtNote[2];
|
||||
/* 0x1DB8 */ char* mTxtDummy[2];
|
||||
/* 0x1DC0 */ char mDName[12];
|
||||
/* 0x1DCC */ f32 mCarOfsX[4];
|
||||
/* 0x1DDC */ f32 mCarOfsY[4];
|
||||
/* 0x1DEC */ f32 mCarFloorOfsX[4];
|
||||
/* 0x1DFC */ f32 mCarFloorOfsY[4];
|
||||
/* 0x1E0C */ s16 mNoteTimer;
|
||||
/* 0x1E0E */ s16 mMapDrawOffsetY;
|
||||
/* 0x1E10 */ s16 mCurFloorMapY;
|
||||
/* 0x1E12 */ s16 mFloorListOffsetY;
|
||||
/* 0x1E14 */ s16 mBossFloorListOffsetY;
|
||||
/* 0x1E16 */ s16 mMpmkPosX;
|
||||
/* 0x1E18 */ s16 mMpmkPosY;
|
||||
/* 0x1E1A */ s16 mMpmkSizeX;
|
||||
/* 0x1E1C */ s16 mMpmkSizeY;
|
||||
/* 0x1E1E */ s16 mMpp1PosX;
|
||||
/* 0x1E20 */ s16 mMpp1PosY;
|
||||
/* 0x1E22 */ s16 mMpp1SizeX;
|
||||
/* 0x1E24 */ s16 mMpp1SizeY;
|
||||
/* 0x1E26 */ s16 mMppGapY;
|
||||
/* 0x1E28 */ s16 mLnkTimer2;
|
||||
/* 0x1E2A */ s16 mLnkTimer1;
|
||||
/* 0x1E2C */ s16 mBossEyeTimer;
|
||||
/* 0x1E2E */ u8 mSelectItem;
|
||||
/* 0x1E2F */ u8 mCurFloor;
|
||||
/* 0x1E30 */ u8 mBossFloor;
|
||||
/* 0x1E31 */ u8 mTopFloor;
|
||||
/* 0x1E32 */ u8 mBottomFloor;
|
||||
/* 0x1E33 */ bool mLnkTexFlip2;
|
||||
/* 0x1E34 */ bool mLnkTexFlip1;
|
||||
/* 0x1E35 */ bool mCurFloorOnly;
|
||||
/* 0x1E36 */ u8 mBossEyeState;
|
||||
}; // Size: 0x1E38
|
||||
|
||||
STATIC_ASSERT(sizeof(dMenu_Dmap_c) == 0x1E38);
|
||||
|
||||
class dMd_HIO_c {
|
||||
class dMd_HIO_c : public JORReflexible {
|
||||
public:
|
||||
dMd_HIO_c();
|
||||
};
|
||||
virtual ~dMd_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext*) {}
|
||||
|
||||
public:
|
||||
/* 0x04 */ s8 mNo;
|
||||
/* 0x06 */ s16 mBossOfsX;
|
||||
/* 0x08 */ s16 mBossOfsY;
|
||||
/* 0x0A */ s16 mTreasureWidth;
|
||||
/* 0x0C */ s16 mTreasureHeight;
|
||||
/* 0x0E */ u8 padding_0x0E[0x10 - 0x0E];
|
||||
/* 0x10 */ JUtility::TColor mTreasureWhite;
|
||||
/* 0x14 */ JUtility::TColor mTreasureBlack;
|
||||
/* 0x18 */ s16 mBossWidth;
|
||||
/* 0x1A */ s16 mBossHeight;
|
||||
/* 0x1C */ JUtility::TColor mBossWhite;
|
||||
/* 0x20 */ JUtility::TColor mBossBlack;
|
||||
/* 0x24 */ s16 mDoorWidth;
|
||||
/* 0x26 */ s16 mDoorHeight;
|
||||
/* 0x28 */ JUtility::TColor mDoorWhite;
|
||||
/* 0x2C */ JUtility::TColor mDoorBlack;
|
||||
/* 0x30 */ s16 mNpcWidth;
|
||||
/* 0x32 */ s16 mNpcHeight;
|
||||
/* 0x34 */ JUtility::TColor mNpcWhite;
|
||||
/* 0x38 */ JUtility::TColor mNpcBlack;
|
||||
/* 0x3C */ s16 mBossUpTime;
|
||||
/* 0x3E */ s16 mBossWaitTime;
|
||||
/* 0x40 */ s16 mBossDownTime;
|
||||
/* 0x42 */ s16 mBossMoveTime1;
|
||||
/* 0x44 */ s16 mBossMoveTime2;
|
||||
/* 0x46 */ s16 mBossMoveTime3;
|
||||
/* 0x48 */ s16 mBossMoveTime4;
|
||||
}; // Size: 0x4C
|
||||
|
||||
STATIC_ASSERT(sizeof(dMd_HIO_c) == 0x4C);
|
||||
|
||||
extern dMd_HIO_c g_mdHIO;
|
||||
|
||||
#endif /* D_MENU_DMAP_H */
|
||||
|
||||
+7
-3
@@ -314,9 +314,9 @@ struct dStage_Lbnk_c {
|
||||
|
||||
// DMAP
|
||||
struct dStage_DMap_dt_c {
|
||||
/* 0x00 */ int field_0x00;
|
||||
/* 0x04 */ int field_0x04;
|
||||
/* 0x08 */ int field_0x08;
|
||||
/* 0x00 */ f32 originX;
|
||||
/* 0x04 */ f32 originZ;
|
||||
/* 0x08 */ f32 scale;
|
||||
/* 0x0C */ f32 offsetY;
|
||||
}; // Size: 0x10
|
||||
|
||||
@@ -999,6 +999,10 @@ struct FuncTable {
|
||||
dStage_Func function;
|
||||
};
|
||||
|
||||
|
||||
dStage_KeepTresureInfo* dStage_GetKeepTresureInfo();
|
||||
dStage_KeepDoorInfo * dStage_GetKeepDoorInfo();
|
||||
|
||||
s8 dStage_roomRead_dt_c_GetReverbStage(roomRead_class&, int);
|
||||
int dStage_mapInfo_GetOceanZ(stage_map_info_class*);
|
||||
int dStage_mapInfo_GetOceanX(stage_map_info_class*);
|
||||
|
||||
+1854
-43
File diff suppressed because it is too large
Load Diff
@@ -529,7 +529,7 @@ void dMs_dmap_create(sub_ms_screen_class* i_Ms) {
|
||||
JUT_ASSERT(2480, dMd_c != NULL);
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
dMd_c->arr_0x1AFC[i] = i_Ms->buffer_p[i];
|
||||
dMd_c->mpTIMG[i] = (ResTIMG*)i_Ms->buffer_p[i];
|
||||
}
|
||||
|
||||
dMd_c->setArchive(i_Ms->arc);
|
||||
|
||||
Reference in New Issue
Block a user