mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-18 12:52:51 -04:00
match debug for D_menu_fmap2_d (#2925)
* menu_fmap2d debug progress * match debug for d_menu_fmap2D * fix broken function * fix weird shield mismatch * fix other shield mismatch * fix suggestions * fix func for wii version * match func for all versions * remove cast from saveBitLabels
This commit is contained in:
@@ -1089,7 +1089,7 @@ inline int daDemo00_c::execute() {
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[sp0E]);
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[sp0E]);
|
||||
break;
|
||||
|
||||
case 2: {
|
||||
|
||||
@@ -730,7 +730,7 @@ void daE_HP_c::executeDead() {
|
||||
field_0x784 = -1;
|
||||
|
||||
if (dComIfGs_getPohSpiritNum() == 20) {
|
||||
dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1c9]);
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1c9]);
|
||||
}
|
||||
|
||||
movemode++;
|
||||
|
||||
@@ -4277,7 +4277,7 @@ static int daE_RDY_Execute(e_rdy_class* i_this) {
|
||||
}
|
||||
}
|
||||
|
||||
if (i_this->field_0x5b8 == 12 && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[239] & 0xffff)) {
|
||||
if (i_this->field_0x5b8 == 12 && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[239])) {
|
||||
fopAcM_OffStatus(a_this, 0);
|
||||
a_this->attention_info.flags = 0;
|
||||
return 1;
|
||||
|
||||
@@ -522,7 +522,7 @@ void daKago_c::demo_skip(int param_0) {
|
||||
setPlayerRideOn();
|
||||
field_0x718 = field_0x71a = 0;
|
||||
/* dSv_event_flag_c::M_051 - Main Event - Shadow Kargorok (?) (Large) event complete (Horse grass appears in various places) */
|
||||
dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[84]);
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[84]);
|
||||
field_0x748 = 7;
|
||||
field_0x74c = NULL;
|
||||
break;
|
||||
|
||||
@@ -27,7 +27,7 @@ static int daKytag14_Execute(kytag14_class* i_this) {
|
||||
}
|
||||
|
||||
if (i_this->mEventID1 != 0xFFFF) {
|
||||
if (dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[i_this->mEventID1])) {
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_this->mEventID1])) {
|
||||
event1_set = true;
|
||||
} else {
|
||||
event1_set = false;
|
||||
@@ -35,7 +35,7 @@ static int daKytag14_Execute(kytag14_class* i_this) {
|
||||
}
|
||||
|
||||
if (i_this->mEventID2 != 0xFFFF) {
|
||||
if (!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[i_this->mEventID2])) {
|
||||
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_this->mEventID2])) {
|
||||
event2_unset = true;
|
||||
} else {
|
||||
event2_unset = false;
|
||||
|
||||
@@ -2570,7 +2570,7 @@ static void lure_catch(dmg_rod_class* i_this) {
|
||||
}
|
||||
|
||||
if (i_this->play_cam_timer == 40) {
|
||||
if (!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[467])) {
|
||||
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[467])) {
|
||||
Z2GetAudioMgr()->subBgmStart(Z2BGM_FISHING_GET1);
|
||||
} else if (fish_kind == 3) {
|
||||
Z2GetAudioMgr()->subBgmStart(Z2BGM_FISHING_GET3);
|
||||
@@ -2582,7 +2582,7 @@ static void lure_catch(dmg_rod_class* i_this) {
|
||||
} else if (i_this->play_cam_timer == 80) {
|
||||
u8 sp8 = 1;
|
||||
if (i_this->field_0x14c0 != 0) {
|
||||
if (!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[467])) {
|
||||
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[467])) {
|
||||
sp8 = 2;
|
||||
} else if (fish_kind != 3) {
|
||||
sp8 = 2;
|
||||
@@ -2609,7 +2609,7 @@ static void lure_catch(dmg_rod_class* i_this) {
|
||||
data_80450C9A = 200;
|
||||
}
|
||||
|
||||
dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[467]);
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[467]);
|
||||
|
||||
static u16 catch_msgn_20[] = {0x02CE, 0x02D1, 0x02CF, 0x02D0};
|
||||
static u16 catch_msgn_21[] = {0x02D2, 0x02D5, 0x02D3, 0x02D4};
|
||||
@@ -4921,7 +4921,7 @@ static void play_camera(dmg_rod_class* i_this) {
|
||||
i_this->msgflow.init(actor, 0x2C9, 0, NULL);
|
||||
henna->field_0x6ba = 50;
|
||||
henna->field_0x7b8 = 0;
|
||||
} else if (!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[467])) {
|
||||
} else if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[467])) {
|
||||
if (i_this->field_0x1470 == 0) {
|
||||
sp174.x = -2800.0f;
|
||||
sp174.z = 4608.0f;
|
||||
@@ -4998,11 +4998,11 @@ static void play_camera(dmg_rod_class* i_this) {
|
||||
) {
|
||||
int sp20 = 0;
|
||||
int sp1C = 1;
|
||||
if (dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[466])) {
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[466])) {
|
||||
sp20 = 1;
|
||||
}
|
||||
|
||||
if (dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[469])) {
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[469])) {
|
||||
sp1C = 0;
|
||||
}
|
||||
|
||||
@@ -5195,7 +5195,7 @@ static void play_camera(dmg_rod_class* i_this) {
|
||||
camera->mCamera.SetTrimSize(0);
|
||||
i_this->play_cam_mode = 0;
|
||||
i_this->field_0x146c = 30;
|
||||
dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[466]);
|
||||
dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[466]);
|
||||
i_this->field_0xf81 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2897,15 +2897,15 @@ u8 daNpcT_getDistTableIdx(int param_0, int param_1) {
|
||||
}
|
||||
|
||||
void daNpcT_onEvtBit(u32 i_no) {
|
||||
dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
}
|
||||
|
||||
void daNpcT_offEvtBit(u32 i_no) {
|
||||
dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
}
|
||||
|
||||
BOOL daNpcT_chkEvtBit(u32 i_no) {
|
||||
return dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
return dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
}
|
||||
|
||||
void daNpcT_onTmpBit(u32 i_no) {
|
||||
|
||||
@@ -1848,11 +1848,11 @@ s16 daNpcF_getGroundAngle(cBgS_PolyInfo* param_0, s16 param_1) {
|
||||
}
|
||||
|
||||
BOOL daNpcF_chkEvtBit(u32 i_no) {
|
||||
return dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
return dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
}
|
||||
|
||||
void daNpcF_onEvtBit(u32 i_no) {
|
||||
dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
}
|
||||
|
||||
BOOL daNpcF_chkTmpBit(u32 i_no) {
|
||||
|
||||
@@ -2383,7 +2383,7 @@ int daNpcChat_c::getObjNum() {
|
||||
}
|
||||
|
||||
// dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town
|
||||
if (dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[281]) &&
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[281]) &&
|
||||
objNum == OBJ_CELEB_BAG_M) {
|
||||
objNum = OBJ_MARO_BAG_M;
|
||||
}
|
||||
@@ -2427,7 +2427,7 @@ int daNpcChat_c::getObjNum() {
|
||||
}
|
||||
|
||||
// dSv_event_flag_c::F_0281 - Shop - Malo Mart opens in Castle Town
|
||||
if (dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[281]) &&
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[281]) &&
|
||||
objNum == OBJ_CELEB_BAG_W) {
|
||||
objNum = OBJ_MARO_BAG_W;
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ static void henna_shop(npc_henna_class* i_this) {
|
||||
}
|
||||
cLib_addCalcAngleS2(&i_this->actor.current.angle.y, i_this->field_0x618, 2, unkInt1);
|
||||
/* dSv_event_flag_c::F_0461 - Fishing Pond - First time entered fishing house */
|
||||
if ((!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[461]) || data_80450C9C != 0) &&
|
||||
if ((!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[461]) || data_80450C9C != 0) &&
|
||||
i_this->field_0x7d7 == 0 && i_this->field_0x6a0 == 56 + TREG_S(7))
|
||||
{
|
||||
dComIfGp_event_reset();
|
||||
@@ -388,7 +388,7 @@ static void henna_shop(npc_henna_class* i_this) {
|
||||
i_this->cam_mode = 60;
|
||||
} else {
|
||||
/* dSv_event_flag_c::F_0461 - Fishing Pond - First time entered fishing house */
|
||||
dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[461]);
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[461]);
|
||||
i_this->cam_mode = 1;
|
||||
}
|
||||
i_this->field_0x7d7 = 1;
|
||||
@@ -890,9 +890,9 @@ static void demo_camera(npc_henna_class* i_this) {
|
||||
i_this->cam_mode = 0;
|
||||
}
|
||||
/* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */
|
||||
dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1cf]);
|
||||
dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[0x1cf]);
|
||||
/* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */
|
||||
dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1d0]);
|
||||
dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[0x1d0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -994,7 +994,7 @@ static void demo_camera_shop(npc_henna_class* i_this) {
|
||||
|
||||
if (!dComIfGp_event_runCheck()
|
||||
/* dSv_event_flag_c::F_0465 - Fishing Pond - Reserved for fishing */
|
||||
&& !dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1d1]))
|
||||
&& !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d1]))
|
||||
{
|
||||
i_this->field_0x756++;
|
||||
if (i_this->field_0x756 < 200) {
|
||||
@@ -2728,9 +2728,9 @@ static int daNpc_Henna_Create(fopAc_ac_c* i_this) {
|
||||
}
|
||||
}
|
||||
/* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */
|
||||
dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1cf]);
|
||||
dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[0x1cf]);
|
||||
/* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */
|
||||
dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1d0]);
|
||||
dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[0x1d0]);
|
||||
a_this->field_0x618 = i_this->shape_angle.y = i_this->current.angle.y = newAngle;
|
||||
lbl_82_bss_91 = dComIfGs_getEventReg(0xf63f);
|
||||
daNpc_Henna_Execute(a_this);
|
||||
@@ -2775,7 +2775,7 @@ static int daNpc_Henna_Create(fopAc_ac_c* i_this) {
|
||||
NULL, -1);
|
||||
data_80450C99 = 0;
|
||||
/* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */
|
||||
if (!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1cf])) {
|
||||
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1cf])) {
|
||||
a_this->field_0x70a = 4;
|
||||
a_this->field_0x734 = 1;
|
||||
} else {
|
||||
|
||||
@@ -5818,7 +5818,7 @@ static int npc_ks_fsdemo(npc_ks_class* i_this) {
|
||||
|
||||
switch (i_this->mMode) {
|
||||
case 0:
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x220] & 0xFFFF)) {
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x220])) {
|
||||
i_this->mMode = 40;
|
||||
} else {
|
||||
fpcM_Search(s_fs_sub, i_this);
|
||||
@@ -6628,7 +6628,7 @@ static void kantera_sub(npc_ks_class* i_this) {
|
||||
fopAcM_cancelCarryNow(a_this);
|
||||
cLib_offBit<u32>(a_this->attention_info.flags, fopAc_AttnFlag_CARRY_e);
|
||||
i_this->field_0xc17 = 0;
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0xE2] & 0xFFFF);
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0xE2]);
|
||||
} else {
|
||||
i_this->field_0xc04.x = -30715.0f + AREG_F(8);
|
||||
i_this->field_0xc04.z = -17200.0f + AREG_F(9);
|
||||
@@ -7260,7 +7260,7 @@ static BOOL start_check(npc_ks_class* i_this) {
|
||||
break;
|
||||
|
||||
case 21:
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x20A] & 0xFFFF)) {
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x20A])) {
|
||||
rv = FALSE;
|
||||
} else {
|
||||
i_this->mActionID = 301;
|
||||
@@ -7268,7 +7268,7 @@ static BOOL start_check(npc_ks_class* i_this) {
|
||||
break;
|
||||
|
||||
case 22:
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x241] & 0xFFFF)) {
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x241])) {
|
||||
rv = FALSE;
|
||||
} else {
|
||||
i_this->mActionID = 302;
|
||||
|
||||
@@ -83,7 +83,7 @@ static int daObj_Ihasi_Execute(obj_ihasi_class* i_this) {
|
||||
dComIfG_Bgsp().Release(i_this->mpBgW);
|
||||
i_this->mpBgW = NULL;
|
||||
/* dSv_event_flag_c::M_050 - Main Event - Eldin Bridge disappears */
|
||||
dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[0x53]);
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x53]);
|
||||
}
|
||||
|
||||
action(i_this);
|
||||
@@ -162,7 +162,7 @@ static int daObj_Ihasi_Create(fopAc_ac_c* i_actor) {
|
||||
csXyz angle;
|
||||
|
||||
/* dSv_event_flag_c::M_050 - Main Event - Eldin Bridge disappears */
|
||||
if (dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[0x53])) {
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x53])) {
|
||||
angle.set(0x0, -0x8000, 0x0);
|
||||
pos.set(34750.0f, -300.0f, -44000.0f);
|
||||
|
||||
|
||||
@@ -734,9 +734,9 @@ u8 daObjKAM_c::CreateChk() {
|
||||
if (field_0x9c0 != 2) {
|
||||
if (unkInt1 != 0) {
|
||||
if (!dComIfGs_isEventBit(
|
||||
(u16)dSv_event_flag_c::saveBitLabels[l_musiya_num[SEX_MALE]]) ||
|
||||
dSv_event_flag_c::saveBitLabels[l_musiya_num[SEX_MALE]]) ||
|
||||
!dComIfGs_isEventBit(
|
||||
(u16)dSv_event_flag_c::saveBitLabels[l_musiya_num[SEX_FEMALE]]))
|
||||
dSv_event_flag_c::saveBitLabels[l_musiya_num[SEX_FEMALE]]))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -750,10 +750,10 @@ u8 daObjKAM_c::CreateChk() {
|
||||
|
||||
if (mSex == SEX_MALE &&
|
||||
!dComIfGs_isEventBit(
|
||||
(u16)dSv_event_flag_c::saveBitLabels[l_musiya_num[mSex]]) ||
|
||||
dSv_event_flag_c::saveBitLabels[l_musiya_num[mSex]]) ||
|
||||
mSex == SEX_FEMALE &&
|
||||
!dComIfGs_isEventBit(
|
||||
(u16)dSv_event_flag_c::saveBitLabels[l_musiya_num[mSex]]))
|
||||
dSv_event_flag_c::saveBitLabels[l_musiya_num[mSex]]))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -665,10 +665,10 @@ bool daObjKAT_c::CreateChk() {
|
||||
}
|
||||
if (field_0x808 != 2) {
|
||||
if (uVar4) {
|
||||
if (dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[l_musiya_num[SEX_MALE]]) ==
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[l_musiya_num[SEX_MALE]]) ==
|
||||
0 ||
|
||||
dComIfGs_isEventBit(
|
||||
(u16)dSv_event_flag_c::saveBitLabels[l_musiya_num[SEX_FEMALE]]) == 0)
|
||||
dSv_event_flag_c::saveBitLabels[l_musiya_num[SEX_FEMALE]]) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -681,10 +681,10 @@ bool daObjKAT_c::CreateChk() {
|
||||
}
|
||||
if ((mSex == SEX_MALE &&
|
||||
dComIfGs_isEventBit(
|
||||
(u16)dSv_event_flag_c::saveBitLabels[l_musiya_num[mSex]]) == 0) ||
|
||||
dSv_event_flag_c::saveBitLabels[l_musiya_num[mSex]]) == 0) ||
|
||||
(mSex == SEX_FEMALE &&
|
||||
dComIfGs_isEventBit(
|
||||
(u16)dSv_event_flag_c::saveBitLabels[l_musiya_num[mSex]]) == 0))
|
||||
dSv_event_flag_c::saveBitLabels[l_musiya_num[mSex]]) == 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -592,7 +592,7 @@ void daObjVolcBom_c::actionWait() {
|
||||
if (checkTalkDistance()
|
||||
/* dSv_event_flag_c::M_051 - Main Event - Shadow Kargorok (?) (Large) event complete
|
||||
(Horse grass appears in various places) */
|
||||
&& dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[84])) {
|
||||
&& dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[84])) {
|
||||
setAction(ACTION_ORDER_EVENT);
|
||||
actionOrderEvent();
|
||||
}
|
||||
|
||||
@@ -22,12 +22,12 @@ int daScex_c::checkWork() {
|
||||
}
|
||||
|
||||
u16 eventBit = getOffEventBit();
|
||||
if (eventBit != 0x0FFF && dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[eventBit])) {
|
||||
if (eventBit != 0x0FFF && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[eventBit])) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
eventBit = getOnEventBit();
|
||||
if (eventBit != 0x0FFF && !dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[eventBit])) {
|
||||
if (eventBit != 0x0FFF && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[eventBit])) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user