SSBM Decomp
Loading...
Searching...
No Matches
Todo List
Global _fpclassify (double x)
somehow make this work with math.h
Global _HSD_ZListSort (void)
Create and use an offsetof macro to get ZList sort.texedge and sort.xlu
Global _Toy_8030FA50 (void)
likely inline where Toy_str_ScMenFigure_cam_int1_camera is declared
Global _Toy_803FDEA0 []
Should be static but changing it affects .data order. _Toy_803FDEA0 points to #_Toy_803FDEA4, which contains the string.
Global _Toy_str_TyLight_dat []

end .sdata hack

Should be a literal, probably a getter function or part of _Toy_803FDDE4.

Global _tyDisplay_8031B328 (void)
.data order hack
Global _tyDisplay_803FF01C []
Not de-duplicated in tyDisplay_8031BB34, therefore not a literal?
Global _tyList_80313508 (HSD_GObj *parent, char *symbol_name, float x, float y, float z)
Suspicious return
Global _tyList_8031457C (void)
Is this really a reference to Toy_str_ScMenFigure_cam_int1_camera, or de-duplicated?
Global bool
Maybe some versions of MetroWerks support _Bool?
Global Camera_80029124 (Vec3 *, s32)
lots of ways to match this without the padding
Global Camera_80029AAC (CameraBounds *bounds, CameraTransformState *transform, f32 speed)
this makes it match, but its weird to pass in x38 as a param
Global Camera_80029CF8 (CameraBounds *, CameraTransformState *)
another inline probably resolves this stack issue
Global Camera_8002B694 (CameraInputs *, s32)
some notes on this weird thing: Slot 4 reads all ports at once: the stick and substick each
Global Camera_8002C5B4 (Camera_x2D0 *)
figure out how to get rid of this gross hack
Global Camera_8002C908 (void *)
this and Camera_8002C908 share the body of track_subject, there always seems to be a regswap though
Global Camera_8002D318 (void *unused)
this and Camera_8002D85C are very similar but i cant quite figure out the helpers for them. there is also a pattern stack gaps of 24 bytes
Global Camera_8002DDC4 (void *)
there is a clear pattern inside here
Global Camera_800307D0 (f32 *, f32 *, f32 *)
would make more sense if these two blocks were the inlines
Global checkItemThrowInput (Fighter_GObj *gobj)
This probably doesn't exist; see ftCo_AttackAir_CheckItemThrowInput.
Global checkJObjFlags (HSD_JObj *jobj)
Duplicated in lb_00F9.c
Global clear_blaster (HSD_GObj *item_gobj)
Calling clear_blaster_references here changes generated code.
Global CMD_TYPE
Fix (ideally delete) macros
Global Collide_LeftWallPush
These (and CollData::env_flags) should be a bitfield struct
Global CollJoint::cb_0
Possible array here
Global CommandInfo::ptr [1]
Hack to match Command_04
Global CommandInfo::u
eventually clean this up, probably have each struct as its own union?
Global COMMON_DATA_F32
Fix common data struct
Global consume_blur_colors (GXColor color0, GXColor color1, GXColor color2, GXColor color3)
Fake function to consume stack temporaries.
Global consume_color (GXColor color)
Fake function to consume a stack temporary.
Global COPY_ATTRS (gobj, attributeName)
Remove declarations. Doesn't really need to be a macro.
Global db
does the padding mean this should be in another file before this one?
Global doAirHitColl (HSD_GObj *gobj)
Can maybe me combined with doAirColl.
Global doAnim0 (HSD_GObj *gobj)

GET_FIGHTER

GET_FIGHTER

Global doAnim1 (HSD_GObj *gobj)

GET_FIGHTER

GET_FIGHTER

Struct DObjList
This was split out of ft/types.h to break a circular dependency with fighter-specific types.h headers. Figure out a better place for it.
Global doColl (Fighter_GObj *gobj, ftSeak_MotionState msid)
Named flags.
Global doIasa (Fighter_GObj *gobj)
Some kind of missing bool inline
Global DOUBLE_PI32
Move elsewhere.
Global dropcallback (void *)
Currently ~90% match - second loop uses pointer arithmetic instead of indexed store (stwx). Stack frame is 8 bytes too large.
Global ECBFlagStruct::b1234
Used as s32, fix type to eliminate casts
Global efAsync_Dispatch (s32 gfx_id, HSD_GObj *gobj, va_list vlist)
Only differs by register allocation and one stack slot.
Global expEvaluate (HSD_Exp *exp, u32 type, void *obj, HSD_ObjUpdateFunc update_func)
should HSD_ObjData be 4 bytes larger?
Global fabsf (f32 x)
Move elsewhere.
Global fake1 (void)
Remove
Global Fighter::x1670 [1]
figure out proper size
Global Fighter_800679B0 (void)
&fighter_alloc_data+2, +3, +4 are not defined in the fighter.s
Global Fighter_804D64F8
verify that this is really a spawn number counter, then rename this var globally
Global Fighter_804D64FC
Fighter_804D64FC..Fighter_804D6550 are initialized to 0 in Fighter_LoadCommonData, probably all pointers
Global Fighter_PoisonMushroomApply (Fighter_GObj *gobj)
Float hack
Global Fighter_procUpdate (Fighter_GObj *gobj)

these double_lower_32bit variables are probably integer

incompatible-pointer-types because bad headers

We set this velocity to 0 after applying it. Is this SDI or ASDI?

do the bitflag tests here tell us if the player is dead?

Global Fighter_UnkRecursiveFunc_8006D044 (Fighter_GObj *gobj)
What is going on here?
Global flt_804D7FD8
float order hack
Global fn_8016E2BC (void)
The loop's SFX flag load uses a different equivalent address form.
Global fn_80175D34 (void)
:: why does this have so much stack space
Global fn_8017AD04 (s32, s32)
:: figure out how to force the other functions not to inline this
Global fn_8018E46C (HSD_GObj *, int)
Currently 98.8% match - permuter couldn't improve beyond score 140
Global fn_80191FD4 (HSD_GObj *)
Only differs by callee-saved register selection in the second block.
Global fn_80193FCC (s32 *arg, u32 arg0, u32 arg01)
Only differs by an r6/r7 swap in the second settings block.
Global fn_80197E18 (HSD_GObj *)
Currently 69.71% match - needs register allocation fix Updates player HUD element visibility and position.
Global fn_80197FD8 (HSD_GObj *)
Currently 70.24% match - needs register allocation fix Updates JObj visibility based on menu option and player state.
Global fn_801981A0 (HSD_GObj *)
Down to linking Updates player cursor animation and position.
Global fn_80198C60 (void)
Currently 99.63% match - permuter couldn't improve (instruction scheduling) Initializes tournament mode text displays.
Global fn_8019A158 (void)

All instructions match; only the callee-saved register assignment is permuted against the target.

byte-offset walker: player_standings[i] is biased +0x58 from the MatchEnd base the original walks from.

Global fn_8019A86C (TmData *, u32, u32)
The bracket-entry fill's address/value temps trade r0/r4.
Global fn_8019CFA4 (HSD_GObj *)
is there a different inline here? seems cursed
Global fn_801A7FB4_inline (void)
Figure out where this goes
Global fn_80200460 (void *user_data, int joint_id, CollData *coll, int coll_x50, mpLib_GroundEnum ground_kind, float delta_y)
weird regswap
Global fn_80227904 (HSD_GObj *camera, int port)
port should probably be a u8, but it's difficult
Global fn_8022AFEC (HSD_GObj *)

figure out the inlines

problem spot

Global fn_80258ED0_helper (void)

GET_804D6C88 blows the stack

hacky

