d_a_e_b +d_a_e_bi_leaf documentation (#2952)

* some e_bi documentation

* fix match issue

* fix error

* e_bi_leaf documentation
This commit is contained in:
Luzagar 2025-12-16 02:04:20 +01:00 committed by GitHub
parent 86bf768665
commit 618a3783f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 450 additions and 450 deletions

View File

@ -17,27 +17,27 @@
class e_bi_class {
public:
/* 0x000 */ fopEn_enemy_c actor;
/* 0x5AC */ request_of_phase_process_class mPhase;
/* 0x5B4 */ u8 field_0x5b4;
/* 0x5B5 */ u8 field_0x5b5;
/* 0x5B6 */ u8 field_0x5b6;
/* 0x5AC */ request_of_phase_process_class phase;
/* 0x5B4 */ u8 arg0;
/* 0x5B5 */ u8 arg1;
/* 0x5B6 */ u8 arg2;
/* 0x5B7 */ u8 field_0x5b7;
/* 0x5B8 */ mDoExt_McaMorfSO* mpModelMorf;
/* 0x5BC */ Z2CreatureEnemy mSound;
/* 0x660 */ f32 field_0x660;
/* 0x664 */ int mAnm;
/* 0x668 */ u32 mShadowKey;
/* 0x66C */ s16 field_0x66c;
/* 0x66E */ s16 mAction;
/* 0x670 */ s16 field_0x670;
/* 0x5B8 */ mDoExt_McaMorfSO* anm_p;
/* 0x5BC */ Z2CreatureEnemy sound;
/* 0x660 */ f32 disap_time;
/* 0x664 */ int anm_no;
/* 0x668 */ u32 shadow_key;
/* 0x66C */ s16 counter;
/* 0x66E */ s16 action;
/* 0x670 */ s16 mode;
/* 0x672 */ u8 field_0x672[0x680 - 0x672];
/* 0x680 */ s16 field_0x680;
/* 0x680 */ s16 target;
/* 0x682 */ u8 field_0x682[0x684 - 0x682];
/* 0x684 */ s16 field_0x684;
/* 0x688 */ f32 field_0x688;
/* 0x68C */ s16 field_0x68c[3];
/* 0x692 */ s16 field_0x692;
/* 0x694 */ s16 field_0x694;
/* 0x684 */ s16 target_angle;
/* 0x688 */ f32 dis;
/* 0x68C */ s16 timer[3];
/* 0x692 */ s16 damage_time;
/* 0x694 */ s16 ignition_time;
/* 0x696 */ s16 field_0x696;
/* 0x698 */ s16 field_0x698;
/* 0x69A */ u8 field_0x69a[0x6a2 - 0x69a];
@ -45,26 +45,26 @@ public:
/* 0x6A4 */ s16 field_0x6a4;
/* 0x6A6 */ s16 field_0x6a6;
/* 0x6A8 */ f32 field_0x6a8;
/* 0x6AC */ f32 field_0x6ac;
/* 0x6B0 */ s8 field_0x6b0;
/* 0x6B4 */ dCcD_Stts mStts;
/* 0x6F0 */ dCcD_Cyl field_0x6f0;
/* 0x82C */ dCcD_Sph field_0x82c;
/* 0x964 */ dCcU_AtInfo mAtInfo;
/* 0x6AC */ f32 water_offset;
/* 0x6B0 */ s8 leaf_id;
/* 0x6B4 */ dCcD_Stts Stts;
/* 0x6F0 */ dCcD_Cyl cc_cyl;
/* 0x82C */ dCcD_Sph at_sph;
/* 0x964 */ dCcU_AtInfo at_info;
/* 0x988 */ u8 field_0x988;
/* 0x98C */ dBgS_AcchCir mAcchCir;
/* 0x9CC */ dBgS_ObjAcch mObjAcch;
/* 0xBA4 */ fpc_ProcID field_0xba4;
/* 0xBA8 */ fpc_ProcID field_0xba8;
/* 0x98C */ dBgS_AcchCir AcchCir;
/* 0x9CC */ dBgS_ObjAcch ObjAcch;
/* 0xBA4 */ fpc_ProcID child_no;
/* 0xBA8 */ fpc_ProcID fw_id;
/* 0xBAC */ s8 field_0xbac;
/* 0xBAD */ s8 field_0xbad;
/* 0xBAD */ s8 ride_time;
/* 0xBB0 */ cXyz field_0xbb0;
/* 0xBBC */ u8 field_0xbbc[0xbc4 - 0xbbc];
/* 0xBC4 */ u32 field_0xbc4[5];
/* 0xBD8 */ u32 field_0xbd8[4];
/* 0xBC4 */ u32 ex_eff[5];
/* 0xBD8 */ u32 w_eff[4];
/* 0xBE8 */ u32 field_0xbe8;
/* 0xBEC */ u8 field_0xbec[0xbfc - 0xbec];
/* 0xBFC */ u8 field_0xbfc;
/* 0xBFC */ u8 hio_init;
};
STATIC_ASSERT(sizeof(e_bi_class) == 0xc00);

View File

@ -13,11 +13,11 @@
*/
class e_bi_leaf_class : public fopEn_enemy_c {
public:
/* 0x5AC */ request_of_phase_process_class mPhase;
/* 0x5B4 */ u8 field_0x5b4;
/* 0x5B8 */ J3DModel* mpModel;
/* 0x5BC */ s16 mAction;
/* 0x5BE */ s16 mTimer;
/* 0x5AC */ request_of_phase_process_class phase;
/* 0x5B4 */ u8 type;
/* 0x5B8 */ J3DModel* model;
/* 0x5BC */ s16 action;
/* 0x5BE */ s16 timer;
/* 0x5C0 */ u8 field_0x5c0[0x5D0 - 0x5C0];
};

File diff suppressed because it is too large Load Diff

View File

@ -9,62 +9,62 @@
#include "d/d_com_inf_game.h"
static int daE_BI_LEAF_Draw(e_bi_leaf_class* i_this) {
if (i_this->field_0x5b4 == 1) {
if (i_this->type == 1) {
return 1;
}
g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr);
g_env_light.setLightTevColorType_MAJI(i_this->mpModel, &i_this->tevStr);
mDoExt_modelUpdateDL(i_this->mpModel);
g_env_light.setLightTevColorType_MAJI(i_this->model, &i_this->tevStr);
mDoExt_modelUpdateDL(i_this->model);
return 1;
}
static void action(e_bi_leaf_class* i_this) {
switch (i_this->mAction) {
switch (i_this->action) {
case 0:
if (i_this->mTimer == 0) {
if (i_this->timer == 0) {
fopAc_ac_c* parent_p = fopAcM_SearchByID(i_this->parentActorID);
if (parent_p == NULL) {
OS_REPORT("//////////////LEAF ID 2 %d\n", i_this->parentActorID);
if (fopAcM_GetRoomNo(i_this) == 50) {
i_this->mTimer = 90;
i_this->timer = 90;
} else {
i_this->mTimer = 60;
i_this->timer = 60;
}
i_this->mAction = 1;
i_this->action = 1;
}
}
break;
case 1:
if (i_this->mTimer == 0) {
i_this->mAction = 0;
if (i_this->timer == 0) {
i_this->action = 0;
i_this->parentActorID =
fopAcM_createChild(PROC_E_BI, fopAcM_GetID(i_this), (i_this->field_0x5b4 << 8) | 1,
fopAcM_createChild(PROC_E_BI, fopAcM_GetID(i_this), (i_this->type << 8) | 1,
&i_this->current.pos, fopAcM_GetRoomNo(i_this),
&i_this->current.angle, NULL, -1, NULL);
i_this->mTimer = 20;
i_this->timer = 20;
}
break;
}
}
static int daE_BI_LEAF_Execute(e_bi_leaf_class* i_this) {
if (i_this->mTimer != 0) {
i_this->mTimer--;
if (i_this->timer != 0) {
i_this->timer--;
}
action(i_this);
if (i_this->field_0x5b4 == 1) {
if (i_this->type == 1) {
return 1;
}
mDoMtx_stack_c::transS(i_this->current.pos.x, i_this->current.pos.y, i_this->current.pos.z);
mDoMtx_stack_c::YrotM(i_this->shape_angle.y);
i_this->mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
i_this->model->setBaseTRMtx(mDoMtx_stack_c::get());
return 1;
}
@ -73,19 +73,19 @@ static int daE_BI_LEAF_IsDelete(e_bi_leaf_class* i_this) {
}
static int daE_BI_LEAF_Delete(e_bi_leaf_class* i_this) {
dComIfG_resDelete(&i_this->mPhase, "E_BI");
dComIfG_resDelete(&i_this->phase, "E_BI");
return 1;
}
static int useHeapInit(fopAc_ac_c* i_this) {
e_bi_leaf_class* a_this = static_cast<e_bi_leaf_class*>(i_this);
static int useHeapInit(fopAc_ac_c* actor) {
e_bi_leaf_class* i_this = static_cast<e_bi_leaf_class*>(actor);
if (a_this->field_0x5b4 != 1) {
if (i_this->type != 1) {
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("E_BI", 15);
JUT_ASSERT(0, modelData != NULL);
a_this->mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
if (a_this->mpModel == NULL) {
i_this->model = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
if (i_this->model == NULL) {
return 0;
}
}
@ -93,24 +93,24 @@ static int useHeapInit(fopAc_ac_c* i_this) {
return 1;
}
static int daE_BI_LEAF_Create(fopAc_ac_c* i_this) {
e_bi_leaf_class* a_this = static_cast<e_bi_leaf_class*>(i_this);
fopAcM_ct(a_this, e_bi_leaf_class);
static int daE_BI_LEAF_Create(fopAc_ac_c* actor) {
e_bi_leaf_class* i_this = static_cast<e_bi_leaf_class*>(actor);
fopAcM_ct(i_this, e_bi_leaf_class);
int phase_state = dComIfG_resLoad(&a_this->mPhase, "E_BI");
int phase_state = dComIfG_resLoad(&i_this->phase, "E_BI");
if (phase_state == cPhs_COMPLEATE_e) {
a_this->field_0x5b4 = fopAcM_GetParam(a_this) & 0xFF;
i_this->type = fopAcM_GetParam(i_this) & 0xFF;
OS_REPORT("E_BI_LEAF//////////////E_BI_LEAF SET 1 !!\n");
if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0xA00)) {
if (!fopAcM_entrySolidHeap(i_this, useHeapInit, 0xA00)) {
OS_REPORT("//////////////E_BI_LEAF SET NON !!\n");
return cPhs_ERROR_e;
}
OS_REPORT("//////////////E_BI_LEAF SET 2 !!\n");
fopAcM_SetMtx(a_this, a_this->mpModel->getBaseTRMtx());
daE_BI_LEAF_Execute(a_this);
fopAcM_SetMtx(i_this, i_this->model->getBaseTRMtx());
daE_BI_LEAF_Execute(i_this);
}
return phase_state;