mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-12 19:24:55 -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:
@@ -6,12 +6,11 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_obj_spinLift.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
class daSpinLift_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
/* 80CE3DAC */ daSpinLift_HIO_c();
|
||||
/* 80CE4C10 */ ~daSpinLift_HIO_c() {};
|
||||
daSpinLift_HIO_c();
|
||||
~daSpinLift_HIO_c() {};
|
||||
|
||||
#ifdef DEBUG
|
||||
void genMessage(JORMContext*);
|
||||
@@ -22,10 +21,8 @@ public:
|
||||
/* 0x0C */ u8 mVibration;
|
||||
};
|
||||
|
||||
/* 80CE4ED4-80CE4EE4 000014 0010+00 4/4 0/0 0/0 .bss l_HIO */
|
||||
static daSpinLift_HIO_c l_HIO;
|
||||
|
||||
/* 80CE3DAC-80CE3DE4 0000EC 0038+00 1/1 0/0 0/0 .text __ct__16daSpinLift_HIO_cFv */
|
||||
daSpinLift_HIO_c::daSpinLift_HIO_c() {
|
||||
field_0x06 = 0x3c;
|
||||
mInitialSpeed = 0.0f;
|
||||
@@ -53,20 +50,17 @@ void daSpinLift_HIO_c::genMessage(JORMContext* ctx) {
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 80CE4DA8-80CE4DCC -00001 0024+00 3/3 0/0 0/0 .data l_resNameIdx */
|
||||
static char* l_resNameIdx[] = {
|
||||
"L4_N_Entr", "L4_N_SlpH", "L4_N_SlpL", "L4_Center", "L4_Switch",
|
||||
"L4_S_Slp", "L4_Wal_ZE", "L4_Wal_ZW", "L4_Wal_X",
|
||||
};
|
||||
|
||||
/* 80CE3E2C-80CE3E9C 00016C 0070+00 2/2 0/0 0/0 .text setBaseMtx__12daSpinLift_cFv */
|
||||
void daSpinLift_c::setBaseMtx() {
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mpModel->setBaseScale(scale);
|
||||
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
}
|
||||
|
||||
/* 80CE3E9C-80CE3F1C 0001DC 0080+00 1/0 0/0 0/0 .text CreateHeap__12daSpinLift_cFv */
|
||||
int daSpinLift_c::CreateHeap() {
|
||||
static u32 const l_bmdIdx[] = {4, 4, 4, 4, 4, 4, 4, 4, 4};
|
||||
J3DModelData* modelData =
|
||||
@@ -79,7 +73,6 @@ int daSpinLift_c::CreateHeap() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80CE3F1C-80CE40FC 00025C 01E0+00 1/1 0/0 0/0 .text create__12daSpinLift_cFv */
|
||||
int daSpinLift_c::create() {
|
||||
static const int l_dzbIdx[] = {7, 7, 7, 7, 7, 7, 7, 7, 7};
|
||||
fopAcM_ct(this, daSpinLift_c);
|
||||
@@ -122,8 +115,6 @@ int daSpinLift_c::create() {
|
||||
return phase;
|
||||
}
|
||||
|
||||
/* 80CE40FC-80CE414C 00043C 0050+00 1/0 0/0 0/0 .text Execute__12daSpinLift_cFPPA3_A4_f
|
||||
*/
|
||||
int daSpinLift_c::Execute(Mtx** param_0) {
|
||||
moveLift();
|
||||
*param_0 = &mpModel->getBaseTRMtx();
|
||||
@@ -131,7 +122,6 @@ int daSpinLift_c::Execute(Mtx** param_0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80CE414C-80CE4290 00048C 0144+00 1/1 0/0 0/0 .text moveLift__12daSpinLift_cFv */
|
||||
void daSpinLift_c::moveLift() {
|
||||
static daSpinLift_c::modeFunc mode_proc[] = {
|
||||
&daSpinLift_c::modeWait,
|
||||
@@ -155,23 +145,18 @@ void daSpinLift_c::moveLift() {
|
||||
(this->*mode_proc[field_0x5ac])();
|
||||
}
|
||||
|
||||
/* 80CE4290-80CE429C 0005D0 000C+00 3/3 0/0 0/0 .text init_modeWait__12daSpinLift_cFv */
|
||||
void daSpinLift_c::init_modeWait() {
|
||||
field_0x5ac = 0;
|
||||
}
|
||||
|
||||
/* 80CE429C-80CE42A0 0005DC 0004+00 1/0 0/0 0/0 .text modeWait__12daSpinLift_cFv */
|
||||
void daSpinLift_c::modeWait() {}
|
||||
|
||||
/* 80CE42A0-80CE42C4 0005E0 0024+00 1/1 0/0 0/0 .text init_modeUpMove__12daSpinLift_cFv
|
||||
*/
|
||||
void daSpinLift_c::init_modeUpMove() {
|
||||
fopAcM_SetSpeedF(this, l_HIO.mInitialSpeed);
|
||||
field_0x5ba = mTimer;
|
||||
field_0x5ac = 1;
|
||||
}
|
||||
|
||||
/* 80CE42C4-80CE468C 000604 03C8+00 1/0 0/0 0/0 .text modeUpMove__12daSpinLift_cFv */
|
||||
void daSpinLift_c::modeUpMove() {
|
||||
if (field_0x5ba != 0) {
|
||||
field_0x5ba--;
|
||||
@@ -209,13 +194,10 @@ void daSpinLift_c::modeUpMove() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80CE468C-80CE4698 0009CC 000C+00 1/1 0/0 0/0 .text init_modeDownMove__12daSpinLift_cFv
|
||||
*/
|
||||
void daSpinLift_c::init_modeDownMove() {
|
||||
field_0x5ac = 2;
|
||||
}
|
||||
|
||||
/* 80CE4698-80CE4790 0009D8 00F8+00 1/0 0/0 0/0 .text modeDownMove__12daSpinLift_cFv */
|
||||
void daSpinLift_c::modeDownMove() {
|
||||
f32 dVar3 = cLib_addCalc(¤t.pos.y, home.pos.y, 0.3f, mMoveSpeed, 0.1f);
|
||||
|
||||
@@ -231,8 +213,6 @@ void daSpinLift_c::modeDownMove() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80CE4790-80CE4A9C 000AD0 030C+00 2/2 0/0 0/0 .text init_modeMoveEnd__12daSpinLift_cFv
|
||||
*/
|
||||
void daSpinLift_c::init_modeMoveEnd() {
|
||||
if (fopAcM_isSwitch(this, getEndSw()) == 0) {
|
||||
fopAcM_onSwitch(this, getEndSw());
|
||||
@@ -254,10 +234,8 @@ void daSpinLift_c::init_modeMoveEnd() {
|
||||
field_0x5ac = 3;
|
||||
}
|
||||
|
||||
/* 80CE4A9C-80CE4AA0 000DDC 0004+00 1/0 0/0 0/0 .text modeMoveEnd__12daSpinLift_cFv */
|
||||
void daSpinLift_c::modeMoveEnd() {}
|
||||
|
||||
/* 80CE4AA0-80CE4B44 000DE0 00A4+00 1/0 0/0 0/0 .text Draw__12daSpinLift_cFv */
|
||||
int daSpinLift_c::Draw() {
|
||||
g_env_light.settingTevStruct(0x40, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr);
|
||||
@@ -267,7 +245,6 @@ int daSpinLift_c::Draw() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80CE4B44-80CE4B84 000E84 0040+00 1/0 0/0 0/0 .text Delete__12daSpinLift_cFv */
|
||||
int daSpinLift_c::Delete() {
|
||||
dComIfG_resDelete(&mPhase, l_resNameIdx[mModelType]);
|
||||
#ifdef DEBUG
|
||||
@@ -276,40 +253,31 @@ int daSpinLift_c::Delete() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80CE4B84-80CE4BB0 000EC4 002C+00 1/0 0/0 0/0 .text daSpinLift_Draw__FP12daSpinLift_c
|
||||
*/
|
||||
static int daSpinLift_Draw(daSpinLift_c* i_this) {
|
||||
return i_this->MoveBGDraw();
|
||||
}
|
||||
|
||||
/* 80CE4BB0-80CE4BD0 000EF0 0020+00 1/0 0/0 0/0 .text daSpinLift_Execute__FP12daSpinLift_c */
|
||||
static int daSpinLift_Execute(daSpinLift_c* i_this) {
|
||||
return i_this->MoveBGExecute();
|
||||
}
|
||||
|
||||
/* 80CE4BD0-80CE4BF0 000F10 0020+00 1/0 0/0 0/0 .text daSpinLift_Delete__FP12daSpinLift_c
|
||||
*/
|
||||
static int daSpinLift_Delete(daSpinLift_c* i_this) {
|
||||
fpc_ProcID proc_id = fopAcM_GetID(i_this);
|
||||
return i_this->MoveBGDelete();
|
||||
}
|
||||
|
||||
/* 80CE4BF0-80CE4C10 000F30 0020+00 1/0 0/0 0/0 .text daSpinLift_Create__FP10fopAc_ac_c
|
||||
*/
|
||||
static int daSpinLift_Create(fopAc_ac_c* a_this) {
|
||||
daSpinLift_c* i_this = (daSpinLift_c*)a_this;
|
||||
fpc_ProcID proc_id = fopAcM_GetID(a_this);
|
||||
return i_this->create();
|
||||
}
|
||||
|
||||
/* 80CE4E2C-80CE4E4C -00001 0020+00 1/0 0/0 0/0 .data l_daSpinLift_Method */
|
||||
static actor_method_class l_daSpinLift_Method = {
|
||||
(process_method_func)daSpinLift_Create, (process_method_func)daSpinLift_Delete,
|
||||
(process_method_func)daSpinLift_Execute, 0,
|
||||
(process_method_func)daSpinLift_Draw,
|
||||
};
|
||||
|
||||
/* 80CE4E4C-80CE4E7C -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_SpinLift */
|
||||
extern actor_process_profile_definition g_profile_Obj_SpinLift = {
|
||||
fpcLy_CURRENT_e, // mLayerID
|
||||
3, // mListID
|
||||
|
||||
Reference in New Issue
Block a user