Global fn_802590C4 (HSD_GObj *gobj)
GET_804D6C88 breaks these
Global fn_802590C4_inline (HSD_GObj *gobj)
GET_804D6C88 breaks these
Global fn_8027DAC8 (Item_GObj *gobj)
cant figure out the correct inline for this.
Global fn_802BB694 (Item_GObj *gobj)
Shared inline with fn_802BB784 fn_802BB574, fn_802BB44C
Global fn_803A6FEC (u8 *, s32, s32 *)
there seems to be a file boundary before this function, because its data section is 8-byte aligned after the previous C strings
Global fn_ToggleItemCollisionBubbles (void)
avoid auto-inlining into fn_CheckItemAndPokemonMenu
Global FOG_ASSERT (line, cond)
replace with fog.h inlines
Global forceFloatOrder0 (void)
Float order hack.
Global forceFloatOrder1 (void)
Float order hack.
Global forceFloatOrder2 (void)
Float order hack.
Global ft_8007C2E0 (Fighter *fp0, HitCapsule *hit0, Fighter *fp1, HitCapsule *hit1)
This is just the same inline twice.
Global ft_800C80A4 (Fighter *fp)
maybe uses a shared inline with ftmetal functions?
Global ft_CheckGroundAndLedge (Fighter_GObj *gobj, s32 direction)
Name does not follow our conventions.
Global ftAction_80071028 (Fighter_GObj *gobj, CommandInfo *cmd)
i believe they are actually read in reverse order, maybe
Global ftAction_8007121C (Fighter_GObj *gobj, CommandInfo *cmd)
this matches but isnt pretty. maybe an inline/macro as
Global ftAction_80071820 (Fighter_GObj *gobj, CommandInfo *cmd)
Heavily suggests that Fighter::cmd_vars is not an array.
Global ftAnim_80070A10 (Fighter *, Fighter_Part, FigaTree *)
inline this
Global ftAnim_80070E74 (Fighter_GObj *)
inline ftAnim_80070C48 here?
Global ftBossLib_8015C270 (void)
Get msid
Global ftBossLib_8015C2A8 (void)
Get msid
Global ftBossLib_8015C2E0 (void)
Get ASIDs
Global ftBossLib_8015C31C (void)
Get ASIDs
Global ftBossLib_8015C6BC (void)
Can be GET_FIGHTER when inlines are fixed.
Global ftCa_SpecialAirN_IASA (HSD_GObj *gobj)
Fake double assignment.
Global ftCa_SpecialAirN_Phys (HSD_GObj *gobj)
Fake double assignment.
Global ftCa_SpecialLw_Coll (HSD_GObj *gobj)
Pull out these check functions
Global ftCa_SpecialS_OnDetect (HSD_GObj *gobj)
It might be possible to merge this with the below branch.
Global ftCamera_UpdateCameraBox (HSD_GObj *gobj)

lol

this line changes everything lol

Global ftCaptain_SpecialN_GetAngleVel (Fighter *fp)

Join declarations and assignments somehow.

Eliminate f.

Global ftCh_Wait1_1_Anim (HSD_GObj *gobj)
GET_JOBJ
Global ftCheckThrowB0 (Fighter *fp)
This and ftCheckThrowB3, etc. are probably one macro or something.
Global ftCl_AppealS_Anim (HSD_GObj *gobj)
There might be only one Fighter* here.
Global ftCo_8008A7A8 (Fighter_GObj *gobj, WaitStruct *arg1)
Manually inlined ftCo_8008A6D8 here, not clean but only way I could make it match
Global ftCo_80091AD8 (Fighter_GObj *gobj, int mv_x20)
inline of ftCo_80091A4C and something else.
Global ftCo_80092F2C (HSD_GObj *gobj, bool arg1)
What happens to this value?
Global ftCo_800932DC (Fighter_GObj *gobj)
Fake.
Global ftCo_800939B4 (Fighter_GObj *gobj)
Shares a lot of code with ftCo_800923B4
Global ftCo_80093A50 (Fighter_GObj *gobj)
Shared code with ftCo_8009388C.
Global ftCo_80095328 (Fighter_GObj *, bool *)
A lot of shared code with ftCo_80094EA4.
Global ftCo_800958FC (HSD_GObj *gobj, FtMotionId msid)
Mostly just an inline of ftCo_800957F4.
Global ftCo_80099644 (Fighter_GObj *gobj)
Shared code with ftCo_Escape_Anim.
Global ftCo_8009AB9C (Fighter_GObj *gobj)
Shared code with ftCo_8009AEA4.
Global ftCo_8009B040 (Fighter_GObj *gobj)
Shared code with ftCo_8009AEA4.
Global ftCo_8009CB40 (Fighter *fp, ssize_t bone_idx, bool, FigaTree *)
Global ftCo_800A0148 (Fighter *)
Static functions belong in #ftCo_0A01.c
Global ftCo_800A5F4C (Fighter *fp, ItemKind)
stupid stack padding hack
Global ftCo_800AABC8 (Fighter *fp)
Using ftCo_CpuTurnAwayFromLedge here changes inlining in ftCo_800AB224.
Global ftCo_800B0CA8 (Fighter *fp0, Fighter *fp1)
fakematched control flow
Global ftCo_800B77E8 (Fighter *)
Sharing this last case shifts every collision stack slot.
Global ftCo_800BCAF4 (Fighter_GObj *gobj)
Shared code with ftCo_800BC9C8. Simple inline doesn't work.
Global ftCo_800BCE64 (Fighter_GObj *gobj, FtMotionId msid)
Use ftCo_Thrown_Enter.
Global ftCo_800BDA50 (Fighter_GObj *gobj)
Which mv is this?
Global ftCo_800BDB58 (Fighter_GObj *gobj, Fighter_GObj *thrower_gobj)
Possibly another callback in inlineB2
Global ftCo_800BE000 (Fighter_GObj *gobj, Fighter_GObj *thrower_gobj)
Possibly another callback in inlineB2
Global ftCo_800C0694 (Fighter *fp)
Wrong return type. Union?
Global ftCo_800C07F8 (Ground_GObj *, u32, void *)
pretty sure arg2 is a ftDevice callback, but unsure if its always of type ftDevice_Callback0.
Global ftCo_800C0B20 (Fighter_GObj *gobj)
Eliminate cast
Global ftCo_800C1E64 (HSD_GObj *pPlayerEntityStruct, s32, s32, u8, f32)
UnclePunch Map file: AS_203_PassiveWalljump_Walljump
Global ftCo_800C23FC (Fighter_GObj *gobj)
Shared code with ftCo_800C1E64.
Global ftCo_800C5614 (Fighter_GObj *gobj)
Cannot move below fp, which suggests an inline
Global ftCo_800C57B4 (Fighter_GObj *gobj)
Cannot move below fp, which suggests an inline
Global ftCo_800C5A98 (Fighter_GObj *gobj)
Cannot move below fp, which suggests an inline
Global ftCo_800C5B88 (Fighter_GObj *gobj, enum_t)
Cannot move below fp, which suggests an inline
Global ftCo_800C5D34 (Fighter_GObj *gobj)
Cannot move below fp, which suggests an inline
Global ftCo_800C6150 (Fighter_GObj *gobj)
ftCo_800C7070
Global ftCo_800C7070 (Fighter_GObj *gobj)
ftCo_800C6150
Global ftCo_800CE1D4 (HSD_GObj *fighter_gobj)
Cannot use ftCheckThrowB0 under the surrounding dont_inline.
Global ftCo_800CEFE0 (Fighter_GObj *gobj, int)
What is this copypasta...
Global ftCo_800D105C (Fighter_GObj *gobj)
fix stack
Global ftCo_800DEAE8 (HSD_GObj *gobj, enum_t asid0, enum_t asid1)
enum params
Global ftCo_AttackAir_CheckItemThrowInput (Fighter_GObj *gobj)
This is exactly checkItemThrowInput but it uses too much stack for ftCo_AttackAirLw_IASA to call it.
Global ftCo_AttackS4_8008C114 (Fighter_GObj *gobj)
Can maybe be combined with ftCo_AttackS4_CheckInput
Global ftCo_CaptureDamageHi_Coll (Fighter_GObj *gobj)
Fix duplicate ft_80083C00 usages
Global ftCo_Damage_CalcKnockback (Fighter *fp)
Probably a switch.
Global ftCo_GuardOff_IASA (Fighter_GObj *gobj)
RETURN_IF chain
Global ftCo_HammerLanding_Enter (Fighter_GObj *gobj)
Cannot move below fp, which suggests an inline
Global ftCo_OttottoWait_Coll (Fighter_GObj *gobj)
Shared code with ftCo_Ottotto_Coll
Global ftCo_ThrownCopyStar_Coll (Fighter_GObj *gobj)
Shared code with ftCo_ThrownKirbyStar_Coll but an inline uses too much stack.
Global ftCo_ThrownKirbyStar_Coll (Fighter_GObj *gobj)
Shared code with ftCo_ThrownCopyStar_Coll but an inline uses too much stack.
Global ftColl_800764DC (Fighter_GObj *gobj)
GET_FIGHTER adds an instruction
Global ftColl_80076ED8 (Fighter *fp0, HitCapsule *hit0, Fighter *fp1, HitCapsule *hit1)
inline
Global ftColl_80079C70 (Fighter *, Fighter *, HitCapsule *, int)

