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_80307018 (void)
.data order hack
Global _Toy_8030715C (f32, f32)
.data order hack
Global _Toy_803075E8 (s32 arg0)
Layout-dependent: this is _Toy_803FDEBC[arg0], but indexing it directly changes register allocation.
Global _Toy_80308DC8 (HSD_CObj *)
.data order hack
Global _Toy_80309404 (HSD_GObj *)
Redundant cast improves match
Global _Toy_8030FA50 (void)
likely inline where Toy_str_ScMenFigure_cam_int1_camera is declared
Global _Toy_803FDEA0 []
.data order hack
Global _Toy_color_4080D060_0
.sdata2 order hack
Global _Toy_color_40B0D060_1
.sdata2 order hack
Global _Toy_color_FFBA00FF
.sdata2 order hack
Global _Toy_str_TyLight_dat []

.sdata order hack

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

Global _tyDisplay_8031830C (TySortElem *, s32, s32)
.data order hack
Global _tyDisplay_8031A4EC (HSD_GObj *)
.data order hack
Global _tyDisplay_8031B328 (void)
.data order hack
Global _tyDisplay_803FF01C []

.data order hack

Not de-duplicated in tyDisplay_8031BB34, therefore not a literal?

Global _tyDisplay_803FF11C
.data order hack
Global _tyFigupon_80314AA8 (HSD_JObj *, char *, char *, char *)

.data order hack

.sdata2 order hack

Global _tyFigupon_80316420 (s32)
Fake signature
Global _tyFigupon_803FEED4
.data order hack
Global _tyList_80312834 (u8 *buf, u32 num)
.data order hack
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 ATTRIBUTE_ALIGN (8)
: Change these Article** vars to type Article*[] like it_804A0F60?
Global bool
Maybe some versions of MetroWerks support _Bool?
Global calcAngle (float angle)
Materialization order matches the inlined schedule in ftCo_8008DCE0.
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_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 camera_sdata2_order (void)
sdata2 order hack
Global CardState::file_flags [HSD_CARD_MAX_FILES]
enum, not flags
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 cm_803BCCA0

Fix placement

Move to its own split

Global Collide_LeftWallPush
These (and CollData::env_flags) should be a bitfield struct
Global CollJoint::cb_0
Possible array here
Global CommandInfo::CommandInfo_x8::ptr [1]
Hack to match Command_04
Global CommandInfo::CommandInfo_x8::u
eventually clean this up, probably have each struct as its own union?
Global COMMON_DATA_F32
Fix common data struct
Global COPY_ATTRS (gobj, attributeName)
Remove declarations. Doesn't really need to be a macro.
Global CpuKind
ftCo_800B2AFC
Global DAT_EXTENT
This is a heuristic for arrays whose length only the code knows. Replace each use with a DAT_COUNT once counts can be read from the code's own tables (e.g. the largest anim_id in an item kind's ItemStateTable, for ItemStateArray), or from per-kind *_Count enum values where those exist.
Global db
does the padding mean this should be in another file before this one?
Global db_AdventureEnemies [It_Kind_Monsters2_Stage_Items_Size]
: Add remaining names of Stage items and possibly split into two separate arrays??
Global db_ItemAndPokemonMenu_t::DisplayStatus
: Make DisplayStatus an enum?
Global discIsDone (void)
Non-inlined function forces loop in lbFile_800161C4 to yield to interrupts. Pragma solution likely fake.
Union DmgLogEntry::DmgLogEntry_x10
Might be a fake union
Union DmgLogEntry::DmgLogEntry_xC
Might be a fake union
Global doAirHitColl (HSD_GObj *gobj)
Can maybe me combined with doAirColl.
Global doAnim0 (HSD_GObj *gobj)
GET_FIGHTER
Global doAnim1 (HSD_GObj *gobj)
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 doIasa (Fighter_GObj *gobj)
Some kind of missing bool inline
Global DOUBLE_PI32
Move elsewhere.
Global ECBFlagStruct::b1234
Used as s32, fix type to eliminate casts
Global EffectDataTable::DAT_EXTENT

Their lengths are only in their headers.

The count is only implied by the effect IDs.

