obj_pdwall / obj_rw / obj_stopper2 done (#2760)

* obj_pdwall / obj_rw / obj_stopper2 done

* fix jp/pal

* Use NULL instead of 0

* Use dEvtCnd_CANDEMO_e

---------

Co-authored-by: hatal175 <hatal175@users.noreply.github.com>
This commit is contained in:
TakaRikka 2025-10-29 22:56:22 -07:00 committed by GitHub
parent 73927f50a9
commit 194282d2c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 862 additions and 957 deletions

View File

@ -13,3 +13,4 @@ d/actor/d_a_obj_stopper2.cpp:
.text start:0x00000078 end:0x00000BC8
.rodata start:0x00000000 end:0x00000074
.data start:0x00000000 end:0x000000F4
.bss start:0x00000000 end:0x00000004

View File

@ -13,3 +13,4 @@ d/actor/d_a_obj_stopper2.cpp:
.text start:0x00000078 end:0x00000BC8
.rodata start:0x00000000 end:0x00000074
.data start:0x00000000 end:0x000000F4
.bss start:0x00000000 end:0x00000004

View File

@ -2147,7 +2147,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_onsenTaru"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pdoor"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pdtile"),
ActorRel(NonMatching, "d_a_obj_pdwall"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pdwall"),
ActorRel(NonMatching, "d_a_obj_picture"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pillar"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pleaf"),
@ -2165,7 +2165,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_rotTrap"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_roten"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_rstair"),
ActorRel(NonMatching, "d_a_obj_rw"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_rw"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_saidan"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_sakuita"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_sakuita_rope"),
@ -2191,7 +2191,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_stairBlock"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_stone"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_stopper"),
ActorRel(NonMatching, "d_a_obj_stopper2"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_stopper2"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_suisya"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_sw"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_swBallA"),

View File

@ -132,7 +132,11 @@ struct J3DSys {
J3DMatPacket* getMatPacket() { return mMatPacket; }
void setMaterialMode(u32 mode) { mMaterialMode = mode; }
void setCurrentMtxCalc(J3DMtxCalc * pCalc) { mCurrentMtxCalc = pCalc; }
void setCurrentMtxCalc(J3DMtxCalc * pCalc) {
J3D_ASSERT_NULLPTR(210, pCalc != NULL);
mCurrentMtxCalc = pCalc;
}
J3DMtxCalc * getCurrentMtxCalc() const { return mCurrentMtxCalc; }
void setTexture(J3DTexture* pTex) { mTexture = pTex; }

View File

@ -2,6 +2,7 @@
#define D_A_OBJ_PDWALL_H
#include "f_op/f_op_actor_mng.h"
#include "d/d_bg_s_movebg_actor.h"
/**
* @ingroup actors-objects
@ -11,19 +12,31 @@
* @details
*
*/
class daObjPDwall_c : public fopAc_ac_c {
class daObjPDwall_c : public dBgS_MoveBgActor, public request_of_phase_process_class {
public:
/* 80CAC7F8 */ void create1st();
/* 80CAC7F8 */ int create1st();
/* 80CAC8DC */ void setMtx();
/* 80CACA44 */ void CreateHeap();
/* 80CACBA8 */ void Create();
/* 80CACCE0 */ void Execute(Mtx**);
/* 80CACF14 */ void Draw();
/* 80CACFD4 */ void Delete();
/* 80CAD140 */ ~daObjPDwall_c();
/* 80CACA44 */ virtual int CreateHeap();
/* 80CACBA8 */ virtual int Create();
/* 80CACCE0 */ virtual int Execute(Mtx**);
/* 80CACF14 */ virtual int Draw();
/* 80CACFD4 */ virtual int Delete();
/* 80CAD140 */ virtual ~daObjPDwall_c() {}
int getSwNo() { return fopAcM_GetParamBit(this, 0, 8); }
private:
/* 0x568 */ u8 field_0x568[0xa18 - 0x568];
/* 0x5A8 */ Mtx field_0x5a8;
/* 0x5D8 */ J3DModel* mpModels[10];
/* 0x600 */ Mtx field_0x600[10];
/* 0x7E0 */ f32 field_0x7e0[10];
/* 0x808 */ f32 field_0x808[10];
/* 0x830 */ u8 field_0x830[10];
/* 0x83C */ dBgW* mpBgw[9];
/* 0x860 */ Mtx mMtx[9];
/* 0xA10 */ u8 field_0xa10;
/* 0xA14 */ int field_0xa14;
};
STATIC_ASSERT(sizeof(daObjPDwall_c) == 0xa18);

View File

@ -3,6 +3,7 @@
#include "f_op/f_op_actor_mng.h"
#include "d/d_cc_d.h"
#include "d/d_cc_uty.h"
/**
* @ingroup actors-objects
@ -12,23 +13,30 @@
* @details
*
*/
class obj_rw_class : public fopAc_ac_c {
private:
/* 0x568 */ u8 field_0x568[0xe3c - 0x568];
class obj_rw_class {
public:
/* 0x000 */ fopEn_enemy_c enemy;
/* 0x5AC */ request_of_phase_process_class phase;
/* 0x5B4 */ J3DModel* model;
/* 0x5B8 */ Z2CreatureEnemy sound;
/* 0x65C */ u32 shadowId;
/* 0x660 */ s16 field_0x660;
/* 0x662 */ s16 action;
/* 0x664 */ s16 mode;
/* 0x666 */ s16 field_0x666[2];
/* 0x66A */ s16 invulnerability_timer;
/* 0x66C */ f32 field_0x66c;
/* 0x670 */ s16 field_0x670;
/* 0x672 */ s16 field_0x672;
/* 0x674 */ s16 field_0x674;
/* 0x678 */ dCcD_Stts ccStts;
/* 0x6B4 */ dCcD_Sph ccSph[2];
/* 0x924 */ dCcD_Cyl ccCyl[4];
/* 0xE14 */ dCcU_AtInfo atInfo;
/* 0xE38 */ s8 field_0xe38;
/* 0xE39 */ u8 HIOInit;
};
STATIC_ASSERT(sizeof(obj_rw_class) == 0xe3c);
struct daObj {
public:
/* 80037900 */ void HitSeStart(cXyz const*, int, dCcD_GObjInf const*, u32);
};
class daOBJ_RW_HIO_c {
public:
/* 80CC298C */ daOBJ_RW_HIO_c();
/* 80CC3A5C */ ~daOBJ_RW_HIO_c();
};
#endif /* D_A_OBJ_RW_H */

View File

@ -17,7 +17,7 @@ public:
/* 80CEF368 */ J3DModelData* getStopModelData();
/* 80CEF38C */ void initBaseMtx();
/* 80CEF3C8 */ void setBaseMtx();
/* 80CEF434 */ float getMaxOffsetY();
/* 80CEF434 */ f32 getMaxOffsetY();
/* 80CEF44C */ int Create();
/* 80CEF57C */ int CreateHeap();
/* 80CEF5C8 */ int create();
@ -27,7 +27,7 @@ public:
/* 80CEF98C */ void actionOrderEvent();
/* 80CEFA60 */ void actionEvent();
/* 80CEFAD4 */ void actionDead();
/* 80CEFAD8 */ void demoProc();
/* 80CEFAD8 */ int demoProc();
/* 80CEFD40 */ int draw();
/* 80CEFDB8 */ int _delete();
@ -38,13 +38,13 @@ public:
private:
/* 0x568 */ request_of_phase_process_class mPhaseReq;
/* 0x570 */ J3DModel* mpModel;
/* 0x574 */ f32 field_0x574;
/* 0x578 */ s32 field_0x578;
/* 0x57C */ u16 field_0x57c[4];
/* 0x574 */ f32 mOffsetY;
/* 0x578 */ int mStaffId;
/* 0x57C */ s16 mEventIdx[4];
/* 0x584 */ u8 field_0x584;
/* 0x585 */ u8 field_0x585;
/* 0x585 */ u8 mTool;
/* 0x586 */ u8 mAction;
/* 0x587 */ u8 field_0x587;
/* 0x587 */ u8 mTimer;
/* 0x588 */ u8 field_0x588;
};

View File

@ -6,196 +6,213 @@
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_obj_pdwall.h"
#include "dol2asm.h"
//
// Forward References:
//
extern "C" void create1st__13daObjPDwall_cFv();
extern "C" void setMtx__13daObjPDwall_cFv();
extern "C" void CreateHeap__13daObjPDwall_cFv();
extern "C" void Create__13daObjPDwall_cFv();
extern "C" void Execute__13daObjPDwall_cFPPA3_A4_f();
extern "C" void Draw__13daObjPDwall_cFv();
extern "C" void Delete__13daObjPDwall_cFv();
extern "C" static void daObjPDwall_create1st__FP13daObjPDwall_c();
extern "C" static void daObjPDwall_MoveBGDelete__FP13daObjPDwall_c();
extern "C" static void daObjPDwall_MoveBGExecute__FP13daObjPDwall_c();
extern "C" static void daObjPDwall_MoveBGDraw__FP13daObjPDwall_c();
extern "C" void __dt__13daObjPDwall_cFv();
extern "C" extern char const* const d_a_obj_pdwall__stringBase0;
//
// External References:
//
extern "C" void mDoMtx_YrotM__FPA4_fs();
extern "C" void transM__14mDoMtx_stack_cFfff();
extern "C" void mDoExt_modelUpdateDL__FP8J3DModel();
extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
extern "C" void __dt__10fopAc_ac_cFv();
extern "C" void fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff();
extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc();
extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc();
extern "C" void isSwitch__10dSv_info_cCFii();
extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci();
extern "C" void StartShock__12dVibration_cFii4cXyz();
extern "C" void Release__4cBgSFP9dBgW_Base();
extern "C" void Regist__4dBgSFP9dBgW_BaseP10fopAc_ac_c();
extern "C" void dBgS_MoveBGProc_TypicalRotY__FP4dBgWPvRC13cBgS_PolyInfobP4cXyzP5csXyzP5csXyz();
extern "C" void __ct__16dBgS_MoveBgActorFv();
extern "C" bool IsDelete__16dBgS_MoveBgActorFv();
extern "C" bool ToFore__16dBgS_MoveBgActorFv();
extern "C" bool ToBack__16dBgS_MoveBgActorFv();
extern "C" void
MoveBGCreate__16dBgS_MoveBgActorFPCciPFP4dBgWPvRC13cBgS_PolyInfobP4cXyzP5csXyzP5csXyz_vUlPA3_A4_f();
extern "C" void MoveBGDelete__16dBgS_MoveBgActorFv();
extern "C" void MoveBGExecute__16dBgS_MoveBgActorFv();
extern "C" void Set__4cBgWFP6cBgD_tUlPA3_A4_f();
extern "C" void __ct__4dBgWFv();
extern "C" void Move__4dBgWFv();
extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c();
extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c();
extern "C" void ChkUsed__9cBgW_BgIdCFv();
extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc();
extern "C" void* __nw__FUl();
extern "C" void __dl__FPv();
extern "C" void _savegpr_24();
extern "C" void _savegpr_25();
extern "C" void _savegpr_26();
extern "C" void _savegpr_27();
extern "C" void _restgpr_24();
extern "C" void _restgpr_25();
extern "C" void _restgpr_26();
extern "C" void _restgpr_27();
extern "C" extern void* __vt__16dBgS_MoveBgActor[10];
extern "C" u8 now__14mDoMtx_stack_c[48];
extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
//
// Declarations:
//
/* ############################################################################################## */
/* 80CAD1F4-80CAD1F4 00003C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
#pragma force_active on
SECTION_DEAD static char const* const stringBase_80CAD1F4 = "P_Dwall";
#pragma pop
static const int l_dzbidx = 7;
/* 80CAD1FC-80CAD200 -00001 0004+00 3/3 0/0 0/0 .data l_arcName */
SECTION_DATA static void* l_arcName = (void*)&d_a_obj_pdwall__stringBase0;
static char* l_arcName = "P_Dwall";
/* 80CAC7F8-80CAC8DC 000078 00E4+00 1/1 0/0 0/0 .text create1st__13daObjPDwall_cFv */
void daObjPDwall_c::create1st() {
// NONMATCHING
int daObjPDwall_c::create1st() {
int phase_state = dComIfG_resLoad(this, l_arcName);
if (phase_state == cPhs_COMPLEATE_e) {
setMtx();
phase_state = MoveBGCreate(l_arcName, l_dzbidx, dBgS_MoveBGProc_TypicalRotY, 0xB1C0, &field_0x5a8);
if (phase_state == cPhs_ERROR_e) {
return phase_state;
}
for (int i = 0; i < 9; i++) {
if (dComIfG_Bgsp().Regist(mpBgw[i], this)) {
return cPhs_ERROR_e;
}
}
}
return phase_state;
}
/* ############################################################################################## */
/* 80CAD1B8-80CAD1D0 000000 0018+00 2/2 0/0 0/0 .rodata l_cull_box */
SECTION_RODATA static u8 const l_cull_box[24] = {
0xC2, 0xC8, 0x00, 0x00, 0xC4, 0x48, 0x00, 0x00, 0xC3, 0x96, 0x00, 0x00,
0x44, 0x3B, 0x80, 0x00, 0x43, 0xFA, 0x00, 0x00, 0x43, 0x96, 0x00, 0x00,
static const cull_box l_cull_box = {
{-100.0f, -800.0f, -300.0f},
{750.0f, 500.0f, 300.0f},
};
COMPILER_STRIP_GATE(0x80CAD1B8, &l_cull_box);
/* 80CAD1D0-80CAD1D4 000018 0004+00 1/1 0/0 0/0 .rodata @3666 */
SECTION_RODATA static f32 const lit_3666 = 50.0f;
COMPILER_STRIP_GATE(0x80CAD1D0, &lit_3666);
/* 80CAD1D4-80CAD1D8 00001C 0004+00 1/3 0/0 0/0 .rodata @3667 */
SECTION_RODATA static u8 const lit_3667[4] = {
0x00,
0x00,
0x00,
0x00,
};
COMPILER_STRIP_GATE(0x80CAD1D4, &lit_3667);
/* 80CAD1D8-80CAD1E0 000020 0008+00 1/3 0/0 0/0 .rodata @3669 */
SECTION_RODATA static u8 const lit_3669[8] = {
0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
};
COMPILER_STRIP_GATE(0x80CAD1D8, &lit_3669);
/* 80CAC8DC-80CACA44 00015C 0168+00 2/2 0/0 0/0 .text setMtx__13daObjPDwall_cFv */
void daObjPDwall_c::setMtx() {
// NONMATCHING
for (int i = 0; i < 10; i++) {
mDoMtx_stack_c::transS(current.pos.x, current.pos.y + field_0x808[i], current.pos.z);
mDoMtx_stack_c::YrotM(current.angle.y - 0x3FFF);
mDoMtx_stack_c::transM(50.0f * i, 0.0f, 0.0f);
MTXCopy(mDoMtx_stack_c::get(), field_0x600[i]);
}
mDoMtx_stack_c::copy(field_0x600[0]);
MTXCopy(mDoMtx_stack_c::get(), field_0x5a8);
for (int i = 0; i < 9; i++) {
mDoMtx_stack_c::copy(field_0x600[i + 1]);
MTXCopy(mDoMtx_stack_c::get(), mMtx[i]);
}
}
/* 80CACA44-80CACBA8 0002C4 0164+00 1/0 0/0 0/0 .text CreateHeap__13daObjPDwall_cFv */
void daObjPDwall_c::CreateHeap() {
// NONMATCHING
}
int daObjPDwall_c::CreateHeap() {
J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 4);
JUT_ASSERT(175, model_data != NULL);
/* ############################################################################################## */
/* 80CAD1E0-80CAD1E4 000028 0004+00 0/2 0/0 0/0 .rodata @3731 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3731 = -30.0f;
COMPILER_STRIP_GATE(0x80CAD1E0, &lit_3731);
#pragma pop
for (int i = 0; i < 10; i++) {
mpModels[i] = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000084);
if (mpModels[i] == NULL) {
return 0;
}
}
for (int i = 0; i < 9; i++) {
mpBgw[i] = new dBgW();
if (mpBgw[i] == NULL) {
return 0;
}
if (!mpBgw[i]->Set((cBgD_t*)dComIfG_getObjectRes(l_arcName, l_dzbidx), 1, &mMtx[i])) {
mpBgw[i]->SetCrrFunc(dBgS_MoveBGProc_TypicalRotY);
} else {
mpBgw[i] = NULL;
return 0;
}
}
return 1;
}
/* 80CACBA8-80CACCE0 000428 0138+00 1/0 0/0 0/0 .text Create__13daObjPDwall_cFv */
void daObjPDwall_c::Create() {
// NONMATCHING
int daObjPDwall_c::Create() {
field_0xa14 = 0;
if (fopAcM_isSwitch(this, getSwNo())) {
field_0xa10 = 1;
} else {
field_0xa10 = 0;
}
for (int i = 0; i < 10; i++) {
mpModels[i]->setBaseTRMtx(field_0x600[i]);
field_0x7e0[i] = 0.0f;
if (field_0xa10) {
field_0x808[i] = (i + 1) * -30.0f;
} else {
field_0x808[i] = 0.0f;
}
}
fopAcM_SetMtx(this, field_0x600[0]);
fopAcM_setCullSizeBox(this, l_cull_box.min.x, l_cull_box.min.y, l_cull_box.min.z,
l_cull_box.max.x, l_cull_box.max.y, l_cull_box.max.z);
return 1;
}
/* ############################################################################################## */
/* 80CAD1E4-80CAD1E8 00002C 0004+00 0/1 0/0 0/0 .rodata @3787 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3787 = 5.0f;
COMPILER_STRIP_GATE(0x80CAD1E4, &lit_3787);
#pragma pop
/* 80CAD1E8-80CAD1EC 000030 0004+00 0/1 0/0 0/0 .rodata @3788 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3788 = -1.0f / 5.0f;
COMPILER_STRIP_GATE(0x80CAD1E8, &lit_3788);
#pragma pop
/* 80CAD1EC-80CAD1F0 000034 0004+00 0/1 0/0 0/0 .rodata @3789 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3789 = 1.0f;
COMPILER_STRIP_GATE(0x80CAD1EC, &lit_3789);
#pragma pop
/* 80CAD1F0-80CAD1F4 000038 0004+00 0/1 0/0 0/0 .rodata @3790 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3790 = -1.0f;
COMPILER_STRIP_GATE(0x80CAD1F0, &lit_3790);
#pragma pop
/* 80CACCE0-80CACF14 000560 0234+00 1/0 0/0 0/0 .text Execute__13daObjPDwall_cFPPA3_A4_f
*/
void daObjPDwall_c::Execute(Mtx** param_0) {
// NONMATCHING
int daObjPDwall_c::Execute(Mtx** param_0) {
if (field_0xa10 == 0 && fopAcM_isSwitch(this, getSwNo())) {
field_0xa14++;
for (int i = 0; i < 10; i++) {
if (field_0xa14 >= (9 - i) * 15) {
field_0x7e0[i] -= 5.0f;
field_0x808[i] += field_0x7e0[i];
if (field_0x808[i] <= -30.0f * (i + 1)) {
field_0x808[i] = -30.0f * (i + 1);
field_0x7e0[i] *= -0.2f;
if (field_0x830[i] == 0) {
field_0x830[i] = 1;
dComIfGp_getVibration().StartShock(8, 0x1F, cXyz(0.0f, 1.0f, 0.0f));
Vec sp20;
sp20.x = (field_0x600[i])[0][3];
sp20.y = (field_0x600[i])[1][3];
sp20.z = (field_0x600[i])[2][3];
Z2GetAudioMgr()->seStart(Z2SE_OBJ_FALL_STAIR, &sp20, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
}
}
}
}
}
setMtx();
for (int i = 0; i < 10; i++) {
mpModels[i]->setBaseTRMtx(field_0x600[i]);
}
for (int i = 0; i < 9; i++) {
mpBgw[i]->Move();
}
*param_0 = &field_0x5a8;
return 1;
}
/* 80CACF14-80CACFD4 000794 00C0+00 1/0 0/0 0/0 .text Draw__13daObjPDwall_cFv */
void daObjPDwall_c::Draw() {
// NONMATCHING
int daObjPDwall_c::Draw() {
dComIfGd_setListBG();
for (int i = 0; i < 10; i++) {
g_env_light.settingTevStruct(16, &current.pos, &tevStr);
g_env_light.setLightTevColorType_MAJI(mpModels[i], &tevStr);
mDoExt_modelUpdateDL(mpModels[i]);
}
dComIfGd_setList();
return 1;
}
/* 80CACFD4-80CAD074 000854 00A0+00 1/0 0/0 0/0 .text Delete__13daObjPDwall_cFv */
void daObjPDwall_c::Delete() {
// NONMATCHING
int daObjPDwall_c::Delete() {
for (int i = 0; i < 9; i++) {
if (mpBgw[i] != NULL && mpBgw[i]->ChkUsed()) {
dComIfG_Bgsp().Release(mpBgw[i]);
}
}
dComIfG_resDelete(this, l_arcName);
return 1;
}
/* 80CAD074-80CAD0D4 0008F4 0060+00 1/0 0/0 0/0 .text daObjPDwall_create1st__FP13daObjPDwall_c */
static int daObjPDwall_create1st(daObjPDwall_c* i_this) {
fopAcM_ct(i_this, daObjPDwall_c);
return i_this->create1st();
}
/* 80CAD0D4-80CAD0F4 000954 0020+00 1/0 0/0 0/0 .text daObjPDwall_MoveBGDelete__FP13daObjPDwall_c
*/
static int daObjPDwall_MoveBGDelete(daObjPDwall_c* i_this) {
return i_this->MoveBGDelete();
}
/* 80CAD0F4-80CAD114 000974 0020+00 1/0 0/0 0/0 .text daObjPDwall_MoveBGExecute__FP13daObjPDwall_c
*/
static int daObjPDwall_MoveBGExecute(daObjPDwall_c* i_this) {
return i_this->MoveBGExecute();
}
/* 80CAD114-80CAD140 000994 002C+00 1/0 0/0 0/0 .text daObjPDwall_MoveBGDraw__FP13daObjPDwall_c */
static int daObjPDwall_MoveBGDraw(daObjPDwall_c* i_this) {
return i_this->MoveBGDraw();
}
/* ############################################################################################## */
/* 80CAD200-80CAD220 -00001 0020+00 1/0 0/0 0/0 .data daObjPDwall_METHODS */
static actor_method_class daObjPDwall_METHODS = {
(process_method_func)daObjPDwall_create1st__FP13daObjPDwall_c,
(process_method_func)daObjPDwall_MoveBGDelete__FP13daObjPDwall_c,
(process_method_func)daObjPDwall_MoveBGExecute__FP13daObjPDwall_c,
(process_method_func)daObjPDwall_create1st,
(process_method_func)daObjPDwall_MoveBGDelete,
(process_method_func)daObjPDwall_MoveBGExecute,
0,
(process_method_func)daObjPDwall_MoveBGDraw__FP13daObjPDwall_c,
(process_method_func)daObjPDwall_MoveBGDraw,
};
/* 80CAD220-80CAD250 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_PDwall */
@ -215,47 +232,3 @@ extern actor_process_profile_definition g_profile_Obj_PDwall = {
fopAc_ACTOR_e, // mActorType
fopAc_CULLBOX_CUSTOM_e, // cullType
};
/* 80CAD250-80CAD27C 000054 002C+00 2/2 0/0 0/0 .data __vt__13daObjPDwall_c */
SECTION_DATA extern void* __vt__13daObjPDwall_c[11] = {
(void*)NULL /* RTTI */,
(void*)NULL,
(void*)CreateHeap__13daObjPDwall_cFv,
(void*)Create__13daObjPDwall_cFv,
(void*)Execute__13daObjPDwall_cFPPA3_A4_f,
(void*)Draw__13daObjPDwall_cFv,
(void*)Delete__13daObjPDwall_cFv,
(void*)IsDelete__16dBgS_MoveBgActorFv,
(void*)ToFore__16dBgS_MoveBgActorFv,
(void*)ToBack__16dBgS_MoveBgActorFv,
(void*)__dt__13daObjPDwall_cFv,
};
/* 80CAD074-80CAD0D4 0008F4 0060+00 1/0 0/0 0/0 .text daObjPDwall_create1st__FP13daObjPDwall_c */
static void daObjPDwall_create1st(daObjPDwall_c* param_0) {
// NONMATCHING
}
/* 80CAD0D4-80CAD0F4 000954 0020+00 1/0 0/0 0/0 .text daObjPDwall_MoveBGDelete__FP13daObjPDwall_c
*/
static void daObjPDwall_MoveBGDelete(daObjPDwall_c* param_0) {
// NONMATCHING
}
/* 80CAD0F4-80CAD114 000974 0020+00 1/0 0/0 0/0 .text daObjPDwall_MoveBGExecute__FP13daObjPDwall_c
*/
static void daObjPDwall_MoveBGExecute(daObjPDwall_c* param_0) {
// NONMATCHING
}
/* 80CAD114-80CAD140 000994 002C+00 1/0 0/0 0/0 .text daObjPDwall_MoveBGDraw__FP13daObjPDwall_c */
static void daObjPDwall_MoveBGDraw(daObjPDwall_c* param_0) {
// NONMATCHING
}
/* 80CAD140-80CAD1B0 0009C0 0070+00 1/0 0/0 0/0 .text __dt__13daObjPDwall_cFv */
daObjPDwall_c::~daObjPDwall_c() {
// NONMATCHING
}
/* 80CAD1F4-80CAD1F4 00003C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */

View File

@ -6,165 +6,407 @@
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_obj_rw.h"
#include "dol2asm.h"
#include "d/actor/d_a_player.h"
#include "d/d_a_obj.h"
#include "d/d_s_play.h"
class daOBJ_RW_HIO_c : public JORReflexible {
public:
/* 80CC298C */ daOBJ_RW_HIO_c();
/* 80CC3A5C */ virtual ~daOBJ_RW_HIO_c() {}
//
// Forward References:
//
void genMessage(JORMContext*);
extern "C" void __ct__14daOBJ_RW_HIO_cFv();
extern "C" static void nodeCallBack__FP8J3DJointi();
extern "C" static void daOBJ_RW_Draw__FP12obj_rw_class();
extern "C" static void damage_check__FP12obj_rw_class();
extern "C" static void normal__FP12obj_rw_class();
extern "C" static void action__FP12obj_rw_class();
extern "C" static void daOBJ_RW_Execute__FP12obj_rw_class();
extern "C" static bool daOBJ_RW_IsDelete__FP12obj_rw_class();
extern "C" static void daOBJ_RW_Delete__FP12obj_rw_class();
extern "C" static void useHeapInit__FP10fopAc_ac_c();
extern "C" static void daOBJ_RW_Create__FP10fopAc_ac_c();
extern "C" void __dt__8dCcD_CylFv();
extern "C" void __ct__8dCcD_CylFv();
extern "C" void __dt__8cM3dGCylFv();
extern "C" void __dt__8cM3dGAabFv();
extern "C" void __dt__8dCcD_SphFv();
extern "C" void __ct__8dCcD_SphFv();
extern "C" void __dt__8cM3dGSphFv();
extern "C" void __dt__14daOBJ_RW_HIO_cFv();
extern "C" void __sinit_d_a_obj_rw_cpp();
extern "C" extern char const* const d_a_obj_rw__stringBase0;
//
// External References:
//
extern "C" void mDoMtx_XrotM__FPA4_fs();
extern "C" void mDoMtx_YrotS__FPA4_fs();
extern "C" void mDoMtx_YrotM__FPA4_fs();
extern "C" void scaleM__14mDoMtx_stack_cFfff();
extern "C" void mDoExt_modelUpdateDL__FP8J3DModel();
extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
extern "C" void __ct__10fopAc_ac_cFv();
extern "C" void fopAcM_createChild__FsUiUlPC4cXyziPC5csXyzPC4cXyzScPFPv_i();
extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl();
extern "C" void fopAcM_SetMin__FP10fopAc_ac_cfff();
extern "C" void fopAcM_SetMax__FP10fopAc_ac_cfff();
extern "C" void fopAcM_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c();
extern "C" void fopAcM_createItemForBoss__FPC4cXyziiPC5csXyzPC4cXyzffi();
extern "C" void fopAcM_createItem__FPC4cXyziiiPC5csXyzPC4cXyzi();
extern "C" void fopAcM_createDisappear__FPC10fopAc_ac_cPC4cXyzUcUcUc();
extern "C" void gndCheck__11fopAcM_gc_cFPC4cXyz();
extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc();
extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc();
extern "C" void dComIfGp_getReverb__Fi();
extern "C" void
dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj();
extern "C" void onSwitch__10dSv_info_cFii();
extern "C" void isSwitch__10dSv_info_cCFii();
extern "C" void HitSeStart__5daObjFPC4cXyziPC12dCcD_GObjInfUl();
extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci();
extern "C" void __ct__10dCcD_GSttsFv();
extern "C" void Move__10dCcD_GSttsFv();
extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c();
extern "C" void __ct__12dCcD_GObjInfFv();
extern "C" void __dt__12dCcD_GObjInfFv();
extern "C" void ChkTgHit__12dCcD_GObjInfFv();
extern "C" void GetTgHitObj__12dCcD_GObjInfFv();
extern "C" void Set__8dCcD_CylFRC11dCcD_SrcCyl();
extern "C" void Set__8dCcD_SphFRC11dCcD_SrcSph();
extern "C" void cc_at_check__FP10fopAc_ac_cP11dCcU_AtInfo();
extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c();
extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c();
extern "C" void Set__4cCcSFP8cCcD_Obj();
extern "C" void cM_rndF__Ff();
extern "C" void SetC__8cM3dGCylFRC4cXyz();
extern "C" void SetH__8cM3dGCylFf();
extern "C" void SetR__8cM3dGCylFf();
extern "C" void SetC__8cM3dGSphFRC4cXyz();
extern "C" void SetR__8cM3dGSphFf();
extern "C" void cLib_addCalc0__FPfff();
extern "C" void MtxPosition__FP4cXyzP4cXyz();
extern "C" void __ct__15Z2CreatureEnemyFv();
extern "C" void init__15Z2CreatureEnemyFP3VecP3VecUcUc();
extern "C" void __dl__FPv();
extern "C" void __construct_array();
extern "C" void _savegpr_21();
extern "C" void _savegpr_24();
extern "C" void _savegpr_25();
extern "C" void _savegpr_29();
extern "C" void _restgpr_21();
extern "C" void _restgpr_24();
extern "C" void _restgpr_25();
extern "C" void _restgpr_29();
extern "C" extern void* __vt__8dCcD_Sph[36];
extern "C" extern void* __vt__8dCcD_Cyl[36];
extern "C" extern void* __vt__9dCcD_Stts[11];
extern "C" extern void* __vt__12cCcD_SphAttr[25];
extern "C" extern void* __vt__12cCcD_CylAttr[25];
extern "C" extern void* __vt__14cCcD_ShapeAttr[22];
extern "C" extern void* __vt__9cCcD_Stts[8];
extern "C" u8 now__14mDoMtx_stack_c[48];
extern "C" u8 mGndCheck__11fopAcM_gc_c[84];
extern "C" u8 mSimpleTexObj__21dDlst_shadowControl_c[32];
extern "C" u8 mCurrentMtx__6J3DSys[48];
extern "C" u8 sincosTable___5JMath[65536];
extern "C" void __register_global_object();
//
// Declarations:
//
/* ############################################################################################## */
/* 80CC3AF4-80CC3AF8 000000 0004+00 6/6 0/0 0/0 .rodata @3649 */
SECTION_RODATA static f32 const lit_3649 = 1.0f;
COMPILER_STRIP_GATE(0x80CC3AF4, &lit_3649);
/* 80CC3B54-80CC3B64 000000 0010+00 1/1 0/0 0/0 .data pole_x$3841 */
SECTION_DATA static u8 pole_x[16] = {
0xC3, 0xAA, 0x00, 0x00, 0xC3, 0x70, 0x00, 0x00, 0x43, 0xA5, 0x00, 0x00, 0x43, 0x91, 0x00, 0x00,
/* 0x4 */ s8 id;
/* 0x8 */ f32 base_size;
/* 0xC */ u8 unk_0xC[0x14 - 0xC];
};
/* 80CC3B64-80CC3B74 000010 0010+00 1/1 0/0 0/0 .data pole_z$3842 */
SECTION_DATA static u8 pole_z[16] = {
0x42, 0xB4, 0x00, 0x00, 0xC2, 0xB4, 0x00, 0x00, 0x42, 0xDC, 0x00, 0x00, 0xC2, 0xC8, 0x00, 0x00,
};
/* 80CC298C-80CC29B0 0000EC 0024+00 1/1 0/0 0/0 .text __ct__14daOBJ_RW_HIO_cFv */
daOBJ_RW_HIO_c::daOBJ_RW_HIO_c() {
id = -1;
base_size = 1.0f;
}
/* 80CC3B74-80CC3BB4 000020 0040+00 1/1 0/0 0/0 .data cc_sph_src$3951 */
static dCcD_SrcSph cc_sph_src = {
{
{0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
{dCcD_SE_HARD_BODY, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
}, // mObjInf
{
{{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
} // mSphAttr
};
/* 80CC29B0-80CC2A74 000110 00C4+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */
static int nodeCallBack(J3DJoint* i_joint, int param_1) {
if (param_1 == 0) {
int jnt_no = i_joint->getJntNo();
J3DModel* model = j3dSys.getModel();
obj_rw_class* i_this = (obj_rw_class*)model->getUserArea();
/* 80CC3BB4-80CC3BF8 000060 0044+00 1/1 0/0 0/0 .data cc_cyl_src$3952 */
static dCcD_SrcCyl cc_cyl_src = {
{
{0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x3}, // mGObjTg
{0x0}, // mGObjCo
}, // mObjInf
{
{0.0f, 0.0f, 0.0f}, // mCenter
200.0f, // mRadius
250.0f // mHeight
} // mCyl
};
if (i_this != NULL) {
if (jnt_no == 1) {
MTXCopy(model->getAnmMtx(jnt_no), *calc_mtx);
cMtx_YrotM(*calc_mtx, i_this->field_0x670);
model->setAnmMtx(jnt_no, *calc_mtx);
MTXCopy(*calc_mtx, J3DSys::mCurrentMtx);
}
}
}
return 1;
}
/* 80CC2A74-80CC2BA4 0001D4 0130+00 1/0 0/0 0/0 .text daOBJ_RW_Draw__FP12obj_rw_class */
static int daOBJ_RW_Draw(obj_rw_class* i_this) {
fopAc_ac_c* actor = &i_this->enemy;
g_env_light.settingTevStruct(0, &actor->current.pos, &actor->tevStr);
g_env_light.setLightTevColorType_MAJI(i_this->model, &actor->tevStr);
J3DShape* shape = i_this->model->getModelData()->getMaterialNodePointer(0)->getShape();
if (shape != NULL) {
if (i_this->field_0xe38 != 0) {
shape->hide();
} else {
shape->show();
}
}
mDoExt_modelUpdateDL(i_this->model);
cXyz sp8;
sp8.set(actor->current.pos.x, 100.0f + actor->current.pos.y + BREG_F(18), actor->current.pos.z);
if (fopAcM_gc_c::gndCheck(&sp8)) {
i_this->shadowId = dComIfGd_setShadow(i_this->shadowId, 1, i_this->model, &sp8, 1500.0f, 0.0f, actor->current.pos.y, actor->current.pos.y, *fopAcM_gc_c::getGroundCheck(), &actor->tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
}
return 1;
}
/* 80CC2BA4-80CC2E60 000304 02BC+00 1/1 0/0 0/0 .text damage_check__FP12obj_rw_class */
static void damage_check(obj_rw_class* i_this) {
fopAc_ac_c* actor = &i_this->enemy;
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
i_this->ccStts.Move();
if (i_this->invulnerability_timer == 0) {
for (int i = 0; i < 2; i++) {
if (i_this->ccSph[i].ChkTgHit()) {
i_this->atInfo.mpCollider = i_this->ccSph[i].GetTgHitObj();
cc_at_check(actor, &i_this->atInfo);
if (player->getCutType() == daPy_py_c::CUT_TYPE_JUMP && player->checkCutJumpCancelTurn()) {
i_this->invulnerability_timer = 3;
} else {
i_this->invulnerability_timer = 10;
}
if (i_this->field_0x66c < 50.0f) {
s16 sp8 = (actor->shape_angle.y + 0x4000) - fopAcM_searchPlayerAngleY(actor);
if (sp8 < 0) {
i_this->field_0x672 = 0;
} else {
i_this->field_0x672 = -0x8000;
}
}
i_this->field_0x66c = 150.0f + TREG_F(17);
cXyz sp2C;
cXyz pos;
if (cM_rndF(1.0f) < 0.5f) {
cMtx_YrotS(*calc_mtx, actor->shape_angle.y);
sp2C.x = -200.0f + JREG_F(8);
sp2C.y = JREG_F(9);
sp2C.z = 0.0f;
MtxPosition(&sp2C, &pos);
pos += actor->current.pos;
fopAcM_createItem(&pos, fpcNm_ITEM_HEART, -1, -1, NULL, NULL, 0);
}
i_this->field_0x674 = 15;
if (actor->health <= 0) {
i_this->field_0xe38 = 1;
pos = actor->current.pos;
pos.y += 150.0f + JREG_F(7);
fopAcM_createDisappear(actor, &pos, 20, 0, actor->field_0x564);
cXyz scale(1.0f, 1.0f, 1.0f);
fopAcM_createItemForBoss(&pos, fpcNm_ITEM_KAKERA_HEART, fopAcM_GetRoomNo(actor), &actor->shape_angle, &scale, 0.0f, 0.0f, actor->field_0x564);
int swbit = (fopAcM_GetParam(actor) & 0xFF000000) >> 0x18;
if (swbit != 0xFF) {
dComIfGs_onSwitch(swbit, fopAcM_GetRoomNo(actor));
}
}
break;
}
}
for (int i = 0; i < 4; i++) {
if (i_this->ccCyl[i].ChkTgHit()) {
i_this->invulnerability_timer = 10;
daObj::HitSeStart(&actor->current.pos, fopAcM_GetRoomNo(actor), &i_this->ccCyl[i], 11);
i_this->field_0x66c = 70.0f + TREG_F(18);
i_this->field_0x674 = 15;
return;
}
}
}
}
/* 80CC2E60-80CC2E78 0005C0 0018+00 1/1 0/0 0/0 .text normal__FP12obj_rw_class */
static void normal(obj_rw_class* i_this) {
switch (i_this->mode) {
case 0:
i_this->mode = 1;
break;
}
}
/* 80CC2E78-80CC2F1C 0005D8 00A4+00 1/1 0/0 0/0 .text action__FP12obj_rw_class */
static void action(obj_rw_class* i_this) {
cXyz sp14;
cXyz sp8;
switch (i_this->action) {
case 0:
normal(i_this);
break;
}
damage_check(i_this);
cLib_addCalc0(&i_this->field_0x66c, 0.05f, 5.0f);
i_this->field_0x672 += 0xD00;
i_this->field_0x670 = i_this->field_0x66c * (20.0f + TREG_F(16)) * cM_ssin(i_this->field_0x672);
}
/* 80CC3C80-80CC3C84 000008 0004+00 2/2 0/0 0/0 .bss None */
static u8 l_HIOInit;
/* 80CC3C90-80CC3CA4 000018 0014+00 3/3 0/0 0/0 .bss l_HIO */
static daOBJ_RW_HIO_c l_HIO;
/* 80CC2F1C-80CC32EC 00067C 03D0+00 2/1 0/0 0/0 .text daOBJ_RW_Execute__FP12obj_rw_class
*/
static int daOBJ_RW_Execute(obj_rw_class* i_this) {
fopAc_ac_c* actor = &i_this->enemy;
cXyz sp1C;
cXyz sp10;
i_this->field_0x660++;
for (int i = 0; i < 2; i++) {
if (i_this->field_0x666[i] != 0) {
i_this->field_0x666[i]--;
}
}
if (i_this->invulnerability_timer != 0) {
i_this->invulnerability_timer--;
}
if (i_this->field_0x674 != 0) {
i_this->field_0x674--;
}
action(i_this);
s16 sp8 = (30.0f + TREG_F(14)) * (i_this->field_0x674 * cM_ssin(i_this->field_0x674 * 0x1700));
mDoMtx_stack_c::transS(actor->current.pos.x, actor->current.pos.y, actor->current.pos.z);
mDoMtx_stack_c::YrotM(actor->shape_angle.y);
mDoMtx_stack_c::XrotM(sp8);
mDoMtx_stack_c::scaleM(l_HIO.base_size, l_HIO.base_size, l_HIO.base_size);
i_this->model->setBaseTRMtx(mDoMtx_stack_c::get());
cMtx_YrotS(*calc_mtx, actor->shape_angle.y);
sp1C.x = -130.0f + KREG_F(0);
sp1C.y = 200.0f + KREG_F(1);
sp1C.z = 0.0f;
MtxPosition(&sp1C, &sp10);
sp10 += actor->current.pos;
i_this->ccSph[0].SetC(sp10);
i_this->ccSph[0].SetR((100.0f + KREG_F(2)) * l_HIO.base_size);
sp1C.x = 80.0f + KREG_F(3);
sp1C.y = 220.0f + KREG_F(4);
sp1C.z = 0.0f;
MtxPosition(&sp1C, &sp10);
sp10 += actor->current.pos;
i_this->ccSph[1].SetR((100.0f + KREG_F(5)) * l_HIO.base_size);
i_this->ccSph[1].SetC(sp10);
if (i_this->field_0xe38 != 0) {
sp10.z -= 52000.0f;
i_this->ccSph[0].SetC(sp10);
i_this->ccSph[1].SetC(sp10);
fopAcM_OffStatus(actor, 0);
actor->attention_info.flags = 0;
}
dComIfG_Ccsp()->Set(&i_this->ccSph[0]);
dComIfG_Ccsp()->Set(&i_this->ccSph[1]);
for (int i = 0; i < 4; i++) {
static f32 pole_x[4] = {-340.0f, -240.0f, 330.0f, 290.0f};
static f32 pole_z[4] = {90.0f, -90.0f, 110.0f, -100.0f};
sp1C.x = pole_x[i];
sp1C.y = 0.0f;
sp1C.z = pole_z[i];
MtxPosition(&sp1C, &sp10);
sp10 += actor->current.pos;
i_this->ccCyl[i].SetC(sp10);
i_this->ccCyl[i].SetR((30.0f + KREG_F(12)) * l_HIO.base_size);
i_this->ccCyl[i].SetH((200.0f + KREG_F(18)) * l_HIO.base_size);
dComIfG_Ccsp()->Set(&i_this->ccCyl[i]);
}
actor->eyePos = actor->current.pos;
actor->eyePos.y += 200.0f + TREG_F(4);
actor->attention_info.position = actor->eyePos;
actor->attention_info.position.y += 150.0f + TREG_F(5);
i_this->sound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(actor)));
return 1;
}
/* 80CC32EC-80CC32F4 000A4C 0008+00 1/0 0/0 0/0 .text daOBJ_RW_IsDelete__FP12obj_rw_class
*/
static int daOBJ_RW_IsDelete(obj_rw_class* i_this) {
return 1;
}
/* 80CC32F4-80CC3368 000A54 0074+00 1/0 0/0 0/0 .text daOBJ_RW_Delete__FP12obj_rw_class
*/
static int daOBJ_RW_Delete(obj_rw_class* i_this) {
fopAc_ac_c* actor = &i_this->enemy;
fopAcM_GetID(actor);
dComIfG_resDelete(&i_this->phase, "Obj_rw");
if (i_this->HIOInit) {
l_HIOInit = FALSE;
mDoHIO_DELETE_CHILD(l_HIO.id);
}
if (actor->heap != NULL) {
i_this->sound.deleteObject();
}
return 1;
}
/* 80CC3368-80CC3400 000AC8 0098+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
static int useHeapInit(fopAc_ac_c* actor) {
obj_rw_class* i_this = (obj_rw_class*)actor;
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("Obj_rw", 3);
JUT_ASSERT(603, modelData != NULL);
i_this->model = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
if (i_this->model == NULL) {
return 0;
}
i_this->model->setUserArea((uintptr_t)i_this);
i_this->model->getModelData()->getJointNodePointer(1)->setCallBack(nodeCallBack);
return 1;
}
/* 80CC3400-80CC36E4 000B60 02E4+00 1/0 0/0 0/0 .text daOBJ_RW_Create__FP10fopAc_ac_c */
static int daOBJ_RW_Create(fopAc_ac_c* actor) {
obj_rw_class* i_this = (obj_rw_class*)actor;
fopAcM_ct(actor, obj_rw_class);
int phase_state = dComIfG_resLoad(&i_this->phase, "Obj_rw");
if (phase_state == cPhs_COMPLEATE_e) {
OS_REPORT("Obj_rw", fopAcM_GetParam(actor));
OS_REPORT("OBJ_RW//////////////OBJ_RW SET 1 !!\n");
if (!fopAcM_entrySolidHeap(actor, useHeapInit, 0xFD0)) {
OS_REPORT("//////////////OBJ_RW SET NON !!\n");
return cPhs_ERROR_e;
}
OS_REPORT("//////////////OBJ_RW SET 2 !!\n");
if (!l_HIOInit) {
i_this->HIOInit = TRUE;
l_HIOInit = TRUE;
l_HIO.id = mDoHIO_CREATE_CHILD("いのししまる焼き", &l_HIO);
}
fopAcM_SetMtx(actor, i_this->model->getBaseTRMtx());
fopAcM_SetMin(actor, -500.0f, -200.0f, -500.0f);
fopAcM_SetMax(actor, 500.0f, 500.0f, 500.0f);
actor->health = 200;
actor->field_0x560 = 200;
static dCcD_SrcSph cc_sph_src = {
{
{0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
{dCcD_SE_HARD_BODY, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
}, // mObjInf
{
{{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
} // mSphAttr
};
static dCcD_SrcCyl cc_cyl_src = {
{
{0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x3}, // mGObjTg
{0x0}, // mGObjCo
}, // mObjInf
{
{0.0f, 0.0f, 0.0f}, // mCenter
200.0f, // mRadius
250.0f // mHeight
} // mCyl
};
i_this->ccStts.Init(0xFF, 0, actor);
i_this->ccSph[0].Set(cc_sph_src);
i_this->ccSph[0].SetStts(&i_this->ccStts);
i_this->ccSph[1].Set(cc_sph_src);
i_this->ccSph[1].SetStts(&i_this->ccStts);
for (int i = 0; i < 4; i++) {
i_this->ccCyl[i].Set(cc_cyl_src);
i_this->ccCyl[i].SetStts( &i_this->ccStts);
}
i_this->sound.init(&actor->current.pos, &actor->eyePos, 3, 1);
i_this->atInfo.mpSound = &i_this->sound;
actor->field_0x564 = (fopAcM_GetParam(actor) & 0xFF0000) >> 0x10;
int swbit = (fopAcM_GetParam(actor) & 0xFF000000) >> 0x18;
if (swbit != 0xFF && dComIfGs_isSwitch(swbit, fopAcM_GetRoomNo(actor))) {
i_this->field_0xe38 = 1;
cXyz scale(1.0f, 1.0f, 1.0f);
fopAcM_createItemForBoss(&actor->current.pos, fpcNm_ITEM_KAKERA_HEART, fopAcM_GetRoomNo(actor), &actor->shape_angle, &scale, 0.0f, 0.0f, actor->field_0x564);
} else {
fopAcM_createChild(PROC_OBJ_MAKI, fopAcM_GetID(actor), 0xFFFFFF01, &actor->home.pos, fopAcM_GetRoomNo(actor), &actor->home.angle, NULL, -1, NULL);
fopAcM_OnStatus(actor, 0);
actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e;
}
daOBJ_RW_Execute(i_this);
}
return phase_state;
}
/* 80CC3BF8-80CC3C18 -00001 0020+00 1/0 0/0 0/0 .data l_daOBJ_RW_Method */
static actor_method_class l_daOBJ_RW_Method = {
(process_method_func)daOBJ_RW_Create__FP10fopAc_ac_c,
(process_method_func)daOBJ_RW_Delete__FP12obj_rw_class,
(process_method_func)daOBJ_RW_Execute__FP12obj_rw_class,
(process_method_func)daOBJ_RW_IsDelete__FP12obj_rw_class,
(process_method_func)daOBJ_RW_Draw__FP12obj_rw_class,
(process_method_func)daOBJ_RW_Create,
(process_method_func)daOBJ_RW_Delete,
(process_method_func)daOBJ_RW_Execute,
(process_method_func)daOBJ_RW_IsDelete,
(process_method_func)daOBJ_RW_Draw,
};
/* 80CC3C18-80CC3C48 -00001 0030+00 0/0 0/0 1/0 .data g_profile_OBJ_RW */
@ -184,316 +426,3 @@ extern actor_process_profile_definition g_profile_OBJ_RW = {
fopAc_ENEMY_e, // mActorType
fopAc_CULLBOX_CUSTOM_e, // cullType
};
/* 80CC3C48-80CC3C54 0000F4 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGSph */
SECTION_DATA extern void* __vt__8cM3dGSph[3] = {
(void*)NULL /* RTTI */,
(void*)NULL,
(void*)__dt__8cM3dGSphFv,
};
/* 80CC3C54-80CC3C60 000100 000C+00 5/5 0/0 0/0 .data __vt__8cM3dGAab */
SECTION_DATA extern void* __vt__8cM3dGAab[3] = {
(void*)NULL /* RTTI */,
(void*)NULL,
(void*)__dt__8cM3dGAabFv,
};
/* 80CC3C60-80CC3C6C 00010C 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */
SECTION_DATA extern void* __vt__8cM3dGCyl[3] = {
(void*)NULL /* RTTI */,
(void*)NULL,
(void*)__dt__8cM3dGCylFv,
};
/* 80CC3C6C-80CC3C78 000118 000C+00 2/2 0/0 0/0 .data __vt__14daOBJ_RW_HIO_c */
SECTION_DATA extern void* __vt__14daOBJ_RW_HIO_c[3] = {
(void*)NULL /* RTTI */,
(void*)NULL,
(void*)__dt__14daOBJ_RW_HIO_cFv,
};
/* 80CC298C-80CC29B0 0000EC 0024+00 1/1 0/0 0/0 .text __ct__14daOBJ_RW_HIO_cFv */
daOBJ_RW_HIO_c::daOBJ_RW_HIO_c() {
// NONMATCHING
}
/* 80CC29B0-80CC2A74 000110 00C4+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */
static void nodeCallBack(J3DJoint* param_0, int param_1) {
// NONMATCHING
}
/* ############################################################################################## */
/* 80CC3AF8-80CC3AFC 000004 0004+00 0/2 0/0 0/0 .rodata @3721 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3721 = 100.0f;
COMPILER_STRIP_GATE(0x80CC3AF8, &lit_3721);
#pragma pop
/* 80CC3AFC-80CC3B00 000008 0004+00 0/1 0/0 0/0 .rodata @3722 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3722 = 1500.0f;
COMPILER_STRIP_GATE(0x80CC3AFC, &lit_3722);
#pragma pop
/* 80CC3B00-80CC3B04 00000C 0004+00 0/4 0/0 0/0 .rodata @3723 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_3723[4] = {
0x00,
0x00,
0x00,
0x00,
};
COMPILER_STRIP_GATE(0x80CC3B00, &lit_3723);
#pragma pop
/* 80CC2A74-80CC2BA4 0001D4 0130+00 1/0 0/0 0/0 .text daOBJ_RW_Draw__FP12obj_rw_class */
static void daOBJ_RW_Draw(obj_rw_class* param_0) {
// NONMATCHING
}
/* ############################################################################################## */
/* 80CC3B04-80CC3B08 000010 0004+00 0/1 0/0 0/0 .rodata @3791 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3791 = 50.0f;
COMPILER_STRIP_GATE(0x80CC3B04, &lit_3791);
#pragma pop
/* 80CC3B08-80CC3B0C 000014 0004+00 0/2 0/0 0/0 .rodata @3792 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3792 = 150.0f;
COMPILER_STRIP_GATE(0x80CC3B08, &lit_3792);
#pragma pop
/* 80CC3B0C-80CC3B10 000018 0004+00 0/1 0/0 0/0 .rodata @3793 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3793 = 0.5f;
COMPILER_STRIP_GATE(0x80CC3B0C, &lit_3793);
#pragma pop
/* 80CC3B10-80CC3B14 00001C 0004+00 0/2 0/0 0/0 .rodata @3794 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3794 = -200.0f;
COMPILER_STRIP_GATE(0x80CC3B10, &lit_3794);
#pragma pop
/* 80CC3B14-80CC3B18 000020 0004+00 0/1 0/0 0/0 .rodata @3795 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3795 = 70.0f;
COMPILER_STRIP_GATE(0x80CC3B14, &lit_3795);
#pragma pop
/* 80CC2BA4-80CC2E60 000304 02BC+00 1/1 0/0 0/0 .text damage_check__FP12obj_rw_class */
static void damage_check(obj_rw_class* param_0) {
// NONMATCHING
}
/* 80CC2E60-80CC2E78 0005C0 0018+00 1/1 0/0 0/0 .text normal__FP12obj_rw_class */
static void normal(obj_rw_class* param_0) {
// NONMATCHING
}
/* ############################################################################################## */
/* 80CC3B18-80CC3B1C 000024 0004+00 0/1 0/0 0/0 .rodata @3821 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3821 = 1.0f / 20.0f;
COMPILER_STRIP_GATE(0x80CC3B18, &lit_3821);
#pragma pop
/* 80CC3B1C-80CC3B20 000028 0004+00 0/1 0/0 0/0 .rodata @3822 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3822 = 5.0f;
COMPILER_STRIP_GATE(0x80CC3B1C, &lit_3822);
#pragma pop
/* 80CC3B20-80CC3B24 00002C 0004+00 0/1 0/0 0/0 .rodata @3823 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3823 = 20.0f;
COMPILER_STRIP_GATE(0x80CC3B20, &lit_3823);
#pragma pop
/* 80CC2E78-80CC2F1C 0005D8 00A4+00 1/1 0/0 0/0 .text action__FP12obj_rw_class */
static void action(obj_rw_class* param_0) {
// NONMATCHING
}
/* ############################################################################################## */
/* 80CC3B24-80CC3B28 000030 0004+00 0/1 0/0 0/0 .rodata @3895 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3895 = 30.0f;
COMPILER_STRIP_GATE(0x80CC3B24, &lit_3895);
#pragma pop
/* 80CC3B28-80CC3B2C 000034 0004+00 0/1 0/0 0/0 .rodata @3896 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3896 = -130.0f;
COMPILER_STRIP_GATE(0x80CC3B28, &lit_3896);
#pragma pop
/* 80CC3B2C-80CC3B30 000038 0004+00 0/1 0/0 0/0 .rodata @3897 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3897 = 200.0f;
COMPILER_STRIP_GATE(0x80CC3B2C, &lit_3897);
#pragma pop
/* 80CC3B30-80CC3B34 00003C 0004+00 0/1 0/0 0/0 .rodata @3898 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3898 = 80.0f;
COMPILER_STRIP_GATE(0x80CC3B30, &lit_3898);
#pragma pop
/* 80CC3B34-80CC3B38 000040 0004+00 0/1 0/0 0/0 .rodata @3899 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3899 = 220.0f;
COMPILER_STRIP_GATE(0x80CC3B34, &lit_3899);
#pragma pop
/* 80CC3B38-80CC3B3C 000044 0004+00 0/1 0/0 0/0 .rodata @3900 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3900 = 52000.0f;
COMPILER_STRIP_GATE(0x80CC3B38, &lit_3900);
#pragma pop
/* 80CC3B3C-80CC3B44 000048 0008+00 0/1 0/0 0/0 .rodata @3902 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_3902[8] = {
0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
};
COMPILER_STRIP_GATE(0x80CC3B3C, &lit_3902);
#pragma pop
/* 80CC3C80-80CC3C84 000008 0004+00 2/2 0/0 0/0 .bss None */
static u8 data_80CC3C80[4];
/* 80CC3C84-80CC3C90 00000C 000C+00 1/1 0/0 0/0 .bss @3644 */
static u8 lit_3644[12];
/* 80CC3C90-80CC3CA4 000018 0014+00 3/3 0/0 0/0 .bss l_HIO */
static u8 l_HIO[20];
/* 80CC2F1C-80CC32EC 00067C 03D0+00 2/1 0/0 0/0 .text daOBJ_RW_Execute__FP12obj_rw_class
*/
static void daOBJ_RW_Execute(obj_rw_class* param_0) {
// NONMATCHING
}
/* 80CC32EC-80CC32F4 000A4C 0008+00 1/0 0/0 0/0 .text daOBJ_RW_IsDelete__FP12obj_rw_class
*/
static bool daOBJ_RW_IsDelete(obj_rw_class* param_0) {
return true;
}
/* ############################################################################################## */
/* 80CC3B4C-80CC3B4C 000058 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
#pragma force_active on
SECTION_DEAD static char const* const stringBase_80CC3B4C = "Obj_rw";
#pragma pop
/* 80CC32F4-80CC3368 000A54 0074+00 1/0 0/0 0/0 .text daOBJ_RW_Delete__FP12obj_rw_class
*/
static void daOBJ_RW_Delete(obj_rw_class* param_0) {
// NONMATCHING
}
/* 80CC3368-80CC3400 000AC8 0098+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
static void useHeapInit(fopAc_ac_c* param_0) {
// NONMATCHING
}
/* ############################################################################################## */
/* 80CC3B44-80CC3B48 000050 0004+00 0/1 0/0 0/0 .rodata @4035 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_4035 = -500.0f;
COMPILER_STRIP_GATE(0x80CC3B44, &lit_4035);
#pragma pop
/* 80CC3B48-80CC3B4C 000054 0004+00 0/1 0/0 0/0 .rodata @4036 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_4036 = 500.0f;
COMPILER_STRIP_GATE(0x80CC3B48, &lit_4036);
#pragma pop
/* 80CC3400-80CC36E4 000B60 02E4+00 1/0 0/0 0/0 .text daOBJ_RW_Create__FP10fopAc_ac_c */
static void daOBJ_RW_Create(fopAc_ac_c* param_0) {
// NONMATCHING
}
/* 80CC36E4-80CC37B0 000E44 00CC+00 1/1 0/0 0/0 .text __dt__8dCcD_CylFv */
// dCcD_Cyl::~dCcD_Cyl() {
extern "C" void __dt__8dCcD_CylFv() {
// NONMATCHING
}
/* 80CC37B0-80CC3834 000F10 0084+00 1/1 0/0 0/0 .text __ct__8dCcD_CylFv */
// dCcD_Cyl::dCcD_Cyl() {
extern "C" void __ct__8dCcD_CylFv() {
// NONMATCHING
}
/* 80CC3834-80CC387C 000F94 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */
// cM3dGCyl::~cM3dGCyl() {
extern "C" void __dt__8cM3dGCylFv() {
// NONMATCHING
}
/* 80CC387C-80CC38C4 000FDC 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */
// cM3dGAab::~cM3dGAab() {
extern "C" void __dt__8cM3dGAabFv() {
// NONMATCHING
}
/* 80CC38C4-80CC3990 001024 00CC+00 1/1 0/0 0/0 .text __dt__8dCcD_SphFv */
// dCcD_Sph::~dCcD_Sph() {
extern "C" void __dt__8dCcD_SphFv() {
// NONMATCHING
}
/* 80CC3990-80CC3A14 0010F0 0084+00 1/1 0/0 0/0 .text __ct__8dCcD_SphFv */
// dCcD_Sph::dCcD_Sph() {
extern "C" void __ct__8dCcD_SphFv() {
// NONMATCHING
}
/* 80CC3A14-80CC3A5C 001174 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGSphFv */
// cM3dGSph::~cM3dGSph() {
extern "C" void __dt__8cM3dGSphFv() {
// NONMATCHING
}
/* 80CC3A5C-80CC3AA4 0011BC 0048+00 2/1 0/0 0/0 .text __dt__14daOBJ_RW_HIO_cFv */
daOBJ_RW_HIO_c::~daOBJ_RW_HIO_c() {
// NONMATCHING
}
/* 80CC3AA4-80CC3AE0 001204 003C+00 0/0 1/0 0/0 .text __sinit_d_a_obj_rw_cpp */
void __sinit_d_a_obj_rw_cpp() {
// NONMATCHING
}
#pragma push
#pragma force_active on
REGISTER_CTORS(0x80CC3AA4, __sinit_d_a_obj_rw_cpp);
#pragma pop
/* 80CC3B4C-80CC3B4C 000058 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */

View File

@ -6,356 +6,332 @@
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_obj_stopper2.h"
#include "dol2asm.h"
/* 80CEFF24-80CEFF28 -00001 0004+00 3/3 0/0 0/0 .data l_arcName */
static char* l_arcName = "Stop00";
//
// Forward References:
//
/* 80CEFF28-80CEFF38 -00001 0010+00 1/1 0/0 0/0 .data l_evName */
static char* l_evName[4] = {
"STOP_OPEN",
"STOP_CLOSE",
"STOP_OPEN2",
"STOP_CLOSE2",
};
extern "C" static void CheckCreateHeap__FP10fopAc_ac_c();
extern "C" static void getStopName__Fv();
extern "C" void getStopModelData__15daObjStopper2_cFv();
extern "C" void initBaseMtx__15daObjStopper2_cFv();
extern "C" void setBaseMtx__15daObjStopper2_cFv();
extern "C" void getMaxOffsetY__15daObjStopper2_cFv();
extern "C" void Create__15daObjStopper2_cFv();
extern "C" void CreateHeap__15daObjStopper2_cFv();
extern "C" void create__15daObjStopper2_cFv();
extern "C" void execute__15daObjStopper2_cFv();
extern "C" void event_proc_call__15daObjStopper2_cFv();
extern "C" void actionWait__15daObjStopper2_cFv();
extern "C" void actionOrderEvent__15daObjStopper2_cFv();
extern "C" void actionEvent__15daObjStopper2_cFv();
extern "C" void actionDead__15daObjStopper2_cFv();
extern "C" void demoProc__15daObjStopper2_cFv();
extern "C" void draw__15daObjStopper2_cFv();
extern "C" void _delete__15daObjStopper2_cFv();
extern "C" static void daObjStopper2_Draw__FP15daObjStopper2_c();
extern "C" static void daObjStopper2_Execute__FP15daObjStopper2_c();
extern "C" static void daObjStopper2_Delete__FP15daObjStopper2_c();
extern "C" static void daObjStopper2_Create__FP15daObjStopper2_c();
extern "C" void func_80CEFE6C(void* _this, u8*);
extern "C" extern char const* const d_a_obj_stopper2__stringBase0;
//
// External References:
//
extern "C" void mDoMtx_YrotM__FPA4_fs();
extern "C" void mDoExt_modelUpdateDL__FP8J3DModel();
extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
extern "C" void __ct__10fopAc_ac_cFv();
extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl();
extern "C" void fopAcM_setCullSizeBox2__FP10fopAc_ac_cP12J3DModelData();
extern "C" void fopAcM_orderOtherEventId__FP10fopAc_ac_csUcUsUsUs();
extern "C" void fopAcM_orderMapToolEvent__FP10fopAc_ac_cUcsUsUsUs();
extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc();
extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc();
extern "C" void dComIfGp_getReverb__Fi();
extern "C" void dComIfG_getStageRes__FPCc();
extern "C" void isSwitch__10dSv_info_cCFii();
extern "C" void reset__14dEvt_control_cFv();
extern "C" void searchMapEventData__14dEvt_control_cFUc();
extern "C" void getEventIdx__16dEvent_manager_cFP10fopAc_ac_cUc();
extern "C" void getEventIdx__16dEvent_manager_cFP10fopAc_ac_cPCcUc();
extern "C" void endCheck__16dEvent_manager_cFs();
extern "C" void getMyStaffId__16dEvent_manager_cFPCcP10fopAc_ac_ci();
extern "C" void getIsAddvance__16dEvent_manager_cFi();
extern "C" void getMyActIdx__16dEvent_manager_cFiPCPCciii();
extern "C" void getMySubstanceP__16dEvent_manager_cFiPCci();
extern "C" void cutEnd__16dEvent_manager_cFi();
extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c();
extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c();
extern "C" void cLib_chaseF__FPfff();
extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc();
extern "C" void __ptmf_scall();
extern "C" void _savegpr_26();
extern "C" void _savegpr_28();
extern "C" void _restgpr_26();
extern "C" void _restgpr_28();
extern "C" u8 now__14mDoMtx_stack_c[48];
extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
extern "C" extern u8 data_80CEFFF8[4];
//
// Declarations:
//
/* 80CEFF38-80CEFF3C -00001 0004+00 1/1 0/0 0/0 .data l_staffName */
static char* l_staffName = "dstop";
/* 80CEF338-80CEF358 000078 0020+00 1/1 0/0 0/0 .text CheckCreateHeap__FP10fopAc_ac_c */
static int CheckCreateHeap(fopAc_ac_c* i_this) {
// NONMATCHING
return ((daObjStopper2_c*)i_this)->CreateHeap();
}
/* ############################################################################################## */
/* 80CEFEB0-80CEFEB0 000020 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
#pragma force_active on
SECTION_DEAD static char const* const stringBase_80CEFEB0 = "Stop00";
SECTION_DEAD static char const* const stringBase_80CEFEB7 = "STOP_OPEN";
SECTION_DEAD static char const* const stringBase_80CEFEC1 = "STOP_CLOSE";
SECTION_DEAD static char const* const stringBase_80CEFECC = "STOP_OPEN2";
SECTION_DEAD static char const* const stringBase_80CEFED7 = "STOP_CLOSE2";
SECTION_DEAD static char const* const stringBase_80CEFEE3 = "dstop";
SECTION_DEAD static char const* const stringBase_80CEFEE9 = "door-stop.bmd";
#pragma pop
/* 80CEF358-80CEF368 000098 0010+00 1/1 0/0 0/0 .text getStopName__Fv */
static char* getStopName() {
// NONMATCHING
static const char* getStopName() {
return "door-stop.bmd";
}
/* 80CEF368-80CEF38C 0000A8 0024+00 1/1 0/0 0/0 .text getStopModelData__15daObjStopper2_cFv */
J3DModelData* daObjStopper2_c::getStopModelData() {
// NONMATCHING
return (J3DModelData*)dComIfG_getStageRes(getStopName());
}
/* 80CEF38C-80CEF3C8 0000CC 003C+00 1/1 0/0 0/0 .text initBaseMtx__15daObjStopper2_cFv */
void daObjStopper2_c::initBaseMtx() {
// NONMATCHING
mpModel->setBaseScale(scale);
setBaseMtx();
}
/* 80CEF3C8-80CEF434 000108 006C+00 2/2 0/0 0/0 .text setBaseMtx__15daObjStopper2_cFv */
void daObjStopper2_c::setBaseMtx() {
// NONMATCHING
mDoMtx_stack_c::transS(current.pos.x, current.pos.y + mOffsetY, current.pos.z);
mDoMtx_stack_c::YrotM(shape_angle.y);
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
}
/* 80CEF434-80CEF44C 000174 0018+00 2/2 0/0 0/0 .text getMaxOffsetY__15daObjStopper2_cFv
*/
float daObjStopper2_c::getMaxOffsetY() {
// NONMATCHING
f32 daObjStopper2_c::getMaxOffsetY() {
J3DJoint* root_jnt = mpModel->getModelData()->getJointNodePointer(0);
JUT_ASSERT(154, root_jnt != NULL);
return root_jnt->getMax()->y;
}
/* ############################################################################################## */
/* 80CEFE90-80CEFE94 000000 0004+00 3/3 0/0 0/0 .rodata @3722 */
SECTION_RODATA static u8 const lit_3722[4] = {
0x00,
0x00,
0x00,
0x00,
};
COMPILER_STRIP_GATE(0x80CEFE90, &lit_3722);
/* 80CEFE94-80CEFE98 000004 0004+00 1/1 0/0 0/0 .rodata @3723 */
SECTION_RODATA static f32 const lit_3723 = 150.0f;
COMPILER_STRIP_GATE(0x80CEFE94, &lit_3723);
/* 80CEFF24-80CEFF28 -00001 0004+00 3/3 0/0 0/0 .data l_arcName */
SECTION_DATA static void* l_arcName = (void*)&d_a_obj_stopper2__stringBase0;
/* 80CEFF28-80CEFF38 -00001 0010+00 1/1 0/0 0/0 .data l_evName */
SECTION_DATA static void* l_evName[4] = {
(void*)(((char*)&d_a_obj_stopper2__stringBase0) + 0x7),
(void*)(((char*)&d_a_obj_stopper2__stringBase0) + 0x11),
(void*)(((char*)&d_a_obj_stopper2__stringBase0) + 0x1C),
(void*)(((char*)&d_a_obj_stopper2__stringBase0) + 0x27),
};
/* 80CEF44C-80CEF57C 00018C 0130+00 1/1 0/0 0/0 .text Create__15daObjStopper2_cFv */
int daObjStopper2_c::Create() {
// NONMATCHING
if (!fopAcM_isSwitch(this, getSwbit())) {
mOffsetY = 0.0f;
field_0x588 = 1;
} else {
mOffsetY = getMaxOffsetY();
field_0x588 = 0;
}
attention_info.position.y += 150.0f;
eyePos.y += 150.0f;
initBaseMtx();
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
fopAcM_setCullSizeBox2(this, mpModel->getModelData());
mTool = getEvId();
eventInfo.setArchiveName(l_arcName);
for (int i = 0; i < 4; i++) {
mEventIdx[i] = dComIfGp_getEventManager().getEventIdx(this, l_evName[i], 0xFF);
OS_REPORT("閉じデモ用柵evid<%d>tool<%d>\n", mEventIdx[0], mTool);
}
return 1;
}
/* 80CEF57C-80CEF5C8 0002BC 004C+00 1/1 0/0 0/0 .text CreateHeap__15daObjStopper2_cFv */
int daObjStopper2_c::CreateHeap() {
// NONMATCHING
J3DModelData* modelData = getStopModelData();
JUT_ASSERT(206, modelData != NULL);
mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
if (mpModel == NULL) {
return 0;
}
return 1;
}
/* 80CEF5C8-80CEF66C 000308 00A4+00 1/1 0/0 0/0 .text create__15daObjStopper2_cFv */
int daObjStopper2_c::create() {
// NONMATCHING
fopAcM_ct(this, daObjStopper2_c);
#if DEBUG
if (getSwbit() == 0xFF) {
OS_REPORT_ERROR("ドア柵:スイッチ指定がありません!\n");
return cPhs_ERROR_e;
}
#endif
int phase_state = dComIfG_resLoad(&mPhaseReq, l_arcName);
if (phase_state != cPhs_COMPLEATE_e) {
return phase_state;
}
if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, 0x4000)) {
return cPhs_ERROR_e;
}
if (!Create()) {
return cPhs_ERROR_e;
}
return cPhs_COMPLEATE_e;
}
/* 80CEF66C-80CEF6A4 0003AC 0038+00 1/1 0/0 0/0 .text execute__15daObjStopper2_cFv */
int daObjStopper2_c::execute() {
// NONMATCHING
event_proc_call();
setBaseMtx();
return 1;
}
/* ############################################################################################## */
/* 80CEFF38-80CEFF3C -00001 0004+00 1/1 0/0 0/0 .data l_staffName */
SECTION_DATA static void* l_staffName = (void*)(((char*)&d_a_obj_stopper2__stringBase0) + 0x33);
/* 80CEFF3C-80CEFF48 -00001 000C+00 0/1 0/0 0/0 .data @3769 */
#pragma push
#pragma force_active on
SECTION_DATA static void* lit_3769[3] = {
(void*)NULL,
(void*)0xFFFFFFFF,
(void*)actionWait__15daObjStopper2_cFv,
};
#pragma pop
/* 80CEFF48-80CEFF54 -00001 000C+00 0/1 0/0 0/0 .data @3770 */
#pragma push
#pragma force_active on
SECTION_DATA static void* lit_3770[3] = {
(void*)NULL,
(void*)0xFFFFFFFF,
(void*)actionOrderEvent__15daObjStopper2_cFv,
};
#pragma pop
/* 80CEFF54-80CEFF60 -00001 000C+00 0/1 0/0 0/0 .data @3771 */
#pragma push
#pragma force_active on
SECTION_DATA static void* lit_3771[3] = {
(void*)NULL,
(void*)0xFFFFFFFF,
(void*)actionEvent__15daObjStopper2_cFv,
};
#pragma pop
/* 80CEFF60-80CEFF6C -00001 000C+00 0/1 0/0 0/0 .data @3772 */
#pragma push
#pragma force_active on
SECTION_DATA static void* lit_3772[3] = {
(void*)NULL,
(void*)0xFFFFFFFF,
(void*)actionDead__15daObjStopper2_cFv,
};
#pragma pop
/* 80CEFF6C-80CEFF9C 000068 0030+00 0/1 0/0 0/0 .data l_func$3768 */
#pragma push
#pragma force_active on
SECTION_DATA static u8 l_func[48] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#pragma pop
/* 80CEF6A4-80CEF760 0003E4 00BC+00 1/1 0/0 0/0 .text event_proc_call__15daObjStopper2_cFv */
void daObjStopper2_c::event_proc_call() {
// NONMATCHING
static void (daObjStopper2_c::*l_func[])() = {
&daObjStopper2_c::actionWait,
&daObjStopper2_c::actionOrderEvent,
&daObjStopper2_c::actionEvent,
&daObjStopper2_c::actionDead,
};
(this->*l_func[mAction])();
}
/* 80CEF760-80CEF98C 0004A0 022C+00 1/0 0/0 0/0 .text actionWait__15daObjStopper2_cFv */
void daObjStopper2_c::actionWait() {
// NONMATCHING
BOOL is_switch = fopAcM_isSwitch(this, getSwbit());
if (mOffsetY == 0.0f) {
field_0x584 = 0;
} else {
field_0x584 = 1;
}
if (mTool != 0xFF && mOffsetY != 0.0f) {
field_0x584 += 2;
}
if ((field_0x584 == 1 && !is_switch) || (field_0x584 == 3 && !is_switch)) {
setAction(1);
if (mTool != 0xFF) {
dStage_MapEvent_dt_c* maptooldata = dEvt_control_c::searchMapEventData(mTool);
JUT_ASSERT(325, maptooldata != NULL);
switch (maptooldata->type) {
case dStage_MapEvent_dt_TYPE_ZEV:
mEventIdx[field_0x584] = dComIfGp_getEventManager().getEventIdx(this, mTool);
fopAcM_orderMapToolEvent(this, mTool, 0xFF, 0xFFFF, 1, 0);
eventInfo.onCondition(dEvtCnd_CANDEMO_e);
break;
case dStage_MapEvent_dt_TYPE_MAPTOOLCAMERA:
case dStage_MapEvent_dt_TYPE_STB:
fopAcM_orderOtherEventId(this, mEventIdx[field_0x584], mTool, 0xFFFF, 0, 1);
eventInfo.onCondition(dEvtCnd_CANDEMO_e);
break;
default:
JUT_ASSERT(346, 0);
break;
}
} else {
fopAcM_orderOtherEventId(this, mEventIdx[field_0x584], mTool, 0xFFFF, 0, 1);
eventInfo.onCondition(dEvtCnd_CANDEMO_e);
}
} else if ((field_0x584 == 0 && is_switch) || (field_0x584 == 2 && is_switch)) {
setAction(1);
fopAcM_orderOtherEventId(this, mEventIdx[field_0x584], 0xFF, 0xFFFF, 0, 1);
eventInfo.onCondition(dEvtCnd_CANDEMO_e);
}
}
/* 80CEF98C-80CEFA60 0006CC 00D4+00 1/0 0/0 0/0 .text actionOrderEvent__15daObjStopper2_cFv */
void daObjStopper2_c::actionOrderEvent() {
// NONMATCHING
if (eventInfo.checkCommandDemoAccrpt()) {
setAction(2);
mStaffId = dComIfGp_evmng_getMyStaffId(l_staffName, NULL, 0);
field_0x588 = 1;
demoProc();
} else {
if (mEventIdx[field_0x584] == -1) {
fopAcM_orderMapToolEvent(this, mTool, 0xFF, 0xFFFF, 1, 0);
} else {
fopAcM_orderOtherEventId(this, mEventIdx[field_0x584], mTool, 0xFFFF, 0, 1);
}
eventInfo.onCondition(2);
}
}
/* 80CEFA60-80CEFAD4 0007A0 0074+00 1/0 0/0 0/0 .text actionEvent__15daObjStopper2_cFv */
void daObjStopper2_c::actionEvent() {
// NONMATCHING
if (dComIfGp_evmng_endCheck(mEventIdx[field_0x584])) {
setAction(0);
dComIfGp_event_reset();
} else {
demoProc();
}
}
/* 80CEFAD4-80CEFAD8 000814 0004+00 1/0 0/0 0/0 .text actionDead__15daObjStopper2_cFv */
void daObjStopper2_c::actionDead() {
/* empty function */
}
/* ############################################################################################## */
/* 80CEFE98-80CEFE9C 000008 0004+00 0/1 0/0 0/0 .rodata @3921 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3921 = 1.0f;
COMPILER_STRIP_GATE(0x80CEFE98, &lit_3921);
#pragma pop
/* 80CEFE9C-80CEFEA0 00000C 0004+00 0/1 0/0 0/0 .rodata @3922 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3922 = -1.0f;
COMPILER_STRIP_GATE(0x80CEFE9C, &lit_3922);
#pragma pop
/* 80CEFEA0-80CEFEA4 000010 0004+00 0/1 0/0 0/0 .rodata @3923 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3923 = 30.0f;
COMPILER_STRIP_GATE(0x80CEFEA0, &lit_3923);
#pragma pop
/* 80CEFEA4-80CEFEA8 000014 0004+00 0/1 0/0 0/0 .rodata @3924 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3924 = 4.0f;
COMPILER_STRIP_GATE(0x80CEFEA4, &lit_3924);
#pragma pop
/* 80CEFEA8-80CEFEAC 000018 0004+00 0/1 0/0 0/0 .rodata @3925 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3925 = 60.0f;
COMPILER_STRIP_GATE(0x80CEFEA8, &lit_3925);
#pragma pop
/* 80CEFEAC-80CEFEB0 00001C 0004+00 0/1 0/0 0/0 .rodata @3926 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_3926 = 6.0f;
COMPILER_STRIP_GATE(0x80CEFEAC, &lit_3926);
#pragma pop
/* 80CEFEB0-80CEFEB0 000020 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
#pragma force_active on
SECTION_DEAD static char const* const stringBase_80CEFEF7 = "WAIT";
SECTION_DEAD static char const* const stringBase_80CEFEFC = "Timer";
#pragma pop
/* 80CEFF9C-80CEFFA8 -00001 000C+00 1/1 0/0 0/0 .data action_table$3859 */
SECTION_DATA static void* action_table[3] = {
(void*)(((char*)&d_a_obj_stopper2__stringBase0) + 0x47),
(void*)(((char*)&d_a_obj_stopper2__stringBase0) + 0x7),
(void*)(((char*)&d_a_obj_stopper2__stringBase0) + 0x11),
};
void daObjStopper2_c::actionDead() {}
/* 80CEFAD8-80CEFD40 000818 0268+00 2/2 0/0 0/0 .text demoProc__15daObjStopper2_cFv */
void daObjStopper2_c::demoProc() {
// NONMATCHING
int daObjStopper2_c::demoProc() {
static char* action_table[3] = {
"WAIT",
"STOP_OPEN",
"STOP_CLOSE",
};
daPy_py_c* player = daPy_getPlayerActorClass();
int act_idx = dComIfGp_evmng_getMyActIdx(mStaffId, action_table, ARRAY_SIZE(action_table), 0, 0);
int* idata;
if (dComIfGp_evmng_getIsAddvance(mStaffId)) {
switch (act_idx) {
case 0:
idata = dComIfGp_evmng_getMyIntegerP(mStaffId, "Timer");
if (idata == NULL) {
mTimer = 1;
} else {
mTimer = *idata;
}
break;
case 1:
mOffsetY = 0.0f;
speedF = 0.0f;
fopAcM_seStart(this, Z2SE_OBJ_DOOR_STEEL_BAR, 0);
OS_REPORT("閉じデモドア柵:シャッターオープンSE\n");
break;
case 2:
mOffsetY = getMaxOffsetY();
speedF = 0.0f;
fopAcM_seStart(this, Z2SE_OBJ_DOOR_STEEL_BAR_CL, 0);
OS_REPORT("閉じデモドア柵:シャッタークローズSE\n");
break;
}
}
switch (act_idx) {
case 0:
if (cLib_calcTimer<u8>(&mTimer) == 0) {
dComIfGp_evmng_cutEnd(mStaffId);
}
break;
case 1:
cLib_chaseF(&speedF, 30.0f, 4.0f);
if (cLib_chaseF(&mOffsetY, getMaxOffsetY(), speedF)) {
field_0x588 = 0;
dComIfGp_evmng_cutEnd(mStaffId);
}
break;
case 2:
cLib_chaseF(&speedF, 60.0f, 6.0f);
if (cLib_chaseF(&mOffsetY, 0.0f, speedF)) {
dComIfGp_evmng_cutEnd(mStaffId);
}
break;
default:
dComIfGp_evmng_cutEnd(mStaffId);
break;
}
return 0;
}
/* 80CEFD40-80CEFDB8 000A80 0078+00 1/1 0/0 0/0 .text draw__15daObjStopper2_cFv */
int daObjStopper2_c::draw() {
// NONMATCHING
if (field_0x588 == 0) {
return 1;
}
g_env_light.settingTevStruct(16, &current.pos, &tevStr);
g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr);
mDoExt_modelUpdateDL(mpModel);
return 1;
}
/* 80CEFDB8-80CEFDEC 000AF8 0034+00 1/1 0/0 0/0 .text _delete__15daObjStopper2_cFv */
int daObjStopper2_c::_delete() {
// NONMATCHING
dComIfG_resDelete(&mPhaseReq, l_arcName);
return 1;
}
/* 80CEFDEC-80CEFE0C 000B2C 0020+00 1/0 0/0 0/0 .text daObjStopper2_Draw__FP15daObjStopper2_c */
static int daObjStopper2_Draw(daObjStopper2_c* i_this) {
// NONMATCHING
return i_this->draw();
}
/* 80CEFE0C-80CEFE2C 000B4C 0020+00 1/0 0/0 0/0 .text daObjStopper2_Execute__FP15daObjStopper2_c
*/
static int daObjStopper2_Execute(daObjStopper2_c* i_this) {
// NONMATCHING
return i_this->execute();
}
/* 80CEFE2C-80CEFE4C 000B6C 0020+00 1/0 0/0 0/0 .text daObjStopper2_Delete__FP15daObjStopper2_c */
static int daObjStopper2_Delete(daObjStopper2_c* i_this) {
// NONMATCHING
return i_this->_delete();
}
/* 80CEFE4C-80CEFE6C 000B8C 0020+00 1/0 0/0 0/0 .text daObjStopper2_Create__FP15daObjStopper2_c */
static int daObjStopper2_Create(daObjStopper2_c* i_this) {
// NONMATCHING
return i_this->create();
}
/* 80CEFE6C-80CEFE88 000BAC 001C+00 1/1 0/0 0/0 .text cLib_calcTimer<Uc>__FPUc */
extern "C" void func_80CEFE6C(void* _this, u8* param_0) {
// NONMATCHING
}
/* ############################################################################################## */
/* 80CEFFA8-80CEFFC8 -00001 0020+00 1/0 0/0 0/0 .data l_daObjStopper2_Method */
static actor_method_class l_daObjStopper2_Method = {
(process_method_func)daObjStopper2_Create__FP15daObjStopper2_c,
(process_method_func)daObjStopper2_Delete__FP15daObjStopper2_c,
(process_method_func)daObjStopper2_Execute__FP15daObjStopper2_c,
0,
(process_method_func)daObjStopper2_Draw__FP15daObjStopper2_c,
(process_method_func)daObjStopper2_Create,
(process_method_func)daObjStopper2_Delete,
(process_method_func)daObjStopper2_Execute,
NULL,
(process_method_func)daObjStopper2_Draw,
};
/* 80CEFFC8-80CEFFF8 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_Stopper2 */