Restore expanded inline.

Expanded inline of ftColl_GetDamageCount; re-inline when the call form matches.

Restore expanded inline.

Global ftColl_8007B1B8 (Fighter_GObj *gobj, ShieldDesc *shield, HSD_GObjEvent cb)
shield is AbsorbDesc, and AbsorbDesc is part of ShieldDesc
Global ftCommon_8007CEF4 (Fighter *)
This surely calls ftCommon_ApplyFrictionAir somehow...
Global ftCommon_8007FA58 (Fighter_GObj *, Item_GObj *)
This is an inline.
Global ftCommon_8007FE84 (Fighter_GObj *, Fighter_GObj *, s32, float)
static
Global ftCommon_800804EC (Fighter *)
DataOffset_PlayerScale_MultiplyBySomething
Global ftCommonData::x6D8 [1]
expand to actual size
Global ftData::x48_items
might be similar to KirbyHat? see ftPr_Init_8013C360
Global ftDk_Init_OnLoad (HSD_GObj *gobj)
GET_FIGHTER
Global ftDk_MS_346_800E05E4 (HSD_GObj *gobj)
GET_FIGHTER
Global ftDk_MS_348_800E04A4 (HSD_GObj *gobj, s32 arg1)
GET_FIGHTER
Global ftDk_SpecialAirS_Phys (HSD_GObj *gobj)
Fix control flow.
Struct ftDonkey_MotionVars::ftDonkey_State5Vars
Rename to correct state.
Struct ftDonkey_MotionVars::ftDonkey_State7Vars
Rename to correct state.
Struct ftDonkey_MotionVars::ftDonkey_State8Vars
Rename to correct state.
Global ftDrawCommon_80080E18_inline2 (HSD_GObj *gobj, Fighter *old)
this seems to be using the wrong common attributes
Global ftFox_SpecialLw_InlinePhys (HSD_GObj *gobj)
Shared inline with other functions in this file.
Global ftFx_AppealS_CheckIfUsed (Fighter *fp)
Fix formatting
Global ftFx_SpecialAirHi_Coll (HSD_GObj *gobj)

Rework this entire match.

This match is definitely fake.

Global ftFx_SpecialAirNLoop_Anim (HSD_GObj *gobj)

Fake assignment.

Unused assignment.

Global ftFx_SpecialHi_Anim (HSD_GObj *gobj)
Common inline with ftFx_SpecialAirHi_Anim.
Global ftFx_SpecialHi_Phys (HSD_GObj *gobj)
Possibly common inline with ftFx_SpecialAirHi_Phys.
Global ftFx_SpecialLw_CreateLoopGFX (HSD_GObj *gobj)
Shared inline with ftFx_SpecialLw_CreateStartGFX.
Global ftFx_SpecialLwLoop_Anim (HSD_GObj *gobj)
Shared inline with ftFx_SpecialAirLwLoop_Anim.
Global ftFx_SpecialLwTurn_Anim (HSD_GObj *gobj)
Shared inline with ftFx_SpecialAirLwTurn_Anim.
Global ftFx_SpecialN_CreateBlasterShot (HSD_GObj *gobj)
Seems fake, probably one or more missing inline functions.
Global ftFx_SpecialNLoop_Anim (HSD_GObj *gobj)
Fake assignment.
Global ftFx_SpecialS_CheckGhostRemove (HSD_GObj *gobj)
enum
Global ftGw_SpecialLw_AbsorbThink_DecideAction (HSD_GObj *gobj)
enum
Global ftGw_SpecialLw_Anim (HSD_GObj *gobj)

Shared inline with ftGw_SpecialAirLw_Anim.

Frame number constant

Global ftGw_SpecialLw_IASA (HSD_GObj *gobj)
Shared inline with ftGw_SpecialAirLw_IASA.
Global ftGw_SpecialLw_ItemCheckPanicRemove (HSD_GObj *gobj)
enum
Global ftGw_SpecialLw_ItemPanicSetup (HSD_GObj *gobj)
Can't move below _.
Global ftGw_SpecialLw_UpdateBucketModel (HSD_GObj *gobj)
enum for parts
Global ftGw_SpecialLwShoot_Anim (HSD_GObj *gobj)
Shared inline with ftGw_SpecialAirLwShoot_Anim.
Global ftGw_SpecialLwShoot_ReleaseOil (HSD_GObj *gobj)

Shared inline with ftGw_SpecialAirLwShoot_ReleaseOil

Please for the love of god stop copy-pasting code

Global ftGw_SpecialN_Loop (HSD_GObj *gobj, float anim_frame)
Shared inline with ftGw_SpecialAirN_Loop.
Global ftGw_SpecialS_Enter (HSD_GObj *gobj)
Shared inline with ftGw_SpecialAirS_Enter.
Global ftGw_SpecialS_GetRandomInt (HSD_GObj *gobj)
getFighter can be factored out somehow.
Global ftGw_SpecialS_ItemCheckJudgementRemove (HSD_GObj *gobj)
enum
Struct ftKb_DatAttrs
Every hat is its own struct.
Global ftKb_Init_800EE528 (void)
Bad cast.
Global ftKb_Init_UnkMotionStates6 (Fighter_GObj *gobj)
What???
Global ftKb_MF_MultiJump
Clean up factorization
Global ftKb_SpecialHi1_Phys (Fighter_GObj *gobj)
Remove This
Global ftKb_SpecialHi2_Phys (Fighter_GObj *gobj)
Remove This
Global ftKb_SpecialN_800EF0E4_insert_joint_refs (s32 *total_dobjs, HSD_Joint *root, Fighter *fp, s32 *part_off, HSD_Joint **joint, s32 *joint_idx, s32 *byte_base)
byte_base is always zero; it reproduces retail's shift-derived offset initialization, suggesting the original code indexed bones by element index rather than byte offset.
Global ftKb_SpecialNGw_8010CC6C (HSD_GObj *gobj)
Named flags.
Global ftKb_SpecialNGw_8010CCD4 (HSD_GObj *gobj)
Named flags.
Global ftKb_SpecialNNs_800FED38 (HSD_GObj *gobj)
da can't move below fp
Global ftKb_SpecialNNs_800FEDD0 (HSD_GObj *gobj)
da can't move below fp
Global ftKb_SpecialNPe_8010C8D8 (HSD_GObj *gobj)

Flag names.

da can't move below fp

Global ftKb_SpecialNPe_8010C9CC (HSD_GObj *gobj)

Named flags.

da can't move below fp

Global ftKb_SpecialNSs_800FCC14 (Fighter_GObj *gobj, long *out1, long *out2)
float hack
Struct ftKoopa_MotionVars::ftKoopa_SpecialSVars
Possibly ftKoopa_State1Vars.
Struct ftKoopa_MotionVars::ftKoopa_State1Vars
Proper state name.
Global ftKp_Init_OnLoad (HSD_GObj *gobj)
GET_FIGHTER is 8 bytes too much stack but it should be possible
Global ftKp_SpecialAirSHit_IASA (HSD_GObj *gobj)
Shared inline with ftKp_SpecialSHit_IASA.
Global ftKp_SpecialS_8013322C (HSD_GObj *gobj)
fp0 cannot move below fp1, which is very strange. Perhaps there is a temporary Fighter* somewhere.
Global ftKp_SpecialSHit_Anim (HSD_GObj *gobj)

Combine fp0 with other branch somehow

Combine fp0 with other branch somehow

