mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-02 10:10:06 -04:00
+1
-1
@@ -1265,7 +1265,7 @@ config.libs = [
|
||||
ActorRel(NonMatching, "d_a_obj_coming"),
|
||||
ActorRel(NonMatching, "d_a_obj_demo_barrel"),
|
||||
ActorRel(NonMatching, "d_a_obj_doguu"),
|
||||
ActorRel(NonMatching, "d_a_obj_doguu_demo"),
|
||||
ActorRel(Matching, "d_a_obj_doguu_demo"),
|
||||
ActorRel(NonMatching, "d_a_obj_gryw00"),
|
||||
ActorRel(Matching, "d_a_obj_hfuck1", extra_cflags=['-pragma "nosyminline on"']),
|
||||
ActorRel(Matching, "d_a_obj_hole", extra_cflags=['-pragma "nosyminline on"']),
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef D_A_OBJ_DOGUU_DEMO_H
|
||||
#define D_A_OBJ_DOGUU_DEMO_H
|
||||
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
#include "d/d_bg_w.h"
|
||||
#include "f_op/f_op_actor.h"
|
||||
|
||||
class daObjDoguuD_c : public fopAc_ac_c {
|
||||
@@ -10,12 +12,19 @@ public:
|
||||
inline BOOL _draw();
|
||||
inline BOOL _execute();
|
||||
|
||||
void CreateHeap();
|
||||
BOOL CreateHeap();
|
||||
void CreateInit();
|
||||
void set_mtx();
|
||||
|
||||
public:
|
||||
/* Place member variables here */
|
||||
/* 0x290 */ request_of_phase_process_class mPhs;
|
||||
/* 0x298 */ J3DModel* mpModel;
|
||||
/* 0x29C */ dBgW* mpBgW;
|
||||
/* 0x2A0 */ Mtx mtx;
|
||||
/* 0x2D0 */ u8 mFlag; // this field seems to be set to 1 only when initalized with CreateInit,
|
||||
// can probably be a bool
|
||||
/* 0x2D1 */ u8 mUnusedParam;
|
||||
/* 0x2D4 */ u32 mShape;
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_DOGUU_DEMO_H */
|
||||
|
||||
@@ -4,50 +4,145 @@
|
||||
//
|
||||
|
||||
#include "d/actor/d_a_obj_doguu_demo.h"
|
||||
#include "d/d_bg_w.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
|
||||
/* 00000078-00000098 .text CheckCreateHeap__FP10fopAc_ac_c */
|
||||
static BOOL CheckCreateHeap(fopAc_ac_c*) {
|
||||
/* Nonmatching */
|
||||
static BOOL CheckCreateHeap(fopAc_ac_c* i_this) {
|
||||
return ((daObjDoguuD_c*)i_this)->CreateHeap();
|
||||
}
|
||||
|
||||
/* 00000098-00000214 .text CreateHeap__13daObjDoguuD_cFv */
|
||||
void daObjDoguuD_c::CreateHeap() {
|
||||
/* Nonmatching */
|
||||
BOOL daObjDoguuD_c::CreateHeap() {
|
||||
mUnusedParam = fopAcM_GetParam(this) & 0xFF; // Im not sure why this is here, none of the other
|
||||
// classes I looked at did this
|
||||
|
||||
J3DModelData* modelData = (J3DModelData*)(dComIfG_getObjectRes("DoguuD", 0x04));
|
||||
JUT_ASSERT(0x65, modelData != 0);
|
||||
mpModel = mDoExt_J3DModel__create(modelData, 0x00, 0x11020203);
|
||||
if (mpModel == NULL)
|
||||
return FALSE;
|
||||
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
mDoMtx_stack_c::scaleM(mScale);
|
||||
mDoMtx_copy(mDoMtx_stack_c::get(), mtx);
|
||||
|
||||
mpBgW = new dBgW();
|
||||
|
||||
if (mpBgW == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (mpBgW->Set((cBgD_t*)dComIfG_getObjectRes("DoguuD", 0x07), cBgW::MOVE_BG_e, &mtx))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 00000214-00000294 .text CreateInit__13daObjDoguuD_cFv */
|
||||
void daObjDoguuD_c::CreateInit() {
|
||||
/* Nonmatching */
|
||||
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
|
||||
fopAcM_setCullSizeBox(this, -30000.0f, -5000.0f, -30000.0f, 30000.0f, 40000.0f, 30000.0f);
|
||||
dComIfG_Bgsp()->Regist(mpBgW, this);
|
||||
mFlag = 1;
|
||||
set_mtx();
|
||||
}
|
||||
|
||||
/* 00000294-00000314 .text set_mtx__13daObjDoguuD_cFv */
|
||||
void daObjDoguuD_c::set_mtx() {
|
||||
/* Nonmatching */
|
||||
mpModel->setBaseScale(mScale);
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(current.angle.y);
|
||||
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
}
|
||||
|
||||
/* 00000314-000003BC .text daObjDoguuD_create__FPv */
|
||||
static s32 daObjDoguuD_create(void*) {
|
||||
/* Nonmatching */
|
||||
s32 daObjDoguuD_c::_create() {
|
||||
fopAcM_SetupActor(this, daObjDoguuD_c);
|
||||
mFlag = 0;
|
||||
|
||||
s32 ret = dComIfG_resLoad(&mPhs, "DoguuD");
|
||||
|
||||
if (ret == cPhs_COMPLEATE_e) {
|
||||
if (fopAcM_entrySolidHeap(this, CheckCreateHeap, 0x1460) == 0) {
|
||||
ret = cPhs_ERROR_e;
|
||||
} else {
|
||||
CreateInit();
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 000003BC-00000424 .text daObjDoguuD_Delete__FPv */
|
||||
static BOOL daObjDoguuD_Delete(void*) {
|
||||
/* Nonmatching */
|
||||
static s32 daObjDoguuD_create(void* i_this) {
|
||||
return ((daObjDoguuD_c*)i_this)->_create();
|
||||
}
|
||||
|
||||
/* 00000424-000004C8 .text daObjDoguuD_Draw__FPv */
|
||||
static BOOL daObjDoguuD_Draw(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjDoguuD_c::_delete() {
|
||||
if (heap != NULL && mFlag == 1)
|
||||
dComIfG_Bgsp()->Release(mpBgW);
|
||||
|
||||
dComIfG_resDelete(&mPhs, "DoguuD");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 000004C8-00000538 .text daObjDoguuD_Execute__FPv */
|
||||
static BOOL daObjDoguuD_Execute(void*) {
|
||||
/* Nonmatching */
|
||||
static BOOL daObjDoguuD_Delete(void* i_this) {
|
||||
return ((daObjDoguuD_c*)i_this)->_delete();
|
||||
}
|
||||
|
||||
BOOL daObjDoguuD_c::_draw() {
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, &mTevStr);
|
||||
g_env_light.setLightTevColorType(mpModel, &mTevStr);
|
||||
dComIfGd_setListBG();
|
||||
mDoExt_modelUpdateDL(mpModel);
|
||||
dComIfGd_setList();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL daObjDoguuD_Draw(void* i_this) {
|
||||
return ((daObjDoguuD_c*)i_this)->_draw();
|
||||
}
|
||||
|
||||
BOOL daObjDoguuD_c::_execute() {
|
||||
if (mDemoActorId != 0) {
|
||||
dDemo_actor_c* demoAc = dComIfGp_demo_getActor(mDemoActorId);
|
||||
if (demoAc != NULL && demoAc->checkEnable(0x10)) {
|
||||
mShape = demoAc->mShapeId;
|
||||
}
|
||||
}
|
||||
set_mtx();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL daObjDoguuD_Execute(void* i_this) {
|
||||
return ((daObjDoguuD_c*)i_this)->_execute();
|
||||
}
|
||||
|
||||
/* 00000538-00000540 .text daObjDoguuD_IsDelete__FPv */
|
||||
static BOOL daObjDoguuD_IsDelete(void*) {
|
||||
/* Nonmatching */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static actor_method_class daObj_DoguuDMethodTable = {
|
||||
(process_method_func)daObjDoguuD_create, (process_method_func)daObjDoguuD_Delete,
|
||||
(process_method_func)daObjDoguuD_Execute, (process_method_func)daObjDoguuD_IsDelete,
|
||||
(process_method_func)daObjDoguuD_Draw,
|
||||
};
|
||||
|
||||
actor_process_profile_definition g_profile_Obj_DoguuD = {
|
||||
/* LayerID */ fpcLy_CURRENT_e,
|
||||
/* ListID */ 7,
|
||||
/* ListPrio */ fpcPi_CURRENT_e,
|
||||
/* ProcName */ PROC_Obj_DoguuD,
|
||||
/* Proc SubMtd */ &g_fpcLf_Method.mBase,
|
||||
/* Size */ sizeof(daObjDoguuD_c),
|
||||
/* SizeOther */ 0,
|
||||
/* Parameters */ 0,
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ 0x01c5,
|
||||
/* Actor SubMtd */ &daObj_DoguuDMethodTable,
|
||||
/* Status */ fopAcStts_UNK40000_e,
|
||||
/* Group */ fopAc_ACTOR_e,
|
||||
/* CullType */ fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
Reference in New Issue
Block a user