mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-14 19:59:45 -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:
@@ -8,7 +8,6 @@
|
||||
#include "d/actor/d_a_obj_swLight.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
class daObjSwLight_HIO_c : public mDoHIO_entry_c {
|
||||
@@ -43,13 +42,11 @@ void daObjSwLight_HIO_c::genMessage(JORMContext* ctx) {
|
||||
static daObjSwLight_HIO_c l_HIO;
|
||||
#endif
|
||||
|
||||
/* 80CF6F98-80CF6FD4 000078 003C+00 1/1 0/0 0/0 .text initBaseMtx__14daObjSwLight_cFv */
|
||||
void daObjSwLight_c::initBaseMtx() {
|
||||
mpModel->setBaseScale(scale);
|
||||
setBaseMtx();
|
||||
}
|
||||
|
||||
/* 80CF6FD4-80CF7038 0000B4 0064+00 2/2 0/0 0/0 .text setBaseMtx__14daObjSwLight_cFv */
|
||||
void daObjSwLight_c::setBaseMtx() {
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
@@ -57,8 +54,6 @@ void daObjSwLight_c::setBaseMtx() {
|
||||
MTXCopy(mDoMtx_stack_c::get(), mBgMtx);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80CF83A0-80CF83E0 000000 0040+00 4/4 0/0 0/0 .rodata l_sph_src_at */
|
||||
const static dCcD_SrcSph l_sph_src_at = {
|
||||
{
|
||||
{0x0, {{AT_TYPE_LANTERN_SWING, 0x0, 0x11}, {0x0, 0x0}, 0x78}}, // mObj
|
||||
@@ -71,7 +66,6 @@ const static dCcD_SrcSph l_sph_src_at = {
|
||||
} // mSphAttr
|
||||
};
|
||||
|
||||
/* 80CF83E0-80CF8420 000040 0040+00 0/1 0/0 0/0 .rodata l_sph_src_tg */
|
||||
const static dCcD_SrcSph l_sph_src_tg = {
|
||||
{
|
||||
{0x0, {{0x0, 0x0, 0x10}, {0x202, 0x11}, 0x78}}, // mObj
|
||||
@@ -84,10 +78,8 @@ const static dCcD_SrcSph l_sph_src_tg = {
|
||||
} // mSphAttr
|
||||
};
|
||||
|
||||
/* 80CF8488-80CF848C -00001 0004+00 3/3 0/0 0/0 .data l_arcName */
|
||||
static char* l_arcName = "Obj_l8sw0";
|
||||
|
||||
/* 80CF848C-80CF84A4 000024 0018+00 1/1 0/0 0/0 .data l_cull_box */
|
||||
static Vec l_cull_box[2] = {{
|
||||
-500.0f,
|
||||
0.0f,
|
||||
@@ -99,7 +91,6 @@ static Vec l_cull_box[2] = {{
|
||||
500.0f,
|
||||
}};
|
||||
|
||||
/* 80CF84A4-80CF84E8 00003C 0044+00 1/1 0/0 0/0 .data l_cyl_src */
|
||||
static dCcD_SrcCyl l_cyl_src = {
|
||||
{
|
||||
{0x0, {{0x0, 0x0, 0x1e}, {0xd8fafdff, 0x11}, 0x79}}, // mObj
|
||||
@@ -114,7 +105,6 @@ static dCcD_SrcCyl l_cyl_src = {
|
||||
} // mCyl
|
||||
};
|
||||
|
||||
/* 80CF7038-80CF71F0 000118 01B8+00 1/0 0/0 0/0 .text Create__14daObjSwLight_cFv */
|
||||
int daObjSwLight_c::Create() {
|
||||
if (fopAcM_isSwitch(this, getSwbit())) {
|
||||
init_modeSwOffWait();
|
||||
@@ -165,7 +155,6 @@ int daObjSwLight_c::Create() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80CF71F0-80CF7260 0002D0 0070+00 1/0 0/0 0/0 .text CreateHeap__14daObjSwLight_cFv */
|
||||
int daObjSwLight_c::CreateHeap() {
|
||||
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 4);
|
||||
JUT_ASSERT(385, modelData != NULL);
|
||||
@@ -173,7 +162,6 @@ int daObjSwLight_c::CreateHeap() {
|
||||
return mpModel == NULL ? 0 : 1;
|
||||
}
|
||||
|
||||
/* 80CF7260-80CF7320 000340 00C0+00 1/1 0/0 0/0 .text create1st__14daObjSwLight_cFv */
|
||||
int daObjSwLight_c::create1st() {
|
||||
if (field_0xb20 == 0) {
|
||||
field_0xb20 = 1;
|
||||
@@ -199,8 +187,6 @@ int daObjSwLight_c::create1st() {
|
||||
return phase;
|
||||
}
|
||||
|
||||
/* 80CF7320-80CF73E0 000400 00C0+00 1/0 0/0 0/0 .text Execute__14daObjSwLight_cFPPA3_A4_f
|
||||
*/
|
||||
int daObjSwLight_c::Execute(Mtx** param_0) {
|
||||
action();
|
||||
eventUpdate();
|
||||
@@ -220,7 +206,6 @@ int daObjSwLight_c::Execute(Mtx** param_0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80CF73E0-80CF761C 0004C0 023C+00 1/1 0/0 0/0 .text action__14daObjSwLight_cFv */
|
||||
void daObjSwLight_c::action() {
|
||||
static modeFunc l_func[] = {
|
||||
&daObjSwLight_c::modeSwOnWait,
|
||||
@@ -266,7 +251,6 @@ void daObjSwLight_c::action() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80CF761C-80CF766C 0006FC 0050+00 2/2 0/0 0/0 .text init_modeSwOnWait__14daObjSwLight_cFv */
|
||||
void daObjSwLight_c::init_modeSwOnWait() {
|
||||
// Light Candlestick Switch: Switch <%d> was turned off.
|
||||
OS_REPORT("光燭台スイッチ:スイッチ<%d>オフしました\n", getSwbit());
|
||||
@@ -276,7 +260,6 @@ void daObjSwLight_c::init_modeSwOnWait() {
|
||||
field_0xae0 = 0;
|
||||
}
|
||||
|
||||
/* 80CF766C-80CF777C 00074C 0110+00 1/0 0/0 0/0 .text modeSwOnWait__14daObjSwLight_cFv */
|
||||
void daObjSwLight_c::modeSwOnWait() {
|
||||
checkHit();
|
||||
u8 tmp = field_0xae6;
|
||||
@@ -321,12 +304,10 @@ void daObjSwLight_c::modeSwOnWait() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80CF777C-80CF7788 00085C 000C+00 1/1 0/0 0/0 .text init_modeOnLight__14daObjSwLight_cFv */
|
||||
void daObjSwLight_c::init_modeOnLight() {
|
||||
field_0xae0 = 2;
|
||||
}
|
||||
|
||||
/* 80CF7788-80CF77D8 000868 0050+00 1/0 0/0 0/0 .text modeOnLight__14daObjSwLight_cFv */
|
||||
void daObjSwLight_c::modeOnLight() {
|
||||
#ifdef DEBUG
|
||||
if (cLib_chaseF(&field_0xadc, l_HIO.mLightMaxRadius, l_HIO.mLightMaxRadius * 0.05f)) {
|
||||
@@ -339,7 +320,6 @@ void daObjSwLight_c::modeOnLight() {
|
||||
#endif
|
||||
}
|
||||
|
||||
/* 80CF77D8-80CF7838 0008B8 0060+00 3/3 0/0 0/0 .text init_modeSwOffWait__14daObjSwLight_cFv */
|
||||
void daObjSwLight_c::init_modeSwOffWait() {
|
||||
// Light Candlestick Switch: Switch <%d> was turned on.
|
||||
OS_REPORT("光燭台スイッチ:スイッチ<%d>オンしました\n", getSwbit());
|
||||
@@ -350,8 +330,6 @@ void daObjSwLight_c::init_modeSwOffWait() {
|
||||
field_0xae0 = 1;
|
||||
}
|
||||
|
||||
/* 80CF7838-80CF7974 000918 013C+00 1/0 0/0 0/0 .text modeSwOffWait__14daObjSwLight_cFv
|
||||
*/
|
||||
void daObjSwLight_c::modeSwOffWait() {
|
||||
checkHit();
|
||||
|
||||
@@ -397,10 +375,8 @@ void daObjSwLight_c::modeSwOffWait() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80CF7974-80CF7978 000A54 0004+00 1/0 0/0 0/0 .text modeDead__14daObjSwLight_cFv */
|
||||
void daObjSwLight_c::modeDead() {}
|
||||
|
||||
/* 80CF7978-80CF7A6C 000A58 00F4+00 2/2 0/0 0/0 .text checkHit__14daObjSwLight_cFv */
|
||||
int daObjSwLight_c::checkHit() {
|
||||
field_0xae7 = field_0xae6;
|
||||
field_0xae6 = 0;
|
||||
@@ -429,7 +405,6 @@ int daObjSwLight_c::checkHit() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80CF7A6C-80CF7A98 000B4C 002C+00 1/1 0/0 0/0 .text setOnTimer__14daObjSwLight_cFv */
|
||||
void daObjSwLight_c::setOnTimer() {
|
||||
if (getOnTime() == 0 || getOnTime() == 255) {
|
||||
field_0xae4 = 75;
|
||||
@@ -438,7 +413,6 @@ void daObjSwLight_c::setOnTimer() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80CF7A98-80CF7BA8 000B78 0110+00 1/0 0/0 0/0 .text Draw__14daObjSwLight_cFv */
|
||||
int daObjSwLight_c::Draw() {
|
||||
g_env_light.settingTevStruct(0x10, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr);
|
||||
@@ -468,7 +442,6 @@ int daObjSwLight_c::Draw() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80CF7BA8-80CF7BF0 000C88 0048+00 1/0 0/0 0/0 .text Delete__14daObjSwLight_cFv */
|
||||
int daObjSwLight_c::Delete() {
|
||||
mSound.deleteObject();
|
||||
dComIfG_resDelete(&mPhase, l_arcName);
|
||||
@@ -478,40 +451,29 @@ int daObjSwLight_c::Delete() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80CF7BF0-80CF7D8C 000CD0 019C+00 1/0 0/0 0/0 .text daObjSwLight_create1st__FP14daObjSwLight_c
|
||||
*/
|
||||
static int daObjSwLight_create1st(daObjSwLight_c* i_this) {
|
||||
fopAcM_ct(i_this, daObjSwLight_c);
|
||||
return i_this->create1st();
|
||||
}
|
||||
|
||||
/* 80CF8010-80CF8030 0010F0 0020+00 1/0 0/0 0/0 .text
|
||||
* daObjSwLight_MoveBGDelete__FP14daObjSwLight_c */
|
||||
static int daObjSwLight_MoveBGDelete(daObjSwLight_c* i_this) {
|
||||
return i_this->MoveBGDelete();
|
||||
}
|
||||
|
||||
/* 80CF8030-80CF8050 001110 0020+00 1/0 0/0 0/0 .text
|
||||
* daObjSwLight_MoveBGExecute__FP14daObjSwLight_c */
|
||||
static int daObjSwLight_MoveBGExecute(daObjSwLight_c* i_this) {
|
||||
return i_this->MoveBGExecute();
|
||||
}
|
||||
|
||||
/* 80CF8050-80CF807C 001130 002C+00 1/0 0/0 0/0 .text daObjSwLight_MoveBGDraw__FP14daObjSwLight_c
|
||||
*/
|
||||
static int daObjSwLight_MoveBGDraw(daObjSwLight_c* i_this) {
|
||||
return i_this->MoveBGDraw();
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80CF8548-80CF8568 -00001 0020+00 1/0 0/0 0/0 .data daObjSwLight_METHODS */
|
||||
static actor_method_class daObjSwLight_METHODS = {
|
||||
(process_method_func)daObjSwLight_create1st, (process_method_func)daObjSwLight_MoveBGDelete,
|
||||
(process_method_func)daObjSwLight_MoveBGExecute, 0,
|
||||
(process_method_func)daObjSwLight_MoveBGDraw,
|
||||
};
|
||||
|
||||
/* 80CF8568-80CF8598 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_SwLight */
|
||||
extern actor_process_profile_definition g_profile_Obj_SwLight = {
|
||||
fpcLy_CURRENT_e, // mLayerID
|
||||
3, // mListID
|
||||
|
||||
Reference in New Issue
Block a user