Global ftKp_SpecialSHit_IASA (HSD_GObj *gobj)
Shared inline with ftKp_SpecialAirSHit_IASA.
Global ftLg_SpecialS_Anim (HSD_GObj *gobj)
Shared inline with ftLg_SpecialAirS_Anim.
Global ftLg_SpecialS_Enter (HSD_GObj *gobj)
Shared inline with ftLg_SpecialAirS_Enter.
Global ftLg_SpecialSHold_Anim (HSD_GObj *gobj)
Shared inline with ftLg_SpecialAirSHold_Anim.
Global ftLg_SpecialSHold_Enter (HSD_GObj *gobj)
Shared inline with ftLg_SpecialAirSHold_Enter.
Global ftLib_80086198 (HSD_GObj *)
Figure out how these are really declared
Global ftLib_8008741C (u32)
Is i really u32?
Global ftLk_SpecialAirLw_Coll (HSD_GObj *gobj)
Verify MSID.
Global ftLk_SpecialAirNStart_IASA (Fighter_GObj *gobj)
Same as ftLk_SpecialNStart_IASA with different MSID
Global ftLk_SpecialAirS_Enter (HSD_GObj *gobj)
Share code with ftLk_SpecialS_Enter. A simple inline won't work.
Global ftLk_SpecialLw_Coll (HSD_GObj *gobj)
Verify MSID.
Global ftLk_SpecialN_Enter (Fighter_GObj *gobj)
Float order hack
Global ftLk_SpecialN_UnsetArrow (Fighter_GObj *gobj)
Does this actually do anything? Doesn't seem to return bool.
Global ftLk_SpecialN_UnsetFv14 (Fighter_GObj *gobj)
Does this actually do anything? Doesn't seem to return bool.
Global ftLk_SpecialNStart_IASA (Fighter_GObj *gobj)
Shared with ftLk_SpecialNLoop_IASA
Global ftLk_SpecialS1Empty_Coll (HSD_GObj *gobj)
Share code with ftLk_SpecialS1_Coll.
Global ftLuigi_SpecialS_Setup (HSD_GObj *gobj)
Use GET_FIGHTER.
Module ftmasterhand
These splits work with the floats but are not what one would expect for the text section.
Global ftMewtwo_SpecialHi_SetVars (HSD_GObj *gobj)
This is like three functions in one. Split it.
Global ftMh_BackCrush_Anim (HSD_GObj *gobj)
GET_JOBJ
Global ftMh_Drill_Phys (HSD_GObj *gobj)
GET_FIGHTER
Global ftMh_FingerGun1_Phys (HSD_GObj *gobj)
Not enough stack for GET_FIGHTER; inline issue.
Global ftMh_MS_343_801510B0 (HSD_GObj *gobj)
Probably same file if ftMh_MS_343_801511FC is getting implicitly passed.
Global ftMh_MS_349_80151CA8 (HSD_GObj *gobj)
The code matches, but is this right?
Global ftMh_MS_370_80153D2C (HSD_GObj *gobj)
GET_FIGHTER and GET_JOBJ both cause regswaps here, but they probably shouldn't.
Global ftMh_MS_389_80150C8C (HSD_GObj *gobj)
the #pragma above is preventing use of GET_FIGHTER.
Global ftMh_SweepLoop_Anim (HSD_GObj *gobj)
GET_FIGHTER
Global ftMh_TagApplaud_Anim (HSD_GObj *gobj)
inlined? possibly shared with ftMh_TagCrush_Anim
Global ftMh_Wait1_1_Phys (HSD_GObj *gobj)
GET_FIGHTER doesn't fit the stack.
Global ftMh_Wait1_2_Phys (HSD_GObj *gobj)
GET_FIGHTER
Global ftMh_WalkLoop_Anim (HSD_GObj *gobj)
GET_FIGHTER uses slightly too much stack; inline issue.
Global ftMh_WalkLoop_Phys (HSD_GObj *gobj)
GET_FIGHTER
Global ftMr_Init_OnLoad (HSD_GObj *gobj)
GET_FIGHTER is too much stack. Problem with PUSH_ATTRS?
Global ftMr_SpecialS_CreateCape (HSD_GObj *gobj)
Can't move below _.
Global ftMr_SpecialS_Phys (HSD_GObj *gobj)
Cannot be moved above unused0 or below unused1.
Global ftMs_SpecialAirLwHit_Anim (HSD_GObj *gobj)

required for some reason

register swap:

Global ftMs_SpecialLwHit_Anim (HSD_GObj *gobj)

required for some reason

register swap:

Global ftMs_SpecialN_80136A1C (HSD_GObj *gobj)
Named flags.
Global ftMs_SpecialN_80136A7C (HSD_GObj *gobj)
Named flags.
Global ftMs_SpecialN_80136DB4 (HSD_GObj *gobj)
Named flags.
Global ftMs_SpecialN_80136E14 (HSD_GObj *gobj)
Named flags.
Global ftMs_SpecialN_801371FC (HSD_GObj *gobj)
Named flags.
Global ftMs_SpecialN_801372A8 (HSD_GObj *gobj)
Named flags.
Global ftMt_SpecialAirHi_Enter (HSD_GObj *gobj)
Express as a fraction or something.
Global ftMt_SpecialAirS_AirToGround (HSD_GObj *gobj)
GET_FIGHTER
Global ftMt_SpecialHi_Enter (HSD_GObj *gobj)

Shared inline with ftMt_SpecialAirHi_Enter.

Probably a missing inline function.

Global ftMt_SpecialN_ReleaseShadowBall (HSD_GObj *gobj)

Missing inline function(s).

Missing inline function(s).

File ftNs_AttackHi4.h
Fix formatting
Global ftNs_AttackHi4_YoyoApplySmash (HSD_GObj *gobj)
Stack is too messed up for GET_FIGHTER.
Global ftNs_AttackHi4_YoyoCheckEnvColl (HSD_GObj *gobj, Vec3 *ECBUnk, Vec3 *ECBUnk2, float float_unk)
Define flags.
Global ftNs_AttackHi4_YoyoSetHitPos (HSD_GObj *gobj)
Can't move below fp.
Global ftNs_AttackHi4_YoyoSetHitPosUnk (HSD_GObj *gobj, float arg8)
Can't move below fp.
Global ftNs_AttackHi4_YoyoSetUnkPos (HSD_GObj *gobj, Vec3 *arg1)

Remove dont_inline. This is probably a result of incorrectly splitting out the function.

GET_FIGHTER is prevented by dont_inline.

Global ftNs_AttackHi4_YoyoThink_IsRemove (HSD_GObj *gobj)
Stack is too messed up for GET_FIGHTER.
File ftNs_Init.h
Fix formatting
Global ftNs_SpecialAirNRelease_IASA (HSD_GObj *gobj)
Nested return value
Global ftNs_SpecialHi_Enter (HSD_GObj *gobj)

Rewrite this.

Try to move these close to usage

