From 6421df5ec54642fb1f169dc976b6de2dfe95b2aa Mon Sep 17 00:00:00 2001 From: Robin Avery Date: Sun, 29 Sep 2024 11:50:40 -0400 Subject: [PATCH] Match all 20-byte functions --- .clang-format | 11 +- configure.py | 38 ++- src/MSL/buffer_io.c | 2 +- src/MSL/buffer_io.h | 2 +- src/MSL/printf.h | 1 + src/MetroTRK/dispatch.c | 10 + src/MetroTRK/dispatch.h | 8 + src/MetroTRK/nubinit.c | 10 + src/MetroTRK/nubinit.h | 11 + src/MetroTRK/targimpl.c | 4 +- src/Runtime/Gecko_setjmp.c | 2 +- src/Runtime/__init_cpp_exceptions.c | 2 +- src/Runtime/__va_arg.c | 1 + src/common_structs.h | 5 +- src/dolphin/ai/ai.c | 1 + src/dolphin/ax/AXSPB.h | 1 + src/dolphin/ax/AXVPB.h | 2 +- src/dolphin/base/PPCArch.c | 1 + src/dolphin/card.h | 1 + src/dolphin/card/CARDBios.h | 1 + src/dolphin/card/CARDBlock.h | 1 + src/dolphin/card/CARDCheck.h | 1 + src/dolphin/card/CARDCreate.h | 1 + src/dolphin/card/CARDDelete.h | 1 + src/dolphin/card/CARDDir.h | 1 + src/dolphin/card/CARDFormat.h | 1 + src/dolphin/card/CARDMount.h | 1 + src/dolphin/card/CARDOpen.h | 1 + src/dolphin/card/CARDRdwr.h | 1 + src/dolphin/card/CARDRead.h | 1 + src/dolphin/card/CARDRename.h | 1 + src/dolphin/card/CARDStat.h | 1 + src/dolphin/card/CARDWrite.h | 1 + src/dolphin/db/db.c | 1 + src/dolphin/dvd/dvd.h | 1 + src/dolphin/dvd/dvdfs.c | 1 + src/dolphin/dvd/dvdlow.c | 3 +- src/dolphin/dvd/dvdqueue.h | 1 + src/dolphin/dvd/fstload.h | 1 + src/dolphin/gx/GXAttr.c | 3 +- src/dolphin/gx/GXBump.c | 3 +- src/dolphin/gx/GXBump.h | 1 - src/dolphin/gx/GXFifo.c | 1 + src/dolphin/gx/GXFrameBuf.c | 3 +- src/dolphin/gx/GXFrameBuf.h | 1 + src/dolphin/gx/GXInit.c | 1 + src/dolphin/gx/GXInit.h | 3 +- src/dolphin/gx/GXLight.h | 1 + src/dolphin/gx/GXMisc.h | 1 + src/dolphin/gx/GXPerf.c | 1 + src/dolphin/gx/GXPixel.c | 1 + src/dolphin/gx/GXPixel.h | 1 + src/dolphin/gx/GXTev.c | 1 + src/dolphin/gx/GXTev.h | 1 + src/dolphin/gx/GXTexture.c | 3 +- src/dolphin/gx/GXTexture.h | 3 +- src/dolphin/gx/GXTransform.c | 3 +- src/dolphin/gx/GXTransform.h | 2 +- src/dolphin/gx/__GXFifo.h | 1 + src/dolphin/gx/__GXInit.h | 1 + src/dolphin/gx/__types.h | 1 + src/dolphin/gx/types.h | 1 + src/dolphin/mtx/mtx44.c | 1 + src/dolphin/mtx/types.h | 1 + src/dolphin/os/OSAlarm.c | 1 + src/dolphin/os/OSCache.c | 2 +- src/dolphin/os/OSContext.c | 1 + src/dolphin/os/OSExi.c | 3 +- src/dolphin/os/OSInit.c | 2 +- src/dolphin/os/OSInterrupt.c | 3 +- src/dolphin/os/OSInterrupt.h | 2 +- src/dolphin/os/OSMemory.c | 1 + src/dolphin/os/OSReboot.c | 1 + src/dolphin/os/OSReset.c | 3 +- src/dolphin/os/OSSerial.c | 2 +- src/dolphin/os/OSSync.c | 2 +- src/dolphin/os/OSThread.c | 1 + src/dolphin/os/OSTime.c | 1 + src/dolphin/os/OSUartExi.c | 2 +- src/dolphin/os/init/__ppc_eabi_init.c | 1 + src/dolphin/os/init/__start.c | 3 +- src/dolphin/pad/PadClamp.c | 1 + src/dolphin/pad/pad.h | 1 + src/dolphin/vi/vi.h | 3 +- src/melee/cm/camera.c | 97 ++++--- src/melee/cm/camera.h | 17 +- src/melee/cm/camera.static.h | 29 ++ src/melee/cm/cmsnap.h | 1 + src/melee/cm/forward.h | 2 +- src/melee/cm/types.h | 79 ++++-- src/melee/db/db_2253.c | 48 +++- src/melee/db/db_2253.h | 7 +- .../{db_2253__static.h => db_2253.static.h} | 8 + src/melee/ef/efasync.h | 4 +- src/melee/ef/eflib.c | 3 +- src/melee/ef/eflib.h | 4 +- src/melee/ef/types.h | 4 +- src/melee/ft/chara/ftCLink/ftCl_Init.h | 1 + src/melee/ft/chara/ftCLink/inlines.h | 1 + src/melee/ft/chara/ftCaptain/ftCa_Init.h | 1 + src/melee/ft/chara/ftCaptain/ftCa_SpecialHi.c | 1 + src/melee/ft/chara/ftCaptain/ftCa_SpecialLw.c | 3 +- src/melee/ft/chara/ftCaptain/ftCa_SpecialN.c | 1 + src/melee/ft/chara/ftCaptain/ftCa_SpecialS.c | 1 + src/melee/ft/chara/ftCaptain/types.h | 1 + src/melee/ft/chara/ftCommon/forward.h | 1 + src/melee/ft/chara/ftCommon/ftCo_09C4.h | 1 + src/melee/ft/chara/ftCommon/ftCo_09F4.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_09F4.h | 3 +- src/melee/ft/chara/ftCommon/ftCo_09F7.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_09F7.h | 4 +- src/melee/ft/chara/ftCommon/ftCo_0A01.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_0A01.h | 3 +- src/melee/ft/chara/ftCommon/ftCo_0B3E.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_0B3E.h | 4 +- src/melee/ft/chara/ftCommon/ftCo_0C35.c | 7 +- src/melee/ft/chara/ftCommon/ftCo_0C60.h | 1 + src/melee/ft/chara/ftCommon/ftCo_AirCatch.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_AirCatch.h | 4 +- src/melee/ft/chara/ftCommon/ftCo_Attack1.h | 4 +- src/melee/ft/chara/ftCommon/ftCo_AttackAir.c | 1 + src/melee/ft/chara/ftCommon/ftCo_AttackAir.h | 4 +- src/melee/ft/chara/ftCommon/ftCo_AttackDash.c | 1 + src/melee/ft/chara/ftCommon/ftCo_AttackDash.h | 1 + src/melee/ft/chara/ftCommon/ftCo_AttackHi3.c | 1 + src/melee/ft/chara/ftCommon/ftCo_AttackHi3.h | 4 +- src/melee/ft/chara/ftCommon/ftCo_AttackHi4.c | 1 + src/melee/ft/chara/ftCommon/ftCo_AttackHi4.h | 1 + src/melee/ft/chara/ftCommon/ftCo_AttackLw3.c | 1 + src/melee/ft/chara/ftCommon/ftCo_AttackLw3.h | 1 + src/melee/ft/chara/ftCommon/ftCo_AttackLw4.c | 1 + src/melee/ft/chara/ftCommon/ftCo_AttackLw4.h | 4 +- src/melee/ft/chara/ftCommon/ftCo_AttackS3.c | 1 + src/melee/ft/chara/ftCommon/ftCo_AttackS3.h | 4 +- src/melee/ft/chara/ftCommon/ftCo_AttackS4.c | 1 + src/melee/ft/chara/ftCommon/ftCo_AttackS4.h | 4 +- src/melee/ft/chara/ftCommon/ftCo_BarrelWait.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_BarrelWait.h | 4 +- src/melee/ft/chara/ftCommon/ftCo_Bury.c | 7 +- src/melee/ft/chara/ftCommon/ftCo_Bury.h | 4 +- .../ft/chara/ftCommon/ftCo_CaptureCaptain.h | 1 + .../chara/ftCommon/ftCo_CaptureDamageKoopa.c | 1 + .../chara/ftCommon/ftCo_CaptureDamageKoopa.h | 1 + .../ft/chara/ftCommon/ftCo_CaptureKirby.c | 3 +- .../ft/chara/ftCommon/ftCo_CaptureKoopa.c | 1 + .../ft/chara/ftCommon/ftCo_CaptureMewtwo.c | 1 + .../ft/chara/ftCommon/ftCo_CaptureWaitKirby.c | 3 +- .../ft/chara/ftCommon/ftCo_CaptureWaitKoopa.c | 1 + src/melee/ft/chara/ftCommon/ftCo_CargoFall.c | 1 + src/melee/ft/chara/ftCommon/ftCo_CargoJump.c | 1 + .../ft/chara/ftCommon/ftCo_CargoKneebend.c | 1 + .../ft/chara/ftCommon/ftCo_CargoLanding.c | 1 + src/melee/ft/chara/ftCommon/ftCo_CargoThrow.c | 1 + src/melee/ft/chara/ftCommon/ftCo_CargoWait.c | 1 + src/melee/ft/chara/ftCommon/ftCo_CliffClimb.c | 1 + src/melee/ft/chara/ftCommon/ftCo_CliffJump.c | 1 + src/melee/ft/chara/ftCommon/ftCo_Damage.c | 7 +- src/melee/ft/chara/ftCommon/ftCo_DamageBind.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_DamageFall.c | 4 +- src/melee/ft/chara/ftCommon/ftCo_DamageIce.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_DamageSong.c | 4 +- .../ft/chara/ftCommon/ftCo_DemoCallback0.c | 1 + src/melee/ft/chara/ftCommon/ftCo_Down.c | 1 + src/melee/ft/chara/ftCommon/ftCo_DownAttack.c | 1 + src/melee/ft/chara/ftCommon/ftCo_DownBound.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_DownStand.c | 1 + src/melee/ft/chara/ftCommon/ftCo_Escape.c | 1 + src/melee/ft/chara/ftCommon/ftCo_EscapeAir.c | 1 + .../ft/chara/ftCommon/ftCo_FallSpecial.c | 1 + src/melee/ft/chara/ftCommon/ftCo_FlyReflect.c | 1 + src/melee/ft/chara/ftCommon/ftCo_FlyReflect.h | 1 + src/melee/ft/chara/ftCommon/ftCo_Guard.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_Guard.h | 4 +- src/melee/ft/chara/ftCommon/ftCo_HammerFall.c | 1 + src/melee/ft/chara/ftCommon/ftCo_HammerJump.c | 1 + src/melee/ft/chara/ftCommon/ftCo_HammerWalk.c | 1 + src/melee/ft/chara/ftCommon/ftCo_ItemThrow.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_LandingAir.c | 1 + src/melee/ft/chara/ftCommon/ftCo_Lift.c | 1 + src/melee/ft/chara/ftCommon/ftCo_MissFoot.c | 1 + src/melee/ft/chara/ftCommon/ftCo_Ottotto.c | 1 + src/melee/ft/chara/ftCommon/ftCo_Pass.c | 1 + src/melee/ft/chara/ftCommon/ftCo_Passive.c | 1 + .../ft/chara/ftCommon/ftCo_PassiveStand.c | 1 + .../ft/chara/ftCommon/ftCo_PassiveWall.c | 1 + .../ft/chara/ftCommon/ftCo_ShieldBreakDown.c | 1 + .../ft/chara/ftCommon/ftCo_ShieldBreakFall.c | 1 + .../ft/chara/ftCommon/ftCo_ShieldBreakFly.c | 1 + .../ft/chara/ftCommon/ftCo_ShieldBreakStand.c | 1 + src/melee/ft/chara/ftCommon/ftCo_Shouldered.c | 3 +- src/melee/ft/chara/ftCommon/ftCo_SpecialAir.c | 1 + src/melee/ft/chara/ftCommon/ftCo_SpecialS.c | 1 + src/melee/ft/chara/ftCommon/ftCo_StopCeil.c | 1 + src/melee/ft/chara/ftCommon/ftCo_StopWall.c | 1 + .../ft/chara/ftCommon/ftCo_ThrownKirby.c | 3 +- .../ft/chara/ftCommon/ftCo_ThrownKoopa.c | 1 + .../ft/chara/ftCommon/ftCo_ThrownMewtwo.c | 1 + src/melee/ft/chara/ftCommon/ftCo_Wait.c | 1 + src/melee/ft/chara/ftCommon/ftCo_WarpStar.c | 1 + src/melee/ft/chara/ftCommon/ftCo_YoshiEgg.c | 1 + src/melee/ft/chara/ftCommon/ftpickupitem.c | 3 +- src/melee/ft/chara/ftCommon/inlines.h | 1 + src/melee/ft/chara/ftCommon/types.h | 3 +- src/melee/ft/chara/ftCrazyHand/ftCh_Init.c | 7 +- src/melee/ft/chara/ftDonkey/forward.h | 1 + src/melee/ft/chara/ftDonkey/ftDk_HeavyWalk.c | 1 + src/melee/ft/chara/ftDonkey/ftDk_Init.c | 1 + src/melee/ft/chara/ftDonkey/ftDk_SpecialHi.c | 1 + src/melee/ft/chara/ftDonkey/ftDk_SpecialLw.c | 1 + src/melee/ft/chara/ftDonkey/ftDk_SpecialN.c | 1 + src/melee/ft/chara/ftDonkey/ftDk_SpecialS.c | 1 + src/melee/ft/chara/ftFalco/ftFc_Init.c | 1 + src/melee/ft/chara/ftFalco/ftFc_Init.h | 1 + src/melee/ft/chara/ftFox/ftFx_AppealS.h | 1 + src/melee/ft/chara/ftFox/ftFx_Init.c | 1 + src/melee/ft/chara/ftFox/ftFx_Init.h | 1 + src/melee/ft/chara/ftFox/ftFx_SpecialS.h | 1 + src/melee/ft/chara/ftFox/types.h | 1 + .../ft/chara/ftGameWatch/ftGw_AttackAir.c | 1 + .../ft/chara/ftGameWatch/ftGw_AttackLw3.h | 1 + .../ft/chara/ftGameWatch/ftGw_SpecialS.h | 1 + src/melee/ft/chara/ftGameWatch/types.h | 1 + src/melee/ft/chara/ftGanon/ftGn_Init.h | 1 + src/melee/ft/chara/ftGigaKoopa/ftGk_Init.c | 2 +- src/melee/ft/chara/ftGigaKoopa/ftGk_Init.h | 1 + src/melee/ft/chara/ftKirby/forward.h | 1 + src/melee/ft/chara/ftKirby/ftKb_Init.c | 40 +-- src/melee/ft/chara/ftKirby/ftKb_Init.h | 6 +- src/melee/ft/chara/ftKirby/ftKb_Init.static.h | 16 ++ src/melee/ft/chara/ftKirby/types.h | 19 +- src/melee/ft/chara/ftKoopa/forward.h | 1 + src/melee/ft/chara/ftKoopa/ftKp_Init.c | 4 +- src/melee/ft/chara/ftKoopa/ftKp_Init.h | 1 + src/melee/ft/chara/ftKoopa/ftKp_SpecialS.c | 1 + src/melee/ft/chara/ftKoopa/types.h | 1 - src/melee/ft/chara/ftLink/ftLk_AttackAir.c | 1 + src/melee/ft/chara/ftLink/ftLk_Init.h | 1 + src/melee/ft/chara/ftLink/ftLk_SpecialHi.c | 1 + src/melee/ft/chara/ftLink/ftLk_SpecialLw.c | 1 + src/melee/ft/chara/ftLink/ftLk_SpecialN.c | 1 + src/melee/ft/chara/ftLink/ftLk_SpecialN.h | 1 + src/melee/ft/chara/ftLink/ftLk_SpecialS.c | 1 + src/melee/ft/chara/ftLink/ftLk_SpecialS.h | 1 + src/melee/ft/chara/ftLink/types.h | 3 +- src/melee/ft/chara/ftLuigi/ftLg_Init.h | 1 + src/melee/ft/chara/ftLuigi/ftLg_SpecialHi.c | 1 + src/melee/ft/chara/ftLuigi/ftLg_SpecialLw.c | 1 + src/melee/ft/chara/ftLuigi/ftLg_SpecialN.c | 1 + src/melee/ft/chara/ftLuigi/ftLg_SpecialS.c | 1 + src/melee/ft/chara/ftLuigi/types.h | 1 + src/melee/ft/chara/ftMario/ftMr_Init.h | 1 + src/melee/ft/chara/ftMario/ftMr_SpecialHi.c | 1 + src/melee/ft/chara/ftMario/ftMr_SpecialLw.c | 1 + src/melee/ft/chara/ftMario/ftMr_SpecialS.c | 1 + src/melee/ft/chara/ftMario/types.h | 1 + src/melee/ft/chara/ftMars/ftMs_Init.c | 1 + src/melee/ft/chara/ftMars/ftMs_Init.h | 1 + src/melee/ft/chara/ftMars/ftMs_SpecialHi.c | 1 + src/melee/ft/chara/ftMars/ftMs_SpecialLw.c | 1 + src/melee/ft/chara/ftMars/ftMs_SpecialN.c | 3 +- src/melee/ft/chara/ftMars/ftMs_SpecialS.c | 1 + src/melee/ft/chara/ftMars/types.h | 1 + .../ftMh_CaptureDamageMasterHand.c | 3 +- .../ftMasterHand/ftMh_CaptureMasterHand.c | 5 +- .../ft/chara/ftMasterHand/ftMh_Damage_0.h | 1 + src/melee/ft/chara/ftMasterHand/ftMh_Drill.c | 1 + src/melee/ft/chara/ftMasterHand/ftMh_Entry.c | 1 + src/melee/ft/chara/ftMasterHand/ftMh_Init.c | 7 +- src/melee/ft/chara/ftMasterHand/ftMh_Slam.c | 1 + .../ft/chara/ftMasterHand/ftMh_Squeeze.c | 1 + .../ft/chara/ftMasterHand/ftMh_Squeezing.c | 1 + .../ft/chara/ftMasterHand/ftMh_SweepWait.c | 1 + .../ft/chara/ftMasterHand/ftMh_TagApplaud.c | 1 + .../ft/chara/ftMasterHand/ftMh_TagApplaud.h | 1 + .../ft/chara/ftMasterHand/ftMh_TagCancel.c | 3 +- .../ft/chara/ftMasterHand/ftMh_TagCrush.c | 1 + .../ft/chara/ftMasterHand/ftMh_TagRockPaper.c | 1 + src/melee/ft/chara/ftMasterHand/ftMh_Throw.c | 1 + .../ft/chara/ftMasterHand/ftMh_Wait1_2.c | 1 + src/melee/ft/chara/ftMasterHand/ftMh_Walk.c | 1 + src/melee/ft/chara/ftMasterHand/types.h | 1 + src/melee/ft/chara/ftMewtwo/ftMt_Init.c | 1 + src/melee/ft/chara/ftMewtwo/ftMt_Init.h | 1 + src/melee/ft/chara/ftMewtwo/ftMt_SpecialHi.c | 1 + src/melee/ft/chara/ftMewtwo/ftMt_SpecialLw.c | 1 + src/melee/ft/chara/ftMewtwo/ftMt_SpecialN.h | 1 + src/melee/ft/chara/ftMewtwo/ftMt_SpecialS.c | 1 + src/melee/ft/chara/ftMewtwo/types.h | 1 + src/melee/ft/chara/ftNana/ftNn_Init.c | 1 + src/melee/ft/chara/ftNess/forward.h | 1 + src/melee/ft/chara/ftNess/ftNs_AttackHi4.c | 2 +- src/melee/ft/chara/ftNess/ftNs_AttackHi4.h | 1 + src/melee/ft/chara/ftNess/ftNs_SpecialHi.c | 1 + src/melee/ft/chara/ftNess/ftNs_SpecialHi.h | 1 + src/melee/ft/chara/ftNess/ftNs_SpecialLw.c | 1 + src/melee/ft/chara/ftNess/ftNs_SpecialLw.h | 1 + src/melee/ft/chara/ftNess/ftNs_SpecialN.c | 85 +++--- src/melee/ft/chara/ftNess/ftNs_SpecialN.h | 1 + src/melee/ft/chara/ftNess/ftNs_SpecialS.c | 1 + src/melee/ft/chara/ftNess/types.h | 9 +- src/melee/ft/chara/ftPeach/ftPe_Float.c | 1 + src/melee/ft/chara/ftPeach/ftPe_Float.h | 1 + src/melee/ft/chara/ftPeach/ftPe_FloatAttack.c | 1 + src/melee/ft/chara/ftPeach/ftPe_FloatAttack.h | 1 + src/melee/ft/chara/ftPeach/ftPe_FloatFall.c | 1 + src/melee/ft/chara/ftPeach/ftPe_Init.c | 4 +- src/melee/ft/chara/ftPeach/ftPe_Init.h | 1 + src/melee/ft/chara/ftPeach/ftPe_SpecialHi.c | 1 + src/melee/ft/chara/ftPeach/ftPe_SpecialHi.h | 1 + src/melee/ft/chara/ftPeach/ftPe_SpecialLw.c | 1 + src/melee/ft/chara/ftPeach/ftPe_SpecialN.c | 1 + src/melee/ft/chara/ftPeach/ftPe_SpecialS.c | 1 + src/melee/ft/chara/ftPeach/types.h | 1 + src/melee/ft/chara/ftPichu/ftPc_Init.c | 1 + src/melee/ft/chara/ftPichu/ftPc_Init.h | 1 + src/melee/ft/chara/ftPikachu/forward.h | 1 + src/melee/ft/chara/ftPikachu/ftPk_Init.c | 1 + src/melee/ft/chara/ftPikachu/ftPk_Init.h | 1 + src/melee/ft/chara/ftPikachu/ftPk_SpecialHi.c | 1 + src/melee/ft/chara/ftPikachu/ftPk_SpecialHi.h | 1 + src/melee/ft/chara/ftPikachu/ftPk_SpecialLw.h | 1 + src/melee/ft/chara/ftPikachu/ftPk_SpecialS.c | 1 + src/melee/ft/chara/ftPikachu/types.h | 1 + src/melee/ft/chara/ftPopo/forward.h | 1 + src/melee/ft/chara/ftPopo/ftPp_Init.h | 1 + src/melee/ft/chara/ftPopo/ftPp_SpecialN.c | 3 +- src/melee/ft/chara/ftPopo/ftPp_SpecialS.c | 1 + src/melee/ft/chara/ftPopo/types.h | 4 +- src/melee/ft/chara/ftPurin/forward.h | 1 + src/melee/ft/chara/ftPurin/ftPr_Init.c | 3 +- src/melee/ft/chara/ftPurin/ftPr_Init.h | 1 + src/melee/ft/chara/ftPurin/ftPr_SpecialHi.c | 3 +- src/melee/ft/chara/ftPurin/ftPr_SpecialLw.c | 3 +- src/melee/ft/chara/ftPurin/ftPr_SpecialN.c | 3 +- src/melee/ft/chara/ftPurin/ftPr_SpecialS.c | 3 +- src/melee/ft/chara/ftPurin/types.h | 3 +- src/melee/ft/chara/ftSamus/forward.h | 1 + src/melee/ft/chara/ftSamus/ftSs_Init.h | 1 + src/melee/ft/chara/ftSamus/ftSs_SpecialHi.c | 1 + src/melee/ft/chara/ftSamus/ftSs_SpecialN.c | 1 + src/melee/ft/chara/ftSamus/types.h | 3 +- src/melee/ft/chara/ftSandbag/ftSb_Init.c | 1 + src/melee/ft/chara/ftSeak/forward.h | 1 + src/melee/ft/chara/ftSeak/ftSk_Init.h | 1 + src/melee/ft/chara/ftSeak/ftSk_SpecialHi.c | 3 +- src/melee/ft/chara/ftSeak/ftSk_SpecialS.c | 3 +- src/melee/ft/chara/ftSeak/ftSk_SpecialS.h | 1 + src/melee/ft/chara/ftSeak/types.h | 3 +- src/melee/ft/chara/ftYoshi/ftYs_Guard.c | 4 +- src/melee/ft/chara/ftYoshi/ftYs_Guard.h | 1 + src/melee/ft/chara/ftYoshi/ftYs_Init.c | 3 +- src/melee/ft/chara/ftYoshi/ftYs_Init.h | 1 + src/melee/ft/chara/ftYoshi/ftYs_SpecialN.c | 40 +-- src/melee/ft/chara/ftYoshi/ftYs_SpecialN.h | 3 +- .../ft/chara/ftYoshi/ftYs_SpecialN.static.h | 24 ++ src/melee/ft/chara/ftYoshi/types.h | 1 - src/melee/ft/chara/ftZakoBoy/ftBo_Init.h | 1 + src/melee/ft/chara/ftZakoBoy/types.h | 1 + src/melee/ft/chara/ftZakoGirl/ftGl_Init.h | 1 + src/melee/ft/chara/ftZelda/ftZd_Init.h | 1 + src/melee/ft/chara/ftZelda/ftZd_SpecialN.c | 1 + src/melee/ft/chara/ftZelda/types.h | 1 + src/melee/ft/fighter.c | 35 +-- src/melee/ft/fighter.h | 3 +- src/melee/ft/forward.h | 4 +- src/melee/ft/ft_07C1.c | 3 +- src/melee/ft/ft_07C6.c | 4 +- src/melee/ft/ft_081B.c | 5 +- src/melee/ft/ft_081B.h | 4 +- src/melee/ft/ft_0852.c | 3 +- src/melee/ft/ft_0877.h | 4 +- src/melee/ft/ft_0881.h | 4 +- src/melee/ft/ft_0BEC.c | 1 + src/melee/ft/ft_0BEF.c | 1 + src/melee/ft/ft_0C31.c | 3 +- src/melee/ft/ft_0C31.h | 4 +- src/melee/ft/ft_0C88.c | 259 +++++++++++++++++- src/melee/ft/ft_0C88.h | 4 +- src/melee/ft/ft_0CD1.h | 4 +- src/melee/ft/ft_0CDD.h | 4 +- src/melee/ft/ft_0CEE.h | 4 +- src/melee/ft/ft_0D14.h | 4 +- src/melee/ft/ftaction.c | 3 +- src/melee/ft/ftafterimage.c | 4 +- src/melee/ft/ftanim.h | 4 +- src/melee/ft/ftattacks4combo.h | 4 +- src/melee/ft/ftbosslib.h | 1 + src/melee/ft/ftchangeparam.h | 4 +- src/melee/ft/ftcliffcommon.c | 1 + src/melee/ft/ftcolanim.h | 4 +- src/melee/ft/ftcoll.c | 5 +- src/melee/ft/ftcoll.h | 3 +- src/melee/ft/ftcommon.c | 4 +- src/melee/ft/ftdata.c | 1 + src/melee/ft/ftdata.h | 4 +- src/melee/ft/ftdemo.c | 5 +- src/melee/ft/ftdevice.c | 3 +- src/melee/ft/ftdevice.h | 3 +- src/melee/ft/ftdrawcommon.c | 27 +- src/melee/ft/ftdynamics.c | 3 +- src/melee/ft/ftdynamics.h | 1 + src/melee/ft/ftlib.c | 6 +- src/melee/ft/ftlipstickswing.h | 4 +- src/melee/ft/ftmaterial.c | 3 +- src/melee/ft/ftmaterial.h | 1 + src/melee/ft/ftmetal.h | 4 +- src/melee/ft/ftparts.c | 3 +- src/melee/ft/ftparts.h | 1 + src/melee/ft/ftstarrodswing.h | 4 +- src/melee/ft/ftswing.h | 1 + src/melee/ft/ftwaitanim.h | 4 +- src/melee/ft/ftwalljump.c | 1 + src/melee/ft/inlines.h | 1 + src/melee/ft/types.h | 5 +- src/melee/gm/forward.h | 2 +- src/melee/gm/gm_1601.c | 206 ++++++++------ src/melee/gm/gm_1601.h | 45 ++- src/melee/gm/gm_1601.static.h | 92 +++++++ src/melee/gm/gm_1A36.c | 73 ++++- src/melee/gm/gm_1A36.h | 4 - .../{gm_1A36__static.h => gm_1A36.static.h} | 38 ++- src/melee/gm/gmcamera.c | 3 +- src/melee/gm/gmmain.c | 3 +- src/melee/gm/gmmain_lib.c | 175 ++++++++---- ...main_lib__static.h => gmmain_lib.static.h} | 0 src/melee/gm/types.h | 250 ++++++++++------- src/melee/gr/granime.h | 1 + src/melee/gr/grbattle.c | 1 + src/melee/gr/grbattle.h | 1 + src/melee/gr/grbigblue.h | 4 +- src/melee/gr/grcastle.h | 4 +- src/melee/gr/grcorneria.h | 1 - src/melee/gr/grdatfiles.h | 1 + src/melee/gr/grdisplay.h | 1 + src/melee/gr/grdynamicattr.h | 1 + src/melee/gr/grfigure1.c | 1 + src/melee/gr/grfigure2.c | 1 + src/melee/gr/grfigure3.c | 1 + src/melee/gr/grfigureget.c | 1 + src/melee/gr/grfigureget.h | 1 - src/melee/gr/grflatzone.h | 4 +- src/melee/gr/gricemt.c | 3 +- src/melee/gr/gricemt.h | 3 +- src/melee/gr/grinishie1.h | 1 - src/melee/gr/grizumi.h | 1 + src/melee/gr/grkongo.h | 4 +- src/melee/gr/grlib.c | 3 +- src/melee/gr/grlib.h | 4 +- src/melee/gr/grmaterial.h | 3 +- src/melee/gr/groldkongo.h | 4 +- src/melee/gr/ground.c | 5 +- src/melee/gr/ground.h | 4 +- src/melee/gr/grrcruise.h | 4 +- src/melee/gr/grshrine.c | 1 + src/melee/gr/grstadium.c | 1 - src/melee/gr/grstadium.h | 4 +- src/melee/gr/grstory.c | 1 + src/melee/gr/grstory.h | 1 + src/melee/gr/grtcaptain.c | 1 + src/melee/gr/grtclink.h | 1 + src/melee/gr/grtdonkey.c | 1 + src/melee/gr/grtdrmario.c | 1 + src/melee/gr/grtemblem.c | 1 + src/melee/gr/grtfalco.c | 3 +- src/melee/gr/grtfalco.h | 4 +- src/melee/gr/grtfox.c | 3 +- src/melee/gr/grtgamewatch.h | 1 + src/melee/gr/grtganon.h | 1 + src/melee/gr/grticeclimber.c | 3 +- src/melee/gr/grticeclimber.h | 4 +- src/melee/gr/grtkirby.c | 1 + src/melee/gr/grtkoopa.c | 1 + src/melee/gr/grtlink.c | 1 + src/melee/gr/grtluigi.h | 1 + src/melee/gr/grtmario.c | 1 + src/melee/gr/grtmars.c | 1 + src/melee/gr/grtmewtwo.c | 1 + src/melee/gr/grtness.c | 1 + src/melee/gr/grtpeach.c | 1 + src/melee/gr/grtpichu.c | 1 + src/melee/gr/grtpikachu.h | 1 + src/melee/gr/grtpurin.h | 1 + src/melee/gr/grtsamus.c | 1 + src/melee/gr/grtseak.c | 1 + src/melee/gr/grtyoshi.c | 1 + src/melee/gr/grtzelda.c | 1 + src/melee/gr/stage.h | 1 + src/melee/gr/types.h | 3 +- src/melee/if/if_2F72.h | 1 - src/melee/if/ifall.c | 2 +- src/melee/if/ifall.h | 1 - .../if/{ifall__static.h => ifall.static.h} | 4 +- src/melee/if/ifstatus.c | 74 ++--- src/melee/if/ifstatus.h | 1 + src/melee/if/types.h | 4 +- src/melee/it/itCommonItems.h | 15 +- src/melee/it/itPKFlash.h | 1 + src/melee/it/itPKThunder.h | 1 + src/melee/it/it_266F.c | 55 ++-- src/melee/it/it_266F.h | 4 +- src/melee/it/it_26B1.c | 37 +-- src/melee/it/it_26B1.h | 1 + src/melee/it/it_2725.h | 4 +- src/melee/it/item.c | 115 ++++---- src/melee/it/item.h | 1 + src/melee/it/items/it_27CF.h | 1 + src/melee/it/items/it_2ADA.c | 4 +- src/melee/it/items/it_2E5A.h | 1 + src/melee/it/items/it_2E6A.h | 1 + src/melee/it/items/it_2F2B.c | 3 +- src/melee/it/items/it_2F2B.h | 1 + src/melee/it/items/itarwinglaser.c | 1 - src/melee/it/items/itbat.c | 2 +- src/melee/it/items/itbat.h | 1 + src/melee/it/items/itbombhei.c | 1 - src/melee/it/items/itbox.c | 1 - src/melee/it/items/itcapsule.c | 3 +- src/melee/it/items/itcapsule.h | 1 + src/melee/it/items/itchicoritaleaf.c | 4 +- src/melee/it/items/itchicoritaleaf.h | 1 + src/melee/it/items/itclimbersblizzard.c | 4 +- src/melee/it/items/itclimbersblizzard.h | 1 + src/melee/it/items/itclimbersice.c | 4 +- src/melee/it/items/itclimbersice.h | 1 + src/melee/it/items/itclinkmilk.c | 1 - src/melee/it/items/itcoin.c | 2 +- src/melee/it/items/itcoin.h | 1 + src/melee/it/items/itcrazyhandbomb.c | 1 - src/melee/it/items/itcrazyhandbomb.h | 1 + src/melee/it/items/itdkinoko.h | 1 + src/melee/it/items/itdosei.c | 1 - src/melee/it/items/itdrmariopill.h | 1 + src/melee/it/items/itegg.c | 10 +- src/melee/it/items/itevyoshiegg.c | 1 - src/melee/it/items/itevyoshiegg.h | 1 + src/melee/it/items/itfflower.c | 2 +- src/melee/it/items/itfflower.h | 1 + src/melee/it/items/itfflowerflame.c | 6 +- src/melee/it/items/itfflowerflame.h | 1 + src/melee/it/items/itfire.c | 1 - src/melee/it/items/itflipper.c | 1 - src/melee/it/items/itflipper.h | 1 + src/melee/it/items/itfoods.c | 2 +- src/melee/it/items/itfoxblaster.c | 4 +- src/melee/it/items/itfoxillusion.c | 2 +- src/melee/it/items/itfoxillusion.h | 1 + src/melee/it/items/itfoxlaser.c | 5 +- src/melee/it/items/itfoxlaser.h | 1 + src/melee/it/items/itfreeze.h | 1 + src/melee/it/items/itfreezer.c | 1 - src/melee/it/items/itfushigibana.c | 1 - src/melee/it/items/itgamewatchchef.h | 1 + src/melee/it/items/itgamewatchpanic.c | 2 +- src/melee/it/items/itgamewatchpanic.h | 1 + src/melee/it/items/itgamewatchrescue.c | 1 - src/melee/it/items/itgamewatchturtle.c | 2 +- src/melee/it/items/itgreatfoxlaser.h | 4 +- src/melee/it/items/itgshell.c | 1 - src/melee/it/items/itgshell.h | 1 + src/melee/it/items/ithammer.c | 1 + src/melee/it/items/ithammerhead.c | 4 +- src/melee/it/items/ithammerhead.h | 1 + src/melee/it/items/itharisen.c | 1 - src/melee/it/items/itharisen.h | 1 + src/melee/it/items/ithassam.c | 3 +- src/melee/it/items/itheart.c | 6 +- src/melee/it/items/ithinoarashi.c | 1 - src/melee/it/items/ithinoarashi.h | 1 + src/melee/it/items/ithitodeman.c | 10 +- src/melee/it/items/ithitodeman.h | 1 + src/melee/it/items/ithouou.c | 1 - src/melee/it/items/itkabigon.c | 1 - src/melee/it/items/itkamex.c | 4 +- src/melee/it/items/itkamex.h | 4 +- src/melee/it/items/itkinoko.h | 1 + src/melee/it/items/itkirby_2F23.c | 1 - src/melee/it/items/itkirbycutterbeam.c | 4 +- src/melee/it/items/itkirbycutterbeam.h | 1 + src/melee/it/items/itkirbyhammer.c | 2 +- src/melee/it/items/itkirbyhammer.h | 1 + src/melee/it/items/itkirbyyoshispecialn.c | 3 +- src/melee/it/items/itkirbyyoshispecialn.h | 1 + src/melee/it/items/itklap.c | 1 - src/melee/it/items/itklap.h | 4 +- src/melee/it/items/itkoopaflame.c | 4 +- src/melee/it/items/itkoopaflame.h | 1 + src/melee/it/items/itkusudama.c | 1 - src/melee/it/items/itleadead.c | 1 - src/melee/it/items/itleadead.h | 1 + src/melee/it/items/itlgun.h | 1 + src/melee/it/items/itlgunbeam.c | 5 +- src/melee/it/items/itlgunbeam.h | 1 + src/melee/it/items/itlgunray.c | 5 +- src/melee/it/items/itlgunray.h | 1 + src/melee/it/items/itlikelike.c | 1 - src/melee/it/items/itlikelike.h | 4 +- src/melee/it/items/itlinkarrow.c | 4 +- src/melee/it/items/itlinkarrow.h | 1 + src/melee/it/items/itlinkbomb.c | 30 +- src/melee/it/items/itlinkbomb.h | 1 + src/melee/it/items/itlinkboomerang.h | 1 + src/melee/it/items/itlinkbow.c | 2 +- src/melee/it/items/itlinkhookshot.c | 10 +- src/melee/it/items/itlinkhookshot.h | 1 + src/melee/it/items/itlipstick.c | 10 +- src/melee/it/items/itlipstick.h | 9 +- src/melee/it/items/itlipstickspore.c | 4 +- src/melee/it/items/itlipstickspore.h | 1 + src/melee/it/items/itlizardon.c | 4 +- src/melee/it/items/itlizardon.h | 1 + src/melee/it/items/itlucky.c | 1 - src/melee/it/items/itlucky.h | 4 +- src/melee/it/items/itlugia.c | 1 - src/melee/it/items/itlugia.h | 4 +- src/melee/it/items/itluigifireball.c | 2 +- src/melee/it/items/itluigifireball.h | 1 + src/melee/it/items/itmaril.c | 4 +- src/melee/it/items/itmaril.h | 1 + src/melee/it/items/itmariofireball.c | 2 +- src/melee/it/items/itmariofireball.h | 1 + src/melee/it/items/itmarumine.h | 1 + src/melee/it/items/itmasterhandbullet.c | 4 +- src/melee/it/items/itmasterhandbullet.h | 1 + src/melee/it/items/itmasterhandlaser.c | 1 - src/melee/it/items/itmatadogas.c | 1 - src/melee/it/items/itmato.c | 1 + src/melee/it/items/itmato.h | 1 + src/melee/it/items/itmball.c | 1 - src/melee/it/items/itmball.h | 1 + src/melee/it/items/itmetalb.c | 5 +- src/melee/it/items/itmetalb.h | 1 + src/melee/it/items/itmetamon.h | 1 + src/melee/it/items/itmewtwodisable.c | 4 +- src/melee/it/items/itmewtwodisable.h | 1 + src/melee/it/items/itmewtwoshadowball.h | 1 + src/melee/it/items/itmsbomb.h | 1 + src/melee/it/items/itnessbat.c | 1 - src/melee/it/items/itnessfirepillar.h | 1 + src/melee/it/items/itnesspkfire.c | 4 +- src/melee/it/items/itnesspkfire.h | 1 + src/melee/it/items/itnesspkflush.h | 1 + src/melee/it/items/itnesspkflushexplode.c | 4 +- src/melee/it/items/itnesspkflushexplode.h | 1 + src/melee/it/items/itnesspkthunderball.h | 1 + src/melee/it/items/itnesspkthundertrail.c | 1 - src/melee/it/items/itnokonoko.c | 1 - src/melee/it/items/itnokonoko.h | 4 +- src/melee/it/items/itoctarock.c | 1 - src/melee/it/items/itoctarock.h | 1 + src/melee/it/items/itoctarockstone.c | 4 +- src/melee/it/items/itoctarockstone.h | 1 + src/melee/it/items/itoldkuri.c | 1 - src/melee/it/items/itoldkuri.h | 1 + src/melee/it/items/itoldottosea.c | 1 - src/melee/it/items/itparasol.c | 2 +- src/melee/it/items/itparasol.h | 1 + src/melee/it/items/itpatapata.c | 1 - src/melee/it/items/itpeachexplode.c | 4 +- src/melee/it/items/itpeachexplode.h | 1 + src/melee/it/items/itpeachparasol.c | 2 +- src/melee/it/items/itpeachparasol.h | 1 + src/melee/it/items/itpeachtoadspore.h | 1 + src/melee/it/items/itpeachturnip.c | 1 - src/melee/it/items/itpeachturnip.h | 1 + src/melee/it/items/itpikachuthunder.h | 1 + src/melee/it/items/itpikachutjoltair.c | 1 - src/melee/it/items/itpikachutjoltair.h | 1 + src/melee/it/items/itpikachutjoltground.h | 1 + src/melee/it/items/itporygon2.h | 1 + src/melee/it/items/itrabbitc.c | 2 +- src/melee/it/items/itrabbitc.h | 1 + src/melee/it/items/itraikou.h | 1 + src/melee/it/items/itrshell.c | 1 - src/melee/it/items/itrshell.h | 1 + src/melee/it/items/itsamusbomb.c | 1 - src/melee/it/items/itsamusbomb.h | 1 + src/melee/it/items/itsamuschargeshot.c | 4 +- src/melee/it/items/itsamuschargeshot.h | 1 + src/melee/it/items/itsamusgrapple.c | 47 +++- src/melee/it/items/itsamusgrapple.h | 18 +- src/melee/it/items/itsamusmissile.h | 1 + src/melee/it/items/itscball.h | 1 + src/melee/it/items/itseakneedlethrown.h | 1 + src/melee/it/items/itseakvanish.c | 2 +- src/melee/it/items/itseakvanish.h | 1 + src/melee/it/items/itsonans.h | 1 + src/melee/it/items/itspycloak.c | 1 + src/melee/it/items/itsscope.c | 1 - src/melee/it/items/itsscope.h | 1 + src/melee/it/items/itsscopebeam.c | 4 +- src/melee/it/items/itsscopebeam.h | 1 + src/melee/it/items/itstar.h | 1 + src/melee/it/items/itstarrod.c | 1 - src/melee/it/items/itstarrod.h | 1 + src/melee/it/items/itstarrodstar.c | 4 +- src/melee/it/items/itstarrodstar.h | 1 + src/melee/it/items/itsword.c | 5 +- src/melee/it/items/itsword.h | 1 + src/melee/it/items/ittaru.c | 1 - src/melee/it/items/ittarucann.c | 19 +- src/melee/it/items/ittarucann.h | 6 +- src/melee/it/items/itthunder.c | 1 - src/melee/it/items/ittincle.h | 4 +- src/melee/it/items/ittomato.c | 6 +- src/melee/it/items/ittomato.h | 4 +- src/melee/it/items/itwhitebea.h | 4 +- src/melee/it/items/ityoshieggthrow.h | 1 + src/melee/it/items/ityoshistar.c | 2 +- src/melee/it/items/ityoshistar.h | 1 + src/melee/it/items/itzeldadinfire.h | 1 + src/melee/it/items/itzeldadinfireexplode.h | 1 + src/melee/it/items/itzgshell.h | 4 +- src/melee/it/items/types.h | 4 +- src/melee/it/types.h | 5 +- src/melee/lb/lb_00B0.c | 3 +- src/melee/lb/lb_00B0.h | 3 +- src/melee/lb/lb_00F9.c | 20 +- src/melee/lb/lb_00F9.h | 6 +- src/melee/lb/lb_00F9.static.h | 12 + src/melee/lb/lb_0192.h | 1 - src/melee/lb/lbanim.h | 4 +- src/melee/lb/lbarchive.c | 4 +- src/melee/lb/lbarchive.h | 1 + src/melee/lb/lbarq.c | 1 - src/melee/lb/lbarq.h | 1 - src/melee/lb/lbaudio_ax.h | 1 + src/melee/lb/lbbgflash.c | 1 - src/melee/lb/lbbgflash.h | 1 - src/melee/lb/lbcardgame.c | 33 ++- src/melee/lb/lbcardgame.h | 9 +- src/melee/lb/lbcardgame.static.h | 73 +++++ src/melee/lb/lbcollision.c | 3 +- src/melee/lb/lbcollision.h | 3 +- src/melee/lb/lbdvd.c | 19 +- src/melee/lb/lbdvd.h | 8 +- src/melee/lb/lbdvd.static.h | 20 ++ src/melee/lb/lbfile.h | 1 + src/melee/lb/lbgx.c | 3 +- src/melee/lb/lbgx.h | 1 + src/melee/lb/lbheap.c | 31 ++- src/melee/lb/lbheap.h | 5 +- src/melee/lb/lbheap.static.h | 30 ++ src/melee/lb/lbmemory.h | 1 + src/melee/lb/lbmthp.c | 27 +- src/melee/lb/lbmthp.h | 1 - src/melee/lb/lbmthp.static.h | 25 ++ src/melee/lb/lbrefract.h | 1 + src/melee/lb/lbshadow.h | 1 + src/melee/lb/lbsnap.c | 22 +- src/melee/lb/lbsnap.h | 7 +- src/melee/lb/lbsnap.static.h | 25 ++ src/melee/lb/types.h | 13 +- src/melee/mn/mncharsel.h | 4 +- src/melee/mn/mndeflicker.c | 1 + src/melee/mn/mndiagram.c | 96 +++++++ src/melee/mn/mndiagram.h | 51 ++++ src/melee/mn/mndiagram.static.h | 21 ++ src/melee/mn/mnhyaku.h | 1 + src/melee/mn/mnsoundtest.c | 1 + src/melee/mn/types.h | 3 +- src/melee/mp/forward.h | 1 + src/melee/mp/mpcoll.c | 37 +-- src/melee/mp/mpcoll.h | 1 + src/melee/mp/mpisland.h | 4 +- src/melee/mp/mplib.h | 3 +- src/melee/mp/types.h | 4 +- src/melee/pl/pl_0371.h | 4 +- src/melee/pl/player.c | 22 +- src/melee/pl/player.h | 1 + src/melee/pl/plbonus.c | 3 +- src/melee/pl/plbonus.h | 4 +- src/melee/pl/plbonuslib.c | 5 +- src/melee/pl/plbonuslib.h | 1 - src/melee/pl/types.h | 3 +- src/melee/un/types.h | 1 + src/melee/un/un_2FC9.c | 2 +- src/melee/un/un_2FC9.h | 4 +- .../{un_2FC9__static.h => un_2FC9.static.h} | 0 src/melee/vi/forward.h | 4 +- src/melee/vi/types.h | 7 + src/melee/vi/vi0102.c | 2 +- .../vi/{vi0102__static.h => vi0102.static.h} | 4 +- src/melee/vi/vi0402.c | 19 +- src/melee/vi/vi0402.h | 10 +- src/melee/vi/vi0402.static.h | 10 + src/melee/vi/vi0501.c | 19 ++ src/melee/vi/vi0501.h | 15 + src/melee/vi/vi0501.static.h | 8 + src/melee/vi/vi1101.c | 2 +- .../vi/{vi1101__static.h => vi1101.static.h} | 4 +- src/melee/vi/vi1201v1.c | 2 +- src/melee/vi/vi1201v1.h | 4 +- .../{vi1201v1__static.h => vi1201v1.static.h} | 0 src/sysdolphin/baselib/aobj.h | 1 + src/sysdolphin/baselib/archive.h | 1 + src/sysdolphin/baselib/axdriver.c | 16 +- src/sysdolphin/baselib/axdriver.h | 1 + src/sysdolphin/baselib/axdriver.static.h | 14 + src/sysdolphin/baselib/class.h | 1 + src/sysdolphin/baselib/cobj.c | 3 +- src/sysdolphin/baselib/cobj.h | 3 +- src/sysdolphin/baselib/controller.h | 1 + src/sysdolphin/baselib/devcom.h | 1 + src/sysdolphin/baselib/displayfunc.h | 1 + src/sysdolphin/baselib/dobj.h | 1 + src/sysdolphin/baselib/fobj.h | 1 + src/sysdolphin/baselib/fog.h | 1 + src/sysdolphin/baselib/gobj.h | 4 +- src/sysdolphin/baselib/gobjgxlink.h | 1 + src/sysdolphin/baselib/gobjobject.h | 4 +- src/sysdolphin/baselib/gobjplink.h | 1 + src/sysdolphin/baselib/gobjproc.c | 4 +- src/sysdolphin/baselib/gobjproc.h | 1 + src/sysdolphin/baselib/gobjuserdata.h | 1 + src/sysdolphin/baselib/hash.h | 1 + src/sysdolphin/baselib/hsd_3A94.h | 3 +- src/sysdolphin/baselib/jobj.h | 1 + src/sysdolphin/baselib/lobj.h | 1 + src/sysdolphin/baselib/mobj.h | 1 + src/sysdolphin/baselib/mtx.h | 1 + src/sysdolphin/baselib/object.h | 1 + src/sysdolphin/baselib/particle.c | 2 +- src/sysdolphin/baselib/particle.h | 1 + .../{particle__static.h => particle.static.h} | 0 src/sysdolphin/baselib/pobj.h | 1 + src/sysdolphin/baselib/psappsrt.h | 3 +- src/sysdolphin/baselib/psdisp.h | 1 + src/sysdolphin/baselib/psdisptev.h | 1 - src/sysdolphin/baselib/psstructs.h | 1 + src/sysdolphin/baselib/quatlib.h | 1 + src/sysdolphin/baselib/robj.c | 3 +- src/sysdolphin/baselib/robj.h | 1 + src/sysdolphin/baselib/rumble.h | 1 + src/sysdolphin/baselib/shadow.h | 1 + src/sysdolphin/baselib/sislib.h | 3 +- src/sysdolphin/baselib/sobjlib.c | 1 + src/sysdolphin/baselib/spline.h | 4 +- src/sysdolphin/baselib/state.h | 1 + src/sysdolphin/baselib/synth.c | 11 +- src/sysdolphin/baselib/synth.static.h | 16 ++ src/sysdolphin/baselib/synth__static.h | 10 - src/sysdolphin/baselib/tev.c | 3 +- src/sysdolphin/baselib/texp.c | 3 +- src/sysdolphin/baselib/texp.h | 1 + src/sysdolphin/baselib/texpdag.h | 4 +- src/sysdolphin/baselib/tobj.h | 1 + src/sysdolphin/baselib/util.h | 1 + src/sysdolphin/baselib/video.h | 1 + src/sysdolphin/baselib/wobj.h | 1 + 849 files changed, 3118 insertions(+), 1353 deletions(-) create mode 100644 src/melee/cm/camera.static.h rename src/melee/db/{db_2253__static.h => db_2253.static.h} (56%) create mode 100644 src/melee/ft/chara/ftKirby/ftKb_Init.static.h create mode 100644 src/melee/ft/chara/ftYoshi/ftYs_SpecialN.static.h create mode 100644 src/melee/gm/gm_1601.static.h rename src/melee/gm/{gm_1A36__static.h => gm_1A36.static.h} (78%) rename src/melee/gm/{gmmain_lib__static.h => gmmain_lib.static.h} (100%) rename src/melee/if/{ifall__static.h => ifall.static.h} (100%) create mode 100644 src/melee/lb/lb_00F9.static.h create mode 100644 src/melee/lb/lbcardgame.static.h create mode 100644 src/melee/lb/lbdvd.static.h create mode 100644 src/melee/lb/lbheap.static.h create mode 100644 src/melee/lb/lbmthp.static.h create mode 100644 src/melee/lb/lbsnap.static.h create mode 100644 src/melee/mn/mndiagram.static.h rename src/melee/un/{un_2FC9__static.h => un_2FC9.static.h} (100%) rename src/melee/vi/{vi0102__static.h => vi0102.static.h} (100%) create mode 100644 src/melee/vi/vi0402.static.h create mode 100644 src/melee/vi/vi0501.static.h rename src/melee/vi/{vi1101__static.h => vi1101.static.h} (100%) rename src/melee/vi/{vi1201v1__static.h => vi1201v1.static.h} (100%) create mode 100644 src/sysdolphin/baselib/axdriver.static.h rename src/sysdolphin/baselib/{particle__static.h => particle.static.h} (100%) create mode 100644 src/sysdolphin/baselib/synth.static.h delete mode 100644 src/sysdolphin/baselib/synth__static.h diff --git a/.clang-format b/.clang-format index cb2a3b6ab2..bc81d2e93e 100644 --- a/.clang-format +++ b/.clang-format @@ -27,11 +27,11 @@ WhitespaceSensitiveMacros: - 'CHECK' IncludeBlocks: Regroup IncludeCategories: - - Regex: '^".*?__static\.h"$' - Priority: -2 - SortPriority: 0 - Regex: '^$' - Priority: -1 + Priority: -2 + SortPriority: -7 + - Regex: '^$' + Priority: -2 SortPriority: -6 - Regex: '^"forward\.h"$' Priority: -1 @@ -45,6 +45,9 @@ IncludeCategories: - Regex: '^<(sysdolphin/)?baselib(/.*)?/forward\.h>$' Priority: -1 SortPriority: -1 + - Regex: '^".*\.static\.h"$' + Priority: 0 + SortPriority: -1 - Regex: '^<(.*/)?forward\.h>$' Priority: -1 SortPriority: -3 diff --git a/configure.py b/configure.py index 3acbf81b83..d7066f6995 100755 --- a/configure.py +++ b/configure.py @@ -17,15 +17,8 @@ from pathlib import Path from typing import Iterator, List, Optional -from tools.project import ( - Library, - Object, - ProgressCategory, - ProjectConfig, - calculate_progress, - generate_build, - is_windows, -) +from tools.project import (Library, Object, ProgressCategory, ProjectConfig, + calculate_progress, generate_build, is_windows) # Game versions DEFAULT_VERSION = 0 @@ -253,6 +246,21 @@ "-inline auto", ] +# MetroTRK flags +cflags_trk = [ + *cflags_base, + "-use_lmw_stmw on", + "-str reuse,pool,readonly", + "-common off", + "-sdata 0", + "-sdata2 0", + "-fp hard", + "-enum int", + "-char unsigned", + "-inline deferred", + "-rostr", +] + includes_base = ["src"] system_includes_base = [ @@ -393,6 +401,16 @@ def RuntimeLib(lib_name: str, objects: Objects) -> Library: ) +def TRKLib(lib_name: str, objects: Objects) -> Library: + return Lib( + lib_name, + objects, + cflags=cflags_trk, + fix_epilogue=False, + category="runtime", + ) + + Matching = True # Object matches and should be linked NonMatching = False # Object does not match and should not be linked Equivalent = ( @@ -1206,7 +1224,7 @@ def RuntimeLib(lib_name: str, objects: Objects) -> Library: Object(NonMatching, "MSL/math.c"), ], ), - RuntimeLib( + TRKLib( "MetroTRK (Metrowerks Target Resident Kernel)", [ Object(NonMatching, "MetroTRK/mainloop.c"), diff --git a/src/MSL/buffer_io.c b/src/MSL/buffer_io.c index 6903f79da6..c4d1f7e962 100644 --- a/src/MSL/buffer_io.c +++ b/src/MSL/buffer_io.c @@ -7,7 +7,7 @@ s32 __flush_buffer(BufferIoUnkStruct* arg0, s32* arg1) temp_r0 = arg0->x20 - arg0->x18; if (temp_r0 != 0) { arg0->x24 = temp_r0; - if (arg0->x05.bits.b4) { + if (arg0->x05.b4) { arg0 != 0; } diff --git a/src/MSL/buffer_io.h b/src/MSL/buffer_io.h index 06df6b098e..338c5bb0f9 100644 --- a/src/MSL/buffer_io.h +++ b/src/MSL/buffer_io.h @@ -13,7 +13,7 @@ typedef struct _BufferIoUnkFlagStruct { u8 b5 : 1; u8 b6 : 1; u8 b7 : 1; - } bits; + }; } BufferIoUnkFlagStruct; typedef struct _BufferIoUnkStruct { diff --git a/src/MSL/printf.h b/src/MSL/printf.h index 8d29674611..bc7e87232a 100644 --- a/src/MSL/printf.h +++ b/src/MSL/printf.h @@ -2,6 +2,7 @@ #define GALE01_323CF0 #include + #include /* 323CF0 */ UNK_RET __stdio_atexit(UNK_PARAMS); diff --git a/src/MetroTRK/dispatch.c b/src/MetroTRK/dispatch.c index 8b13789179..f3b4192620 100644 --- a/src/MetroTRK/dispatch.c +++ b/src/MetroTRK/dispatch.c @@ -1 +1,11 @@ +#include "dispatch.h" +#include + +enum_t TRKInitializeDispatcher(void) +{ + MTRK_NubInit_804A4B40 = 32; + return 0; +} + +/// #TRKDispatchMessage diff --git a/src/MetroTRK/dispatch.h b/src/MetroTRK/dispatch.h index 8b13789179..085bd83f3e 100644 --- a/src/MetroTRK/dispatch.h +++ b/src/MetroTRK/dispatch.h @@ -1 +1,9 @@ +#ifndef GALE01_3276A8 +#define GALE01_3276A8 +#include + +/* 3276A8 */ enum_t TRKInitializeDispatcher(void); +/* 3276BC */ UNK_RET TRKDispatchMessage(UNK_PARAMS); + +#endif diff --git a/src/MetroTRK/nubinit.c b/src/MetroTRK/nubinit.c index 8b13789179..d93d2158d3 100644 --- a/src/MetroTRK/nubinit.c +++ b/src/MetroTRK/nubinit.c @@ -1 +1,11 @@ +#include "nubinit.h" +/* 4A4B40 */ size_t MTRK_NubInit_804A4B40; + +/// #TRKInitializeNub + +/// #TRKTerminateNub + +/// #TRKNubWelcome + +/// #TRKInitializeEndian diff --git a/src/MetroTRK/nubinit.h b/src/MetroTRK/nubinit.h index 8b13789179..fe7f3c07a4 100644 --- a/src/MetroTRK/nubinit.h +++ b/src/MetroTRK/nubinit.h @@ -1 +1,12 @@ +#ifndef GALE01_326AD8 +#define GALE01_326AD8 +#include + +/* 326AD8 */ UNK_RET TRKInitializeNub(UNK_PARAMS); +/* 326BAC */ UNK_RET TRKTerminateNub(UNK_PARAMS); +/* 326BD0 */ UNK_RET TRKNubWelcome(UNK_PARAMS); +/* 326BF8 */ UNK_RET TRKInitializeEndian(UNK_PARAMS); +/* 4A4B40 */ extern size_t MTRK_NubInit_804A4B40; + +#endif diff --git a/src/MetroTRK/targimpl.c b/src/MetroTRK/targimpl.c index 7612cae1c0..8ba032d93e 100644 --- a/src/MetroTRK/targimpl.c +++ b/src/MetroTRK/targimpl.c @@ -1,7 +1,7 @@ -#include "targimpl.h" - #include +#include "targimpl.h" + int __TRK_get_MSR(void) { #ifdef MWERKS_GEKKO diff --git a/src/Runtime/Gecko_setjmp.c b/src/Runtime/Gecko_setjmp.c index 8cc670ad62..1b439a5841 100644 --- a/src/Runtime/Gecko_setjmp.c +++ b/src/Runtime/Gecko_setjmp.c @@ -1,7 +1,7 @@ #include +#include #include -#include #ifdef MWERKS_GEKKO asm int __setjmp(register __jmp_buf* env) diff --git a/src/Runtime/__init_cpp_exceptions.c b/src/Runtime/__init_cpp_exceptions.c index dbfe9a2c1f..479bbdbdbd 100644 --- a/src/Runtime/__init_cpp_exceptions.c +++ b/src/Runtime/__init_cpp_exceptions.c @@ -1,8 +1,8 @@ #include +#include #include <__init_cpp_exceptions.h> #include -#include static int fragmentID = -2; diff --git a/src/Runtime/__va_arg.c b/src/Runtime/__va_arg.c index 3461de72f8..6ba96eea0d 100644 --- a/src/Runtime/__va_arg.c +++ b/src/Runtime/__va_arg.c @@ -1,4 +1,5 @@ #include + #include #ifdef __MWERKS__ diff --git a/src/common_structs.h b/src/common_structs.h index e4af241ac4..f7b3713f9e 100644 --- a/src/common_structs.h +++ b/src/common_structs.h @@ -4,6 +4,7 @@ #define _common_structs_h_ #include + #include #include @@ -62,7 +63,7 @@ typedef u32 HSD_Pad; #define MPCOLL_FLAGS_B24 (1 << 24) #define MPCOLL_FLAGS_B25 (1 << 25) -typedef union _UnkFlagStruct { +typedef union UnkFlagStruct { u8 u8; struct { u8 b0 : 1; @@ -73,7 +74,7 @@ typedef union _UnkFlagStruct { u8 b5 : 1; u8 b6 : 1; u8 b7 : 1; - } bits; + }; } UnkFlagStruct; typedef struct ColorOverlay { diff --git a/src/dolphin/ai/ai.c b/src/dolphin/ai/ai.c index 0bd31985e2..0da5f65972 100644 --- a/src/dolphin/ai/ai.c +++ b/src/dolphin/ai/ai.c @@ -1,4 +1,5 @@ #include + #include #include #include diff --git a/src/dolphin/ax/AXSPB.h b/src/dolphin/ax/AXSPB.h index c6e1641e47..7958a35ff3 100644 --- a/src/dolphin/ax/AXSPB.h +++ b/src/dolphin/ax/AXSPB.h @@ -2,6 +2,7 @@ #define GALE01_359D8C #include + #include /* 359D8C */ AXSPB* __AXGetStudio(void); diff --git a/src/dolphin/ax/AXVPB.h b/src/dolphin/ax/AXVPB.h index fd66689a9f..141573bc59 100644 --- a/src/dolphin/ax/AXVPB.h +++ b/src/dolphin/ax/AXVPB.h @@ -2,8 +2,8 @@ #define GALE01_35A250 #include - #include + #include /* 35A250 */ u32 __AXGetNumVoices(void); diff --git a/src/dolphin/base/PPCArch.c b/src/dolphin/base/PPCArch.c index 81b00afb47..94e2f2c52d 100644 --- a/src/dolphin/base/PPCArch.c +++ b/src/dolphin/base/PPCArch.c @@ -1,4 +1,5 @@ #include + #include #ifdef MWERKS_GEKKO diff --git a/src/dolphin/card.h b/src/dolphin/card.h index 5e21bbcdd7..f15514dade 100644 --- a/src/dolphin/card.h +++ b/src/dolphin/card.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_H #include + #include #include diff --git a/src/dolphin/card/CARDBios.h b/src/dolphin/card/CARDBios.h index 11e0b9888c..e0c93e7b45 100644 --- a/src/dolphin/card/CARDBios.h +++ b/src/dolphin/card/CARDBios.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDBIOS_H #include + #include #include diff --git a/src/dolphin/card/CARDBlock.h b/src/dolphin/card/CARDBlock.h index 6cf288c0fa..1a90a039e9 100644 --- a/src/dolphin/card/CARDBlock.h +++ b/src/dolphin/card/CARDBlock.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDBLOCK_H #include + #include #include diff --git a/src/dolphin/card/CARDCheck.h b/src/dolphin/card/CARDCheck.h index 163d58da2b..1448122e13 100644 --- a/src/dolphin/card/CARDCheck.h +++ b/src/dolphin/card/CARDCheck.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDCHECK_H #include + #include #include diff --git a/src/dolphin/card/CARDCreate.h b/src/dolphin/card/CARDCreate.h index 9ace847ade..1a1b3fd295 100644 --- a/src/dolphin/card/CARDCreate.h +++ b/src/dolphin/card/CARDCreate.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDCREATE_H #include + #include s32 CARDCreateAsync(s32 chan, const char* fileName, u32 size, diff --git a/src/dolphin/card/CARDDelete.h b/src/dolphin/card/CARDDelete.h index b167f40a7f..295c46706d 100644 --- a/src/dolphin/card/CARDDelete.h +++ b/src/dolphin/card/CARDDelete.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDDELETE_H #include + #include s32 CARDFastDeleteAsync(s32 chan, s32 fileNo, CARDCallback callback); diff --git a/src/dolphin/card/CARDDir.h b/src/dolphin/card/CARDDir.h index 2dc5dcb2f8..90c24bf44b 100644 --- a/src/dolphin/card/CARDDir.h +++ b/src/dolphin/card/CARDDir.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDDIR_H #include + #include #include diff --git a/src/dolphin/card/CARDFormat.h b/src/dolphin/card/CARDFormat.h index 721ccf00ea..bc65a69708 100644 --- a/src/dolphin/card/CARDFormat.h +++ b/src/dolphin/card/CARDFormat.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDFORMAT_H #include + #include void FormatCallback(s32 chan, s32 result); diff --git a/src/dolphin/card/CARDMount.h b/src/dolphin/card/CARDMount.h index 632f85df4f..ef55ebcf7b 100644 --- a/src/dolphin/card/CARDMount.h +++ b/src/dolphin/card/CARDMount.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDMOUNT_H #include + #include #include diff --git a/src/dolphin/card/CARDOpen.h b/src/dolphin/card/CARDOpen.h index 963466b675..03f188bff5 100644 --- a/src/dolphin/card/CARDOpen.h +++ b/src/dolphin/card/CARDOpen.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDOPEN_H #include + #include #include diff --git a/src/dolphin/card/CARDRdwr.h b/src/dolphin/card/CARDRdwr.h index 6d2aac7371..dc880018b2 100644 --- a/src/dolphin/card/CARDRdwr.h +++ b/src/dolphin/card/CARDRdwr.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDRDWR_H #include + #include #include diff --git a/src/dolphin/card/CARDRead.h b/src/dolphin/card/CARDRead.h index ceee36dab9..83b8466da6 100644 --- a/src/dolphin/card/CARDRead.h +++ b/src/dolphin/card/CARDRead.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDREAD_H #include + #include #include diff --git a/src/dolphin/card/CARDRename.h b/src/dolphin/card/CARDRename.h index fa46a8a51f..3ef8cc3417 100644 --- a/src/dolphin/card/CARDRename.h +++ b/src/dolphin/card/CARDRename.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDRENAME_H #include + #include s32 CARDRenameAsync(s32 chan, const char* old, const char* new, diff --git a/src/dolphin/card/CARDStat.h b/src/dolphin/card/CARDStat.h index 16e4746690..0e44246459 100644 --- a/src/dolphin/card/CARDStat.h +++ b/src/dolphin/card/CARDStat.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDSTAT_H #include + #include s32 CARDGetStatus(s32 chan, s32 fileNo, CARDStat* stat); diff --git a/src/dolphin/card/CARDWrite.h b/src/dolphin/card/CARDWrite.h index 1a5b833fb0..dc556f40b8 100644 --- a/src/dolphin/card/CARDWrite.h +++ b/src/dolphin/card/CARDWrite.h @@ -2,6 +2,7 @@ #define DOLPHIN_CARD_CARDWRITE_H #include + #include s32 CARDWriteAsync(CARDFileInfo* fileInfo, const void* buf, u32 length, diff --git a/src/dolphin/db/db.c b/src/dolphin/db/db.c index 9befd6729a..8be04e09ed 100644 --- a/src/dolphin/db/db.c +++ b/src/dolphin/db/db.c @@ -1,4 +1,5 @@ #include + #include #include #include diff --git a/src/dolphin/dvd/dvd.h b/src/dolphin/dvd/dvd.h index 36f157736a..a4e5599970 100644 --- a/src/dolphin/dvd/dvd.h +++ b/src/dolphin/dvd/dvd.h @@ -2,6 +2,7 @@ #define __DOLPHIN_DVD_H_ #include + #include #include diff --git a/src/dolphin/dvd/dvdfs.c b/src/dolphin/dvd/dvdfs.c index 982e03d1b8..9b3d2473a8 100644 --- a/src/dolphin/dvd/dvdfs.c +++ b/src/dolphin/dvd/dvdfs.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/dolphin/dvd/dvdlow.c b/src/dolphin/dvd/dvdlow.c index 66df45a893..8939dd0264 100644 --- a/src/dolphin/dvd/dvdlow.c +++ b/src/dolphin/dvd/dvdlow.c @@ -1,6 +1,7 @@ +#include + #include "dvdlow.h" -#include #include #include diff --git a/src/dolphin/dvd/dvdqueue.h b/src/dolphin/dvd/dvdqueue.h index e52c265ce6..1b5aed276a 100644 --- a/src/dolphin/dvd/dvdqueue.h +++ b/src/dolphin/dvd/dvdqueue.h @@ -2,6 +2,7 @@ #define DOLPHIN_DVD_DVDQUEUE_H #include + #include void __DVDClearWaitingQueue(void); diff --git a/src/dolphin/dvd/fstload.h b/src/dolphin/dvd/fstload.h index aab9b31b2c..21ae5c4440 100644 --- a/src/dolphin/dvd/fstload.h +++ b/src/dolphin/dvd/fstload.h @@ -2,6 +2,7 @@ #define DOLPHIN_DVD_FSTLOAD_H #include + #include void __fstLoad(void); diff --git a/src/dolphin/gx/GXAttr.c b/src/dolphin/gx/GXAttr.c index f0af0bacc8..5ec0195118 100644 --- a/src/dolphin/gx/GXAttr.c +++ b/src/dolphin/gx/GXAttr.c @@ -1,7 +1,8 @@ #include +#include + #include -#include #include #include #include diff --git a/src/dolphin/gx/GXBump.c b/src/dolphin/gx/GXBump.c index 12815ecf42..0a83731532 100644 --- a/src/dolphin/gx/GXBump.c +++ b/src/dolphin/gx/GXBump.c @@ -1,6 +1,7 @@ +#include + #include -#include #include #include #include diff --git a/src/dolphin/gx/GXBump.h b/src/dolphin/gx/GXBump.h index 3e699b0753..826b351657 100644 --- a/src/dolphin/gx/GXBump.h +++ b/src/dolphin/gx/GXBump.h @@ -2,7 +2,6 @@ #define DOLPHIN_GX_GXBUMP_H #include - #include void __GXUpdateBPMask(void); diff --git a/src/dolphin/gx/GXFifo.c b/src/dolphin/gx/GXFifo.c index c8808dae9b..557e6dbe05 100644 --- a/src/dolphin/gx/GXFifo.c +++ b/src/dolphin/gx/GXFifo.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/dolphin/gx/GXFrameBuf.c b/src/dolphin/gx/GXFrameBuf.c index 7cca2f53e7..13f2f8bb3e 100644 --- a/src/dolphin/gx/GXFrameBuf.c +++ b/src/dolphin/gx/GXFrameBuf.c @@ -1,6 +1,7 @@ +#include + #include -#include #include #include #include diff --git a/src/dolphin/gx/GXFrameBuf.h b/src/dolphin/gx/GXFrameBuf.h index bc0eaa72bb..c41371446a 100644 --- a/src/dolphin/gx/GXFrameBuf.h +++ b/src/dolphin/gx/GXFrameBuf.h @@ -2,6 +2,7 @@ #define DOLPHIN_GX_GXFRAMEBUF_H #include + #include #include diff --git a/src/dolphin/gx/GXInit.c b/src/dolphin/gx/GXInit.c index 5f1ef9f51c..63e708c935 100644 --- a/src/dolphin/gx/GXInit.c +++ b/src/dolphin/gx/GXInit.c @@ -1,4 +1,5 @@ #include + #include #include #include diff --git a/src/dolphin/gx/GXInit.h b/src/dolphin/gx/GXInit.h index d68a93f3ed..ddd531d9d4 100644 --- a/src/dolphin/gx/GXInit.h +++ b/src/dolphin/gx/GXInit.h @@ -2,9 +2,10 @@ #define _GXINIT_H_ #include +#include + #include -#include #include GXFifoObj* GXInit(GXFifoObj* fifo, u32 size); diff --git a/src/dolphin/gx/GXLight.h b/src/dolphin/gx/GXLight.h index bce946fe7a..948afed05b 100644 --- a/src/dolphin/gx/GXLight.h +++ b/src/dolphin/gx/GXLight.h @@ -2,6 +2,7 @@ #define DOLPHIN_GX_GXLIGHT_H #include + #include #include diff --git a/src/dolphin/gx/GXMisc.h b/src/dolphin/gx/GXMisc.h index 27fad2acad..f30f18bbac 100644 --- a/src/dolphin/gx/GXMisc.h +++ b/src/dolphin/gx/GXMisc.h @@ -2,6 +2,7 @@ #define DOLPHIN_GX_GXMISC_H #include + #include #include diff --git a/src/dolphin/gx/GXPerf.c b/src/dolphin/gx/GXPerf.c index ab5c010b4b..8f58a8a78d 100644 --- a/src/dolphin/gx/GXPerf.c +++ b/src/dolphin/gx/GXPerf.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/dolphin/gx/GXPixel.c b/src/dolphin/gx/GXPixel.c index 7e8a9ab0da..ba25e458e9 100644 --- a/src/dolphin/gx/GXPixel.c +++ b/src/dolphin/gx/GXPixel.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/dolphin/gx/GXPixel.h b/src/dolphin/gx/GXPixel.h index f8b0060bb5..09ea24803b 100644 --- a/src/dolphin/gx/GXPixel.h +++ b/src/dolphin/gx/GXPixel.h @@ -2,6 +2,7 @@ #define DOLPHIN_GX_GXPIXEL_H #include + #include #include diff --git a/src/dolphin/gx/GXTev.c b/src/dolphin/gx/GXTev.c index be954de84f..ee41730b44 100644 --- a/src/dolphin/gx/GXTev.c +++ b/src/dolphin/gx/GXTev.c @@ -1,4 +1,5 @@ #include + #include #include #include diff --git a/src/dolphin/gx/GXTev.h b/src/dolphin/gx/GXTev.h index c0615f73b9..7cf572a446 100644 --- a/src/dolphin/gx/GXTev.h +++ b/src/dolphin/gx/GXTev.h @@ -2,6 +2,7 @@ #define DOLPHIN_GX_GXTEV_H #include + #include #include diff --git a/src/dolphin/gx/GXTexture.c b/src/dolphin/gx/GXTexture.c index 3fa0c22753..aa7c40ee09 100644 --- a/src/dolphin/gx/GXTexture.c +++ b/src/dolphin/gx/GXTexture.c @@ -1,6 +1,7 @@ +#include + #include "dolphin/gx/forward.h" -#include #include #include #include diff --git a/src/dolphin/gx/GXTexture.h b/src/dolphin/gx/GXTexture.h index c75c1ae0f9..86b6c5733c 100644 --- a/src/dolphin/gx/GXTexture.h +++ b/src/dolphin/gx/GXTexture.h @@ -2,9 +2,10 @@ #define DOLPHIN_GX_GXTEXTURE_H #include +#include + #include -#include #include void __GXSetSUTexSize(void); diff --git a/src/dolphin/gx/GXTransform.c b/src/dolphin/gx/GXTransform.c index 7edba8e51b..535d1324e5 100644 --- a/src/dolphin/gx/GXTransform.c +++ b/src/dolphin/gx/GXTransform.c @@ -1,6 +1,7 @@ +#include + #include -#include #include #include #include diff --git a/src/dolphin/gx/GXTransform.h b/src/dolphin/gx/GXTransform.h index 23819bc4c0..c189a49b76 100644 --- a/src/dolphin/gx/GXTransform.h +++ b/src/dolphin/gx/GXTransform.h @@ -2,8 +2,8 @@ #define DOLPHIN_GX_GXTRANSFORM_H #include - #include + #include void GXProject(f32 x, // model coordinates diff --git a/src/dolphin/gx/__GXFifo.h b/src/dolphin/gx/__GXFifo.h index 0e4018ae9e..2f4307b447 100644 --- a/src/dolphin/gx/__GXFifo.h +++ b/src/dolphin/gx/__GXFifo.h @@ -2,6 +2,7 @@ #define DOLPHIN_GX___GXFIFO_H #include + #include #include diff --git a/src/dolphin/gx/__GXInit.h b/src/dolphin/gx/__GXInit.h index de8c8e2494..03384f6e6c 100644 --- a/src/dolphin/gx/__GXInit.h +++ b/src/dolphin/gx/__GXInit.h @@ -2,6 +2,7 @@ #define DOLPHIN_GX___GXINIT_H #include + #include #include diff --git a/src/dolphin/gx/__types.h b/src/dolphin/gx/__types.h index 0d729e1713..150105c157 100644 --- a/src/dolphin/gx/__types.h +++ b/src/dolphin/gx/__types.h @@ -2,6 +2,7 @@ #define DOLPHIN_GX___TYPES_H #include + #include #include diff --git a/src/dolphin/gx/types.h b/src/dolphin/gx/types.h index 4a24bda8d2..abdd6b4b5c 100644 --- a/src/dolphin/gx/types.h +++ b/src/dolphin/gx/types.h @@ -2,6 +2,7 @@ #define DOLPHIN_GX_TYPES_H #include + #include #define GX_FIFO_OBJSIZE 128 diff --git a/src/dolphin/mtx/mtx44.c b/src/dolphin/mtx/mtx44.c index 28cc487871..b85c3e605c 100644 --- a/src/dolphin/mtx/mtx44.c +++ b/src/dolphin/mtx/mtx44.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/dolphin/mtx/types.h b/src/dolphin/mtx/types.h index 9933caf97f..0f409f13b8 100644 --- a/src/dolphin/mtx/types.h +++ b/src/dolphin/mtx/types.h @@ -2,6 +2,7 @@ #define DOLPHIN_MTX_TYPES_H #include + #include "dolphin/mtx/forward.h" // IWYU pragma: export #include diff --git a/src/dolphin/os/OSAlarm.c b/src/dolphin/os/OSAlarm.c index 82eb90ac72..fe4c465634 100644 --- a/src/dolphin/os/OSAlarm.c +++ b/src/dolphin/os/OSAlarm.c @@ -1,4 +1,5 @@ #include + #include #include #include diff --git a/src/dolphin/os/OSCache.c b/src/dolphin/os/OSCache.c index 2c45327478..452e6a1b9b 100644 --- a/src/dolphin/os/OSCache.c +++ b/src/dolphin/os/OSCache.c @@ -1,6 +1,6 @@ #include - #include + #include #include #include diff --git a/src/dolphin/os/OSContext.c b/src/dolphin/os/OSContext.c index 2fc397c070..ce732a5997 100644 --- a/src/dolphin/os/OSContext.c +++ b/src/dolphin/os/OSContext.c @@ -1,4 +1,5 @@ #include + #include #include #include diff --git a/src/dolphin/os/OSExi.c b/src/dolphin/os/OSExi.c index 2320c8cbd6..316776d996 100644 --- a/src/dolphin/os/OSExi.c +++ b/src/dolphin/os/OSExi.c @@ -1,5 +1,6 @@ -#include #include + +#include #include #include #include diff --git a/src/dolphin/os/OSInit.c b/src/dolphin/os/OSInit.c index 0404b3940a..6032ec0463 100644 --- a/src/dolphin/os/OSInit.c +++ b/src/dolphin/os/OSInit.c @@ -3,9 +3,9 @@ * @todo Should be called @c OS.c. */ #include +#include #include <__mem.h> -#include #include #include #include diff --git a/src/dolphin/os/OSInterrupt.c b/src/dolphin/os/OSInterrupt.c index d3ab573d1c..fe95375b5f 100644 --- a/src/dolphin/os/OSInterrupt.c +++ b/src/dolphin/os/OSInterrupt.c @@ -1,5 +1,6 @@ -#include <__mem.h> #include + +#include <__mem.h> #include #include #include diff --git a/src/dolphin/os/OSInterrupt.h b/src/dolphin/os/OSInterrupt.h index 7cc5817d3e..a8dda0e83c 100644 --- a/src/dolphin/os/OSInterrupt.h +++ b/src/dolphin/os/OSInterrupt.h @@ -4,8 +4,8 @@ #define _OS_INTERRUPT_H_ #include - #include + #include #include diff --git a/src/dolphin/os/OSMemory.c b/src/dolphin/os/OSMemory.c index 30858a91ca..2ee426f9c4 100644 --- a/src/dolphin/os/OSMemory.c +++ b/src/dolphin/os/OSMemory.c @@ -1,4 +1,5 @@ #include + #include #include #include diff --git a/src/dolphin/os/OSReboot.c b/src/dolphin/os/OSReboot.c index 340d4e2fda..3b23beff7e 100644 --- a/src/dolphin/os/OSReboot.c +++ b/src/dolphin/os/OSReboot.c @@ -1,4 +1,5 @@ #include + #include static bool Prepared; diff --git a/src/dolphin/os/OSReset.c b/src/dolphin/os/OSReset.c index 4fbbf73502..af53cf53b6 100644 --- a/src/dolphin/os/OSReset.c +++ b/src/dolphin/os/OSReset.c @@ -1,5 +1,6 @@ -#include <__mem.h> #include + +#include <__mem.h> #include #include #include diff --git a/src/dolphin/os/OSSerial.c b/src/dolphin/os/OSSerial.c index 9b1a0e0697..b6da87468e 100644 --- a/src/dolphin/os/OSSerial.c +++ b/src/dolphin/os/OSSerial.c @@ -1,6 +1,6 @@ #include - #include + #include #include #include diff --git a/src/dolphin/os/OSSync.c b/src/dolphin/os/OSSync.c index d736a8ae05..4b67beb24f 100644 --- a/src/dolphin/os/OSSync.c +++ b/src/dolphin/os/OSSync.c @@ -1,7 +1,7 @@ #include +#include #include <__mem.h> -#include #include #include #include diff --git a/src/dolphin/os/OSThread.c b/src/dolphin/os/OSThread.c index 22544885c1..2e1aa5c681 100644 --- a/src/dolphin/os/OSThread.c +++ b/src/dolphin/os/OSThread.c @@ -1,4 +1,5 @@ #include + #include #include #include diff --git a/src/dolphin/os/OSTime.c b/src/dolphin/os/OSTime.c index abc8173a79..7cfdc31f85 100644 --- a/src/dolphin/os/OSTime.c +++ b/src/dolphin/os/OSTime.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/dolphin/os/OSUartExi.c b/src/dolphin/os/OSUartExi.c index 5b05f0f4f6..4449286199 100644 --- a/src/dolphin/os/OSUartExi.c +++ b/src/dolphin/os/OSUartExi.c @@ -1,6 +1,6 @@ #include - #include + #include #include diff --git a/src/dolphin/os/init/__ppc_eabi_init.c b/src/dolphin/os/init/__ppc_eabi_init.c index 419ac44516..1a5b6fe950 100644 --- a/src/dolphin/os/init/__ppc_eabi_init.c +++ b/src/dolphin/os/init/__ppc_eabi_init.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/dolphin/os/init/__start.c b/src/dolphin/os/init/__start.c index b0afc4235e..ea74e0b9ea 100644 --- a/src/dolphin/os/init/__start.c +++ b/src/dolphin/os/init/__start.c @@ -1,5 +1,6 @@ -#include <__mem.h> #include + +#include <__mem.h> #include #include diff --git a/src/dolphin/pad/PadClamp.c b/src/dolphin/pad/PadClamp.c index 4701daf869..df5f9e4b24 100644 --- a/src/dolphin/pad/PadClamp.c +++ b/src/dolphin/pad/PadClamp.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/dolphin/pad/pad.h b/src/dolphin/pad/pad.h index 210d1d4274..4bb3779133 100644 --- a/src/dolphin/pad/pad.h +++ b/src/dolphin/pad/pad.h @@ -2,6 +2,7 @@ #define _PAD_H_ #include + #include #include diff --git a/src/dolphin/vi/vi.h b/src/dolphin/vi/vi.h index 6f51b5a975..c505734649 100644 --- a/src/dolphin/vi/vi.h +++ b/src/dolphin/vi/vi.h @@ -2,9 +2,10 @@ #define _vi_h_ #include +#include + #include -#include #include #define VIPadFrameBufferWidth(width) ((u16) (((u16) (width) + 15) & ~15)) diff --git a/src/melee/cm/camera.c b/src/melee/cm/camera.c index b49ea779ce..41f3d164a4 100644 --- a/src/melee/cm/camera.c +++ b/src/melee/cm/camera.c @@ -1,6 +1,8 @@ +#include + #include "ft/forward.h" -#include "camera.h" +#include "camera.static.h" #include "ft/ftlib.h" #include "gr/stage.h" @@ -11,30 +13,6 @@ #include #include -static s8 cm_803BCBB0[0x20] = "couldn't get CmSubject struct.\n"; - -/* 3B73B8 */ static Vec3 cm_803B73B8; -/* 3B73C4 */ static Vec3 cm_803B73C4; -/* 3BCB64 */ static HSD_CObjDesc cm_803BCB64; -/* 3BCCA0 */ static CameraUnkGlobals cm_803BCCA0 = { - 83.0f, 1000.0f, -30.0f, 5.0f, -7.0f, 17.5f, -17.5f, 0.0f, 0.0682f, - 60.0f, 120.0f, 0.05f, 0.1f, 120.0f, 900.0f, 0.15f, 38.0f, 0.1f, - 0.1f, 0.001f, 0.1f, 1.0f, 1.0f, 0.6f, 0.6f, 0.05f, 0.1f, - 29.0f, 0.1f, 0.1f, 0.1f, 0.1f, 0.5f, 0.5f, 0.4f, -11.0f, - 400.0f, 0.2f, 4.0f, 0.05f, 1.0f, -7.0f, 7.0f, 0.5f, 0.5f, - 0.004f, 0.2f, 0.025f, 0.2f, 0.003f, 0.2f, 0.025f, 0.2f, 0.02f, - 1.0f, 0.14f, 1200.0f, -0.2f, 1.2f, 0.0f, -}; -/* 452C68 */ static Camera cm_80452C68; -/* 4D6458 */ static CameraBox* cm_804D6458; -/* 4D6460 */ static CameraBox* cm_804D6460; -/* 4D6468 */ static CameraBox* cm_804D6468; -/* 4D7E04 */ static float cm_804D7E04; -/* 4D7E14 */ static float cm_804D7E14; -/* 4D7E30 */ static float cm_804D7E30; -/* 4D7E60 */ static float cm_804D7E60; -/* 4D7E6C */ static float cm_804D7E6C; - /// #Camera_80028B9C void Camera_80028F5C(CameraBox* subject, s32 arg1) @@ -205,7 +183,11 @@ void Camera_80029BC4(CameraBounds* bounds, CameraMovement* movement) /// #Camera_8002A0C0 -/// #Camera_8002A278 +void Camera_8002A278(f32 x, f32 y) +{ + cm_80452C68.unk_A4 = x; + cm_80452C68.unk_A8 = y; +} /// #Camera_8002A28C @@ -611,7 +593,10 @@ void Camera_8002B1F8(CameraMovement* movement) /// #Camera_8002F0E4 -/// #Camera_8002F260 +bool Camera_8002F260(void) +{ + return cm_80452C68.unk_341_b7; +} /// #Camera_8002F274 @@ -619,7 +604,10 @@ void Camera_8002B1F8(CameraMovement* movement) /// #Camera_8002F3AC -/// #Camera_8002F474 +void Camera_8002F474(void) +{ + cm_80452C68.mode = 0; +} /// #fn_8002F488 @@ -633,7 +621,10 @@ void Camera_8002B1F8(CameraMovement* movement) /// #Camera_8002F7AC -/// #Camera_8002F8F4 +void Camera_8002F8F4(void) +{ + cm_80452C68.mode = 4; +} /// #fn_8002F908 @@ -689,7 +680,10 @@ HSD_GObj* Camera_80030A50(void) /// #Camera_80030A60 -/// #Camera_80030A78 +bool Camera_80030A78(void) +{ + return cm_80452C68.unk_399_b3; +} /// #Camera_80030A8C @@ -699,23 +693,38 @@ HSD_GObj* Camera_80030A50(void) /// #Camera_80030AE0 -/// #Camera_80030AF8 +bool Camera_80030AF8(void) +{ + return cm_80452C68.unk_399_b2; +} /// #Camera_80030B0C -/// #Camera_80030B24 +bool Camera_80030B24(void) +{ + return cm_80452C68.unk_399_b7; +} /// #Camera_80030B38 -/// #Camera_80030B50 +bool Camera_80030B50(void) +{ + return cm_80452C68.unk_39A_b0; +} /// #Camera_80030B64 -/// #Camera_80030B7C +bool Camera_80030B7C(void) +{ + return cm_80452C68.unk_39A_b1; +} /// #Camera_80030B90 -/// #Camera_80030BA8 +bool Camera_80030BA8(void) +{ + return cm_80452C68.unk_39A_b2; +} /// #Camera_80030BBC @@ -723,7 +732,11 @@ HSD_GObj* Camera_80030A50(void) /// #Camera_80030CFC -/// #Camera_80030DE4 +void Camera_80030DE4(f32 arg8, f32 arg9) +{ + cm_80452C68.translation.x = arg8; + cm_80452C68.translation.y = arg9; +} void Camera_80030DF8(void) { @@ -734,18 +747,24 @@ void Camera_80030DF8(void) void Camera_80030E34(f32 arg8) { - M2C_FIELD(&cm_80452C68, f32*, 0xAC) = arg8; + cm_80452C68.unk_AC = arg8; } /// #Camera_80030E44 /// #Camera_80031044 -/// #Camera_80031060 +enum_t Camera_80031060(void) +{ + return cm_80452C68.unk_398_b6_b7; +} /// #Camera_80031074 -/// #Camera_8003108C +enum_t Camera_8003108C(void) +{ + return cm_80452C68.unk_399_b0_b1; +} /// #Camera_800310A0 diff --git a/src/melee/cm/camera.h b/src/melee/cm/camera.h index 99ee134415..5d3ee79154 100644 --- a/src/melee/cm/camera.h +++ b/src/melee/cm/camera.h @@ -2,13 +2,14 @@ #define GALE01_028B9C #include +#include + #include "cm/forward.h" #include #include #include "cm/types.h" -#include #include #include @@ -63,7 +64,7 @@ /* 02EEC8 */ void Camera_8002EEC8(float); /* 02EF14 */ void Camera_8002EF14(void); /* 02F0E4 */ void Camera_8002F0E4(s32); -/* 02F260 */ s32 Camera_8002F260(void); +/* 02F260 */ bool Camera_8002F260(void); /* 02F274 */ void Camera_8002F274(void); /* 02F360 */ UNK_RET fn_8002F360(UNK_PARAMS); /* 02F3AC */ UNK_RET Camera_8002F3AC(UNK_PARAMS); @@ -104,19 +105,19 @@ /* 030AA4 */ UNK_RET Camera_80030AA4(UNK_PARAMS); /* 030AC4 */ UNK_RET Camera_80030AC4(UNK_PARAMS); /* 030AE0 */ UNK_RET Camera_80030AE0(UNK_PARAMS); -/* 030AF8 */ UNK_RET Camera_80030AF8(UNK_PARAMS); +/* 030AF8 */ bool Camera_80030AF8(void); /* 030B0C */ UNK_RET Camera_80030B0C(UNK_PARAMS); /* 030B24 */ bool Camera_80030B24(void); /* 030B38 */ UNK_RET Camera_80030B38(UNK_PARAMS); -/* 030B50 */ UNK_RET Camera_80030B50(UNK_PARAMS); +/* 030B50 */ bool Camera_80030B50(void); /* 030B64 */ UNK_RET Camera_80030B64(UNK_PARAMS); -/* 030B7C */ UNK_RET Camera_80030B7C(UNK_PARAMS); +/* 030B7C */ bool Camera_80030B7C(void); /* 030B90 */ UNK_RET Camera_80030B90(UNK_PARAMS); -/* 030BA8 */ UNK_RET Camera_80030BA8(UNK_PARAMS); +/* 030BA8 */ bool Camera_80030BA8(void); /* 030BBC */ UNK_RET Camera_80030BBC(UNK_PARAMS); /* 030CD8 */ bool Camera_80030CD8(CameraBox*, S32Vec2*); /* 030CFC */ bool Camera_80030CFC(CameraBox*, float); -/* 030DE4 */ UNK_RET Camera_80030DE4(UNK_PARAMS); +/* 030DE4 */ void Camera_80030DE4(f32 arg8, f32 arg9); /* 030DF8 */ UNK_RET Camera_80030DF8(UNK_PARAMS); /* 030E10 */ UNK_RET Camera_80030E10(UNK_PARAMS); /* 030E34 */ void Camera_80030E34(f32 arg8); @@ -124,7 +125,7 @@ /* 031044 */ UNK_RET Camera_80031044(UNK_PARAMS); /* 031060 */ enum_t Camera_80031060(void); /* 031074 */ void Camera_80031074(u8); -/* 03108C */ UNK_RET Camera_8003108C(UNK_PARAMS); +/* 03108C */ enum_t Camera_8003108C(void); /* 0310A0 */ void Camera_800310A0(u8); /* 0310B8 */ HSD_CObj* Camera_800310B8(void); /* 0310E8 */ UNK_RET Camera_800310E8(UNK_PARAMS); diff --git a/src/melee/cm/camera.static.h b/src/melee/cm/camera.static.h new file mode 100644 index 0000000000..062b6f8f0f --- /dev/null +++ b/src/melee/cm/camera.static.h @@ -0,0 +1,29 @@ +#ifndef __GALE01_028B9C +#define __GALE01_028B9C + +#include "camera.h" // IWYU pragma: export + +/* 3B73B8 */ static Vec3 cm_803B73B8; +/* 3B73C4 */ static Vec3 cm_803B73C4; +/* 3BCB64 */ static HSD_CObjDesc cm_803BCB64; +/* 3BCBB0 */ static s8 cm_803BCBB0[0x20] = "couldn't get CmSubject struct.\n"; +/* 3BCCA0 */ static CameraUnkGlobals cm_803BCCA0 = { + 83.0f, 1000.0f, -30.0f, 5.0f, -7.0f, 17.5f, -17.5f, 0.0f, 0.0682f, + 60.0f, 120.0f, 0.05f, 0.1f, 120.0f, 900.0f, 0.15f, 38.0f, 0.1f, + 0.1f, 0.001f, 0.1f, 1.0f, 1.0f, 0.6f, 0.6f, 0.05f, 0.1f, + 29.0f, 0.1f, 0.1f, 0.1f, 0.1f, 0.5f, 0.5f, 0.4f, -11.0f, + 400.0f, 0.2f, 4.0f, 0.05f, 1.0f, -7.0f, 7.0f, 0.5f, 0.5f, + 0.004f, 0.2f, 0.025f, 0.2f, 0.003f, 0.2f, 0.025f, 0.2f, 0.02f, + 1.0f, 0.14f, 1200.0f, -0.2f, 1.2f, 0.0f, +}; +/* 452C68 */ static Camera cm_80452C68; +/* 4D6458 */ static CameraBox* cm_804D6458; +/* 4D6460 */ static CameraBox* cm_804D6460; +/* 4D6468 */ static CameraBox* cm_804D6468; +/* 4D7E04 */ static float cm_804D7E04; +/* 4D7E14 */ static float cm_804D7E14; +/* 4D7E30 */ static float cm_804D7E30; +/* 4D7E60 */ static float cm_804D7E60; +/* 4D7E6C */ static float cm_804D7E6C; + +#endif diff --git a/src/melee/cm/cmsnap.h b/src/melee/cm/cmsnap.h index ecaf271b43..75e8bce2ea 100644 --- a/src/melee/cm/cmsnap.h +++ b/src/melee/cm/cmsnap.h @@ -2,6 +2,7 @@ #define _CMSNAP_H_ #include + #include #include diff --git a/src/melee/cm/forward.h b/src/melee/cm/forward.h index c314a8032b..7822cb80e3 100644 --- a/src/melee/cm/forward.h +++ b/src/melee/cm/forward.h @@ -3,7 +3,7 @@ #include -typedef struct Camera Camera; +// typedef struct Camera Camera; typedef struct CameraBounds CameraBounds; typedef struct CameraBox CameraBox; typedef struct CameraMovement CameraMovement; diff --git a/src/melee/cm/types.h b/src/melee/cm/types.h index 679abec42c..6eb6d2ea03 100644 --- a/src/melee/cm/types.h +++ b/src/melee/cm/types.h @@ -1,10 +1,11 @@ #ifndef MELEE_CM_TYPES_H #define MELEE_CM_TYPES_H +#include + #include "cm/forward.h" // IWYU pragma: export #include -#include #include struct CameraBox { @@ -42,25 +43,63 @@ struct CameraBounds { float z_pos; }; -struct Camera { - HSD_GObj* gobj; - uint mode; - unsigned char background_r; - unsigned char background_g; - unsigned char background_b; - u8 unk_0xb; - float nearz; - float farz; - CameraMovement movement; - CameraMovement movement_lerp; - Vec2 translation; - u8 unk_cam[0x2B0 - 0x8C]; - u8 unk[0x2BC - 0x2B0]; - float unk_2bc; - float unk_2c0; - u8 unk2[0x39C - 0x2c0]; - uint last_mode; -}; +typedef struct Camera { + /* 0x000 */ HSD_GObj* gobj; + /* 0x004 */ u32 mode; + /* 0x008 */ u8 background_r; + /* 0x009 */ u8 background_g; + /* 0x00A */ u8 background_b; + /* 0x00B */ s8 pad_B; + /* 0x00C */ f32 nearz; + /* 0x010 */ f32 farz; + /* 0x014 */ CameraMovement movement; + /* 0x04C */ CameraMovement movement_lerp; + /* 0x084 */ Vec2 translation; + /* 0x08C */ char pad_8C[0x18]; /* maybe part of translation[4]? */ + /* 0x0A4 */ f32 unk_A4; + /* 0x0A8 */ f32 unk_A8; + /* 0x0AC */ f32 unk_AC; /* inferred */ + /* 0x0B0 */ char pad_B0[0x20C]; /* maybe part of unk_AC[0x84]? */ + /* 0x2BC */ f32 unk_2bc; + /* 0x2C0 */ f32 unk_2c0; + /* 0x2C4 */ char pad_2C4[0x7D]; /* maybe part of unk_2c0[0x20]? */ + /* 0x341:0 */ u8 unk_341_b0 : 1; + /* 0x341:1 */ u8 unk_341_b1 : 1; + /* 0x341:2 */ u8 unk_341_b2 : 1; + /* 0x341:3 */ u8 unk_341_b3 : 1; + /* 0x341:4 */ u8 unk_341_b4 : 1; + /* 0x341:5 */ u8 unk_341_b5 : 1; + /* 0x341:6 */ u8 unk_341_b6 : 1; + /* 0x341:7 */ u8 unk_341_b7 : 1; + /* 0x342 */ char pad_342[0x56]; /* maybe part of unk_341[0x57]? */ + /* 0x398:0 */ u8 unk_398_b0 : 1; + /* 0x398:1 */ u8 unk_398_b1 : 1; + /* 0x398:2 */ u8 unk_398_b2 : 1; + /* 0x398:3 */ u8 unk_398_b3 : 1; + /* 0x398:4 */ u8 unk_398_b4 : 1; + /* 0x398:5 */ u8 unk_398_b5 : 1; + /* 0x398:6 */ u8 unk_398_b6_b7 : 2; + /* 0x399:0 */ u8 unk_399_b0_b1 : 2; + /* 0x399:2 */ u8 unk_399_b2 : 1; + /* 0x399:3 */ u8 unk_399_b3 : 1; + /* 0x399:4 */ u8 unk_399_b4 : 1; + /* 0x399:5 */ u8 unk_399_b5 : 1; + /* 0x399:6 */ u8 unk_399_b6 : 1; + /* 0x399:7 */ u8 unk_399_b7 : 1; + /* 0x39A:0 */ u8 unk_39A_b0 : 1; + /* 0x39A:1 */ u8 unk_39A_b1 : 1; + /* 0x39A:2 */ u8 unk_39A_b2 : 1; + /* 0x39A:3 */ u8 unk_39A_b3 : 1; + /* 0x39A:4 */ u8 unk_39A_b4 : 1; + /* 0x39A:5 */ u8 unk_39A_b5 : 1; + /* 0x39A:6 */ u8 unk_39A_b6 : 1; + /* 0x39A:7 */ u8 unk_39A_b7 : 1; + /* 0x39B */ char pad_39B[5]; /* maybe part of unk_39A[6]? */ + /* 0x3A0 */ u32 last_mode; +} Camera; /* size = 0x3A4 */ + +/// @todo Size should be 0x39C like #cm_80452C68 +STATIC_ASSERT(sizeof(struct Camera) == 0x3A4); struct CameraUnkGlobals { /* +0 */ float _0[11]; diff --git a/src/melee/db/db_2253.c b/src/melee/db/db_2253.c index d66380412c..c208c89857 100644 --- a/src/melee/db/db_2253.c +++ b/src/melee/db/db_2253.c @@ -1,14 +1,11 @@ -#include "db_2253__static.h" +#include "db_2253.static.h" +#include #include #include #include #include -/* 4D6B50 */ static IntVec2 lbl_804D6B50; -/* 453004 */ extern UNK_T cm_80453004; -/* 4D6B5C */ extern s8 lbl_804D6B5C; - /// #db_80225374 /// #db_802254B8 @@ -29,11 +26,20 @@ /// #fn_80225A54 -/// #db_80225B0C +u32 db_80225B0C(void) +{ + return lbl_8049FAA0.x20_b0; +} -/// #db_80225B20 +u32 db_80225B20(void) +{ + return lbl_8049FAA0.x20_b1; +} -/// #db_80225B34 +u32 db_80225B34(void) +{ + return lbl_8049FAA0.x20_b2; +} /// #fn_80225B48 @@ -52,9 +58,15 @@ s32 db_80225D1C(void) return lbl_8049FAA0.unk_14; } -/// #db_80225D2C +void db_80225D2C(void) +{ + lbl_8049FAA0.unk_8 = 0; +} -/// #db_80225D40 +void db_80225D40(void) +{ + lbl_8049FAA0.unk_8 = 1; +} s32 db_80225D54(HSD_ObjAllocUnk4* arg0) { @@ -106,7 +118,16 @@ void fn_80226E00(void) /// #fn_8022713C -/// #fn_80227174 +extern s32 lbl_804D6B58; +extern s8 lbl_804D6B5C; +extern s8 lbl_804D6B5D; + +void fn_80227174(void) +{ + lbl_804D6B58 = 0; + lbl_804D6B5C = 0; + lbl_804D6B5D = 0; +} /// #fn_80227188 @@ -238,7 +259,10 @@ void fn_80227FE0(HSD_GObj* camera, f32 cstick_x, f32 cstick_y) /// #fn_8022873C -/// #fn_802287C4 +void fn_802287C4(void) +{ + lbl_804D6B8C.b0 = false; +} /// #fn_802287D8 diff --git a/src/melee/db/db_2253.h b/src/melee/db/db_2253.h index 556c4c5fc4..77e18db418 100644 --- a/src/melee/db/db_2253.h +++ b/src/melee/db/db_2253.h @@ -2,6 +2,7 @@ #define GALE01_225374 #include + #include "ft/forward.h" #include "it/forward.h" @@ -18,9 +19,9 @@ /* 225754 */ UNK_RET db_80225754(UNK_PARAMS); /* 225A00 */ UNK_RET fn_80225A00(UNK_PARAMS); /* 225A54 */ UNK_RET fn_80225A54(UNK_PARAMS); -/* 225B0C */ UNK_RET db_80225B0C(UNK_PARAMS); -/* 225B20 */ UNK_T db_80225B20(void); -/* 225B34 */ UNK_RET db_80225B34(UNK_PARAMS); +/* 225B0C */ u32 db_80225B0C(void); +/* 225B20 */ u32 db_80225B20(void); +/* 225B34 */ u32 db_80225B34(void); /* 225B48 */ UNK_RET fn_80225B48(UNK_PARAMS); /* 225B9C */ UNK_RET fn_80225B9C(UNK_PARAMS); /* 225BF0 */ UNK_RET fn_80225BF0(UNK_PARAMS); diff --git a/src/melee/db/db_2253__static.h b/src/melee/db/db_2253.static.h similarity index 56% rename from src/melee/db/db_2253__static.h rename to src/melee/db/db_2253.static.h index 9f8b8a77f6..52b338ed99 100644 --- a/src/melee/db/db_2253__static.h +++ b/src/melee/db/db_2253.static.h @@ -8,8 +8,16 @@ struct lbl_8049FAA0_t { /* 0x08 */ s32 unk_8; /* inferred */ /* 0x0C */ char pad_C[8]; /* maybe part of unk_8[3]? */ /* 0x14 */ s32 unk_14; + char pad_18[0x8]; + /* 0x20:0 */ u8 x20_b0 : 1; + /* 0x20:1 */ u8 x20_b1 : 1; + /* 0x20:2 */ u8 x20_b2 : 1; }; /* size = 0x18 */ +/* 453004 */ extern UNK_T cm_80453004; /* 49FAA0 */ static struct lbl_8049FAA0_t lbl_8049FAA0; +/* 4D6B50 */ static IntVec2 lbl_804D6B50; +/* 4D6B5C */ static s8 lbl_804D6B5C; +/* 4D6B8C */ static UnkFlagStruct lbl_804D6B8C; #endif diff --git a/src/melee/ef/efasync.h b/src/melee/ef/efasync.h index 025e7c9675..7594564b70 100644 --- a/src/melee/ef/efasync.h +++ b/src/melee/ef/efasync.h @@ -2,10 +2,10 @@ #define GALE01_063930 #include -#include - #include +#include + /* 06729C */ void efAsync_8006729C(void); /* 06730C */ void efAsync_8006730C(HSD_Archive* archive, u8* data, u32 length, int index); diff --git a/src/melee/ef/eflib.c b/src/melee/ef/eflib.c index 65bf79e5bb..6cdbfb39b7 100644 --- a/src/melee/ef/eflib.c +++ b/src/melee/ef/eflib.c @@ -1,8 +1,9 @@ +#include + #include "eflib.h" #include "types.h" -#include #include #include #include diff --git a/src/melee/ef/eflib.h b/src/melee/ef/eflib.h index 824a8acc12..bedd475347 100644 --- a/src/melee/ef/eflib.h +++ b/src/melee/ef/eflib.h @@ -2,11 +2,11 @@ #define GALE01_05B4B8 #include +#include + #include "ef/forward.h" #include -#include - /* 05B4B8 */ void efLib_8005B4B8(void); /* 05B880 */ void efLib_DestroyAll(HSD_GObj* gobj); /* 05BA40 */ void efLib_PauseAll(HSD_GObj* gobj); diff --git a/src/melee/ef/types.h b/src/melee/ef/types.h index cba17fe5f8..5303a00d26 100644 --- a/src/melee/ef/types.h +++ b/src/melee/ef/types.h @@ -1,11 +1,11 @@ #ifndef MELEE_EF_TYPES_H #define MELEE_EF_TYPES_H +#include + #include "ef/forward.h" // IWYU pragma: export #include -#include - struct ef_UnkStruct2 { /* +0 */ HSD_JObj* x0; }; diff --git a/src/melee/ft/chara/ftCLink/ftCl_Init.h b/src/melee/ft/chara/ftCLink/ftCl_Init.h index 29caf9f698..2a243e5811 100644 --- a/src/melee/ft/chara/ftCLink/ftCl_Init.h +++ b/src/melee/ft/chara/ftCLink/ftCl_Init.h @@ -2,6 +2,7 @@ #define GALE01_148C64 #include + #include "ftLink/forward.h" #include "ft/types.h" diff --git a/src/melee/ft/chara/ftCLink/inlines.h b/src/melee/ft/chara/ftCLink/inlines.h index 87493c940a..12aa93e11e 100644 --- a/src/melee/ft/chara/ftCLink/inlines.h +++ b/src/melee/ft/chara/ftCLink/inlines.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTCLINK_INLINES_H #include + #include #include "ft/types.h" diff --git a/src/melee/ft/chara/ftCaptain/ftCa_Init.h b/src/melee/ft/chara/ftCaptain/ftCa_Init.h index 9245179ebe..9c4909dca3 100644 --- a/src/melee/ft/chara/ftCaptain/ftCa_Init.h +++ b/src/melee/ft/chara/ftCaptain/ftCa_Init.h @@ -2,6 +2,7 @@ #define GALE01_0E2888 #include + #include "ftCaptain/forward.h" #include diff --git a/src/melee/ft/chara/ftCaptain/ftCa_SpecialHi.c b/src/melee/ft/chara/ftCaptain/ftCa_SpecialHi.c index a20db8fb76..5ab01492c3 100644 --- a/src/melee/ft/chara/ftCaptain/ftCa_SpecialHi.c +++ b/src/melee/ft/chara/ftCaptain/ftCa_SpecialHi.c @@ -1,4 +1,5 @@ #include + #include #include "ftCa_SpecialHi.h" diff --git a/src/melee/ft/chara/ftCaptain/ftCa_SpecialLw.c b/src/melee/ft/chara/ftCaptain/ftCa_SpecialLw.c index a39929e0d9..219d3aa899 100644 --- a/src/melee/ft/chara/ftCaptain/ftCa_SpecialLw.c +++ b/src/melee/ft/chara/ftCaptain/ftCa_SpecialLw.c @@ -1,5 +1,7 @@ #include +#include + #include "ftCaptain/forward.h" #include @@ -20,7 +22,6 @@ #include "ftCaptain/types.h" #include -#include // /* literal */ float const ftCa_SpecialHi_804D9220 = 0.0F; // /* literal */ float const ftCa_SpecialHi_804D9224 = 0.01745329238474369f; diff --git a/src/melee/ft/chara/ftCaptain/ftCa_SpecialN.c b/src/melee/ft/chara/ftCaptain/ftCa_SpecialN.c index e56dc36da2..0fec0eef99 100644 --- a/src/melee/ft/chara/ftCaptain/ftCa_SpecialN.c +++ b/src/melee/ft/chara/ftCaptain/ftCa_SpecialN.c @@ -1,4 +1,5 @@ #include + #include #include "ftCa_SpecialN.h" diff --git a/src/melee/ft/chara/ftCaptain/ftCa_SpecialS.c b/src/melee/ft/chara/ftCaptain/ftCa_SpecialS.c index 0d67c26da5..c58cb7cece 100644 --- a/src/melee/ft/chara/ftCaptain/ftCa_SpecialS.c +++ b/src/melee/ft/chara/ftCaptain/ftCa_SpecialS.c @@ -1,4 +1,5 @@ #include + #include "it/forward.h" #include "ftCa_SpecialS.h" diff --git a/src/melee/ft/chara/ftCaptain/types.h b/src/melee/ft/chara/ftCaptain/types.h index 0027a5f917..6197f4db69 100644 --- a/src/melee/ft/chara/ftCaptain/types.h +++ b/src/melee/ft/chara/ftCaptain/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTCAPTAIN_TYPES_H #include + #include "ft/forward.h" #include "ftCaptain/forward.h" // IWYU pragma: export diff --git a/src/melee/ft/chara/ftCommon/forward.h b/src/melee/ft/chara/ftCommon/forward.h index a55c06724a..b2cc607c96 100644 --- a/src/melee/ft/chara/ftCommon/forward.h +++ b/src/melee/ft/chara/ftCommon/forward.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTCOMMON_FORWARD_H #include + #include "ft/forward.h" struct UNK_SAMUS_S2; diff --git a/src/melee/ft/chara/ftCommon/ftCo_09C4.h b/src/melee/ft/chara/ftCommon/ftCo_09C4.h index dd9b7ce2bc..41bc8cfffc 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_09C4.h +++ b/src/melee/ft/chara/ftCommon/ftCo_09C4.h @@ -2,6 +2,7 @@ #define GALE01_09C4F8 #include + #include "ftCommon/forward.h" /* 09C4F8 */ bool ftCo_8009C4F8(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_09F4.c b/src/melee/ft/chara/ftCommon/ftCo_09F4.c index 76af592b84..f5d4f71d57 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_09F4.c +++ b/src/melee/ft/chara/ftCommon/ftCo_09F4.c @@ -1,4 +1,6 @@ #include +#include + #include "ftCommon/forward.h" #include "ftCo_09F4.h" @@ -9,7 +11,6 @@ #include "lb/lb_00F9.h" #include -#include #include #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_09F4.h b/src/melee/ft/chara/ftCommon/ftCo_09F4.h index fc95055453..fab4f6ddd3 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_09F4.h +++ b/src/melee/ft/chara/ftCommon/ftCo_09F4.h @@ -2,11 +2,12 @@ #define GALE01_09F480 #include +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include -#include #include /* 09F4A4 */ UNK_RET ftCo_8009F4A4(UNK_PARAMS); diff --git a/src/melee/ft/chara/ftCommon/ftCo_09F7.c b/src/melee/ft/chara/ftCommon/ftCo_09F7.c index ad4289bd3b..0b1c7351fb 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_09F7.c +++ b/src/melee/ft/chara/ftCommon/ftCo_09F7.c @@ -1,3 +1,5 @@ +#include + #include "ftCommon/forward.h" #include "ftCo_09F7.h" @@ -11,7 +13,6 @@ #include "ft/types.h" #include -#include #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_09F7.h b/src/melee/ft/chara/ftCommon/ftCo_09F7.h index 05587da390..804f4842df 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_09F7.h +++ b/src/melee/ft/chara/ftCommon/ftCo_09F7.h @@ -1,12 +1,12 @@ #ifndef GALE01_09F7F8 #define GALE01_09F7F8 +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include -#include - /* 09F834 */ void ftCo_8009F834(ftCo_GObj*, int, Fighter_Part, int, int, Vec3*, Vec3*, float); /* 0A0098 */ void ftCo_800A0098(ftCo_Fighter* fp); diff --git a/src/melee/ft/chara/ftCommon/ftCo_0A01.c b/src/melee/ft/chara/ftCommon/ftCo_0A01.c index 0a5331b650..3c7f3d31bf 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_0A01.c +++ b/src/melee/ft/chara/ftCommon/ftCo_0A01.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include "ftDonkey/forward.h" @@ -37,7 +39,6 @@ #include #include -#include #include int ftCo_803C5A68[] = { diff --git a/src/melee/ft/chara/ftCommon/ftCo_0A01.h b/src/melee/ft/chara/ftCommon/ftCo_0A01.h index 57ab521df2..b4e4e22046 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_0A01.h +++ b/src/melee/ft/chara/ftCommon/ftCo_0A01.h @@ -2,6 +2,8 @@ #define GALE01_0A0148 #include +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include "gr/forward.h" @@ -11,7 +13,6 @@ #include "gr/types.h" #include -#include struct _m2c_stack_ftCo_800A3554 { /* 0x00 */ char pad_0[0x10]; diff --git a/src/melee/ft/chara/ftCommon/ftCo_0B3E.c b/src/melee/ft/chara/ftCommon/ftCo_0B3E.c index 4afcf576b2..e7c82c7ae7 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_0B3E.c +++ b/src/melee/ft/chara/ftCommon/ftCo_0B3E.c @@ -1,3 +1,5 @@ +#include + #include "ftCommon/forward.h" #include "ftCo_0B3E.h" @@ -5,7 +7,6 @@ #include "ft/types.h" #include "ftCommon/ftCo_0A01.h" -#include #include double const ftCo_804D89C8 = 0; diff --git a/src/melee/ft/chara/ftCommon/ftCo_0B3E.h b/src/melee/ft/chara/ftCommon/ftCo_0B3E.h index b3a2b12bcd..246c765400 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_0B3E.h +++ b/src/melee/ft/chara/ftCommon/ftCo_0B3E.h @@ -2,10 +2,10 @@ #define GALE01_0B3E04 #include -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 0B3E04 */ void ftCo_800B3E04(ftCo_Fighter* fp); /* 0B463C */ void ftCo_800B463C(ftCo_Fighter* fp, int); /* 0B46B8 */ void ftCo_800B46B8(ftCo_Fighter* fp, int, int); diff --git a/src/melee/ft/chara/ftCommon/ftCo_0C35.c b/src/melee/ft/chara/ftCommon/ftCo_0C35.c index ba10fb6bff..616163a238 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_0C35.c +++ b/src/melee/ft/chara/ftCommon/ftCo_0C35.c @@ -1,4 +1,6 @@ #include +#include + #include #include "ftCo_0C35.h" @@ -12,7 +14,6 @@ #include #include -#include #include #include @@ -24,7 +25,7 @@ static void inlineA0(ftCo_GObj* gobj) if (fp->dmg.x18F4 > fp->dmg.x1954) { fp->dmg.x1954 = fp->dmg.x18F4; } - fp->x2220_flag.bits.b4 = true; + fp->x2220_flag.b4 = true; Fighter_UnkRecursiveFunc_8006D044(gobj); } @@ -77,7 +78,7 @@ void ftCo_800C37A0(ftCo_GObj* gobj) ftParts_80075AF0(fp, part, rot_y); HSD_JObjSetRotationY(jobj, rot_y); if (fp->dmg.x18F4 == 0) { - fp->x2220_flag.bits.b4 = false; + fp->x2220_flag.b4 = false; fp->facing_dir = -fp->facing_dir; ftParts_80075AF0(fp, FtPart_TopN, M_PI_2 * fp->facing_dir); ftParts_80075AF0(fp, part, 0); diff --git a/src/melee/ft/chara/ftCommon/ftCo_0C60.h b/src/melee/ft/chara/ftCommon/ftCo_0C60.h index db573019d3..89620b4746 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_0C60.h +++ b/src/melee/ft/chara/ftCommon/ftCo_0C60.h @@ -2,6 +2,7 @@ #define GALE01_0C60C8 #include + #include "ftCommon/forward.h" /* 0C60C8 */ bool ftCo_800C60C8(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_AirCatch.c b/src/melee/ft/chara/ftCommon/ftCo_AirCatch.c index c083b1013c..7f061555b6 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AirCatch.c +++ b/src/melee/ft/chara/ftCommon/ftCo_AirCatch.c @@ -1,4 +1,6 @@ #include +#include + #include "ftSamus/forward.h" #include "it/forward.h" @@ -24,7 +26,6 @@ #include "mp/mplib.h" #include -#include #include #pragma force_active on diff --git a/src/melee/ft/chara/ftCommon/ftCo_AirCatch.h b/src/melee/ft/chara/ftCommon/ftCo_AirCatch.h index 5a1ede6b83..6a7e494ba9 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AirCatch.h +++ b/src/melee/ft/chara/ftCommon/ftCo_AirCatch.h @@ -2,11 +2,11 @@ #define GALE01_0C3A14 #include +#include + #include "ftCommon/forward.h" #include -#include - /* 0C3A14 */ bool ftCo_800C3A14(ftCo_GObj* gobj); /* 0C3B10 */ bool ftCo_800C3B10(ftCo_GObj* gobj); /* 0C3BE8 */ void ftCo_800C3BE8(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_Attack1.h b/src/melee/ft/chara/ftCommon/ftCo_Attack1.h index c4f040bb8b..8df896f543 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Attack1.h +++ b/src/melee/ft/chara/ftCommon/ftCo_Attack1.h @@ -2,10 +2,10 @@ #define GALE01_08A9F8 #include -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 08A9F8 */ bool ftCo_Attack1_CheckInput(ftCo_GObj* gobj); /* 08AC9C */ void ftCo_Attack11_Anim(ftCo_GObj* gobj); /* 08ACD8 */ void ftCo_Attack11_IASA(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackAir.c b/src/melee/ft/chara/ftCommon/ftCo_AttackAir.c index 5d519246a2..e33da31711 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackAir.c +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackAir.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackAir.h b/src/melee/ft/chara/ftCommon/ftCo_AttackAir.h index 78d9896885..18b274fffb 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackAir.h +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackAir.h @@ -2,11 +2,11 @@ #define GALE01_08CD68 #include +#include + #include "ft/forward.h" #include "ftCommon/forward.h" -#include - /* 08CD68 */ bool ftCo_AttackAir_CheckItemThrowInput(ftCo_GObj* gobj); /* 08CE68 */ FtMotionId ftCo_AttackAir_GetMsidFromCStick(ftCo_Fighter* fp); /* 08CF70 */ void ftCo_AttackAir_EnterFromCStick(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackDash.c b/src/melee/ft/chara/ftCommon/ftCo_AttackDash.c index 8ef2abbf71..500888990b 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackDash.c +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackDash.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackDash.h b/src/melee/ft/chara/ftCommon/ftCo_AttackDash.h index e013c01ca0..ccfe12c356 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackDash.h +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackDash.h @@ -2,6 +2,7 @@ #define GALE01_08B3E4 #include + #include "ftCommon/forward.h" /* 08B3E4 */ bool ftCo_AttackDash_CheckInput(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackHi3.c b/src/melee/ft/chara/ftCommon/ftCo_AttackHi3.c index a969bc7462..63133a6ec3 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackHi3.c +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackHi3.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackHi3.h b/src/melee/ft/chara/ftCommon/ftCo_AttackHi3.h index 97d7af2332..17451f3e10 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackHi3.h +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackHi3.h @@ -2,10 +2,10 @@ #define GALE01_08B980 #include -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 08B980 */ bool ftCo_AttackHi3_CheckInput(ftCo_GObj* gobj); /* 08BA98 */ void ftCo_AttackHi3_Anim(ftCo_GObj* gobj); /* 08BAD4 */ void ftCo_AttackHi3_IASA(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackHi4.c b/src/melee/ft/chara/ftCommon/ftCo_AttackHi4.c index 4231599f8a..a0eedc2c6b 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackHi4.c +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackHi4.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackHi4.h b/src/melee/ft/chara/ftCommon/ftCo_AttackHi4.h index d463fc14ac..c138b143c7 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackHi4.h +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackHi4.h @@ -2,6 +2,7 @@ #define GALE01_08C830 #include + #include "ftCommon/forward.h" /* 08C830 */ bool ftCo_AttackHi4_CheckInput(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackLw3.c b/src/melee/ft/chara/ftCommon/ftCo_AttackLw3.c index c234efc43a..7e0ef34dac 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackLw3.c +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackLw3.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackLw3.h b/src/melee/ft/chara/ftCommon/ftCo_AttackLw3.h index 70e2893398..2f65a8b435 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackLw3.h +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackLw3.h @@ -2,6 +2,7 @@ #define GALE01_08BB44 #include + #include "ftCommon/forward.h" /* 08BB44 */ bool ftCo_AttackLw3_CheckInput(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackLw4.c b/src/melee/ft/chara/ftCommon/ftCo_AttackLw4.c index 03ba2d7c5c..93106a1ba6 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackLw4.c +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackLw4.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackLw4.h b/src/melee/ft/chara/ftCommon/ftCo_AttackLw4.h index d655cd79d3..56d6f7ba58 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackLw4.h +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackLw4.h @@ -2,10 +2,10 @@ #define GALE01_08CB44 #include -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 08CB44 */ bool ftCo_AttackLw4_CheckInput(ftCo_GObj* gobj); /* 08CCBC */ void ftCo_AttackLw4_Anim(ftCo_GObj* gobj); /* 08CCF8 */ void ftCo_AttackLw4_IASA(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackS3.c b/src/melee/ft/chara/ftCommon/ftCo_AttackS3.c index 40b1b04bc8..e9f55a393f 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackS3.c +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackS3.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackS3.h b/src/melee/ft/chara/ftCommon/ftCo_AttackS3.h index f953c9ad04..3dfe0d6b41 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackS3.h +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackS3.h @@ -2,10 +2,10 @@ #define GALE01_08B8D4 #include -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 08B658 */ bool ftCo_AttackS3_CheckInput(ftCo_GObj* gobj); /* 08B8D4 */ void ftCo_AttackS3_Anim(ftCo_GObj* gobj); /* 08B910 */ void ftCo_AttackS3_IASA(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackS4.c b/src/melee/ft/chara/ftCommon/ftCo_AttackS4.c index 26ccabc13c..481bacd7cc 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackS4.c +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackS4.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_AttackS4.h b/src/melee/ft/chara/ftCommon/ftCo_AttackS4.h index eb5c9325e1..4993ca3128 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_AttackS4.h +++ b/src/melee/ft/chara/ftCommon/ftCo_AttackS4.h @@ -2,10 +2,10 @@ #define GALE01_08BFC4 #include -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 08BFC4 */ bool ftCo_AttackS4_CheckInput(ftCo_GObj* gobj); /* 08C114 */ bool ftCo_AttackS4_8008C114(ftCo_GObj* gobj); /* 08C520 */ void ftCo_AttackS4_Anim(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_BarrelWait.c b/src/melee/ft/chara/ftCommon/ftCo_BarrelWait.c index 139e49e5b5..02f27ef95c 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_BarrelWait.c +++ b/src/melee/ft/chara/ftCommon/ftCo_BarrelWait.c @@ -1,4 +1,6 @@ #include +#include + #include "lb/forward.h" #include "ftCo_BarrelWait.h" @@ -19,7 +21,6 @@ #include "mp/mpcoll.h" #include -#include /* 09EC44 */ static void ftCo_8009EC44(ftCo_GObj* gobj); /* 09EC70 */ static void ftCo_8009EC70(ftCo_GObj* gobj, Vec3* pos, UNK_T arg2, diff --git a/src/melee/ft/chara/ftCommon/ftCo_BarrelWait.h b/src/melee/ft/chara/ftCommon/ftCo_BarrelWait.h index b1d50c093e..9b91f94213 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_BarrelWait.h +++ b/src/melee/ft/chara/ftCommon/ftCo_BarrelWait.h @@ -2,11 +2,11 @@ #define GALE01_09EB18 #include +#include + #include "ftCommon/forward.h" #include -#include - /* 09EB18 */ void ftCo_8009EB18(ftCo_GObj* gobj); /* 09EC08 */ void ftCo_BarrelWait_Anim(ftCo_GObj* gobj); /* 09EC0C */ void ftCo_BarrelWait_IASA(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_Bury.c b/src/melee/ft/chara/ftCommon/ftCo_Bury.c index 7decca36a6..6cd77f8cc5 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Bury.c +++ b/src/melee/ft/chara/ftCommon/ftCo_Bury.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include "lb/forward.h" @@ -38,7 +40,6 @@ #include "pl/plbonuslib.h" #include -#include #include #include #include @@ -228,7 +229,7 @@ void ftCo_800C0D0C(ftCo_GObj* gobj) (p_ftCommonData->x608 - (Player_80033BB8(fp->player_id) + 1))))); ftCommon_8007E2F4(fp, 0x1FF); fp->x221D_b5 = true; - fp->x2220_flag.bits.b3 = true; + fp->x2220_flag.b3 = true; fp->x2224_b4 = true; fp->mv.co.bury.x0 = p_ftCommonData->x5F4; fp->mv.co.bury.x20 = fp->coll_data.floor.index; @@ -314,7 +315,7 @@ void ftCo_800C124C(ftCo_GObj* gobj) ftCommon_8007E2FC(gobj); ftCommon_8007E2F4(fp, 0x1FF); fp->x221D_b5 = true; - fp->x2220_flag.bits.b3 = true; + fp->x2220_flag.b3 = true; fp->x2224_b4 = true; } diff --git a/src/melee/ft/chara/ftCommon/ftCo_Bury.h b/src/melee/ft/chara/ftCommon/ftCo_Bury.h index bce6f7230a..3884235b77 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Bury.h +++ b/src/melee/ft/chara/ftCommon/ftCo_Bury.h @@ -2,13 +2,13 @@ #define GALE01_0C0874 #include +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include "lb/forward.h" #include -#include - /* 0C0874 */ void ftCo_800C0874(ftCo_GObj* gobj, UNK_T arg1, ftCommon_BuryType arg2); /* 0C08A0 */ void ftCo_800C08A0(ftCo_GObj* gobj, ftCo_GObj* arg1, diff --git a/src/melee/ft/chara/ftCommon/ftCo_CaptureCaptain.h b/src/melee/ft/chara/ftCommon/ftCo_CaptureCaptain.h index e91275d1d9..f7fa2d9703 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CaptureCaptain.h +++ b/src/melee/ft/chara/ftCommon/ftCo_CaptureCaptain.h @@ -2,6 +2,7 @@ #define GALE01_09CA0C #include + #include "ftCommon/forward.h" /* 09CA0C */ void ftCo_8009CA0C(ftCo_GObj* gobj, ftCo_GObj* vic_gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_CaptureDamageKoopa.c b/src/melee/ft/chara/ftCommon/ftCo_CaptureDamageKoopa.c index aa3ac821f7..6fe989d194 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CaptureDamageKoopa.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CaptureDamageKoopa.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_CaptureDamageKoopa.h b/src/melee/ft/chara/ftCommon/ftCo_CaptureDamageKoopa.h index 2baab683e2..d34363a4ab 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CaptureDamageKoopa.h +++ b/src/melee/ft/chara/ftCommon/ftCo_CaptureDamageKoopa.h @@ -2,6 +2,7 @@ #define GALE01_0BC9C8 #include + #include "ftCommon/forward.h" /* 0BC9C8 */ void ftCo_800BC9C8(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_CaptureKirby.c b/src/melee/ft/chara/ftCommon/ftCo_CaptureKirby.c index 2c0c33989b..a17dfc1389 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CaptureKirby.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CaptureKirby.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include "ftCo_CaptureKirby.h" @@ -14,7 +16,6 @@ #include "ftCommon/types.h" #include -#include #include #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_CaptureKoopa.c b/src/melee/ft/chara/ftCommon/ftCo_CaptureKoopa.c index 206cd70fad..97943c71db 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CaptureKoopa.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CaptureKoopa.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_CaptureKoopa.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_CaptureMewtwo.c b/src/melee/ft/chara/ftCommon/ftCo_CaptureMewtwo.c index d8e7f5367a..4b812c3c84 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CaptureMewtwo.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CaptureMewtwo.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftCo_CaptureMewtwo.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_CaptureWaitKirby.c b/src/melee/ft/chara/ftCommon/ftCo_CaptureWaitKirby.c index ac871590b7..72e0f66fc6 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CaptureWaitKirby.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CaptureWaitKirby.c @@ -1,4 +1,6 @@ #include +#include + #include "ftCommon/forward.h" #include @@ -13,7 +15,6 @@ #include "ftCommon/types.h" #include "ftKirby/ftKb_Init.h" -#include #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_CaptureWaitKoopa.c b/src/melee/ft/chara/ftCommon/ftCo_CaptureWaitKoopa.c index 3ab28dc5c0..006e4781ca 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CaptureWaitKoopa.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CaptureWaitKoopa.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCo_CaptureWaitKoopa.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_CargoFall.c b/src/melee/ft/chara/ftCommon/ftCo_CargoFall.c index f7a621cd19..ed1ddd88fd 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CargoFall.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CargoFall.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCo_CargoFall.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_CargoJump.c b/src/melee/ft/chara/ftCommon/ftCo_CargoJump.c index b98bf1fee5..8c8bc72e0c 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CargoJump.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CargoJump.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_CargoKneebend.c b/src/melee/ft/chara/ftCommon/ftCo_CargoKneebend.c index 5c1997ae01..f13ee8875a 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CargoKneebend.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CargoKneebend.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_CargoKneebend.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_CargoLanding.c b/src/melee/ft/chara/ftCommon/ftCo_CargoLanding.c index 4bc924f106..13663a93f3 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CargoLanding.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CargoLanding.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_CargoLanding.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_CargoThrow.c b/src/melee/ft/chara/ftCommon/ftCo_CargoThrow.c index 9e97383d66..b7195da5fd 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CargoThrow.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CargoThrow.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_CargoWait.c b/src/melee/ft/chara/ftCommon/ftCo_CargoWait.c index cf79cf019b..124d2fe22f 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CargoWait.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CargoWait.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCo_CargoWait.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_CliffClimb.c b/src/melee/ft/chara/ftCommon/ftCo_CliffClimb.c index 7e274ff79a..cc1452c263 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CliffClimb.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CliffClimb.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_CliffClimb.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_CliffJump.c b/src/melee/ft/chara/ftCommon/ftCo_CliffJump.c index d202894824..77e673b2f3 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_CliffJump.c +++ b/src/melee/ft/chara/ftCommon/ftCo_CliffJump.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_CliffJump.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_Damage.c b/src/melee/ft/chara/ftCommon/ftCo_Damage.c index 52145ab6a8..73d93469e7 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Damage.c +++ b/src/melee/ft/chara/ftCommon/ftCo_Damage.c @@ -1,4 +1,6 @@ #include +#include + #include #include "ftCo_Damage.h" @@ -48,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -809,9 +810,7 @@ void ftCo_8008EC90(ftCo_GObj* gobj) bool ret0 = false; ftCo_Fighter* fp = gobj->user_data; float facing_dir = 0; - if (fp->x2220_flag.bits.b3 || fp->x2220_flag.bits.b4 || - !fp->dmg.kb_applied) - { + if (fp->x2220_flag.b3 || fp->x2220_flag.b4 || !fp->dmg.kb_applied) { inlineB2(gobj); goto ret_A8C; } else if (fp->dmg.x1860_element == 10U) { diff --git a/src/melee/ft/chara/ftCommon/ftCo_DamageBind.c b/src/melee/ft/chara/ftCommon/ftCo_DamageBind.c index 60fdf47a5f..b5ce05230c 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_DamageBind.c +++ b/src/melee/ft/chara/ftCommon/ftCo_DamageBind.c @@ -1,3 +1,5 @@ +#include + #include "ftCommon/forward.h" #include "ftCo_DamageBind.h" @@ -14,7 +16,6 @@ #include "pl/player.h" #include -#include bool ftCo_800C44CC(ftCo_GObj* gobj) { diff --git a/src/melee/ft/chara/ftCommon/ftCo_DamageFall.c b/src/melee/ft/chara/ftCommon/ftCo_DamageFall.c index 2946717205..5d61282720 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_DamageFall.c +++ b/src/melee/ft/chara/ftCommon/ftCo_DamageFall.c @@ -1,4 +1,6 @@ #include +#include + #include "ftCommon/forward.h" #include @@ -23,8 +25,6 @@ #include "ft/ftcommon.h" #include "ft/types.h" -#include - void ftCo_80090574(ftCo_GObj* gobj) { ft_80081DD4(gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_DamageIce.c b/src/melee/ft/chara/ftCommon/ftCo_DamageIce.c index 30820a0b5e..91e77454ec 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_DamageIce.c +++ b/src/melee/ft/chara/ftCommon/ftCo_DamageIce.c @@ -1,4 +1,6 @@ #include +#include + #include "ftCommon/forward.h" #include "lb/forward.h" #include @@ -31,7 +33,6 @@ #include "lb/lbvector.h" #include -#include #include #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_DamageSong.c b/src/melee/ft/chara/ftCommon/ftCo_DamageSong.c index 80d76b4d9c..088c28f163 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_DamageSong.c +++ b/src/melee/ft/chara/ftCommon/ftCo_DamageSong.c @@ -1,3 +1,5 @@ +#include + #include "ftCo_DamageSong.h" #include "ftCo_0C35.h" @@ -12,8 +14,6 @@ #include "ft/types.h" #include "pl/player.h" -#include - /* 0C3390 */ static void ftCo_800C3390(ftCo_GObj* gobj); /* 0C3480 */ static void ftCo_800C3480(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_DemoCallback0.c b/src/melee/ft/chara/ftCommon/ftCo_DemoCallback0.c index 1e652b2809..26faf0a511 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_DemoCallback0.c +++ b/src/melee/ft/chara/ftCommon/ftCo_DemoCallback0.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftCo_DemoCallback0.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_Down.c b/src/melee/ft/chara/ftCommon/ftCo_Down.c index 2f1469ae95..eb9e585bb5 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Down.c +++ b/src/melee/ft/chara/ftCommon/ftCo_Down.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_Down.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_DownAttack.c b/src/melee/ft/chara/ftCommon/ftCo_DownAttack.c index be6e77e064..8d7f7abf59 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_DownAttack.c +++ b/src/melee/ft/chara/ftCommon/ftCo_DownAttack.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_DownBound.c b/src/melee/ft/chara/ftCommon/ftCo_DownBound.c index b4a9013410..af80d06b8f 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_DownBound.c +++ b/src/melee/ft/chara/ftCommon/ftCo_DownBound.c @@ -1,4 +1,6 @@ #include +#include + #include "ftCommon/forward.h" #include @@ -28,7 +30,6 @@ #include #include #include -#include #include /* 097040 */ static void ftCo_800976A4(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_DownStand.c b/src/melee/ft/chara/ftCommon/ftCo_DownStand.c index c6d98644a7..f5ad1f56de 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_DownStand.c +++ b/src/melee/ft/chara/ftCommon/ftCo_DownStand.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_Escape.c b/src/melee/ft/chara/ftCommon/ftCo_Escape.c index 4a26721e28..90c390c113 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Escape.c +++ b/src/melee/ft/chara/ftCommon/ftCo_Escape.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_EscapeAir.c b/src/melee/ft/chara/ftCommon/ftCo_EscapeAir.c index 7ee2ca85f0..6e81dd254d 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_EscapeAir.c +++ b/src/melee/ft/chara/ftCommon/ftCo_EscapeAir.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_EscapeAir.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_FallSpecial.c b/src/melee/ft/chara/ftCommon/ftCo_FallSpecial.c index 1d7b7bbef8..9bd8a10207 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_FallSpecial.c +++ b/src/melee/ft/chara/ftCommon/ftCo_FallSpecial.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_FallSpecial.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_FlyReflect.c b/src/melee/ft/chara/ftCommon/ftCo_FlyReflect.c index adb36e8a26..58f9a48cf8 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_FlyReflect.c +++ b/src/melee/ft/chara/ftCommon/ftCo_FlyReflect.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftCo_FlyReflect.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_FlyReflect.h b/src/melee/ft/chara/ftCommon/ftCo_FlyReflect.h index 03f3af72f0..22df13b9e3 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_FlyReflect.h +++ b/src/melee/ft/chara/ftCommon/ftCo_FlyReflect.h @@ -2,6 +2,7 @@ #define GALE01_0C15F4 #include + #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_Guard.c b/src/melee/ft/chara/ftCommon/ftCo_Guard.c index 53489dd904..14ad20b22f 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Guard.c +++ b/src/melee/ft/chara/ftCommon/ftCo_Guard.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include #include @@ -44,7 +46,6 @@ #include #include #include -#include #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_Guard.h b/src/melee/ft/chara/ftCommon/ftCo_Guard.h index c4c1a2b9c7..881d3e4bb2 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Guard.h +++ b/src/melee/ft/chara/ftCommon/ftCo_Guard.h @@ -1,10 +1,10 @@ #ifndef GALE01_091A2C #define GALE01_091A2C -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 091A2C */ bool ftCo_80091A2C(ftCo_GObj* gobj); /* 091A4C */ bool ftCo_80091A4C(ftCo_GObj* gobj); /* 091AD8 */ bool ftCo_80091AD8(ftCo_GObj* gobj, int mv_x20); diff --git a/src/melee/ft/chara/ftCommon/ftCo_HammerFall.c b/src/melee/ft/chara/ftCommon/ftCo_HammerFall.c index c09bb1302f..8839588305 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_HammerFall.c +++ b/src/melee/ft/chara/ftCommon/ftCo_HammerFall.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_HammerFall.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_HammerJump.c b/src/melee/ft/chara/ftCommon/ftCo_HammerJump.c index 1f0a36e40b..e0e7571948 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_HammerJump.c +++ b/src/melee/ft/chara/ftCommon/ftCo_HammerJump.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCo_HammerJump.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_HammerWalk.c b/src/melee/ft/chara/ftCommon/ftCo_HammerWalk.c index 02a19d6e0e..19abb8fce7 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_HammerWalk.c +++ b/src/melee/ft/chara/ftCommon/ftCo_HammerWalk.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_HammerWalk.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_ItemThrow.c b/src/melee/ft/chara/ftCommon/ftCo_ItemThrow.c index c6be99489a..5905e4fa7e 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_ItemThrow.c +++ b/src/melee/ft/chara/ftCommon/ftCo_ItemThrow.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include "it/forward.h" @@ -25,7 +27,6 @@ #include #include -#include #include /* 094D70 */ static bool ftCo_800951D0(ftCo_GObj* gobj); diff --git a/src/melee/ft/chara/ftCommon/ftCo_LandingAir.c b/src/melee/ft/chara/ftCommon/ftCo_LandingAir.c index e3a0abb228..e37be43e35 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_LandingAir.c +++ b/src/melee/ft/chara/ftCommon/ftCo_LandingAir.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_Lift.c b/src/melee/ft/chara/ftCommon/ftCo_Lift.c index 031242f82e..3fafb725fe 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Lift.c +++ b/src/melee/ft/chara/ftCommon/ftCo_Lift.c @@ -1,4 +1,5 @@ #include + #include "it/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_MissFoot.c b/src/melee/ft/chara/ftCommon/ftCo_MissFoot.c index 8d1e8e391d..b745b98728 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_MissFoot.c +++ b/src/melee/ft/chara/ftCommon/ftCo_MissFoot.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_Ottotto.c b/src/melee/ft/chara/ftCommon/ftCo_Ottotto.c index 33f760d8d9..9d4762c102 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Ottotto.c +++ b/src/melee/ft/chara/ftCommon/ftCo_Ottotto.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_Pass.c b/src/melee/ft/chara/ftCommon/ftCo_Pass.c index 187b00e2f0..2d67739bda 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Pass.c +++ b/src/melee/ft/chara/ftCommon/ftCo_Pass.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_Passive.c b/src/melee/ft/chara/ftCommon/ftCo_Passive.c index 00cb3cd6db..f9f18a2433 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Passive.c +++ b/src/melee/ft/chara/ftCommon/ftCo_Passive.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_Passive.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_PassiveStand.c b/src/melee/ft/chara/ftCommon/ftCo_PassiveStand.c index dadbfcdebf..ce84eda73b 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_PassiveStand.c +++ b/src/melee/ft/chara/ftCommon/ftCo_PassiveStand.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_PassiveWall.c b/src/melee/ft/chara/ftCommon/ftCo_PassiveWall.c index d34fcd0d81..03c814e4fc 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_PassiveWall.c +++ b/src/melee/ft/chara/ftCommon/ftCo_PassiveWall.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakDown.c b/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakDown.c index d0f02b0a7a..7420904b22 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakDown.c +++ b/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakDown.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakFall.c b/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakFall.c index bdf51e22dd..8772bd3b25 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakFall.c +++ b/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakFall.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCo_ShieldBreakFall.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakFly.c b/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakFly.c index 29951de692..56cf171d6b 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakFly.c +++ b/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakFly.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakStand.c b/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakStand.c index ea0763e2e2..30085abf91 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakStand.c +++ b/src/melee/ft/chara/ftCommon/ftCo_ShieldBreakStand.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCo_ShieldBreakStand.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_Shouldered.c b/src/melee/ft/chara/ftCommon/ftCo_Shouldered.c index d29ca982b3..b32f729a4d 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Shouldered.c +++ b/src/melee/ft/chara/ftCommon/ftCo_Shouldered.c @@ -1,4 +1,6 @@ #include +#include + #include "lb/forward.h" #include @@ -18,7 +20,6 @@ #include "lb/lb_00B0.h" #include -#include #pragma force_active on diff --git a/src/melee/ft/chara/ftCommon/ftCo_SpecialAir.c b/src/melee/ft/chara/ftCommon/ftCo_SpecialAir.c index de60731819..e3bab27328 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_SpecialAir.c +++ b/src/melee/ft/chara/ftCommon/ftCo_SpecialAir.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_SpecialS.c b/src/melee/ft/chara/ftCommon/ftCo_SpecialS.c index 7623a2eb62..f2f58c4a17 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_SpecialS.c +++ b/src/melee/ft/chara/ftCommon/ftCo_SpecialS.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_StopCeil.c b/src/melee/ft/chara/ftCommon/ftCo_StopCeil.c index 6bae3664db..21295b6722 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_StopCeil.c +++ b/src/melee/ft/chara/ftCommon/ftCo_StopCeil.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_StopCeil.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_StopWall.c b/src/melee/ft/chara/ftCommon/ftCo_StopWall.c index 2084d477e8..cacfed3a08 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_StopWall.c +++ b/src/melee/ft/chara/ftCommon/ftCo_StopWall.c @@ -1,4 +1,5 @@ #include + #include #include "ftCo_StopWall.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_ThrownKirby.c b/src/melee/ft/chara/ftCommon/ftCo_ThrownKirby.c index baae225424..ba07a6228b 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_ThrownKirby.c +++ b/src/melee/ft/chara/ftCommon/ftCo_ThrownKirby.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include "ftCommon/forward.h" @@ -21,7 +23,6 @@ #include #include -#include #include #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_ThrownKoopa.c b/src/melee/ft/chara/ftCommon/ftCo_ThrownKoopa.c index c350544f82..c196b99585 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_ThrownKoopa.c +++ b/src/melee/ft/chara/ftCommon/ftCo_ThrownKoopa.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_ThrownMewtwo.c b/src/melee/ft/chara/ftCommon/ftCo_ThrownMewtwo.c index 559284533d..b470ec0bdb 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_ThrownMewtwo.c +++ b/src/melee/ft/chara/ftCommon/ftCo_ThrownMewtwo.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftCommon/ftCo_Wait.c b/src/melee/ft/chara/ftCommon/ftCo_Wait.c index e1be4e4dc9..d7667c9ca4 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_Wait.c +++ b/src/melee/ft/chara/ftCommon/ftCo_Wait.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_WarpStar.c b/src/melee/ft/chara/ftCommon/ftCo_WarpStar.c index 1f9869ca8a..4d7ebdef31 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_WarpStar.c +++ b/src/melee/ft/chara/ftCommon/ftCo_WarpStar.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftCo_YoshiEgg.c b/src/melee/ft/chara/ftCommon/ftCo_YoshiEgg.c index df2c8e8473..df5cae7068 100644 --- a/src/melee/ft/chara/ftCommon/ftCo_YoshiEgg.c +++ b/src/melee/ft/chara/ftCommon/ftCo_YoshiEgg.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/ftpickupitem.c b/src/melee/ft/chara/ftCommon/ftpickupitem.c index 350765a09f..dbd2c97cf0 100644 --- a/src/melee/ft/chara/ftCommon/ftpickupitem.c +++ b/src/melee/ft/chara/ftCommon/ftpickupitem.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include "it/forward.h" #include @@ -28,7 +30,6 @@ #include "pl/pl_0371.h" #include -#include #include #include #include diff --git a/src/melee/ft/chara/ftCommon/inlines.h b/src/melee/ft/chara/ftCommon/inlines.h index 6ace847287..4b128dbd27 100644 --- a/src/melee/ft/chara/ftCommon/inlines.h +++ b/src/melee/ft/chara/ftCommon/inlines.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTCOMMON_INLINES_H #include + #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/chara/ftCommon/types.h b/src/melee/ft/chara/ftCommon/types.h index 3fcf86de4b..25ed8fb884 100644 --- a/src/melee/ft/chara/ftCommon/types.h +++ b/src/melee/ft/chara/ftCommon/types.h @@ -2,12 +2,13 @@ #define MELEE_FT_CHARA_FTCOMMON_TYPES_H #include +#include + #include "ft/forward.h" #include "ftCommon/forward.h" // IWYU pragma: export #include "ftKirby/forward.h" #include "it/forward.h" -#include #include struct ftCollisionBox { diff --git a/src/melee/ft/chara/ftCrazyHand/ftCh_Init.c b/src/melee/ft/chara/ftCrazyHand/ftCh_Init.c index b952a75db2..abd6fcfaeb 100644 --- a/src/melee/ft/chara/ftCrazyHand/ftCh_Init.c +++ b/src/melee/ft/chara/ftCrazyHand/ftCh_Init.c @@ -1,4 +1,6 @@ #include +#include + #include "ftCrazyHand/forward.h" #include @@ -14,7 +16,6 @@ #include "it/it_26B1.h" #include -#include /* static */ void ftCh_Init_801566B4(void); /* static */ void ftCh_Init_80156A5C(void); @@ -664,8 +665,8 @@ void ftCh_Init_OnLoad(HSD_GObj* gobj) fp->x2229_b5_no_normal_motion = 1; fp->x2229_b6 = 1; fp->x2229_b7 = 1; - fp->x222A_flag.bits.b0 = 1; - fp->x222A_flag.bits.b1 = 1; + fp->x222A_flag.b0 = 1; + fp->x222A_flag.b1 = 1; fp->x2229_b3 = 1; fp->cur_pos.x = ftData_attr->x18; fp->cur_pos.y = ftData_attr->x1C; diff --git a/src/melee/ft/chara/ftDonkey/forward.h b/src/melee/ft/chara/ftDonkey/forward.h index 58684a287d..28f82cd672 100644 --- a/src/melee/ft/chara/ftDonkey/forward.h +++ b/src/melee/ft/chara/ftDonkey/forward.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTDONKEY_FORWARD_H #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftDonkey/ftDk_HeavyWalk.c b/src/melee/ft/chara/ftDonkey/ftDk_HeavyWalk.c index 72fba57bb5..68341a6635 100644 --- a/src/melee/ft/chara/ftDonkey/ftDk_HeavyWalk.c +++ b/src/melee/ft/chara/ftDonkey/ftDk_HeavyWalk.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftDk_HeavyWalk.h" diff --git a/src/melee/ft/chara/ftDonkey/ftDk_Init.c b/src/melee/ft/chara/ftDonkey/ftDk_Init.c index d29273437c..d4505dca7d 100644 --- a/src/melee/ft/chara/ftDonkey/ftDk_Init.c +++ b/src/melee/ft/chara/ftDonkey/ftDk_Init.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include "lb/forward.h" diff --git a/src/melee/ft/chara/ftDonkey/ftDk_SpecialHi.c b/src/melee/ft/chara/ftDonkey/ftDk_SpecialHi.c index fbe56bb1a9..40261f2f78 100644 --- a/src/melee/ft/chara/ftDonkey/ftDk_SpecialHi.c +++ b/src/melee/ft/chara/ftDonkey/ftDk_SpecialHi.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include diff --git a/src/melee/ft/chara/ftDonkey/ftDk_SpecialLw.c b/src/melee/ft/chara/ftDonkey/ftDk_SpecialLw.c index 56efee8d47..da3a3bdad0 100644 --- a/src/melee/ft/chara/ftDonkey/ftDk_SpecialLw.c +++ b/src/melee/ft/chara/ftDonkey/ftDk_SpecialLw.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include "ftDk_SpecialLw.h" diff --git a/src/melee/ft/chara/ftDonkey/ftDk_SpecialN.c b/src/melee/ft/chara/ftDonkey/ftDk_SpecialN.c index 5555e6e6d5..5a44df4de2 100644 --- a/src/melee/ft/chara/ftDonkey/ftDk_SpecialN.c +++ b/src/melee/ft/chara/ftDonkey/ftDk_SpecialN.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include "lb/forward.h" #include diff --git a/src/melee/ft/chara/ftDonkey/ftDk_SpecialS.c b/src/melee/ft/chara/ftDonkey/ftDk_SpecialS.c index f62b79317c..c6e0084a4b 100644 --- a/src/melee/ft/chara/ftDonkey/ftDk_SpecialS.c +++ b/src/melee/ft/chara/ftDonkey/ftDk_SpecialS.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include diff --git a/src/melee/ft/chara/ftFalco/ftFc_Init.c b/src/melee/ft/chara/ftFalco/ftFc_Init.c index 05a0ed3d10..b8facc0b18 100644 --- a/src/melee/ft/chara/ftFalco/ftFc_Init.c +++ b/src/melee/ft/chara/ftFalco/ftFc_Init.c @@ -1,4 +1,5 @@ #include + #include "ftFox/forward.h" #include "ftFc_Init.h" diff --git a/src/melee/ft/chara/ftFalco/ftFc_Init.h b/src/melee/ft/chara/ftFalco/ftFc_Init.h index 47dd620fc3..4a36c1efb8 100644 --- a/src/melee/ft/chara/ftFalco/ftFc_Init.h +++ b/src/melee/ft/chara/ftFalco/ftFc_Init.h @@ -2,6 +2,7 @@ #define GALE01_149ACC #include + #include "ftFox/forward.h" #include diff --git a/src/melee/ft/chara/ftFox/ftFx_AppealS.h b/src/melee/ft/chara/ftFox/ftFx_AppealS.h index 716f39f083..c547fcc17b 100644 --- a/src/melee/ft/chara/ftFox/ftFx_AppealS.h +++ b/src/melee/ft/chara/ftFox/ftFx_AppealS.h @@ -2,6 +2,7 @@ #define GALE01_0E5970 #include + #include "ft/forward.h" #include diff --git a/src/melee/ft/chara/ftFox/ftFx_Init.c b/src/melee/ft/chara/ftFox/ftFx_Init.c index 790ef87ec5..732fdb125a 100644 --- a/src/melee/ft/chara/ftFox/ftFx_Init.c +++ b/src/melee/ft/chara/ftFox/ftFx_Init.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "it/forward.h" diff --git a/src/melee/ft/chara/ftFox/ftFx_Init.h b/src/melee/ft/chara/ftFox/ftFx_Init.h index 96c84fa409..9a554028bc 100644 --- a/src/melee/ft/chara/ftFox/ftFx_Init.h +++ b/src/melee/ft/chara/ftFox/ftFx_Init.h @@ -2,6 +2,7 @@ #define GALE01_0E5534 #include + #include "ftFox/forward.h" #include diff --git a/src/melee/ft/chara/ftFox/ftFx_SpecialS.h b/src/melee/ft/chara/ftFox/ftFx_SpecialS.h index c70e2a76fd..d4f10ac3bc 100644 --- a/src/melee/ft/chara/ftFox/ftFx_SpecialS.h +++ b/src/melee/ft/chara/ftFox/ftFx_SpecialS.h @@ -2,6 +2,7 @@ #define GALE01_0E9DF8 #include + #include #include diff --git a/src/melee/ft/chara/ftFox/types.h b/src/melee/ft/chara/ftFox/types.h index ec140652f0..ab0f0e2efa 100644 --- a/src/melee/ft/chara/ftFox/types.h +++ b/src/melee/ft/chara/ftFox/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTFOX_TYPES_H #include + #include "ftFox/forward.h" // IWYU pragma: export #include "it/forward.h" #include diff --git a/src/melee/ft/chara/ftGameWatch/ftGw_AttackAir.c b/src/melee/ft/chara/ftGameWatch/ftGw_AttackAir.c index b4f4972975..1baf0a5dc3 100644 --- a/src/melee/ft/chara/ftGameWatch/ftGw_AttackAir.c +++ b/src/melee/ft/chara/ftGameWatch/ftGw_AttackAir.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftGw_AttackAir.h" diff --git a/src/melee/ft/chara/ftGameWatch/ftGw_AttackLw3.h b/src/melee/ft/chara/ftGameWatch/ftGw_AttackLw3.h index 6a2bf44d8e..132e5ec8bf 100644 --- a/src/melee/ft/chara/ftGameWatch/ftGw_AttackLw3.h +++ b/src/melee/ft/chara/ftGameWatch/ftGw_AttackLw3.h @@ -4,6 +4,7 @@ #define GALE01_14AB48 #include + #include /* 14AB48 */ void ftGw_AttackLw3_ItemManholeSetup(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftGameWatch/ftGw_SpecialS.h b/src/melee/ft/chara/ftGameWatch/ftGw_SpecialS.h index 072796d2c6..72cde43135 100644 --- a/src/melee/ft/chara/ftGameWatch/ftGw_SpecialS.h +++ b/src/melee/ft/chara/ftGameWatch/ftGw_SpecialS.h @@ -4,6 +4,7 @@ #define GALE01_14C46C #include + #include /* 14C46C */ void ftGw_SpecialS_ItemJudgementSetup(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftGameWatch/types.h b/src/melee/ft/chara/ftGameWatch/types.h index 85683b1a03..db7892d1c6 100644 --- a/src/melee/ft/chara/ftGameWatch/types.h +++ b/src/melee/ft/chara/ftGameWatch/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTGAMEWATCH_TYPES_H #include + #include "ftGameWatch/forward.h" // IWYU pragma: export #include #include diff --git a/src/melee/ft/chara/ftGanon/ftGn_Init.h b/src/melee/ft/chara/ftGanon/ftGn_Init.h index 69c6049f1e..094629c953 100644 --- a/src/melee/ft/chara/ftGanon/ftGn_Init.h +++ b/src/melee/ft/chara/ftGanon/ftGn_Init.h @@ -2,6 +2,7 @@ #define GALE01_14EE40 #include + #include "ftCaptain/forward.h" #include diff --git a/src/melee/ft/chara/ftGigaKoopa/ftGk_Init.c b/src/melee/ft/chara/ftGigaKoopa/ftGk_Init.c index b9f0911d22..20f4179b43 100644 --- a/src/melee/ft/chara/ftGigaKoopa/ftGk_Init.c +++ b/src/melee/ft/chara/ftGigaKoopa/ftGk_Init.c @@ -327,7 +327,7 @@ void ftGk_Init_OnLoad(HSD_GObj* gobj) it_8026B3F8(items[0], It_Kind_Koopa_Flame); fp->x2226_b1 = true; - fp->x222A_flag.bits.b0 = true; + fp->x222A_flag.b0 = true; } void ftGk_Init_OnItemPickup(HSD_GObj* gobj, bool flag) diff --git a/src/melee/ft/chara/ftGigaKoopa/ftGk_Init.h b/src/melee/ft/chara/ftGigaKoopa/ftGk_Init.h index 267864f57a..fdf5cfe441 100644 --- a/src/melee/ft/chara/ftGigaKoopa/ftGk_Init.h +++ b/src/melee/ft/chara/ftGigaKoopa/ftGk_Init.h @@ -2,6 +2,7 @@ #define GALE01_14F640 #include + #include "ftKoopa/forward.h" #include diff --git a/src/melee/ft/chara/ftKirby/forward.h b/src/melee/ft/chara/ftKirby/forward.h index 2a21dc56bd..c409f9399c 100644 --- a/src/melee/ft/chara/ftKirby/forward.h +++ b/src/melee/ft/chara/ftKirby/forward.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTKIRBY_FORWARD_H #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftKirby/ftKb_Init.c b/src/melee/ft/chara/ftKirby/ftKb_Init.c index f02b0d0a41..a264853b5c 100644 --- a/src/melee/ft/chara/ftKirby/ftKb_Init.c +++ b/src/melee/ft/chara/ftKirby/ftKb_Init.c @@ -1,9 +1,6 @@ -#include "forward.h" -#include "ft/forward.h" -#include "ftCommon/forward.h" -#include +#include -#include "ftKb_Init.h" +#include "ftKb_Init.static.h" #include "types.h" @@ -36,19 +33,10 @@ #include "pl/player.h" #include -#include #include #include #include -/* 0F6178 */ static void fn_800F6178(HSD_GObj*); -/* 0F6210 */ static void fn_800F6210(HSD_GObj*); -/* 10B2E8 */ static void fn_8010B2E8(HSD_GObj*); -/* 10C344 */ static void fn_8010C344(HSD_GObj*); -/* 10C44C */ static void fn_8010C44C(HSD_GObj*); -/* 10CD88 */ static void fn_8010CD88(HSD_GObj*); -/* 10CFB0 */ static void fn_8010CFB0(HSD_GObj*); - MotionState ftKb_Init_MotionStateTable[ftKb_MS_SelfCount] = { { // ftKb_MS_JumpAerialF1 = 341 @@ -3711,7 +3699,12 @@ void ftKb_SpecialAirLw_800F5524(HSD_GObj* gobj) /// #ftKb_SpecialN_800F5874 -/// #ftKb_SpecialN_800F5898 +HSD_Joint* ftKb_SpecialN_800F5898(ftKb_GObj* gobj, int arg1) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftData* ca = fp->ft_data; + return M2C_FIELD(&ca->x48_items[0], HSD_Joint**, 0x10); +} /// #ftKb_SpecialN_800F58AC @@ -5167,7 +5160,10 @@ f32 ftKb_SpecialNYs_801092CC(ftKb_GObj* gobj) /// #ftKb_SpecialNYs_80109380 -/// #ftKb_SpecialNYs_801093A0 +ftDynamics* ftKb_SpecialNYs_801093A0(ftKb_GObj* gobj) +{ + return ft_80459B88.hats[FTKIND_SAMUS]->hat_dynamics[0]; +} /// #ftKb_SpecialNYs_801093B4 @@ -5299,7 +5295,12 @@ void ftCo_KirbyYoshiEgg_IASA(ftKb_GObj* gobj) {} /// #fn_8010B1F4 -/// #fn_8010B2E8 +void fn_8010B2E8(ftKb_GObj* gobj) +{ + ftKb_Fighter* fp = GET_FIGHTER(gobj); + fp->cmd_vars[0] = 0; + fp->mv.kb.specialn_ms.cur_frame = 0; +} void ftKb_SpecialNMs_8010B2FC(HSD_GObj* gobj) { @@ -5822,14 +5823,15 @@ void fn_8010CD88(HSD_GObj* gobj) /// #ftKb_SpecialNGw_8010D188 +/// #ftGameWatch_SpecialN_SetVars with callback arg inline void setGwVars(HSD_GObj* fighter_gobj) { Fighter* fp = GET_FIGHTER(fighter_gobj); fp->cmd_vars[0] = 0; fp->cmd_vars[1] = 0; fp->cmd_vars[2] = 0; - fp->mv.kb.specialn_gw.x0 = 0; - fp->mv.kb.specialn_gw.x4 = 0; + fp->mv.kb.specialn_gw.isChefLoopDisable = false; + fp->mv.kb.specialn_gw.maxSausage = 0; fp->accessory4_cb = fn_8010CFB0; } diff --git a/src/melee/ft/chara/ftKirby/ftKb_Init.h b/src/melee/ft/chara/ftKirby/ftKb_Init.h index f67e3a6d74..5e68d6b8cb 100644 --- a/src/melee/ft/chara/ftKirby/ftKb_Init.h +++ b/src/melee/ft/chara/ftKirby/ftKb_Init.h @@ -2,6 +2,8 @@ #define GALE01_0EE528 #include +#include + #include "ftCommon/forward.h" #include "ftKirby/forward.h" #include @@ -9,8 +11,6 @@ #include "ft/types.h" -#include - /* 0EE528 */ void ftKb_Init_800EE528(void); /* 0EE5C0 */ void ftKb_Init_OnDeath(ftKb_GObj* gobj); /* 0EE680 */ void ftKb_Init_OnLoad(ftKb_GObj* gobj); @@ -757,7 +757,7 @@ /* 10933C */ void ftKb_SpecialNYs_8010933C(ftKb_GObj* gobj); /* 109354 */ void ftKb_SpecialNYs_80109354(ftKb_GObj* gobj); /* 109380 */ void ftKb_SpecialNYs_80109380(ftKb_GObj* gobj); -/* 1093A0 */ void ftKb_SpecialNYs_801093A0(ftKb_GObj* gobj); +/* 1093A0 */ ftDynamics* ftKb_SpecialNYs_801093A0(ftKb_GObj* gobj); /* 1093B4 */ void ftKb_SpecialNYs_801093B4(ftKb_GObj* gobj); /* 10941C */ void ftKb_SpecialNYs_8010941C(ftKb_GObj* gobj); /* 1094FC */ void ftKb_SpecialNYs_801094FC(ftKb_GObj* gobj); diff --git a/src/melee/ft/chara/ftKirby/ftKb_Init.static.h b/src/melee/ft/chara/ftKirby/ftKb_Init.static.h new file mode 100644 index 0000000000..84663ad2a2 --- /dev/null +++ b/src/melee/ft/chara/ftKirby/ftKb_Init.static.h @@ -0,0 +1,16 @@ +#ifndef __GALE01_0EE528 +#define __GALE01_0EE528 + +#include + +#include "ftKb_Init.h" // IWYU pragma: export + +/* 0F6178 */ static void fn_800F6178(ftKb_GObj*); +/* 0F6210 */ static void fn_800F6210(ftKb_GObj*); +/* 10B2E8 */ static void fn_8010B2E8(ftKb_GObj*); +/* 10C344 */ static void fn_8010C344(ftKb_GObj*); +/* 10C44C */ static void fn_8010C44C(ftKb_GObj*); +/* 10CD88 */ static void fn_8010CD88(ftKb_GObj*); +/* 10CFB0 */ static void fn_8010CFB0(ftKb_GObj*); + +#endif diff --git a/src/melee/ft/chara/ftKirby/types.h b/src/melee/ft/chara/ftKirby/types.h index 7eb77937e8..7378868193 100644 --- a/src/melee/ft/chara/ftKirby/types.h +++ b/src/melee/ft/chara/ftKirby/types.h @@ -2,15 +2,19 @@ #define MELEE_FT_CHARA_FTKIRBY_TYPES_H #include +#include + #include "ft/forward.h" #include "it/forward.h" #include "lb/forward.h" #include +#include "ftGameWatch/types.h" +#include "ftMars/types.h" +#include "ftNess/types.h" #include "lb/types.h" #include -#include struct ftKb_FighterVars { /* fp+222C */ struct ftKb_Hat { @@ -381,19 +385,12 @@ struct ftKb_DatAttrs { STATIC_ASSERT(sizeof(struct ftKb_DatAttrs) == 0x434); union ftKb_MotionVars { - struct ftKb_SpecialNNs_Vars { - /* fp+2340 */ int frames_to_loop_charge_ground; - /* fp+2344 */ int frames_to_loop_charge_air; - /* fp+2348 */ int falling_acceleration_delay; - /* fp+234C */ int charge_release_delay; - } specialn_ns; + struct ftGameWatch_SpecialNVars specialn_gw; + struct ftMars_SpecialNVars specialn_ms; + struct ftNess_SpecialNVars specialn_ns; struct ftKb_SpecialNPe_Vars { /* fp+2340 */ int facing_dir; } specialn_pe; - struct ftKb_SpecialNGw_Vars { - /* fp+2340 */ UNK_T x0; - /* fp+2344 */ UNK_T x4; - } specialn_gw; }; #endif diff --git a/src/melee/ft/chara/ftKoopa/forward.h b/src/melee/ft/chara/ftKoopa/forward.h index cef99d8db5..30e88fe0ba 100644 --- a/src/melee/ft/chara/ftKoopa/forward.h +++ b/src/melee/ft/chara/ftKoopa/forward.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTKOOPA_FORWARD_H #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftKoopa/ftKp_Init.c b/src/melee/ft/chara/ftKoopa/ftKp_Init.c index 885b8087b9..295622094e 100644 --- a/src/melee/ft/chara/ftKoopa/ftKp_Init.c +++ b/src/melee/ft/chara/ftKoopa/ftKp_Init.c @@ -1,3 +1,5 @@ +#include + #include "forward.h" #include "ftCommon/forward.h" #include "it/forward.h" @@ -21,8 +23,6 @@ #include "ftKoopa/types.h" #include "it/it_26B1.h" -#include - MotionState ftKp_Init_MotionStateTable[ftKp_MS_SelfCount] = { { // ftKp_MS_SpecialNStart = 341 diff --git a/src/melee/ft/chara/ftKoopa/ftKp_Init.h b/src/melee/ft/chara/ftKoopa/ftKp_Init.h index 44f866eae9..c5bbadf893 100644 --- a/src/melee/ft/chara/ftKoopa/ftKp_Init.h +++ b/src/melee/ft/chara/ftKoopa/ftKp_Init.h @@ -2,6 +2,7 @@ #define GALE01_132A0C #include + #include "ftKoopa/forward.h" #include diff --git a/src/melee/ft/chara/ftKoopa/ftKp_SpecialS.c b/src/melee/ft/chara/ftKoopa/ftKp_SpecialS.c index f312d5101d..e7f547717e 100644 --- a/src/melee/ft/chara/ftKoopa/ftKp_SpecialS.c +++ b/src/melee/ft/chara/ftKoopa/ftKp_SpecialS.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCommon/forward.h" #include "ftKoopa/forward.h" diff --git a/src/melee/ft/chara/ftKoopa/types.h b/src/melee/ft/chara/ftKoopa/types.h index 9bf73d3960..a801fb753d 100644 --- a/src/melee/ft/chara/ftKoopa/types.h +++ b/src/melee/ft/chara/ftKoopa/types.h @@ -2,7 +2,6 @@ #define MELEE_FT_CHARA_FTKOOPA_TYPES_H #include - #include struct ftKoopa_FighterVars { diff --git a/src/melee/ft/chara/ftLink/ftLk_AttackAir.c b/src/melee/ft/chara/ftLink/ftLk_AttackAir.c index e1a84cca67..8bf6da6705 100644 --- a/src/melee/ft/chara/ftLink/ftLk_AttackAir.c +++ b/src/melee/ft/chara/ftLink/ftLk_AttackAir.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "lb/forward.h" #include diff --git a/src/melee/ft/chara/ftLink/ftLk_Init.h b/src/melee/ft/chara/ftLink/ftLk_Init.h index d5021ac99b..c7be7920c2 100644 --- a/src/melee/ft/chara/ftLink/ftLk_Init.h +++ b/src/melee/ft/chara/ftLink/ftLk_Init.h @@ -2,6 +2,7 @@ #define GALE01_0EAD64 #include + #include "ftLink/forward.h" #include diff --git a/src/melee/ft/chara/ftLink/ftLk_SpecialHi.c b/src/melee/ft/chara/ftLink/ftLk_SpecialHi.c index 0895a4fcac..957ea7b509 100644 --- a/src/melee/ft/chara/ftLink/ftLk_SpecialHi.c +++ b/src/melee/ft/chara/ftLink/ftLk_SpecialHi.c @@ -1,4 +1,5 @@ #include + #include #include "ftLk_SpecialHi.h" diff --git a/src/melee/ft/chara/ftLink/ftLk_SpecialLw.c b/src/melee/ft/chara/ftLink/ftLk_SpecialLw.c index 9701d1b08b..10d7cb2630 100644 --- a/src/melee/ft/chara/ftLink/ftLk_SpecialLw.c +++ b/src/melee/ft/chara/ftLink/ftLk_SpecialLw.c @@ -1,4 +1,5 @@ #include + #include "ftLink/forward.h" #include "it/forward.h" #include diff --git a/src/melee/ft/chara/ftLink/ftLk_SpecialN.c b/src/melee/ft/chara/ftLink/ftLk_SpecialN.c index e163311991..609e3022f0 100644 --- a/src/melee/ft/chara/ftLink/ftLk_SpecialN.c +++ b/src/melee/ft/chara/ftLink/ftLk_SpecialN.c @@ -1,4 +1,5 @@ #include + #include "ftLink/forward.h" #include "it/forward.h" #include diff --git a/src/melee/ft/chara/ftLink/ftLk_SpecialN.h b/src/melee/ft/chara/ftLink/ftLk_SpecialN.h index 242af2dbaf..5064b27c5f 100644 --- a/src/melee/ft/chara/ftLink/ftLk_SpecialN.h +++ b/src/melee/ft/chara/ftLink/ftLk_SpecialN.h @@ -2,6 +2,7 @@ #define GALE01_0ECBC4 #include + #include "ftLink/forward.h" #include diff --git a/src/melee/ft/chara/ftLink/ftLk_SpecialS.c b/src/melee/ft/chara/ftLink/ftLk_SpecialS.c index 7db5c5127d..2466d4336d 100644 --- a/src/melee/ft/chara/ftLink/ftLk_SpecialS.c +++ b/src/melee/ft/chara/ftLink/ftLk_SpecialS.c @@ -1,4 +1,5 @@ #include + #include "ftLink/forward.h" #include #include diff --git a/src/melee/ft/chara/ftLink/ftLk_SpecialS.h b/src/melee/ft/chara/ftLink/ftLk_SpecialS.h index 2c25212e42..77a2a6ab92 100644 --- a/src/melee/ft/chara/ftLink/ftLk_SpecialS.h +++ b/src/melee/ft/chara/ftLink/ftLk_SpecialS.h @@ -2,6 +2,7 @@ #define GALE01_0EC354 #include + #include /* 0EBFCC */ bool ftLk_SepcialS_Get2219b5(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftLink/types.h b/src/melee/ft/chara/ftLink/types.h index 359b9eb607..4afff865f0 100644 --- a/src/melee/ft/chara/ftLink/types.h +++ b/src/melee/ft/chara/ftLink/types.h @@ -2,6 +2,8 @@ #define MELEE_FT_CHARA_FTLINK_TYPES_H #include +#include + #include "ft/forward.h" #include "ftLink/forward.h" // IWYU pragma: export #include "it/forward.h" @@ -10,7 +12,6 @@ #include "lb/types.h" #include -#include struct ftLk_DatAttrs { /* +0 */ float x0; diff --git a/src/melee/ft/chara/ftLuigi/ftLg_Init.h b/src/melee/ft/chara/ftLuigi/ftLg_Init.h index 1449f3b307..5cfd814929 100644 --- a/src/melee/ft/chara/ftLuigi/ftLg_Init.h +++ b/src/melee/ft/chara/ftLuigi/ftLg_Init.h @@ -2,6 +2,7 @@ #define GALE01_1422E8 #include + #include "ftLuigi/forward.h" #include diff --git a/src/melee/ft/chara/ftLuigi/ftLg_SpecialHi.c b/src/melee/ft/chara/ftLuigi/ftLg_SpecialHi.c index d3ec8735a4..1697583afd 100644 --- a/src/melee/ft/chara/ftLuigi/ftLg_SpecialHi.c +++ b/src/melee/ft/chara/ftLuigi/ftLg_SpecialHi.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include diff --git a/src/melee/ft/chara/ftLuigi/ftLg_SpecialLw.c b/src/melee/ft/chara/ftLuigi/ftLg_SpecialLw.c index af22761606..26b843b8e1 100644 --- a/src/melee/ft/chara/ftLuigi/ftLg_SpecialLw.c +++ b/src/melee/ft/chara/ftLuigi/ftLg_SpecialLw.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/chara/ftLuigi/ftLg_SpecialN.c b/src/melee/ft/chara/ftLuigi/ftLg_SpecialN.c index 31531dd4be..b81213e0aa 100644 --- a/src/melee/ft/chara/ftLuigi/ftLg_SpecialN.c +++ b/src/melee/ft/chara/ftLuigi/ftLg_SpecialN.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include "it/forward.h" diff --git a/src/melee/ft/chara/ftLuigi/ftLg_SpecialS.c b/src/melee/ft/chara/ftLuigi/ftLg_SpecialS.c index bd5bc77d7e..c6e7672659 100644 --- a/src/melee/ft/chara/ftLuigi/ftLg_SpecialS.c +++ b/src/melee/ft/chara/ftLuigi/ftLg_SpecialS.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include "lb/forward.h" #include diff --git a/src/melee/ft/chara/ftLuigi/types.h b/src/melee/ft/chara/ftLuigi/types.h index 414c1ba40f..7af51ce00d 100644 --- a/src/melee/ft/chara/ftLuigi/types.h +++ b/src/melee/ft/chara/ftLuigi/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTLUIGI_TYPES_H #include + #include "ft/forward.h" struct ftLuigi_FighterVars { diff --git a/src/melee/ft/chara/ftMario/ftMr_Init.h b/src/melee/ft/chara/ftMario/ftMr_Init.h index 34ed1c3f64..713788e0be 100644 --- a/src/melee/ft/chara/ftMario/ftMr_Init.h +++ b/src/melee/ft/chara/ftMario/ftMr_Init.h @@ -2,6 +2,7 @@ #define GALE01_0E08CC #include + #include "ftMario/forward.h" #include diff --git a/src/melee/ft/chara/ftMario/ftMr_SpecialHi.c b/src/melee/ft/chara/ftMario/ftMr_SpecialHi.c index 5215150f2c..32cccab82c 100644 --- a/src/melee/ft/chara/ftMario/ftMr_SpecialHi.c +++ b/src/melee/ft/chara/ftMario/ftMr_SpecialHi.c @@ -1,4 +1,5 @@ #include + #include #include "ftMr_SpecialHi.h" diff --git a/src/melee/ft/chara/ftMario/ftMr_SpecialLw.c b/src/melee/ft/chara/ftMario/ftMr_SpecialLw.c index 2a856f9020..d2eb45e76e 100644 --- a/src/melee/ft/chara/ftMario/ftMr_SpecialLw.c +++ b/src/melee/ft/chara/ftMario/ftMr_SpecialLw.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/chara/ftMario/ftMr_SpecialS.c b/src/melee/ft/chara/ftMario/ftMr_SpecialS.c index 3d6983e5c5..2195cafc70 100644 --- a/src/melee/ft/chara/ftMario/ftMr_SpecialS.c +++ b/src/melee/ft/chara/ftMario/ftMr_SpecialS.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftMr_SpecialS.h" diff --git a/src/melee/ft/chara/ftMario/types.h b/src/melee/ft/chara/ftMario/types.h index fae8ff8533..a51b13f283 100644 --- a/src/melee/ft/chara/ftMario/types.h +++ b/src/melee/ft/chara/ftMario/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTMARIO_TYPES_H #include + #include "forward.h" // IWYU pragma: export #include "ft/forward.h" #include "ftMario/forward.h" // IWYU pragma: export diff --git a/src/melee/ft/chara/ftMars/ftMs_Init.c b/src/melee/ft/chara/ftMars/ftMs_Init.c index 5b86bafcda..b9c644a205 100644 --- a/src/melee/ft/chara/ftMars/ftMs_Init.c +++ b/src/melee/ft/chara/ftMars/ftMs_Init.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include "ftMs_Init.h" diff --git a/src/melee/ft/chara/ftMars/ftMs_Init.h b/src/melee/ft/chara/ftMars/ftMs_Init.h index 7f7c8a3141..da02a4139e 100644 --- a/src/melee/ft/chara/ftMars/ftMs_Init.h +++ b/src/melee/ft/chara/ftMars/ftMs_Init.h @@ -2,6 +2,7 @@ #define GALE01_136258 #include + #include "ftMars/forward.h" #include diff --git a/src/melee/ft/chara/ftMars/ftMs_SpecialHi.c b/src/melee/ft/chara/ftMars/ftMs_SpecialHi.c index e55bd09a97..54dd2a3d92 100644 --- a/src/melee/ft/chara/ftMars/ftMs_SpecialHi.c +++ b/src/melee/ft/chara/ftMars/ftMs_SpecialHi.c @@ -1,4 +1,5 @@ #include + #include #include "ftMs_SpecialHi.h" diff --git a/src/melee/ft/chara/ftMars/ftMs_SpecialLw.c b/src/melee/ft/chara/ftMars/ftMs_SpecialLw.c index f2ecf74292..bb6673ed8c 100644 --- a/src/melee/ft/chara/ftMars/ftMs_SpecialLw.c +++ b/src/melee/ft/chara/ftMars/ftMs_SpecialLw.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include "ftMs_SpecialLw.h" diff --git a/src/melee/ft/chara/ftMars/ftMs_SpecialN.c b/src/melee/ft/chara/ftMars/ftMs_SpecialN.c index 20e9d8c647..c6d6ad958e 100644 --- a/src/melee/ft/chara/ftMars/ftMs_SpecialN.c +++ b/src/melee/ft/chara/ftMars/ftMs_SpecialN.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include "ftMars/forward.h" #include "lb/forward.h" @@ -25,7 +27,6 @@ #include "lb/lb_00F9.h" #include -#include #include void ftMs_SpecialN_Enter(HSD_GObj* gobj) diff --git a/src/melee/ft/chara/ftMars/ftMs_SpecialS.c b/src/melee/ft/chara/ftMars/ftMs_SpecialS.c index 4cf3dfa511..c77c3ffa4a 100644 --- a/src/melee/ft/chara/ftMars/ftMs_SpecialS.c +++ b/src/melee/ft/chara/ftMars/ftMs_SpecialS.c @@ -1,4 +1,5 @@ #include + #include #include "ftMs_SpecialS.h" diff --git a/src/melee/ft/chara/ftMars/types.h b/src/melee/ft/chara/ftMars/types.h index 6556630b2e..6b97bde9c3 100644 --- a/src/melee/ft/chara/ftMars/types.h +++ b/src/melee/ft/chara/ftMars/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTMARS_TYPES_H #include + #include "ft/forward.h" #include "lb/types.h" diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_CaptureDamageMasterHand.c b/src/melee/ft/chara/ftMasterHand/ftMh_CaptureDamageMasterHand.c index 7e0078869e..7925d03e73 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_CaptureDamageMasterHand.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_CaptureDamageMasterHand.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftMasterHand/ftMh_CaptureDamageMasterHand.h" @@ -21,6 +22,6 @@ void ftMh_CaptureDamageMasterHand_80155C94(HSD_GObj* gobj) 0); fp->x221E_b0 = true; ftCommon_8007E2F4(fp, 511); - fp->x2220_flag.bits.b3 = true; + fp->x2220_flag.b3 = true; ftAnim_8006EBA4(gobj); } diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_CaptureMasterHand.c b/src/melee/ft/chara/ftMasterHand/ftMh_CaptureMasterHand.c index 425135e201..e134ecba1c 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_CaptureMasterHand.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_CaptureMasterHand.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftMh_CaptureMasterHand.h" @@ -26,10 +27,10 @@ void ftMh_CaptureMasterHand_80155B80(HSD_GObj* gobj) Fighter_ChangeMotionState(gobj, ftCo_MS_CaptureDamageMasterHand, 0, 0, 1, 0, 0); fp->x221E_b0 = true; - fp->x2220_flag.bits.b3 = true; + fp->x2220_flag.b3 = true; fp->accessory1_cb = ftCo_800DB464; ftCommon_8007E2F4(fp, 511); - fp->x2220_flag.bits.b3 = true; + fp->x2220_flag.b3 = true; ftAnim_8006EBA4(gobj); } diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_Damage_0.h b/src/melee/ft/chara/ftMasterHand/ftMh_Damage_0.h index aed88a3ead..0e21470e3f 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_Damage_0.h +++ b/src/melee/ft/chara/ftMasterHand/ftMh_Damage_0.h @@ -2,6 +2,7 @@ #define GALE01_151428 #include + #include #include diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_Drill.c b/src/melee/ft/chara/ftMasterHand/ftMh_Drill.c index b54934893d..4f16200be9 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_Drill.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_Drill.c @@ -1,4 +1,5 @@ #include + #include #include "ftMh_Drill.h" diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_Entry.c b/src/melee/ft/chara/ftMasterHand/ftMh_Entry.c index a1e68c3632..3e4f5299ff 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_Entry.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_Entry.c @@ -1,4 +1,5 @@ #include + #include #include "ftMh_Entry.h" diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_Init.c b/src/melee/ft/chara/ftMasterHand/ftMh_Init.c index a775b6b843..809c17e4c2 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_Init.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_Init.c @@ -1,4 +1,6 @@ #include +#include + #include #include "ftMh_Init.h" @@ -40,7 +42,6 @@ #include "it/it_26B1.h" #include -#include MotionState ftMh_Init_MotionStateTable[ftMh_MS_SelfCount] = { { @@ -622,8 +623,8 @@ void ftMh_Init_OnLoad(HSD_GObj* gobj) fp->x2229_b5_no_normal_motion = true; fp->x2229_b6 = true; fp->x2229_b7 = true; - fp->x222A_flag.bits.b0 = true; - fp->x222A_flag.bits.b1 = true; + fp->x222A_flag.b0 = true; + fp->x222A_flag.b1 = true; fp->x2229_b3 = true; fp->cur_pos.x = ftData_attr->x30_pos2.x; fp->cur_pos.y = ftData_attr->x30_pos2.y; diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_Slam.c b/src/melee/ft/chara/ftMasterHand/ftMh_Slam.c index 1c11780d77..b2f6c9bd41 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_Slam.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_Slam.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftMh_Slam.h" diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_Squeeze.c b/src/melee/ft/chara/ftMasterHand/ftMh_Squeeze.c index a31c242ec3..db0ca512f6 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_Squeeze.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_Squeeze.c @@ -1,4 +1,5 @@ #include + #include #include "ftMh_Squeeze.h" diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_Squeezing.c b/src/melee/ft/chara/ftMasterHand/ftMh_Squeezing.c index e9d5894a78..24528da22a 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_Squeezing.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_Squeezing.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftMh_Squeezing.h" diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_SweepWait.c b/src/melee/ft/chara/ftMasterHand/ftMh_SweepWait.c index 645bd07844..b83197f98b 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_SweepWait.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_SweepWait.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftMasterHand/forward.h" diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_TagApplaud.c b/src/melee/ft/chara/ftMasterHand/ftMh_TagApplaud.c index b8b1c59688..608c3ccedb 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_TagApplaud.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_TagApplaud.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftMasterHand/forward.h" diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_TagApplaud.h b/src/melee/ft/chara/ftMasterHand/ftMh_TagApplaud.h index 5745f88ba3..6dce30b92c 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_TagApplaud.h +++ b/src/melee/ft/chara/ftMasterHand/ftMh_TagApplaud.h @@ -4,6 +4,7 @@ #define GALE01_155388 #include + #include /* 155388 */ void ftMh_TagApplaud_Anim(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_TagCancel.c b/src/melee/ft/chara/ftMasterHand/ftMh_TagCancel.c index fdad78b45a..9d92f95ff9 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_TagCancel.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_TagCancel.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftMh_TagCancel.h" @@ -34,7 +35,7 @@ void ftMh_MS_388_80155A58(HSD_GObj* gobj_1, HSD_GObj* gobj_2) Fighter_ChangeMotionState(gobj_1, ftCo_MS_CaptureMasterHand, 0, 0, 1, 0, 0); ft_1->x221E_b0 = true; - ft_1->x2220_flag.bits.b3 = true; + ft_1->x2220_flag.b3 = true; ftCommon_8007E2F4(ft_1, 511); ftAnim_8006EBA4(gobj_1); ftCommon_8007E2FC(gobj_1); diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_TagCrush.c b/src/melee/ft/chara/ftMasterHand/ftMh_TagCrush.c index 379ac6dc72..7c4a5496f5 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_TagCrush.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_TagCrush.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftMasterHand/forward.h" diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_TagRockPaper.c b/src/melee/ft/chara/ftMasterHand/ftMh_TagRockPaper.c index 9969fe2988..daebbfbc80 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_TagRockPaper.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_TagRockPaper.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_Throw.c b/src/melee/ft/chara/ftMasterHand/ftMh_Throw.c index acd69698ad..dcfee1ddcb 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_Throw.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_Throw.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftMasterHand/forward.h" diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_Wait1_2.c b/src/melee/ft/chara/ftMasterHand/ftMh_Wait1_2.c index 6b9186b388..686d06572e 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_Wait1_2.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_Wait1_2.c @@ -1,4 +1,5 @@ #include + #include #include "ftMh_Wait1_2.h" diff --git a/src/melee/ft/chara/ftMasterHand/ftMh_Walk.c b/src/melee/ft/chara/ftMasterHand/ftMh_Walk.c index 43bf32e972..7594a0e649 100644 --- a/src/melee/ft/chara/ftMasterHand/ftMh_Walk.c +++ b/src/melee/ft/chara/ftMasterHand/ftMh_Walk.c @@ -1,4 +1,5 @@ #include + #include "ftMasterHand/forward.h" #include "ftMh_Walk.h" diff --git a/src/melee/ft/chara/ftMasterHand/types.h b/src/melee/ft/chara/ftMasterHand/types.h index fe4438a7f9..58180d3d72 100644 --- a/src/melee/ft/chara/ftMasterHand/types.h +++ b/src/melee/ft/chara/ftMasterHand/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTMASTERHAND_TYPES_H #include + #include "ftMasterHand/forward.h" // IWYU pragma: export #include diff --git a/src/melee/ft/chara/ftMewtwo/ftMt_Init.c b/src/melee/ft/chara/ftMewtwo/ftMt_Init.c index 835005cacc..cd894c9aff 100644 --- a/src/melee/ft/chara/ftMewtwo/ftMt_Init.c +++ b/src/melee/ft/chara/ftMewtwo/ftMt_Init.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include "it/forward.h" #include diff --git a/src/melee/ft/chara/ftMewtwo/ftMt_Init.h b/src/melee/ft/chara/ftMewtwo/ftMt_Init.h index c6316c1d5b..80e3caa8f4 100644 --- a/src/melee/ft/chara/ftMewtwo/ftMt_Init.h +++ b/src/melee/ft/chara/ftMewtwo/ftMt_Init.h @@ -2,6 +2,7 @@ #define GALE01_144DFC #include + #include "ftMewtwo/forward.h" #include diff --git a/src/melee/ft/chara/ftMewtwo/ftMt_SpecialHi.c b/src/melee/ft/chara/ftMewtwo/ftMt_SpecialHi.c index 7cedf36c1b..3e0102fc1b 100644 --- a/src/melee/ft/chara/ftMewtwo/ftMt_SpecialHi.c +++ b/src/melee/ft/chara/ftMewtwo/ftMt_SpecialHi.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include "ftMt_SpecialHi.h" diff --git a/src/melee/ft/chara/ftMewtwo/ftMt_SpecialLw.c b/src/melee/ft/chara/ftMewtwo/ftMt_SpecialLw.c index cc71232ce8..a1dd4696d4 100644 --- a/src/melee/ft/chara/ftMewtwo/ftMt_SpecialLw.c +++ b/src/melee/ft/chara/ftMewtwo/ftMt_SpecialLw.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include diff --git a/src/melee/ft/chara/ftMewtwo/ftMt_SpecialN.h b/src/melee/ft/chara/ftMewtwo/ftMt_SpecialN.h index c63519400a..c5b05523a9 100644 --- a/src/melee/ft/chara/ftMewtwo/ftMt_SpecialN.h +++ b/src/melee/ft/chara/ftMewtwo/ftMt_SpecialN.h @@ -4,6 +4,7 @@ #define GALE01_146CCC #include + #include #include diff --git a/src/melee/ft/chara/ftMewtwo/ftMt_SpecialS.c b/src/melee/ft/chara/ftMewtwo/ftMt_SpecialS.c index 598ef8a38f..283fae7883 100644 --- a/src/melee/ft/chara/ftMewtwo/ftMt_SpecialS.c +++ b/src/melee/ft/chara/ftMewtwo/ftMt_SpecialS.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include diff --git a/src/melee/ft/chara/ftMewtwo/types.h b/src/melee/ft/chara/ftMewtwo/types.h index 5bbe825f54..9624a84b90 100644 --- a/src/melee/ft/chara/ftMewtwo/types.h +++ b/src/melee/ft/chara/ftMewtwo/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTMEWTWO_TYPES_H #include + #include #include "lb/types.h" diff --git a/src/melee/ft/chara/ftNana/ftNn_Init.c b/src/melee/ft/chara/ftNana/ftNn_Init.c index c5bcccc8c2..3a72f74f67 100644 --- a/src/melee/ft/chara/ftNana/ftNn_Init.c +++ b/src/melee/ft/chara/ftNana/ftNn_Init.c @@ -1,4 +1,5 @@ #include + #include "ftPopo/forward.h" #include "ftNn_Init.h" diff --git a/src/melee/ft/chara/ftNess/forward.h b/src/melee/ft/chara/ftNess/forward.h index 626915c594..65d323ea9a 100644 --- a/src/melee/ft/chara/ftNess/forward.h +++ b/src/melee/ft/chara/ftNess/forward.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTNESS_FORWARD_H #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftNess/ftNs_AttackHi4.c b/src/melee/ft/chara/ftNess/ftNs_AttackHi4.c index a5cd350c32..fd20fba18c 100644 --- a/src/melee/ft/chara/ftNess/ftNs_AttackHi4.c +++ b/src/melee/ft/chara/ftNess/ftNs_AttackHi4.c @@ -126,7 +126,7 @@ s32 ftNs_AttackHi4_YoyoCheckEnvColl(HSD_GObj* gobj, Vec3* ECBUnk, push_ecb(&coll, ECBUnk); push_ecb(&coll, ECBUnk2); - coll.x34_flags.bits.b1234 = 5; + coll.x34_flags.b1234 = 5; mpColl_8004730C(&coll, &ecb); // EnvironmentCollisionCheck_NessYoYo diff --git a/src/melee/ft/chara/ftNess/ftNs_AttackHi4.h b/src/melee/ft/chara/ftNess/ftNs_AttackHi4.h index c69f08ba7b..d2abc29650 100644 --- a/src/melee/ft/chara/ftNess/ftNs_AttackHi4.h +++ b/src/melee/ft/chara/ftNess/ftNs_AttackHi4.h @@ -2,6 +2,7 @@ #define GALE01_114EB8 #include + #include "dolphin/mtx/forward.h" #include diff --git a/src/melee/ft/chara/ftNess/ftNs_SpecialHi.c b/src/melee/ft/chara/ftNess/ftNs_SpecialHi.c index 9417398c00..620ecd0a34 100644 --- a/src/melee/ft/chara/ftNess/ftNs_SpecialHi.c +++ b/src/melee/ft/chara/ftNess/ftNs_SpecialHi.c @@ -1,4 +1,5 @@ #include + #include #include "ftNs_SpecialHi.h" diff --git a/src/melee/ft/chara/ftNess/ftNs_SpecialHi.h b/src/melee/ft/chara/ftNess/ftNs_SpecialHi.h index 1548bd6c70..7ce69842c7 100644 --- a/src/melee/ft/chara/ftNess/ftNs_SpecialHi.h +++ b/src/melee/ft/chara/ftNess/ftNs_SpecialHi.h @@ -4,6 +4,7 @@ #define GALE01_116D04 #include + #include /* 116D04 */ void ftNs_SpecialAirS_Enter(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftNess/ftNs_SpecialLw.c b/src/melee/ft/chara/ftNess/ftNs_SpecialLw.c index adb2aafa80..994f5cf77b 100644 --- a/src/melee/ft/chara/ftNess/ftNs_SpecialLw.c +++ b/src/melee/ft/chara/ftNess/ftNs_SpecialLw.c @@ -1,4 +1,5 @@ #include + #include #include "ftNs_SpecialLw.h" diff --git a/src/melee/ft/chara/ftNess/ftNs_SpecialLw.h b/src/melee/ft/chara/ftNess/ftNs_SpecialLw.h index 80de5815ad..d4d836ffe9 100644 --- a/src/melee/ft/chara/ftNess/ftNs_SpecialLw.h +++ b/src/melee/ft/chara/ftNess/ftNs_SpecialLw.h @@ -4,6 +4,7 @@ #define GALE01_119E14 #include + #include /* 119E14 */ void ftNs_SpecialLwStart_Enter(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftNess/ftNs_SpecialN.c b/src/melee/ft/chara/ftNess/ftNs_SpecialN.c index cadb923f41..24b7cea89d 100644 --- a/src/melee/ft/chara/ftNess/ftNs_SpecialN.c +++ b/src/melee/ft/chara/ftNess/ftNs_SpecialN.c @@ -1,4 +1,5 @@ #include + #include "it/forward.h" #include @@ -131,12 +132,16 @@ void ftNs_SpecialNStart_Enter(HSD_GObj* gobj) Fighter* fp1 = GET_FIGHTER(gobj); ftNessAttributes* sa = getFtSpecialAttrs(fp1); - fp1->mv.ns.specialn.flashTimerLoop1 = sa->x0_PKFLASH_TIMER1_LOOPFRAMES; - fp1->mv.ns.specialn.flashTimerLoop2 = sa->x4_PKFLASH_TIMER2_LOOPFRAMES; - fp1->mv.ns.specialn.gravityDelay = sa->x8_PKFLASH_GRAVITY_DELAY; + fp1->mv.ns.specialn.frames_to_loop_charge_ground = + sa->x0_PKFLASH_TIMER1_LOOPFRAMES; + fp1->mv.ns.specialn.frames_to_loop_charge_air = + sa->x4_PKFLASH_TIMER2_LOOPFRAMES; + fp1->mv.ns.specialn.falling_acceleration_delay = + sa->x8_PKFLASH_GRAVITY_DELAY; fp1->fv.ns.pkflash_gobj = NULL; - fp1->mv.ns.specialn.flashTimerMin = sa->xC_PKFLASH_MINCHARGEFRAMES; + fp1->mv.ns.specialn.charge_release_delay = + sa->xC_PKFLASH_MINCHARGEFRAMES; fp1->death2_cb = NULL; fp1->take_dmg_cb = NULL; } @@ -164,16 +169,16 @@ void ftNs_SpecialAirNStart_Enter(HSD_GObj* gobj) Fighter* temp_fp = GET_FIGHTER(gobj); ftNessAttributes* ness_attr = getFtSpecialAttrs(temp_fp); - temp_fp->mv.ns.specialn.flashTimerLoop1 = + temp_fp->mv.ns.specialn.frames_to_loop_charge_ground = ness_attr->x0_PKFLASH_TIMER1_LOOPFRAMES; - temp_fp->mv.ns.specialn.flashTimerLoop2 = + temp_fp->mv.ns.specialn.frames_to_loop_charge_air = ness_attr->x4_PKFLASH_TIMER2_LOOPFRAMES; - temp_fp->mv.ns.specialn.gravityDelay = + temp_fp->mv.ns.specialn.falling_acceleration_delay = ness_attr->x8_PKFLASH_GRAVITY_DELAY; temp_fp->fv.ns.pkflash_gobj = NULL; - temp_fp->mv.ns.specialn.flashTimerMin = + temp_fp->mv.ns.specialn.charge_release_delay = ness_attr->xC_PKFLASH_MINCHARGEFRAMES; temp_fp->death2_cb = NULL; @@ -228,19 +233,19 @@ void ftNs_SpecialNRelease_Anim(HSD_GObj* gobj) { Fighter* fp = GET_FIGHTER(gobj); - if (fp->mv.ns.specialn.flashTimerLoop1 != 0) { - fp->mv.ns.specialn.flashTimerLoop1--; + if (fp->mv.ns.specialn.frames_to_loop_charge_ground != 0) { + fp->mv.ns.specialn.frames_to_loop_charge_ground--; } if (fp->fv.ns.pkflash_gobj == NULL && - fp->mv.ns.specialn.flashTimerLoop2 != 0) + fp->mv.ns.specialn.frames_to_loop_charge_air != 0) { - fp->mv.ns.specialn.flashTimerLoop2--; + fp->mv.ns.specialn.frames_to_loop_charge_air--; } if (fp->fv.ns.pkflash_gobj == NULL) { - if (fp->mv.ns.specialn.flashTimerLoop1 <= 0 && - fp->mv.ns.specialn.flashTimerLoop2 <= 0) + if (fp->mv.ns.specialn.frames_to_loop_charge_ground <= 0 && + fp->mv.ns.specialn.frames_to_loop_charge_air <= 0) { Fighter_ChangeMotionState(gobj, ftNs_MS_SpecialNEnd, 0, 0, 1, 0, NULL); @@ -275,11 +280,14 @@ inline void SetPKFlashAttr(HSD_GObj* gobj) Fighter* fp = GET_FIGHTER(gobj); ftNessAttributes* sa = fp->dat_attrs; - fp->mv.ns.specialn.flashTimerLoop1 = sa->x0_PKFLASH_TIMER1_LOOPFRAMES; - fp->mv.ns.specialn.flashTimerLoop2 = sa->x4_PKFLASH_TIMER2_LOOPFRAMES; - fp->mv.ns.specialn.gravityDelay = sa->x8_PKFLASH_GRAVITY_DELAY; + fp->mv.ns.specialn.frames_to_loop_charge_ground = + sa->x0_PKFLASH_TIMER1_LOOPFRAMES; + fp->mv.ns.specialn.frames_to_loop_charge_air = + sa->x4_PKFLASH_TIMER2_LOOPFRAMES; + fp->mv.ns.specialn.falling_acceleration_delay = + sa->x8_PKFLASH_GRAVITY_DELAY; fp->fv.ns.pkflash_gobj = NULL; - fp->mv.ns.specialn.flashTimerMin = sa->xC_PKFLASH_MINCHARGEFRAMES; + fp->mv.ns.specialn.charge_release_delay = sa->xC_PKFLASH_MINCHARGEFRAMES; fp->death2_cb = NULL; fp->take_dmg_cb = NULL; } @@ -346,19 +354,19 @@ void ftNs_SpecialAirNRelease_Anim(HSD_GObj* gobj) { Fighter* fp = GET_FIGHTER(gobj); - if (fp->mv.ns.specialn.flashTimerLoop1 != 0) { - fp->mv.ns.specialn.flashTimerLoop1--; + if (fp->mv.ns.specialn.frames_to_loop_charge_ground != 0) { + fp->mv.ns.specialn.frames_to_loop_charge_ground--; } if (fp->fv.ns.pkflash_gobj == NULL && - fp->mv.ns.specialn.flashTimerLoop2 != 0) + fp->mv.ns.specialn.frames_to_loop_charge_air != 0) { - fp->mv.ns.specialn.flashTimerLoop2--; + fp->mv.ns.specialn.frames_to_loop_charge_air--; } if (fp->fv.ns.pkflash_gobj == NULL) { - if (fp->mv.ns.specialn.flashTimerLoop1 <= 0 && - fp->mv.ns.specialn.flashTimerLoop2 <= 0) + if (fp->mv.ns.specialn.frames_to_loop_charge_ground <= 0 && + fp->mv.ns.specialn.frames_to_loop_charge_air <= 0) { Fighter_ChangeMotionState(gobj, ftNs_MS_SpecialAirNEnd, 0, 0, 1, 0, NULL); @@ -419,13 +427,13 @@ void ftNs_SpecialNRelease_IASA(HSD_GObj* gobj) { { Fighter* fp = GET_FIGHTER(gobj); - fp->mv.ns.specialn.flashTimerMin--; + fp->mv.ns.specialn.charge_release_delay--; { /// @todo Nested return value bool result; - if (fp->mv.ns.specialn.flashTimerMin <= 0) { - fp->mv.ns.specialn.flashTimerMin = 0; + if (fp->mv.ns.specialn.charge_release_delay <= 0) { + fp->mv.ns.specialn.charge_release_delay = 0; result = true; } else { result = false; @@ -472,14 +480,15 @@ void ftNs_SpecialAirNRelease_IASA(HSD_GObj* gobj) { Fighter* fp = GET_FIGHTER(gobj); - fp->mv.ns.specialn.flashTimerMin = fp->mv.ns.specialn.flashTimerMin - 1; + fp->mv.ns.specialn.charge_release_delay = + fp->mv.ns.specialn.charge_release_delay - 1; { /// @todo Nested return value bool result; - if (fp->mv.ns.specialn.flashTimerMin <= 0) { - fp->mv.ns.specialn.flashTimerMin = 0; + if (fp->mv.ns.specialn.charge_release_delay <= 0) { + fp->mv.ns.specialn.charge_release_delay = 0; result = true; } else { result = false; @@ -522,8 +531,8 @@ inline void GravityDelay(HSD_GObj* gobj) { Fighter* fp = GET_FIGHTER(gobj); - if (fp->mv.ns.specialn.gravityDelay != 0) { - fp->mv.ns.specialn.gravityDelay--; + if (fp->mv.ns.specialn.falling_acceleration_delay != 0) { + fp->mv.ns.specialn.falling_acceleration_delay--; } } @@ -554,8 +563,8 @@ void ftNs_SpecialAirNStart_Phys(HSD_GObj* gobj) Fighter* fp = GET_FIGHTER(gobj); ftNessAttributes* sa = fp->dat_attrs; - if (fp->mv.ns.specialn.gravityDelay != 0) { - fp->mv.ns.specialn.gravityDelay--; + if (fp->mv.ns.specialn.falling_acceleration_delay != 0) { + fp->mv.ns.specialn.falling_acceleration_delay--; } else { ftCommon_8007D494(fp, sa->x14_PKFLASH_FALL_ACCEL, fp->co_attrs.terminal_vel); @@ -575,8 +584,8 @@ void ftNs_SpecialAirNRelease_Phys(HSD_GObj* gobj) Fighter* fp = GET_FIGHTER(gobj); ftNessAttributes* sa = fp->dat_attrs; - if (fp->mv.ns.specialn.gravityDelay != 0) { - fp->mv.ns.specialn.gravityDelay--; + if (fp->mv.ns.specialn.falling_acceleration_delay != 0) { + fp->mv.ns.specialn.falling_acceleration_delay--; } else { ftCommon_8007D494(fp, sa->x14_PKFLASH_FALL_ACCEL, fp->co_attrs.terminal_vel); @@ -596,8 +605,8 @@ void ftNs_SpecialAirNEnd_Phys(HSD_GObj* gobj) Fighter* fp = GET_FIGHTER(gobj); ftNessAttributes* sa = fp->dat_attrs; - if (fp->mv.ns.specialn.gravityDelay != 0) { - fp->mv.ns.specialn.gravityDelay--; + if (fp->mv.ns.specialn.falling_acceleration_delay != 0) { + fp->mv.ns.specialn.falling_acceleration_delay--; } else { ftCommon_8007D494(fp, sa->x14_PKFLASH_FALL_ACCEL, fp->co_attrs.terminal_vel); diff --git a/src/melee/ft/chara/ftNess/ftNs_SpecialN.h b/src/melee/ft/chara/ftNess/ftNs_SpecialN.h index 912b11742d..d91c069ef8 100644 --- a/src/melee/ft/chara/ftNess/ftNs_SpecialN.h +++ b/src/melee/ft/chara/ftNess/ftNs_SpecialN.h @@ -4,6 +4,7 @@ #define GALE01_116EBC #include + #include /* 116EBC */ bool ftNs_SpecialN_CheckSpecialNHold(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftNess/ftNs_SpecialS.c b/src/melee/ft/chara/ftNess/ftNs_SpecialS.c index 8747cca24e..d05096eb0e 100644 --- a/src/melee/ft/chara/ftNess/ftNs_SpecialS.c +++ b/src/melee/ft/chara/ftNess/ftNs_SpecialS.c @@ -1,4 +1,5 @@ #include + #include #include "ftNess/ftNs_SpecialS.h" diff --git a/src/melee/ft/chara/ftNess/types.h b/src/melee/ft/chara/ftNess/types.h index ffc84627d7..f11460f91d 100644 --- a/src/melee/ft/chara/ftNess/types.h +++ b/src/melee/ft/chara/ftNess/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTNESS_TYPES_H #include + #include "ftNess/forward.h" // IWYU pragma: export #include #include @@ -39,15 +40,15 @@ union ftNess_MotionVars { struct ftNess_SpecialNVars { /// 0x2340 - Number of frames Ness remains in the "charge loop" /// animation after releasing PK Flash - s32 flashTimerLoop1; + /* fp+2340 */ int frames_to_loop_charge_ground; /// 0x2344 - Number of extra frames Ness remains in the "charge loop" /// animation after releasing PK Flash? - s32 flashTimerLoop2; + /* fp+2344 */ int frames_to_loop_charge_air; /// 0x2348 - Number of frames to pass before gravity takes effect - s32 gravityDelay; + /* fp+2348 */ int falling_acceleration_delay; /// 0x234C - Minimum number of frames required to pass for PK Flash to /// auto-release if B is not being held - s32 flashTimerMin; + /* fp+234C */ int charge_release_delay; } specialn; struct ftNess_SpecialHiVars { diff --git a/src/melee/ft/chara/ftPeach/ftPe_Float.c b/src/melee/ft/chara/ftPeach/ftPe_Float.c index 53a54c99b7..614f4fbc55 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_Float.c +++ b/src/melee/ft/chara/ftPeach/ftPe_Float.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include diff --git a/src/melee/ft/chara/ftPeach/ftPe_Float.h b/src/melee/ft/chara/ftPeach/ftPe_Float.h index 61624de6ec..be411fb722 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_Float.h +++ b/src/melee/ft/chara/ftPeach/ftPe_Float.h @@ -2,6 +2,7 @@ #define GALE01_11BAD8 #include + #include "ft/forward.h" #include diff --git a/src/melee/ft/chara/ftPeach/ftPe_FloatAttack.c b/src/melee/ft/chara/ftPeach/ftPe_FloatAttack.c index 6b25de75f4..f65e428490 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_FloatAttack.c +++ b/src/melee/ft/chara/ftPeach/ftPe_FloatAttack.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftPe_FloatAttack.h" diff --git a/src/melee/ft/chara/ftPeach/ftPe_FloatAttack.h b/src/melee/ft/chara/ftPeach/ftPe_FloatAttack.h index 7851c305cc..49c39e4efd 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_FloatAttack.h +++ b/src/melee/ft/chara/ftPeach/ftPe_FloatAttack.h @@ -2,6 +2,7 @@ #define GALE01_11BF88 #include + #include /* 11BE80 */ bool ftPe_8011BE80(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftPeach/ftPe_FloatFall.c b/src/melee/ft/chara/ftPeach/ftPe_FloatFall.c index ae2da1c158..f599096b2d 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_FloatFall.c +++ b/src/melee/ft/chara/ftPeach/ftPe_FloatFall.c @@ -1,4 +1,5 @@ #include + #include #include "ftPe_FloatFall.h" diff --git a/src/melee/ft/chara/ftPeach/ftPe_Init.c b/src/melee/ft/chara/ftPeach/ftPe_Init.c index 2bb510ed66..2baa0738e1 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_Init.c +++ b/src/melee/ft/chara/ftPeach/ftPe_Init.c @@ -1,4 +1,6 @@ #include +#include + #include "ftCommon/forward.h" #include "it/forward.h" @@ -23,8 +25,6 @@ #include "it/it_26B1.h" #include "lb/lbmthp.h" -#include - MotionState ftPe_Init_MotionStateTable[ftPe_MS_SelfCount] = { { // ftPe_MS_Float = 341 diff --git a/src/melee/ft/chara/ftPeach/ftPe_Init.h b/src/melee/ft/chara/ftPeach/ftPe_Init.h index 2609886f0a..5cdd6d5b1b 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_Init.h +++ b/src/melee/ft/chara/ftPeach/ftPe_Init.h @@ -2,6 +2,7 @@ #define GALE01_11B51C #include + #include "ftPeach/forward.h" #include diff --git a/src/melee/ft/chara/ftPeach/ftPe_SpecialHi.c b/src/melee/ft/chara/ftPeach/ftPe_SpecialHi.c index e800ae47c9..805304ec57 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_SpecialHi.c +++ b/src/melee/ft/chara/ftPeach/ftPe_SpecialHi.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "it/forward.h" #include diff --git a/src/melee/ft/chara/ftPeach/ftPe_SpecialHi.h b/src/melee/ft/chara/ftPeach/ftPe_SpecialHi.h index 09bbc30650..a71d528e5e 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_SpecialHi.h +++ b/src/melee/ft/chara/ftPeach/ftPe_SpecialHi.h @@ -2,6 +2,7 @@ #define GALE01_11D72C #include + #include /* 11D518 */ bool ftPe_8011D518(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftPeach/ftPe_SpecialLw.c b/src/melee/ft/chara/ftPeach/ftPe_SpecialLw.c index 09619786c2..d568b1c3e5 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_SpecialLw.c +++ b/src/melee/ft/chara/ftPeach/ftPe_SpecialLw.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "it/forward.h" #include diff --git a/src/melee/ft/chara/ftPeach/ftPe_SpecialN.c b/src/melee/ft/chara/ftPeach/ftPe_SpecialN.c index f3d6cc2da7..f79dd7a0e4 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_SpecialN.c +++ b/src/melee/ft/chara/ftPeach/ftPe_SpecialN.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/melee/ft/chara/ftPeach/ftPe_SpecialS.c b/src/melee/ft/chara/ftPeach/ftPe_SpecialS.c index 09649f9276..1c7169c5f1 100644 --- a/src/melee/ft/chara/ftPeach/ftPe_SpecialS.c +++ b/src/melee/ft/chara/ftPeach/ftPe_SpecialS.c @@ -1,4 +1,5 @@ #include + #include #include "ftPe_SpecialS.h" diff --git a/src/melee/ft/chara/ftPeach/types.h b/src/melee/ft/chara/ftPeach/types.h index bf7c657f96..b7ec21b0c4 100644 --- a/src/melee/ft/chara/ftPeach/types.h +++ b/src/melee/ft/chara/ftPeach/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTPEACH_TYPES_H #include + #include "ft/forward.h" #include "ftPeach/forward.h" // IWYU pragma: export #include "it/forward.h" diff --git a/src/melee/ft/chara/ftPichu/ftPc_Init.c b/src/melee/ft/chara/ftPichu/ftPc_Init.c index e719522544..2b94872d03 100644 --- a/src/melee/ft/chara/ftPichu/ftPc_Init.c +++ b/src/melee/ft/chara/ftPichu/ftPc_Init.c @@ -1,4 +1,5 @@ #include + #include "ftPikachu/forward.h" #include "ftPc_Init.h" diff --git a/src/melee/ft/chara/ftPichu/ftPc_Init.h b/src/melee/ft/chara/ftPichu/ftPc_Init.h index 856c180037..945f828441 100644 --- a/src/melee/ft/chara/ftPichu/ftPc_Init.h +++ b/src/melee/ft/chara/ftPichu/ftPc_Init.h @@ -2,6 +2,7 @@ #define GALE01_149E34 #include + #include "ft/forward.h" #include "ftPikachu/forward.h" #include diff --git a/src/melee/ft/chara/ftPikachu/forward.h b/src/melee/ft/chara/ftPikachu/forward.h index a7b282dd05..d36a0df04f 100644 --- a/src/melee/ft/chara/ftPikachu/forward.h +++ b/src/melee/ft/chara/ftPikachu/forward.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTPIKACHU_FORWARD_H #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftPikachu/ftPk_Init.c b/src/melee/ft/chara/ftPikachu/ftPk_Init.c index 3914d26f6c..3d33fcb9dd 100644 --- a/src/melee/ft/chara/ftPikachu/ftPk_Init.c +++ b/src/melee/ft/chara/ftPikachu/ftPk_Init.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include diff --git a/src/melee/ft/chara/ftPikachu/ftPk_Init.h b/src/melee/ft/chara/ftPikachu/ftPk_Init.h index 80ae27cb42..ac2438b060 100644 --- a/src/melee/ft/chara/ftPikachu/ftPk_Init.h +++ b/src/melee/ft/chara/ftPikachu/ftPk_Init.h @@ -2,6 +2,7 @@ #define GALE01_1243AC #include + #include "ftPikachu/forward.h" #include diff --git a/src/melee/ft/chara/ftPikachu/ftPk_SpecialHi.c b/src/melee/ft/chara/ftPikachu/ftPk_SpecialHi.c index 948278d86f..e25991b9cd 100644 --- a/src/melee/ft/chara/ftPikachu/ftPk_SpecialHi.c +++ b/src/melee/ft/chara/ftPikachu/ftPk_SpecialHi.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftPk_SpecialHi.h" diff --git a/src/melee/ft/chara/ftPikachu/ftPk_SpecialHi.h b/src/melee/ft/chara/ftPikachu/ftPk_SpecialHi.h index 036dc9d885..2f140e2ce0 100644 --- a/src/melee/ft/chara/ftPikachu/ftPk_SpecialHi.h +++ b/src/melee/ft/chara/ftPikachu/ftPk_SpecialHi.h @@ -2,6 +2,7 @@ #define GALE01_125D80 #include + #include /* 125D80 */ void ftPk_SpecialHi_UpdateVel(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftPikachu/ftPk_SpecialLw.h b/src/melee/ft/chara/ftPikachu/ftPk_SpecialLw.h index e1c2f744dd..77d8666f80 100644 --- a/src/melee/ft/chara/ftPikachu/ftPk_SpecialLw.h +++ b/src/melee/ft/chara/ftPikachu/ftPk_SpecialLw.h @@ -2,6 +2,7 @@ #define GALE01_1275CC #include + #include /* 1275CC */ bool ftPk_SpecialLw_CheckProperty(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftPikachu/ftPk_SpecialS.c b/src/melee/ft/chara/ftPikachu/ftPk_SpecialS.c index 0d4f6b6934..afdd5355d9 100644 --- a/src/melee/ft/chara/ftPikachu/ftPk_SpecialS.c +++ b/src/melee/ft/chara/ftPikachu/ftPk_SpecialS.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/ft/chara/ftPikachu/types.h b/src/melee/ft/chara/ftPikachu/types.h index b84a81a438..c82f4b3e5c 100644 --- a/src/melee/ft/chara/ftPikachu/types.h +++ b/src/melee/ft/chara/ftPikachu/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTPIKACHU_TYPES_H #include + #include "ft/forward.h" #include "it/forward.h" diff --git a/src/melee/ft/chara/ftPopo/forward.h b/src/melee/ft/chara/ftPopo/forward.h index 97a1108f5d..6c9d0b869b 100644 --- a/src/melee/ft/chara/ftPopo/forward.h +++ b/src/melee/ft/chara/ftPopo/forward.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTPOPO_FORWARD_H #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftPopo/ftPp_Init.h b/src/melee/ft/chara/ftPopo/ftPp_Init.h index ce42737757..1144d83825 100644 --- a/src/melee/ft/chara/ftPopo/ftPp_Init.h +++ b/src/melee/ft/chara/ftPopo/ftPp_Init.h @@ -2,6 +2,7 @@ #define GALE01_11ED38 #include + #include "ftPopo/forward.h" #include diff --git a/src/melee/ft/chara/ftPopo/ftPp_SpecialN.c b/src/melee/ft/chara/ftPopo/ftPp_SpecialN.c index 6dec2feebe..31234e2a3e 100644 --- a/src/melee/ft/chara/ftPopo/ftPp_SpecialN.c +++ b/src/melee/ft/chara/ftPopo/ftPp_SpecialN.c @@ -1,4 +1,6 @@ #include +#include + #include "it/forward.h" #include @@ -21,7 +23,6 @@ #include "lb/lb_00B0.h" #include -#include #include /* 11F500 */ static void ftPp_SpecialN_8011F500(Fighter_GObj* gobj); diff --git a/src/melee/ft/chara/ftPopo/ftPp_SpecialS.c b/src/melee/ft/chara/ftPopo/ftPp_SpecialS.c index 7c02482a74..9958f3b31e 100644 --- a/src/melee/ft/chara/ftPopo/ftPp_SpecialS.c +++ b/src/melee/ft/chara/ftPopo/ftPp_SpecialS.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftPopo/forward.h" diff --git a/src/melee/ft/chara/ftPopo/types.h b/src/melee/ft/chara/ftPopo/types.h index 0457913141..9d7c2cbd2b 100644 --- a/src/melee/ft/chara/ftPopo/types.h +++ b/src/melee/ft/chara/ftPopo/types.h @@ -2,11 +2,11 @@ #define MELEE_FT_CHARA_FTPOPO_TYPES_H #include +#include + #include "ft/forward.h" #include "it/forward.h" -#include - struct ftPopo_FighterVars { /* 0x222C */ Item_GObj* x222C; /* 0x2230:0 */ u8 x2230_b0 : 1; diff --git a/src/melee/ft/chara/ftPurin/forward.h b/src/melee/ft/chara/ftPurin/forward.h index 27a1991477..8d4e85ba88 100644 --- a/src/melee/ft/chara/ftPurin/forward.h +++ b/src/melee/ft/chara/ftPurin/forward.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTPURIN_FORWARD_H #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftPurin/ftPr_Init.c b/src/melee/ft/chara/ftPurin/ftPr_Init.c index 2e26186c43..8ff4305806 100644 --- a/src/melee/ft/chara/ftPurin/ftPr_Init.c +++ b/src/melee/ft/chara/ftPurin/ftPr_Init.c @@ -1,3 +1,5 @@ +#include + #include "forward.h" #include "ftPr_Init.h" @@ -22,7 +24,6 @@ #include "it/it_26B1.h" #include -#include #include #include #include diff --git a/src/melee/ft/chara/ftPurin/ftPr_Init.h b/src/melee/ft/chara/ftPurin/ftPr_Init.h index afad6b9037..8daaca7e2e 100644 --- a/src/melee/ft/chara/ftPurin/ftPr_Init.h +++ b/src/melee/ft/chara/ftPurin/ftPr_Init.h @@ -2,6 +2,7 @@ #define GALE01_13C2F8 #include + #include "ftPurin/forward.h" #include #include diff --git a/src/melee/ft/chara/ftPurin/ftPr_SpecialHi.c b/src/melee/ft/chara/ftPurin/ftPr_SpecialHi.c index ddc6edf8a0..daa1474d6d 100644 --- a/src/melee/ft/chara/ftPurin/ftPr_SpecialHi.c +++ b/src/melee/ft/chara/ftPurin/ftPr_SpecialHi.c @@ -1,3 +1,5 @@ +#include + #include "forward.h" #include "ftPr_SpecialHi.h" @@ -18,7 +20,6 @@ #include "lb/types.h" #include -#include #include #include #include diff --git a/src/melee/ft/chara/ftPurin/ftPr_SpecialLw.c b/src/melee/ft/chara/ftPurin/ftPr_SpecialLw.c index 75fbd198ab..b3f8b2f947 100644 --- a/src/melee/ft/chara/ftPurin/ftPr_SpecialLw.c +++ b/src/melee/ft/chara/ftPurin/ftPr_SpecialLw.c @@ -1,3 +1,5 @@ +#include + #include "forward.h" #include "ftPr_SpecialLw.h" @@ -13,7 +15,6 @@ #include "ft/types.h" #include -#include #include #include #include diff --git a/src/melee/ft/chara/ftPurin/ftPr_SpecialN.c b/src/melee/ft/chara/ftPurin/ftPr_SpecialN.c index c5ad99655a..78b956557a 100644 --- a/src/melee/ft/chara/ftPurin/ftPr_SpecialN.c +++ b/src/melee/ft/chara/ftPurin/ftPr_SpecialN.c @@ -1,3 +1,5 @@ +#include + #include "forward.h" #include "ft/forward.h" @@ -17,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/src/melee/ft/chara/ftPurin/ftPr_SpecialS.c b/src/melee/ft/chara/ftPurin/ftPr_SpecialS.c index e5773da232..ab011e0903 100644 --- a/src/melee/ft/chara/ftPurin/ftPr_SpecialS.c +++ b/src/melee/ft/chara/ftPurin/ftPr_SpecialS.c @@ -1,3 +1,5 @@ +#include + #include "forward.h" #include "ft/forward.h" @@ -15,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/melee/ft/chara/ftPurin/types.h b/src/melee/ft/chara/ftPurin/types.h index c27f349f65..ceebff98c5 100644 --- a/src/melee/ft/chara/ftPurin/types.h +++ b/src/melee/ft/chara/ftPurin/types.h @@ -2,9 +2,10 @@ #define MELEE_FT_CHARA_FTPURIN_TYPES_H #include +#include + #include -#include #include struct ftPurin_FighterVars { diff --git a/src/melee/ft/chara/ftSamus/forward.h b/src/melee/ft/chara/ftSamus/forward.h index 3dd6d16ebf..781343dd43 100644 --- a/src/melee/ft/chara/ftSamus/forward.h +++ b/src/melee/ft/chara/ftSamus/forward.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTSAMUS_FORWARD_H #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftSamus/ftSs_Init.h b/src/melee/ft/chara/ftSamus/ftSs_Init.h index e1089e5e9f..86d31d6d6d 100644 --- a/src/melee/ft/chara/ftSamus/ftSs_Init.h +++ b/src/melee/ft/chara/ftSamus/ftSs_Init.h @@ -2,6 +2,7 @@ #define GALE01_12832C #include + #include "ftSamus/forward.h" #include diff --git a/src/melee/ft/chara/ftSamus/ftSs_SpecialHi.c b/src/melee/ft/chara/ftSamus/ftSs_SpecialHi.c index 92251a40d1..4037109c3b 100644 --- a/src/melee/ft/chara/ftSamus/ftSs_SpecialHi.c +++ b/src/melee/ft/chara/ftSamus/ftSs_SpecialHi.c @@ -1,4 +1,5 @@ #include + #include #include "ftSs_SpecialHi.h" diff --git a/src/melee/ft/chara/ftSamus/ftSs_SpecialN.c b/src/melee/ft/chara/ftSamus/ftSs_SpecialN.c index 7ee6749391..c9c10fe389 100644 --- a/src/melee/ft/chara/ftSamus/ftSs_SpecialN.c +++ b/src/melee/ft/chara/ftSamus/ftSs_SpecialN.c @@ -1,4 +1,5 @@ #include + #include #include "ftSs_SpecialN.h" diff --git a/src/melee/ft/chara/ftSamus/types.h b/src/melee/ft/chara/ftSamus/types.h index 400e68f1bf..0bc7218faf 100644 --- a/src/melee/ft/chara/ftSamus/types.h +++ b/src/melee/ft/chara/ftSamus/types.h @@ -2,12 +2,13 @@ #define MELEE_FT_CHARA_FTSAMUS_TYPES_H #include +#include + #include "it/forward.h" #include #include "ftCommon/types.h" -#include #include struct ftSamus_FighterVars { diff --git a/src/melee/ft/chara/ftSandbag/ftSb_Init.c b/src/melee/ft/chara/ftSandbag/ftSb_Init.c index 4588dd825e..8242c614c2 100644 --- a/src/melee/ft/chara/ftSandbag/ftSb_Init.c +++ b/src/melee/ft/chara/ftSandbag/ftSb_Init.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include "ftSb_Init.h" diff --git a/src/melee/ft/chara/ftSeak/forward.h b/src/melee/ft/chara/ftSeak/forward.h index 0b0c2e5a35..0e6949e325 100644 --- a/src/melee/ft/chara/ftSeak/forward.h +++ b/src/melee/ft/chara/ftSeak/forward.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTSEAK_FORWARD_H #include + #include "ft/forward.h" #include "ftCommon/forward.h" diff --git a/src/melee/ft/chara/ftSeak/ftSk_Init.h b/src/melee/ft/chara/ftSeak/ftSk_Init.h index b579256a70..ba6133bc22 100644 --- a/src/melee/ft/chara/ftSeak/ftSk_Init.h +++ b/src/melee/ft/chara/ftSeak/ftSk_Init.h @@ -2,6 +2,7 @@ #define GALE01_110094 #include + #include "ftSeak/forward.h" #include diff --git a/src/melee/ft/chara/ftSeak/ftSk_SpecialHi.c b/src/melee/ft/chara/ftSeak/ftSk_SpecialHi.c index 4d2047e210..e0ed965b7f 100644 --- a/src/melee/ft/chara/ftSeak/ftSk_SpecialHi.c +++ b/src/melee/ft/chara/ftSeak/ftSk_SpecialHi.c @@ -1,3 +1,5 @@ +#include + #include "ft/forward.h" #include "ftSeak/forward.h" @@ -11,7 +13,6 @@ #include "lb/lb_00B0.h" #include -#include #include /* 112F48 */ static void ftSk_SpecialHi_80112F48(Fighter_GObj* gobj); diff --git a/src/melee/ft/chara/ftSeak/ftSk_SpecialS.c b/src/melee/ft/chara/ftSeak/ftSk_SpecialS.c index d90364ef3e..7648b4f91d 100644 --- a/src/melee/ft/chara/ftSeak/ftSk_SpecialS.c +++ b/src/melee/ft/chara/ftSeak/ftSk_SpecialS.c @@ -1,3 +1,5 @@ +#include + #include "lb/forward.h" #include "ftSeak/ftSk_SpecialS.h" @@ -24,7 +26,6 @@ #include #include #include -#include #include /// @todo Fix common data struct diff --git a/src/melee/ft/chara/ftSeak/ftSk_SpecialS.h b/src/melee/ft/chara/ftSeak/ftSk_SpecialS.h index ea6a00bee7..0103478bef 100644 --- a/src/melee/ft/chara/ftSeak/ftSk_SpecialS.h +++ b/src/melee/ft/chara/ftSeak/ftSk_SpecialS.h @@ -2,6 +2,7 @@ #define GALE01_110490 #include + #include "ft/forward.h" #include #include diff --git a/src/melee/ft/chara/ftSeak/types.h b/src/melee/ft/chara/ftSeak/types.h index c2f11585c6..14d14f633b 100644 --- a/src/melee/ft/chara/ftSeak/types.h +++ b/src/melee/ft/chara/ftSeak/types.h @@ -2,10 +2,11 @@ #define MELEE_FT_CHARA_FTSEAK_TYPES_H #include +#include + #include "it/forward.h" #include -#include #include struct ftSeak_FighterVars { diff --git a/src/melee/ft/chara/ftYoshi/ftYs_Guard.c b/src/melee/ft/chara/ftYoshi/ftYs_Guard.c index cde1a755b9..1c549f7df5 100644 --- a/src/melee/ft/chara/ftYoshi/ftYs_Guard.c +++ b/src/melee/ft/chara/ftYoshi/ftYs_Guard.c @@ -1,3 +1,5 @@ +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include @@ -21,8 +23,6 @@ #include "ftCommon/ftCo_Pass.h" #include "ftYoshi/types.h" -#include - char ftYs_Init_DatFilename[] = "PlYs.dat"; char ftYs_Init_DataName[] = "ftDataYoshi"; char ftYs_Unk2_803CEAB0[] = "PlYsNr.dat"; diff --git a/src/melee/ft/chara/ftYoshi/ftYs_Guard.h b/src/melee/ft/chara/ftYoshi/ftYs_Guard.h index 06f55b50d4..8161c82a4c 100644 --- a/src/melee/ft/chara/ftYoshi/ftYs_Guard.h +++ b/src/melee/ft/chara/ftYoshi/ftYs_Guard.h @@ -2,6 +2,7 @@ #define GALE01_12C030 #include + #include "ftYoshi/forward.h" #include #include diff --git a/src/melee/ft/chara/ftYoshi/ftYs_Init.c b/src/melee/ft/chara/ftYoshi/ftYs_Init.c index d476f7c473..e983e21f1b 100644 --- a/src/melee/ft/chara/ftYoshi/ftYs_Init.c +++ b/src/melee/ft/chara/ftYoshi/ftYs_Init.c @@ -1,6 +1,8 @@ #undef __FILE__ #define __FILE__ "ftyoshi.c" +#include + #include "forward.h" #include "ft/forward.h" #include "ftCommon/forward.h" @@ -22,7 +24,6 @@ #include "ft/types.h" #include "it/it_26B1.h" -#include #include #include #include diff --git a/src/melee/ft/chara/ftYoshi/ftYs_Init.h b/src/melee/ft/chara/ftYoshi/ftYs_Init.h index d908db1d51..3c0b2e285d 100644 --- a/src/melee/ft/chara/ftYoshi/ftYs_Init.h +++ b/src/melee/ft/chara/ftYoshi/ftYs_Init.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTYOSHI_FTYOSHI1_H #include + #include "ft/forward.h" #include "ftCommon/forward.h" #include "ftYoshi/forward.h" diff --git a/src/melee/ft/chara/ftYoshi/ftYs_SpecialN.c b/src/melee/ft/chara/ftYoshi/ftYs_SpecialN.c index 34fca5b2ba..cf4737aa8b 100644 --- a/src/melee/ft/chara/ftYoshi/ftYs_SpecialN.c +++ b/src/melee/ft/chara/ftYoshi/ftYs_SpecialN.c @@ -1,13 +1,10 @@ -#include -#include "ft/forward.h" -#include "ftYoshi/forward.h" - -#include "ftYoshi/ftYs_SpecialN.h" +#include "ftYoshi/ftYs_SpecialN.static.h" #include "ft/fighter.h" #include "ft/ft_081B.h" #include "ft/ftcliffcommon.h" #include "ft/ftcommon.h" +#include "ft/inlines.h" #include "ft/types.h" #include "ftCommon/ftCo_CaptureYoshi.h" #include "it/items/it_2F2B.h" @@ -15,31 +12,7 @@ #include #include -bool ftYs_Unk3_803CED48[] = { - false, true, false, false, false, true, true, false, - false, true, true, true, false, true, true, -}; - -Vec4 ftYs_Unk3_803CED84 = { - 0.65, - 0.7, - 0.8, - 1, -}; - -Vec4 ftYs_Unk3_803CED94 = { - 1.1, - 1.35, - 1.3, - 1.2, -}; - -Vec3 ftYs_Unk3_803CEDA4[] = { - { 12, 0, -6 }, - { 6, 6, 6 }, -}; - -Vec3 const ftYs_Unk1_803B75C0 = { 0 }; +/* 3B75C0 */ Vec3 const ftYs_Unk1_803B75C0 = { 0 }; /// #ftYs_SpecialN_8012CD10 @@ -55,7 +28,12 @@ Vec3 const ftYs_Unk1_803B75C0 = { 0 }; /// #ftYs_SpecialN_8012CDB4 -/// #ftYs_SpecialN_8012CDD4 +HSD_Joint* ftYs_SpecialN_8012CDD4(ftYs_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftData* ca = fp->ft_data; + return ca->x48_items[3]; +} void ftYs_SpecialN_Enter(HSD_GObj* gobj) { diff --git a/src/melee/ft/chara/ftYoshi/ftYs_SpecialN.h b/src/melee/ft/chara/ftYoshi/ftYs_SpecialN.h index 0a72e30ead..f314c9eafd 100644 --- a/src/melee/ft/chara/ftYoshi/ftYs_SpecialN.h +++ b/src/melee/ft/chara/ftYoshi/ftYs_SpecialN.h @@ -2,11 +2,12 @@ #define GALE01_12CDE8 #include +#include + #include "ftYoshi/forward.h" #include #include -#include #include /* 12CD10 */ float ftYs_SpecialN_8012CD10(ftYs_GObj* gobj); diff --git a/src/melee/ft/chara/ftYoshi/ftYs_SpecialN.static.h b/src/melee/ft/chara/ftYoshi/ftYs_SpecialN.static.h new file mode 100644 index 0000000000..a8f24fc123 --- /dev/null +++ b/src/melee/ft/chara/ftYoshi/ftYs_SpecialN.static.h @@ -0,0 +1,24 @@ +#ifndef __GALE01_12CDE8 +#define __GALE01_12CDE8 + +#include + +#include "ftYs_SpecialN.h" // IWYU pragma: export + +/* 12CEE0 */ static void fn_8012CEE0(HSD_GObj*); +/* 12CF7C */ static void fn_8012CF7C(HSD_GObj*); +/* 12DF00 */ static void ftYs_SpecialS_8012DF00(HSD_GObj*); +/* 12E644 */ static void fn_8012E644(HSD_GObj*); +/* 12EAD8 */ static void ftYs_SpecialS_8012EAD8(HSD_GObj*); +/* 3CED48 */ static bool ftYs_Unk3_803CED48[] = { + false, true, false, false, false, true, true, false, + false, true, true, true, false, true, true, +}; +/* 3CED84 */ static Vec4 ftYs_Unk3_803CED84 = { 0.65, 0.7, 0.8, 1 }; +/* 3CED94 */ static Vec4 ftYs_Unk3_803CED94 = { 1.1, 1.35, 1.3, 1.2 }; +/* 3CEDA4 */ static Vec3 ftYs_Unk3_803CEDA4[] = { + { 12, 0, -6 }, + { 6, 6, 6 }, +}; + +#endif diff --git a/src/melee/ft/chara/ftYoshi/types.h b/src/melee/ft/chara/ftYoshi/types.h index ce460b5424..f82d99d743 100644 --- a/src/melee/ft/chara/ftYoshi/types.h +++ b/src/melee/ft/chara/ftYoshi/types.h @@ -2,7 +2,6 @@ #define MELEE_FT_CHARA_FTYOSHI_TYPES_H #include - #include struct ftYoshi_FighterVars { diff --git a/src/melee/ft/chara/ftZakoBoy/ftBo_Init.h b/src/melee/ft/chara/ftZakoBoy/ftBo_Init.h index 38e9da6cfb..6fe2d844d4 100644 --- a/src/melee/ft/chara/ftZakoBoy/ftBo_Init.h +++ b/src/melee/ft/chara/ftZakoBoy/ftBo_Init.h @@ -2,6 +2,7 @@ #define GALE01_14F1F0 #include + #include #include "ft/types.h" diff --git a/src/melee/ft/chara/ftZakoBoy/types.h b/src/melee/ft/chara/ftZakoBoy/types.h index de8c235638..bcc6fcb276 100644 --- a/src/melee/ft/chara/ftZakoBoy/types.h +++ b/src/melee/ft/chara/ftZakoBoy/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTZAKOBOY_TYPES_H #include + #include "ft/forward.h" struct ftZakoBoy_FighterVars { diff --git a/src/melee/ft/chara/ftZakoGirl/ftGl_Init.h b/src/melee/ft/chara/ftZakoGirl/ftGl_Init.h index 3ddc882e4b..7439b644d2 100644 --- a/src/melee/ft/chara/ftZakoGirl/ftGl_Init.h +++ b/src/melee/ft/chara/ftZakoGirl/ftGl_Init.h @@ -2,6 +2,7 @@ #define GALE01_14F418 #include + #include #include "ft/types.h" diff --git a/src/melee/ft/chara/ftZelda/ftZd_Init.h b/src/melee/ft/chara/ftZelda/ftZd_Init.h index f34ff1a1a0..00abf9d7d0 100644 --- a/src/melee/ft/chara/ftZelda/ftZd_Init.h +++ b/src/melee/ft/chara/ftZelda/ftZd_Init.h @@ -2,6 +2,7 @@ #define GALE01_1393AC #include + #include "ftZelda/forward.h" #include diff --git a/src/melee/ft/chara/ftZelda/ftZd_SpecialN.c b/src/melee/ft/chara/ftZelda/ftZd_SpecialN.c index 38b856e552..790b07b1fc 100644 --- a/src/melee/ft/chara/ftZelda/ftZd_SpecialN.c +++ b/src/melee/ft/chara/ftZelda/ftZd_SpecialN.c @@ -1,4 +1,5 @@ #include + #include #include "ftZd_SpecialN.h" diff --git a/src/melee/ft/chara/ftZelda/types.h b/src/melee/ft/chara/ftZelda/types.h index 5925d9060e..2aeeb082dc 100644 --- a/src/melee/ft/chara/ftZelda/types.h +++ b/src/melee/ft/chara/ftZelda/types.h @@ -2,6 +2,7 @@ #define MELEE_FT_CHARA_FTZELDA_TYPES_H #include + #include #include "lb/types.h" diff --git a/src/melee/ft/fighter.c b/src/melee/ft/fighter.c index 2f8ff068b3..5119d1fd75 100644 --- a/src/melee/ft/fighter.c +++ b/src/melee/ft/fighter.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include @@ -255,8 +256,8 @@ void Fighter_UnkInitReset_80067C98(Fighter* fp) fp->facing_dir1 = fp->facing_dir; fp->x34_scale.y = fp->x34_scale.x; - fp->x2220_flag.bits.b5 = 0; - fp->x2220_flag.bits.b6 = 0; + fp->x2220_flag.b5 = 0; + fp->x2220_flag.b6 = 0; fp->x200C = 0; fp->x2010 = 0; @@ -270,7 +271,7 @@ void Fighter_UnkInitReset_80067C98(Fighter* fp) fp->x221A_b6 = 0; fp->x221D_b2 = 0; fp->x221E_b7 = 0; - fp->x2220_flag.bits.b7 = 0; + fp->x2220_flag.b7 = 0; fp->x2221_b4 = 0; fp->x2221_b5 = 0; fp->x2221_b6 = 1; @@ -347,8 +348,8 @@ void Fighter_UnkInitReset_80067C98(Fighter* fp) fp->x1964 = 0; fp->dmg.x189C_unk_num_frames = 0; - fp->x2220_flag.bits.b3 = 0; - fp->x2220_flag.bits.b4 = 0; + fp->x2220_flag.b3 = 0; + fp->x2220_flag.b4 = 0; fp->dmg.x1914 = 0; fp->dmg.int_value = 0; @@ -762,7 +763,7 @@ void Fighter_UnkInitLoad_80068914(Fighter_GObj* gobj, struct S_TEMP1* argdata) fp->x221F_b3 = 0; - fp->x2220_flag.bits.b0 = 0; + fp->x2220_flag.b0 = 0; fp->x2221_b2 = 0; @@ -770,8 +771,8 @@ void Fighter_UnkInitLoad_80068914(Fighter_GObj* gobj, struct S_TEMP1* argdata) fp->x2229_b6 = 0; fp->x2229_b7 = 0; - fp->x222A_flag.bits.b0 = 0; - fp->x222A_flag.bits.b1 = 0; + fp->x222A_flag.b0 = 0; + fp->x222A_flag.b1 = 0; fp->x2228_b5 = 0; fp->x2228_b6 = 0; @@ -1011,7 +1012,7 @@ void Fighter_ChangeMotionState(Fighter_GObj* gobj, FtMotionId msid, if (fp->dmg.x18F4 != 0) { fp->dmg.x18F4 = 0; - fp->x2220_flag.bits.b4 = 0; + fp->x2220_flag.b4 = 0; } if ((flags & Ft_MF_Unk19) == 0) { @@ -1062,8 +1063,8 @@ void Fighter_ChangeMotionState(Fighter_GObj* gobj, FtMotionId msid, fp->x221F_b1 = 0; fp->x221E_b5 = 0; fp->x221E_b6 = 0; - fp->x2220_flag.bits.b3 = 0; - fp->x2220_flag.bits.b7 = 0; + fp->x2220_flag.b3 = 0; + fp->x2220_flag.b7 = 0; fp->x209C = 0; @@ -1496,15 +1497,15 @@ void Fighter_8006A360(Fighter_GObj* gobj) } } - if (fp->x2220_flag.bits.b5 || fp->x2220_flag.bits.b6) { + if (fp->x2220_flag.b5 || fp->x2220_flag.b6) { if (fp->x2008) { fp->x2008--; } if (fp->x2008 == 0) { - if (fp->x2220_flag.bits.b5) { + if (fp->x2220_flag.b5) { ftCo_800D1A8C(gobj); - } else if (fp->x2220_flag.bits.b6) { + } else if (fp->x2220_flag.b6) { ftCo_800D237C(gobj); } } @@ -2382,7 +2383,7 @@ void Fighter_procUpdate(Fighter_GObj* gobj) fp->x2225_b0 = 0; } } else { - if (!fp->x222A_flag.bits.b1 && !fp->x2228_b5) { + if (!fp->x222A_flag.b1 && !fp->x2228_b5) { // if position.y crossed 0.5*(stage.blastBottom+stage.cameraBottom) // + stage.crowdReactStart from above... if (fp->prev_pos.y >= Stage_CalcUnkCamY() && @@ -2657,8 +2658,8 @@ void Fighter_8006CDA4(Fighter* fp, s32 arg1, s32 arg2) hold_item_bool = 1; } - temp_bool = !((fp->x2220_flag.bits.b3 || fp->x2220_flag.bits.b4 || - ftCo_8008E984(fp))); + temp_bool = + !((fp->x2220_flag.b3 || fp->x2220_flag.b4 || ftCo_8008E984(fp))); vec = vec3_803B7494; if (fp->motion_id != 0x145 && (unsigned) fp->motion_id - 0x122 > 1 && diff --git a/src/melee/ft/fighter.h b/src/melee/ft/fighter.h index e1b1cfddb3..e0cd0071d9 100644 --- a/src/melee/ft/fighter.h +++ b/src/melee/ft/fighter.h @@ -2,13 +2,14 @@ #define GALE01_0679B0 #include +#include + #include #include #include "ft/inlines.h" // IWYU pragma: export #include "ft/types.h" -#include #include /* 0679B0 */ void Fighter_800679B0(void); diff --git a/src/melee/ft/forward.h b/src/melee/ft/forward.h index f54b1ba1e9..5e3cc9fa57 100644 --- a/src/melee/ft/forward.h +++ b/src/melee/ft/forward.h @@ -2,11 +2,11 @@ #define MELEE_FT_FORWARD_H #include +#include + #include #include -#include - #define FIGHTERVARS_SIZE 0xF8 typedef enum_t FtMotionId; diff --git a/src/melee/ft/ft_07C1.c b/src/melee/ft/ft_07C1.c index ef82a33317..87d988b95c 100644 --- a/src/melee/ft/ft_07C1.c +++ b/src/melee/ft/ft_07C1.c @@ -1,4 +1,6 @@ #include +#include + #include "it/forward.h" #include "lb/forward.h" @@ -13,7 +15,6 @@ #include "lb/lb_00B0.h" #include "lb/lbcollision.h" -#include #include void ft_8007C224(HSD_GObj* gobj); diff --git a/src/melee/ft/ft_07C6.c b/src/melee/ft/ft_07C6.c index 78753f91aa..c5e1ba5799 100644 --- a/src/melee/ft/ft_07C6.c +++ b/src/melee/ft/ft_07C6.c @@ -1,7 +1,7 @@ -#include "ft_07C6.h" - #include +#include "ft_07C6.h" + void ft_8007C630(HSD_GObj* gobj) { NOT_IMPLEMENTED; diff --git a/src/melee/ft/ft_081B.c b/src/melee/ft/ft_081B.c index f28945b6e8..69c9aabc6d 100644 --- a/src/melee/ft/ft_081B.c +++ b/src/melee/ft/ft_081B.c @@ -1,4 +1,6 @@ #include +#include + #include #include "ft/ft_081B.h" @@ -10,7 +12,6 @@ #include "mp/mpcoll.h" #include -#include #include void ft_80081B38(HSD_GObj* arg0) @@ -29,7 +30,7 @@ void ft_80081B38(HSD_GObj* arg0) temp_r31->coll_data.cur_topn = temp_r31->cur_pos; temp_r31->coll_data.prev_topn = temp_r31->coll_data.cur_topn; mpColl_80041EE4(temp_r30); - temp_r30->x34_flags.bits.b1234 = 1; + temp_r30->x34_flags.b1234 = 1; temp_r11 = temp_r31->parts; temp_r29 = temp_r31->ft_data->x44; mpColl_80042078( diff --git a/src/melee/ft/ft_081B.h b/src/melee/ft/ft_081B.h index 2946e8bc91..aa014fa86e 100644 --- a/src/melee/ft/ft_081B.h +++ b/src/melee/ft/ft_081B.h @@ -2,13 +2,13 @@ #define GALE01_081B38 #include +#include + #include "ftCommon/forward.h" #include #include "ft/types.h" -#include - /* 081B38 */ void ft_80081B38(Fighter_GObj* gobj); /* 081C88 */ void ft_80081C88(Fighter_GObj* dst_gobj, float scl_y); /* 081D0C */ GroundOrAir ft_80081D0C(Fighter_GObj* gobj); diff --git a/src/melee/ft/ft_0852.c b/src/melee/ft/ft_0852.c index 153806d739..dbd347e795 100644 --- a/src/melee/ft/ft_0852.c +++ b/src/melee/ft/ft_0852.c @@ -1,7 +1,8 @@ +#include + #include "ft/inlines.h" #include "ft/types.h" -#include #include #include diff --git a/src/melee/ft/ft_0877.h b/src/melee/ft/ft_0877.h index 7536035e7b..26b20188ec 100644 --- a/src/melee/ft/ft_0877.h +++ b/src/melee/ft/ft_0877.h @@ -1,13 +1,13 @@ #ifndef GALE01_0877F8 #define GALE01_0877F8 +#include + #include "ft/forward.h" #include #include "ft/types.h" -#include - /* 0877F8 */ s32 ft_800877F8(Fighter_GObj*, s32); /* 087818 */ s32 ft_80087818(Fighter_GObj*, s32); /* 087838 */ s32 ft_80087838(Fighter_GObj* gobj); diff --git a/src/melee/ft/ft_0881.h b/src/melee/ft/ft_0881.h index 3376face23..07090be4f1 100644 --- a/src/melee/ft/ft_0881.h +++ b/src/melee/ft/ft_0881.h @@ -2,12 +2,12 @@ #define GALE01_0881D8 #include +#include + #include "ft/forward.h" #include "ft/types.h" -#include - /* 0881D8 */ void ft_800881D8(Fighter* fp, int, int, int); /* 088328 */ void ft_80088328(Fighter* fp, int, int, int); /* 088478 */ void ft_80088478(Fighter*, int, int, int); diff --git a/src/melee/ft/ft_0BEC.c b/src/melee/ft/ft_0BEC.c index 8fc70dbb49..c0dc552920 100644 --- a/src/melee/ft/ft_0BEC.c +++ b/src/melee/ft/ft_0BEC.c @@ -1,4 +1,5 @@ #include + #include "ft/forward.h" #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/ft_0BEF.c b/src/melee/ft/ft_0BEF.c index 403105b0d4..784a410304 100644 --- a/src/melee/ft/ft_0BEF.c +++ b/src/melee/ft/ft_0BEF.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ft_0BEF.h" diff --git a/src/melee/ft/ft_0C31.c b/src/melee/ft/ft_0C31.c index 040aed99fa..62adf1bd2a 100644 --- a/src/melee/ft/ft_0C31.c +++ b/src/melee/ft/ft_0C31.c @@ -1,3 +1,5 @@ +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include @@ -21,7 +23,6 @@ #include "it/items/itlikelike.h" #include "pl/player.h" -#include #include #include diff --git a/src/melee/ft/ft_0C31.h b/src/melee/ft/ft_0C31.h index 49b3531b28..176ccfe1e3 100644 --- a/src/melee/ft/ft_0C31.h +++ b/src/melee/ft/ft_0C31.h @@ -1,12 +1,12 @@ #ifndef GALE01_0C31 #define GALE01_0C31 +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include -#include - /* 0C61B0 */ void ftCo_800C61B0(ftCo_GObj* gobj); /* 0C6370 */ void ftCo_Entry_Anim(ftCo_GObj* gobj); /* 0C63B4 */ void ftCo_Entry_IASA(ftCo_GObj* gobj); diff --git a/src/melee/ft/ft_0C88.c b/src/melee/ft/ft_0C88.c index 112d0c707d..b6ac78754d 100644 --- a/src/melee/ft/ft_0C88.c +++ b/src/melee/ft/ft_0C88.c @@ -1,16 +1,273 @@ +#include + #include "ft/inlines.h" #include "ft/types.h" -#include #include +/// #ftCo_800C884C + +/// #ftCo_800C88A0 + +/// #ftCo_800C88D4 + +/// #ftCo_800C89A0 + +/// #ftCo_800C8A64 + +/// #ftCo_800C8AF0 + void fn_800C8B1C(Fighter_GObj* gobj) { GET_FIGHTER(gobj)->smash_attrs.x2134_vibrateFrame = 0; } +/// #ftCo_800C8B2C + +void ftCo_800C8B60(Fighter* fp, s32 arg1, s8 arg2) +{ + fp->x2226_b5 = arg1; + fp->smash_attrs.x2134_vibrateFrame = arg2; +} + +/// #ftCo_800C8B74 + +/// #ftCo_DownSpot_Anim + void ftCo_DownSpot_IASA(Fighter_GObj* gobj) {} +/// #ftCo_DownSpot_Phys + +/// #ftCo_DownSpot_Coll + +/// #ftCo_800C8C84 + +/// #ftCo_800C8D00 + +/// #fn_800C8E40 + +/// #fn_800C8E74 + +/// #ftCo_800C8F6C + +/// #ftCo_800C8FC4 + +/// #ftCo_800C9034 + +/// #fn_800C9058 + +/// #ftCo_800C9078 + +/// #fn_800C9198 + +/// #ftCo_Barrel_Anim + +/// #ftCo_Barrel_IASA + void ftCo_Barrel_Phys(Fighter_GObj* gobj) {} void ftCo_Barrel_Coll(Fighter_GObj* gobj) {} + +/// #fn_800C9264 + +/// #fn_800C9290 + +/// #ftCo_800C92E4 + +/// #ftCo_Walk_CheckInput + +/// #ftCo_800C94B4 + +/// #fn_800C9528 + +/// #ftCo_Walk_Anim + +/// #ftCo_Walk_IASA + +/// #ftCo_Walk_Phys + +/// #ftCo_Walk_Coll + +/// #ftCo_800C97A8 + +/// #ftCo_Turn_CheckInput + +/// #ftCo_800C9840 + +/// #fn_800C98AC + +/// #ftCo_800C9924 + +/// #ftCo_Turn_Anim + +/// #ftCo_Turn_IASA + +/// #ftCo_Turn_Phys + +/// #ftCo_Turn_Coll + +/// #fn_800C9C2C + +/// #fn_800C9C74 + +/// #fn_800C9CEC + +/// #fn_800C9D40 + +/// #fn_800C9D94 + +/// #ftCo_TurnRun_Anim + +/// #ftCo_TurnRun_IASA + +/// #ftCo_TurnRun_Phys + +/// #ftCo_TurnRun_Coll + +/// #ftCo_Dash_CheckInput + +/// #fn_800CA120 + +/// #ftCo_Dash_Anim + +/// #ftCo_Dash_IASA + +/// #ftCo_Dash_Phys + +/// #ftCo_Dash_Coll + +/// #fn_800CA5F0 + +/// #fn_800CA644 + +/// #fn_800CA698 + +/// #fn_800CA6F4 + +/// #fn_800CA71C + +/// #ftCo_Run_Anim + +/// #ftCo_Run_IASA + +/// #ftCo_Run_Phys + +/// #ftCo_Run_Coll + +/// #ftCo_RunDirect_Anim + +/// #ftCo_RunDirect_IASA + +/// #ftCo_RunDirect_Phys + +/// #ftCo_RunDirect_Coll + +/// #fn_800CABC4 + +/// #fn_800CAC18 + +/// #ftCo_RunBrake_Anim + +/// #ftCo_RunBrake_IASA + +/// #ftCo_RunBrake_Phys + +/// #ftCo_RunBrake_Coll + +/// #ftCo_800CAE80 + +/// #ftCo_Jump_CheckInput + +/// #fn_800CAF78 + +/// #ftCo_800CB024 + +/// #ftCo_800CB110 + +/// #fn_800CB250 + +/// #ftCo_Jump_Anim + +/// #ftCo_Jump_IASA + +/// #ftCo_800CB438 + +/// #ftCo_Jump_Phys + +/// #ftCo_Jump_Coll + +/// #fn_800CB4E0 + +/// #ftCo_KneeBend_Anim + +/// #ftCo_800CB59C + +/// #ftCo_KneeBend_IASA + +/// #ftCo_KneeBend_Phys + +/// #ftCo_KneeBend_Coll + +/// #ft_800CB6EC + +/// #ft_800CB804 + +/// #ftCo_800CB870 + +/// #ftCo_800CB8E0 + +/// #ftCo_800CB950 + +/// #ftCo_800CBAC4 + +/// #ftCo_800CBBC0 + +/// #ftCo_800CBD18 + +/// #ftCo_800CBE98 + +/// #ftCo_800CC0E8 + +/// #ftCo_800CC238 + +/// #ftCo_JumpAerial_Anim + +/// #fn_800CC3C4 + +/// #ftCo_JumpAerial_IASA + +/// #ftCo_JumpAerial_Phys + +/// #fn_800CC654 + +/// #ftCo_800CC6C8 + +/// #ftCo_JumpAerial_Coll + +/// #ftCo_800CC730 + +/// #ftCo_800CC830 + +/// #ftCo_800CC8DC + +/// #ftCo_800CC988 + +/// #ftCo_Fall_Anim + +/// #ftCo_800CCAAC + +/// #ftCo_800CCBE0 + +/// #ftCo_Fall_IASA + +/// #ftCo_Fall_Phys + +/// #ftCo_Fall_Coll + +/// #ftCo_800CCDA8 + +/// #ftCo_FallAerial_Anim + +/// #ftCo_FallAerial_IASA + +/// #ftCo_FallAerial_Phys diff --git a/src/melee/ft/ft_0C88.h b/src/melee/ft/ft_0C88.h index 16cfe9de77..bd8d8701ef 100644 --- a/src/melee/ft/ft_0C88.h +++ b/src/melee/ft/ft_0C88.h @@ -1,11 +1,11 @@ #ifndef GALE01_0928CC #define GALE01_0928CC +#include + #include "ft/forward.h" #include "ftCommon/forward.h" -#include - /* 0C884C */ void ftCo_800C884C(ftCo_GObj* gobj); /* 0C88A0 */ void ftCo_800C88A0(Fighter*); /* 0C88D4 */ void ftCo_800C88D4(ftCo_GObj* gobj, int, bool); diff --git a/src/melee/ft/ft_0CD1.h b/src/melee/ft/ft_0CD1.h index 8b08ca747c..607526933d 100644 --- a/src/melee/ft/ft_0CD1.h +++ b/src/melee/ft/ft_0CD1.h @@ -1,10 +1,10 @@ #ifndef GALE01_0CD140 #define GALE01_0CD140 -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 0CD140 */ UNK_RET ftCo_800CD140(UNK_PARAMS); /* 0CD1BC */ UNK_RET ftCo_800CD1BC(UNK_PARAMS); /* 0CD204 */ UNK_RET ftCo_800CD204(UNK_PARAMS); diff --git a/src/melee/ft/ft_0CDD.h b/src/melee/ft/ft_0CDD.h index 36478d73c7..8b8c73a1c2 100644 --- a/src/melee/ft/ft_0CDD.h +++ b/src/melee/ft/ft_0CDD.h @@ -1,10 +1,10 @@ #ifndef GALE01_0CDD14 #define GALE01_0CDD14 -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 0CDD14 */ void ftCo_Attack_800CDD14(ftCo_GObj* gobj); /* 0CDDA0 */ void ftCo_800CDDA0(Fighter_GObj*); /* 0CDE18 */ void ftCo_800CDE18(Fighter_GObj*); diff --git a/src/melee/ft/ft_0CEE.h b/src/melee/ft/ft_0CEE.h index a392deed03..74e2696e9d 100644 --- a/src/melee/ft/ft_0CEE.h +++ b/src/melee/ft/ft_0CEE.h @@ -2,10 +2,10 @@ #define GALE01_0CEE70 #include -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 0CEE70 */ bool ftCo_800CEE70(ftCo_GObj* gobj); /* 0CEF08 */ UNK_RET ft_800CEF08(UNK_PARAMS); /* 0CEFE0 */ void ftCo_800CEFE0(ftCo_GObj* gobj, int); diff --git a/src/melee/ft/ft_0D14.h b/src/melee/ft/ft_0D14.h index 49b932f5dc..501dcc65c2 100644 --- a/src/melee/ft/ft_0D14.h +++ b/src/melee/ft/ft_0D14.h @@ -2,13 +2,13 @@ #define GALE01_0D14E4 #include +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include #include -#include - /* 0D14E4 */ void ftCo_800D14E4(ftCo_GObj* gobj); /* 0D15D0 */ UNK_RET ftCo_800D15D0(UNK_PARAMS); /* 0D170C */ UNK_RET ftCo_800D170C(UNK_PARAMS); diff --git a/src/melee/ft/ftaction.c b/src/melee/ft/ftaction.c index f8a74af637..790ad6a652 100644 --- a/src/melee/ft/ftaction.c +++ b/src/melee/ft/ftaction.c @@ -1,4 +1,6 @@ #include +#include + #include "ftCommon/forward.h" #include @@ -22,7 +24,6 @@ #include "lb/lbcommand.h" #include "lb/types.h" -#include #include #include #include diff --git a/src/melee/ft/ftafterimage.c b/src/melee/ft/ftafterimage.c index b475e565d8..3e53cb3cd2 100644 --- a/src/melee/ft/ftafterimage.c +++ b/src/melee/ft/ftafterimage.c @@ -1,7 +1,7 @@ -#include "ftafterimage.h" - #include +#include "ftafterimage.h" + /* literal */ char ftCo_803C6BD8[] = "no afterimage item!\n"; /* literal */ char ftCo_803C6BF0[] = "ftafterimage.c"; /* literal */ SDATA char ftCo_804D3C30[] = "0"; diff --git a/src/melee/ft/ftanim.h b/src/melee/ft/ftanim.h index 8adca39223..701b37795c 100644 --- a/src/melee/ft/ftanim.h +++ b/src/melee/ft/ftanim.h @@ -1,12 +1,12 @@ #ifndef GALE01_06DBF4 #define GALE01_06DBF4 +#include + #include "ft/forward.h" #include "it/forward.h" #include -#include - /* 06FE08 */ void ftAnim_8006FE08(Fighter* fp, bool); /* 06DE00 */ void ftAnim_GetNextJointInTree(HSD_Joint** pjoint, s32* pdepth); /* 06E9B4 */ void ftAnim_8006E9B4(Fighter_GObj*); diff --git a/src/melee/ft/ftattacks4combo.h b/src/melee/ft/ftattacks4combo.h index f4e24547cb..2b7710583f 100644 --- a/src/melee/ft/ftattacks4combo.h +++ b/src/melee/ft/ftattacks4combo.h @@ -1,10 +1,10 @@ #ifndef GALE01_0CECE8 #define GALE01_0CECE8 -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 0CECE8 */ bool ftCo_800CECE8(ftCo_GObj* gobj); /* 0CED30 */ UNK_RET ftCo_800CED30(UNK_PARAMS); /* 0CEDE0 */ void ftCo_AttackS42_Anim(ftCo_GObj* gobj); diff --git a/src/melee/ft/ftbosslib.h b/src/melee/ft/ftbosslib.h index 7bbe90b808..3d7193a014 100644 --- a/src/melee/ft/ftbosslib.h +++ b/src/melee/ft/ftbosslib.h @@ -2,6 +2,7 @@ #define GALE01_15BD20 #include + #include "ft/forward.h" #include "ftMasterHand/forward.h" #include diff --git a/src/melee/ft/ftchangeparam.h b/src/melee/ft/ftchangeparam.h index 364585db5e..51e97ebf97 100644 --- a/src/melee/ft/ftchangeparam.h +++ b/src/melee/ft/ftchangeparam.h @@ -1,10 +1,10 @@ #ifndef GALE01_0CF138 #define GALE01_0CF138 -#include "ft/forward.h" - #include +#include "ft/forward.h" + /* 0CF138 */ float ftCo_CalcYScaledKnockback(float*, float, float, float); /* 0CF6E8 */ UNK_RET ftCo_800CF6E8(UNK_PARAMS); /* 0D0CBC */ UNK_RET ftCo_800D0CBC(UNK_PARAMS); diff --git a/src/melee/ft/ftcliffcommon.c b/src/melee/ft/ftcliffcommon.c index fb13891616..da1b29059b 100644 --- a/src/melee/ft/ftcliffcommon.c +++ b/src/melee/ft/ftcliffcommon.c @@ -1,4 +1,5 @@ #include + #include #include "ft/ftcliffcommon.h" diff --git a/src/melee/ft/ftcolanim.h b/src/melee/ft/ftcolanim.h index df7f35f47d..685643864d 100644 --- a/src/melee/ft/ftcolanim.h +++ b/src/melee/ft/ftcolanim.h @@ -1,10 +1,10 @@ #ifndef GALE01_0BFE6C #define GALE01_0BFE6C -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 0BFE6C */ void ftCo_Sleep_Anim(ftCo_GObj* gobj); /* 0BFE70 */ void ftCo_Sleep_IASA(ftCo_GObj* gobj); /* 0BFFAC */ void ftCo_800BFFAC(Fighter* fp); diff --git a/src/melee/ft/ftcoll.c b/src/melee/ft/ftcoll.c index 9a0dbe8b25..053486d5be 100644 --- a/src/melee/ft/ftcoll.c +++ b/src/melee/ft/ftcoll.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include "it/forward.h" #include "lb/forward.h" @@ -28,7 +30,6 @@ #include #include -#include #include #include #include @@ -837,7 +838,7 @@ void ftColl_80078A2C(Fighter_GObj* this_gobj) if (ftLib_80086FD4(this_gobj, victim_gobj) == false) { victim_fp = victim_gobj->user_data; if (((!(victim_fp->x2219_b1)) && - ((!victim_fp->x222A_flag.bits.b0) && + ((!victim_fp->x222A_flag.b0) && ((gm_8016B168() == false) || (gm_8016B0D4() != false) || ((u8) victim_fp->team != (u8) this_fp->team)) && ((int) victim_fp->x1988 == 0) && diff --git a/src/melee/ft/ftcoll.h b/src/melee/ft/ftcoll.h index da04f4ba69..6500fc7cd0 100644 --- a/src/melee/ft/ftcoll.h +++ b/src/melee/ft/ftcoll.h @@ -2,13 +2,14 @@ #define GALE01_0763C0 #include +#include + #include "ft/forward.h" #include "ftCommon/forward.h" #include "it/forward.h" #include "lb/forward.h" #include -#include #include /* 0763C0 */ void ftColl_800763C0(Fighter_GObj* attacker, Fighter_GObj* victim, diff --git a/src/melee/ft/ftcommon.c b/src/melee/ft/ftcommon.c index cc5c221786..762341d0cb 100644 --- a/src/melee/ft/ftcommon.c +++ b/src/melee/ft/ftcommon.c @@ -1441,8 +1441,8 @@ void ftCommon_8007EFC8(HSD_GObj* gobj, void (*arg1)(HSD_GObj*)) if ((src->x198C = 2) && (src->x1990 != 0)) { ftColl_8007B760(dst_gobj, src->x1990); } - dst->x2220_flag.bits.b5 = src->x2220_flag.bits.b5; - dst->x2220_flag.bits.b6 = src->x2220_flag.bits.b6; + dst->x2220_flag.b5 = src->x2220_flag.b5; + dst->x2220_flag.b6 = src->x2220_flag.b6; dst->x2008 = src->x2008; ftLib_SetScale(dst_gobj, src->x34_scale.y); if (src->x2223_b7) { diff --git a/src/melee/ft/ftdata.c b/src/melee/ft/ftdata.c index c13ca090fc..332e0d3a8a 100644 --- a/src/melee/ft/ftdata.c +++ b/src/melee/ft/ftdata.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/ftdata.h b/src/melee/ft/ftdata.h index d2aea63d7f..e54b297941 100644 --- a/src/melee/ft/ftdata.h +++ b/src/melee/ft/ftdata.h @@ -2,13 +2,13 @@ #define GALE01_085560 #include +#include + #include "ft/forward.h" #include #include "ft/types.h" -#include - struct ftData_80086060_arg0 { u32 unk0; s32 unk4; diff --git a/src/melee/ft/ftdemo.c b/src/melee/ft/ftdemo.c index 838b00cc81..96926dede1 100644 --- a/src/melee/ft/ftdemo.c +++ b/src/melee/ft/ftdemo.c @@ -1,4 +1,5 @@ #include + #include "pl/forward.h" #include "ftdemo.h" @@ -47,7 +48,7 @@ static void initFighter(HSD_GObj* gobj, plAllocInfo2* alloc_info) struct S_TEMP1 temp1; temp1.fighterKind = alloc_info->internal_id; temp1.playerID = alloc_info->slot; - temp1.flags_b0 = alloc_info->bits.has_transformation; + temp1.flags_b0 = alloc_info->has_transformation; Fighter_UnkInitLoad_80068914(gobj, &temp1); } @@ -67,7 +68,7 @@ Fighter_GObj* ftDemo_CreateFighter(plAllocInfo2* alloc_info) fp->x24 = fp->ft_data->x14; fp->x28 = fp->ft_data->x18; efAsync_8006737C(ftData_UnkBytePerCharacter[fp->kind]); - if (!alloc_info->bits.b0) { + if (!alloc_info->b0) { ftData_80085820(fp->kind, fp->x619_costume_id); } else { ftData_800858E4(fp->kind, fp->x619_costume_id); diff --git a/src/melee/ft/ftdevice.c b/src/melee/ft/ftdevice.c index c8cddabdc3..62c3466455 100644 --- a/src/melee/ft/ftdevice.c +++ b/src/melee/ft/ftdevice.c @@ -1,8 +1,9 @@ +#include + #include "ftdevice.h" #include "ft/inlines.h" -#include #include #include diff --git a/src/melee/ft/ftdevice.h b/src/melee/ft/ftdevice.h index bb5145a0d6..b3c07853f6 100644 --- a/src/melee/ft/ftdevice.h +++ b/src/melee/ft/ftdevice.h @@ -2,11 +2,12 @@ #define GALE01_0C0658 #include +#include + #include #include "ft/types.h" -#include #include /* 0C0658 */ ftDeviceUnk2* ftCo_800C0658(Fighter* fp); diff --git a/src/melee/ft/ftdrawcommon.c b/src/melee/ft/ftdrawcommon.c index afb95a582f..28c09d949c 100644 --- a/src/melee/ft/ftdrawcommon.c +++ b/src/melee/ft/ftdrawcommon.c @@ -1,4 +1,5 @@ #include +#include #include "ft/ftdrawcommon.h" @@ -15,7 +16,6 @@ #include "lb/lbcollision.h" #include "lb/lbgx.h" -#include #include #include #include @@ -111,7 +111,7 @@ void ftDrawCommon_800805C8(HSD_GObj* gobj, s32 arg1, s32 arg2) fighter = gobj->user_data; phi_r30 = 0U; phi_r30 = 0U; - if (fighter->x21FC_flag.bits.b6 != 0) { + if (fighter->x21FC_flag.b6 != 0) { phi_r26 = fighter + 0x138 * 0; phi_r25 = 0U; do { @@ -196,7 +196,7 @@ void ftDrawCommon_800805C8(HSD_GObj* gobj, s32 arg1, s32 arg2) } } // phi_r30 = phi_r30; - if (fighter->x21FC_flag.bits.b5 != 0) { + if (fighter->x21FC_flag.b5 != 0) { phi_r25 = 0U; phi_r26 = fighter; phi_r25 = 0U; @@ -220,16 +220,15 @@ void ftDrawCommon_800805C8(HSD_GObj* gobj, s32 arg1, s32 arg2) phi_r26 += 0x18; } } - if ((fighter->x21FC_flag.bits.b3 != 0) && (ftCo_800B395C(gobj, arg1) != 0)) - { + if ((fighter->x21FC_flag.b3 != 0) && (ftCo_800B395C(gobj, arg1) != 0)) { phi_r30 = 1U; } - if ((fighter->x21FC_flag.bits.b4 != 0) && (fighter->x2223_b5 != 0) && + if ((fighter->x21FC_flag.b4 != 0) && (fighter->x2223_b5 != 0) && (lb_80014770(&fighter->dmg.x1930, arg1) != 0)) { phi_r30 = 1U; } - if (fighter->x21FC_flag.bits.b3 != 0) { + if (fighter->x21FC_flag.b3 != 0) { temp_r24 = &fighter->x294_itPickup; if (fighter->ground_or_air == 0) { if (lbGx_8001E2F8(&temp_r24->gr_light_offset, &fighter->cur_pos, @@ -251,13 +250,13 @@ void ftDrawCommon_800805C8(HSD_GObj* gobj, s32 arg1, s32 arg2) phi_r30 = 1U; } } - if ((fighter->x21FC_flag.bits.b2 != 0) && (fighter->x2227_b2 == 0) && + if ((fighter->x21FC_flag.b2 != 0) && (fighter->x2227_b2 == 0) && (lbColl_8000A044(&fighter->x1064_thrownHitbox, arg1, fighter->x34_scale.y) != 0)) { phi_r30 = 1U; } - if ((fighter->x21FC_flag.bits.b0 != 0) && (fighter->x2229_b4 == 0)) { + if ((fighter->x21FC_flag.b0 != 0) && (fighter->x2229_b4 == 0)) { phi_r26 = fighter + (0U * 0x2C); phi_r25 = 0U; do { @@ -274,7 +273,7 @@ void ftDrawCommon_800805C8(HSD_GObj* gobj, s32 arg1, s32 arg2) if (phi_r30 != 0U) { HSD_StateInvalidate(-1); } - if (fighter->x21FC_flag.bits.b7 != 0) { + if (fighter->x21FC_flag.b7 != 0) { if ((fighter->x221E_b0 == 0) && (fighter->x221E_b5 == 0) && (arg2 != 0)) { @@ -347,7 +346,7 @@ void ftDrawCommon_80080C28(HSD_GObj* gobj, int arg1) u8 pad1[0x18]; fighter = gobj->user_data; - if (fighter->x21FC_flag.bits.b7 != 0) { + if (fighter->x21FC_flag.b7 != 0) { if ((fighter->x221E_b0 == 0) && (fighter->x221E_b5 == 0) && (fighter->x2226_b5 == 0)) { @@ -424,7 +423,7 @@ void ftDrawCommon_80080E18(HSD_GObj* gobj, int arg1) switch (ret) { case 1: - if (fighter->x2220_flag.bits.b7) { + if (fighter->x2220_flag.b7) { fighter2 = gobj->user_data; jobj = (HSD_JObj*) gobj->hsd_obj; @@ -438,7 +437,7 @@ void ftDrawCommon_80080E18(HSD_GObj* gobj, int arg1) } if (fighter->x5C8 != NULL) { fighter = gobj->user_data; - if ((fighter->x21FC_flag.bits.b7) != 0) { + if ((fighter->x21FC_flag.b7) != 0) { if ((fighter->x221E_b0 == 0) && (fighter->x221E_b5 == 0) && (fighter->x2226_b5 == 0)) { @@ -459,7 +458,7 @@ void ftDrawCommon_80080E18(HSD_GObj* gobj, int arg1) } ftDrawCommon_800805C8(gobj, arg1, 1); fighter = gobj->user_data; - if (fighter->x21FC_flag.bits.b7 != 0) { + if (fighter->x21FC_flag.b7 != 0) { if ((fighter->x221E_b0 == 0) && (fighter->x221E_b5 == 0) && (fighter->x2226_b5 == 0)) { diff --git a/src/melee/ft/ftdynamics.c b/src/melee/ft/ftdynamics.c index f3d8306911..6b4e8df8c1 100644 --- a/src/melee/ft/ftdynamics.c +++ b/src/melee/ft/ftdynamics.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include "ftdynamics.h" @@ -11,7 +13,6 @@ #include "lb/lb_00B0.h" #include "lb/lb_00F9.h" -#include #include #include #include diff --git a/src/melee/ft/ftdynamics.h b/src/melee/ft/ftdynamics.h index cc24be81f7..7b1b28bd15 100644 --- a/src/melee/ft/ftdynamics.h +++ b/src/melee/ft/ftdynamics.h @@ -2,6 +2,7 @@ #define GALE01_09CB40 #include + #include "ft/forward.h" #include "ftCommon/forward.h" #include "ftKirby/forward.h" diff --git a/src/melee/ft/ftlib.c b/src/melee/ft/ftlib.c index d671f825ff..a998c5645b 100644 --- a/src/melee/ft/ftlib.c +++ b/src/melee/ft/ftlib.c @@ -500,7 +500,7 @@ bool ftLib_80086A58(HSD_GObj* gobj, S32Vec2* x) { Fighter* fp = GET_FIGHTER(gobj); - if (!fp->x2229_b3 && !fp->x2220_flag.bits.b7) { + if (!fp->x2229_b3 && !fp->x2220_flag.b7) { *x = fp->x2188; } @@ -512,7 +512,7 @@ bool ftLib_80086A8C(HSD_GObj* gobj) HSD_GObj* camera_gobj; Fighter* fp = GET_FIGHTER(gobj); - if (!fp->x2229_b3 && !fp->x2220_flag.bits.b7) { + if (!fp->x2229_b3 && !fp->x2220_flag.b7) { camera_gobj = Camera_80030A50(); if (camera_gobj != NULL) { HSD_CObj* temp_r30 = GET_COBJ(camera_gobj); @@ -652,7 +652,7 @@ bool ftLib_80086ED0(HSD_GObj* gobj) Fighter* fp = GET_FIGHTER(gobj); if (fp->x221E_b0 || fp->x221E_b2 || Player_GetMoreFlagsBit4(fp->player_id) || fp->x2228_b2 || - fp->x2229_b3 || fp->x2220_flag.bits.b7) + fp->x2229_b3 || fp->x2220_flag.b7) { return false; } diff --git a/src/melee/ft/ftlipstickswing.h b/src/melee/ft/ftlipstickswing.h index 3de9cba2ef..86634181d4 100644 --- a/src/melee/ft/ftlipstickswing.h +++ b/src/melee/ft/ftlipstickswing.h @@ -1,10 +1,10 @@ #ifndef GALE01_0CDAB4 #define GALE01_0CDAB4 -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 0CDAB4 */ UNK_RET ftCo_800CDAB4(UNK_PARAMS); /* 0CDB14 */ void ftCo_LipstickSwing_Anim(ftCo_GObj* gobj); /* 0CDB34 */ void ftCo_LipstickSwing_IASA(ftCo_GObj* gobj); diff --git a/src/melee/ft/ftmaterial.c b/src/melee/ft/ftmaterial.c index 80bcbbf757..24fd48e918 100644 --- a/src/melee/ft/ftmaterial.c +++ b/src/melee/ft/ftmaterial.c @@ -1,3 +1,5 @@ +#include + #include "ft/forward.h" #include "ftmaterial.h" @@ -11,7 +13,6 @@ #include "lb/lbrefract.h" #include "pl/player.h" -#include #include #include #include diff --git a/src/melee/ft/ftmaterial.h b/src/melee/ft/ftmaterial.h index 63a9d2203a..9cfe37872b 100644 --- a/src/melee/ft/ftmaterial.h +++ b/src/melee/ft/ftmaterial.h @@ -2,6 +2,7 @@ #define GALE01_0BF260 #include + #include "ft/forward.h" #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/ftmetal.h b/src/melee/ft/ftmetal.h index 64710b2c48..d8938311fc 100644 --- a/src/melee/ft/ftmetal.h +++ b/src/melee/ft/ftmetal.h @@ -2,10 +2,10 @@ #define GALE01_0C8170 #include -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 0C8170 */ UNK_RET ft_800C8170(UNK_PARAMS); /* 0C8348 */ void ftCo_800C8348(ftCo_GObj*, s32, s32); /* 0C8438 */ void ftCo_800C8438(ftCo_GObj* gobj); diff --git a/src/melee/ft/ftparts.c b/src/melee/ft/ftparts.c index 1b68dfc645..d92994d714 100644 --- a/src/melee/ft/ftparts.c +++ b/src/melee/ft/ftparts.c @@ -1,3 +1,5 @@ +#include + #include "ft/forward.h" #include "ft/ftparts.h" @@ -6,7 +8,6 @@ #include "ft/types.h" #include "lb/lbrefract.h" -#include #include #include #include diff --git a/src/melee/ft/ftparts.h b/src/melee/ft/ftparts.h index 0d6d0cda11..867a530b85 100644 --- a/src/melee/ft/ftparts.h +++ b/src/melee/ft/ftparts.h @@ -2,6 +2,7 @@ #define GALE01_0735BC #include + #include "ft/forward.h" #include "ftCommon/forward.h" #include diff --git a/src/melee/ft/ftstarrodswing.h b/src/melee/ft/ftstarrodswing.h index 92b9335e5b..8971ee3400 100644 --- a/src/melee/ft/ftstarrodswing.h +++ b/src/melee/ft/ftstarrodswing.h @@ -1,10 +1,10 @@ #ifndef GALE01_0CD82C #define GALE01_0CD82C -#include "ftCommon/forward.h" - #include +#include "ftCommon/forward.h" + /* 0CD82C */ UNK_RET ftCo_800CD82C(UNK_PARAMS); /* 0CD88C */ void ftCo_StarRodSwing_Anim(ftCo_GObj* gobj); /* 0CD8AC */ void ftCo_StarRodSwing_IASA(ftCo_GObj* gobj); diff --git a/src/melee/ft/ftswing.h b/src/melee/ft/ftswing.h index 0479cfb910..02d0264f7c 100644 --- a/src/melee/ft/ftswing.h +++ b/src/melee/ft/ftswing.h @@ -2,6 +2,7 @@ #define GALE01_0CCE94 #include + #include "ftCommon/forward.h" /* 0CCE94 */ void ftCo_FallAerial_Coll(ftCo_GObj* gobj); diff --git a/src/melee/ft/ftwaitanim.h b/src/melee/ft/ftwaitanim.h index acdbda69ed..c00a032872 100644 --- a/src/melee/ft/ftwaitanim.h +++ b/src/melee/ft/ftwaitanim.h @@ -1,11 +1,11 @@ #ifndef GALE01_08A698 #define GALE01_08A698 +#include + #include "ftCommon/forward.h" #include -#include - typedef struct WaitStruct { union { struct { diff --git a/src/melee/ft/ftwalljump.c b/src/melee/ft/ftwalljump.c index bda27d07e0..91cdf47004 100644 --- a/src/melee/ft/ftwalljump.c +++ b/src/melee/ft/ftwalljump.c @@ -1,4 +1,5 @@ #include + #include "ftCommon/forward.h" #include "ftwalljump.h" diff --git a/src/melee/ft/inlines.h b/src/melee/ft/inlines.h index fdd2841eb4..dee55000e8 100644 --- a/src/melee/ft/inlines.h +++ b/src/melee/ft/inlines.h @@ -2,6 +2,7 @@ #define MELEE_FT_INLINES_H #include + #include "ft/forward.h" #include "ft/ftanim.h" diff --git a/src/melee/ft/types.h b/src/melee/ft/types.h index 2816a2b644..f454ec571c 100644 --- a/src/melee/ft/types.h +++ b/src/melee/ft/types.h @@ -2,6 +2,8 @@ #define MELEE_FT_TYPES_H #include +#include + #include "ft/forward.h" // IWYU pragma: export #include "it/forward.h" #include @@ -37,7 +39,6 @@ #include "lb/types.h" #include -#include #include #define FTPART_INVALID 0xFF @@ -1623,7 +1624,7 @@ struct Fighter { /* fp+2220:5 */ u8 b5 : 1; /* fp+2220:6 */ u8 b6 : 1; /* fp+2220:7 */ u8 b7 : 1; - } bits; + }; /* fp+2220 */ u8 flags; } x2220_flag; /* fp+2221 */ union { diff --git a/src/melee/gm/forward.h b/src/melee/gm/forward.h index 821091cc07..e9273913b7 100644 --- a/src/melee/gm/forward.h +++ b/src/melee/gm/forward.h @@ -7,7 +7,7 @@ typedef struct gm_8017DB6C_arg0_t gm_8017DB6C_arg0_t; typedef struct gmMainLib_8015ED8C_arg0_t gmMainLib_8015ED8C_arg0_t; typedef struct Placeholder_8016AE38_flags Placeholder_8016AE38_flags; typedef struct Placeholder_8016AE38_flags_2 Placeholder_8016AE38_flags_2; -typedef struct Placeholder_8016AE38_ret_val Placeholder_8016AE38_ret_val; +typedef struct lbl_8046B6A0_t lbl_8046B6A0_t; typedef struct Placeholder_8016AE50_ret_val Placeholder_8016AE50_ret_val; #endif diff --git a/src/melee/gm/gm_1601.c b/src/melee/gm/gm_1601.c index 72b64e98d9..509e1999b9 100644 --- a/src/melee/gm/gm_1601.c +++ b/src/melee/gm/gm_1601.c @@ -1,13 +1,12 @@ -#include +#include -#include "gm_1601.h" +#include "gm_1601.static.h" #include "gmmain_lib.h" #include "cm/camera.h" #include "ef/efasync.h" #include "ef/eflib.h" -#include "gm/types.h" #include "gr/ground.h" #include "gr/stage.h" #include "it/item.h" @@ -15,53 +14,7 @@ #include "lb/lbtime.h" #include "mp/mpcoll.h" -#include - -struct lbl_8046B488_t { - /* +0 */ u8 _0[0x1E0]; -}; -STATIC_ASSERT(sizeof(struct lbl_8046B488_t) == 0x1E0); - -struct fn_80166CBC_arg0_t { - /* +0 */ u8 _0[0x5E]; - /* +5E */ u8 x5E; - /* +5F */ u8 _5F[0xA8 - 0x5F]; -}; -STATIC_ASSERT(sizeof(struct fn_80166CBC_arg0_t) == 0xA8); - -struct lbl_8046DBE8_t { - /* +0 */ u8 _0[0x94]; - /* +94 */ int x94; - /* +98 */ u8 _98[0x5A8 - 0x98]; -}; -STATIC_ASSERT(sizeof(struct lbl_8046DBE8_t) == 0x5A8); - -struct lbl_80472D28_t { - /* +0 */ u8 _0[0x104]; - /* +104 */ int x104; -}; - -static int lbl_80472EC8[4]; - -/* 166CBC */ static u8 fn_80166CBC(struct fn_80166CBC_arg0_t* arg0, - ssize_t index); -/* 174274 */ static int fn_80174274(void); -/* 17F294 */ static int fn_8017F294(void); -/* 3B75F8 */ static struct gmMainLib_8015ED8C_arg0_t lbl_803B75F8 = { 0 }; -/* 46B488 */ static struct lbl_8046B488_t lbl_8046B488; -/* 46B668 */ static UNK_T lbl_8046B668[14]; -/* 46B6A0 */ static Placeholder_8016AE38_ret_val lbl_8046B6A0; -/* 46DBD8 */ static UNK_T lbl_8046DBD8[4]; -/* 46DBE8 */ static struct lbl_8046DBE8_t lbl_8046DBE8; -/* 472C30 */ static UNK_T lbl_80472C30[32]; -/* 472CB0 */ static UNK_T lbl_80472CB0[30]; -/* 472D28 */ static struct lbl_80472D28_t lbl_80472D28; -/* 4771C4 */ static UNK_T gm_804771C4[349]; -/* 4D4190 */ static s32 lbl_804D4190 = 0xFFFFFFFF; -/* 4D6598 */ static s8 lbl_804D6598; -/* 4D65A0 */ static s8 lbl_804D65A0; - -#define NUM_UNLOCKABLE_CHARACTERS 11 +#include /// #gm_801601C4 @@ -95,7 +48,13 @@ static int lbl_80472EC8[4]; /// #fn_801607F4 -/// #fn_80160840 +u8 fn_80160840(u8 arg0) +{ + if (arg0 >= 4) { + return 4; + } + return arg0; +} /// #gm_80160854 @@ -510,16 +469,25 @@ UNK_T fn_80169364(void) return &lbl_8046B488; } -/// #gm_80169370 +u8 gm_80169370(s32 arg0) +{ + return lbl_8046B488.pad_0[arg0]; +} u8 gm_80169384(void) { return M2C_FIELD(&lbl_8046B488, u8*, 7); } -/// #gm_80169394 +s32 gm_80169394(void) +{ + return lbl_8046B488.unk_10_b3; +} -/// #fn_801693A8 +s32 fn_801693A8(void) +{ + return lbl_8046B488.unk_10_b2; +} /// #gm_801693BC @@ -569,7 +537,10 @@ UNK_T gm_80169540(void) /// #gm_8016A164 -/// #fn_8016A1E4 +s32 fn_8016A1E4(void) +{ + return lbl_8046B488.unk_10_b0; +} /// #gm_8016A1F8 @@ -625,52 +596,61 @@ UNK_T gm_8016A98C(void) /// #gm_8016AC44 -Placeholder_8016AE38_ret_val* gm_8016AE38(void) +lbl_8046B6A0_t* gm_8016AE38(void) { return &lbl_8046B6A0; } -Placeholder_8016AE38_ret_val* gm_8016AE44(void) +lbl_8046B6A0_t* gm_8016AE44(void) { return &lbl_8046B6A0; } -Placeholder_8016AE50_ret_val* gm_8016AE50(void) +Placeholder_8016AE38_flags_2* gm_8016AE50(void) { - return &M2C_FIELD(&lbl_8046B6A0, Placeholder_8016AE50_ret_val*, 0x24C8); + return &lbl_8046B6A0.unk24C8; } /// #fn_8016AE60 -/// #gm_8016AE80 +bool gm_8016AE80(void) +{ + return lbl_8046B6A0.unk_24D3; +} f32 gm_8016AE94(void) { - return M2C_FIELD(&lbl_8046B6A0, f32*, 0x34); + return lbl_8046B6A0.unk_34; } -/// #gm_8016AEA4 +u64 gm_8016AEA4(void) +{ + return lbl_8046B6A0.unk_24E8; +} s32 gm_8016AEB8(void) { - return M2C_FIELD(&lbl_8046B6A0, s32*, 0x24F0); + return lbl_8046B6A0.unk_24F0; } -/// #gm_8016AEC8 +bool gm_8016AEC8(void) +{ + return lbl_8046B6A0.unk_24D4; +} bool gm_8016AEDC(void) { - return M2C_FIELD(&lbl_8046B6A0, bool*, 0x24); + return lbl_8046B6A0.unk_24; } bool gm_8016AEEC(void) { - return M2C_FIELD(&lbl_8046B6A0, bool*, 0x28); + return lbl_8046B6A0.unk_28; } u16 gm_8016AEFC(void) { - return M2C_FIELD(&lbl_8046B6A0, u16*, 0x2C); + return lbl_8046B6A0.unk_2C; } /// #gm_8016AF0C @@ -679,7 +659,7 @@ u16 gm_8016AEFC(void) u16 gm_8016B004(void) { - return M2C_FIELD(&lbl_8046B6A0, u16*, 0x24D6); + return lbl_8046B6A0.unk_24D6; } /// #gm_8016B014 @@ -688,17 +668,35 @@ u16 gm_8016B004(void) /// #gm_8016B0B4 -/// #gm_8016B0D4 +bool gm_8016B0D4(void) +{ + return lbl_8046B6A0.unk24C8.x1_b7; +} -/// #gm_8016B0E8 +bool gm_8016B0E8(void) +{ + return lbl_8046B6A0.unk_24CC_b2; +} -/// #gm_8016B0FC +bool gm_8016B0FC(void) +{ + return lbl_8046B6A0.unk24C8.x2_b3; +} -/// #gm_8016B110 +bool gm_8016B110(void) +{ + return lbl_8046B6A0.unk24C8.x0_b7; +} -/// #gm_8016B124 +bool gm_8016B124(void) +{ + return lbl_8046B6A0.unk24C8.x2_b1; +} -/// #fn_8016B138 +void fn_8016B138(void) +{ + lbl_8046B6A0.unk_24D0 = 0; +} /// #gm_8016B14C @@ -708,9 +706,15 @@ u16 gm_8016B004(void) /// #gm_8016B1A8 -/// #gm_8016B1C4 +bool gm_8016B1C4(void) +{ + return lbl_8046B6A0.unk_24CD_b2; +} -/// #gm_8016B1D8 +bool gm_8016B1D8(void) +{ + return lbl_8046B6A0.unk_24CD_b3; +} /// #gm_8016B1EC @@ -718,12 +722,12 @@ u16 gm_8016B004(void) bool gm_8016B238(void) { - return M2C_FIELD(&lbl_8046B6A0, u8*, 0x24CE); + return lbl_8046B6A0.unk_24CE; } f32 gm_8016B248(void) { - return M2C_FIELD(&lbl_8046B6A0, f32*, 0x24F8); + return lbl_8046B6A0.unk_24F8; } /// #gm_8016B258 @@ -732,13 +736,25 @@ f32 gm_8016B248(void) /// #gm_8016B2C8 -/// #gm_8016B328 +void gm_8016B328(void) +{ + M2C_FIELD(&lbl_8046B6A0, s8*, 6) = 1; +} -/// #gm_8016B33C +void gm_8016B33C(s32 arg0) +{ + M2C_FIELD(&lbl_8046B6A0, s8*, 0xB) = arg0 + 1; +} -/// #gm_8016B350 +void gm_8016B350(s32 arg0) +{ + lbl_8046B6A0.unk_10 = arg0 + 1; +} -/// #gm_8016B364 +void gm_8016B364(s32 arg0) +{ + lbl_8046B6A0.unk_14 = arg0 + 1; +} void gm_8016B378(s8 arg0) { @@ -1337,7 +1353,12 @@ s32 gm_8017BE84(u32 arg0) /// #fn_8017D9C0 -/// #gm_8017DB58 +void gm_8017DB58(void* arg0) +{ + M2C_FIELD(arg0, s8*, 0) = 0x21; + M2C_FIELD(arg0, s8*, 0xC) = 0x21; + M2C_FIELD(arg0, s8*, 0x18) = 0x21; +} u8 gm_8017DB6C(gm_8017DB6C_arg0_t* arg0, ssize_t index) { @@ -1508,9 +1529,11 @@ s32 gm_80180AE4(void) /// #gm_80181998 -/// #gm_80181A00 - -static u8 lbl_80473594[0x14]; +void gm_80181A00(s32 arg0, s32 arg1) +{ + lbl_80472E48.unk_4 = arg0; + lbl_80472E48.unk_8 = arg1; +} u8 gm_80181A14(void) { @@ -1739,7 +1762,10 @@ void fn_80187714(void) /// #fn_8018F310 -/// #fn_8018F3BC +u8 fn_8018F3BC(s32 arg0) +{ + return M2C_FIELD(&lbl_803D9D20.pad_0[arg0], u8*, 0x59); +} /// #fn_8018F3D0 @@ -1806,7 +1832,11 @@ void fn_8018FBD8(void* arg0, s32 arg1) /// #fn_80190480 -/// #fn_801904D0 +void fn_801904D0(void) +{ + HSD_CObjSetInterest(lbl_803D9D20.cobj, &lbl_803D9D20.interest); + HSD_CObjSetEyePosition(lbl_803D9D20.cobj, &lbl_803D9D20.eye_position); +} /// #fn_80190520 diff --git a/src/melee/gm/gm_1601.h b/src/melee/gm/gm_1601.h index c11b651c04..0b0b2ba5a3 100644 --- a/src/melee/gm/gm_1601.h +++ b/src/melee/gm/gm_1601.h @@ -2,10 +2,10 @@ #define GALE01_1601C4 #include -#include "gm/forward.h" - #include +#include "gm/forward.h" + /* 1601C4 */ UNK_RET gm_801601C4(UNK_PARAMS); /* 160244 */ UNK_RET gm_80160244(UNK_PARAMS); /* 1602C0 */ UNK_RET gm_801602C0(UNK_PARAMS); @@ -22,7 +22,6 @@ /* 16075C */ UNK_RET gm_8016075C(UNK_PARAMS); /* 1607A8 */ UNK_RET fn_801607A8(UNK_PARAMS); /* 1607F4 */ UNK_RET fn_801607F4(UNK_PARAMS); -/* 160840 */ UNK_RET fn_80160840(UNK_PARAMS); /* 160854 */ void gm_80160854(void); /* 160968 */ bool gm_80160968(void); /* 160980 */ UNK_RET gm_80160980(UNK_PARAMS); @@ -189,10 +188,9 @@ /* 169290 */ UNK_RET gm_80169290(UNK_PARAMS); /* 1692BC */ UNK_RET gm_801692BC(UNK_PARAMS); /* 1692E8 */ void gm_801692E8(uint ticks, struct datetime* datetime); -/* 169370 */ UNK_RET gm_80169370(UNK_PARAMS); +/* 169370 */ u8 gm_80169370(s32); /* 169384 */ u8 gm_80169384(void); -/* 169394 */ UNK_RET gm_80169394(UNK_PARAMS); -/* 1693A8 */ UNK_RET fn_801693A8(UNK_PARAMS); +/* 169394 */ s32 gm_80169394(void); /* 1693BC */ UNK_RET gm_801693BC(UNK_PARAMS); /* 169434 */ void fn_80169434(s32 arg0); /* 169444 */ UNK_RET fn_80169444(UNK_PARAMS); @@ -211,7 +209,6 @@ /* 169F50 */ UNK_RET fn_80169F50(UNK_PARAMS); /* 16A09C */ UNK_RET fn_8016A09C(UNK_PARAMS); /* 16A164 */ UNK_RET gm_8016A164(UNK_PARAMS); -/* 16A1E4 */ UNK_RET fn_8016A1E4(UNK_PARAMS); /* 16A1F8 */ UNK_RET gm_8016A1F8(UNK_PARAMS); /* 16A21C */ void gm_8016A21C(UNK_T arg0); /* 16A22C */ UNK_RET gm_8016A22C(UNK_PARAMS); @@ -230,15 +227,15 @@ /* 16A998 */ UNK_RET gm_8016A998(UNK_PARAMS); /* 16A9E8 */ UNK_RET gm_8016A9E8(UNK_PARAMS); /* 16AC44 */ UNK_RET gm_8016AC44(UNK_PARAMS); -/* 16AE38 */ Placeholder_8016AE38_ret_val* gm_8016AE38(void); -/* 16AE44 */ Placeholder_8016AE38_ret_val* gm_8016AE44(void); -/* 16AE50 */ Placeholder_8016AE50_ret_val* gm_8016AE50(void); +/* 16AE38 */ lbl_8046B6A0_t* gm_8016AE38(void); +/* 16AE44 */ lbl_8046B6A0_t* gm_8016AE44(void); +/* 16AE50 */ Placeholder_8016AE38_flags_2* gm_8016AE50(void); /* 16AE60 */ UNK_RET fn_8016AE60(UNK_PARAMS); /* 16AE80 */ bool gm_8016AE80(void); /* 16AE94 */ f32 gm_8016AE94(void); -/* 16AEA4 */ u64 gm_8016AEA4(void); +// /* 16AEA4 */ s32 gm_8016AEA4(void); /* 16AEB8 */ s32 gm_8016AEB8(void); -/* 16AEC8 */ UNK_RET gm_8016AEC8(UNK_PARAMS); +/* 16AEC8 */ bool gm_8016AEC8(void); /* 16AEDC */ bool gm_8016AEDC(void); /* 16AEEC */ bool gm_8016AEEC(void); /* 16AEFC */ u16 gm_8016AEFC(void); @@ -249,10 +246,10 @@ /* 16B094 */ UNK_RET gm_8016B094(UNK_PARAMS); /* 16B0B4 */ bool gm_8016B0B4(void); /* 16B0D4 */ bool gm_8016B0D4(void); -/* 16B0E8 */ UNK_RET gm_8016B0E8(UNK_PARAMS); +/* 16B0E8 */ bool gm_8016B0E8(void); /* 16B0FC */ bool gm_8016B0FC(void); -/* 16B110 */ UNK_RET gm_8016B110(UNK_PARAMS); -/* 16B124 */ UNK_RET gm_8016B124(UNK_PARAMS); +/* 16B110 */ bool gm_8016B110(void); +/* 16B124 */ bool gm_8016B124(void); /* 16B138 */ UNK_RET fn_8016B138(UNK_PARAMS); /* 16B14C */ bool gm_8016B14C(void); /* 16B168 */ bool gm_8016B168(void); @@ -268,9 +265,9 @@ /* 16B274 */ UNK_RET gm_8016B274(UNK_PARAMS); /* 16B2C8 */ UNK_RET gm_8016B2C8(UNK_PARAMS); /* 16B328 */ UNK_RET gm_8016B328(UNK_PARAMS); -/* 16B33C */ UNK_RET gm_8016B33C(UNK_PARAMS); -/* 16B350 */ UNK_RET gm_8016B350(UNK_PARAMS); -/* 16B364 */ UNK_RET gm_8016B364(UNK_PARAMS); +/* 16B33C */ void gm_8016B33C(s32 arg0); +/* 16B350 */ void gm_8016B350(s32 arg0); +/* 16B364 */ void gm_8016B364(s32 arg0); /* 16B378 */ void gm_8016B378(s8 arg0); /* 16B388 */ UNK_RET fn_8016B388(UNK_PARAMS); /* 16B3A0 */ bool gm_8016B3A0(void); @@ -553,7 +550,7 @@ /* 17CE34 */ UNK_RET gm_8017CE34(UNK_PARAMS); /* 17D7AC */ UNK_RET gm_8017D7AC(UNK_PARAMS); /* 17D9C0 */ UNK_RET fn_8017D9C0(UNK_PARAMS); -/* 17DB58 */ UNK_RET gm_8017DB58(UNK_PARAMS); +/* 17DB58 */ void gm_8017DB58(void* arg0); /* 17DB6C */ u8 gm_8017DB6C(gm_8017DB6C_arg0_t* arg0, ssize_t index); /* 17DB78 */ u8 gm_8017DB78(gm_8017DB6C_arg0_t* arg0, ssize_t index); /* 17DB88 */ UNK_RET gm_8017DB88(UNK_PARAMS); @@ -627,7 +624,7 @@ /* 181598 */ UNK_RET fn_80181598(UNK_PARAMS); /* 181708 */ UNK_RET fn_80181708(UNK_PARAMS); /* 181998 */ UNK_RET gm_80181998(UNK_PARAMS); -/* 181A00 */ UNK_RET gm_80181A00(UNK_PARAMS); +/* 181A00 */ void gm_80181A00(s32 arg0, s32 arg1); /* 181A24 */ u16 gm_80181A24(void); /* 181A34 */ s32 gm_80181A34(void); /* 181A44 */ UNK_RET gm_80181A44(UNK_PARAMS); @@ -730,7 +727,7 @@ /* 18F00C */ UNK_RET fn_8018F00C(UNK_PARAMS); /* 18F1B0 */ UNK_RET gm_8018F1B0(UNK_PARAMS); /* 18F310 */ UNK_RET fn_8018F310(UNK_PARAMS); -/* 18F3BC */ UNK_RET fn_8018F3BC(UNK_PARAMS); +// /* 18F3BC */ UNK_RET fn_8018F3BC(UNK_PARAMS); /* 18F3D0 */ UNK_RET fn_8018F3D0(UNK_PARAMS); /* 18F410 */ UNK_RET fn_8018F410(UNK_PARAMS); /* 18F4A0 */ UNK_RET fn_8018F4A0(UNK_PARAMS); @@ -884,10 +881,4 @@ /* 1A1134 */ UNK_RET fn_801A1134(UNK_PARAMS); /* 473A18 */ extern UNK_T gm_80473A18; -/// @todo Move to C file - -/* 1736DC */ static UNK_T gm_801736DC(void); -// /* 166A8C */ static f32 fn_80166A8C(f32* arg0); -/* 169364 */ static UNK_T fn_80169364(void); - #endif diff --git a/src/melee/gm/gm_1601.static.h b/src/melee/gm/gm_1601.static.h new file mode 100644 index 0000000000..e3b229b1ad --- /dev/null +++ b/src/melee/gm/gm_1601.static.h @@ -0,0 +1,92 @@ +#ifndef __GALE01_1601C4 +#define __GALE01_1601C4 + +#include + +#include + +#include "gm_1601.h" // IWYU pragma: export + +#include "gm/types.h" + +struct lbl_8046B488_t { + /* 0x000 */ char pad_0[0x10]; + /* 0x010:0 */ u8 unk_10_b0 : 1; + /* 0x010:1 */ u8 unk_10_b1 : 1; + /* 0x010:2 */ u8 unk_10_b2 : 1; + /* 0x010:3 */ u8 unk_10_b3 : 1; + /* 0x010:4 */ u8 unk_10_b4 : 1; + /* 0x010:5 */ u8 unk_10_b5 : 1; + /* 0x010:6 */ u8 unk_10_b6 : 1; + /* 0x010:7 */ u8 unk_10_b7 : 1; + /* 0x011 */ char pad_11[0x1CF]; /* maybe part of unk_10[0x1D0]? */ +}; /* size = 0x1E0 */ +STATIC_ASSERT(sizeof(struct lbl_8046B488_t) == 0x1E0); + +struct fn_80166CBC_arg0_t { + /* +0 */ char pad_0[0x5E]; + /* +5E */ u8 x5E; + /* +5F */ char pad_5F[0xA8 - 0x5F]; +}; +STATIC_ASSERT(sizeof(struct fn_80166CBC_arg0_t) == 0xA8); + +struct lbl_8046DBE8_t { + /* +0 */ char pad_0[0x94]; + /* +94 */ int x94; + /* +98 */ char pad_98[0x5A8 - 0x98]; +}; +STATIC_ASSERT(sizeof(struct lbl_8046DBE8_t) == 0x5A8); + +struct lbl_80472D28_t { + /* +0 */ char pad_0[0x104]; + /* +104 */ int x104; +}; + +struct lbl_80472E48_t { + /* 0x00 */ char pad_0[4]; + /* 0x04 */ s32 unk_4; /* inferred */ + /* 0x08 */ s32 unk_8; /* inferred */ + /* 0x0C */ char pad_C[0x74]; /* maybe part of unk_8[0x1E]? */ +}; /* size = 0x80 */ +STATIC_ASSERT(sizeof(struct lbl_80472E48_t) == 0x80); + +struct lbl_803D9D20_t { + /* +0 */ char pad_0[0xB0]; + /* +B0 */ HSD_CObj* cobj; + /* +B4 */ char pad_B4[0xD8 - 0xB4]; + /* +D8 */ Vec3 eye_position; + /* +E4 */ char pad_E4[0xEC - 0xE4]; + /* +EC */ Vec3 interest; +}; + +/* 160840 */ static u8 fn_80160840(u8 arg0); +/* 166A8C */ static f32 fn_80166A8C(Vec3*, Vec3*); +/* 166CBC */ static u8 fn_80166CBC(struct fn_80166CBC_arg0_t* arg0, + ssize_t index); +/* 169364 */ static UNK_T fn_80169364(void); +/* 1693A8 */ static s32 fn_801693A8(void); +/* 16A1E4 */ static s32 fn_8016A1E4(void); +/* 1736DC */ static UNK_T gm_801736DC(void); +/* 174274 */ static int fn_80174274(void); +/* 17F294 */ static int fn_8017F294(void); +/* 3B75F8 */ static struct gmMainLib_8015ED8C_arg0_t lbl_803B75F8 = { 0 }; +/* 3D9D20 */ static struct lbl_803D9D20_t lbl_803D9D20; +/* 46B488 */ static struct lbl_8046B488_t lbl_8046B488; +/* 46B668 */ static UNK_T lbl_8046B668[14]; +/* 46B6A0 */ static lbl_8046B6A0_t lbl_8046B6A0; +/* 46DBD8 */ static UNK_T lbl_8046DBD8[4]; +/* 46DBE8 */ static struct lbl_8046DBE8_t lbl_8046DBE8; +/* 472C30 */ static UNK_T lbl_80472C30[32]; +/* 472CB0 */ static UNK_T lbl_80472CB0[30]; +/* 472D28 */ static struct lbl_80472D28_t lbl_80472D28; +/* 472E48 */ static struct lbl_80472E48_t lbl_80472E48; +/* 472EC8 */ static int lbl_80472EC8[4]; +/* 473594 */ static u8 lbl_80473594[0x14]; +/* 4771C4 */ static UNK_T gm_804771C4[349]; +/* 4D4190 */ static s32 lbl_804D4190 = 0xFFFFFFFF; +/* 4D6598 */ static s8 lbl_804D6598; +/* 4D65A0 */ static s8 lbl_804D65A0; + +#define NUM_UNLOCKABLE_CHARACTERS 11 + +#endif diff --git a/src/melee/gm/gm_1A36.c b/src/melee/gm/gm_1A36.c index 45ff31afc9..b95ac40cd3 100644 --- a/src/melee/gm/gm_1A36.c +++ b/src/melee/gm/gm_1A36.c @@ -1,4 +1,7 @@ -#include "gm_1A36__static.h" +#include + +#include "gm_1A36.static.h" + #include "gmmain_lib.h" #include "db/db_2253.h" @@ -11,7 +14,6 @@ #include "ty/toy.h" #include "un/un_2FC9.h" -#include #include #include #include @@ -158,9 +160,16 @@ UNK_T gm_801A4284(UNK_T arg0) return M2C_FIELD(arg0, UNK_T*, 0x14); } -/// #gm_801A428C +void gm_801A428C(u8 arg0) +{ + gm_80479D30.nums.curr_minor = arg0; + gm_80479D30.nums.prev_minor = arg0; +} -/// #gm_801A42A0 +void gm_801A42A0(s32 arg0) +{ + gm_80479D30.nums.pending_minor = arg0 + 1; +} u8 gm_801A42B4(void) { @@ -172,7 +181,10 @@ u8 gm_801A42C4(void) return gm_80479D30.nums.curr_minor; } -/// #gm_801A42D4 +void gm_801A42D4(void) +{ + gm_80479D30.pending = 1; +} void gm_801A42E8(s8 arg0) { @@ -309,7 +321,11 @@ u8 gm_801A4624(void) /// #gm_801A4970 -/// #gm_801A4B08 +void gm_801A4B08(s32 arg0, s32 arg1) +{ + gm_80479D58.unk_14 = arg0; + gm_80479D58.unk_18 = arg1; +} /// #gm_801A4B1C @@ -323,9 +339,15 @@ void gm_801A4B50(s32 arg0) M2C_FIELD(&gm_80479D58, s32*, 0x34) = arg0; } -/// #gm_801A4B60 +void gm_801A4B60(void) +{ + gm_80479D58.unk_C = 1; +} -/// #gm_801A4B74 +void gm_801A4B74(void) +{ + gm_80479D58.unk_C = 2; +} void gm_801A4B88(UNK_T arg0) { @@ -1101,7 +1123,10 @@ void fn_801B9FB8(void* arg0) /// #gm_801BA188 -/// #fn_801BA1B4 +void fn_801BA1B4(struct fn_801BA1B4_arg0_t* arg0) +{ + arg0->x2_b3 = true; +} /// #gm_801BA1C8 @@ -1127,7 +1152,10 @@ void fn_801B9FB8(void* arg0) /// #gm_801BA388 -/// #fn_801BA3B4 +void fn_801BA3B4(struct fn_801BA3B4_arg0_t* arg0) +{ + arg0->xC_b4 = true; +} /// #gm_801BA3C8 @@ -1404,20 +1432,35 @@ u8 gm_801BF050(void) /// #gm_801BF4DC -/// #gm_801BF634 +void gm_801BF634(s32 arg0, s8 arg1) +{ + gm_8049E548.pad_0[arg0] = arg1; +} -/// #gm_801BF648 +u8 gm_801BF648(s32 arg0) +{ + return gm_8049E548.pad_0[arg0]; +} -/// #gm_801BF65C +void gm_801BF65C(s32 arg0, s8 arg1) +{ + M2C_FIELD(&gm_8049E548.pad_0[arg0], s8*, 4) = arg1; +} -/// #gm_801BF670 +u8 gm_801BF670(s32 arg0) +{ + return M2C_FIELD(&gm_8049E548.pad_0[arg0], u8*, 4); +} void gm_801BF684(s16 arg0) { gm_8049E548.unk_C = arg0; } -/// #gm_801BF694 +u8 gm_801BF694(void) +{ + return gm_8049E548.unk_C; +} void gm_801BF6A8(s8 arg0) { diff --git a/src/melee/gm/gm_1A36.h b/src/melee/gm/gm_1A36.h index af0c5cb868..041e3d4c88 100644 --- a/src/melee/gm/gm_1A36.h +++ b/src/melee/gm/gm_1A36.h @@ -2,7 +2,6 @@ #define GALE01_1A3680 #include - #include /* 1A3680 */ UNK_RET gm_801A3680(UNK_PARAMS); @@ -384,7 +383,6 @@ /* 1BA138 */ UNK_RET gm_801BA138(UNK_PARAMS); /* 1BA160 */ UNK_RET gm_801BA160(UNK_PARAMS); /* 1BA188 */ UNK_RET gm_801BA188(UNK_PARAMS); -/* 1BA1B4 */ UNK_RET fn_801BA1B4(UNK_PARAMS); /* 1BA1C8 */ UNK_RET gm_801BA1C8(UNK_PARAMS); /* 1BA1FC */ UNK_RET gm_801BA1FC(UNK_PARAMS); /* 1BA224 */ UNK_RET gm_801BA224(UNK_PARAMS); @@ -397,7 +395,6 @@ /* 1BA338 */ UNK_RET gm_801BA338(UNK_PARAMS); /* 1BA360 */ UNK_RET gm_801BA360(UNK_PARAMS); /* 1BA388 */ UNK_RET gm_801BA388(UNK_PARAMS); -/* 1BA3B4 */ UNK_RET fn_801BA3B4(UNK_PARAMS); /* 1BA3C8 */ UNK_RET gm_801BA3C8(UNK_PARAMS); /* 1BA3FC */ UNK_RET gm_801BA3FC(UNK_PARAMS); /* 1BA424 */ UNK_RET gm_801BA424(UNK_PARAMS); @@ -507,7 +504,6 @@ /* 1BF648 */ UNK_RET gm_801BF648(UNK_PARAMS); /* 1BF65C */ UNK_RET gm_801BF65C(UNK_PARAMS); /* 1BF670 */ UNK_RET gm_801BF670(UNK_PARAMS); -/* 1BF694 */ UNK_RET gm_801BF694(UNK_PARAMS); /* 1BF6A8 */ UNK_RET gm_801BF6A8(UNK_PARAMS); /* 1BF6B8 */ UNK_RET gm_801BF6B8(UNK_PARAMS); /* 1BF6C8 */ UNK_RET gm_801BF6C8(UNK_PARAMS); diff --git a/src/melee/gm/gm_1A36__static.h b/src/melee/gm/gm_1A36.static.h similarity index 78% rename from src/melee/gm/gm_1A36__static.h rename to src/melee/gm/gm_1A36.static.h index 663db14304..0691daecab 100644 --- a/src/melee/gm/gm_1A36__static.h +++ b/src/melee/gm/gm_1A36.static.h @@ -70,10 +70,13 @@ struct sceneData { struct gm_80479D58_t { /* 0x00 */ struct gm_80479D58_t* unk_0; /* 0x04 */ char pad_4[4]; - /* 0x08 */ s32 unk_8; /* inferred */ - /* 0x0C */ char pad_C[4]; + /* 0x08 */ s32 unk_8; + /* 0x0C */ s32 unk_C; /* inferred */ /* 0x10 */ u8 unk_10; - /* 0x11 */ char pad_11[0x2F]; /* maybe part of unk_10[0x30]? */ + /* 0x11 */ char pad_11[3]; /* maybe part of unk_10[4]? */ + /* 0x14 */ s32 unk_14; + /* 0x18 */ s32 unk_18; + /* 0x1C */ char pad_1C[0x24]; /* maybe part of unk_18[0xA]? */ }; /* size = 0x40 */ STATIC_ASSERT(sizeof(struct gm_80479D58_t) == 0x40); @@ -83,12 +86,36 @@ struct gm_8049E548_t { /* 0x09 */ u8 unk_9; /* 0x0A */ s8 unk_A; /* 0x0B */ char pad_B[1]; - /* 0x0C */ s16 unk_C; + /* 0x0C */ u16 unk_C; /* 0x0E */ s8 unk_E; /* inferred */ /* 0x0F */ char pad_F[1]; }; /* size = 0x10 */ STATIC_ASSERT(sizeof(struct gm_8049E548_t) == 0x10); +struct fn_801BA1B4_arg0_t { + char pad_0[0x2]; + /* +2:0 */ u8 x2_b0 : 1; + /* +2:1 */ u8 x2_b1 : 1; + /* +2:2 */ u8 x2_b2 : 1; + /* +2:3 */ u8 x2_b3 : 1; + /* +2:4 */ u8 x2_b4 : 1; + /* +2:5 */ u8 x2_b5 : 1; + /* +2:6 */ u8 x2_b6 : 1; + /* +2:7 */ u8 x2_b7 : 1; +}; + +struct fn_801BA3B4_arg0_t { + char pad_0[0xC]; + /* +C:0 */ u8 xC_b0 : 1; + /* +C:1 */ u8 xC_b1 : 1; + /* +C:2 */ u8 xC_b2 : 1; + /* +C:3 */ u8 xC_b3 : 1; + /* +C:4 */ u8 xC_b4 : 1; + /* +C:5 */ u8 xC_b5 : 1; + /* +C:6 */ u8 xC_b6 : 1; + /* +C:7 */ u8 xC_b7 : 1; +}; + /* 1A3F48 */ static void gm_801A3F48(MinorScene*); /* 1A4014 */ static void gm_801A4014(MajorScene* scene); /* 1A4284 */ static UNK_T gm_801A4284(UNK_T); @@ -115,6 +142,8 @@ STATIC_ASSERT(sizeof(struct gm_8049E548_t) == 0x10); /* 1B6320 */ static UNK_T gm_801B6320(void); /* 1B8C5C */ static void fn_801B8C5C(UNK_T); /* 1B9FB8 */ static void fn_801B9FB8(void* arg0); +/* 1BA1B4 */ static void fn_801BA1B4(struct fn_801BA1B4_arg0_t*); +/* 1BA3B4 */ void fn_801BA3B4(struct fn_801BA3B4_arg0_t* arg0); /* 1BA5B4 */ static void fn_801BA5B4(UNK_T); /* 1BA7AC */ static void fn_801BA7AC(UNK_T); /* 1BBFE4 */ static void gm_801BBFE4(void); @@ -123,6 +152,7 @@ STATIC_ASSERT(sizeof(struct gm_8049E548_t) == 0x10); /* 1BEFD0 */ static u8 gm_801BEFD0(void); /* 1BEFE0 */ static void gm_801BEFE0(s8 arg0); /* 1BF684 */ static void gm_801BF684(s16 arg0); +/* 1BF694 */ static u8 gm_801BF694(void); /* 2A3EF4 */ static void gm_801A3EF4(void); /* 3DA920 */ static MajorScene gm_803DA920; /* 3DACA4 */ static MajorScene gm_803DACA4; diff --git a/src/melee/gm/gmcamera.c b/src/melee/gm/gmcamera.c index 11a7d39509..089f5e9569 100644 --- a/src/melee/gm/gmcamera.c +++ b/src/melee/gm/gmcamera.c @@ -1,9 +1,8 @@ #include +#include #include "gmcamera.h" -#include - void* HSD_SisLib_803A5ACC(u8, int, float, float, float); /* extern */ void HSD_SisLib_803A6368(void*, u32); /* extern */ void HSD_SisLib_803A6530(u32, u32, u32); /* extern */ diff --git a/src/melee/gm/gmmain.c b/src/melee/gm/gmmain.c index 91c0f61938..375a18209b 100644 --- a/src/melee/gm/gmmain.c +++ b/src/melee/gm/gmmain.c @@ -1,4 +1,6 @@ #include +#include + #include #include @@ -18,7 +20,6 @@ #include "lb/lbsnap.h" #include "lb/lbtime.h" -#include #include #include #include diff --git a/src/melee/gm/gmmain_lib.c b/src/melee/gm/gmmain_lib.c index 50e16d5349..0872f2b846 100644 --- a/src/melee/gm/gmmain_lib.c +++ b/src/melee/gm/gmmain_lib.c @@ -1,6 +1,6 @@ #include -#include "gmmain_lib__static.h" +#include "gmmain_lib.static.h" #include "lb/lbtime.h" @@ -247,7 +247,7 @@ void gmMainLib_8015D00C(u8 arg0) u8 _[12]; struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - base[arg0].x7A.bits.b0 = true; + base[arg0].x7A.b0 = true; gmMainLib_8015ED98()->xC |= 1 << arg0; } @@ -271,7 +271,7 @@ s32* gmMainLib_8015D0C0(u8 arg0) s32 gmMainLib_8015D0D8(u8 arg0) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - return base[arg0].x7C.bits.b4; + return base[arg0].x7C.b4; } s32 gmMainLib_8015D0F4(u8 arg0) @@ -285,7 +285,7 @@ void gmMainLib_8015D134(u8 arg0) u8 _[12]; struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - base[arg0].x7C.bits.b4 = true; + base[arg0].x7C.b4 = true; gmMainLib_8015ED98()->x10 |= 1 << arg0; } @@ -298,13 +298,13 @@ s8* gmMainLib_8015D194(u8 arg0) s32 gmMainLib_8015D1AC(u8 arg0) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - return base[arg0].x7C.bits.b789; + return base[arg0].x7C.b789; } void gmMainLib_8015D1C8(u8 arg0, s32 arg1) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - base[arg0].x7C.bits.b789 = arg1; + base[arg0].x7C.b789 = arg1; } s32* gmMainLib_8015D1E8(u8 arg0) @@ -316,7 +316,7 @@ s32* gmMainLib_8015D1E8(u8 arg0) s32 gmMainLib_8015D200(u8 arg0) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - return base[arg0].x7C.bits.b5; + return base[arg0].x7C.b5; } s32 gmMainLib_8015D21C(u8 arg0) @@ -330,7 +330,7 @@ void gmMainLib_8015D25C(u8 arg0) u8 _[12]; struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - base[arg0].x7C.bits.b5 = true; + base[arg0].x7C.b5 = true; gmMainLib_8015ED98()->x14 |= 1 << arg0; } @@ -343,13 +343,13 @@ s8* gmMainLib_8015D2BC(u8 arg0) s32 gmMainLib_8015D2D4(u8 arg0) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - return base[arg0].x7C.bits.b10_to_12; + return base[arg0].x7C.b10_to_12; } void gmMainLib_8015D2F0(u8 arg0, s32 arg1) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - base[arg0].x7C.bits.b10_to_12 = arg1; + base[arg0].x7C.b10_to_12 = arg1; } s32* gmMainLib_8015D310(u8 arg0) @@ -361,7 +361,7 @@ s32* gmMainLib_8015D310(u8 arg0) s32 gmMainLib_8015D328(u8 arg0) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - return base[arg0].x7C.bits.b6; + return base[arg0].x7C.b6; } s32 gmMainLib_8015D344(u8 arg0) @@ -375,7 +375,7 @@ void gmMainLib_8015D384(u8 arg0) u8 _[12]; struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - base[arg0].x7C.bits.b6 = true; + base[arg0].x7C.b6 = true; gmMainLib_8015ED98()->x18 |= 1 << arg0; } @@ -388,13 +388,13 @@ s8* gmMainLib_8015D3E4(u8 arg0) s32 gmMainLib_8015D3FC(u8 arg0) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - return base[arg0].x7C.bits.b13_to_15; + return base[arg0].x7C.b13_to_15; } void gmMainLib_8015D418(u8 arg0, s32 arg1) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - base[arg0].x7C.bits.b13_to_15 = arg1; + base[arg0].x7C.b13_to_15 = arg1; } s32* gmMainLib_8015D438(u8 arg0) @@ -411,7 +411,7 @@ s32* gmMainLib_8015D450(s32 arg0) s32 gmMainLib_8015D48C(u8 arg0) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - return base[arg0].x7C.bits.b0; + return base[arg0].x7C.b0; } s32 gmMainLib_8015D4A8(u8 arg0) @@ -423,7 +423,7 @@ s32 gmMainLib_8015D4A8(u8 arg0) void gmMainLib_8015D4E8(u8 arg0, s32 arg1) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - base[arg0].x7C.bits.b0 = arg1; + base[arg0].x7C.b0 = arg1; } s32 gmMainLib_8015D508(void) @@ -432,7 +432,7 @@ s32 gmMainLib_8015D508(void) s32 i; for (i = 0; i < 25; ++i) { struct gmm_x1F2C* _x1F2C = base->x1F2C; - if (_x1F2C[(u8) i].x7C.bits.b0 == 0) { + if (_x1F2C[(u8) i].x7C.b0 == 0) { return 0; } } @@ -474,13 +474,13 @@ s32* gmMainLib_8015D6A4(u8 arg0) s32 gmMainLib_8015D6BC(u8 arg0) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - return base[arg0].x7C.bits.b1; + return base[arg0].x7C.b1; } void gmMainLib_8015D6D8(u8 arg0, s32 arg1) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - base[arg0].x7C.bits.b1 = arg1; + base[arg0].x7C.b1 = arg1; } s32* gmMainLib_8015D6F8(u8 arg0) @@ -492,13 +492,13 @@ s32* gmMainLib_8015D6F8(u8 arg0) s32 gmMainLib_8015D710(u8 arg0) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - return base[arg0].x7C.bits.b2; + return base[arg0].x7C.b2; } void gmMainLib_8015D72C(u8 arg0, s32 arg1) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - base[arg0].x7C.bits.b2 = arg1; + base[arg0].x7C.b2 = arg1; } s16* gmMainLib_8015D74C(u8 arg0) @@ -510,13 +510,13 @@ s16* gmMainLib_8015D74C(u8 arg0) s32 gmMainLib_8015D764(u8 arg0) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - return base[arg0].x7C.bits.b3; + return base[arg0].x7C.b3; } void gmMainLib_8015D780(u8 arg0) { struct gmm_x1F2C* base = &gmMainLib_804D3EE0->thing.x1F2C[0]; - base[arg0].x7C.bits.b3 = 1; + base[arg0].x7C.b3 = 1; } s16* gmMainLib_8015D7A4(u8 arg0) @@ -754,70 +754,91 @@ u16* gmMainLib_8015ED8C(gmMainLib_8015ED8C_arg0_t* arg0) return (u16*) &gmMainLib_804D3EE0->thing; } -struct gmm_retval_ED98* gmMainLib_8015ED98(void) -{ - return (struct gmm_retval_ED98*) &gmMainLib_804D3EE0->thing - .padding_x1868[4]; -} +// struct gmm_retval_ED98* gmMainLib_8015ED98(void) +// { +// return (struct gmm_retval_ED98*) &gmMainLib_804D3EE0->thing +// .padding_x1868[4]; +// } UNK_T gmMainLib_8015EDA4(void) { return &M2C_FIELD(gmMainLib_804D3EE0, UNK_T*, 0x186A); } -struct gmm_retval_EDB0* gmMainLib_8015EDB0(void) +// struct gmm_retval_EDB0* gmMainLib_8015EDB0(void) +// { +// return (struct gmm_retval_EDB0*) &gmMainLib_804D3EE0->thing +// .padding_x1868[0x24]; +// } + +// struct gmm_retval_EDBC* gmMainLib_8015EDBC(void) +// { +// return (struct gmm_retval_EDBC*) &gmMainLib_804D3EE0->thing +// .padding_x1868[0x2C]; +// } + +// u8* gmMainLib_8015EDC8(void) +// { +// return &gmMainLib_804D3EE0->thing.padding_x1868[0x1A4]; +// } + +// s32 gmMainLib_8015EDD4(void) +// { +// return gmMainLib_804D3EE0->thing.padding_x1868[0] & 4; +// } + +void gmMainLib_8015EDE4(void) { - return (struct gmm_retval_EDB0*) &gmMainLib_804D3EE0->thing - .padding_x1868[0x24]; + gmMainLib_804D3EE0->thing.unk_4 |= 4; } -struct gmm_retval_EDBC* gmMainLib_8015EDBC(void) +void gmMainLib_8015EDF8(void) { - return (struct gmm_retval_EDBC*) &gmMainLib_804D3EE0->thing - .padding_x1868[0x2C]; + gmMainLib_804D3EE0->thing.unk_4 &= 0xFFFFFFFB; } -u8* gmMainLib_8015EDC8(void) +// s32 gmMainLib_8015EE0C(void) +// { +// return gmMainLib_804D3EE0->thing.padding_x1868[0] & 1; +// } + +void gmMainLib_8015EE1C(void) { - return &gmMainLib_804D3EE0->thing.padding_x1868[0x1A4]; + gmMainLib_804D3EE0->thing.unk_4 |= 1; } -s32 gmMainLib_8015EDD4(void) +void gmMainLib_8015EE30(void) { - return gmMainLib_804D3EE0->thing.padding_x1868[0] & 4; + gmMainLib_804D3EE0->thing.unk_4 &= 0xFFFFFFFE; } -/// #gmMainLib_8015EDE4 - -/// #gmMainLib_8015EDF8 +// s32 gmMainLib_8015EE44(void) +// { +// return gmMainLib_804D3EE0->thing.padding_x1868[0] & 2; +// } -s32 gmMainLib_8015EE0C(void) +void gmMainLib_8015EE54(void) { - return gmMainLib_804D3EE0->thing.padding_x1868[0] & 1; + gmMainLib_804D3EE0->thing.unk_4 |= 2; } -/// #gmMainLib_8015EE1C +/// #gmMainLib_8015EE68 -/// #gmMainLib_8015EE30 +// s32 gmMainLib_8015EE90(void) +// { +// return gmMainLib_804D3EE0->thing.padding_x1868[0] & 8; +// } -s32 gmMainLib_8015EE44(void) +void gmMainLib_8015EEA0(void) { - return gmMainLib_804D3EE0->thing.padding_x1868[0] & 2; + gmMainLib_804D3EE0->thing.unk_4 |= 8; } -/// #gmMainLib_8015EE54 - -/// #gmMainLib_8015EE68 - -s32 gmMainLib_8015EE90(void) +void gmMainLib_8015EEB4(void) { - return gmMainLib_804D3EE0->thing.padding_x1868[0] & 8; + gmMainLib_804D3EE0->thing.unk_4 &= 0xFFFFFFF7; } -/// #gmMainLib_8015EEA0 - -/// #gmMainLib_8015EEB4 - /// #gmMainLib_8015EEC8 /// #gmMainLib_8015EF30 @@ -872,3 +893,43 @@ void gmMainLib_8015FCC0(void) gmMainLib_8046B0F0.xC = 0; gmMainLib_8046B0F0.x10 = lbTime_8000AFBC(); } + +struct gmm_retval_ED98* gmMainLib_8015ED98(void) +{ + return &gmMainLib_804D3EE0->thing.unk_8; +} + +struct gmm_retval_EDB0* gmMainLib_8015EDB0(void) +{ + return &gmMainLib_804D3EE0->thing.unk_28; +} + +struct gmm_retval_EDBC* gmMainLib_8015EDBC(void) +{ + return &gmMainLib_804D3EE0->thing.unk_30; +} + +u8* gmMainLib_8015EDC8(void) +{ + return &gmMainLib_804D3EE0->thing.unk_1A8; +} + +s32 gmMainLib_8015EDD4(void) +{ + return gmMainLib_804D3EE0->thing.unk_4 & 4; +} + +s32 gmMainLib_8015EE0C(void) +{ + return gmMainLib_804D3EE0->thing.unk_4 & 1; +} + +s32 gmMainLib_8015EE44(void) +{ + return gmMainLib_804D3EE0->thing.unk_4 & 2; +} + +s32 gmMainLib_8015EE90(void) +{ + return gmMainLib_804D3EE0->thing.unk_4 & 8; +} diff --git a/src/melee/gm/gmmain_lib__static.h b/src/melee/gm/gmmain_lib.static.h similarity index 100% rename from src/melee/gm/gmmain_lib__static.h rename to src/melee/gm/gmmain_lib.static.h diff --git a/src/melee/gm/types.h b/src/melee/gm/types.h index 59a876e0f1..d7f779eaf8 100644 --- a/src/melee/gm/types.h +++ b/src/melee/gm/types.h @@ -2,10 +2,11 @@ #define MELEE_GM_TYPES_H #include +#include + #include "gm/forward.h" // IWYU pragma: export #include -#include struct gmm_x1CB0 { u8 padding_x0[0x10 - 0x0]; @@ -26,7 +27,7 @@ typedef union _UnkFlagStruct2 { u16 b789 : 3; u16 b10_to_12 : 3; u16 b13_to_15 : 3; - } bits; + }; u16 flags; } UnkFlagStruct2; @@ -86,51 +87,82 @@ struct GameRules { }; /* size = 0x18 */ STATIC_ASSERT(sizeof(struct GameRules) == 0x18); -struct gmm_x1868 { - /* 0x1868 */ s32 x1868; - u8 padding_x1868[0x1A18 - 0x1868 - 4]; - /* 0x1A18 */ s32 x1A18; - /* 0x1A1C */ s32 x1A1C; - /* 0x1A20 */ s32 x1A20; - /* 0x1A24 */ s32 x1A24; - /* 0x1A28 */ s32 x1A28; - /* 0x1A2C */ s32 x1A2C; - /* 0x1A30 */ s32 x1A30; - /* 0x1A34 */ s32 x1A34; - /* 0x1A38 */ s32 x1A38; - /* 0x1A3C */ s32 x1A3C; - /* 0x1A40 */ s32 x1A40; - /* 0x1A44 */ s32 x1A44; - /* 0x1A48 */ s32 x1A48; - /* 0x1A4C */ s32 x1A4C; - /* 0x1A50 */ s32 x1A50; - /* 0x1A54 */ s32 x1A54; - /* 0x1A58 */ s32 x1A58; - /* 0x1A5C */ s32 x1A5C; - /* 0x1A60 */ s32 x1A60; - /* 0x1A64 */ s32 x1A64; - /* 0x1A68 */ s64 x1A68; - /* 0x1A70 */ s32 x1A70[4]; - u8 padding_x1A70[0x1B3C - 0x1A70 - 16]; - /* 0x1B3C */ u8 x1B3C; - /* 0x1B40 */ u32 x1B40[3]; - /* 0x1B4C */ u32 x1B4C[3]; - /* 0x1B58 */ u32 x1B58[3]; - u8 padding_x1B58[0x1B80 - 0x1B58 - 3 * 4]; - /* 0x1B80 */ u32 x1B80[4]; - u8 padding_x1B80[0x1C88 - 0x1B80 - 4 * 4]; - /* 0x1C88 */ u32 x1C88[3]; - u8 padding_x1C88[0x1CB0 - 0x1C88 - 3 * 4]; - /* 0x1CB0 */ struct gmm_x1CB0 x1CB0; - /* 0x1CD0 */ s16 x1CD0; - /* 0x1CD2 */ s16 x1CD2; - /* 0x1CD4 */ s32 x1CD4; - u8 padding_x1CD4[0x1F2C - 0x1CD4 - 4]; - /* 0x1F2C */ struct gmm_x1F2C x1F2C[25]; - /* 0x2FF8 */ struct gmm_x2FF8 x2FF8[2]; - // u8 padding_x2FF8[0x7000 - 0x2FF8 - 0x1A4*19*2]; +struct gmm_retval_ED98 { + u8 padding[0xC]; + s32 xC; + s32 x10; + s32 x14; + s32 x18; + s32 x1C; +}; + +struct gmm_retval_EDB0 { + s32 x0; + s32 x4; +}; + +struct gmm_retval_EDBC { + s32 x0; + s32 x4; + s32 x8; + u8 padding[0x4C - 0x8 - 4]; + s32 x4C[4]; + u8 padding_x4C[0xB0 - 0x4C - 4 * 4]; + s32 xB0[4]; }; +struct gmm_x1868 { + /* 0x0000 */ s32 x1868; + /* 0x0004 */ u8 unk_4; + /* 0x0005 */ char pad_5[3]; /* maybe part of unk_4[4]? */ + /* 0x0008 */ struct gmm_retval_ED98 unk_8; + /* 0x0028 */ struct gmm_retval_EDB0 unk_28; + /* 0x0030 */ struct gmm_retval_EDBC unk_30; + /* 0x00F0 */ char pad_F0[0xB8]; + /* 0x01A8 */ u8 unk_1A8; /* inferred */ + /* 0x01A9 */ char pad_1A9[7]; /* maybe part of unk_1A8[8]? */ + /* 0x01B0 */ s32 x1A18; + /* 0x01B4 */ s32 x1A1C; + /* 0x01B8 */ s32 x1A20; + /* 0x01BC */ s32 x1A24; + /* 0x01C0 */ s32 x1A28; + /* 0x01C4 */ s32 x1A2C; + /* 0x01C8 */ s32 x1A30; + /* 0x01CC */ s32 x1A34; + /* 0x01D0 */ s32 x1A38; + /* 0x01D4 */ s32 x1A3C; + /* 0x01D8 */ s32 x1A40; + /* 0x01DC */ s32 x1A44; + /* 0x01E0 */ s32 x1A48; + /* 0x01E4 */ s32 x1A4C; + /* 0x01E8 */ s32 x1A50; + /* 0x01EC */ s32 x1A54; + /* 0x01F0 */ s32 x1A58; + /* 0x01F4 */ s32 x1A5C; + /* 0x01F8 */ s32 x1A60; + /* 0x01FC */ s32 x1A64; + /* 0x0200 */ s64 x1A68; + /* 0x0208 */ s32 x1A70[4]; + /* 0x0218 */ u8 padding_x1A70[0xBC]; + /* 0x02D4 */ u8 x1B3C; + /* 0x02D5 */ char pad_2D5[3]; /* maybe part of x1B3C[4]? */ + /* 0x02D8 */ u32 x1B40[3]; + /* 0x02E4 */ u32 x1B4C[3]; + /* 0x02F0 */ u32 x1B58[3]; + /* 0x02FC */ u8 padding_x1B58[0x1C]; + /* 0x0318 */ u32 x1B80[4]; + /* 0x0328 */ u8 padding_x1B80[0xF8]; + /* 0x0420 */ u32 x1C88[3]; + /* 0x042C */ u8 padding_x1C88[0x1C]; + /* 0x0448 */ struct gmm_x1CB0 x1CB0; + /* 0x0468 */ s16 x1CD0; + /* 0x046A */ s16 x1CD2; + /* 0x046C */ s32 x1CD4; + /* 0x0470 */ u8 padding_x1CD4[0x254]; + /* 0x06C4 */ struct gmm_x1F2C x1F2C[0x19]; + /* 0x1790 */ struct gmm_x2FF8 x2FF8[2]; +}; /* size = 0x55E8 */ + struct gmm_x0 { /* 0x0000 */ u8 language; /* 0x0001 */ u8 unk_1; @@ -167,59 +199,87 @@ struct gmm_x0 { /* 0x1898 */ struct gmm_x1868 thing; }; /* size = 0x6E80 */ -struct gmm_retval_ED98 { - u8 padding[0xC]; - s32 xC; - s32 x10; - s32 x14; - s32 x18; - s32 x1C; -}; - -struct gmm_retval_EDBC { - s32 x0; - s32 x4; - s32 x8; - u8 padding[0x4C - 0x8 - 4]; - s32 x4C[4]; - u8 padding_x4C[0xB0 - 0x4C - 4 * 4]; - s32 xB0[4]; -}; - -struct gmm_retval_EDB0 { - s32 x0; - s32 x4; -}; - -struct Placeholder_8016AE38_flags { - u8 unk80 : 1; - u8 unk40 : 1; - u8 unk20 : 1; - u8 unk10 : 1; - u8 unk8 : 1; - u8 unk4 : 1; - u8 unk2 : 1; - u8 unk1 : 1; -}; - struct Placeholder_8016AE38_flags_2 { - u8 top3 : 3; - u8 bot5 : 5; + /* +0:0 */ u8 x0_b0_b2 : 3; + /* +0:3 */ u8 x0_b3 : 1; + /* +0:4 */ u8 x0_b4 : 1; + /* +0:5 */ u8 x0_b5 : 1; + /* +0:6 */ u8 x0_b6 : 1; + /* +0:7 */ u8 x0_b7 : 1; + union { + /* +1 */ u8 x1; + struct { + /* +1:0 */ u8 x1_b0 : 1; + /* +1:1 */ u8 x1_b1 : 1; + /* +1:2 */ u8 x1_b2 : 1; + /* +1:3 */ u8 x1_b3 : 1; + /* +1:4 */ u8 x1_b4 : 1; + /* +1:5 */ u8 x1_b5 : 1; + /* +1:6 */ u8 x1_b6 : 1; + /* +1:7 */ u8 x1_b7 : 1; + }; + }; + /* +2:0 */ u8 x2_b0 : 1; + /* +2:1 */ u8 x2_b1 : 1; + /* +2:2 */ u8 x2_b2 : 1; + /* +2:3 */ u8 x2_b3 : 1; + /* +2:4 */ u8 x2_b4 : 1; + /* +2:5 */ u8 x2_b5 : 1; + /* +2:6 */ u8 x2_b6 : 1; + /* +2:7 */ u8 x2_b7 : 1; }; -struct Placeholder_8016AE38_ret_val { - u32 unk0; - u32 unk4; - u32 unk8; - u8 unkC; - u8 unkD; - u8 unkE; - u8 unkF; - u32 padding[0x931 - 3]; - Placeholder_8016AE38_flags_2 unk24C8; - u8 unk24C9; - Placeholder_8016AE38_flags unk24CA; -}; +struct lbl_8046B6A0_t { + /* 0x0000 */ u32 unk_0; + /* 0x0004 */ u32 unk_4; + /* 0x0008 */ u32 unk_8; + /* 0x000C */ u8 unk_C; + /* 0x000D */ u8 unk_D; + /* 0x000E */ u8 unk_E; + /* 0x000F */ u8 unk_F; + /* 0x0010 */ s32 unk_10; + /* 0x0014 */ s32 unk_14; + /* 0x0018 */ char pad_18[0xC]; /* maybe part of unk_14[4]? */ + /* 0x0024 */ s32 unk_24; + /* 0x0028 */ s32 unk_28; + /* 0x002C */ u16 unk_2C; + /* 0x002E */ char pad_2E[6]; /* maybe part of unk_2C[4]? */ + /* 0x0034 */ f32 unk_34; + /* 0x0038 */ char pad_38[0x2490]; /* maybe part of unk_34[0x925]? */ + /* 0x24C8 */ Placeholder_8016AE38_flags_2 unk24C8; + /* 0x24CB */ char pad_24CB[1]; + /* 0x24CC:0 */ u8 unk_24CC_b0 : 1; + /* 0x24CC:1 */ u8 unk_24CC_b1 : 1; + /* 0x24CC:2 */ u8 unk_24CC_b2 : 1; + /* 0x24CC:3 */ u8 unk_24CC_b3 : 1; + /* 0x24CC:4 */ u8 unk_24CC_b4 : 1; + /* 0x24CC:5 */ u8 unk_24CC_b5 : 1; + /* 0x24CC:6 */ u8 unk_24CC_b6 : 1; + /* 0x24CC:7 */ u8 unk_24CC_b7 : 1; + /* 0x24CD:0 */ u8 unk_24CD_b0 : 1; + /* 0x24CD:1 */ u8 unk_24CD_b1 : 1; + /* 0x24CD:2 */ u8 unk_24CD_b2 : 1; + /* 0x24CD:3 */ u8 unk_24CD_b3 : 1; + /* 0x24CD:4 */ u8 unk_24CD_b4 : 1; + /* 0x24CD:5 */ u8 unk_24CD_b5 : 1; + /* 0x24CD:6 */ u8 unk_24CD_b6 : 1; + /* 0x24CD:7 */ u8 unk_24CD_b7 : 1; + /* 0x24CE */ u8 unk_24CE; + /* 0x24CF */ char pad_24CF[1]; + /* 0x24D0 */ s8 unk_24D0; + /* 0x24D1 */ char pad_24D1[2]; /* maybe part of unk_24D0[3]? */ + /* 0x24D3 */ s8 unk_24D3; + /* 0x24D4 */ s8 unk_24D4; + /* 0x24D5 */ char pad_24D5[1]; + /* 0x24D6 */ u16 unk_24D6; + /* 0x24D8 */ char pad_24D8[0x10]; /* maybe part of unk_24D6[9]? */ + /* 0x24E8 */ u64 unk_24E8; + /* 0x24F0 */ s32 unk_24F0; + /* 0x24F4 */ char pad_24F4[4]; + /* 0x24F8 */ f32 unk_24F8; /* inferred */ + /* 0x24FC */ char pad_24FC[0x2C]; /* maybe part of unk_24F8[0xC]? */ +}; /* size = 0x2528 */ +STATIC_ASSERT(sizeof(struct lbl_8046B6A0_t) == 0x2528); struct datetime { u16 year; diff --git a/src/melee/gr/granime.h b/src/melee/gr/granime.h index 7a0dd62ad5..91216de3c0 100644 --- a/src/melee/gr/granime.h +++ b/src/melee/gr/granime.h @@ -2,6 +2,7 @@ #define GALE01_1C65B0 #include + #include /* 1C78FC */ void grAnime_801C78FC(HSD_GObj*, s32, s32); diff --git a/src/melee/gr/grbattle.c b/src/melee/gr/grbattle.c index 20dd066e99..efe2e830fd 100644 --- a/src/melee/gr/grbattle.c +++ b/src/melee/gr/grbattle.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include "gr/grbattle.h" diff --git a/src/melee/gr/grbattle.h b/src/melee/gr/grbattle.h index 01b3a68a80..bad30ea566 100644 --- a/src/melee/gr/grbattle.h +++ b/src/melee/gr/grbattle.h @@ -2,6 +2,7 @@ #define GALE01_219C98 #include + #include /* 21A10C */ bool grBattle_8021A10C(HSD_GObj*); diff --git a/src/melee/gr/grbigblue.h b/src/melee/gr/grbigblue.h index 68946f63af..e369d58435 100644 --- a/src/melee/gr/grbigblue.h +++ b/src/melee/gr/grbigblue.h @@ -1,10 +1,10 @@ #ifndef GALE01_1E57BC #define GALE01_1E57BC -#include - #include +#include + /* 1E57BC */ UNK_RET grBigBlue_801E57BC(UNK_PARAMS); /* 1E57C0 */ UNK_RET grBigBlue_801E57C0(UNK_PARAMS); /* 1E59C8 */ UNK_RET grBigBlue_801E59C8(UNK_PARAMS); diff --git a/src/melee/gr/grcastle.h b/src/melee/gr/grcastle.h index b0c33ec6df..d541ef23b3 100644 --- a/src/melee/gr/grcastle.h +++ b/src/melee/gr/grcastle.h @@ -1,11 +1,11 @@ #ifndef GALE01_1CD338 #define GALE01_1CD338 +#include + #include #include -#include - /* 1CD338 */ UNK_RET grCastle_801CD338(UNK_PARAMS); /* 1CD37C */ UNK_RET grCastle_801CD37C(UNK_PARAMS); /* 1CD4A0 */ UNK_RET grCastle_801CD4A0(UNK_PARAMS); diff --git a/src/melee/gr/grcorneria.h b/src/melee/gr/grcorneria.h index 655736799d..29eb5102eb 100644 --- a/src/melee/gr/grcorneria.h +++ b/src/melee/gr/grcorneria.h @@ -2,7 +2,6 @@ #define GALE01_1DCCFC #include - #include /* 1DCCFC */ UNK_RET grCorneria_801DCCFC(UNK_PARAMS); diff --git a/src/melee/gr/grdatfiles.h b/src/melee/gr/grdatfiles.h index 564fdabd7a..7e6208aa9c 100644 --- a/src/melee/gr/grdatfiles.h +++ b/src/melee/gr/grdatfiles.h @@ -2,6 +2,7 @@ #define GALE01_1C5FC0 #include + #include "gr/forward.h" #include #include diff --git a/src/melee/gr/grdisplay.h b/src/melee/gr/grdisplay.h index c3803b5825..84d918d2c9 100644 --- a/src/melee/gr/grdisplay.h +++ b/src/melee/gr/grdisplay.h @@ -2,6 +2,7 @@ #define GALE01_1C5B90 #include + #include /* 1C5DB0 */ void grDisplay_801C5DB0(HSD_GObj*, int); diff --git a/src/melee/gr/grdynamicattr.h b/src/melee/gr/grdynamicattr.h index 2a80353dfe..cc5afed3f4 100644 --- a/src/melee/gr/grdynamicattr.h +++ b/src/melee/gr/grdynamicattr.h @@ -2,6 +2,7 @@ #define GALE01_1CA0B4 #include + #include "gr/forward.h" #include diff --git a/src/melee/gr/grfigure1.c b/src/melee/gr/grfigure1.c index bf547b6083..0db1a87f9b 100644 --- a/src/melee/gr/grfigure1.c +++ b/src/melee/gr/grfigure1.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grfigure2.c b/src/melee/gr/grfigure2.c index c05a8f0f02..c71c1ff44d 100644 --- a/src/melee/gr/grfigure2.c +++ b/src/melee/gr/grfigure2.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grfigure3.c b/src/melee/gr/grfigure3.c index fdc95dac6d..2b1d84f9c7 100644 --- a/src/melee/gr/grfigure3.c +++ b/src/melee/gr/grfigure3.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grfigureget.c b/src/melee/gr/grfigureget.c index 66f056e446..0140422367 100644 --- a/src/melee/gr/grfigureget.c +++ b/src/melee/gr/grfigureget.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grfigureget.h b/src/melee/gr/grfigureget.h index ec429a0921..ec8ac02ec9 100644 --- a/src/melee/gr/grfigureget.h +++ b/src/melee/gr/grfigureget.h @@ -2,7 +2,6 @@ #define GALE01_219530 #include - #include /* 219530 */ UNK_RET grFigureGet_80219530(UNK_PARAMS); diff --git a/src/melee/gr/grflatzone.h b/src/melee/gr/grflatzone.h index 33147453e8..44b46ddb93 100644 --- a/src/melee/gr/grflatzone.h +++ b/src/melee/gr/grflatzone.h @@ -1,12 +1,12 @@ #include +#include + #include "gr/forward.h" #include "lb/forward.h" #include #include "it/inlines.h" -#include - /* 216E74 */ void grFlatzone_80216E74(int); /* 216E78 */ void grFlatzone_80216E78(void); /* 216F38 */ void grFlatzone_80216F38(void); diff --git a/src/melee/gr/gricemt.c b/src/melee/gr/gricemt.c index 3ec6b54858..e71663eb6a 100644 --- a/src/melee/gr/gricemt.c +++ b/src/melee/gr/gricemt.c @@ -1,9 +1,8 @@ #include +#include #include "gr/inlines.h" -#include - void grIceMt_801F6868(void) {} /// #grIceMt_801F686C diff --git a/src/melee/gr/gricemt.h b/src/melee/gr/gricemt.h index e2eff69b21..f60349e976 100644 --- a/src/melee/gr/gricemt.h +++ b/src/melee/gr/gricemt.h @@ -1,9 +1,10 @@ #ifndef GALE01_1F6868 #define GALE01_1F6868 +#include + #include "gr/forward.h" -#include #include /* 1F6868 */ UNK_RET grIceMt_801F6868(UNK_PARAMS); diff --git a/src/melee/gr/grinishie1.h b/src/melee/gr/grinishie1.h index 2adc31972b..457a53148f 100644 --- a/src/melee/gr/grinishie1.h +++ b/src/melee/gr/grinishie1.h @@ -2,7 +2,6 @@ #define GALE01_1FA908 #include - #include /* 1FA908 */ UNK_RET grInishie1_801FA908(UNK_PARAMS); diff --git a/src/melee/gr/grizumi.h b/src/melee/gr/grizumi.h index 9e99c4862f..453b604212 100644 --- a/src/melee/gr/grizumi.h +++ b/src/melee/gr/grizumi.h @@ -2,6 +2,7 @@ #define GALE01_1CBB84 #include + #include "lb/forward.h" #include #include diff --git a/src/melee/gr/grkongo.h b/src/melee/gr/grkongo.h index ca89310048..b6fdc34087 100644 --- a/src/melee/gr/grkongo.h +++ b/src/melee/gr/grkongo.h @@ -2,10 +2,10 @@ #define GALE01_1D5238 #include -#include - #include +#include + /* 1D5238 */ void grKongo_801D5238(void); /* 1D523C */ void grKongo_801D523C(void); /* 1D52F8 */ void grKongo_801D52F8(void); diff --git a/src/melee/gr/grlib.c b/src/melee/gr/grlib.c index 10cdc029e2..4e3ad0b821 100644 --- a/src/melee/gr/grlib.c +++ b/src/melee/gr/grlib.c @@ -1,3 +1,5 @@ +#include + #include "grlib.h" #include "grbigblue.h" @@ -16,7 +18,6 @@ #include "sc/types.h" #include -#include #include #include #include diff --git a/src/melee/gr/grlib.h b/src/melee/gr/grlib.h index a60be01243..ca8fce92f5 100644 --- a/src/melee/gr/grlib.h +++ b/src/melee/gr/grlib.h @@ -2,12 +2,12 @@ #define GALE01_1C96E8 #include +#include + #include "lb/forward.h" #include #include -#include - /* 1C96E8 */ bool grLib_801C96E8(HSD_GObj*); /* 1C96F8 */ UnkGeneratorStruct* grLib_801C96F8(s32, s8, S32Vec3*); /* 1C97DC */ void grLib_801C97DC(s32, s32, HSD_JObj*); diff --git a/src/melee/gr/grmaterial.h b/src/melee/gr/grmaterial.h index fa47fa028d..567d2afafa 100644 --- a/src/melee/gr/grmaterial.h +++ b/src/melee/gr/grmaterial.h @@ -2,10 +2,11 @@ #define GALE01_1C87D0 #include +#include + #include "gr/forward.h" #include -#include #include /* 1C8858 */ void grMaterial_801C8858(HSD_JObj*, u32 flags); diff --git a/src/melee/gr/groldkongo.h b/src/melee/gr/groldkongo.h index 7956e3e666..fb71aa3b11 100644 --- a/src/melee/gr/groldkongo.h +++ b/src/melee/gr/groldkongo.h @@ -2,10 +2,10 @@ #define GALE01_20F468 #include -#include - #include +#include + /* 20F468 */ UNK_RET grOldKongo_8020F468(UNK_PARAMS); /* 20F46C */ UNK_RET grOldKongo_8020F46C(UNK_PARAMS); /* 20F4E4 */ UNK_RET grOldKongo_8020F4E4(UNK_PARAMS); diff --git a/src/melee/gr/ground.c b/src/melee/gr/ground.c index dc7bd328ef..2346cabc85 100644 --- a/src/melee/gr/ground.c +++ b/src/melee/gr/ground.c @@ -1,3 +1,5 @@ +#include + #include "gr/forward.h" #include "ground.h" @@ -36,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -2144,7 +2145,7 @@ void Ground_801C42AC(void) if (jobj != NULL) { sp8.x14 = 0x14; sp8.x4 = jobj; - sp8.x1C.bits.b0 = true; + sp8.x1C.b0 = true; it_8026BE84(&sp8); } } diff --git a/src/melee/gr/ground.h b/src/melee/gr/ground.h index 99bd61b778..2b2c34eddc 100644 --- a/src/melee/gr/ground.h +++ b/src/melee/gr/ground.h @@ -2,6 +2,8 @@ #define GALE01_1BFFA8 #include +#include + #include "lb/forward.h" #include #include @@ -9,8 +11,6 @@ #include "gr/types.h" -#include - /* 1BFFB0 */ void Ground_801BFFB0(void); /* 1C0378 */ void Ground_801C0378(int); /* 1C0478 */ void Ground_801C0478(void* ptr); diff --git a/src/melee/gr/grrcruise.h b/src/melee/gr/grrcruise.h index 4869038db0..6a8eb03df3 100644 --- a/src/melee/gr/grrcruise.h +++ b/src/melee/gr/grrcruise.h @@ -1,10 +1,10 @@ #ifndef GALE01_1FF164 #define GALE01_1FF164 -#include - #include +#include + /* 1FF164 */ UNK_RET grRCruise_801FF164(UNK_PARAMS); /* 1FF168 */ UNK_RET grRCruise_801FF168(UNK_PARAMS); /* 1FF298 */ UNK_RET grRCruise_801FF298(UNK_PARAMS); diff --git a/src/melee/gr/grshrine.c b/src/melee/gr/grshrine.c index 89c43e7b4a..04df6f7da5 100644 --- a/src/melee/gr/grshrine.c +++ b/src/melee/gr/grshrine.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include "gr/grshrine.h" diff --git a/src/melee/gr/grstadium.c b/src/melee/gr/grstadium.c index f335054b7d..2cdb47ba2a 100644 --- a/src/melee/gr/grstadium.c +++ b/src/melee/gr/grstadium.c @@ -1,5 +1,4 @@ #include - #include void grStadium_801D1018(void) {} diff --git a/src/melee/gr/grstadium.h b/src/melee/gr/grstadium.h index 02ce74948b..1899dded0e 100644 --- a/src/melee/gr/grstadium.h +++ b/src/melee/gr/grstadium.h @@ -2,10 +2,10 @@ #define GALE01_1D1018 #include -#include - #include +#include + /* 1D1018 */ UNK_RET grStadium_801D1018(UNK_PARAMS); /* 1D101C */ UNK_RET grStadium_801D101C(UNK_PARAMS); /* 1D10C8 */ UNK_RET grStadium_801D10C8(UNK_PARAMS); diff --git a/src/melee/gr/grstory.c b/src/melee/gr/grstory.c index 500047a6eb..faefc5283e 100644 --- a/src/melee/gr/grstory.c +++ b/src/melee/gr/grstory.c @@ -1,4 +1,5 @@ #include + #include "it/forward.h" #include "lb/forward.h" diff --git a/src/melee/gr/grstory.h b/src/melee/gr/grstory.h index 144bc1b2e9..4fdc90bf09 100644 --- a/src/melee/gr/grstory.h +++ b/src/melee/gr/grstory.h @@ -2,6 +2,7 @@ #define GALE01_1E302C #include + #include #include diff --git a/src/melee/gr/grtcaptain.c b/src/melee/gr/grtcaptain.c index 68dd97b6bb..ea361574c4 100644 --- a/src/melee/gr/grtcaptain.c +++ b/src/melee/gr/grtcaptain.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include #include diff --git a/src/melee/gr/grtclink.h b/src/melee/gr/grtclink.h index 9f2f506c37..cfda06b322 100644 --- a/src/melee/gr/grtclink.h +++ b/src/melee/gr/grtclink.h @@ -2,6 +2,7 @@ #define _grtclink_h_ #include + #include "lb/forward.h" #include #include diff --git a/src/melee/gr/grtdonkey.c b/src/melee/gr/grtdonkey.c index 185ae8725d..6e4c880397 100644 --- a/src/melee/gr/grtdonkey.c +++ b/src/melee/gr/grtdonkey.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include #include diff --git a/src/melee/gr/grtdrmario.c b/src/melee/gr/grtdrmario.c index 31e8903f43..b0fde845b8 100644 --- a/src/melee/gr/grtdrmario.c +++ b/src/melee/gr/grtdrmario.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grtemblem.c b/src/melee/gr/grtemblem.c index 989c8f3ee7..ede748d62f 100644 --- a/src/melee/gr/grtemblem.c +++ b/src/melee/gr/grtemblem.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include #include diff --git a/src/melee/gr/grtfalco.c b/src/melee/gr/grtfalco.c index 7a91f55d24..da9f30bea7 100644 --- a/src/melee/gr/grtfalco.c +++ b/src/melee/gr/grtfalco.c @@ -1,3 +1,5 @@ +#include + #include "gr/grtfalco.h" #include "gr/granime.h" @@ -9,7 +11,6 @@ #include "lb/lb_00F9.h" #include "mp/mplib.h" -#include #include #include #include diff --git a/src/melee/gr/grtfalco.h b/src/melee/gr/grtfalco.h index 41a8901168..3cc920116e 100644 --- a/src/melee/gr/grtfalco.h +++ b/src/melee/gr/grtfalco.h @@ -2,12 +2,12 @@ #define GALE01_2207F0 #include +#include + #include "lb/forward.h" #include #include -#include - /* 2207F0 */ void grTFalco_802207F0(int); /* 2207F4 */ void grTFalco_802207F4(void); /* 22086C */ void grTFalco_8022086C(void); diff --git a/src/melee/gr/grtfox.c b/src/melee/gr/grtfox.c index 5eae024bec..1d5f194321 100644 --- a/src/melee/gr/grtfox.c +++ b/src/melee/gr/grtfox.c @@ -1,4 +1,6 @@ #include +#include + #include "lb/forward.h" #include @@ -13,7 +15,6 @@ #include "lb/lb_00F9.h" #include "mp/mplib.h" -#include #include #include #include diff --git a/src/melee/gr/grtgamewatch.h b/src/melee/gr/grtgamewatch.h index 4e59940ad4..2b7f058891 100644 --- a/src/melee/gr/grtgamewatch.h +++ b/src/melee/gr/grtgamewatch.h @@ -2,6 +2,7 @@ #define _grtgamewatch_h_ #include + #include "lb/forward.h" #include #include diff --git a/src/melee/gr/grtganon.h b/src/melee/gr/grtganon.h index c83a215524..f4f3cc282b 100644 --- a/src/melee/gr/grtganon.h +++ b/src/melee/gr/grtganon.h @@ -3,6 +3,7 @@ #define _grtganon_h_ #include + #include "lb/forward.h" #include #include diff --git a/src/melee/gr/grticeclimber.c b/src/melee/gr/grticeclimber.c index 930a960e36..b842311f57 100644 --- a/src/melee/gr/grticeclimber.c +++ b/src/melee/gr/grticeclimber.c @@ -1,3 +1,5 @@ +#include + #include "gr/grticeclimber.h" #include "cm/camera.h" @@ -14,7 +16,6 @@ #include "lb/lb_00B0.h" #include "lb/lb_00F9.h" -#include #include #include #include diff --git a/src/melee/gr/grticeclimber.h b/src/melee/gr/grticeclimber.h index 01c077df0d..235a2cee5a 100644 --- a/src/melee/gr/grticeclimber.h +++ b/src/melee/gr/grticeclimber.h @@ -2,12 +2,12 @@ #define GALE01_220F10 #include +#include + #include "lb/forward.h" #include #include -#include - /* 1C8DE0 */ void grMaterial_801C8DE0(s32, f32, f32, f32, f32, f32, f32, f32); /* 220F10 */ void grTIceClimber_80220F10(bool); /* 220F14 */ void grTIceClimber_80220F14(void); diff --git a/src/melee/gr/grtkirby.c b/src/melee/gr/grtkirby.c index c395be241e..e4e9dfb8a4 100644 --- a/src/melee/gr/grtkirby.c +++ b/src/melee/gr/grtkirby.c @@ -1,5 +1,6 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grtkoopa.c b/src/melee/gr/grtkoopa.c index f807a03587..9daa9ef486 100644 --- a/src/melee/gr/grtkoopa.c +++ b/src/melee/gr/grtkoopa.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grtlink.c b/src/melee/gr/grtlink.c index 3d020d575c..bab5653ae2 100644 --- a/src/melee/gr/grtlink.c +++ b/src/melee/gr/grtlink.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grtluigi.h b/src/melee/gr/grtluigi.h index 94585d783a..9284275a1a 100644 --- a/src/melee/gr/grtluigi.h +++ b/src/melee/gr/grtluigi.h @@ -2,6 +2,7 @@ #define GALE01_221C10 #include + #include "lb/forward.h" #include #include diff --git a/src/melee/gr/grtmario.c b/src/melee/gr/grtmario.c index d591bd4dd2..1cc9fa8dc5 100644 --- a/src/melee/gr/grtmario.c +++ b/src/melee/gr/grtmario.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grtmars.c b/src/melee/gr/grtmars.c index 9d2968cc79..a2ea63fdab 100644 --- a/src/melee/gr/grtmars.c +++ b/src/melee/gr/grtmars.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grtmewtwo.c b/src/melee/gr/grtmewtwo.c index b2e63f2bc0..92896ee0cc 100644 --- a/src/melee/gr/grtmewtwo.c +++ b/src/melee/gr/grtmewtwo.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grtness.c b/src/melee/gr/grtness.c index 92802285d8..eb098f535b 100644 --- a/src/melee/gr/grtness.c +++ b/src/melee/gr/grtness.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include "gr/granime.h" diff --git a/src/melee/gr/grtpeach.c b/src/melee/gr/grtpeach.c index 7139f49aa6..72baf24219 100644 --- a/src/melee/gr/grtpeach.c +++ b/src/melee/gr/grtpeach.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grtpichu.c b/src/melee/gr/grtpichu.c index 7aeef4cc1d..c496a19f42 100644 --- a/src/melee/gr/grtpichu.c +++ b/src/melee/gr/grtpichu.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include #include diff --git a/src/melee/gr/grtpikachu.h b/src/melee/gr/grtpikachu.h index 72b7fa7cfc..d959959c16 100644 --- a/src/melee/gr/grtpikachu.h +++ b/src/melee/gr/grtpikachu.h @@ -2,6 +2,7 @@ #define _grtpikachu_h_ #include + #include "lb/forward.h" #include #include diff --git a/src/melee/gr/grtpurin.h b/src/melee/gr/grtpurin.h index 88fe210290..79075a7c5d 100644 --- a/src/melee/gr/grtpurin.h +++ b/src/melee/gr/grtpurin.h @@ -3,6 +3,7 @@ #define _grtpurin_h_ #include + #include "lb/forward.h" #include #include diff --git a/src/melee/gr/grtsamus.c b/src/melee/gr/grtsamus.c index c04e514187..e63435053f 100644 --- a/src/melee/gr/grtsamus.c +++ b/src/melee/gr/grtsamus.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grtseak.c b/src/melee/gr/grtseak.c index 1cece1ef7e..fd53b7bcf3 100644 --- a/src/melee/gr/grtseak.c +++ b/src/melee/gr/grtseak.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grtyoshi.c b/src/melee/gr/grtyoshi.c index ff41713928..fcbb35e3ea 100644 --- a/src/melee/gr/grtyoshi.c +++ b/src/melee/gr/grtyoshi.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/grtzelda.c b/src/melee/gr/grtzelda.c index 6e872e2f27..04158eca7b 100644 --- a/src/melee/gr/grtzelda.c +++ b/src/melee/gr/grtzelda.c @@ -1,4 +1,5 @@ #include + #include "lb/forward.h" #include diff --git a/src/melee/gr/stage.h b/src/melee/gr/stage.h index 731b4983bf..0c557cef99 100644 --- a/src/melee/gr/stage.h +++ b/src/melee/gr/stage.h @@ -2,6 +2,7 @@ #define GALE01_224A54 #include + #include "gr/forward.h" #include #include diff --git a/src/melee/gr/types.h b/src/melee/gr/types.h index 7271018db6..79f539cbd0 100644 --- a/src/melee/gr/types.h +++ b/src/melee/gr/types.h @@ -2,6 +2,8 @@ #define MELEE_GR_TYPES_H #include +#include + #include "gr/forward.h" // IWYU pragma: export #include "it/forward.h" #include "lb/forward.h" @@ -9,7 +11,6 @@ #include #include -#include #include #include diff --git a/src/melee/if/if_2F72.h b/src/melee/if/if_2F72.h index 8265b72047..a8af93c6ce 100644 --- a/src/melee/if/if_2F72.h +++ b/src/melee/if/if_2F72.h @@ -2,7 +2,6 @@ #define GALE01_2F7288 #include - #include /* 2F7AF8 */ void if_802F7AF8(s32); diff --git a/src/melee/if/ifall.c b/src/melee/if/ifall.c index ce30819ddd..a63a503569 100644 --- a/src/melee/if/ifall.c +++ b/src/melee/if/ifall.c @@ -1,4 +1,4 @@ -#include "ifall__static.h" +#include "ifall.static.h" /// #ifAll_802F3394 diff --git a/src/melee/if/ifall.h b/src/melee/if/ifall.h index c36bcee28e..9ee43bd667 100644 --- a/src/melee/if/ifall.h +++ b/src/melee/if/ifall.h @@ -2,7 +2,6 @@ #define GALE01_2F3394 #include - #include /* 2F3394 */ UNK_RET ifAll_802F3394(UNK_PARAMS); diff --git a/src/melee/if/ifall__static.h b/src/melee/if/ifall.static.h similarity index 100% rename from src/melee/if/ifall__static.h rename to src/melee/if/ifall.static.h index b6c0d5fa63..8d7bd5cffc 100644 --- a/src/melee/if/ifall__static.h +++ b/src/melee/if/ifall.static.h @@ -1,10 +1,10 @@ #ifndef __GALE01_2F3394 #define __GALE01_2F3394 -#include "ifall.h" // IWYU pragma: export - #include +#include "ifall.h" // IWYU pragma: export + struct ifAll_804A0FD8_t { /* 0x00 */ s32 unk_0; /* 0x04 */ char pad_4[8]; /* maybe part of unk_0[3]? */ diff --git a/src/melee/if/ifstatus.c b/src/melee/if/ifstatus.c index 44d6130e07..2f6464b353 100644 --- a/src/melee/if/ifstatus.c +++ b/src/melee/if/ifstatus.c @@ -1,3 +1,5 @@ +#include + #include "if/ifstatus.h" #include "ifall.h" @@ -9,7 +11,6 @@ #include "if/types.h" #include "pl/player.h" -#include #include #include #include @@ -359,7 +360,7 @@ void ifStatus_802F68F0(void) void ifStatus_802F6948(s32 player_idx) { IfDamageState* hud_player; - Placeholder_8016AE50_ret_val* small_thing; + Placeholder_8016AE38_flags_2* small_thing; IfDamageFlags* hud_player_flags; small_thing = gm_8016AE50(); @@ -368,7 +369,7 @@ void ifStatus_802F6948(s32 player_idx) if (hud_player_flags->explode_animation != 1) { hud_player_flags->explode_animation = 1; hud_player_flags->randomize_velocity = 1; - if (small_thing->flags.unk1 != 0) { + if (small_thing->x1 != 0) { hud_player->unk9 = 1; } } @@ -378,27 +379,28 @@ void ifStatus_802F69C0(s32 player_idx, s32 arg1) { IfDamageState* hud_player; IfDamageFlags* hud_player_flags; - Placeholder_8016AE38_ret_val* big_thing; - Placeholder_8016AE50_ret_val* small_thing; + lbl_8046B6A0_t* big_thing; + Placeholder_8016AE38_flags_2* small_thing; big_thing = gm_8016AE38(); - if ((big_thing->unk24C8.top3 != 1U) && (big_thing->unk24CA.unk4 != 0)) { + if ((big_thing->unk24C8.x0_b0_b2 != 1U) && (big_thing->unk24C8.x2_b5 != 0)) + { if_802F7C30(arg1); } big_thing = gm_8016AE38(); - big_thing->unkD = player_idx; + big_thing->unk_D = player_idx; small_thing = gm_8016AE50(); hud_player = &ifStatus_HudInfo.players[player_idx]; hud_player_flags = &hud_player->flags; if (hud_player_flags->explode_animation != 1) { hud_player_flags->explode_animation = 1; hud_player_flags->randomize_velocity = 1; - if (small_thing->flags.unk1 != 0) { + if (small_thing->x1 != 0) { hud_player->unk9 = 1; } } - if ((big_thing->unk24CA.unk80 != 0) && + if ((big_thing->unk24C8.x2_b0 != 0) && ((Player_GetPlayerSlotType(player_idx) == 0) || (Player_GetPlayerSlotType(player_idx) == 1)) && (Player_GetStocks(player_idx) == 0)) @@ -406,9 +408,9 @@ void ifStatus_802F69C0(s32 player_idx, s32 arg1) gm_8016B8D4(player_idx, Player_GetPlayerSlotType(player_idx) & 0xFF); } - /// @todo Weird check on a known function addr - if ((big_thing->unk24C8.top3 != 1U) && (big_thing->unk24CA.unk4 != 0) && - (&if_802F7BB4 != NULL)) + /// @todo Inline with callback arg + if ((big_thing->unk24C8.x0_b0_b2 != 1U) && + (big_thing->unk24C8.x2_b5 != 0) && (&if_802F7BB4 != NULL)) { if_802F7BB4(player_idx); } @@ -417,23 +419,23 @@ void ifStatus_802F69C0(s32 player_idx, s32 arg1) void ifStatus_802F6AF8(s32 player_idx) { IfDamageState* hud_player; - Placeholder_8016AE38_ret_val* big_thing; - Placeholder_8016AE50_ret_val* small_thing; + lbl_8046B6A0_t* big_thing; + Placeholder_8016AE38_flags_2* small_thing; IfDamageFlags* hud_player_flags; big_thing = gm_8016AE38(); - big_thing->unkD = player_idx; + big_thing->unk_D = player_idx; small_thing = gm_8016AE50(); hud_player = &ifStatus_HudInfo.players[player_idx]; hud_player_flags = &hud_player->flags; if (hud_player_flags->explode_animation != 1) { hud_player_flags->explode_animation = 1; hud_player_flags->randomize_velocity = 1; - if (small_thing->flags.unk1 != 0) { + if (small_thing->x1 != 0) { hud_player->unk9 = 1; } } - if ((big_thing->unk24CA.unk80 != 0) && + if ((big_thing->unk24C8.x2_b0 != 0) && ((Player_GetPlayerSlotType(player_idx) == 0) || (Player_GetPlayerSlotType(player_idx) == 1)) && (Player_GetStocks(player_idx) == 0)) @@ -441,9 +443,9 @@ void ifStatus_802F6AF8(s32 player_idx) gm_8016B8D4(player_idx, Player_GetPlayerSlotType(player_idx) & 0xFF); } - /// @todo Weird check on a known function addr - if ((big_thing->unk24C8.top3 != 1U) && (big_thing->unk24CA.unk4 != 0) && - (&if_802F7AF8 != NULL)) + /// @todo Inline with callback arg + if ((big_thing->unk24C8.x0_b0_b2 != 1U) && + (big_thing->unk24C8.x2_b5 != 0) && (&if_802F7AF8 != NULL)) { if_802F7AF8(player_idx); } @@ -453,22 +455,22 @@ void ifStatus_802F6C04(s32 player_idx) { IfDamageState* hud_player; IfDamageFlags* hud_player_flags; - Placeholder_8016AE38_ret_val* big_thing; - Placeholder_8016AE50_ret_val* small_thing; + lbl_8046B6A0_t* big_thing; + Placeholder_8016AE38_flags_2* small_thing; big_thing = gm_8016AE38(); - big_thing->unkD = player_idx; + big_thing->unk_D = player_idx; small_thing = gm_8016AE50(); hud_player = &ifStatus_HudInfo.players[player_idx]; hud_player_flags = &hud_player->flags; if (hud_player_flags->explode_animation != 1) { hud_player_flags->explode_animation = 1; hud_player_flags->randomize_velocity = 1; - if (small_thing->flags.unk1 != 0) { + if (small_thing->x1 != 0) { hud_player->unk9 = 1; } } - if ((big_thing->unk24CA.unk80 != 0) && + if ((big_thing->unk24C8.x2_b0 != 0) && ((Player_GetPlayerSlotType(player_idx) == 0) || (Player_GetPlayerSlotType(player_idx) == 1)) && (Player_GetStocks(player_idx) == 0)) @@ -476,9 +478,9 @@ void ifStatus_802F6C04(s32 player_idx) gm_8016B8D4(player_idx, Player_GetPlayerSlotType(player_idx) & 0xFF); } - /// @todo Weird check on a known function addr - if ((big_thing->unk24C8.top3 != 1U) && (big_thing->unk24CA.unk4 != 0) && - (&if_802F7C30 != NULL)) + /// @todo Inline with callback arg + if ((big_thing->unk24C8.x0_b0_b2 != 1U) && + (big_thing->unk24C8.x2_b5 != 0) && (&if_802F7C30 != NULL)) { if_802F7C30(player_idx); } @@ -487,23 +489,23 @@ void ifStatus_802F6C04(s32 player_idx) void ifStatus_802F6D10(s32 player_idx) { IfDamageState* hud_player; - Placeholder_8016AE38_ret_val* big_thing; - Placeholder_8016AE50_ret_val* small_thing; + lbl_8046B6A0_t* big_thing; + Placeholder_8016AE38_flags_2* small_thing; IfDamageFlags* hud_player_flags; big_thing = gm_8016AE38(); - big_thing->unkD = player_idx; + big_thing->unk_D = player_idx; small_thing = gm_8016AE50(); hud_player = &ifStatus_HudInfo.players[player_idx]; hud_player_flags = &hud_player->flags; if (hud_player_flags->explode_animation != 1) { hud_player_flags->explode_animation = 1; hud_player_flags->randomize_velocity = 1; - if (small_thing->flags.unk1 != 0) { + if (small_thing->x1 != 0) { hud_player->unk9 = 1; } } - if ((big_thing->unk24CA.unk80 != 0) && + if ((big_thing->unk24C8.x2_b0 != 0) && ((Player_GetPlayerSlotType(player_idx) == 0) || (Player_GetPlayerSlotType(player_idx) == 1)) && (Player_GetStocks(player_idx) == 0)) @@ -511,9 +513,9 @@ void ifStatus_802F6D10(s32 player_idx) gm_8016B8D4(player_idx, Player_GetPlayerSlotType(player_idx) & 0xFF); } - /// @todo Weird check on a known function addr - if ((big_thing->unk24C8.top3 != 1U) && (big_thing->unk24CA.unk4 != 0) && - (&if_802F7D08 != NULL)) + /// @todo Inline with callback arg + if ((big_thing->unk24C8.x0_b0_b2 != 1U) && + (big_thing->unk24C8.x2_b5 != 0) && (&if_802F7D08 != NULL)) { if_802F7D08(player_idx); } diff --git a/src/melee/if/ifstatus.h b/src/melee/if/ifstatus.h index 57432035c4..c1df61bdca 100644 --- a/src/melee/if/ifstatus.h +++ b/src/melee/if/ifstatus.h @@ -2,6 +2,7 @@ #define GALE01_2F4910 #include + #include "if/forward.h" #include diff --git a/src/melee/if/types.h b/src/melee/if/types.h index 572fabffcd..e85ba2cc71 100644 --- a/src/melee/if/types.h +++ b/src/melee/if/types.h @@ -2,11 +2,11 @@ #define MELEE_IF_TYPES_H #include +#include + #include "if/forward.h" // IWYU pragma: export #include -#include - struct IfDamageFlags { u8 explode_animation : 1; u8 randomize_velocity : 1; diff --git a/src/melee/it/itCommonItems.h b/src/melee/it/itCommonItems.h index 7ba86419af..7e9cb4d240 100644 --- a/src/melee/it/itCommonItems.h +++ b/src/melee/it/itCommonItems.h @@ -4,10 +4,11 @@ #define MELEE_IT_ITCOMMONITEMS_H #include +#include + #include #include -#include #include typedef struct { @@ -84,7 +85,7 @@ typedef struct itHeart_ItemVars { u8 b5 : 1; u8 b6 : 1; u8 b7 : 1; - } bits; + }; u32 flags; } xDD8; s32 xDDC; @@ -127,7 +128,7 @@ typedef struct itTomato_ItemVars { u8 b5 : 1; u8 b6 : 1; u8 b7 : 1; - } bits; + }; u32 flags; } x4; s32 x8; @@ -254,7 +255,7 @@ typedef struct itPikachutJoltGround_ItemVars { typedef struct itSamusGrapple_ItemVars { /* +0 +DD4 */ char pad_0[0x10]; - /* +10 +DE4 */ UNK_T unk_10; + /* +10 +DE4 */ UNK_RET (*unk_10)(UNK_PARAMS); } itSamusGrapple_ItemVars; /// @remarks Might be shared? @@ -386,4 +387,10 @@ typedef struct itKinoko_ItemVars { f32 xC; } itKinoko_ItemVars; +typedef struct itTaruCann_DatAttrs { + /* +0 */ char pad_0[0x28]; + /* +28 */ int x28; + /* +2C */ int x2C; +} itTaruCann_DatAttrs; + #endif diff --git a/src/melee/it/itPKFlash.h b/src/melee/it/itPKFlash.h index f83a722fae..d1b6d325db 100644 --- a/src/melee/it/itPKFlash.h +++ b/src/melee/it/itPKFlash.h @@ -2,6 +2,7 @@ #define MELEE_IT_ITPKFLASH_H #include + #include typedef struct itPKFlush_ItemVars { diff --git a/src/melee/it/itPKThunder.h b/src/melee/it/itPKThunder.h index 1640bc4417..7b27c00da4 100644 --- a/src/melee/it/itPKThunder.h +++ b/src/melee/it/itPKThunder.h @@ -2,6 +2,7 @@ #define MELEE_IT_ITPKTHUNDER_H #include + #include #include diff --git a/src/melee/it/it_266F.c b/src/melee/it/it_266F.c index 879d9b128d..4ea85ee60a 100644 --- a/src/melee/it/it_266F.c +++ b/src/melee/it/it_266F.c @@ -227,7 +227,7 @@ void fn_8026C88C(HSD_GObj* gobj) spawn.x3C_damage = 0; spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0F; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj = NULL; - spawn.x44_flag.bits.b0 = 1; + spawn.x44_flag.b0 = 1; spawn.x40 = 0; var_r4 = 1; } else { @@ -562,7 +562,7 @@ void it_8026D62C(Item_GObj* gobj, HSD_GObjEvent arg1) arg1(gobj); return; } - if ((it_80277544(gobj) != 0) && !ip->xDCD_flag.bits.b3) { + if ((it_80277544(gobj) != 0) && !ip->xDCD_flag.b3) { Item_8026ADC0(gobj); } } @@ -783,7 +783,7 @@ s32 it_8026DC24(HSD_GObj* gobj) return 0; } } - if (ip->xDCD_flag.bits.b3 || (attr->x58 == 0.0f)) { + if (ip->xDCD_flag.b3 || (attr->x58 == 0.0f)) { ip->x40_vel.x = ip->x40_vel.y = ip->x40_vel.z = 0.0F; return 1; } @@ -795,7 +795,7 @@ s32 it_8026DD5C(Item_GObj* gobj) Item* ip = GET_ITEM(gobj); ip->xD50_landNum = 0; it_802762B0(ip); - if ((it_80277040(gobj) == 0) || ip->xDCD_flag.bits.b3) { + if ((it_80277040(gobj) == 0) || ip->xDCD_flag.b3) { it_80274740(gobj); it_80276CEC(gobj); return 1; @@ -1074,9 +1074,8 @@ u32 it_8026ECE0(Item_GObj* gobj, u32 arg1) var_r30 = 0; ip = GET_ITEM(gobj); if ((enum ItemKind) ip->kind == It_Kind_Unk4) { - if (((ip->xDAA_flag.bits.b7) && - (ip->xDD4_itemVar.it_266F.x18.bits.b7 == 0)) || - (ip->xDD4_itemVar.it_266F.x18.bits.b6 && + if (((ip->xDAA_flag.b7) && (ip->xDD4_itemVar.it_266F.x18.b7 == 0)) || + (ip->xDD4_itemVar.it_266F.x18.b6 && (lbColl_8000A10C(&ip->xDD4_itemVar.it_266F.x1C, arg1, ip->scl) != 0))) { @@ -1084,8 +1083,8 @@ u32 it_8026ECE0(Item_GObj* gobj, u32 arg1) } } else { temp_r3_2 = ip->xDAA_flag.u8; - if (ip->xDAA_flag.bits.b6) { - if (ip->xDAA_flag.bits.b2) { + if (ip->xDAA_flag.b6) { + if (ip->xDAA_flag.b2) { u32 idx = 0; do { if (lbColl_80009F54(&ip->x5D4_hitboxes[idx].hit, arg1, @@ -1096,7 +1095,7 @@ u32 it_8026ECE0(Item_GObj* gobj, u32 arg1) idx += 1; } while (idx < 4U); } - if (!ip->xDCC_flag.b2 && ip->xDAA_flag.bits.b2) { + if (!ip->xDCC_flag.b2 && ip->xDAA_flag.b2) { if ((s32) ip->xD0C == 0) { u32 idx = 0; while (idx < ip->xAC8_hurtboxNum) { @@ -1121,13 +1120,13 @@ u32 it_8026ECE0(Item_GObj* gobj, u32 arg1) } } } - if (ip->xDAA_flag.bits.b7 && ip->xDC8_word.flags.x8 && + if (ip->xDAA_flag.b7 && ip->xDC8_word.flags.x8 && (lbGx_8001E2F8((Vec4*) &ip->xBCC_unk, &ip->pos, &it_804D5168, arg1, ip->facing_dir) != 0)) { var_r30 = 1; } - if (ip->xDAA_flag.bits.b4 && ip->xDD0_flag.bits.b1 && + if (ip->xDAA_flag.b4 && ip->xDD0_flag.b1 && (lb_800149E0(&ip->xACC_itemHurtbox[1].b_pos.z, arg1) != 0)) { var_r30 = 1; @@ -1152,11 +1151,11 @@ static inline void it_8026EECC_inline_1(HSD_GObj* gobj, s32 arg1, Vec3* pos) { Item* ip = gobj->user_data; Vec3* new_pos = NULL; - ip->xDCF_flag.bits.b2 = 1; - ip->xDCF_flag.bits.b3 = 0; + ip->xDCF_flag.b2 = 1; + ip->xDCF_flag.b3 = 0; it_8026EC54_inline(gobj, ip); it_8026EBC8_inline(gobj, ip); - if (ip->xDCF_flag.bits.b0) { + if (ip->xDCF_flag.b0) { new_pos = pos; } it_8026EB18(gobj, arg1, new_pos); @@ -1168,9 +1167,9 @@ static inline void it_8026EECC_inline_2(HSD_GObj* gobj, s32 arg1, Vec3* pos) { Item* ip = gobj->user_data; Vec3* new_pos = NULL; - ip->xDCF_flag.bits.b2 = 0; - ip->xDCF_flag.bits.b3 = 0; - if (ip->xDCF_flag.bits.b0) { + ip->xDCF_flag.b2 = 0; + ip->xDCF_flag.b3 = 0; + if (ip->xDCF_flag.b0) { new_pos = pos; } it_8026EB18(gobj, arg1, new_pos); @@ -1180,11 +1179,11 @@ static inline void it_8026EECC_inline_3(HSD_GObj* gobj, s32 arg1, Vec3* pos) { Item* ip = gobj->user_data; Vec3* new_pos = NULL; - ip->xDCF_flag.bits.b2 = 1; - ip->xDCF_flag.bits.b3 = 1; + ip->xDCF_flag.b2 = 1; + ip->xDCF_flag.b3 = 1; it_8026EC54_inline(gobj, ip); it_8026EBC8_inline(gobj, ip); - if (ip->xDCF_flag.bits.b0) { + if (ip->xDCF_flag.b0) { new_pos = pos; } else { new_pos = NULL; @@ -1198,7 +1197,7 @@ void it_8026EECC(HSD_GObj* gobj, int arg1) { Item* ip = gobj->user_data; Vec3 pos; - if (ip->xDAA_flag.bits.b0) { + if (ip->xDAA_flag.b0) { pos.x = pos.y = pos.z = 0.0F; if (ip->xDCC_flag.b0) { if ((ip->owner == NULL) || (ftLib_80086960(ip->owner) == 0) || @@ -1206,12 +1205,12 @@ void it_8026EECC(HSD_GObj* gobj, int arg1) { { Item* ip = gobj->user_data; - ip->xDCF_flag.bits.b0 = 0; + ip->xDCF_flag.b0 = 0; if ((ip->owner != NULL) && (ftLib_80086960(ip->owner) != 0)) { if (ftLib_80087074(ip->owner, &pos) != 0) { - ip->xDCF_flag.bits.b0 = 1; + ip->xDCF_flag.b0 = 1; } } else { pos.x = pos.y = pos.z = 0.0F; @@ -1222,14 +1221,14 @@ void it_8026EECC(HSD_GObj* gobj, int arg1) Item* ip = gobj->user_data; switch (Camera_80031060()) { case 1: - if (ip->xDCF_flag.bits.b2) { + if (ip->xDCF_flag.b2) { it_8026EECC_inline_1(gobj, arg1, &pos); it_8026EECC_inline_2(gobj, arg1, &pos); it_8026EECC_inline_3(gobj, arg1, &pos); } break; case 0: - if (!ip->xDCF_flag.bits.b2) { + if (!ip->xDCF_flag.b2) { it_8026EECC_inline_2(gobj, arg1, &pos); } break; @@ -1241,14 +1240,14 @@ void it_8026EECC(HSD_GObj* gobj, int arg1) Item* ip = gobj->user_data; switch (Camera_80031060()) { case 1: - if (ip->xDCF_flag.bits.b2) { + if (ip->xDCF_flag.b2) { it_8026EECC_inline_1(gobj, arg1, &pos); it_8026EECC_inline_2(gobj, arg1, &pos); it_8026EECC_inline_3(gobj, arg1, &pos); } break; case 0: - if (!ip->xDCF_flag.bits.b2) { + if (!ip->xDCF_flag.b2) { it_8026EECC_inline_2(gobj, arg1, &pos); } break; diff --git a/src/melee/it/it_266F.h b/src/melee/it/it_266F.h index 90168bf93e..2e65694d0d 100644 --- a/src/melee/it/it_266F.h +++ b/src/melee/it/it_266F.h @@ -2,6 +2,8 @@ #define GALE01_26C47C #include +#include + #include "ft/forward.h" #include "lb/forward.h" #include @@ -9,8 +11,6 @@ #include "it/types.h" -#include - /* 26C47C */ void it_8026C47C(struct it_8026C47C_arg0_t* arg0); /* 26C530 */ s32 it_8026C530(s32, void*, s32, s32); /* 26C65C */ u8 it_8026C65C(HSD_ObjAllocUnk6*); diff --git a/src/melee/it/it_26B1.c b/src/melee/it/it_26B1.c index b23dc23bb7..2e0edcbea4 100644 --- a/src/melee/it/it_26B1.c +++ b/src/melee/it/it_26B1.c @@ -1,3 +1,5 @@ +#include + #include #include "it_26B1.h" @@ -25,7 +27,6 @@ #include "it/types.h" #include -#include #include #include #include @@ -775,7 +776,7 @@ void it_8026BC14(HSD_GObj* gobj) bool it_8026BC68(HSD_GObj* gobj) { Item* ip = GET_ITEM(gobj); - return ip->xDD0_flag.bits.b0; + return ip->xDD0_flag.b0; } /// @returns #Item::owner of @p gobj. @@ -810,21 +811,21 @@ void it_8026BC90(HSD_GObj* gobj, Vec3* pos) void it_8026BCF4(HSD_GObj* gobj) { Item* ip = GET_ITEM(gobj); - ip->xDCD_flag.bits.b2 = false; + ip->xDCD_flag.b2 = false; } /// Sets #Item::xDCD_flag::bits::b2 of @p gobj. void it_8026BD0C(HSD_GObj* gobj) { Item* ip = GET_ITEM(gobj); - ip->xDCD_flag.bits.b2 = true; + ip->xDCD_flag.b2 = true; } /// Sets #Item::xDD0_flag::bits::b3 of @p gobj. void it_8026BD24(HSD_GObj* gobj) { Item* ip = GET_ITEM(gobj); - ip->xDD0_flag.bits.b3 = true; + ip->xDD0_flag.b3 = true; } /// Sets #Item::xDCC_flag::bits::b3 of @p gobj. @@ -845,14 +846,14 @@ void it_8026BD54(HSD_GObj* gobj) void it_8026BD6C(HSD_GObj* gobj) { Item* ip = GET_ITEM(gobj); - ip->xDCD_flag.bits.b3 = true; + ip->xDCD_flag.b3 = true; } /// Sets #Item::xDCD_flag::bits::b4 of @p gobj. void it_8026BD84(HSD_GObj* gobj) { Item* ip = GET_ITEM(gobj); - ip->xDCD_flag.bits.b4 = true; + ip->xDCD_flag.b4 = true; } /// Sets #Item::xDC8_word::flags::x1A of @p gobj. @@ -875,7 +876,7 @@ void it_8026BDCC(HSD_GObj* gobj) /// @todo Each of these is an inlined function. Some are already defined. { Item* ip = GET_ITEM(gobj); - ip->xDD0_flag.bits.b3 = false; + ip->xDD0_flag.b3 = false; } { @@ -885,12 +886,12 @@ void it_8026BDCC(HSD_GObj* gobj) { Item* ip = GET_ITEM(gobj); - ip->xDCD_flag.bits.b3 = false; + ip->xDCD_flag.b3 = false; } { Item* ip = GET_ITEM(gobj); - ip->xDCD_flag.bits.b4 = false; + ip->xDCD_flag.b4 = false; } { @@ -905,7 +906,7 @@ void it_8026BE28(HSD_GObj* gobj) /// @todo Each of these is an inlined function. Some are already defined. { Item* ip = GET_ITEM(gobj); - ip->xDD0_flag.bits.b3 = true; + ip->xDD0_flag.b3 = true; } { @@ -915,12 +916,12 @@ void it_8026BE28(HSD_GObj* gobj) { Item* ip = GET_ITEM(gobj); - ip->xDCD_flag.bits.b3 = true; + ip->xDCD_flag.b3 = true; } { Item* ip = GET_ITEM(gobj); - ip->xDCD_flag.bits.b4 = true; + ip->xDCD_flag.b4 = true; } { @@ -1051,18 +1052,18 @@ HSD_GObj* it_8026BE84(BobOmbRain* bobOmbRain) break; } - if (bobOmbGObj != NULL && bobOmbRain->x1C.bits.b0) { + if (bobOmbGObj != NULL && bobOmbRain->x1C.b0) { ip = bobOmbGObj->user_data; - ip->xDD0_flag.bits.b3 = true; + ip->xDD0_flag.b3 = true; item_data_2 = bobOmbGObj->user_data; item_data_2->xDCC_flag.b3 = false; item_data_3 = bobOmbGObj->user_data; - item_data_3->xDCD_flag.bits.b3 = true; + item_data_3->xDCD_flag.b3 = true; item_data_4 = bobOmbGObj->user_data; - item_data_4->xDCD_flag.bits.b4 = true; + item_data_4->xDCD_flag.b4 = true; item_data_5 = bobOmbGObj->user_data; item_data_5->xDC8_word.flags.x1A = false; @@ -1191,7 +1192,7 @@ void it_8026C368(HSD_GObj* gobj) { Item* ip = GET_ITEM(gobj); - if (ip->x378_itemColl.x34_flags.bits.b7) { + if (ip->x378_itemColl.x34_flags.b7) { ItemKind kind = ip->kind; switch (kind) { case It_Kind_BombHei: diff --git a/src/melee/it/it_26B1.h b/src/melee/it/it_26B1.h index a16a276bb9..fc741a7800 100644 --- a/src/melee/it/it_26B1.h +++ b/src/melee/it/it_26B1.h @@ -2,6 +2,7 @@ #define GALE01_26B1D4 #include + #include "it/forward.h" #include "lb/forward.h" #include diff --git a/src/melee/it/it_2725.h b/src/melee/it/it_2725.h index 21b771b0e8..7f694c4e21 100644 --- a/src/melee/it/it_2725.h +++ b/src/melee/it/it_2725.h @@ -2,6 +2,8 @@ #define GALE01_272560 #include +#include + #include "ft/forward.h" #include "it/forward.h" #include @@ -9,8 +11,6 @@ #include "it/items/types.h" #include "lb/types.h" -#include - /* 272560 */ UNK_RET it_80272560(UNK_PARAMS); /* 2725D4 */ void it_802725D4(Item_GObj*); /* 272674 */ UNK_RET it_80272674(UNK_PARAMS); diff --git a/src/melee/it/item.c b/src/melee/it/item.c index aee5b7d5b4..51e9dbc0cd 100644 --- a/src/melee/it/item.c +++ b/src/melee/it/item.c @@ -136,7 +136,7 @@ void Item_80266FCC(void) Item_804A0C64.x5C = it_804D6D28->x28; Item_804A0C64.x64 = it_804D6D28->x148; - Item_804A0CCC.x154.bits.b0 = true; + Item_804A0CCC.x154.b0 = true; Item_804A0CCC.x150 = 1; Item_804A0E24.x = -1; @@ -262,13 +262,13 @@ void Item_80267454(HSD_GObj* gobj) { Item* item_data = gobj->user_data; - if (item_data->xDCD_flag.bits.b01 != 0 && + if (item_data->xDCD_flag.b01 != 0 && (item_data->x520_cameraBox != NULL)) { Camera_800290D4(item_data->x520_cameraBox); item_data->x520_cameraBox = NULL; - item_data->xDCD_flag.bits.b01 = 0; + item_data->xDCD_flag.b01 = 0; } } @@ -573,8 +573,8 @@ static void Item_80267AA8(HSD_GObj* gobj, SpawnItem* spawnItem) item_data->xDC4 = 0; item_data->xDC8_word.flags.xF = 0; item_data->xCC4 = 0; - item_data->xDCF_flag.bits.b6 = 0; - item_data->xDCF_flag.bits.b7 = 0; + item_data->xDCF_flag.b6 = 0; + item_data->xDCF_flag.b7 = 0; item_data->xCB0_source_ply = 6; item_data->xCB4 = -1; item_data->xC38 = -1; @@ -584,7 +584,7 @@ static void Item_80267AA8(HSD_GObj* gobj, SpawnItem* spawnItem) item_data->xCDC = 0.0f; item_data->xCD8 = 0.0f; item_data->xCD4 = 0.0f; - item_data->xDD0_flag.bits.b1 = 0; + item_data->xDD0_flag.b1 = 0; item_data->xDC8_word.flags.x14 = 0; item_data->xDC8_word.flags.xE = 0; item_data->xCEC_fighterGObj = NULL; @@ -600,7 +600,7 @@ static void Item_80267AA8(HSD_GObj* gobj, SpawnItem* spawnItem) item_data->xC68 = 0.0f; item_data->xCD0 = 0.0f; it_80275158(gobj, it_804D6D28->x30); - item_data->xDD0_flag.bits.b3 = false; + item_data->xDD0_flag.b3 = false; item_data->spin_spd = item_data->xCC_item_attr->xC_spin_speed; item_data->xDC8_word.flags.x19 = item_data->xCC_item_attr->x1_3; item_data->xDC8_word.flags.x17 = item_data->xCC_item_attr->x1_1; @@ -621,8 +621,8 @@ static void Item_80267AA8(HSD_GObj* gobj, SpawnItem* spawnItem) item_data->xBFC = item_data->xC0C; item_data->xDC8_word.flags.xC = item_data->xCC_item_attr->x1_5; item_data->xDC8_word.flags.xD = 1; - item_data->xDCD_flag.bits.b01 = item_data->xCC_item_attr->x1_67_cam_kind; - item_data->xDCE_flag.bits.b3 = 0; + item_data->xDCD_flag.b01 = item_data->xCC_item_attr->x1_67_cam_kind; + item_data->xDCE_flag.b3 = 0; item_data->xD54_throwNum = 0; item_data->xD50_landNum = 0; item_data->xD58 = 0; @@ -631,8 +631,8 @@ static void Item_80267AA8(HSD_GObj* gobj, SpawnItem* spawnItem) item_data->xDCC_flag.b4567 = 15; item_data->xAC4_ignoreItemID = spawnItem->x40; item_data->destroy_type = 4; - item_data->xDCE_flag.bits.b5 = 0; - item_data->xDCE_flag.bits.b4 = 0; + item_data->xDCE_flag.b5 = 0; + item_data->xDCE_flag.b4 = 0; item_data->xC54 = 0.0f; item_data->xC58.x = 0.0f; item_data->xC58.x = 0.0f; @@ -644,9 +644,9 @@ static void Item_80267AA8(HSD_GObj* gobj, SpawnItem* spawnItem) item_data->xDC8_word.flags.x6 = 0; item_data->xDC8_word.flags.x7 = 0; item_data->xDC8_word.flags.x8 = 0; - item_data->xDD0_flag.bits.b5 = 0; + item_data->xDD0_flag.b5 = 0; item_data->xD09 = (s8) 0; - item_data->xDD0_flag.bits.b4 = 0; + item_data->xDD0_flag.b4 = 0; item_data->xCA8 = 0; item_data->xCBC_hitlagFrames = 0.0f; item_data->xCC0 = 0.0f; @@ -656,21 +656,21 @@ static void Item_80267AA8(HSD_GObj* gobj, SpawnItem* spawnItem) item_data->xC70 = 1.0f; item_data->xC6C = 1.0f; item_data->xDCC_flag.b2 = 0; - item_data->xDD0_flag.bits.b0 = false; - item_data->xDCE_flag.bits.b6 = false; - item_data->xDCF_flag.bits.b0 = false; - item_data->xDCF_flag.bits.b1 = false; - item_data->xDCF_flag.bits.b2 = false; - item_data->xDD1_flag.bits.b0 = false; - item_data->xDCE_flag.bits.b7 = 1; + item_data->xDD0_flag.b0 = false; + item_data->xDCE_flag.b6 = false; + item_data->xDCF_flag.b0 = false; + item_data->xDCF_flag.b1 = false; + item_data->xDCF_flag.b2 = false; + item_data->xDD1_flag.b0 = false; + item_data->xDCE_flag.b7 = 1; item_data->scl = item_data->xCC_item_attr->x60_scale; item_data->x3C = 0.0f; - item_data->xDCD_flag.bits.b3 = false; - item_data->xDCD_flag.bits.b4 = false; - item_data->xDD0_flag.bits.b7 = false; + item_data->xDCD_flag.b3 = false; + item_data->xDCD_flag.b4 = false; + item_data->xDD0_flag.b7 = false; item_data->xBC0 = 0; - item_data->xDD1_flag.bits.b1 = false; - item_data->xDCD_flag.bits.b2 = false; + item_data->xDD1_flag.b1 = false; + item_data->xDCD_flag.b2 = false; item_data->xD6C = -1; item_data->sfx_unk2 = SFX_NONE; item_data->sfx_unk1 = SFX_NONE; @@ -701,14 +701,14 @@ static void Item_80267AA8(HSD_GObj* gobj, SpawnItem* spawnItem) it_80279B64(item_data); - item_data->xDCF_flag.bits.b3 = false; - item_data->xDCF_flag.bits.b4 = false; - item_data->xDCF_flag.bits.b5 = false; + item_data->xDCF_flag.b3 = false; + item_data->xDCF_flag.b4 = false; + item_data->xDCF_flag.b5 = false; item_data->xDAA_byte = 1; - if (db_80225B20() != NULL) { - item_data->xDAA_flag.bits.b4 = true; + if (db_80225B20()) { + item_data->xDAA_flag.b4 = true; } if (spawnItem->x0_parent_gobj == NULL) { @@ -903,17 +903,17 @@ static void foobar(HSD_GObj* gobj) case 0: case 6: if (it->xD0C == 2) { - it->xDD0_flag.bits.b7 = 1; + it->xDD0_flag.b7 = 1; } it->xD40 = it_804D6D28->x2C; - it->xDD0_flag.bits.b6 = 1; + it->xDD0_flag.b6 = 1; it_802756D0(gobj); it_80279B88(it, 3, 0); break; default: it->xD40 = 0.0f; - it->xDD0_flag.bits.b6 = 0; + it->xDD0_flag.b6 = 0; } } @@ -934,8 +934,8 @@ static void foobar3(HSD_GObj* gobj) { Item* it = (Item*) HSD_GObjGetUserData(gobj); CameraBox* cam_box; - if (it->xDCD_flag.bits.b01 != 0) { - if (it->xDCD_flag.bits.b01 == 1) { + if (it->xDCD_flag.b01 != 0) { + if (it->xDCD_flag.b01 == 1) { it->x520_cameraBox = Camera_80029044(0); } else { it->x520_cameraBox = Camera_80029044(2); @@ -1277,7 +1277,7 @@ void Item_80268E5C(HSD_GObj* gobj, enum_t msid, Item_StateChangeFlags flags) item_data->exited_hitlag = NULL; item_data->jumped_on = NULL; - item_data->xDD0_flag.bits.b5 = false; + item_data->xDD0_flag.b5 = false; item_data->xD09 = 0; it_802714C0(gobj); @@ -1331,19 +1331,19 @@ static void Item_80269528(HSD_GObj* gobj) return; } } - if (item_data->xDD0_flag.bits.b6 != 0) { + if (item_data->xDD0_flag.b6 != 0) { item_data->xD40 -= 1.0f; if (item_data->xD40 <= 0.0f) { - item_data->xDD0_flag.bits.b6 = 0; + item_data->xDD0_flag.b6 = 0; item_data->xD40 = 0.0f; it_80279BBC(item_data); - if (item_data->xDD0_flag.bits.b7 == 0) { + if (item_data->xDD0_flag.b7 == 0) { it_802756E0(gobj); } } } if (item_data->xDC8_word.flags.x15 != 0 && - item_data->kind < It_Kind_L_Gun_Ray && !item_data->xDD0_flag.bits.b3) + item_data->kind < It_Kind_L_Gun_Ray && !item_data->xDD0_flag.b3) { item_data->xD44_lifeTimer -= 1.0f; if (item_data->xD44_lifeTimer <= 0.0f) { @@ -1407,7 +1407,7 @@ void Item_802697D4(HSD_GObj* gobj) if (item_data->xDC8_word.flags.x9 == 0) { PSVECAdd(&item_data->x40_vel, &item_data->x70_nudge, &sp1C); if ((item_data->ground_or_air == 0) && - (item_data->xDCD_flag.bits.b3 == 0)) + (item_data->xDCD_flag.b3 == 0)) { it_8027737C(gobj, &sp1C); } @@ -1422,14 +1422,13 @@ void Item_802697D4(HSD_GObj* gobj) it_80274A64(gobj); } } - if ((item_data->xDD1_flag.bits.b1 != 0) && (item_data->ground_or_air == 1)) - { + if ((item_data->xDD1_flag.b1 != 0) && (item_data->ground_or_air == 1)) { grLib_801C9E60(&item_data->x58_vec_unk); } PSVECAdd(&item_data->pos, &item_data->x58_vec_unk, &item_data->pos); it_80273484(gobj); if (item_data->ground_or_air == 0) { - if ((item_data->xDCE_flag.bits.b3 != 0) && (it_8026D604(gobj) != 0)) { + if ((item_data->xDCE_flag.b3 != 0) && (it_8026D604(gobj) != 0)) { mpLib_800567C0(item_data->xC30, &item_data->pos, &item_data->x64_vec_unk2); } else { @@ -1466,7 +1465,7 @@ static void Item_80269A9C(HSD_GObj* gobj) } } item_data = (Item*) HSD_GObjGetUserData(gobj); - if (item_data->xDCD_flag.bits.b01 != 0) { + if (item_data->xDCD_flag.b01 != 0) { CameraBox* cameraBox = item_data->x520_cameraBox; if (cameraBox != NULL) { cameraBox->x10 = item_data->pos; @@ -1499,7 +1498,7 @@ static /// @remarks Somewhat arbitrary. Does not run on Hook Shot / Grapple Item_80269BE4(HSD_GObj* gobj) { Item* item_data = gobj->user_data; - if (item_data->xDD0_flag.bits.b5) { + if (item_data->xDD0_flag.b5) { it_802701BC(gobj); if (item_data->grab_victim != NULL) { @@ -1546,7 +1545,7 @@ static void Item_80269CC4(HSD_GObj* gobj) temp_item->xC68 = 0.0f; temp_item->xCD0 = 0.0f; temp_item->xCC0 = 0.0f; - temp_item->xDCF_flag.bits.b6 = false; + temp_item->xDCF_flag.b6 = false; temp_item->xCC4 = 0; temp_item->xCEC_fighterGObj = 0; temp_item->xCF0_itemGObj = 0; @@ -1563,8 +1562,8 @@ static void Item_80269CC4(HSD_GObj* gobj) temp_item->xCDC = 0.0f; temp_item->xCD8 = 0.0f; temp_item->xCD4 = 0.0f; - temp_item->xDCE_flag.bits.b5 = false; - temp_item->xDCE_flag.bits.b4 = false; + temp_item->xDCE_flag.b5 = false; + temp_item->xDCE_flag.b4 = false; temp_item->xDCC_flag.b1 = false; temp_item->xC70 = 1.0f; temp_item->xC6C = 1.0f; @@ -1573,7 +1572,7 @@ static void Item_80269CC4(HSD_GObj* gobj) temp_item->xCA8 = 0; temp_item->xDC8_word.flags.x3 = false; temp_item->xDC8_word.flags.x4 = false; - temp_item->xDCE_flag.bits.b6 = false; + temp_item->xDCE_flag.b6 = false; } static bool Item_80269DC8(HSD_GObj* gobj) @@ -1582,11 +1581,11 @@ static bool Item_80269DC8(HSD_GObj* gobj) HSD_GObjPredicate hit_shield; Item* item_data = gobj->user_data; - if (item_data->xDCE_flag.bits.b5 && item_data->ground_or_air == 1 && - (item_data->xDCE_flag.bits.b4 || + if (item_data->xDCE_flag.b5 && item_data->ground_or_air == 1 && + (item_data->xDCE_flag.b4 || item_data->xC54 < (f32) M_PI / 180 * (90 + it_804D6D28->unk_degrees))) { - if (item_data->xDCE_flag.bits.b4 == 0) { + if (item_data->xDCE_flag.b4 == 0) { item_data->xC54 -= M_PI / 2; if (item_data->xC54 < 0.0f) { item_data->xC54 = 0.0f; @@ -1839,7 +1838,7 @@ static void Item_8026A294(HSD_GObj* gobj) { return; } - } else if (item_data->xDCE_flag.bits.b6) { + } else if (item_data->xDCE_flag.b6) { if (processCallback(item_data->touched, gobj, item_data)) { return; } @@ -1975,10 +1974,10 @@ static void func_8026A8EC_inline3(HSD_GObj* gobj) { Item* it = (Item*) HSD_GObjGetUserData(gobj); - if (it->xDCD_flag.bits.b01 != 0 && it->x520_cameraBox != NULL) { + if (it->xDCD_flag.b01 != 0 && it->x520_cameraBox != NULL) { Camera_800290D4(it->x520_cameraBox); it->x520_cameraBox = NULL; - it->xDCD_flag.bits.b01 = 0; + it->xDCD_flag.b01 = 0; } } @@ -1996,9 +1995,7 @@ void Item_8026A8EC(Item_GObj* gobj) func_8026A8EC_inline1(gobj); efLib_DestroyAll(gobj); - if (!ip->xDCF_flag.bits.b2 && - (!ip->xDC8_word.flags.x13 || ip->owner == NULL)) - { + if (!ip->xDCF_flag.b2 && (!ip->xDC8_word.flags.x13 || ip->owner == NULL)) { ItemSwitch(gobj); } diff --git a/src/melee/it/item.h b/src/melee/it/item.h index c63a9e677a..69a3a8fc0a 100644 --- a/src/melee/it/item.h +++ b/src/melee/it/item.h @@ -2,6 +2,7 @@ #define GALE01_266F3C #include + #include "it/forward.h" #include #include diff --git a/src/melee/it/items/it_27CF.h b/src/melee/it/items/it_27CF.h index 6633e95e3e..25eafde50e 100644 --- a/src/melee/it/items/it_27CF.h +++ b/src/melee/it/items/it_27CF.h @@ -2,6 +2,7 @@ #define GALE01_27CF30 #include + #include "ft/forward.h" #include "it/forward.h" #include diff --git a/src/melee/it/items/it_2ADA.c b/src/melee/it/items/it_2ADA.c index 44fbf8bbbd..2f9d193a68 100644 --- a/src/melee/it/items/it_2ADA.c +++ b/src/melee/it/items/it_2ADA.c @@ -37,7 +37,7 @@ void it_802ADA1C(Vec3* pos, Vec3* vel, float facing_dir) spawnitem.vel = *vel; spawnitem.x0_parent_gobj = NULL; spawnitem.x4_parent_gobj2 = NULL; - spawnitem.x44_flag.bits.b0 = true; + spawnitem.x44_flag.b0 = true; spawnitem.x40 = 0; { Item_GObj* gobj = Item_80268B18(&spawnitem); @@ -57,7 +57,7 @@ void it_802ADAF0(Item_GObj* gobj) Item* item = GET_ITEM(gobj); it_8026B3A8(gobj); Item_80268E5C(gobj, 0, ITEM_ANIM_UPDATE); - item->xDCE_flag.bits.b7 = false; + item->xDCE_flag.b7 = false; } bool it_802ADB48(Item_GObj* gobj) diff --git a/src/melee/it/items/it_2E5A.h b/src/melee/it/items/it_2E5A.h index 8ff2645b18..757394a2d7 100644 --- a/src/melee/it/items/it_2E5A.h +++ b/src/melee/it/items/it_2E5A.h @@ -2,6 +2,7 @@ #define GALE01_2E5AC4 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/it_2E6A.h b/src/melee/it/items/it_2E6A.h index 73af5b7638..db6a04f52e 100644 --- a/src/melee/it/items/it_2E6A.h +++ b/src/melee/it/items/it_2E6A.h @@ -2,6 +2,7 @@ #define GALE01_2E6AEC #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/it_2F2B.c b/src/melee/it/items/it_2F2B.c index 9b7c9832a4..cc80b519bc 100644 --- a/src/melee/it/items/it_2F2B.c +++ b/src/melee/it/items/it_2F2B.c @@ -1,4 +1,5 @@ #include + #include "ftYoshi/forward.h" #include "it_2F2B.h" @@ -28,7 +29,7 @@ void it_802F2BFC(Item_GObj* gobj, ftYs_GObj* owner_gobj) item->atk_victim = owner_gobj; item->grab_victim = owner_gobj; it_8026C220(gobj, owner_gobj); - item->xDD0_flag.bits.b1 = false; + item->xDD0_flag.b1 = false; item->xBC_itemStateContainer = it_803F9480; it_80274F48(gobj, item->xC4_article_data->x10_modelDesc->x8_bone_attach_id, owner_gobj, ftYs_Shield_8012CC6C(owner_gobj)); diff --git a/src/melee/it/items/it_2F2B.h b/src/melee/it/items/it_2F2B.h index 29559a2928..fa9355abdf 100644 --- a/src/melee/it/items/it_2F2B.h +++ b/src/melee/it/items/it_2F2B.h @@ -2,6 +2,7 @@ #define GALE01_2F2BFC #include + #include "ft/chara/ftYoshi/forward.h" #include "it/forward.h" diff --git a/src/melee/it/items/itarwinglaser.c b/src/melee/it/items/itarwinglaser.c index e0d65910fc..0027044357 100644 --- a/src/melee/it/items/itarwinglaser.c +++ b/src/melee/it/items/itarwinglaser.c @@ -1,5 +1,4 @@ #include - #include bool it_802E8418(void) diff --git a/src/melee/it/items/itbat.c b/src/melee/it/items/itbat.c index 1a0de3b021..3d5c618ab9 100644 --- a/src/melee/it/items/itbat.c +++ b/src/melee/it/items/itbat.c @@ -32,7 +32,7 @@ Item_GObj* it_80284854(Vec3* pos) spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0F; spawn.x0_parent_gobj = NULL; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; item_gobj = Item_80268B5C(&spawn); diff --git a/src/melee/it/items/itbat.h b/src/melee/it/items/itbat.h index 2cff1dce60..82ffbeccbf 100644 --- a/src/melee/it/items/itbat.h +++ b/src/melee/it/items/itbat.h @@ -2,6 +2,7 @@ #define GALE01_284854 #include + #include "it/forward.h" #include "it/item.h" diff --git a/src/melee/it/items/itbombhei.c b/src/melee/it/items/itbombhei.c index 3ffa1e9549..cc74b4674e 100644 --- a/src/melee/it/items/itbombhei.c +++ b/src/melee/it/items/itbombhei.c @@ -1,5 +1,4 @@ #include - #include /// #it_8027D670 diff --git a/src/melee/it/items/itbox.c b/src/melee/it/items/itbox.c index f5d3080cf8..28675c2464 100644 --- a/src/melee/it/items/itbox.c +++ b/src/melee/it/items/itbox.c @@ -1,5 +1,4 @@ #include - #include /// #it_80286088 diff --git a/src/melee/it/items/itcapsule.c b/src/melee/it/items/itcapsule.c index 6330d756ea..2a71a17efb 100644 --- a/src/melee/it/items/itcapsule.c +++ b/src/melee/it/items/itcapsule.c @@ -1,4 +1,6 @@ #include +#include + #include #include "itcapsule.h" @@ -14,7 +16,6 @@ #include "it/types.h" #include "lb/lb_00F9.h" -#include #include #include #include diff --git a/src/melee/it/items/itcapsule.h b/src/melee/it/items/itcapsule.h index 738d6fdb24..1d3bfc7125 100644 --- a/src/melee/it/items/itcapsule.h +++ b/src/melee/it/items/itcapsule.h @@ -2,6 +2,7 @@ #define GALE01_27CF00 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itchicoritaleaf.c b/src/melee/it/items/itchicoritaleaf.c index b19e73c366..7773f4db0e 100644 --- a/src/melee/it/items/itchicoritaleaf.c +++ b/src/melee/it/items/itchicoritaleaf.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802C9B20 /// #it_802C9C20 diff --git a/src/melee/it/items/itchicoritaleaf.h b/src/melee/it/items/itchicoritaleaf.h index 8bb0e0fb1b..0a6ef12254 100644 --- a/src/melee/it/items/itchicoritaleaf.h +++ b/src/melee/it/items/itchicoritaleaf.h @@ -2,6 +2,7 @@ #define GALE01_2C9B20 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itclimbersblizzard.c b/src/melee/it/items/itclimbersblizzard.c index e46cefb9bb..02174b3542 100644 --- a/src/melee/it/items/itclimbersblizzard.c +++ b/src/melee/it/items/itclimbersblizzard.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + bool it_802C2424(Item_GObj* arg0) { return true; diff --git a/src/melee/it/items/itclimbersblizzard.h b/src/melee/it/items/itclimbersblizzard.h index 9503260035..39a26a2df4 100644 --- a/src/melee/it/items/itclimbersblizzard.h +++ b/src/melee/it/items/itclimbersblizzard.h @@ -2,6 +2,7 @@ #define GALE01_2C2144 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itclimbersice.c b/src/melee/it/items/itclimbersice.c index 2f305d6b0f..ff809b8333 100644 --- a/src/melee/it/items/itclimbersice.c +++ b/src/melee/it/items/itclimbersice.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802C1590 /// #it_802C16F8 diff --git a/src/melee/it/items/itclimbersice.h b/src/melee/it/items/itclimbersice.h index d3e436b7ff..9ffbc4a241 100644 --- a/src/melee/it/items/itclimbersice.h +++ b/src/melee/it/items/itclimbersice.h @@ -2,6 +2,7 @@ #define GALE01_2C1590 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itclinkmilk.c b/src/melee/it/items/itclinkmilk.c index a8698cd045..4ae7611fe0 100644 --- a/src/melee/it/items/itclinkmilk.c +++ b/src/melee/it/items/itclinkmilk.c @@ -1,5 +1,4 @@ #include - #include /// #it_802C8B28 diff --git a/src/melee/it/items/itcoin.c b/src/melee/it/items/itcoin.c index ae1466662d..d185f2457b 100644 --- a/src/melee/it/items/itcoin.c +++ b/src/melee/it/items/itcoin.c @@ -384,7 +384,7 @@ Item_GObj* it_802F2094(int arg0, Vec3* pos, int arg2, int arg3) spawn.x3C_damage = 0; spawn.x0_parent_gobj = NULL; spawn.x4_parent_gobj2 = NULL; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0.0F; gobj = Item_80268B18(&spawn); diff --git a/src/melee/it/items/itcoin.h b/src/melee/it/items/itcoin.h index 3d0fcae0aa..6628125e77 100644 --- a/src/melee/it/items/itcoin.h +++ b/src/melee/it/items/itcoin.h @@ -2,6 +2,7 @@ #define GALE01_2F13B4 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itcrazyhandbomb.c b/src/melee/it/items/itcrazyhandbomb.c index 484c6ece67..6775f469dc 100644 --- a/src/melee/it/items/itcrazyhandbomb.c +++ b/src/melee/it/items/itcrazyhandbomb.c @@ -1,5 +1,4 @@ #include - #include /// #it_802F0F6C diff --git a/src/melee/it/items/itcrazyhandbomb.h b/src/melee/it/items/itcrazyhandbomb.h index eeb3954a72..d990db2aca 100644 --- a/src/melee/it/items/itcrazyhandbomb.h +++ b/src/melee/it/items/itcrazyhandbomb.h @@ -2,6 +2,7 @@ #define GALE01_2F0F6C #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itdkinoko.h b/src/melee/it/items/itdkinoko.h index 0905e04da3..26613fa8bc 100644 --- a/src/melee/it/items/itdkinoko.h +++ b/src/melee/it/items/itdkinoko.h @@ -2,6 +2,7 @@ #define GALE01_293A08 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itdosei.c b/src/melee/it/items/itdosei.c index 5cf7c78af0..0a88cece22 100644 --- a/src/melee/it/items/itdosei.c +++ b/src/melee/it/items/itdosei.c @@ -1,5 +1,4 @@ #include - #include /// #it_80281164 diff --git a/src/melee/it/items/itdrmariopill.h b/src/melee/it/items/itdrmariopill.h index 378f35418e..29a28b71d4 100644 --- a/src/melee/it/items/itdrmariopill.h +++ b/src/melee/it/items/itdrmariopill.h @@ -2,6 +2,7 @@ #define GALE01_2C0510 #include + #include "ft/forward.h" #include "it/forward.h" #include diff --git a/src/melee/it/items/itegg.c b/src/melee/it/items/itegg.c index ca5e58bd75..1f836a428d 100644 --- a/src/melee/it/items/itegg.c +++ b/src/melee/it/items/itegg.c @@ -65,16 +65,16 @@ Item_GObj* it_80288C88(Item_GObj* gobj, Vec3* pos, Vec3* vel, float dir) spawn.vel = *vel; spawn.x0_parent_gobj = ip->owner; spawn.x4_parent_gobj2 = gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; item_gobj = Item_80268B18(&spawn); if (item_gobj != NULL) { Item* ip = GET_ITEM(item_gobj); - ip->xDD0_flag.bits.b6 = false; + ip->xDD0_flag.b6 = false; ip->xD40 = 0.0F; it_80279BBC(ip); - if (!ip->xDD0_flag.bits.b7) { + if (!ip->xDD0_flag.b7) { it_802756E0(item_gobj); } } @@ -208,7 +208,7 @@ void it_80289094(Item_GObj* gobj) it_8027518C(gobj); ip->x40_vel.x = 0; ip->x40_vel.y = 0; - ip->xDCF_flag.bits.b2 = true; + ip->xDCF_flag.b2 = true; ip->xDD4_itemVar.egg.x0 = true; ip->xDD4_itemVar.egg.rand_max = 20; Item_80268E5C(gobj, 5, ITEM_ANIM_UPDATE); @@ -235,7 +235,7 @@ void it_80289158(Item_GObj* gobj) it_802756D0(gobj); ip->x40_vel.x = 0.0F; ip->x40_vel.y = 0.0F; - ip->xDCF_flag.bits.b2 = true; + ip->xDCF_flag.b2 = true; ip->xDD4_itemVar.egg.x0 = true; ip->xDD4_itemVar.egg.rand_max = 40; it_8026B3A8(gobj); diff --git a/src/melee/it/items/itevyoshiegg.c b/src/melee/it/items/itevyoshiegg.c index 4addd44438..928a669390 100644 --- a/src/melee/it/items/itevyoshiegg.c +++ b/src/melee/it/items/itevyoshiegg.c @@ -1,5 +1,4 @@ #include - #include /// #it_8029B0C8 diff --git a/src/melee/it/items/itevyoshiegg.h b/src/melee/it/items/itevyoshiegg.h index 6dc67c11b7..0e8140ae9a 100644 --- a/src/melee/it/items/itevyoshiegg.h +++ b/src/melee/it/items/itevyoshiegg.h @@ -2,6 +2,7 @@ #define GALE01_29B0C8 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itfflower.c b/src/melee/it/items/itfflower.c index 4c12bb1933..1ac33078b6 100644 --- a/src/melee/it/items/itfflower.c +++ b/src/melee/it/items/itfflower.c @@ -77,7 +77,7 @@ Item_GObj* it_80292D48(Vec3* vec) spawn.vel.x = 0.0F; spawn.x0_parent_gobj = NULL; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0.0F; gobj = Item_80268B18(&spawn); diff --git a/src/melee/it/items/itfflower.h b/src/melee/it/items/itfflower.h index c091de1d00..486f6ed05a 100644 --- a/src/melee/it/items/itfflower.h +++ b/src/melee/it/items/itfflower.h @@ -2,6 +2,7 @@ #define GALE01_292D48 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itfflowerflame.c b/src/melee/it/items/itfflowerflame.c index 22cdecafaf..716a7ea4f5 100644 --- a/src/melee/it/items/itfflowerflame.c +++ b/src/melee/it/items/itfflowerflame.c @@ -1,3 +1,5 @@ +#include + #include "itfflowerflame.h" #include "it/inlines.h" @@ -6,8 +8,6 @@ #include "it/it_2725.h" #include "it/item.h" -#include - /* 29AA1C */ static void it_8029AA1C(HSD_GObj*); /* 29AA6C */ static bool it_8029AA6C(Item_GObj*); /* 29AB60 */ static void it_8029AB60(HSD_GObj*); @@ -45,7 +45,7 @@ HSD_GObj* it_8029A748(Item_GObj* arg0, Vec3* arg1, Fighter_Part arg2, f32 arg3) spawn.vel.x = spawn.vel.y = spawn.vel.z = 0; spawn.x0_parent_gobj = arg0; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; { diff --git a/src/melee/it/items/itfflowerflame.h b/src/melee/it/items/itfflowerflame.h index 84c7fbb6b7..81d652bbf9 100644 --- a/src/melee/it/items/itfflowerflame.h +++ b/src/melee/it/items/itfflowerflame.h @@ -2,6 +2,7 @@ #define GALE01_29A748 #include + #include "ft/forward.h" #include "it/forward.h" diff --git a/src/melee/it/items/itfire.c b/src/melee/it/items/itfire.c index f4bf59e976..3d73a3fb22 100644 --- a/src/melee/it/items/itfire.c +++ b/src/melee/it/items/itfire.c @@ -1,5 +1,4 @@ #include - #include /// #it_802CC6E4 diff --git a/src/melee/it/items/itflipper.c b/src/melee/it/items/itflipper.c index ea22ec5ea1..6773dabb79 100644 --- a/src/melee/it/items/itflipper.c +++ b/src/melee/it/items/itflipper.c @@ -1,5 +1,4 @@ #include - #include /// #it_80290938 diff --git a/src/melee/it/items/itflipper.h b/src/melee/it/items/itflipper.h index 09c8512c26..a8730dad62 100644 --- a/src/melee/it/items/itflipper.h +++ b/src/melee/it/items/itflipper.h @@ -2,6 +2,7 @@ #define GALE01_290938 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itfoods.c b/src/melee/it/items/itfoods.c index 89a4fefa07..78798d2808 100644 --- a/src/melee/it/items/itfoods.c +++ b/src/melee/it/items/itfoods.c @@ -60,7 +60,7 @@ HSD_GObj* it_8028FAF4(Item_GObj* arg0, Vec3* arg1) spawn.x3C_damage = 0; spawn.x0_parent_gobj = NULL; spawn.x4_parent_gobj2 = NULL; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0.0F; gobj = Item_80268B18(&spawn); if (gobj != NULL) { diff --git a/src/melee/it/items/itfoxblaster.c b/src/melee/it/items/itfoxblaster.c index 239b4053c3..83dc2dfc67 100644 --- a/src/melee/it/items/itfoxblaster.c +++ b/src/melee/it/items/itfoxblaster.c @@ -674,7 +674,7 @@ Item_GObj* it_802AE8A8(f32 facing_dir, Fighter_GObj* fighter_gobj, Vec3* arg2, spawn.vel.x = spawn.vel.y = spawn.vel.z = it_804DCF38; spawn.x0_parent_gobj = (HSD_GObj*) fighter_gobj; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = false; + spawn.x44_flag.b0 = false; spawn.x40 = 0; // 1 = correct initial position? item_gobj = Item_80268B18( @@ -722,7 +722,7 @@ Item_GObj* it_802AE994(Fighter_GObj* owner_gobj, Fighter_Part ft_part, spawn.vel.x = spawn.vel.y = spawn.vel.z = it_804DCF38; spawn.x0_parent_gobj = (HSD_GObj*) owner_gobj; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = false; + spawn.x44_flag.b0 = false; spawn.x40 = 0; // 1 = correct initial position? item_gobj = Item_80268B18( diff --git a/src/melee/it/items/itfoxillusion.c b/src/melee/it/items/itfoxillusion.c index 25436a7ca2..2abeaa5401 100644 --- a/src/melee/it/items/itfoxillusion.c +++ b/src/melee/it/items/itfoxillusion.c @@ -81,7 +81,7 @@ Item_GObj* it_8029CEB4(HSD_GObj* parent, Vec3* pos, ItemKind kind, f32 dir) spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0F; spawn.x0_parent_gobj = parent; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = 1; + spawn.x44_flag.b0 = 1; spawn.x40 = 0; item_gobj = Item_80268B18(&spawn); if (item_gobj != NULL) { diff --git a/src/melee/it/items/itfoxillusion.h b/src/melee/it/items/itfoxillusion.h index ccb29fb212..5c5d7ba7ea 100644 --- a/src/melee/it/items/itfoxillusion.h +++ b/src/melee/it/items/itfoxillusion.h @@ -2,6 +2,7 @@ #define GALE01_29CD18 #include + #include "it/forward.h" #include #include diff --git a/src/melee/it/items/itfoxlaser.c b/src/melee/it/items/itfoxlaser.c index 7e390ae8d6..a4bf72e03c 100644 --- a/src/melee/it/items/itfoxlaser.c +++ b/src/melee/it/items/itfoxlaser.c @@ -1,3 +1,5 @@ +#include + #include "lb/forward.h" #include "itfoxlaser.h" @@ -8,7 +10,6 @@ #include "it/types.h" #include -#include #include #include #include @@ -67,7 +68,7 @@ void it_8029C504(HSD_GObj* parent, Vec3* pos, enum_t msid, int kind, f32 angle, spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0F; spawn.x0_parent_gobj = parent; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; item_gobj = Item_80268B18(&spawn); if (item_gobj != NULL) { diff --git a/src/melee/it/items/itfoxlaser.h b/src/melee/it/items/itfoxlaser.h index 05903d7dd5..308023b895 100644 --- a/src/melee/it/items/itfoxlaser.h +++ b/src/melee/it/items/itfoxlaser.h @@ -2,6 +2,7 @@ #define GALE01_29C4D4 #include + #include "it/forward.h" #include "lb/forward.h" #include diff --git a/src/melee/it/items/itfreeze.h b/src/melee/it/items/itfreeze.h index 2b90bdc6fd..e11471670e 100644 --- a/src/melee/it/items/itfreeze.h +++ b/src/melee/it/items/itfreeze.h @@ -2,6 +2,7 @@ #define GALE01_28EB88 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itfreezer.c b/src/melee/it/items/itfreezer.c index 5db73456d1..8e36d9cab7 100644 --- a/src/melee/it/items/itfreezer.c +++ b/src/melee/it/items/itfreezer.c @@ -1,5 +1,4 @@ #include - #include /// #it_802CCF9C diff --git a/src/melee/it/items/itfushigibana.c b/src/melee/it/items/itfushigibana.c index bb684715f8..dcd487b46a 100644 --- a/src/melee/it/items/itfushigibana.c +++ b/src/melee/it/items/itfushigibana.c @@ -1,5 +1,4 @@ #include - #include /// #it_802D6FD0 diff --git a/src/melee/it/items/itgamewatchchef.h b/src/melee/it/items/itgamewatchchef.h index 979b65b07e..f2c30d822f 100644 --- a/src/melee/it/items/itgamewatchchef.h +++ b/src/melee/it/items/itgamewatchchef.h @@ -2,6 +2,7 @@ #define GALE01_2C837C #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itgamewatchpanic.c b/src/melee/it/items/itgamewatchpanic.c index d09295930f..4ec6007b1d 100644 --- a/src/melee/it/items/itgamewatchpanic.c +++ b/src/melee/it/items/itgamewatchpanic.c @@ -28,7 +28,7 @@ HSD_GObj* it_802C7D60(Item_GObj* parent, Vec3* pos, Fighter_Part arg2, f32 dir) spawn_item.x0_parent_gobj = parent; spawn_item.x4_parent_gobj2 = spawn_item.x0_parent_gobj; - spawn_item.x44_flag.bits.b0 = true; + spawn_item.x44_flag.b0 = true; spawn_item.x40 = 0; gobj = Item_80268B18(&spawn_item); if (gobj != NULL) { diff --git a/src/melee/it/items/itgamewatchpanic.h b/src/melee/it/items/itgamewatchpanic.h index ca6071e193..c33f09f78a 100644 --- a/src/melee/it/items/itgamewatchpanic.h +++ b/src/melee/it/items/itgamewatchpanic.h @@ -2,6 +2,7 @@ #define GALE01_2C7D60 #include + #include "it/forward.h" #include "ft/types.h" diff --git a/src/melee/it/items/itgamewatchrescue.c b/src/melee/it/items/itgamewatchrescue.c index 019ac69953..a107b5fd49 100644 --- a/src/melee/it/items/itgamewatchrescue.c +++ b/src/melee/it/items/itgamewatchrescue.c @@ -1,5 +1,4 @@ #include - #include /// #it_802C8038 diff --git a/src/melee/it/items/itgamewatchturtle.c b/src/melee/it/items/itgamewatchturtle.c index 55b621f0a1..bb6ee79d98 100644 --- a/src/melee/it/items/itgamewatchturtle.c +++ b/src/melee/it/items/itgamewatchturtle.c @@ -40,7 +40,7 @@ Item_GObj* it_802C6F40(HSD_GObj* parent, Vec3* pos, Fighter_Part arg2, f32 dir) spawn_item.x0_parent_gobj = parent; spawn_item.x4_parent_gobj2 = spawn_item.x0_parent_gobj; - spawn_item.x44_flag.bits.b0 = true; + spawn_item.x44_flag.b0 = true; spawn_item.x40 = 0; item_gobj = Item_80268B18(&spawn_item); if (item_gobj != NULL) { diff --git a/src/melee/it/items/itgreatfoxlaser.h b/src/melee/it/items/itgreatfoxlaser.h index c5ce2193c4..8421702fdd 100644 --- a/src/melee/it/items/itgreatfoxlaser.h +++ b/src/melee/it/items/itgreatfoxlaser.h @@ -1,10 +1,10 @@ #ifndef GALE01_2EAF28 #define GALE01_2EAF28 -#include "it/forward.h" - #include +#include "it/forward.h" + /* 2EAF28 */ UNK_T it_802EAF28(Item_GObj* gobj); /* 2EAF34 */ UNK_RET it_802EAF34(UNK_PARAMS); /* 2EB1EC */ UNK_RET it_802EB1EC(UNK_PARAMS); diff --git a/src/melee/it/items/itgshell.c b/src/melee/it/items/itgshell.c index 2ad4f82fc6..497e9d876f 100644 --- a/src/melee/it/items/itgshell.c +++ b/src/melee/it/items/itgshell.c @@ -1,5 +1,4 @@ #include - #include /// #it_8028B8D8 diff --git a/src/melee/it/items/itgshell.h b/src/melee/it/items/itgshell.h index d85e23cea2..823d0a34e4 100644 --- a/src/melee/it/items/itgshell.h +++ b/src/melee/it/items/itgshell.h @@ -2,6 +2,7 @@ #define GALE01_28B8D8 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/ithammer.c b/src/melee/it/items/ithammer.c index bb0d17a80f..78aa043390 100644 --- a/src/melee/it/items/ithammer.c +++ b/src/melee/it/items/ithammer.c @@ -1,4 +1,5 @@ #include + #include #include "ithammer.h" diff --git a/src/melee/it/items/ithammerhead.c b/src/melee/it/items/ithammerhead.c index 8bc143f89d..c6bef7de81 100644 --- a/src/melee/it/items/ithammerhead.c +++ b/src/melee/it/items/ithammerhead.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_80299C48 /// #it_80299D4C diff --git a/src/melee/it/items/ithammerhead.h b/src/melee/it/items/ithammerhead.h index 697a07fcd8..abfb5c6292 100644 --- a/src/melee/it/items/ithammerhead.h +++ b/src/melee/it/items/ithammerhead.h @@ -2,6 +2,7 @@ #define GALE01_299C48 #include + #include "it/forward.h" #include #include diff --git a/src/melee/it/items/itharisen.c b/src/melee/it/items/itharisen.c index 3161f8ba8c..12dbdb75ec 100644 --- a/src/melee/it/items/itharisen.c +++ b/src/melee/it/items/itharisen.c @@ -1,5 +1,4 @@ #include - #include /// #it_802927E8 diff --git a/src/melee/it/items/itharisen.h b/src/melee/it/items/itharisen.h index 3699601348..0ad8766629 100644 --- a/src/melee/it/items/itharisen.h +++ b/src/melee/it/items/itharisen.h @@ -2,6 +2,7 @@ #define GALE01_2927E8 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/ithassam.c b/src/melee/it/items/ithassam.c index 7d673fd20c..b1d3f60651 100644 --- a/src/melee/it/items/ithassam.c +++ b/src/melee/it/items/ithassam.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include "it/forward.h" @@ -20,7 +22,6 @@ #include "lb/lbrefract.h" #include "lb/lbvector.h" -#include #include #include diff --git a/src/melee/it/items/itheart.c b/src/melee/it/items/itheart.c index 0c20f6fa0e..11f0846225 100644 --- a/src/melee/it/items/itheart.c +++ b/src/melee/it/items/itheart.c @@ -49,13 +49,13 @@ Item_GObj* it_80283AE4(Item_GObj* gobj, Vec3* pos, s32 arg2) spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0F; spawn.x0_parent_gobj = NULL; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; item_gobj = Item_80268B18(&spawn); } if (item_gobj != NULL) { Item* ip = GET_ITEM(item_gobj); - ip->xDD4_itemVar.heart.xDD8.bits.b0 = true; + ip->xDD4_itemVar.heart.xDD8.b0 = true; ip->xDD4_itemVar.heart.xDDC = arg2; Item_80267454(item_gobj); } @@ -79,7 +79,7 @@ void it_80283BEC(Item_GObj* gobj) ip->x40_vel.y = vars->x14; ip->x40_vel.z = 0.0F; ip->xDD4_itemVar.heart.xDD4_heal = vars->x0_heal; - ip->xDD4_itemVar.heart.xDD8.bits.b0 = false; + ip->xDD4_itemVar.heart.xDD8.b0 = false; ip->xDD4_itemVar.heart.xDDC = 0; it_80283DD4(gobj); } diff --git a/src/melee/it/items/ithinoarashi.c b/src/melee/it/items/ithinoarashi.c index 1a5a6ca3c4..307dea961e 100644 --- a/src/melee/it/items/ithinoarashi.c +++ b/src/melee/it/items/ithinoarashi.c @@ -1,5 +1,4 @@ #include - #include /* 2D60C8 */ static bool it_802D60C8(void); diff --git a/src/melee/it/items/ithinoarashi.h b/src/melee/it/items/ithinoarashi.h index 4c37818385..68e195fc68 100644 --- a/src/melee/it/items/ithinoarashi.h +++ b/src/melee/it/items/ithinoarashi.h @@ -2,6 +2,7 @@ #define GALE01_2D5CF8 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/ithitodeman.c b/src/melee/it/items/ithitodeman.c index b59d06e74d..edd3282b18 100644 --- a/src/melee/it/items/ithitodeman.c +++ b/src/melee/it/items/ithitodeman.c @@ -1,7 +1,9 @@ #include +#include + #include "it/forward.h" -#include +#include "it/inlines.h" /// #it_802D42C4 @@ -51,7 +53,11 @@ void it_802D4B50(void) {} /// #it_802D4DE0 -/// #it_802D4EF4 +bool it_802D4EF4(Item_GObj* gobj) +{ + GET_ITEM(gobj)->xDB4_itcmd_var2 = 1; + return false; +} /// #it_802D4F08 diff --git a/src/melee/it/items/ithitodeman.h b/src/melee/it/items/ithitodeman.h index 6c4695fe19..98a7de5043 100644 --- a/src/melee/it/items/ithitodeman.h +++ b/src/melee/it/items/ithitodeman.h @@ -2,6 +2,7 @@ #define GALE01_2D42C4 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/ithouou.c b/src/melee/it/items/ithouou.c index 587dc933aa..abf6aee7aa 100644 --- a/src/melee/it/items/ithouou.c +++ b/src/melee/it/items/ithouou.c @@ -1,5 +1,4 @@ #include - #include /// #it_802D251C diff --git a/src/melee/it/items/itkabigon.c b/src/melee/it/items/itkabigon.c index 3207a4bba3..acf8401ccc 100644 --- a/src/melee/it/items/itkabigon.c +++ b/src/melee/it/items/itkabigon.c @@ -1,5 +1,4 @@ #include - #include /// #it_802C9D40 diff --git a/src/melee/it/items/itkamex.c b/src/melee/it/items/itkamex.c index aed71b80bb..e11d46cb39 100644 --- a/src/melee/it/items/itkamex.c +++ b/src/melee/it/items/itkamex.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802CA49C void it_802CA534(void) {} diff --git a/src/melee/it/items/itkamex.h b/src/melee/it/items/itkamex.h index 047755b48f..f2df6b317e 100644 --- a/src/melee/it/items/itkamex.h +++ b/src/melee/it/items/itkamex.h @@ -2,12 +2,12 @@ #define GALE01_2CA49C #include +#include + #include "it/forward.h" #include "it/items/types.h" -#include - /* 2CA49C */ void it_802CA49C(Item_GObj*); /* 2CA534 */ UNK_RET it_802CA534(UNK_PARAMS); /* 2CA538 */ void it_802CA538(Item_GObj*, Item_GObj*); diff --git a/src/melee/it/items/itkinoko.h b/src/melee/it/items/itkinoko.h index a3bebe6eec..875edfe038 100644 --- a/src/melee/it/items/itkinoko.h +++ b/src/melee/it/items/itkinoko.h @@ -2,6 +2,7 @@ #define GALE01_293660 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itkirby_2F23.c b/src/melee/it/items/itkirby_2F23.c index 7b9bbc1045..d83790be53 100644 --- a/src/melee/it/items/itkirby_2F23.c +++ b/src/melee/it/items/itkirby_2F23.c @@ -1,5 +1,4 @@ #include - #include /// #it_802F23AC diff --git a/src/melee/it/items/itkirbycutterbeam.c b/src/melee/it/items/itkirbycutterbeam.c index 0e51ffc192..c527edec45 100644 --- a/src/melee/it/items/itkirbycutterbeam.c +++ b/src/melee/it/items/itkirbycutterbeam.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_8029BAB8 /// #it_8029BB90 diff --git a/src/melee/it/items/itkirbycutterbeam.h b/src/melee/it/items/itkirbycutterbeam.h index a4b0b1b5cd..30fc721d38 100644 --- a/src/melee/it/items/itkirbycutterbeam.h +++ b/src/melee/it/items/itkirbycutterbeam.h @@ -2,6 +2,7 @@ #define GALE01_29BAB8 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itkirbyhammer.c b/src/melee/it/items/itkirbyhammer.c index 0c6ebddd3f..1f14adc292 100644 --- a/src/melee/it/items/itkirbyhammer.c +++ b/src/melee/it/items/itkirbyhammer.c @@ -62,7 +62,7 @@ Item_GObj* it_802ADC54(HSD_GObj* parent, Vec3* pos, Fighter_Part sfx, u32 vars, spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0F; spawn.x0_parent_gobj = parent; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; item_gobj = Item_80268B18(&spawn); diff --git a/src/melee/it/items/itkirbyhammer.h b/src/melee/it/items/itkirbyhammer.h index b2b24ef804..197f79219a 100644 --- a/src/melee/it/items/itkirbyhammer.h +++ b/src/melee/it/items/itkirbyhammer.h @@ -2,6 +2,7 @@ #define GALE01_2ADC04 #include + #include "it/forward.h" #include #include diff --git a/src/melee/it/items/itkirbyyoshispecialn.c b/src/melee/it/items/itkirbyyoshispecialn.c index b619313b5a..df916dbf73 100644 --- a/src/melee/it/items/itkirbyyoshispecialn.c +++ b/src/melee/it/items/itkirbyyoshispecialn.c @@ -1,4 +1,5 @@ #include + #include "ftKirby/forward.h" #include "itkirbyyoshispecialn.h" @@ -29,7 +30,7 @@ void it_802F2D98(Item_GObj* gobj, ftKb_GObj* owner_gobj) item->atk_victim = owner_gobj; item->grab_victim = owner_gobj; it_8026C220(gobj, owner_gobj); - item->xDD0_flag.bits.b1 = false; + item->xDD0_flag.b1 = false; item->xBC_itemStateContainer = it_803F9490; it_80274F48(gobj, item->xC4_article_data->x10_modelDesc->x8_bone_attach_id, owner_gobj, ftKb_SpecialNYs_80109238(owner_gobj)); diff --git a/src/melee/it/items/itkirbyyoshispecialn.h b/src/melee/it/items/itkirbyyoshispecialn.h index f4d1df6e36..bea11a7831 100644 --- a/src/melee/it/items/itkirbyyoshispecialn.h +++ b/src/melee/it/items/itkirbyyoshispecialn.h @@ -2,6 +2,7 @@ #define GALE01_2F2D98 #include + #include "ft/chara/ftKirby/forward.h" #include "it/forward.h" diff --git a/src/melee/it/items/itklap.c b/src/melee/it/items/itklap.c index bb7fe42b61..ca7e920703 100644 --- a/src/melee/it/items/itklap.c +++ b/src/melee/it/items/itklap.c @@ -1,5 +1,4 @@ #include - #include /// #it_802E1820 diff --git a/src/melee/it/items/itklap.h b/src/melee/it/items/itklap.h index 659a300e04..4ed4f9faa8 100644 --- a/src/melee/it/items/itklap.h +++ b/src/melee/it/items/itklap.h @@ -1,10 +1,10 @@ #ifndef GALE01_2E1820 #define GALE01_2E1820 -#include "it/forward.h" - #include +#include "it/forward.h" + /* 2E1820 */ UNK_RET it_802E1820(UNK_PARAMS); /* 2E1874 */ UNK_RET it_802E1874(UNK_PARAMS); /* 2E18B4 */ UNK_RET it_802E18B4(UNK_PARAMS); diff --git a/src/melee/it/items/itkoopaflame.c b/src/melee/it/items/itkoopaflame.c index de2a4df7be..cc67b92612 100644 --- a/src/melee/it/items/itkoopaflame.c +++ b/src/melee/it/items/itkoopaflame.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + bool it_802AD2E8(Item_GObj* arg0) { return false; diff --git a/src/melee/it/items/itkoopaflame.h b/src/melee/it/items/itkoopaflame.h index 19782b09cd..aa8c77420e 100644 --- a/src/melee/it/items/itkoopaflame.h +++ b/src/melee/it/items/itkoopaflame.h @@ -2,6 +2,7 @@ #define GALE01_2AC8A8 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itkusudama.c b/src/melee/it/items/itkusudama.c index 5c35a857ad..1ccf16a48b 100644 --- a/src/melee/it/items/itkusudama.c +++ b/src/melee/it/items/itkusudama.c @@ -1,5 +1,4 @@ #include - #include /// #it_802896CC diff --git a/src/melee/it/items/itleadead.c b/src/melee/it/items/itleadead.c index 7fa96a86e7..ad1ace6259 100644 --- a/src/melee/it/items/itleadead.c +++ b/src/melee/it/items/itleadead.c @@ -1,5 +1,4 @@ #include - #include /// #it_802E8BCC diff --git a/src/melee/it/items/itleadead.h b/src/melee/it/items/itleadead.h index 4b3b7bf3bf..82386d7dcb 100644 --- a/src/melee/it/items/itleadead.h +++ b/src/melee/it/items/itleadead.h @@ -2,6 +2,7 @@ #define GALE01_2E8BCC #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itlgun.h b/src/melee/it/items/itlgun.h index dabd84c186..1de0ef1ade 100644 --- a/src/melee/it/items/itlgun.h +++ b/src/melee/it/items/itlgun.h @@ -2,6 +2,7 @@ #define GALE01_28E738 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itlgunbeam.c b/src/melee/it/items/itlgunbeam.c index 472b60a28c..2e1018f855 100644 --- a/src/melee/it/items/itlgunbeam.c +++ b/src/melee/it/items/itlgunbeam.c @@ -1,3 +1,5 @@ +#include + #include "it/forward.h" #include "itlgunbeam.h" @@ -13,7 +15,6 @@ #include "lb/lbvector.h" #include -#include #include #include #include @@ -126,7 +127,7 @@ void it_802996D0(HSD_GObj* owner_gobj, Vec3* pos, u32 arg2, f32 facing_dir) spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0f; spawn.x0_parent_gobj = owner_gobj; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = arg2; { diff --git a/src/melee/it/items/itlgunbeam.h b/src/melee/it/items/itlgunbeam.h index 8f971955b5..0921f61673 100644 --- a/src/melee/it/items/itlgunbeam.h +++ b/src/melee/it/items/itlgunbeam.h @@ -2,6 +2,7 @@ #define GALE01_2993E0 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itlgunray.c b/src/melee/it/items/itlgunray.c index a1c45a4c5c..d26ae3438a 100644 --- a/src/melee/it/items/itlgunray.c +++ b/src/melee/it/items/itlgunray.c @@ -1,3 +1,5 @@ +#include + #include "itlgunray.h" #include "db/db_2253.h" @@ -9,7 +11,6 @@ #include "lb/lbvector.h" #include -#include #include #include #include @@ -38,7 +39,7 @@ void it_80298168(HSD_GObj* owner_gobj, Vec3* pos, f32 facing_dir) spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0f; spawn.x0_parent_gobj = owner_gobj; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; { Item_GObj* gobj = Item_80268B18(&spawn); diff --git a/src/melee/it/items/itlgunray.h b/src/melee/it/items/itlgunray.h index a7e23c3429..863392b8de 100644 --- a/src/melee/it/items/itlgunray.h +++ b/src/melee/it/items/itlgunray.h @@ -2,6 +2,7 @@ #define GALE01_298168 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itlikelike.c b/src/melee/it/items/itlikelike.c index 4232f592bc..96e20f2b75 100644 --- a/src/melee/it/items/itlikelike.c +++ b/src/melee/it/items/itlikelike.c @@ -1,5 +1,4 @@ #include - #include /// #it_802D9A2C diff --git a/src/melee/it/items/itlikelike.h b/src/melee/it/items/itlikelike.h index 2ae2fcea99..3d9b8d5999 100644 --- a/src/melee/it/items/itlikelike.h +++ b/src/melee/it/items/itlikelike.h @@ -1,10 +1,10 @@ #ifndef GALE01_2D9A2C #define GALE01_2D9A2C -#include "it/forward.h" - #include +#include "it/forward.h" + /* 2D9A2C */ UNK_RET it_802D9A2C(UNK_PARAMS); /* 2D9B78 */ UNK_RET it_802D9B78(UNK_PARAMS); /* 2D9BA8 */ UNK_RET it_802D9BA8(UNK_PARAMS); diff --git a/src/melee/it/items/itlinkarrow.c b/src/melee/it/items/itlinkarrow.c index 4d5a773f3a..d6729759a3 100644 --- a/src/melee/it/items/itlinkarrow.c +++ b/src/melee/it/items/itlinkarrow.c @@ -144,7 +144,7 @@ HSD_GObj* it_802A83E0(f32 facing_dir, Fighter_GObj* arg1, Vec3* arg2, spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0f; spawn.x0_parent_gobj = arg1; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; gobj = Item_80268B18(&spawn); @@ -749,7 +749,7 @@ int it_802A96E4(Item_GObj* gobj) it_802756D0((HSD_GObj*) gobj); } it_8026BB44(gobj); - item->xDCF_flag.bits.b2 = 1; + item->xDCF_flag.b2 = 1; item->xDD4_itemVar.linkarrow.xF0 += 1; if (item->xDD4_itemVar.linkarrow.xF0 > 0x12C) { return 1; diff --git a/src/melee/it/items/itlinkarrow.h b/src/melee/it/items/itlinkarrow.h index 525e47d17e..f4de3b33c5 100644 --- a/src/melee/it/items/itlinkarrow.h +++ b/src/melee/it/items/itlinkarrow.h @@ -2,6 +2,7 @@ #define GALE01_2A7D8C #include + #include "ft/forward.h" #include "it/forward.h" diff --git a/src/melee/it/items/itlinkbomb.c b/src/melee/it/items/itlinkbomb.c index 8207658506..7213a82af8 100644 --- a/src/melee/it/items/itlinkbomb.c +++ b/src/melee/it/items/itlinkbomb.c @@ -68,7 +68,7 @@ void it_8029D9A4(HSD_GObj* gobj, enum_t msid, Item_StateChangeFlags arg2) jobj = item->xBBC_dynamicBoneTable->bones[3]; y = HSD_JObjGetTranslationY(jobj); x = HSD_JObjGetRotationX(jobj); - if (item->xDD4_itemVar.linkbomb.x0.bits.b0) { + if (item->xDD4_itemVar.linkbomb.x0.b0) { Item_80268E5C(gobj, msid, arg2 | ITEM_CMD_UPDATE); } else { Item_80268E5C(gobj, msid, arg2 | ITEM_ANIM_UPDATE); @@ -90,7 +90,7 @@ static inline void it_8029DB5C_Inline_Matching(HSD_GObj* gobj, Item* item, HSD_JObj* temp_r31_2; if ((item->xD44_lifeTimer <= sa->xC) && - item->xDD4_itemVar.linkbomb.x0.bits.b0 == 0) + item->xDD4_itemVar.linkbomb.x0.b0 == 0) { temp_r31 = gobj->hsd_obj; item->xD0_itemStateDesc = &article->xC_itemStates->x0_itemStateDesc[3]; @@ -99,11 +99,11 @@ static inline void it_8029DB5C_Inline_Matching(HSD_GObj* gobj, Item* item, Item_80268D34(gobj, item_state_desc); } HSD_JObjAnimAll((HSD_JObj*) temp_r31); - item->xDD4_itemVar.linkbomb.x0.bits.b0 = true; + item->xDD4_itemVar.linkbomb.x0.b0 = true; } item->xD44_lifeTimer = item->xD44_lifeTimer - 1.0f; item_2 = GET_ITEM(gobj); - if (item_2->xDD4_itemVar.linkbomb.x0.bits.b0 == 0) { + if (item_2->xDD4_itemVar.linkbomb.x0.b0 == 0) { temp_f31 = item_2->xDD4_itemVar.linkbomb.x8; temp_r31_2 = item_2->xBBC_dynamicBoneTable->bones[3]; #if 1 @@ -127,7 +127,7 @@ static inline void it_8029DB5C_Inline_AnimAdd_Part(HSD_GObj* gobj) HSD_JObj* temp_r31_2; item_2 = GET_ITEM(gobj); - if (item_2->xDD4_itemVar.linkbomb.x0.bits.b0 == 0) { + if (item_2->xDD4_itemVar.linkbomb.x0.b0 == 0) { temp_f31 = item_2->xDD4_itemVar.linkbomb.x8; temp_r31_2 = item_2->xBBC_dynamicBoneTable->bones[3]; #if 0 @@ -151,7 +151,7 @@ static inline void it_8029DB5C_Inline_TimerCheck_Part(HSD_GObj* gobj, ItemStateDesc* item_state_desc; if ((item->xD44_lifeTimer <= sa->xC) && - item->xDD4_itemVar.linkbomb.x0.bits.b0 == 0) + item->xDD4_itemVar.linkbomb.x0.b0 == 0) { temp_r31 = gobj->hsd_obj; item->xD0_itemStateDesc = &article->xC_itemStates->x0_itemStateDesc[3]; @@ -160,7 +160,7 @@ static inline void it_8029DB5C_Inline_TimerCheck_Part(HSD_GObj* gobj, Item_80268D34(gobj, item_state_desc); } HSD_JObjAnimAll((HSD_JObj*) temp_r31); - item->xDD4_itemVar.linkbomb.x0.bits.b0 = true; + item->xDD4_itemVar.linkbomb.x0.b0 = true; } item->xD44_lifeTimer -= 1.0F; } @@ -188,9 +188,9 @@ static inline void it_8029DD58_inline(Item* item, itLinkBombAttributes* attr, { f32 temp_f2; it_80275158(temp_r3, attr->lifetime); - item->xDD4_itemVar.linkbomb.x0.bits.b0 = false; + item->xDD4_itemVar.linkbomb.x0.b0 = false; item->xDD4_itemVar.linkbomb.x10 = fighter_gobj; - item->xDD4_itemVar.linkbomb.x0.bits.b2 = false; + item->xDD4_itemVar.linkbomb.x0.b2 = false; temp_f2 = attr->lifetime - attr->xC; item->xDD4_itemVar.linkbomb.x8 = (-2.8000002f / temp_f2) * item->scl; item->xDD4_itemVar.linkbomb.xC = (-0.15707964f / temp_f2) * item->scl; @@ -216,7 +216,7 @@ HSD_GObj* it_8029DD58(Item_GObj* fighter_gobj, Vec3* arg1, u8 arg2, int arg3, spawn.vel.x = 0.0F; spawn.x0_parent_gobj = (HSD_GObj*) fighter_gobj; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; temp_r3 = Item_80268B18(&spawn); if (temp_r3 != NULL) { @@ -491,9 +491,9 @@ void it_8029F18C(HSD_GObj* gobj) item->xDD4_itemVar.linkbomb.x4 = fsign_inline(item->x40_vel.x); mpColl_800436D8(&item->x378_itemColl, float_sign_int_inline(item->xDD4_itemVar.linkbomb.x4)); - item->xDD4_itemVar.linkbomb.x0.bits.b1 = true; + item->xDD4_itemVar.linkbomb.x0.b1 = true; } else { - item->xDD4_itemVar.linkbomb.x0.bits.b1 = false; + item->xDD4_itemVar.linkbomb.x0.b1 = false; item->x40_vel.z = 0.0f; item->x40_vel.y = 0.0f; item->x40_vel.x = 0.0f; @@ -539,7 +539,7 @@ void it_8029F60C(HSD_GObj* gobj) item = GET_ITEM(gobj); sa = item->xC4_article_data->x4_specialAttributes; - if (item->xDD4_itemVar.linkbomb.x0.bits.b1) { + if (item->xDD4_itemVar.linkbomb.x0.b1) { temp_f2 = item->x40_vel.x; if (temp_f2 != zero) { item->x40_vel.x = @@ -641,7 +641,7 @@ int it_8029FA30(Item_GObj* gobj) if (item->msid != 5) { if (item->xCA0 >= sa->x10) { it_8029F69C((HSD_GObj*) gobj); - } else if (!item->xDD4_itemVar.linkbomb.x0.bits.b2) { + } else if (!item->xDD4_itemVar.linkbomb.x0.b2) { if (item->x40_vel.x > sa->x30) { item->facing_dir = -item->xCCC_incDamageDirection; item->x40_vel.x = sa->x14 * item->facing_dir; @@ -651,7 +651,7 @@ int it_8029FA30(Item_GObj* gobj) it_80272980(gobj, temp_f1); } item->x40_vel.y = sa->x18 * item->facing_dir; - item->xDD4_itemVar.linkbomb.x0.bits.b2 = true; + item->xDD4_itemVar.linkbomb.x0.b2 = true; } } return 0; diff --git a/src/melee/it/items/itlinkbomb.h b/src/melee/it/items/itlinkbomb.h index 2b3a6ac8f3..194b3311c5 100644 --- a/src/melee/it/items/itlinkbomb.h +++ b/src/melee/it/items/itlinkbomb.h @@ -2,6 +2,7 @@ #define GALE01_29D968 #include + #include "it/forward.h" #include "it/inlines.h" diff --git a/src/melee/it/items/itlinkboomerang.h b/src/melee/it/items/itlinkboomerang.h index 4fb51c8640..36a73d1312 100644 --- a/src/melee/it/items/itlinkboomerang.h +++ b/src/melee/it/items/itlinkboomerang.h @@ -2,6 +2,7 @@ #define GALE01_29FDBC #include + #include "ft/forward.h" #include "it/forward.h" diff --git a/src/melee/it/items/itlinkbow.c b/src/melee/it/items/itlinkbow.c index 6338b1fe1e..502e8896b4 100644 --- a/src/melee/it/items/itlinkbow.c +++ b/src/melee/it/items/itlinkbow.c @@ -47,7 +47,7 @@ HSD_GObj* it_802AF1A4(f32 facing_dir, Fighter_GObj* owner_gobj, Vec3* vec, spawn.vel.x = 0.0F; spawn.x0_parent_gobj = (HSD_GObj*) owner_gobj; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0.0F; gobj = Item_80268B18(&spawn); diff --git a/src/melee/it/items/itlinkhookshot.c b/src/melee/it/items/itlinkhookshot.c index 542b0df83a..40feec513f 100644 --- a/src/melee/it/items/itlinkhookshot.c +++ b/src/melee/it/items/itlinkhookshot.c @@ -90,7 +90,7 @@ void it_802A24D0(ItemLink* arg0, f32 arg8) coll_data->cur_topn = arg0->pos; coll_data->prev_topn = coll_data->cur_topn; mpColl_80041EE4(coll_data); - coll_data->x34_flags.bits.b1234 = 5; + coll_data->x34_flags.b1234 = 5; mpColl_8004220C(coll_data, NULL, arg8, arg8, arg8, arg8); } @@ -228,7 +228,7 @@ HSD_JObj* it_802A2568(Item* arg0, HSD_JObj* arg1, s32 arg2, f32 arg8) temp_r3_3->x30_collData.cur_topn; mpColl_80041EE4(temp_r18); - temp_r18->x34_flags.bits.b1234 = 5; + temp_r18->x34_flags.b1234 = 5; mpColl_8004220C(temp_r18, NULL, arg8, arg8, arg8, arg8); HSD_GObjObject_80390A70(temp_r3_2, (u8) HSD_GObj_804D7849, it_link_get_joint(arg0, var_r31)); @@ -253,7 +253,7 @@ HSD_JObj* it_802A2568(Item* arg0, HSD_JObj* arg1, s32 arg2, f32 arg8) temp_r3_3->x30_collData.cur_topn; mpColl_80041EE4(temp_r21); - temp_r18->x34_flags.bits.b1234 = 5; + temp_r18->x34_flags.b1234 = 5; mpColl_8004220C(temp_r21, NULL, arg8, arg8, arg8, arg8); HSD_GObjObject_80390A70(temp_r3_2, (u8) HSD_GObj_804D7849, it_link_get_joint_c(arg0)); @@ -278,7 +278,7 @@ HSD_JObj* it_802A2568(Item* arg0, HSD_JObj* arg1, s32 arg2, f32 arg8) temp_r3_3->x30_collData.cur_topn; mpColl_80041EE4(temp_r17); - temp_r18->x34_flags.bits.b1234 = 5; + temp_r18->x34_flags.b1234 = 5; mpColl_8004220C(temp_r17, NULL, arg8, arg8, arg8, arg8); HSD_GObjObject_80390A70(temp_r3_2, (u8) HSD_GObj_804D7849, it_link_get_joint(arg0, var_r31)); @@ -346,7 +346,7 @@ Item_GObj* it_802A2BA4(Fighter_GObj* arg0, Vec3* arg1, f32 arg2, s32 arg3) spawn_item.vel.x = spawn_item.vel.y = spawn_item.vel.z = 0.0f; spawn_item.x0_parent_gobj = arg0; spawn_item.x4_parent_gobj2 = spawn_item.x0_parent_gobj; - spawn_item.x44_flag.bits.b0 = true; + spawn_item.x44_flag.b0 = true; spawn_item.x40 = 0; gobj = Item_80268B18(&spawn_item); diff --git a/src/melee/it/items/itlinkhookshot.h b/src/melee/it/items/itlinkhookshot.h index 8ceb6e84f6..1ae32a4b75 100644 --- a/src/melee/it/items/itlinkhookshot.h +++ b/src/melee/it/items/itlinkhookshot.h @@ -2,6 +2,7 @@ #define GALE01_2A2418 #include + #include "ft/forward.h" #include "it/forward.h" #include diff --git a/src/melee/it/items/itlipstick.c b/src/melee/it/items/itlipstick.c index adc3e4ff27..997bb426dd 100644 --- a/src/melee/it/items/itlipstick.c +++ b/src/melee/it/items/itlipstick.c @@ -1,6 +1,6 @@ -#include +#include "itlipstick.h" -#include +#include "it/inlines.h" /// #it_8029570C @@ -32,7 +32,11 @@ bool it_80295864(void) /// #it_802958C8 -/// #it_802958F0 +bool it_802958F0(Item_GObj* gobj) +{ + GET_ITEM(gobj)->xDAC_itcmd_var0 = 1; + return false; +} void it_80295904(void) {} diff --git a/src/melee/it/items/itlipstick.h b/src/melee/it/items/itlipstick.h index db815dbbd4..84759faf0b 100644 --- a/src/melee/it/items/itlipstick.h +++ b/src/melee/it/items/itlipstick.h @@ -2,6 +2,7 @@ #define GALE01_29570C #include + #include "it/forward.h" #include "it/items/types.h" @@ -10,15 +11,15 @@ /* 295748 */ UNK_RET it_80295748(UNK_PARAMS); /* 295770 */ UNK_RET it_80295770(UNK_PARAMS); /* 2957AC */ UNK_RET it_802957AC(UNK_PARAMS); -/* 295804 */ UNK_RET it_80295804(UNK_PARAMS); +/* 295804 */ bool it_80295804(void); /* 29580C */ UNK_RET it_8029580C(UNK_PARAMS); /* 295810 */ UNK_RET it_80295810(UNK_PARAMS); /* 29583C */ UNK_RET it_8029583C(UNK_PARAMS); -/* 295864 */ UNK_RET it_80295864(UNK_PARAMS); +/* 295864 */ bool it_80295864(void); /* 29586C */ UNK_RET it_8029586C(UNK_PARAMS); /* 29589C */ UNK_RET it_8029589C(UNK_PARAMS); /* 2958C8 */ void it_802958C8(Item_GObj*); -/* 2958F0 */ UNK_RET it_802958F0(UNK_PARAMS); +/* 2958F0 */ bool it_802958F0(Item_GObj* gobj); /* 295904 */ UNK_RET it_80295904(UNK_PARAMS); /* 295908 */ void it_80295908(Item_GObj*); /* 295930 */ UNK_RET it_80295930(UNK_PARAMS); @@ -27,7 +28,7 @@ /* 2959E8 */ UNK_RET it_802959E8(UNK_PARAMS); /* 295ACC */ bool it_80295ACC(Item_GObj*); /* 295B08 */ void it_80295B08(Item_GObj*); -/* 295B30 */ UNK_RET it_80295B30(UNK_PARAMS); +/* 295B30 */ bool it_80295B30(void); /* 295B38 */ UNK_RET it_80295B38(UNK_PARAMS); /* 295B3C */ UNK_RET it_80295B3C(UNK_PARAMS); /* 295B70 */ bool it_80295B70(Item_GObj*); diff --git a/src/melee/it/items/itlipstickspore.c b/src/melee/it/items/itlipstickspore.c index a9e88328a8..50f5baf1db 100644 --- a/src/melee/it/items/itlipstickspore.c +++ b/src/melee/it/items/itlipstickspore.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /* 29A5F8 */ static bool it_8029A5F8(void); /// #it_8029A114 diff --git a/src/melee/it/items/itlipstickspore.h b/src/melee/it/items/itlipstickspore.h index 3ee711d5ae..05eb2ae896 100644 --- a/src/melee/it/items/itlipstickspore.h +++ b/src/melee/it/items/itlipstickspore.h @@ -2,6 +2,7 @@ #define GALE01_29A114 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itlizardon.c b/src/melee/it/items/itlizardon.c index 96d2910836..b5704175df 100644 --- a/src/melee/it/items/itlizardon.c +++ b/src/melee/it/items/itlizardon.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802CB8AC void it_802CB93C(void) {} diff --git a/src/melee/it/items/itlizardon.h b/src/melee/it/items/itlizardon.h index 9e440d5525..633f51c4e7 100644 --- a/src/melee/it/items/itlizardon.h +++ b/src/melee/it/items/itlizardon.h @@ -2,6 +2,7 @@ #define GALE01_2CB8AC #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itlucky.c b/src/melee/it/items/itlucky.c index aa0ca8c15c..668958fd89 100644 --- a/src/melee/it/items/itlucky.c +++ b/src/melee/it/items/itlucky.c @@ -1,5 +1,4 @@ #include - #include /// #it_802D5050 diff --git a/src/melee/it/items/itlucky.h b/src/melee/it/items/itlucky.h index dd47a11b5e..346c7591f0 100644 --- a/src/melee/it/items/itlucky.h +++ b/src/melee/it/items/itlucky.h @@ -2,12 +2,12 @@ #define GALE01_2D5050 #include +#include + #include "it/forward.h" #include "it/items/types.h" -#include - /* 2D5050 */ void it_802D5050(Item_GObj*); /* 2D50F0 */ UNK_RET it_802D50F0(UNK_PARAMS); /* 2D5124 */ UNK_RET it_802D5124(UNK_PARAMS); diff --git a/src/melee/it/items/itlugia.c b/src/melee/it/items/itlugia.c index 59ebd26883..9b28fddfd3 100644 --- a/src/melee/it/items/itlugia.c +++ b/src/melee/it/items/itlugia.c @@ -1,5 +1,4 @@ #include - #include /// #it_802D1438 diff --git a/src/melee/it/items/itlugia.h b/src/melee/it/items/itlugia.h index 9913e488b0..2484bfa7aa 100644 --- a/src/melee/it/items/itlugia.h +++ b/src/melee/it/items/itlugia.h @@ -1,12 +1,12 @@ #ifndef GALE01_2D1438 #define GALE01_2D1438 +#include + #include "it/forward.h" #include "it/items/types.h" -#include - /* 2D1438 */ void it_802D1438(Item_GObj*); /* 2D14D0 */ UNK_RET it_802D14D0(UNK_PARAMS); /* 2D14D4 */ void it_802D14D4(Item_GObj*, Item_GObj*); diff --git a/src/melee/it/items/itluigifireball.c b/src/melee/it/items/itluigifireball.c index af2d34be7c..a3cdf23440 100644 --- a/src/melee/it/items/itluigifireball.c +++ b/src/melee/it/items/itluigifireball.c @@ -37,7 +37,7 @@ void it_802C01AC(Item_GObj* gobj, Vec3* pos, ItemKind kind, float facing_dir) spawn_item.vel.x = spawn_item.vel.y = spawn_item.vel.z = 0; spawn_item.x0_parent_gobj = gobj; spawn_item.x4_parent_gobj2 = spawn_item.x0_parent_gobj; - spawn_item.x44_flag.bits.b0 = true; + spawn_item.x44_flag.b0 = true; spawn_item.x40 = 0; { u8 _[8] = { 0 }; diff --git a/src/melee/it/items/itluigifireball.h b/src/melee/it/items/itluigifireball.h index 41a7948286..5ce3baf8d7 100644 --- a/src/melee/it/items/itluigifireball.h +++ b/src/melee/it/items/itluigifireball.h @@ -2,6 +2,7 @@ #define GALE01_2C01AC #include + #include "it/forward.h" #include #include diff --git a/src/melee/it/items/itmaril.c b/src/melee/it/items/itmaril.c index 1b4869aec6..f9fde1325c 100644 --- a/src/melee/it/items/itmaril.c +++ b/src/melee/it/items/itmaril.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802D66F8 /// #it_802D6740 diff --git a/src/melee/it/items/itmaril.h b/src/melee/it/items/itmaril.h index 1fa2ed2568..0c52b77661 100644 --- a/src/melee/it/items/itmaril.h +++ b/src/melee/it/items/itmaril.h @@ -2,6 +2,7 @@ #define GALE01_2D66F8 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itmariofireball.c b/src/melee/it/items/itmariofireball.c index 9dd06b403c..551bad2c6b 100644 --- a/src/melee/it/items/itmariofireball.c +++ b/src/melee/it/items/itmariofireball.c @@ -33,7 +33,7 @@ void it_8029B6F8(Item_GObj* gobj, Vec3* pos, ItemKind kind, f32 facing_dir) spawn_item.vel.x = spawn_item.vel.y = spawn_item.vel.z = 0.0f; spawn_item.x0_parent_gobj = gobj; spawn_item.x4_parent_gobj2 = spawn_item.x0_parent_gobj; - spawn_item.x44_flag.bits.b0 = true; + spawn_item.x44_flag.b0 = true; spawn_item.x40 = 0; spawned_gobj = Item_80268B18(&spawn_item); diff --git a/src/melee/it/items/itmariofireball.h b/src/melee/it/items/itmariofireball.h index 760a367143..892133f1e9 100644 --- a/src/melee/it/items/itmariofireball.h +++ b/src/melee/it/items/itmariofireball.h @@ -2,6 +2,7 @@ #define GALE01_29B6F8 #include + #include "it/forward.h" #include #include diff --git a/src/melee/it/items/itmarumine.h b/src/melee/it/items/itmarumine.h index d706fb3ee2..6ca3905803 100644 --- a/src/melee/it/items/itmarumine.h +++ b/src/melee/it/items/itmarumine.h @@ -2,6 +2,7 @@ #define GALE01_2D09D0 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itmasterhandbullet.c b/src/melee/it/items/itmasterhandbullet.c index 9febc920c8..9a59c36c95 100644 --- a/src/melee/it/items/itmasterhandbullet.c +++ b/src/melee/it/items/itmasterhandbullet.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802F0AE0 /// #it_802F0BC8 diff --git a/src/melee/it/items/itmasterhandbullet.h b/src/melee/it/items/itmasterhandbullet.h index 906b2becd0..4a72648a3d 100644 --- a/src/melee/it/items/itmasterhandbullet.h +++ b/src/melee/it/items/itmasterhandbullet.h @@ -2,6 +2,7 @@ #define GALE01_2F0AE0 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itmasterhandlaser.c b/src/melee/it/items/itmasterhandlaser.c index 60ec031036..556f831895 100644 --- a/src/melee/it/items/itmasterhandlaser.c +++ b/src/melee/it/items/itmasterhandlaser.c @@ -1,5 +1,4 @@ #include - #include /// #it_802F0340 diff --git a/src/melee/it/items/itmatadogas.c b/src/melee/it/items/itmatadogas.c index c68b147301..5f1129f09a 100644 --- a/src/melee/it/items/itmatadogas.c +++ b/src/melee/it/items/itmatadogas.c @@ -1,5 +1,4 @@ #include - #include /// #it_802CAFD4 diff --git a/src/melee/it/items/itmato.c b/src/melee/it/items/itmato.c index f2845b357d..483b16bf43 100644 --- a/src/melee/it/items/itmato.c +++ b/src/melee/it/items/itmato.c @@ -1,4 +1,5 @@ #include + #include #include "itmato.h" diff --git a/src/melee/it/items/itmato.h b/src/melee/it/items/itmato.h index 26b886a196..f18a8901c9 100644 --- a/src/melee/it/items/itmato.h +++ b/src/melee/it/items/itmato.h @@ -2,6 +2,7 @@ #define GALE01_2D84F8 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itmball.c b/src/melee/it/items/itmball.c index f70aadb48b..9bb76025a2 100644 --- a/src/melee/it/items/itmball.c +++ b/src/melee/it/items/itmball.c @@ -1,5 +1,4 @@ #include - #include /// #it_802978DC diff --git a/src/melee/it/items/itmball.h b/src/melee/it/items/itmball.h index 26e3eb14f5..09ca678a7c 100644 --- a/src/melee/it/items/itmball.h +++ b/src/melee/it/items/itmball.h @@ -2,6 +2,7 @@ #define GALE01_2978DC #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itmetalb.c b/src/melee/it/items/itmetalb.c index fdb439e8ba..e3db465db5 100644 --- a/src/melee/it/items/itmetalb.c +++ b/src/melee/it/items/itmetalb.c @@ -20,7 +20,7 @@ ItemStateTable it_803F62C0[] = { void it_802953C8(Item_GObj* gobj) { Item* it = GET_ITEM(gobj); - it->xDCE_flag.bits.b7 = 0; + it->xDCE_flag.b7 = 0; it_80295498(gobj); } @@ -112,8 +112,7 @@ bool it_802955E0(Item_GObj* gobj) PAD_STACK(8); if (go != NULL) { - if (go->classifier == HSD_GOBJ_CLASS_FIGHTER && it->xDCF_flag.bits.b6) - { + if (go->classifier == HSD_GOBJ_CLASS_FIGHTER && it->xDCF_flag.b6) { ftLib_800871A8(go, gobj); pl_8003E17C(ftLib_80086BE0(go) & 0xFF, ftLib_800874BC(go), gobj); return true; diff --git a/src/melee/it/items/itmetalb.h b/src/melee/it/items/itmetalb.h index b00db5a5d6..38dc67dc60 100644 --- a/src/melee/it/items/itmetalb.h +++ b/src/melee/it/items/itmetalb.h @@ -2,6 +2,7 @@ #define GALE01_2953C8 #include + #include "it/forward.h" #include #include diff --git a/src/melee/it/items/itmetamon.h b/src/melee/it/items/itmetamon.h index a95ac74417..af010d7e7a 100644 --- a/src/melee/it/items/itmetamon.h +++ b/src/melee/it/items/itmetamon.h @@ -2,6 +2,7 @@ #define GALE01_2D3008 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itmewtwodisable.c b/src/melee/it/items/itmewtwodisable.c index f5106aeb17..374c59af8b 100644 --- a/src/melee/it/items/itmewtwodisable.c +++ b/src/melee/it/items/itmewtwodisable.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802C49E0 /// #it_802C4A00 diff --git a/src/melee/it/items/itmewtwodisable.h b/src/melee/it/items/itmewtwodisable.h index 9f0dbdc09d..9a47867c6e 100644 --- a/src/melee/it/items/itmewtwodisable.h +++ b/src/melee/it/items/itmewtwodisable.h @@ -2,6 +2,7 @@ #define GALE01_2C49E0 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itmewtwoshadowball.h b/src/melee/it/items/itmewtwoshadowball.h index 49ce9d04a6..9df8529be3 100644 --- a/src/melee/it/items/itmewtwoshadowball.h +++ b/src/melee/it/items/itmewtwoshadowball.h @@ -2,6 +2,7 @@ #define GALE01_2C4D10 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itmsbomb.h b/src/melee/it/items/itmsbomb.h index ce34e791f4..aecff009dc 100644 --- a/src/melee/it/items/itmsbomb.h +++ b/src/melee/it/items/itmsbomb.h @@ -2,6 +2,7 @@ #define GALE01_28FE90 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itnessbat.c b/src/melee/it/items/itnessbat.c index e998ac0498..cd7d833002 100644 --- a/src/melee/it/items/itnessbat.c +++ b/src/melee/it/items/itnessbat.c @@ -1,5 +1,4 @@ #include - #include /// #it_802AD478 diff --git a/src/melee/it/items/itnessfirepillar.h b/src/melee/it/items/itnessfirepillar.h index 714f63e31e..d0426dc0c5 100644 --- a/src/melee/it/items/itnessfirepillar.h +++ b/src/melee/it/items/itnessfirepillar.h @@ -2,6 +2,7 @@ #define GALE01_2AA494 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itnesspkfire.c b/src/melee/it/items/itnesspkfire.c index c0f1a38c7b..75abe99e78 100644 --- a/src/melee/it/items/itnesspkfire.c +++ b/src/melee/it/items/itnesspkfire.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802AA054 /// #it_802AA1D8 diff --git a/src/melee/it/items/itnesspkfire.h b/src/melee/it/items/itnesspkfire.h index 30a2104489..5374ea7691 100644 --- a/src/melee/it/items/itnesspkfire.h +++ b/src/melee/it/items/itnesspkfire.h @@ -2,6 +2,7 @@ #define GALE01_2AA054 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itnesspkflush.h b/src/melee/it/items/itnesspkflush.h index 101f64b1ed..f8f92f3555 100644 --- a/src/melee/it/items/itnesspkflush.h +++ b/src/melee/it/items/itnesspkflush.h @@ -2,6 +2,7 @@ #define GALE01_2AA7E4 #include + #include "ft/forward.h" #include "it/forward.h" #include diff --git a/src/melee/it/items/itnesspkflushexplode.c b/src/melee/it/items/itnesspkflushexplode.c index aa3d321638..2ed781b917 100644 --- a/src/melee/it/items/itnesspkflushexplode.c +++ b/src/melee/it/items/itnesspkflushexplode.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /* 2AFD44 */ static bool it_802AFD44(void); /// #it_802AF940 diff --git a/src/melee/it/items/itnesspkflushexplode.h b/src/melee/it/items/itnesspkflushexplode.h index 3d7757dd77..a5b4f2e59e 100644 --- a/src/melee/it/items/itnesspkflushexplode.h +++ b/src/melee/it/items/itnesspkflushexplode.h @@ -2,6 +2,7 @@ #define GALE01_2AF940 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itnesspkthunderball.h b/src/melee/it/items/itnesspkthunderball.h index a129f317e1..a82e47f6b9 100644 --- a/src/melee/it/items/itnesspkthunderball.h +++ b/src/melee/it/items/itnesspkthunderball.h @@ -2,6 +2,7 @@ #define GALE01_2AB3F0 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itnesspkthundertrail.c b/src/melee/it/items/itnesspkthundertrail.c index 234ca5915b..b3efb8f41b 100644 --- a/src/melee/it/items/itnesspkthundertrail.c +++ b/src/melee/it/items/itnesspkthundertrail.c @@ -1,5 +1,4 @@ #include - #include /* 2AC8A0 */ static bool it_802AC8A0(void); diff --git a/src/melee/it/items/itnokonoko.c b/src/melee/it/items/itnokonoko.c index 28a07533ce..4abb17f7be 100644 --- a/src/melee/it/items/itnokonoko.c +++ b/src/melee/it/items/itnokonoko.c @@ -1,5 +1,4 @@ #include - #include /// #it_802DC69C diff --git a/src/melee/it/items/itnokonoko.h b/src/melee/it/items/itnokonoko.h index 0c2e3784a4..da2cc31efc 100644 --- a/src/melee/it/items/itnokonoko.h +++ b/src/melee/it/items/itnokonoko.h @@ -2,10 +2,10 @@ #define GALE01_2DC69C #include -#include "it/forward.h" - #include +#include "it/forward.h" + /* 2DC69C */ UNK_RET it_802DC69C(UNK_PARAMS); /* 2DC774 */ UNK_RET it_802DC774(UNK_PARAMS); /* 2DC83C */ UNK_RET it_802DC83C(UNK_PARAMS); diff --git a/src/melee/it/items/itoctarock.c b/src/melee/it/items/itoctarock.c index 95f0a60bd2..4e7f4876e8 100644 --- a/src/melee/it/items/itoctarock.c +++ b/src/melee/it/items/itoctarock.c @@ -1,5 +1,4 @@ #include - #include /// #it_802E4A44 diff --git a/src/melee/it/items/itoctarock.h b/src/melee/it/items/itoctarock.h index 8dc8cc8b11..bbae67ff3d 100644 --- a/src/melee/it/items/itoctarock.h +++ b/src/melee/it/items/itoctarock.h @@ -2,6 +2,7 @@ #define GALE01_2E4A44 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itoctarockstone.c b/src/melee/it/items/itoctarockstone.c index 5166e6ab6f..b46f20b08a 100644 --- a/src/melee/it/items/itoctarockstone.c +++ b/src/melee/it/items/itoctarockstone.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802E878C bool it_802E87D8(Item_GObj* arg0) diff --git a/src/melee/it/items/itoctarockstone.h b/src/melee/it/items/itoctarockstone.h index 031a33ce93..124f9ed49e 100644 --- a/src/melee/it/items/itoctarockstone.h +++ b/src/melee/it/items/itoctarockstone.h @@ -2,6 +2,7 @@ #define GALE01_2E878C #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itoldkuri.c b/src/melee/it/items/itoldkuri.c index 37c0bbcd3d..05d502904e 100644 --- a/src/melee/it/items/itoldkuri.c +++ b/src/melee/it/items/itoldkuri.c @@ -1,5 +1,4 @@ #include - #include /// #it_802D73D0 diff --git a/src/melee/it/items/itoldkuri.h b/src/melee/it/items/itoldkuri.h index d062f6ff19..1a62c8d372 100644 --- a/src/melee/it/items/itoldkuri.h +++ b/src/melee/it/items/itoldkuri.h @@ -2,6 +2,7 @@ #define GALE01_2D73D0 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itoldottosea.c b/src/melee/it/items/itoldottosea.c index 2c43920917..7fb374dd8c 100644 --- a/src/melee/it/items/itoldottosea.c +++ b/src/melee/it/items/itoldottosea.c @@ -1,5 +1,4 @@ #include - #include /// #it_802E2470 diff --git a/src/melee/it/items/itparasol.c b/src/melee/it/items/itparasol.c index ff468362d9..ea0626d7db 100644 --- a/src/melee/it/items/itparasol.c +++ b/src/melee/it/items/itparasol.c @@ -41,7 +41,7 @@ int it_8028B08C(Item_GObj* item_gobj, int statenum) void it_8028B0B8(Item_GObj* item_gobj) { Item* item = GET_ITEM(item_gobj); - item->xDCE_flag.bits.b7 = false; + item->xDCE_flag.b7 = false; it_8028B17C(item_gobj); } diff --git a/src/melee/it/items/itparasol.h b/src/melee/it/items/itparasol.h index 69b8117fc6..e144ed749e 100644 --- a/src/melee/it/items/itparasol.h +++ b/src/melee/it/items/itparasol.h @@ -2,6 +2,7 @@ #define GALE01_28B08C #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itpatapata.c b/src/melee/it/items/itpatapata.c index 9bbf75e456..666be667c4 100644 --- a/src/melee/it/items/itpatapata.c +++ b/src/melee/it/items/itpatapata.c @@ -1,5 +1,4 @@ #include - #include /// #it_802E05A0 diff --git a/src/melee/it/items/itpeachexplode.c b/src/melee/it/items/itpeachexplode.c index 4765223e4c..ab1a72d17e 100644 --- a/src/melee/it/items/itpeachexplode.c +++ b/src/melee/it/items/itpeachexplode.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802BD158 bool it_802BD240(Item_GObj* arg0) diff --git a/src/melee/it/items/itpeachexplode.h b/src/melee/it/items/itpeachexplode.h index f84ccae560..b1594f14d1 100644 --- a/src/melee/it/items/itpeachexplode.h +++ b/src/melee/it/items/itpeachexplode.h @@ -2,6 +2,7 @@ #define GALE01_2BD158 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itpeachparasol.c b/src/melee/it/items/itpeachparasol.c index 719866e74e..93e68fed54 100644 --- a/src/melee/it/items/itpeachparasol.c +++ b/src/melee/it/items/itpeachparasol.c @@ -48,7 +48,7 @@ Item_GObj* it_802BDA64(HSD_GObj* parent, Vec3* pos, Fighter_Part arg2, f32 dir) spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0F; spawn.x0_parent_gobj = parent; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; item_gobj = Item_80268B18(&spawn); if (item_gobj != NULL) { diff --git a/src/melee/it/items/itpeachparasol.h b/src/melee/it/items/itpeachparasol.h index 2822e6a1e8..41d87eeb84 100644 --- a/src/melee/it/items/itpeachparasol.h +++ b/src/melee/it/items/itpeachparasol.h @@ -2,6 +2,7 @@ #define GALE01_2BDA40 #include + #include "it/forward.h" #include #include diff --git a/src/melee/it/items/itpeachtoadspore.h b/src/melee/it/items/itpeachtoadspore.h index 64cf629ca5..531e922d88 100644 --- a/src/melee/it/items/itpeachtoadspore.h +++ b/src/melee/it/items/itpeachtoadspore.h @@ -2,6 +2,7 @@ #define GALE01_2BE214 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itpeachturnip.c b/src/melee/it/items/itpeachturnip.c index a04c4fbd14..c0c907a907 100644 --- a/src/melee/it/items/itpeachturnip.c +++ b/src/melee/it/items/itpeachturnip.c @@ -1,5 +1,4 @@ #include - #include /// #it_802BD32C diff --git a/src/melee/it/items/itpeachturnip.h b/src/melee/it/items/itpeachturnip.h index 7ca1097ecf..ddc7ae9e70 100644 --- a/src/melee/it/items/itpeachturnip.h +++ b/src/melee/it/items/itpeachturnip.h @@ -2,6 +2,7 @@ #define GALE01_2BD32C #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itpikachuthunder.h b/src/melee/it/items/itpikachuthunder.h index 8923594bf6..c84517bf83 100644 --- a/src/melee/it/items/itpikachuthunder.h +++ b/src/melee/it/items/itpikachuthunder.h @@ -2,6 +2,7 @@ #define GALE01_2B1DEC #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itpikachutjoltair.c b/src/melee/it/items/itpikachutjoltair.c index d216b41edc..493bc37856 100644 --- a/src/melee/it/items/itpikachutjoltair.c +++ b/src/melee/it/items/itpikachutjoltair.c @@ -1,5 +1,4 @@ #include - #include /* 2B45E8 */ static bool it_802B45E8(void); diff --git a/src/melee/it/items/itpikachutjoltair.h b/src/melee/it/items/itpikachutjoltair.h index b6df3254a8..1ff31a9670 100644 --- a/src/melee/it/items/itpikachutjoltair.h +++ b/src/melee/it/items/itpikachutjoltair.h @@ -2,6 +2,7 @@ #define GALE01_2B3EFC #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itpikachutjoltground.h b/src/melee/it/items/itpikachutjoltground.h index 157d0d7cea..2ebc87b771 100644 --- a/src/melee/it/items/itpikachutjoltground.h +++ b/src/melee/it/items/itpikachutjoltground.h @@ -2,6 +2,7 @@ #define GALE01_2B3368 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itporygon2.h b/src/melee/it/items/itporygon2.h index fb8b899b31..61302c1d30 100644 --- a/src/melee/it/items/itporygon2.h +++ b/src/melee/it/items/itporygon2.h @@ -2,6 +2,7 @@ #define GALE01_2D5ABC #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itrabbitc.c b/src/melee/it/items/itrabbitc.c index 2f10d7ae59..0f21fa14af 100644 --- a/src/melee/it/items/itrabbitc.c +++ b/src/melee/it/items/itrabbitc.c @@ -54,7 +54,7 @@ HSD_GObj* it_80294DC0(Vec3* pos) spawn.vel.x = 0.0f; spawn.x0_parent_gobj = 0; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = 1; + spawn.x44_flag.b0 = 1; spawn.x40 = 0; item_gobj = Item_80268B5C(&spawn); if (item_gobj != NULL) { diff --git a/src/melee/it/items/itrabbitc.h b/src/melee/it/items/itrabbitc.h index 00072c1f03..74666aa014 100644 --- a/src/melee/it/items/itrabbitc.h +++ b/src/melee/it/items/itrabbitc.h @@ -2,6 +2,7 @@ #define GALE01_294DA0 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itraikou.h b/src/melee/it/items/itraikou.h index 32cc110742..07d678726e 100644 --- a/src/melee/it/items/itraikou.h +++ b/src/melee/it/items/itraikou.h @@ -2,6 +2,7 @@ #define GALE01_2CF814 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itrshell.c b/src/melee/it/items/itrshell.c index 68f8ed38cd..36498ba660 100644 --- a/src/melee/it/items/itrshell.c +++ b/src/melee/it/items/itrshell.c @@ -1,5 +1,4 @@ #include - #include /// #it_8028CFE0 diff --git a/src/melee/it/items/itrshell.h b/src/melee/it/items/itrshell.h index 9da6c9a560..d6fe7943a6 100644 --- a/src/melee/it/items/itrshell.h +++ b/src/melee/it/items/itrshell.h @@ -2,6 +2,7 @@ #define GALE01_28CFE0 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itsamusbomb.c b/src/melee/it/items/itsamusbomb.c index a3c3b4b0d2..7995452414 100644 --- a/src/melee/it/items/itsamusbomb.c +++ b/src/melee/it/items/itsamusbomb.c @@ -1,5 +1,4 @@ #include - #include /// #it_802B4AC8 diff --git a/src/melee/it/items/itsamusbomb.h b/src/melee/it/items/itsamusbomb.h index 161764d5b6..1c8eba1b67 100644 --- a/src/melee/it/items/itsamusbomb.h +++ b/src/melee/it/items/itsamusbomb.h @@ -2,6 +2,7 @@ #define GALE01_2B4AC8 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itsamuschargeshot.c b/src/melee/it/items/itsamuschargeshot.c index 0d0e5f9b38..c31b50b8bd 100644 --- a/src/melee/it/items/itsamuschargeshot.c +++ b/src/melee/it/items/itsamuschargeshot.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802B5518 /// #it_802B55C8 diff --git a/src/melee/it/items/itsamuschargeshot.h b/src/melee/it/items/itsamuschargeshot.h index d37fae42d8..c7a0b1905c 100644 --- a/src/melee/it/items/itsamuschargeshot.h +++ b/src/melee/it/items/itsamuschargeshot.h @@ -2,6 +2,7 @@ #define GALE01_2B5518 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itsamusgrapple.c b/src/melee/it/items/itsamusgrapple.c index 717cfce6ec..da2dab70a7 100644 --- a/src/melee/it/items/itsamusgrapple.c +++ b/src/melee/it/items/itsamusgrapple.c @@ -4,7 +4,7 @@ void it_802B7150(Item_GObj* gobj) { - GET_ITEM(gobj)->xDD4_itemVar.samusgrapple.unk_10 = 0; + GET_ITEM(gobj)->xDD4_itemVar.samusgrapple.unk_10 = NULL; } /// #it_802B7160 @@ -19,39 +19,66 @@ void it_802B7150(Item_GObj* gobj) /// #fn_802B7E34 -/// #it_802B8048 +void it_802B8048(Item_GObj* gobj) +{ + GET_ITEM(gobj)->xDD4_itemVar.samusgrapple.unk_10 = fn_802B7E34; +} /// #fn_802B805C -/// #it_802B8370 +void it_802B8370(Item_GObj* gobj) +{ + GET_ITEM(gobj)->xDD4_itemVar.samusgrapple.unk_10 = fn_802B805C; +} /// #fn_802B8384 -/// #it_802B8510 +void it_802B8510(Item_GObj* gobj) +{ + GET_ITEM(gobj)->xDD4_itemVar.samusgrapple.unk_10 = fn_802B8384; +} /// #fn_802B8524 -/// #it_802B8670 +void it_802B8670(Item_GObj* gobj) +{ + GET_ITEM(gobj)->xDD4_itemVar.samusgrapple.unk_10 = fn_802B8524; +} /// #fn_802B8684 -/// #it_802B8800 +void it_802B8800(Item_GObj* gobj) +{ + GET_ITEM(gobj)->xDD4_itemVar.samusgrapple.unk_10 = fn_802B8684; +} /// #fn_802B8814 -/// #it_802B8948 +void it_802B8948(Item_GObj* gobj) +{ + GET_ITEM(gobj)->xDD4_itemVar.samusgrapple.unk_10 = fn_802B8814; +} /// #fn_802B895C -/// #it_802B8B40 +void it_802B8B40(Item_GObj* gobj) +{ + GET_ITEM(gobj)->xDD4_itemVar.samusgrapple.unk_10 = fn_802B895C; +} /// #fn_802B8B54 -/// #it_802B8D24 +void it_802B8D24(Item_GObj* gobj) +{ + GET_ITEM(gobj)->xDD4_itemVar.samusgrapple.unk_10 = fn_802B8B54; +} /// #fn_802B8D38 -/// #it_802B8FF8 +void it_802B8FF8(Item_GObj* gobj) +{ + GET_ITEM(gobj)->xDD4_itemVar.samusgrapple.unk_10 = fn_802B8D38; +} /// #it_802B900C diff --git a/src/melee/it/items/itsamusgrapple.h b/src/melee/it/items/itsamusgrapple.h index 1990b030c9..49001eece8 100644 --- a/src/melee/it/items/itsamusgrapple.h +++ b/src/melee/it/items/itsamusgrapple.h @@ -16,23 +16,23 @@ /* 2B7B84 */ void it_802B7B84(Item_GObj* gobj); /* 2B7C18 */ Item_GObj* it_802B7C18(Fighter_GObj*, Vec3*, float facing_dir); /* 2B7E34 */ UNK_RET fn_802B7E34(UNK_PARAMS); -/* 2B8048 */ UNK_RET it_802B8048(UNK_PARAMS); +/* 2B8048 */ void it_802B8048(Item_GObj* gobj); /* 2B805C */ UNK_RET fn_802B805C(UNK_PARAMS); -/* 2B8370 */ UNK_RET it_802B8370(UNK_PARAMS); +/* 2B8370 */ void it_802B8370(Item_GObj* gobj); /* 2B8384 */ UNK_RET fn_802B8384(UNK_PARAMS); -/* 2B8510 */ UNK_RET it_802B8510(UNK_PARAMS); +/* 2B8510 */ void it_802B8510(Item_GObj* gobj); /* 2B8524 */ UNK_RET fn_802B8524(UNK_PARAMS); -/* 2B8670 */ UNK_RET it_802B8670(UNK_PARAMS); +/* 2B8670 */ void it_802B8670(Item_GObj* gobj); /* 2B8684 */ UNK_RET fn_802B8684(UNK_PARAMS); -/* 2B8800 */ UNK_RET it_802B8800(UNK_PARAMS); +/* 2B8800 */ void it_802B8800(Item_GObj* gobj); /* 2B8814 */ UNK_RET fn_802B8814(UNK_PARAMS); -/* 2B8948 */ UNK_RET it_802B8948(UNK_PARAMS); +/* 2B8948 */ void it_802B8948(Item_GObj* gobj); /* 2B895C */ UNK_RET fn_802B895C(UNK_PARAMS); -/* 2B8B40 */ UNK_RET it_802B8B40(UNK_PARAMS); +/* 2B8B40 */ void it_802B8B40(Item_GObj* gobj); /* 2B8B54 */ UNK_RET fn_802B8B54(UNK_PARAMS); -/* 2B8D24 */ UNK_RET it_802B8D24(UNK_PARAMS); +/* 2B8D24 */ void it_802B8D24(Item_GObj* gobj); /* 2B8D38 */ UNK_RET fn_802B8D38(UNK_PARAMS); -/* 2B8FF8 */ UNK_RET it_802B8FF8(UNK_PARAMS); +/* 2B8FF8 */ void it_802B8FF8(Item_GObj* gobj); /* 2B900C */ UNK_RET it_802B900C(UNK_PARAMS); /* 2B91C4 */ UNK_RET it_802B91C4(UNK_PARAMS); /* 2B9328 */ UNK_RET it_802B9328(UNK_PARAMS); diff --git a/src/melee/it/items/itsamusmissile.h b/src/melee/it/items/itsamusmissile.h index d797e5913a..5d06d24632 100644 --- a/src/melee/it/items/itsamusmissile.h +++ b/src/melee/it/items/itsamusmissile.h @@ -2,6 +2,7 @@ #define GALE01_2B62D0 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itscball.h b/src/melee/it/items/itscball.h index 162b33f9d6..92eb5791ba 100644 --- a/src/melee/it/items/itscball.h +++ b/src/melee/it/items/itscball.h @@ -2,6 +2,7 @@ #define GALE01_294AB0 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itseakneedlethrown.h b/src/melee/it/items/itseakneedlethrown.h index 07ab0bca4f..03186aeca5 100644 --- a/src/melee/it/items/itseakneedlethrown.h +++ b/src/melee/it/items/itseakneedlethrown.h @@ -2,6 +2,7 @@ #define GALE01_2AFD8C #include + #include "ft/forward.h" #include "it/forward.h" #include diff --git a/src/melee/it/items/itseakvanish.c b/src/melee/it/items/itseakvanish.c index 3261dc4c64..cf94b5ecca 100644 --- a/src/melee/it/items/itseakvanish.c +++ b/src/melee/it/items/itseakvanish.c @@ -31,7 +31,7 @@ Item_GObj* it_802B1C60(HSD_GObj* parent, Vec3* pos, f32 dir) spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0F; spawn.x0_parent_gobj = parent; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = 1; + spawn.x44_flag.b0 = 1; spawn.x40 = 0; item_gobj = Item_80268B18(&spawn); if (item_gobj != NULL) { diff --git a/src/melee/it/items/itseakvanish.h b/src/melee/it/items/itseakvanish.h index 7005b79ca6..65bd876fd2 100644 --- a/src/melee/it/items/itseakvanish.h +++ b/src/melee/it/items/itseakvanish.h @@ -2,6 +2,7 @@ #define GALE01_2B1C60 #include + #include "it/forward.h" #include #include diff --git a/src/melee/it/items/itsonans.h b/src/melee/it/items/itsonans.h index 69c22469e9..14809c59ba 100644 --- a/src/melee/it/items/itsonans.h +++ b/src/melee/it/items/itsonans.h @@ -2,6 +2,7 @@ #define GALE01_2CD44C #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itspycloak.c b/src/melee/it/items/itspycloak.c index 0a4285022b..9ec9ce2b0a 100644 --- a/src/melee/it/items/itspycloak.c +++ b/src/melee/it/items/itspycloak.c @@ -1,4 +1,5 @@ #include + #include #include diff --git a/src/melee/it/items/itsscope.c b/src/melee/it/items/itsscope.c index 0144979198..9db6866027 100644 --- a/src/melee/it/items/itsscope.c +++ b/src/melee/it/items/itsscope.c @@ -1,5 +1,4 @@ #include - #include /// #it_80291BE0 diff --git a/src/melee/it/items/itsscope.h b/src/melee/it/items/itsscope.h index 5f7fed258e..a527e460da 100644 --- a/src/melee/it/items/itsscope.h +++ b/src/melee/it/items/itsscope.h @@ -2,6 +2,7 @@ #define GALE01_291BE0 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itsscopebeam.c b/src/melee/it/items/itsscopebeam.c index bc749d8f59..53936d76e7 100644 --- a/src/melee/it/items/itsscopebeam.c +++ b/src/melee/it/items/itsscopebeam.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_80298DEC /// #it_80298ED0 diff --git a/src/melee/it/items/itsscopebeam.h b/src/melee/it/items/itsscopebeam.h index 2abd8c2600..b6ce719125 100644 --- a/src/melee/it/items/itsscopebeam.h +++ b/src/melee/it/items/itsscopebeam.h @@ -2,6 +2,7 @@ #define GALE01_298DEC #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itstar.h b/src/melee/it/items/itstar.h index de8bca491e..c3666ccac4 100644 --- a/src/melee/it/items/itstar.h +++ b/src/melee/it/items/itstar.h @@ -2,6 +2,7 @@ #define GALE01_284644 #include + #include "it/forward.h" #include diff --git a/src/melee/it/items/itstarrod.c b/src/melee/it/items/itstarrod.c index 9c82c13a3f..0513c6af0e 100644 --- a/src/melee/it/items/itstarrod.c +++ b/src/melee/it/items/itstarrod.c @@ -1,5 +1,4 @@ #include - #include /// #it_80292360 diff --git a/src/melee/it/items/itstarrod.h b/src/melee/it/items/itstarrod.h index c8435ace61..79207285c4 100644 --- a/src/melee/it/items/itstarrod.h +++ b/src/melee/it/items/itstarrod.h @@ -2,6 +2,7 @@ #define GALE01_292360 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itstarrodstar.c b/src/melee/it/items/itstarrodstar.c index 972367dabc..2d7446f95a 100644 --- a/src/melee/it/items/itstarrodstar.c +++ b/src/melee/it/items/itstarrodstar.c @@ -1,8 +1,8 @@ #include -#include "it/forward.h" - #include +#include "it/forward.h" + /// #it_802988E4 /// #it_802989C8 diff --git a/src/melee/it/items/itstarrodstar.h b/src/melee/it/items/itstarrodstar.h index 3633047b69..05ea0b0de1 100644 --- a/src/melee/it/items/itstarrodstar.h +++ b/src/melee/it/items/itstarrodstar.h @@ -2,6 +2,7 @@ #define GALE01_2988E4 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itsword.c b/src/melee/it/items/itsword.c index 15e7c90f78..ab5a70204b 100644 --- a/src/melee/it/items/itsword.c +++ b/src/melee/it/items/itsword.c @@ -1,6 +1,8 @@ /// @file /// @todo A lot of duplicate code here, can maybe be cleaned up with inlines. #include +#include + #include "it/items/forward.h" #include "itsword.h" @@ -17,7 +19,6 @@ #include "it/types.h" #include -#include #include #include @@ -60,7 +61,7 @@ Item_GObj* itSword_Spawn(Vec3* pos) spawn.vel.x = spawn.vel.y = spawn.vel.z = 0; spawn.x0_parent_gobj = NULL; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; { Item_GObj* gobj = Item_80268B5C(&spawn); diff --git a/src/melee/it/items/itsword.h b/src/melee/it/items/itsword.h index c5538f1134..401cbd4251 100644 --- a/src/melee/it/items/itsword.h +++ b/src/melee/it/items/itsword.h @@ -2,6 +2,7 @@ #define GALE01_284D54 #include + #include "it/forward.h" #include "it/items/forward.h" #include diff --git a/src/melee/it/items/ittaru.c b/src/melee/it/items/ittaru.c index 0aa3491dc1..f993931f1f 100644 --- a/src/melee/it/items/ittaru.c +++ b/src/melee/it/items/ittaru.c @@ -1,5 +1,4 @@ #include - #include /// #it_80287458 diff --git a/src/melee/it/items/ittarucann.c b/src/melee/it/items/ittarucann.c index 6cbfe8e4f8..73c12c27dc 100644 --- a/src/melee/it/items/ittarucann.c +++ b/src/melee/it/items/ittarucann.c @@ -1,15 +1,24 @@ -#include -#include "it/forward.h" +#include "ittarucann.h" -#include +#include "it/inlines.h" /// #it_80295ED4 /// #it_80295F38 -/// #it_802960B8 +int it_802960B8(Item_GObj* gobj) +{ + itTaruCann_DatAttrs* da = + GET_ITEM(gobj)->xC4_article_data->x4_specialAttributes; + return da->x2C; +} -/// #it_802960CC +int it_802960CC(Item_GObj* gobj) +{ + itTaruCann_DatAttrs* da = + GET_ITEM(gobj)->xC4_article_data->x4_specialAttributes; + return da->x28; +} /// #it_802960E0 diff --git a/src/melee/it/items/ittarucann.h b/src/melee/it/items/ittarucann.h index 4c2a1382e0..cef2bb4cda 100644 --- a/src/melee/it/items/ittarucann.h +++ b/src/melee/it/items/ittarucann.h @@ -7,8 +7,8 @@ /* 295ED4 */ UNK_RET it_80295ED4(UNK_PARAMS); /* 295F38 */ UNK_RET it_80295F38(UNK_PARAMS); -/* 2960B8 */ UNK_RET it_802960B8(UNK_PARAMS); -/* 2960CC */ UNK_RET it_802960CC(UNK_PARAMS); +/* 2960B8 */ int it_802960B8(Item_GObj* gobj); +/* 2960CC */ int it_802960CC(Item_GObj* gobj); /* 2960E0 */ void it_802960E0(Item_GObj*); /* 296120 */ void it_80296120(Item_GObj*); /* 2961E8 */ UNK_RET it_802961E8(UNK_PARAMS); @@ -41,7 +41,7 @@ /* 2975F4 */ UNK_RET it_802975F4(UNK_PARAMS); /* 297674 */ UNK_RET it_80297674(UNK_PARAMS); /* 297784 */ UNK_RET it_80297784(UNK_PARAMS); -/* 297788 */ UNK_RET it_80297788(UNK_PARAMS); +/* 297788 */ bool it_80297788(void); /* 297790 */ UNK_RET it_80297790(UNK_PARAMS); /* 29789C */ int it_8029789C(Item_GObj*); /* 2978A4 */ int it_802978A4(Item_GObj*); diff --git a/src/melee/it/items/itthunder.c b/src/melee/it/items/itthunder.c index fa74a16c1b..7749ea0cef 100644 --- a/src/melee/it/items/itthunder.c +++ b/src/melee/it/items/itthunder.c @@ -1,5 +1,4 @@ #include - #include /// #it_802CCAB4 diff --git a/src/melee/it/items/ittincle.h b/src/melee/it/items/ittincle.h index b6ba010271..d1a06bc6e4 100644 --- a/src/melee/it/items/ittincle.h +++ b/src/melee/it/items/ittincle.h @@ -1,10 +1,10 @@ #ifndef GALE01_2EB5C8 #define GALE01_2EB5C8 -#include "it/forward.h" - #include +#include "it/forward.h" + /* 2EB5C8 */ UNK_RET it_802EB5C8(UNK_PARAMS); /* 2EB684 */ UNK_RET it_802EB684(UNK_PARAMS); /* 2EB6A8 */ UNK_RET it_802EB6A8(UNK_PARAMS); diff --git a/src/melee/it/items/ittomato.c b/src/melee/it/items/ittomato.c index 6fcc861e88..e718d6d831 100644 --- a/src/melee/it/items/ittomato.c +++ b/src/melee/it/items/ittomato.c @@ -53,13 +53,13 @@ Item_GObj* it_802841B4(Item_GObj* gobj, Vec3* pos, s32 arg2) spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0F; spawn.x0_parent_gobj = NULL; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; item_gobj = Item_80268B18(&spawn); } if (item_gobj != NULL) { Item* it = GET_ITEM(item_gobj); - it->xDD4_itemVar.tomato.x4.bits.b0 = true; + it->xDD4_itemVar.tomato.x4.b0 = true; it->xDD4_itemVar.tomato.x8 = arg2; } return item_gobj; @@ -83,7 +83,7 @@ void it_802842A4(Item_GObj* gobj) item->x40_vel.z = 0.0F; item->xDD4_itemVar.tomato.heal_amount = sa->x0; - item->xDD4_itemVar.tomato.x4.bits.b0 = false; + item->xDD4_itemVar.tomato.x4.b0 = false; item->xDD4_itemVar.tomato.x8 = 0; it_80284358(gobj); diff --git a/src/melee/it/items/ittomato.h b/src/melee/it/items/ittomato.h index 313b4b1945..8620aadbc6 100644 --- a/src/melee/it/items/ittomato.h +++ b/src/melee/it/items/ittomato.h @@ -1,12 +1,12 @@ #ifndef GALE01_2841B4 #define GALE01_2841B4 +#include + #include "it/forward.h" #include "it/items/types.h" -#include - /* 2842A4 */ void it_802842A4(Item_GObj*); /* 284324 */ void it_80284324(Item_GObj*); /* 2844E4 */ void it_802844E4(Item_GObj*); diff --git a/src/melee/it/items/itwhitebea.h b/src/melee/it/items/itwhitebea.h index fb5074f069..86125a70c4 100644 --- a/src/melee/it/items/itwhitebea.h +++ b/src/melee/it/items/itwhitebea.h @@ -1,10 +1,10 @@ #ifndef GALE01_2E31F8 #define GALE01_2E31F8 -#include "it/forward.h" - #include +#include "it/forward.h" + /* 2E31F8 */ void it_802E31F8(Item_GObj*); /* 2E324C */ UNK_RET it_802E324C(UNK_PARAMS); /* 2E32B0 */ UNK_RET it_802E32B0(UNK_PARAMS); diff --git a/src/melee/it/items/ityoshieggthrow.h b/src/melee/it/items/ityoshieggthrow.h index 68ced37ae3..b3ff2c0210 100644 --- a/src/melee/it/items/ityoshieggthrow.h +++ b/src/melee/it/items/ityoshieggthrow.h @@ -2,6 +2,7 @@ #define GALE01_2B2890 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/ityoshistar.c b/src/melee/it/items/ityoshistar.c index f4ce33725f..b01333c973 100644 --- a/src/melee/it/items/ityoshistar.c +++ b/src/melee/it/items/ityoshistar.c @@ -38,7 +38,7 @@ Item_GObj* it_802B2FC8(HSD_GObj* parent, Vec3* pos, f32 dir) spawn.vel.x = spawn.vel.y = spawn.vel.z = 0.0F; spawn.x0_parent_gobj = parent; spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; - spawn.x44_flag.bits.b0 = true; + spawn.x44_flag.b0 = true; spawn.x40 = 0; item_gobj = Item_80268B18(&spawn); if (item_gobj != NULL) { diff --git a/src/melee/it/items/ityoshistar.h b/src/melee/it/items/ityoshistar.h index 113c70089f..6e8af34b42 100644 --- a/src/melee/it/items/ityoshistar.h +++ b/src/melee/it/items/ityoshistar.h @@ -2,6 +2,7 @@ #define GALE01_2B2FC8 #include + #include "it/forward.h" #include #include diff --git a/src/melee/it/items/itzeldadinfire.h b/src/melee/it/items/itzeldadinfire.h index a84ba65406..a92af6a3f4 100644 --- a/src/melee/it/items/itzeldadinfire.h +++ b/src/melee/it/items/itzeldadinfire.h @@ -2,6 +2,7 @@ #define GALE01_2C3AF0 #include + #include "ft/forward.h" #include "it/forward.h" #include diff --git a/src/melee/it/items/itzeldadinfireexplode.h b/src/melee/it/items/itzeldadinfireexplode.h index f3d16ac629..7d65fb834f 100644 --- a/src/melee/it/items/itzeldadinfireexplode.h +++ b/src/melee/it/items/itzeldadinfireexplode.h @@ -2,6 +2,7 @@ #define GALE01_2C4580 #include + #include "it/forward.h" #include "it/items/types.h" diff --git a/src/melee/it/items/itzgshell.h b/src/melee/it/items/itzgshell.h index 8ca9e15a50..b0abff339a 100644 --- a/src/melee/it/items/itzgshell.h +++ b/src/melee/it/items/itzgshell.h @@ -2,10 +2,10 @@ #define GALE01_2DDB38 #include -#include "it/forward.h" - #include +#include "it/forward.h" + /* 2DDB38 */ UNK_RET it_802DDB38(UNK_PARAMS); /* 2DDBE8 */ UNK_RET it_802DDBE8(UNK_PARAMS); /* 2DDC8C */ UNK_RET fn_802DDC8C(UNK_PARAMS); diff --git a/src/melee/it/items/types.h b/src/melee/it/items/types.h index 43c494ca6b..9c0aceecc4 100644 --- a/src/melee/it/items/types.h +++ b/src/melee/it/items/types.h @@ -2,11 +2,11 @@ #define MELEE_IT_ITEMS_TYPES_H #include +#include + #include "it/items/forward.h" // IWYU pragma: export #include -#include - /// @todo Size unknown. struct ItemStateTable { /// @at{0} @sz{4} diff --git a/src/melee/it/types.h b/src/melee/it/types.h index e20afd6f12..e1132de1de 100644 --- a/src/melee/it/types.h +++ b/src/melee/it/types.h @@ -2,6 +2,8 @@ #define MELEE_IT_TYPES_H #include +#include + #include "cm/forward.h" #include "it/forward.h" // IWYU pragma: export #include "it/items/forward.h" @@ -15,7 +17,6 @@ #include "lb/types.h" #include -#include #include #include @@ -28,7 +29,7 @@ struct CameraBoxFlags { u8 b5 : 1; u8 b6 : 1; u8 b7 : 1; - } bits; + }; }; struct flag32 { diff --git a/src/melee/lb/lb_00B0.c b/src/melee/lb/lb_00B0.c index ab9feae62b..01b1bc467c 100644 --- a/src/melee/lb/lb_00B0.c +++ b/src/melee/lb/lb_00B0.c @@ -1,9 +1,10 @@ +#include + #include "lb/lb_00B0.h" #include "sc/types.h" // IWYU pragma: keep #include -#include #include #include #include diff --git a/src/melee/lb/lb_00B0.h b/src/melee/lb/lb_00B0.h index 0c0f9e6141..a66f870723 100644 --- a/src/melee/lb/lb_00B0.h +++ b/src/melee/lb/lb_00B0.h @@ -2,10 +2,11 @@ #define GALE01_00B074 #include +#include + #include "sc/forward.h" #include -#include #include #include #include diff --git a/src/melee/lb/lb_00F9.c b/src/melee/lb/lb_00F9.c index 8cdea35fc0..a00e6db04d 100644 --- a/src/melee/lb/lb_00F9.c +++ b/src/melee/lb/lb_00F9.c @@ -1,13 +1,10 @@ -#include "lb_00F9.h" +#include "lb_00F9.static.h" + +#include "lb/types.h" #include #include -/* 011B74 */ static void lb_80011B74(HSD_DObj* dobj, u32 flags); -/* 013BB0 */ bool lb_80013BB0(void); - -/* 4D63B4 */ static enum_t lb_804D63B4; - static inline bool checkJObjFlags(HSD_JObj* jobj) { return jobj->flags & (JOBJ_PTCL | JOBJ_SPLINE) ? false : true; @@ -88,11 +85,16 @@ enum_t lb_80011ABC(void) void lb_800138CC(HSD_GObj* gobj, int arg1) { - UNK_T data = HSD_GObjGetUserData(gobj); - M2C_FIELD(data, int*, 0x18) = arg1; + struct lb_800138D8_t* data = HSD_GObjGetUserData(gobj); + data->x18 = arg1; } -/// #lb_800138D8 +void lb_800138D8(HSD_GObj* gobj, s8 arg1) +{ + struct lb_800138D8_t* data = HSD_GObjGetUserData(gobj); + data->x12 = 1; + data->x11 = arg1; +} /// #lb_800138EC diff --git a/src/melee/lb/lb_00F9.h b/src/melee/lb/lb_00F9.h index 872d669f7a..61faedf4e7 100644 --- a/src/melee/lb/lb_00F9.h +++ b/src/melee/lb/lb_00F9.h @@ -2,13 +2,13 @@ #define GALE01_00F9F8 #include +#include + #include "ft/forward.h" #include "lb/forward.h" #include #include -#include - /* 00F9F8 */ void lb_8000F9F8(HSD_JObj* jobj); /* 00FA94 */ UNK_RET lb_8000FA94(UNK_PARAMS); /* 00FCDC */ void lb_8000FCDC(void); @@ -40,7 +40,7 @@ /* 013614 */ UNK_RET fn_80013614(UNK_PARAMS); /* 0138AC */ UNK_RET fn_800138AC(UNK_PARAMS); /* 0138CC */ void lb_800138CC(HSD_GObj* gobj, int arg1); -/* 0138D8 */ UNK_RET lb_800138D8(UNK_PARAMS); +/* 0138D8 */ void lb_800138D8(HSD_GObj* gobj, s8 arg1); /* 0138EC */ UNK_RET lb_800138EC(UNK_PARAMS); /* 013B14 */ HSD_CObj* lb_80013B14(HSD_CameraDescPerspective*); /* 013BB8 */ UNK_RET lb_80013BB8(UNK_PARAMS); diff --git a/src/melee/lb/lb_00F9.static.h b/src/melee/lb/lb_00F9.static.h new file mode 100644 index 0000000000..882b16f4a5 --- /dev/null +++ b/src/melee/lb/lb_00F9.static.h @@ -0,0 +1,12 @@ +#ifndef __GALE01_00F9F8 +#define __GALE01_00F9F8 + +#include + +#include "lb_00F9.h" // IWYU pragma: export + +/* 011B74 */ static void lb_80011B74(HSD_DObj* dobj, u32 flags); +/* 013BB0 */ static bool lb_80013BB0(void); +/* 4D63B4 */ static enum_t lb_804D63B4; + +#endif diff --git a/src/melee/lb/lb_0192.h b/src/melee/lb/lb_0192.h index 76bdf1492a..97dca5537f 100644 --- a/src/melee/lb/lb_0192.h +++ b/src/melee/lb/lb_0192.h @@ -2,7 +2,6 @@ #define GALE01_019230 #include - #include /* 0192A8 */ void lb_800192A8(UNK_T cb); diff --git a/src/melee/lb/lbanim.h b/src/melee/lb/lbanim.h index edd1138ea9..837554948b 100644 --- a/src/melee/lb/lbanim.h +++ b/src/melee/lb/lbanim.h @@ -2,10 +2,10 @@ #define GALE01_01E560 #include -#include - #include +#include + /* 01E60C */ UNK_T lbAnim_8001E60C(UNK_T, s8); /* 01E7E8 */ void lbAnim_8001E7E8(UNK_T, UNK_T, s32, s8); diff --git a/src/melee/lb/lbarchive.c b/src/melee/lb/lbarchive.c index c3c8c13a1d..bbe9dace38 100644 --- a/src/melee/lb/lbarchive.c +++ b/src/melee/lb/lbarchive.c @@ -52,12 +52,12 @@ void lbArchive_LoadSections(HSD_Archive* archive, void** file, ...) HSD_Archive* lbArchive_LoadArchive(char* filename) { u32 length; - u32* data; + HSD_Archive* data; HSD_Archive* archive; data = lbHeap_80015BD0(0, lbFile_800163D8(filename) + 0x1F & 0xFFFFFFE0); archive = lbHeap_80015BD0(0, sizeof(HSD_Archive)); - lbFile_8001668C(filename, data, &length); + lbFile_8001668C(filename, (u32*) data, &length); lbArchive_InitializeDAT(archive, (u8*) data, length); return archive; } diff --git a/src/melee/lb/lbarchive.h b/src/melee/lb/lbarchive.h index d5314eab94..fa9a86af93 100644 --- a/src/melee/lb/lbarchive.h +++ b/src/melee/lb/lbarchive.h @@ -2,6 +2,7 @@ #define _lbarchive_h_ #include + #include #include diff --git a/src/melee/lb/lbarq.c b/src/melee/lb/lbarq.c index eb04629bab..470e4898ae 100644 --- a/src/melee/lb/lbarq.c +++ b/src/melee/lb/lbarq.c @@ -1,5 +1,4 @@ #include - #include s32 lbArq_80014ABC(void* arg0) diff --git a/src/melee/lb/lbarq.h b/src/melee/lb/lbarq.h index e730a2cc1c..d3d4ca08b5 100644 --- a/src/melee/lb/lbarq.h +++ b/src/melee/lb/lbarq.h @@ -2,7 +2,6 @@ #define GALE01_014ABC #include - #include /* 014ABC */ UNK_RET lbArq_80014ABC(UNK_PARAMS); diff --git a/src/melee/lb/lbaudio_ax.h b/src/melee/lb/lbaudio_ax.h index 7c2fa59b84..07fd7da7d1 100644 --- a/src/melee/lb/lbaudio_ax.h +++ b/src/melee/lb/lbaudio_ax.h @@ -2,6 +2,7 @@ #define MELEE_LB_LBAUDIO_AX_H #include + #include #include diff --git a/src/melee/lb/lbbgflash.c b/src/melee/lb/lbbgflash.c index 86b6ec394c..3cc5bee9f0 100644 --- a/src/melee/lb/lbbgflash.c +++ b/src/melee/lb/lbbgflash.c @@ -97,4 +97,3 @@ void fn_80021C18(void) {} /// #lbBgFlash_80021C48 /// #fn_80021C80 - diff --git a/src/melee/lb/lbbgflash.h b/src/melee/lb/lbbgflash.h index 15ec6716c5..71019009a8 100644 --- a/src/melee/lb/lbbgflash.h +++ b/src/melee/lb/lbbgflash.h @@ -2,7 +2,6 @@ #define GALE01_01FC08 #include - #include /* 01FC08 */ UNK_RET fn_8001FC08(UNK_PARAMS); diff --git a/src/melee/lb/lbcardgame.c b/src/melee/lb/lbcardgame.c index 8e32dad147..f0e59eb29a 100644 --- a/src/melee/lb/lbcardgame.c +++ b/src/melee/lb/lbcardgame.c @@ -1,18 +1,12 @@ #include -#include "lbcardgame.h" +#include "lbcardgame.static.h" -struct lb_80433318_t { - /* +0 */ UNK_T x0; - /* +4 */ UNK_T x4; - /* +8 */ int x8; - /* +C */ u8 _C[0x5C]; -}; -STATIC_ASSERT(sizeof(struct lb_80433318_t) == 0x68); - -/* 433318 */ static struct lb_80433318_t lb_80433318; - -/// #lb_80019880 +void lb_80019880(s32 arg0, s32 arg1) +{ + lb_804329F0[2].unk_C = arg1; + lb_804329F0[2].unk_8 = arg0; +} /// #lb_80019894 @@ -20,7 +14,10 @@ STATIC_ASSERT(sizeof(struct lb_80433318_t) == 0x68); /// #lb_80019900 -/// #lb_80019A30 +s32 lb_80019A30(s32 arg0) +{ + return lb_804329F0[arg0].unk_10; +} /// #lb_80019A48 @@ -68,7 +65,10 @@ STATIC_ASSERT(sizeof(struct lb_80433318_t) == 0x68); /// #lb_8001B614 -/// #lb_8001B6E0 +s32 lb_8001B6E0(s32 arg0) +{ + return lb_80432A68.unk_38[arg0].unk_0; +} /// #lb_8001B6F8 @@ -104,7 +104,10 @@ STATIC_ASSERT(sizeof(struct lb_80433318_t) == 0x68); /// #lb_8001C550 -/// #lb_8001C5A4 +void lb_8001C5A4(void) +{ + lb_80432A68.unk_0 = lb_80432A68.unk_4 = 0; +} /// #lb_8001C5BC diff --git a/src/melee/lb/lbcardgame.h b/src/melee/lb/lbcardgame.h index 1055dc7cc6..8c7300d172 100644 --- a/src/melee/lb/lbcardgame.h +++ b/src/melee/lb/lbcardgame.h @@ -2,14 +2,13 @@ #define GALE01_019880 #include - #include -/* 019880 */ UNK_RET lb_80019880(UNK_PARAMS); +/* 019880 */ void lb_80019880(s32 arg0, s32 arg1); /* 019894 */ UNK_RET lb_80019894(UNK_PARAMS); /* 0198E0 */ UNK_RET lb_800198E0(UNK_PARAMS); /* 019900 */ UNK_RET lb_80019900(UNK_PARAMS); -/* 019A30 */ UNK_RET lb_80019A30(UNK_PARAMS); +/* 019A30 */ s32 lb_80019A30(s32 arg0); /* 019A48 */ UNK_RET lb_80019A48(UNK_PARAMS); /* 019AAC */ void lb_80019AAC(Event); /* 019BB8 */ UNK_RET lb_80019BB8(UNK_PARAMS); @@ -33,7 +32,7 @@ /* 01B068 */ UNK_RET lb_8001B068(UNK_PARAMS); /* 01B14C */ UNK_RET lb_8001B14C(UNK_PARAMS); /* 01B614 */ UNK_RET lb_8001B614(UNK_PARAMS); -/* 01B6E0 */ UNK_RET lb_8001B6E0(UNK_PARAMS); +/* 01B6E0 */ s32 lb_8001B6E0(s32 arg0); /* 01B6F8 */ enum_t lb_8001B6F8(void); /* 01B760 */ void lb_8001B760(int); /* 01B7E0 */ UNK_RET lb_8001B7E0(UNK_PARAMS); @@ -66,7 +65,7 @@ /* 01CC84 */ void lb_8001CC84(void); /* 01CDB4 */ void lb_8001CDB4(void); /* 01CE00 */ UNK_RET lb_8001CE00(UNK_PARAMS); -/* 01CE78 */ extern void lb_8001CE78(void); +/* 01CE78 */ void lb_8001CE78(void); /* 01CEC0 */ UNK_RET fn_8001CEC0(UNK_PARAMS); /* 01CEE4 */ UNK_RET fn_8001CEE4(UNK_PARAMS); /* 01CF18 */ UNK_RET lb_8001CF18(UNK_PARAMS); diff --git a/src/melee/lb/lbcardgame.static.h b/src/melee/lb/lbcardgame.static.h new file mode 100644 index 0000000000..e4df243abb --- /dev/null +++ b/src/melee/lb/lbcardgame.static.h @@ -0,0 +1,73 @@ +#ifndef __GALE01_019880 +#define __GALE01_019880 + +#include +#include + +#include "lbcardgame.h" // IWYU pragma: export + +struct lb_80433318_t { + /* +0 */ UNK_T x0; + /* +4 */ UNK_T x4; + /* +8 */ int x8; + /* +C */ u8 _C[0x5C]; +}; +STATIC_ASSERT(sizeof(struct lb_80433318_t) == 0x68); + +struct lb_804329F0_t { + /* 0x00 */ char pad_0[8]; + /* 0x08 */ s32 unk_8; /* inferred */ + /* 0x0C */ s32 unk_C; /* inferred */ + /* 0x10 */ s32 unk_10; + /* 0x14 */ char pad_14[4]; +}; /* size = 0x18 */ + +struct lb_80432A68_38_t { + /* 0x0 */ s32 unk_0; + /* 0x4 */ s32 unk_4; +}; +STATIC_ASSERT(sizeof(struct lb_80432A68_38_t) == 0x8); + +struct lb_80432A68_t { + /* 0x000 */ s32 unk_0; /* inferred */ + /* 0x004 */ s32 unk_4; /* inferred */ + /* 0x008 */ s32 unk_8; + /* 0x00C */ s32 unk_C; + /* 0x010 */ s32 unk_10; + /* 0x014 */ s32 unk_14; + /* 0x018 */ s32 unk_18; + /* 0x01C */ s32 unk_1C; + /* 0x020 */ s32 unk_20; + /* 0x024 */ s32 unk_24; + /* 0x028 */ s32 unk_28; + /* 0x02C */ char pad_2C[8]; /* maybe part of unk_28[3]? */ + /* 0x034 */ s32 unk_34; + /* 0x038 */ struct lb_80432A68_38_t unk_38[8]; + /* 0x078 */ char pad_78[8]; + /* 0x080 */ s32 unk_80; + /* 0x084 */ char pad_84[0x488]; /* maybe part of unk_80[0x123]? */ + /* 0x50C */ s32 unk_50C; + /* 0x510 */ s32 unk_510; + /* 0x514 */ char pad_514[0x50]; /* maybe part of unk_510[0x15]? */ + /* 0x564 */ s32 unk_564; + /* 0x568 */ char pad_568[0x50]; /* maybe part of unk_564[0x15]? */ + /* 0x5B8 */ s32 unk_5B8; + /* 0x5BC */ char pad_5BC[0x50]; /* maybe part of unk_5B8[0x15]? */ + /* 0x60C */ s32 unk_60C; + /* 0x610 */ char pad_610[0x50]; /* maybe part of unk_60C[0x15]? */ + /* 0x660 */ s32 unk_660; + /* 0x664 */ char pad_664[0x50]; /* maybe part of unk_660[0x15]? */ + /* 0x6B4 */ s32 unk_6B4; + /* 0x6B8 */ char pad_6B8[0x50]; /* maybe part of unk_6B4[0x15]? */ + /* 0x708 */ s32 unk_708; + /* 0x70C */ char pad_70C[0x50]; /* maybe part of unk_708[0x15]? */ + /* 0x75C */ s32 unk_75C; + /* 0x760 */ char pad_760[0x150]; /* maybe part of unk_75C[0x55]? */ +}; /* size = 0x8B0 */ +STATIC_ASSERT(sizeof(struct lb_80432A68_t) == 0x8B0); + +/* 4329F0 */ static struct lb_804329F0_t lb_804329F0[5]; +/* 432A68 */ static struct lb_80432A68_t lb_80432A68; +/* 433318 */ static struct lb_80433318_t lb_80433318; + +#endif diff --git a/src/melee/lb/lbcollision.c b/src/melee/lb/lbcollision.c index a1db0be1d8..97d54e6669 100644 --- a/src/melee/lb/lbcollision.c +++ b/src/melee/lb/lbcollision.c @@ -1,4 +1,6 @@ #include +#include + #include "ft/forward.h" #include "lb/forward.h" #include @@ -12,7 +14,6 @@ #include "lb/types.h" #include -#include #include #include #include diff --git a/src/melee/lb/lbcollision.h b/src/melee/lb/lbcollision.h index 07727cea63..cfeeb1351a 100644 --- a/src/melee/lb/lbcollision.h +++ b/src/melee/lb/lbcollision.h @@ -2,11 +2,12 @@ #define GALE01_005BB0 #include +#include + #include "ft/forward.h" #include "lb/forward.h" #include -#include #include #include diff --git a/src/melee/lb/lbdvd.c b/src/melee/lb/lbdvd.c index d23570179b..b2a963e136 100644 --- a/src/melee/lb/lbdvd.c +++ b/src/melee/lb/lbdvd.c @@ -1,4 +1,6 @@ -#include "lbdvd.h" +#include + +#include "lbdvd.static.h" #include "lbarchive.h" #include "lbfile.h" @@ -9,19 +11,10 @@ #include "gr/grdatfiles.h" #include "lb/types.h" -#include #include #include #include -/* 3BA638 */ static PreloadCache lbDvd_803BA638 = { 0 }; -/* 3BA68C */ static PreloadEntry lbDvd_803BA68C = { 0 }; -/* 3BA6A8 */ static char* lbDvd_803BA6A8; -/* 432078 */ static PreloadCache preloadCache; -/* 4D37D0 */ static char* lbDvd_804D37D0; -/* 4D37D8 */ static char* lbDvd_804D37D8; -/* 4D37E0 */ static char* lbDvd_804D37E0; - void lbDvd_800174BC(void) { lbDvd_80018C6C(); @@ -345,7 +338,11 @@ PreloadCacheScene* lbDvd_8001822C(void) return &preloadCache.scene; } -/// #lbDvd_8001823C +void lbDvd_8001823C(void) +{ + preloadCache.scene.major_scene_changes = + preloadCache.new_scene.major_scene_changes + 1; +} /// #lbDvd_80018254 diff --git a/src/melee/lb/lbdvd.h b/src/melee/lb/lbdvd.h index d3ee884f24..a81143f136 100644 --- a/src/melee/lb/lbdvd.h +++ b/src/melee/lb/lbdvd.h @@ -1,11 +1,11 @@ #ifndef GALE01_0174BC #define GALE01_0174BC +#include + #include "lb/forward.h" #include -#include - typedef void (*lbDvd_Callback)(int, int index, int, int); /* 015BD0 */ void* lbDvd_80015BD0(s8, s32); @@ -39,8 +39,4 @@ typedef void (*lbDvd_Callback)(int, int index, int, int); /* 018F68 */ void lbDvd_80018F68(void); /* 019100 */ UNK_RET lbDvd_80019100(UNK_PARAMS); -/// @todo Move to C file - -/* 0189EC */ static void lbDvd_800189EC(int); - #endif diff --git a/src/melee/lb/lbdvd.static.h b/src/melee/lb/lbdvd.static.h new file mode 100644 index 0000000000..aabb0ea0cf --- /dev/null +++ b/src/melee/lb/lbdvd.static.h @@ -0,0 +1,20 @@ +#ifndef __GALE01_0174BC +#define __GALE01_0174BC + +#include + +#include "lbdvd.h" // IWYU pragma: export + +#include "lb/types.h" + +/* 0189EC */ static void lbDvd_800189EC(int); +/* 0189EC */ static void lbDvd_800189EC(int); +/* 3BA638 */ static PreloadCache lbDvd_803BA638 = { 0 }; +/* 3BA68C */ static PreloadEntry lbDvd_803BA68C = { 0 }; +/* 3BA6A8 */ static char* lbDvd_803BA6A8; +/* 432078 */ static PreloadCache preloadCache; +/* 4D37D0 */ static char* lbDvd_804D37D0; +/* 4D37D8 */ static char* lbDvd_804D37D8; +/* 4D37E0 */ static char* lbDvd_804D37E0; + +#endif diff --git a/src/melee/lb/lbfile.h b/src/melee/lb/lbfile.h index 3e23a52b9a..8c892bdd6c 100644 --- a/src/melee/lb/lbfile.h +++ b/src/melee/lb/lbfile.h @@ -2,6 +2,7 @@ #define GALE01_01615C #include + #include /* 01615C */ void lbFile_8001615C(void*, int, void*, bool); diff --git a/src/melee/lb/lbgx.c b/src/melee/lb/lbgx.c index c72ea59d81..961ee2a5bd 100644 --- a/src/melee/lb/lbgx.c +++ b/src/melee/lb/lbgx.c @@ -1,8 +1,9 @@ +#include + #include #include "lbgx.h" -#include #include #include #include diff --git a/src/melee/lb/lbgx.h b/src/melee/lb/lbgx.h index b7a3e69b5b..b595eaa043 100644 --- a/src/melee/lb/lbgx.h +++ b/src/melee/lb/lbgx.h @@ -2,6 +2,7 @@ #define GALE01_01E2F8 #include + #include bool lbGx_8001E2F8(Vec4*, Vec3*, U8Vec4*, uint, float); diff --git a/src/melee/lb/lbheap.c b/src/melee/lb/lbheap.c index 1aef487c53..5d19457ab9 100644 --- a/src/melee/lb/lbheap.c +++ b/src/melee/lb/lbheap.c @@ -1,31 +1,35 @@ -#include "lbmemory.h" +#include "lbheap.static.h" #include #include #include #include -int lbHeap_80431FA0[46]; - void lbHeap_800158D0(int arg0, int arg1) { - lbHeap_80431FA0[arg0 * 7 + 9] = arg1; + lbHeap_80431FA0.unk_10[arg0].unk_24 = arg1; +} + +s32 lbHeap_800158E8(s32 arg0) +{ + return lbHeap_80431FA0.unk_10[arg0].unk_24; } -int lbHeap_800158E8(int arg0) +int lbHeap_80015BB8(int arg0) { - return lbHeap_80431FA0[arg0 * 7 + 9]; + return lbHeap_80431FA0.unk_10[arg0].unk_28; } -HSD_Archive* lbHeap_80015BD0(s32 arg0, s32 arg1) +#if 0 +HSD_Archive* lbHeap_80015BD0(int arg0, int arg1) { HSD_Archive* var_r31; s32 temp_r29; s32 temp_r30; s32* temp_r31; - s32* temp_r4; + struct lbHeap_80431FA0_x0_t* temp_r4; - temp_r4 = ((s32*) lbHeap_80431FA0) + (arg0 * 0x1C); + temp_r4 = &lbHeap_80431FA0.x0[arg0]; temp_r31 = temp_r4 + 0x10; temp_r30 = OSDisableInterrupts(); if (*(temp_r4 + 0x28) == 0) { @@ -46,3 +50,12 @@ HSD_Archive* lbHeap_80015BD0(s32 arg0, s32 arg1) OSRestoreInterrupts(temp_r30); return var_r31; } +#endif + +/// #lbHeap_80015CA8 + +/// #lbHeap_80015D6C + +/// #lbHeap_80015DF8 + +/// #lbHeap_80015F3C diff --git a/src/melee/lb/lbheap.h b/src/melee/lb/lbheap.h index 2c3e7cd6df..cf7b051371 100644 --- a/src/melee/lb/lbheap.h +++ b/src/melee/lb/lbheap.h @@ -2,12 +2,13 @@ #define GALE01_0158D0 #include - #include +#include + /* 0158D0 */ void lbHeap_800158D0(int, int); /* 015BB8 */ bool lbHeap_80015BB8(int); -/* 015BD0 */ void* lbHeap_80015BD0(int, int); +/* 015BD0 */ HSD_Archive* lbHeap_80015BD0(int arg0, int arg1); /* 015CA8 */ void lbHeap_80015CA8(int, void*); /* 015D6C */ int lbHeap_80015D6C(int heap0, UNK_T cb, int heap1); /* 015F3C */ void lbHeap_80015F3C(void); diff --git a/src/melee/lb/lbheap.static.h b/src/melee/lb/lbheap.static.h new file mode 100644 index 0000000000..01289ff54a --- /dev/null +++ b/src/melee/lb/lbheap.static.h @@ -0,0 +1,30 @@ +#ifndef __GALE01_0158D0 +#define __GALE01_0158D0 + +#include + +#include "lbheap.h" // IWYU pragma: export + +struct lbHeap_80431FA0_x10_t { + s32 unk_10; + s32 unk_14; + s32 unk_18; + s32 unk_1C; + s32 unk_20; + s32 unk_24; + s32 unk_28; +}; +STATIC_ASSERT(sizeof(struct lbHeap_80431FA0_x10_t) == 0x1C); + +struct lbHeap_80431FA0_t { + /* 0x00 */ void* unk_0; /* inferred */ + /* 0x04 */ void* unk_4; /* inferred */ + /* 0x08 */ u32 unk_8; /* inferred */ + /* 0x0C */ u32 unk_C; /* inferred */ + /* 0x10 */ struct lbHeap_80431FA0_x10_t unk_10[6]; +}; /* size = 0xB8 */ +STATIC_ASSERT(sizeof(struct lbHeap_80431FA0_t) == 0xB8); + +/* 431FA0 */ static struct lbHeap_80431FA0_t lbHeap_80431FA0; + +#endif diff --git a/src/melee/lb/lbmemory.h b/src/melee/lb/lbmemory.h index 9477af62f7..1020136ab8 100644 --- a/src/melee/lb/lbmemory.h +++ b/src/melee/lb/lbmemory.h @@ -2,6 +2,7 @@ #define GALE01_014E24 #include + #include /* 014FC8 */ HSD_Archive* lbMemory_80014FC8(s32, s32); diff --git a/src/melee/lb/lbmthp.c b/src/melee/lb/lbmthp.c index e677bdef06..f3ed0076f9 100644 --- a/src/melee/lb/lbmthp.c +++ b/src/melee/lb/lbmthp.c @@ -1,10 +1,4 @@ -#include "lbmthp.h" - -struct lbl_804333E0_t { - /* +0 */ u8 _0[0x1D8]; -}; - -/* 4333E0 */ static struct lbl_804333E0_t lbl_804333E0; +#include "lbmthp.static.h" /// #lbMthp_8001E8F8 @@ -24,7 +18,7 @@ struct lbl_804333E0_t { s32 fn_8001F294(void) { - return M2C_FIELD(&lbl_804333E0, s32*, 0x110); + return lbl_804333E0.unk_110; } /// #fn_8001F2A4 @@ -35,32 +29,32 @@ s32 fn_8001F294(void) s32 lbMthp_8001F5C4(void) { - return M2C_FIELD(&lbl_804333E0, s32*, 0x84); + return lbl_804333E0.unk_84; } s32 lbMthp_8001F5D4(void) { - return M2C_FIELD(&lbl_804333E0, s32*, 0x134); + return lbl_804333E0.unk_134; } s32 lbMthp_8001F5E4(void) { - return M2C_FIELD(&lbl_804333E0, s32*, 0x108); + return lbl_804333E0.unk_108; } s32 lbMthp_8001F5F4(void) { - return M2C_FIELD(&lbl_804333E0, s32*, 0x10C); + return lbl_804333E0.unk_10C; } s32 lbMthp_8001F604(void) { - return M2C_FIELD(&lbl_804333E0, s32*, 0x144); + return lbl_804333E0.unk_144; } void lbMthp_8001F614(s32 arg0) { - M2C_FIELD(&lbl_804333E0, s32*, 0x148) = arg0; + lbl_804333E0.unk_148 = arg0; } /// #lbMthp_8001F624 @@ -69,7 +63,10 @@ void lbMthp_8001F614(s32 arg0) /// #lbMthp_8001F800 -/// #lbMthp_8001F87C +void lbMthp_8001F87C(void) +{ + lbl_804333E0.unk_14C = 0; +} /// #lbMthp8001F890 diff --git a/src/melee/lb/lbmthp.h b/src/melee/lb/lbmthp.h index cb9ad84aa3..a156eb6463 100644 --- a/src/melee/lb/lbmthp.h +++ b/src/melee/lb/lbmthp.h @@ -2,7 +2,6 @@ #define GALE01_01E8F8 #include - #include /* 01E8F8 */ float lbMthp_8001E8F8(u32); diff --git a/src/melee/lb/lbmthp.static.h b/src/melee/lb/lbmthp.static.h new file mode 100644 index 0000000000..6caf527921 --- /dev/null +++ b/src/melee/lb/lbmthp.static.h @@ -0,0 +1,25 @@ +#ifndef __GALE01_01E8F8 +#define __GALE01_01E8F8 + +#include "lbmthp.h" // IWYU pragma: export + +struct lbl_804333E0_t { + /* 0x000 */ char pad_0[0x84]; + /* 0x084 */ s32 unk_84; /* inferred */ + /* 0x088 */ char pad_88[0x80]; /* maybe part of unk_84[0x21]? */ + /* 0x108 */ s32 unk_108; + /* 0x10C */ s32 unk_10C; + /* 0x110 */ s32 unk_110; + /* 0x114 */ char pad_114[0x20]; /* maybe part of unk_110[9]? */ + /* 0x134 */ s32 unk_134; + /* 0x138 */ char pad_138[0xC]; /* maybe part of unk_134[4]? */ + /* 0x144 */ s32 unk_144; + /* 0x148 */ s32 unk_148; + /* 0x14C */ s32 unk_14C; + /* 0x150 */ char pad_150[0x88]; /* maybe part of unk_14C[0x23]? */ +}; /* size = 0x1D8 */ +STATIC_ASSERT(sizeof(struct lbl_804333E0_t) == 0x1D8); + +/* 4333E0 */ static struct lbl_804333E0_t lbl_804333E0; + +#endif diff --git a/src/melee/lb/lbrefract.h b/src/melee/lb/lbrefract.h index 6b3d3065c8..5bab330e6e 100644 --- a/src/melee/lb/lbrefract.h +++ b/src/melee/lb/lbrefract.h @@ -2,6 +2,7 @@ #define GALE01_021CE8 #include + #include void lbRefract_800222A4(void); diff --git a/src/melee/lb/lbshadow.h b/src/melee/lb/lbshadow.h index 515412b7c9..8a069ca6bd 100644 --- a/src/melee/lb/lbshadow.h +++ b/src/melee/lb/lbshadow.h @@ -2,6 +2,7 @@ #define GALE01_00E9F0 #include + #include #include diff --git a/src/melee/lb/lbsnap.c b/src/melee/lb/lbsnap.c index 44c3caf08c..62539d06f6 100644 --- a/src/melee/lb/lbsnap.c +++ b/src/melee/lb/lbsnap.c @@ -1,21 +1,7 @@ -#include +#include "lbsnap.static.h" #include -struct Unk80433380_48 { - s32 unk0; - char _4[0x408 - 0x4]; -}; - -struct Unk80433380 { - char filler0[0x48]; - struct Unk80433380_48* x48; - int x4C_cardState[2]; - bool x54_stateChanged[3]; -}; - -struct Unk80433380 lb_80433380; - void lbSnap_8001D2BC(void) { int i; @@ -79,6 +65,10 @@ s32 lbSnap_8001E210(void) /// #lbSnap_8001E218 -/// #lbSnap_8001E27C +void lbSnap_8001E27C(void) +{ + lb_80433380.unk_0 = 0; + lb_80433380.x48 = NULL; +} /// #lbSnap_8001E290 diff --git a/src/melee/lb/lbsnap.h b/src/melee/lb/lbsnap.h index c16a164deb..2a1f286b8b 100644 --- a/src/melee/lb/lbsnap.h +++ b/src/melee/lb/lbsnap.h @@ -2,12 +2,11 @@ #define GALE01_01D2BC #include - #include /* 01D2BC */ UNK_RET lbSnap_8001D2BC(UNK_PARAMS); /* 01D338 */ UNK_RET lbSnap_8001D338(UNK_PARAMS); -/* 01D350 */ UNK_RET lbSnap_8001D350(UNK_PARAMS); +/* 01D350 */ int lbSnap_8001D350(int i); /* 01D394 */ UNK_RET lbSnap_8001D394(UNK_PARAMS); /* 01D3B0 */ UNK_RET lbSnap_8001D3B0(UNK_PARAMS); /* 01D3CC */ UNK_RET lbSnap_8001D3CC(UNK_PARAMS); @@ -22,8 +21,8 @@ /* 01DF20 */ UNK_RET lbSnap_8001DF20(UNK_PARAMS); /* 01DF6C */ UNK_RET lbSnap_8001DF6C(UNK_PARAMS); /* 01E058 */ UNK_RET lbSnap_8001E058(UNK_PARAMS); -/* 01E204 */ UNK_RET lbSnap_8001E204(UNK_PARAMS); -/* 01E210 */ UNK_RET lbSnap_8001E210(UNK_PARAMS); +/* 01E204 */ s32 lbSnap_8001E204(void); +/* 01E210 */ s32 lbSnap_8001E210(void); /* 01E218 */ UNK_RET lbSnap_8001E218(UNK_PARAMS); /* 01E27C */ UNK_RET lbSnap_8001E27C(UNK_PARAMS); /* 01E290 */ void lbSnap_8001E290(void); diff --git a/src/melee/lb/lbsnap.static.h b/src/melee/lb/lbsnap.static.h new file mode 100644 index 0000000000..d6557bd266 --- /dev/null +++ b/src/melee/lb/lbsnap.static.h @@ -0,0 +1,25 @@ +#ifndef __GALE01_01D2BC +#define __GALE01_01D2BC + +#include +#include + +#include "lbsnap.h" // IWYU pragma: export + +struct Unk80433380_48 { + s32 unk0; + char pad_4[0x408 - 0x4]; +}; + +struct Unk80433380 { + /* 0x00 */ s32 unk_0; /* inferred */ + /* 0x04 */ char pad_4[0x44]; /* maybe part of unk_0[0x12]? */ + /* 0x48 */ struct Unk80433380_48* x48; + /* 0x4C */ s32 x4C_cardState[2]; + /* 0x54 */ s32 x54_stateChanged[3]; +}; /* size = 0x60 */ +STATIC_ASSERT(sizeof(struct Unk80433380) == 0x60); + +struct Unk80433380 lb_80433380; + +#endif diff --git a/src/melee/lb/types.h b/src/melee/lb/types.h index f80d6405ab..19561792a8 100644 --- a/src/melee/lb/types.h +++ b/src/melee/lb/types.h @@ -2,10 +2,11 @@ #define MELEE_LB_TYPES_H #include +#include + #include "lb/forward.h" // IWYU pragma: export #include -#include #include struct DynamicsData { @@ -181,7 +182,7 @@ typedef struct _ECBFlagStruct { u8 b5 : 1; u8 b6 : 1; u8 b7 : 1; - } bits; + }; u8 raw; }; } ECBFlagStruct; @@ -304,4 +305,12 @@ struct PreloadCache { UNK_T x974; }; +struct lb_800138D8_t { + /* +0 */ char pad_0[0x11]; + /* +11 */ s8 x11; + /* +12 */ s8 x12; + /* +13 */ char pad_13[0x18 - 0x13]; + /* +18 */ int x18; +}; + #endif diff --git a/src/melee/mn/mncharsel.h b/src/melee/mn/mncharsel.h index da3ca33a0f..99e2da477f 100644 --- a/src/melee/mn/mncharsel.h +++ b/src/melee/mn/mncharsel.h @@ -1,10 +1,10 @@ #ifndef GALE01_25BC20 #define GALE01_25BC20 -#include - #include +#include + /* 25BC20 */ TextKerning* mnCharSel_8025BC20(TextKerning* arg0, u32 arg1); /* 25BD30 */ void mnCharSel_8025BD30(void); /* 25C020 */ UNK_RET mnCharSel_8025C020(UNK_PARAMS); diff --git a/src/melee/mn/mndeflicker.c b/src/melee/mn/mndeflicker.c index 0d514b1e6e..9bdd662d7a 100644 --- a/src/melee/mn/mndeflicker.c +++ b/src/melee/mn/mndeflicker.c @@ -1,4 +1,5 @@ #include + #include #include "lb/lb_00F9.h" diff --git a/src/melee/mn/mndiagram.c b/src/melee/mn/mndiagram.c index 8b13789179..90b9613868 100644 --- a/src/melee/mn/mndiagram.c +++ b/src/melee/mn/mndiagram.c @@ -1 +1,97 @@ +#include "mndiagram.static.h" +u8 mnDiagram_8023EA2C(s32 arg0) +{ + return mnDiagram_804A0750.pad_0[arg0]; +} + +u8 mnDiagram_8023EA40(s32 arg0) +{ + return mnDiagram_804A076C.pad_0[arg0]; +} + +/// #mnDiagram_8023EA54 + +/// #mnDiagram_8023EAC4 + +/// #mnDiagram_8023EB84 + +/// #mnDiagram_8023ECC4 + +/// #mnDiagram_8023EE38 + +/// #mnDiagram_8023EF70 + +/// #mnDiagram_8023EFE4 + +/// #mnDiagram_8023F068 + +/// #mnDiagram_8023F0DC + +/// #mnDiagram_8023F14C + +/// #mnDiagram_8023F238 + +/// #mnDiagram_8023F334 + +/// #mnDiagram_8023F3A8 + +/// #mnDiagram_8023F400 + +/// #mnDiagram_8023F45C + +/// #mnDiagram_8023F4CC + +/// #mnDiagram_8023F540 + +/// #mnDiagram_8023F578 + +/// #mnDiagram_8023F8CC + +/// #mnDiagram_8023FA6C + +/// #mnDiagram_8023FC28 + +/// #mnDiagram_8023FDD8 + +/// #fn_8023FE30 + +/// #fn_8023FED4 + +/// #fn_80240B18 + +/// #fn_80240B98 + +/// #mnDiagram_80240D94 + +/// #mnDiagram_80241310 + +/// #mnDiagram_80241668 + +/// #mnDiagram_80241730 + +/// #mnDiagram_802417D0 + +/// #fn_80241AE8 + +/// #mnDiagram_80241B4C + +/// #fn_80241BF8 + +/// #mnDiagram_80241E78 + +/// #mnDiagram_8024227C + +/// #mnDiagram_802427B4 + +/// #mnDiagram_80242B38 + +/// #mnDiagram_80242C0C + +/// #fn_80243038 + +/// #mnDiagram_802433AC + +/// #mnDiagram_80243434 + +/// #mnDiagram_802437E8 diff --git a/src/melee/mn/mndiagram.h b/src/melee/mn/mndiagram.h index 8b13789179..61dee368ed 100644 --- a/src/melee/mn/mndiagram.h +++ b/src/melee/mn/mndiagram.h @@ -1 +1,52 @@ +#ifndef GALE01_23EA2C +#define GALE01_23EA2C +#include + +/* 23EA2C */ u8 mnDiagram_8023EA2C(s32 arg0); +/* 23EA40 */ u8 mnDiagram_8023EA40(s32 arg0); +/* 23EA54 */ UNK_RET mnDiagram_8023EA54(UNK_PARAMS); +/* 23EAC4 */ UNK_RET mnDiagram_8023EAC4(UNK_PARAMS); +/* 23EB84 */ UNK_RET mnDiagram_8023EB84(UNK_PARAMS); +/* 23ECC4 */ UNK_RET mnDiagram_8023ECC4(UNK_PARAMS); +/* 23EE38 */ UNK_RET mnDiagram_8023EE38(UNK_PARAMS); +/* 23EF70 */ UNK_RET mnDiagram_8023EF70(UNK_PARAMS); +/* 23EFE4 */ UNK_RET mnDiagram_8023EFE4(UNK_PARAMS); +/* 23F068 */ UNK_RET mnDiagram_8023F068(UNK_PARAMS); +/* 23F0DC */ UNK_RET mnDiagram_8023F0DC(UNK_PARAMS); +/* 23F14C */ UNK_RET mnDiagram_8023F14C(UNK_PARAMS); +/* 23F238 */ UNK_RET mnDiagram_8023F238(UNK_PARAMS); +/* 23F334 */ UNK_RET mnDiagram_8023F334(UNK_PARAMS); +/* 23F3A8 */ UNK_RET mnDiagram_8023F3A8(UNK_PARAMS); +/* 23F400 */ UNK_RET mnDiagram_8023F400(UNK_PARAMS); +/* 23F45C */ UNK_RET mnDiagram_8023F45C(UNK_PARAMS); +/* 23F4CC */ UNK_RET mnDiagram_8023F4CC(UNK_PARAMS); +/* 23F540 */ UNK_RET mnDiagram_8023F540(UNK_PARAMS); +/* 23F578 */ UNK_RET mnDiagram_8023F578(UNK_PARAMS); +/* 23F8CC */ UNK_RET mnDiagram_8023F8CC(UNK_PARAMS); +/* 23FA6C */ UNK_RET mnDiagram_8023FA6C(UNK_PARAMS); +/* 23FC28 */ UNK_RET mnDiagram_8023FC28(UNK_PARAMS); +/* 23FDD8 */ UNK_RET mnDiagram_8023FDD8(UNK_PARAMS); +/* 23FE30 */ UNK_RET fn_8023FE30(UNK_PARAMS); +/* 23FED4 */ UNK_RET fn_8023FED4(UNK_PARAMS); +/* 240B18 */ UNK_RET fn_80240B18(UNK_PARAMS); +/* 240B98 */ UNK_RET fn_80240B98(UNK_PARAMS); +/* 240D94 */ UNK_RET mnDiagram_80240D94(UNK_PARAMS); +/* 241310 */ UNK_RET mnDiagram_80241310(UNK_PARAMS); +/* 241668 */ UNK_RET mnDiagram_80241668(UNK_PARAMS); +/* 241730 */ UNK_RET mnDiagram_80241730(UNK_PARAMS); +/* 2417D0 */ UNK_RET mnDiagram_802417D0(UNK_PARAMS); +/* 241AE8 */ UNK_RET fn_80241AE8(UNK_PARAMS); +/* 241B4C */ UNK_RET mnDiagram_80241B4C(UNK_PARAMS); +/* 241BF8 */ UNK_RET fn_80241BF8(UNK_PARAMS); +/* 241E78 */ UNK_RET mnDiagram_80241E78(UNK_PARAMS); +/* 24227C */ UNK_RET mnDiagram_8024227C(UNK_PARAMS); +/* 2427B4 */ UNK_RET mnDiagram_802427B4(UNK_PARAMS); +/* 242B38 */ UNK_RET mnDiagram_80242B38(UNK_PARAMS); +/* 242C0C */ UNK_RET mnDiagram_80242C0C(UNK_PARAMS); +/* 243038 */ UNK_RET fn_80243038(UNK_PARAMS); +/* 2433AC */ UNK_RET mnDiagram_802433AC(UNK_PARAMS); +/* 243434 */ UNK_RET mnDiagram_80243434(UNK_PARAMS); +/* 2437E8 */ UNK_RET mnDiagram_802437E8(UNK_PARAMS); + +#endif diff --git a/src/melee/mn/mndiagram.static.h b/src/melee/mn/mndiagram.static.h new file mode 100644 index 0000000000..bea9e7ec8d --- /dev/null +++ b/src/melee/mn/mndiagram.static.h @@ -0,0 +1,21 @@ +#ifndef __GALE01_23EA2C +#define __GALE01_23EA2C + +#include + +#include "mndiagram.h" // IWYU pragma: export + +struct mnDiagram_804A0750_t { + char pad_0[0x1C]; +}; +STATIC_ASSERT(sizeof(struct mnDiagram_804A0750_t) == 0x1C); + +struct mnDiagram_804A076C_t { + char pad_0[0x78]; +}; +STATIC_ASSERT(sizeof(struct mnDiagram_804A076C_t) == 0x78); + +/* 4A0750 */ struct mnDiagram_804A0750_t mnDiagram_804A0750; +/* 4A076C */ struct mnDiagram_804A076C_t mnDiagram_804A076C; + +#endif diff --git a/src/melee/mn/mnhyaku.h b/src/melee/mn/mnhyaku.h index f01dac6057..0ddd94c133 100644 --- a/src/melee/mn/mnhyaku.h +++ b/src/melee/mn/mnhyaku.h @@ -2,6 +2,7 @@ #define _MN_HYAKU_ #include + #include #include diff --git a/src/melee/mn/mnsoundtest.c b/src/melee/mn/mnsoundtest.c index 9b893aea5b..3c08ea6b64 100644 --- a/src/melee/mn/mnsoundtest.c +++ b/src/melee/mn/mnsoundtest.c @@ -1,4 +1,5 @@ #include + #include #include "lb/lbarchive.h" diff --git a/src/melee/mn/types.h b/src/melee/mn/types.h index 894e66303a..9dc6ec3c92 100644 --- a/src/melee/mn/types.h +++ b/src/melee/mn/types.h @@ -1,9 +1,10 @@ #ifndef MELEE_MN_TYPES_H #define MELEE_MN_TYPES_H +#include + #include "mn/forward.h" // IWYU pragma: export -#include #include typedef struct { diff --git a/src/melee/mp/forward.h b/src/melee/mp/forward.h index 45649925ff..e262371933 100644 --- a/src/melee/mp/forward.h +++ b/src/melee/mp/forward.h @@ -2,6 +2,7 @@ #define MELEE_MP_FORWARD_H #include + #include "lb/forward.h" typedef struct mp_UnkStruct0 mp_UnkStruct0; diff --git a/src/melee/mp/mpcoll.c b/src/melee/mp/mpcoll.c index d2b5a2f47a..15bf2b725a 100644 --- a/src/melee/mp/mpcoll.c +++ b/src/melee/mp/mpcoll.c @@ -1,3 +1,5 @@ +#include + #include "ftCommon/forward.h" #include "mp/forward.h" @@ -13,7 +15,6 @@ #include "lb/lbvector.h" #include "mp/mplib.h" -#include #include #include #include @@ -155,11 +156,11 @@ void mpColl_80041DD0(CollData* cd, u32 flags) void mpColl_80041EE4(CollData* cd) { cd->x0_gobj = NULL; - cd->x34_flags.bits.b0 = 1; - cd->x34_flags.bits.b6 = 0; - cd->x34_flags.bits.b7 = 0; - cd->x35_flags.bits.b0 = 1; - cd->x34_flags.bits.b1234 = 0; + cd->x34_flags.b0 = 1; + cd->x34_flags.b6 = 0; + cd->x34_flags.b7 = 0; + cd->x35_flags.b0 = 1; + cd->x34_flags.b1234 = 0; cd->env_flags = 0; cd->x130_flags = 0; cd->cur_topn_correct = cd->cur_topn; @@ -221,7 +222,7 @@ void mpColl_80042078(CollData* cd, HSD_GObj* gobj, HSD_JObj* arg1, cd->x124 = arg9; cd->x128 = 10.0f; cd->x12C = 10.0f; - if (cd->x34_flags.bits.b0) { + if (cd->x34_flags.b0) { cd->xA4_ecbCurrCorrect.top.x = 0.0f; cd->xA4_ecbCurrCorrect.top.y = 8.0f; cd->xA4_ecbCurrCorrect.bottom.x = 0.0f; @@ -251,7 +252,7 @@ void mpColl_8004220C(CollData* cd, HSD_GObj* gobj, float arg1, float arg2, cd->x110_f32 = arg3; cd->x114_f32 = arg4; cd->x118_f32 = 0.0f; - if (cd->x34_flags.bits.b0) { + if (cd->x34_flags.b0) { cd->xA4_ecbCurrCorrect.top.x = 0.0f; cd->xA4_ecbCurrCorrect.top.y = 8.0f; cd->xA4_ecbCurrCorrect.bottom.x = 0.0f; @@ -436,7 +437,7 @@ void mpColl_800424DC(CollData* cd, u32 flags) cd->x84_ecb.right.y = cd->x124 + 0.5f * (bottom_y + top_y); cd->x84_ecb.left.x = left_x; cd->x84_ecb.left.y = cd->x124 + 0.5f * (bottom_y + top_y); - cd->x34_flags.bits.b0 = 0; + cd->x34_flags.b0 = 0; } // 8004293C https://decomp.me/scratch/H4EUT @@ -577,7 +578,7 @@ void mpColl_8004293C(CollData* cd) cd->x84_ecb.left.x = left_x; cd->x84_ecb.left.y = midpoint_y; - cd->x34_flags.bits.b0 = 0; + cd->x34_flags.b0 = 0; } void mpColl_80042C58(CollData* arg0, ftCollisionBox* arg1) @@ -602,7 +603,7 @@ void mpColl_80042C58(CollData* arg0, ftCollisionBox* arg1) arg0->x84_ecb.right.y = arg1->right.y; arg0->x84_ecb.left.x = arg1->left.x; arg0->x84_ecb.left.y = arg1->left.y; - arg0->x34_flags.bits.b0 = 0; + arg0->x34_flags.b0 = 0; } // 80042D24 https://decomp.me/scratch/2MnVj @@ -637,9 +638,9 @@ inline void Vec2_Interpolate(float time, Vec2* dest, Vec2* src) void mpColl_80042DB0(CollData* ecb, float time) { ecb->xC4_ecb = ecb->xA4_ecbCurrCorrect; - if (ecb->x34_flags.bits.b6) { + if (ecb->x34_flags.b6) { ecb->xA4_ecbCurrCorrect = ecb->x64_ecb; - ecb->x34_flags.bits.b6 = 0; + ecb->x34_flags.b6 = 0; } Vec2_Interpolate(time, &ecb->xA4_ecbCurrCorrect.top, &ecb->x84_ecb.top); Vec2_Interpolate(time, &ecb->xA4_ecbCurrCorrect.bottom, @@ -918,8 +919,8 @@ bool mpColl_80043754(mpColl_Callback arg0, CollData* arg1, u32 arg2) } var_r31 = 0; arg1->cur_topn = arg1->prev_topn; - arg1->x34_flags.bits.b5 = 0; - while ((var_r31 < var_r30) && !arg1->x34_flags.bits.b5) { + arg1->x34_flags.b5 = 0; + while ((var_r31 < var_r30) && !arg1->x34_flags.b5) { mpColl_80042DB0(arg1, 1.0f / (var_r30 - var_r31)); arg1->cur_topn_correct = arg1->cur_topn; lbVector_Add(&arg1->cur_topn, &vel); @@ -1167,7 +1168,7 @@ bool mpColl_80046904(CollData* coll, u32 flags) x_after_collide_right = 0.0f; old_horizontal_squeeze_flags = horizontal_squeeze_flags; x_after_collide_left = 0.0f; - old_x34_flag_b6 = coll->x34_flags.bits.b6; + old_x34_flag_b6 = coll->x34_flags.b6; horizontal_squeeze_flags = 0; if (mpColl_80045B74(coll)) { // Physics_LeftWallCheckAir if (mpColl_80046224(coll)) { // Physics_LeftWallCollideAir @@ -1304,7 +1305,7 @@ bool mpColl_80046904(CollData* coll, u32 flags) coll, sp20, var_r5_2); // Physics_RightWallFloorMultiCollide } - coll->x34_flags.bits.b5 = 1; + coll->x34_flags.b5 = 1; touched_floor = 1; } } @@ -1367,7 +1368,7 @@ bool mpColl_80046904(CollData* coll, u32 flags) y_after_collide_floor); // Physics_SqueezeVertical } horizontal_squeeze_flags_all |= horizontal_squeeze_flags; - } while (old_x34_flag_b6 != coll->x34_flags.bits.b6 || + } while (old_x34_flag_b6 != coll->x34_flags.b6 || horizontal_squeeze_flags != old_horizontal_squeeze_flags); if (!touched_floor && (flags & CollisionFlagAir_CanGrabLedge)) { var_r3_2 = 1; diff --git a/src/melee/mp/mpcoll.h b/src/melee/mp/mpcoll.h index b725ca75e2..a333692a0e 100644 --- a/src/melee/mp/mpcoll.h +++ b/src/melee/mp/mpcoll.h @@ -2,6 +2,7 @@ #define GALE01_041C78 #include + #include "ftCommon/forward.h" #include "mp/forward.h" #include diff --git a/src/melee/mp/mpisland.h b/src/melee/mp/mpisland.h index 04c420a209..0880a6cdd1 100644 --- a/src/melee/mp/mpisland.h +++ b/src/melee/mp/mpisland.h @@ -1,11 +1,11 @@ #ifndef GALE01_05A6F8 #define GALE01_05A6F8 +#include + #include "mp/forward.h" #include -#include - /* 05AC14 */ mp_UnkStruct0* mpIsland_8005AC14(Vec3*, float); /* 05AB54 */ mp_UnkStruct0* mpIsland_8005AB54(int surface_idx); /* 05AC8C */ bool mpIsland_8005AC8C(mp_UnkStruct0* arg0); diff --git a/src/melee/mp/mplib.h b/src/melee/mp/mplib.h index c0de98f187..fd7506d03c 100644 --- a/src/melee/mp/mplib.h +++ b/src/melee/mp/mplib.h @@ -2,13 +2,14 @@ #define GALE01_04D164 #include +#include + #include "gr/forward.h" #include "mp/forward.h" #include #include #include -#include /* 04D164 */ int mpLib_8004D164(void); /* 04D16C */ int mpLib_8004D16C(void); diff --git a/src/melee/mp/types.h b/src/melee/mp/types.h index 8b017a0148..1b17fd5865 100644 --- a/src/melee/mp/types.h +++ b/src/melee/mp/types.h @@ -1,10 +1,10 @@ #ifndef MELEE_MP_TYPES_H #define MELEE_MP_TYPES_H -#include "mp/forward.h" // IWYU pragma: export - #include +#include "mp/forward.h" // IWYU pragma: export + struct mp_UnkStruct0 { /* +0 */ mp_UnkStruct0* next; /* +4 */ int x4; diff --git a/src/melee/pl/pl_0371.h b/src/melee/pl/pl_0371.h index bdcbcf9c94..7345dcae3f 100644 --- a/src/melee/pl/pl_0371.h +++ b/src/melee/pl/pl_0371.h @@ -2,12 +2,12 @@ #define GALE01_03715C #include +#include + #include "it/forward.h" #include #include -#include - /* 037C60 */ void pl_80037C60(HSD_GObj*, s32); /* 037ECC */ void pl_80037ECC(void); /* 038144 */ void pl_80038144(void); diff --git a/src/melee/pl/player.c b/src/melee/pl/player.c index f45775aaee..681c79c6e8 100644 --- a/src/melee/pl/player.c +++ b/src/melee/pl/player.c @@ -44,7 +44,7 @@ struct plAllocInfo { u8 b5 : 1; u8 b6 : 1; u8 b7 : 1; - } bits; + }; }; /// TODO delete after fixing functions that use this @@ -223,8 +223,8 @@ void Player_80031AD0(int slot) first_struct.internal_id = internal_id; first_struct.slot = slot; - first_struct.bits.b0 = false; - first_struct.bits.has_transformation = false; + first_struct.b0 = false; + first_struct.has_transformation = false; first_struct.unk8 = -1; /// @todo Eliminate cast. @@ -242,8 +242,8 @@ void Player_80031AD0(int slot) second_struct.internal_id = internal_id; second_struct.slot = slot; - second_struct.bits.b0 = true; - second_struct.bits.has_transformation = has_transformation; + second_struct.b0 = true; + second_struct.has_transformation = has_transformation; second_struct.unk8 = -1; /// @todo Eliminate cast. @@ -2087,9 +2087,9 @@ void Player_80036F34(s32 slot, s32 arg1) some_struct.internal_id = ftMapping_list[player->player_character].internal_id; some_struct.slot = slot; - some_struct.bits.has_transformation = 0; + some_struct.has_transformation = 0; some_struct.unk8 = arg1; - some_struct.bits.b0 = 0; + some_struct.b0 = 0; player->slot_type = 2; player->player_entity[0] = ftDemo_CreateFighter(&some_struct); @@ -2098,7 +2098,7 @@ void Player_80036F34(s32 slot, s32 arg1) { some_struct.internal_id = ftMapping_list[player->player_character].extra_internal_id; - some_struct.bits.has_transformation = 1; + some_struct.has_transformation = 1; player->player_entity[1] = ftDemo_CreateFighter(&some_struct); } } @@ -2114,9 +2114,9 @@ void Player_80037054(s32 slot, s32 arg1) some_struct.internal_id = ftMapping_list[player->player_character].internal_id; some_struct.slot = slot; - some_struct.bits.has_transformation = 0; + some_struct.has_transformation = 0; some_struct.unk8 = arg1; - some_struct.bits.b0 = 1; + some_struct.b0 = 1; player->slot_type = 2; player->player_entity[0] = ftDemo_CreateFighter(&some_struct); @@ -2125,7 +2125,7 @@ void Player_80037054(s32 slot, s32 arg1) { some_struct.internal_id = ftMapping_list[player->player_character].extra_internal_id; - some_struct.bits.has_transformation = 1; + some_struct.has_transformation = 1; player->player_entity[1] = ftDemo_CreateFighter(&some_struct); } } diff --git a/src/melee/pl/player.h b/src/melee/pl/player.h index d1b8b61d9c..769cdd5a4f 100644 --- a/src/melee/pl/player.h +++ b/src/melee/pl/player.h @@ -2,6 +2,7 @@ #define _player_h_ #include + #include "ft/forward.h" #include "pl/forward.h" #include diff --git a/src/melee/pl/plbonus.c b/src/melee/pl/plbonus.c index 021f6341c2..3e5c4b1a2a 100644 --- a/src/melee/pl/plbonus.c +++ b/src/melee/pl/plbonus.c @@ -1,9 +1,8 @@ #include +#include #include "pl/player.h" -#include - UNK_T pl_800386D8(pl_800386D8_t* arg0, ssize_t arg1) { return arg0->x3E8[arg1]; diff --git a/src/melee/pl/plbonus.h b/src/melee/pl/plbonus.h index 72c5d46eba..4ec2959343 100644 --- a/src/melee/pl/plbonus.h +++ b/src/melee/pl/plbonus.h @@ -1,10 +1,10 @@ #ifndef GALE01_0386D8 #define GALE01_0386D8 -#include "pl/forward.h" - #include +#include "pl/forward.h" + /* 0386D8 */ UNK_T pl_800386D8(pl_800386D8_t*, ssize_t); /* 0386E8 */ UNK_RET pl_800386E8(UNK_PARAMS); /* 038700 */ UNK_RET fn_80038700(UNK_PARAMS); diff --git a/src/melee/pl/plbonuslib.c b/src/melee/pl/plbonuslib.c index dad79ae29d..ace9760eae 100644 --- a/src/melee/pl/plbonuslib.c +++ b/src/melee/pl/plbonuslib.c @@ -28,10 +28,9 @@ void plBonusLib_8003D514(int arg0) temp_r31_2 = Player_GetStaleMoveTableIndexPtr2(var_r29); ftLib_80086644(temp_r30, &spC); temp_f1 = ftLib_800865C0(temp_r30); - ((UnkFlagStruct*) ((u8*) temp_r31_2 + 0xdd1))->bits.b6 = 1; + ((UnkFlagStruct*) ((u8*) temp_r31_2 + 0xdd1))->b6 = 1; if ((temp_f1 * sp18.x) > (temp_f1 * spC.x)) { - ((UnkFlagStruct*) ((u8*) temp_r31_2 + 0xdd1)) - ->bits.b7 = 1; + ((UnkFlagStruct*) ((u8*) temp_r31_2 + 0xdd1))->b7 = 1; } } } diff --git a/src/melee/pl/plbonuslib.h b/src/melee/pl/plbonuslib.h index 5154b0d70f..44468b0178 100644 --- a/src/melee/pl/plbonuslib.h +++ b/src/melee/pl/plbonuslib.h @@ -2,7 +2,6 @@ #define GALE01_03D514 #include - #include /* 03EC30 */ void pl_8003EC30(u8, int, int, float); diff --git a/src/melee/pl/types.h b/src/melee/pl/types.h index e288984dca..3cccd71270 100644 --- a/src/melee/pl/types.h +++ b/src/melee/pl/types.h @@ -2,7 +2,6 @@ #define MELEE_PL_TYPES_H #include - #include /// @todo Probably the same struct as #plAllocInfo, figure out how to make them @@ -20,7 +19,7 @@ struct plAllocInfo2 { u8 b5 : 1; u8 b6 : 1; u8 b7 : 1; - } bits; + }; }; struct pl_800386D8_t { diff --git a/src/melee/un/types.h b/src/melee/un/types.h index 965155ed6d..972e91a7ce 100644 --- a/src/melee/un/types.h +++ b/src/melee/un/types.h @@ -2,6 +2,7 @@ #define MELEE_UN_TYPES_H #include + #include "un/forward.h" // IWYU pragma: export struct un_80302AB0_t { diff --git a/src/melee/un/un_2FC9.c b/src/melee/un/un_2FC9.c index 077046192a..0a058bf90c 100644 --- a/src/melee/un/un_2FC9.c +++ b/src/melee/un/un_2FC9.c @@ -1,4 +1,4 @@ -#include "un_2FC9__static.h" +#include "un_2FC9.static.h" #include "un/types.h" diff --git a/src/melee/un/un_2FC9.h b/src/melee/un/un_2FC9.h index e704e43e24..7765261557 100644 --- a/src/melee/un/un_2FC9.h +++ b/src/melee/un/un_2FC9.h @@ -2,11 +2,11 @@ #define GALE01_2FC9B4 #include +#include + #include "gr/forward.h" #include "un/forward.h" -#include - /* 2FC9B4 */ UNK_RET un_802FC9B4(UNK_PARAMS); /* 2FCAA4 */ UNK_RET fn_802FCAA4(UNK_PARAMS); /* 2FCAC4 */ UNK_RET fn_802FCAC4(UNK_PARAMS); diff --git a/src/melee/un/un_2FC9__static.h b/src/melee/un/un_2FC9.static.h similarity index 100% rename from src/melee/un/un_2FC9__static.h rename to src/melee/un/un_2FC9.static.h diff --git a/src/melee/vi/forward.h b/src/melee/vi/forward.h index 3f188375b3..f8f722817e 100644 --- a/src/melee/vi/forward.h +++ b/src/melee/vi/forward.h @@ -3,7 +3,9 @@ #include -/// @todo Neither struct with s8 fields, nor s8 array, seem to match +/// @todo When accessing, neither struct with s8 fields, nor s8 array, +/// seem to match. Also tried volatile struct and volatile fields. +/// Size is 0xC. typedef UNK_T un_804D7004_t; #endif diff --git a/src/melee/vi/types.h b/src/melee/vi/types.h index 0e54ab6138..643211b49d 100644 --- a/src/melee/vi/types.h +++ b/src/melee/vi/types.h @@ -1,4 +1,11 @@ #ifndef MELEE_VI_TYPES_H #define MELEE_VI_TYPES_H +#include + +struct un_804D7004_t { + char pad_0[0xC]; +}; /* size = 0xC */ +STATIC_ASSERT(sizeof(struct un_804D7004_t) == 0xC); + #endif diff --git a/src/melee/vi/vi0102.c b/src/melee/vi/vi0102.c index a07edb245a..3a31225696 100644 --- a/src/melee/vi/vi0102.c +++ b/src/melee/vi/vi0102.c @@ -1,4 +1,4 @@ -#include "vi0102__static.h" +#include "vi0102.static.h" /// #un_8031CB00 diff --git a/src/melee/vi/vi0102__static.h b/src/melee/vi/vi0102.static.h similarity index 100% rename from src/melee/vi/vi0102__static.h rename to src/melee/vi/vi0102.static.h index 4d3a9e8a67..4b5cf9d5be 100644 --- a/src/melee/vi/vi0102__static.h +++ b/src/melee/vi/vi0102.static.h @@ -1,10 +1,10 @@ #ifndef __GALE01_31CB00 #define __GALE01_31CB00 -#include "vi0102.h" // IWYU pragma: export - #include +#include "vi0102.h" // IWYU pragma: export + struct un_804D6F60_t { /* 0x0 */ s8 unk_0; /* inferred */ /* 0x1 */ s8 unk_1; /* inferred */ diff --git a/src/melee/vi/vi0402.c b/src/melee/vi/vi0402.c index 19ce600e23..ea9d1856dd 100644 --- a/src/melee/vi/vi0402.c +++ b/src/melee/vi/vi0402.c @@ -1,9 +1,26 @@ -#include "vi/vi0402.h" +#include "vi/vi0402.static.h" #include #include +/* 4D6F84 */ un_804D7004_t un_804D6F84; + void un_8031D6E4(HSD_GObj* gobj) { HSD_JObjAnimAll(GET_JOBJ(gobj)); } + +/// #un_8031D708 + +/// #fn_8031D80C + +/// #un_8031D858 + +/// #un_8031D9C4 + +void un_8031D9E4(s8 arg0, s8 arg1, s8 arg2) +{ + M2C_FIELD(&un_804D6F84, s8*, 0) = arg0; + M2C_FIELD(&un_804D6F84, s8*, 1) = arg1; + M2C_FIELD(&un_804D6F84, s8*, 3) = arg2; +} diff --git a/src/melee/vi/vi0402.h b/src/melee/vi/vi0402.h index fdaffbc137..f0d2dcbaf7 100644 --- a/src/melee/vi/vi0402.h +++ b/src/melee/vi/vi0402.h @@ -1,8 +1,16 @@ #ifndef GALE01_31D6E4 #define GALE01_31D6E4 +#include + +#include "vi/forward.h" #include -/* 31D6E4 */ void un_8031D6E4(HSD_GObj*); +/* 31D708 */ UNK_RET un_8031D708(UNK_PARAMS); +/* 31D80C */ UNK_RET fn_8031D80C(UNK_PARAMS); +/* 31D858 */ UNK_RET un_8031D858(UNK_PARAMS); +/* 31D9C4 */ UNK_RET un_8031D9C4(UNK_PARAMS); +/* 31D9E4 */ void un_8031D9E4(s8 arg0, s8 arg1, s8 arg2); +/* 4D6F84 */ extern un_804D7004_t un_804D6F84; #endif diff --git a/src/melee/vi/vi0402.static.h b/src/melee/vi/vi0402.static.h new file mode 100644 index 0000000000..8455994f8c --- /dev/null +++ b/src/melee/vi/vi0402.static.h @@ -0,0 +1,10 @@ +#ifndef __GALE01_31D6E4 +#define __GALE01_31D6E4 + +#include + +#include "vi0402.h" // IWYU pragma: export + +/* 31D6E4 */ void un_8031D6E4(HSD_GObj*); + +#endif diff --git a/src/melee/vi/vi0501.c b/src/melee/vi/vi0501.c index 8b13789179..e49e6e8e06 100644 --- a/src/melee/vi/vi0501.c +++ b/src/melee/vi/vi0501.c @@ -1 +1,20 @@ +#include "vi0501.static.h" +un_804D7004_t un_804D6FA8; + +/// #un_8031D9F8 + +/// #fn_8031DC80 + +/// #fn_8031DD14 + +/// #un_8031DE58 + +/// #un_8031E0F0 + +void un_8031E110(s8 arg0, s8 arg1, s8 arg2) +{ + M2C_FIELD(&un_804D6FA8, s8*, 0) = arg0; + M2C_FIELD(&un_804D6FA8, s8*, 1) = arg1; + M2C_FIELD(&un_804D6FA8, s8*, 3) = arg2; +} diff --git a/src/melee/vi/vi0501.h b/src/melee/vi/vi0501.h index 8b13789179..c231463e7b 100644 --- a/src/melee/vi/vi0501.h +++ b/src/melee/vi/vi0501.h @@ -1 +1,16 @@ +#ifndef GALE01_31D9F8 +#define GALE01_31D9F8 +#include + +#include "vi/forward.h" + +/* 31D9F8 */ UNK_RET un_8031D9F8(UNK_PARAMS); +/* 31DC80 */ UNK_RET fn_8031DC80(UNK_PARAMS); +/* 31DD14 */ UNK_RET fn_8031DD14(UNK_PARAMS); +/* 31DE58 */ UNK_RET un_8031DE58(UNK_PARAMS); +/* 31E0F0 */ UNK_RET un_8031E0F0(UNK_PARAMS); +/* 31E110 */ void un_8031E110(s8 arg0, s8 arg1, s8 arg2); +/* 4D7004 */ extern un_804D7004_t un_804D6FA8; + +#endif diff --git a/src/melee/vi/vi0501.static.h b/src/melee/vi/vi0501.static.h new file mode 100644 index 0000000000..ab4a89beed --- /dev/null +++ b/src/melee/vi/vi0501.static.h @@ -0,0 +1,8 @@ +#ifndef __GALE01_31D9F8 +#define __GALE01_31D9F8 + +#include + +#include "vi0501.h" // IWYU pragma: export + +#endif diff --git a/src/melee/vi/vi1101.c b/src/melee/vi/vi1101.c index cc4bb0b21e..df5e70353a 100644 --- a/src/melee/vi/vi1101.c +++ b/src/melee/vi/vi1101.c @@ -1,4 +1,4 @@ -#include "vi1101__static.h" +#include "vi1101.static.h" /// #un_8031F294 diff --git a/src/melee/vi/vi1101__static.h b/src/melee/vi/vi1101.static.h similarity index 100% rename from src/melee/vi/vi1101__static.h rename to src/melee/vi/vi1101.static.h index a3a3d3e6b2..19a9a1b1b5 100644 --- a/src/melee/vi/vi1101__static.h +++ b/src/melee/vi/vi1101.static.h @@ -1,12 +1,12 @@ #ifndef __GALE01_31F294 #define __GALE01_31F294 +#include + #include "vi/forward.h" #include "vi1101.h" // IWYU pragma: export -#include - /* 4D7004 */ static un_804D7004_t un_804D7004; #endif diff --git a/src/melee/vi/vi1201v1.c b/src/melee/vi/vi1201v1.c index c825f436b7..5fc1549c25 100644 --- a/src/melee/vi/vi1201v1.c +++ b/src/melee/vi/vi1201v1.c @@ -1,4 +1,4 @@ -#include "vi/vi1201v1__static.h" +#include "vi/vi1201v1.static.h" #include #include diff --git a/src/melee/vi/vi1201v1.h b/src/melee/vi/vi1201v1.h index 21252f0f36..5f7f5b23a0 100644 --- a/src/melee/vi/vi1201v1.h +++ b/src/melee/vi/vi1201v1.h @@ -1,10 +1,10 @@ #ifndef GALE01_31F990 #define GALE01_31F990 -#include - #include +#include + /* 31F990 */ void un_8031F990(HSD_GObj*); /* 31F9B4 */ void un_8031F9B4(HSD_GObj*); /* 31F9D8 */ UNK_RET un_8031F9D8(UNK_PARAMS); diff --git a/src/melee/vi/vi1201v1__static.h b/src/melee/vi/vi1201v1.static.h similarity index 100% rename from src/melee/vi/vi1201v1__static.h rename to src/melee/vi/vi1201v1.static.h diff --git a/src/sysdolphin/baselib/aobj.h b/src/sysdolphin/baselib/aobj.h index 9c0ea8f751..249fb953cc 100644 --- a/src/sysdolphin/baselib/aobj.h +++ b/src/sysdolphin/baselib/aobj.h @@ -2,6 +2,7 @@ #define _aobj_h_ #include + #include "baselib/forward.h" // IWYU pragma: export #include "baselib/debug.h" diff --git a/src/sysdolphin/baselib/archive.h b/src/sysdolphin/baselib/archive.h index 0ef00b56a9..742795822a 100644 --- a/src/sysdolphin/baselib/archive.h +++ b/src/sysdolphin/baselib/archive.h @@ -2,6 +2,7 @@ #define _archive_h_ #include + #include "baselib/forward.h" // IWYU pragma: export #define HSD_ARCHIVE_DONT_FREE 1 diff --git a/src/sysdolphin/baselib/axdriver.c b/src/sysdolphin/baselib/axdriver.c index 4ff867e198..8f8f760a5b 100644 --- a/src/sysdolphin/baselib/axdriver.c +++ b/src/sysdolphin/baselib/axdriver.c @@ -1,13 +1,8 @@ +#include "axdriver.static.h" + #include #include -extern u8* AXDriver_804D77D4; -extern u32 axfxallocsize; -extern u32 axfxmaxsize; -extern char AXDriver_80408140[]; // axdriver.c -extern char AXDriver_8040814C[]; // "axfxallocsize < axfxmaxsize" -extern char AXDriver_80408168[]; // *head != v - u8* AXDriverAlloc(s32 size) { u8* ptr = &AXDriver_804D77D4[axfxallocsize]; @@ -82,7 +77,12 @@ void AXDriverUnlink(HSD_SM* v, HSD_SM** head) /// #AXDriver_8038D9D8 -/// #fn_8038DA5C +void fn_8038DA5C(s32 arg0) +{ + if (arg0 != -1) { + AXDriver_804D77EC = 1; + } +} /// #AXDriver_8038DA70 diff --git a/src/sysdolphin/baselib/axdriver.h b/src/sysdolphin/baselib/axdriver.h index dd9ceddcff..dffd18ccd6 100644 --- a/src/sysdolphin/baselib/axdriver.h +++ b/src/sysdolphin/baselib/axdriver.h @@ -2,6 +2,7 @@ #define _AXDRIVER_H_ #include + #include "baselib/forward.h" #define SMSTATE_MASK 0xC0000000 diff --git a/src/sysdolphin/baselib/axdriver.static.h b/src/sysdolphin/baselib/axdriver.static.h new file mode 100644 index 0000000000..9cd08c6b5f --- /dev/null +++ b/src/sysdolphin/baselib/axdriver.static.h @@ -0,0 +1,14 @@ +#ifndef ___AXDRIVER_H_ +#define ___AXDRIVER_H_ + +#include "axdriver.h" // IWYU pragma: export + +/* 408140 */ extern char AXDriver_80408140[]; +/* 40814C */ extern char AXDriver_8040814C[]; +/* 408168 */ extern char AXDriver_80408168[]; +/* 4D77D4 */ extern u8* AXDriver_804D77D4; +/* 4D77D8 */ extern u32 axfxallocsize; +/* 4D77DC */ extern u32 axfxmaxsize; +/* 4D77EC */ static s32 AXDriver_804D77EC; + +#endif diff --git a/src/sysdolphin/baselib/class.h b/src/sysdolphin/baselib/class.h index 7065c8ada1..7d2f478c78 100644 --- a/src/sysdolphin/baselib/class.h +++ b/src/sysdolphin/baselib/class.h @@ -2,6 +2,7 @@ #define _class_h_ #include + #include "baselib/forward.h" #define HSD_CLASS_INFO(o) ((HSD_ClassInfo*) o) diff --git a/src/sysdolphin/baselib/cobj.c b/src/sysdolphin/baselib/cobj.c index 9ddfd89ddc..489d280fbe 100644 --- a/src/sysdolphin/baselib/cobj.c +++ b/src/sysdolphin/baselib/cobj.c @@ -1,3 +1,5 @@ +#include + #include #include "cobj.h" @@ -13,7 +15,6 @@ #include "wobj.h" #include -#include #include #include #include diff --git a/src/sysdolphin/baselib/cobj.h b/src/sysdolphin/baselib/cobj.h index d6546f7920..82646a1cf8 100644 --- a/src/sysdolphin/baselib/cobj.h +++ b/src/sysdolphin/baselib/cobj.h @@ -2,11 +2,12 @@ #define _cobj_h_ #include +#include + #include "baselib/forward.h" // IWYU pragma: export #include "baselib/object.h" -#include #include #include diff --git a/src/sysdolphin/baselib/controller.h b/src/sysdolphin/baselib/controller.h index d672c41652..95a82883df 100644 --- a/src/sysdolphin/baselib/controller.h +++ b/src/sysdolphin/baselib/controller.h @@ -2,6 +2,7 @@ #define _controller_h_ #include + #include "baselib/forward.h" #include diff --git a/src/sysdolphin/baselib/devcom.h b/src/sysdolphin/baselib/devcom.h index 0261df707a..8bec8e9e76 100644 --- a/src/sysdolphin/baselib/devcom.h +++ b/src/sysdolphin/baselib/devcom.h @@ -2,6 +2,7 @@ #define SYSDOLPHIN_BASELIB_DEVCOM_H #include + #include "baselib/forward.h" #include "baselib/archive.h" diff --git a/src/sysdolphin/baselib/displayfunc.h b/src/sysdolphin/baselib/displayfunc.h index 7ec240a37b..b660db0f82 100644 --- a/src/sysdolphin/baselib/displayfunc.h +++ b/src/sysdolphin/baselib/displayfunc.h @@ -2,6 +2,7 @@ #define INCLUDE_SYSDOLPHIN_BASELIB_DISPLAYFUNC_H #include + #include "baselib/forward.h" #include diff --git a/src/sysdolphin/baselib/dobj.h b/src/sysdolphin/baselib/dobj.h index 4bf88a724b..f7c2e1264e 100644 --- a/src/sysdolphin/baselib/dobj.h +++ b/src/sysdolphin/baselib/dobj.h @@ -2,6 +2,7 @@ #define SYSDOLPHIN_BASELIB_DOBJ_H #include + #include "baselib/forward.h" // IWYU pragma: export #include diff --git a/src/sysdolphin/baselib/fobj.h b/src/sysdolphin/baselib/fobj.h index fd1253d0d7..68b81603c6 100644 --- a/src/sysdolphin/baselib/fobj.h +++ b/src/sysdolphin/baselib/fobj.h @@ -2,6 +2,7 @@ #define _fobj_h_ #include + #include "baselib/forward.h" #include "baselib/objalloc.h" diff --git a/src/sysdolphin/baselib/fog.h b/src/sysdolphin/baselib/fog.h index 2c69b3c318..92f5348bcb 100644 --- a/src/sysdolphin/baselib/fog.h +++ b/src/sysdolphin/baselib/fog.h @@ -2,6 +2,7 @@ #define SYSDOLPHIN_BASELIB_FOG_H #include + #include "baselib/forward.h" // IWYU pragma: export #include diff --git a/src/sysdolphin/baselib/gobj.h b/src/sysdolphin/baselib/gobj.h index 3994d6548f..8fe56c40e1 100644 --- a/src/sysdolphin/baselib/gobj.h +++ b/src/sysdolphin/baselib/gobj.h @@ -2,12 +2,12 @@ #define GALE01_390730 #include +#include + #include "baselib/forward.h" // IWYU pragma: export #include "baselib/objalloc.h" -#include - struct _GObjUnkStruct; #define HSD_GOBJ_GXLINK_NONE ((u8) 0xFF) diff --git a/src/sysdolphin/baselib/gobjgxlink.h b/src/sysdolphin/baselib/gobjgxlink.h index 392c8d9cf3..850ff26db1 100644 --- a/src/sysdolphin/baselib/gobjgxlink.h +++ b/src/sysdolphin/baselib/gobjgxlink.h @@ -2,6 +2,7 @@ #define _gobjgxlink_h_ #include + #include "baselib/forward.h" #include "baselib/gobj.h" diff --git a/src/sysdolphin/baselib/gobjobject.h b/src/sysdolphin/baselib/gobjobject.h index ec823d05c1..57c6d6c073 100644 --- a/src/sysdolphin/baselib/gobjobject.h +++ b/src/sysdolphin/baselib/gobjobject.h @@ -2,10 +2,10 @@ #define SYSDOLPHIN_BASELIB_GOBJOBJECT_H #include -#include "baselib/forward.h" // IWYU pragma: export - #include +#include "baselib/forward.h" // IWYU pragma: export + UNK_T HSD_GObjObject_80390ADC(HSD_GObj* gobj); void HSD_GObjObject_80390A70(HSD_GObj* gobj, u8 kind, void* obj); void HSD_GObjObject_80390B0C(HSD_GObj* gobj); diff --git a/src/sysdolphin/baselib/gobjplink.h b/src/sysdolphin/baselib/gobjplink.h index dc2b731cd0..7ddfa497fa 100644 --- a/src/sysdolphin/baselib/gobjplink.h +++ b/src/sysdolphin/baselib/gobjplink.h @@ -2,6 +2,7 @@ #define SYSDOLPHIN_BASELIB_GOBJPLINK_H #include + #include "baselib/forward.h" #include "baselib/gobj.h" diff --git a/src/sysdolphin/baselib/gobjproc.c b/src/sysdolphin/baselib/gobjproc.c index 7023741d6d..3e3e5eb583 100644 --- a/src/sysdolphin/baselib/gobjproc.c +++ b/src/sysdolphin/baselib/gobjproc.c @@ -1,11 +1,11 @@ +#include + #include "gobjproc.h" #include "debug.h" #include "gobj.h" #include "objalloc.h" -#include - extern HSD_ObjAllocData gobjproc_alloc_data; extern HSD_GObjProc* HSD_GObj_804D7830; diff --git a/src/sysdolphin/baselib/gobjproc.h b/src/sysdolphin/baselib/gobjproc.h index 8c8f090a85..3756cfdfc0 100644 --- a/src/sysdolphin/baselib/gobjproc.h +++ b/src/sysdolphin/baselib/gobjproc.h @@ -2,6 +2,7 @@ #define SYSDOLPHIN_BASELIB_GOBJPROC_H #include + #include "baselib/forward.h" struct HSD_GObjProc { diff --git a/src/sysdolphin/baselib/gobjuserdata.h b/src/sysdolphin/baselib/gobjuserdata.h index f91db4b888..f818794ea2 100644 --- a/src/sysdolphin/baselib/gobjuserdata.h +++ b/src/sysdolphin/baselib/gobjuserdata.h @@ -2,6 +2,7 @@ #define _gobjuserdata_h_ #include + #include "baselib/forward.h" #define HSD_GOBJ_USER_DATA_NONE (u8) - 1 diff --git a/src/sysdolphin/baselib/hash.h b/src/sysdolphin/baselib/hash.h index 60fb8fa24a..fed5a7246f 100644 --- a/src/sysdolphin/baselib/hash.h +++ b/src/sysdolphin/baselib/hash.h @@ -2,6 +2,7 @@ #define _hash_h_ #include + #include "baselib/forward.h" #include "baselib/class.h" diff --git a/src/sysdolphin/baselib/hsd_3A94.h b/src/sysdolphin/baselib/hsd_3A94.h index 5e8c6d3ff3..4efbdf05de 100644 --- a/src/sysdolphin/baselib/hsd_3A94.h +++ b/src/sysdolphin/baselib/hsd_3A94.h @@ -1,9 +1,10 @@ #ifndef GALE01_3A949C #define GALE01_3A949C -#include #include +#include + typedef struct { u8 x0[0x80 * 0x24]; } __baselib_UnkType002; diff --git a/src/sysdolphin/baselib/jobj.h b/src/sysdolphin/baselib/jobj.h index ba89986600..3d1515fb63 100644 --- a/src/sysdolphin/baselib/jobj.h +++ b/src/sysdolphin/baselib/jobj.h @@ -2,6 +2,7 @@ #define _jobj_h_ #include + #include "baselib/forward.h" // IWYU pragma: export #include diff --git a/src/sysdolphin/baselib/lobj.h b/src/sysdolphin/baselib/lobj.h index 23014a6097..caa3293092 100644 --- a/src/sysdolphin/baselib/lobj.h +++ b/src/sysdolphin/baselib/lobj.h @@ -2,6 +2,7 @@ #define SYSDOLPHIN_BASELIB_LOBJ_H #include + #include "baselib/forward.h" // IWYU pragma: export #include "baselib/debug.h" diff --git a/src/sysdolphin/baselib/mobj.h b/src/sysdolphin/baselib/mobj.h index 65548e2d9c..a60f3992fb 100644 --- a/src/sysdolphin/baselib/mobj.h +++ b/src/sysdolphin/baselib/mobj.h @@ -2,6 +2,7 @@ #define _mobj_h_ #include + #include "baselib/forward.h" // IWYU pragma: export #include "baselib/class.h" diff --git a/src/sysdolphin/baselib/mtx.h b/src/sysdolphin/baselib/mtx.h index d33a53e65b..c1e6eec6f6 100644 --- a/src/sysdolphin/baselib/mtx.h +++ b/src/sysdolphin/baselib/mtx.h @@ -2,6 +2,7 @@ #define _mtx_h_ #include + #include #include "baselib/objalloc.h" diff --git a/src/sysdolphin/baselib/object.h b/src/sysdolphin/baselib/object.h index a36dfb1eea..b80a09b010 100644 --- a/src/sysdolphin/baselib/object.h +++ b/src/sysdolphin/baselib/object.h @@ -2,6 +2,7 @@ #define _object_h_ #include + #include "baselib/forward.h" #include "baselib/class.h" diff --git a/src/sysdolphin/baselib/particle.c b/src/sysdolphin/baselib/particle.c index 3fdfee6ce1..b2f65c022d 100644 --- a/src/sysdolphin/baselib/particle.c +++ b/src/sysdolphin/baselib/particle.c @@ -1,4 +1,4 @@ -#include "particle__static.h" +#include "particle.static.h" /// #hsd_80391580 diff --git a/src/sysdolphin/baselib/particle.h b/src/sysdolphin/baselib/particle.h index a8489a94b8..6e0b9bd8e4 100644 --- a/src/sysdolphin/baselib/particle.h +++ b/src/sysdolphin/baselib/particle.h @@ -2,6 +2,7 @@ #define GALE01_391580 #include + #include "baselib/forward.h" #include "baselib/jobj.h" diff --git a/src/sysdolphin/baselib/particle__static.h b/src/sysdolphin/baselib/particle.static.h similarity index 100% rename from src/sysdolphin/baselib/particle__static.h rename to src/sysdolphin/baselib/particle.static.h diff --git a/src/sysdolphin/baselib/pobj.h b/src/sysdolphin/baselib/pobj.h index 037001bc10..7cc4881592 100644 --- a/src/sysdolphin/baselib/pobj.h +++ b/src/sysdolphin/baselib/pobj.h @@ -2,6 +2,7 @@ #define _pobj_h_ #include + #include "baselib/forward.h" // IWYU pragma: export #include diff --git a/src/sysdolphin/baselib/psappsrt.h b/src/sysdolphin/baselib/psappsrt.h index e05aec8722..02f5822cd9 100644 --- a/src/sysdolphin/baselib/psappsrt.h +++ b/src/sysdolphin/baselib/psappsrt.h @@ -2,9 +2,10 @@ #define SYSDOLPHIN_BASELIB_PSAPPSRT_H #include +#include + #include "baselib/forward.h" -#include #include #define PSAPPSRT_UNK_B09 (1 << 9) diff --git a/src/sysdolphin/baselib/psdisp.h b/src/sysdolphin/baselib/psdisp.h index 171c045370..3fd03b3c28 100644 --- a/src/sysdolphin/baselib/psdisp.h +++ b/src/sysdolphin/baselib/psdisp.h @@ -2,6 +2,7 @@ #define SYSDOLPHIN_BASELIB_PSDISP_H #include + #include #include "baselib/psstructs.h" diff --git a/src/sysdolphin/baselib/psdisptev.h b/src/sysdolphin/baselib/psdisptev.h index ee3c6dbf1c..a4b12c8d85 100644 --- a/src/sysdolphin/baselib/psdisptev.h +++ b/src/sysdolphin/baselib/psdisptev.h @@ -2,7 +2,6 @@ #define GALE01_3A3920 #include - #include /* 3A3920 */ void psSetupTevCommon(void); diff --git a/src/sysdolphin/baselib/psstructs.h b/src/sysdolphin/baselib/psstructs.h index b303102b5d..ef71617271 100644 --- a/src/sysdolphin/baselib/psstructs.h +++ b/src/sysdolphin/baselib/psstructs.h @@ -2,6 +2,7 @@ #define SYSDOLPHIN_BASELIB_PSSTRUCTS_H #include + #include "baselib/forward.h" #include diff --git a/src/sysdolphin/baselib/quatlib.h b/src/sysdolphin/baselib/quatlib.h index ef51519e3a..ddc4d38f49 100644 --- a/src/sysdolphin/baselib/quatlib.h +++ b/src/sysdolphin/baselib/quatlib.h @@ -2,6 +2,7 @@ #define INCLUDE_SYSDOLPHIN_BASELIB_QUATLIB_H #include + #include #include diff --git a/src/sysdolphin/baselib/robj.c b/src/sysdolphin/baselib/robj.c index 0b822d39a8..3683759d46 100644 --- a/src/sysdolphin/baselib/robj.c +++ b/src/sysdolphin/baselib/robj.c @@ -1,3 +1,5 @@ +#include + #include "robj.h" #include "aobj.h" @@ -12,7 +14,6 @@ #include <__mem.h> #include -#include #include #include #include diff --git a/src/sysdolphin/baselib/robj.h b/src/sysdolphin/baselib/robj.h index 55b06b52ee..f3884866d7 100644 --- a/src/sysdolphin/baselib/robj.h +++ b/src/sysdolphin/baselib/robj.h @@ -2,6 +2,7 @@ #define _robj_h_ #include + #include "baselib/forward.h" // IWYU pragma: export #include diff --git a/src/sysdolphin/baselib/rumble.h b/src/sysdolphin/baselib/rumble.h index 594c87cdae..e96374f330 100644 --- a/src/sysdolphin/baselib/rumble.h +++ b/src/sysdolphin/baselib/rumble.h @@ -2,6 +2,7 @@ #define SYSDOLPHIN_BASELIB_RUMBLE_H #include + #include "baselib/forward.h" #include diff --git a/src/sysdolphin/baselib/shadow.h b/src/sysdolphin/baselib/shadow.h index 6e4da9bc60..f4dfdb9f57 100644 --- a/src/sysdolphin/baselib/shadow.h +++ b/src/sysdolphin/baselib/shadow.h @@ -2,6 +2,7 @@ #define _shadow_h_ #include + #include "baselib/forward.h" #include "baselib/cobj.h" diff --git a/src/sysdolphin/baselib/sislib.h b/src/sysdolphin/baselib/sislib.h index 26150f30f0..3658601214 100644 --- a/src/sysdolphin/baselib/sislib.h +++ b/src/sysdolphin/baselib/sislib.h @@ -2,12 +2,13 @@ #define SYSDOLPHIN_BASELIB_SISLIB_H #include +#include + #include "baselib/forward.h" #include "baselib/archive.h" #include "baselib/cobj.h" -#include #include typedef struct sislib_UnkAllocData sislib_UnkAllocData; diff --git a/src/sysdolphin/baselib/sobjlib.c b/src/sysdolphin/baselib/sobjlib.c index ef6fab9cf7..abb9cd2d5a 100644 --- a/src/sysdolphin/baselib/sobjlib.c +++ b/src/sysdolphin/baselib/sobjlib.c @@ -1,4 +1,5 @@ #include + #include "forward.h" #include diff --git a/src/sysdolphin/baselib/spline.h b/src/sysdolphin/baselib/spline.h index 4fb12fd23b..fdb554c79a 100644 --- a/src/sysdolphin/baselib/spline.h +++ b/src/sysdolphin/baselib/spline.h @@ -2,11 +2,11 @@ #define SYSDOLPHIN_BASELIB_SPLINE_H #include +#include + #include "baselib/forward.h" #include -#include - struct HSD_Spline { u8 x0 UNK_SIZE_ARRAY; }; diff --git a/src/sysdolphin/baselib/state.h b/src/sysdolphin/baselib/state.h index 4782727aca..5bd442611e 100644 --- a/src/sysdolphin/baselib/state.h +++ b/src/sysdolphin/baselib/state.h @@ -2,6 +2,7 @@ #define SYSDOLPHIN_BASELIB_S #include + #include "baselib/forward.h" #include diff --git a/src/sysdolphin/baselib/synth.c b/src/sysdolphin/baselib/synth.c index 20eaed5a43..c70e6d46f5 100644 --- a/src/sysdolphin/baselib/synth.c +++ b/src/sysdolphin/baselib/synth.c @@ -1,8 +1,4 @@ -#include "synth__static.h" - -static UNK_T driverInactivatedCallback; -extern UNK_T driverMasterClockCallback; -extern UNK_T driverPauseCallback; +#include "synth.static.h" /// #HSD_AudioMalloc @@ -105,7 +101,10 @@ void HSD_SynthSFXSetDriverPauseCallback(UNK_T arg0) /// #HSD_SynthCallback -/// #fn_8038AD60 +void fn_8038AD60(void) +{ + HSD_Synth_804D776C = HSD_Synth_804D7768, HSD_Synth_804D7778 = 0; +} /// #HSD_Synth_8038AD74 diff --git a/src/sysdolphin/baselib/synth.static.h b/src/sysdolphin/baselib/synth.static.h new file mode 100644 index 0000000000..efe09d43c5 --- /dev/null +++ b/src/sysdolphin/baselib/synth.static.h @@ -0,0 +1,16 @@ +#ifndef __GALE01_388330 +#define __GALE01_388330 + +#include "synth.h" // IWYU pragma: export + +/* 4D772C */ static s32 HSD_Synth_804D772C; +/* 4D7738 */ static s32 HSD_Synth_804D7738; +/* 4D773C */ static volatile int HSD_Synth_804D773C; +/* 4D7740 */ static UNK_T driverInactivatedCallback; +/* 4D7744 */ static UNK_T driverMasterClockCallback; +/* 4D7748 */ static UNK_T driverPauseCallback; +/* 4D7768 */ static s32 HSD_Synth_804D7768; +/* 4D776C */ static s32 HSD_Synth_804D776C; +/* 4D7778 */ static s8 HSD_Synth_804D7778; + +#endif diff --git a/src/sysdolphin/baselib/synth__static.h b/src/sysdolphin/baselib/synth__static.h deleted file mode 100644 index 093e7deb24..0000000000 --- a/src/sysdolphin/baselib/synth__static.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __GALE01_388330 -#define __GALE01_388330 - -#include "synth.h" // IWYU pragma: export - -/* 4D772C */ static s32 HSD_Synth_804D772C; -/* 4D7738 */ static s32 HSD_Synth_804D7738; -/* 4D773C */ static volatile int HSD_Synth_804D773C; - -#endif diff --git a/src/sysdolphin/baselib/tev.c b/src/sysdolphin/baselib/tev.c index 4121ce8353..bc28f50ef5 100644 --- a/src/sysdolphin/baselib/tev.c +++ b/src/sysdolphin/baselib/tev.c @@ -1,3 +1,5 @@ +#include + #include #include "tev.h" @@ -5,7 +7,6 @@ #include "debug.h" #include <__mem.h> -#include #include #include #include diff --git a/src/sysdolphin/baselib/texp.c b/src/sysdolphin/baselib/texp.c index 66ed6eb1d8..223a31c8a3 100644 --- a/src/sysdolphin/baselib/texp.c +++ b/src/sysdolphin/baselib/texp.c @@ -1,9 +1,10 @@ +#include + #include "texp.h" #include "debug.h" #include <__mem.h> -#include #include #include #include diff --git a/src/sysdolphin/baselib/texp.h b/src/sysdolphin/baselib/texp.h index eaac0cd5dd..ac0a538bd3 100644 --- a/src/sysdolphin/baselib/texp.h +++ b/src/sysdolphin/baselib/texp.h @@ -2,6 +2,7 @@ #define _texp_h_ #include + #include "baselib/forward.h" #include diff --git a/src/sysdolphin/baselib/texpdag.h b/src/sysdolphin/baselib/texpdag.h index 2c4f6c3de9..8e85665611 100644 --- a/src/sysdolphin/baselib/texpdag.h +++ b/src/sysdolphin/baselib/texpdag.h @@ -2,12 +2,12 @@ #define SYSDOLPHIN_BASELIB_TEXPDAG_H #include +#include + #include "baselib/forward.h" #include "baselib/texp.h" -#include - typedef struct HSD_TExpDag { struct _HSD_TETev* tev; u8 idx; diff --git a/src/sysdolphin/baselib/tobj.h b/src/sysdolphin/baselib/tobj.h index 51cb6689e7..3d0134943c 100644 --- a/src/sysdolphin/baselib/tobj.h +++ b/src/sysdolphin/baselib/tobj.h @@ -2,6 +2,7 @@ #define _hsd_tobj_h_ #include + #include "baselib/forward.h" // IWYU pragma: export #include "baselib/class.h" diff --git a/src/sysdolphin/baselib/util.h b/src/sysdolphin/baselib/util.h index e83e02d8f9..f87df1b815 100644 --- a/src/sysdolphin/baselib/util.h +++ b/src/sysdolphin/baselib/util.h @@ -2,6 +2,7 @@ #define _UTIL_H_ #include + #include #include "mtx.h" diff --git a/src/sysdolphin/baselib/video.h b/src/sysdolphin/baselib/video.h index 5bc2247d76..6779d1c91c 100644 --- a/src/sysdolphin/baselib/video.h +++ b/src/sysdolphin/baselib/video.h @@ -2,6 +2,7 @@ #define _video_h_ #include + #include #include diff --git a/src/sysdolphin/baselib/wobj.h b/src/sysdolphin/baselib/wobj.h index b730f44daa..9b796b3a95 100644 --- a/src/sysdolphin/baselib/wobj.h +++ b/src/sysdolphin/baselib/wobj.h @@ -2,6 +2,7 @@ #define SYSDOLPHIN_BASELIB_WOBJ_H #include + #include "baselib/forward.h" // IWYU pragma: export #include "baselib/class.h"