Global Exception_ReportStackTrace (OSContext *, int)
unused function to force data ordering for these report strings
Global expEvaluate (HSD_Exp *exp, u32 type, void *obj, HSD_ObjUpdateFunc update_func)
should HSD_ObjData be 4 bytes larger?
Global FigaTree::DAT_EXTENT
As many as the sum of #nodes.
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 fn_8001F294 (void)
Non-inlined function forces loop in lbMthp_8001F800 to yield to interrupts. Pragma solution likely fake.
Global fn_8001FEC4 (HSD_GObj *gobj, intptr_t code)
.sdata2 order hack: the signed int-to-float conversion constant, with no signed conversion left in the TU to allocate it.
Global fn_80169000 (MatchEnd *arg0, u8 *arg1)

Matching tactic: indexing both arrays (rather than walking *hp++ = *sp++ through named locals) makes both copy pointers compiler-created webs, which outrank the standings induction variable and let the source pointer take r3.

Matching tactic: this dead read manufactures one extra interference edge on the long-lived &handicaps[positions[0]] web. That pushes its degree at simplify-stack visit time from 28 to 29 (== K), so it is deferred a pass, coloured earlier, and takes r3 instead of r6 – which is the whole tail register assignment.

Matching tactic: reuse the loop index for the first copy to steer MWCC's instruction scheduling without changing the generated accesses.