Global ftNs_SpecialNRelease_IASA (HSD_GObj *gobj)
Nested return value
Global ftNs_SpecialNStart_Anim (HSD_GObj *gobj)
Can't move below _.
Global ftPe_8011D598 (HSD_GObj *gobj)
Can maybe use ensureUnkItem?
Global ftPe_Float_IASA (HSD_GObj *gobj)
Call #checkContinueFloatInput
Global ftPe_SpecialHiStart_IASA (HSD_GObj *gobj)
GET_FIGHTER
Global ftpickupitem_80094D90 (Fighter_GObj *gobj)
ftpickupitem_80094DF8
Struct ftPikachu_MotionVars::ftPikachu_State2Vars
Proper state name.
Struct ftPikachu_MotionVars::ftPikachu_State3Vars
Proper state name.
Global ftPk_SpecialAirHi_Enter (HSD_GObj *gobj)
Can't move below fp.
Global ftPk_SpecialAirHiEnd_Coll (HSD_GObj *gobj)
Fix weird control flow.
Global ftPk_SpecialAirHiStart0_Coll (HSD_GObj *gobj)
Fix weird control flow.
Global ftPk_SpecialHi_Enter (HSD_GObj *gobj)
Can't move below fp.
Global ftPk_SpecialLw_ChangeMotion_Unk00 (HSD_GObj *gobj)
GET_FIGHTER
Global ftPk_SpecialLw_ChangeMotion_Unk02 (HSD_GObj *gobj)
GET_FIGHTER
Global ftPk_SpecialLw_ChangeMotion_Unk04 (HSD_GObj *gobj)
GET_FIGHTER
Global ftPk_SpecialLw_ChangeMotion_Unk06 (HSD_GObj *gobj)
GET_FIGHTER
Global ftPr_Init_8013C360 (HSD_GObj *gobj)
clean up memory accesses - this looks similar to ftKb_SpecialN_800EFB4C
Global ftPr_Init_UnkMotionStates6 (HSD_GObj *gobj)
What???
Global ftPr_SpecialAirNChargeFull_Coll (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialAirNChargeFull_IASA (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialAirNChargeLoop_Anim (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialAirNChargeLoop_Coll (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialAirNChargeLoop_IASA (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialAirNChargeRelease_Coll (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialAirNEnd_Coll (Fighter_GObj *gobj)

Maybe shared inline with ftPr_SpecialNEnd_Coll?

Named flags.

Global ftPr_SpecialAirNStart_Anim (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialAirNStart_Coll (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialAirNStartTurn_Coll (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialNEnd_Coll (Fighter_GObj *gobj)
Named flags.
Global ftPr_SpecialNFull_Coll (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialNFull_IASA (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialNLoop_Anim (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialNLoop_Coll (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialNLoop_IASA (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialNRelease_Coll (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialNRelease_IASA (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialNStart_Anim (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialNStart_Coll (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialNTurn_Coll (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialNTurn_Phys (HSD_GObj *gobj)
Named flags.
Global ftPr_SpecialS_8013D764 (HSD_GObj *gobj)
Named flags.
Struct ftSamus_MotionVars::ftSamus_State2Vars
Proper state name.
Struct ftSamus_MotionVars::ftSamus_State5Vars
Proper state name.
Struct ftSamus_MotionVars::ftSamus_State6Vars
Proper state name.
Struct ftSamus_MotionVars::ftSamus_State7Vars
Proper state name.
Global ftSk_SpecialAirHiStart_1_Coll (HSD_GObj *gobj)
float hack
Global ftSk_SpecialNLoop_Coll (Fighter_GObj *gobj)
Named flags.
Global ftSk_SpecialNStart_Coll (Fighter_GObj *gobj)
Named flags.
Global ftSk_SpecialS_80110AEC (HSD_GObj *gobj)
The inlines in this file are wrong; this block should be ftSk_SpecialS_ZeroHitboxPositions.
Global ftSk_SpecialS_80111830 (HSD_GObj *gobj)
Split into two functions, one with
Global ftSk_SpecialS_CheckInitChain (HSD_GObj *gobj)
Probably an inline.
Global ftSk_SpecialSEnd_Anim (HSD_GObj *gobj)
Split inner function
Global ftSs_Init_LoadSpecialAttrs (HSD_GObj *gobj)
Shared code wit ftPk_Init_LoadSpecialAttrs
Global ftYs_Init_8012BE3C (HSD_GObj *gobj)
Some kind of inline here.
Global ftYs_MF_Special
Fix names
Global ftYs_Shield_8012C49C (HSD_GObj *gobj)
Why is this still using fp0?
Global ftYs_Unk1_803B75C0
Belongs in #ftYs_Guard.c?
Global ftZd_SpecialAirHiStart_1_Coll (HSD_GObj *gobj)
sa can't move below coll_data, which suggests a function boundary.
Global func_80151484_inline1 (HSD_GObj *gobj)
GET_FIGHTER
Global get_jobj (HSD_GObj *gobj)

Figure out how to use GET_JOBJ instead.

Figure out how to use GET_JOBJ instead.

Figure out how to use GET_JOBJ instead.

Global get_max_and_fill_stack (void)
What.
Global get_subject_x1C (CmSubject *subject)
i dont think this is real but it fixes some reg swaps in Camera_8002D318
Global get_zero (void)
Float reorder hack
Global GetFighterData (HSD_GObj *gobj)
ftNs_AttackHi4_Anim literally won't match under any circumstances unless this inline is used to get Fighter*.
Global gm_80169238 (u8)
Matching tactic: pad the pre-inline statement count so MWCC keeps direct calls to this accessor instead of auto-inlining them.
Global gm_8016A164 (void)
Offset mismatch indicates a TU split between lbl_8046B378 and lbl_8046B488
Global gm_8016C6C0 (Item_GObj *)
should take Fighter_GObj*? See ftCo_800A53DC
Global gm_80172174 (void)
create struct of size 0x4D8 returned by gmMainLib_8015CCE4
Global gm_80181998 (void)
Keep lbl_80472ED8 before lbl_80473594 in .bss.
Global gm_80182554 (int, int)
Original addresses these fields relative to lbl_80472ED8 (reference relocations are lbl_80472ED8+0x6BC..+0x6C8): lbl_80473594 overlays lbl_80472ED8+0x6BC (0x80472ED8 + 0x6BC == 0x80473594), and gm_80182578 below already reads the same storage via lbl_80472ED8.record[0].
Global gm_8019B2DC_OnFrame (void)
Currently 89.97% match - permuter couldn't improve Per-frame update for tournament mode menu.
Global gm_801A6254 (GameScene *)
this file also contains the OnEnter callback for GS_DEBUG_MENU, which should probably be split out into a separate file
Global gm_801AC6D8_OnEnter (void *)
Length of gm_804D6844 is 10
Global gm_801B18D4 (GameScene *)
:: figure out how to call this not inlined
Global gm_801BF128 (void)
The reference calls gm_801BF634 / gm_801BF6A8 / gm_801BF6C8 / gm_801BF6E8 without sign-extending the argument, which their s8 signatures force here (extsb at each call site). Matching this function needs int-argument signatures for those setters, but that breaks the setters' own 100% matches, so the s8 signatures are kept.
Global gm_803DA920 []
Do these callbacks have uniform signatures, or polymorphic user data?
Global gm_803DD6D0_Scenes []
Possible split here due to usage of gm_80480DC8
Global gm_80490960
also contains Target scenes, maybe gmstadium is a better name, since these are all in the single player "stadium" menu
Global gm_804D43E8
Fix this callback signature
Global gm_804DAC88
.sdata2 order hack
Struct gm_controller_map
Move to C file
Global gmCamera_801A3634_OnEnter (void *arg0)
Required for the retail 0x20-byte stack frame; without this pad, focused checkdiff differs only in five stack-frame offsets (99.72222%).
Global gmScriptEventCast (p_event, type)
Fix naming.
Global grBattle_GObj1_Callback0 (Ground_GObj *gobj)
grBattle_GObj5_Callback0
Global grBattle_YakumonoParam::bg_curr_color_overlay
ColorOverlay_x8_t, from grMaterial_801C9604
Global grBigBlue_801EACE8 (HSD_JObj *, Vec3 *, f32 *, f32, f32)
Currently 98.17% match - car section generates fnmsubs instead of fmuls+fsubs; compiler fuses multiply-subtract differently than target
Global grBigBlue_801EC6C0 (Ground_GObj *)
Needs register allocation fixes.
Global grBigBlue_801ED694 (Ground_GObj *, s32)

Currently partial match - complex car physics simulation

The collision scratch vector sits four bytes low.

Global grBigBlue_801EDF44 (Ground_GObj *, s32)
Currently 87.41% match - compiler CSEs gp+offset into one register (4 NV regs) instead of keeping them separate (5 NV regs, stmw r27)
Global grBigBlue_801EF424 (Ground_GObj *)
Currently 99.88% match - instructions match but relocations differ
Global grBigBlueRoute_8020BF38 (Ground_GObj *)
Currently 98.29% match - register allocation only (extra mr through r0 for first loop jobj load and idx computation)
Global grBigBlueRoute_8020DAB4 (HSD_JObj **, float, int)
Currently 97.73% match - needs register allocation fix (r27/r30 swap for arr/jobj)
Global grBigBlueRoute_SpawnRoute (s32 route_idx, Ground *gp, Ground_GObj *gobj)
Register allocation and addressing-mode choices for RouteEntry stores.
Global grCastle_ForceSdata2Order (void)
Remove this ordering anchor.
Global grCorneria_801DEC08 (Vec3 *)
Stage_IsOutsideBlastZone here perturbs grCorneria_801DED50.
Global grCorneria_801DEC94 (Vec3 *)
Stage_IsOutsideBlastZoneWithMargin breaks the fallthrough.
Global grCorneria_801E03C8 (Ground_GObj *, int)
Fake return type, function returns nothing and its return value is not used either
Global grCorneria_801E25C4 (HSD_GObj *, struct grSmashTaunt_GroundVars *, int, int, int)
Only differs by a callee-saved register permutation.
Global grDatFiles_803E0848
Merge declaration and definition
Global grDatFiles_803E0924
Merge declaration and definition
Global grHeal_8021EFEC (u32)
Ground_SetupStageCallbacks
Global grHeal_8021F70C (enum_t character_id)
Eliminate gotos, use enum members
Struct grIceMt_GObj1_GroundVars
Map_GroundVars?
Global grInishie1_801FAD84 (HSD_GObj *)
same layout as grInishie1_801FB3F0_Vars; the shared grInishie1_GroundVars/grInishie1_Block structs are likely wrong (xC4 should be u16, block x4 is s16 and x10 is an f32)
Struct grInishie1_GroundVars

probably mistakes in this and Vars2

this is Map_GroundVars

Global grInishie1_GroundVars::block
Occupies same offset as Map_GroundVars::lv_gobj but both appear in asserts under u.map
Global grInishie2_801FCF2C (HSD_GObj *)
this stage and mushroom kingdom 1 both change the music when there's less than 20 seconds, since this function is copy-pasted from grInishie1_801FCB10 then Ground_801C5A94 is probably getting a stage identifier of some kind
Global grInishie2_801FD224 (Ground_GObj *)
union irregularity
Global grIzumi_801CC358 (Ground_GObj *gobj)
float load order (41c)
Global GrJoint::x
rename fields
Global grKongo_801D5340 (int gobj_id)
Ground_SetupStageCallbacks
Struct grKongo_GroundVars
Should be merged with grOldKongo_GroundVars
Struct grKongo_GroundVars3
Investigate if these extra structs could be shared among stages/other things as more are decompiled.
Global grLast_803B8480
Mtx?
Global grLast_804D4968 []
Size is wrong but type is correct; using SDATA as a hack Implies that GrJoint is the wrong size/layout
Global grMc_StackPad (grMc_StackPadArg arg)
Fake function: exists only to reproduce the retail stack layout.
Global grMuteCity_801EFD0C (int)
Ground_SetupStageCallbacks
Global grOldPupupu_80210D10 (Ground_GObj *)
Reusing gobj as the pointer carrier selects retail registers.
Global grOldYoshi_8020EFCC_inline (Ground_GObj *arg0)
For some reason, the normal GET_GROUND didn't work here
File ground.c
Don't hardcode 8
File ground.h
Get stage's "yakumono" ("about"?) param
Global Ground_801C24F8 (StKind stkind, u32, s32 *)

phi_r30 probably belongs to an inline.

Weird comparison, but typing StageParam::x10 as signed doesn't match and neither does typing BGM_Undefined as unsigned.

Even weirder.

Global Ground_801C3128 (int gobj_id, void(*)(int))

Unused variable; is this an argument?

cur cannot be swapped below max, hinting at a missing inline function.

Global Ground_801C32D4 (s32, s32)

Shared inline with Ground_801C33C0.

Might be an inline starting here.

Global Ground_801C33C0 (s32, s32)
Might be an inline starting here.
Global Ground_801C4100 (HSD_JObj *jobj)
Why isn't this emitted to jobj.c?
Global Ground_801C4210 (void)
With a hard-coded range for i, very unlikely it's not returning an enum. Probably preset joints (accesses a list of HSD_JObj).
Global Ground_801C5878 (void)
Why is global_optimizer necessary?
Global Ground_SetupStageCallbacks (Ground_GObj *gobj, StageCallbacks *callbacks)
Call sites have a lot of duplicate code
Struct GroundParam
Most fields are still unidentified.
Global grPs_8049F040
This is only size 0x100 in the object, but a single TextGlyphTexture is size 0x200. Should TextGlyphTexture be smaller?
Global grPs_804DAF2C
is there a way to prevent these being upcast to double when passed to variadic sislib functions?
Global grRCruise_801FF8E4 (Ground_GObj *)
What
Global grRCruise_802010A4 (void *user_data, int joint_id, CollData *coll, int coll_x50, mpLib_GroundEnum ground_kind, float delta_y)
weird regswap
Global grVenom_80203B18 (void)
shared loop with grVenom_8020454C
Global grVenom_GroundVars::xC4
Not a u32, either grSmashTaunt_GroundVars or HSD_GObj
Global gxlink_prio8 (void)
these are probably somewhat fake, but maybe a combination of this + render_gxlink_pass is the real deal.
Global HALF_PI32
Move elsewhere.
Global handleColl (HSD_GObj *gobj)
GET_FIGHTER
Global hasExtraFighterId (ftMapping *data)
This can be used in more places when functions are fixed to use correct structs.
Global hsd_803AC340 (void *header)
Currently 99.50% match - return expression register allocation (add dest r6 vs r3)
Global hsd_804D2648 [0x828]
Declared as __jmp_buf (0xF8 bytes) by users, but the object is 0x828 bytes: a JpegWork whose first member is the jmp_buf (see hsd_3B34.c).
Global HSD_ASSERT (line, cond)
Take file as another arg, ignore it if BUGFIX.
Global HSD_FogSet (HSD_Fog *)
Eliminate cast
Global HSD_GObj_Entities
GObjList is a fake type, this is just a double pointer (pointer to array of HSD_GObj*, indexed by p_link)
Global HSD_GObj_JObjCallback (HSD_GObj *gobj, int arg1)
don't inline HSD_GObj_80390EB8 is there a file boundary between HSD_GObj_80390EB8 and HSD_GObj_JObjCallback?
Struct HSD_GObjList
Belongs in melee/ somewhere
Global HSD_JObjGetTranslation2 (HSD_JObj *jobj, Vec3 *translate)
Likely fake but needed by vi0502 as there is a usage of HSD_JObjGetTranslation that lacks the 2nd assert
Global HSD_JObjRemoveAll (HSD_JObj *)
Regswaps
Global HSD_JObjSetMtxDirtyInline (HSD_JObj *jobj)
See lb_800117F4
Global HSD_LObjGetNext_padstack (HSD_LObj *arg0)
Useless wrapper
Global HSD_LObjGetType_padstack (HSD_LObj *lobj)
HSD_LObjGetType
Global HSD_MtxInverseConcat (Mtx inv, Mtx src, Mtx dest)
try to get rid of this
Global HSD_PadLibData
Circular dependency
Global HSD_SisLib_803A6048 (size_t)
Currently 97.56% match - extra lwz reload optimized away by compiler after dual global store
Global HSD_SisLib_803A6754 (int arg0, s32 arg1)

This being a byte store means one of my assumptions is wrong;

Do any other Data struct usages have a 0xC member?

Global HSD_Synth_80388E08 (int)
AXVPB prev must be a signed int type, not a pointer
Global HSD_Synth_80389334 (int sfx_id, u8 vol, u8 vol2, u8 pan, int priority, u8 itd_flag, float pitch1, float pitch2, float mix_main, float mix_auxA, float mix_auxB)

Currently 96.8% match - remaining r30/r31 base allocation and r29 loop-counter computation differ.

Type pun writes ratioHi+ratioLo as u32; no union in AXPBSRC. Needed for match - AXPBSRC lacks a u32 ratio field.

what is going on here...

Struct ifStock_804A1378_x204
merge with IfStockUserData
Global inline_test_3 (HSD_JObj *jobj, f32 val, u8 loops, HSD_TypeMask type)
One of these inlines is probably correct
Global inlineA0 (Fighter_GObj *gobj, HSD_GObjEvent cb)
ftCo_CaptureWaitKoopa_Anim
Global inlineA0 (Fighter_GObj *gobj, enum_t arg1, enum_t arg2, Fighter_Part part, float *param)
This is a common inline. Needs to be solved and placed in a header. Could also be a real library function.
Global inlineA0 (Fighter *fp0, Fighter *fp1, HitCapsule *hit1, Vec3 *ef_pos, float dmg)

Probably the same function as inlineA1

int_dmg = getEnvDmg(dmg);

ftColl_80076808(fp1, hit1, 3, fp0, true);

Global inlineA0 (void)
inline appears in lb_800115F4
Global inlineA1 (Fighter *fp0, HitCapsule *hit0, Fighter *fp1, HitCapsule *hit1, Vec3 *ef_pos, float dmg)

int_dmg = getEnvDmg(dmg);

ftColl_80076808(fp1, hit1, 3, fp0, false);

Global inlineB0 (Fighter_GObj *gobj)
Can probably share some more code with inlineA2
Global inlineB0 (Fighter *fp0, HitCapsule *hitbox, Fighter *fp1, int arg3)
ftColl_80076808
Global inlineB3 (Fighter_GObj *gobj)
Inline depth.
Global inlineM0 (float x)
Maybe a macro?
File it_266F.h
File it_26B1.h
Global it_2725_Logic43_Clanked (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
Global it_3F14_Logic2_Spawned (Item_GObj *)
float regswap. same as in it_3F14_Logic5_Spawned
Global it_3F14_Logic5_Spawned (Item_GObj *)
float regswap. same as in it_3F14_Logic2_Spawned
Global it_8026B9A8 (Item_GObj *gobj, HSD_GObj *arg1, Fighter_Part arg2)
Not enough stack for GET_JOBJ.
Global it_8026BB88 (Item_GObj *gobj, Vec3 *pos)
Why is this always zero? Stripped something?
Global it_8026BBCC (Item_GObj *gobj, Vec3 *pos)
Why is this always zero? Stripped something?
Global it_8026BDCC (Item_GObj *gobj)
Each of these is an inlined function. Some are already defined.
Global it_8026BE28 (Item_GObj *gobj)
Each of these is an inlined function. Some are already defined.
Global it_8026C258 (Vec3 *vector, float facingDir)
Why is this cast to short necessary?
Global it_8026CD50 (s32 *, u64, f32)
it_804A0E50 immediately follows it_804A0E30; the original addressed it relative to the spawner.
Global it_8026EB18 (HSD_GObj *, s32, Vec3 *)
This appears in several places in the codebase,
Global it_80285084 (Item_GObj *gobj)
Shared code with it_802851FC.
Global it_80285140 (Item_GObj *gobj)
Shared code with it_802851FC.
Global it_802874F0 (Item_GObj *gobj)
this surely uses some type of fabs but everything ive tried causes a reg swap
Global it_80289BE8 (Item_GObj *gobj, s32 arg1, s32 arg2, s32 arg3)
Only differs by register allocation.
Global it_8028B8D8 (Item_GObj *gobj)
Shared code used by it_8028CFE0 and it_802DDB38.
Global it_8028CFE0 (Item_GObj *)
Shared code with it_8028B8D8.
Global it_8029FDBC (Item_GObj *gobj)
Use itGetMotionId if it can be made to inline here.
Global it_802A3E50 (ItemLink *arg0, enum FighterKind arg1, f32 arg8)
This is seemingly the wrong struct; there should
Global it_802A7A04 (HSD_GObj *arg0)
should this be its own struct?
Global it_802A83E0 (f32, Fighter_GObj *, Vec3 *, Fighter_Part, s32)
Use Item_AttachToParent when it inlines here without growing the stack frame.
Global it_802A9458 (HSD_GObj *)
replace with enum names
Global it_802AA7E4 (Item_GObj *)
Use itGetOwner if it can be made to inline here.
Global it_802AA7F0 (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
Global it_802B2C04 (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
Global it_802B2E7C (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
Global it_802BE5D8 (void *, float)
Eliminate this no-op branch (pools 0.0f into .sdata2 slot 0).
Global it_802D0AD0 (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
Global it_802DDB38 (Item_GObj *)
Shared code with it_8028B8D8.
Global it_802DDB38_inline (Item_GObj *gobj, Vec *v)
Inlined version of it_802DDB38.
Global it_802F2D98 (Item_GObj *gobj, Fighter_GObj *owner_gobj)
Shared code with it_802F2BFC.
Global itBombhei_UnkMotion8_Anim (Item_GObj *gobj)
this inline is incorrect
File itCharItems.h
Restructure this, possibly items/chara/types.h
File itCommonItems.h
Restructure this, possibly items/common/types.h
File item.h
Global Item::entered_hitlag
What function is 8026a62c?
Global Item::jumped_on
What function is 80269bac?
Global Item::on_accessory
What does this mean?
Global Item_802682F0 (HSD_GObj *gobj)
Needs some serious cleaning.
Global ItemDynamics::count

Combine with ftDynamics? Can see in it_8027163C that this struct does not work perfectly

Struct ItemStateTable
Size unknown.
Global itGetJObjGrandchild (Item_GObj *gobj)
Rename; probably gets a specific joint for items
Global itHarisen_Logic24_Dropped (Item_GObj *)
Fake match: the ip = gobj->user_data reload at line 126 suggests an inline function boundary. The pattern ip->scl = ...; it_8026B390(gobj); is likely wrapped in an inline like: static inline void itResetScaleAndFlag(Item_GObj* gobj) { Item* ip = gobj->user_data; ip->scl = ip->xCC_item_attr->x60_scale; it_8026B390(gobj); } This inline isn't used elsewhere in the codebase yet, so we can't confirm.
Global itLucky_Logic44_Spawned (Item_GObj *)
Global itMSBomb_Logic19_DmgDealt (Item_GObj *gobj)
Use itGetMotionId if it can be made to inline here.
Global itMSBomb_Logic19_DmgReceived (Item_GObj *gobj)
Use itGetMotionId if its extra inline depth can be made to match.
Global itMSBomb_Logic19_HitShield (Item_GObj *gobj)
Use itGetMotionId if it can be made to inline here.
Global itMSBomb_Logic19_ShieldBounced (Item_GObj *gobj)
Use itGetMotionId if it can be made to inline here.
Global itSamusBomb_Logic50_Clanked (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
Global itSamusBomb_Logic50_DmgDealt (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
Global itSamusBomb_Logic50_HitShield (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
Global itStarRod_Logic22_Clanked (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
Global itStarRod_Logic22_DmgDealt (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
Global itStarRod_Logic22_HitShield (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
File itsword.c
A lot of duplicate code here, can maybe be cleaned up with inlines.
Global itSword_Logic12_DmgDealt (Item_GObj *gobj)
Use itGetMotionId if it can be made to inline here.
Global itTincle_Logic13_DmgDealt (Item_GObj *)
Use itGetMotionId if it can be made to inline here.
Global itZeldaDinFire_GetOwner (Item_GObj *gobj)
Use itGetOwner if it can be made to inline here.
Global jobj_next (HSD_JObj *jobj)
these are commonly used inlines; they should be moved to jobj.h
Global lb_8001044C (DynamicsDesc *desc, void *colliders_raw, int num_colliders, float pos_y, bool use_floor_fn, Fighter_Part part, int first_active, bool ground_check)
Only the placement of one li differs.
Global lb_8001ACEC (UNK_T file_entries)
this seems fake
Global lb_8001AE38 (UNK_T file_entries)
this seems fake
Global lbColl_80007B78 (Mtx, struct Fighter_x1614_t *, float, float)
Eliminate casts.
Global lbCommand_803B9840 [16]
Cannot access melee/lb from here
Struct lbl_804333E0_t
This is THPDecComp.
Global lbRefract_800222A4 (void)
Only differs by register allocation.
Global light_position
Clean up pos values; x and y seem like portions of 20
Global LOAD_HAT (gobj, fp, fp2, kind, hat, part_dobj_indices)
Should be an inline function (which would also allow removing the callers' dont_inline pragmas), but that shifts register allocation.
Global LObjRelease (HSD_Class *o)
Unused stack
Global M_PI
Fix these to be in a single file, not math.h
Global MainMenuSelection
should these be moved into their respective TU's?
Global MakeTextureMtx (HSD_TObj *tobj)
Convert to HSD_ASSERT once a byte-matching form is found.
Global MAX_STICK_MAG
Move elsewhere.
Global mn_8022ADD8 (HSD_GObj *, bool)
there is probably a inline for this whole block
Global mn_8022DB10 (HSD_GObj *)
casting u64 here makes it match, but i dont know why
Global mnHyaku_8024C68C_inline (HSD_JObj *jobj, s32 val)
0xFF seems to signal a "stopped" animation
Global mnName_SetupScrollbarAndText (s32 count, HSD_JObj *scrollbar, MnName_GObj *user_data)
Strings at base offsets are in rodata near mnName_803ED538
Global mnSnap_GetLoadIdx (mnSnap_State *snap)
The HSD_ASSERT chain (lines 193-199) is an inline from tobj.h. Polls card read result and updates thumbnail display.
Global mnStageSel_8025A998_OnEnter (void *arg0)
Only differs by register allocation.
Global MotionState::_
Try to match without this being a union.
Global mpColl_80043558 (CollData *, int line_id)
dummy stack in mpCollEnd_inline2 breaks this function
Global mpColl_804D7F9C
float order hack
Global my_sqrtf (float x)
Lots of 6s in here pl_8004049C seems to indicate it might have actually been Gm_Player_NumMax
Global neg1
Fix weird forward declaration
Global order_data (void)

.data order hack

.data order hack

.data order hack

.data order hack

.data order hack

.data order hack

.data order hack

.data order hack

Global order_data_0 (void)

.data order hack

.data order hack

.data order hack

.data order hack

Global order_data_1 (void)
.data order hack
Global order_data_108 (void)
.data order hack
Global order_data_110 (void)
.data order hack
Global order_data_144 (void)
.data order hack
Global order_data_44 (void)
.data order hack
Global order_data_4A8 (void)
.data order hack
Global order_data_670 (void)
.data order hack
Global order_data_6C4 (void)
.data order hack
Global order_data_6F4 (void)
.data order hack
Global order_data_9AC (void)
.data order hack
Global order_data_A8 (void)
.data order hack
Global order_sdata (void)

.sdata order hack

.sdata order hack

.sdata order hack

.sdata order hack

Global order_sdata2 (void)

.sdata2 order hack

.sdata2 order hack

.sdata2 order hack

.sdata2 order hack

.sdata2 order hack

.sdata2 order hack

.sdata2 order hack

Global order_sdata2_0 (void)

.sdata2 order hack

.sdata2 order hack

.sdata2 order hack

.sdata2 order hack

Global order_sdata2_148 (void)
.sdata2 order hack
Global order_sdata2_154 (void)
.sdata2 order hack
Global order_sdata2_38 (void)
.sdata2 order hack
Global order_sdata_8 (void)

begin .sdata hack

.sdata order hack

Global pad_stack (GXColor color)
Fake padding function
Struct ParticleConsoleState
misnomer - moved from particle file, not particle-related
Struct ParticleScreenState
misnomer - moved from particle file, not particle-related
Global pl_8003891C (int slot)

This aint it

What?

Global pl_8003E978 (int slot, bool fp_x221F_b4, Item_GObj *item_gobj, float y0, float, float, float, float x1, float y1, float frame_speed_mul)
Not actually sure what the second argument should be
Struct plAllocInfo2

Probably the same struct as plAllocInfo, figure out how to make them work as one.

Probably the same struct as plAllocInfo, figure out how to make them work as one.

Global Player_80031AD0 (int slot)

Eliminate cast.

Eliminate cast.

Global Player_80032070 (int slot, bool bool_arg)
/ old match decomp.me/scratch/8otnq
Global Player_80036978 (s32 slot, s32 arg1)
Eliminate cast.
Global PObjInfoInit (void)
Several differently-signed comparisons appear in asserts, likely indicating the sign of one of the variables is declared incorrectly
Global psDispParticles (u32 target_link, u32 sw)
Recover this stack space from the original inline hierarchy.
Global psDispSubAppSRT (HSD_Particle *pp, u8 *texform)
Later HSD shares this emission through an AppSRT-aware psDispSubMakePolygon; Melee's emitted code lacks that body.
Global psUpdateProjectionCache (f32 perspective)
Passing rvmtx directly swaps the first two axis loads.
Global randi (int i)
this is a commonly used inline; it should be moved to random.h
Global randi_between_2 (int a, int b)
can these inlines be merged?
Global random_adder_b (s32 a, s32 b)
Investigate these types of patterns in other files; the Randi check with zero is probably its own thing
Global resolveIKJoint1 (HSD_JObj *jobj)
Variables var_f27 and var_f28 are used uninitialized whenever 'if' condition is false.
Global return_void (void)
Float order hack.
Global return_void2 (void)
Float order hack.
Global return_void3 (void)
Float order hack.
Global RunGObjCallback (HSD_GObj *gobj, HSD_GObjEvent arg1)
Could this be a higher-level inline in gobjproc.h or something?
Global sdata2_order (void)

.sdata2 order hack

.sdata2 order hack

.sdata2 order hack

.sdata2 literal-order anchor (same idiom as gmtou_0.c/gmtou_2.c): retail keeps -19.5f/13.0f at the head of this TU's pool (0x804DA7E0/E4), ahead of literals first used earlier in the section's emission order. Remove once the literals' first uses naturally occur in this order.

.sdata2 order hack

Emitted only to lay out the .sdata2 literal pool in retail order.

Emitted only to lay out the .sdata2 literal pool in retail order.

Emitted only to lay out the .sdata2 literal pool in retail order.

Emitted only to lay out the .sdata2 literal pool in retail order.

.sdata2 order hack

.sdata2 order hack

.sdata2 order hack

Global sdata2_order0 (void)
This is some kind of inline within ftKb_DkSpecialN_Anim that's shared by ftKb_DkSpecialAirN_Anim
Global setupAirStart (HSD_GObj *gobj)
Too much stack for resetVel.
Global SetupSharedVtxModelMtx (HSD_PObj *pobj, Mtx vmtx, Mtx pmtx, u32 rendermode)
Unused stack
Global setupStageCallbacks (int gobj_id)

Ground_SetupStageCallbacks

Ground_SetupStageCallbacks

Global setupStageCallbacks (int)
Ground_SetupStageCallbacks
Global SFX_NONE
Create an enum for SFX IDs.
Global sfxBack (void)
The functions fn_8017435C, fn_80174338, and fn_80174380 are probably deduplicated clones of these.
Struct sisLib_803A7664_t
this is the same as above, but just more generic... proper types will have to be sorted out later, as well as merging the two structs.
Struct SisLibUnkStruct
SIS
Global SKIP_CMD (cmd, n)
Is a macro the best way?
Struct SmallerHitCapsule
Fake, need to find real size of HitCapsule
Struct SpawnItem
Global SpawnItem::hold_kind
0 = capsule.
Global sqrtf_store (float x, volatile float *y)
Fake helper forcing a fresh load of the scale field.
Directory src/melee/ft/chara
Rename to entities to match gr and it.
Directory src/melee/gr
Create entities directory to hold individual stages.
Directory src/melee/it
Create entities directory to hold individual items.
Directory src/sysdolphin/baselib
Rename this to a root directory called HSD or hsd and delete its parent (sysdolphin).
Global stack_pad_hack (void)
egregious stack padding hack
Global Stage_80224E64 (enum_t, Vec3 *)
Needs to be HSD_ASSERT. Also remove fake zero-byte padding.
Global stageGObj0_OnInit (Ground_GObj *)
Unrolled loop?
Global stageGObj5_Callback3 (Ground_GObj *)
Rename: This is callback3 (destroy) for row 5 in stage_callbacks. Destroys HSD_GObj* stored in icemt2.xF8[0-4].
Global StaticPlayer::player_character
External ID.
Global StaticPlayer::player_state
0x02 In-Game (includes dead). 0x00 Otherwise.
File stdbool.h
Assumes __PPCGEKKO__.
Union Struct2070
Rename this and its members; investigate using it elsewhere.
Struct Struct2074
See if this should likewise be instituted for item->xD94 thru xDA4_word/xDA8_short
Struct TmAnimTimers
:: this isnt exactly right
Global Toy_8030813C (s32 arg0, enum_t unused)
:: fill out the struct that this uses/returns
Struct ToyED8Data

= ToyGlobalsS_

= TyArchiveData

= tyLightData

Global transition_flags
Share with ftCa_Init_MotionStateTable
Global transition_flags1
Combine common flags with transition_flags0.
Global transition_flags2

Combine common flags with transition_flags0.

Combine common flags with transition_flags0.

Global transition_flags3
Combine common flags with transition_flags0.
Global TRKSuppAccessFile (u32, u8 *, size_t *, u8 *, bool, bool)
fake match
Global true
Make this and false part of an enum. Fake usages, such as assigning to a u32, will need to be addressed.
Global u32it_804D6D14
Probably size_t but that needs to be changed to unsigned int first.
Global un_80304690 (void)
Duplicate code of un_803045A0 with different data
Global un_80304780 (void)
Duplicate code of un_803045A0 with different data
Global un_803F9E60
HSD_CameraDescFrustum without left or right
Global un_804D6F60 [8]
ViCharaDesc?
Global un_804D6F84 [8]
ViCharaDesc?
Global un_804D7004 [8]
ViCharaDesc?
Global un_804D7004_t
When accessing, neither struct with s8 fields, nor s8 array, seem to match. Also tried volatile struct and volatile fields. Size is 0xC.
Global un_804D7038 [8]

ViCharaDesc?

ViCharaDesc?

Struct Unk_Struct_w_Array
delete after fixing functions that use this
Global usize_t
Rename to size_t when size_t is deleted.
Struct VenomSpawnData
VenomSpawnData struct should be defined in gr/types.h or grvenom.h
Global wrapper (Fighter_GObj *gobj)
This is fake.
Global yakumono_param
yakumono struct
Global zero_init [1]
Hack needed to match it_8026F3D4 while keeping this the only 0.0f in the file