d_menu_fmap Progress (#1148)

* class model

* g_mfHIO

* more progress

* more matching

* menu interactions

* zoom functions

* zoom map alpha set

* zoom 200

* more zooms

* gship

* inlines

* g_cursorTable and best practices

* create

* some screenSet and rodata

* worst constructor ever

* review cleanup

* forgot a file

* undo fmap_sv type changes

* wrapSelWarp

* .data renames

* initialize()

* displayinit()

* calcGetMapCount

* dispEndSalvageMark()

* checkMarks

* pane fns

* selMaskAlphaCtrl()

* salvage/are txt chgs

* checkMarkCheck3 and CursorAnime fns

* collapse arrays

* setDspWindAngle()

* windArrowColorAnime()

* checkMarkAnime(), setDispIslandPos()

* setDspNormalMapLink()

* setDspLargeMapLink()

* Added enums, NULL checks for pointers, remove inlines
This commit is contained in:
Teddy Heidmann
2026-08-23 15:56:14 -07:00
committed by GitHub
parent 4b9a87e0f8
commit a2817a5702
12 changed files with 2392 additions and 316 deletions
+2 -2
View File
@@ -248,7 +248,7 @@ cPhs_State daGhostship_c::_create() {
getArg();
if((s32)dComIfGs_getEventReg(dSv_event_flag_c::UNK_8803) == 3) {
if((s32)dComIfGs_getEventReg(dSv_event_flag_c::GHOST_SHIP) == 3) {
return cPhs_ERROR_e;
}
@@ -354,7 +354,7 @@ bool daGhostship_c::_execute() {
}
if(mAlpha == l_HIO.shipAlpha && dist < l_HIO.shipEnterDist) {
u8 r29 = dComIfGs_getEventReg(dSv_event_flag_c::UNK_8803);
u8 r29 = dComIfGs_getEventReg(dSv_event_flag_c::GHOST_SHIP);
if (r29 < 3
#if VERSION > VERSION_DEMO
&& !mbEnteredShip
+3 -3
View File
@@ -29,13 +29,13 @@ void daTag_Gship_c::modeClearWait() {
/* 000001C0-00000214 .text modeClearEventInit__13daTag_Gship_cFv */
void daTag_Gship_c::modeClearEventInit() {
u8 reg = dComIfGs_getEventReg(dSv_event_flag_c::UNK_8803);
u8 reg = dComIfGs_getEventReg(dSv_event_flag_c::GHOST_SHIP);
#if VERSION == VERSION_DEMO
reg += 1;
#else
reg = 3;
#endif
dComIfGs_setEventReg(dSv_event_flag_c::UNK_8803, reg);
dComIfGs_setEventReg(dSv_event_flag_c::GHOST_SHIP, reg);
}
/* 00000214-00000418 .text modeClearEvent__13daTag_Gship_cFv */
@@ -43,7 +43,7 @@ void daTag_Gship_c::modeClearEvent() {
if(eventInfo.checkCommandDemoAccrpt()) {
int staffIdx = dComIfGp_evmng_getMyStaffId("PScnChg");
if(strcmp(dComIfGp_getPEvtManager()->getMyNowCutName(staffIdx), "WARAIGOE") == 0) {
if(dComIfGs_getEventReg(dSv_event_flag_c::UNK_8803) == 3) {
if(dComIfGs_getEventReg(dSv_event_flag_c::GHOST_SHIP) == 3) {
mDoAud_seStart(JA_SE_CV_G_SHIP_SCREAM);
} else {
mDoAud_seStart(JA_SE_CV_G_SHIP_LAUGH);
+21 -5
View File
@@ -95,7 +95,7 @@ f32 dMap_c::mEnlargementSizeCenterZ;
f32 dMap_c::mEnlargementSizeScaleX;
f32 dMap_c::mEnlargementSizeScaleZ;
u8 dMap_c::mFmapChkPntValue;
int dMap_c::mFmapChkPntData_p;
FmapChkPnt* dMap_c::mFmapChkPntData_p;
s16 dMap_c::mDispPosLeftUpX;
s16 dMap_c::mDispPosLeftUpY;
s16 dMap_c::mDispSizeX;
@@ -1664,8 +1664,17 @@ void dMap_c::point2GridAndLocal(f32 param_1, f32 param_2, s8* i_gridX_p, s8* i_g
}
/* 8004ABB0-8004AC44 .text getCheckPointUseGrid__6dMap_cFScSc */
void dMap_c::getCheckPointUseGrid(s8, s8) {
/* Nonmatching */
int dMap_c::getCheckPointUseGrid(s8 i_x, s8 i_y) {
FmapChkPnt* pChkPnt = getFmapChkPntDtPnt(0);
int i;
int ret = -1;
for (i = 0; i < mFmapChkPntValue; i++, pChkPnt++) {
if (i_x == pChkPnt->mSectorX && i_y == pChkPnt->mSectorY) {
ret = i;
break;
}
}
return ret;
}
/* 8004AC44-8004ACD8 .text getFmapChkPntPrm__6dMap_cFiPScPScPsPsPUc */
@@ -1679,8 +1688,15 @@ void dMap_c::setFmapChkDtPrm() {
}
/* 8004AD00-8004ADC8 .text getFmapChkPntDtPnt__6dMap_cFi */
void dMap_c::getFmapChkPntDtPnt(int) {
/* Nonmatching */
FmapChkPnt* dMap_c::getFmapChkPntDtPnt(int i_param) {
JUT_ASSERT(6075, mFmapChkPntData_p != 0);
FmapChkPnt* ret = NULL;
if (i_param >= 0 && i_param <= mFmapChkPntValue) {
ret = &mFmapChkPntData_p[i_param];
} else {
JUT_ASSERT(6082, 0)
};
return ret;
}
/* 8004ADC8-8004AE28 .text initPoint__6dMap_cFv */
+1764 -142
View File
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -242,12 +242,12 @@ void dMenu_Fmap2_c::ChangeProcMode() {
}
/* 801C36C8-801C376C .text _open__13dMenu_Fmap2_cFv */
void dMenu_Fmap2_c::_open() {
bool dMenu_Fmap2_c::_open() {
/* Nonmatching */
}
/* 801C376C-801C3858 .text _close__13dMenu_Fmap2_cFv */
void dMenu_Fmap2_c::_close() {
bool dMenu_Fmap2_c::_close() {
/* Nonmatching */
}
@@ -512,7 +512,7 @@ void dMenu_Fmap2_c::getNowCmapNextNum(signed char, int) {
}
/* 801C7364-801C73B0 .text getCmapDatPnt4__13dMenu_Fmap2_cFi */
void dMenu_Fmap2_c::getCmapDatPnt4(int) {
aramCmapDatPat_t* dMenu_Fmap2_c::getCmapDatPnt4(int) {
/* Nonmatching */
}
@@ -527,8 +527,9 @@ void dMenu_Fmap2_c::readFmapTexture(const char*) {
}
/* 801C74B4-801C756C .text getButtonIconMode__13dMenu_Fmap2_cFv */
void dMenu_Fmap2_c::getButtonIconMode() {
int dMenu_Fmap2_c::getButtonIconMode() {
/* Nonmatching */
return 0;
}
/* 801C756C-801C7574 .text isLockBbutton__13dMenu_Fmap2_cFv */
+12 -12
View File
@@ -1539,18 +1539,18 @@ static cPhs_State dMs_Create(msg_class* i_this) {
dMenu_setMenuStatus(MENU_STATUS_ITEM);
dMv_CIO_c.field_0x0 = 0;
dMv_CIO_c.field_0x1 = 0;
dMv_CIO_c.field_0x2 = -10;
dMv_CIO_c.field_0x3 = -10;
dMv_CIO_c.field_0x4 = -10;
dMv_CIO_c.field_0x5 = -10;
dMv_CIO_c.field_0x6 = -10;
dMv_CIO_c.field_0x7 = -10;
dMv_CIO_c.field_0x8 = 0;
dMv_CIO_c.field_0x9 = -1;
dMv_CIO_c.field_0xA = -10;
dMv_CIO_c.field_0xB = -10;
dMv_CIO_c.active = 0;
dMv_CIO_c.cmapSelNo = 0;
dMv_CIO_c.curX = -10;
dMv_CIO_c.curY = -10;
dMv_CIO_c.curWX = -10;
dMv_CIO_c.curWY = -10;
dMv_CIO_c.curHX = -10;
dMv_CIO_c.curHY = -10;
dMv_CIO_c.dispMode = 0;
dMv_CIO_c.fmapZoom = -1;
dMv_CIO_c.zoomGridX = -10;
dMv_CIO_c.zoomGridY = -10;
fopMsgM_setStageLayer(i_Ms);