mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-05 17:43:23 -04:00
d_a_obj_AjavW
This commit is contained in:
+1
-1
@@ -1250,7 +1250,7 @@ config.libs = [
|
||||
ActorRel(NonMatching, "d_a_mdoor"),
|
||||
ActorRel(NonMatching, "d_a_msw"),
|
||||
ActorRel(NonMatching, "d_a_mtoge"),
|
||||
ActorRel(NonMatching, "d_a_obj_AjavW"),
|
||||
ActorRel(Matching, "d_a_obj_AjavW", extra_cflags=['-pragma "nosyminline on"']),
|
||||
ActorRel(Matching, "d_a_obj_Ygush00", extra_cflags=['-pragma "nosyminline on"']),
|
||||
ActorRel(NonMatching, "d_a_obj_akabe"),
|
||||
ActorRel(NonMatching, "d_a_obj_barrel"),
|
||||
|
||||
+126
-32
@@ -3,71 +3,165 @@
|
||||
// Translation Unit: d_a_obj_AjavW.cpp
|
||||
//
|
||||
|
||||
#include "d_a_obj_AjavW.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "d/d_bg_w.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
|
||||
class daObjAjavW_c : public fopAc_ac_c {
|
||||
public:
|
||||
s32 _create();
|
||||
bool _execute();
|
||||
bool _draw();
|
||||
bool _delete();
|
||||
bool create_heap();
|
||||
static BOOL solidHeapCB(fopAc_ac_c *i_this);
|
||||
|
||||
public:
|
||||
/* 0x290 */ request_of_phase_process_class mPhs;
|
||||
/* 0x298 */ J3DModel * mpModel;
|
||||
/* 0x29C */ mDoExt_btkAnm mBtkAnm;
|
||||
/* 0x2B0 */ dBgW * mpBgW;
|
||||
};
|
||||
|
||||
namespace {
|
||||
static const char l_arcname[] = "AjavW";
|
||||
};
|
||||
|
||||
/* 00000078-0000009C .text solidHeapCB__12daObjAjavW_cFP10fopAc_ac_c */
|
||||
void daObjAjavW_c::solidHeapCB(fopAc_ac_c*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjAjavW_c::solidHeapCB(fopAc_ac_c* i_this) {
|
||||
return ((daObjAjavW_c*)i_this)->create_heap();
|
||||
}
|
||||
|
||||
/* 0000009C-00000208 .text create_heap__12daObjAjavW_cFv */
|
||||
void daObjAjavW_c::create_heap() {
|
||||
/* Nonmatching */
|
||||
bool daObjAjavW_c::create_heap() {
|
||||
bool ret = true;
|
||||
|
||||
void* pModelData = dComIfG_getObjectRes(l_arcname, 0x05);
|
||||
J3DAnmTextureSRTKey * pBtk = (J3DAnmTextureSRTKey *)dComIfG_getObjectRes(l_arcname, 0x08);
|
||||
|
||||
if (!pModelData || !pBtk) {
|
||||
JUT_ASSERT(0xa7, 0);
|
||||
ret = false;
|
||||
} else {
|
||||
mpModel = mDoExt_J3DModel__create((J3DModelData*)pModelData, 0x80000, 0x11000222);
|
||||
s32 btkRet = mBtkAnm.init((J3DModelData*)pModelData, pBtk, 1, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0);
|
||||
mpBgW = dBgW_NewSet((cBgD_t*)dComIfG_getObjectRes(l_arcname, 0x0B), cBgW::MOVE_BG_e, &mpModel->getBaseTRMtx());
|
||||
|
||||
if (!mpModel || !btkRet || !mpBgW)
|
||||
ret = false;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 00000208-00000350 .text _create__12daObjAjavW_cFv */
|
||||
void daObjAjavW_c::_create() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
s32 daObjAjavW_c::_create() {
|
||||
fopAcM_SetupActor(this, daObjAjavW_c);
|
||||
|
||||
/* 00000350-000003AC .text __dt__13mDoExt_btkAnmFv */
|
||||
mDoExt_btkAnm::~mDoExt_btkAnm() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
s32 ret = dComIfG_resLoad(&mPhs, l_arcname);
|
||||
|
||||
/* 000003AC-000003F4 .text __dt__14mDoExt_baseAnmFv */
|
||||
mDoExt_baseAnm::~mDoExt_baseAnm() {
|
||||
/* Nonmatching */
|
||||
if (ret == cPhs_COMPLEATE_e) {
|
||||
if (fopAcM_entrySolidHeap(this, (heapCallbackFunc)solidHeapCB, 0x8c0) == 1) {
|
||||
if (dComIfG_Bgsp()->Regist(mpBgW, this)) {
|
||||
ret = cPhs_ERROR_e;
|
||||
} else {
|
||||
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
|
||||
mpModel->setBaseScale(mScale);
|
||||
mDoMtx_stack_c::transS(getPosition());
|
||||
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
|
||||
}
|
||||
} else {
|
||||
ret = cPhs_ERROR_e;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 000003F4-00000488 .text _delete__12daObjAjavW_cFv */
|
||||
void daObjAjavW_c::_delete() {
|
||||
/* Nonmatching */
|
||||
bool daObjAjavW_c::_delete() {
|
||||
dComIfG_resDelete(&mPhs, l_arcname);
|
||||
|
||||
if (heap != NULL && mpBgW != NULL) {
|
||||
if (mpBgW->ChkUsed()) {
|
||||
dComIfG_Bgsp()->Release(mpBgW);
|
||||
}
|
||||
|
||||
mpBgW = NULL;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 00000488-000004F4 .text _execute__12daObjAjavW_cFv */
|
||||
void daObjAjavW_c::_execute() {
|
||||
/* Nonmatching */
|
||||
bool daObjAjavW_c::_execute() {
|
||||
mBtkAnm.play();
|
||||
if (mpBgW != NULL && mpBgW->ChkUsed())
|
||||
mpBgW->Move();
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 000004F4-0000056C .text _draw__12daObjAjavW_cFv */
|
||||
void daObjAjavW_c::_draw() {
|
||||
/* Nonmatching */
|
||||
bool daObjAjavW_c::_draw() {
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG1, getPositionP(), &mTevStr);
|
||||
g_env_light.setLightTevColorType(mpModel, &mTevStr);
|
||||
mBtkAnm.entry(mpModel->getModelData());
|
||||
mDoExt_modelUpdateDL(mpModel);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 0000056C-0000058C .text daObjAjavW_Create__FP12daObjAjavW_c */
|
||||
void daObjAjavW_Create(daObjAjavW_c*) {
|
||||
/* Nonmatching */
|
||||
s32 daObjAjavW_Create(daObjAjavW_c* i_this) {
|
||||
return i_this->_create();
|
||||
}
|
||||
|
||||
/* 0000058C-000005B0 .text daObjAjavW_Delete__FP12daObjAjavW_c */
|
||||
void daObjAjavW_Delete(daObjAjavW_c*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjAjavW_Delete(daObjAjavW_c* i_this) {
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
/* 000005B0-000005D4 .text daObjAjavW_Execute__FP12daObjAjavW_c */
|
||||
void daObjAjavW_Execute(daObjAjavW_c*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjAjavW_Execute(daObjAjavW_c* i_this) {
|
||||
return i_this->_execute();
|
||||
}
|
||||
|
||||
/* 000005D4-000005F8 .text daObjAjavW_Draw__FP12daObjAjavW_c */
|
||||
void daObjAjavW_Draw(daObjAjavW_c*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjAjavW_Draw(daObjAjavW_c* i_this) {
|
||||
return i_this->_draw();
|
||||
}
|
||||
|
||||
/* 000005F8-00000600 .text daObjAjavW_IsDelete__FP12daObjAjavW_c */
|
||||
void daObjAjavW_IsDelete(daObjAjavW_c*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjAjavW_IsDelete(daObjAjavW_c* i_this) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static actor_method_class l_daObjAjavW_Method = {
|
||||
(process_method_func)daObjAjavW_Create,
|
||||
(process_method_func)daObjAjavW_Delete,
|
||||
(process_method_func)daObjAjavW_Execute,
|
||||
(process_method_func)daObjAjavW_IsDelete,
|
||||
(process_method_func)daObjAjavW_Draw,
|
||||
};
|
||||
|
||||
actor_process_profile_definition g_profile_Obj_AjavW = {
|
||||
fpcLy_CURRENT_e,
|
||||
3,
|
||||
fpcPi_CURRENT_e,
|
||||
PROC_Obj_AjavW,
|
||||
&g_fpcLf_Method.mBase,
|
||||
sizeof(daObjAjavW_c),
|
||||
0,
|
||||
0,
|
||||
&g_fopAc_Method.base,
|
||||
0x0056,
|
||||
&l_daObjAjavW_Method,
|
||||
fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -63,7 +63,7 @@ bool daObjYgush00_c::create_heap() {
|
||||
static u32 bck_table[] = { 0x06, 0x05, 0x05, 0x05 };
|
||||
|
||||
bool ret = true;
|
||||
|
||||
|
||||
void* pModelData = dComIfG_getObjectRes(l_arcname, mdl_table[mType]);
|
||||
J3DAnmTextureSRTKey * pBtk = (J3DAnmTextureSRTKey *)dComIfG_getObjectRes(l_arcname, btk_table[mType]);
|
||||
J3DAnmTransform * pBck = (J3DAnmTransform *)dComIfG_getObjectRes(l_arcname, bck_table[mType]);
|
||||
@@ -117,7 +117,7 @@ s32 daObjYgush00_c::_create() {
|
||||
/* 000004F4-00000524 .text _delete__14daObjYgush00_cFv */
|
||||
bool daObjYgush00_c::_delete() {
|
||||
dComIfG_resDelete(&mPhs, l_arcname);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 00000524-0000066C .text _execute__14daObjYgush00_cFv */
|
||||
@@ -139,7 +139,7 @@ bool daObjYgush00_c::_execute() {
|
||||
fopAcM_seStartCurrent(this, 0x61fe, 0);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 0000066C-000006FC .text _draw__14daObjYgush00_cFv */
|
||||
@@ -149,7 +149,7 @@ bool daObjYgush00_c::_draw() {
|
||||
mBtkAnm.entry(mpModel->getModelData());
|
||||
mBckAnm.entry(mpModel->getModelData());
|
||||
mDoExt_modelUpdateDL(mpModel);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 000006FC-0000071C .text daObjYgush00_Create__FP14daObjYgush00_c */
|
||||
@@ -158,23 +158,23 @@ static s32 daObjYgush00_Create(daObjYgush00_c* i_this) {
|
||||
}
|
||||
|
||||
/* 0000071C-00000740 .text daObjYgush00_Delete__FP14daObjYgush00_c */
|
||||
static s32 daObjYgush00_Delete(daObjYgush00_c* i_this) {
|
||||
static BOOL daObjYgush00_Delete(daObjYgush00_c* i_this) {
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
/* 00000740-00000764 .text daObjYgush00_Execute__FP14daObjYgush00_c */
|
||||
static s32 daObjYgush00_Execute(daObjYgush00_c* i_this) {
|
||||
static BOOL daObjYgush00_Execute(daObjYgush00_c* i_this) {
|
||||
return i_this->_execute();
|
||||
}
|
||||
|
||||
/* 00000764-00000788 .text daObjYgush00_Draw__FP14daObjYgush00_c */
|
||||
static s32 daObjYgush00_Draw(daObjYgush00_c* i_this) {
|
||||
static BOOL daObjYgush00_Draw(daObjYgush00_c* i_this) {
|
||||
return i_this->_draw();
|
||||
}
|
||||
|
||||
/* 00000788-00000790 .text daObjYgush00_IsDelete__FP14daObjYgush00_c */
|
||||
static s32 daObjYgush00_IsDelete(daObjYgush00_c* i_this) {
|
||||
return 1;
|
||||
static BOOL daObjYgush00_IsDelete(daObjYgush00_c* i_this) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static actor_method_class l_daObjYgush00_Method = {
|
||||
@@ -186,18 +186,18 @@ static actor_method_class l_daObjYgush00_Method = {
|
||||
};
|
||||
|
||||
actor_process_profile_definition g_profile_Obj_Ygush00 = {
|
||||
fpcLy_CURRENT_e,
|
||||
3,
|
||||
fpcPi_CURRENT_e,
|
||||
PROC_Obj_Ygush00,
|
||||
&g_fpcLf_Method.mBase,
|
||||
sizeof(daObjYgush00_c),
|
||||
0,
|
||||
0,
|
||||
&g_fopAc_Method.base,
|
||||
0x005E,
|
||||
&l_daObjYgush00_Method,
|
||||
fopAcStts_CULL_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_CUSTOM_e,
|
||||
/* LayerID */ fpcLy_CURRENT_e,
|
||||
/* ListID */ 3,
|
||||
/* ListPrio */ fpcPi_CURRENT_e,
|
||||
/* ProcName */ PROC_Obj_Ygush00,
|
||||
/* Proc SubMtd */ &g_fpcLf_Method.mBase,
|
||||
/* Size */ sizeof(daObjYgush00_c),
|
||||
/* SizeOther */ 0,
|
||||
/* Parameters */ 0,
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ 0x005E,
|
||||
/* Actor SubMtd */ &l_daObjYgush00_Method,
|
||||
/* Status */ fopAcStts_CULL_e | fopAcStts_UNK40000_e,
|
||||
/* Group */ fopAc_ACTOR_e,
|
||||
/* CullType */ fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user