Global fn_8016E2BC (void)
The loop's SFX flag load uses a different equivalent address form.
Global fn_80174B4C_blk14829 (ResultsData *data, s32 slot, struct ResultsPlayerData **pdata, StatsList **list)
.data order hack
Global fn_80175D34 (void)
:: why does this have so much stack space
Global fn_80176BF0_inline (u8 arg1)
ARRAY_SIZE(lbl_803B7B18)
Global fn_80179854 (void)
.sdata2 order hack
Global fn_8017F008 (void)
.data order hack
Global fn_8017FF1C (HSD_GObj *gobj)
Consolidate these split-derived views of the same state object.
Global fn_8018A514 (int, float)
Dead read; a third early lbl_80473AB8-rooted expression is needed so the compiler binds the .bss anchor to a register before lbl_803D9D20.
Global fn_8018C8D4 (BracketEntry *, s32, s32, s32, s32, s32)
Redundant cast and assignment improves match
Global fn_80193308 (void)
Fix GXColor casts
Global fn_801981A0 (HSD_GObj *)
Down to linking Updates player cursor animation and position.
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_801A6ACC (HSD_GObj *, intptr_t)
.data order hack
Global fn_801A7FB4_inline (void)
Figure out where this goes
Global fn_801A80CC (HSD_GObj *gobj)
.sdata2 order hack
Global fn_801A851C (HSD_GObj *gobj)
.data order hack
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 FOG_ASSERT (line, cond)
replace with fog.h inlines
Global ft_8007C2E0 (Fighter *fp0, HitCapsule *hit0, Fighter *fp1, HitCapsule *hit1)
This is just the same inline twice.
Global ft_8008521C (HSD_GObj *gobj)
All one struct maybe?
Global ft_800852B0_Reset_ft_8045993C (ftData **list, int i)
Bitfields seem off
Global ft_800C80A4 (Fighter *fp)
maybe uses a shared inline with ftmetal functions?
Global ft_8045A1E0 [6]
Should be size 5, one for each costume, so there is a split at 0x8045A1F8
Global ft_CheckGroundAndLedge (Fighter_GObj *gobj, int 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 ftBossLib_8015BD20 (HSD_GObj *)
Float reorder hack
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_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_8008DCE0 (Fighter_GObj *gobj, int, float facing_dir)
One-field aggregate to order this web against the x154 temp.
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_80097AF4 (Fighter_GObj *gobj)
Prevents inline
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_8009D18C (Fighter *fp)
Global ftCo_800A2718 (mpIsland *)
Redundant cast and assignment improves match
Global ftCo_800A61D8 (Fighter *fp)
: Can this reuse code from ftCo_800A5F4C?
Global ftCo_800AABC8 (Fighter *fp)
Using ftCo_CpuTurnAwayFromLedge here changes inlining in ftCo_800AB224.
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_800BECB0 (Fighter_GObj *gobj)
: Seems like more code could be reused, but registers won't line up nicely
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_800C0874 (Fighter_GObj *gobj, UNK_T arg1, ftCommon_BuryType arg2)
.sdata2 order hack
Global ftCo_800C18A8 (Fighter_GObj *gobj, ftCommon_MotionState msid, Vec3 *normal, Vec3 *)
fix stack padding
Global ftCo_800C1E64 (Fighter_GObj *gobj, int msid, int timer, int vel_y_exponent, float facing_dir)
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_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 (Fighter_GObj *gobj, FtMotionId msid0, FtMotionId msid1)
enum params
Global ftCo_803C5A68 [It_Kind_Common_Items_Size]
.sdata2 order hack
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_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 FtColAnim
: populate enum and replace constants when used (like in calls to ftCo_800BFFD0)
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_80078C70 (Fighter_GObj *)
Cast forces regswap
Global ftColl_8007A06C (Fighter_GObj *, void *, void *, size_t, int)
.sdata2 order hack
Global ftColl_8007B1B8 (Fighter_GObj *gobj, ShieldDesc *shield, HSD_GObjEvent cb)
shield is AbsorbDesc, and AbsorbDesc is part of ShieldDesc
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 ftCommon_CalcSelfAccel_DeaccelAir (Fighter *)
This surely calls ftCommon_CalcSelfAccel_Deaccel somehow...
Struct ftCommonData
Determine size and add remaining members.
Global ftData::DAT_BIND (item_index, _index)
Count differs per fighter.
Global ftData::DAT_EXTENT

Count: ftData_Table_Unk0 of the fighter's kind.

Count: ftData_UnkIntPairs of the fighter's kind.

Union ftData_Item
Annotate the other slots per fighter (Sheik 4/5, Game & Watch 10, Jigglypuff 1).
Global ftData_x1C::DAT_EXTENT
Count: the part animations of the fighter's kind.
Global ftDk_Init_OnLoad (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
Struct ftDrMarioAttributes
: Should this be longer like ftMario_DatAttrs? That struct seems to get pushed to this one in ftMr_Init_OnLoadForDrMario
Struct ftDynamics::ftDynamics_x0
Very similar to ItemDynamics.
Global ftFc_Init_OnLoad (HSD_GObj *)
: create a file and struct for Falco's attributes (same as ftFox_DatAttrs?) and replace this
Global ftFox_SpecialLw_InlinePhys (HSD_GObj *gobj)
Shared inline with other functions in this file.
Global ftFx_SpecialAirHi_Coll (HSD_GObj *gobj)

Rework this entire match.

This match is definitely fake.

Global ftFx_SpecialAirNLoop_Anim (HSD_GObj *gobj)
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_SpecialN_CreateBlasterShot (HSD_GObj *gobj)
Seems fake, probably one or more missing inline functions.
Global ftFx_SpecialNLoop_Anim (HSD_GObj *gobj)
Unused assignment.
Global ftFx_SpecialS_CheckGhostRemove (HSD_GObj *gobj)
enum
Global ftGl_Init_LoadSpecialAttrs (HSD_GObj *gobj)
: replace with attributes struct (create new or use existing ftZakoboyAttributes?)
Global ftGl_Init_OnLoad (HSD_GObj *gobj)
: replace with attributes struct (create new or use existing ftZakoboyAttributes?)
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_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_insert_joint_refs (s32 *total_dobjs, HSD_Joint *root, Fighter *fp, s32 *part_idx, HSD_Joint **joint, s32 *joint_idx, s32 *byte_base)
byte_base is only ever written; both callers derive their destination offset from total_dobjs instead.
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, int *out1, int *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_FindBySpawnNum (u32)
Is i really u32?
Global ftLib_FindLowestPercentOpponent (HSD_GObj *)
Figure out how these are really declared
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.
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_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_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_WalkLoop_Anim (HSD_GObj *gobj)
GET_FIGHTER uses slightly too much stack; inline issue.
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 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).

Global FTNANA_COSTUME_COUNT
Repeat for other fighters and in ftdata
File ftness.h
Fix formatting
File ftnessattackhi4.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_YoyoThink_IsRemove (HSD_GObj *gobj)
Stack is too messed up for GET_FIGHTER.
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 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_SpecialAirN_Anim (HSD_GObj *gobj)
Shared code with ftPk_SpecialAirN_Anim using different attrs
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 ftPk_SpecialN_SpawnEffect1 (HSD_GObj *gobj)
Shared code with ftPk_SpecialN_SpawnEffect0
Global ftPr_Init_8013C360 (HSD_GObj *gobj)
clean up memory accesses - this looks similar to ftKb_SpecialN_800EFB4C
Global ftPr_SpecialAirNEnd_Coll (Fighter_GObj *gobj)
Maybe shared inline with ftPr_SpecialNEnd_Coll?
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_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 ftSs_Fighter::x1670 [1]
figure out proper size
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_SpecialS_8012F35C (Fighter_GObj *gobj)
.sdata2 order hack
Global ftYs_Unk1_803B75C0
Belongs in #ftyoshiguard.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.

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 gm_1832_sdata2_order (int unused)
.sdata2 order hack
Global gm_1884_sdata2_order (void)
.sdata2 order hack
Global gm_8016C6C0 (Item_GObj *)
should take Fighter_GObj*? See ftCo_800A53DC
Global gm_80177724 (struct ResultsMatchInfo *)
.sdata2 order hack
Global gm_801A659C (int)
.sdata2 order hack
Global gm_801B18D4 (GameModeState *)
:: figure out how to call this not inlined
Struct gm_801BAB40_src
PlayerInitData
Global gm_803DEBE8 [CKind_Playable_Count - 1]
Should be length CKind_Playable_Count
Global gm_803DF94C []
move above usage
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
Global gm_GetNumCostumesForCKind (u8)
Matching tactic: pad the pre-inline statement count so MWCC keeps direct calls to this accessor instead of auto-inlining them.
Global GM_MAX_PLAYERS

Put in proper places. GM_MAX_PLAYERS is Gm_Player_NumMax but needs to be used for array size declarations.

Global gm_ModeState_ApproachVs_OnEnter (GameModeState *)
Inline?
Global gm_ModeState_ApproachVs_OnExit (GameModeState *)
this file also contains the OnEnter callback for GS_DEBUG_MENU, which should probably be split out into a separate file
Global gm_Scene_CameraVs_OnEnter (void *arg0)
Required for the retail 0x20-byte stack frame.
Global gm_Scene_StaffRoll_OnEnter (void *)
Length of gm_804D6844 is 10
Struct gmPlayerData
This appears within other structs too, need to consolidate. Also not yet clear how many fields this has.
Global gmPlayerData::mode
Actually GameModeState::id
Global gmScriptEventCast (p_event, type)
Fix naming.
Global grAnime_801C65B0 (UnkArchiveStruct *)
.sdata order hack
Global grAnime_801C69FC_for_jobj (HSD_AObj *aobj)
The head alias, self-initialization, and discarded comparison are required for register allocation when this helper is inlined.
Global grBattle_GObj1_Callback0 (Ground_GObj *gobj)
grBattle_GObj5_Callback0
Global grBattle_YakumonoParam::bg_curr_color_overlay
ColorOverlay_x8_t, from grMaterial_801C9604
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_801E2EEC (Vec3 *, int, HSD_JObj *)
float order hack
Global grDatFiles_803E0848
Merge declaration and definition
Global grDatFiles_803E0924
Merge declaration and definition
Global grGreatBay_801F5914 (void *user_data, int joint_id, CollData *coll, int coll_x50, mpLib_GroundEnum ground_kind, float delta_y)
Redundant cast necessary to match
Global grHeal_8021EFEC (u32)
Ground_SetupStageCallbacks
Global grHeal_8021F70C (enum_t character_id)
Use enum members
Struct grIceMt_GObj1_GroundVars
Map_GroundVars?
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_SetupStageCallbacks (Ground_GObj *gobj, StageCallbacks *callbacks)
Call sites have a lot of duplicate code
Struct GroundParam
Most fields are still unidentified.
Global grPushOn_803B8440
.sdata order hack
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 grStadium_801D3138 (Ground_GObj *, HSD_ImageDesc *, HSD_MObj **)
these are commonly used inlines; they should be moved to jobj.h
Global grVenom_80203B18 (void)
shared loop with grVenom_8020454C
Global grVenom_GroundVars::grVenom_GroundVars_x0::xC4
Not a u32, either
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_80394314 (void)

Redundant cast improves match

Redundant cast improves match

Redundant casts improve match

Global hsd_8039F05C (s32 linkNo, s32 bank, s32 idx)
The bound check reads the .bss array named psCmdListArray, not psNumCmdList; the two names look swapped against their addresses.
Global hsd_803B51C8_inline (s32 image, s32 image_height, s32 image_width, const char *output, s32 output_capacity, const JpegMetadata *metadata, JpegComment *comment, JpegHuffDc *huff_dc_luma, JpegHuffDc *huff_dc_chroma, JpegHuffAc *huff_ac_luma, JpegHuffAc *huff_ac_chroma)
Redundant cast improves match
Global hsd_804D79C8

these don't go here

Global HSD_ASSERT (line, cond)
Take file as another arg, ignore it if not MUST_MATCH.
Global HSD_FogSet (HSD_Fog *)
Eliminate cast
Global HSD_GObj_SetupProc (HSD_GObj *, HSD_GObjEvent, u8)
: should the priorities be an enum that illustrates what they are?
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_JObjSetMtxDirtyInline (HSD_JObj *jobj)
See lb_800117F4
Global HSD_JObjSetupMatrix (HSD_JObj *jobj)
Non-static inline
Global HSD_LeakGetCapacityPtr (HSD_LeakChecker *lc)
.data order hack
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_Rumble_804C22E0 [4]
Circular dependency
Global HSD_SynthSFXGroupDataRemove (int)
AXVPB prev must be a signed int type, not a pointer
Global HSD_TExpSimplify2 (HSD_TExp *texp)
Redundant cast and assignment matches
Global HSD_VtxDescList::vertex
Its length is the largest index the display lists use.
Global ifMagnify_802FC750 (void)
Member accesses in the body fold into the condition's address.
Global ifStatus_GetHUDInfo (void)
.sdata2 order hack
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 (void)
inline appears in lb_800115F4
Global inlineB0 (Fighter *fp0, HitCapsule *hitbox, Fighter *fp1, int arg3)
ftColl_80076808
Global inlineB0 (Fighter_GObj *gobj)
Can probably share some more code with inlineA2
Global inlineB3 (Fighter_GObj *gobj)
Inline depth.
Global inlineM0 (float x)
Maybe a macro?
Global isEmblemUnlocked (void)
similar to gm_801AA688
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 are these casts to s32 and s16 necessary?
Global it_8026C47C (struct it_8026C47C_arg0_t *)
.sdata2 order hack
Global it_8026EB18 (HSD_GObj *, s32, Vec3 *)
This appears in several places in the codebase,
Global it_80273748 (Item_GObj *, Vec3 *, Vec3 *)
: Looks like a bunch of code is shared with it_80273B50 that could be reused
Global it_8027AB64 (Item_GObj *)
: Can this be fixed? As it is written now, both PokemonKind and ItemKind are mixed and get assigned to spawn.kind (which is of type ItemKind)
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)
.sdata2 order hack
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_802A2418 (Item_GObj *arg0)
.sdata2 order hack
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_802F2D98 (Item_GObj *gobj, Fighter_GObj *owner_gobj)
Shared code with it_802F2BFC.
Global it_804D6D14
Probably size_t but that needs to be changed to unsigned int first.
Global it_804D6D1C [4]
find/create enum or define for size of this array (used other places as well)
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
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_UnkKinds
Doxygen can't seem to find enums by name... These are used in it_8026C258 to determine whether Samus' Homing Missile should lock on its target.
Global ItemDynamics::count
Combine with ftDynamics? Can see in it_8027163C that this struct does not work perfectly
Union ItemSpecialAttributes
Bind and annotate the remaining variants for the DAT walk.
Struct ItemStateDesc
In some stage items (e.g. in GrCn.dat), x4_matanim_joint and x8_parameters hold values that are not relocated, so they are not always pointers of these types.
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 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.
Struct itPKFlush_ItemVars
: Move these to itCharItems.h
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 lbArq_80014ABC (lbArqNode *arg0)
Non-inlined function forces loop in lbArq_80014BD0 to yield to interrupts. Pragma solution likely fake.
Global lbCommand_803B9840 [16]
Cannot access melee/lb from here
Global lbl_8040BF70
Ortho camera; typed as the frustum arm of the HSD_CObjDesc union.
Global lbl_8046DBE8
.sdata order hack
Global lbl_804D6688
.sdata2 order hack
Global lbl_804DA78C

