mirror of
https://github.com/zeldaret/tp
synced 2026-09-01 01:41:51 -04:00
project cleanup (#2895)
* some wii OS fixes * remove old dol2asm comments * remove dol2asm.h * remove function address comments * normalize ATTRIBUTE_ALIGN usage * DECL_WEAK macro * fix gcc attribute weak macro * wrap more mwcc specific things in ifdefs * fixes * fix revo sdk version flags * fixes
This commit is contained in:
@@ -9,13 +9,11 @@
|
||||
#include "d/d_bg_w.h"
|
||||
#include "d/actor/d_a_midna.h"
|
||||
|
||||
/* 80496A18-80496A54 000078 003C+00 1/1 0/0 0/0 .text initBaseMtx__9daTbox2_cFv */
|
||||
void daTbox2_c::initBaseMtx() {
|
||||
mpModel->setBaseScale(scale);
|
||||
setBaseMtx();
|
||||
}
|
||||
|
||||
/* 80496A54-80496AB8 0000B4 0064+00 2/2 0/0 0/0 .text setBaseMtx__9daTbox2_cFv */
|
||||
void daTbox2_c::setBaseMtx() {
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
@@ -24,13 +22,11 @@ void daTbox2_c::setBaseMtx() {
|
||||
}
|
||||
|
||||
|
||||
/* 80498160-80498180 000000 0020+00 4/4 0/0 0/0 .rodata l_resInfo */
|
||||
static const res_info l_resInfo[] = {
|
||||
{9, 5, 13, 14}, // Small Chest
|
||||
{10, 6, 15, 16}, // Big Chest
|
||||
};
|
||||
|
||||
/* 80498180-804981BC 000020 003C+00 1/2 0/0 0/0 .rodata l_cyl_info */
|
||||
static const cM3dGCylS l_cyl_info[] = {
|
||||
{
|
||||
{0.0f, 0.0f, -40.0f}, // center
|
||||
@@ -49,13 +45,10 @@ static const cM3dGCylS l_cyl_info[] = {
|
||||
},
|
||||
};
|
||||
|
||||
/* 8049827C-80498280 -00001 0004+00 3/3 0/0 0/0 .data l_arcName */
|
||||
static char* l_arcName = "Tbox2";
|
||||
|
||||
/* 80498280-80498284 -00001 0004+00 1/1 0/0 0/0 .data l_staff_name */
|
||||
static char* l_staff_name = "TREASURE";
|
||||
|
||||
/* 80498284-804982C8 000028 0044+00 1/1 0/0 0/0 .data l_cyl_src */
|
||||
static dCcD_SrcCyl l_cyl_src = {
|
||||
{
|
||||
{0x0, {{0x0, 0x0, 0x1e}, {0x0, 0x0}, 0x79}}, // mObj
|
||||
@@ -70,7 +63,6 @@ static dCcD_SrcCyl l_cyl_src = {
|
||||
} // mCyl
|
||||
};
|
||||
|
||||
/* 80496AB8-80496C20 000118 0168+00 1/0 0/0 0/0 .text Create__9daTbox2_cFv */
|
||||
int daTbox2_c::Create() {
|
||||
init_actionOpenWait();
|
||||
initBaseMtx();
|
||||
@@ -108,7 +100,6 @@ int daTbox2_c::Create() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80496C20-80496DF4 000280 01D4+00 1/0 0/0 0/0 .text CreateHeap__9daTbox2_cFv */
|
||||
int daTbox2_c::CreateHeap() {
|
||||
J3DModelData* modelData =
|
||||
(J3DModelData*)dComIfG_getObjectRes(l_arcName, l_resInfo[mModelType].bmd_no);
|
||||
@@ -140,7 +131,6 @@ int daTbox2_c::CreateHeap() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 80496E3C-80497080 00049C 0244+00 1/1 0/0 0/0 .text create1st__9daTbox2_cFv */
|
||||
int daTbox2_c::create1st() {
|
||||
fopAcM_ct(this, daTbox2_c);
|
||||
mModelType = getModelType();
|
||||
@@ -164,7 +154,6 @@ int daTbox2_c::create1st() {
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
/* 8049724C-80497478 0008AC 022C+00 3/3 0/0 0/0 .text demoProc__9daTbox2_cFv */
|
||||
int daTbox2_c::demoProc() {
|
||||
static char* action_table[] = {"WAIT", "OPEN", "APPEAR", "OPEN_SHORT"};
|
||||
int act_idx =
|
||||
@@ -209,7 +198,6 @@ int daTbox2_c::demoProc() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80497478-80497500 000AD8 0088+00 1/1 0/0 0/0 .text openInit__9daTbox2_cFv */
|
||||
void daTbox2_c::openInit() {
|
||||
daPy_py_c* player_p = daPy_getPlayerActorClass();
|
||||
|
||||
@@ -227,7 +215,6 @@ void daTbox2_c::openInit() {
|
||||
mpBck->setPlaySpeed(1.0f);
|
||||
}
|
||||
|
||||
/* 80497500-804975EC 000B60 00EC+00 1/0 0/0 0/0 .text Execute__9daTbox2_cFPPA3_A4_f */
|
||||
int daTbox2_c::Execute(Mtx** param_0) {
|
||||
mode_proc_call();
|
||||
*param_0 = &mBgMtx;
|
||||
@@ -247,7 +234,6 @@ int daTbox2_c::Execute(Mtx** param_0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 804975EC-80497678 000C4C 008C+00 1/1 0/0 0/0 .text mode_proc_call__9daTbox2_cFv */
|
||||
void daTbox2_c::mode_proc_call() {
|
||||
typedef void (daTbox2_c::*mode_func)();
|
||||
static mode_func l_func[] = {
|
||||
@@ -258,7 +244,6 @@ void daTbox2_c::mode_proc_call() {
|
||||
(this->*l_func[mMode])();
|
||||
}
|
||||
|
||||
/* 80497678-80497790 000CD8 0118+00 1/0 0/0 0/0 .text mode_exec_wait__9daTbox2_cFv */
|
||||
void daTbox2_c::mode_exec_wait() {
|
||||
bool start_exec = false;
|
||||
mNoDraw = true;
|
||||
@@ -281,7 +266,6 @@ void daTbox2_c::mode_exec_wait() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80497790-8049780C 000DF0 007C+00 2/1 0/0 0/0 .text mode_exec__9daTbox2_cFv */
|
||||
void daTbox2_c::mode_exec() {
|
||||
action();
|
||||
fopAcM_posMoveF(this, NULL);
|
||||
@@ -291,7 +275,6 @@ void daTbox2_c::mode_exec() {
|
||||
eyePos = current.pos;
|
||||
}
|
||||
|
||||
/* 8049780C-804978C8 000E6C 00BC+00 1/1 0/0 0/0 .text action__9daTbox2_cFv */
|
||||
void daTbox2_c::action() {
|
||||
typedef void (daTbox2_c::*action_func)();
|
||||
static action_func l_func[] = {
|
||||
@@ -304,20 +287,16 @@ void daTbox2_c::action() {
|
||||
(this->*l_func[mAction])();
|
||||
}
|
||||
|
||||
/* 804978C8-804978D4 000F28 000C+00 1/1 0/0 0/0 .text init_actionWait__9daTbox2_cFv */
|
||||
void daTbox2_c::init_actionWait() {
|
||||
mAction = ACTION_WAIT_e;
|
||||
}
|
||||
|
||||
/* 804978D4-804978D8 000F34 0004+00 1/0 0/0 0/0 .text actionWait__9daTbox2_cFv */
|
||||
void daTbox2_c::actionWait() {}
|
||||
|
||||
/* 804978D8-804978E4 000F38 000C+00 1/1 0/0 0/0 .text init_actionNotOpenDemo__9daTbox2_cFv */
|
||||
void daTbox2_c::init_actionNotOpenDemo() {
|
||||
mAction = ACTION_NOT_OPEN_DEMO_e;
|
||||
}
|
||||
|
||||
/* 804978E4-8049794C 000F44 0068+00 1/0 0/0 0/0 .text actionNotOpenDemo__9daTbox2_cFv */
|
||||
void daTbox2_c::actionNotOpenDemo() {
|
||||
if (dComIfGp_evmng_endCheck(eventInfo.getEventId())) {
|
||||
dComIfGp_event_reset();
|
||||
@@ -327,13 +306,10 @@ void daTbox2_c::actionNotOpenDemo() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 8049794C-80497958 000FAC 000C+00 1/1 0/0 0/0 .text init_actionOpenDemo__9daTbox2_cFv
|
||||
*/
|
||||
void daTbox2_c::init_actionOpenDemo() {
|
||||
mAction = ACTION_OPEN_DEMO_e;
|
||||
}
|
||||
|
||||
/* 80497958-80497A0C 000FB8 00B4+00 1/0 0/0 0/0 .text actionOpenDemo__9daTbox2_cFv */
|
||||
void daTbox2_c::actionOpenDemo() {
|
||||
if (dComIfGp_evmng_endCheck(eventInfo.getEventId())) {
|
||||
dComIfGp_event_reset();
|
||||
@@ -352,13 +328,10 @@ void daTbox2_c::actionOpenDemo() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80497A0C-80497A18 00106C 000C+00 3/3 0/0 0/0 .text init_actionOpenWait__9daTbox2_cFv
|
||||
*/
|
||||
void daTbox2_c::init_actionOpenWait() {
|
||||
mAction = ACTION_OPEN_WAIT_e;
|
||||
}
|
||||
|
||||
/* 80497A18-80497BD0 001078 01B8+00 1/0 0/0 0/0 .text actionOpenWait__9daTbox2_cFv */
|
||||
void daTbox2_c::actionOpenWait() {
|
||||
daMidna_c* midna_p = (daMidna_c*)daPy_py_c::getMidnaActor(); // cast needed for reg alloc
|
||||
daPy_py_c* player_p = daPy_getPlayerActorClass();
|
||||
@@ -392,7 +365,6 @@ void daTbox2_c::actionOpenWait() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80497BD0-80497C60 001230 0090+00 1/1 0/0 0/0 .text setGetDemoItem__9daTbox2_cFv */
|
||||
int daTbox2_c::setGetDemoItem() {
|
||||
u8 item_no = getItemNo();
|
||||
|
||||
@@ -410,7 +382,6 @@ int daTbox2_c::setGetDemoItem() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80497C60-80497DA0 0012C0 0140+00 1/1 0/0 0/0 .text boxCheck__9daTbox2_cFv */
|
||||
BOOL daTbox2_c::boxCheck() {
|
||||
daPy_py_c* player_p = (daPy_py_c*)dComIfGp_getPlayer(0);
|
||||
|
||||
@@ -434,7 +405,6 @@ BOOL daTbox2_c::boxCheck() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 80497DA0-80497E6C 001400 00CC+00 1/0 0/0 0/0 .text Draw__9daTbox2_cFv */
|
||||
int daTbox2_c::Draw() {
|
||||
if (mNoDraw) {
|
||||
return 1;
|
||||
@@ -450,7 +420,6 @@ int daTbox2_c::Draw() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80497E6C-80497ED8 0014CC 006C+00 1/0 0/0 0/0 .text Delete__9daTbox2_cFv */
|
||||
int daTbox2_c::Delete() {
|
||||
if (mBoxBgW != NULL && mBoxBgW->ChkUsed()) {
|
||||
dComIfG_Bgsp().Release(mBoxBgW);
|
||||
@@ -460,37 +429,29 @@ int daTbox2_c::Delete() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80497ED8-8049808C 001538 01B4+00 1/0 0/0 0/0 .text daTbox2_create1st__FP9daTbox2_c */
|
||||
static int daTbox2_create1st(daTbox2_c* i_this) {
|
||||
fopAcM_ct(i_this, daTbox2_c);
|
||||
return i_this->create1st();
|
||||
}
|
||||
|
||||
/* 8049808C-804980AC 0016EC 0020+00 1/0 0/0 0/0 .text daTbox2_MoveBGDelete__FP9daTbox2_c
|
||||
*/
|
||||
static int daTbox2_MoveBGDelete(daTbox2_c* i_this) {
|
||||
return i_this->MoveBGDelete();
|
||||
}
|
||||
|
||||
/* 804980AC-804980CC 00170C 0020+00 1/0 0/0 0/0 .text daTbox2_MoveBGExecute__FP9daTbox2_c
|
||||
*/
|
||||
static int daTbox2_MoveBGExecute(daTbox2_c* i_this) {
|
||||
return i_this->MoveBGExecute();
|
||||
}
|
||||
|
||||
/* 804980CC-804980F8 00172C 002C+00 1/0 0/0 0/0 .text daTbox2_MoveBGDraw__FP9daTbox2_c */
|
||||
static int daTbox2_MoveBGDraw(daTbox2_c* i_this) {
|
||||
return i_this->MoveBGDraw();
|
||||
}
|
||||
|
||||
/* 80498368-80498388 -00001 0020+00 1/0 0/0 0/0 .data daTbox2_METHODS */
|
||||
static actor_method_class daTbox2_METHODS = {
|
||||
(process_method_func)daTbox2_create1st, (process_method_func)daTbox2_MoveBGDelete,
|
||||
(process_method_func)daTbox2_MoveBGExecute, (process_method_func)NULL,
|
||||
(process_method_func)daTbox2_MoveBGDraw,
|
||||
};
|
||||
|
||||
/* 80498388-804983B8 -00001 0030+00 0/0 0/0 1/0 .data g_profile_TBOX2 */
|
||||
extern actor_process_profile_definition g_profile_TBOX2 = {
|
||||
fpcLy_CURRENT_e,
|
||||
4,
|
||||
|
||||
Reference in New Issue
Block a user