|
|
|
|
@ -1,229 +1,195 @@
|
|
|
|
|
//
|
|
|
|
|
// Generated By: dol2asm
|
|
|
|
|
// Translation Unit: d_a_warp_bug
|
|
|
|
|
//
|
|
|
|
|
/**
|
|
|
|
|
* d_a_warp_bug.cpp
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "rel/d/a/d_a_warp_bug/d_a_warp_bug.h"
|
|
|
|
|
#include "dol2asm.h"
|
|
|
|
|
#include "dolphin/types.h"
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Types:
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
struct request_of_phase_process_class {};
|
|
|
|
|
|
|
|
|
|
struct mDoMtx_stack_c {
|
|
|
|
|
static u8 now[48];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct J3DMaterialTable {};
|
|
|
|
|
|
|
|
|
|
struct J3DAnmTextureSRTKey {};
|
|
|
|
|
|
|
|
|
|
struct mDoExt_btkAnm {
|
|
|
|
|
/* 8000D63C */ void init(J3DMaterialTable*, J3DAnmTextureSRTKey*, int, int, f32, s16, s16);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct J3DAnmTevRegKey {};
|
|
|
|
|
|
|
|
|
|
struct mDoExt_brkAnm {
|
|
|
|
|
/* 8000D70C */ void init(J3DMaterialTable*, J3DAnmTevRegKey*, int, int, f32, s16, s16);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct fopAc_ac_c {
|
|
|
|
|
/* 80018B64 */ fopAc_ac_c();
|
|
|
|
|
/* 80018C8C */ ~fopAc_ac_c();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct daWarpBug_c {
|
|
|
|
|
/* 80D67E38 */ void create_init();
|
|
|
|
|
/* 80D68068 */ void draw();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct dRes_info_c {};
|
|
|
|
|
|
|
|
|
|
struct dRes_control_c {
|
|
|
|
|
/* 8003C37C */ void getRes(char const*, char const*, dRes_info_c*, int);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct J3DModelData {};
|
|
|
|
|
|
|
|
|
|
struct J3DFrameCtrl {
|
|
|
|
|
/* 803283FC */ void init(s16);
|
|
|
|
|
/* 80D68000 */ ~J3DFrameCtrl();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Forward References:
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
extern "C" void create_init__11daWarpBug_cFv();
|
|
|
|
|
extern "C" static void createSolidHeap__FP10fopAc_ac_c();
|
|
|
|
|
extern "C" void __dt__12J3DFrameCtrlFv();
|
|
|
|
|
extern "C" static void daWarpBug_Draw__FP11daWarpBug_c();
|
|
|
|
|
extern "C" void draw__11daWarpBug_cFv();
|
|
|
|
|
extern "C" static void daWarpBug_Execute__FP11daWarpBug_c();
|
|
|
|
|
extern "C" static bool daWarpBug_IsDelete__FP11daWarpBug_c();
|
|
|
|
|
extern "C" static void daWarpBug_Delete__FP11daWarpBug_c();
|
|
|
|
|
extern "C" static void daWarpBug_Create__FP10fopAc_ac_c();
|
|
|
|
|
extern "C" extern char const* const d_a_warp_bug__stringBase0;
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// External References:
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
extern "C" void init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss();
|
|
|
|
|
extern "C" void init__13mDoExt_brkAnmFP16J3DMaterialTableP15J3DAnmTevRegKeyiifss();
|
|
|
|
|
extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
|
|
|
|
|
extern "C" void __ct__10fopAc_ac_cFv();
|
|
|
|
|
extern "C" void __dt__10fopAc_ac_cFv();
|
|
|
|
|
extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl();
|
|
|
|
|
extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc();
|
|
|
|
|
extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc();
|
|
|
|
|
extern "C" void getRes__14dRes_control_cFPCcPCcP11dRes_info_ci();
|
|
|
|
|
extern "C" void* __nw__FUl();
|
|
|
|
|
extern "C" void __dl__FPv();
|
|
|
|
|
extern "C" void init__12J3DFrameCtrlFs();
|
|
|
|
|
extern "C" void PSMTXCopy();
|
|
|
|
|
extern "C" void _savegpr_27();
|
|
|
|
|
extern "C" void _restgpr_27();
|
|
|
|
|
extern "C" extern void* g_fopAc_Method[8];
|
|
|
|
|
extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
|
|
|
|
|
extern "C" u8 now__14mDoMtx_stack_c[48];
|
|
|
|
|
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Declarations:
|
|
|
|
|
//
|
|
|
|
|
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
|
|
|
|
#include "JSystem/JKernel/JKRHeap.h"
|
|
|
|
|
#include "d/a/d_a_player.h"
|
|
|
|
|
#include "d/com/d_com_inf_game.h"
|
|
|
|
|
#include "d/d_procname.h"
|
|
|
|
|
|
|
|
|
|
/* 80D67E38-80D67E3C 000078 0004+00 1/1 0/0 0/0 .text create_init__11daWarpBug_cFv */
|
|
|
|
|
void daWarpBug_c::create_init() {
|
|
|
|
|
/* empty function */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ############################################################################################## */
|
|
|
|
|
/* 80D681DC-80D681E0 000000 0004+00 1/1 0/0 0/0 .rodata @3709 */
|
|
|
|
|
SECTION_RODATA static f32 const lit_3709 = 1.0f;
|
|
|
|
|
COMPILER_STRIP_GATE(0x80D681DC, &lit_3709);
|
|
|
|
|
|
|
|
|
|
/* 80D681E0-80D681E0 000004 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
|
|
|
|
#pragma push
|
|
|
|
|
#pragma force_active on
|
|
|
|
|
SECTION_DEAD static char const* const stringBase_80D681E0 = "WarpBug";
|
|
|
|
|
SECTION_DEAD static char const* const stringBase_80D681E8 = "kisei.bmd";
|
|
|
|
|
SECTION_DEAD static char const* const stringBase_80D681F2 = "kisei.brk";
|
|
|
|
|
SECTION_DEAD static char const* const stringBase_80D681FC = "kisei.btk";
|
|
|
|
|
#pragma pop
|
|
|
|
|
void daWarpBug_c::create_init() {}
|
|
|
|
|
|
|
|
|
|
/* 80D68208-80D6820C -00001 0004+00 3/3 0/0 0/0 .data l_arcName */
|
|
|
|
|
SECTION_DATA static void* l_arcName = (void*)&d_a_warp_bug__stringBase0;
|
|
|
|
|
static char* l_arcName = "WarpBug";
|
|
|
|
|
|
|
|
|
|
/* 80D6820C-80D6822C -00001 0020+00 1/0 0/0 0/0 .data l_daWarpBug_Method */
|
|
|
|
|
SECTION_DATA static void* l_daWarpBug_Method[8] = {
|
|
|
|
|
(void*)daWarpBug_Create__FP10fopAc_ac_c,
|
|
|
|
|
(void*)daWarpBug_Delete__FP11daWarpBug_c,
|
|
|
|
|
(void*)daWarpBug_Execute__FP11daWarpBug_c,
|
|
|
|
|
(void*)daWarpBug_IsDelete__FP11daWarpBug_c,
|
|
|
|
|
(void*)daWarpBug_Draw__FP11daWarpBug_c,
|
|
|
|
|
(void*)NULL,
|
|
|
|
|
(void*)NULL,
|
|
|
|
|
(void*)NULL,
|
|
|
|
|
};
|
|
|
|
|
int daWarpBug_c::createHeap() {
|
|
|
|
|
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, "kisei.bmd");
|
|
|
|
|
mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000284);
|
|
|
|
|
|
|
|
|
|
/* 80D6822C-80D6825C -00001 0030+00 0/0 0/0 1/0 .data g_profile_WarpBug */
|
|
|
|
|
SECTION_DATA extern void* g_profile_WarpBug[12] = {
|
|
|
|
|
(void*)0xFFFFFFFD, (void*)0x0007FFFD,
|
|
|
|
|
(void*)0x01560000, (void*)&g_fpcLf_Method,
|
|
|
|
|
(void*)0x00000580, (void*)NULL,
|
|
|
|
|
(void*)NULL, (void*)&g_fopAc_Method,
|
|
|
|
|
(void*)0x02D60000, (void*)&l_daWarpBug_Method,
|
|
|
|
|
(void*)0x00040000, (void*)0x000E0000,
|
|
|
|
|
};
|
|
|
|
|
J3DAnmTevRegKey* pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(l_arcName, "kisei.brk");
|
|
|
|
|
J3DAnmTextureSRTKey* pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, "kisei.btk");
|
|
|
|
|
|
|
|
|
|
/* 80D6825C-80D68268 000054 000C+00 2/2 0/0 0/0 .data __vt__12J3DFrameCtrl */
|
|
|
|
|
SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = {
|
|
|
|
|
(void*)NULL /* RTTI */,
|
|
|
|
|
(void*)NULL,
|
|
|
|
|
(void*)__dt__12J3DFrameCtrlFv,
|
|
|
|
|
};
|
|
|
|
|
if (pbrk != NULL) {
|
|
|
|
|
mpBrk = new mDoExt_brkAnm();
|
|
|
|
|
|
|
|
|
|
if (!mpBrk->init(modelData, pbrk, TRUE, 2, 1.0f, 0, -1)) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (pbtk != NULL) {
|
|
|
|
|
mpBtk = new mDoExt_btkAnm();
|
|
|
|
|
|
|
|
|
|
if (!mpBtk->init(modelData, pbtk, TRUE, 2, 1.0f, 0, -1)) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mpModel == NULL) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 80D67E3C-80D68000 00007C 01C4+00 1/1 0/0 0/0 .text createSolidHeap__FP10fopAc_ac_c */
|
|
|
|
|
#pragma push
|
|
|
|
|
#pragma optimization_level 0
|
|
|
|
|
#pragma optimizewithasm off
|
|
|
|
|
static asm void createSolidHeap(fopAc_ac_c* param_0) {
|
|
|
|
|
nofralloc
|
|
|
|
|
#include "asm/rel/d/a/d_a_warp_bug/d_a_warp_bug/createSolidHeap__FP10fopAc_ac_c.s"
|
|
|
|
|
static int createSolidHeap(fopAc_ac_c* i_this) {
|
|
|
|
|
return static_cast<daWarpBug_c*>(i_this)->createHeap();
|
|
|
|
|
}
|
|
|
|
|
#pragma pop
|
|
|
|
|
|
|
|
|
|
/* 80D68000-80D68048 000240 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */
|
|
|
|
|
#pragma push
|
|
|
|
|
#pragma optimization_level 0
|
|
|
|
|
#pragma optimizewithasm off
|
|
|
|
|
asm J3DFrameCtrl::~J3DFrameCtrl() {
|
|
|
|
|
nofralloc
|
|
|
|
|
#include "asm/rel/d/a/d_a_warp_bug/d_a_warp_bug/__dt__12J3DFrameCtrlFv.s"
|
|
|
|
|
}
|
|
|
|
|
#pragma pop
|
|
|
|
|
|
|
|
|
|
/* 80D68048-80D68068 000288 0020+00 1/0 0/0 0/0 .text daWarpBug_Draw__FP11daWarpBug_c */
|
|
|
|
|
#pragma push
|
|
|
|
|
#pragma optimization_level 0
|
|
|
|
|
#pragma optimizewithasm off
|
|
|
|
|
static asm void daWarpBug_Draw(daWarpBug_c* param_0) {
|
|
|
|
|
nofralloc
|
|
|
|
|
#include "asm/rel/d/a/d_a_warp_bug/d_a_warp_bug/daWarpBug_Draw__FP11daWarpBug_c.s"
|
|
|
|
|
static int daWarpBug_Draw(daWarpBug_c* i_this) {
|
|
|
|
|
return i_this->draw();
|
|
|
|
|
}
|
|
|
|
|
#pragma pop
|
|
|
|
|
|
|
|
|
|
/* 80D68068-80D68078 0002A8 0010+00 1/1 0/0 0/0 .text draw__11daWarpBug_cFv */
|
|
|
|
|
#pragma push
|
|
|
|
|
#pragma optimization_level 0
|
|
|
|
|
#pragma optimizewithasm off
|
|
|
|
|
asm void daWarpBug_c::draw() {
|
|
|
|
|
nofralloc
|
|
|
|
|
#include "asm/rel/d/a/d_a_warp_bug/d_a_warp_bug/draw__11daWarpBug_cFv.s"
|
|
|
|
|
int daWarpBug_c::draw() {
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
daPy_py_c* player_p = (daPy_py_c*)dComIfGp_getPlayer(0);
|
|
|
|
|
if (!player_p->checkMidnaWarp()) {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
field_0x57c = 0;
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cLib_chaseS(&field_0x57c, 255, 25);
|
|
|
|
|
g_env_light.settingTevStruct(0x10, ¤t.pos, &mTevStr);
|
|
|
|
|
g_env_light.setLightTevColorType_MAJI(mpModel, &mTevStr);
|
|
|
|
|
|
|
|
|
|
J3DModelData* modelData = mpModel->getModelData();
|
|
|
|
|
for (u16 i = 0; i < modelData->getMaterialNum(); i++) {
|
|
|
|
|
GXColorS10* color = modelData->getMaterialNodePointer(i)->getTevColor(1);
|
|
|
|
|
|
|
|
|
|
if (field_0x57e != 0) {
|
|
|
|
|
color->r = 0;
|
|
|
|
|
color->g = 255;
|
|
|
|
|
color->b = 0;
|
|
|
|
|
} else {
|
|
|
|
|
color->r = 250;
|
|
|
|
|
color->g = 50;
|
|
|
|
|
color->b = 50;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
color->a = field_0x57c;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (field_0x57e != 0) {
|
|
|
|
|
field_0x57e = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dComIfGd_setListDarkBG();
|
|
|
|
|
mpBrk->entry(modelData);
|
|
|
|
|
mpBtk->entry(modelData);
|
|
|
|
|
mDoExt_modelUpdateDL(mpModel);
|
|
|
|
|
dComIfGd_setList();
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int daWarpBug_c::execute() {
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
daPy_py_c* player_p = (daPy_py_c*)dComIfGp_getPlayer(0);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
mDoMtx_stack_c::copy(mpModel->getBaseTRMtx());
|
|
|
|
|
mDoMtx_stack_c::multVecZero(¤t.pos);
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
if (player_p->checkMidnaWarp()) {
|
|
|
|
|
mpBrk->play();
|
|
|
|
|
mpBtk->play();
|
|
|
|
|
Z2GetAudioMgr()->mSeMgr.seStartLevel(Z2SE_EN_YM_WAIT, ¤t.pos, NULL, 0, 1.0f, 1.0f,
|
|
|
|
|
-1.0f, -1.0f, 0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
#pragma pop
|
|
|
|
|
|
|
|
|
|
/* 80D68078-80D680D8 0002B8 0060+00 1/0 0/0 0/0 .text daWarpBug_Execute__FP11daWarpBug_c
|
|
|
|
|
*/
|
|
|
|
|
#pragma push
|
|
|
|
|
#pragma optimization_level 0
|
|
|
|
|
#pragma optimizewithasm off
|
|
|
|
|
static asm void daWarpBug_Execute(daWarpBug_c* param_0) {
|
|
|
|
|
nofralloc
|
|
|
|
|
#include "asm/rel/d/a/d_a_warp_bug/d_a_warp_bug/daWarpBug_Execute__FP11daWarpBug_c.s"
|
|
|
|
|
static int daWarpBug_Execute(daWarpBug_c* i_this) {
|
|
|
|
|
return i_this->execute();
|
|
|
|
|
}
|
|
|
|
|
#pragma pop
|
|
|
|
|
|
|
|
|
|
/* 80D680D8-80D680E0 000318 0008+00 1/0 0/0 0/0 .text daWarpBug_IsDelete__FP11daWarpBug_c
|
|
|
|
|
*/
|
|
|
|
|
static bool daWarpBug_IsDelete(daWarpBug_c* param_0) {
|
|
|
|
|
return true;
|
|
|
|
|
static int daWarpBug_IsDelete(daWarpBug_c* i_this) {
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
daWarpBug_c::~daWarpBug_c() {
|
|
|
|
|
dComIfG_resDelete(&mPhase, l_arcName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 80D680E0-80D68130 000320 0050+00 1/0 0/0 0/0 .text daWarpBug_Delete__FP11daWarpBug_c
|
|
|
|
|
*/
|
|
|
|
|
#pragma push
|
|
|
|
|
#pragma optimization_level 0
|
|
|
|
|
#pragma optimizewithasm off
|
|
|
|
|
static asm void daWarpBug_Delete(daWarpBug_c* param_0) {
|
|
|
|
|
nofralloc
|
|
|
|
|
#include "asm/rel/d/a/d_a_warp_bug/d_a_warp_bug/daWarpBug_Delete__FP11daWarpBug_c.s"
|
|
|
|
|
static int daWarpBug_Delete(daWarpBug_c* i_this) {
|
|
|
|
|
i_this->~daWarpBug_c();
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int daWarpBug_c::create() {
|
|
|
|
|
if (!fopAcM_CheckCondition(this, 8)) {
|
|
|
|
|
new (this) daWarpBug_c();
|
|
|
|
|
fopAcM_OnCondition(this, 8);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int phase = dComIfG_resLoad(&mPhase, l_arcName);
|
|
|
|
|
if (phase == cPhs_COMPLEATE_e) {
|
|
|
|
|
if (!fopAcM_entrySolidHeap(this, createSolidHeap, 0x4000)) {
|
|
|
|
|
return cPhs_ERROR_e;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
create_init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return phase;
|
|
|
|
|
}
|
|
|
|
|
#pragma pop
|
|
|
|
|
|
|
|
|
|
/* 80D68130-80D681D4 000370 00A4+00 1/0 0/0 0/0 .text daWarpBug_Create__FP10fopAc_ac_c */
|
|
|
|
|
#pragma push
|
|
|
|
|
#pragma optimization_level 0
|
|
|
|
|
#pragma optimizewithasm off
|
|
|
|
|
static asm void daWarpBug_Create(fopAc_ac_c* param_0) {
|
|
|
|
|
nofralloc
|
|
|
|
|
#include "asm/rel/d/a/d_a_warp_bug/d_a_warp_bug/daWarpBug_Create__FP10fopAc_ac_c.s"
|
|
|
|
|
static int daWarpBug_Create(fopAc_ac_c* i_this) {
|
|
|
|
|
return static_cast<daWarpBug_c*>(i_this)->create();
|
|
|
|
|
}
|
|
|
|
|
#pragma pop
|
|
|
|
|
|
|
|
|
|
/* 80D681E0-80D681E0 000004 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
|
|
|
|
/* 80D6820C-80D6822C -00001 0020+00 1/0 0/0 0/0 .data l_daWarpBug_Method */
|
|
|
|
|
static actor_method_class l_daWarpBug_Method = {
|
|
|
|
|
(process_method_func)daWarpBug_Create, (process_method_func)daWarpBug_Delete,
|
|
|
|
|
(process_method_func)daWarpBug_Execute, (process_method_func)daWarpBug_IsDelete,
|
|
|
|
|
(process_method_func)daWarpBug_Draw,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* 80D6822C-80D6825C -00001 0030+00 0/0 0/0 1/0 .data g_profile_WarpBug */
|
|
|
|
|
extern actor_process_profile_definition g_profile_WarpBug = {
|
|
|
|
|
-3,
|
|
|
|
|
7,
|
|
|
|
|
-3,
|
|
|
|
|
PROC_WarpBug,
|
|
|
|
|
&g_fpcLf_Method.mBase,
|
|
|
|
|
sizeof(daWarpBug_c),
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
&g_fopAc_Method.base,
|
|
|
|
|
726,
|
|
|
|
|
&l_daWarpBug_Method,
|
|
|
|
|
0x40000,
|
|
|
|
|
0,
|
|
|
|
|
14,
|
|
|
|
|
};
|
|
|
|
|
|