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
4 changed files with 450 additions and 450 deletions
+383 -383
View File
File diff suppressed because it is too large Load Diff
+30 -30
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;