From b3abf02e94d938996a1ef03ded4046c9d855ca8c Mon Sep 17 00:00:00 2001 From: Robin Avery Date: Thu, 1 Sep 2022 04:02:28 -0700 Subject: [PATCH] Migrate `ft/code_*.s` to C (#526) * Migrate `code_8007C114` to C * Migrate `code_8007C630` to C * Migrate `code_80081B38` to C * Migrate `code_80081938` to C --- asm/melee/ft/chara/ftkirby.s | 2 +- asm/melee/ft/ft_unknown_006.s | 6 +- include/functions.h | 47 +- include/sysdolphin/baselib/gobj.h | 43 +- include/sysdolphin/baselib/objalloc.h | 6 - include/variables.h | 2 - obj_files.mk | 8 +- .../chara/ftGameWatch/ftGameWatch_Attack11.c | 2 - .../chara/ftGameWatch/ftGameWatch_AttackAir.c | 1 - .../ft/chara/ftMasterHand/ftMasterHand_9.c | 2 - src/melee/ft/chara/ftNess/ftNess_AttackHi4.c | 3 - src/melee/ft/chara/ftPikachu/ftpikachu4.c | 1 + .../melee/ft/code_8007C114.c | 86 ++- .../melee/ft/code_8007C630.c | 58 +- .../melee/ft/code_80081938.c | 47 +- src/melee/ft/code_80081938.h | 9 + .../melee/ft/code_80081B38.c | 704 ++++++++++++------ src/melee/ft/code_80081B38.h | 10 + src/melee/ft/fighter.c | 50 +- src/melee/ft/fighter.h | 3 + src/melee/ft/ft_unknown_006.c | 1 - src/melee/ft/ft_unknown_006.h | 7 + src/melee/ft/ftbosslib.c | 7 +- src/melee/ft/ftcliffcommon.c | 3 +- src/melee/ft/ftcoll.c | 2 - src/melee/ft/ftcoll.h | 1 + src/melee/ft/ftcommon.c | 14 +- src/melee/ft/ftdrawcommon.c | 1 - src/melee/ft/ftlib.c | 29 +- src/melee/ft/ftwalkcommon.c | 3 +- src/melee/ft/ftwalljump.h | 8 + src/melee/gr/grlib.c | 1 - src/melee/gr/ground.c | 5 - src/melee/it/item.c | 1 - src/melee/it/item2.c | 12 +- src/melee/lb/lbunknown_003.h | 6 + src/melee/mp/mpcoll.h | 37 + src/melee/mp/mplib.h | 21 + src/melee/text_2.h | 8 + src/sysdolphin/baselib/gobjobject.c | 4 +- tools/convert_data.py | 4 +- 41 files changed, 812 insertions(+), 453 deletions(-) rename asm/melee/ft/code_8007C114.s => src/melee/ft/code_8007C114.c (91%) rename asm/melee/ft/code_8007C630.s => src/melee/ft/code_8007C630.c (91%) rename asm/melee/ft/code_80081938.s => src/melee/ft/code_80081938.c (89%) create mode 100644 src/melee/ft/code_80081938.h rename asm/melee/ft/code_80081B38.s => src/melee/ft/code_80081B38.c (94%) create mode 100644 src/melee/ft/code_80081B38.h create mode 100644 src/melee/ft/ftwalljump.h create mode 100644 src/melee/lb/lbunknown_003.h create mode 100644 src/melee/mp/mplib.h create mode 100644 src/melee/text_2.h diff --git a/asm/melee/ft/chara/ftkirby.s b/asm/melee/ft/chara/ftkirby.s index 2f821a7df2..64802b6391 100644 --- a/asm/melee/ft/chara/ftkirby.s +++ b/asm/melee/ft/chara/ftkirby.s @@ -6066,7 +6066,7 @@ lbl_800F3B94: /* 800F3BA0 000F0780 FF E0 00 90 */ fmr f31, f0 lbl_800F3BA4: /* 800F3BA4 000F0784 7F E3 FB 78 */ mr r3, r31 -/* 800F3BA8 000F0788 4B F9 0E 99 */ bl func_80084A40 +/* 800F3BA8 000F0788 4B F9 0E 99 */ bl Stage_GetGroundFrictionMultiplier /* 800F3BAC 000F078C C0 02 99 B0 */ lfs f0, lbl_804D9390@sda21(r2) /* 800F3BB0 000F0790 FC 1F 00 40 */ fcmpo cr0, f31, f0 /* 800F3BB4 000F0794 40 80 00 0C */ bge lbl_800F3BC0 diff --git a/asm/melee/ft/ft_unknown_006.s b/asm/melee/ft/ft_unknown_006.s index 784b99ed2c..fe670a0eab 100644 --- a/asm/melee/ft/ft_unknown_006.s +++ b/asm/melee/ft/ft_unknown_006.s @@ -16592,7 +16592,7 @@ func_800965DC: /* 800965F0 000931D0 7C 7E 1B 78 */ mr r30, r3 /* 800965F4 000931D4 83 E3 00 2C */ lwz r31, 0x2c(r3) /* 800965F8 000931D8 7F E3 FB 78 */ mr r3, r31 -/* 800965FC 000931DC 4B FE E4 45 */ bl func_80084A40 +/* 800965FC 000931DC 4B FE E4 45 */ bl Stage_GetGroundFrictionMultiplier /* 80096600 000931E0 C0 42 8B DC */ lfs f2, lbl_804D85BC@sda21(r2) /* 80096604 000931E4 3C 60 80 3C */ lis r3, ft_SpecialS@ha /* 80096608 000931E8 C0 1F 01 C8 */ lfs f0, 0x1c8(r31) @@ -76627,7 +76627,7 @@ lbl_800CA4C0: /* 800CA4FC 000C70DC 48 00 00 28 */ b lbl_800CA524 lbl_800CA500: /* 800CA500 000C70E0 7F E3 FB 78 */ mr r3, r31 -/* 800CA504 000C70E4 4B FB A5 3D */ bl func_80084A40 +/* 800CA504 000C70E4 4B FB A5 3D */ bl Stage_GetGroundFrictionMultiplier /* 800CA508 000C70E8 80 6D AE B4 */ lwz r3, p_ftCommonData@sda21(r13) /* 800CA50C 000C70EC C0 5F 00 EC */ lfs f2, 0xec(r31) /* 800CA510 000C70F0 C0 03 00 54 */ lfs f0, 0x54(r3) @@ -76823,7 +76823,7 @@ func_800CA77C: /* 800CA790 000C7370 7C 7E 1B 78 */ mr r30, r3 /* 800CA794 000C7374 83 E3 00 2C */ lwz r31, 0x2c(r3) /* 800CA798 000C7378 7F E3 FB 78 */ mr r3, r31 -/* 800CA79C 000C737C 4B FB A2 A5 */ bl func_80084A40 +/* 800CA79C 000C737C 4B FB A2 A5 */ bl Stage_GetGroundFrictionMultiplier /* 800CA7A0 000C7380 C0 02 94 C4 */ lfs f0, lbl_804D8EA4@sda21(r2) /* 800CA7A4 000C7384 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 800CA7A8 000C7388 40 80 00 0C */ bge lbl_800CA7B4 diff --git a/include/functions.h b/include/functions.h index 50268a831b..4889f99575 100644 --- a/include/functions.h +++ b/include/functions.h @@ -230,14 +230,7 @@ void func_8007BAC0(); f32 func_8007BBCC(struct _HSD_GObj *); void func_8007BC90(); void func_8007BE3C(struct _HSD_GObj *); -void func_8007C114(); -void func_8007C17C(struct _HSD_GObj *); -void func_8007C224(); - -void func_8007C4BC(); -void func_8007C630(struct _HSD_GObj *); -void func_8007C6DC(); -void func_8007C77C(); + void func_8007C930(struct _Fighter *, f32); void func_8007CB74(struct _HSD_GObj *); @@ -310,43 +303,8 @@ void func_8008031C(); f32 func_800804EC(struct _Fighter *); // DataOffset_PlayerScale_MultiplyBySomething, returns fp->x40*fp->x34 void func_800804FC(); -void func_80081938(struct _HSD_GObj *); void func_800819A8(); -void func_80081B38(struct _HSD_GObj *); -void func_80081C88(struct _HSD_GObj *, f32); -s32 func_80081D0C(struct _HSD_GObj *); - -s32 func_800821DC(); -s32 func_8008239C(HSD_GObj *, s32, f32 *); - -s32 func_80082708(struct _HSD_GObj *); -s32 func_800827A0(struct _HSD_GObj *); - -s32 func_80082A68(struct _HSD_GObj *); -void func_80082B1C(struct _HSD_GObj *); /* extern */ - -struct _HSD_GObj *func_80082E3C(struct _HSD_GObj *); - -void func_800831CC(struct _HSD_GObj *, s32 (*)(struct _HSD_GObj *), void (*)(struct _HSD_GObj *)); - -void func_80083B68(struct _HSD_GObj *); - -void func_80083F88(struct _HSD_GObj *); - -void func_80084104(struct _HSD_GObj *); - -f32 func_80084A40(struct _Fighter *); // Stage_GetGroundFrictionMultiplier very short function - -void func_80084EEC(struct _HSD_GObj *); -void func_80084F3C(struct _HSD_GObj *); -void func_80084FA8(struct _HSD_GObj *); - -void func_80085134(struct _HSD_GObj *); -void func_80085154(struct _HSD_GObj *); - -void func_80085204(struct _HSD_GObj *); - void func_800852B0(); void func_8008549C(); @@ -739,8 +697,6 @@ void func_801C95C4(struct _HSD_GObj *); s32 Stage_80225194(void); -void func_8026A8EC(); - void func_8026ABD8(struct _HSD_GObj *, Vec *, f32); BOOL func_8026B2B4(struct _HSD_GObj *); @@ -900,7 +856,6 @@ void func_80390228(struct _HSD_GObj *); void efLib_PauseAll(struct _HSD_GObj *); void efLib_ResumeAll(struct _HSD_GObj *); -BOOL EnvColl_CheckGroundAndLedge(HSD_GObj *, s32); s32 func_80096CC8(struct _HSD_GObj *); void ef_Spawn(s32, ...); f32 HSD_Randf(void); diff --git a/include/sysdolphin/baselib/gobj.h b/include/sysdolphin/baselib/gobj.h index 21088958b6..06c5c11b4e 100644 --- a/include/sysdolphin/baselib/gobj.h +++ b/include/sysdolphin/baselib/gobj.h @@ -60,33 +60,34 @@ typedef struct _HSD_GObjLibInitData } HSD_GObjLibInitData; typedef struct _HSD_GObjList { - struct _HSD_GObj *x0; //0x0 - struct _HSD_GObj *x4; //0x4 - struct _HSD_GObj *x8; //0x8 - struct _HSD_GObj *xC; //0xC - struct _HSD_GObj *x10; //0x10 - struct _HSD_GObj *x14; //0x14 - struct _HSD_GObj *x18; //0x18 - struct _HSD_GObj *x1C; //0x1C - struct _HSD_GObj *x20_fighters; //0x20 - struct _HSD_GObj *x24; //0x24 - struct _HSD_GObj *x28; //0x28 - struct _HSD_GObj *x2C; //0x2C - struct _HSD_GObj *x30; //0x30 - struct _HSD_GObj *x34; //0x34 - struct _HSD_GObj *x38; //0x38 - struct _HSD_GObj *x3C; //0x3C - struct _HSD_GObj *x40; //0x40 - struct _HSD_GObj *x44; //0x44 - struct _HSD_GObj *x48; //0x48 + HSD_GObj *x0; //0x0 + HSD_GObj *x4; //0x4 + HSD_GObj *x8; //0x8 + HSD_GObj *xC; //0xC + HSD_GObj *x10; //0x10 + HSD_GObj *x14; //0x14 + HSD_GObj *x18; //0x18 + HSD_GObj *x1C; //0x1C + HSD_GObj *x20_fighters; //0x20 + HSD_GObj *x24_items; //0x24 + HSD_GObj *x28; //0x28 + HSD_GObj *x2C; //0x2C + HSD_GObj *x30; //0x30 + HSD_GObj *x34; //0x34 + HSD_GObj *x38; //0x38 + HSD_GObj *x3C; //0x3C + HSD_GObj *x40; //0x40 + HSD_GObj *x44; //0x44 + HSD_GObj *x48; //0x48 } HSD_GObjList; -#endif - extern u8 lbl_804D784B[5]; extern HSD_GObj* lbl_804D797C; +extern HSD_GObjList* lbl_804D782C; void func_80390C5C(HSD_GObj *gobj); void func_80390C84(HSD_GObj *gobj); void func_80390CAC(HSD_GObj *gobj); void func_803910D8(HSD_GObj *, s32); + +#endif diff --git a/include/sysdolphin/baselib/objalloc.h b/include/sysdolphin/baselib/objalloc.h index a3a9b979c9..a836567b38 100644 --- a/include/sysdolphin/baselib/objalloc.h +++ b/include/sysdolphin/baselib/objalloc.h @@ -34,12 +34,6 @@ typedef struct _HSD_ObjAllocData { struct _HSD_ObjAllocData* next; } HSD_ObjAllocData; -struct r13_EntityPointers { - HSD_GObj* x0[8]; - HSD_GObj* x20_fighterGObj; - HSD_GObj* x24_itemGObj; -}; - typedef struct ItemCommonData { u32 x0; diff --git a/include/variables.h b/include/variables.h index ffef4d8b28..ca5e65bdef 100644 --- a/include/variables.h +++ b/include/variables.h @@ -11,7 +11,6 @@ extern void* lbl_804D6510; extern void* lbl_804D6514; extern void* lbl_804D6518; extern void* lbl_804D651C; -extern void* lbl_804D6520; extern void* lbl_804D6524; extern void* lbl_804D6528; // extern ? lbl_804D652C; @@ -24,6 +23,5 @@ extern void* lbl_804D6544; extern void* lbl_804D6548; extern void* lbl_804D654C; extern void* lbl_804D6550; -extern struct _ftCommonData* p_ftCommonData; // extern ? lbl_804D4A00; extern s32 g_debugLevel; diff --git a/obj_files.mk b/obj_files.mk index 0ef781c78b..10ddc98ab9 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -76,15 +76,15 @@ TEXT_O_FILES +=\ $(BUILD_DIR)/asm/melee/ft/ftparts.s.o\ $(BUILD_DIR)/src/melee/ft/ftcamera.c.o\ $(BUILD_DIR)/asm/melee/ft/ftcoll.s.o\ - $(BUILD_DIR)/asm/melee/ft/code_8007C114.s.o\ - $(BUILD_DIR)/asm/melee/ft/code_8007C630.s.o\ + $(BUILD_DIR)/src/melee/ft/code_8007C114.c.o\ + $(BUILD_DIR)/src/melee/ft/code_8007C630.c.o\ $(BUILD_DIR)/src/melee/ft/ftcommon.c.o\ $(BUILD_DIR)/src/melee/ft/ftdrawcommon.c.o\ $(BUILD_DIR)/asm/melee/ft/ftdrawcommon_data.s.o\ $(BUILD_DIR)/src/melee/ft/ftcliffcommon.c.o\ $(BUILD_DIR)/src/melee/ft/ftwalljump.c.o\ - $(BUILD_DIR)/asm/melee/ft/code_80081938.s.o\ - $(BUILD_DIR)/asm/melee/ft/code_80081B38.s.o\ + $(BUILD_DIR)/src/melee/ft/code_80081938.c.o\ + $(BUILD_DIR)/src/melee/ft/code_80081B38.c.o\ $(BUILD_DIR)/asm/melee/ft/ft_unknown_005.s.o\ $(BUILD_DIR)/asm/melee/ft/ftdata.s.o\ $(BUILD_DIR)/src/melee/ft/ftlib.c.o\ diff --git a/src/melee/ft/chara/ftGameWatch/ftGameWatch_Attack11.c b/src/melee/ft/chara/ftGameWatch/ftGameWatch_Attack11.c index 139a589f61..d335dc978e 100644 --- a/src/melee/ft/chara/ftGameWatch/ftGameWatch_Attack11.c +++ b/src/melee/ft/chara/ftGameWatch/ftGameWatch_Attack11.c @@ -198,8 +198,6 @@ void ftGameWatch_Attack11_IASA(HSD_GObj* fighter_gobj) func_8008ACD8(fighter_gobj); } -extern void func_80084FA8(HSD_GObj*); - // 0x8014C194 - Mr. Game & Watch's Jab Physics callback void ftGameWatch_Attack11_Phys(HSD_GObj* fighter_gobj) { diff --git a/src/melee/ft/chara/ftGameWatch/ftGameWatch_AttackAir.c b/src/melee/ft/chara/ftGameWatch/ftGameWatch_AttackAir.c index 2e06926a62..6412079b95 100644 --- a/src/melee/ft/chara/ftGameWatch/ftGameWatch_AttackAir.c +++ b/src/melee/ft/chara/ftGameWatch/ftGameWatch_AttackAir.c @@ -404,7 +404,6 @@ void ftGameWatch_AttackAirN_Coll(HSD_GObj* fighter_gobj) func_80082C74(fighter_gobj, ftGameWatch_LandingAirN_Action); } -void func_800D5BF8(HSD_GObj*); void ftGameWatch_LandingAirN_Init(HSD_GObj*); // 0x8014B7A8 diff --git a/src/melee/ft/chara/ftMasterHand/ftMasterHand_9.c b/src/melee/ft/chara/ftMasterHand/ftMasterHand_9.c index 2eb29414b4..49b4af739a 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMasterHand_9.c +++ b/src/melee/ft/chara/ftMasterHand/ftMasterHand_9.c @@ -158,8 +158,6 @@ void lbl_8015204C(HSD_GObj* gobj) { // 80152090 14EC70 // https://decomp.me/scratch/B021s -void func_80085134(HSD_GObj*); /* extern */ - void lbl_80152090(HSD_GObj* gobj) { ftData* r4_ftData; Fighter* r31_fp; diff --git a/src/melee/ft/chara/ftNess/ftNess_AttackHi4.c b/src/melee/ft/chara/ftNess/ftNess_AttackHi4.c index ea91f861e8..bf7da6a4f3 100644 --- a/src/melee/ft/chara/ftNess/ftNess_AttackHi4.c +++ b/src/melee/ft/chara/ftNess/ftNess_AttackHi4.c @@ -76,9 +76,6 @@ void ftNess_YoyoApplyDamage(f32 unk_float, HSD_GObj* fighter_gobj) // Apply modi // 0x80114FF8 // // https://decomp.me/scratch/omC8O // -void func_80041EE4(CollData*); -void func_8004730C(CollData*, f32(*x)[6]); - inline void push_ecb(CollData* a, Vec3* b) { a->x1C_vec = a->x4_vec; // old = curr diff --git a/src/melee/ft/chara/ftPikachu/ftpikachu4.c b/src/melee/ft/chara/ftPikachu/ftpikachu4.c index e4d3145f76..b6987097b3 100644 --- a/src/melee/ft/chara/ftPikachu/ftpikachu4.c +++ b/src/melee/ft/chara/ftPikachu/ftpikachu4.c @@ -1,4 +1,5 @@ #include +#include #define HALF_PI 1.5707963705062866f #define DEG_TO_RAD 0.017453292f diff --git a/asm/melee/ft/code_8007C114.s b/src/melee/ft/code_8007C114.c similarity index 91% rename from asm/melee/ft/code_8007C114.s rename to src/melee/ft/code_8007C114.c index 71b4120224..cbf092a2ec 100644 --- a/asm/melee/ft/code_8007C114.s +++ b/src/melee/ft/code_8007C114.c @@ -1,9 +1,23 @@ -.include "macros.inc" +#include +#include +#include -.section .text # 0x8007C114 - 0x8007C62C +static f32 const lbl_804D8320 = 0.0F; +static f32 const lbl_804D8324 = 1.0F; -.global func_8007C114 -func_8007C114: +extern unk_t func_800C555C(); +extern void func_80008440(Hitbox*); +extern unk_t func_80008688(); +extern unk_t func_8000ACFC(); +extern unk_t func_800089B8(); +extern unk_t func_80007AFC(); + +void func_8007C224(HSD_GObj* fighterObj); + +#pragma push +asm void func_8007C114(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 8007C114 00078CF4 7C 08 02 A6 */ mflr r0 /* 8007C118 00078CF8 90 01 00 04 */ stw r0, 4(r1) /* 8007C11C 00078CFC 94 21 FF E8 */ stwu r1, -0x18(r1) @@ -32,9 +46,13 @@ /* 8007C170 00078D50 38 21 00 18 */ addi r1, r1, 0x18 /* 8007C174 00078D54 7C 08 03 A6 */ mtlr r0 /* 8007C178 00078D58 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_8007C17C -func_8007C17C: +#pragma push +asm void func_8007C17C(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 8007C17C 00078D5C 7C 08 02 A6 */ mflr r0 /* 8007C180 00078D60 90 01 00 04 */ stw r0, 4(r1) /* 8007C184 00078D64 38 00 00 01 */ li r0, 1 @@ -58,7 +76,7 @@ /* 8007C1CC 00078DAC 90 1D 00 48 */ stw r0, 0x48(r29) /* 8007C1D0 00078DB0 C0 1C 00 04 */ lfs f0, 4(r28) /* 8007C1D4 00078DB4 D0 1D 00 1C */ stfs f0, 0x1c(r29) -/* 8007C1D8 00078DB8 C0 02 89 40 */ lfs f0, lbl_804D8320@sda21(r2) +/* 8007C1D8 00078DB8 C0 02 89 40 */ lfs f0, lbl_804D8320(r2) /* 8007C1DC 00078DBC D0 1D 00 18 */ stfs f0, 0x18(r29) /* 8007C1E0 00078DC0 D0 1D 00 14 */ stfs f0, 0x14(r29) /* 8007C1E4 00078DC4 D0 1D 00 10 */ stfs f0, 0x10(r29) @@ -77,9 +95,13 @@ /* 8007C218 00078DF8 38 21 00 28 */ addi r1, r1, 0x28 /* 8007C21C 00078DFC 7C 08 03 A6 */ mtlr r0 /* 8007C220 00078E00 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_8007C224 -func_8007C224: +#pragma push +asm void func_8007C224(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 8007C224 00078E04 7C 08 02 A6 */ mflr r0 /* 8007C228 00078E08 90 01 00 04 */ stw r0, 4(r1) /* 8007C22C 00078E0C 94 21 FF E0 */ stwu r1, -0x20(r1) @@ -132,9 +154,13 @@ /* 8007C2D4 00078EB4 38 21 00 20 */ addi r1, r1, 0x20 /* 8007C2D8 00078EB8 7C 08 03 A6 */ mtlr r0 /* 8007C2DC 00078EBC 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_8007C2E0 -func_8007C2E0: +#pragma push +asm unk_t func_8007C2E0() +{ // clang-format off + nofralloc /* 8007C2E0 00078EC0 7C 08 02 A6 */ mflr r0 /* 8007C2E4 00078EC4 90 01 00 04 */ stw r0, 4(r1) /* 8007C2E8 00078EC8 94 21 FF C8 */ stwu r1, -0x38(r1) @@ -159,7 +185,7 @@ /* 8007C334 00078F14 40 82 00 A8 */ bne lbl_8007C3DC /* 8007C338 00078F18 C0 5C 01 98 */ lfs f2, 0x198(r28) /* 8007C33C 00078F1C C0 3E 01 98 */ lfs f1, 0x198(r30) -/* 8007C340 00078F20 C0 02 89 44 */ lfs f0, lbl_804D8324@sda21(r2) +/* 8007C340 00078F20 C0 02 89 44 */ lfs f0, lbl_804D8324(r2) /* 8007C344 00078F24 EC 22 08 24 */ fdivs f1, f2, f1 /* 8007C348 00078F28 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 8007C34C 00078F2C FC A0 08 90 */ fmr f5, f1 @@ -168,9 +194,9 @@ lbl_8007C358: /* 8007C358 00078F38 C0 9C 00 C8 */ lfs f4, 0xc8(r28) /* 8007C35C 00078F3C C0 7E 00 C8 */ lfs f3, 0xc8(r30) -/* 8007C360 00078F40 80 6D AE B4 */ lwz r3, p_ftCommonData@sda21(r13) +/* 8007C360 00078F40 80 6D AE B4 */ lwz r3, p_ftCommonData(r13) /* 8007C364 00078F44 EC 24 00 F2 */ fmuls f1, f4, f3 -/* 8007C368 00078F48 C0 02 89 40 */ lfs f0, lbl_804D8320@sda21(r2) +/* 8007C368 00078F48 C0 02 89 40 */ lfs f0, lbl_804D8320(r2) /* 8007C36C 00078F4C C0 43 07 D4 */ lfs f2, 0x7d4(r3) /* 8007C370 00078F50 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 8007C374 00078F54 EC A5 00 B2 */ fmuls f5, f5, f2 @@ -188,7 +214,7 @@ lbl_8007C3A0: /* 8007C3A0 00078F80 C0 7C 00 CC */ lfs f3, 0xcc(r28) /* 8007C3A4 00078F84 C0 5E 00 CC */ lfs f2, 0xcc(r30) -/* 8007C3A8 00078F88 C0 02 89 40 */ lfs f0, lbl_804D8320@sda21(r2) +/* 8007C3A8 00078F88 C0 02 89 40 */ lfs f0, lbl_804D8320(r2) /* 8007C3AC 00078F8C EC 23 00 B2 */ fmuls f1, f3, f2 /* 8007C3B0 00078F90 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 8007C3B4 00078F94 4C 41 13 82 */ cror 2, 1, 2 @@ -212,7 +238,7 @@ /* 8007C3F4 00078FD4 40 82 00 A8 */ bne lbl_8007C49C /* 8007C3F8 00078FD8 C0 5E 01 98 */ lfs f2, 0x198(r30) /* 8007C3FC 00078FDC C0 3C 01 98 */ lfs f1, 0x198(r28) -/* 8007C400 00078FE0 C0 02 89 44 */ lfs f0, lbl_804D8324@sda21(r2) +/* 8007C400 00078FE0 C0 02 89 44 */ lfs f0, lbl_804D8324(r2) /* 8007C404 00078FE4 EC 22 08 24 */ fdivs f1, f2, f1 /* 8007C408 00078FE8 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 8007C40C 00078FEC FC A0 08 90 */ fmr f5, f1 @@ -221,9 +247,9 @@ lbl_8007C418: /* 8007C418 00078FF8 C0 7C 00 C8 */ lfs f3, 0xc8(r28) /* 8007C41C 00078FFC C0 9E 00 C8 */ lfs f4, 0xc8(r30) -/* 8007C420 00079000 80 6D AE B4 */ lwz r3, p_ftCommonData@sda21(r13) +/* 8007C420 00079000 80 6D AE B4 */ lwz r3, p_ftCommonData(r13) /* 8007C424 00079004 EC 23 01 32 */ fmuls f1, f3, f4 -/* 8007C428 00079008 C0 02 89 40 */ lfs f0, lbl_804D8320@sda21(r2) +/* 8007C428 00079008 C0 02 89 40 */ lfs f0, lbl_804D8320(r2) /* 8007C42C 0007900C C0 43 07 D4 */ lfs f2, 0x7d4(r3) /* 8007C430 00079010 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 8007C434 00079014 EC A5 00 B2 */ fmuls f5, f5, f2 @@ -241,7 +267,7 @@ lbl_8007C460: /* 8007C460 00079040 C0 5C 00 CC */ lfs f2, 0xcc(r28) /* 8007C464 00079044 C0 7E 00 CC */ lfs f3, 0xcc(r30) -/* 8007C468 00079048 C0 02 89 40 */ lfs f0, lbl_804D8320@sda21(r2) +/* 8007C468 00079048 C0 02 89 40 */ lfs f0, lbl_804D8320(r2) /* 8007C46C 0007904C EC 22 00 F2 */ fmuls f1, f2, f3 /* 8007C470 00079050 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 8007C474 00079054 4C 41 13 82 */ cror 2, 1, 2 @@ -264,9 +290,13 @@ /* 8007C4B0 00079090 38 21 00 38 */ addi r1, r1, 0x38 /* 8007C4B4 00079094 7C 08 03 A6 */ mtlr r0 /* 8007C4B8 00079098 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_8007C4BC -func_8007C4BC: +#pragma push +asm void func_8007C4BC(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 8007C4BC 0007909C 7C 08 02 A6 */ mflr r0 /* 8007C4C0 000790A0 90 01 00 04 */ stw r0, 4(r1) /* 8007C4C4 000790A4 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -299,7 +329,7 @@ lbl_8007C52C: /* 8007C52C 0007910C 3B 40 00 00 */ li r26, 0 lbl_8007C530: -/* 8007C530 00079110 80 6D C1 8C */ lwz r3, lbl_804D782C@sda21(r13) +/* 8007C530 00079110 80 6D C1 8C */ lwz r3, lbl_804D782C(r13) /* 8007C534 00079114 3B BF 10 64 */ addi r29, r31, 0x1064 /* 8007C538 00079118 83 63 00 20 */ lwz r27, 0x20(r3) /* 8007C53C 0007911C 48 00 00 D8 */ b lbl_8007C614 @@ -370,13 +400,5 @@ /* 8007C624 00079204 38 21 00 40 */ addi r1, r1, 0x40 /* 8007C628 00079208 7C 08 03 A6 */ mtlr r0 /* 8007C62C 0007920C 4E 80 00 20 */ blr - - -.section .sdata2 - .balign 8 -.global lbl_804D8320 -lbl_804D8320: - .4byte 0x00000000 -.global lbl_804D8324 -lbl_804D8324: - .4byte 0x3F800000 +} // clang-format on +#pragma pop diff --git a/asm/melee/ft/code_8007C630.s b/src/melee/ft/code_8007C630.c similarity index 91% rename from asm/melee/ft/code_8007C630.s rename to src/melee/ft/code_8007C630.c index 36fe1e6dc9..760113137d 100644 --- a/asm/melee/ft/code_8007C630.s +++ b/src/melee/ft/code_8007C630.c @@ -1,9 +1,19 @@ -.include "macros.inc" +#include +#include +#include +#include +#include +#include -.section .text # 0x8007C630 - 0x8007C92C +static f32 const lbl_804D8328 = 0.0F; +static f32 const lbl_804D832C = 1.0F; -.global func_8007C630 -func_8007C630: +extern unk_t func_8016B0B4(void); + +#pragma push +asm void func_8007C630(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 8007C630 00079210 7C 08 02 A6 */ mflr r0 /* 8007C634 00079214 90 01 00 04 */ stw r0, 4(r1) /* 8007C638 00079218 94 21 FF D0 */ stwu r1, -0x30(r1) @@ -12,7 +22,7 @@ /* 8007C644 00079224 3B 80 00 00 */ li r28, 0 /* 8007C648 00079228 3B E0 00 00 */ li r31, 0 /* 8007C64C 0007922C 83 A3 00 2C */ lwz r29, 0x2c(r3) -/* 8007C650 00079230 C3 E2 89 48 */ lfs f31, lbl_804D8328@sda21(r2) +/* 8007C650 00079230 C3 E2 89 48 */ lfs f31, lbl_804D8328(r2) /* 8007C654 00079234 3B DD 00 00 */ addi r30, r29, 0 lbl_8007C658: /* 8007C658 00079238 80 9D 01 0C */ lwz r4, 0x10c(r29) @@ -48,9 +58,13 @@ /* 8007C6D0 000792B0 38 21 00 30 */ addi r1, r1, 0x30 /* 8007C6D4 000792B4 7C 08 03 A6 */ mtlr r0 /* 8007C6D8 000792B8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_8007C6DC -func_8007C6DC: +#pragma push +asm void func_8007C6DC(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 8007C6DC 000792BC 7C 08 02 A6 */ mflr r0 /* 8007C6E0 000792C0 90 01 00 04 */ stw r0, 4(r1) /* 8007C6E4 000792C4 94 21 FF D0 */ stwu r1, -0x30(r1) @@ -62,7 +76,7 @@ /* 8007C6FC 000792DC 41 82 00 68 */ beq lbl_8007C764 /* 8007C700 000792E0 83 BB 00 2C */ lwz r29, 0x2c(r27) /* 8007C704 000792E4 3B 80 00 00 */ li r28, 0 -/* 8007C708 000792E8 C3 E2 89 48 */ lfs f31, lbl_804D8328@sda21(r2) +/* 8007C708 000792E8 C3 E2 89 48 */ lfs f31, lbl_804D8328(r2) /* 8007C70C 000792EC 3B E0 00 00 */ li r31, 0 /* 8007C710 000792F0 3B DD 00 00 */ addi r30, r29, 0 lbl_8007C714: @@ -93,9 +107,17 @@ /* 8007C770 00079350 38 21 00 30 */ addi r1, r1, 0x30 /* 8007C774 00079354 7C 08 03 A6 */ mtlr r0 /* 8007C778 00079358 4E 80 00 20 */ blr +} // clang-format on +#pragma pop + +extern unk_t func_80023870(); +extern unk_t func_802E5EF4(); +extern unk_t func_80007B78(); -.global func_8007C77C -func_8007C77C: +#pragma push +asm void func_8007C77C(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 8007C77C 0007935C 7C 08 02 A6 */ mflr r0 /* 8007C780 00079360 90 01 00 04 */ stw r0, 4(r1) /* 8007C784 00079364 94 21 FF B0 */ stwu r1, -0x50(r1) @@ -128,8 +150,8 @@ /* 8007C7E8 000793C8 4B FF F0 81 */ bl func_8007B868 /* 8007C7EC 000793CC 2C 03 00 02 */ cmpwi r3, 2 /* 8007C7F0 000793D0 41 82 01 28 */ beq lbl_8007C918 -/* 8007C7F4 000793D4 80 6D C1 8C */ lwz r3, lbl_804D782C@sda21(r13) -/* 8007C7F8 000793D8 C3 E2 89 4C */ lfs f31, lbl_804D832C@sda21(r2) +/* 8007C7F4 000793D4 80 6D C1 8C */ lwz r3, lbl_804D782C(r13) +/* 8007C7F8 000793D8 C3 E2 89 4C */ lfs f31, lbl_804D832C(r2) /* 8007C7FC 000793DC 80 63 00 24 */ lwz r3, 0x24(r3) /* 8007C800 000793E0 48 00 01 10 */ b lbl_8007C910 lbl_8007C804: @@ -215,13 +237,5 @@ /* 8007C924 00079504 38 21 00 50 */ addi r1, r1, 0x50 /* 8007C928 00079508 7C 08 03 A6 */ mtlr r0 /* 8007C92C 0007950C 4E 80 00 20 */ blr - - -.section .sdata2 - .balign 8 -.global lbl_804D8328 -lbl_804D8328: - .4byte 0x00000000 -.global lbl_804D832C -lbl_804D832C: - .4byte 0x3F800000 +} // clang-format on +#pragma pop diff --git a/asm/melee/ft/code_80081938.s b/src/melee/ft/code_80081938.c similarity index 89% rename from asm/melee/ft/code_80081938.s rename to src/melee/ft/code_80081938.c index 4917d156ec..063f272e16 100644 --- a/asm/melee/ft/code_80081938.s +++ b/src/melee/ft/code_80081938.c @@ -1,9 +1,16 @@ -.include "macros.inc" +#include +#include +#include +#include +#include -.section .text # 0x80081938 - 0x80081B34 +static f32 const lbl_804D83A0 = -1.0F; +static f32 const lbl_804D83A4 = 1.0F; -.global func_80081938 -func_80081938: +#pragma push +asm void func_80081938(HSD_GObj* fighter_gobj) +{ // clang-format off + nofralloc /* 80081938 0007E518 94 21 FF 88 */ stwu r1, -0x78(r1) /* 8008193C 0007E51C 80 A3 00 2C */ lwz r5, 0x2c(r3) /* 80081940 0007E520 80 65 06 F4 */ lwz r3, 0x6f4(r5) @@ -32,9 +39,13 @@ /* 8008199C 0007E57C 90 05 19 38 */ stw r0, 0x1938(r5) /* 800819A0 0007E580 38 21 00 78 */ addi r1, r1, 0x78 /* 800819A4 0007E584 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800819A8 -func_800819A8: +#pragma push +asm void func_800819A8(HSD_GObj* fighter_gobj) +{ // clang-format off + nofralloc /* 800819A8 0007E588 94 21 FF 88 */ stwu r1, -0x78(r1) /* 800819AC 0007E58C 80 A3 00 2C */ lwz r5, 0x2c(r3) /* 800819B0 0007E590 80 65 06 F4 */ lwz r3, 0x6f4(r5) @@ -57,9 +68,13 @@ /* 800819F4 0007E5D4 D0 05 19 38 */ stfs f0, 0x1938(r5) /* 800819F8 0007E5D8 38 21 00 78 */ addi r1, r1, 0x78 /* 800819FC 0007E5DC 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80081A00 -func_80081A00: +#pragma push +asm unk_t func_80081A00() +{ // clang-format off + nofralloc /* 80081A00 0007E5E0 7C 08 02 A6 */ mflr r0 /* 80081A04 0007E5E4 90 01 00 04 */ stw r0, 4(r1) /* 80081A08 0007E5E8 94 21 FF 50 */ stwu r1, -0xb0(r1) @@ -93,7 +108,7 @@ /* 80081A78 0007E658 C0 1F 02 8C */ lfs f0, 0x28c(r31) /* 80081A7C 0007E65C EC 01 00 2A */ fadds f0, f1, f0 /* 80081A80 0007E660 D0 1F 19 44 */ stfs f0, 0x1944(r31) -/* 80081A84 0007E664 80 6D C1 8C */ lwz r3, lbl_804D782C@sda21(r13) +/* 80081A84 0007E664 80 6D C1 8C */ lwz r3, lbl_804D782C(r13) /* 80081A88 0007E668 83 7E 00 2C */ lwz r27, 0x2c(r30) /* 80081A8C 0007E66C 83 83 00 24 */ lwz r28, 0x24(r3) /* 80081A90 0007E670 48 00 00 64 */ b lbl_80081AF4 @@ -112,10 +127,10 @@ /* 80081AC0 0007E6A0 C0 1B 00 B0 */ lfs f0, 0xb0(r27) /* 80081AC4 0007E6A4 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80081AC8 0007E6A8 40 81 00 0C */ ble lbl_80081AD4 -/* 80081ACC 0007E6AC C0 02 89 C0 */ lfs f0, lbl_804D83A0@sda21(r2) +/* 80081ACC 0007E6AC C0 02 89 C0 */ lfs f0, lbl_804D83A0(r2) /* 80081AD0 0007E6B0 48 00 00 08 */ b lbl_80081AD8 lbl_80081AD4: -/* 80081AD4 0007E6B4 C0 02 89 C4 */ lfs f0, lbl_804D83A4@sda21(r2) +/* 80081AD4 0007E6B4 C0 02 89 C4 */ lfs f0, lbl_804D83A4(r2) lbl_80081AD8: /* 80081AD8 0007E6B8 D0 1D 0C D0 */ stfs f0, 0xcd0(r29) /* 80081ADC 0007E6BC 38 00 00 01 */ li r0, 1 @@ -145,11 +160,5 @@ /* 80081B2C 0007E70C 38 21 00 B0 */ addi r1, r1, 0xb0 /* 80081B30 0007E710 7C 08 03 A6 */ mtlr r0 /* 80081B34 0007E714 4E 80 00 20 */ blr - - -.section .sdata2 - .balign 8 -lbl_804D83A0: - .4byte 0xBF800000 -lbl_804D83A4: - .4byte 0x3F800000 +} // clang-format on +#pragma pop diff --git a/src/melee/ft/code_80081938.h b/src/melee/ft/code_80081938.h new file mode 100644 index 0000000000..2725f7a062 --- /dev/null +++ b/src/melee/ft/code_80081938.h @@ -0,0 +1,9 @@ +#ifndef MELEE_FT_CODE_80081938_H +#define MELEE_FT_CODE_80081938_H + +#include + +void func_80081938(HSD_GObj* fighter_gobj); +void func_800819A8(HSD_GObj* fighter_gobj); + +#endif diff --git a/asm/melee/ft/code_80081B38.s b/src/melee/ft/code_80081B38.c similarity index 94% rename from asm/melee/ft/code_80081B38.s rename to src/melee/ft/code_80081B38.c index bbdc2185dc..6e897a31c2 100644 --- a/asm/melee/ft/code_80081B38.s +++ b/src/melee/ft/code_80081B38.c @@ -1,9 +1,20 @@ -.include "macros.inc" +#include +#include +#include +#include +#include +#include -.section .text # 0x80081B38 - 0x80085218 +static f32 const lbl_804D83A8 = 10.0F; +static f32 const lbl_804D83AC = 0.0F; +static f32 const lbl_804D83B0 = 1.0F; +static f32 const lbl_804D83B4 = 0.5F; +static f64 const lbl_804D83B8 = 0.0F; -.global func_80081B38 -func_80081B38: +#pragma push +asm void func_80081B38(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 80081B38 0007E718 7C 08 02 A6 */ mflr r0 /* 80081B3C 0007E71C 90 01 00 04 */ stw r0, 4(r1) /* 80081B40 0007E720 38 00 00 00 */ li r0, 0 @@ -74,7 +85,7 @@ /* 80081C44 0007E824 C0 1F 01 98 */ lfs f0, 0x198(r31) /* 80081C48 0007E828 D0 1E 00 50 */ stfs f0, 0x50(r30) /* 80081C4C 0007E82C 80 1E 01 04 */ lwz r0, 0x104(r30) -/* 80081C50 0007E830 C0 22 89 C8 */ lfs f1, lbl_804D83A8@sda21(r2) +/* 80081C50 0007E830 C0 22 89 C8 */ lfs f1, lbl_804D83A8(r2) /* 80081C54 0007E834 C0 1F 00 38 */ lfs f0, 0x38(r31) /* 80081C58 0007E838 2C 00 00 01 */ cmpwi r0, 1 /* 80081C5C 0007E83C EC 01 00 32 */ fmuls f0, f1, f0 @@ -89,9 +100,13 @@ /* 80081C7C 0007E85C 38 21 00 38 */ addi r1, r1, 0x38 /* 80081C80 0007E860 7C 08 03 A6 */ mtlr r0 /* 80081C84 0007E864 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80081C88 -func_80081C88: +#pragma push +asm void func_80081C88(HSD_GObj* dst_gobj, f32 scale_y) +{ // clang-format off + nofralloc /* 80081C88 0007E868 80 83 00 2C */ lwz r4, 0x2c(r3) /* 80081C8C 0007E86C 80 64 01 0C */ lwz r3, 0x10c(r4) /* 80081C90 0007E870 38 A4 06 F0 */ addi r5, r4, 0x6f0 @@ -119,7 +134,7 @@ /* 80081CE0 0007E8C0 C0 04 01 98 */ lfs f0, 0x198(r4) /* 80081CE4 0007E8C4 D0 05 00 50 */ stfs f0, 0x50(r5) /* 80081CE8 0007E8C8 80 05 01 04 */ lwz r0, 0x104(r5) -/* 80081CEC 0007E8CC C0 22 89 C8 */ lfs f1, lbl_804D83A8@sda21(r2) +/* 80081CEC 0007E8CC C0 22 89 C8 */ lfs f1, lbl_804D83A8(r2) /* 80081CF0 0007E8D0 C0 04 00 38 */ lfs f0, 0x38(r4) /* 80081CF4 0007E8D4 2C 00 00 01 */ cmpwi r0, 1 /* 80081CF8 0007E8D8 EC 01 00 32 */ fmuls f0, f1, f0 @@ -127,9 +142,15 @@ /* 80081D00 0007E8E0 D0 05 01 28 */ stfs f0, 0x128(r5) /* 80081D04 0007E8E4 D0 05 01 2C */ stfs f0, 0x12c(r5) /* 80081D08 0007E8E8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80081D0C -func_80081D0C: +extern unk_t func_80081A00(); + +#pragma push +asm BOOL func_80081D0C(HSD_GObj fighterObj) +{ // clang-format off + nofralloc /* 80081D0C 0007E8EC 7C 08 02 A6 */ mflr r0 /* 80081D10 0007E8F0 90 01 00 04 */ stw r0, 4(r1) /* 80081D14 0007E8F4 94 21 FF E0 */ stwu r1, -0x20(r1) @@ -183,9 +204,13 @@ /* 80081DC8 0007E9A8 38 21 00 20 */ addi r1, r1, 0x20 /* 80081DCC 0007E9AC 7C 08 03 A6 */ mtlr r0 /* 80081DD0 0007E9B0 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80081DD4 -func_80081DD4: +#pragma push +asm unk_t func_80081DD4() +{ // clang-format off + nofralloc /* 80081DD4 0007E9B4 7C 08 02 A6 */ mflr r0 /* 80081DD8 0007E9B8 90 01 00 04 */ stw r0, 4(r1) /* 80081DDC 0007E9BC 94 21 FF E0 */ stwu r1, -0x20(r1) @@ -229,7 +254,7 @@ /* 80081E6C 0007EA4C 48 00 00 5C */ b lbl_80081EC8 lbl_80081E70: /* 80081E70 0007EA50 80 9F 01 0C */ lwz r4, 0x10c(r31) -/* 80081E74 0007EA54 80 6D AE B4 */ lwz r3, p_ftCommonData@sda21(r13) +/* 80081E74 0007EA54 80 6D AE B4 */ lwz r3, p_ftCommonData(r13) /* 80081E78 0007EA58 83 84 00 44 */ lwz r28, 0x44(r4) /* 80081E7C 0007EA5C 80 1E 01 04 */ lwz r0, 0x104(r30) /* 80081E80 0007EA60 C0 3C 00 18 */ lfs f1, 0x18(r28) @@ -280,9 +305,13 @@ /* 80081F20 0007EB00 38 21 00 20 */ addi r1, r1, 0x20 /* 80081F24 0007EB04 7C 08 03 A6 */ mtlr r0 /* 80081F28 0007EB08 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80081F2C -func_80081F2C: +#pragma push +asm unk_t func_80081F2C() +{ // clang-format off + nofralloc /* 80081F2C 0007EB0C 7C 08 02 A6 */ mflr r0 /* 80081F30 0007EB10 90 01 00 04 */ stw r0, 4(r1) /* 80081F34 0007EB14 94 21 FF E0 */ stwu r1, -0x20(r1) @@ -326,7 +355,7 @@ /* 80081FC4 0007EBA4 48 00 00 5C */ b lbl_80082020 lbl_80081FC8: /* 80081FC8 0007EBA8 80 9F 01 0C */ lwz r4, 0x10c(r31) -/* 80081FCC 0007EBAC 80 6D AE B4 */ lwz r3, p_ftCommonData@sda21(r13) +/* 80081FCC 0007EBAC 80 6D AE B4 */ lwz r3, p_ftCommonData(r13) /* 80081FD0 0007EBB0 83 84 00 44 */ lwz r28, 0x44(r4) /* 80081FD4 0007EBB4 80 1E 01 04 */ lwz r0, 0x104(r30) /* 80081FD8 0007EBB8 C0 3C 00 18 */ lfs f1, 0x18(r28) @@ -377,9 +406,13 @@ /* 80082078 0007EC58 38 21 00 20 */ addi r1, r1, 0x20 /* 8008207C 0007EC5C 7C 08 03 A6 */ mtlr r0 /* 80082080 0007EC60 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082084 -func_80082084: +#pragma push +asm unk_t func_80082084() +{ // clang-format off + nofralloc /* 80082084 0007EC64 7C 08 02 A6 */ mflr r0 /* 80082088 0007EC68 90 01 00 04 */ stw r0, 4(r1) /* 8008208C 0007EC6C 94 21 FF E0 */ stwu r1, -0x20(r1) @@ -423,7 +456,7 @@ /* 8008211C 0007ECFC 48 00 00 5C */ b lbl_80082178 lbl_80082120: /* 80082120 0007ED00 80 9F 01 0C */ lwz r4, 0x10c(r31) -/* 80082124 0007ED04 80 6D AE B4 */ lwz r3, p_ftCommonData@sda21(r13) +/* 80082124 0007ED04 80 6D AE B4 */ lwz r3, p_ftCommonData(r13) /* 80082128 0007ED08 83 84 00 44 */ lwz r28, 0x44(r4) /* 8008212C 0007ED0C 80 1E 01 04 */ lwz r0, 0x104(r30) /* 80082130 0007ED10 C0 3C 00 18 */ lfs f1, 0x18(r28) @@ -474,9 +507,13 @@ /* 800821D0 0007EDB0 38 21 00 20 */ addi r1, r1, 0x20 /* 800821D4 0007EDB4 7C 08 03 A6 */ mtlr r0 /* 800821D8 0007EDB8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800821DC -func_800821DC: +#pragma push +asm BOOL func_800821DC() +{ // clang-format off + nofralloc /* 800821DC 0007EDBC 7C 08 02 A6 */ mflr r0 /* 800821E0 0007EDC0 90 01 00 04 */ stw r0, 4(r1) /* 800821E4 0007EDC4 94 21 FF E0 */ stwu r1, -0x20(r1) @@ -530,9 +567,13 @@ /* 80082298 0007EE78 38 21 00 20 */ addi r1, r1, 0x20 /* 8008229C 0007EE7C 7C 08 03 A6 */ mtlr r0 /* 800822A0 0007EE80 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global EnvColl_CheckGroundAndLedge -EnvColl_CheckGroundAndLedge: +#pragma push +asm BOOL EnvColl_CheckGroundAndLedge(HSD_GObj* fighter_gobj, s32 direction) +{ // clang-format off + nofralloc /* 800822A4 0007EE84 7C 08 02 A6 */ mflr r0 /* 800822A8 0007EE88 90 01 00 04 */ stw r0, 4(r1) /* 800822AC 0007EE8C 94 21 FF D8 */ stwu r1, -0x28(r1) @@ -601,9 +642,15 @@ /* 80082390 0007EF70 38 21 00 28 */ addi r1, r1, 0x28 /* 80082394 0007EF74 7C 08 03 A6 */ mtlr r0 /* 80082398 0007EF78 4E 80 00 20 */ blr +} // clang-format on +#pragma pop + +unk_t func_80082838(); -.global func_8008239C -func_8008239C: +#pragma push +asm BOOL func_8008239C(HSD_GObj* fighter_gobj, s32 facing_direction, f32* height_attributes) +{ // clang-format off + nofralloc /* 8008239C 0007EF7C 7C 08 02 A6 */ mflr r0 /* 800823A0 0007EF80 90 01 00 04 */ stw r0, 4(r1) /* 800823A4 0007EF84 94 21 FF B8 */ stwu r1, -0x48(r1) @@ -675,9 +722,13 @@ /* 80082494 0007F074 38 21 00 48 */ addi r1, r1, 0x48 /* 80082498 0007F078 7C 08 03 A6 */ mtlr r0 /* 8008249C 0007F07C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800824A0 -func_800824A0: +#pragma push +asm unk_t func_800824A0() +{ // clang-format off + nofralloc /* 800824A0 0007F080 7C 08 02 A6 */ mflr r0 /* 800824A4 0007F084 90 01 00 04 */ stw r0, 4(r1) /* 800824A8 0007F088 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -735,9 +786,13 @@ /* 8008256C 0007F14C 38 21 00 40 */ addi r1, r1, 0x40 /* 80082570 0007F150 7C 08 03 A6 */ mtlr r0 /* 80082574 0007F154 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082578 -func_80082578: +#pragma push +asm unk_t func_80082578() +{ // clang-format off + nofralloc /* 80082578 0007F158 7C 08 02 A6 */ mflr r0 /* 8008257C 0007F15C 90 01 00 04 */ stw r0, 4(r1) /* 80082580 0007F160 94 21 FF D8 */ stwu r1, -0x28(r1) @@ -789,9 +844,13 @@ /* 8008262C 0007F20C 38 21 00 28 */ addi r1, r1, 0x28 /* 80082630 0007F210 7C 08 03 A6 */ mtlr r0 /* 80082634 0007F214 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082638 -func_80082638: +#pragma push +asm unk_t func_80082638() +{ // clang-format off + nofralloc /* 80082638 0007F218 7C 08 02 A6 */ mflr r0 /* 8008263C 0007F21C 90 01 00 04 */ stw r0, 4(r1) /* 80082640 0007F220 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -847,9 +906,13 @@ /* 800826FC 0007F2DC 38 21 00 40 */ addi r1, r1, 0x40 /* 80082700 0007F2E0 7C 08 03 A6 */ mtlr r0 /* 80082704 0007F2E4 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082708 -func_80082708: +#pragma push +asm BOOL func_80082708(HSD_GObj* fighter_gobj) +{ // clang-format off + nofralloc /* 80082708 0007F2E8 7C 08 02 A6 */ mflr r0 /* 8008270C 0007F2EC 90 01 00 04 */ stw r0, 4(r1) /* 80082710 0007F2F0 94 21 FF E8 */ stwu r1, -0x18(r1) @@ -890,9 +953,13 @@ /* 80082794 0007F374 38 21 00 18 */ addi r1, r1, 0x18 /* 80082798 0007F378 7C 08 03 A6 */ mtlr r0 /* 8008279C 0007F37C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800827A0 -func_800827A0: +#pragma push +asm BOOL func_800827A0(HSD_GObj* fighter_gobj) +{ // clang-format off + nofralloc /* 800827A0 0007F380 7C 08 02 A6 */ mflr r0 /* 800827A4 0007F384 90 01 00 04 */ stw r0, 4(r1) /* 800827A8 0007F388 94 21 FF E8 */ stwu r1, -0x18(r1) @@ -933,10 +1000,14 @@ /* 8008282C 0007F40C 38 21 00 18 */ addi r1, r1, 0x18 /* 80082830 0007F410 7C 08 03 A6 */ mtlr r0 /* 80082834 0007F414 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082838 -func_80082838: -/* 80082838 0007F418 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +#pragma push +static asm unk_t func_80082838() +{ // clang-format off + nofralloc +/* 80082838 0007F418 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 8008283C 0007F41C FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80082840 0007F420 40 80 00 40 */ bge lbl_80082880 /* 80082844 0007F424 C0 04 00 00 */ lfs f0, 0(r4) @@ -957,9 +1028,13 @@ lbl_80082880: /* 80082880 0007F460 7C 83 23 78 */ mr r3, r4 /* 80082884 0007F464 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082888 -func_80082888: +#pragma push +asm unk_t func_80082888() +{ // clang-format off + nofralloc /* 80082888 0007F468 7C 08 02 A6 */ mflr r0 /* 8008288C 0007F46C 90 01 00 04 */ stw r0, 4(r1) /* 80082890 0007F470 94 21 FF C8 */ stwu r1, -0x38(r1) @@ -980,7 +1055,7 @@ /* 800828CC 0007F4AC 80 1F 00 B8 */ lwz r0, 0xb8(r31) /* 800828D0 0007F4B0 90 1F 06 FC */ stw r0, 0x6fc(r31) /* 800828D4 0007F4B4 C0 3F 00 2C */ lfs f1, 0x2c(r31) -/* 800828D8 0007F4B8 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 800828D8 0007F4B8 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 800828DC 0007F4BC FC 01 00 40 */ fcmpo cr0, f1, f0 /* 800828E0 0007F4C0 40 80 00 44 */ bge lbl_80082924 /* 800828E4 0007F4C4 C0 04 00 00 */ lfs f0, 0(r4) @@ -1024,9 +1099,13 @@ /* 8008296C 0007F54C 38 21 00 38 */ addi r1, r1, 0x38 /* 80082970 0007F550 7C 08 03 A6 */ mtlr r0 /* 80082974 0007F554 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082978 -func_80082978: +#pragma push +asm unk_t func_80082978() +{ // clang-format off + nofralloc /* 80082978 0007F558 7C 08 02 A6 */ mflr r0 /* 8008297C 0007F55C 90 01 00 04 */ stw r0, 4(r1) /* 80082980 0007F560 94 21 FF C8 */ stwu r1, -0x38(r1) @@ -1047,7 +1126,7 @@ /* 800829BC 0007F59C 80 1F 00 B8 */ lwz r0, 0xb8(r31) /* 800829C0 0007F5A0 90 1F 06 FC */ stw r0, 0x6fc(r31) /* 800829C4 0007F5A4 C0 3F 00 2C */ lfs f1, 0x2c(r31) -/* 800829C8 0007F5A8 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 800829C8 0007F5A8 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 800829CC 0007F5AC FC 01 00 40 */ fcmpo cr0, f1, f0 /* 800829D0 0007F5B0 40 80 00 44 */ bge lbl_80082A14 /* 800829D4 0007F5B4 C0 04 00 00 */ lfs f0, 0(r4) @@ -1091,9 +1170,13 @@ /* 80082A5C 0007F63C 38 21 00 38 */ addi r1, r1, 0x38 /* 80082A60 0007F640 7C 08 03 A6 */ mtlr r0 /* 80082A64 0007F644 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082A68 -func_80082A68: +#pragma push +asm BOOL func_80082A68(HSD_GObj* fighter_gobj) +{ // clang-format off + nofralloc /* 80082A68 0007F648 7C 08 02 A6 */ mflr r0 /* 80082A6C 0007F64C 90 01 00 04 */ stw r0, 4(r1) /* 80082A70 0007F650 94 21 FF E8 */ stwu r1, -0x18(r1) @@ -1115,7 +1198,7 @@ /* 80082AB0 0007F690 80 1F 06 FC */ lwz r0, 0x6fc(r31) /* 80082AB4 0007F694 90 1F 07 14 */ stw r0, 0x714(r31) /* 80082AB8 0007F698 C0 1F 07 10 */ lfs f0, 0x710(r31) -/* 80082ABC 0007F69C C0 22 89 C8 */ lfs f1, lbl_804D83A8@sda21(r2) +/* 80082ABC 0007F69C C0 22 89 C8 */ lfs f1, lbl_804D83A8(r2) /* 80082AC0 0007F6A0 EC 00 08 2A */ fadds f0, f0, f1 /* 80082AC4 0007F6A4 D0 1F 07 10 */ stfs f0, 0x710(r31) /* 80082AC8 0007F6A8 C0 1F 06 F8 */ lfs f0, 0x6f8(r31) @@ -1141,9 +1224,13 @@ /* 80082B10 0007F6F0 38 21 00 18 */ addi r1, r1, 0x18 /* 80082B14 0007F6F4 7C 08 03 A6 */ mtlr r0 /* 80082B18 0007F6F8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082B1C -func_80082B1C: +#pragma push +asm void func_80082B1C(HSD_GObj* fighter_gobj) +{ // clang-format off + nofralloc /* 80082B1C 0007F6FC 7C 08 02 A6 */ mflr r0 /* 80082B20 0007F700 90 01 00 04 */ stw r0, 4(r1) /* 80082B24 0007F704 94 21 FF E8 */ stwu r1, -0x18(r1) @@ -1169,9 +1256,13 @@ /* 80082B6C 0007F74C 38 21 00 18 */ addi r1, r1, 0x18 /* 80082B70 0007F750 7C 08 03 A6 */ mtlr r0 /* 80082B74 0007F754 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082B78 -func_80082B78: +#pragma push +asm unk_t func_80082B78() +{ // clang-format off + nofralloc /* 80082B78 0007F758 7C 08 02 A6 */ mflr r0 /* 80082B7C 0007F75C 90 01 00 04 */ stw r0, 4(r1) /* 80082B80 0007F760 94 21 FF D0 */ stwu r1, -0x30(r1) @@ -1240,9 +1331,13 @@ /* 80082C68 0007F848 38 21 00 30 */ addi r1, r1, 0x30 /* 80082C6C 0007F84C 7C 08 03 A6 */ mtlr r0 /* 80082C70 0007F850 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082C74 -func_80082C74: +#pragma push +asm unk_t func_80082C74() +{ // clang-format off + nofralloc /* 80082C74 0007F854 7C 08 02 A6 */ mflr r0 /* 80082C78 0007F858 90 01 00 04 */ stw r0, 4(r1) /* 80082C7C 0007F85C 94 21 FF C8 */ stwu r1, -0x38(r1) @@ -1298,9 +1393,13 @@ /* 80082D34 0007F914 38 21 00 38 */ addi r1, r1, 0x38 /* 80082D38 0007F918 7C 08 03 A6 */ mtlr r0 /* 80082D3C 0007F91C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082D40 -func_80082D40: +#pragma push +asm unk_t func_80082D40() +{ // clang-format off + nofralloc /* 80082D40 0007F920 7C 08 02 A6 */ mflr r0 /* 80082D44 0007F924 90 01 00 04 */ stw r0, 4(r1) /* 80082D48 0007F928 94 21 FF D0 */ stwu r1, -0x30(r1) @@ -1369,9 +1468,13 @@ /* 80082E30 0007FA10 38 21 00 30 */ addi r1, r1, 0x30 /* 80082E34 0007FA14 7C 08 03 A6 */ mtlr r0 /* 80082E38 0007FA18 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082E3C -func_80082E3C: +#pragma push +asm HSD_GObj* func_80082E3C(HSD_GObj* fighter_gobj) +{ // clang-format off + nofralloc /* 80082E3C 0007FA1C 7C 08 02 A6 */ mflr r0 /* 80082E40 0007FA20 90 01 00 04 */ stw r0, 4(r1) /* 80082E44 0007FA24 94 21 FF C8 */ stwu r1, -0x38(r1) @@ -1381,10 +1484,10 @@ /* 80082E54 0007FA34 93 A1 00 24 */ stw r29, 0x24(r1) /* 80082E58 0007FA38 93 81 00 20 */ stw r28, 0x20(r1) /* 80082E5C 0007FA3C 7C 7C 1B 78 */ mr r28, r3 -/* 80082E60 0007FA40 80 8D C1 8C */ lwz r4, lbl_804D782C@sda21(r13) +/* 80082E60 0007FA40 80 8D C1 8C */ lwz r4, lbl_804D782C(r13) /* 80082E64 0007FA44 83 C3 00 2C */ lwz r30, 0x2c(r3) /* 80082E68 0007FA48 83 A4 00 20 */ lwz r29, 0x20(r4) -/* 80082E6C 0007FA4C C3 E2 89 CC */ lfs f31, lbl_804D83AC@sda21(r2) +/* 80082E6C 0007FA4C C3 E2 89 CC */ lfs f31, lbl_804D83AC(r2) /* 80082E70 0007FA50 48 00 00 88 */ b lbl_80082EF8 lbl_80082E74: /* 80082E74 0007FA54 7C 1D E0 40 */ cmplw r29, r28 @@ -1436,9 +1539,13 @@ /* 80082F1C 0007FAFC 38 21 00 38 */ addi r1, r1, 0x38 /* 80082F20 0007FB00 7C 08 03 A6 */ mtlr r0 /* 80082F24 0007FB04 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80082F28 -func_80082F28: +#pragma push +asm unk_t func_80082F28() +{ // clang-format off + nofralloc /* 80082F28 0007FB08 7C 08 02 A6 */ mflr r0 /* 80082F2C 0007FB0C 90 01 00 04 */ stw r0, 4(r1) /* 80082F30 0007FB10 94 21 FF C8 */ stwu r1, -0x38(r1) @@ -1448,7 +1555,7 @@ /* 80082F40 0007FB20 7C 7D 1B 78 */ mr r29, r3 /* 80082F44 0007FB24 93 81 00 28 */ stw r28, 0x28(r1) /* 80082F48 0007FB28 83 C3 00 2C */ lwz r30, 0x2c(r3) -/* 80082F4C 0007FB2C C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 80082F4C 0007FB2C C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 80082F50 0007FB30 C0 3E 00 2C */ lfs f1, 0x2c(r30) /* 80082F54 0007FB34 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80082F58 0007FB38 40 80 00 0C */ bge lbl_80082F64 @@ -1540,9 +1647,13 @@ /* 80083084 0007FC64 38 21 00 38 */ addi r1, r1, 0x38 /* 80083088 0007FC68 7C 08 03 A6 */ mtlr r0 /* 8008308C 0007FC6C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083090 -func_80083090: +#pragma push +asm unk_t func_80083090() +{ // clang-format off + nofralloc /* 80083090 0007FC70 7C 08 02 A6 */ mflr r0 /* 80083094 0007FC74 90 01 00 04 */ stw r0, 4(r1) /* 80083098 0007FC78 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -1551,7 +1662,7 @@ /* 800830A4 0007FC84 3B 64 00 00 */ addi r27, r4, 0 /* 800830A8 0007FC88 3B A5 00 00 */ addi r29, r5, 0 /* 800830AC 0007FC8C 83 C3 00 2C */ lwz r30, 0x2c(r3) -/* 800830B0 0007FC90 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 800830B0 0007FC90 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 800830B4 0007FC94 C0 3E 00 2C */ lfs f1, 0x2c(r30) /* 800830B8 0007FC98 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 800830BC 0007FC9C 40 80 00 0C */ bge lbl_800830C8 @@ -1632,9 +1743,13 @@ /* 800831C0 0007FDA0 38 21 00 40 */ addi r1, r1, 0x40 /* 800831C4 0007FDA4 7C 08 03 A6 */ mtlr r0 /* 800831C8 0007FDA8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800831CC -func_800831CC: +#pragma push +asm void func_800831CC(HSD_GObj*, s32 (*)(HSD_GObj*), void (*)(HSD_GObj*)) +{ // clang-format off + nofralloc /* 800831CC 0007FDAC 7C 08 02 A6 */ mflr r0 /* 800831D0 0007FDB0 90 01 00 04 */ stw r0, 4(r1) /* 800831D4 0007FDB4 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -1643,7 +1758,7 @@ /* 800831E0 0007FDC0 3B 64 00 00 */ addi r27, r4, 0 /* 800831E4 0007FDC4 3B A5 00 00 */ addi r29, r5, 0 /* 800831E8 0007FDC8 83 C3 00 2C */ lwz r30, 0x2c(r3) -/* 800831EC 0007FDCC C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 800831EC 0007FDCC C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 800831F0 0007FDD0 C0 3E 00 2C */ lfs f1, 0x2c(r30) /* 800831F4 0007FDD4 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 800831F8 0007FDD8 40 80 00 0C */ bge lbl_80083204 @@ -1728,9 +1843,13 @@ /* 8008330C 0007FEEC 38 21 00 40 */ addi r1, r1, 0x40 /* 80083310 0007FEF0 7C 08 03 A6 */ mtlr r0 /* 80083314 0007FEF4 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083318 -func_80083318: +#pragma push +asm unk_t func_80083318() +{ // clang-format off + nofralloc /* 80083318 0007FEF8 7C 08 02 A6 */ mflr r0 /* 8008331C 0007FEFC 90 01 00 04 */ stw r0, 4(r1) /* 80083320 0007FF00 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -1739,7 +1858,7 @@ /* 8008332C 0007FF0C 3B 64 00 00 */ addi r27, r4, 0 /* 80083330 0007FF10 3B A5 00 00 */ addi r29, r5, 0 /* 80083334 0007FF14 83 C3 00 2C */ lwz r30, 0x2c(r3) -/* 80083338 0007FF18 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 80083338 0007FF18 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 8008333C 0007FF1C C0 3E 00 2C */ lfs f1, 0x2c(r30) /* 80083340 0007FF20 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80083344 0007FF24 40 80 00 0C */ bge lbl_80083350 @@ -1824,9 +1943,13 @@ /* 80083458 00080038 38 21 00 40 */ addi r1, r1, 0x40 /* 8008345C 0008003C 7C 08 03 A6 */ mtlr r0 /* 80083460 00080040 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083464 -func_80083464: +#pragma push +asm unk_t func_80083464() +{ // clang-format off + nofralloc /* 80083464 00080044 7C 08 02 A6 */ mflr r0 /* 80083468 00080048 90 01 00 04 */ stw r0, 4(r1) /* 8008346C 0008004C 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -1835,7 +1958,7 @@ /* 80083478 00080058 3B 64 00 00 */ addi r27, r4, 0 /* 8008347C 0008005C 3B A5 00 00 */ addi r29, r5, 0 /* 80083480 00080060 83 C3 00 2C */ lwz r30, 0x2c(r3) -/* 80083484 00080064 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 80083484 00080064 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 80083488 00080068 C0 3E 00 2C */ lfs f1, 0x2c(r30) /* 8008348C 0008006C FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80083490 00080070 40 80 00 0C */ bge lbl_8008349C @@ -1920,9 +2043,13 @@ /* 800835A4 00080184 38 21 00 40 */ addi r1, r1, 0x40 /* 800835A8 00080188 7C 08 03 A6 */ mtlr r0 /* 800835AC 0008018C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800835B0 -func_800835B0: +#pragma push +asm unk_t func_800835B0() +{ // clang-format off + nofralloc /* 800835B0 00080190 7C 08 02 A6 */ mflr r0 /* 800835B4 00080194 90 01 00 04 */ stw r0, 4(r1) /* 800835B8 00080198 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -1931,7 +2058,7 @@ /* 800835C4 000801A4 3B 64 00 00 */ addi r27, r4, 0 /* 800835C8 000801A8 3B A5 00 00 */ addi r29, r5, 0 /* 800835CC 000801AC 83 C3 00 2C */ lwz r30, 0x2c(r3) -/* 800835D0 000801B0 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 800835D0 000801B0 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 800835D4 000801B4 C0 3E 00 2C */ lfs f1, 0x2c(r30) /* 800835D8 000801B8 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 800835DC 000801BC 40 80 00 0C */ bge lbl_800835E8 @@ -2020,9 +2147,13 @@ /* 80083700 000802E0 38 21 00 40 */ addi r1, r1, 0x40 /* 80083704 000802E4 7C 08 03 A6 */ mtlr r0 /* 80083708 000802E8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_8008370C -func_8008370C: +#pragma push +asm unk_t func_8008370C() +{ // clang-format off + nofralloc /* 8008370C 000802EC 7C 08 02 A6 */ mflr r0 /* 80083710 000802F0 90 01 00 04 */ stw r0, 4(r1) /* 80083714 000802F4 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -2030,7 +2161,7 @@ /* 8008371C 000802FC 7C 7C 1B 78 */ mr r28, r3 /* 80083720 00080300 7C 9D 23 78 */ mr r29, r4 /* 80083724 00080304 83 C3 00 2C */ lwz r30, 0x2c(r3) -/* 80083728 00080308 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 80083728 00080308 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 8008372C 0008030C C0 3E 00 2C */ lfs f1, 0x2c(r30) /* 80083730 00080310 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80083734 00080314 40 80 00 0C */ bge lbl_80083740 @@ -2111,9 +2242,13 @@ /* 80083838 00080418 38 21 00 40 */ addi r1, r1, 0x40 /* 8008383C 0008041C 7C 08 03 A6 */ mtlr r0 /* 80083840 00080420 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083844 -func_80083844: +#pragma push +asm unk_t func_80083844() +{ // clang-format off + nofralloc /* 80083844 00080424 7C 08 02 A6 */ mflr r0 /* 80083848 00080428 90 01 00 04 */ stw r0, 4(r1) /* 8008384C 0008042C 94 21 FF C8 */ stwu r1, -0x38(r1) @@ -2169,9 +2304,13 @@ /* 80083904 000804E4 38 21 00 38 */ addi r1, r1, 0x38 /* 80083908 000804E8 7C 08 03 A6 */ mtlr r0 /* 8008390C 000804EC 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083910 -func_80083910: +#pragma push +asm unk_t func_80083910() +{ // clang-format off + nofralloc /* 80083910 000804F0 7C 08 02 A6 */ mflr r0 /* 80083914 000804F4 90 01 00 04 */ stw r0, 4(r1) /* 80083918 000804F8 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -2179,7 +2318,7 @@ /* 80083920 00080500 7C 7C 1B 78 */ mr r28, r3 /* 80083924 00080504 7C 9D 23 78 */ mr r29, r4 /* 80083928 00080508 83 C3 00 2C */ lwz r30, 0x2c(r3) -/* 8008392C 0008050C C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 8008392C 0008050C C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 80083930 00080510 C0 3E 00 2C */ lfs f1, 0x2c(r30) /* 80083934 00080514 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80083938 00080518 40 80 00 0C */ bge lbl_80083944 @@ -2260,9 +2399,13 @@ /* 80083A3C 0008061C 38 21 00 40 */ addi r1, r1, 0x40 /* 80083A40 00080620 7C 08 03 A6 */ mtlr r0 /* 80083A44 00080624 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083A48 -func_80083A48: +#pragma push +asm unk_t func_80083A48() +{ // clang-format off + nofralloc /* 80083A48 00080628 7C 08 02 A6 */ mflr r0 /* 80083A4C 0008062C 90 01 00 04 */ stw r0, 4(r1) /* 80083A50 00080630 94 21 FF C8 */ stwu r1, -0x38(r1) @@ -2343,9 +2486,13 @@ /* 80083B5C 0008073C 38 21 00 38 */ addi r1, r1, 0x38 /* 80083B60 00080740 7C 08 03 A6 */ mtlr r0 /* 80083B64 00080744 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083B68 -func_80083B68: +#pragma push +asm void func_80083B68(HSD_GObj* fighter_gobj) +{ // clang-format off + nofralloc /* 80083B68 00080748 7C 08 02 A6 */ mflr r0 /* 80083B6C 0008074C 90 01 00 04 */ stw r0, 4(r1) /* 80083B70 00080750 94 21 FF D0 */ stwu r1, -0x30(r1) @@ -2384,9 +2531,13 @@ /* 80083BF4 000807D4 38 21 00 30 */ addi r1, r1, 0x30 /* 80083BF8 000807D8 7C 08 03 A6 */ mtlr r0 /* 80083BFC 000807DC 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083C00 -func_80083C00: +#pragma push +asm unk_t func_80083C00() +{ // clang-format off + nofralloc /* 80083C00 000807E0 7C 08 02 A6 */ mflr r0 /* 80083C04 000807E4 90 01 00 04 */ stw r0, 4(r1) /* 80083C08 000807E8 94 21 FF C8 */ stwu r1, -0x38(r1) @@ -2448,9 +2599,13 @@ /* 80083CD8 000808B8 38 21 00 38 */ addi r1, r1, 0x38 /* 80083CDC 000808BC 7C 08 03 A6 */ mtlr r0 /* 80083CE0 000808C0 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083CE4 -func_80083CE4: +#pragma push +asm unk_t func_80083CE4() +{ // clang-format off + nofralloc /* 80083CE4 000808C4 7C 08 02 A6 */ mflr r0 /* 80083CE8 000808C8 90 01 00 04 */ stw r0, 4(r1) /* 80083CEC 000808CC 94 21 FF C8 */ stwu r1, -0x38(r1) @@ -2513,9 +2668,13 @@ /* 80083DC0 000809A0 38 21 00 38 */ addi r1, r1, 0x38 /* 80083DC4 000809A4 7C 08 03 A6 */ mtlr r0 /* 80083DC8 000809A8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083DCC -func_80083DCC: +#pragma push +asm unk_t func_80083DCC() +{ // clang-format off + nofralloc /* 80083DCC 000809AC 7C 08 02 A6 */ mflr r0 /* 80083DD0 000809B0 90 01 00 04 */ stw r0, 4(r1) /* 80083DD4 000809B4 94 21 FF D0 */ stwu r1, -0x30(r1) @@ -2554,9 +2713,13 @@ /* 80083E58 00080A38 38 21 00 30 */ addi r1, r1, 0x30 /* 80083E5C 00080A3C 7C 08 03 A6 */ mtlr r0 /* 80083E60 00080A40 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083E64 -func_80083E64: +#pragma push +asm unk_t func_80083E64() +{ // clang-format off + nofralloc /* 80083E64 00080A44 7C 08 02 A6 */ mflr r0 /* 80083E68 00080A48 90 01 00 04 */ stw r0, 4(r1) /* 80083E6C 00080A4C 94 21 FF A8 */ stwu r1, -0x58(r1) @@ -2578,7 +2741,7 @@ /* 80083EAC 00080A8C 80 1B 00 B8 */ lwz r0, 0xb8(r27) /* 80083EB0 00080A90 90 1B 06 FC */ stw r0, 0x6fc(r27) /* 80083EB4 00080A94 C0 3B 00 2C */ lfs f1, 0x2c(r27) -/* 80083EB8 00080A98 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 80083EB8 00080A98 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 80083EBC 00080A9C FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80083EC0 00080AA0 40 80 00 44 */ bge lbl_80083F04 /* 80083EC4 00080AA4 C0 04 00 00 */ lfs f0, 0(r4) @@ -2636,9 +2799,13 @@ /* 80083F7C 00080B5C 38 21 00 58 */ addi r1, r1, 0x58 /* 80083F80 00080B60 7C 08 03 A6 */ mtlr r0 /* 80083F84 00080B64 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80083F88 -func_80083F88: +#pragma push +asm void func_80083F88(HSD_GObj* fighter_gobj) +{ // clang-format off + nofralloc /* 80083F88 00080B68 7C 08 02 A6 */ mflr r0 /* 80083F8C 00080B6C 90 01 00 04 */ stw r0, 4(r1) /* 80083F90 00080B70 94 21 FF D8 */ stwu r1, -0x28(r1) @@ -2687,9 +2854,13 @@ /* 80084030 00080C10 38 21 00 28 */ addi r1, r1, 0x28 /* 80084034 00080C14 7C 08 03 A6 */ mtlr r0 /* 80084038 00080C18 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_8008403C -func_8008403C: +#pragma push +asm unk_t func_8008403C() +{ // clang-format off + nofralloc /* 8008403C 00080C1C 7C 08 02 A6 */ mflr r0 /* 80084040 00080C20 90 01 00 04 */ stw r0, 4(r1) /* 80084044 00080C24 94 21 FF D0 */ stwu r1, -0x30(r1) @@ -2743,9 +2914,13 @@ /* 800840F8 00080CD8 38 21 00 30 */ addi r1, r1, 0x30 /* 800840FC 00080CDC 7C 08 03 A6 */ mtlr r0 /* 80084100 00080CE0 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084104 -func_80084104: +#pragma push +asm void func_80084104(HSD_GObj* fighter_gobj) +{ // clang-format off + nofralloc /* 80084104 00080CE4 7C 08 02 A6 */ mflr r0 /* 80084108 00080CE8 90 01 00 04 */ stw r0, 4(r1) /* 8008410C 00080CEC 94 21 FF D8 */ stwu r1, -0x28(r1) @@ -2794,9 +2969,13 @@ /* 800841AC 00080D8C 38 21 00 28 */ addi r1, r1, 0x28 /* 800841B0 00080D90 7C 08 03 A6 */ mtlr r0 /* 800841B4 00080D94 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800841B8 -func_800841B8: +#pragma push +asm unk_t func_800841B8() +{ // clang-format off + nofralloc /* 800841B8 00080D98 7C 08 02 A6 */ mflr r0 /* 800841BC 00080D9C 90 01 00 04 */ stw r0, 4(r1) /* 800841C0 00080DA0 94 21 FF D0 */ stwu r1, -0x30(r1) @@ -2850,9 +3029,13 @@ /* 80084274 00080E54 38 21 00 30 */ addi r1, r1, 0x30 /* 80084278 00080E58 7C 08 03 A6 */ mtlr r0 /* 8008427C 00080E5C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084280 -func_80084280: +#pragma push +asm unk_t func_80084280() +{ // clang-format off + nofralloc /* 80084280 00080E60 7C 08 02 A6 */ mflr r0 /* 80084284 00080E64 90 01 00 04 */ stw r0, 4(r1) /* 80084288 00080E68 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -2861,7 +3044,7 @@ /* 80084294 00080E74 7C 7E 1B 78 */ mr r30, r3 /* 80084298 00080E78 93 A1 00 34 */ stw r29, 0x34(r1) /* 8008429C 00080E7C 83 E3 00 2C */ lwz r31, 0x2c(r3) -/* 800842A0 00080E80 C0 22 89 CC */ lfs f1, lbl_804D83AC@sda21(r2) +/* 800842A0 00080E80 C0 22 89 CC */ lfs f1, lbl_804D83AC(r2) /* 800842A4 00080E84 C0 5F 00 F8 */ lfs f2, 0xf8(r31) /* 800842A8 00080E88 FC 02 08 00 */ fcmpu cr0, f2, f1 /* 800842AC 00080E8C 41 82 00 80 */ beq lbl_8008432C @@ -2914,7 +3097,7 @@ /* 80084360 00080F40 C0 1F 06 20 */ lfs f0, 0x620(r31) /* 80084364 00080F44 D0 1F 07 50 */ stfs f0, 0x750(r31) /* 80084368 00080F48 C0 3F 00 2C */ lfs f1, 0x2c(r31) -/* 8008436C 00080F4C C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 8008436C 00080F4C C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 80084370 00080F50 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80084374 00080F54 40 80 00 0C */ bge lbl_80084380 /* 80084378 00080F58 38 80 FF FF */ li r4, -1 @@ -2955,9 +3138,13 @@ /* 800843F0 00080FD0 38 21 00 40 */ addi r1, r1, 0x40 /* 800843F4 00080FD4 7C 08 03 A6 */ mtlr r0 /* 800843F8 00080FD8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800843FC -func_800843FC: +#pragma push +asm unk_t func_800843FC() +{ // clang-format off + nofralloc /* 800843FC 00080FDC 7C 08 02 A6 */ mflr r0 /* 80084400 00080FE0 90 01 00 04 */ stw r0, 4(r1) /* 80084404 00080FE4 94 21 FF D0 */ stwu r1, -0x30(r1) @@ -2982,7 +3169,7 @@ /* 80084450 00081030 C0 1E 06 20 */ lfs f0, 0x620(r30) /* 80084454 00081034 D0 1E 07 50 */ stfs f0, 0x750(r30) /* 80084458 00081038 C0 3E 00 2C */ lfs f1, 0x2c(r30) -/* 8008445C 0008103C C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 8008445C 0008103C C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 80084460 00081040 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80084464 00081044 40 80 00 0C */ bge lbl_80084470 /* 80084468 00081048 38 80 FF FF */ li r4, -1 @@ -3023,9 +3210,13 @@ /* 800844E0 000810C0 38 21 00 30 */ addi r1, r1, 0x30 /* 800844E4 000810C4 7C 08 03 A6 */ mtlr r0 /* 800844E8 000810C8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800844EC -func_800844EC: +#pragma push +asm unk_t func_800844EC() +{ // clang-format off + nofralloc /* 800844EC 000810CC 7C 08 02 A6 */ mflr r0 /* 800844F0 000810D0 90 01 00 04 */ stw r0, 4(r1) /* 800844F4 000810D4 94 21 FF D8 */ stwu r1, -0x28(r1) @@ -3080,9 +3271,13 @@ /* 800845A8 00081188 38 21 00 28 */ addi r1, r1, 0x28 /* 800845AC 0008118C 7C 08 03 A6 */ mtlr r0 /* 800845B0 00081190 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800845B4 -func_800845B4: +#pragma push +asm unk_t func_800845B4() +{ // clang-format off + nofralloc /* 800845B4 00081194 7C 08 02 A6 */ mflr r0 /* 800845B8 00081198 90 01 00 04 */ stw r0, 4(r1) /* 800845BC 0008119C 94 21 FF D0 */ stwu r1, -0x30(r1) @@ -3122,7 +3317,7 @@ /* 8008463C 0008121C 2C 00 00 00 */ cmpwi r0, 0 /* 80084640 00081220 40 82 00 54 */ bne lbl_80084694 /* 80084644 00081224 80 7D 00 2C */ lwz r3, 0x2c(r29) -/* 80084648 00081228 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 80084648 00081228 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 8008464C 0008122C C0 23 00 2C */ lfs f1, 0x2c(r3) /* 80084650 00081230 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80084654 00081234 40 80 00 10 */ bge lbl_80084664 @@ -3131,7 +3326,7 @@ /* 80084660 00081240 40 82 00 20 */ bne lbl_80084680 lbl_80084664: /* 80084664 00081244 C0 23 00 2C */ lfs f1, 0x2c(r3) -/* 80084668 00081248 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 80084668 00081248 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 8008466C 0008124C FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80084670 00081250 40 81 00 1C */ ble lbl_8008468C /* 80084674 00081254 80 03 08 24 */ lwz r0, 0x824(r3) @@ -3152,9 +3347,13 @@ /* 800846A4 00081284 38 21 00 30 */ addi r1, r1, 0x30 /* 800846A8 00081288 7C 08 03 A6 */ mtlr r0 /* 800846AC 0008128C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800846B0 -func_800846B0: +#pragma push +asm unk_t func_800846B0() +{ // clang-format off + nofralloc /* 800846B0 00081290 7C 08 02 A6 */ mflr r0 /* 800846B4 00081294 90 01 00 04 */ stw r0, 4(r1) /* 800846B8 00081298 94 21 FF B0 */ stwu r1, -0x50(r1) @@ -3179,7 +3378,7 @@ /* 80084704 000812E4 80 1E 00 B8 */ lwz r0, 0xb8(r30) /* 80084708 000812E8 90 1E 06 FC */ stw r0, 0x6fc(r30) /* 8008470C 000812EC C0 3E 00 2C */ lfs f1, 0x2c(r30) -/* 80084710 000812F0 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 80084710 000812F0 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 80084714 000812F4 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80084718 000812F8 40 80 00 44 */ bge lbl_8008475C /* 8008471C 000812FC C0 04 00 00 */ lfs f0, 0(r4) @@ -3232,9 +3431,13 @@ /* 800847C4 000813A4 38 21 00 50 */ addi r1, r1, 0x50 /* 800847C8 000813A8 7C 08 03 A6 */ mtlr r0 /* 800847CC 000813AC 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800847D0 -func_800847D0: +#pragma push +asm unk_t func_800847D0() +{ // clang-format off + nofralloc /* 800847D0 000813B0 7C 08 02 A6 */ mflr r0 /* 800847D4 000813B4 90 01 00 04 */ stw r0, 4(r1) /* 800847D8 000813B8 94 21 FF B8 */ stwu r1, -0x48(r1) @@ -3257,7 +3460,7 @@ /* 8008481C 000813FC 80 1E 00 B8 */ lwz r0, 0xb8(r30) /* 80084820 00081400 90 1E 06 FC */ stw r0, 0x6fc(r30) /* 80084824 00081404 C0 3E 00 2C */ lfs f1, 0x2c(r30) -/* 80084828 00081408 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 80084828 00081408 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 8008482C 0008140C FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80084830 00081410 40 80 00 44 */ bge lbl_80084874 /* 80084834 00081414 C0 04 00 00 */ lfs f0, 0(r4) @@ -3307,9 +3510,13 @@ /* 800848D0 000814B0 38 21 00 48 */ addi r1, r1, 0x48 /* 800848D4 000814B4 7C 08 03 A6 */ mtlr r0 /* 800848D8 000814B8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800848DC -func_800848DC: +#pragma push +asm unk_t func_800848DC() +{ // clang-format off + nofralloc /* 800848DC 000814BC 7C 08 02 A6 */ mflr r0 /* 800848E0 000814C0 90 01 00 04 */ stw r0, 4(r1) /* 800848E4 000814C4 94 21 FF D0 */ stwu r1, -0x30(r1) @@ -3351,7 +3558,7 @@ /* 8008496C 0008154C 2C 00 00 00 */ cmpwi r0, 0 /* 80084970 00081550 40 82 00 5C */ bne lbl_800849CC /* 80084974 00081554 80 7E 00 2C */ lwz r3, 0x2c(r30) -/* 80084978 00081558 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 80084978 00081558 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 8008497C 0008155C C0 23 00 2C */ lfs f1, 0x2c(r3) /* 80084980 00081560 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80084984 00081564 40 80 00 10 */ bge lbl_80084994 @@ -3360,7 +3567,7 @@ /* 80084990 00081570 40 82 00 20 */ bne lbl_800849B0 lbl_80084994: /* 80084994 00081574 C0 23 00 2C */ lfs f1, 0x2c(r3) -/* 80084998 00081578 C0 02 89 CC */ lfs f0, lbl_804D83AC@sda21(r2) +/* 80084998 00081578 C0 02 89 CC */ lfs f0, lbl_804D83AC(r2) /* 8008499C 0008157C FC 01 00 40 */ fcmpo cr0, f1, f0 /* 800849A0 00081580 40 81 00 1C */ ble lbl_800849BC /* 800849A4 00081584 80 03 08 24 */ lwz r0, 0x824(r3) @@ -3384,9 +3591,13 @@ /* 800849E0 000815C0 38 21 00 30 */ addi r1, r1, 0x30 /* 800849E4 000815C4 7C 08 03 A6 */ mtlr r0 /* 800849E8 000815C8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800849EC -func_800849EC: +#pragma push +asm unk_t func_800849EC() +{ // clang-format off + nofralloc /* 800849EC 000815CC 7C 08 02 A6 */ mflr r0 /* 800849F0 000815D0 38 63 06 F0 */ addi r3, r3, 0x6f0 /* 800849F4 000815D4 90 01 00 04 */ stw r0, 4(r1) @@ -3398,9 +3609,13 @@ /* 80084A0C 000815EC 38 21 00 08 */ addi r1, r1, 8 /* 80084A10 000815F0 7C 08 03 A6 */ mtlr r0 /* 80084A14 000815F4 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084A18 -func_80084A18: +#pragma push +asm unk_t func_80084A18() +{ // clang-format off + nofralloc /* 80084A18 000815F8 7C 08 02 A6 */ mflr r0 /* 80084A1C 000815FC 90 01 00 04 */ stw r0, 4(r1) /* 80084A20 00081600 94 21 FF F8 */ stwu r1, -8(r1) @@ -3411,9 +3626,13 @@ /* 80084A34 00081614 38 21 00 08 */ addi r1, r1, 8 /* 80084A38 00081618 7C 08 03 A6 */ mtlr r0 /* 80084A3C 0008161C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084A40 -func_80084A40: +#pragma push +asm f32 Stage_GetGroundFrictionMultiplier(Fighter* fp) +{ // clang-format off + nofralloc /* 80084A40 00081620 7C 08 02 A6 */ mflr r0 /* 80084A44 00081624 90 01 00 04 */ stw r0, 4(r1) /* 80084A48 00081628 94 21 FF F8 */ stwu r1, -8(r1) @@ -3423,7 +3642,7 @@ /* 80084A58 00081638 2C 00 00 0B */ cmpwi r0, 0xb /* 80084A5C 0008163C 40 82 00 0C */ bne lbl_80084A68 lbl_80084A60: -/* 80084A60 00081640 C0 22 89 D0 */ lfs f1, lbl_804D83B0@sda21(r2) +/* 80084A60 00081640 C0 22 89 D0 */ lfs f1, lbl_804D83B0(r2) /* 80084A64 00081644 48 00 00 0C */ b lbl_80084A70 lbl_80084A68: /* 80084A68 00081648 38 63 06 F0 */ addi r3, r3, 0x6f0 @@ -3433,9 +3652,13 @@ /* 80084A74 00081654 38 21 00 08 */ addi r1, r1, 8 /* 80084A78 00081658 7C 08 03 A6 */ mtlr r0 /* 80084A7C 0008165C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084A80 -func_80084A80: +#pragma push +asm unk_t func_80084A80() +{ // clang-format off + nofralloc /* 80084A80 00081660 7C 08 02 A6 */ mflr r0 /* 80084A84 00081664 90 01 00 04 */ stw r0, 4(r1) /* 80084A88 00081668 94 21 FF B8 */ stwu r1, -0x48(r1) @@ -3547,9 +3770,13 @@ /* 80084BF0 000817D0 38 21 00 48 */ addi r1, r1, 0x48 /* 80084BF4 000817D4 7C 08 03 A6 */ mtlr r0 /* 80084BF8 000817D8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084BFC -func_80084BFC: +#pragma push +asm unk_t func_80084BFC() +{ // clang-format off + nofralloc /* 80084BFC 000817DC 7C 08 02 A6 */ mflr r0 /* 80084C00 000817E0 39 04 00 00 */ addi r8, r4, 0 /* 80084C04 000817E4 90 01 00 04 */ stw r0, 4(r1) @@ -3565,9 +3792,13 @@ /* 80084C2C 0008180C 38 21 00 08 */ addi r1, r1, 8 /* 80084C30 00081810 7C 08 03 A6 */ mtlr r0 /* 80084C34 00081814 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084C38 -func_80084C38: +#pragma push +asm unk_t func_80084C38() +{ // clang-format off + nofralloc /* 80084C38 00081818 7C 08 02 A6 */ mflr r0 /* 80084C3C 0008181C 39 04 00 00 */ addi r8, r4, 0 /* 80084C40 00081820 90 01 00 04 */ stw r0, 4(r1) @@ -3583,9 +3814,13 @@ /* 80084C68 00081848 38 21 00 08 */ addi r1, r1, 8 /* 80084C6C 0008184C 7C 08 03 A6 */ mtlr r0 /* 80084C70 00081850 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084C74 -func_80084C74: +#pragma push +asm unk_t func_80084C74() +{ // clang-format off + nofralloc /* 80084C74 00081854 7C 08 02 A6 */ mflr r0 /* 80084C78 00081858 39 04 00 00 */ addi r8, r4, 0 /* 80084C7C 0008185C 90 01 00 04 */ stw r0, 4(r1) @@ -3601,9 +3836,13 @@ /* 80084CA4 00081884 38 21 00 08 */ addi r1, r1, 8 /* 80084CA8 00081888 7C 08 03 A6 */ mtlr r0 /* 80084CAC 0008188C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084CB0 -func_80084CB0: +#pragma push +asm unk_t func_80084CB0() +{ // clang-format off + nofralloc /* 80084CB0 00081890 C0 03 07 98 */ lfs f0, 0x798(r3) /* 80084CB4 00081894 D0 04 00 00 */ stfs f0, 0(r4) /* 80084CB8 00081898 C0 03 07 A0 */ lfs f0, 0x7a0(r3) @@ -3617,9 +3856,13 @@ /* 80084CD8 000818B8 C0 03 07 B0 */ lfs f0, 0x7b0(r3) /* 80084CDC 000818BC D0 04 00 0C */ stfs f0, 0xc(r4) /* 80084CE0 000818C0 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084CE4 -func_80084CE4: +#pragma push +asm unk_t func_80084CE4() +{ // clang-format off + nofralloc /* 80084CE4 000818C4 7C 08 02 A6 */ mflr r0 /* 80084CE8 000818C8 90 01 00 04 */ stw r0, 4(r1) /* 80084CEC 000818CC 94 21 FF F8 */ stwu r1, -8(r1) @@ -3628,11 +3871,11 @@ /* 80084CF8 000818D8 C0 24 07 98 */ lfs f1, 0x798(r4) /* 80084CFC 000818DC C0 04 07 A0 */ lfs f0, 0x7a0(r4) /* 80084D00 000818E0 EC 43 10 2A */ fadds f2, f3, f2 -/* 80084D04 000818E4 C0 C2 89 D4 */ lfs f6, lbl_804D83B4@sda21(r2) +/* 80084D04 000818E4 C0 C2 89 D4 */ lfs f6, lbl_804D83B4(r2) /* 80084D08 000818E8 EC 81 00 2A */ fadds f4, f1, f0 -/* 80084D0C 000818EC C0 22 89 CC */ lfs f1, lbl_804D83AC@sda21(r2) +/* 80084D0C 000818EC C0 22 89 CC */ lfs f1, lbl_804D83AC(r2) /* 80084D10 000818F0 C0 A3 00 B0 */ lfs f5, 0xb0(r3) -/* 80084D14 000818F4 C0 62 89 CC */ lfs f3, lbl_804D83AC@sda21(r2) +/* 80084D14 000818F4 C0 62 89 CC */ lfs f3, lbl_804D83AC(r2) /* 80084D18 000818F8 EC 46 00 B2 */ fmuls f2, f6, f2 /* 80084D1C 000818FC C0 04 00 B0 */ lfs f0, 0xb0(r4) /* 80084D20 00081900 EC 21 28 2A */ fadds f1, f1, f5 @@ -3674,9 +3917,13 @@ /* 80084DA4 00081984 38 21 00 08 */ addi r1, r1, 8 /* 80084DA8 00081988 7C 08 03 A6 */ mtlr r0 /* 80084DAC 0008198C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084DB0 -func_80084DB0: +#pragma push +asm unk_t func_80084DB0() +{ // clang-format off + nofralloc /* 80084DB0 00081990 7C 08 02 A6 */ mflr r0 /* 80084DB4 00081994 90 01 00 04 */ stw r0, 4(r1) /* 80084DB8 00081998 94 21 FF E0 */ stwu r1, -0x20(r1) @@ -3706,9 +3953,13 @@ /* 80084E10 000819F0 38 21 00 20 */ addi r1, r1, 0x20 /* 80084E14 000819F4 7C 08 03 A6 */ mtlr r0 /* 80084E18 000819F8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084E1C -func_80084E1C: +#pragma push +asm unk_t func_80084E1C() +{ // clang-format off + nofralloc /* 80084E1C 000819FC 7C 08 02 A6 */ mflr r0 /* 80084E20 00081A00 90 01 00 04 */ stw r0, 4(r1) /* 80084E24 00081A04 94 21 FF C0 */ stwu r1, -0x40(r1) @@ -3737,7 +3988,7 @@ /* 80084E7C 00081A5C 4B FF 86 19 */ bl func_8007D494 lbl_80084E80: /* 80084E80 00081A60 C0 5F 06 20 */ lfs f2, 0x620(r31) -/* 80084E84 00081A64 C0 02 89 D8 */ lfs f0, lbl_804D83B8@sda21(r2) +/* 80084E84 00081A64 C0 02 89 D8 */ lfs f0, lbl_804D83B8(r2) /* 80084E88 00081A68 FC 02 00 40 */ fcmpo cr0, f2, f0 /* 80084E8C 00081A6C 40 80 00 0C */ bge lbl_80084E98 /* 80084E90 00081A70 FC 00 10 50 */ fneg f0, f2 @@ -3752,7 +4003,7 @@ /* 80084EAC 00081A8C EC 42 07 F2 */ fmuls f2, f2, f31 /* 80084EB0 00081A90 48 00 00 0C */ b lbl_80084EBC lbl_80084EB4: -/* 80084EB4 00081A94 C0 42 89 D8 */ lfs f2, lbl_804D83B8@sda21(r2) +/* 80084EB4 00081A94 C0 42 89 D8 */ lfs f2, lbl_804D83B8(r2) /* 80084EB8 00081A98 FC 20 10 90 */ fmr f1, f2 lbl_80084EBC: /* 80084EBC 00081A9C C0 7E 00 70 */ lfs f3, 0x70(r30) @@ -3767,9 +4018,13 @@ /* 80084EE0 00081AC0 38 21 00 40 */ addi r1, r1, 0x40 /* 80084EE4 00081AC4 7C 08 03 A6 */ mtlr r0 /* 80084EE8 00081AC8 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084EEC -func_80084EEC: +#pragma push +asm void func_80084EEC(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 80084EEC 00081ACC 7C 08 02 A6 */ mflr r0 /* 80084EF0 00081AD0 90 01 00 04 */ stw r0, 4(r1) /* 80084EF4 00081AD4 94 21 FF E0 */ stwu r1, -0x20(r1) @@ -3790,16 +4045,19 @@ /* 80084F30 00081B10 38 21 00 20 */ addi r1, r1, 0x20 /* 80084F34 00081B14 7C 08 03 A6 */ mtlr r0 /* 80084F38 00081B18 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80084F3C -func_80084F3C: +#pragma push +asm void func_80084F3C(HSD_GObj* fighterObj){ // clang-format off + nofralloc /* 80084F3C 00081B1C 7C 08 02 A6 */ mflr r0 /* 80084F40 00081B20 90 01 00 04 */ stw r0, 4(r1) /* 80084F44 00081B24 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80084F48 00081B28 93 E1 00 1C */ stw r31, 0x1c(r1) /* 80084F4C 00081B2C 7C 7F 1B 78 */ mr r31, r3 /* 80084F50 00081B30 80 63 00 2C */ lwz r3, 0x2c(r3) -/* 80084F54 00081B34 C0 02 89 D8 */ lfs f0, lbl_804D83B8@sda21(r2) +/* 80084F54 00081B34 C0 02 89 D8 */ lfs f0, lbl_804D83B8(r2) /* 80084F58 00081B38 C0 43 00 EC */ lfs f2, 0xec(r3) /* 80084F5C 00081B3C 38 83 01 10 */ addi r4, r3, 0x110 /* 80084F60 00081B40 C0 23 01 28 */ lfs f1, 0x128(r3) @@ -3810,7 +4068,7 @@ /* 80084F70 00081B50 C0 04 00 08 */ lfs f0, 8(r4) /* 80084F74 00081B54 FC 02 00 40 */ fcmpo cr0, f2, f0 /* 80084F78 00081B58 40 81 00 10 */ ble lbl_80084F88 -/* 80084F7C 00081B5C 80 8D AE B4 */ lwz r4, p_ftCommonData@sda21(r13) +/* 80084F7C 00081B5C 80 8D AE B4 */ lwz r4, p_ftCommonData(r13) /* 80084F80 00081B60 C0 04 00 6C */ lfs f0, 0x6c(r4) /* 80084F84 00081B64 EC 21 00 32 */ fmuls f1, f1, f0 lbl_80084F88: @@ -3822,14 +4080,20 @@ /* 80084F9C 00081B7C 38 21 00 20 */ addi r1, r1, 0x20 /* 80084FA0 00081B80 7C 08 03 A6 */ mtlr r0 /* 80084FA4 00081B84 4E 80 00 20 */ blr +} // clang-format on +#pragma pop + +unk_t func_80085030(); -.global func_80084FA8 -func_80084FA8: +#pragma push +asm void func_80084FA8(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 80084FA8 00081B88 7C 08 02 A6 */ mflr r0 /* 80084FAC 00081B8C 90 01 00 04 */ stw r0, 4(r1) /* 80084FB0 00081B90 94 21 FF F8 */ stwu r1, -8(r1) /* 80084FB4 00081B94 80 A3 00 2C */ lwz r5, 0x2c(r3) -/* 80084FB8 00081B98 C0 02 89 D8 */ lfs f0, lbl_804D83B8@sda21(r2) +/* 80084FB8 00081B98 C0 02 89 D8 */ lfs f0, lbl_804D83B8(r2) /* 80084FBC 00081B9C C0 45 00 EC */ lfs f2, 0xec(r5) /* 80084FC0 00081BA0 38 85 01 10 */ addi r4, r5, 0x110 /* 80084FC4 00081BA4 C0 25 01 28 */ lfs f1, 0x128(r5) @@ -3840,7 +4104,7 @@ /* 80084FD4 00081BB4 C0 04 00 08 */ lfs f0, 8(r4) /* 80084FD8 00081BB8 FC 02 00 40 */ fcmpo cr0, f2, f0 /* 80084FDC 00081BBC 40 81 00 10 */ ble lbl_80084FEC -/* 80084FE0 00081BC0 80 8D AE B4 */ lwz r4, p_ftCommonData@sda21(r13) +/* 80084FE0 00081BC0 80 8D AE B4 */ lwz r4, p_ftCommonData(r13) /* 80084FE4 00081BC4 C0 04 00 6C */ lfs f0, 0x6c(r4) /* 80084FE8 00081BC8 EC 21 00 32 */ fmuls f1, f1, f0 lbl_80084FEC: @@ -3850,9 +4114,13 @@ /* 80084FF8 00081BD8 38 21 00 08 */ addi r1, r1, 8 /* 80084FFC 00081BDC 7C 08 03 A6 */ mtlr r0 /* 80085000 00081BE0 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80085004 -func_80085004: +#pragma push +asm unk_t func_80085004() +{ // clang-format off + nofralloc /* 80085004 00081BE4 7C 08 02 A6 */ mflr r0 /* 80085008 00081BE8 90 01 00 04 */ stw r0, 4(r1) /* 8008500C 00081BEC 94 21 FF F8 */ stwu r1, -8(r1) @@ -3864,9 +4132,12 @@ /* 80085024 00081C04 38 21 00 08 */ addi r1, r1, 8 /* 80085028 00081C08 7C 08 03 A6 */ mtlr r0 /* 8008502C 00081C0C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80085030 -func_80085030: +#pragma push +asm unk_t func_80085030(){ // clang-format off + nofralloc /* 80085030 00081C10 7C 08 02 A6 */ mflr r0 /* 80085034 00081C14 90 01 00 04 */ stw r0, 4(r1) /* 80085038 00081C18 94 21 FF E0 */ stwu r1, -0x20(r1) @@ -3891,9 +4162,16 @@ /* 8008507C 00081C5C 38 21 00 20 */ addi r1, r1, 0x20 /* 80085080 00081C60 7C 08 03 A6 */ mtlr r0 /* 80085084 00081C64 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80085088 -func_80085088: +unk_t func_80085030(); +unk_t func_800850E0(); + +#pragma push +asm unk_t func_80085088() +{ // clang-format off + nofralloc /* 80085088 00081C68 7C 08 02 A6 */ mflr r0 /* 8008508C 00081C6C 90 01 00 04 */ stw r0, 4(r1) /* 80085090 00081C70 94 21 FF F8 */ stwu r1, -8(r1) @@ -3905,9 +4183,13 @@ /* 800850A8 00081C88 38 21 00 08 */ addi r1, r1, 8 /* 800850AC 00081C8C 7C 08 03 A6 */ mtlr r0 /* 800850B0 00081C90 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800850B4 -func_800850B4: +#pragma push +asm unk_t func_800850B4() +{ // clang-format off + nofralloc /* 800850B4 00081C94 7C 08 02 A6 */ mflr r0 /* 800850B8 00081C98 90 01 00 04 */ stw r0, 4(r1) /* 800850BC 00081C9C 94 21 FF F8 */ stwu r1, -8(r1) @@ -3919,9 +4201,13 @@ /* 800850D4 00081CB4 38 21 00 08 */ addi r1, r1, 8 /* 800850D8 00081CB8 7C 08 03 A6 */ mtlr r0 /* 800850DC 00081CBC 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800850E0 -func_800850E0: +#pragma push +asm unk_t func_800850E0() +{ // clang-format off + nofralloc /* 800850E0 00081CC0 7C 08 02 A6 */ mflr r0 /* 800850E4 00081CC4 90 01 00 04 */ stw r0, 4(r1) /* 800850E8 00081CC8 94 21 FF E0 */ stwu r1, -0x20(r1) @@ -3945,9 +4231,13 @@ /* 80085128 00081D08 38 21 00 20 */ addi r1, r1, 0x20 /* 8008512C 00081D0C 7C 08 03 A6 */ mtlr r0 /* 80085130 00081D10 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80085134 -func_80085134: +#pragma push +asm void func_80085134(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 80085134 00081D14 80 63 00 2C */ lwz r3, 0x2c(r3) /* 80085138 00081D18 C0 23 06 AC */ lfs f1, 0x6ac(r3) /* 8008513C 00081D1C C0 03 00 2C */ lfs f0, 0x2c(r3) @@ -3956,9 +4246,13 @@ /* 80085148 00081D28 C0 03 06 A8 */ lfs f0, 0x6a8(r3) /* 8008514C 00081D2C D0 03 00 84 */ stfs f0, 0x84(r3) /* 80085150 00081D30 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80085154 -func_80085154: +#pragma push +asm void func_80085154(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 80085154 00081D34 7C 08 02 A6 */ mflr r0 /* 80085158 00081D38 90 01 00 04 */ stw r0, 4(r1) /* 8008515C 00081D3C 94 21 FF E0 */ stwu r1, -0x20(r1) @@ -3986,21 +4280,29 @@ /* 800851B4 00081D94 38 21 00 20 */ addi r1, r1, 0x20 /* 800851B8 00081D98 7C 08 03 A6 */ mtlr r0 /* 800851BC 00081D9C 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800851C0 -func_800851C0: +#pragma push +asm unk_t func_800851C0() +{ // clang-format off + nofralloc /* 800851C0 00081DA0 80 63 00 2C */ lwz r3, 0x2c(r3) /* 800851C4 00081DA4 C0 03 06 A8 */ lfs f0, 0x6a8(r3) /* 800851C8 00081DA8 D0 03 00 84 */ stfs f0, 0x84(r3) /* 800851CC 00081DAC 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_800851D0 -func_800851D0: +#pragma push +asm unk_t func_800851D0() +{ // clang-format off + nofralloc /* 800851D0 00081DB0 80 83 00 2C */ lwz r4, 0x2c(r3) /* 800851D4 00081DB4 80 04 19 7C */ lwz r0, 0x197c(r4) /* 800851D8 00081DB8 28 00 00 00 */ cmplwi r0, 0 /* 800851DC 00081DBC 41 82 00 1C */ beq lbl_800851F8 -/* 800851E0 00081DC0 80 6D AE 80 */ lwz r3, lbl_804D6520@sda21(r13) +/* 800851E0 00081DC0 80 6D AE 80 */ lwz r3, lbl_804D6520(r13) /* 800851E4 00081DC4 C0 24 06 A8 */ lfs f1, 0x6a8(r4) /* 800851E8 00081DC8 C0 03 00 14 */ lfs f0, 0x14(r3) /* 800851EC 00081DCC EC 01 00 32 */ fmuls f0, f1, f0 @@ -4010,32 +4312,18 @@ /* 800851F8 00081DD8 C0 04 06 A8 */ lfs f0, 0x6a8(r4) /* 800851FC 00081DDC D0 04 00 84 */ stfs f0, 0x84(r4) /* 80085200 00081DE0 4E 80 00 20 */ blr +} // clang-format on +#pragma pop -.global func_80085204 -func_80085204: +#pragma push +asm void func_80085204(HSD_GObj* fighterObj) +{ // clang-format off + nofralloc /* 80085204 00081DE4 80 63 00 2C */ lwz r3, 0x2c(r3) /* 80085208 00081DE8 C0 23 06 AC */ lfs f1, 0x6ac(r3) /* 8008520C 00081DEC C0 03 00 2C */ lfs f0, 0x2c(r3) /* 80085210 00081DF0 EC 01 00 32 */ fmuls f0, f1, f0 /* 80085214 00081DF4 D0 03 00 80 */ stfs f0, 0x80(r3) /* 80085218 00081DF8 4E 80 00 20 */ blr - - -.section .sdata2 - .balign 8 -.global lbl_804D83A8 -lbl_804D83A8: - .4byte 0x41200000 -.global lbl_804D83AC -lbl_804D83AC: - .4byte 0x00000000 -.global lbl_804D83B0 -lbl_804D83B0: - .4byte 0x3F800000 -.global lbl_804D83B4 -lbl_804D83B4: - .4byte 0x3F000000 -.global lbl_804D83B8 -lbl_804D83B8: - .4byte 0x00000000 - .4byte 0x00000000 +} // clang-format on +#pragma pop diff --git a/src/melee/ft/code_80081B38.h b/src/melee/ft/code_80081B38.h new file mode 100644 index 0000000000..117b0b1d75 --- /dev/null +++ b/src/melee/ft/code_80081B38.h @@ -0,0 +1,10 @@ +#ifndef MELEE_FT_CODE_80081B38_H +#define MELEE_FT_CODE_80081B38_H + +#include + +HSD_GObj* func_80082E3C(HSD_GObj* fighter_gobj); +f32 Stage_GetGroundFrictionMultiplier(Fighter* fp); +BOOL func_8008239C(HSD_GObj* fighter_gobj, s32 facing_direction, f32* height_attributes); + +#endif diff --git a/src/melee/ft/fighter.c b/src/melee/ft/fighter.c index 5d22be0cd1..a68b1d3a8a 100644 --- a/src/melee/ft/fighter.c +++ b/src/melee/ft/fighter.c @@ -1,4 +1,6 @@ #include +#include +#include #include #define HALF_PI 1.5707963267948966 @@ -51,28 +53,28 @@ u32 lbl_804D64F8 = 0; // the following seems to be an array, initialized in reverse in Fighter_LoadCommonData // outcommented because they are in variables.h too. uncomment this when moving data from fighter.s here. -void* lbl_804D64FC = 0; -void* lbl_804D6500 = 0; -void* lbl_804D6504 = 0; -void* lbl_804D6508 = 0; -void* lbl_804D650C = 0; -void* lbl_804D6510 = 0; -void* lbl_804D6514 = 0; -void* lbl_804D6518 = 0; -void* lbl_804D651C = 0; -void* lbl_804D6520 = 0; -void* lbl_804D6524 = 0; -void* lbl_804D6528 = 0; -void* lbl_804D652C = 0; -void* lbl_804D6530 = 0; -void* lbl_804D6534 = 0; -void* lbl_804D6538 = 0; -void* lbl_804D653C = 0; -s32** lbl_804D6540 = 0; -void* lbl_804D6544 = 0; -void* lbl_804D6548 = 0; -void* lbl_804D654C = 0; -void* lbl_804D6550 = 0; +unk_t lbl_804D64FC = NULL; +unk_t lbl_804D6500 = NULL; +unk_t lbl_804D6504 = NULL; +unk_t lbl_804D6508 = NULL; +unk_t lbl_804D650C = NULL; +unk_t lbl_804D6510 = NULL; +unk_t lbl_804D6514 = NULL; +unk_t lbl_804D6518 = NULL; +unk_t lbl_804D651C = NULL; +unk_t lbl_804D6520 = NULL; +unk_t lbl_804D6524 = NULL; +unk_t lbl_804D6528 = NULL; +unk_t lbl_804D652C = NULL; +unk_t lbl_804D6530 = NULL; +unk_t lbl_804D6534 = NULL; +unk_t lbl_804D6538 = NULL; +unk_t lbl_804D653C = NULL; +s32** lbl_804D6540 = NULL; +unk_t lbl_804D6544 = NULL; +unk_t lbl_804D6548 = NULL; +unk_t lbl_804D654C = NULL; +unk_t lbl_804D6550 = NULL; ftCommonData* p_ftCommonData; @@ -2158,7 +2160,7 @@ void Fighter_procUpdate(HSD_GObj* fighterObj, s32 dummy) { pAttr = &fp->x110_attr; func_8007CCA0(fp, /*effective friction - ground multiplier is usually 1. last factor was 1 when I looked*/ - func_80084A40(fp) * pAttr->x128_GroundFriction * p_ftCommonData->x200); + Stage_GetGroundFrictionMultiplier(fp) * pAttr->x128_GroundFriction * p_ftCommonData->x200); // set knockback velocity to ground_kb_vel * surfaceTangent p_kb_vel->x = pNormal->y * fp->xF0_ground_kb_vel; @@ -2203,7 +2205,7 @@ void Fighter_procUpdate(HSD_GObj* fighterObj, s32 dummy) { func_8007CE4C(fp, /* effectiveFriction - the last constant variable differs from the one for the knockback friction above*/ - func_80084A40(fp) * pAttr->x128_GroundFriction * p_ftCommonData->x3EC_shieldGroundFrictionMultiplier); + Stage_GetGroundFrictionMultiplier(fp) * pAttr->x128_GroundFriction * p_ftCommonData->x3EC_shieldGroundFrictionMultiplier); pAtkShieldKB->x = pNormal->y * fp->xF4_ground_attacker_shield_kb_vel; pAtkShieldKB->y = -pNormal->x * fp->xF4_ground_attacker_shield_kb_vel; diff --git a/src/melee/ft/fighter.h b/src/melee/ft/fighter.h index 58a3043e20..0836adfb1c 100644 --- a/src/melee/ft/fighter.h +++ b/src/melee/ft/fighter.h @@ -2224,4 +2224,7 @@ inline void Fighter_UnsetCmdVar0(HSD_GObj* fighterObj) { fp->x2200_ftcmd_var0 = 0; } +extern unk_t lbl_804D6520; +extern ftCommonData* p_ftCommonData; + #endif diff --git a/src/melee/ft/ft_unknown_006.c b/src/melee/ft/ft_unknown_006.c index 40caad6dca..bd61c9dfac 100644 --- a/src/melee/ft/ft_unknown_006.c +++ b/src/melee/ft/ft_unknown_006.c @@ -5,7 +5,6 @@ #define TEST(expr) (expr) ? TRUE : FALSE -extern HSD_GObjList* lbl_804D782C; extern s32 func_80023220(s32); extern s32 func_800230C8(s32, s32*, s32*); extern s32 func_80023130(); diff --git a/src/melee/ft/ft_unknown_006.h b/src/melee/ft/ft_unknown_006.h index ce15954638..c6c13f7d54 100644 --- a/src/melee/ft/ft_unknown_006.h +++ b/src/melee/ft/ft_unknown_006.h @@ -40,5 +40,12 @@ void func_80088080(Fighter* fp); void func_800880AC(Fighter* fp); void func_800880D8(Fighter* fp); void func_80088110(Fighter* fp); +void func_800D5BF8(HSD_GObj* fighter_gobj); +unk_t func_800D0EC8(); +unk_t func_8009A3C8(); +unk_t func_8004B4B0(); +unk_t func_8009EDA4(); +unk_t func_8009F39C(); +unk_t func_800C703C(); #endif diff --git a/src/melee/ft/ftbosslib.c b/src/melee/ft/ftbosslib.c index 2831b1f5f4..45ba5ea7a3 100644 --- a/src/melee/ft/ftbosslib.c +++ b/src/melee/ft/ftbosslib.c @@ -5,11 +5,6 @@ #include #include -extern struct { - u8 x0_pad[0x20]; - HSD_GObj* x20; -}* lbl_804D782C; //TODO: unify this struct - typedef enum { Gm_PKind_Human, Gm_PKind_Cpu, @@ -225,7 +220,7 @@ HSD_GObj* func_8015C3E8(s32 arg0) { // get_fighter_gobj(FighterKind) HSD_GObj* phi_r31; s32 unused[2]; - for (phi_r31 = lbl_804D782C->x20; phi_r31; phi_r31 = phi_r31->next) { + for (phi_r31 = lbl_804D782C->x20_fighters; phi_r31; phi_r31 = phi_r31->next) { if (arg0 == func_800872A4(phi_r31)) { return phi_r31; } diff --git a/src/melee/ft/ftcliffcommon.c b/src/melee/ft/ftcliffcommon.c index 2eba98629a..ed8b0976a7 100644 --- a/src/melee/ft/ftcliffcommon.c +++ b/src/melee/ft/ftcliffcommon.c @@ -1,6 +1,7 @@ +#include #include +#include #include -#include BOOL func_80081298(HSD_GObj* gobj) { Fighter* other_fp; diff --git a/src/melee/ft/ftcoll.c b/src/melee/ft/ftcoll.c index b811a16d9e..68c4fa9b49 100644 --- a/src/melee/ft/ftcoll.c +++ b/src/melee/ft/ftcoll.c @@ -141,8 +141,6 @@ void func_80076528(HSD_GObj* fighter_gobj) // Combo count something + adjust Top } } -extern struct r13_EntityPointers* lbl_804D782C; - // 0x800765AC // // https://decomp.me/scratch/IPBrx // void func_800765AC(HSD_GObj* victim) // Clear victim pointer from attacker upon freeing memory? // diff --git a/src/melee/ft/ftcoll.h b/src/melee/ft/ftcoll.h index 91d56fe745..d45bda0786 100644 --- a/src/melee/ft/ftcoll.h +++ b/src/melee/ft/ftcoll.h @@ -14,5 +14,6 @@ void func_80076528(HSD_GObj* fighter_gobj); // Combo count something + adjust To void func_800765AC(HSD_GObj* victim); // Clear victim pointer from attacker upon freeing memory? // void func_800765E0(void); // Reset hitbox and phantom collision count? // f32 func_800765F0(Fighter* fp, HSD_GObj* victim, f32 unk_floatvar); // Unk knockback related ? // +BOOL func_8007B868(HSD_GObj* fighterObj); #endif diff --git a/src/melee/ft/ftcommon.c b/src/melee/ft/ftcommon.c index 68a72d50ef..87791ad538 100644 --- a/src/melee/ft/ftcommon.c +++ b/src/melee/ft/ftcommon.c @@ -1,12 +1,8 @@ #include +#include #include -extern struct { - u8 x0_pad[0x20]; - HSD_GObj* unk20; -}* lbl_804D782C; - const Vec3 lbl_803B74A0 = { 0, 0, 0 }; void func_8007C930(Fighter* fp, f32 result) @@ -108,7 +104,7 @@ void func_8007CB74(HSD_GObj* gobj) u32 unused[2]; ground_normal = &fp->x6F0_collData.x14C_ground.normal; - temp_f1 = func_80084A40(fp); + temp_f1 = Stage_GetGroundFrictionMultiplier(fp); if (temp_f1 < 1) { fp->xE4_ground_accel_1 *= temp_f1; } @@ -853,7 +849,7 @@ void func_8007DD7C(HSD_GObj* gobj, Vec3* v) arg_ft = gobj->user_data; phi_r28 = FALSE; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { temp_r31 = &arg_ft->x2C4; if (cur != gobj && !func_80086FD4(cur, gobj)) { cur_ft = cur->user_data; @@ -1274,7 +1270,7 @@ void func_8007EC30(u32 arg0, u32 arg1) HSD_GObj* cur; u32 unused[4]; - cur = lbl_804D782C->unk20; + cur = lbl_804D782C->x20_fighters; while (cur != NULL) { fp = cur->user_data; func_8007EBAC(fp, arg0, arg1); @@ -1857,7 +1853,7 @@ void func_800804A0(Fighter* fp, f32 arg8) { f32 temp_f1; f32 phi_f31 = arg8; - if ((temp_f1 = func_80084A40(fp)) < 1) { + if ((temp_f1 = Stage_GetGroundFrictionMultiplier(fp)) < 1) { phi_f31 *= temp_f1; } fp->xE8_ground_accel_2 = phi_f31; diff --git a/src/melee/ft/ftdrawcommon.c b/src/melee/ft/ftdrawcommon.c index 39314fd5c2..8f791b24b7 100644 --- a/src/melee/ft/ftdrawcommon.c +++ b/src/melee/ft/ftdrawcommon.c @@ -21,7 +21,6 @@ extern f32 lbl_804D8368; extern s32 lbl_804D836C[1]; extern s32 lbl_804D8370[2]; -extern unk_t lbl_804D782C; extern unk_t func_800750C8(); extern unk_t func_8009F7F8(); extern unk_t func_800C8AF0(); diff --git a/src/melee/ft/ftlib.c b/src/melee/ft/ftlib.c index c834c9b61f..7859130bb5 100644 --- a/src/melee/ft/ftlib.c +++ b/src/melee/ft/ftlib.c @@ -4,11 +4,6 @@ #include #include -extern struct { - u8 fill[0x20]; - HSD_GObj* unk20; -}* lbl_804D782C; - extern struct { void* unk0; u8 unk4; @@ -21,7 +16,7 @@ s32 func_800860C4(void) { s32 ret = 0; HSD_GObj* cur; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { ret++; } return ret; @@ -31,7 +26,7 @@ BOOL func_800860E8(void) { u32 unused[2]; HSD_GObj* cur; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { if (func_800872A4(cur) == 0x1B) { return TRUE; } @@ -43,7 +38,7 @@ BOOL func_80086140(void) { u32 unused[2]; HSD_GObj* cur; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { if (func_800872A4(cur) == 0x1C) { return TRUE; } @@ -67,7 +62,7 @@ HSD_GObj* func_80086198(HSD_GObj* gobj) } result = NULL; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { // skip if same player if (func_80086FD4(gobj, cur)) { continue; @@ -112,7 +107,7 @@ HSD_GObj* func_8008627C(Vec3* v, HSD_GObj* gobj) } result = NULL; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { // skip if same player if (func_80086FD4(gobj, cur)) { continue; @@ -155,7 +150,7 @@ HSD_GObj* func_80086368(Vec3* v, HSD_GObj* gobj, f32 arg8) } result = NULL; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { if (func_80086FD4(gobj, cur)) { continue; } @@ -207,7 +202,7 @@ f32 func_800864A8(Vec3* v, HSD_GObj* gobj) fp = NULL; } - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { if (func_80086FD4(gobj, cur)) { continue; } @@ -355,7 +350,7 @@ void func_80086824(void) { u32 unused[4]; HSD_GObj* cur; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { func_800867E8(cur); } } @@ -369,7 +364,7 @@ void func_8008688C(HSD_GObj* gobj) void func_800868A4(void) { HSD_GObj* cur; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { func_8008688C(cur); } } @@ -562,7 +557,7 @@ void func_80086C9C(s32 arg0, s32 arg1) { HSD_GObj* cur; u32 unused[4]; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { func_80086C18(cur, arg0, arg1); } } @@ -576,7 +571,7 @@ void func_80086DC4(s32 arg0, s32 arg1) { HSD_GObj* cur; u32 unused[4]; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { func_80086D40(cur, arg0, arg1); } } @@ -838,7 +833,7 @@ BOOL func_800873F4(HSD_GObj* gobj) HSD_GObj* func_8008741C(u32 i) { HSD_GObj* cur; - for (cur = lbl_804D782C->unk20; cur != NULL; cur = cur->next) { + for (cur = lbl_804D782C->x20_fighters; cur != NULL; cur = cur->next) { Fighter* fp = cur->user_data; if (fp->x8_spawnNum == i) { return cur; diff --git a/src/melee/ft/ftwalkcommon.c b/src/melee/ft/ftwalkcommon.c index 96a641f0e5..1329c705b1 100644 --- a/src/melee/ft/ftwalkcommon.c +++ b/src/melee/ft/ftwalkcommon.c @@ -1,4 +1,5 @@ #include +#include s32 ftWalkCommon_GetWalkType_800DFBF8(HSD_GObj* fighterObj) { Fighter* fp = fighterObj->user_data; @@ -62,7 +63,7 @@ void ftWalkCommon_800DFDDC(HSD_GObj* fighterObj) { Fighter* fp = getFighter(fighterObj); - if (func_80084A40(fp) < 1.0f) { + if (Stage_GetGroundFrictionMultiplier(fp) < 1.0f) { velocity_f2 = fp->x2340_f32; } else { velocity_f2 = fp->xEC_ground_vel; diff --git a/src/melee/ft/ftwalljump.h b/src/melee/ft/ftwalljump.h new file mode 100644 index 0000000000..63b72535f4 --- /dev/null +++ b/src/melee/ft/ftwalljump.h @@ -0,0 +1,8 @@ +#ifndef MELEE_FT_FTWALLJUMP_H +#define MELEE_FT_FTWALLJUMP_H + +#include + +BOOL func_8008169C(HSD_GObj* pPlayerEntityStruct /*r3*/); + +#endif diff --git a/src/melee/gr/grlib.c b/src/melee/gr/grlib.c index 1bb6313cf7..771676bcbb 100644 --- a/src/melee/gr/grlib.c +++ b/src/melee/gr/grlib.c @@ -3,7 +3,6 @@ extern StageInfo stage_info; extern u8 lbl_804D7849; -extern void* lbl_804D782C; extern struct _UnkEffectStruct* lbl_804D78FC; static Vec lbl_8049EF58[6]; diff --git a/src/melee/gr/ground.c b/src/melee/gr/ground.c index 7582fa75c7..3a024f481d 100644 --- a/src/melee/gr/ground.c +++ b/src/melee/gr/ground.c @@ -3810,11 +3810,6 @@ static asm void func_801C466C(void) } #pragma peephole on -extern struct { - u8 x0_pad[0xC]; - HSD_GObj* xC; -}* lbl_804D782C; - HSD_GObj* func_801C498C(void) { HSD_GObj* gobj; diff --git a/src/melee/it/item.c b/src/melee/it/item.c index 1880139620..5d0f961fd5 100644 --- a/src/melee/it/item.c +++ b/src/melee/it/item.c @@ -101,7 +101,6 @@ void func_80266FCC(void) // Init item struct? // lbl_804A0E30.x4 = (s8)0; } -extern void func_800436D8(void*, s32); extern s32 func_8017E068(); extern void func_80225D64(HSD_GObj*, HSD_GObj*); extern void func_80225DD8(HSD_GObj*, HSD_GObj*); diff --git a/src/melee/it/item2.c b/src/melee/it/item2.c index 4ee48cf144..7ec08aa30b 100644 --- a/src/melee/it/item2.c +++ b/src/melee/it/item2.c @@ -148,8 +148,6 @@ void func_8026B3A8(HSD_GObj* item_gobj) // Toggle item flag 0x15 in 0xDC8 word O temp_item->xDC8_word.flags.x15 = 0; } -extern struct r13_EntityPointers* lbl_804D782C; - // 0x8026B3C0 // // https://decomp.me/scratch/umbPP // u32 func_8026B3C0(s32 itemID) // Count identical item GObj entities? // @@ -159,7 +157,7 @@ u32 func_8026B3C0(s32 itemID) // Count identical item GObj entities? // s32 i; i = 0; - unkItemGObj = lbl_804D782C->x24_itemGObj; + unkItemGObj = lbl_804D782C->x24_items; while (unkItemGObj != NULL) { temp_item = unkItemGObj->user_data; if ((s32) temp_item->x10_item_kind == itemID) { @@ -486,7 +484,7 @@ void func_8026B7F8(HSD_GObj* fighter_gobj) // Remove item from player on death? Item* item_data; s32 i; - enumGObj = lbl_804D782C->x24_itemGObj; + enumGObj = lbl_804D782C->x24_items; while (enumGObj != NULL) { item_data = enumGObj->user_data; itemOwner = item_data->x518_ownerGObj; @@ -1206,7 +1204,7 @@ HSD_GObj* func_8026C258(Vec3* vector, f32 facingDir) // Find the closest item to HSD_GObj* closest_item_gobj; closest_item_gobj = NULL; - item_gobj = lbl_804D782C->x24_itemGObj; + item_gobj = lbl_804D782C->x24_items; while (item_gobj != NULL) { item_data = item_gobj->user_data; @@ -1286,7 +1284,7 @@ void func_8026C368(HSD_GObj* item_gobj) // Run bomb item explosion callbacks // // https://decomp.me/scratch/T0jPV // void func_8026C3FC(void) // Toggle bit 3 of 0xDC8 ON for all active item GObjs? // { - HSD_GObj* item_gobj = lbl_804D782C->x24_itemGObj; + HSD_GObj* item_gobj = lbl_804D782C->x24_items; Item* item_data; while (item_gobj != NULL) { @@ -1303,7 +1301,7 @@ void func_8026C42C(void) // Toggle bits in 0xDC8 for all active item GObjs? // HSD_GObj* item_gobj; Item* item_data; - item_gobj = lbl_804D782C->x24_itemGObj; + item_gobj = lbl_804D782C->x24_items; while (item_gobj != NULL) { item_data = item_gobj->user_data; if (item_data->xDC8_word.flags.x7 != 0) { diff --git a/src/melee/lb/lbunknown_003.h b/src/melee/lb/lbunknown_003.h new file mode 100644 index 0000000000..d917c76374 --- /dev/null +++ b/src/melee/lb/lbunknown_003.h @@ -0,0 +1,6 @@ +#ifndef MELEE_LB_LBUNKNOWN_003_H +#define MELEE_LB_LBUNKNOWN_003_H + +unk_t func_80014638(); + +#endif diff --git a/src/melee/mp/mpcoll.h b/src/melee/mp/mpcoll.h index 0b45ebfe39..a12fe79431 100644 --- a/src/melee/mp/mpcoll.h +++ b/src/melee/mp/mpcoll.h @@ -3,4 +3,41 @@ #include #include + +void func_80042374(CollData*, f32, f32, f32); +void func_80042078(CollData* cd, HSD_GObj* gobj, + HSD_JObj*, HSD_JObj*, HSD_JObj*, HSD_JObj*, + HSD_JObj*, HSD_JObj*, HSD_JObj*, f32); +void func_80041EE4(CollData*); +unk_t func_800471F8(); +unk_t func_800473CC(); +unk_t func_800477E0(); +unk_t func_80048464(); +unk_t func_80048160(); +unk_t func_80048274(); +unk_t func_80048578(); +unk_t func_80048768(); +unk_t func_80048388(); +void func_800436D8(CollData*, s32); +unk_t func_800475F4(); +void func_8004730C(CollData*, f32 (*x)[6]); +unk_t func_80047A08(); +unk_t func_8004B108(); +unk_t func_8004B21C(); +unk_t func_8004B2DC(); +unk_t func_8004B3F0(); +unk_t func_80047E14(); +unk_t func_80047AC8(); +unk_t func_80047F40(); +unk_t func_80047BF4(); +unk_t func_8004806C(); +unk_t func_80047D20(); +unk_t func_80048654(); +unk_t func_800474E0(); +unk_t func_800476B4(); +unk_t func_800478F4(); +unk_t func_8004B5C4(); +unk_t func_8004CC00(); +unk_t func_8004CA6C(); + #endif diff --git a/src/melee/mp/mplib.h b/src/melee/mp/mplib.h new file mode 100644 index 0000000000..be5427fa61 --- /dev/null +++ b/src/melee/mp/mplib.h @@ -0,0 +1,21 @@ +#ifndef MELEE_MP_MPLIB_H +#define MELEE_MP_MPLIB_H + +#include + +unk_t func_80054F68(); +unk_t func_80054ED8(); +unk_t func_80054ED8(); +unk_t func_80056B34(); +unk_t func_80056AC4(); +unk_t func_80056A54(); +unk_t func_80056AFC(); +BOOL func_800501CC(f32 surface_normal_y, f32 surface_normal_x, f32 right_x, f32 right_y, VecPtr coll_vec, + unk_t, unk_t, unk_t, u32, u32); +unk_t func_80056A8C(); +unk_t func_80056A1C(); +func_800509B8(f32 surface_normal_y, f32 surface_normal_x, f32 left_x, f32 left_y, VecPtr coll_vec, + unk_t, unk_t, unk_t, u32, u32); +unk_t func_80054CEC(); + +#endif diff --git a/src/melee/text_2.h b/src/melee/text_2.h new file mode 100644 index 0000000000..d39eac0473 --- /dev/null +++ b/src/melee/text_2.h @@ -0,0 +1,8 @@ +#ifndef MELEE_TEXT_2_H +#define MELEE_TEXT_2_H + +#include + +unk_t func_801A4BB8(); + +#endif diff --git a/src/sysdolphin/baselib/gobjobject.c b/src/sysdolphin/baselib/gobjobject.c index d4a37adce3..6c67324b8b 100644 --- a/src/sysdolphin/baselib/gobjobject.c +++ b/src/sysdolphin/baselib/gobjobject.c @@ -1,13 +1,11 @@ #include -extern struct r13_EntityPointers* lbl_804D782C; - extern void (**lbl_804D7810)(void*); HSD_GObj* func_80390A3C(u16 id, u8 arg1) { HSD_GObj* cur; - for (cur = lbl_804D782C->x0[arg1]; cur != NULL; cur = cur->next) { + for (cur = ((HSD_GObj**)lbl_804D782C)[arg1]; cur != NULL; cur = cur->next) { if (cur->classifier == id) { break; } diff --git a/tools/convert_data.py b/tools/convert_data.py index 7736b94720..ca9446dc22 100644 --- a/tools/convert_data.py +++ b/tools/convert_data.py @@ -7,11 +7,11 @@ root = Path(__file__).parent.parent options = { - 'input_glob': r"asm\**\mtx44.s" + 'input_glob': r"asm\**\code_80081938.s" } default_options = { - 'zero': None, # How to treat zero-value dwords + 'zero': 'float', # How to treat zero-value dwords # None: replace zero with 'NULL' # 'hex': replace zero with '0x00000000' # 'int': replace zero with '0'