.sbss order hack

.sdata2 order hack

Global lbRefract_800222A4 (void)
Refactor data members into a struct
Global light_position
Clean up pos values; x and y seem like portions of 20
Global list0_1
Proper declarations
Global LObjRelease (HSD_Class *o)
Unused stack
Global MainMenuSelection
should these be moved into their respective TU's?
Global MatchEnd::is_teams
enum between teams/not-teams
Global MAX_STICK_MAG
Move elsewhere.
Global mn_8022ADD8 (HSD_GObj *, bool)
there is probably a inline for this whole block
Global mn_8022B3A0 (u8)
Idiomatic spellings put the pointer in a named local, not a temp.
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 mnInfo_80251AFC (void)
Keep mnInfo_804A0958 before mnInfo_804A0968 in .bss.
Global mnName_SetupScrollbarAndText (s32 count, HSD_JObj *scrollbar, MnName_GObj *user_data)
Strings at base offsets are in rodata near mnName_803ED538
Global mnSnap_8025329C (void)

data order hack

sdata order hack

Global mnSnap_8025409C (s32 dlg_type)
.sdata2 order hack
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_802599EC (void)
.sdata2 order hack
Global MotionState::MotionState_x8::_
Try to match without this being a union.
Global mpColl_80043558 (CollData *, int line_id)
dummy stack in mpCollEnd_inline2 breaks this function
Union msgbuf_t::msgbuf_t_x4
fix enum size shenanigans
Global my_fmodf (float a, float b)
reconcile with MSL fmodf
Global my_sqrtf (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 onEnterVs (GameModeState *)
remove void cast hack maybe the inline that will resolve the pad stack will fix this?
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_8003E978 (int slot, bool fp_x221F_b4, Item_GObj *item_gobj)
Not actually sure what the second argument should be
Union plActionStats::plActionStats_x358
i dont think this is a union but in-game, x358 follows
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 psDispParticles (u32 target_link, u32 sw)
Passing rvmtx directly swaps the first two axis loads.
Global psDispSubAppSRT (HSD_Particle *pp, u8 *texform)
Later HSD shares this emission with the polygon path; Melee's emitted code keeps the two separate.
Global randi_between_2 (int a, int b)
can these inlines be merged?
Struct regclear_record_state
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_80473594.
Global resolveIKJoint1 (HSD_JObj *jobj)
Variables var_f27 and var_f28 are used uninitialized whenever 'if' condition is false.
Global RunGObjCallback (HSD_GObj *gobj, HSD_GObjEvent arg1)
Could this be a higher-level inline in gobjproc.h or something?
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 setupStartAccessory (HSD_GObj *gobj, Vec3 *scale)
kirby hat enum
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.
Global SIS_SAVED_CURSOR
Circular include
Global SKIP_CMD (cmd, n)
Is a macro the best way?
Struct SmallerHitCapsule
Fake, need to find real size of HitCapsule
Global SpawnGObj (s32 slot, u16 anim, HSD_GObjEvent proc)
The spawn sites point one entry before the slot's GObj and pre-increment onto it; a direct pointer allocates differently.
Global SpawnItem::hold_kind
0 = capsule.
Global sqrtf_store (x, y)
.sdata2 order hack
Directory src/melee/ft/kinds
Rename to entities to match gr and it.
Directory src/melee/ft/kinds/ftMasterHand
These splits work with the floats but are not what one would expect for the text section.
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 stageGObj5_Callback3 (Ground_GObj *)
Rename: This is callback3 (destroy) for row 5 in stage_callbacks. Destroys HSD_GObj* stored in icemt2.xF8[0-4].
Struct StaleMoveTable
: 215 comes up a few times in the stale moves code. Figure out where this comes from and define a variable to reference.
Global STATIC_ASSERT (sizeof(*Toy_sbss_804D6ED4)==0xE4)
.sdata2 order hack
Global StaticPlayer::player_state
0x02 In-Game (includes dead). 0x00 Otherwise.
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 (int trophy_id)
:: fill out the struct that this uses/returns
Global Toy_803102D0 (void)
.data order hack
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 TROPHY
Move to toy header
Global true
Make this and false part of an enum. Fake usages, such as assigning to a u32, will need to be addressed.
Global tyFigupon_GetCoinCount (void)
.data order hack
Struct TySortElemInt
.sdata2 order hack
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_804D6F60 [8]
ViCharaDesc?
Global un_804D6F84 [8]
ViCharaDesc?
Global un_804D6FA8 [8]
ViCharaDesc?
Global un_804D7004 [8]
ViCharaDesc?
Global un_804D7038 [8]

ViCharaDesc?

ViCharaDesc?

Global unk_words []
Flags maybe? Is this used by base pointer anywhere? Not stripped by mwcc.
Global unused_db_string_803EAC10 []
: Should we rename the item categories to match these?
Global unused_ints []
Is this used by base pointer anywhere? Not stripped by mwcc.
Struct VenomSpawnData
VenomSpawnData struct should be defined in gr/types.h or grvenom.h
Global wrapper (Fighter_GObj *gobj)
This is fake.
Global zero_init [1]
Hack needed to match it_8026F3D4 while keeping this the only 0.0f in the file