mirror of https://github.com/zeldaret/tp.git
d_a_obj_zdoor matching (#2334)
* Fully matching * Fix PR comments * Fix PR comments (rename parameter in callback functions) --------- Co-authored-by: Ttobas <anon@ym.ous>
This commit is contained in:
parent
1a5a81976a
commit
02ded44d36
|
@ -2133,7 +2133,7 @@ config.libs = [
|
|||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_yel_bag"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_ystone"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_zcloth"),
|
||||
ActorRel(NonMatching, "d_a_obj_zdoor"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_zdoor"),
|
||||
ActorRel(NonMatching, "d_a_obj_zrTurara"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_zrTuraraRock"),
|
||||
ActorRel(Equivalent, "d_a_obj_zraMark"), # weak func order
|
||||
|
|
|
@ -28,17 +28,16 @@ public:
|
|||
|
||||
u32 getType() { return fopAcM_GetParamBit(this, 0, 4); }
|
||||
|
||||
private:
|
||||
/* 0x5A0 */ request_of_phase_process_class mPhaseReq;
|
||||
/* 0x5A8 */ J3DModel* mpModel;
|
||||
/* 0x5AC */ dBgS_ObjAcch mObjAcch;
|
||||
/* 0x784 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x7C4 */ dCcD_Stts mStts;
|
||||
/* 0x800 */ dCcD_Cyl field_0x800[4];
|
||||
/* 0xCF0 */ dCcD_Cyl field_0xcf0;
|
||||
/* 0xE2C */ s16 field_0xe2c;
|
||||
/* 0xE2E */ s16 field_0xe2e;
|
||||
/* 0xE30 */ u8 field_0xe30;
|
||||
/* 0x800 */ dCcD_Cyl mCallbackCylinders[4];
|
||||
/* 0xCF0 */ dCcD_Cyl mCylinder;
|
||||
/* 0xE2C */ s16 mOpenSpeed;
|
||||
/* 0xE2E */ s16 mOpenAngle;
|
||||
/* 0xE30 */ u8 mDoorType;
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daZdoor_c) == 0xE34);
|
||||
|
|
|
@ -5,93 +5,7 @@
|
|||
|
||||
#include "d/actor/d_a_obj_zdoor.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" static void checkPlayerPos__FP9daZdoor_c();
|
||||
extern "C" static void
|
||||
doorCoHitCallBack__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf();
|
||||
extern "C" static void
|
||||
doorTgHitCallBack__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf();
|
||||
extern "C" void init_cyl__9daZdoor_cFv();
|
||||
extern "C" void set_cyl__9daZdoor_cFv();
|
||||
extern "C" void setBaseMtx__9daZdoor_cFv();
|
||||
extern "C" void Create__9daZdoor_cFv();
|
||||
extern "C" void CreateHeap__9daZdoor_cFv();
|
||||
extern "C" void create1st__9daZdoor_cFv();
|
||||
extern "C" void Execute__9daZdoor_cFPPA3_A4_f();
|
||||
extern "C" void Draw__9daZdoor_cFv();
|
||||
extern "C" void Delete__9daZdoor_cFv();
|
||||
extern "C" static void daZdoor_create1st__FP9daZdoor_c();
|
||||
extern "C" void __dt__8cM3dGCylFv();
|
||||
extern "C" void __dt__8cM3dGAabFv();
|
||||
extern "C" void __dt__8dCcD_CylFv();
|
||||
extern "C" void __ct__8dCcD_CylFv();
|
||||
extern "C" void __dt__12dBgS_ObjAcchFv();
|
||||
extern "C" static void daZdoor_MoveBGDelete__FP9daZdoor_c();
|
||||
extern "C" static void daZdoor_MoveBGExecute__FP9daZdoor_c();
|
||||
extern "C" static void daZdoor_MoveBGDraw__FP9daZdoor_c();
|
||||
extern "C" static void func_80D401D4();
|
||||
extern "C" static void func_80D401DC();
|
||||
extern "C" extern char const* const d_a_obj_zdoor__stringBase0;
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void mDoMtx_YrotS__FPA4_fs();
|
||||
extern "C" void mDoMtx_YrotM__FPA4_fs();
|
||||
extern "C" void mDoExt_modelUpdateDL__FP8J3DModel();
|
||||
extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
|
||||
extern "C" void fopAcM_setCullSizeBox2__FP10fopAc_ac_cP12J3DModelData();
|
||||
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 getRes__14dRes_control_cFPCcPCcP11dRes_info_ci();
|
||||
extern "C" void getObjectResName2Index__14dRes_control_cFPCcPCc();
|
||||
extern "C" void __ct__12dBgS_AcchCirFv();
|
||||
extern "C" void __dt__9dBgS_AcchFv();
|
||||
extern "C" void __ct__9dBgS_AcchFv();
|
||||
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 SetObj__16dBgS_PolyPassChkFv();
|
||||
extern "C" void __ct__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 Set__8dCcD_CylFRC11dCcD_SrcCyl();
|
||||
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 __mi__4cXyzCFRC3Vec();
|
||||
extern "C" void Set__8cM3dGCylFRC9cM3dGCylS();
|
||||
extern "C" void SetC__8cM3dGCylFRC4cXyz();
|
||||
extern "C" void cLib_addCalcAngleS__FPsssss();
|
||||
extern "C" void seStartLevel__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void __construct_array();
|
||||
extern "C" void _savegpr_23();
|
||||
extern "C" void _savegpr_26();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_23();
|
||||
extern "C" void _restgpr_26();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" extern void* __vt__8dCcD_Cyl[36];
|
||||
extern "C" extern void* __vt__9dCcD_Stts[11];
|
||||
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 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
|
||||
#include "d/actor/d_a_player.h"
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
|
@ -148,24 +62,18 @@ static const cM3dGCylS l_cyl_data2[3] = {
|
|||
};
|
||||
|
||||
/* 80D40264-80D4026C 000078 0006+02 0/1 0/0 0/0 .rodata l_open_limit_max */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
static const s16 l_open_limit_max[3] = {
|
||||
0x4E20,
|
||||
0x5555,
|
||||
0,
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
/* 80D4026C-80D40274 000080 0006+02 0/1 0/0 0/0 .rodata l_open_limit_min */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
static const s16 l_open_limit_min[3] = {
|
||||
0x1388,
|
||||
0xAAAB,
|
||||
0xAE39,
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
/* 80D40274-80D4027C 000088 0006+02 2/2 0/0 0/0 .rodata l_open_speed */
|
||||
static const s16 l_open_speed[3] = {
|
||||
|
@ -174,52 +82,82 @@ static const s16 l_open_speed[3] = {
|
|||
0x0200,
|
||||
};
|
||||
|
||||
/* 80D4027C-80D40280 000090 0004+00 1/2 0/0 0/0 .rodata @3658 */
|
||||
SECTION_RODATA static u8 const lit_3658[4] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x80D4027C, &lit_3658);
|
||||
|
||||
/*
|
||||
Checks if the player is in front or behind the door.
|
||||
*/
|
||||
/* 80D3F438-80D3F4DC 000078 00A4+00 2/2 0/0 0/0 .text checkPlayerPos__FP9daZdoor_c */
|
||||
static BOOL checkPlayerPos(daZdoor_c* i_this) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80D40280-80D40284 000094 0004+00 1/1 0/0 0/0 .rodata @3679 */
|
||||
SECTION_RODATA static f32 const lit_3679 = 3.0f;
|
||||
COMPILER_STRIP_GATE(0x80D40280, &lit_3679);
|
||||
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||
cXyz distance_to_player = player->current.pos - i_this->current.pos;
|
||||
|
||||
mDoMtx_stack_c::YrotS(-i_this->current.angle.y);
|
||||
mDoMtx_stack_c::multVec(&distance_to_player, &distance_to_player);
|
||||
|
||||
// Variable name could be the opposite; "is_behind".
|
||||
BOOL is_in_front = TRUE;
|
||||
if (distance_to_player.z > 0.0f) {
|
||||
is_in_front = FALSE;
|
||||
}
|
||||
return is_in_front;
|
||||
}
|
||||
|
||||
/* 80D3F4DC-80D3F570 00011C 0094+00 1/1 0/0 0/0 .text
|
||||
* doorCoHitCallBack__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf */
|
||||
static void doorCoHitCallBack(fopAc_ac_c* i_this, dCcD_GObjInf* param_1, fopAc_ac_c* param_2,
|
||||
static void doorCoHitCallBack(fopAc_ac_c* param_0, dCcD_GObjInf* param_1, fopAc_ac_c* colliding_actor,
|
||||
dCcD_GObjInf* param_3) {
|
||||
// NONMATCHING
|
||||
daZdoor_c* i_this = static_cast<daZdoor_c*>(param_0);
|
||||
|
||||
fopAc_ac_c* player_actor = dComIfGp_getLinkPlayer();
|
||||
if (i_this != NULL) {
|
||||
u32 type = i_this->getType();
|
||||
s16 open_speed = l_open_speed[type & 0xFF];
|
||||
if (colliding_actor != NULL && colliding_actor == player_actor) {
|
||||
if (player_actor->speedF > 3.0f) {
|
||||
BOOL player_direction = checkPlayerPos(i_this);
|
||||
if (player_direction) {
|
||||
i_this->mOpenSpeed = -open_speed;
|
||||
} else {
|
||||
i_this->mOpenSpeed = open_speed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80D40284-80D4028C 000098 0004+04 1/1 0/0 0/0 .rodata @3712 */
|
||||
SECTION_RODATA static f32 const lit_3712[1 + 1 /* padding */] = {
|
||||
2.0f,
|
||||
/* padding */
|
||||
0.0f,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x80D40284, &lit_3712);
|
||||
|
||||
/* 80D4028C-80D40294 0000A0 0008+00 1/1 0/0 0/0 .rodata @3714 */
|
||||
SECTION_RODATA static u8 const lit_3714[8] = {
|
||||
0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x80D4028C, &lit_3714);
|
||||
|
||||
/* 80D3F570-80D3F65C 0001B0 00EC+00 1/1 0/0 0/0 .text
|
||||
* doorTgHitCallBack__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf */
|
||||
static void doorTgHitCallBack(fopAc_ac_c* i_this, dCcD_GObjInf* param_1, fopAc_ac_c* param_2,
|
||||
static void doorTgHitCallBack(fopAc_ac_c* param_0, dCcD_GObjInf* param_1, fopAc_ac_c* colliding_actor,
|
||||
dCcD_GObjInf* param_3) {
|
||||
// NONMATCHING
|
||||
daZdoor_c* i_this = static_cast<daZdoor_c*>(param_0);
|
||||
|
||||
fopAc_ac_c* player_actor = dComIfGp_getLinkPlayer();
|
||||
if (i_this == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (colliding_actor != player_actor) {
|
||||
return;
|
||||
}
|
||||
|
||||
u32 type = i_this->getType();
|
||||
s16 open_speed = l_open_speed[type & 0xFF];
|
||||
|
||||
if (param_3->ChkAtType(AT_TYPE_NORMAL_SWORD) == 0 && param_3->ChkAtType(AT_TYPE_UNK) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_TURN_RIGHT ||
|
||||
daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_UNK_9) {
|
||||
open_speed *= 2.0f;
|
||||
}
|
||||
|
||||
BOOL player_direction = checkPlayerPos(i_this);
|
||||
if (player_direction) {
|
||||
i_this->mOpenSpeed = -open_speed;
|
||||
} else {
|
||||
i_this->mOpenSpeed = open_speed;
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
|
@ -255,51 +193,64 @@ static dCcD_SrcCyl l_cyl_src2 = {
|
|||
|
||||
/* 80D3F65C-80D3F740 00029C 00E4+00 1/1 0/0 0/0 .text init_cyl__9daZdoor_cFv */
|
||||
void daZdoor_c::init_cyl() {
|
||||
// NONMATCHING
|
||||
mStts.Init(0xff, 0xff, this);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
mCallbackCylinders[i].Set(l_cyl_src);
|
||||
mCallbackCylinders[i].SetStts(&mStts);
|
||||
mCallbackCylinders[i].SetCoHitCallback(&doorCoHitCallBack);
|
||||
mCallbackCylinders[i].SetTgHitCallback(&doorTgHitCallBack);
|
||||
mCallbackCylinders[i].cM3dGCyl::Set(l_cyl_data[mDoorType]);
|
||||
}
|
||||
|
||||
mCylinder.Set(l_cyl_src2);
|
||||
mCylinder.SetStts(&mStts);
|
||||
mCylinder.cM3dGCyl::Set(l_cyl_data2[mDoorType]);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80D40294-80D40298 0000A8 0004+00 0/1 0/0 0/0 .rodata @3796 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3796 = 60.0f;
|
||||
COMPILER_STRIP_GATE(0x80D40294, &lit_3796);
|
||||
#pragma pop
|
||||
|
||||
/* 80D40298-80D4029C 0000AC 0004+00 0/1 0/0 0/0 .rodata @3797 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3797 = 120.0f;
|
||||
COMPILER_STRIP_GATE(0x80D40298, &lit_3797);
|
||||
#pragma pop
|
||||
|
||||
/* 80D4029C-80D402A0 0000B0 0004+00 0/1 0/0 0/0 .rodata @3798 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3798 = 180.0f;
|
||||
COMPILER_STRIP_GATE(0x80D4029C, &lit_3798);
|
||||
#pragma pop
|
||||
|
||||
/* 80D402A0-80D402A4 0000B4 0004+00 0/1 0/0 0/0 .rodata @3799 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3799 = 240.0f;
|
||||
COMPILER_STRIP_GATE(0x80D402A0, &lit_3799);
|
||||
#pragma pop
|
||||
|
||||
/* 80D3F740-80D3F884 000380 0144+00 1/1 0/0 0/0 .text set_cyl__9daZdoor_cFv */
|
||||
void daZdoor_c::set_cyl() {
|
||||
// NONMATCHING
|
||||
cXyz vecs[] = {
|
||||
cXyz(60.0f, 0.0f, 0.0f),
|
||||
cXyz(120.0f, 0.0f, 0.0f),
|
||||
cXyz(180.0f, 0.0f, 0.0f),
|
||||
cXyz(240.0f, 0.0f, 0.0)
|
||||
};
|
||||
|
||||
cXyz current_vec;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
current_vec = vecs[i];
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::YrotM(current.angle.y);
|
||||
mDoMtx_stack_c::multVec(¤t_vec, ¤t_vec);
|
||||
mCallbackCylinders[i].SetC(current_vec);
|
||||
}
|
||||
|
||||
mCylinder.SetC(current.pos);
|
||||
}
|
||||
|
||||
/* 80D3F884-80D3F8F8 0004C4 0074+00 2/2 0/0 0/0 .text setBaseMtx__9daZdoor_cFv */
|
||||
void daZdoor_c::setBaseMtx() {
|
||||
// NONMATCHING
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::YrotM(current.angle.y);
|
||||
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
MTXCopy(mDoMtx_stack_c::get(), mBgMtx);
|
||||
}
|
||||
|
||||
/* 80D3F8F8-80D3F970 000538 0078+00 1/0 0/0 0/0 .text Create__9daZdoor_cFv */
|
||||
int daZdoor_c::Create() {
|
||||
// NONMATCHING
|
||||
setBaseMtx();
|
||||
|
||||
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
|
||||
|
||||
init_cyl();
|
||||
fopAcM_setCullSizeBox2(this, mpModel->getModelData());
|
||||
|
||||
home.angle.y = home.angle.z;
|
||||
current.angle.z = 0;
|
||||
home.angle.z = 0;
|
||||
mOpenAngle = current.angle.y - home.angle.y;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80D40398-80D403A4 -00001 000C+00 3/3 0/0 0/0 .data l_arcName */
|
||||
|
@ -318,7 +269,16 @@ static char* l_bmdName[3] = {
|
|||
|
||||
/* 80D3F970-80D3F9F0 0005B0 0080+00 1/0 0/0 0/0 .text CreateHeap__9daZdoor_cFv */
|
||||
int daZdoor_c::CreateHeap() {
|
||||
// NONMATCHING
|
||||
J3DModelData* modelData
|
||||
= (J3DModelData*)dComIfG_getObjectRes(l_arcName[mDoorType], l_bmdName[mDoorType]);
|
||||
|
||||
mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
|
||||
|
||||
if (mpModel == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 80D402A4-80D402A8 0000B8 0004+00 1/1 0/0 0/0 .rodata estimateSizeTbl$3848 */
|
||||
|
@ -336,46 +296,126 @@ static char* l_dzbName[3] = {
|
|||
|
||||
/* 80D3F9F0-80D3FACC 000630 00DC+00 1/1 0/0 0/0 .text create1st__9daZdoor_cFv */
|
||||
int daZdoor_c::create1st() {
|
||||
// NONMATCHING
|
||||
mDoorType = getType();
|
||||
int phase_state = dComIfG_resLoad(&mPhaseReq, l_arcName[mDoorType]);
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
int res_name_index = g_dComIfG_gameInfo.mResControl.getObjectResName2Index(l_arcName[mDoorType], l_dzbName[mDoorType]);
|
||||
|
||||
u16 estimate_size = estimateSizeTbl[mDoorType];
|
||||
phase_state = MoveBGCreate(l_arcName[mDoorType], res_name_index, 0x0, estimate_size, 0x0);
|
||||
|
||||
if (phase_state == cPhs_ERROR_e) {
|
||||
return phase_state;
|
||||
}
|
||||
}
|
||||
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
/* 80D402A8-80D402AC 0000BC 0004+00 0/1 0/0 0/0 .rodata @3906 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3906 = 1.0f;
|
||||
COMPILER_STRIP_GATE(0x80D402A8, &lit_3906);
|
||||
#pragma pop
|
||||
|
||||
/* 80D402AC-80D402B0 0000C0 0004+00 0/1 0/0 0/0 .rodata @3907 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3907 = -1.0f;
|
||||
COMPILER_STRIP_GATE(0x80D402AC, &lit_3907);
|
||||
#pragma pop
|
||||
|
||||
/* 80D3FACC-80D3FCE8 00070C 021C+00 1/0 0/0 0/0 .text Execute__9daZdoor_cFPPA3_A4_f */
|
||||
int daZdoor_c::Execute(Mtx** i_mtx) {
|
||||
// NONMATCHING
|
||||
s16 current_open_angle = mOpenAngle;
|
||||
set_cyl();
|
||||
|
||||
s16 open_limit_max = l_open_limit_max[mDoorType];
|
||||
s16 open_limit_min = l_open_limit_min[mDoorType];
|
||||
cLib_addCalcAngleS(&mOpenSpeed, 0, 0x14, 0x60, 0x10);
|
||||
|
||||
mOpenAngle += mOpenSpeed;
|
||||
|
||||
if (mOpenAngle > open_limit_max) {
|
||||
mOpenAngle = open_limit_max;
|
||||
if (current_open_angle == open_limit_max) {
|
||||
mOpenSpeed = 0;
|
||||
} else {
|
||||
mOpenSpeed = -mOpenSpeed;
|
||||
}
|
||||
} else if (mOpenAngle < open_limit_min) {
|
||||
mOpenAngle = open_limit_min;
|
||||
if (current_open_angle == open_limit_min) {
|
||||
mOpenSpeed = 0;
|
||||
} else {
|
||||
mOpenSpeed = -mOpenSpeed;
|
||||
}
|
||||
}
|
||||
|
||||
current.angle.y = home.angle.y + mOpenAngle;
|
||||
if (old.angle.y != current.angle.y) {
|
||||
switch (mDoorType) {
|
||||
case 0:
|
||||
fopAcM_seStartLevel(this, Z2SE_OBJ_ZELDAROOM_DOOR_MOVE, 0);
|
||||
break;
|
||||
case 1:
|
||||
fopAcM_seStartLevel(this, Z2SE_OBJ_MOVE_JAIL_DOOR, 0);
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setBaseMtx();
|
||||
*i_mtx = &mBgMtx;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
dComIfG_Ccsp()->Set(&mCallbackCylinders[i]);
|
||||
}
|
||||
|
||||
dComIfG_Ccsp()->Set(&mCylinder);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80D3FCE8-80D3FD8C 000928 00A4+00 1/0 0/0 0/0 .text Draw__9daZdoor_cFv */
|
||||
int daZdoor_c::Draw() {
|
||||
// NONMATCHING
|
||||
g_env_light.settingTevStruct(0x10, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(mpModel->mModelData, &tevStr);
|
||||
|
||||
dComIfGd_setListBG();
|
||||
mDoExt_modelUpdateDL(mpModel);
|
||||
dComIfGd_setList();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80D3FD8C-80D3FDCC 0009CC 0040+00 1/0 0/0 0/0 .text Delete__9daZdoor_cFv */
|
||||
int daZdoor_c::Delete() {
|
||||
// NONMATCHING
|
||||
dComIfG_resDelete(&mPhaseReq, l_arcName[mDoorType]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80D3FDCC-80D3FF18 000A0C 014C+00 1/0 0/0 0/0 .text daZdoor_create1st__FP9daZdoor_c */
|
||||
static int daZdoor_create1st(daZdoor_c* i_this) {
|
||||
fopAcM_SetupActor(i_this, daZdoor_c);
|
||||
|
||||
return i_this->create1st();
|
||||
}
|
||||
|
||||
/* 80D40168-80D40188 000DA8 0020+00 1/0 0/0 0/0 .text daZdoor_MoveBGDelete__FP9daZdoor_c
|
||||
*/
|
||||
static int daZdoor_MoveBGDelete(daZdoor_c* i_this) {
|
||||
return i_this->MoveBGDelete();
|
||||
}
|
||||
|
||||
/* 80D40188-80D401A8 000DC8 0020+00 1/0 0/0 0/0 .text daZdoor_MoveBGExecute__FP9daZdoor_c
|
||||
*/
|
||||
static int daZdoor_MoveBGExecute(daZdoor_c* i_this) {
|
||||
return i_this->MoveBGExecute();
|
||||
}
|
||||
|
||||
/* 80D401A8-80D401D4 000DE8 002C+00 1/0 0/0 0/0 .text daZdoor_MoveBGDraw__FP9daZdoor_c */
|
||||
static int daZdoor_MoveBGDraw(daZdoor_c* i_this) {
|
||||
return i_this->MoveBGDraw();
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80D403BC-80D403DC -00001 0020+00 1/0 0/0 0/0 .data daZdoor_METHODS */
|
||||
static actor_method_class daZdoor_METHODS = {
|
||||
(process_method_func)daZdoor_create1st__FP9daZdoor_c,
|
||||
(process_method_func)daZdoor_MoveBGDelete__FP9daZdoor_c,
|
||||
(process_method_func)daZdoor_MoveBGExecute__FP9daZdoor_c,
|
||||
(process_method_func)daZdoor_create1st,
|
||||
(process_method_func)daZdoor_MoveBGDelete,
|
||||
(process_method_func)daZdoor_MoveBGExecute,
|
||||
0,
|
||||
(process_method_func)daZdoor_MoveBGDraw__FP9daZdoor_c,
|
||||
(process_method_func)daZdoor_MoveBGDraw,
|
||||
};
|
||||
|
||||
/* 80D403DC-80D4040C -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_ZDoor */
|
||||
|
@ -395,106 +435,3 @@ extern actor_process_profile_definition g_profile_Obj_ZDoor = {
|
|||
fopAc_ACTOR_e, // mActorType
|
||||
fopAc_CULLBOX_CUSTOM_e, // cullType
|
||||
};
|
||||
|
||||
/* 80D4040C-80D40418 0000FC 000C+00 4/4 0/0 0/0 .data __vt__8cM3dGCyl */
|
||||
SECTION_DATA extern void* __vt__8cM3dGCyl[3] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__8cM3dGCylFv,
|
||||
};
|
||||
|
||||
/* 80D40418-80D40424 000108 000C+00 4/4 0/0 0/0 .data __vt__8cM3dGAab */
|
||||
SECTION_DATA extern void* __vt__8cM3dGAab[3] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__8cM3dGAabFv,
|
||||
};
|
||||
|
||||
/* 80D40424-80D40448 000114 0024+00 2/2 0/0 0/0 .data __vt__12dBgS_ObjAcch */
|
||||
SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__12dBgS_ObjAcchFv,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)func_80D401DC,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)func_80D401D4,
|
||||
};
|
||||
|
||||
/* 80D40448-80D40470 000138 0028+00 1/1 0/0 0/0 .data __vt__9daZdoor_c */
|
||||
SECTION_DATA extern void* __vt__9daZdoor_c[10] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)CreateHeap__9daZdoor_cFv,
|
||||
(void*)Create__9daZdoor_cFv,
|
||||
(void*)Execute__9daZdoor_cFPPA3_A4_f,
|
||||
(void*)Draw__9daZdoor_cFv,
|
||||
(void*)Delete__9daZdoor_cFv,
|
||||
(void*)IsDelete__16dBgS_MoveBgActorFv,
|
||||
(void*)ToFore__16dBgS_MoveBgActorFv,
|
||||
(void*)ToBack__16dBgS_MoveBgActorFv,
|
||||
};
|
||||
|
||||
/* 80D3FDCC-80D3FF18 000A0C 014C+00 1/0 0/0 0/0 .text daZdoor_create1st__FP9daZdoor_c */
|
||||
static int daZdoor_create1st(daZdoor_c* i_this) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80D3FF18-80D3FF60 000B58 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */
|
||||
// cM3dGCyl::~cM3dGCyl() {
|
||||
extern "C" void __dt__8cM3dGCylFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80D3FF60-80D3FFA8 000BA0 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */
|
||||
// cM3dGAab::~cM3dGAab() {
|
||||
extern "C" void __dt__8cM3dGAabFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80D3FFA8-80D40074 000BE8 00CC+00 1/1 0/0 0/0 .text __dt__8dCcD_CylFv */
|
||||
// dCcD_Cyl::~dCcD_Cyl() {
|
||||
extern "C" void __dt__8dCcD_CylFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80D40074-80D400F8 000CB4 0084+00 1/1 0/0 0/0 .text __ct__8dCcD_CylFv */
|
||||
// dCcD_Cyl::dCcD_Cyl() {
|
||||
extern "C" void __ct__8dCcD_CylFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80D400F8-80D40168 000D38 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */
|
||||
// dBgS_ObjAcch::~dBgS_ObjAcch()
|
||||
extern "C" void __dt__12dBgS_ObjAcchFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80D40168-80D40188 000DA8 0020+00 1/0 0/0 0/0 .text daZdoor_MoveBGDelete__FP9daZdoor_c
|
||||
*/
|
||||
static int daZdoor_MoveBGDelete(daZdoor_c* i_this) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80D40188-80D401A8 000DC8 0020+00 1/0 0/0 0/0 .text daZdoor_MoveBGExecute__FP9daZdoor_c
|
||||
*/
|
||||
static int daZdoor_MoveBGExecute(daZdoor_c* i_this) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80D401A8-80D401D4 000DE8 002C+00 1/0 0/0 0/0 .text daZdoor_MoveBGDraw__FP9daZdoor_c */
|
||||
static int daZdoor_MoveBGDraw(daZdoor_c* i_this) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80D401D4-80D401DC 000E14 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */
|
||||
static void func_80D401D4() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80D401DC-80D401E4 000E1C 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */
|
||||
static void func_80D401DC() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue