mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-10 20:28:19 -04:00
Fix cLib_calcTimer (#1963)
* Fix cLib_calcTimer * Clean up some additional RELs
This commit is contained in:
@@ -8,8 +8,6 @@
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
extern "C" u8 func_8059E7D0(u8*);
|
||||
|
||||
/* 8059E838-8059E844 000000 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */
|
||||
static u8 cNullVec__6Z2Calc[12] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@@ -151,7 +149,7 @@ int daScExit_c::demoProc() {
|
||||
|
||||
switch (act_id) {
|
||||
case WAIT_e:
|
||||
if (func_8059E7D0(&mTimer) == 0) {
|
||||
if (cLib_calcTimer(&mTimer) == 0) {
|
||||
dComIfGp_evmng_cutEnd(mStaffID);
|
||||
}
|
||||
break;
|
||||
@@ -205,16 +203,6 @@ static int daScExit_Create(daScExit_c* i_this) {
|
||||
return i_this->create();
|
||||
}
|
||||
|
||||
/* 8059E7D0-8059E7EC 0006F0 001C+00 1/1 0/0 0/0 .text cLib_calcTimer<Uc>__FPUc */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
extern "C" asm u8 func_8059E7D0(u8* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/d_a_scene_exit2/d_a_scene_exit2/func_8059E7D0.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8059E8CC-8059E8EC -00001 0020+00 1/0 0/0 0/0 .data l_daScExit_Method */
|
||||
static actor_method_class l_daScExit_Method = {
|
||||
(process_method_func)daScExit_Create, (process_method_func)daScExit_Delete,
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
#define TYPE_BOOMERANG 0 // only turns when hit with boomerang
|
||||
#define TYPE_WIND 1 // automatically turns
|
||||
|
||||
extern "C" u16 func_8059B26C(u16*);
|
||||
extern "C" u8 func_8059B288(u8*);
|
||||
extern "C" s16 func_8059B2A4(s16*);
|
||||
|
||||
/* 8059A518-8059A5C8 000078 00B0+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */
|
||||
static int nodeCallBack(J3DJoint* i_joint, int param_1) {
|
||||
if (param_1 == 0) {
|
||||
@@ -181,7 +177,7 @@ void daObjSwPr_c::switchCtrl() {
|
||||
|
||||
if (mRotateSpeed == 0) {
|
||||
i_fopAcM_offSwitch(this, sw);
|
||||
} else if (func_8059B2A4(&mSwDelayTimer) == 0) {
|
||||
} else if (cLib_calcTimer(&mSwDelayTimer) == 0) {
|
||||
i_fopAcM_onSwitch(this, sw);
|
||||
}
|
||||
}
|
||||
@@ -222,7 +218,7 @@ void daObjSwPr_c::execute_type_boomerang() {
|
||||
}
|
||||
}
|
||||
|
||||
if (func_8059B288(&field_0x83a) != 0) {
|
||||
if (cLib_calcTimer(&field_0x83a) != 0) {
|
||||
mRotateSpeed = 0x2000;
|
||||
}
|
||||
|
||||
@@ -279,7 +275,7 @@ void daObjSwPr_c::execute_type_wind() {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (mSwOffDelayTimer != 0 && func_8059B26C(&mSwOffDelayTimer) == 0) {
|
||||
} else if (mSwOffDelayTimer != 0 && cLib_calcTimer(&mSwOffDelayTimer) == 0) {
|
||||
i_fopAcM_offSwitch(this, sw);
|
||||
}
|
||||
|
||||
@@ -353,36 +349,6 @@ static int daObjSwPr_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daObjSwPr_c*>(i_this)->create();
|
||||
}
|
||||
|
||||
/* 8059B26C-8059B288 000DCC 001C+00 1/1 0/0 0/0 .text cLib_calcTimer<Us>__FPUs */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
extern "C" asm u16 func_8059B26C(u16* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_swpropeller/d_a_obj_swpropeller/func_8059B26C.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8059B288-8059B2A4 000DE8 001C+00 1/1 0/0 0/0 .text cLib_calcTimer<Uc>__FPUc */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
extern "C" asm u8 func_8059B288(u8* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_swpropeller/d_a_obj_swpropeller/func_8059B288.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8059B2A4-8059B2C0 000E04 001C+00 1/1 0/0 0/0 .text cLib_calcTimer<s>__FPs */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
extern "C" asm s16 func_8059B2A4(s16* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_swpropeller/d_a_obj_swpropeller/func_8059B2A4.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8059B38C-8059B3AC -00001 0020+00 1/0 0/0 0/0 .data l_daObjSwPr_Method */
|
||||
static actor_method_class l_daObjSwPr_Method = {
|
||||
(process_method_func)daObjSwPr_Create, (process_method_func)daObjSwPr_Delete,
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
extern "C" int func_8048D760(int*);
|
||||
|
||||
/* 8048D818-8048D824 000000 000C+00 2/2 0/0 0/0 .data cNullVec__6Z2Calc */
|
||||
static u8 cNullVec__6Z2Calc[12] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@@ -236,7 +234,7 @@ BOOL daTag_EvtMsg_c::ECut_wait(int i_staffID) {
|
||||
mTimer = timer;
|
||||
}
|
||||
|
||||
if (func_8048D760(&mTimer) == 0) {
|
||||
if (cLib_calcTimer(&mTimer) == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -271,16 +269,6 @@ static int daTag_EvtMsg_IsDelete(void* i_this) {
|
||||
/* 8048D6F0-8048D760 000830 0070+00 1/0 0/0 0/0 .text __dt__14daTag_EvtMsg_cFv */
|
||||
daTag_EvtMsg_c::~daTag_EvtMsg_c() {}
|
||||
|
||||
/* 8048D760-8048D77C 0008A0 001C+00 1/1 0/0 0/0 .text cLib_calcTimer<i>__FPi */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
extern "C" asm int func_8048D760(int* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/tag/d_a_tag_evtmsg/d_a_tag_evtmsg/func_8048D760.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8048D884-8048D8A4 -00001 0020+00 1/0 0/0 0/0 .data daTag_EvtMsg_MethodTable */
|
||||
static actor_method_class daTag_EvtMsg_MethodTable = {
|
||||
(process_method_func)daTag_EvtMsg_Create, (process_method_func)daTag_EvtMsg_Delete,
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
// clib_calcTimer
|
||||
extern "C" void func_80D5CA18(s16*);
|
||||
|
||||
/* 80D5C698-80D5C708 000078 0070+00 1/1 0/0 0/0 .text create__12daTagMyna2_cFv */
|
||||
s32 daTagMyna2_c::create() {
|
||||
fopAcM_SetupActor(this, daTagMyna2_c);
|
||||
@@ -49,9 +46,7 @@ s32 daTagMyna2_c::execute() {
|
||||
if (i_dComIfGp_event_runCheck()) {
|
||||
mTimer = 5;
|
||||
} else {
|
||||
// func_80D5CA18 is clib_calcTimer.
|
||||
// It should be compiler generated, but it causes matching issues currently.
|
||||
func_80D5CA18(&mTimer);
|
||||
cLib_calcTimer(&mTimer);
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -75,16 +70,6 @@ static s32 daTagMyna2_Delete(daTagMyna2_c* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80D5CA18-80D5CA34 0003F8 001C+00 1/1 0/0 0/0 .text cLib_calcTimer<s>__FPs */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
extern "C" asm void func_80D5CA18(s16* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/func_80D5CA18.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80D5CA64-80D5CA84 -00001 0020+00 1/0 0/0 0/0 .data l_daTagMyna2_Method */
|
||||
static actor_method_class l_daTagMyna2_Method = {
|
||||
|
||||
Reference in New Issue
Block a user