ChkBit comments and enum work (#2571)

* Jagar cleanup

* saru work

* e_fm work

* gob enum added

* gob cleanup

* gob anm enums

* dComIfGs_isEventBit comments added

* More bit work and besu enum work

* Maybe fixed the issue?
This commit is contained in:
Carco_21
2025-08-08 14:39:26 -04:00
committed by GitHub
parent 7df70ce3ca
commit 427643edd2
114 changed files with 2680 additions and 1153 deletions
+36 -11
View File
@@ -366,7 +366,9 @@ static void henna_shop(npc_henna_class* i_this) {
i_this->field_0x618 = cM_atan2s(dX, dZ);
}
cLib_addCalcAngleS2(&i_this->actor.current.angle.y, i_this->field_0x618, 2, unkInt1);
if ((!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[461]) || data_80450C9C != 0) &&
/* 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) &&
i_this->field_0x7d7 == 0 && i_this->field_0x6a0 == 56 + TREG_S(7))
{
dComIfGp_event_reset();
@@ -374,6 +376,7 @@ static void henna_shop(npc_henna_class* i_this) {
data_80450C9C = 0;
i_this->field_0x752 = 60;
} else {
/* dSv_event_flag_c::F_0461 - Fishing Pond - First time entered fishing house */
dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[461]);
i_this->field_0x752 = 1;
}
@@ -878,6 +881,7 @@ static void demo_camera(npc_henna_class* i_this) {
dComIfGp_event_reset();
daPy_py_c* player = daPy_getPlayerActorClass();
player->cancelOriginalDemo();
/* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d0])) {
i_this->field_0x70a = 10;
i_this->field_0x70b = 0;
@@ -885,7 +889,9 @@ static void demo_camera(npc_henna_class* i_this) {
} else {
i_this->field_0x752 = 0;
}
/* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */
dComIfGs_offEventBit((u16)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]);
}
}
@@ -988,8 +994,9 @@ static void demo_camera_shop(npc_henna_class* i_this) {
u32 unkIntArr2[1];
s8 unkBool1 = FALSE;
if (dComIfGp_event_runCheck() == FALSE &&
dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1d1]) == FALSE)
if (!dComIfGp_event_runCheck()
/* dSv_event_flag_c::F_0465 - Fishing Pond - Reserved for fishing */
&& !dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[0x1d1]))
{
i_this->field_0x756++;
if (i_this->field_0x756 < 200) {
@@ -1178,12 +1185,14 @@ static void demo_camera_shop(npc_henna_class* i_this) {
anm_init(i_this, 18, -10.0f, 2, 1.0f);
i_this->field_0x5bc++;
} else {
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1ce]) == 0) {
/* dSv_event_flag_c::F_0462 - Fishing Pond - Reserved for fishing */
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1ce])) {
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1ce]);
i_this->field_0x752 = 19;
break;
}
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d1]) != 0) {
/* dSv_event_flag_c::F_0465 - Fishing Pond - Reserved for fishing */
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d1])) {
if (i_this->field_0x709 != 0) {
i_this->mMsgFlow.init(actor, 0x327, 0, NULL);
i_this->field_0x6ba = 90;
@@ -1237,15 +1246,19 @@ static void demo_camera_shop(npc_henna_class* i_this) {
if (i_this->field_0x754 == 1) {
if (i_this->field_0x752 == 12) {
if (dComIfGs_getRupee() >= 20) {
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d1]) == 0) {
/* dSv_event_flag_c::F_0465 - Fishing Pond - Reserved for fishing */
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d1])) {
i_this->mMsgFlow.init(actor, 0x32e, 0, NULL);
/* dSv_event_flag_c::F_0465 - Fishing Pond - Reserved for fishing */
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1d1]);
/* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1d0]);
data_80450CA0 = 1;
} else {
i_this->mMsgFlow.init(actor, 0x32f, 0, NULL);
}
dComIfGp_setItemRupeeCount(0xffffffec);
/* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1cf]);
i_this->field_0x5b6 = 1;
} else {
@@ -1296,7 +1309,9 @@ static void demo_camera_shop(npc_henna_class* i_this) {
if (dComIfGs_getRupee() >= 100) {
i_this->mMsgFlow.init(actor, 0x330, 0, NULL);
dComIfGp_setItemRupeeCount(-100);
/* dSv_event_flag_c::F_0463 - Fishing Pond - Reserved for fishing */
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1cf]);
/* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1d0]);
data_80450CA0 = 1;
i_this->field_0x5b6 = 1;
@@ -1455,7 +1470,8 @@ static void demo_camera_shop(npc_henna_class* i_this) {
}
break;
case 2:
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d5]) != 0) {
/* dSv_event_flag_c::F_0469 - Fishing Pond - Reserved for fishing */
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x1d5])) {
i_this->mMsgFlow.init(actor, 0x338, 0, NULL);
} else {
i_this->mMsgFlow.init(actor, 0x337, 0, NULL);
@@ -1515,7 +1531,8 @@ static void demo_camera_shop(npc_henna_class* i_this) {
i_this->mMsgFlow.init(actor, 0x33c, 0, NULL);
break;
case 0x13:
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335]) != 0) {
/* dSv_event_flag_c::KORO2_ALLCLEAR - Fishing - After all stages (8-8) of roll goal game cleared */
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335])) {
i_this->mMsgFlow.init(actor, 0x366, 0, NULL);
} else {
dComIfGp_event_offHindFlag(0x80);
@@ -1534,7 +1551,8 @@ static void demo_camera_shop(npc_henna_class* i_this) {
if (i_this->mMsgFlow.doFlow(actor, NULL, 0) != 0) {
if (i_this->field_0x7b4 == 19) {
if (dMsgObject_getSelectCursorPos() == 0) {
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335]) != 0) {
/* dSv_event_flag_c::KORO2_ALLCLEAR - Fishing - After all stages (8-8) of roll goal game cleared */
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335])) {
i_this->field_0x752 = 0x4d;
i_this->field_0x754 = 0;
mDoGph_gInf_c::fadeOut(0.1f, g_blackColor);
@@ -1872,7 +1890,8 @@ static void demo_camera_shop(npc_henna_class* i_this) {
case 74: {
if (i_this->mMsgFlow.doFlow(actor, NULL, 0) != 0) {
if (dMsgObject_getSelectCursorPos() == 0) {
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335]) != 0) {
/* dSv_event_flag_c::KORO2_ALLCLEAR - Fishing - After all stages (8-8) of roll goal game cleared */
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335])) {
i_this->field_0x754 = 0;
i_this->field_0x752 = 0x4d;
mDoGph_gInf_c::fadeOut(0.1f, g_blackColor);
@@ -1923,16 +1942,19 @@ static void demo_camera_shop(npc_henna_class* i_this) {
Z2GetAudioMgr()->subBgmStop();
}
if (i_this->field_0x754 == 10) {
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335]) != 0) {
/* dSv_event_flag_c::KORO2_ALLCLEAR - Fishing - After all stages (8-8) of roll goal game cleared */
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x335])) {
i_this->mMsgFlow.init(actor, 0x36f, 0, NULL);
} else {
if ((lbl_82_bss_91 & 7) == 0x7) {
if (lbl_82_bss_91 == 0x3f) {
i_this->mMsgFlow.init(actor, 0x365, 0, NULL);
/* dSv_event_flag_c::KORO2_ALLCLEAR - Fishing - After all stages (8-8) of roll goal game cleared */
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x335]);
dComIfGp_setItemRupeeCount(1000);
} else if ((lbl_82_bss_91 & 0x38) == 0) {
i_this->mMsgFlow.init(actor, 0x34f, 0, NULL);
/* dSv_event_flag_c::F_0469 - Fishing Pond - Reserved for fishing */
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1d5]);
} else {
i_this->mMsgFlow.init(actor, 0x34f, 0, NULL);
@@ -2713,7 +2735,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]);
/* dSv_event_flag_c::F_0464 - Fishing Pond - Reserved for fishing */
dComIfGs_offEventBit((u16)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);
@@ -2758,6 +2782,7 @@ static int daNpc_Henna_Create(fopAc_ac_c* i_this) {
fopAcM_create(PROC_NPC_TK, 0xffffffff, &npcDfPos, fopAcM_GetRoomNo(i_this), NULL,
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])) {
a_this->field_0x70a = 4;
a_this->field_0x734 = 1;