diff --git a/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_final.cpp b/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_final.cpp index e69de29bb..d29feaeb2 100644 --- a/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_final.cpp +++ b/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_final.cpp @@ -0,0 +1,22 @@ +#include + +extern "C" { + +void fn_106_CD00(float* dst, float x, float y); +void fn_106_CFBC(); +void fn_106_D400(const void** obj); + +extern const void* lbl_106_data_5678[]; + +void fn_106_CD00(float* dst, float x, float y) { + dst[0] = x; + dst[1] = y; +} + +void fn_106_CFBC() {} + +void fn_106_D400(const void** obj) { + *obj = lbl_106_data_5678; +} + +} diff --git a/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_hi.cpp b/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_hi.cpp index e69de29bb..e2e6c5897 100644 --- a/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_hi.cpp +++ b/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_hi.cpp @@ -0,0 +1,24 @@ +#include + +extern "C" { + +double fn_106_BE30(double value); +void fn_106_BE38(); +void fn_106_BE3C(); +void fn_106_BFE0(const void** obj); + +extern const void* lbl_106_data_5584[]; + +double fn_106_BE30(double value) { + return __fabs(value); +} + +void fn_106_BE38() {} + +void fn_106_BE3C() {} + +void fn_106_BFE0(const void** obj) { + *obj = lbl_106_data_5584; +} + +} diff --git a/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_lw.cpp b/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_lw.cpp index e69de29bb..ccbca9e50 100644 --- a/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_lw.cpp +++ b/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_lw.cpp @@ -0,0 +1,22 @@ +#include + +extern "C" { + +void fn_106_C390(u8* obj, const float* src); +void fn_106_C674(); +void fn_106_C98C(const void** obj); + +extern const void* lbl_106_data_5600[]; + +void fn_106_C390(u8* obj, const float* src) { + *(float*) (obj + 32) = src[0]; + *(float*) (obj + 36) = src[1]; +} + +void fn_106_C674() {} + +void fn_106_C98C(const void** obj) { + *obj = lbl_106_data_5600; +} + +} diff --git a/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_s.cpp b/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_s.cpp index e69de29bb..e9d3936e8 100644 --- a/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_s.cpp +++ b/src/mo_fighter/ft_marth/ft_marth_status_uniq_process_special_s.cpp @@ -0,0 +1,45 @@ +#include + +extern "C" { + +void fn_106_B508(); +void fn_106_B50C(); +void fn_106_B510(); +bool fn_106_B514(); +void fn_106_B51C(); +bool fn_106_B520(); +void fn_106_B528(); +bool fn_106_B52C(); +void fn_106_B534(); +void fn_106_B538(); +void fn_106_B53C(); + +void fn_106_B508() {} + +void fn_106_B50C() {} + +void fn_106_B510() {} + +bool fn_106_B514() { + return true; +} + +void fn_106_B51C() {} + +bool fn_106_B520() { + return false; +} + +void fn_106_B528() {} + +bool fn_106_B52C() { + return false; +} + +void fn_106_B534() {} + +void fn_106_B538() {} + +void fn_106_B53C() {} + +} diff --git a/src/mo_fighter/ft_marth/if_marth_final.cpp b/src/mo_fighter/ft_marth/if_marth_final.cpp index e69de29bb..359f1384c 100644 --- a/src/mo_fighter/ft_marth/if_marth_final.cpp +++ b/src/mo_fighter/ft_marth/if_marth_final.cpp @@ -0,0 +1,60 @@ +#include +#include +#include + +extern "C" { + +void fn_106_D4E4(Vec3f* dst, const Vec3f* src); +void fn_106_D720(IfMngr* mngr, void* arg); +void fn_106_DA78(IfMngr* mngr, void* arg); +void fn_106_D9DC(); +void fn_106_D9E0(u8* obj); +void fn_106_DA2C(u8* obj); +void fn_106_DA94(); +u8 fn_106_DB60(const u8* obj); +void fn_106_DB68(); +void fn_106_DB6C(); +void fn_106_DB70(); +void fn_106_DB74(); + +// NONMATCHING: mwcc hoists the three loads ahead of the stores; the target +// interleaves them. +void fn_106_D4E4(Vec3f* dst, const Vec3f* src) { + dst->m_x = src->m_x; + dst->m_y = src->m_y; + dst->m_z = src->m_z; +} + +void fn_106_D9DC() {} + +// NONMATCHING: mwcc loads the field before dereferencing g_IfMngr; the target +// does the opposite. Hoisting the manager into a local does not move it. +void fn_106_D9E0(u8* obj) { + if (obj[136] == 0) { + fn_106_D720(g_IfMngr, *(void**) (obj + 72)); + obj[136] = 1; + } +} + +void fn_106_DA2C(u8* obj) { + if (obj[136] == 1) { + fn_106_DA78(g_IfMngr, *(void**) (obj + 72)); + obj[136] = 0; + } +} + +void fn_106_DA94() {} + +u8 fn_106_DB60(const u8* obj) { + return obj[132]; +} + +void fn_106_DB68() {} + +void fn_106_DB6C() {} + +void fn_106_DB70() {} + +void fn_106_DB74() {} + +}