From 0f65f8fd5008d06defcfae6c9d66270ff45a8e49 Mon Sep 17 00:00:00 2001 From: theo3 Date: Tue, 28 Dec 2021 12:08:30 -0800 Subject: [PATCH 1/2] Identify player functions and update asm.h --- asm/ambientClouds.s | 4 +- asm/armos.s | 2 +- asm/bird.s | 10 +- asm/blockPushed.s | 2 +- asm/bombarossa.s | 2 +- asm/bossDoor.s | 4 +- asm/chestSpawner.s | 2 +- asm/cloudPiranha.s | 2 +- asm/code_080043E8.s | 8 +- asm/code_08016984.s | 4 +- asm/code_0801967C.s | 2 +- asm/code_0804AA84.s | 4 +- asm/code_08077698.s | 4 +- asm/code_08078778.s | 36 +- asm/code_0807F0D8.s | 2 +- asm/code_080A29BC.s | 8 +- asm/code_080A5574.s | 2 +- asm/crenalBeanSprout.s | 2 +- asm/crow.s | 2 +- asm/cuccoAggr.s | 4 +- asm/deathFx.s | 2 +- asm/doubleBookshelf.s | 2 +- asm/dust.s | 2 +- asm/enemy50.s | 4 +- asm/figurineDevice.s | 2 +- asm/gleerok.s | 2 +- asm/gyorgBossObject.s | 2 +- asm/gyorgChild.s | 4 +- asm/lilypadLarge.s | 16 +- asm/loadRoomEntity.s | 2 +- asm/macroPlayer.s | 14 +- asm/minecart.s | 2 +- asm/minecartDoor.s | 4 +- asm/non_matching/eu/HandlePlayerLife.inc | 2 +- asm/non_matching/eu/sub_0802AC40.inc | 2 +- .../fallingBoulder/sub_0802C334.inc | 2 +- asm/non_matching/itemGustJar/sub_08076F64.inc | 4 +- .../itemMoleMitts/sub_080772A8.inc | 2 +- asm/non_matching/itemSword/sub_08075900.inc | 2 +- asm/non_matching/mazaal/sub_0803473C.inc | 2 +- asm/non_matching/mazaal/sub_080347B4.inc | 2 +- asm/non_matching/mazaal/sub_0803AA98.inc | 2 +- asm/non_matching/player/PlayerNormal.inc | 8 +- asm/non_matching/player/sub_08070DC4.inc | 8 +- asm/non_matching/player/sub_08072D54.inc | 10 +- asm/non_matching/player/sub_08073584.inc | 4 +- asm/non_matching/player/sub_080740D8.inc | 2 +- .../playerItem11/sub_08018E68.inc | 2 +- .../playerItem12/sub_080701F8.inc | 2 +- .../playerItem13/sub_080AD040.inc | 2 +- .../playerItem15/sub_080A310C.inc | 2 +- asm/non_matching/playerItem3/sub_0801B680.inc | 2 +- .../playerItemBow/sub_0801917C.inc | 2 +- asm/object10.s | 2 +- asm/object12.s | 2 +- asm/object20.s | 2 +- asm/object21.s | 2 +- asm/object35.s | 4 +- asm/object36.s | 2 +- asm/object43.s | 2 +- asm/object4B.s | 2 +- asm/object64.s | 2 +- asm/object67.s | 2 +- asm/object79.s | 2 +- asm/object91.s | 2 +- asm/object96.s | 2 +- asm/object97.s | 4 +- asm/object98.s | 2 +- asm/objectBlockingStairs.s | 4 +- asm/objectOnPillar.s | 2 +- asm/pullableLever.s | 2 +- asm/pullableMushroom.s | 4 +- asm/pushableFurniture.s | 2 +- asm/pushableGrave.s | 2 +- asm/pushableRock.s | 2 +- asm/pushableStatue.s | 2 +- asm/specialFx.s | 8 +- asm/steam.s | 2 +- asm/takkuri.s | 2 +- asm/whirlwind.s | 2 +- asm/wizzrobeWind.s | 2 +- .../cloudTops/script_PlayerAtSiroc.inc | 2 +- data/scripts/cutscene/ezlo/script_EzloCap.inc | 2 +- .../ezlo/script_Npc4EEzloCutscene.inc | 2 +- .../ezlo/script_PlayerDefeatedOctoroks.inc | 2 +- .../ezlo/script_PlayerEzloBeingBullied.inc | 2 +- .../cutscene/ezlo/script_PlayerGetEzloCap.inc | 2 +- .../cutscene/intro/script_PlayerIntro.inc | 2 +- .../intro/script_ZeldaTalkToSmith.inc | 2 +- .../introAssembly/script_PlayerEnters.inc | 2 +- .../introAssembly/script_PlayerGetSword.inc | 2 +- .../script_PlayerWakingUpInHyruleCastle.inc | 2 +- .../script_PlayerAtIntroBusinessScrub4.inc | 2 +- .../script_PlayerIntroBusinessScrub1.inc | 2 +- .../script_PlayerIntroBusinessScrub2.inc | 2 +- .../script_PlayerIntroBusinessScrub3.inc | 2 +- .../introCeremony/script_Npc4EMonsters.inc | 2 +- .../script_Npc4EVaatiAttacking.inc | 2 +- .../script_PlayerAtIntroCeremony.inc | 2 +- .../introCeremony/script_PlayerFainting.inc | 2 +- .../script_PlayerIntroCastle.inc | 2 +- .../script_PlayerProtectingZelda.inc | 2 +- .../introTown/script_Npc4EIntroTown.inc | 2 +- .../introTown/script_PlayerIntro1.inc | 2 +- .../introTown/script_PlayerIntro2.inc | 2 +- .../introTown/script_PlayerIntro3.inc | 2 +- .../introTown/script_PlayerIntro4.inc | 2 +- .../introTown/script_PlayerIntro5.inc | 2 +- .../introTown/script_PlayerIntroTown.inc | 2 +- .../script_PlayerAtFirstKinstone.inc | 2 +- ...pt_PlayerAtHurdyGurdyManFirstKinstone1.inc | 2 +- ...pt_PlayerAtHurdyGurdyManFirstKinstone2.inc | 2 +- ...pt_PlayerAtHurdyGurdyManFirstKinstone3.inc | 2 +- ...pt_PlayerAtHurdyGurdyManFirstKinstone4.inc | 2 +- .../script_PlayerAtVillageIntro.inc | 2 +- .../script_PlayerAtVaatisAppearance.inc | 2 +- .../script_PlayerDefeatedMoblins.inc | 2 +- .../script_PlayerReceivedExposition.inc | 2 +- .../script_PlayerSeenOriginStory.inc | 2 +- .../script_PlayerStoneWallsAppear.inc | 2 +- .../script_PlayerTryToFollowVaati.inc | 2 +- .../cutscene/outro/script_PlayerAtEzlo.inc | 2 +- .../cutscene/outro/script_PlayerAtOutro.inc | 2 +- .../outro/script_PlayerGetGreenCap.inc | 2 +- .../outro/script_PlayerSayGoodbye.inc | 2 +- .../reveal/script_PlayerAtPicture.inc | 2 +- .../reveal/script_PlayerDistanceFromVaati.inc | 2 +- .../reveal/script_PlayerFaintAgain.inc | 2 +- .../reveal/script_PlayerMoveToPicture.inc | 2 +- .../takeover/script_PlayerAtTakeover.inc | 2 +- .../dhc/script_PlayerAfterDefeatingV2.inc | 2 +- data/scripts/dhc/script_PlayerAtDarkNut1.inc | 2 +- data/scripts/dhc/script_PlayerAtDarkNut2.inc | 2 +- data/scripts/dhc/script_PlayerAtDarkNut3.inc | 2 +- .../dhc/script_PlayerCastleCollapsing.inc | 2 +- .../scripts/dhc/script_PlayerCastleEscape.inc | 2 +- .../scripts/dhc/script_PlayerRescuedZelda.inc | 2 +- data/scripts/dhc/script_PlayerStonesFall.inc | 2 +- data/scripts/dhc/script_PlayerV2Defeated.inc | 2 +- .../script_PlayerAtGraveyardHouseDoor.inc | 2 +- .../graveyard/script_PlayerAtKingGustav.inc | 2 +- .../graveyard/script_PlayerGetKeyStolen.inc | 2 +- data/scripts/hyruleTown/script_Anju.inc | 2 +- .../script_PlayerActivatedTrapCard.inc | 2 +- .../hyruleTown/script_PlayerAtDrLeftDoor.inc | 2 +- .../hyruleTown/script_PlayerAtInnDoor.inc | 2 +- .../hyruleTown/script_PlayerCannotEnter.inc | 2 +- .../hyruleTown/script_PlayerSleepingInn.inc | 2 +- .../hyruleTown/script_PlayerStepOnTrap.inc | 2 +- .../scripts/hyruleTown/script_TownMinish5.inc | 2 +- .../lakeHylia/script_PlayerAfterToD.inc | 2 +- .../minishWoods/script_PlayerAtBombMinish.inc | 2 +- .../minishWoods/script_PlayerAtFestari.inc | 2 +- .../minishWoods/script_PlayerAtGentari.inc | 2 +- .../script_PlayerAtMadderpillar.inc | 2 +- .../mtCrenel/script_PlayerAtMelari.inc | 2 +- .../script_PlayerAtMountainMinishExit.inc | 2 +- .../mtCrenel/script_PlayerGetWhiteSword.inc | 2 +- .../script_PlayerPlaceBrokenSword.inc | 2 +- .../npc/script_PlayerAtBladeBrothers.inc | 2 +- .../sanctuary/script_Npc4EThirdSanctuary.inc | 2 +- .../sanctuary/script_PlayerAtPedestal.inc | 2 +- .../script_PlayerAtSanctuaryEntrance.inc | 2 +- .../script_PlayerPickUpFinalSword.inc | 2 +- .../sanctuary/script_PlayerPickUpSword.inc | 2 +- .../sanctuary/script_PlayerSanctuary.inc | 2 +- .../sanctuary/script_PlayerSanctuaryIntro.inc | 2 +- .../script_PlayerTextBoardAppears.inc | 2 +- data/scripts/unused/script_0800FB2C.inc | 2 +- data/scripts/unused/script_08012B24.inc | 2 +- data/scripts/unused/script_08012B50.inc | 2 +- data/scripts/unused/script_08012B7C.inc | 2 +- data/scripts/unused/script_08013D04.inc | 2 +- data/scripts/unused/script_08013D44.inc | 2 +- data/scripts/unused/script_08013D84.inc | 2 +- data/scripts/unused/script_08013DC4.inc | 2 +- data/scripts/unused/script_08015A7C.inc | 2 +- data/scripts/unused/script_08015AA0.inc | 2 +- .../windRuins/script_PlayerAtTextboard.inc | 2 +- include/asm.h | 19 +- include/coord.h | 2 +- include/functions.h | 23 +- include/overworld.h | 4 +- include/player.h | 22 +- include/room.h | 2 +- include/save.h | 2 + src/audio.c | 6 +- src/code_0805436C.c | 22 +- src/code_0805F9A0.c | 1 + src/code_08077B98.c | 1 - src/code_0807CC3C.c | 5 - src/code_0808091C.c | 3 +- src/code_080A29BC.c | 1 - src/collision.c | 3 +- src/coord.c | 4 +- src/debugScreen.c | 1 - src/enemy.c | 1 - src/enemy/acroBandits.c | 5 +- src/enemy/beetle.c | 2 +- src/enemy/bladeTrap.c | 3 +- src/enemy/bombPeahat.c | 3 +- src/enemy/businessScrub.c | 6 +- src/enemy/chaser.c | 1 - src/enemy/chuchu.c | 2 - src/enemy/chuchuBoss.c | 2 - src/enemy/doorMimic.c | 2 - src/enemy/enemyE.c | 1 - src/enemy/fallingBoulder.c | 2 +- src/enemy/fireballGuy.c | 2 - src/enemy/gyorgMale.c | 1 - src/enemy/hangingSeed.c | 1 - src/enemy/lakituCloud.c | 2 +- src/enemy/madderpillar.c | 1 - src/enemy/mazaalBracelet.c | 31 +- src/enemy/mazaalHand.c | 1 - src/enemy/mazaalHead.c | 10 +- src/enemy/moldorm.c | 1 - src/enemy/moldworm.c | 1 - src/enemy/octorokBoss.c | 15 +- src/enemy/peahat.c | 2 +- src/enemy/pesto.c | 1 - src/enemy/ropeGolden.c | 3 - src/enemy/rupeeLike.c | 4 +- src/enemy/sensorBladeTrap.c | 2 - src/enemy/slime.c | 2 - src/enemy/smallPesto.c | 2 +- src/enemy/spark.c | 2 - src/enemy/treeItem.c | 2 - src/enemy/vaatiArm.c | 3 - src/enemy/vaatiBall.c | 32 +- src/enemy/vaatiEyesMacro.c | 2 - src/enemy/vaatiProjectile.c | 5 +- src/enemy/vaatiRebornEnemy.c | 1 - src/enemy/vaatiTransfigured.c | 3 +- src/enemy/vaatiTransfiguredEye.c | 1 - src/enemy/vaatiWrath.c | 11 +- src/enemy/vaatiWrathEye.c | 3 +- src/enemy/wallMaster2.c | 6 +- src/enemy/waterDrop.c | 3 +- src/entity.c | 21 - src/ezloNag.c | 1 - src/fade.c | 1 - src/fileScreen.c | 1 - src/flagDebug.c | 2 - src/flags.c | 4 +- src/gba/m4a.c | 1 - src/interrupts.c | 12 +- src/intro.c | 2 - src/item/itemBoomerang.c | 2 - src/item/itemJarEmpty.c | 1 - src/item/itemMoleMitts.c | 4 +- src/item/itemOcarina.c | 2 - src/item/itemRocsCape.c | 2 - src/item/itemSword.c | 2 +- src/main.c | 2 - src/manager/manager10.c | 3 +- src/manager/manager11.c | 1 - src/manager/manager12.c | 3 +- src/manager/manager14.c | 2 - src/manager/manager19.c | 1 - src/manager/manager1A.c | 1 - src/manager/manager1E.c | 2 +- src/manager/manager2.c | 2 - src/manager/manager20.c | 2 - src/manager/manager21.c | 3 +- src/manager/manager24.c | 2 - src/manager/manager25.c | 1 + src/manager/manager26.c | 2 - src/manager/manager28.c | 2 - src/manager/manager2A.c | 2 +- src/manager/manager2B.c | 5 +- src/manager/manager2C.c | 1 + src/manager/manager2D.c | 1 + src/manager/manager3.c | 1 - src/manager/manager30.c | 1 + src/manager/manager31.c | 1 - src/manager/manager32.c | 1 - src/manager/manager35.c | 6 +- src/manager/manager36.c | 1 - src/manager/manager39.c | 1 - src/manager/manager4.c | 1 + src/manager/manager6.c | 1 + src/manager/manager7.c | 4 +- src/manager/manager8.c | 2 - src/manager/managerA.c | 3 +- src/manager/managerB.c | 5 - src/manager/managerE.c | 1 - src/manager/managerF.c | 3 - src/npc/anju.c | 2 - src/npc/beedle.c | 1 - src/npc/bigGoron.c | 1 - src/npc/bladeBrothers.c | 7 - src/npc/brocco.c | 1 - src/npc/carlov.c | 2 - src/npc/carpenter.c | 4 - src/npc/castleMaid.c | 1 - src/npc/cat.c | 10 +- src/npc/cow.c | 2 +- src/npc/cucco.c | 2 +- src/npc/cuccoChick.c | 2 +- src/npc/dampe.c | 2 - src/npc/din.c | 3 - src/npc/dog.c | 3 +- src/npc/drLeft.c | 1 - src/npc/emma.c | 1 - src/npc/epona.c | 3 +- src/npc/ezlo.c | 1 - src/npc/farore.c | 5 - src/npc/festari.c | 7 - src/npc/forestMinish.c | 2 - src/npc/gentari.c | 3 - src/npc/ghostBrothers.c | 3 - src/npc/gina.c | 3 - src/npc/goron.c | 1 - src/npc/goronMerchant.c | 3 - src/npc/gregal.c | 2 - src/npc/guard.c | 5 - src/npc/hurdyGurdyMan.c | 2 - src/npc/kid.c | 5 - src/npc/kingDaltus.c | 2 - src/npc/kingGustaf.c | 1 - src/npc/librari.c | 4 - src/npc/mailbox.c | 1 - src/npc/malon.c | 1 - src/npc/mama.c | 1 - src/npc/marcy.c | 1 - src/npc/mayorHagen.c | 4 - src/npc/milkCart.c | 2 - src/npc/minishEzlo.c | 1 - src/npc/ministerPotho.c | 2 - src/npc/moblinLady.c | 2 - src/npc/mountainMinish.c | 2 - src/npc/mutoh.c | 4 - src/npc/nayru.c | 5 - src/npc/npc23.c | 2 - src/npc/npc26.c | 2 - src/npc/npc4E.c | 3 - src/npc/npc5.c | 11 +- src/npc/npc58.c | 1 - src/npc/npc9.c | 1 - src/npc/percy.c | 9 - src/npc/pina.c | 1 - src/npc/pita.c | 1 + src/npc/postman.c | 12 - src/npc/smith.c | 4 - src/npc/stamp.c | 1 - src/npc/sturgeon.c | 3 - src/npc/talon.c | 2 +- src/npc/teachers.c | 1 - src/npc/tingleSiblings.c | 2 - src/npc/townMinish.c | 6 - src/npc/townsperson.c | 1 - src/npc/vaati.c | 1 - src/npc/vaatiReborn.c | 4 - src/npc/wheaton.c | 1 - src/npc/windTribespeople.c | 8 - src/npc/zelda.c | 3 - src/npc/zeldaFollower.c | 1 - src/npcDefinitions.c | 10 +- src/npcUtils.c | 5 +- src/object.c | 2 - src/object/archway.c | 1 - src/object/backgroundCloud.c | 3 +- src/object/bigVortex.c | 1 - src/object/bird.c | 2 +- src/object/book.c | 3 +- src/object/button.c | 1 - src/object/cloud.c | 6 +- src/object/fileScreenObjects.c | 4 +- src/object/fireplace.c | 3 +- src/object/greatFairy.c | 9 +- src/object/heartContainer.c | 1 - src/object/hiddenLadderDown.c | 2 +- src/object/itemOnGround.c | 37 +- src/object/lightableSwitch.c | 3 +- src/object/lockedDoor.c | 6 +- src/object/mask.c | 1 - src/object/metalDoor.c | 5 +- src/object/minecart.c | 4 +- src/object/minishLight.c | 1 - src/object/minishSizedArchway.c | 1 - src/object/object1D.c | 1 - src/object/object49.c | 1 - src/object/object6A.c | 2 +- src/object/object86.c | 2 - src/object/objectA2.c | 2 +- src/object/objectA8.c | 1 - src/object/objectB2.c | 2 +- src/object/octorokBossObject.c | 2 +- src/object/pinwheel.c | 2 - src/object/pot.c | 5 +- src/object/railtrack.c | 1 + src/object/smoke.c | 2 +- src/object/treeHidingPortal.c | 1 - src/object/warpPoint.c | 6 +- src/object/well.c | 1 + src/object/windcrest.c | 1 - src/objectUtils.c | 1 - src/overworld.c | 14 +- src/player.c | 379 ++++++++++-------- src/playerItem/playerItem12.c | 2 +- src/playerItem/playerItem14.c | 6 +- src/playerItem/playerItem15.c | 2 +- src/playerItem/playerItem3.c | 2 +- src/playerItem/playerItemBow.c | 2 +- src/playerItem/playerItemSwordBeam.c | 4 +- src/playerItemUtils.c | 2 +- src/projectile.c | 2 +- src/projectile/arrowProjectile.c | 3 +- src/projectile/ballAndChain.c | 1 - src/projectile/boneProjectile.c | 4 +- src/projectile/cannonballProjectile.c | 2 - src/projectile/dekuSeedProjectile.c | 2 - src/projectile/dirtBallProjectile.c | 1 - src/projectile/fireProjectile.c | 1 - src/projectile/gleerokProjectile.c | 7 +- src/projectile/guardLineOfSight.c | 2 +- src/projectile/guruguruBarProjectile.c | 1 - src/projectile/gyorgMaleEnergyProjectile.c | 1 - src/projectile/iceProjectile.c | 1 - src/projectile/lakituCloudProjectile.c | 2 - src/projectile/lakituLightning.c | 1 - src/projectile/mandiblesProjectile.c | 4 +- src/projectile/octorokBossProjectile.c | 3 - src/projectile/removableDust.c | 2 - src/projectile/rockProjectile.c | 2 +- src/projectile/spiderWeb.c | 2 - src/projectile/stalfosProjectile.c | 1 - src/projectile/torchTrapProjectile.c | 2 +- src/projectile/v1DarkMagicProjectile.c | 4 +- src/projectile/v1FireProjectile.c | 4 +- src/projectile/v2Projectile.c | 5 +- src/projectile/v3ElectricProjectile.c | 2 - src/projectile/v3HandProjectile.c | 1 - src/projectile/v3TennisBallProjectile.c | 3 - src/projectile/windProjectile.c | 1 - src/room.c | 6 +- src/roomInit.c | 6 - src/script.c | 14 +- src/sub_0807CA18.c | 2 - src/sub_080A3B84.c | 1 - src/textbox.c | 3 +- 442 files changed, 697 insertions(+), 1092 deletions(-) diff --git a/asm/ambientClouds.s b/asm/ambientClouds.s index 05a600c8..7f2964f3 100644 --- a/asm/ambientClouds.s +++ b/asm/ambientClouds.s @@ -116,7 +116,7 @@ _0808921C: movs r0, #1 strb r0, [r1] adds r0, r4, #0 - bl sub_08016A30 + bl ResolveCollisionLayer adds r0, r4, #0 movs r1, #0x15 bl ChangeObjPalette @@ -222,7 +222,7 @@ _0808991A: movs r0, #1 strb r0, [r5] adds r0, r4, #0 - bl sub_08016A30 + bl ResolveCollisionLayer adds r0, r4, #0 movs r1, #0x15 bl ChangeObjPalette diff --git a/asm/armos.s b/asm/armos.s index 330f8177..6063bff6 100644 --- a/asm/armos.s +++ b/asm/armos.s @@ -459,7 +459,7 @@ _080304F0: sub_080304F4: @ 0x080304F4 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl sub_080309A8 ldrb r0, [r4, #0xe] diff --git a/asm/bird.s b/asm/bird.s index e61da353..caa3c21b 100644 --- a/asm/bird.s +++ b/asm/bird.s @@ -196,7 +196,7 @@ _0809D2D6: strh r0, [r1] bl sub_08079184 bl sub_08078B48 - bl sub_080791D0 + bl ResetPlayerAnimationAndAction bl sub_08077B20 adds r0, r7, #0 adds r0, #0x26 @@ -220,7 +220,7 @@ _0809D2D6: strb r3, [r0] _0809D3A8: adds r0, r5, #0 - bl sub_0806F69C + bl LinearMoveUpdate mov r0, r8 movs r2, #0 ldrsh r1, [r0, r2] @@ -499,7 +499,7 @@ _0809D5E6: movs r1, #1 orrs r0, r1 strb r0, [r6, #0x18] - bl sub_080791D0 + bl ResetPlayerAnimationAndAction bl ResetPlayerEventPriority ldr r1, _0809D664 @ =gUnk_02034490 movs r0, #0 @@ -524,7 +524,7 @@ _0809D5E6: bl SetGlobalFlag _0809D62E: adds r0, r5, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r0, #0 ldrsh r1, [r7, r0] adds r0, r5, #0 @@ -692,7 +692,7 @@ _0809D76C: _0809D774: .4byte gRoomControls _0809D778: .4byte gUnk_02034490 _0809D77C: - bl sub_080791D0 + bl ResetPlayerAnimationAndAction _0809D780: pop {r4, pc} .align 2, 0 diff --git a/asm/blockPushed.s b/asm/blockPushed.s index 86af1cfc..1ff53891 100644 --- a/asm/blockPushed.s +++ b/asm/blockPushed.s @@ -243,7 +243,7 @@ _08083090: .4byte 0x0000010F sub_08083094: @ 0x08083094 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl sub_0800445C ldrb r0, [r4, #0xe] diff --git a/asm/bombarossa.s b/asm/bombarossa.s index d368a07e..4f8eb98b 100644 --- a/asm/bombarossa.s +++ b/asm/bombarossa.s @@ -162,7 +162,7 @@ sub_0803350C: @ 0x0803350C cmp r0, #0 bne _08033520 adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate _08033520: adds r2, r4, #0 adds r2, #0x76 diff --git a/asm/bossDoor.s b/asm/bossDoor.s index 027cf905..44e5991b 100644 --- a/asm/bossDoor.s +++ b/asm/bossDoor.s @@ -221,7 +221,7 @@ _0808C382: sub_0808C384: @ 0x0808C384 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 strb r0, [r4, #0xe] @@ -296,7 +296,7 @@ _0808C410: .4byte gUnk_081214F4 sub_0808C414: @ 0x0808C414 push {r4, r5, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 strb r0, [r4, #0xe] diff --git a/asm/chestSpawner.s b/asm/chestSpawner.s index 4fac73dc..24092230 100644 --- a/asm/chestSpawner.s +++ b/asm/chestSpawner.s @@ -371,7 +371,7 @@ sub_080840A8: @ 0x080840A8 ldr r0, _08084148 @ =0x0000FFF8 strh r0, [r5, #0x36] adds r0, r5, #0 - bl sub_08016A30 + bl ResolveCollisionLayer adds r0, r5, #0 movs r1, #0x11 movs r2, #0 diff --git a/asm/cloudPiranha.s b/asm/cloudPiranha.s index b5829666..b85843df 100644 --- a/asm/cloudPiranha.s +++ b/asm/cloudPiranha.s @@ -607,6 +607,6 @@ _080388A8: subs r0, #1 strb r0, [r1] adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate _080388B2: pop {r4, r5, r6, pc} diff --git a/asm/code_080043E8.s b/asm/code_080043E8.s index 817ddf9a..45fe77b4 100644 --- a/asm/code_080043E8.s +++ b/asm/code_080043E8.s @@ -179,9 +179,9 @@ sub_0800451C: @ 0x0800451C cmp r1, #0xb beq sub_08004542 cmp r1, #0xa - beq sub_0800455E + beq ResetCollisionLayer cmp r1, #9 - beq sub_0800455E + beq ResetCollisionLayer cmp r1, #0x26 beq _0800457A cmp r1, #0x27 @@ -205,8 +205,8 @@ sub_08004542: @ 0x08004542 strb r1, [r0, #0x19] bx lr - non_word_aligned_thumb_func_start sub_0800455E -sub_0800455E: @ 0x0800455E + non_word_aligned_thumb_func_start ResetCollisionLayer +ResetCollisionLayer: @ 0x0800455E movs r1, #0x38 movs r2, #1 strb r2, [r0, r1] diff --git a/asm/code_08016984.s b/asm/code_08016984.s index 4b58a45b..79a75172 100644 --- a/asm/code_08016984.s +++ b/asm/code_08016984.s @@ -69,8 +69,8 @@ UpdateSpriteForCollisionLayer: @ 0x08016A04 _08016A28: .byte 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40 - thumb_func_start sub_08016A30 -sub_08016A30: @ 0x08016A30 + thumb_func_start ResolveCollisionLayer +ResolveCollisionLayer: @ 0x08016A30 push {r4, r5, lr} adds r4, r0, #0 movs r5, #0x38 diff --git a/asm/code_0801967C.s b/asm/code_0801967C.s index 27351a84..47feec01 100644 --- a/asm/code_0801967C.s +++ b/asm/code_0801967C.s @@ -3099,7 +3099,7 @@ sub_0801AD6C: @ 0x0801AD6C adds r0, #0x38 strb r3, [r0] adds r0, r5, #0 - bl sub_08016A30 + bl ResolveCollisionLayer ldr r1, _0801ADD8 @ =gUnk_081091E4 ldrb r0, [r5, #8] adds r0, r0, r1 diff --git a/asm/code_0804AA84.s b/asm/code_0804AA84.s index 4dda3c9a..0f934d58 100644 --- a/asm/code_0804AA84.s +++ b/asm/code_0804AA84.s @@ -187,8 +187,8 @@ _0804ACEC: .4byte gFadeControl _0804ACF0: .4byte gArea _0804ACF4: .4byte gUnk_02032EDC - thumb_func_start sub_0804ACF8 -sub_0804ACF8: @ 0x0804ACF8 + thumb_func_start RespawnAsMinish +RespawnAsMinish: @ 0x0804ACF8 push {lr} bl sub_0804AD18 cmp r0, #0 diff --git a/asm/code_08077698.s b/asm/code_08077698.s index 82a5c161..4203ca77 100644 --- a/asm/code_08077698.s +++ b/asm/code_08077698.s @@ -137,7 +137,7 @@ sub_08077758: @ 0x08077758 .align 2, 0 _08077794: .4byte gPlayerState _08077798: - bl sub_0807A108 + bl DeleteClones _0807779C: movs r0, #0 _0807779E: @@ -165,7 +165,7 @@ sub_080777A0: @ 0x080777A0 adds r1, #0xa0 movs r0, #1 strb r0, [r1] - bl sub_0807A108 + bl DeleteClones _080777CC: movs r0, #1 b _0807787C diff --git a/asm/code_08078778.s b/asm/code_08078778.s index 61f876d3..ebd35258 100644 --- a/asm/code_08078778.s +++ b/asm/code_08078778.s @@ -391,7 +391,7 @@ sub_08078AF0: @ 0x08078AF0 movs r1, #2 orrs r0, r1 strb r0, [r2, #0x11] - bl sub_0807A108 + bl DeleteClones pop {r4, pc} .align 2, 0 _08078B40: .4byte gPlayerState @@ -1239,7 +1239,7 @@ sub_0807919C: @ 0x0807919C ands r0, r1 cmp r0, #0 bne _080791B4 - bl sub_080791BC + bl SetPlayerActionNormal b _080791B8 .align 2, 0 _080791B0: .4byte gPlayerState @@ -1249,8 +1249,8 @@ _080791B8: pop {pc} .align 2, 0 - thumb_func_start sub_080791BC -sub_080791BC: @ 0x080791BC + thumb_func_start SetPlayerActionNormal +SetPlayerActionNormal: @ 0x080791BC ldr r0, _080791CC @ =gPlayerEntity movs r2, #0 movs r1, #1 @@ -1261,8 +1261,8 @@ sub_080791BC: @ 0x080791BC .align 2, 0 _080791CC: .4byte gPlayerEntity - thumb_func_start sub_080791D0 -sub_080791D0: @ 0x080791D0 + thumb_func_start ResetPlayerAnimationAndAction +ResetPlayerAnimationAndAction: @ 0x080791D0 push {lr} ldr r3, _0807920C @ =gPlayerState ldr r0, [r3, #0x30] @@ -1318,8 +1318,8 @@ sub_0807921C: @ 0x0807921C ldr r1, _08079254 @ =0xFECBF6FA ands r0, r1 str r0, [r2, #0x30] - bl sub_08079938 - bl sub_080791BC + bl ResolvePlayerAnimation + bl SetPlayerActionNormal adds r0, r4, #0 bl sub_0805E374 pop {r4, pc} @@ -2248,8 +2248,8 @@ _0807992E: _08079930: .4byte gPlayerState _08079934: .4byte gPlayerEntity - thumb_func_start sub_08079938 -sub_08079938: @ 0x08079938 + thumb_func_start ResolvePlayerAnimation +ResolvePlayerAnimation: @ 0x08079938 push {r4, lr} ldr r3, _08079954 @ =gPlayerState ldr r2, [r3, #0x30] @@ -2865,8 +2865,8 @@ _08079DFC: .4byte gPlayerEntity _08079E00: .4byte gPlayerState _08079E04: .4byte 0x00000193 - thumb_func_start sub_08079E08 -sub_08079E08: @ 0x08079E08 + thumb_func_start UpdatePlayerMovement +UpdatePlayerMovement: @ 0x08079E08 push {r4, lr} ldr r0, _08079E50 @ =gPlayerEntity ldrh r2, [r0, #0x24] @@ -3279,8 +3279,8 @@ _0807A104: adds r0, r2, #0 pop {r4, r5, pc} - thumb_func_start sub_0807A108 -sub_0807A108: @ 0x0807A108 + thumb_func_start DeleteClones +DeleteClones: @ 0x0807A108 push {lr} ldr r1, _0807A148 @ =gPlayerClones movs r0, #0 @@ -5131,8 +5131,8 @@ _0807AEDE: .align 2, 0 _0807AEE0: .4byte gScreenTransition - thumb_func_start sub_0807AEE4 -sub_0807AEE4: @ 0x0807AEE4 + thumb_func_start UpdatePlayerSkills +UpdatePlayerSkills: @ 0x0807AEE4 push {r4, lr} ldr r0, _0807AFE4 @ =gPlayerState adds r4, r0, #0 @@ -5471,7 +5471,7 @@ sub_0807B144: @ 0x0807B144 ldr r1, _0807B170 @ =gPlayerState movs r0, #0x81 strb r0, [r1, #2] - bl sub_080791BC + bl SetPlayerActionNormal pop {pc} .align 2, 0 _0807B170: .4byte gPlayerState @@ -5501,7 +5501,7 @@ sub_0807B178: @ 0x0807B178 ldr r1, _0807B1A4 @ =gPlayerState movs r0, #0x81 strb r0, [r1, #2] - bl sub_080791BC + bl SetPlayerActionNormal pop {pc} .align 2, 0 _0807B1A4: .4byte gPlayerState diff --git a/asm/code_0807F0D8.s b/asm/code_0807F0D8.s index 78ccdd83..6a767881 100644 --- a/asm/code_0807F0D8.s +++ b/asm/code_0807F0D8.s @@ -485,7 +485,7 @@ sub_0807FF6C: @ 0x0807FF6C adds r0, #4 strh r1, [r0] bl ResetPlayer - bl sub_080791D0 + bl ResetPlayerAnimationAndAction ldr r0, _0807FFCC @ =gUnk_03004030 ldrb r0, [r0, #8] cmp r0, #0 diff --git a/asm/code_080A29BC.s b/asm/code_080A29BC.s index 63d65add..67edbaa6 100644 --- a/asm/code_080A29BC.s +++ b/asm/code_080A29BC.s @@ -211,7 +211,7 @@ _080A2C04: _080A2C0E: ldrh r5, [r4, #0x32] adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrh r1, [r4, #0x32] lsls r0, r5, #0x10 asrs r0, r0, #0x10 @@ -232,7 +232,7 @@ _080A2C38: .4byte gPlayerEntity _080A2C3C: ldrh r5, [r4, #0x2e] adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrh r1, [r4, #0x2e] lsls r0, r5, #0x10 asrs r0, r0, #0x10 @@ -253,7 +253,7 @@ _080A2C64: .4byte gPlayerEntity _080A2C68: ldrh r5, [r4, #0x32] adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrh r1, [r4, #0x32] lsls r0, r5, #0x10 asrs r0, r0, #0x10 @@ -274,7 +274,7 @@ _080A2C90: .4byte gPlayerEntity _080A2C94: ldrh r5, [r4, #0x2e] adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrh r1, [r4, #0x2e] lsls r0, r5, #0x10 asrs r0, r0, #0x10 diff --git a/asm/code_080A5574.s b/asm/code_080A5574.s index cd023366..e62c568e 100644 --- a/asm/code_080A5574.s +++ b/asm/code_080A5574.s @@ -4234,7 +4234,7 @@ sub_080A6DF8: @ 0x080A6DF8 .align 2, 0 _080A6E14: .4byte gMenu _080A6E18: - bl sub_080791D0 + bl ResetPlayerAnimationAndAction ldr r0, _080A6E3C @ =gPlayerEntity adds r1, r0, #0 adds r1, #0x58 diff --git a/asm/crenalBeanSprout.s b/asm/crenalBeanSprout.s index 19ed952e..8d5406c2 100644 --- a/asm/crenalBeanSprout.s +++ b/asm/crenalBeanSprout.s @@ -643,7 +643,7 @@ _08096802: bl sub_080045D4 strb r0, [r4, #0x15] adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate _0809681C: movs r1, #0x80 lsls r1, r1, #7 diff --git a/asm/crow.s b/asm/crow.s index 58f659f5..eb0bc34a 100644 --- a/asm/crow.s +++ b/asm/crow.s @@ -431,7 +431,7 @@ sub_08032AF4: @ 0x08032AF4 sub_08032B10: @ 0x08032B10 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r1, r4, #0 adds r1, #0x38 movs r0, #3 diff --git a/asm/cuccoAggr.s b/asm/cuccoAggr.s index 612b0979..b835dfb4 100644 --- a/asm/cuccoAggr.s +++ b/asm/cuccoAggr.s @@ -430,7 +430,7 @@ _08038FE0: adds r0, r4, #0 bl sub_080390F8 adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl GetNextFrame b _08039018 @@ -439,7 +439,7 @@ _08038FF4: .4byte 0x0000FFFF _08038FF8: .4byte gPlayerEntity _08038FFC: adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl GetNextFrame adds r0, r4, #0 diff --git a/asm/deathFx.s b/asm/deathFx.s index ef4a1b39..2cd620db 100644 --- a/asm/deathFx.s +++ b/asm/deathFx.s @@ -190,7 +190,7 @@ _0808177E: cmp r0, #0 beq _0808178C adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate _0808178C: pop {r4, pc} .align 2, 0 diff --git a/asm/doubleBookshelf.s b/asm/doubleBookshelf.s index aa06fe22..1fdaa0d4 100644 --- a/asm/doubleBookshelf.s +++ b/asm/doubleBookshelf.s @@ -136,7 +136,7 @@ sub_0809B034: @ 0x0809B034 sub_0809B050: @ 0x0809B050 push {r4, r5, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 strb r0, [r4, #0xe] diff --git a/asm/dust.s b/asm/dust.s index 300a0f74..f4ed6e55 100644 --- a/asm/dust.s +++ b/asm/dust.s @@ -633,7 +633,7 @@ _08044570: bl sub_080045D4 strb r0, [r6, #0x15] adds r0, r6, #0 - bl sub_0806F69C + bl LinearMoveUpdate b _080445BE .align 2, 0 _080445A8: .4byte gPlayerState diff --git a/asm/enemy50.s b/asm/enemy50.s index d43aaafe..a586a922 100644 --- a/asm/enemy50.s +++ b/asm/enemy50.s @@ -1050,7 +1050,7 @@ _08041250: adds r1, #1 strb r0, [r1] adds r0, r2, #0 - bl sub_08016A30 + bl ResolveCollisionLayer adds r6, #2 movs r0, #6 ands r6, r0 @@ -1077,7 +1077,7 @@ _080412C8: adds r0, #0x38 strb r3, [r0] adds r0, r4, #0 - bl sub_08016A30 + bl ResolveCollisionLayer pop {r3, r4, r5} mov r8, r3 mov sb, r4 diff --git a/asm/figurineDevice.s b/asm/figurineDevice.s index 988d7aac..c321c27d 100644 --- a/asm/figurineDevice.s +++ b/asm/figurineDevice.s @@ -167,7 +167,7 @@ _08087CCA: beq _08087D1A movs r0, #0 strb r0, [r1] - bl sub_080791D0 + bl ResetPlayerAnimationAndAction movs r0, #0x5e bl CheckLocalFlag cmp r0, #0 diff --git a/asm/gleerok.s b/asm/gleerok.s index 2ba8ead0..bd9d72e9 100644 --- a/asm/gleerok.s +++ b/asm/gleerok.s @@ -2883,7 +2883,7 @@ _0802E552: lsls r0, r0, #8 strh r0, [r1, #0x24] ldr r0, [r2, #0x3c] - bl sub_0806F69C + bl LinearMoveUpdate movs r6, #0 movs r0, #0x3c add r0, sb diff --git a/asm/gyorgBossObject.s b/asm/gyorgBossObject.s index 99359f15..92dafc65 100644 --- a/asm/gyorgBossObject.s +++ b/asm/gyorgBossObject.s @@ -808,7 +808,7 @@ sub_080A1C04: @ 0x080A1C04 cmp r0, #0 bne _080A1C52 adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl sub_080A1E54 ldrb r0, [r4, #0xf] diff --git a/asm/gyorgChild.s b/asm/gyorgChild.s index c812d0ff..44b4fa64 100644 --- a/asm/gyorgChild.s +++ b/asm/gyorgChild.s @@ -181,7 +181,7 @@ _0804877A: sub_0804877C: @ 0x0804877C push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] cmp r0, #0 beq _080487AA @@ -387,7 +387,7 @@ _08048900: .4byte gPlayerEntity sub_08048904: @ 0x08048904 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl GetNextFrame ldrb r0, [r4, #0x14] diff --git a/asm/lilypadLarge.s b/asm/lilypadLarge.s index 045a9be9..e2e96fc6 100644 --- a/asm/lilypadLarge.s +++ b/asm/lilypadLarge.s @@ -183,7 +183,7 @@ _08085634: cmp r0, #1 bne _08085654 adds r0, r6, #0 - bl sub_0800455E + bl ResetCollisionLayer b _0808565A .align 2, 0 _0808564C: .4byte gPlayerEntity @@ -768,7 +768,7 @@ sub_08085A98: @ 0x08085A98 adds r4, r0, #0 bl sub_08085EFC adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl sub_08085F1C ldr r1, [r4, #0x78] @@ -901,14 +901,14 @@ _08085BAE: b _08085BE8 _08085BB4: adds r0, r5, #0 - bl sub_0800455E + bl ResetCollisionLayer adds r0, r5, #0 bl sub_080002B8 cmp r0, #0xd bne _08085BE8 ldr r4, _08085C50 @ =gPlayerEntity adds r0, r4, #0 - bl sub_0800455E + bl ResetCollisionLayer adds r0, r5, #0 bl sub_08085CDC adds r0, r4, #0 @@ -934,7 +934,7 @@ _08085BE8: cmp r0, #0 bne _08085C58 adds r0, r4, #0 - bl sub_0800455E + bl ResetCollisionLayer adds r0, r5, #0 bl sub_08085F1C movs r0, #1 @@ -988,13 +988,13 @@ sub_08085C5C: @ 0x08085C5C cmp r0, #0 beq _08085CAE adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrh r0, [r4, #0x24] strh r0, [r5, #0x24] ldrb r0, [r4, #0x15] strb r0, [r5, #0x15] adds r0, r5, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldr r2, _08085CA4 @ =gPlayerState ldr r0, [r2, #0x30] movs r1, #2 @@ -1006,7 +1006,7 @@ sub_08085C5C: @ 0x08085C5C cmp r0, #1 bne _08085CA8 adds r0, r5, #0 - bl sub_0800455E + bl ResetCollisionLayer b _08085CAE .align 2, 0 _08085CA0: .4byte gPlayerEntity diff --git a/asm/loadRoomEntity.s b/asm/loadRoomEntity.s index ebb5bc7f..1894e7f4 100644 --- a/asm/loadRoomEntity.s +++ b/asm/loadRoomEntity.s @@ -85,7 +85,7 @@ _0804AE94: _0804AEA0: .4byte gRoomControls _0804AEA4: adds r0, r5, #0 - bl sub_08016A30 + bl ResolveCollisionLayer _0804AEAA: adds r0, r5, #0 _0804AEAC: diff --git a/asm/macroPlayer.s b/asm/macroPlayer.s index d5df62c2..7c8b3e9d 100644 --- a/asm/macroPlayer.s +++ b/asm/macroPlayer.s @@ -304,7 +304,7 @@ sub_0808CD00: @ 0x0808CD00 cmp r0, #0 beq _0808CD24 adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate b _0808CD3E _0808CD24: ldrb r0, [r4, #0xc] @@ -339,7 +339,7 @@ sub_0808CD44: @ 0x0808CD44 cmp r0, #0 beq _0808CD68 adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate b _0808CD82 _0808CD68: ldrb r0, [r4, #0xc] @@ -374,7 +374,7 @@ sub_0808CD88: @ 0x0808CD88 adds r0, r4, #0 bl UpdateAnimationSingleFrame adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r1, #0x2e ldrsh r0, [r4, r1] cmp r0, #0x7f @@ -459,7 +459,7 @@ sub_0808CE38: @ 0x0808CE38 adds r4, r0, #0 bl UpdateAnimationSingleFrame adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r1, #0x32 ldrsh r0, [r4, r1] cmp r0, #0xc7 @@ -485,7 +485,7 @@ sub_0808CE68: @ 0x0808CE68 adds r4, r0, #0 bl UpdateAnimationSingleFrame adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r1, #0x32 ldrsh r0, [r4, r1] cmp r0, #0xc7 @@ -511,7 +511,7 @@ sub_0808CE98: @ 0x0808CE98 adds r4, r0, #0 bl UpdateAnimationSingleFrame adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r0, #0x32 ldrsh r1, [r4, r0] movs r0, #0x90 @@ -532,7 +532,7 @@ sub_0808CEC0: @ 0x0808CEC0 adds r4, r0, #0 bl UpdateAnimationSingleFrame adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r1, #0x32 ldrsh r0, [r4, r1] cmp r0, #0xc7 diff --git a/asm/minecart.s b/asm/minecart.s index 3ed01b8f..c739c521 100644 --- a/asm/minecart.s +++ b/asm/minecart.s @@ -92,7 +92,7 @@ _08091C94: .4byte gPlayerEntity sub_08091C98: @ 0x08091C98 push {r4, r5, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldr r5, _08091CC0 @ =gPlayerEntity adds r0, r4, #0 adds r1, r5, #0 diff --git a/asm/minecartDoor.s b/asm/minecartDoor.s index d75eec45..2d5b9d39 100644 --- a/asm/minecartDoor.s +++ b/asm/minecartDoor.s @@ -160,7 +160,7 @@ _08096BF4: .4byte 0x0000010B sub_08096BF8: @ 0x08096BF8 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 strb r0, [r4, #0xe] @@ -256,7 +256,7 @@ _08096CAE: sub_08096CB0: @ 0x08096CB0 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 strb r0, [r4, #0xe] diff --git a/asm/non_matching/eu/HandlePlayerLife.inc b/asm/non_matching/eu/HandlePlayerLife.inc index bc528d6e..c1f4727b 100644 --- a/asm/non_matching/eu/HandlePlayerLife.inc +++ b/asm/non_matching/eu/HandlePlayerLife.inc @@ -51,7 +51,7 @@ _0801708A: ldrb r0, [r0] cmp r0, #0 bne _080170A4 - bl sub_0807A108 + bl DeleteClones _080170A4: bl sub_08079B24 cmp r0, #0 diff --git a/asm/non_matching/eu/sub_0802AC40.inc b/asm/non_matching/eu/sub_0802AC40.inc index 80e3632d..aac8df27 100644 --- a/asm/non_matching/eu/sub_0802AC40.inc +++ b/asm/non_matching/eu/sub_0802AC40.inc @@ -3,7 +3,7 @@ adds r4, r0, #0 bl GetNextFrame adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r5, r4, #0 adds r5, #0x7a ldrb r0, [r5] diff --git a/asm/non_matching/fallingBoulder/sub_0802C334.inc b/asm/non_matching/fallingBoulder/sub_0802C334.inc index 763973d7..50161c05 100644 --- a/asm/non_matching/fallingBoulder/sub_0802C334.inc +++ b/asm/non_matching/fallingBoulder/sub_0802C334.inc @@ -154,7 +154,7 @@ _0802C442: _0802C45C: .4byte gRoomControls _0802C460: adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r1, #0x36 ldrsh r0, [r4, r1] subs r0, r0, r5 diff --git a/asm/non_matching/itemGustJar/sub_08076F64.inc b/asm/non_matching/itemGustJar/sub_08076F64.inc index dd604ea4..b90cf508 100644 --- a/asm/non_matching/itemGustJar/sub_08076F64.inc +++ b/asm/non_matching/itemGustJar/sub_08076F64.inc @@ -99,7 +99,7 @@ _0807701C: eors r1, r2 strb r1, [r0, #0x15] strh r5, [r0, #0x24] - bl sub_08079E08 + bl UpdatePlayerMovement b _08077110 .align 2, 0 _08077044: .4byte gPlayerState @@ -151,7 +151,7 @@ _0807708C: strb r0, [r2, #0x15] movs r0, #0x80 strh r0, [r2, #0x24] - bl sub_08079E08 + bl UpdatePlayerMovement b _08077110 .align 2, 0 _080770B0: .4byte gPlayerState diff --git a/asm/non_matching/itemMoleMitts/sub_080772A8.inc b/asm/non_matching/itemMoleMitts/sub_080772A8.inc index 4bc2b222..e3424dcf 100644 --- a/asm/non_matching/itemMoleMitts/sub_080772A8.inc +++ b/asm/non_matching/itemMoleMitts/sub_080772A8.inc @@ -73,7 +73,7 @@ _0807732E: ldrsh r0, [r5, r1] cmp r0, #0 beq _08077344 - bl sub_08079E08 + bl UpdatePlayerMovement _08077344: ldrb r1, [r4, #0xe] movs r0, #0x10 diff --git a/asm/non_matching/itemSword/sub_08075900.inc b/asm/non_matching/itemSword/sub_08075900.inc index 1d912115..bf48f659 100644 --- a/asm/non_matching/itemSword/sub_08075900.inc +++ b/asm/non_matching/itemSword/sub_08075900.inc @@ -54,7 +54,7 @@ _08075962: movs r0, #0xc0 lsls r0, r0, #2 strh r0, [r4, #0x24] - bl sub_08079E08 + bl UpdatePlayerMovement ldr r0, _08075994 @ =gScreenTransition ldr r0, [r0] movs r1, #3 diff --git a/asm/non_matching/mazaal/sub_0803473C.inc b/asm/non_matching/mazaal/sub_0803473C.inc index 2858af55..107ac518 100644 --- a/asm/non_matching/mazaal/sub_0803473C.inc +++ b/asm/non_matching/mazaal/sub_0803473C.inc @@ -59,7 +59,7 @@ _08034798: _080347A8: strb r0, [r3, #0x15] adds r0, r3, #0 - bl sub_0806F69C + bl LinearMoveUpdate _080347B0: pop {r4, r5, pc} .align 2, 0 diff --git a/asm/non_matching/mazaal/sub_080347B4.inc b/asm/non_matching/mazaal/sub_080347B4.inc index 08fd61a6..8010cb32 100644 --- a/asm/non_matching/mazaal/sub_080347B4.inc +++ b/asm/non_matching/mazaal/sub_080347B4.inc @@ -33,7 +33,7 @@ _080347E0: _080347F0: strb r0, [r2, #0x15] adds r0, r2, #0 - bl sub_0806F69C + bl LinearMoveUpdate _080347F8: pop {r4, r5, pc} .align 2, 0 diff --git a/asm/non_matching/mazaal/sub_0803AA98.inc b/asm/non_matching/mazaal/sub_0803AA98.inc index fa5339dc..14470538 100644 --- a/asm/non_matching/mazaal/sub_0803AA98.inc +++ b/asm/non_matching/mazaal/sub_0803AA98.inc @@ -24,7 +24,7 @@ cmp r0, #0 bne _0803AB0A adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl sub_0803B6F4 cmp r0, #0 diff --git a/asm/non_matching/player/PlayerNormal.inc b/asm/non_matching/player/PlayerNormal.inc index 514075d5..ed25e815 100644 --- a/asm/non_matching/player/PlayerNormal.inc +++ b/asm/non_matching/player/PlayerNormal.inc @@ -91,7 +91,7 @@ _08070842: ands r4, r1 cmp r4, #0 beq _08070852 - bl sub_08079938 + bl ResolvePlayerAnimation b _08070BE4 _08070852: adds r0, r5, #0 @@ -320,7 +320,7 @@ _08070A26: b _08070BE4 _08070A32: adds r0, r5, #0 - bl sub_08073904 + bl DoJump bl RunQueuedAction cmp r0, #0 beq _08070A42 @@ -357,7 +357,7 @@ _08070A7C: movs r0, #0xff strb r0, [r5, #0x15] _08070A80: - bl sub_08079E08 + bl UpdatePlayerMovement adds r0, r5, #0 adds r0, #0x5a ldrb r1, [r0] @@ -465,7 +465,7 @@ _08070B1E: lsls r0, r0, #2 strb r0, [r5, #0x15] _08070B52: - bl sub_0807A108 + bl DeleteClones _08070B56: movs r4, #0 ldr r3, _08070BB8 @ =gPlayerState diff --git a/asm/non_matching/player/sub_08070DC4.inc b/asm/non_matching/player/sub_08070DC4.inc index 8d544d6b..fccb1712 100644 --- a/asm/non_matching/player/sub_08070DC4.inc +++ b/asm/non_matching/player/sub_08070DC4.inc @@ -4,7 +4,7 @@ bl UpdateAnimationSingleFrame adds r0, r4, #0 bl sub_080085B0 - bl sub_08079E08 + bl UpdatePlayerMovement bl UpdateFloorType bl RunQueuedAction cmp r0, #0 @@ -31,7 +31,7 @@ beq _08070E1C _08070E10: strb r5, [r6, #2] - bl sub_080791D0 + bl ResetPlayerAnimationAndAction b _08070E76 .align 2, 0 _08070E18: .4byte gPlayerState @@ -60,8 +60,8 @@ _08070E32: beq _08070E56 movs r0, #7 strb r0, [r6, #0x11] - bl sub_08079938 - bl sub_080791BC + bl ResolvePlayerAnimation + bl SetPlayerActionNormal b _08070E76 _08070E56: movs r0, #1 diff --git a/asm/non_matching/player/sub_08072D54.inc b/asm/non_matching/player/sub_08072D54.inc index 74485d74..30ab4d8d 100644 --- a/asm/non_matching/player/sub_08072D54.inc +++ b/asm/non_matching/player/sub_08072D54.inc @@ -11,7 +11,7 @@ cmp r0, #0 beq _08072D7A adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 b _08072E80 @@ -140,10 +140,10 @@ _08072E6C: cmp r0, #0 beq _08072E7A adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate b _08072E7E _08072E7A: - bl sub_08079E08 + bl UpdatePlayerMovement _08072E7E: movs r0, #0 _08072E80: @@ -164,7 +164,7 @@ _08072E80: cmp r0, #1 bne _08072EAA adds r0, r4, #0 - bl sub_0800455E + bl ResetCollisionLayer b _08072EB0 _08072EAA: adds r0, r4, #0 @@ -187,7 +187,7 @@ _08072EB0: ands r0, r1 cmp r0, #0 bne _08072F10 - bl sub_080791BC + bl SetPlayerActionNormal b _08072F10 .align 2, 0 _08072EDC: .4byte gPlayerState diff --git a/asm/non_matching/player/sub_08073584.inc b/asm/non_matching/player/sub_08073584.inc index 43ee516b..caf4909f 100644 --- a/asm/non_matching/player/sub_08073584.inc +++ b/asm/non_matching/player/sub_08073584.inc @@ -36,7 +36,7 @@ _080735C0: strb r1, [r6, #2] bl sub_0807921C adds r0, r4, #0 - bl sub_08073904 + bl DoJump movs r0, #0xe6 lsls r0, r0, #3 strh r0, [r6, #8] @@ -114,7 +114,7 @@ _0807365A: movs r1, #0x1f ands r0, r1 strb r0, [r4, #0x15] - bl sub_08079E08 + bl UpdatePlayerMovement ldrb r2, [r4, #0x14] lsls r3, r2, #2 ldrb r1, [r4, #0x15] diff --git a/asm/non_matching/player/sub_080740D8.inc b/asm/non_matching/player/sub_080740D8.inc index f24b687f..7c4c6ca7 100644 --- a/asm/non_matching/player/sub_080740D8.inc +++ b/asm/non_matching/player/sub_080740D8.inc @@ -102,7 +102,7 @@ _0807418C: cmp r0, #0 beq _080741AC adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate b _080741B0 .align 2, 0 _080741A4: .4byte gRoomControls diff --git a/asm/non_matching/playerItem11/sub_08018E68.inc b/asm/non_matching/playerItem11/sub_08018E68.inc index 7918577b..d11fff26 100644 --- a/asm/non_matching/playerItem11/sub_08018E68.inc +++ b/asm/non_matching/playerItem11/sub_08018E68.inc @@ -38,7 +38,7 @@ _08018EA8: cmp r0, #0xff beq _08018F46 adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0x15] cmp r0, #8 beq _08018EEA diff --git a/asm/non_matching/playerItem12/sub_080701F8.inc b/asm/non_matching/playerItem12/sub_080701F8.inc index 5ac6540b..1f1bd2bc 100644 --- a/asm/non_matching/playerItem12/sub_080701F8.inc +++ b/asm/non_matching/playerItem12/sub_080701F8.inc @@ -57,7 +57,7 @@ _08070268: adds r0, r5, #0 bl GetNextFrame adds r0, r5, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r5, #0xa] cmp r0, #0 bne _08070280 diff --git a/asm/non_matching/playerItem13/sub_080AD040.inc b/asm/non_matching/playerItem13/sub_080AD040.inc index 01a96f6c..21e62945 100644 --- a/asm/non_matching/playerItem13/sub_080AD040.inc +++ b/asm/non_matching/playerItem13/sub_080AD040.inc @@ -54,7 +54,7 @@ _080AD088: cmp r0, #0x74 bne _080AD0B4 adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate b _080AD0C8 .align 2, 0 _080AD0B0: .4byte gUnk_081320C4 diff --git a/asm/non_matching/playerItem15/sub_080A310C.inc b/asm/non_matching/playerItem15/sub_080A310C.inc index 0af22d2f..933b90b7 100644 --- a/asm/non_matching/playerItem15/sub_080A310C.inc +++ b/asm/non_matching/playerItem15/sub_080A310C.inc @@ -26,7 +26,7 @@ _080A312A: adds r0, r4, #0 bl GetNextFrame adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] adds r0, #1 strb r0, [r4, #0xe] diff --git a/asm/non_matching/playerItem3/sub_0801B680.inc b/asm/non_matching/playerItem3/sub_0801B680.inc index 71d17694..5cf602dc 100644 --- a/asm/non_matching/playerItem3/sub_0801B680.inc +++ b/asm/non_matching/playerItem3/sub_0801B680.inc @@ -48,7 +48,7 @@ _0801B6D0: strb r0, [r4, #0x15] _0801B6DC: adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r5, #0 adds r0, r4, #0 bl sub_0801B864 diff --git a/asm/non_matching/playerItemBow/sub_0801917C.inc b/asm/non_matching/playerItemBow/sub_0801917C.inc index da662d59..dc12b7ec 100644 --- a/asm/non_matching/playerItemBow/sub_0801917C.inc +++ b/asm/non_matching/playerItemBow/sub_0801917C.inc @@ -31,7 +31,7 @@ _0801919C: strb r0, [r4, #0x18] _080191BA: adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 adds r0, #0x40 ldrb r1, [r0] diff --git a/asm/object10.s b/asm/object10.s index 33333b8e..f1f00979 100644 --- a/asm/object10.s +++ b/asm/object10.s @@ -369,7 +369,7 @@ _08084AEA: .align 2, 0 _08084AF4: .4byte gPlayerState _08084AF8: - bl sub_0807A108 + bl DeleteClones adds r0, r4, #0 movs r1, #0x30 movs r2, #0 diff --git a/asm/object12.s b/asm/object12.s index 5f2806a3..dfdb643b 100644 --- a/asm/object12.s +++ b/asm/object12.s @@ -159,7 +159,7 @@ _080850C8: sub_080850CC: @ 0x080850CC push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 strb r0, [r4, #0xe] diff --git a/asm/object20.s b/asm/object20.s index 526b9cd8..976e6cc7 100644 --- a/asm/object20.s +++ b/asm/object20.s @@ -29,7 +29,7 @@ sub_08087824: @ 0x08087824 cmp r0, #0 bne _08087836 adds r0, r4, #0 - bl sub_08016A30 + bl ResolveCollisionLayer _08087836: movs r0, #1 strb r0, [r4, #0xc] diff --git a/asm/object21.s b/asm/object21.s index d5afeabd..04c5a1ea 100644 --- a/asm/object21.s +++ b/asm/object21.s @@ -53,7 +53,7 @@ _080879EA: cmp r0, #0 beq _08087A0C adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrh r1, [r4, #0x24] movs r2, #0x24 ldrsh r0, [r4, r2] diff --git a/asm/object35.s b/asm/object35.s index 746cf2e4..2b270948 100644 --- a/asm/object35.s +++ b/asm/object35.s @@ -230,7 +230,7 @@ _0808BA0C: .4byte 0x0000010B sub_0808BA10: @ 0x0808BA10 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 strb r0, [r4, #0xe] @@ -281,7 +281,7 @@ _0808BA68: sub_0808BA6C: @ 0x0808BA6C push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 strb r0, [r4, #0xe] diff --git a/asm/object36.s b/asm/object36.s index e69c9b90..5c47e400 100644 --- a/asm/object36.s +++ b/asm/object36.s @@ -289,7 +289,7 @@ _0808BD34: bl GetFacingDirection strb r0, [r5, #0x15] adds r0, r5, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r0, #0x2e ldrsh r1, [r4, r0] movs r0, #0x32 diff --git a/asm/object43.s b/asm/object43.s index 55392ea6..7ad10e72 100644 --- a/asm/object43.s +++ b/asm/object43.s @@ -364,7 +364,7 @@ _0808E162: strb r0, [r4, #0x15] _0808E17A: adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xb] cmp r0, #0 bne _0808E1BA diff --git a/asm/object4B.s b/asm/object4B.s index b66012b4..e9c65140 100644 --- a/asm/object4B.s +++ b/asm/object4B.s @@ -137,7 +137,7 @@ sub_0808F858: @ 0x0808F858 cmp r0, #0 beq _0808F884 adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r1, #0x80 lsls r1, r1, #6 adds r0, r4, #0 diff --git a/asm/object64.s b/asm/object64.s index ab77b6f9..ca27ad31 100644 --- a/asm/object64.s +++ b/asm/object64.s @@ -43,7 +43,7 @@ sub_08093E3C: @ 0x08093E3C cmp r0, #0 bne _08093E6A adds r0, r4, #0 - bl sub_08016A30 + bl ResolveCollisionLayer _08093E6A: ldrb r1, [r4, #0xa] adds r0, r4, #0 diff --git a/asm/object67.s b/asm/object67.s index fe69518b..70e92552 100644 --- a/asm/object67.s +++ b/asm/object67.s @@ -337,7 +337,7 @@ _080943A8: adds r0, r4, #0 bl GetNextFrame adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r1, #0x80 lsls r1, r1, #7 adds r0, r4, #0 diff --git a/asm/object79.s b/asm/object79.s index 579a16d0..1ff61a07 100644 --- a/asm/object79.s +++ b/asm/object79.s @@ -243,7 +243,7 @@ sub_08098130: @ 0x08098130 ldrh r0, [r0] strh r0, [r4, #0x24] adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldr r0, [r4, #0x30] ldr r1, _08098164 @ =0xFFEC0000 adds r0, r0, r1 diff --git a/asm/object91.s b/asm/object91.s index 5a32bd05..6c4c5fba 100644 --- a/asm/object91.s +++ b/asm/object91.s @@ -933,7 +933,7 @@ _0809CAC4: sub_0809CAC8: @ 0x0809CAC8 push {r4, r5, lr} adds r5, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldr r2, _0809CB3C @ =gRoomControls ldrh r0, [r2, #8] movs r1, #0xe4 diff --git a/asm/object96.s b/asm/object96.s index 4cc9016a..5fb797f2 100644 --- a/asm/object96.s +++ b/asm/object96.s @@ -125,7 +125,7 @@ sub_0809D860: @ 0x0809D860 push {r4, r5, r6, lr} adds r5, r0, #0 adds r6, r1, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldr r1, [r6, #0x14] adds r0, r5, #0 bl sub_080044EC diff --git a/asm/object97.s b/asm/object97.s index cc0b3c10..65f2f74a 100644 --- a/asm/object97.s +++ b/asm/object97.s @@ -330,7 +330,7 @@ sub_0809DBE4: @ 0x0809DBE4 sub_0809DC14: @ 0x0809DC14 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate movs r1, #0x80 lsls r1, r1, #6 adds r0, r4, #0 @@ -1099,7 +1099,7 @@ sub_0809E1F0: @ 0x0809E1F0 strh r2, [r1, #0x24] _0809E208: adds r0, r1, #0 - bl sub_0806F69C + bl LinearMoveUpdate pop {pc} thumb_func_start sub_0809E210 diff --git a/asm/object98.s b/asm/object98.s index 5732bd0b..97ecdf3b 100644 --- a/asm/object98.s +++ b/asm/object98.s @@ -109,7 +109,7 @@ sub_0809E3E4: @ 0x0809E3E4 cmp r0, #0 bne _0809E40E adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate _0809E40E: adds r2, r4, #0 adds r2, #0x74 diff --git a/asm/objectBlockingStairs.s b/asm/objectBlockingStairs.s index 590f7e5c..f7cc26f1 100644 --- a/asm/objectBlockingStairs.s +++ b/asm/objectBlockingStairs.s @@ -351,7 +351,7 @@ sub_08093178: @ 0x08093178 adds r4, r0, #0 bl sub_0800445C adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 strb r0, [r4, #0xe] @@ -501,7 +501,7 @@ sub_08093280: @ 0x08093280 adds r4, r0, #0 bl sub_0800445C adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 strb r0, [r4, #0xe] diff --git a/asm/objectOnPillar.s b/asm/objectOnPillar.s index 64542d7e..7b0fe216 100644 --- a/asm/objectOnPillar.s +++ b/asm/objectOnPillar.s @@ -442,7 +442,7 @@ _08097140: .4byte 0x00004036 sub_08097144: @ 0x08097144 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl sub_0800445C adds r0, r4, #0 diff --git a/asm/pullableLever.s b/asm/pullableLever.s index ff888fe0..ac64c6b9 100644 --- a/asm/pullableLever.s +++ b/asm/pullableLever.s @@ -187,7 +187,7 @@ sub_08091338: @ 0x08091338 lsls r0, r0, #3 strb r0, [r4, #0x15] adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl sub_08091660 _0809135C: diff --git a/asm/pullableMushroom.s b/asm/pullableMushroom.s index 5a2e5078..4715c361 100644 --- a/asm/pullableMushroom.s +++ b/asm/pullableMushroom.s @@ -517,7 +517,7 @@ _0808ADE2: lsls r0, r0, #3 strh r0, [r1, #0x24] ldr r0, [r4, #0x54] - bl sub_0806F69C + bl LinearMoveUpdate _0808ADEE: pop {r4, pc} @@ -964,7 +964,7 @@ _0808B154: cmp r7, #0x3f bhi _0808B162 adds r0, r5, #0 - bl sub_0806F69C + bl LinearMoveUpdate _0808B162: add sp, #0x88 pop {r4, r5, r6, r7, pc} diff --git a/asm/pushableFurniture.s b/asm/pushableFurniture.s index 263df8cd..4cfdc962 100644 --- a/asm/pushableFurniture.s +++ b/asm/pushableFurniture.s @@ -408,7 +408,7 @@ _0808FC58: sub_0808FC5C: @ 0x0808FC5C push {r4, r5, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r4, #0xe] subs r0, #1 strb r0, [r4, #0xe] diff --git a/asm/pushableGrave.s b/asm/pushableGrave.s index 8cf7c13b..4950b2fe 100644 --- a/asm/pushableGrave.s +++ b/asm/pushableGrave.s @@ -280,7 +280,7 @@ sub_080977A0: @ 0x080977A0 subs r0, #1 strb r0, [r4, #0xe] adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl sub_0800445C b _080977E4 diff --git a/asm/pushableRock.s b/asm/pushableRock.s index 2cf721cd..d5aa685a 100644 --- a/asm/pushableRock.s +++ b/asm/pushableRock.s @@ -146,7 +146,7 @@ sub_0808A5E0: @ 0x0808A5E0 ldrh r0, [r0] strh r0, [r4, #0x24] adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl GetNextFrame ldrb r1, [r5] diff --git a/asm/pushableStatue.s b/asm/pushableStatue.s index efd6cdfa..4a775bf4 100644 --- a/asm/pushableStatue.s +++ b/asm/pushableStatue.s @@ -525,7 +525,7 @@ _080895BC: .4byte gUnk_080B4488 sub_080895C0: @ 0x080895C0 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r1, r4, #0 adds r1, #0x86 ldrh r0, [r1] diff --git a/asm/specialFx.s b/asm/specialFx.s index 76ae6dfc..5a0f7a1b 100644 --- a/asm/specialFx.s +++ b/asm/specialFx.s @@ -46,7 +46,7 @@ sub_080844E0: @ 0x080844E0 cmp r0, #0 bne _08084516 adds r0, r5, #0 - bl sub_08016A30 + bl ResolveCollisionLayer _08084516: ldrb r0, [r5, #0xa] cmp r0, #0x20 @@ -187,7 +187,7 @@ sub_080845F8: @ 0x080845F8 lsrs r0, r0, #3 strb r0, [r4, #0x15] adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate _08084626: adds r0, r4, #0 bl sub_08084630 @@ -283,7 +283,7 @@ sub_080846B0: @ 0x080846B0 strh r0, [r4, #0x24] _080846CA: adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl sub_080845DC b _08084718 @@ -434,7 +434,7 @@ _080847CC: .4byte 0xFFFFE000 sub_080847D0: @ 0x080847D0 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r0, r4, #0 bl sub_080845DC pop {r4, pc} diff --git a/asm/steam.s b/asm/steam.s index bb80c5e1..24189987 100644 --- a/asm/steam.s +++ b/asm/steam.s @@ -43,7 +43,7 @@ Steam: @ 0x08098168 movs r0, #2 strb r0, [r1] adds r0, r4, #0 - bl sub_08016A30 + bl ResolveCollisionLayer ldr r1, _080981CC @ =gScreen adds r2, r1, #0 adds r2, #0x66 diff --git a/asm/takkuri.s b/asm/takkuri.s index c8b490ae..bc917409 100644 --- a/asm/takkuri.s +++ b/asm/takkuri.s @@ -522,7 +522,7 @@ sub_0803BF2C: @ 0x0803BF2C sub_0803BF48: @ 0x0803BF48 push {r4, lr} adds r4, r0, #0 - bl sub_0806F69C + bl LinearMoveUpdate adds r1, r4, #0 adds r1, #0x38 movs r0, #3 diff --git a/asm/whirlwind.s b/asm/whirlwind.s index 5babbd3a..fe9c3966 100644 --- a/asm/whirlwind.s +++ b/asm/whirlwind.s @@ -261,7 +261,7 @@ sub_08092E94: @ 0x08092E94 cmp r0, #0 bne _08092ECE adds r0, r4, #0 - bl sub_0800455E + bl ResetCollisionLayer ldrb r2, [r4, #0x1b] movs r1, #0x3f adds r0, r1, #0 diff --git a/asm/wizzrobeWind.s b/asm/wizzrobeWind.s index 2fef5564..7b9f89af 100644 --- a/asm/wizzrobeWind.s +++ b/asm/wizzrobeWind.s @@ -711,7 +711,7 @@ _0802FA02: cmp r0, #0 beq _0802FA3E adds r0, r4, #0 - bl sub_0806F69C + bl LinearMoveUpdate ldrb r0, [r6] cmp r0, #0 bne _0802FA3E diff --git a/data/scripts/cloudTops/script_PlayerAtSiroc.inc b/data/scripts/cloudTops/script_PlayerAtSiroc.inc index ceeed89f..ebdfb81b 100644 --- a/data/scripts/cloudTops/script_PlayerAtSiroc.inc +++ b/data/scripts/cloudTops/script_PlayerAtSiroc.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerAtSiroc SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/ezlo/script_EzloCap.inc b/data/scripts/cutscene/ezlo/script_EzloCap.inc index f13702bc..3f2c786c 100644 --- a/data/scripts/cutscene/ezlo/script_EzloCap.inc +++ b/data/scripts/cutscene/ezlo/script_EzloCap.inc @@ -74,7 +74,7 @@ script_08012824: SetPlayerIdle _0807E9DC CallWithArg sub_0807F5B0, 0x0000003c - Call sub_080791D0 + Call ResetPlayerAnimationAndAction EndBlock SetSyncFlag 0x00000008 WaitForSyncFlagAndClear 0x00000004 diff --git a/data/scripts/cutscene/ezlo/script_Npc4EEzloCutscene.inc b/data/scripts/cutscene/ezlo/script_Npc4EEzloCutscene.inc index f9350061..fa6ae96d 100644 --- a/data/scripts/cutscene/ezlo/script_Npc4EEzloCutscene.inc +++ b/data/scripts/cutscene/ezlo/script_Npc4EEzloCutscene.inc @@ -18,7 +18,7 @@ script_0801248A: _0807E80C 0x00000000 WaitForFadeFinish _0807E858 0x0000 - Call sub_080791BC + Call SetPlayerActionNormal LoadRoomEntityList gUnk_080F4D70 Call DeleteAllEnemies SetEntityPositionRelative 0x0388, 0x0168 diff --git a/data/scripts/cutscene/ezlo/script_PlayerDefeatedOctoroks.inc b/data/scripts/cutscene/ezlo/script_PlayerDefeatedOctoroks.inc index 017b7111..eaa33a4c 100644 --- a/data/scripts/cutscene/ezlo/script_PlayerDefeatedOctoroks.inc +++ b/data/scripts/cutscene/ezlo/script_PlayerDefeatedOctoroks.inc @@ -8,5 +8,5 @@ SCRIPT_START script_PlayerDefeatedOctoroks SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/ezlo/script_PlayerEzloBeingBullied.inc b/data/scripts/cutscene/ezlo/script_PlayerEzloBeingBullied.inc index 1082a4b1..33310752 100644 --- a/data/scripts/cutscene/ezlo/script_PlayerEzloBeingBullied.inc +++ b/data/scripts/cutscene/ezlo/script_PlayerEzloBeingBullied.inc @@ -8,6 +8,6 @@ SCRIPT_START script_PlayerEzloBeingBullied DoPostScriptAction 0x0004 Wait 0x003c SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/ezlo/script_PlayerGetEzloCap.inc b/data/scripts/cutscene/ezlo/script_PlayerGetEzloCap.inc index 545b7a6c..90acd24f 100644 --- a/data/scripts/cutscene/ezlo/script_PlayerGetEzloCap.inc +++ b/data/scripts/cutscene/ezlo/script_PlayerGetEzloCap.inc @@ -1,5 +1,5 @@ @ Get Ezlo cap Player SCRIPT_START script_PlayerGetEzloCap DoPostScriptAction 0x0015 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/intro/script_PlayerIntro.inc b/data/scripts/cutscene/intro/script_PlayerIntro.inc index 5f06f18e..33520235 100644 --- a/data/scripts/cutscene/intro/script_PlayerIntro.inc +++ b/data/scripts/cutscene/intro/script_PlayerIntro.inc @@ -20,5 +20,5 @@ SCRIPT_START script_PlayerIntro Call sub_08053250 EnablePlayerControl Call sub_0807DF50 - Call sub_080791D0 + Call ResetPlayerAnimationAndAction SCRIPT_END diff --git a/data/scripts/cutscene/intro/script_ZeldaTalkToSmith.inc b/data/scripts/cutscene/intro/script_ZeldaTalkToSmith.inc index 31780509..021ce626 100644 --- a/data/scripts/cutscene/intro/script_ZeldaTalkToSmith.inc +++ b/data/scripts/cutscene/intro/script_ZeldaTalkToSmith.inc @@ -34,7 +34,7 @@ SCRIPT_START script_ZeldaTalkToSmith BeginBlock SetGlobalFlag 0x0013 Call sub_0807DF50 - Call sub_080791D0 + Call ResetPlayerAnimationAndAction EnablePlayerControl EndBlock SCRIPT_END diff --git a/data/scripts/cutscene/introAssembly/script_PlayerEnters.inc b/data/scripts/cutscene/introAssembly/script_PlayerEnters.inc index b5bf75ce..daa91183 100644 --- a/data/scripts/cutscene/introAssembly/script_PlayerEnters.inc +++ b/data/scripts/cutscene/introAssembly/script_PlayerEnters.inc @@ -15,6 +15,6 @@ SCRIPT_START script_PlayerEnters DoPostScriptAction 0x0000 Wait 0x000f SetSyncFlag 0x00000020 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/introAssembly/script_PlayerGetSword.inc b/data/scripts/cutscene/introAssembly/script_PlayerGetSword.inc index e2fd2766..009478ee 100644 --- a/data/scripts/cutscene/introAssembly/script_PlayerGetSword.inc +++ b/data/scripts/cutscene/introAssembly/script_PlayerGetSword.inc @@ -8,6 +8,6 @@ SCRIPT_START script_PlayerGetSword MessageFromTargetPos 0x0501, 0x000e WaitUntilTextboxCloses SetSyncFlag 0x00000020 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/introAssembly/script_PlayerWakingUpInHyruleCastle.inc b/data/scripts/cutscene/introAssembly/script_PlayerWakingUpInHyruleCastle.inc index 862275c2..79078065 100644 --- a/data/scripts/cutscene/introAssembly/script_PlayerWakingUpInHyruleCastle.inc +++ b/data/scripts/cutscene/introAssembly/script_PlayerWakingUpInHyruleCastle.inc @@ -29,5 +29,5 @@ script_08009EA4: Call sub_08053250 EnablePlayerControl Call sub_0807DF50 - Call sub_080791D0 + Call ResetPlayerAnimationAndAction SCRIPT_END diff --git a/data/scripts/cutscene/introBusinessScrub/script_PlayerAtIntroBusinessScrub4.inc b/data/scripts/cutscene/introBusinessScrub/script_PlayerAtIntroBusinessScrub4.inc index 605ee80e..8e4e4823 100644 --- a/data/scripts/cutscene/introBusinessScrub/script_PlayerAtIntroBusinessScrub4.inc +++ b/data/scripts/cutscene/introBusinessScrub/script_PlayerAtIntroBusinessScrub4.inc @@ -6,6 +6,6 @@ SCRIPT_START script_PlayerAtIntroBusinessScrub4 SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000004 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub1.inc b/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub1.inc index 36e3e08b..f5475ac2 100644 --- a/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub1.inc +++ b/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub1.inc @@ -5,5 +5,5 @@ SCRIPT_START script_PlayerIntroBusinessScrub1 SetAnimationState 0x0002 DoPostScriptAction 0x0000 SetSyncFlag 0x00000010 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub2.inc b/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub2.inc index d5c30e2a..3f6979a5 100644 --- a/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub2.inc +++ b/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub2.inc @@ -5,5 +5,5 @@ SCRIPT_START script_PlayerIntroBusinessScrub2 SetAnimationState 0x0002 DoPostScriptAction 0x0000 SetSyncFlag 0x00000010 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub3.inc b/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub3.inc index deea175d..b9ea15ff 100644 --- a/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub3.inc +++ b/data/scripts/cutscene/introBusinessScrub/script_PlayerIntroBusinessScrub3.inc @@ -5,5 +5,5 @@ SCRIPT_START script_PlayerIntroBusinessScrub3 SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000010 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introCeremony/script_Npc4EMonsters.inc b/data/scripts/cutscene/introCeremony/script_Npc4EMonsters.inc index 4385bb7b..0e733e50 100644 --- a/data/scripts/cutscene/introCeremony/script_Npc4EMonsters.inc +++ b/data/scripts/cutscene/introCeremony/script_Npc4EMonsters.inc @@ -28,7 +28,7 @@ SCRIPT_START script_Npc4EMonsters CallWithArg DeleteManager36, 0x00000002 _0807F0C8 0x0000, 0x0000 Call sub_0806DC3C - Call sub_080791BC + Call SetPlayerActionNormal CallWithArg EquipItem, 0x0000000d CallWithArg sub_0807F29C, gUnk_080049F6 _0807F0B4 0x0001 diff --git a/data/scripts/cutscene/introCeremony/script_Npc4EVaatiAttacking.inc b/data/scripts/cutscene/introCeremony/script_Npc4EVaatiAttacking.inc index 54bd0c43..c969f3bb 100644 --- a/data/scripts/cutscene/introCeremony/script_Npc4EVaatiAttacking.inc +++ b/data/scripts/cutscene/introCeremony/script_Npc4EVaatiAttacking.inc @@ -8,7 +8,7 @@ SCRIPT_START script_Npc4EVaatiAttacking MessageFromTargetPos 0x1047, 0x0000 WaitUntilTextboxCloses Call sub_0806DC3C - Call sub_080791BC + Call SetPlayerActionNormal CallWithArg EquipItem, 0x0000000d CallWithArg sub_0807F29C, gUnk_080049F6 Wait 0x001e diff --git a/data/scripts/cutscene/introCeremony/script_PlayerAtIntroCeremony.inc b/data/scripts/cutscene/introCeremony/script_PlayerAtIntroCeremony.inc index 33d0784c..b48339a3 100644 --- a/data/scripts/cutscene/introCeremony/script_PlayerAtIntroCeremony.inc +++ b/data/scripts/cutscene/introCeremony/script_PlayerAtIntroCeremony.inc @@ -6,5 +6,5 @@ SCRIPT_START script_PlayerAtIntroCeremony SetSyncFlag 0x00000400 ClearSyncFlag 0x00000002 EndBlock - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introCeremony/script_PlayerFainting.inc b/data/scripts/cutscene/introCeremony/script_PlayerFainting.inc index 880c2d9e..8e0ae500 100644 --- a/data/scripts/cutscene/introCeremony/script_PlayerFainting.inc +++ b/data/scripts/cutscene/introCeremony/script_PlayerFainting.inc @@ -13,5 +13,5 @@ SCRIPT_START script_PlayerFainting EndBlock Call WaitForFrameHiBit WaitForSyncFlag 0x80000000 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introCeremony/script_PlayerIntroCastle.inc b/data/scripts/cutscene/introCeremony/script_PlayerIntroCastle.inc index 78be94a1..124fe933 100644 --- a/data/scripts/cutscene/introCeremony/script_PlayerIntroCastle.inc +++ b/data/scripts/cutscene/introCeremony/script_PlayerIntroCastle.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerIntroCastle SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000400 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introCeremony/script_PlayerProtectingZelda.inc b/data/scripts/cutscene/introCeremony/script_PlayerProtectingZelda.inc index dc4e414f..13efecf9 100644 --- a/data/scripts/cutscene/introCeremony/script_PlayerProtectingZelda.inc +++ b/data/scripts/cutscene/introCeremony/script_PlayerProtectingZelda.inc @@ -9,5 +9,5 @@ SCRIPT_START script_PlayerProtectingZelda SetAnimationState 0x0004 DoPostScriptAction 0x0000 SetSyncFlag 0x00000400 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introTown/script_Npc4EIntroTown.inc b/data/scripts/cutscene/introTown/script_Npc4EIntroTown.inc index 409387ac..1b23ef0d 100644 --- a/data/scripts/cutscene/introTown/script_Npc4EIntroTown.inc +++ b/data/scripts/cutscene/introTown/script_Npc4EIntroTown.inc @@ -160,7 +160,7 @@ SCRIPT_START script_Npc4EIntroTown GivePlayerItem 0x000d WaitPlayerGetItem Call sub_0806DC3C - Call sub_080791BC + Call SetPlayerActionNormal CallWithArg EquipItem, 0x0000000d SetIntVariable 0x000000ff Call sub_0807F5B0 diff --git a/data/scripts/cutscene/introTown/script_PlayerIntro1.inc b/data/scripts/cutscene/introTown/script_PlayerIntro1.inc index d5a09109..ea5c12ce 100644 --- a/data/scripts/cutscene/introTown/script_PlayerIntro1.inc +++ b/data/scripts/cutscene/introTown/script_PlayerIntro1.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerIntro1 SetAnimationState 0x0006 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introTown/script_PlayerIntro2.inc b/data/scripts/cutscene/introTown/script_PlayerIntro2.inc index 986893df..02058ebd 100644 --- a/data/scripts/cutscene/introTown/script_PlayerIntro2.inc +++ b/data/scripts/cutscene/introTown/script_PlayerIntro2.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerIntro2 SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introTown/script_PlayerIntro3.inc b/data/scripts/cutscene/introTown/script_PlayerIntro3.inc index d2eda272..2ee42514 100644 --- a/data/scripts/cutscene/introTown/script_PlayerIntro3.inc +++ b/data/scripts/cutscene/introTown/script_PlayerIntro3.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerIntro3 SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introTown/script_PlayerIntro4.inc b/data/scripts/cutscene/introTown/script_PlayerIntro4.inc index 33307f8c..ad1b34dd 100644 --- a/data/scripts/cutscene/introTown/script_PlayerIntro4.inc +++ b/data/scripts/cutscene/introTown/script_PlayerIntro4.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerIntro4 SetAnimationState 0x0002 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introTown/script_PlayerIntro5.inc b/data/scripts/cutscene/introTown/script_PlayerIntro5.inc index e90538d7..f1393d94 100644 --- a/data/scripts/cutscene/introTown/script_PlayerIntro5.inc +++ b/data/scripts/cutscene/introTown/script_PlayerIntro5.inc @@ -14,5 +14,5 @@ script_0800FB10: SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/introTown/script_PlayerIntroTown.inc b/data/scripts/cutscene/introTown/script_PlayerIntroTown.inc index 453e2bbe..7457da40 100644 --- a/data/scripts/cutscene/introTown/script_PlayerIntroTown.inc +++ b/data/scripts/cutscene/introTown/script_PlayerIntroTown.inc @@ -5,6 +5,6 @@ SCRIPT_START script_PlayerIntroTown SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000008 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/kinstones/script_PlayerAtFirstKinstone.inc b/data/scripts/cutscene/kinstones/script_PlayerAtFirstKinstone.inc index 58479b51..937cf7a9 100644 --- a/data/scripts/cutscene/kinstones/script_PlayerAtFirstKinstone.inc +++ b/data/scripts/cutscene/kinstones/script_PlayerAtFirstKinstone.inc @@ -12,5 +12,5 @@ SCRIPT_START script_PlayerAtFirstKinstone SetAnimationState 0x0006 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone1.inc b/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone1.inc index 7d7223dc..253d7131 100644 --- a/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone1.inc +++ b/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone1.inc @@ -3,6 +3,6 @@ SCRIPT_START script_PlayerAtHurdyGurdyManFirstKinstone1 SetEntitySpeed 0x0100 WalkEast 0x0008 SetSyncFlag 0x00000400 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone2.inc b/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone2.inc index 86076092..56b1e534 100644 --- a/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone2.inc +++ b/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone2.inc @@ -3,6 +3,6 @@ SCRIPT_START script_PlayerAtHurdyGurdyManFirstKinstone2 SetEntitySpeed 0x0100 WalkWest 0x0008 SetSyncFlag 0x00000400 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone3.inc b/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone3.inc index c64ab60a..7abe1476 100644 --- a/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone3.inc +++ b/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone3.inc @@ -3,6 +3,6 @@ SCRIPT_START script_PlayerAtHurdyGurdyManFirstKinstone3 SetEntitySpeed 0x0100 WalkSouth 0x0008 SetSyncFlag 0x00000400 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone4.inc b/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone4.inc index 5b436fa5..d93c0ec4 100644 --- a/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone4.inc +++ b/data/scripts/cutscene/kinstones/script_PlayerAtHurdyGurdyManFirstKinstone4.inc @@ -3,6 +3,6 @@ SCRIPT_START script_PlayerAtHurdyGurdyManFirstKinstone4 SetEntitySpeed 0x0100 WalkNorth 0x0008 SetSyncFlag 0x00000400 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/minishVillage/script_PlayerAtVillageIntro.inc b/data/scripts/cutscene/minishVillage/script_PlayerAtVillageIntro.inc index 81855968..2e9cc5ce 100644 --- a/data/scripts/cutscene/minishVillage/script_PlayerAtVillageIntro.inc +++ b/data/scripts/cutscene/minishVillage/script_PlayerAtVillageIntro.inc @@ -9,6 +9,6 @@ SCRIPT_START script_PlayerAtVillageIntro _0807EDD4 0x0208, 0x0340 DoPostScriptAction 0x0000 SetSyncFlag 0x00000002 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/originStory/script_PlayerAtVaatisAppearance.inc b/data/scripts/cutscene/originStory/script_PlayerAtVaatisAppearance.inc index 429a13fd..6269f54b 100644 --- a/data/scripts/cutscene/originStory/script_PlayerAtVaatisAppearance.inc +++ b/data/scripts/cutscene/originStory/script_PlayerAtVaatisAppearance.inc @@ -8,5 +8,5 @@ SCRIPT_START script_PlayerAtVaatisAppearance SetAnimationState 0x0004 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/originStory/script_PlayerDefeatedMoblins.inc b/data/scripts/cutscene/originStory/script_PlayerDefeatedMoblins.inc index 253e6517..88e9a2fd 100644 --- a/data/scripts/cutscene/originStory/script_PlayerDefeatedMoblins.inc +++ b/data/scripts/cutscene/originStory/script_PlayerDefeatedMoblins.inc @@ -8,5 +8,5 @@ SCRIPT_START script_PlayerDefeatedMoblins SetAnimationState 0x0004 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/originStory/script_PlayerReceivedExposition.inc b/data/scripts/cutscene/originStory/script_PlayerReceivedExposition.inc index 77508e79..79a68621 100644 --- a/data/scripts/cutscene/originStory/script_PlayerReceivedExposition.inc +++ b/data/scripts/cutscene/originStory/script_PlayerReceivedExposition.inc @@ -1,5 +1,5 @@ @ Player Outside Castle after Ezlo explanation after ezlo cutscene SCRIPT_START script_PlayerReceivedExposition DoPostScriptAction 0x0015 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/originStory/script_PlayerSeenOriginStory.inc b/data/scripts/cutscene/originStory/script_PlayerSeenOriginStory.inc index 1418123b..f2290db0 100644 --- a/data/scripts/cutscene/originStory/script_PlayerSeenOriginStory.inc +++ b/data/scripts/cutscene/originStory/script_PlayerSeenOriginStory.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerSeenOriginStory SetAnimationState 0x0006 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/originStory/script_PlayerStoneWallsAppear.inc b/data/scripts/cutscene/originStory/script_PlayerStoneWallsAppear.inc index 26d0e170..ce5801a1 100644 --- a/data/scripts/cutscene/originStory/script_PlayerStoneWallsAppear.inc +++ b/data/scripts/cutscene/originStory/script_PlayerStoneWallsAppear.inc @@ -10,6 +10,6 @@ SCRIPT_START script_PlayerStoneWallsAppear Wait 0x000a SetAnimationState 0x0004 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/originStory/script_PlayerTryToFollowVaati.inc b/data/scripts/cutscene/originStory/script_PlayerTryToFollowVaati.inc index f6eb5063..42f14dc0 100644 --- a/data/scripts/cutscene/originStory/script_PlayerTryToFollowVaati.inc +++ b/data/scripts/cutscene/originStory/script_PlayerTryToFollowVaati.inc @@ -8,5 +8,5 @@ SCRIPT_START script_PlayerTryToFollowVaati SetAnimationState 0x0004 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/outro/script_PlayerAtEzlo.inc b/data/scripts/cutscene/outro/script_PlayerAtEzlo.inc index 8c2918ff..1959b1e5 100644 --- a/data/scripts/cutscene/outro/script_PlayerAtEzlo.inc +++ b/data/scripts/cutscene/outro/script_PlayerAtEzlo.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerAtEzlo SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal .2byte 0x0000 diff --git a/data/scripts/cutscene/outro/script_PlayerAtOutro.inc b/data/scripts/cutscene/outro/script_PlayerAtOutro.inc index fc956c5a..3b87ff9f 100644 --- a/data/scripts/cutscene/outro/script_PlayerAtOutro.inc +++ b/data/scripts/cutscene/outro/script_PlayerAtOutro.inc @@ -10,5 +10,5 @@ SCRIPT_START script_PlayerAtOutro SetAnimationState 0x0006 Wait 0x000a SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal .2byte 0x0000 diff --git a/data/scripts/cutscene/outro/script_PlayerGetGreenCap.inc b/data/scripts/cutscene/outro/script_PlayerGetGreenCap.inc index 96af6e03..ab1e3e4c 100644 --- a/data/scripts/cutscene/outro/script_PlayerGetGreenCap.inc +++ b/data/scripts/cutscene/outro/script_PlayerGetGreenCap.inc @@ -22,5 +22,5 @@ SCRIPT_START script_PlayerGetGreenCap SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal .2byte 0x0000 diff --git a/data/scripts/cutscene/outro/script_PlayerSayGoodbye.inc b/data/scripts/cutscene/outro/script_PlayerSayGoodbye.inc index b10a0ba5..dc408d43 100644 --- a/data/scripts/cutscene/outro/script_PlayerSayGoodbye.inc +++ b/data/scripts/cutscene/outro/script_PlayerSayGoodbye.inc @@ -7,4 +7,4 @@ SCRIPT_START script_PlayerSayGoodbye SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal diff --git a/data/scripts/cutscene/reveal/script_PlayerAtPicture.inc b/data/scripts/cutscene/reveal/script_PlayerAtPicture.inc index f7760051..106508d6 100644 --- a/data/scripts/cutscene/reveal/script_PlayerAtPicture.inc +++ b/data/scripts/cutscene/reveal/script_PlayerAtPicture.inc @@ -8,5 +8,5 @@ SCRIPT_START script_PlayerAtPicture SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000002 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/cutscene/reveal/script_PlayerDistanceFromVaati.inc b/data/scripts/cutscene/reveal/script_PlayerDistanceFromVaati.inc index c44f1f6c..f3523b3d 100644 --- a/data/scripts/cutscene/reveal/script_PlayerDistanceFromVaati.inc +++ b/data/scripts/cutscene/reveal/script_PlayerDistanceFromVaati.inc @@ -9,6 +9,6 @@ SCRIPT_START script_PlayerDistanceFromVaati DoPostScriptAction 0x0000 DoPostScriptAction 0x000c SetSyncFlag 0x00000002 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/reveal/script_PlayerFaintAgain.inc b/data/scripts/cutscene/reveal/script_PlayerFaintAgain.inc index b40b2b9e..6593d60f 100644 --- a/data/scripts/cutscene/reveal/script_PlayerFaintAgain.inc +++ b/data/scripts/cutscene/reveal/script_PlayerFaintAgain.inc @@ -12,6 +12,6 @@ SCRIPT_START script_PlayerFaintAgain _0807EF3C 0x0200, 0x0020 DoPostScriptAction 0x0000 SetSyncFlag 0x00000002 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/reveal/script_PlayerMoveToPicture.inc b/data/scripts/cutscene/reveal/script_PlayerMoveToPicture.inc index b2af1dd9..5497e87e 100644 --- a/data/scripts/cutscene/reveal/script_PlayerMoveToPicture.inc +++ b/data/scripts/cutscene/reveal/script_PlayerMoveToPicture.inc @@ -7,6 +7,6 @@ SCRIPT_START script_PlayerMoveToPicture WalkNorth 0x0020 DoPostScriptAction 0x0000 SetSyncFlag 0x00000002 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/cutscene/takeover/script_PlayerAtTakeover.inc b/data/scripts/cutscene/takeover/script_PlayerAtTakeover.inc index 034b3197..c7689ff9 100644 --- a/data/scripts/cutscene/takeover/script_PlayerAtTakeover.inc +++ b/data/scripts/cutscene/takeover/script_PlayerAtTakeover.inc @@ -16,5 +16,5 @@ SCRIPT_START script_PlayerAtTakeover SetAnimationState 0x0004 DoPostScriptAction 0x0000 SetSyncFlag 0x00000100 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/dhc/script_PlayerAfterDefeatingV2.inc b/data/scripts/dhc/script_PlayerAfterDefeatingV2.inc index ee4b78c3..3d9de90b 100644 --- a/data/scripts/dhc/script_PlayerAfterDefeatingV2.inc +++ b/data/scripts/dhc/script_PlayerAfterDefeatingV2.inc @@ -9,6 +9,6 @@ SCRIPT_START script_PlayerAfterDefeatingV2 WalkSouth 0x0010 DoPostScriptAction 0x000c SetSyncFlag 0x00000004 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/dhc/script_PlayerAtDarkNut1.inc b/data/scripts/dhc/script_PlayerAtDarkNut1.inc index e37bcc9a..ad302065 100644 --- a/data/scripts/dhc/script_PlayerAtDarkNut1.inc +++ b/data/scripts/dhc/script_PlayerAtDarkNut1.inc @@ -11,5 +11,5 @@ SCRIPT_START script_PlayerAtDarkNut1 DoPostScriptAction 0x0001 Call sub_080752AC EnablePlayerControl - Call sub_080791D0 + Call ResetPlayerAnimationAndAction SCRIPT_END diff --git a/data/scripts/dhc/script_PlayerAtDarkNut2.inc b/data/scripts/dhc/script_PlayerAtDarkNut2.inc index 60ee6ace..975bc5a2 100644 --- a/data/scripts/dhc/script_PlayerAtDarkNut2.inc +++ b/data/scripts/dhc/script_PlayerAtDarkNut2.inc @@ -11,5 +11,5 @@ SCRIPT_START script_PlayerAtDarkNut2 DoPostScriptAction 0x0001 Call sub_080752AC EnablePlayerControl - Call sub_080791D0 + Call ResetPlayerAnimationAndAction SCRIPT_END diff --git a/data/scripts/dhc/script_PlayerAtDarkNut3.inc b/data/scripts/dhc/script_PlayerAtDarkNut3.inc index b092a4c7..698c4108 100644 --- a/data/scripts/dhc/script_PlayerAtDarkNut3.inc +++ b/data/scripts/dhc/script_PlayerAtDarkNut3.inc @@ -11,5 +11,5 @@ SCRIPT_START script_PlayerAtDarkNut3 DoPostScriptAction 0x0001 Call sub_080752AC EnablePlayerControl - Call sub_080791D0 + Call ResetPlayerAnimationAndAction SCRIPT_END diff --git a/data/scripts/dhc/script_PlayerCastleCollapsing.inc b/data/scripts/dhc/script_PlayerCastleCollapsing.inc index 509a5e68..5ee0ccfe 100644 --- a/data/scripts/dhc/script_PlayerCastleCollapsing.inc +++ b/data/scripts/dhc/script_PlayerCastleCollapsing.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerCastleCollapsing DoPostScriptAction 0x0000 _0807EEF4 0x0000, 0x0080 SetSyncFlag 0x00000004 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/dhc/script_PlayerCastleEscape.inc b/data/scripts/dhc/script_PlayerCastleEscape.inc index 5f57f7d8..45468213 100644 --- a/data/scripts/dhc/script_PlayerCastleEscape.inc +++ b/data/scripts/dhc/script_PlayerCastleEscape.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerCastleEscape SetAnimationState 0x0004 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/dhc/script_PlayerRescuedZelda.inc b/data/scripts/dhc/script_PlayerRescuedZelda.inc index 66d6d108..b792296a 100644 --- a/data/scripts/dhc/script_PlayerRescuedZelda.inc +++ b/data/scripts/dhc/script_PlayerRescuedZelda.inc @@ -8,6 +8,6 @@ SCRIPT_START script_PlayerRescuedZelda SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000004 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/dhc/script_PlayerStonesFall.inc b/data/scripts/dhc/script_PlayerStonesFall.inc index 12ba8a9d..538adc2a 100644 --- a/data/scripts/dhc/script_PlayerStonesFall.inc +++ b/data/scripts/dhc/script_PlayerStonesFall.inc @@ -6,5 +6,5 @@ SCRIPT_START script_PlayerStonesFall CallWithArg SetPlayerAnimation2, 0x000003c5 Call WaitForPlayerFrameHiBit SetSyncFlag 0x00000004 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/dhc/script_PlayerV2Defeated.inc b/data/scripts/dhc/script_PlayerV2Defeated.inc index 33f6d785..f16621e5 100644 --- a/data/scripts/dhc/script_PlayerV2Defeated.inc +++ b/data/scripts/dhc/script_PlayerV2Defeated.inc @@ -7,6 +7,6 @@ SCRIPT_START script_PlayerV2Defeated DoPostScriptAction 0x0001 _0807EDD4 0x00a8, 0x002c SetSyncFlag 0x00000002 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/graveyard/script_PlayerAtGraveyardHouseDoor.inc b/data/scripts/graveyard/script_PlayerAtGraveyardHouseDoor.inc index cbb2b2d3..99931985 100644 --- a/data/scripts/graveyard/script_PlayerAtGraveyardHouseDoor.inc +++ b/data/scripts/graveyard/script_PlayerAtGraveyardHouseDoor.inc @@ -12,5 +12,5 @@ SCRIPT_START script_PlayerAtGraveyardHouseDoor DoPostScriptAction 0x000d SetEntitySpeed 0x0100 WalkSouth 0x0010 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/graveyard/script_PlayerAtKingGustav.inc b/data/scripts/graveyard/script_PlayerAtKingGustav.inc index d2f7d3bd..96b9a99e 100644 --- a/data/scripts/graveyard/script_PlayerAtKingGustav.inc +++ b/data/scripts/graveyard/script_PlayerAtKingGustav.inc @@ -8,5 +8,5 @@ SCRIPT_START script_PlayerAtKingGustav SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/graveyard/script_PlayerGetKeyStolen.inc b/data/scripts/graveyard/script_PlayerGetKeyStolen.inc index 6133e319..bad5627b 100644 --- a/data/scripts/graveyard/script_PlayerGetKeyStolen.inc +++ b/data/scripts/graveyard/script_PlayerGetKeyStolen.inc @@ -16,6 +16,6 @@ SCRIPT_START script_PlayerGetKeyStolen _0807EF3C 0x0200, 0x0020 DoPostScriptAction 0x0000 SetSyncFlag 0x00000040 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/hyruleTown/script_Anju.inc b/data/scripts/hyruleTown/script_Anju.inc index 96b1b07b..6e931df0 100644 --- a/data/scripts/hyruleTown/script_Anju.inc +++ b/data/scripts/hyruleTown/script_Anju.inc @@ -45,7 +45,7 @@ script_080101AC: DoFade5 WaitForFadeFinish CallWithArg SetPlayerPos, 0x03400378 - Call sub_080791BC + Call SetPlayerActionNormal Call sub_0807FB74 _0807E8E4_1 Call SetPlayerCollisionLayer1 diff --git a/data/scripts/hyruleTown/script_PlayerActivatedTrapCard.inc b/data/scripts/hyruleTown/script_PlayerActivatedTrapCard.inc index da2b3e4f..5580f5d1 100644 --- a/data/scripts/hyruleTown/script_PlayerActivatedTrapCard.inc +++ b/data/scripts/hyruleTown/script_PlayerActivatedTrapCard.inc @@ -11,6 +11,6 @@ SCRIPT_START script_PlayerActivatedTrapCard DoPostScriptAction 0x0005 Wait 0x003c SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/hyruleTown/script_PlayerAtDrLeftDoor.inc b/data/scripts/hyruleTown/script_PlayerAtDrLeftDoor.inc index bcc539a8..1d878f5f 100644 --- a/data/scripts/hyruleTown/script_PlayerAtDrLeftDoor.inc +++ b/data/scripts/hyruleTown/script_PlayerAtDrLeftDoor.inc @@ -7,6 +7,6 @@ SCRIPT_START script_PlayerAtDrLeftDoor DoPostScriptAction 0x0001 WalkSouth 0x0008 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/hyruleTown/script_PlayerAtInnDoor.inc b/data/scripts/hyruleTown/script_PlayerAtInnDoor.inc index 25411c1b..adef60a5 100644 --- a/data/scripts/hyruleTown/script_PlayerAtInnDoor.inc +++ b/data/scripts/hyruleTown/script_PlayerAtInnDoor.inc @@ -7,6 +7,6 @@ SCRIPT_START script_PlayerAtInnDoor SetAnimationState 0x0004 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/hyruleTown/script_PlayerCannotEnter.inc b/data/scripts/hyruleTown/script_PlayerCannotEnter.inc index e7ef3883..581e1839 100644 --- a/data/scripts/hyruleTown/script_PlayerCannotEnter.inc +++ b/data/scripts/hyruleTown/script_PlayerCannotEnter.inc @@ -7,6 +7,6 @@ SCRIPT_START script_PlayerCannotEnter SetAnimationState 0x0002 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/hyruleTown/script_PlayerSleepingInn.inc b/data/scripts/hyruleTown/script_PlayerSleepingInn.inc index 53d68d84..c432019d 100644 --- a/data/scripts/hyruleTown/script_PlayerSleepingInn.inc +++ b/data/scripts/hyruleTown/script_PlayerSleepingInn.inc @@ -15,6 +15,6 @@ script_08010A78: DoPostScriptAction 0x0014 EnablePlayerControl Call sub_0807DF50 - Call sub_080791D0 + Call ResetPlayerAnimationAndAction SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/hyruleTown/script_PlayerStepOnTrap.inc b/data/scripts/hyruleTown/script_PlayerStepOnTrap.inc index 261a7afb..bc6ae225 100644 --- a/data/scripts/hyruleTown/script_PlayerStepOnTrap.inc +++ b/data/scripts/hyruleTown/script_PlayerStepOnTrap.inc @@ -8,5 +8,5 @@ SCRIPT_START script_PlayerStepOnTrap _0807EDD4 0x0078, 0x0080 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/hyruleTown/script_TownMinish5.inc b/data/scripts/hyruleTown/script_TownMinish5.inc index b69a9b3b..d4ae341c 100644 --- a/data/scripts/hyruleTown/script_TownMinish5.inc +++ b/data/scripts/hyruleTown/script_TownMinish5.inc @@ -60,5 +60,5 @@ script_0800EEFE: MessageFromTarget 0x4c09 WaitUntilTextboxCloses SetSyncFlag 0x00000048 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/lakeHylia/script_PlayerAfterToD.inc b/data/scripts/lakeHylia/script_PlayerAfterToD.inc index 8ad9a855..d53540ad 100644 --- a/data/scripts/lakeHylia/script_PlayerAfterToD.inc +++ b/data/scripts/lakeHylia/script_PlayerAfterToD.inc @@ -6,6 +6,6 @@ SCRIPT_START script_PlayerAfterToD DoPostScriptAction 0x0004 Wait 0x003c SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/minishWoods/script_PlayerAtBombMinish.inc b/data/scripts/minishWoods/script_PlayerAtBombMinish.inc index aa830e48..89e06331 100644 --- a/data/scripts/minishWoods/script_PlayerAtBombMinish.inc +++ b/data/scripts/minishWoods/script_PlayerAtBombMinish.inc @@ -9,5 +9,5 @@ SCRIPT_START script_PlayerAtBombMinish Wait 0x000f DoPostScriptAction 0x0000 SetSyncFlag 0x00000002 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/minishWoods/script_PlayerAtFestari.inc b/data/scripts/minishWoods/script_PlayerAtFestari.inc index 90ad2c76..ac2f94c3 100644 --- a/data/scripts/minishWoods/script_PlayerAtFestari.inc +++ b/data/scripts/minishWoods/script_PlayerAtFestari.inc @@ -8,5 +8,5 @@ SCRIPT_START script_PlayerAtFestari Wait 0x000f DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/minishWoods/script_PlayerAtGentari.inc b/data/scripts/minishWoods/script_PlayerAtGentari.inc index 9e6468d3..0804180c 100644 --- a/data/scripts/minishWoods/script_PlayerAtGentari.inc +++ b/data/scripts/minishWoods/script_PlayerAtGentari.inc @@ -9,5 +9,5 @@ SCRIPT_START script_PlayerAtGentari Wait 0x000f DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/minishWoods/script_PlayerAtMadderpillar.inc b/data/scripts/minishWoods/script_PlayerAtMadderpillar.inc index 4c48cc9f..b2fd8ee9 100644 --- a/data/scripts/minishWoods/script_PlayerAtMadderpillar.inc +++ b/data/scripts/minishWoods/script_PlayerAtMadderpillar.inc @@ -12,5 +12,5 @@ SCRIPT_START script_PlayerAtMadderpillar DoPostScriptAction 0x0001 Call sub_080752AC EnablePlayerControl - Call sub_080791D0 + Call ResetPlayerAnimationAndAction SCRIPT_END diff --git a/data/scripts/mtCrenel/script_PlayerAtMelari.inc b/data/scripts/mtCrenel/script_PlayerAtMelari.inc index 82b3248e..b4560caa 100644 --- a/data/scripts/mtCrenel/script_PlayerAtMelari.inc +++ b/data/scripts/mtCrenel/script_PlayerAtMelari.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerAtMelari SetAnimationState 0x0002 DoPostScriptAction 0x0000 SetSyncFlag 0x00000008 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/mtCrenel/script_PlayerAtMountainMinishExit.inc b/data/scripts/mtCrenel/script_PlayerAtMountainMinishExit.inc index 0fda5e29..1d3e1947 100644 --- a/data/scripts/mtCrenel/script_PlayerAtMountainMinishExit.inc +++ b/data/scripts/mtCrenel/script_PlayerAtMountainMinishExit.inc @@ -8,6 +8,6 @@ SCRIPT_START script_PlayerAtMountainMinishExit DoPostScriptAction 0x000d WalkSouth 0x0020 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/mtCrenel/script_PlayerGetWhiteSword.inc b/data/scripts/mtCrenel/script_PlayerGetWhiteSword.inc index 10eed28e..6c1f1237 100644 --- a/data/scripts/mtCrenel/script_PlayerGetWhiteSword.inc +++ b/data/scripts/mtCrenel/script_PlayerGetWhiteSword.inc @@ -8,5 +8,5 @@ SCRIPT_START script_PlayerGetWhiteSword MessageNoOverlap 0x0502 WaitUntilTextboxCloses SetSyncFlag 0x00000008 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/mtCrenel/script_PlayerPlaceBrokenSword.inc b/data/scripts/mtCrenel/script_PlayerPlaceBrokenSword.inc index 804412ab..fad1fc4f 100644 --- a/data/scripts/mtCrenel/script_PlayerPlaceBrokenSword.inc +++ b/data/scripts/mtCrenel/script_PlayerPlaceBrokenSword.inc @@ -8,6 +8,6 @@ SCRIPT_START script_PlayerPlaceBrokenSword SetAnimationState 0x0004 DoPostScriptAction 0x0000 SetSyncFlag 0x00000008 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/npc/script_PlayerAtBladeBrothers.inc b/data/scripts/npc/script_PlayerAtBladeBrothers.inc index d2025632..319170e6 100644 --- a/data/scripts/npc/script_PlayerAtBladeBrothers.inc +++ b/data/scripts/npc/script_PlayerAtBladeBrothers.inc @@ -5,5 +5,5 @@ SCRIPT_START script_PlayerAtBladeBrothers SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/sanctuary/script_Npc4EThirdSanctuary.inc b/data/scripts/sanctuary/script_Npc4EThirdSanctuary.inc index 9a57f37f..36e26a82 100644 --- a/data/scripts/sanctuary/script_Npc4EThirdSanctuary.inc +++ b/data/scripts/sanctuary/script_Npc4EThirdSanctuary.inc @@ -60,7 +60,7 @@ script_080138D0: StartPlayerScript script_PlayerPickUpFinalSword SetSyncFlag 0x00000080 _0807F078 0x0006, 0x0001 - Call sub_0807AEE4 + Call UpdatePlayerSkills Call sub_0806DC3C Call sub_0806DC58 Call WaitForPlayerFrameHiBit diff --git a/data/scripts/sanctuary/script_PlayerAtPedestal.inc b/data/scripts/sanctuary/script_PlayerAtPedestal.inc index 0f82e0a9..6f85106d 100644 --- a/data/scripts/sanctuary/script_PlayerAtPedestal.inc +++ b/data/scripts/sanctuary/script_PlayerAtPedestal.inc @@ -14,5 +14,5 @@ script_08013704: SetAnimationState 0x0004 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/sanctuary/script_PlayerAtSanctuaryEntrance.inc b/data/scripts/sanctuary/script_PlayerAtSanctuaryEntrance.inc index b6c21762..69391d04 100644 --- a/data/scripts/sanctuary/script_PlayerAtSanctuaryEntrance.inc +++ b/data/scripts/sanctuary/script_PlayerAtSanctuaryEntrance.inc @@ -8,5 +8,5 @@ SCRIPT_START script_PlayerAtSanctuaryEntrance DoPostScriptAction 0x0000 Wait 0x001e SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/sanctuary/script_PlayerPickUpFinalSword.inc b/data/scripts/sanctuary/script_PlayerPickUpFinalSword.inc index fd4063b1..a8148e96 100644 --- a/data/scripts/sanctuary/script_PlayerPickUpFinalSword.inc +++ b/data/scripts/sanctuary/script_PlayerPickUpFinalSword.inc @@ -9,5 +9,5 @@ SCRIPT_START script_PlayerPickUpFinalSword Call WaitForPlayerFrameHiBit Wait 0x0078 WaitForSyncFlagAndClear 0x00040000 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/sanctuary/script_PlayerPickUpSword.inc b/data/scripts/sanctuary/script_PlayerPickUpSword.inc index 0523c018..ca4a3ea3 100644 --- a/data/scripts/sanctuary/script_PlayerPickUpSword.inc +++ b/data/scripts/sanctuary/script_PlayerPickUpSword.inc @@ -8,6 +8,6 @@ SCRIPT_START script_PlayerPickUpSword Call WaitForPlayerFrameHiBit Wait 0x0078 WaitForSyncFlagAndClear 0x00040000 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/sanctuary/script_PlayerSanctuary.inc b/data/scripts/sanctuary/script_PlayerSanctuary.inc index 05672507..0f2d0fee 100644 --- a/data/scripts/sanctuary/script_PlayerSanctuary.inc +++ b/data/scripts/sanctuary/script_PlayerSanctuary.inc @@ -7,6 +7,6 @@ SCRIPT_START script_PlayerSanctuary SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/sanctuary/script_PlayerSanctuaryIntro.inc b/data/scripts/sanctuary/script_PlayerSanctuaryIntro.inc index 9ea5a652..a71e0f6b 100644 --- a/data/scripts/sanctuary/script_PlayerSanctuaryIntro.inc +++ b/data/scripts/sanctuary/script_PlayerSanctuaryIntro.inc @@ -5,5 +5,5 @@ SCRIPT_START script_PlayerSanctuaryIntro SetEntityPositionRelative 0x0098, 0x0070 EndBlock SetSyncFlag 0x00000002 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/sanctuary/script_PlayerTextBoardAppears.inc b/data/scripts/sanctuary/script_PlayerTextBoardAppears.inc index 77e9fc90..516cef54 100644 --- a/data/scripts/sanctuary/script_PlayerTextBoardAppears.inc +++ b/data/scripts/sanctuary/script_PlayerTextBoardAppears.inc @@ -7,5 +7,5 @@ SCRIPT_START script_PlayerTextBoardAppears SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000002 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/unused/script_0800FB2C.inc b/data/scripts/unused/script_0800FB2C.inc index ec0ad048..1da1d47c 100644 --- a/data/scripts/unused/script_0800FB2C.inc +++ b/data/scripts/unused/script_0800FB2C.inc @@ -3,6 +3,6 @@ SCRIPT_START script_0800FB2C SetAnimationState 0x0002 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/unused/script_08012B24.inc b/data/scripts/unused/script_08012B24.inc index 5483ab0b..5691eba9 100644 --- a/data/scripts/unused/script_08012B24.inc +++ b/data/scripts/unused/script_08012B24.inc @@ -8,5 +8,5 @@ SCRIPT_START script_08012B24 WalkSouth 0x0008 SetSyncFlag 0x00000002 CallWithArg sub_0807FB64, 0xffffffe2 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/unused/script_08012B50.inc b/data/scripts/unused/script_08012B50.inc index a7a3f781..8fb1d22f 100644 --- a/data/scripts/unused/script_08012B50.inc +++ b/data/scripts/unused/script_08012B50.inc @@ -8,5 +8,5 @@ SCRIPT_START script_08012B50 WalkNorth 0x0008 SetSyncFlag 0x00000002 CallWithArg sub_0807FB64, 0xffffffe2 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/unused/script_08012B7C.inc b/data/scripts/unused/script_08012B7C.inc index 50328e8a..525c228e 100644 --- a/data/scripts/unused/script_08012B7C.inc +++ b/data/scripts/unused/script_08012B7C.inc @@ -8,5 +8,5 @@ SCRIPT_START script_08012B7C WalkEast 0x0008 SetSyncFlag 0x00000002 CallWithArg sub_0807FB64, 0xffffffe2 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/data/scripts/unused/script_08013D04.inc b/data/scripts/unused/script_08013D04.inc index 276d2f05..42887fa3 100644 --- a/data/scripts/unused/script_08013D04.inc +++ b/data/scripts/unused/script_08013D04.inc @@ -11,7 +11,7 @@ script_08013D1C: CallWithArg sub_08095D54, 0x00000000 PlaySound SFX_ELEMENT_PLACE SetSyncFlag 0x08000000 - Call sub_080791BC + Call SetPlayerActionNormal DoPostScriptAction 0x0006 SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/unused/script_08013D44.inc b/data/scripts/unused/script_08013D44.inc index e375acd4..98c44d0d 100644 --- a/data/scripts/unused/script_08013D44.inc +++ b/data/scripts/unused/script_08013D44.inc @@ -11,7 +11,7 @@ script_08013D5C: CallWithArg sub_08095D54, 0x00000001 PlaySound SFX_ELEMENT_PLACE SetSyncFlag 0x10000000 - Call sub_080791BC + Call SetPlayerActionNormal DoPostScriptAction 0x0006 SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/unused/script_08013D84.inc b/data/scripts/unused/script_08013D84.inc index 53a064ac..bc67ff99 100644 --- a/data/scripts/unused/script_08013D84.inc +++ b/data/scripts/unused/script_08013D84.inc @@ -11,7 +11,7 @@ script_08013D9C: CallWithArg sub_08095D54, 0x00000002 PlaySound SFX_ELEMENT_PLACE SetSyncFlag 0x20000000 - Call sub_080791BC + Call SetPlayerActionNormal DoPostScriptAction 0x0006 SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/unused/script_08013DC4.inc b/data/scripts/unused/script_08013DC4.inc index 62c876c7..ac92c6db 100644 --- a/data/scripts/unused/script_08013DC4.inc +++ b/data/scripts/unused/script_08013DC4.inc @@ -11,7 +11,7 @@ script_08013DDC: CallWithArg sub_08095D54, 0x00000003 PlaySound SFX_ELEMENT_PLACE SetSyncFlag 0x40000000 - Call sub_080791BC + Call SetPlayerActionNormal DoPostScriptAction 0x0006 SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/unused/script_08015A7C.inc b/data/scripts/unused/script_08015A7C.inc index 870e0b9d..babfa3f5 100644 --- a/data/scripts/unused/script_08015A7C.inc +++ b/data/scripts/unused/script_08015A7C.inc @@ -6,6 +6,6 @@ SCRIPT_START script_08015A7C SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000004 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/unused/script_08015AA0.inc b/data/scripts/unused/script_08015AA0.inc index 746324a2..460df964 100644 --- a/data/scripts/unused/script_08015AA0.inc +++ b/data/scripts/unused/script_08015AA0.inc @@ -6,6 +6,6 @@ SCRIPT_START script_08015AA0 SetAnimationState 0x0002 DoPostScriptAction 0x0000 SetSyncFlag 0x00000004 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/windRuins/script_PlayerAtTextboard.inc b/data/scripts/windRuins/script_PlayerAtTextboard.inc index b8b909df..c85f6145 100644 --- a/data/scripts/windRuins/script_PlayerAtTextboard.inc +++ b/data/scripts/windRuins/script_PlayerAtTextboard.inc @@ -8,5 +8,5 @@ SCRIPT_START script_PlayerAtTextboard SetAnimationState 0x0000 DoPostScriptAction 0x0000 SetSyncFlag 0x00000001 - Call sub_080791BC + Call SetPlayerActionNormal SCRIPT_END diff --git a/include/asm.h b/include/asm.h index 360c0fb1..fa0476ba 100644 --- a/include/asm.h +++ b/include/asm.h @@ -7,21 +7,28 @@ struct Entity_; extern u32 Random(void); extern void sub_08000152(u32, u32, u32); +extern u32 GetTileTypeByEntity(struct Entity_*); +extern u32 GetTileTypeByPos(s32 x, s32 y, u32 layer); +extern u32 GetTileType(u32 pos, u32 layer); extern void SetTile(u32 index, u32 position, u32 layer); extern u32 sub_080002D0(struct Entity_*); +extern void LoadResourceAsync(const void*, u32, u32); extern void sub_08001242(struct Entity_*); extern void sub_08001290(struct Entity_*, u32); extern void sub_08001324(struct Entity_*); extern u32 sub_08002632(struct Entity_*); +extern u32 CheckPlayerInRegion(u32 centerX, u32 centerY, u32 radiusX, u32 radiusY); extern u32 GravityUpdate(struct Entity_*, u32); -extern u32 sub_080043E8(struct Entity_*); -extern void sub_08004484(struct Entity_*, struct Entity_*); -extern u32 sub_080045D4(u32, u32, u32, u32); -extern u32 sub_080045DA(s32, s32); -extern void sub_08004596(struct Entity_*, u32); -extern u32 sub_080045B4(struct Entity_*, u32, u32); +extern u32 CheckOnScreen(struct Entity_*); extern u32 EntityInRectRadius(struct Entity_*, struct Entity_*, u32, u32); extern void UpdateAnimationVariableFrames(struct Entity_*, u32); +extern u32 sub_080043E8(struct Entity_*); +extern void sub_08004484(struct Entity_*, struct Entity_*); +extern void ResetCollisionLayer(struct Entity_*); +extern void sub_08004596(struct Entity_*, u32); +extern u32 sub_080045B4(struct Entity_*, u32, u32); +extern u32 sub_080045D4(u32, u32, u32, u32); +extern u32 sub_080045DA(s32, s32); extern u32 sub_080086B4(u32, u32, u8*); #endif // ASM_H diff --git a/include/coord.h b/include/coord.h index 4b6556e6..85a56ce2 100644 --- a/include/coord.h +++ b/include/coord.h @@ -17,7 +17,7 @@ void ResolveEntityBelow(Entity*, Entity*); u32 sub_0806F5A4(u32 idx); u32 sub_0806F3E4(Entity*); -void sub_0806F69C(Entity*); +void LinearMoveUpdate(Entity*); extern const s16 gSineTable[64]; extern const s16 gCosineTable[256]; diff --git a/include/functions.h b/include/functions.h index 536b36ed..a271ad64 100644 --- a/include/functions.h +++ b/include/functions.h @@ -17,9 +17,6 @@ extern void ForceEquipItem(u32, u32); extern void LoadRoomEntityList(EntityData* listPtr); extern void SetChildOffset(Entity*, s32, s32, s32); extern Entity* CreatePlayerItem(u32, u32, u32, u32); -extern u32 GetTileTypeByPos(s32 x, s32 y, u32 layer); -extern u32 GetTileType(u32 pos, u32 layer); -extern void SetTile(u32, u32, u32); extern void SetDirtTile(u32); extern Entity* CreateDeathFx(Entity*, u32, u32); extern u8* GetSpriteSubEntryOffsetDataPointer(u32, u32); @@ -27,19 +24,13 @@ extern bool32 LoadFixedGFX(Entity*, u32); extern void CreateItemEntity(u32, u32, u32); extern u32 ProcessMovement(Entity*); extern void MenuFadeIn(u32, u32); -extern void LoadResourceAsync(const void*, u32, u32); extern void LoadPaletteGroup(u32); extern void TryLoadPrologueHyruleTown(void); extern void LoadGfxGroup(u32); -extern void ResetPlayer(void); -extern u32 IsItemEquipped(u32); -extern bool32 CheckPlayerInRegion(u32 centerX, u32 centerY, u32 radiusX, u32 radiusY); extern Entity* CreateProjectileWithParent(Entity*, u8, u8); -extern u32 GetTileTypeByEntity(Entity*); extern u32 GetSaleItemConfirmMessageID(u32); extern void FlushSprites(void); extern Entity* CreateProjectile(u32); -extern void RegisterPlayerHitbox(); extern s32 GetItemPrice(); extern void DoExitTransition(ScreenTransitionData*); extern void CreateDustAt(s32, s32, u32); @@ -49,7 +40,6 @@ extern Entity* CreateSpeechBubbleExclamationMark(Entity*, s32, s32); extern Entity* CreateSpeechBubbleSleep(Entity*, s32, s32); // Unidentified -extern void sub_080791D0(); extern void sub_0805EC9C(); extern void sub_0805EC60(Entity*); extern void sub_0806D0B0(Entity*); @@ -128,7 +118,6 @@ extern void sub_080A7114(u32); extern u32 sub_0807953C(void); extern void sub_080AE068(Entity*); extern u32 sub_0800445C(Entity*); -extern void sub_0807A108(void); extern u32 sub_0801766C(Entity*); extern void sub_08004168(Entity*); extern void sub_08056208(void); @@ -142,13 +131,9 @@ extern void sub_080784C8(); extern u32 sub_0808288C(Entity*, u32, u32, u32); extern void sub_0806FDA0(Entity*); extern bool32 LoadSwapGFX(Entity*, u16, u32); -extern u32 sub_08016A30(Entity*); +extern u32 ResolveCollisionLayer(Entity*); extern void sub_08077728(); -extern void sub_0807AEE4(); -extern u32 RunQueuedAction(); extern void sub_0807921C(); -extern void UpdateFloorType(); -extern void sub_08079938(); extern void sub_0807ACCC(Entity*); extern void sub_080A2BE4(Entity*, u32); extern u32 sub_08097ADC(Entity*); @@ -161,7 +146,6 @@ extern void sub_0802F45C(Entity*); extern u32 sub_0800419C(Entity*, Entity*, u32, u32); extern void sub_08004542(Entity*); extern void sub_08077B20(); -extern bool32 CheckOnScreen(Entity*); extern u32 sub_08017850(Entity*); extern void sub_080809D4(void); extern void sub_08080CB4(Entity*); @@ -188,21 +172,16 @@ extern void sub_0801DFB4(Entity*, u32, u32, u32); extern void sub_0801E00C(); extern void sub_08078790(Entity*, u32); extern void sub_080788E0(Entity*); -extern void CreateEzloHint(u32, u32); extern void sub_08078B48(void); extern void sub_0807919C(); extern void sub_0807CAA0(u32, u32); extern void sub_080085B0(Entity*); extern u32 sub_08079D48(); extern u32 sub_08008B22(); -extern void sub_080791BC9(); -extern void sub_080791BC(); extern void MessageClose(); extern u32 sub_080542AC(u32); extern u32 sub_08079FC4(u32); -extern void sub_0800455E(Entity*); extern u32* sub_08008790(Entity*, u32); -extern void sub_0804ACF8(); extern void sub_0805F8E4(u32 r0, WStruct* r1); extern Entity* sub_08077C94(ItemBehavior*, u32); diff --git a/include/overworld.h b/include/overworld.h index 2ffa87d9..43ae0c1a 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -17,8 +17,7 @@ u32 CheckIsInteriorWithEnemies(void); u32 CheckIsInteriorNoEnemies(void); u32 CheckHasMap(void); -s32 ModHealth(s32 deltaHealth); -void ModRupees(s32 rupeeDelta); +u32 ItemIsSword(u32 item); void sub_080526F8(s32 a1); u32 sub_08052724(void); @@ -50,7 +49,6 @@ u32 GetFlagBankOffset(u32 idx); RoomResInfo* GetCurrentRoomInfo(void); void sub_08052EA0(void); void sub_08052FD8(u32 room, u32 area); -void UpdateGlobalProgress(void); void sub_08053250(void); void sub_08053320(void); void sub_080533CC(void); diff --git a/include/player.h b/include/player.h index 7d29812c..76350008 100644 --- a/include/player.h +++ b/include/player.h @@ -211,7 +211,7 @@ typedef struct { /* */ u8 filler14 : 6; /*0x3f*/ u8 field_0x3f; /*0x40*/ u8 hurtType[64]; - /*0x80*/ u16 field_0x80; + /*0x80*/ u16 speed_modifier; /*0x82*/ u8 field_0x82[9]; /*0x8b*/ u8 controlMode; /*0x8c*/ u16 vel_x; @@ -277,11 +277,23 @@ extern PlayerState gPlayerState; extern Stats gStats; extern Entity gPlayerEntity; -extern u32 GetInventoryValue(u32); -extern s32 ModHealth(s32); -extern void ModRupees(s32); +void SetPlayerControl(PlayerControlMode mode); +void ResetPlayer(void); +void ResetPlayerVelocity(void); +void ResetPlayerAnimationAndAction(void); +void SetPlayerActionNormal(void); +void RespawnAsMinish(void); -extern void SetPlayerControl(PlayerControlMode); +void ResolvePlayerAnimation(void); +void RegisterPlayerHitbox(void); +void UpdateFloorType(void); +void CreateEzloHint(u32, u32); + +u32 IsItemEquipped(u32); +u32 GetInventoryValue(u32); +s32 ModHealth(s32 delta); +void ModRupees(s32 delta); +void DeleteClones(void); #define COPY_FLAG_FROM_TO(base, src, dest) (base) = ((base) & ~(dest)) | (((dest) * ((base) & (src))) / src) diff --git a/include/room.h b/include/room.h index 5e603926..e9fbcc32 100644 --- a/include/room.h +++ b/include/room.h @@ -35,7 +35,7 @@ typedef struct { /*0x0A*/ s16 roomScrollX; /*0x0C*/ s16 roomScrollY; /*0x0E*/ u8 unk5; - /*0x0F*/ u8 unk6; + /*0x0F*/ u8 scroll_flags; // 0x2 = ??, 0x4 = camera scrolling /*0x10*/ u8 unk_10; /*0x11*/ s8 oam_offset_x; /*0x12*/ s8 oam_offset_y; diff --git a/include/save.h b/include/save.h index 1126973d..7b5bc2f7 100644 --- a/include/save.h +++ b/include/save.h @@ -61,6 +61,8 @@ void SetFileStatusDeleted(u32 index); extern const char gUnk_0811E470[]; +void UpdateGlobalProgress(void); + #ifdef DEMO_USA extern const u8* const demoPointers[]; extern const u8 demoUnknown1[]; diff --git a/src/audio.c b/src/audio.c index 16e22303..998b00b4 100644 --- a/src/audio.c +++ b/src/audio.c @@ -4,8 +4,8 @@ #include "audio.h" #include "utils.h" -#define IS_BGM(song) (song) - 1 <= NUM_BGM - 1 -#define IS_SFX(song) (song) - 1 > NUM_BGM - 1 +#define IS_BGM(song) ((song)-1 <= NUM_BGM - 1) +#define IS_SFX(song) ((song)-1 > NUM_BGM - 1) static s32 fade(s32 target, s32 current); static void doPlaySound(u32 sound); @@ -44,7 +44,7 @@ void SetSfxVolume(u32 volume) { gSoundPlayingInfo.volumeSfx = volume; } -void SoundReq(Sound sound) { +void SoundReq(u32 sound) { u32 song; SoundPlayingInfo* ptr; if (gMain.field_0x7) diff --git a/src/code_0805436C.c b/src/code_0805436C.c index 62853444..d0df011a 100644 --- a/src/code_0805436C.c +++ b/src/code_0805436C.c @@ -4,17 +4,15 @@ #include "menu.h" #include "area.h" #include "utils.h" -#include "structures.h" #include "save.h" +#include "item.h" typedef struct { u8 unk; u8 filler[7]; } struct_080FD5B4; -extern SaveFile gSave; extern struct_080FD5B4 gUnk_080FD5B4[]; -extern ScreenTransition gScreenTransition; extern u8 gUnk_0200AF13; extern u8 gUnk_0200AF14; @@ -96,16 +94,16 @@ u32 SetBottleContents(u32 itemID, u32 bottleIndex) { return bottleIndex; } -u32 ItemIsSword(u32 arg0) { - switch (arg0) { - case 1: - case 2: - case 3: - case 4: - case 6: - return 1; +u32 ItemIsSword(u32 item) { + switch (item) { + case ITEM_SMITH_SWORD: + case ITEM_GREEN_SWORD: + case ITEM_RED_SWORD: + case ITEM_BLUE_SWORD: + case ITEM_FOURSWORD: + return TRUE; default: - return 0; + return FALSE; } } diff --git a/src/code_0805F9A0.c b/src/code_0805F9A0.c index a921491e..1ba583b5 100644 --- a/src/code_0805F9A0.c +++ b/src/code_0805F9A0.c @@ -2,6 +2,7 @@ #include "utils.h" #include "structures.h" #include "functions.h" +#include "asm.h" extern u16 gUnk_081092D4; extern u8 gUnk_081094CE; diff --git a/src/code_08077B98.c b/src/code_08077B98.c index fddfcace..dc3d5a0a 100644 --- a/src/code_08077B98.c +++ b/src/code_08077B98.c @@ -10,7 +10,6 @@ typedef struct { u8 field_0x1; } UnkItemStruct; -Entity* sub_08077C94(ItemBehavior*, u32); void* sub_08077C54(UnkItemStruct* unk); Entity* CreatePlayerBomb(ItemBehavior*, u32); extern Entity* sub_0805E744(); diff --git a/src/code_0807CC3C.c b/src/code_0807CC3C.c index 25458be5..de4f6e24 100644 --- a/src/code_0807CC3C.c +++ b/src/code_0807CC3C.c @@ -1,9 +1,4 @@ #include "global.h" -#include "structures.h" -#include "functions.h" -#include "script.h" -#include "entity.h" -#include "save.h" // these three functions use gRoomControls, maybe once that is understood better, these can be decompiled easier ASM_FUNC("asm/non_matching/code_0807CC3C/sub_0807D280.inc", void sub_0807D280(u32 unk_1, u32 unk_2)) diff --git a/src/code_0808091C.c b/src/code_0808091C.c index 2b4dceb0..51e23169 100644 --- a/src/code_0808091C.c +++ b/src/code_0808091C.c @@ -3,7 +3,6 @@ #include "structures.h" #include "functions.h" #include "overworld.h" -#include "room.h" extern void sub_08080BC4(void); @@ -97,7 +96,7 @@ void sub_080809D4(void) { int x, y; int var1, var0; RoomControls* roomControls = &gRoomControls; - roomControls->unk6 &= 0xFB; + roomControls->scroll_flags &= ~4; target = roomControls->cameraTarget; x = target->x.HALF.HI; diff --git a/src/code_080A29BC.c b/src/code_080A29BC.c index 17fb9fba..17ea28b0 100644 --- a/src/code_080A29BC.c +++ b/src/code_080A29BC.c @@ -2,7 +2,6 @@ #include "entity.h" #include "room.h" #include "object.h" -#include "effects.h" void sub_080A29C8(s32 xOff, s32 yOff, u32 layer) { Entity* pEVar1; diff --git a/src/collision.c b/src/collision.c index 61df2b48..db07ec77 100644 --- a/src/collision.c +++ b/src/collision.c @@ -6,8 +6,8 @@ #include "utils.h" #include "functions.h" #include "enemy.h" -#include "effects.h" #include "object.h" +#include "overworld.h" extern u8 gCollidableCount; extern u8 gUnk_080B3740[]; @@ -317,7 +317,6 @@ Entity* sub_08017A90(Entity* a1, Entity* parent) { } typedef s32 (*CollisionHandler)(Entity* org, Entity* tgt, u32 direction, ColSettings* settings); -s32 sub_08018308(Entity* org, Entity* tgt, u32 direction, ColSettings* settings); s32 CollisionNoOp(Entity* org, Entity* tgt, u32 direction, ColSettings* settings); s32 CollisionGroundItem(Entity* org, Entity* tgt, u32 direction, ColSettings* settings); s32 sub_08017B58(Entity* org, Entity* tgt, u32 direction, ColSettings* settings); diff --git a/src/coord.c b/src/coord.c index e982aa9d..b9209b69 100644 --- a/src/coord.c +++ b/src/coord.c @@ -1,8 +1,6 @@ #include "asm.h" #include "area.h" #include "player.h" -#include "global.h" -#include "entity.h" #include "coord.h" #include "utils.h" #include "audio.h" @@ -163,7 +161,7 @@ void sub_0806F62C(Entity* ent, u32 a, u32 b) { ent->y.WORD -= FixedDiv(FixedMul(gSineTable[(u8)b + 64], a), 256) << 8; } -void sub_0806F69C(Entity* ent) { +void LinearMoveUpdate(Entity* ent) { if ((ent->direction & 0x80) == 0) { ent->x.WORD += FixedDiv(FixedMul(gSineTable[ent->direction * 8], ent->speed), 256) << 8; ent->y.WORD -= FixedDiv(FixedMul(gSineTable[ent->direction * 8 + 64], ent->speed), 256) << 8; diff --git a/src/debugScreen.c b/src/debugScreen.c index c3ddf710..958791fa 100644 --- a/src/debugScreen.c +++ b/src/debugScreen.c @@ -5,7 +5,6 @@ #include "main.h" #include "menu.h" #include "screen.h" -#include "structures.h" #include "textbox.h" extern void (*const gUnk_08109A30[])(); diff --git a/src/enemy.c b/src/enemy.c index af4a68de..e9d4f51d 100644 --- a/src/enemy.c +++ b/src/enemy.c @@ -1,4 +1,3 @@ -#include "global.h" #include "entity.h" #include "enemy.h" #include "definitions.h" diff --git a/src/enemy/acroBandits.c b/src/enemy/acroBandits.c index 865791d5..2fe6e41b 100644 --- a/src/enemy/acroBandits.c +++ b/src/enemy/acroBandits.c @@ -12,7 +12,6 @@ extern void sub_08032338(Entity*); extern Entity* sub_08049DF4(u32); extern Entity* gUnk_020000B0; -extern u8 gEntCount; extern void (*const gUnk_080012C8[])(Entity*); extern void (*const gUnk_080CE56C[])(Entity*); extern void (*const gUnk_080CE584[])(Entity*); @@ -411,12 +410,12 @@ void sub_08032008(Entity* this) { this->field_0x76.HALF.HI = 1; this->direction = GetFacingDirection(this, parent); sub_080322E8(this); - sub_0806F69C(this); + LinearMoveUpdate(this); } } else { this->direction = GetFacingDirection(this, parent); sub_080322E8(this); - sub_0806F69C(this); + LinearMoveUpdate(this); if (this->x.HALF.HI == parent->x.HALF.HI && this->y.HALF.HI == parent->y.HALF.HI) this->field_0x76.HALF.HI = 0; } diff --git a/src/enemy/beetle.c b/src/enemy/beetle.c index de27657c..e286f6f4 100644 --- a/src/enemy/beetle.c +++ b/src/enemy/beetle.c @@ -245,7 +245,7 @@ void sub_08021B64(Entity* this) { InitializeAnimation(this, 5); } else { gPlayerState.field_0x1a[0] |= 0x80; - gPlayerState.field_0x80 -= 0x50; + gPlayerState.speed_modifier -= 0x50; gPlayerState.field_0xaa++; CopyPositionAndSpriteOffset(&gPlayerEntity, this); this->x.HALF.HI += gUnk_080CB5E4[(this->field_0xf++ & 0xe) >> 1]; diff --git a/src/enemy/bladeTrap.c b/src/enemy/bladeTrap.c index 70fd869c..ecad5157 100644 --- a/src/enemy/bladeTrap.c +++ b/src/enemy/bladeTrap.c @@ -1,4 +1,3 @@ -#include "global.h" #include "audio.h" #include "entity.h" #include "room.h" @@ -13,7 +12,7 @@ void BladeTrap(Entity* this) { sub_080A2CC0(this, &this->child, &this->field_0x74); } if (!(this->direction & 0x80)) { - sub_0806F69C(this); + LinearMoveUpdate(this); } if (!(--this->field_0x74.HWORD)) { diff --git a/src/enemy/bombPeahat.c b/src/enemy/bombPeahat.c index 71e0540d..45800c5c 100644 --- a/src/enemy/bombPeahat.c +++ b/src/enemy/bombPeahat.c @@ -1,5 +1,4 @@ #include "asm.h" -#include "global.h" #include "entity.h" #include "enemy.h" #include "player.h" @@ -280,7 +279,7 @@ ASM_FUNC("asm/non_matching/eu/sub_0802AC40.inc", void sub_0802AC40(Entity* this) #else void sub_0802AC40(Entity* this) { GetNextFrame(this); - sub_0806F69C(this); + LinearMoveUpdate(this); if (this->field_0x7a.HALF.LO) { if (sub_0802B234(this) == 0) { this->field_0x7a.HALF.LO = 0; diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c index e53d46e5..e6b544b3 100644 --- a/src/enemy/businessScrub.c +++ b/src/enemy/businessScrub.c @@ -1,15 +1,11 @@ #include "asm.h" #include "enemy.h" -#include "audio.h" -#include "entity.h" -#include "flags.h" #include "textbox.h" #include "save.h" #include "npc.h" #include "functions.h" -#include "effects.h" +#include "overworld.h" -extern void LoadObjPalette(Entity*, u32); extern Entity* sub_08049DF4(u32); extern bool32 sub_08056338(void); extern void UnloadOBJPalette(Entity*); diff --git a/src/enemy/chaser.c b/src/enemy/chaser.c index 869fbfc0..af6f4b86 100644 --- a/src/enemy/chaser.c +++ b/src/enemy/chaser.c @@ -1,5 +1,4 @@ #include "enemy.h" -#include "entity.h" #include "functions.h" extern s32 sub_080012DC(Entity*); diff --git a/src/enemy/chuchu.c b/src/enemy/chuchu.c index eb77023e..9f10023a 100644 --- a/src/enemy/chuchu.c +++ b/src/enemy/chuchu.c @@ -1,8 +1,6 @@ #include "asm.h" #include "enemy.h" -#include "entity.h" #include "functions.h" -#include "audio.h" extern s32 sub_080012DC(Entity*); extern void sub_08001318(Entity*); diff --git a/src/enemy/chuchuBoss.c b/src/enemy/chuchuBoss.c index 4127be53..29c1611c 100644 --- a/src/enemy/chuchuBoss.c +++ b/src/enemy/chuchuBoss.c @@ -1,6 +1,4 @@ #include "enemy.h" -#include "entity.h" -#include "functions.h" void sub_08027870(Entity*); diff --git a/src/enemy/doorMimic.c b/src/enemy/doorMimic.c index ab1531fb..299601f8 100644 --- a/src/enemy/doorMimic.c +++ b/src/enemy/doorMimic.c @@ -1,8 +1,6 @@ #include "audio.h" #include "enemy.h" -#include "entity.h" #include "functions.h" -#include "effects.h" extern s16 sub_080001DA(u32, u32); // ? extern void sub_08049CF4(); diff --git a/src/enemy/enemyE.c b/src/enemy/enemyE.c index 6835be88..5f712d7d 100644 --- a/src/enemy/enemyE.c +++ b/src/enemy/enemyE.c @@ -1,5 +1,4 @@ #include "enemy.h" -#include "entity.h" #include "functions.h" void sub_08023000(Entity*, int); diff --git a/src/enemy/fallingBoulder.c b/src/enemy/fallingBoulder.c index 7e4ddde1..e7edf50f 100644 --- a/src/enemy/fallingBoulder.c +++ b/src/enemy/fallingBoulder.c @@ -110,7 +110,7 @@ NONMATCH("asm/non_matching/fallingBoulder/sub_0802C334.inc", void sub_0802C334(E if (y >= 5) { sub_080AEFB4(this); } else { - sub_0806F69C(this); + LinearMoveUpdate(this); if (this->z.HALF.HI - y > 0x38) { sub_0802C62C(this); this->field_0x7a.HWORD = (Random() & 0x7f) | 0x80; diff --git a/src/enemy/fireballGuy.c b/src/enemy/fireballGuy.c index ebeaaf1f..8b2fc55a 100644 --- a/src/enemy/fireballGuy.c +++ b/src/enemy/fireballGuy.c @@ -13,8 +13,6 @@ extern void (*const gUnk_080D1800[])(Entity*); extern u8 gUnk_080D180C[4]; // Entity count per form extern PosOffset gUnk_080D1810[4]; -extern u8 gEntCount; - void FireballGuy(Entity* this) { EnemyFunctionHandler(this, gUnk_080D17E8); } diff --git a/src/enemy/gyorgMale.c b/src/enemy/gyorgMale.c index 40497928..95aac9ab 100644 --- a/src/enemy/gyorgMale.c +++ b/src/enemy/gyorgMale.c @@ -3,7 +3,6 @@ #include "player.h" #include "fileScreen.h" #include "functions.h" -#include "effects.h" void (*const gUnk_080D1AFC[8])(Entity*); void (*const gUnk_080D1B1C[7])(Entity*); diff --git a/src/enemy/hangingSeed.c b/src/enemy/hangingSeed.c index 2b582b57..d63e3650 100644 --- a/src/enemy/hangingSeed.c +++ b/src/enemy/hangingSeed.c @@ -1,7 +1,6 @@ #include "entity.h" #include "enemy.h" #include "functions.h" -#include "effects.h" extern void (*const gHangingSeedFunctions[])(Entity*); extern void (*const gUnk_080CB588[])(Entity*); diff --git a/src/enemy/lakituCloud.c b/src/enemy/lakituCloud.c index bb9e6b76..ae2f5a7d 100644 --- a/src/enemy/lakituCloud.c +++ b/src/enemy/lakituCloud.c @@ -85,7 +85,7 @@ void sub_0803CDA8(Entity* this) { UpdateAnimationSingleFrame(this); if ((this->direction & 0x80) == 0) { - sub_0806F69C(this); + LinearMoveUpdate(this); } if (--this->field_0x74.HWORD << 0x10 == 0) { diff --git a/src/enemy/madderpillar.c b/src/enemy/madderpillar.c index 11742547..5750e102 100644 --- a/src/enemy/madderpillar.c +++ b/src/enemy/madderpillar.c @@ -1,7 +1,6 @@ #include "enemy.h" #include "functions.h" -extern u8 gEntCount; extern Hitbox gUnk_080FD298; extern Hitbox gUnk_080FD2A0; diff --git a/src/enemy/mazaalBracelet.c b/src/enemy/mazaalBracelet.c index 584dd185..8076c212 100644 --- a/src/enemy/mazaalBracelet.c +++ b/src/enemy/mazaalBracelet.c @@ -85,7 +85,6 @@ void sub_0803B978(Entity*); void sub_0803BA6C(Entity*); void sub_0803BA80(Entity*); -extern u8 gEntCount; // these are not with the rest of this files constant data extern Hitbox gUnk_080FD35C; extern Hitbox gUnk_080FD364; @@ -242,7 +241,7 @@ void sub_0803A364(Entity* this) { break; case 5: if (sub_0803B4E4(this) == 0) { - sub_0806F69C(this); + LinearMoveUpdate(this); return; } this->type2 = 0; @@ -325,7 +324,7 @@ void sub_0803A548(Entity* this) { index = ((this->parent->field_0xf >> 4) + 3); this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4; if (sub_0803B4E4(this) == 0) { - sub_0806F69C(this); + LinearMoveUpdate(this); } } @@ -339,7 +338,7 @@ void sub_0803A58C(Entity* this) { if (sub_0803B4E4(this) != 0) { sub_0803B59C(this); } else { - sub_0806F69C(this); + LinearMoveUpdate(this); } } @@ -408,7 +407,7 @@ void sub_0803A6E8(Entity* this) { this->actionDelay = 10; } else { sub_0803B63C(this); - sub_0806F69C(this); + LinearMoveUpdate(this); y = this->parent->y.HALF.HI + 8; if (y > this->y.HALF.HI) { this->y.HALF.HI = y; @@ -468,7 +467,7 @@ void sub_0803A7CC(Entity* this) { this->action = 0xd; InitAnimationForceUpdate(this->child, 6); } else { - sub_0806F69C(this); + LinearMoveUpdate(this); } } @@ -527,7 +526,7 @@ void sub_0803A90C(Entity* this) { this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4; GetNextFrame(this); sub_0803B55C(this); - sub_0806F69C(this); + LinearMoveUpdate(this); this->actionDelay--; if (this->actionDelay == 0) { this->action = 0x11; @@ -550,7 +549,7 @@ void sub_0803A978(Entity* this) { if ((++this->actionDelay & 3) == 0) { sub_08004596(this, 0x10); } - sub_0806F69C(this); + LinearMoveUpdate(this); if (this->direction == 0x10) { this->action = 0x12; this->actionDelay = 3; @@ -574,7 +573,7 @@ void sub_0803AA00(Entity* this) { if ((++this->actionDelay & 3) == 0) { sub_08004596(this, direction); } - sub_0806F69C(this); + LinearMoveUpdate(this); if ((this->direction == direction) || (this->y.HALF.HI >= gPlayerEntity.y.HALF.HI)) { this->action = 0x13; this->spriteSettings.draw = 0; @@ -594,7 +593,7 @@ NONMATCH("asm/non_matching/mazaal/sub_0803AA98.inc", void sub_0803AA98(Entity* t index = ((this->parent->field_0xf >> 4) + 3); this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4; if (sub_0803B870(this) == 0) { - sub_0806F69C(this); + LinearMoveUpdate(this); if (sub_0803B6F4(this) != 0) { this->action = 0x14; this->speed = 0x40; @@ -616,7 +615,7 @@ void sub_0803AB10(Entity* this) { ptr = gUnk_080CED6C; index = ((this->parent->field_0xf >> 4) + 3); this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4; - sub_0806F69C(this); + LinearMoveUpdate(this); sub_0803B55C(this); if ((this->child->frame & 0x80) != 0) { this->action = 0x15; @@ -667,7 +666,7 @@ void sub_0803AC1C(Entity* this) { if (sub_0803B4E4(this)) { sub_0803B59C(this); } else { - sub_0806F69C(this); + LinearMoveUpdate(this); } } @@ -685,7 +684,7 @@ void sub_0803AC60(Entity* this) { this->subAction = 0; this->actionDelay = 0x1e; } else { - sub_0806F69C(this); + LinearMoveUpdate(this); } } else { this->actionDelay = this->actionDelay - 1; @@ -788,7 +787,7 @@ void sub_0803AE48(Entity* this) { InitializeAnimation(this, 4); } else { if (sub_0803B4E4(this) == 0) { - sub_0806F69C(this); + LinearMoveUpdate(this); } } } @@ -1049,7 +1048,7 @@ void sub_0803B398(Entity* this) { InitializeAnimation(this, 4); InitAnimationForceUpdate(this->child, 0); } else { - sub_0806F69C(this); + LinearMoveUpdate(this); } } @@ -1214,7 +1213,7 @@ void sub_0803B724(Entity* param_1) { pEVar1->x.HALF.HI = (random_value & 0x70) + temp + gRoomControls.roomOriginX; pEVar1->y.HALF.HI = ((random_value >> 0x10) & 7) * 10 + 0x5c + gRoomControls.roomOriginY; pEVar1->parent = param_1; - sub_08016A30(pEVar1); + ResolveCollisionLayer(pEVar1); param_1->field_0xf++; param_1->cutsceneBeh.HALF.LO--; } diff --git a/src/enemy/mazaalHand.c b/src/enemy/mazaalHand.c index c429e428..2a64cd24 100644 --- a/src/enemy/mazaalHand.c +++ b/src/enemy/mazaalHand.c @@ -1,4 +1,3 @@ -#include "global.h" #include "entity.h" void sub_08035194(Entity*); diff --git a/src/enemy/mazaalHead.c b/src/enemy/mazaalHead.c index 2b59e960..64f9b1c1 100644 --- a/src/enemy/mazaalHead.c +++ b/src/enemy/mazaalHead.c @@ -5,8 +5,6 @@ extern void UnloadOBJPalette(Entity*); -extern u8 gEntCount; - void sub_0803499C(Entity*); void sub_08034420(Entity*); void sub_08034830(Entity*); @@ -220,7 +218,7 @@ void sub_08033FFC(Entity* this) { gRoomControls.cameraTarget = &gPlayerEntity; sub_08034420(this); gPlayerState.controlMode = 1; - sub_080791D0(); + ResetPlayerAnimationAndAction(); SoundReq(BGM_BOSS_THEME); } } @@ -243,7 +241,7 @@ void sub_0803414C(Entity* this) { } } else { this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, x, y); - sub_0806F69C(this); + LinearMoveUpdate(this); } } @@ -562,7 +560,7 @@ NONMATCH("asm/non_matching/mazaal/sub_0803473C.inc", void sub_0803473C(Entity* t direction = 0x18; } this->direction = direction; - sub_0806F69C(this); + LinearMoveUpdate(this); } END_NONMATCH @@ -585,7 +583,7 @@ NONMATCH("asm/non_matching/mazaal/sub_080347B4.inc", void sub_080347B4(Entity* t direction = 0x18; } this->direction = direction; - sub_0806F69C(this); + LinearMoveUpdate(this); } END_NONMATCH diff --git a/src/enemy/moldorm.c b/src/enemy/moldorm.c index 767254f9..33a1fa8b 100644 --- a/src/enemy/moldorm.c +++ b/src/enemy/moldorm.c @@ -9,7 +9,6 @@ extern void (*const gUnk_080CBBA0[])(Entity*); extern void (*const gUnk_080CBBB4[])(Entity*); extern void (*const gUnk_080CBBBC[])(Entity*); -extern u8 gEntCount; extern const s8 gUnk_080CBBC4[]; void Moldorm(Entity* this) { diff --git a/src/enemy/moldworm.c b/src/enemy/moldworm.c index 3a0425ef..350fb3fc 100644 --- a/src/enemy/moldworm.c +++ b/src/enemy/moldworm.c @@ -14,7 +14,6 @@ void sub_0802390C(Entity*); void sub_080239F0(Entity*); bool32 sub_08023B38(Entity*); -extern u8 gEntCount; extern const u8 gUnk_080B37A0[]; extern void (*const gUnk_080CBC38[])(Entity*); diff --git a/src/enemy/octorokBoss.c b/src/enemy/octorokBoss.c index 0730b642..1d1c6ab3 100644 --- a/src/enemy/octorokBoss.c +++ b/src/enemy/octorokBoss.c @@ -2,7 +2,6 @@ #include "functions.h" #include "object.h" #include "projectile.h" -#include "structures.h" #include "overworld.h" extern void sub_08078AC0(u32, u32, u32); @@ -36,25 +35,25 @@ this->field_0x7c.BYTES.byte0 Boss Phase 3: frozen 2 4: unfrozen -> death */ -#define IS_FROZEN(this) (this->field_0x7c.BYTES.byte0 & 1) -#define GET_BOSS_PHASE(this) (this->field_0x7c.BYTES.byte0) +#define IS_FROZEN(this) ((this)->field_0x7c.BYTES.byte0 & 1) +#define GET_BOSS_PHASE(this) ((this)->field_0x7c.BYTES.byte0) /* this->field_0x78.HALF.HI reused timer */ -#define GET_TIMER(this) this->field_0x78.HALF.HI +#define GET_TIMER(this) ((this)->field_0x78.HALF.HI) /* this->field_0x78.HALF.LO turns until the next attack */ -#define GET_ATTACK_WAIT_TURNS(this) this->field_0x78.HALF.LO +#define GET_ATTACK_WAIT_TURNS(this) ((this)->field_0x78.HALF.LO) /* this->field_0x7a.HALF.HI angle of legs */ -#define GET_ANGLE(this) this->field_0x7a.HWORD -#define GET_ANGLE_HI(this) this->field_0x7a.HALF.HI +#define GET_ANGLE(this) ((this)->field_0x7a.HWORD) +#define GET_ANGLE_HI(this) ((this)->field_0x7a.HALF.HI) /* this->field_0x82.HWORD angular speed */ -#define GET_ANGULAR_VEL(this) this->field_0x82.HWORD +#define GET_ANGULAR_VEL(this) ((this)->field_0x82.HWORD) enum OctorokBossPart { WHOLE, LEG_BR, LEG_FR, LEG_FL, LEG_BL, MOUTH, TAIL_END, TAIL }; enum OctorokBossAction { diff --git a/src/enemy/peahat.c b/src/enemy/peahat.c index 804ccba6..08ec53a4 100644 --- a/src/enemy/peahat.c +++ b/src/enemy/peahat.c @@ -343,7 +343,7 @@ void PeahatPropeller_Fly(Entity* this) { this->spriteSettings.draw ^= 1; this->z.WORD -= 0xc000; - sub_0806F69C(this); + LinearMoveUpdate(this); if (--this->field_0xf == 0) { this->field_0xf = 40; this->direction = (Random() & 0x10) + 8; diff --git a/src/enemy/pesto.c b/src/enemy/pesto.c index fc987dd7..73bc1509 100644 --- a/src/enemy/pesto.c +++ b/src/enemy/pesto.c @@ -9,7 +9,6 @@ extern void SoundReqClipped(Entity*, u32); extern u32 sub_08049F1C(Entity*, Entity*, u32); extern u32 PlayerInRange(Entity*, u32, u32); extern void sub_080AEFB4(Entity*); -extern Entity* FindNextDuplicateID(Entity* ent, int listIndex); void sub_080249F4(Entity*); void sub_08024940(Entity*); diff --git a/src/enemy/ropeGolden.c b/src/enemy/ropeGolden.c index 1e63b5df..136d14c3 100644 --- a/src/enemy/ropeGolden.c +++ b/src/enemy/ropeGolden.c @@ -1,6 +1,5 @@ #include "global.h" #include "entity.h" -#include "sprite.h" #include "functions.h" #include "enemy.h" @@ -9,8 +8,6 @@ extern void (*const gUnk_080CF4C8[6])(Entity*); extern void (*const gUnk_080CF4E0[4])(Entity*); extern s32 sub_080012DC(Entity*); -extern void SetGlobalFlag(u32); -extern u32 CheckGlobalFlag(u32); extern u32 sub_0804A044(Entity*, Entity*, u32); void sub_080383AC(Entity*); diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c index ee274ac7..351c56a1 100644 --- a/src/enemy/rupeeLike.c +++ b/src/enemy/rupeeLike.c @@ -3,11 +3,9 @@ #include "audio.h" #include "entity.h" #include "enemy.h" -#include "npc.h" -#include "player.h" -#include "save.h" #include "object.h" #include "functions.h" +#include "save.h" extern void sub_080293DC(Entity*); extern void sub_080296D8(Entity*); diff --git a/src/enemy/sensorBladeTrap.c b/src/enemy/sensorBladeTrap.c index 40ad4f03..2e99de0e 100644 --- a/src/enemy/sensorBladeTrap.c +++ b/src/enemy/sensorBladeTrap.c @@ -1,6 +1,4 @@ #include "enemy.h" -#include "audio.h" -#include "functions.h" extern u32 sub_0804A024(Entity*, u32, u32); extern bool32 sub_080AE4CC(Entity*, u32, u32, u32); diff --git a/src/enemy/slime.c b/src/enemy/slime.c index 86069f50..06297e37 100644 --- a/src/enemy/slime.c +++ b/src/enemy/slime.c @@ -16,8 +16,6 @@ extern void (*const gUnk_080D16A4[])(Entity*); extern u8 gUnk_080D16D0[4]; // Entity count per form extern PosOffset gUnk_080D16D4[4]; -extern u8 gEntCount; - void Slime(Entity* this) { EnemyFunctionHandler(this, gUnk_080D16A4); SetChildOffset(this, 0, 1, -12); diff --git a/src/enemy/smallPesto.c b/src/enemy/smallPesto.c index b8fdc5db..ec6d93ca 100644 --- a/src/enemy/smallPesto.c +++ b/src/enemy/smallPesto.c @@ -94,7 +94,7 @@ void sub_08031770(Entity* this) { void sub_080317B4(Entity* this) { this->z.HALF.HI = ((Random() & 0x30) != 0) ? -0xc : -0xd; - sub_0806F69C(this); + LinearMoveUpdate(this); GetNextFrame(this); } diff --git a/src/enemy/spark.c b/src/enemy/spark.c index cbbdb587..d96bdfaa 100644 --- a/src/enemy/spark.c +++ b/src/enemy/spark.c @@ -1,8 +1,6 @@ #include "enemy.h" -#include "entity.h" #include "object.h" #include "functions.h" -#include "effects.h" extern void (*const gUnk_080CD234[])(Entity*); extern void (*const gUnk_080CD24C[])(Entity*); diff --git a/src/enemy/treeItem.c b/src/enemy/treeItem.c index ddc645dd..c1383be0 100644 --- a/src/enemy/treeItem.c +++ b/src/enemy/treeItem.c @@ -1,8 +1,6 @@ #include "global.h" #include "enemy.h" -#include "entity.h" #include "object.h" -#include "functions.h" static bool32 ShouldSpawnTreeItem(Entity*); diff --git a/src/enemy/vaatiArm.c b/src/enemy/vaatiArm.c index 7882441e..27a946f5 100644 --- a/src/enemy/vaatiArm.c +++ b/src/enemy/vaatiArm.c @@ -2,8 +2,6 @@ #include "object.h" #include "functions.h" -extern void DoExitTransition(ScreenTransitionData*); - typedef struct VaatiArm_HeapStruct1 { union SplitHWord unk00; u16 unk02; @@ -165,7 +163,6 @@ const u16 gUnk_080D140E[] = { -0x6000, -0x5000, -0x4000 }; const u8 gUnk_080D1414[] = { 0, 0xc, 0xe, 0x10, 0x1c }; const u8 gUnk_080D1419[] = { 0, 0xa, 0xa, 0xa, 0x1c }; -extern u8 gEntCount; extern const Hitbox gUnk_080FD450; extern const Hitbox gUnk_080FD538; diff --git a/src/enemy/vaatiBall.c b/src/enemy/vaatiBall.c index c060f5b9..68e5be20 100644 --- a/src/enemy/vaatiBall.c +++ b/src/enemy/vaatiBall.c @@ -1,9 +1,7 @@ #include "entity.h" #include "enemy.h" #include "player.h" -#include "screen.h" #include "object.h" -#include "audio.h" #include "functions.h" typedef struct { @@ -112,7 +110,7 @@ void sub_0804474C(Entity* this) { this->direction++; this->direction &= 0x1f; } - sub_0806F69C(this); + LinearMoveUpdate(this); UpdateAnimationSingleFrame(this); } } @@ -164,7 +162,7 @@ void sub_08044868(Entity* this) { } break; case 1: - sub_0806F69C(this); + LinearMoveUpdate(this); if (sub_0806FCB8(this, vaati->x.HALF.HI, vaati->y.HALF.HI - 0x10, 0xc)) { this->field_0x74.HALF.LO++; this->x.HALF.HI = vaati->x.HALF.HI; @@ -200,7 +198,7 @@ void sub_08044868(Entity* this) { case 2: if (this->actionDelay) if (--this->actionDelay < 0x11) - sub_0806F69C(this); + LinearMoveUpdate(this); break; case 3: { u8 draw; @@ -229,7 +227,7 @@ void sub_080449F8(Entity* this) { switch (vaati->field_0x74.HALF.LO) { case 0: - sub_0806F69C(this); + LinearMoveUpdate(this); if (--this->actionDelay) break; @@ -254,17 +252,17 @@ void sub_080449F8(Entity* this) { break; case 1: this->direction = (this->direction + 0x10) & 0x1f; - sub_0806F69C(this); + LinearMoveUpdate(this); this->direction = (this->direction + 0x10) & 0x1f; this->actionDelay = 2; break; case 3: - sub_0806F69C(this); + LinearMoveUpdate(this); this->actionDelay = 2; break; case 4: - sub_0806F69C(this); - sub_0806F69C(this); + LinearMoveUpdate(this); + LinearMoveUpdate(this); this->actionDelay = 2; break; } @@ -305,7 +303,7 @@ void sub_08044B04(Entity* this) { switch (vaati->field_0x74.HALF.LO) { case 0: - sub_0806F69C(this); + LinearMoveUpdate(this); switch (this->field_0x74.HALF.LO) { case 0: if (--this->actionDelay == 0) { @@ -420,7 +418,7 @@ void sub_08044B04(Entity* this) { } break; case 1: - sub_0806F69C(this); + LinearMoveUpdate(this); if (--this->actionDelay == 0) this->field_0x74.HALF.LO++; break; @@ -472,11 +470,11 @@ void sub_08044E74(Entity* this, u32 state) { this->direction &= 0x1f; PositionRelative(this->parent, this, 0, -0x100000); this->speed = 12288; - sub_0806F69C(this); + LinearMoveUpdate(this); this->direction += 0x8; this->direction &= 0x1f; this->speed = 1280; - sub_0806F69C(this); + LinearMoveUpdate(this); break; case 1: this->direction = (this->direction + 8) & 0x1f; @@ -486,18 +484,18 @@ void sub_08044E74(Entity* this, u32 state) { switch (this->actionDelay) { case 3 ... 4: do { - sub_0806F69C(this); + LinearMoveUpdate(this); } while (this->actionDelay-- != 3); break; case 1: this->direction = (this->direction + 0x10) & 0x1f; - sub_0806F69C(this); + LinearMoveUpdate(this); this->direction = (this->direction + 0x10) & 0x1f; break; } } else { if (this->actionDelay == 2) { - sub_0806F69C(this); + LinearMoveUpdate(this); } } break; diff --git a/src/enemy/vaatiEyesMacro.c b/src/enemy/vaatiEyesMacro.c index be77a617..89fb894f 100644 --- a/src/enemy/vaatiEyesMacro.c +++ b/src/enemy/vaatiEyesMacro.c @@ -43,8 +43,6 @@ const u8 gUnk_080CDE70[] = { const s8 gUnk_080CDE90[] = { -2, -3, -4, -5, -6, -5, -4, -3 }; const u16 gUnk_080CDE98[] = { 0xc0, 0x100, 0x140, 0x180 }; -extern u8 gEntCount; - void VaatiEyesMacro(Entity* this) { vaatiEyesMacroFunctions[GetNextFunction(this)](this); SetChildOffset(this, 0, 1, -0x10); diff --git a/src/enemy/vaatiProjectile.c b/src/enemy/vaatiProjectile.c index 2efae6f5..b708275f 100644 --- a/src/enemy/vaatiProjectile.c +++ b/src/enemy/vaatiProjectile.c @@ -2,7 +2,6 @@ #include "functions.h" extern bool32 PlayerInRange(Entity*, u32, u32); -extern void DoExitTransition(ScreenTransitionData*); extern u32 sub_080002E0(u32, u32); extern Entity* gUnk_020000B0; extern const ScreenTransitionData gUnk_0813AB94; @@ -131,7 +130,7 @@ void VaatiProjectileFunction0Action1(Entity* this) { } else { if (gUnk_020000B0 != NULL) { sub_08004596(this, GetFacingDirection(this, gUnk_020000B0)); - sub_0806F69C(this); + LinearMoveUpdate(this); } } GetNextFrame(this); @@ -191,7 +190,7 @@ void VaatiProjectileFunction0Action6(Entity* this) { void VaatiProjectileFunction0Action7(Entity* this) { sub_0803E444(this); - sub_0806F69C(this); + LinearMoveUpdate(this); sub_0803E4D8(this); if ((gRoomControls.roomOriginY + gRoomControls.height + -0x10) <= this->y.HALF.HI) { SetInitializationPriority(); diff --git a/src/enemy/vaatiRebornEnemy.c b/src/enemy/vaatiRebornEnemy.c index f3ccf3bb..5891ed20 100644 --- a/src/enemy/vaatiRebornEnemy.c +++ b/src/enemy/vaatiRebornEnemy.c @@ -3,7 +3,6 @@ #include "functions.h" extern void sub_080AEFB4(Entity*); -extern u8 gEntCount; void VaatiRebornEnemyType0PreAction(Entity*); void VaatiRebornEnemyType1PreAction(Entity*); diff --git a/src/enemy/vaatiTransfigured.c b/src/enemy/vaatiTransfigured.c index bd462e33..b4fc508f 100644 --- a/src/enemy/vaatiTransfigured.c +++ b/src/enemy/vaatiTransfigured.c @@ -37,7 +37,6 @@ typedef struct { s8 x; s8 y; } PACKED xy; -extern u8 gEntCount; #ifdef EU const u8 gUnk_080D0ABC[] = { 0xf0, 0xd0, 0xb0 }; @@ -288,7 +287,7 @@ void VaatiTransfiguredType0Action3(Entity* this) { if (this->animationState > 2) { this->action = 7; this->actionDelay = 0xe0; - sub_0807A108(); + DeleteClones(); SoundReq(SFX_BOSS_HIT); return; } diff --git a/src/enemy/vaatiTransfiguredEye.c b/src/enemy/vaatiTransfiguredEye.c index 78fa065e..f43e6290 100644 --- a/src/enemy/vaatiTransfiguredEye.c +++ b/src/enemy/vaatiTransfiguredEye.c @@ -1,6 +1,5 @@ #include "entity.h" #include "enemy.h" -#include "audio.h" #include "textbox.h" #include "coord.h" #include "functions.h" diff --git a/src/enemy/vaatiWrath.c b/src/enemy/vaatiWrath.c index eef8e73e..49049925 100644 --- a/src/enemy/vaatiWrath.c +++ b/src/enemy/vaatiWrath.c @@ -1,13 +1,10 @@ #include "enemy.h" #include "object.h" #include "textbox.h" -#include "structures.h" #include "functions.h" #include "save.h" #include "screen.h" -extern u8 gEntCount; - void VaatiWrathType0PreAction(Entity*); u32 sub_08041FCC(Entity*); void sub_08042004(Entity*); @@ -380,7 +377,7 @@ void VaatiWrathType0Action7(Entity* this) { if (gRoomControls.roomOriginY + 0x48 != this->y.HALF.HI) { this->speed = 0x100; this->direction = ((gRoomControls.roomOriginY + 0x48) >= this->y.HALF.HI) ? 0x10 : 0; - sub_0806F69C(this); + LinearMoveUpdate(this); } else { if (--this->actionDelay == 0) { sub_08042050(this); @@ -391,7 +388,7 @@ void VaatiWrathType0Action7(Entity* this) { void VaatiWrathType0Action8(Entity* this) { sub_08042004(this); UpdateAnimationSingleFrame(this); - sub_0806F69C(this); + LinearMoveUpdate(this); if (((gRoomControls.roomOriginX + 0x20) > this->x.HALF.HI) || ((gRoomControls.roomOriginX + 0x140) < this->x.HALF.HI)) { if (0x3f < this->speed) { @@ -466,7 +463,7 @@ void VaatiWrathType0ActionA(Entity* this) { void VaatiWrathType0ActionB(Entity* this) { switch (this->subAction) { case 0: - sub_0806F69C(this); + LinearMoveUpdate(this); UpdateAnimationSingleFrame(this); GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type1); GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2); @@ -527,7 +524,7 @@ void VaatiWrathType0ActionC(Entity* this) { if (this->actionDelay) { this->actionDelay--; } else { - sub_0806F69C(this); + LinearMoveUpdate(this); if (gRoomControls.roomOriginY + 0x48 == this->y.HALF.HI) { this->subAction = 2; InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type1, 0x11); diff --git a/src/enemy/vaatiWrathEye.c b/src/enemy/vaatiWrathEye.c index d8590edc..9cb316c7 100644 --- a/src/enemy/vaatiWrathEye.c +++ b/src/enemy/vaatiWrathEye.c @@ -1,5 +1,4 @@ #include "enemy.h" -#include "structures.h" #include "functions.h" void sub_080485D8(Entity*); @@ -82,7 +81,7 @@ void VaatiWrathEyeAction3(Entity* this) { y = parent->y.HALF.HI + ptr[1]; direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, x, y); this->direction = direction; - sub_0806F69C(this); + LinearMoveUpdate(this); this->z.HALF.HI = this->parent->z.HALF.HI; if ((this->x.HALF.HI == x) && (this->y.HALF.HI == y)) { this->action = 4; diff --git a/src/enemy/wallMaster2.c b/src/enemy/wallMaster2.c index 73deb8da..05778ce1 100644 --- a/src/enemy/wallMaster2.c +++ b/src/enemy/wallMaster2.c @@ -92,7 +92,7 @@ void sub_0802CD54(Entity* this) { this->actionDelay = 60; sub_0802CF64(this); } - sub_0806F69C(this); + LinearMoveUpdate(this); } void sub_0802CDE8(Entity* this) { @@ -101,7 +101,7 @@ void sub_0802CDE8(Entity* this) { sub_08004596(this, GetFacingDirection(this, gUnk_020000B0)); sub_0802CF8C(this); } - sub_0806F69C(this); + LinearMoveUpdate(this); } else { this->action = 1; this->actionDelay = 60; @@ -120,7 +120,7 @@ void sub_0802CE68(Entity* this) { gPlayerState.flags |= 0x100; if (!sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 4)) { this->direction = GetFacingDirection(this, &gPlayerEntity); - sub_0806F69C(this); + LinearMoveUpdate(this); } sub_0802CFD8(this); GetNextFrame(this); diff --git a/src/enemy/waterDrop.c b/src/enemy/waterDrop.c index fc63d632..8ee1a6db 100644 --- a/src/enemy/waterDrop.c +++ b/src/enemy/waterDrop.c @@ -2,7 +2,6 @@ #include "screen.h" #include "object.h" #include "structures.h" -#include "functions.h" void sub_0802A39C(Entity*); void sub_0802A334(Entity*); @@ -39,7 +38,7 @@ void sub_0802A2B4(Entity* this) { this->spritePriority.b0 = 7; EnqueueSFX(0x84); } else { - sub_0806F69C(this); + LinearMoveUpdate(this); } sub_0802A39C(this); diff --git a/src/entity.c b/src/entity.c index 85979ca8..a2d4085f 100644 --- a/src/entity.c +++ b/src/entity.c @@ -1,10 +1,7 @@ #include "global.h" #include "utils.h" #include "functions.h" -#include "entity.h" #include "area.h" -#include "room.h" -#include "script.h" #include "textbox.h" #include "npc.h" @@ -18,12 +15,9 @@ void sub_0805EE88(void); void ClearAllDeletedEntities(void); void DeleteAllEntities(void); void sub_0805E98C(void); -extern void sub_080AE068(); extern void UnloadOBJPalette(); extern void sub_0806FE84(); -extern void sub_080788E0(); extern void sub_08078954(); -extern void sub_0805EC60(); extern void sub_08017744(Entity*); extern void UnloadHitbox(); extern void sub_0804AA1C(); @@ -31,7 +25,6 @@ extern void sub_0804AA1C(); extern void _ClearAndUpdateEntities(); extern void UpdateEntities_arm(u32); -void SetPriorityTimer(u32); static void UpdatePriorityTimer(void); static void ReleaseTransitionManager(); static void UnlinkEntity(); @@ -256,8 +249,6 @@ Entity* sub_0805E744(void) { return NULL; } -Manager* GetEmptyManager(void); - typedef void* (*Getter)(void); void* GetEmptyEntityByKind(u32 kind) { @@ -277,8 +268,6 @@ void DeleteThisEntity(void) { f(); } -void DeleteManager(void*); - typedef void (*Deleter)(void*); void DeleteEntityAny(Entity* ent) { @@ -320,7 +309,6 @@ void DeleteEntity(Entity* ent) { } } -extern Entity gPlayerEntity; void ClearDeletedEntity(Entity*); void ClearAllDeletedEntities(void) { @@ -333,8 +321,6 @@ void ClearAllDeletedEntities(void) { } while (ent++, ent < (&gPlayerEntity + 80)); } -extern u8 gEntCount; - void ClearDeletedEntity(Entity* ent) { DmaClear32(3, ent, sizeof(Entity)); gEntCount--; @@ -357,8 +343,6 @@ void DeleteAllEntities(void) { } } -extern Manager gUnk_02033290; - typedef struct Temp { void* prev; void* next; @@ -376,8 +360,6 @@ Manager* GetEmptyManager(void) { return NULL; } -extern u8 gManagerCount; - void DeleteManager(void* ent) { Manager* manager = (Manager*)ent; if (!manager->next) @@ -399,7 +381,6 @@ void ReleaseTransitionManager(void* mgr) { } extern Entity gUnk_020369F0; -void sub_0805E98C(void); void sub_0805E958(void) { MemCopy(&gEntityLists, &gUnk_020369F0, 0x48); @@ -449,8 +430,6 @@ void DeleteSleepingEntities(void) { } while (++list < &gEntityLists[9]); } -extern void sub_0805E374(Entity*); - void AppendEntityToList(Entity* entity, u32 listIndex) { LinkedList* list; diff --git a/src/ezloNag.c b/src/ezloNag.c index 584b13fa..e0edff23 100644 --- a/src/ezloNag.c +++ b/src/ezloNag.c @@ -1,7 +1,6 @@ #include "global.h" #include "audio.h" #include "textbox.h" -#include "structures.h" typedef struct { s8 unk0; diff --git a/src/fade.c b/src/fade.c index 2d107df7..583294a3 100644 --- a/src/fade.c +++ b/src/fade.c @@ -2,7 +2,6 @@ #include "functions.h" #include "screen.h" #include "utils.h" -#include "fade.h" typedef struct { u8 field_0x0; diff --git a/src/fileScreen.c b/src/fileScreen.c index 50f0a4bb..ab3c3729 100644 --- a/src/fileScreen.c +++ b/src/fileScreen.c @@ -1,6 +1,5 @@ #include "fileScreen.h" #include "main.h" -#include "player.h" #include "utils.h" #include "screen.h" #include "menu.h" diff --git a/src/flagDebug.c b/src/flagDebug.c index 4f03efd9..8adb562c 100644 --- a/src/flagDebug.c +++ b/src/flagDebug.c @@ -1,5 +1,3 @@ -#include "flags.h" - const char* const globalFlagNames[] = { "BEGIN", "LV0_CLEAR", diff --git a/src/flags.c b/src/flags.c index 8efa3d5b..ec58ec19 100644 --- a/src/flags.c +++ b/src/flags.c @@ -39,9 +39,9 @@ u32 CheckRoomFlag(u32 flag) { return ReadBit(&gRoomVars.roomFlags, flag); } -u32 CheckLocalFlagsByBank(u32 flag, u32 offset, u32 length) { +u32 CheckLocalFlagsByBank(u32 offset, u32 flag, u32 length) { - return CheckBits(&gGlobalFlags, flag + offset, length); + return CheckBits(&gGlobalFlags, offset + flag, length); } u32 CheckLocalFlags(u32 flag, u32 length) { diff --git a/src/gba/m4a.c b/src/gba/m4a.c index 38c5c9d0..19978368 100644 --- a/src/gba/m4a.c +++ b/src/gba/m4a.c @@ -1,6 +1,5 @@ #include "global.h" #include "gba/m4a.h" -#include "gba/gba.h" // ASCII encoding of 'Smsh' in reverse // This is presumably short for SMASH, the developer of MKS4AGB. diff --git a/src/interrupts.c b/src/interrupts.c index c2855c46..72022c22 100644 --- a/src/interrupts.c +++ b/src/interrupts.c @@ -6,12 +6,9 @@ #include "save.h" #include "textbox.h" #include "functions.h" -#include "object.h" -#include "utils.h" -#include "npc.h" -#include "effects.h" #include "screen.h" #include "gba/m4a.h" +#include "object.h" extern u8 gUnk_03003DE0; extern u8 gUnk_03000C30; @@ -29,13 +26,10 @@ extern void sub_080ADD70(); extern void sub_0801C25C(); extern void UpdateDisplayControls(); extern void LoadResources(); -extern void FadeVBlank(); extern void HandlePlayerLife(); extern void DoPlayerAction(); extern void sub_080171F0(); extern void sub_08078FB0(); -extern u32 CheckDontUpdate(); -extern void DrawEntity(); extern void sub_0807A050(); extern u32 sub_08079B24(); extern void sub_08079708(); @@ -227,7 +221,7 @@ void HandlePlayerLife(Entity* this) { if (gPlayerState.flags & PL_BURNING) ResetPlayer(); if ((gPlayerState.flags & PL_CLONING) && !gPlayerState.field_0xa0[0]) - sub_0807A108(); + DeleteClones(); if (sub_08079B24() == 0) sub_08079708(this); @@ -308,7 +302,7 @@ void sub_080171F0(void) { gPlayerState.field_0xa &= 0xf; gPlayerState.keepFacing &= ~0x80; gPlayerState.field_0x1a[0] = 0; - gPlayerState.field_0x80 = 0; + gPlayerState.speed_modifier = 0; gPlayerState.field_0xaa = 0; MemClear(&gUnk_03003BE0, 0x8c); gPlayerEntity.spriteOffsetY = gPlayerState.field_0x3f; diff --git a/src/intro.c b/src/intro.c index 3095dcb9..30aad962 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1,12 +1,10 @@ #include "audio.h" -#include "global.h" #include "main.h" #include "entity.h" #include "utils.h" #include "screen.h" #include "object.h" #include "textbox.h" -#include "structures.h" #include "functions.h" typedef struct { diff --git a/src/item/itemBoomerang.c b/src/item/itemBoomerang.c index a5505136..eb6c67cc 100644 --- a/src/item/itemBoomerang.c +++ b/src/item/itemBoomerang.c @@ -3,8 +3,6 @@ extern void (*const gUnk_0811BD78[])(ItemBehavior*, u32); -extern void ResetPlayerVelocity(void); - void ItemBoomerang(ItemBehavior* this, u32 arg1) { gUnk_0811BD78[this->stateID](this, arg1); } diff --git a/src/item/itemJarEmpty.c b/src/item/itemJarEmpty.c index a3658dab..4fcf4668 100644 --- a/src/item/itemJarEmpty.c +++ b/src/item/itemJarEmpty.c @@ -5,7 +5,6 @@ extern void (*const gUnk_0811BE28[])(ItemBehavior*, u32); extern u8 gUnk_02002AC8[]; -extern void sub_08077BB8(ItemBehavior*); void ItemJarEmpty(ItemBehavior* this, u32 arg1) { gUnk_0811BE28[this->stateID](this, arg1); diff --git a/src/item/itemMoleMitts.c b/src/item/itemMoleMitts.c index 4e528ce0..82fbecac 100644 --- a/src/item/itemMoleMitts.c +++ b/src/item/itemMoleMitts.c @@ -10,7 +10,7 @@ s32 sub_080774A0(void); extern u8 gUnk_0811BE14[]; extern s32 sub_0800875A(Entity*, u32, ItemBehavior*); -extern void sub_08079E08(); +extern void UpdatePlayerMovement(); void ItemMoleMitts(ItemBehavior* this, u32 arg1) { gUnk_0811BE04[this->stateID](this, arg1); @@ -89,7 +89,7 @@ void sub_08077448(ItemBehavior* this, u32 arg1) { gPlayerEntity.direction = gPlayerEntity.animationState << 2 ^ 0x10; gPlayerEntity.speed = 0x100; if (((this->field_0x5[9] & 1) != 0) && (this->field_0x5[0] != 0)) { - sub_08079E08(); + UpdatePlayerMovement(); } UpdateItemAnim(this); if ((this->field_0x5[9] & 0x80) != 0) { diff --git a/src/item/itemOcarina.c b/src/item/itemOcarina.c index 1f418627..0ea670a5 100644 --- a/src/item/itemOcarina.c +++ b/src/item/itemOcarina.c @@ -5,10 +5,8 @@ extern void (*const gOcarinaStates[4])(ItemBehavior*, u32); extern void ResetPlayerVelocity(void); -extern void SetPlayerEventPriority(void); extern void CreateBird(void); -extern void ResetPlayerEventPriority(void); void ItemOcarina(ItemBehavior* this, u32 arg1) { gOcarinaStates[this->stateID](this, arg1); diff --git a/src/item/itemRocsCape.c b/src/item/itemRocsCape.c index a24967e9..1e649198 100644 --- a/src/item/itemRocsCape.c +++ b/src/item/itemRocsCape.c @@ -5,8 +5,6 @@ void sub_08076758(ItemBehavior*, u32); extern void sub_08077F84(void); -extern bool32 sub_08077EFC(ItemBehavior*); - /*void ItemRocsCape(ItemBehavior* this, u32 arg1) { if (this->stateID != 0) { sub_08076758(this, arg1); diff --git a/src/item/itemSword.c b/src/item/itemSword.c index 4b9f1605..fda041fb 100644 --- a/src/item/itemSword.c +++ b/src/item/itemSword.c @@ -89,7 +89,7 @@ void sub_08075694(ItemBehavior* this, u32 arg1) { gPlayerState.field_0x1a[1] &= 0xdf; if ((gPlayerState.field_0xa0[0] == 0x04) && ((gPlayerState.flags & PL_CLONING) == 0)) { gPlayerState.field_0xa0[0] = 0x01; - sub_0807A108(); + DeleteClones(); } SoundReq(SFX_PLY_VO2); } diff --git a/src/main.c b/src/main.c index 7cd2f92b..6052ad10 100644 --- a/src/main.c +++ b/src/main.c @@ -1,7 +1,5 @@ #include "audio.h" -#include "asm.h" #include "functions.h" -#include "structures.h" #include "main.h" #include "screen.h" #include "utils.h" diff --git a/src/manager/manager10.c b/src/manager/manager10.c index 04e78cd5..7b8460e0 100644 --- a/src/manager/manager10.c +++ b/src/manager/manager10.c @@ -1,4 +1,5 @@ #include "global.h" +#include "asm.h" #include "manager.h" #include "room.h" #include "area.h" @@ -8,7 +9,6 @@ #include "fileScreen.h" #include "functions.h" -void Manager10_Main(Manager10*); void sub_080595E4(Manager10*); void sub_08059608(Manager10*); void sub_08059690(Manager10*); @@ -18,7 +18,6 @@ u32 sub_0805986C(void); void sub_08059894(const u16*, const u16*, u32); u32 sub_080598F8(u32, u32, u32); void sub_08059960(const u16*, const u16*, u16*, u8); -void sub_08059994(void); const u8 gUnk_08108390[6] = { 0x0F, 0x1E, 0x2D, 0x3C, 0x01, 0x01, diff --git a/src/manager/manager11.c b/src/manager/manager11.c index 4a079333..28cbfab9 100644 --- a/src/manager/manager11.c +++ b/src/manager/manager11.c @@ -1,4 +1,3 @@ -#include "global.h" #include "manager.h" #include "flags.h" diff --git a/src/manager/manager12.c b/src/manager/manager12.c index 6a1c5982..630e17e5 100644 --- a/src/manager/manager12.c +++ b/src/manager/manager12.c @@ -1,4 +1,5 @@ #include "area.h" +#include "asm.h" #include "manager.h" #include "room.h" #include "functions.h" @@ -87,7 +88,7 @@ void sub_08059A58(Manager12* this) { } } -#define COMMON(tmp2, tmp1) ((tmp2) >> 4 & 0x3f) | (((tmp1) + 0x188U) >> 4 & 0x3f) << 6 +#define COMMON(tmp2, tmp1) (((tmp2) >> 4 & 0x3f) | (((tmp1) + 0x188U) >> 4 & 0x3f) << 6) void sub_08059B18(void) { u32 loopVar; u32 innerLoopVar; diff --git a/src/manager/manager14.c b/src/manager/manager14.c index 65bb296d..47baf87c 100644 --- a/src/manager/manager14.c +++ b/src/manager/manager14.c @@ -5,7 +5,6 @@ #include "flags.h" #include "coord.h" #include "main.h" -#include "functions.h" typedef struct { Manager manager; @@ -23,7 +22,6 @@ const u16 gUnk_0810859A[] = { 0x808, 0x907, 0xA06, 0x907 }; extern void sub_0805622C(u16*, u32, u32); extern u16 gUnk_02017AA0[]; -void Manager14_Main(Manager14*); void sub_08059E80(Manager14*); void sub_08059EF8(Manager14*); u32 sub_08059F9C(Manager14*); diff --git a/src/manager/manager19.c b/src/manager/manager19.c index 0207ab56..f967c62a 100644 --- a/src/manager/manager19.c +++ b/src/manager/manager19.c @@ -1,7 +1,6 @@ #include "manager.h" #include "area.h" #include "room.h" -#include "functions.h" #include "screen.h" void sub_0805AFFC(Manager*); diff --git a/src/manager/manager1A.c b/src/manager/manager1A.c index b188ef08..dd047611 100644 --- a/src/manager/manager1A.c +++ b/src/manager/manager1A.c @@ -1,7 +1,6 @@ #include "global.h" #include "manager.h" #include "flags.h" -#include "entity.h" #include "room.h" #include "screen.h" #include "utils.h" diff --git a/src/manager/manager1E.c b/src/manager/manager1E.c index b928f10e..0e272fa9 100644 --- a/src/manager/manager1E.c +++ b/src/manager/manager1E.c @@ -1,7 +1,7 @@ #include "global.h" +#include "asm.h" #include "manager.h" #include "flags.h" -#include "functions.h" typedef struct { Manager manager; diff --git a/src/manager/manager2.c b/src/manager/manager2.c index 3f74d209..0294a65f 100644 --- a/src/manager/manager2.c +++ b/src/manager/manager2.c @@ -1,8 +1,6 @@ #include "global.h" -#include "entity.h" #include "screen.h" #include "functions.h" -#include "room.h" typedef struct { Manager manager; diff --git a/src/manager/manager20.c b/src/manager/manager20.c index 4cf749dc..46f4fe20 100644 --- a/src/manager/manager20.c +++ b/src/manager/manager20.c @@ -1,9 +1,7 @@ #include "global.h" #include "manager.h" #include "flags.h" -#include "entity.h" #include "room.h" -#include "functions.h" typedef struct { Manager manager; diff --git a/src/manager/manager21.c b/src/manager/manager21.c index f0cc377a..49003b50 100644 --- a/src/manager/manager21.c +++ b/src/manager/manager21.c @@ -3,7 +3,6 @@ #include "room.h" #include "object.h" #include "functions.h" -#include "flags.h" extern bool32 CheckRectOnScreen(u16, u16, u32, u32); @@ -44,7 +43,7 @@ void Manager21_Main(Manager21* this) { object->x.HALF.HI = gRoomControls.roomOriginX + spawnData->x; object->y.HALF.HI = gRoomControls.roomOriginY + spawnData->y; object->parent = (Entity*)this; - sub_08016A30(object); + ResolveCollisionLayer(object); this->field_0x20 |= 1 << count; } } diff --git a/src/manager/manager24.c b/src/manager/manager24.c index 532fdfd0..e1a9ecee 100644 --- a/src/manager/manager24.c +++ b/src/manager/manager24.c @@ -4,7 +4,6 @@ #include "audio.h" #include "overworld.h" #include "object.h" -#include "area.h" extern void (*const gUnk_08108CDC[])(Manager24*); @@ -16,7 +15,6 @@ extern u32 sub_080002C8(u16, u8); extern void (*const gUnk_08108CE8[])(u32, u32); u32 sub_0805C608(void); -extern u32 CheckIsInteriorWithEnemies(void); extern u8 gUnk_08108CFC[]; diff --git a/src/manager/manager25.c b/src/manager/manager25.c index 3e0e7c9f..78003bc1 100644 --- a/src/manager/manager25.c +++ b/src/manager/manager25.c @@ -1,3 +1,4 @@ +#include "asm.h" #include "manager.h" #include "room.h" #include "functions.h" diff --git a/src/manager/manager26.c b/src/manager/manager26.c index 3a143e21..e06d36d5 100644 --- a/src/manager/manager26.c +++ b/src/manager/manager26.c @@ -1,10 +1,8 @@ #include "global.h" #include "manager.h" -#include "entity.h" #include "flags.h" #include "room.h" #include "object.h" -#include "functions.h" typedef struct { Manager manager; diff --git a/src/manager/manager28.c b/src/manager/manager28.c index 4d4155c7..43e4e8d9 100644 --- a/src/manager/manager28.c +++ b/src/manager/manager28.c @@ -1,9 +1,7 @@ #include "global.h" #include "asm.h" #include "manager.h" -#include "entity.h" #include "room.h" -#include "functions.h" typedef struct { Manager manager; diff --git a/src/manager/manager2A.c b/src/manager/manager2A.c index f82aabd7..a460dc16 100644 --- a/src/manager/manager2A.c +++ b/src/manager/manager2A.c @@ -1,7 +1,7 @@ +#include "asm.h" #include "manager.h" #include "room.h" #include "flags.h" -#include "functions.h" typedef struct { u8 field_0x0; diff --git a/src/manager/manager2B.c b/src/manager/manager2B.c index f4cc8868..112390f6 100644 --- a/src/manager/manager2B.c +++ b/src/manager/manager2B.c @@ -3,7 +3,6 @@ #include "room.h" #include "functions.h" #include "object.h" -#include "audio.h" typedef struct { Manager manager; @@ -27,8 +26,6 @@ typedef struct { extern void (*const gUnk_08108D30[])(Manager2B*); -extern u8 gEntCount; - void sub_0805D11C(Manager2B*); void Manager2B_Main(Manager2B* this) { @@ -50,7 +47,7 @@ void sub_0805D02C(Manager2B* this) { object->x.HALF.HI = objectData[0] + gRoomControls.roomOriginX; object->y.HALF.HI = objectData[1] + gRoomControls.roomOriginY; object->parent = (Entity*)this; - sub_08016A30(object); + ResolveCollisionLayer(object); this->field_0x20[counter] = object; counter += 1; objectData += 3; diff --git a/src/manager/manager2C.c b/src/manager/manager2C.c index 1ff17776..f42c0844 100644 --- a/src/manager/manager2C.c +++ b/src/manager/manager2C.c @@ -1,4 +1,5 @@ #include "manager.h" +#include "asm.h" #include "functions.h" #include "utils.h" diff --git a/src/manager/manager2D.c b/src/manager/manager2D.c index 92aebb64..20d448e6 100644 --- a/src/manager/manager2D.c +++ b/src/manager/manager2D.c @@ -1,3 +1,4 @@ +#include "asm.h" #include "entity.h" #include "functions.h" diff --git a/src/manager/manager3.c b/src/manager/manager3.c index 308de277..b4554896 100644 --- a/src/manager/manager3.c +++ b/src/manager/manager3.c @@ -7,7 +7,6 @@ #include "player.h" #include "audio.h" #include "object.h" -#include "functions.h" // Facilitates the usage of minish portals. diff --git a/src/manager/manager30.c b/src/manager/manager30.c index 94f3be33..307884ea 100644 --- a/src/manager/manager30.c +++ b/src/manager/manager30.c @@ -1,4 +1,5 @@ #include "global.h" +#include "asm.h" #include "audio.h" #include "manager.h" #include "flags.h" diff --git a/src/manager/manager31.c b/src/manager/manager31.c index 1cc7beff..561319d8 100644 --- a/src/manager/manager31.c +++ b/src/manager/manager31.c @@ -3,7 +3,6 @@ #include "flags.h" #include "asm.h" #include "object.h" -#include "room.h" typedef struct { Manager manager; diff --git a/src/manager/manager32.c b/src/manager/manager32.c index 9cb61068..4aec05ba 100644 --- a/src/manager/manager32.c +++ b/src/manager/manager32.c @@ -1,6 +1,5 @@ #include "manager.h" #include "screen.h" -#include "structures.h" #include "room.h" #include "functions.h" #include "area.h" diff --git a/src/manager/manager35.c b/src/manager/manager35.c index cc9090d0..599cdd9f 100644 --- a/src/manager/manager35.c +++ b/src/manager/manager35.c @@ -17,8 +17,6 @@ typedef struct { extern void (*const gUnk_08108D98[])(Manager35*); -extern void RequestPriorityDuration(Entity*, u32); - void Manager35_Main(Manager35* this) { gUnk_08108D98[this->manager.action](this); } @@ -57,7 +55,7 @@ void sub_0805DCC8(Manager35* this) { void sub_0805DD24(Manager35* this) { RequestPriorityDuration(0, 8); - if ((gRoomControls.unk6 & 4) == 0 && --this->manager.unk_0e == 0) { + if ((gRoomControls.scroll_flags & 4) == 0 && --this->manager.unk_0e == 0) { this->manager.action = 3; SetFlag(this->field_0x3c); if (this->field_0x36 == 0) { @@ -73,7 +71,7 @@ void sub_0805DD68(Manager35* this) { gRoomControls.cameraTarget = (Entity*)this->manager.parent; } } else { - if ((gRoomControls.unk6 & 4) == 0) { + if ((gRoomControls.scroll_flags & 4) == 0) { Entity* entity = *(Entity**)this->manager.unk_18; if (entity != NULL) { DeleteEntity(entity); diff --git a/src/manager/manager36.c b/src/manager/manager36.c index 96e8b1a3..a0ab4a62 100644 --- a/src/manager/manager36.c +++ b/src/manager/manager36.c @@ -1,7 +1,6 @@ #include "manager.h" #include "audio.h" #include "script.h" -#include "functions.h" typedef struct { u16 waitTime; diff --git a/src/manager/manager39.c b/src/manager/manager39.c index 96787a29..c3795422 100644 --- a/src/manager/manager39.c +++ b/src/manager/manager39.c @@ -28,7 +28,6 @@ extern const u8 gUnk_08108E48[0x18]; extern const u8 gUnk_08108E60[]; extern void sub_0805F46C(void*, const void*); -extern void ResetSystemPriority(void); void sub_0805E140(Manager39*); void sub_0805E18C(Manager39*); // unused? diff --git a/src/manager/manager4.c b/src/manager/manager4.c index 42eb1ad6..48223e88 100644 --- a/src/manager/manager4.c +++ b/src/manager/manager4.c @@ -1,4 +1,5 @@ #include "global.h" +#include "asm.h" #include "player.h" #include "room.h" #include "manager.h" diff --git a/src/manager/manager6.c b/src/manager/manager6.c index f412a208..023e93e6 100644 --- a/src/manager/manager6.c +++ b/src/manager/manager6.c @@ -1,4 +1,5 @@ #include "global.h" +#include "asm.h" #include "player.h" #include "manager.h" #include "functions.h" diff --git a/src/manager/manager7.c b/src/manager/manager7.c index 59cf85b6..45ff72a4 100644 --- a/src/manager/manager7.c +++ b/src/manager/manager7.c @@ -1,8 +1,6 @@ -#include "global.h" #include "manager.h" +#include "asm.h" #include "functions.h" -#include "structures.h" -#include "gba/gba.h" typedef struct { Manager manager; diff --git a/src/manager/manager8.c b/src/manager/manager8.c index 20298d1f..04a5b954 100644 --- a/src/manager/manager8.c +++ b/src/manager/manager8.c @@ -1,8 +1,6 @@ -#include "global.h" #include "manager.h" #include "screen.h" #include "functions.h" -#include "gba/gba.h" typedef struct { Manager manager; diff --git a/src/manager/managerA.c b/src/manager/managerA.c index 1d68eadc..0554ea1b 100644 --- a/src/manager/managerA.c +++ b/src/manager/managerA.c @@ -1,4 +1,5 @@ #include "global.h" +#include "asm.h" #include "entity.h" #include "player.h" #include "manager.h" @@ -15,8 +16,6 @@ static void sub_080585B0(ManagerA*); static u32 PlayerStateValid(ManagerA*); static void sub_080585DC(ManagerA*); -extern void sub_0801855C(void); - /** * Ezlo hint manager */ diff --git a/src/manager/managerB.c b/src/manager/managerB.c index 82182094..4f9cbdb6 100644 --- a/src/manager/managerB.c +++ b/src/manager/managerB.c @@ -1,12 +1,10 @@ #include "global.h" #include "manager.h" #include "flags.h" -#include "entity.h" #include "room.h" #include "area.h" #include "utils.h" #include "audio.h" -#include "functions.h" /* * Manager B is used to create fights: @@ -47,7 +45,6 @@ void ManagerB_Init(ManagerB* this) { DeleteThisEntity(); } } -extern void sub_080186C0(u32); void ManagerB_WaitForFlag(ManagerB* this) { int tmp; @@ -63,8 +60,6 @@ void ManagerB_WaitForFlag(ManagerB* this) { } } -extern void sub_0801855C(void); - void ManagerB_WaitForDone(ManagerB* this) { // check if all helpers are done if (this->manager.unk_0e) diff --git a/src/manager/managerE.c b/src/manager/managerE.c index 1cdb8ab8..b1651333 100644 --- a/src/manager/managerE.c +++ b/src/manager/managerE.c @@ -1,4 +1,3 @@ -#include "global.h" #include "entity.h" #include "manager.h" #include "flags.h" diff --git a/src/manager/managerF.c b/src/manager/managerF.c index c13e9588..27c4e877 100644 --- a/src/manager/managerF.c +++ b/src/manager/managerF.c @@ -7,14 +7,11 @@ #include "functions.h" #include "area.h" #include "textbox.h" -#include "script.h" #include "utils.h" #include "tiles.h" #include "object.h" #include "item.h" -void sub_08058ECC(ManagerF*); - void sub_08058EE4(ManagerF*); void sub_08058FB0(ManagerF*); void sub_08059094(ManagerF*); diff --git a/src/npc/anju.c b/src/npc/anju.c index 29a80185..375917e2 100644 --- a/src/npc/anju.c +++ b/src/npc/anju.c @@ -1,8 +1,6 @@ -#include "global.h" #include "entity.h" #include "player.h" #include "npc.h" -#include "script.h" void Anju(Entity* this) { switch (this->action) { diff --git a/src/npc/beedle.c b/src/npc/beedle.c index 1e303b7a..54eedff3 100644 --- a/src/npc/beedle.c +++ b/src/npc/beedle.c @@ -1,7 +1,6 @@ #include "global.h" #include "entity.h" #include "textbox.h" -#include "player.h" #include "room.h" #include "script.h" #include "npc.h" diff --git a/src/npc/bigGoron.c b/src/npc/bigGoron.c index 63c25922..0fb7c8bf 100644 --- a/src/npc/bigGoron.c +++ b/src/npc/bigGoron.c @@ -1,5 +1,4 @@ #include "npc.h" -#include "structures.h" #include "functions.h" #include "screen.h" diff --git a/src/npc/bladeBrothers.c b/src/npc/bladeBrothers.c index 66d0a733..09eec8d5 100644 --- a/src/npc/bladeBrothers.c +++ b/src/npc/bladeBrothers.c @@ -7,9 +7,7 @@ #include "save.h" #include "script.h" #include "npc.h" -#include "audio.h" #include "functions.h" -#include "effects.h" extern void (*gUnk_081115C0[])(Entity*); extern void (*gUnk_081115D0[])(Entity*); @@ -93,8 +91,6 @@ void sub_08068A4C(Entity* this) { } void sub_08068AA4(Entity* this) { - u8 bVar1; - this->action = 1; if (this->type != 0) { this->type2++; @@ -176,9 +172,6 @@ static void sub_08068BEC(Entity* this, u32 unused) { } void sub_08068C28(Entity* this) { - u8 bVar1; - u32 uVar2; - this->actionDelay = gUnk_08111623[this->type]; if (this->type == 1) { if (GetInventoryValue(0x48)) { // spin attack diff --git a/src/npc/brocco.c b/src/npc/brocco.c index 0ec333bb..22c3dedb 100644 --- a/src/npc/brocco.c +++ b/src/npc/brocco.c @@ -2,7 +2,6 @@ #include "textbox.h" #include "save.h" #include "npc.h" -#include "script.h" void sub_08063544(Entity*); void sub_0806362C(Entity*); diff --git a/src/npc/carlov.c b/src/npc/carlov.c index 83402406..25aa49ca 100644 --- a/src/npc/carlov.c +++ b/src/npc/carlov.c @@ -1,9 +1,7 @@ -#include "global.h" #include "audio.h" #include "entity.h" #include "room.h" #include "npc.h" -#include "script.h" void Carlov(Entity* this) { if (this->action == 0) { diff --git a/src/npc/carpenter.c b/src/npc/carpenter.c index 97efd2c1..b2341e33 100644 --- a/src/npc/carpenter.c +++ b/src/npc/carpenter.c @@ -1,11 +1,7 @@ #include "global.h" #include "entity.h" -#include "sprite.h" #include "player.h" #include "npc.h" -#include "script.h" -#include "flags.h" -#include "textbox.h" extern SpriteLoadData gUnk_08110CA8[]; diff --git a/src/npc/castleMaid.c b/src/npc/castleMaid.c index bc6eb925..75533301 100644 --- a/src/npc/castleMaid.c +++ b/src/npc/castleMaid.c @@ -46,7 +46,6 @@ void Maid_Head(Entity* this) { } NONMATCH("asm/non_matching/castleMaid/sub_08064570.inc", void sub_08064570(Entity* this)) { - u8 bVar1; u32 tmp; switch (this->action) { diff --git a/src/npc/cat.c b/src/npc/cat.c index b670b5ab..af53d0c3 100644 --- a/src/npc/cat.c +++ b/src/npc/cat.c @@ -2,10 +2,8 @@ #include "entity.h" #include "functions.h" #include "save.h" -#include "player.h" #include "textbox.h" #include "npc.h" -#include "audio.h" extern void sub_08067C44(); @@ -58,7 +56,6 @@ void Cat(Entity* ent) { } void sub_080677EC(Entity* this) { - u8 bVar1; u32 uVar2; this->spriteSettings.draw = 1; @@ -96,7 +93,7 @@ void sub_080678AC(Entity* this) { u32 iVar1; u16* psVar2; - iVar1 = sub_08067D20(); + iVar1 = sub_08067D20(this); if (iVar1 != 0) { sub_08067B80(this, 5); } else { @@ -116,7 +113,7 @@ void sub_080678AC(Entity* this) { } void sub_08067904(Entity* this) { - if (sub_08067D20() != 0) { + if (sub_08067D20(this) != 0) { sub_08067B80(this, 8); return; } @@ -137,7 +134,7 @@ void sub_08067904(Entity* this) { this->spriteSettings.flipX = 1; } } - sub_0806F69C(this); + LinearMoveUpdate(this); UpdateAnimationSingleFrame(this); } @@ -346,7 +343,6 @@ u32 sub_08067D20(Entity* this) { u32 sub_08067D74(Entity* this) { Entity* entity; int iVar2; - s32 tmp; if (this->type != 5) { if (this->actionDelay != 0) { diff --git a/src/npc/cow.c b/src/npc/cow.c index 295e387a..0437072f 100644 --- a/src/npc/cow.c +++ b/src/npc/cow.c @@ -208,7 +208,7 @@ void sub_0806924C(Entity* ent) { } } else { Cow_ShowDialogue(ent); - sub_080791D0(); + ResetPlayerAnimationAndAction(); } SoundReq(SFX_VO_COW); ent->interactType = 0; diff --git a/src/npc/cucco.c b/src/npc/cucco.c index 27f3fc5a..bca662c1 100644 --- a/src/npc/cucco.c +++ b/src/npc/cucco.c @@ -64,7 +64,7 @@ void sub_0806E65C(Entity* this) { sub_0806E6A8(this); } } else { - sub_080791D0(); + ResetPlayerAnimationAndAction(); } SoundReq(SFX_VO_CUCCO_CALL); this->interactType = 0; diff --git a/src/npc/cuccoChick.c b/src/npc/cuccoChick.c index 10a51b9f..0ccc0d17 100644 --- a/src/npc/cuccoChick.c +++ b/src/npc/cuccoChick.c @@ -57,7 +57,7 @@ void sub_0806E838(Entity* this) { sub_0806E884(this); } } else { - sub_080791D0(); + ResetPlayerAnimationAndAction(); } SoundReq(SFX_VO_CHEEP); this->interactType = 0; diff --git a/src/npc/dampe.c b/src/npc/dampe.c index afb9ef63..d1009033 100644 --- a/src/npc/dampe.c +++ b/src/npc/dampe.c @@ -5,8 +5,6 @@ #include "flags.h" #include "textbox.h" #include "npc.h" -#include "functions.h" -#include "script.h" extern u16 gUnk_08113344[]; extern u16 gUnk_0811334A[]; diff --git a/src/npc/din.c b/src/npc/din.c index 51026a2e..7ddc0a3f 100644 --- a/src/npc/din.c +++ b/src/npc/din.c @@ -1,9 +1,6 @@ #include "global.h" #include "entity.h" #include "npc.h" -#include "script.h" -#include "functions.h" -#include "save.h" void Din(Entity* this) { switch (this->action) { diff --git a/src/npc/dog.c b/src/npc/dog.c index 97fadf4b..bd88e5c3 100644 --- a/src/npc/dog.c +++ b/src/npc/dog.c @@ -1,7 +1,6 @@ #include "entity.h" #include "functions.h" #include "npc.h" -#include "save.h" extern void (*gUnk_08111D88[])(Entity*); void sub_08069FE8(Entity*); @@ -304,7 +303,7 @@ void sub_0806A028(Entity* this) { sub_08069FBC(this); sub_0806A080(this); SoundReq(SFX_VO_DOG); - sub_080791D0(); + ResetPlayerAnimationAndAction(); } this->interactType = 0; } diff --git a/src/npc/drLeft.c b/src/npc/drLeft.c index bccfb259..a4942f0f 100644 --- a/src/npc/drLeft.c +++ b/src/npc/drLeft.c @@ -1,5 +1,4 @@ #include "npc.h" -#include "functions.h" extern void sub_08078850(Entity*, u32, u8, u32*); extern u32 gUnk_081133B4; diff --git a/src/npc/emma.c b/src/npc/emma.c index ed4d6025..088f01a0 100644 --- a/src/npc/emma.c +++ b/src/npc/emma.c @@ -1,4 +1,3 @@ -#include "global.h" #include "entity.h" #include "script.h" #include "functions.h" diff --git a/src/npc/epona.c b/src/npc/epona.c index 4c3d9174..9a43655b 100644 --- a/src/npc/epona.c +++ b/src/npc/epona.c @@ -2,7 +2,6 @@ #include "audio.h" #include "entity.h" #include "textbox.h" -#include "player.h" #include "npc.h" #include "functions.h" @@ -83,7 +82,7 @@ void sub_08065AA4(Entity* this) { InitAnimationForceUpdate(this, sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity))); } else { sub_08065A50(this); - sub_080791D0(); + ResetPlayerAnimationAndAction(); } SoundReq(SFX_VO_EPONA); this->interactType = 0; diff --git a/src/npc/ezlo.c b/src/npc/ezlo.c index 6a3a96da..77a69331 100644 --- a/src/npc/ezlo.c +++ b/src/npc/ezlo.c @@ -1,5 +1,4 @@ #include "npc.h" -#include "script.h" const u8 gUnk_08114134[]; const u8 gUnk_08114144[]; diff --git a/src/npc/farore.c b/src/npc/farore.c index 0249171d..f9bfe746 100644 --- a/src/npc/farore.c +++ b/src/npc/farore.c @@ -1,11 +1,6 @@ #include "global.h" #include "entity.h" #include "npc.h" -#include "script.h" -#include "functions.h" -#include "save.h" - -extern u32 sub_08002632(Entity*); void Farore(Entity* this) { switch (this->action) { diff --git a/src/npc/festari.c b/src/npc/festari.c index 49dde08c..2af31802 100644 --- a/src/npc/festari.c +++ b/src/npc/festari.c @@ -2,15 +2,11 @@ #include "entity.h" #include "functions.h" #include "npc.h" -#include "player.h" -#include "script.h" extern void sub_0805FF2C(Entity*, ScriptExecutionContext*); extern void (*const gUnk_08109BBC[])(Entity*); -extern void HandlePostScriptActions(Entity*, ScriptExecutionContext*); - void Festari(Entity* this) { gUnk_08109BBC[this->action](this); } @@ -25,9 +21,6 @@ void sub_0805FE10(Entity* this) { } void sub_0805FE48(Entity* this) { - u8 bVar1; - u16 uVar2; - u32 uVar3; u32 uVar4; if (this->interactType == 2) { diff --git a/src/npc/forestMinish.c b/src/npc/forestMinish.c index 1ebe4176..988110f7 100644 --- a/src/npc/forestMinish.c +++ b/src/npc/forestMinish.c @@ -1,6 +1,5 @@ #include "npc.h" #include "object.h" -#include "structures.h" #include "functions.h" extern void sub_080600F0(Entity*); @@ -229,7 +228,6 @@ void sub_08060340(void) { } u32 sub_08060354(void) { - u32 iVar1; s32 iVar2; iVar2 = gSave.unk50 - gSave.unk48C[1]; diff --git a/src/npc/gentari.c b/src/npc/gentari.c index d4938806..bf7818c1 100644 --- a/src/npc/gentari.c +++ b/src/npc/gentari.c @@ -1,9 +1,6 @@ #include "global.h" #include "entity.h" #include "npc.h" -#include "player.h" -#include "script.h" -#include "functions.h" void Gentari(Entity* this) { switch (this->action) { diff --git a/src/npc/ghostBrothers.c b/src/npc/ghostBrothers.c index de04427b..96130800 100644 --- a/src/npc/ghostBrothers.c +++ b/src/npc/ghostBrothers.c @@ -4,7 +4,6 @@ #include "screen.h" #include "textbox.h" #include "npc.h" -#include "script.h" extern void (*const gUnk_0811017C[])(Entity*); @@ -25,8 +24,6 @@ void sub_08065BF4(Entity* this) { } NONMATCH("asm/non_matching/ghostBrothers/sub_08065C0C.inc", void sub_08065C0C(Entity* this)) { - u8 bVar1; - u32 uVar2; u16* puVar3; switch (this->action) { diff --git a/src/npc/gina.c b/src/npc/gina.c index f12537b5..0f4973b8 100644 --- a/src/npc/gina.c +++ b/src/npc/gina.c @@ -2,9 +2,6 @@ #include "entity.h" #include "player.h" #include "npc.h" -#include "flags.h" -#include "functions.h" -#include "script.h" void Gina(Entity* this) { switch (this->action) { diff --git a/src/npc/goron.c b/src/npc/goron.c index d48cda07..144cc808 100644 --- a/src/npc/goron.c +++ b/src/npc/goron.c @@ -2,7 +2,6 @@ #include "entity.h" #include "functions.h" #include "textbox.h" -#include "script.h" #include "effects.h" #include "npc.h" diff --git a/src/npc/goronMerchant.c b/src/npc/goronMerchant.c index f4640890..b00f3898 100644 --- a/src/npc/goronMerchant.c +++ b/src/npc/goronMerchant.c @@ -1,11 +1,8 @@ #include "global.h" #include "entity.h" #include "functions.h" -#include "structures.h" #include "textbox.h" -#include "room.h" #include "flags.h" -#include "script.h" #include "save.h" #include "npc.h" diff --git a/src/npc/gregal.c b/src/npc/gregal.c index 9177592b..f7038e95 100644 --- a/src/npc/gregal.c +++ b/src/npc/gregal.c @@ -3,8 +3,6 @@ #include "functions.h" #include "npc.h" -void ChangeObjPalette(Entity*, u32); - extern void (*gUnk_08113D8C[])(Entity*); extern void sub_08078850(Entity*, u32, u8, u32*); diff --git a/src/npc/guard.c b/src/npc/guard.c index 67c4fa2e..c456d95e 100644 --- a/src/npc/guard.c +++ b/src/npc/guard.c @@ -5,7 +5,6 @@ #include "textbox.h" #include "room.h" #include "script.h" -#include "structures.h" #include "functions.h" #include "npc.h" @@ -28,10 +27,8 @@ extern void (*const gUnk_0810F544[])(Entity*); extern void (*const gUnk_0810F550[])(Entity*); // entity count -extern u8 gEntCount; extern SpriteLoadData gUnk_0810F524[]; extern void* gUnk_0810F6BC[]; -extern ScreenTransition gScreenTransition; void Guard(Entity* this) { if ((this->flags & 2) != 0) { @@ -113,7 +110,6 @@ void sub_08063E6C(Entity* this) { } void sub_08063E90(Entity* this) { - Entity* ent; u32 temp, idx; u32 unk; @@ -166,7 +162,6 @@ void sub_08063F78(Entity* this) { } void Guard_Head(Entity* this) { - u8 bVar1; u32 uVar2; u32 pbVar3; u32 uVar4; diff --git a/src/npc/hurdyGurdyMan.c b/src/npc/hurdyGurdyMan.c index 52277dff..b36176cb 100644 --- a/src/npc/hurdyGurdyMan.c +++ b/src/npc/hurdyGurdyMan.c @@ -2,13 +2,11 @@ #include "functions.h" #include "save.h" #include "npc.h" -#include "script.h" extern Dialog gUnk_081144FC[]; extern SpriteLoadData gUnk_081144F0; -extern u32 sub_08002632(Entity*); extern u16* gUnk_08001A7C[]; void HurdyGurdyMan(Entity* this) { diff --git a/src/npc/kid.c b/src/npc/kid.c index c109baae..1655b279 100644 --- a/src/npc/kid.c +++ b/src/npc/kid.c @@ -1,8 +1,6 @@ #include "functions.h" #include "textbox.h" #include "npc.h" -#include "script.h" -#include "save.h" extern void (*const gUnk_0810BE0C[])(Entity*); void sub_080621AC(Entity*); @@ -28,8 +26,6 @@ extern Dialog gUnk_0810BE10[]; extern u8 gUnk_0810C0A0[]; -extern SpriteLoadData* gUnk_0810BDC4[]; - void Kid(Entity* this) { if ((this->flags & 2) != 0) { sub_080621AC(this); @@ -338,7 +334,6 @@ NONMATCH("asm/non_matching/kid/sub_08062948.inc", void sub_08062948(Entity* this u16 uVar2; u32 uVar3; s32 iVar4; - s16* psVar5; if (context->unk_18 == 0) { context->unk_18 += 1; diff --git a/src/npc/kingDaltus.c b/src/npc/kingDaltus.c index 4bc618b3..e159c531 100644 --- a/src/npc/kingDaltus.c +++ b/src/npc/kingDaltus.c @@ -2,8 +2,6 @@ #include "script.h" #include "functions.h" #include "npc.h" -#include "flags.h" -#include "textbox.h" extern u16 gUnk_081104F8[]; diff --git a/src/npc/kingGustaf.c b/src/npc/kingGustaf.c index a40a19f6..ae33c16c 100644 --- a/src/npc/kingGustaf.c +++ b/src/npc/kingGustaf.c @@ -1,7 +1,6 @@ #include "global.h" #include "entity.h" #include "functions.h" -#include "script.h" #include "screen.h" void KingGustaf(Entity* this) { diff --git a/src/npc/librari.c b/src/npc/librari.c index 509d790e..f3cb382c 100644 --- a/src/npc/librari.c +++ b/src/npc/librari.c @@ -1,10 +1,6 @@ #include "global.h" #include "entity.h" #include "npc.h" -#include "flags.h" -#include "textbox.h" -#include "functions.h" -#include "script.h" extern u16 gUnk_08112D48[]; diff --git a/src/npc/mailbox.c b/src/npc/mailbox.c index a4afd083..89901625 100644 --- a/src/npc/mailbox.c +++ b/src/npc/mailbox.c @@ -1,7 +1,6 @@ #include "global.h" #include "entity.h" #include "textbox.h" -#include "functions.h" #include "effects.h" #include "npc.h" diff --git a/src/npc/malon.c b/src/npc/malon.c index 85ba2cd1..deb17fe7 100644 --- a/src/npc/malon.c +++ b/src/npc/malon.c @@ -2,7 +2,6 @@ #include "entity.h" #include "script.h" #include "npc.h" -#include "functions.h" extern void (*gUnk_0810FF5C[])(Entity* this); extern void (*gUnk_0810FF64[])(Entity* this); diff --git a/src/npc/mama.c b/src/npc/mama.c index d5ea5950..57290d94 100644 --- a/src/npc/mama.c +++ b/src/npc/mama.c @@ -1,6 +1,5 @@ #include "entity.h" #include "script.h" -#include "functions.h" #include "save.h" #include "npc.h" diff --git a/src/npc/marcy.c b/src/npc/marcy.c index 01c94bc4..ae888d2e 100644 --- a/src/npc/marcy.c +++ b/src/npc/marcy.c @@ -1,6 +1,5 @@ #include "entity.h" #include "functions.h" -#include "script.h" #include "flags.h" #include "textbox.h" diff --git a/src/npc/mayorHagen.c b/src/npc/mayorHagen.c index 1c569e92..bf56dd1d 100644 --- a/src/npc/mayorHagen.c +++ b/src/npc/mayorHagen.c @@ -3,10 +3,6 @@ #include "player.h" #include "flags.h" #include "npc.h" -#include "structures.h" -#include "functions.h" -#include "save.h" -#include "script.h" extern void sub_08078850(); extern u32 gUnk_08113F44; diff --git a/src/npc/milkCart.c b/src/npc/milkCart.c index 7b32235f..1493d385 100644 --- a/src/npc/milkCart.c +++ b/src/npc/milkCart.c @@ -1,6 +1,4 @@ -#include "global.h" #include "entity.h" -#include "functions.h" #include "npc.h" extern void (*gMilkCartBehaviors[2])(Entity*); diff --git a/src/npc/minishEzlo.c b/src/npc/minishEzlo.c index 0d2d017b..08e255bb 100644 --- a/src/npc/minishEzlo.c +++ b/src/npc/minishEzlo.c @@ -1,6 +1,5 @@ #include "entity.h" #include "functions.h" -#include "script.h" #include "audio.h" extern SpriteLoadData gUnk_0810C48C; diff --git a/src/npc/ministerPotho.c b/src/npc/ministerPotho.c index 5ee2e07d..eb38d37f 100644 --- a/src/npc/ministerPotho.c +++ b/src/npc/ministerPotho.c @@ -1,8 +1,6 @@ #include "entity.h" -#include "functions.h" #include "flags.h" #include "textbox.h" -#include "script.h" #include "npc.h" extern void (*const gUnk_08110644[])(Entity*); diff --git a/src/npc/moblinLady.c b/src/npc/moblinLady.c index d63d4d87..7aa448f1 100644 --- a/src/npc/moblinLady.c +++ b/src/npc/moblinLady.c @@ -1,7 +1,5 @@ -#include "global.h" #include "entity.h" #include "npc.h" -#include "script.h" void MoblinLady(Entity* this) { if (this->action == 0) { diff --git a/src/npc/mountainMinish.c b/src/npc/mountainMinish.c index b7c0f08a..6616a452 100644 --- a/src/npc/mountainMinish.c +++ b/src/npc/mountainMinish.c @@ -10,8 +10,6 @@ extern SpriteLoadData gUnk_08111358; extern void (*const gUnk_08111368[])(Entity*); void sub_08067EF0(Entity*); -extern SpriteLoadData gUnk_08111358; - extern u16 gUnk_0811130E[]; void MountainMinish(Entity* this) { diff --git a/src/npc/mutoh.c b/src/npc/mutoh.c index 7cae63d1..6106baf2 100644 --- a/src/npc/mutoh.c +++ b/src/npc/mutoh.c @@ -4,10 +4,6 @@ #include "flags.h" #include "textbox.h" #include "npc.h" -#include "structures.h" -#include "functions.h" -#include "save.h" -#include "script.h" extern SpriteLoadData gUnk_08110C00; extern u16 gUnk_08110C0C[]; diff --git a/src/npc/nayru.c b/src/npc/nayru.c index bfc4a3a3..9e3bea24 100644 --- a/src/npc/nayru.c +++ b/src/npc/nayru.c @@ -1,11 +1,6 @@ #include "global.h" #include "entity.h" #include "npc.h" -#include "script.h" -#include "functions.h" -#include "save.h" - -extern u32 sub_08002632(Entity*); void Nayru(Entity* this) { switch (this->action) { diff --git a/src/npc/npc23.c b/src/npc/npc23.c index 003c5bd9..3fc78f64 100644 --- a/src/npc/npc23.c +++ b/src/npc/npc23.c @@ -1,9 +1,7 @@ #include "entity.h" -#include "script.h" #include "player.h" #include "structures.h" #include "functions.h" -#include "structures.h" #include "textbox.h" #include "npc.h" diff --git a/src/npc/npc26.c b/src/npc/npc26.c index 81ce55b7..3a4fbf75 100644 --- a/src/npc/npc26.c +++ b/src/npc/npc26.c @@ -1,7 +1,5 @@ #include "global.h" #include "entity.h" -#include "functions.h" -#include "script.h" #include "npc.h" static void (*const gUnk_081106D4[])(Entity*); diff --git a/src/npc/npc4E.c b/src/npc/npc4E.c index 920e7c12..ca9f114b 100644 --- a/src/npc/npc4E.c +++ b/src/npc/npc4E.c @@ -1,8 +1,6 @@ #include "global.h" #include "entity.h" #include "functions.h" -#include "script.h" -#include "functions.h" #include "audio.h" #include "save.h" #include "flags.h" @@ -196,7 +194,6 @@ void sub_0806DC7C() { } void sub_0806DCA0() { - u16 uVar1; const u16* tiles = gUnk_081141F4; while (*tiles != 0) { u32 tile = *tiles; diff --git a/src/npc/npc5.c b/src/npc/npc5.c index 97d3c819..350e1630 100644 --- a/src/npc/npc5.c +++ b/src/npc/npc5.c @@ -161,6 +161,7 @@ void sub_08060B5C(Entity* this) { void sub_08060BA0(Entity* this) { Entity* r5; + //! @bug: r5 is uninitialized if (sub_08061230(this) != 0) { return; @@ -263,7 +264,7 @@ void sub_08060DF4(Entity* this) { void sub_08060DFC(Entity* this) { u32 uVar1; - sub_0806F69C(this); + LinearMoveUpdate(this); sub_08060E94(this); uVar1 = GravityUpdate(this, 0x2000); if (uVar1 == 0) { @@ -406,9 +407,7 @@ NONMATCH("asm/non_matching/npc5/sub_08061170.inc", bool32 sub_08061170(Entity* t END_NONMATCH NONMATCH("asm/non_matching/npc5/sub_080611D4.inc", u32 sub_080611D4(Entity* this)) { - u8 bVar1; u32 uVar2; - u8* pbVar3; u32 x; s32 a; @@ -420,8 +419,7 @@ NONMATCH("asm/non_matching/npc5/sub_080611D4.inc", u32 sub_080611D4(Entity* this b = gUnk_0810AC4C[x].unk_1; // asm("d"); uVar2 = sub_080002B4(this, a, b); -// asm("b"); -code4: + // asm("b"); if ((gUnk_0810AC54[0] != uVar2 || (this->animationState != gUnk_0810AC54[1] >> 2))) { // asm ("e"); if (gUnk_0810AC54[2] == 0) { @@ -473,7 +471,6 @@ u32 sub_08061230(Entity* this) { } NONMATCH("asm/non_matching/npc5/sub_08061358.inc", void sub_08061358(Entity* this)) { - u8 bVar1; u32 uVar2; s32 iVar3; u8 bVar4; @@ -629,7 +626,6 @@ NONMATCH("asm/non_matching/npc5/sub_08061464.inc", void sub_08061464(Entity* thi sub_08061630(this, iVar10, iVar9 + -8, param_a); } } -_08061612: bVar1 = ((UnkHeap*)this->myHeap)->unk_0; if ((bVar1 & 8) == 0) { this->action = 3; @@ -843,7 +839,6 @@ void sub_08061AFC(Entity* this) { } NONMATCH("asm/non_matching/npc5/sub_08061B18.inc", void sub_08061B18(Entity* this)) { - u8 bVar1; u16* puVar2; typedef struct { diff --git a/src/npc/npc58.c b/src/npc/npc58.c index 5cebcb57..c9b9ab72 100644 --- a/src/npc/npc58.c +++ b/src/npc/npc58.c @@ -1,5 +1,4 @@ #include "entity.h" -#include "functions.h" #include "npc.h" extern void sub_0806FFBC(Entity*, u32, u32, u32); diff --git a/src/npc/npc9.c b/src/npc/npc9.c index 0c514fd3..e4f879f9 100644 --- a/src/npc/npc9.c +++ b/src/npc/npc9.c @@ -1,7 +1,6 @@ #include "global.h" #include "entity.h" #include "textbox.h" -#include "functions.h" #include "npc.h" extern void (*const gUnk_0810C290[])(Entity*); diff --git a/src/npc/percy.c b/src/npc/percy.c index 90e10b28..db53c99d 100644 --- a/src/npc/percy.c +++ b/src/npc/percy.c @@ -1,25 +1,16 @@ #include "global.h" #include "entity.h" #include "npc.h" -#include "textbox.h" #include "functions.h" -#include "flags.h" -#include "script.h" -#include "save.h" -#include "effects.h" extern void sub_0806B41C(Entity*); extern void sub_0806B3CC(Entity*); -extern u32 sub_08002632(Entity*); - extern u16* gUnk_08001A7C[40]; extern u16 gUnk_08112E54[4]; extern Dialog gUnk_08112E2C[5]; extern SpriteLoadData gUnk_08112E1C; -extern SpriteLoadData gUnk_08112E1C; - void Percy_Head(Entity* this) { SetExtraSpriteFrame(this, 0, (this->frameSpriteSettings & 0x3f) + 0x13); SetExtraSpriteFrame(this, 1, (this->frame & 0x7f) + 0xb); diff --git a/src/npc/pina.c b/src/npc/pina.c index 4d60768c..179ee9d5 100644 --- a/src/npc/pina.c +++ b/src/npc/pina.c @@ -2,7 +2,6 @@ #include "functions.h" #include "textbox.h" #include "save.h" -#include "script.h" #include "npc.h" void sub_08063B68(Entity* this); diff --git a/src/npc/pita.c b/src/npc/pita.c index 97abf77d..b5a2e065 100644 --- a/src/npc/pita.c +++ b/src/npc/pita.c @@ -34,6 +34,7 @@ bool32 sub_08062EDC(Entity* this, ScriptExecutionContext* context) { u32 tmp; u32 tmp2; + //! @bug: tmp is uninitialized, in practice player must have an item here if (GetInventoryValue(0x68) != 0) { tmp = 0; } diff --git a/src/npc/postman.c b/src/npc/postman.c index d8cdb5aa..79a12f3a 100644 --- a/src/npc/postman.c +++ b/src/npc/postman.c @@ -3,14 +3,6 @@ #include "entity.h" #include "functions.h" #include "npc.h" -#include "textbox.h" -#include "player.h" -#include "room.h" -#include "structures.h" -#include "save.h" -#include "script.h" -#include "flags.h" -#include "effects.h" extern void sub_08060528(Entity*); extern void sub_080604DC(Entity*); @@ -37,7 +29,6 @@ void Postman(Entity* this) { } void sub_08060428(Entity* this) { - u8 bVar1; void* data; this->actionDelay = 0x5a; @@ -54,7 +45,6 @@ void sub_08060428(Entity* this) { void sub_0806045C(Entity* this) { u8 bVar1; - u32 uVar2; u32 bVar3; s32 temp; @@ -92,8 +82,6 @@ void sub_080604C8(Entity* this) { } void sub_080604DC(Entity* this) { - u8 bVar1; - int iVar2; Entity* ent; if (this->spriteSettings.draw == 1 && CheckOnScreen(this)) { diff --git a/src/npc/smith.c b/src/npc/smith.c index 307bd0bd..764a2aa8 100644 --- a/src/npc/smith.c +++ b/src/npc/smith.c @@ -1,5 +1,4 @@ #include "npc.h" -#include "functions.h" extern void sub_08078850(Entity*, u32, u32, u32*); @@ -65,7 +64,6 @@ void sub_080660EC(Entity* this) { void sub_08066118(Entity* this) { s32 uVar1; - u32 iVar2; uVar1 = sub_0806ED9C(this, 0x28, 0x28); if (uVar1 < 0) { @@ -105,8 +103,6 @@ void sub_080661B0(Entity* this) { } void sub_080661BC(Entity* this) { - u32 sVar1; - if (this->animIndex == 0xc) { UpdateAnimationSingleFrame(this); if (this->frame & 0x80) { diff --git a/src/npc/stamp.c b/src/npc/stamp.c index 2b5888a8..193ae976 100644 --- a/src/npc/stamp.c +++ b/src/npc/stamp.c @@ -2,7 +2,6 @@ #include "entity.h" #include "textbox.h" #include "functions.h" -#include "script.h" #include "effects.h" #include "npc.h" diff --git a/src/npc/sturgeon.c b/src/npc/sturgeon.c index 147382a8..ef135a92 100644 --- a/src/npc/sturgeon.c +++ b/src/npc/sturgeon.c @@ -1,10 +1,7 @@ #include "entity.h" #include "functions.h" #include "npc.h" -#include "textbox.h" #include "object.h" -#include "flags.h" -#include "script.h" extern u16 gUnk_0810FA54[]; diff --git a/src/npc/talon.c b/src/npc/talon.c index a7bc1e81..d991ab1f 100644 --- a/src/npc/talon.c +++ b/src/npc/talon.c @@ -53,7 +53,7 @@ void sub_0806559C(Entity* this) { sub_0806ED78(this); if (this->interactType != 0) { this->interactType = 0; - sub_080791D0(); + ResetPlayerAnimationAndAction(); } } diff --git a/src/npc/teachers.c b/src/npc/teachers.c index 645361d2..d99151da 100644 --- a/src/npc/teachers.c +++ b/src/npc/teachers.c @@ -4,7 +4,6 @@ #include "save.h" #include "script.h" #include "npc.h" -#include "functions.h" extern SpriteLoadData gUnk_08113910[]; diff --git a/src/npc/tingleSiblings.c b/src/npc/tingleSiblings.c index 18587c36..490f15ee 100644 --- a/src/npc/tingleSiblings.c +++ b/src/npc/tingleSiblings.c @@ -1,8 +1,6 @@ #include "global.h" #include "entity.h" #include "npc.h" -#include "textbox.h" -#include "script.h" #include "functions.h" extern void sub_08064DE4(Entity*); diff --git a/src/npc/townMinish.c b/src/npc/townMinish.c index 3d89d6f4..557b7341 100644 --- a/src/npc/townMinish.c +++ b/src/npc/townMinish.c @@ -2,10 +2,6 @@ #include "entity.h" #include "npc.h" #include "functions.h" -#include "textbox.h" -#include "flags.h" -#include "save.h" -#include "script.h" extern u32 sub_080002C0(); extern void sub_0806ACC4(Entity*); @@ -63,8 +59,6 @@ void sub_0806AC3C(Entity* this) { } if (unk != this->field_0x68.HALF.HI) { - s32 temp; - if (((unk - this->field_0x68.HALF.HI) & 0x1f) <= 0xf) { this->field_0x68.HALF.HI--; } else { diff --git a/src/npc/townsperson.c b/src/npc/townsperson.c index 3b674b37..17cd48e5 100644 --- a/src/npc/townsperson.c +++ b/src/npc/townsperson.c @@ -1,5 +1,4 @@ #include "npc.h" -#include "structures.h" #include "functions.h" typedef struct { diff --git a/src/npc/vaati.c b/src/npc/vaati.c index 751a1be6..a550c1a8 100644 --- a/src/npc/vaati.c +++ b/src/npc/vaati.c @@ -2,7 +2,6 @@ #include "entity.h" #include "script.h" #include "audio.h" -#include "structures.h" #include "functions.h" extern void sub_08095CB0(Entity*); diff --git a/src/npc/vaatiReborn.c b/src/npc/vaatiReborn.c index 89c9ce8f..3ed28ca8 100644 --- a/src/npc/vaatiReborn.c +++ b/src/npc/vaatiReborn.c @@ -1,9 +1,5 @@ #include "global.h" #include "npc.h" -#include "coord.h" -#include "flags.h" -#include "audio.h" -#include "textbox.h" #include "functions.h" void VaatiRebornAction0(Entity* this); diff --git a/src/npc/wheaton.c b/src/npc/wheaton.c index ba154f41..3182eda3 100644 --- a/src/npc/wheaton.c +++ b/src/npc/wheaton.c @@ -1,5 +1,4 @@ #include "npc.h" -#include "script.h" extern Hitbox gUnk_0810C3C0; diff --git a/src/npc/windTribespeople.c b/src/npc/windTribespeople.c index a0d979eb..76b73c07 100644 --- a/src/npc/windTribespeople.c +++ b/src/npc/windTribespeople.c @@ -2,12 +2,6 @@ #include "audio.h" #include "entity.h" #include "npc.h" -#include "textbox.h" -#include "flags.h" -#include "structures.h" -#include "functions.h" -#include "save.h" -#include "script.h" extern void sub_0806C7D4(Entity*); @@ -33,8 +27,6 @@ extern u16 gUnk_08113B16[]; extern u8 gUnk_08113B38[]; -extern SpriteLoadData gUnk_08113A1C[]; - void WindTribespeople(Entity* this) { gUnk_08113A7C[this->action](this); } diff --git a/src/npc/zelda.c b/src/npc/zelda.c index 4631a31e..296e27e0 100644 --- a/src/npc/zelda.c +++ b/src/npc/zelda.c @@ -2,12 +2,9 @@ #include "audio.h" #include "entity.h" #include "functions.h" -#include "room.h" #include "flags.h" -#include "script.h" #include "npc.h" -extern Entity* DeepFindEntityByID(u32, u32); void sub_08068680(Entity*, Entity*); void sub_08068694(Entity*, Entity*); extern Entity* GetEntityByType(u32, u32); diff --git a/src/npc/zeldaFollower.c b/src/npc/zeldaFollower.c index 93d1ca3f..fc0890fb 100644 --- a/src/npc/zeldaFollower.c +++ b/src/npc/zeldaFollower.c @@ -1,7 +1,6 @@ #include "global.h" #include "entity.h" #include "functions.h" -#include "script.h" #include "utils.h" extern void sub_08068318(Entity*); diff --git a/src/npcDefinitions.c b/src/npcDefinitions.c index 8851bb07..b6db7f31 100644 --- a/src/npcDefinitions.c +++ b/src/npcDefinitions.c @@ -180,11 +180,11 @@ const NPCDefinition gNPCDefinition_52[] = { }; #endif -#define MULTI_FORM(definition_ptr) \ - { \ - { 2, 0, 0, 0, 0, 0, 0 }, { \ - .definition = definition_ptr \ - } \ +#define MULTI_FORM(definition_ptr) \ + { \ + { 2, 0, 0, 0, 0, 0, 0 }, { \ + .definition = (definition_ptr) \ + } \ } const NPCDefinition gNPCDefinitions[] = { diff --git a/src/npcUtils.c b/src/npcUtils.c index a1dca14f..e4739226 100644 --- a/src/npcUtils.c +++ b/src/npcUtils.c @@ -19,9 +19,6 @@ typedef struct { } NPCData; extern NPCData* gUnk_08001A7C[]; -u32 sub_0800445C(Entity*); -void sub_08077B20(void); -void sub_0806F69C(Entity*); u32 sub_080041DC(Entity*, u32, u32); u32 sub_0806EF88(Entity*); @@ -161,7 +158,7 @@ u32 sub_0806EE70(Entity* ent) { ent->field_0x46 = 0; sub_0806EF14(ent); } - sub_0806F69C(ent); + LinearMoveUpdate(ent); sub_0806EF4C(ent, xy); tmp1 = sub_080041DC(ent, xy[0], xy[1]); tmp2 = ent->speed; diff --git a/src/object.c b/src/object.c index 9a1f983e..819cb970 100644 --- a/src/object.c +++ b/src/object.c @@ -1,6 +1,4 @@ -#include "global.h" #include "entity.h" -#include "manager.h" #include "object.h" void (*const gObjectFunctions[])(Entity*) = { diff --git a/src/object/archway.c b/src/object/archway.c index d0ed7559..a8f659dc 100644 --- a/src/object/archway.c +++ b/src/object/archway.c @@ -1,4 +1,3 @@ -#include "global.h" #include "entity.h" #include "overworld.h" diff --git a/src/object/backgroundCloud.c b/src/object/backgroundCloud.c index edd764d2..8d3263bc 100644 --- a/src/object/backgroundCloud.c +++ b/src/object/backgroundCloud.c @@ -1,5 +1,4 @@ #include "object.h" -#include "functions.h" extern void (*const gUnk_08121EA4[])(Entity*); extern const u8 gUnk_08121EB0[]; @@ -27,7 +26,7 @@ void sub_0808F658(Entity* this) { } void sub_0808F6E0(Entity* this) { - sub_0806F69C(this); + LinearMoveUpdate(this); if ((s16)this->x.HALF.HI < (s16)this->field_0x78.HWORD || (s16)this->x.HALF.HI > (s16)this->field_0x7a.HWORD) this->action = 2; diff --git a/src/object/bigVortex.c b/src/object/bigVortex.c index 9118cb67..a26b7aae 100644 --- a/src/object/bigVortex.c +++ b/src/object/bigVortex.c @@ -3,7 +3,6 @@ #include "flags.h" #include "object.h" #include "functions.h" -#include "effects.h" extern void sub_08098E3C(Entity*); extern void sub_08098E88(Entity*); diff --git a/src/object/bird.c b/src/object/bird.c index 9a131075..07a696cf 100644 --- a/src/object/bird.c +++ b/src/object/bird.c @@ -43,7 +43,7 @@ void sub_0809CF54(Entity* this) { void sub_0809CFEC(Entity* this) { - sub_0806F69C(this); + LinearMoveUpdate(this); GravityUpdate(this, *(s16*)&this->field_0x68.HWORD); if (this->actionDelay != 0) { if (--this->actionDelay == 0) { diff --git a/src/object/book.c b/src/object/book.c index 25faf3ab..9f3a5396 100644 --- a/src/object/book.c +++ b/src/object/book.c @@ -1,6 +1,5 @@ #include "object.h" #include "functions.h" -#include "script.h" #include "textbox.h" extern void (*const BookActionFuncs[])(Entity*); @@ -117,7 +116,7 @@ void sub_0809B524(Entity* this) { } } - sub_0806F69C(this); + LinearMoveUpdate(this); } void sub_0809B56C(Entity* this) { diff --git a/src/object/button.c b/src/object/button.c index 1db2cafb..21c31891 100644 --- a/src/object/button.c +++ b/src/object/button.c @@ -39,7 +39,6 @@ void sub_08081B84(Entity* this) { } u32 sub_08081CB0(Entity*); -void RequestPriorityDuration(Entity*, u32); void sub_08081FF8(Entity*); void sub_08081BAC(Entity* this) { diff --git a/src/object/cloud.c b/src/object/cloud.c index 22494391..5ff9bf6b 100644 --- a/src/object/cloud.c +++ b/src/object/cloud.c @@ -81,7 +81,7 @@ void sub_0809F5F0(Entity* this) { void sub_0809F61C(Entity* this) { - if ((gRoomControls.unk6 & 4) == 0) { + if ((gRoomControls.scroll_flags & 4) == 0) { if (this->actionDelay == 30) { SetLocalFlag(this->type2); } @@ -112,7 +112,7 @@ void sub_0809F69C(Entity* this) { void sub_0809F6CC(Entity* this) { - if (((gRoomControls.unk6 & 4) == 0) && (--this->actionDelay == 0)) { + if (((gRoomControls.scroll_flags & 4) == 0) && (--this->actionDelay == 0)) { gPlayerState.controlMode = 1; DeleteThisEntity(); } @@ -132,7 +132,7 @@ void sub_0809F700(Entity* this) { this->spriteOffsetX = gUnk_081247C0[uVar2 & 7]; this->spriteOffsetY = gUnk_081247C0[uVar2 >> 4 & 7]; } - sub_0806F69C(this); + LinearMoveUpdate(this); if (--this->actionDelay == 0) { DeleteThisEntity(); } diff --git a/src/object/fileScreenObjects.c b/src/object/fileScreenObjects.c index 345e8a2b..ab9e6567 100644 --- a/src/object/fileScreenObjects.c +++ b/src/object/fileScreenObjects.c @@ -1,9 +1,7 @@ #include "object.h" #include "main.h" #include "menu.h" -#include "npc.h" #include "fileScreen.h" -#include "structures.h" #include "functions.h" extern int sub_0807A094(int); @@ -506,7 +504,7 @@ static u32 sub_0808EF6C(Entity* this) { } this->speed = var7; this->direction = sub_080045DA(var0, var2) >> 3; - sub_0806F69C(this); + LinearMoveUpdate(this); return 1; } diff --git a/src/object/fireplace.c b/src/object/fireplace.c index 1fda4e9f..a4513cb8 100644 --- a/src/object/fireplace.c +++ b/src/object/fireplace.c @@ -1,10 +1,9 @@ #include "object.h" -#include "script.h" #include "functions.h" extern void (*gUnk_08123D98[])(Entity*); -void sub_0809B7A0(Entity* e); +void sub_0809B7A0(Entity* this); void sub_0809B7DC(Entity* this); void sub_0809B7C0(Entity* this); diff --git a/src/object/greatFairy.c b/src/object/greatFairy.c index ccb1adbf..a8c02b02 100644 --- a/src/object/greatFairy.c +++ b/src/object/greatFairy.c @@ -1,7 +1,6 @@ #include "object.h" #include "save.h" #include "script.h" -#include "structures.h" #include "functions.h" #include "screen.h" @@ -422,7 +421,7 @@ void sub_080871F8(Entity* this) { this->action = 2; } else { this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, temp->x.HALF.HI, temp->y.HALF.HI - 32); - sub_0806F69C(this); + LinearMoveUpdate(this); } } @@ -437,7 +436,7 @@ void sub_08087240(Entity* this) { void sub_08087264(Entity* this) { if (this->actionDelay != 0) { this->actionDelay--; - sub_0806F69C(this); + LinearMoveUpdate(this); } } @@ -464,7 +463,7 @@ void sub_080872AC(Entity* this) { void sub_080872F8(Entity* this) { s32 temp; - sub_0806F69C(this); + LinearMoveUpdate(this); GetNextFrame(this); if (((u16)(this->field_0x68.HWORD - this->x.HALF.HI) > 0xc) || ((u16)(this->field_0x6a.HWORD - this->y.HALF.HI) > 0xc)) { @@ -526,7 +525,7 @@ void sub_080873FC(void) { void sub_08087424(Entity* this, ScriptExecutionContext* context) { Entity* ent; - sub_080791D0(); + ResetPlayerAnimationAndAction(); ent = CreateObject(OBJECT_64, 0, 0); if (ent != NULL) { ent->parent = &gPlayerEntity; diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c index b0fb32e1..a8868df2 100644 --- a/src/object/heartContainer.c +++ b/src/object/heartContainer.c @@ -1,4 +1,3 @@ -#include "global.h" #include "audio.h" #include "entity.h" #include "flags.h" diff --git a/src/object/hiddenLadderDown.c b/src/object/hiddenLadderDown.c index 7d1c7abd..55831a80 100644 --- a/src/object/hiddenLadderDown.c +++ b/src/object/hiddenLadderDown.c @@ -1,7 +1,7 @@ #include "global.h" +#include "asm.h" #include "entity.h" #include "functions.h" -#include "room.h" #include "flags.h" extern void (*const gUnk_08122604[])(Entity*); diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c index c062d75b..a7fa6987 100644 --- a/src/object/itemOnGround.c +++ b/src/object/itemOnGround.c @@ -5,6 +5,7 @@ #include "player.h" #include "object.h" #include "functions.h" +#include "item.h" void sub_08081150(Entity*); u8 sub_0808147C(u32); @@ -87,7 +88,7 @@ void sub_08080F20(Entity* this) { DeleteThisEntity(); } - if (this->type != 0x60) { + if (this->type != ITEM_FAIRY) { this->spriteSettings.draw = 1; this->spritePriority.b1 = 3; this->spriteSettings.shadow = 0; @@ -97,16 +98,16 @@ void sub_08080F20(Entity* this) { this->health = 0xFF; this->hitbox = &gUnk_080FD1A8; switch (this->type) { - case 0x3f: - case 0x54: - case 0x55: - case 0x56: - case 0x57: - case 0x58: - case 0x5c: - case 0x5d: - case 0x5e: - case 0x5f: + case ITEM_SHELLS: + case ITEM_RUPEE1: + case ITEM_RUPEE5: + case ITEM_RUPEE20: + case ITEM_RUPEE50: + case ITEM_RUPEE100: + case ITEM_KINSTONE: + case ITEM_BOMBS5: + case ITEM_ARROWS5: + case ITEM_HEART: this->flags2 = 0x17; break; default: @@ -124,12 +125,11 @@ void sub_08080F20(Entity* this) { gUnk_0811E7E8[this->field_0x68.HALF.HI](this); } else { Entity* entity = CreateObject(FAIRY, 0x60, 0); - if (entity) { + if (entity != NULL) { entity->actionDelay = 0; if (this->actionDelay == 1) { entity->type2 = 2; } - CopyPosition(this, entity); DeleteThisEntity(); } @@ -153,12 +153,12 @@ void sub_080810A8(Entity* this) { } if (this->collisionLayer == 2) { - sub_08016A30(this); + ResolveCollisionLayer(this); } } void sub_080810FC(Entity* this) { - if (this->type != 0x5F) { + if (this->type != ITEM_HEART) { sub_08081598(this); } else { this->action = 2; @@ -188,7 +188,7 @@ void sub_08081188(Entity* this) { this->action = 2; COLLISION_ON(this); if (this->collisionLayer == 2) { - sub_08016A30(this); + ResolveCollisionLayer(this); } } @@ -212,7 +212,7 @@ void sub_080811EC(Entity* this) { if (this->field_0x68.HALF.HI != 6) { sub_080AEFE0(this); } else { - sub_0806F69C(this); + LinearMoveUpdate(this); } GravityUpdate(this, 0x2800); @@ -271,7 +271,8 @@ void sub_080812E8(Entity* this) { #ifdef EU if ((playerState->swimState & 0x80) && sub_080177A0(this, &gPlayerEntity)) { #else - if ((playerState->swimState & 0x80) && !(playerState->flags & 0x80) && sub_080177A0(this, &gPlayerEntity)) { + if ((playerState->swimState & 0x80) && (playerState->flags & PL_MINISH) == 0 && + sub_080177A0(this, &gPlayerEntity)) { #endif sub_080810FC(this); } diff --git a/src/object/lightableSwitch.c b/src/object/lightableSwitch.c index 54716b5e..14364188 100644 --- a/src/object/lightableSwitch.c +++ b/src/object/lightableSwitch.c @@ -1,4 +1,5 @@ #include "global.h" +#include "asm.h" #include "audio.h" #include "entity.h" #include "room.h" @@ -83,7 +84,7 @@ void sub_0809EB30(Entity* this) { if (this->type2 != 0) { if ((this->direction & 0x80) == 0) { - sub_0806F69C(this); + LinearMoveUpdate(this); } puVar2 = &this->field_0x74.HWORD; if (!--*puVar2) { diff --git a/src/object/lockedDoor.c b/src/object/lockedDoor.c index fccc8b5f..b7fc357a 100644 --- a/src/object/lockedDoor.c +++ b/src/object/lockedDoor.c @@ -1,4 +1,5 @@ #include "global.h" +#include "asm.h" #include "entity.h" #include "flags.h" #include "audio.h" @@ -37,7 +38,6 @@ extern Hitbox gHitbox_2; extern u32 sub_080001DA(u32, u32); extern void sub_08078850(Entity*, u32, u32, u32); -extern void RequestPriorityDuration(Entity*, u32); typedef struct PACKED { s8 x; @@ -153,7 +153,7 @@ void sub_080834B4(Entity* this) { } void sub_080834EC(Entity* this) { - sub_0806F69C(this); + LinearMoveUpdate(this); if (--this->actionDelay == 0) { if (this->type & 0x80) { sub_08083638(this); @@ -171,7 +171,7 @@ void sub_08083518(Entity* this) { } void sub_08083540(Entity* this) { - sub_0806F69C(this); + LinearMoveUpdate(this); if (!--this->actionDelay) { if (this->type & 0x10) { this->type &= ~0x10; diff --git a/src/object/mask.c b/src/object/mask.c index 854cd5c2..be794b54 100644 --- a/src/object/mask.c +++ b/src/object/mask.c @@ -1,5 +1,4 @@ #include "object.h" -#include "structures.h" #include "functions.h" extern void (*MaskActionFuncs[])(Entity*); diff --git a/src/object/metalDoor.c b/src/object/metalDoor.c index 531d41b9..b8506bd8 100644 --- a/src/object/metalDoor.c +++ b/src/object/metalDoor.c @@ -1,4 +1,5 @@ #include "global.h" +#include "asm.h" #include "entity.h" #include "room.h" #include "flags.h" @@ -50,7 +51,7 @@ void sub_080A074C(Entity* this) { u8 bVar1; Entity* ent; - sub_0806F69C(this); + LinearMoveUpdate(this); if (--this->actionDelay == 0) { this->action = 3; @@ -84,7 +85,7 @@ void sub_080A07BC(Entity* this) { void sub_080A07F0(Entity* this) { - sub_0806F69C(this); + LinearMoveUpdate(this); if (--this->actionDelay == 0) { DeleteThisEntity(); diff --git a/src/object/minecart.c b/src/object/minecart.c index 619e1a7b..39d1ce44 100644 --- a/src/object/minecart.c +++ b/src/object/minecart.c @@ -80,7 +80,7 @@ void sub_080917DC(Entity* this) { gPlayerEntity.speed = 0x100; gPlayerEntity.flags &= ~PL_MINISH; ResetPlayer(); - sub_0807A108(); + DeleteClones(); SoundReq(SFX_PLY_JUMP); } } else { @@ -140,7 +140,7 @@ void sub_080919AC(Entity* this) { } else { COLLISION_ON(this); gPlayerEntity.speed = 0; - sub_0806F69C(this); + LinearMoveUpdate(this); CopyPosition(this, &gPlayerEntity); gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1; if (!sub_08091DDC(this)) { diff --git a/src/object/minishLight.c b/src/object/minishLight.c index d7fc7bb4..a316e499 100644 --- a/src/object/minishLight.c +++ b/src/object/minishLight.c @@ -1,4 +1,3 @@ -#include "global.h" #include "entity.h" extern void (*const gUnk_081247F8[])(Entity*); diff --git a/src/object/minishSizedArchway.c b/src/object/minishSizedArchway.c index ad001c83..ad109449 100644 --- a/src/object/minishSizedArchway.c +++ b/src/object/minishSizedArchway.c @@ -1,4 +1,3 @@ -#include "global.h" #include "entity.h" #include "overworld.h" diff --git a/src/object/object1D.c b/src/object/object1D.c index f7343fbe..f1e13a00 100644 --- a/src/object/object1D.c +++ b/src/object/object1D.c @@ -1,4 +1,3 @@ -#include "global.h" #include "entity.h" extern void (*gUnk_081208A0[])(Entity*); diff --git a/src/object/object49.c b/src/object/object49.c index 4b4be720..43dcda88 100644 --- a/src/object/object49.c +++ b/src/object/object49.c @@ -1,5 +1,4 @@ #include "object.h" -#include "structures.h" #include "functions.h" static void sub_0808F2B0(Entity*); diff --git a/src/object/object6A.c b/src/object/object6A.c index 340a36b0..456c28f2 100644 --- a/src/object/object6A.c +++ b/src/object/object6A.c @@ -556,7 +556,7 @@ void sub_08095288(Object6AEntity* this) { } else { sub_0805EC9C(super, 0x100, 0x100, super->actionDelay << 8); super->actionDelay += 10; - sub_0806F69C(super); + LinearMoveUpdate(super); } } p = super->child; diff --git a/src/object/object86.c b/src/object/object86.c index 62d30b6b..e6968b42 100644 --- a/src/object/object86.c +++ b/src/object/object86.c @@ -1,8 +1,6 @@ #include "object.h" -#include "functions.h" void sub_08099ECC(Entity*); -extern void RequestPriorityDuration(Entity*, u32); extern void sub_0805B390(u32); extern void (*const gUnk_081237F8[])(Entity*); diff --git a/src/object/objectA2.c b/src/object/objectA2.c index c3ad215b..f8f212f5 100644 --- a/src/object/objectA2.c +++ b/src/object/objectA2.c @@ -40,7 +40,7 @@ void sub_0809F318(Entity* this) { } void sub_0809F374(Entity* this) { - sub_0806F69C(this); + LinearMoveUpdate(this); #ifndef EU if (gSaveHeader->gameLanguage < 2) { if (sub_080044EC(this, 0x2000) < 2) { diff --git a/src/object/objectA8.c b/src/object/objectA8.c index fbba13c3..ef00c9df 100644 --- a/src/object/objectA8.c +++ b/src/object/objectA8.c @@ -1,4 +1,3 @@ -#include "global.h" #include "entity.h" #include "player.h" #include "functions.h" diff --git a/src/object/objectB2.c b/src/object/objectB2.c index 75150bab..b40c73b6 100644 --- a/src/object/objectB2.c +++ b/src/object/objectB2.c @@ -23,7 +23,7 @@ void ObjectB2(Entity* this) { InitializeAnimation(this, this->type); } this->speed = this->parent->speed; - sub_0806F69C(this); + LinearMoveUpdate(this); if (sub_080AE4CC(this->child, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) { DeleteThisEntity(); } diff --git a/src/object/octorokBossObject.c b/src/object/octorokBossObject.c index 6e69a7db..0e1caf10 100644 --- a/src/object/octorokBossObject.c +++ b/src/object/octorokBossObject.c @@ -38,7 +38,7 @@ enum OctorokBossObjectType { TYPE8, // OctorokBoss_Hit_SubAction1 TYPE9 // OctorokBoss_Hit_SubAction4 }; -#define GET_HELPER(this) (*(HelperStruct**)&this->cutsceneBeh) +#define GET_HELPER(this) (*(HelperStruct**)&(this)->cutsceneBeh) extern u32 sub_0806FC80(Entity*, Entity*, s32); diff --git a/src/object/pinwheel.c b/src/object/pinwheel.c index b44f5a8c..519b96a3 100644 --- a/src/object/pinwheel.c +++ b/src/object/pinwheel.c @@ -3,8 +3,6 @@ #include "flags.h" #include "object.h" -extern u32 ReadBit(u32*, u32); - extern u32 gUnk_020342F8; extern u16 gUnk_08125050[]; extern void (*gUnk_0812505C[])(Entity*); diff --git a/src/object/pot.c b/src/object/pot.c index d7a7ae96..fae971d8 100644 --- a/src/object/pot.c +++ b/src/object/pot.c @@ -6,7 +6,6 @@ #include "room.h" #include "object.h" #include "functions.h" -#include "effects.h" void sub_08082824(Entity*); static void sub_08082850(Entity*, Entity*); @@ -45,7 +44,7 @@ void sub_0808222C(Entity* this) { this->flags2 = 0x84; this->field_0x1c = 0x12; if (this->collisionLayer == 0) { - sub_08016A30(this); + ResolveCollisionLayer(this); } this->field_0x70.HALF.LO = sub_080001DA(COORD_TO_TILE(this), this->collisionLayer); @@ -175,7 +174,7 @@ void sub_08082614(Entity* this) { sub_0800445C(this); if (--this->actionDelay != 0xFF) { - sub_0806F69C(this); + LinearMoveUpdate(this); sub_08016A6C(this); return; } diff --git a/src/object/railtrack.c b/src/object/railtrack.c index 223a5603..3344feaf 100644 --- a/src/object/railtrack.c +++ b/src/object/railtrack.c @@ -1,4 +1,5 @@ #include "global.h" +#include "asm.h" #include "audio.h" #include "entity.h" #include "room.h" diff --git a/src/object/smoke.c b/src/object/smoke.c index d603ea1c..7fed0867 100644 --- a/src/object/smoke.c +++ b/src/object/smoke.c @@ -43,7 +43,7 @@ void sub_0808A484(Entity* this) { void sub_0808A4D0(Entity* this) { GetNextFrame(this); - sub_0806F69C(this); + LinearMoveUpdate(this); if (this->frame & 0x80) { DeleteEntity(this); } diff --git a/src/object/treeHidingPortal.c b/src/object/treeHidingPortal.c index 69db7173..de23744d 100644 --- a/src/object/treeHidingPortal.c +++ b/src/object/treeHidingPortal.c @@ -4,7 +4,6 @@ #include "flags.h" #include "player.h" #include "room.h" -#include "structures.h" #include "functions.h" #include "effects.h" diff --git a/src/object/warpPoint.c b/src/object/warpPoint.c index bd5fc8cf..893ddddd 100644 --- a/src/object/warpPoint.c +++ b/src/object/warpPoint.c @@ -1,9 +1,6 @@ #include "global.h" #include "object.h" -#include "player.h" -#include "flags.h" #include "overworld.h" -#include "audio.h" #include "functions.h" extern Hitbox gHitbox_1; @@ -11,7 +8,6 @@ extern Hitbox gHitbox_1; extern void sub_0807CAC8(u32); extern u32 sub_0807CAEC(u32); -void WarpPoint(Entity*); void sub_0808B474(Entity*); void sub_0808B530(Entity*); void sub_0808B564(Entity*); @@ -212,7 +208,7 @@ u32 sub_0808B7C8(Entity* this) { if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.framestate != PL_STATE_DIE && gPlayerEntity.health != 0 && sub_08079F8C() && EntityInRectRadius(this, &gPlayerEntity, 5, 5) && gPlayerEntity.z.HALF.HI == 0) { if (this->actionDelay == 0 && gPlayerEntity.action == PLAYER_08072C9C) { - sub_080791D0(); + ResetPlayerAnimationAndAction(); } return 1; } diff --git a/src/object/well.c b/src/object/well.c index 86710ac6..dfc61a9c 100644 --- a/src/object/well.c +++ b/src/object/well.c @@ -1,4 +1,5 @@ #include "global.h" +#include "asm.h" #include "entity.h" #include "room.h" #include "player.h" diff --git a/src/object/windcrest.c b/src/object/windcrest.c index 3ebaef24..edbe2e75 100644 --- a/src/object/windcrest.c +++ b/src/object/windcrest.c @@ -3,7 +3,6 @@ #include "entity.h" #include "save.h" #include "script.h" -#include "functions.h" #include "effects.h" extern void sub_08078850(Entity*, u32, u32, u8*); diff --git a/src/objectUtils.c b/src/objectUtils.c index 3fb4da3c..86fe0a2c 100644 --- a/src/objectUtils.c +++ b/src/objectUtils.c @@ -3,7 +3,6 @@ #include "coord.h" #include "room.h" #include "object.h" -#include "effects.h" #include "functions.h" #include "definitions.h" diff --git a/src/overworld.c b/src/overworld.c index fdd22b3e..cc70b283 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -11,7 +11,6 @@ #include "fileScreen.h" #include "menu.h" #include "functions.h" -#include "structures.h" #include "area.h" #include "textbox.h" #include "overworld.h" @@ -20,7 +19,6 @@ extern u32 gUnk_03003FC0; extern u8 gUnk_080FCA84[]; extern u8 gUnk_080FCAC8[]; -extern u32 gUsedPalettes; extern u8 gUnk_02024090[]; extern u16 gUnk_080FCAD6[]; @@ -35,16 +33,12 @@ extern u8 gUnk_080FCAF8[]; extern u16 gUnk_020178E0[]; void sub_080520C4(); -void SetPopupState(); -u32 sub_08052724(); void CleanUpGFXSlots(); void sub_080ADE24(); void sub_0801C370(u32); void sub_0801AE44(u32); void GenerateAreaHint(void); void ForceSetPlayerState(u32); -void SetPlayerEventPriority(void); -RoomResInfo* GetCurrentRoomInfo(void); void UpdateRoomTracker(void); void InitScriptData(void); void sub_08054524(void); @@ -432,10 +426,10 @@ u32 CheckHasMap(void) { return (gArea.areaMetadata >> 3) & 1; } -s32 ModHealth(s32 deltaHealth) { +s32 ModHealth(s32 delta) { s32 newHealth; - newHealth = gStats.health + deltaHealth; + newHealth = gStats.health + delta; if (newHealth < 0) { newHealth = 0; } @@ -447,11 +441,11 @@ s32 ModHealth(s32 deltaHealth) { return newHealth; } -void ModRupees(s32 rupeeDelta) { +void ModRupees(s32 delta) { s32 newRupeeCount; Stats* s = &gStats; - newRupeeCount = s->rupees + rupeeDelta; + newRupeeCount = s->rupees + delta; if (newRupeeCount < 0) { newRupeeCount = 0; } else { diff --git a/src/player.c b/src/player.c index 53cbe00b..12c3ac59 100644 --- a/src/player.c +++ b/src/player.c @@ -10,18 +10,32 @@ #include "save.h" #include "object.h" #include "functions.h" -#include "object.h" -#include "effects.h" #include "hitbox.h" #include "overworld.h" #include "screen.h" #include "main.h" +#define GRAVITY_RATE 0x2000 +#define SLOPE_SPEED_MODIFIER 0x50 + +#define JUMP_SPEED_FWD 0x100 +#define BOUNCE_SPEED_FWD 0x100 +#define BOUNCE_SPEED_Z 0x20000 +#define HOLE_SPEED_FWD 0x78 +#define HOLE_SPEED_Z 0x1a000 +#define PULL_SPEED 0x80 +#define PUSH_SPEED 0x80 +#define ROLL_SPEED 0x200 + +#define PIT_DAMAGE 0x2 + +#define DEFAULT_ANIM 0x100 + typedef void(EntityAction)(Entity*); static EntityAction PlayerInit; static EntityAction PlayerNormal; -static EntityAction PlayerInit; +// static EntityAction PlayerInit; static EntityAction PlayerFall; static EntityAction PlayerJump; static EntityAction PlayerPush; @@ -44,7 +58,7 @@ static EntityAction PlayerUsePortal; static EntityAction PlayerTalkEzlo; static EntityAction PlayerRoomTransition; static EntityAction PlayerRoll; -static EntityAction sub_080728AC; +static EntityAction PlayerWaitForScroll; static EntityAction PlayerInHole; static EntityAction sub_08072C9C; static EntityAction sub_08074C44; @@ -182,7 +196,7 @@ static EntityAction sub_080737BC; static EntityAction sub_0807380C; static EntityAction sub_08073884; -// sub_08073904... ? +// DoJump... ? static EntityAction sub_08073924; static EntityAction sub_08073968; static EntityAction sub_080739EC; @@ -221,9 +235,8 @@ static EntityAction sub_080751B4; static void sub_080717F8(Entity*); static void ResetPlayerPriority(); -static void sub_080728AC(Entity*); -static void BreakOut(); -static void sub_08073AD4(); +static void BreakOut(Entity* this); +static void sub_08073AD4(Entity* this); static void sub_08073B60(Entity*); static void sub_08074244(Entity*, u32, u32); static void hide(Entity*); @@ -237,8 +250,7 @@ void SurfaceAction_AutoLadder(Entity*); extern void RespawnPlayer(); extern void sub_080797EC(); -extern void sub_08079E08(); -extern void ResetPlayerVelocity(); +extern void UpdatePlayerMovement(); extern void sub_08077698(); extern void sub_08079258(); extern void EnablePlayerDraw(); @@ -246,7 +258,6 @@ extern u32 sub_08079B24(); extern void sub_08079708(); extern void sub_080792D8(); extern Entity* CreatePlayerBomb(); -extern void sub_080791BC(); extern u32 sub_0806F854(); extern u32 sub_08019840(); extern void sub_08079744(); @@ -259,14 +270,13 @@ extern void sub_08078F24(); extern void sub_0807B068(); extern u32 sub_080001DA(); extern u32 sub_0807A2F8(); -extern u32 CheckIsOverworld(); extern u32 sub_0806F730(); extern u32 sub_08007DD6(); extern u32 GetSurfaceCalcType(); -extern void sub_08074808(); -extern void sub_08073904(Entity*); +extern void sub_08074808(Entity* this); +extern void DoJump(Entity*); extern void SetZeldaFollowTarget(Entity*); -extern u32 ItemIsSword(u32); +u32 ItemIsSword(u32 item); extern u32 sub_0807A2B8(); extern u32 sub_08079550(u32); extern u32 sub_080782C0(); @@ -274,6 +284,8 @@ extern u32 sub_080793E4(u32); extern void sub_08008AC6(Entity*); extern u32 sub_08079C30(Entity*); extern void sub_08077AEC(); +extern u32 RunQueuedAction(); +extern void UpdatePlayerSkills(); extern ScreenTransitionData gUnk_0813AB58; extern ScreenTransitionData gUnk_0813AD88[]; @@ -312,7 +324,7 @@ void DoPlayerAction(Entity* this) { [PLAYER_TALKEZLO] = PlayerTalkEzlo, [PLAYER_ROOMTRANSITION] = PlayerRoomTransition, [PLAYER_ROLL] = PlayerRoll, - [PLAYER_080728AC] = sub_080728AC, + [PLAYER_080728AC] = PlayerWaitForScroll, [PLAYER_INHOLE] = PlayerInHole, [PLAYER_08072C9C] = sub_08072C9C, [PLAYER_08074C44] = sub_08074C44, @@ -337,20 +349,20 @@ static void PlayerInit(Entity* this) { this->hitbox = (Hitbox*)&gPlayerHitbox; this->spriteIndex = 1; #ifndef EU - gPlayerState.animation = 0x100; + gPlayerState.animation = DEFAULT_ANIM; #endif sub_0806FDA0(this); LoadSwapGFX(this, 1, 2); InitAnimationForceUpdate(this, 2); if (this->collisionLayer == 0) { - sub_08016A30(this); + ResolveCollisionLayer(this); } if (IsItemEquipped(ITEM_LANTERN_ON) != 2) { sub_08077728(); } - sub_0807A108(); - sub_0807AEE4(); + DeleteClones(); + UpdatePlayerSkills(); if (RunQueuedAction() == 0) { sub_0807921C(); @@ -358,10 +370,10 @@ static void PlayerInit(Entity* this) { if (gPlayerState.swimState != 0) { Entity* ent; gPlayerState.swimState = 1; - sub_08079938(); + ResolvePlayerAnimation(); gPlayerState.framestate = PL_STATE_SWIM; sub_0807ACCC(this); - ent = FindEntity(0x6, 0xf, 0x6, 0xb, 0x0); + ent = FindEntity(OBJECT, SPECIAL_FX, 0x6, FX_WATER_SPLASH, 0x0); if (ent != NULL) { DeleteEntity(ent); } @@ -376,10 +388,10 @@ static void sub_08070BEC(Entity* this, u32 r0) { if (r0 & 1) sub_080797EC(); else - sub_08079938(); + ResolvePlayerAnimation(); if (r0 & 2) - sub_08079E08(); + UpdatePlayerMovement(); } static void PlayerFall(Entity* this) { @@ -414,15 +426,15 @@ static void PlayerFallInit(Entity* this) { COLLISION_OFF(this); this->spritePriority.b1 = 0; ResetPlayer(); - sub_0807A108(); + DeleteClones(); SoundReq(SFX_PLY_VO7); SoundReq(SFX_FALL_HOLE); } static void PlayerFallUpdate(Entity* this) { UpdateAnimationSingleFrame(this); - if ((this->frame & 0x80) != 0) { - if ((gSave.stats.health != 0) && ((gPlayerState.flags & 0x8000) != 0)) { + if (this->frame & 0x80) { + if ((gSave.stats.health != 0) && (gPlayerState.flags & 0x8000)) { gPlayerState.flags &= ~(PL_BUSY | PL_DROWNING); this->spriteSettings.draw = 0; } else { @@ -430,7 +442,7 @@ static void PlayerFallUpdate(Entity* this) { RespawnPlayer(); gPlayerState.field_0xa = 0; this->iframes = 32; - ModHealth(-2); + ModHealth(-PIT_DAMAGE); } } } @@ -447,19 +459,19 @@ static void PlayerBounce(Entity* this) { static void PlayerBounceInit(Entity* this) { COLLISION_OFF(this); this->direction = DirectionTurnAround(Direction8FromAnimationState(AnimationStateWalk(this->animationState))); - this->speed = 0x100; + this->speed = BOUNCE_SPEED_FWD; this->knockbackDuration = 0; this->subAction++; this->actionDelay = gPlayerState.field_0x38; this->spriteIndex = 1; if ((gPlayerState.flags & PL_MINISH) == 0) { - this->zVelocity = 0x20000; + this->zVelocity = BOUNCE_SPEED_Z; gPlayerState.animation = 0x114; InitScreenShake(16, 0); } else { gPlayerState.animation = 0xc18; - this->zVelocity = 0x18000; + this->zVelocity = (BOUNCE_SPEED_Z * 3) / 4; } gPlayerState.jumpStatus = 0x80; @@ -472,10 +484,10 @@ static void PlayerBounceInit(Entity* this) { static NONMATCH("asm/non_matching/player/sub_08070DC4.inc", void PlayerBounceUpdate(Entity* this)) { UpdateAnimationSingleFrame(this); sub_080085B0(this); - sub_08079E08(); + UpdatePlayerMovement(); UpdateFloorType(); - if (RunQueuedAction() || GravityUpdate(this, 0x2000)) + if (RunQueuedAction() || GravityUpdate(this, GRAVITY_RATE)) return; gPlayerState.jumpStatus = 0; @@ -485,7 +497,7 @@ static NONMATCH("asm/non_matching/player/sub_08070DC4.inc", void PlayerBounceUpd if (gPlayerState.swimState != 0) { gPlayerState.jumpStatus = 0; - sub_080791D0(); + ResetPlayerAnimationAndAction(); return; } @@ -498,8 +510,8 @@ static NONMATCH("asm/non_matching/player/sub_08070DC4.inc", void PlayerBounceUpd if ((gPlayerState.field_0x14 == 0) && sub_08008B22()) { gPlayerState.field_0x11 = 7; - sub_08079938(); - sub_080791BC(); + ResolvePlayerAnimation(); + SetPlayerActionNormal(); return; } @@ -508,14 +520,14 @@ static NONMATCH("asm/non_matching/player/sub_08070DC4.inc", void PlayerBounceUpd this->subAction++; if ((gPlayerState.flags & PL_MINISH) == 0) - gPlayerState.animation = 0x100; + gPlayerState.animation = DEFAULT_ANIM; } END_NONMATCH static void sub_08070E7C(Entity* this) { if (--this->actionDelay == 0) { gPlayerState.jumpStatus = 0; - sub_080791D0(); + ResetPlayerAnimationAndAction(); } } @@ -542,7 +554,7 @@ static void sub_08070EDC(Entity* this) { this->subAction = 1; if ((gPlayerState.flags & PL_MINISH) == 0) - sub_08079938(); + ResolvePlayerAnimation(); else gPlayerState.animation = 0xc18; } @@ -551,7 +563,7 @@ static void sub_08070f24(Entity* this) { UpdateAnimationSingleFrame(this); if ((gMessage.doTextBox & 0x7f) == 0) { this->updatePriority = this->updatePriorityPrev; - sub_080791D0(); + ResetPlayerAnimationAndAction(); } } @@ -625,7 +637,7 @@ static void sub_08071038(Entity* this) { this->knockbackDuration = 0; this->iframes = 248; gPlayerState.jumpStatus = 0; - sub_080791D0(); + ResetPlayerAnimationAndAction(); } } @@ -653,7 +665,6 @@ static void PlayerJumpInit(Entity* this) { if ((gPlayerState.heldObject | gPlayerState.field_0x1a[1]) == 0) { if ((gPlayerState.flags & PL_MINISH) == 0) { ResetPlayer(); - if (gPlayerState.flags & PL_NO_CAP) { gPlayerState.animation = 0x420; } else { @@ -669,8 +680,8 @@ static void PlayerJumpInit(Entity* this) { asm("lsl r0, r0, #0x4"); this->zVelocity = (temp - 4) * 64 * 64; - this->speed = 256; - sub_0807A108(); + this->speed = JUMP_SPEED_FWD; + DeleteClones(); SoundReq(SFX_PLY_JUMP); SoundReq(SFX_PLY_VO4); } @@ -686,16 +697,16 @@ static void sub_08071130(Entity* this) { return; } - sub_0806F69C(this); + LinearMoveUpdate(this); - if (GravityUpdate(this, 0x2000)) + if (GravityUpdate(this, GRAVITY_RATE)) return; gPlayerState.jumpStatus = 0; - sub_0800455E(this); + ResetCollisionLayer(this); if (*(Entity**)&this->field_0x74 != NULL) - sub_0800455E(*(Entity**)&this->field_0x74); + ResetCollisionLayer(*(Entity**)&this->field_0x74); sub_08008790(this, 7); @@ -709,7 +720,7 @@ static void sub_08071130(Entity* this) { if ((sub_08079D48() == 0) || (gPlayerState.swimState != 0)) { gPlayerState.jumpStatus = 0; - sub_080791D0(); + ResetPlayerAnimationAndAction(); return; } @@ -739,7 +750,7 @@ static void sub_08071208(Entity* this) { if (--this->actionDelay == 0xff) { gPlayerState.jumpStatus = 0; - sub_080791D0(); + ResetPlayerAnimationAndAction(); } } @@ -830,7 +841,7 @@ static void PlayerUsePortal(Entity* this) { DoFade(7, 16); SoundReq(SFX_F8); } else { - sub_0804ACF8(); + RespawnAsMinish(); } } @@ -846,11 +857,11 @@ static void PortalJumpOnUpdate(Entity* this) { if ((this->x.HALF.HI != x) || (this->y.HALF.HI != y)) { this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, gArea.curPortalX, gArea.curPortalY); - this->speed = 256; - sub_08079E08(); + this->speed = JUMP_SPEED_FWD; + UpdatePlayerMovement(); } - sub_08073904(this); + DoJump(this); UpdateAnimationSingleFrame(this); if (gPlayerState.jumpStatus == 0) { @@ -886,7 +897,7 @@ static void PortalStandUpdate(Entity* this) { this->direction = gPlayerState.field_0xd; this->animationState = Direction8ToAnimationState(this->direction); this->zVelocity = 0x20000; - this->speed = 256; + this->speed = JUMP_SPEED_FWD; this->action = PLAYER_MINISH; this->subAction = 7; this->field_0xf = 0; @@ -907,7 +918,7 @@ static void PortalStandUpdate(Entity* this) { } else { sub_08077698(this); } - sub_08079938(); + ResolvePlayerAnimation(); } static void PortalActivateInit(Entity* this) { @@ -953,7 +964,7 @@ static ASM_FUNC("asm/non_matching/player/PortalShrinkUpdate.inc", void PortalShr static void PortalEnterUpdate(Entity* this) { if (this->actionDelay == 0) { - if (GravityUpdate(this, 0x2000)) + if (GravityUpdate(this, GRAVITY_RATE)) return; this->spriteSettings.draw = FALSE; @@ -991,16 +1002,14 @@ static void sub_080717F8(Entity* this) { 0, -22, 22, 0, 0, 22, -22, 0, }; - u32 x; - u32 y; this->animationState = gArea.curPortalExitDirection << 1; this->x.HALF.HI = gArea.curPortalX + sOffsets[gArea.curPortalExitDirection * 2]; this->y.HALF.HI = gArea.curPortalY + sOffsets[gArea.curPortalExitDirection * 2 + 1]; gArea.unk1A = 0xb4; gUnk_02034490[0] = 0; - this->action = 9; + this->action = PLAYER_MINISH; this->subAction = 0; - gPlayerState.flags = (gPlayerState.flags & ~PL_USE_PORTAL) | 0x80; + gPlayerState.flags = (gPlayerState.flags & ~PL_USE_PORTAL) | PL_MINISH; sub_0805EC60(this); ResetPlayerEventPriority(); } @@ -1049,7 +1058,7 @@ static void PlayerTalkEzloInit(Entity* this) { return; } - if (!GravityUpdate(this, 0x2000)) + if (!GravityUpdate(this, GRAVITY_RATE)) gPlayerState.jumpStatus = 0; } @@ -1076,7 +1085,6 @@ static void sub_08071990(Entity* this) { if ((gMessage.doTextBox & 0x7f) == 0) { this->subAction++; - if ((gPlayerState.flags & PL_MINISH) == 0) { if (this->animationState == IdleEast) gPlayerState.animation = 0x3cd; @@ -1120,7 +1128,7 @@ static void sub_08071A4C(Entity* this) { } static void ResetPlayerPriority(void) { - gPriorityHandler.sys_priority = 0; + gPriorityHandler.sys_priority = PRIO_MIN; gPlayerEntity.updatePriority = gPlayerEntity.updatePriorityPrev; } @@ -1136,16 +1144,15 @@ static void PlayerPush(Entity* this) { } static void PlayerPushInit(Entity* this) { - u32 speed; - this->subAction++; gPlayerState.flags |= PL_BUSY; if (this->type == 1) { + // scripted push? this->speed = 0; this->actionDelay = 0; this->field_0xf = 1; } else { - this->speed = (gPlayerState.flags & PL_MINISH) ? 64 : 128; + this->speed = (gPlayerState.flags & PL_MINISH) ? PUSH_SPEED / 2 : PUSH_SPEED; } PlayerPushUpdate(this); } @@ -1156,11 +1163,25 @@ static void PlayerPushUpdate(Entity* this) { u16 speed; } PushFrame; - static const PushFrame sPushFrames[] = { { 5, 0x0 }, { 1, 0x100 }, { 5, 0x0 }, { 1, 0x100 }, { 2, 0x0 }, - { 1, 0x100 }, { 2, 0x0 }, { 1, 0x100 }, { 3, 0x0 }, { 1, 0x100 }, - { 8, 0x60 }, { 8, 0x60 }, { 8, 0x60 }, { 8, 0x40 }, { 0xFF, 0x0 } }; + static const PushFrame sPushFrames[] = { + { 5, 0 }, + { 1, PUSH_SPEED * 2 }, + { 5, 0 }, + { 1, PUSH_SPEED * 2 }, + { 2, 0 }, + { 1, PUSH_SPEED * 2 }, + { 2, 0 }, + { 1, PUSH_SPEED * 2 }, + { 3, 0 }, + { 1, PUSH_SPEED * 2 }, + { 8, PUSH_SPEED * 3 / 4 }, + { 8, PUSH_SPEED * 3 / 4 }, + { 8, PUSH_SPEED * 3 / 4 }, + { 8, PUSH_SPEED / 2 }, + { 0xFF, 0 }, + }; - gPlayerState.field_0x80 = 0; + gPlayerState.speed_modifier = 0; UpdateAnimationSingleFrame(this); if (this->type == 1) { if (--this->field_0xf == 0) { @@ -1179,7 +1200,7 @@ static void PlayerPushUpdate(Entity* this) { this->subAction++; } } - sub_08079E08(); + UpdatePlayerMovement(); } static void sub_08071B60(Entity* this) { @@ -1187,7 +1208,7 @@ static void sub_08071B60(Entity* this) { gPlayerState.flags &= ~PL_BUSY; this->type = 0; this->knockbackDuration = 0; - sub_080728AC(this); + PlayerWaitForScroll(this); this->field_0xf = 6; if ((gPlayerState.flags & PL_MINISH) == 0) { gPlayerState.animation = 0x104; @@ -1215,7 +1236,7 @@ static void PlayerMinishDieInit(Entity* this) { if (gPlayerState.flags & (0x10 | 0x100)) return; - if (GravityUpdate(this, 0x2000)) { + if (GravityUpdate(this, GRAVITY_RATE)) { if (gPlayerState.flags & PL_NO_CAP) gPlayerState.animation = 0x420; else @@ -1229,7 +1250,7 @@ static void PlayerMinishDieInit(Entity* this) { gPlayerState.floor_type == SURFACE_MINISH_DOOR_BACK || gPlayerState.floor_type == SURFACE_A) { EnablePlayerDraw(this); RespawnPlayer(); - this->action = 10; + this->action = PLAYER_MINISHDIE; } temp = 0xc1a; } else { @@ -1299,12 +1320,12 @@ static void sub_08071D04(Entity* this) { static void sub_08071D80(Entity* this) { UpdateAnimationSingleFrame(this); gPlayerState.field_0x14 = 1; - sub_08073904(this); + DoJump(this); if ((gPlayerState.jumpStatus & 7) == 3) { gPlayerState.jumpStatus = 0; this->iframes = 226; ResetPlayerEventPriority(); - sub_080791D0(); + ResetPlayerAnimationAndAction(); } } @@ -1323,7 +1344,7 @@ static void sub_08071DD0(Entity* this) { if (gPlayerState.field_0x39 != 0) { gPlayerState.field_0x39 = 0; this->subAction = 2; - gPlayerState.animation = 0x100; + gPlayerState.animation = DEFAULT_ANIM; } else { this->subAction = 1; gPlayerState.animation = 0x114; @@ -1336,7 +1357,7 @@ static void sub_08071E04(Entity* this) { if (gPlayerState.floor_type == SURFACE_PIT) { gPlayerState.field_0x11 = 7; gPlayerState.flags |= PL_FALLING; - sub_080791BC(); + SetPlayerActionNormal(); return; } } @@ -1354,17 +1375,17 @@ static void sub_08071E04(Entity* this) { this->actionDelay -= 1; if ((s8)this->actionDelay < 1) - sub_080791BC(); + SetPlayerActionNormal(); } static void sub_08071E74(Entity* this) { u32 temp; - GravityUpdate(this, 0x2000); - sub_08079E08(); + GravityUpdate(this, GRAVITY_RATE); + UpdatePlayerMovement(); temp = this->actionDelay--; if (temp == 0) - sub_080791BC(); + SetPlayerActionNormal(); } static void PlayerEmptyBottle(Entity* this) { @@ -1426,7 +1447,7 @@ static void PlayerFrozenInit(Entity* this) { } static void PlayerFrozenUpdate(Entity* this) { - if (GravityUpdate(this, 0x2000) == 0) { + if (GravityUpdate(this, GRAVITY_RATE) == 0) { UpdateSpriteForCollisionLayer(this); gPlayerState.jumpStatus = 0; if (gPlayerState.field_0x14 == 0) { @@ -1461,7 +1482,7 @@ static void BreakOut(Entity* this) { this->spriteOffsetX = 0; gPlayerState.flags &= ~(PL_FROZEN | PL_BUSY); CreateFx(this, FX_ICE, 0); - sub_080791BC(); + SetPlayerActionNormal(); } static void sub_0807204C(Entity* this) { @@ -1493,7 +1514,7 @@ static void sub_08072098(Entity* this) { if (this->health != 0) COLLISION_ON(this); - sub_080791BC(); + SetPlayerActionNormal(); } static void sub_080720DC(Entity* this) { @@ -1529,12 +1550,12 @@ static void sub_08072168(Entity* this) { u32 i; UpdateAnimationSingleFrame(this); - i = (u16)sub_0806F854(this, 0, -12) ? 0x4000 : 0x2000; + i = (u16)sub_0806F854(this, 0, -12) ? GRAVITY_RATE * 2 : GRAVITY_RATE; GravityUpdate(this, i); if (gPlayerState.field_0x3a) { - sub_0806F69C(this); + LinearMoveUpdate(this); } else { - sub_08079E08(); + UpdatePlayerMovement(); } gPlayerState.field_0xd = this->direction; sub_08019840(); @@ -1542,7 +1563,7 @@ static void sub_08072168(Entity* this) { this->knockbackDuration = 0; COLLISION_ON(this); UpdateSpriteForCollisionLayer(this); - sub_080791BC(); + SetPlayerActionNormal(); } } @@ -1559,7 +1580,7 @@ static void PlayerPull(Entity* this) { static void sub_08072214(Entity* this) { this->subAction = 1; - this->speed = 128; + this->speed = PULL_SPEED; this->actionDelay = gPlayerState.field_0x38; this->direction = Direction8FromAnimationState(AnimationStateTurnAround(this->animationState)); if ((gPlayerState.flags & PL_NO_CAP) == 0) { @@ -1572,8 +1593,8 @@ static void sub_08072214(Entity* this) { } static void sub_08072260(Entity* this) { - gPlayerState.field_0x80 = 0; - sub_08079E08(); + gPlayerState.speed_modifier = 0; + UpdatePlayerMovement(); UpdateAnimationSingleFrame(this); if (--this->actionDelay == 0) { gPlayerState.flags &= ~PL_BUSY; @@ -1583,7 +1604,7 @@ static void sub_08072260(Entity* this) { gPlayerState.animation = 0x944; } this->knockbackDuration = 0; - sub_080791BC(); + SetPlayerActionNormal(); } } @@ -1626,7 +1647,7 @@ static void sub_08072354(Entity* this) { sub_0806F854(this, 0, -12); UpdateAnimationSingleFrame(this); sub_08079744(this); - if (GravityUpdate(this, 0x2000)) + if (GravityUpdate(this, GRAVITY_RATE)) return; this->spritePriority.b1 = 0; @@ -1679,11 +1700,11 @@ static void sub_0807246C(Entity* this) { static void sub_08072490(Entity* this) { if (--this->actionDelay != 0xff) { UpdateAnimationSingleFrame(this); - sub_08079E08(); + UpdatePlayerMovement(); } else { this->iframes = 60; ModHealth(-8); - sub_080791D0(); + ResetPlayerAnimationAndAction(); } } @@ -1697,14 +1718,14 @@ static void PlayerRoomTransition(Entity* this) { static void sub_080724DC(Entity* this) { this->knockbackDuration = 0; - sub_0807A108(); + DeleteClones(); if (sub_080002B8(this) != 0x29) { if ((gPlayerState.field_0x82[7] == 0) && (gPlayerState.swimState != 0)) { sub_0807AE20(this); } if (gRoomControls.unk2 == 0) { this->updatePriority = this->updatePriorityPrev; - sub_080728AC(this); + PlayerWaitForScroll(this); } else if (gPlayerState.field_0x1c == 0) { UpdateAnimationSingleFrame(this); } @@ -1725,12 +1746,12 @@ static void sub_080724DC(Entity* this) { static void sub_0807258C(Entity* this) { if (gRoomControls.unk2 == 0) { if (sub_0807A894(this) == 0x29) { - sub_08079E08(); + UpdatePlayerMovement(); if (sub_080797C4() != 0) { gPlayerState.startPosX = gPlayerEntity.x.HALF.HI; gPlayerState.startPosY = gPlayerEntity.y.HALF.HI; this->updatePriority = this->updatePriorityPrev; - sub_080728AC(this); + PlayerWaitForScroll(this); } else { UpdateAnimationSingleFrame(this); } @@ -1738,7 +1759,7 @@ static void sub_0807258C(Entity* this) { gPlayerState.startPosX = gPlayerEntity.x.HALF.HI; gPlayerState.startPosY = gPlayerEntity.y.HALF.HI; this->updatePriority = this->updatePriorityPrev; - sub_080728AC(this); + PlayerWaitForScroll(this); } } if ((gPlayerState.field_0x82[7] == 0) && (gPlayerState.swimState != 0)) { @@ -1794,7 +1815,7 @@ static void PlayerRollUpdate(Entity* this) { if (RunQueuedAction()) return; - sub_080728AC(this); + PlayerWaitForScroll(this); return; } @@ -1822,7 +1843,7 @@ static void PlayerRollUpdate(Entity* this) { if (gPlayerState.flags & (PL_FALLING | PL_HIDDEN | 0x10)) { gPlayerState.flags &= ~PL_ROLLING; - sub_080728AC(this); + PlayerWaitForScroll(this); return; } @@ -1833,21 +1854,21 @@ static void PlayerRollUpdate(Entity* this) { switch (this->frame & 0xf) { case 0: if ((this->frame & 0xf) == 0) { - this->speed = 0x200; + this->speed = ROLL_SPEED; } break; case 1: - this->speed += 0x20; + this->speed += ROLL_SPEED / 16; break; case 2: - this->speed = 0x300; + this->speed = (ROLL_SPEED * 3 / 2); break; case 3: this->speed = 0; break; } sub_08078F24(); - sub_08079E08(); + UpdatePlayerMovement(); } if (((this->frame & 0x10) == 0) && ((gPlayerState.flags & PL_MINISH) == 0)) { // dont take damage @@ -1857,7 +1878,7 @@ static void PlayerRollUpdate(Entity* this) { sub_08077698(this); } if ((this->frame & 0x80) || (gPlayerState.field_0x3[1] != 0)) { - sub_080791D0(); + ResetPlayerAnimationAndAction(); } if (this->frame & 0x80) { gPlayerState.flags &= ~(PL_RELEASED | PL_ROLLING); @@ -1865,8 +1886,8 @@ static void PlayerRollUpdate(Entity* this) { UpdateAnimationSingleFrame(this); } -static void sub_080728AC(Entity* this) { - sub_08079938(); +static void PlayerWaitForScroll(Entity* this) { + ResolvePlayerAnimation(); if (gPlayerState.flags & PL_MINISH) sub_0807B068(this); else @@ -1879,10 +1900,10 @@ static void sub_080728AC(Entity* this) { if ((gPlayerState.flags & PL_MINISH) == 0) gPlayerEntity.spritePriority.b1 = 1; - if ((gRoomControls.unk6 & 4) == 0) { + if ((gRoomControls.scroll_flags & 4) == 0) { if (gPlayerState.flags & PL_HIDDEN) COLLISION_ON(this); - sub_080791D0(); + ResetPlayerAnimationAndAction(); } if ((gPlayerState.flags & 2) == 0) { UpdateFloorType(); @@ -1950,8 +1971,8 @@ static void sub_08072ACC(Entity* this) { } else if (this->field_0xf > 7) { COLLISION_ON(this); this->direction = gPlayerState.field_0xd; - this->zVelocity = 0x1a000; - this->speed = 120; + this->zVelocity = HOLE_SPEED_Z; + this->speed = HOLE_SPEED_FWD; this->spritePriority.b0 = 4; this->spritePriority.b1 = 1; gPlayerState.jumpStatus = 0x41; @@ -2003,8 +2024,8 @@ static void sub_08072B5C(Entity* this) { static void sub_08072C48(Entity* this) { UpdateAnimationSingleFrame(this); - sub_0806F69C(this); - if (GravityUpdate(this, 0x2000)) + LinearMoveUpdate(this); + if (GravityUpdate(this, GRAVITY_RATE)) return; sub_08008790(this, 7); @@ -2012,7 +2033,7 @@ static void sub_08072C48(Entity* this) { if (sub_08008B22()) { gPlayerState.field_0x11 = 7; if (!(gPlayerState.flags & PL_MINISH)) { - sub_080791BC(); + SetPlayerActionNormal(); } } } else { @@ -2044,7 +2065,7 @@ static void sub_08072CC0(Entity* this) { static void sub_08072CFC(Entity* this) { sub_080042BA(this, 2); if (--this->field_0xf != 0xff) { - sub_0806F69C(this); + LinearMoveUpdate(this); return; } @@ -2074,12 +2095,11 @@ static const u16* const sTileTable[] = { static NONMATCH("asm/non_matching/player/sub_08072D54.inc", void sub_08072D54(Entity* this)) { u32 bVar1; u32 uVar2; - u32 iVar3; UpdateAnimationSingleFrame(this); sub_0806F854(this, 0, -12); if (this->actionDelay != 0) { - sub_0806F69C(this); + LinearMoveUpdate(this); } else { uVar2 = sub_0806F730(this); uVar2 = GetTileType(uVar2, this->collisionLayer); @@ -2098,9 +2118,9 @@ static NONMATCH("asm/non_matching/player/sub_08072D54.inc", void sub_08072D54(En break; case 3: if (this->actionDelay == 0) { - sub_08079E08(); + UpdatePlayerMovement(); } else { - sub_0806F69C(this); + LinearMoveUpdate(this); } break; case 2: @@ -2121,18 +2141,18 @@ static NONMATCH("asm/non_matching/player/sub_08072D54.inc", void sub_08072D54(En } if (this->actionDelay != 0) { - sub_0806F69C(this); + LinearMoveUpdate(this); } else { - sub_08079E08(); + UpdatePlayerMovement(); } this->actionDelay = 0; } this->actionDelay = bVar1; - if (!GravityUpdate(this, 0x2000)) { + if (!GravityUpdate(this, GRAVITY_RATE)) { COLLISION_ON(this); if (this->collisionLayer == 1) { - sub_0800455E(this); + ResetCollisionLayer(this); } else { sub_08004542(this); } @@ -2141,7 +2161,7 @@ static NONMATCH("asm/non_matching/player/sub_08072D54.inc", void sub_08072D54(En if (sub_08008B22() == 0) { gPlayerState.field_0x11 = 7; if (!(gPlayerState.flags & PL_MINISH)) { - sub_080791BC(); + SetPlayerActionNormal(); } } } else { @@ -2251,7 +2271,7 @@ static void sub_08073094(Entity* this) { this->spritePriority.b1 = 0; this->speed = sSpeeds[this->frame & 0xf]; - sub_08079E08(); + UpdatePlayerMovement(); if (!sub_08019840()) { gPlayerState.pushedObject ^= 0x80; if ((gPlayerState.floor_type != SURFACE_AUTO_LADDER) && (gPlayerState.floor_type != SURFACE_2C)) { @@ -2274,7 +2294,7 @@ static void sub_08073094(Entity* this) { break; case SURFACE_WATER: sub_08074808(this); - sub_080791D0(); + ResetPlayerAnimationAndAction(); break; default: sub_0807921C(); @@ -2342,7 +2362,7 @@ static void sub_080731D8(Entity* this) { gPlayerState.animation = 260; } gRoomControls.cameraTarget = NULL; - sub_0807A108(); + DeleteClones(); ResetPlayer(); } @@ -2350,7 +2370,7 @@ static void sub_080732D0(Entity* this) { UpdateAnimationSingleFrame(this); if (sub_080002B8(this) != 40) { this->direction = DirectionNorth; - sub_0806F69C(this); + LinearMoveUpdate(this); } else { this->subAction++; this->y.HALF.LO = 0; @@ -2377,17 +2397,17 @@ static void sub_0807332C(Entity* this) { } else { this->animationState = 6; if (this->direction <= DirectionWest) { - sub_0806F69C(this); + LinearMoveUpdate(this); return; } this->direction = (this->direction - 1) & 0x1F; } - sub_0806F69C(this); + LinearMoveUpdate(this); return; } if (gPlayerState.field_0x38 != 0) { gRoomControls.cameraTarget = this; - sub_080791BC(); + SetPlayerActionNormal(); } else { gMain.transition = 3; *(&gMain.pauseInterval + 1) = 1; @@ -2412,7 +2432,7 @@ static void sub_080733BC(Entity* this) { } } } - sub_0806F69C(this); + LinearMoveUpdate(this); if (this->field_0x7c.HALF_U.HI == this->y.HALF.HI) { gRoomControls.cameraTarget = this; sub_0807921C(); @@ -2450,7 +2470,7 @@ static void sub_08073468(Entity* this) { } static void sub_080734D4(Entity* this) { - GravityUpdate(this, -0x1000); + GravityUpdate(this, -(GRAVITY_RATE / 2)); if (this->zVelocity > 0 || gPlayerState.field_0x38 == 1) { this->zVelocity = 0x49000; this->subAction++; @@ -2458,7 +2478,7 @@ static void sub_080734D4(Entity* this) { } static void sub_08073504(Entity* this) { - GravityUpdate(this, this->zVelocity < 0 ? 0x800 : 0x4000); + GravityUpdate(this, this->zVelocity < 0 ? GRAVITY_RATE / 4 : GRAVITY_RATE * 2); if (this->zVelocity < 0 && this->z.HALF.HI > -32) { this->subAction++; *((u32*)&this->field_0x80.HWORD) = this->direction << 8; @@ -2497,7 +2517,7 @@ static NONMATCH("asm/non_matching/player/sub_08073584.inc", void sub_08073584(En (gPlayerState.flags & PL_PARACHUTE) == 0) { gPlayerState.jumpStatus |= 0x40; sub_0807921C(); - sub_08073904(this); + DoJump(this); gPlayerState.animation = 1840; return; } @@ -2521,7 +2541,7 @@ static NONMATCH("asm/non_matching/player/sub_08073584.inc", void sub_08073584(En } } this->direction = (*(u32*)&this->field_0x80 >> 8) & 0x1F; - sub_08079E08(); + UpdatePlayerMovement(); state = 4 * this->animationState; dir = this->direction; if (this->animationState == 0) { @@ -2595,7 +2615,7 @@ static void sub_080737BC(Entity* this) { u32 tmp; UpdateAnimationSingleFrame(this); - sub_0806F69C(this); + LinearMoveUpdate(this); this->z.WORD += 0x4C00; if (DirectionIsHorizontal(this->direction)) pos = this->x.HALF.HI; @@ -2624,7 +2644,7 @@ static void sub_0807380C(Entity* this) { } gPlayerState.animation = sAnims[this->animationState >> 1]; if (this->z.HALF.HI < -16) { - GravityUpdate(this, 0x200); + GravityUpdate(this, GRAVITY_RATE / 16); } else { if (--this->actionDelay == 0) { this->subAction = 7; @@ -2655,11 +2675,11 @@ void sub_08073884(Entity* this) { else InitParachuteRoom(); } - GravityUpdate(this, -0x1800); + GravityUpdate(this, -((GRAVITY_RATE * 3) / 4)); UpdateAnimationSingleFrame(this); } -void sub_08073904(Entity* this) { +void DoJump(Entity* this) { static EntityAction* const sStates[] = { sub_08073924, sub_08073968, sub_080739EC, sub_08073A94, sub_08073B8C, sub_08073C30, }; @@ -2709,13 +2729,13 @@ static void sub_080739EC(Entity* this) { gPlayerState.field_0xd = this->direction; if (gPlayerState.jumpStatus & 0x80) this->collisions = 0; - v = 0x2000; + v = GRAVITY_RATE; } else { if ((u16)sub_0806F854(this, 0, -12)) { gPlayerState.jumpStatus |= 8; - v = 0x4000; + v = GRAVITY_RATE * 2; } else { - v = 0x2000; + v = GRAVITY_RATE; if (gPlayerState.jumpStatus & 0x10) v /= 2; } @@ -2775,10 +2795,10 @@ static void sub_08073B60(Entity* this) { gPlayerState.field_0x1a[1] = 0; gPlayerState.field_0x3[1] = 0; gPlayerState.jumpStatus = 0; - sub_08079938(); + ResolvePlayerAnimation(); sub_080085B0(this); if ((gPlayerState.flags & PL_USE_PORTAL) == 0) { - sub_080791BC(); + SetPlayerActionNormal(); } } @@ -2795,7 +2815,7 @@ void sub_08073B8C(Entity* this) { --this->actionDelay; return; } - GravityUpdate(this, 0x4000); + GravityUpdate(this, GRAVITY_RATE * 2); if (this->z.HALF.HI >= -8) { if (!gPlayerState.field_0x14 && (sub_0807A2B8() || !sub_08079D48())) { COLLISION_ON(this); @@ -2865,7 +2885,7 @@ static void sub_08073D20(Entity* this) { return; } if (!RunQueuedAction()) { - sub_08073904(this); + DoJump(this); UpdateFloorType(); if (gPlayerState.jumpStatus) gPlayerState.framestate = PL_STATE_CAPE; @@ -2891,19 +2911,19 @@ static void sub_08073D20(Entity* this) { } if (!sub_08019840()) { sub_08077698(this); - if (!GravityUpdate(this, 0x2000)) + if (!GravityUpdate(this, GRAVITY_RATE)) gPlayerState.jumpStatus = 0; if ((gPlayerState.field_0x7 & 0x80) == 0 && !gPlayerState.field_0xa) { if (this->iframes <= 8) { if (gPlayerState.swimState) { gPlayerState.framestate = PL_STATE_SWIM; sub_0807ACCC(this); - sub_08079E08(); + UpdatePlayerMovement(); } else { this->direction = gPlayerState.field_0xd; if ((gPlayerState.field_0xd & 0x80) == 0) { gPlayerState.framestate = PL_STATE_WALK; - sub_08079E08(1); + UpdatePlayerMovement(); } } } @@ -2945,7 +2965,7 @@ static void sub_08073F4C(Entity* this) { if (this->x.HALF.HI != x || this->y.HALF.HI != y) { this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, gArea.curPortalX, gArea.curPortalY); this->speed = 0x100; - sub_0806F69C(this); + LinearMoveUpdate(this); } else { COLLISION_OFF(this); this->actionDelay = 30; @@ -2969,7 +2989,7 @@ static void sub_08073FD0(Entity* this) { SoundReq(SFX_PLY_JUMP); } } - GravityUpdate(this, 0x2000); + GravityUpdate(this, GRAVITY_RATE); if (this->zVelocity == 0) { this->subAction++; SoundReq(SFX_PLY_GROW); @@ -2988,7 +3008,7 @@ static void sub_08074018(Entity* this) { } static void sub_08074060(Entity* this) { - if (!GravityUpdate(this, 0x2000)) { + if (!GravityUpdate(this, GRAVITY_RATE)) { this->hitbox = (Hitbox*)&gPlayerHitbox; this->direction = DirectionSouth; this->animationState = IdleSouth; @@ -3042,13 +3062,15 @@ static NONMATCH("asm/non_matching/player/sub_080740D8.inc", void sub_080740D8(En v6 = this->y.HALF.HI; v1 = v6 + v5->offset_y - gRoomControls.roomOriginY; break; + default: + break; } if (sub_080086B4(v2, v1, gUnk_080082DC)) - sub_0806F69C(this); + LinearMoveUpdate(this); else this->field_0xf = 1; - if (!GravityUpdate(this, 0x2000)) + if (!GravityUpdate(this, GRAVITY_RATE)) sub_0807921C(); } END_NONMATCH @@ -3075,11 +3097,11 @@ void SurfaceAction_Pit(Entity* this) { } void SurfaceAction_SlopeGndGndVertical(Entity* this) { - sub_08074244(this, 8, 0x18); + sub_08074244(this, DirectionEast, DirectionWest); } void SurfaceAction_SlopeGndGndHorizontal(Entity* this) { - sub_08074244(this, 0, 0x10); + sub_08074244(this, DirectionNorth, DirectionSouth); } static void sub_08074244(Entity* this, u32 a1, u32 a2) { @@ -3096,7 +3118,7 @@ static void sub_08074244(Entity* this, u32 a1, u32 a2) { tmp = 4 * this->animationState; } if (a1 != tmp || a2 != tmp) { - gPlayerState.field_0x80 -= 80; + gPlayerState.speed_modifier -= SLOPE_SPEED_MODIFIER; } } } @@ -3170,7 +3192,7 @@ void SurfaceAction_14(Entity* this) { this->speed = 0x300; this->direction = 16; gPlayerState.field_0xa |= 0x80; - sub_0806F69C(this); + LinearMoveUpdate(this); this->speed = spd; } } @@ -3199,6 +3221,7 @@ void SurfaceAction_CloneTile(Entity* this) { n = 3; break; default: + //! @bug: n is not initialized break; } for (i = 0; i < n; ++i) { @@ -3206,7 +3229,7 @@ void SurfaceAction_CloneTile(Entity* this) { break; } if (n > i) { - Entity* e = CreateObjectWithParent(this, 0x10, i, 0); + Entity* e = CreateObjectWithParent(this, OBJECT_10, i, 0); gPlayerClones[i] = e; if (e != NULL) { CopyPosition(this, e); @@ -3361,7 +3384,7 @@ void SurfaceAction_Ladder(Entity* this) { } void SurfaceAction_2C(Entity* this) { - if (GetInventoryValue(68) == 1) { + if (GetInventoryValue(ITEM_GRIP_RING) == 1) { SurfaceAction_AutoLadder(this); } else { this->y.HALF.HI &= 0xFFF0; @@ -3405,7 +3428,7 @@ void SurfaceAction_22(Entity* this) { void SurfaceAction_Dust(Entity* this) { if (!sub_080741C4()) { - gPlayerState.field_0x80 -= 128; + gPlayerState.speed_modifier -= 128; if (gPlayerState.field_0x11 == 1 || (gPlayerState.field_0x92 & 0xF00) != 0) { if (gPlayerState.floor_type == SURFACE_DUST) CreateObjectWithParent(this, OBJECT_21, 1, 0); @@ -3474,7 +3497,7 @@ static void sub_08074BF8(Entity* this) { gPlayerState.field_0xa |= 0x80; gPlayerState.field_0x1a[0] |= 0x80; gPlayerState.field_0x27[0]++; - sub_0806F69C(this); + LinearMoveUpdate(this); } static void sub_08074C44(Entity* this) { @@ -3520,7 +3543,7 @@ static void sub_08074CF8(Entity* this) { sub_08074D34(this, *(ScriptExecutionContext**)&this->cutsceneBeh.HWORD); if ((this->field_0x82.HWORD & 1) != 0) this->animationState = v3; - GravityUpdate(this, 0x2000); + GravityUpdate(this, GRAVITY_RATE); UpdateAnimationSingleFrame(this); } @@ -3529,11 +3552,13 @@ void sub_08074D34(Entity* this, ScriptExecutionContext* ctx) { u32 bit = (~ctx->postScriptActions + 1) & ctx->postScriptActions; ctx->postScriptActions ^= bit; switch (bit) { + default: + break; case 0x1: if (gPlayerState.flags & PL_NO_CAP) gPlayerState.animation = 0x400; else - gPlayerState.animation = 0x100; + gPlayerState.animation = DEFAULT_ANIM; break; case 0x2: if (gPlayerState.flags & PL_NO_CAP) @@ -3640,7 +3665,7 @@ void sub_08074F8C(Entity* this) { if (!gPlayerState.field_0x39) { gPlayerState.animation = 1024; } else { - gPlayerState.animation = 256; + gPlayerState.animation = DEFAULT_ANIM; } } } @@ -3674,14 +3699,14 @@ void sub_0807501C(Entity* this) { void sub_0807508C(Entity* this) { UpdateAnimationSingleFrame(this); - if (GravityUpdate(this, 0x2000)) { - sub_0806F69C(this); + if (GravityUpdate(this, GRAVITY_RATE)) { + LinearMoveUpdate(this); } else { if (!gPlayerState.field_0x39) { gPlayerState.animation = 1024; } else { gPlayerState.flags &= ~PL_NO_CAP; - gPlayerState.animation = 256; + gPlayerState.animation = DEFAULT_ANIM; } if (--this->actionDelay == 0) { this->animationState = IdleSouth; @@ -3740,7 +3765,7 @@ void sub_080751B4(Entity* this) { this->animationState = IdleSouth; this->subAction = 1; this->field_0x68.HALF.LO = 0; - gPlayerState.animation = 256; + gPlayerState.animation = DEFAULT_ANIM; } } @@ -3762,7 +3787,7 @@ NONMATCH("asm/non_matching/player/sub_080751E8.inc", void sub_080751E8(u32 a1, u gPlayerState.field_0x38 = 1; gPlayerState.field_0x39 = 0; gPlayerState.field_0x3a = a2; - gPlayerState.flags |= 8; + gPlayerState.flags |= PL_NO_CAP; if (!a1) { gPlayerState.field_0x39 = 0; tmp = &script_BedInLinksRoom; @@ -3778,7 +3803,7 @@ NONMATCH("asm/non_matching/player/sub_080751E8.inc", void sub_080751E8(u32 a1, u e2 = CreateSpeechBubbleSleep(&gPlayerEntity, -14, -28); *(Entity**)&gPlayerEntity.field_0x6c.HWORD = e2; if (e2 != NULL) { - SetDefaultPriority(e2, 3); + SetDefaultPriority(e2, PRIO_NO_BLOCK); } } END_NONMATCH @@ -3788,7 +3813,7 @@ void sub_0807529C(Entity* this) { } void sub_080752AC(Entity* this, ScriptExecutionContext* ctx) { - sub_0806F69C(this); + LinearMoveUpdate(this); if (!ctx->unk_18) { if (sub_080002B8(this) != 41) { ctx->unk_18 = 1; diff --git a/src/playerItem/playerItem12.c b/src/playerItem/playerItem12.c index 855fcef8..90eb82c2 100644 --- a/src/playerItem/playerItem12.c +++ b/src/playerItem/playerItem12.c @@ -24,7 +24,7 @@ void sub_0807037C(Entity* this) { void sub_08070398(Entity* this) { GetNextFrame(this); - sub_0806F69C(this); + LinearMoveUpdate(this); if (GravityUpdate(this, 0x2000) == 0) { DeleteThisEntity(); } diff --git a/src/playerItem/playerItem14.c b/src/playerItem/playerItem14.c index 0d241609..f7e04fb3 100644 --- a/src/playerItem/playerItem14.c +++ b/src/playerItem/playerItem14.c @@ -1,8 +1,6 @@ #include "entity.h" #include "audio.h" #include "functions.h" -#include "player.h" -#include "room.h" #include "effects.h" extern void (*const gUnk_08109AC8[])(Entity*); @@ -30,7 +28,7 @@ void sub_0805FBE8(Entity* this) { *(u32*)&this->field_0x6c = 0x3c; InitializeAnimation(this, (this->animationState >> 1) + 0xc); sub_0801766C(this); - sub_0806F69C(this); + LinearMoveUpdate(this); sub_0805FC74(this); SoundReq(SFX_ITEM_SWORD_BEAM); } @@ -40,7 +38,7 @@ void sub_0805FC74(Entity* this) { if (--*(int*)&this->field_0x6c != -1) { GetNextFrame(this); - sub_0806F69C(this); + LinearMoveUpdate(this); this->actionDelay++; if (this->type2 == 0) { sub_0800451C(this); diff --git a/src/playerItem/playerItem15.c b/src/playerItem/playerItem15.c index e90cf433..375e480f 100644 --- a/src/playerItem/playerItem15.c +++ b/src/playerItem/playerItem15.c @@ -26,7 +26,7 @@ void sub_080A3084(Entity* this) { this->direction = this->animationState << 2; *(u32*)&this->field_0x6c = 0x3c; sub_0801766C(this); - sub_0806F69C(this); + LinearMoveUpdate(this); SoundReq(SFX_ITEM_SWORD_BEAM); } else { this->actionDelay = 0x06; diff --git a/src/playerItem/playerItem3.c b/src/playerItem/playerItem3.c index 83fdea5a..4de73cc2 100644 --- a/src/playerItem/playerItem3.c +++ b/src/playerItem/playerItem3.c @@ -47,7 +47,7 @@ void sub_0801B7A8(Entity* this) { this->speed += 8; } this->direction = GetFacingDirection(this, &gPlayerEntity); - sub_0806F69C(this); + LinearMoveUpdate(this); if (sub_0800419C(this, &gPlayerEntity, 2, 2) != 0) { DeleteThisEntity(); } diff --git a/src/playerItem/playerItemBow.c b/src/playerItem/playerItemBow.c index c1295acd..1365afaf 100644 --- a/src/playerItem/playerItemBow.c +++ b/src/playerItem/playerItemBow.c @@ -27,7 +27,7 @@ void sub_08019410(Entity* this) { void sub_08019444(Entity* this) { GetNextFrame(this); - sub_0806F69C(this); + LinearMoveUpdate(this); if (GravityUpdate(this, 0x2000) == 0) { DeleteThisEntity(); } diff --git a/src/playerItem/playerItemSwordBeam.c b/src/playerItem/playerItemSwordBeam.c index d3e13b2f..24099003 100644 --- a/src/playerItem/playerItemSwordBeam.c +++ b/src/playerItem/playerItemSwordBeam.c @@ -56,7 +56,7 @@ void sub_08019498(Entity* this) { InitializeAnimation(this, gUnk_080B43FC[this->animationState >> 1]); sub_0801766C(this); - sub_0806F69C(this); + LinearMoveUpdate(this); sub_08019580(this); SoundReq(SFX_ITEM_SWORD_BEAM); } @@ -64,7 +64,7 @@ void sub_08019498(Entity* this) { void sub_08019580(Entity* this) { if (--*(int*)&this->field_0x6c != -1) { GetNextFrame(this); - sub_0806F69C(this); + LinearMoveUpdate(this); this->actionDelay += 0x01; if (this->type2 == 0) { sub_0800451C(this); diff --git a/src/playerItemUtils.c b/src/playerItemUtils.c index de1d4989..22772e62 100644 --- a/src/playerItemUtils.c +++ b/src/playerItemUtils.c @@ -1,12 +1,12 @@ #include "entity.h" #include "functions.h" -#include "room.h" #include "save.h" #include "utils.h" #include "audio.h" #include "flags.h" #include "textbox.h" #include "object.h" +#include "player.h" Entity* GiveItemWithCutscene(u32, u32, u32); Entity* sub_080A276C(Entity*, u32, u32); diff --git a/src/projectile.c b/src/projectile.c index c1891eb7..aaddbb1b 100644 --- a/src/projectile.c +++ b/src/projectile.c @@ -3,7 +3,7 @@ #include "hitbox.h" #define MULTI_FORM(definition_ptr) \ - { 0xffff, 0, { .definition = definition_ptr }, 0, 0, 0 } + { 0xffff, 0, { .definition = (definition_ptr) }, 0, 0, 0 } const ProjectileDefinition gProjectileDefinition_0[]; const ProjectileDefinition gProjectileDefinition_6[]; diff --git a/src/projectile/arrowProjectile.c b/src/projectile/arrowProjectile.c index 845a839b..bdb0a214 100644 --- a/src/projectile/arrowProjectile.c +++ b/src/projectile/arrowProjectile.c @@ -1,7 +1,6 @@ #include "entity.h" #include "enemy.h" #include "functions.h" -#include "audio.h" #include "object.h" extern s32 sub_080AF090(Entity*); @@ -75,7 +74,7 @@ void ArrowProjectile_Action2(Entity* this) { this->actionDelay = 0x20; InitializeAnimation(this, this->animIndex + 2); EnqueueSFX(0x18a); - sub_0806F69C(this); + LinearMoveUpdate(this); } else if (--this->actionDelay == 0) { DeleteThisEntity(); } diff --git a/src/projectile/ballAndChain.c b/src/projectile/ballAndChain.c index bee0f066..281b04b6 100644 --- a/src/projectile/ballAndChain.c +++ b/src/projectile/ballAndChain.c @@ -1,7 +1,6 @@ #include "entity.h" #include "functions.h" -extern u8 gEntCount; bool32 sub_080AB12C(Entity* this); extern void (*const gUnk_0812A494[])(Entity*); diff --git a/src/projectile/boneProjectile.c b/src/projectile/boneProjectile.c index d778558d..20c6e090 100644 --- a/src/projectile/boneProjectile.c +++ b/src/projectile/boneProjectile.c @@ -65,7 +65,7 @@ void BoneProjectile_Action2(Entity* this) { void BoneProjectile_Action3(Entity* this) { this->spriteSettings.draw ^= 1; - sub_0806F69C(this); + LinearMoveUpdate(this); GetNextFrame(this); if (sub_080044EC(this, 0x1800) == 0) { DeleteEntity(this); @@ -74,7 +74,7 @@ void BoneProjectile_Action3(Entity* this) { void BoneProjectile_Action4(Entity* this) { GetNextFrame(this); - sub_0806F69C(this); + LinearMoveUpdate(this); if (GravityUpdate(this, 0x1800) == 0) { DeleteEntity(this); } diff --git a/src/projectile/cannonballProjectile.c b/src/projectile/cannonballProjectile.c index 25d79adf..449240e1 100644 --- a/src/projectile/cannonballProjectile.c +++ b/src/projectile/cannonballProjectile.c @@ -1,7 +1,5 @@ #include "entity.h" #include "enemy.h" -#include "functions.h" -#include "effects.h" extern void CreateItemOnGround(Entity*); extern s32 sub_080AF090(Entity*); diff --git a/src/projectile/dekuSeedProjectile.c b/src/projectile/dekuSeedProjectile.c index 120f2009..d84d0409 100644 --- a/src/projectile/dekuSeedProjectile.c +++ b/src/projectile/dekuSeedProjectile.c @@ -1,8 +1,6 @@ #include "entity.h" #include "enemy.h" #include "functions.h" -#include "audio.h" -#include "flags.h" extern s32 sub_080AF090(Entity*); extern s32 IsProjectileOffScreen(Entity*); diff --git a/src/projectile/dirtBallProjectile.c b/src/projectile/dirtBallProjectile.c index 791dd040..3723a0c7 100644 --- a/src/projectile/dirtBallProjectile.c +++ b/src/projectile/dirtBallProjectile.c @@ -4,7 +4,6 @@ #include "player.h" #include "coord.h" #include "functions.h" -#include "effects.h" extern void sub_08078954(Entity*); diff --git a/src/projectile/fireProjectile.c b/src/projectile/fireProjectile.c index 8526b91a..c44a9b89 100644 --- a/src/projectile/fireProjectile.c +++ b/src/projectile/fireProjectile.c @@ -2,7 +2,6 @@ #include "entity.h" #include "enemy.h" #include "functions.h" -#include "audio.h" extern s32 sub_080AF090(Entity*); extern s32 IsProjectileOffScreen(Entity*); diff --git a/src/projectile/gleerokProjectile.c b/src/projectile/gleerokProjectile.c index 6a25ec3e..7de99ca5 100644 --- a/src/projectile/gleerokProjectile.c +++ b/src/projectile/gleerokProjectile.c @@ -3,9 +3,6 @@ #include "enemy.h" #include "player.h" #include "functions.h" -#include "asm.h" -#include "audio.h" -#include "effects.h" extern void sub_0806F5BC(Entity*, u32, u32); extern u32 sub_080041DC(Entity*, u32, u32); @@ -96,7 +93,7 @@ void GleerokProjectile_Action1(Entity* this) { } } else { GetNextFrame(this); - sub_0806F69C(this); + LinearMoveUpdate(this); if ((this->type != 2) && (--this->field_0xf == 0xff)) { this->field_0xf = 0x1e; sub_08004596(this, GetFacingDirection(this, &gPlayerEntity)); @@ -122,7 +119,7 @@ void GleerokProjectile_Action2(Entity* this) { this->action = 3; InitializeAnimation(this, 0x55); } else { - sub_0806F69C(this); + LinearMoveUpdate(this); sub_080A90D8(this); } } else { diff --git a/src/projectile/guardLineOfSight.c b/src/projectile/guardLineOfSight.c index a4a87308..02ecc3cd 100644 --- a/src/projectile/guardLineOfSight.c +++ b/src/projectile/guardLineOfSight.c @@ -61,7 +61,7 @@ void GuardLineOfSight(Entity* this) { if (--this->actionDelay == 0) { DeleteThisEntity(); } - sub_0806F69C(this); + LinearMoveUpdate(this); if (sub_080AE4CC(&gUnk_02027EB4, this->x.HALF.HI, this->y.HALF.HI, 2) != 0) { DeleteThisEntity(); } diff --git a/src/projectile/guruguruBarProjectile.c b/src/projectile/guruguruBarProjectile.c index de504cf5..fc88e2cf 100644 --- a/src/projectile/guruguruBarProjectile.c +++ b/src/projectile/guruguruBarProjectile.c @@ -1,6 +1,5 @@ #include "entity.h" -#include "enemy.h" #include "coord.h" void sub_080AABB0(Entity*); diff --git a/src/projectile/gyorgMaleEnergyProjectile.c b/src/projectile/gyorgMaleEnergyProjectile.c index 65c67ba1..08946bc8 100644 --- a/src/projectile/gyorgMaleEnergyProjectile.c +++ b/src/projectile/gyorgMaleEnergyProjectile.c @@ -2,7 +2,6 @@ #include "enemy.h" #include "coord.h" #include "player.h" -#include "audio.h" extern s32 sub_080AF090(Entity*); extern s32 IsProjectileOffScreen(Entity*); diff --git a/src/projectile/iceProjectile.c b/src/projectile/iceProjectile.c index 6e9a4ef7..52364a53 100644 --- a/src/projectile/iceProjectile.c +++ b/src/projectile/iceProjectile.c @@ -2,7 +2,6 @@ #include "entity.h" #include "enemy.h" #include "functions.h" -#include "audio.h" extern s32 sub_080AF090(Entity*); extern s32 IsProjectileOffScreen(Entity*); diff --git a/src/projectile/lakituCloudProjectile.c b/src/projectile/lakituCloudProjectile.c index 9fff58bd..ce7d2d21 100644 --- a/src/projectile/lakituCloudProjectile.c +++ b/src/projectile/lakituCloudProjectile.c @@ -1,8 +1,6 @@ #include "entity.h" #include "enemy.h" #include "functions.h" -#include "player.h" -#include "effects.h" extern void SoundReqClipped(Entity*, u32); extern void sub_08079D84(void); diff --git a/src/projectile/lakituLightning.c b/src/projectile/lakituLightning.c index 755d7bba..e6bb2cef 100644 --- a/src/projectile/lakituLightning.c +++ b/src/projectile/lakituLightning.c @@ -1,6 +1,5 @@ #include "entity.h" #include "enemy.h" -#include "effects.h" extern s32 sub_080AF090(Entity*); extern s32 IsProjectileOffScreen(Entity*); diff --git a/src/projectile/mandiblesProjectile.c b/src/projectile/mandiblesProjectile.c index 43551110..f01fc3b2 100644 --- a/src/projectile/mandiblesProjectile.c +++ b/src/projectile/mandiblesProjectile.c @@ -2,8 +2,6 @@ #include "enemy.h" #include "coord.h" #include "functions.h" -#include "audio.h" -#include "asm.h" #include "overworld.h" extern Entity* sub_08049DF4(u32); @@ -202,7 +200,7 @@ void MandiblesProjectile_Action4(Entity* this) { DeleteThisEntity(); } } - sub_0806F69C(this); + LinearMoveUpdate(this); UpdateAnimationSingleFrame(this); } diff --git a/src/projectile/octorokBossProjectile.c b/src/projectile/octorokBossProjectile.c index d04903b5..b5ed8193 100644 --- a/src/projectile/octorokBossProjectile.c +++ b/src/projectile/octorokBossProjectile.c @@ -1,9 +1,6 @@ #include "entity.h" #include "enemy.h" -#include "asm.h" #include "functions.h" -#include "audio.h" -#include "effects.h" #include "projectile.h" void OctorokBossProjectile_Action2(Entity*); diff --git a/src/projectile/removableDust.c b/src/projectile/removableDust.c index 5fbf3c76..58107064 100644 --- a/src/projectile/removableDust.c +++ b/src/projectile/removableDust.c @@ -2,8 +2,6 @@ #include "enemy.h" #include "coord.h" #include "functions.h" -#include "flags.h" -#include "utils.h" #include "object.h" extern u32 sub_080002C8(u16, u8); diff --git a/src/projectile/rockProjectile.c b/src/projectile/rockProjectile.c index 5ad1b0ef..7254631b 100644 --- a/src/projectile/rockProjectile.c +++ b/src/projectile/rockProjectile.c @@ -54,7 +54,7 @@ void RockProjectile_Action1(Entity* this) { } void RockProjectile_Action2(Entity* this) { - sub_0806F69C(this); + LinearMoveUpdate(this); GetNextFrame(this); if (GravityUpdate(this, 0x1800) == 0) { DeleteEntity(this); diff --git a/src/projectile/spiderWeb.c b/src/projectile/spiderWeb.c index 7323ae0a..6df74e1c 100644 --- a/src/projectile/spiderWeb.c +++ b/src/projectile/spiderWeb.c @@ -1,9 +1,7 @@ #include "entity.h" #include "enemy.h" -#include "audio.h" #include "functions.h" #include "object.h" -#include "flags.h" extern void sub_0806FBB4(Entity*); extern u32 sub_080002D4(s32, s32, u32); diff --git a/src/projectile/stalfosProjectile.c b/src/projectile/stalfosProjectile.c index 92868e26..709907e0 100644 --- a/src/projectile/stalfosProjectile.c +++ b/src/projectile/stalfosProjectile.c @@ -1,7 +1,6 @@ #include "entity.h" #include "enemy.h" #include "functions.h" -#include "effects.h" extern void (*const StalfosProjectile_Functions[])(Entity*); extern void (*const StalfosProjectile_Actions[])(Entity*); diff --git a/src/projectile/torchTrapProjectile.c b/src/projectile/torchTrapProjectile.c index 6603329c..046d8062 100644 --- a/src/projectile/torchTrapProjectile.c +++ b/src/projectile/torchTrapProjectile.c @@ -32,7 +32,7 @@ void TorchTrapProjectile_Action1(Entity* this) { this->actionDelay -= 1; } else { if (sub_080AF090(this) == 0) { - sub_0806F69C(this); + LinearMoveUpdate(this); } else { this->action = 2; } diff --git a/src/projectile/v1DarkMagicProjectile.c b/src/projectile/v1DarkMagicProjectile.c index 2cbc6dd2..27fe3c98 100644 --- a/src/projectile/v1DarkMagicProjectile.c +++ b/src/projectile/v1DarkMagicProjectile.c @@ -2,9 +2,7 @@ #include "enemy.h" #include "coord.h" #include "player.h" -#include "audio.h" #include "functions.h" -#include "asm.h" extern void SoundReqClipped(Entity*, u32); @@ -124,7 +122,7 @@ void V1DarkMagicProjectile_Action1(Entity* this) { uVar2 = GetFacingDirection(this, &gPlayerEntity); sub_08004596(this, uVar2); } - sub_0806F69C(this); + LinearMoveUpdate(this); break; case 1: if ((this->parent == NULL) || (this->parent->next == NULL)) { diff --git a/src/projectile/v1FireProjectile.c b/src/projectile/v1FireProjectile.c index 6c7efb5e..013369fd 100644 --- a/src/projectile/v1FireProjectile.c +++ b/src/projectile/v1FireProjectile.c @@ -2,8 +2,6 @@ #include "enemy.h" #include "player.h" #include "functions.h" -#include "audio.h" -#include "asm.h" extern void sub_0806F5BC(Entity*, u32, u32); extern u32 sub_080041DC(Entity*, u32, u32); @@ -75,7 +73,7 @@ void V1FireProjectile_Init(Entity* this) { void V1FireProjectile_Action1(Entity* this) { GetNextFrame(this); - sub_0806F69C(this); + LinearMoveUpdate(this); if (GravityUpdate(this, 0) == 0) { this->action = 2; this->actionDelay = 0xf; diff --git a/src/projectile/v2Projectile.c b/src/projectile/v2Projectile.c index 0ed8e9cf..b2c1ae7b 100644 --- a/src/projectile/v2Projectile.c +++ b/src/projectile/v2Projectile.c @@ -2,9 +2,6 @@ #include "entity.h" #include "enemy.h" #include "functions.h" -#include "asm.h" -#include "audio.h" -#include "effects.h" extern void (*const V2Projectile_Functions[])(Entity*); extern void (*const gUnk_0812A7EC[])(Entity*); @@ -121,7 +118,7 @@ void sub_080ABF04(Entity* this) { if (CheckOnScreen(this) == 0) { DeleteThisEntity(); } - sub_0806F69C(this); + LinearMoveUpdate(this); GetNextFrame(this); } diff --git a/src/projectile/v3ElectricProjectile.c b/src/projectile/v3ElectricProjectile.c index 5dd25ca4..556cc709 100644 --- a/src/projectile/v3ElectricProjectile.c +++ b/src/projectile/v3ElectricProjectile.c @@ -1,9 +1,7 @@ #include "entity.h" #include "enemy.h" -#include "audio.h" #include "player.h" #include "coord.h" -#include "functions.h" extern s32 sub_080AF090(Entity*); extern s32 IsProjectileOffScreen(Entity*); diff --git a/src/projectile/v3HandProjectile.c b/src/projectile/v3HandProjectile.c index b965161c..d308b7d9 100644 --- a/src/projectile/v3HandProjectile.c +++ b/src/projectile/v3HandProjectile.c @@ -1,7 +1,6 @@ #include "entity.h" #include "enemy.h" #include "player.h" -#include "audio.h" extern s32 sub_080AF090(Entity*); extern s32 IsProjectileOffScreen(Entity*); diff --git a/src/projectile/v3TennisBallProjectile.c b/src/projectile/v3TennisBallProjectile.c index 7affd779..296c830b 100644 --- a/src/projectile/v3TennisBallProjectile.c +++ b/src/projectile/v3TennisBallProjectile.c @@ -1,8 +1,5 @@ #include "entity.h" #include "enemy.h" -#include "audio.h" -#include "functions.h" -#include "effects.h" extern s32 sub_080AF090(Entity*); extern s32 IsProjectileOffScreen(Entity*); diff --git a/src/projectile/windProjectile.c b/src/projectile/windProjectile.c index ff77862f..b5b1133b 100644 --- a/src/projectile/windProjectile.c +++ b/src/projectile/windProjectile.c @@ -1,7 +1,6 @@ #include "entity.h" #include "enemy.h" #include "functions.h" -#include "audio.h" extern s32 sub_080AF090(Entity*); extern s32 IsProjectileOffScreen(Entity*); diff --git a/src/room.c b/src/room.c index 629e05e6..dc8739d6 100644 --- a/src/room.c +++ b/src/room.c @@ -80,8 +80,8 @@ NONMATCH("asm/loadRoomEntity.s", Entity* LoadRoomEntity(EntityData* dat)) { v5->collisionLayer = 2; return v5; } - if ((gRoomControls.unk6 & 2) == 0) { - sub_08016A30(v5); + if ((gRoomControls.scroll_flags & 2) == 0) { + ResolveCollisionLayer(v5); } } v5->collisionLayer = 1; @@ -320,7 +320,7 @@ static void LoadSmallChestTile(TileEntity* tile) { for (i = 0; i < 8; ++i, ++t) { if (!t->_4) { MemCopy(tile, t, sizeof(TileEntity)); - if ((t->_6 & 1) && (gRoomControls.unk6 & 2) && !CheckLocalFlag(t->_1)) { + if ((t->_6 & 1) && (gRoomControls.scroll_flags & 2) && !CheckLocalFlag(t->_1)) { Entity* e = CreateObject(OBJECT_52, t->_1, 0); if (e != NULL) { sub_0806F704(e, t->_4); diff --git a/src/roomInit.c b/src/roomInit.c index c6ffda37..9b9c8612 100644 --- a/src/roomInit.c +++ b/src/roomInit.c @@ -4,7 +4,6 @@ #include "utils.h" #include "functions.h" -#include "structures.h" #include "audio.h" #include "effects.h" @@ -12,16 +11,11 @@ #include "flags.h" #include "item.h" #include "save.h" -#include "script.h" -#include "screen.h" #include "area.h" -#include "room.h" #include "overworld.h" -#include "entity.h" #include "npc.h" -#include "player.h" static void sub_0804E150(void); diff --git a/src/script.c b/src/script.c index c59c267b..4e573495 100644 --- a/src/script.c +++ b/src/script.c @@ -8,7 +8,6 @@ #include "npc.h" #include "functions.h" -#include "structures.h" void InitScriptForEntity(Entity*, ScriptExecutionContext*, u16*); void InitScriptExecutionContext(ScriptExecutionContext* context, u16* script); @@ -225,12 +224,12 @@ void StartPlayerScript(u16* script) { gPlayerState.field_0x38 = 0; } -ScriptExecutionContext* StartCutscene2(Entity* entity, u16* script) { +UNUSED ScriptExecutionContext* StartCutscene2(Entity* entity, u16* script) { ScriptExecutionContext* context; context = CreateScriptExecutionContext(); if (context) { - entity->flags |= 2; + entity->flags |= ENT_SCRIPTED; *(ScriptExecutionContext**)&entity->field_0x3c = context; context->scriptInstructionPointer = script; } @@ -457,7 +456,7 @@ void sub_0807DF50(void) { gUnk_02034490[0] = 0; gUnk_0200AF00.filler0[1] = 0; RecoverUI(0); - sub_080791D0(); + ResetPlayerAnimationAndAction(); sub_08079184(); } @@ -984,7 +983,7 @@ void ScriptCommand_WaitForPlayerEnterRoom(Entity* entity, ScriptExecutionContext } void ScriptCommand_WaitFor_1(Entity* entity, ScriptExecutionContext* context) { - if (gRoomControls.unk6 & 4) { + if (gRoomControls.scroll_flags & 4) { gActiveScriptInfo.commandSize = 0; } else { gActiveScriptInfo.flags |= 1; @@ -1293,7 +1292,7 @@ void ScriptCommand_WalkForward(Entity* entity, ScriptExecutionContext* context) } void sub_0807EC44(Entity* entity, ScriptExecutionContext* context) { - sub_0806F69C(entity); + LinearMoveUpdate(entity); if (--context->unk_12) { gActiveScriptInfo.commandSize = 0; } @@ -1890,8 +1889,6 @@ void sub_0807F78C(Entity* entity, ScriptExecutionContext* context) { void sub_0807F7C4(Entity* entity, ScriptExecutionContext* context) { u32 item = context->intVariable; - u32 msg; - u32 price; if (context->intVariable == 0) item = gRoomVars.shopItemType; @@ -1902,7 +1899,6 @@ void sub_0807F7C4(Entity* entity, ScriptExecutionContext* context) { void sub_0807F800(Entity* entity, ScriptExecutionContext* context) { u32 item = context->intVariable; - u32 msg; u32 price; if (context->intVariable == 0) diff --git a/src/sub_0807CA18.c b/src/sub_0807CA18.c index d74a54c3..9c823e2d 100644 --- a/src/sub_0807CA18.c +++ b/src/sub_0807CA18.c @@ -1,10 +1,8 @@ #include "global.h" -#include "structures.h" #include "save.h" #include "utils.h" extern void sub_0807C960(); -extern void LoadPalettes(const u8*, s32, s32); extern u16 gMetatilesBottom[]; extern u16 gMetatilesTop[]; diff --git a/src/sub_080A3B84.c b/src/sub_080A3B84.c index e796dff0..cbf667ea 100644 --- a/src/sub_080A3B84.c +++ b/src/sub_080A3B84.c @@ -1,7 +1,6 @@ #include "global.h" #include "functions.h" #include "menu.h" -#include "structures.h" #include "screen.h" extern void (*const gUnk_081280C4[])(); diff --git a/src/textbox.c b/src/textbox.c index 208f0f7c..f09ed255 100644 --- a/src/textbox.c +++ b/src/textbox.c @@ -1,11 +1,10 @@ #include "global.h" #include "audio.h" +#include "asm.h" #include "room.h" -#include "entity.h" #include "utils.h" #include "functions.h" #include "textbox.h" -#include "structures.h" #include "save.h" #define MESSAGE_ADVANCE_KEYS (A_BUTTON | B_BUTTON | DPAD_ANY | R_BUTTON) From 3fd900f1bc81cbaf106de17f5b8d41e26de682a8 Mon Sep 17 00:00:00 2001 From: theo3 Date: Tue, 28 Dec 2021 13:53:53 -0800 Subject: [PATCH 2/2] rename files, sort asm into subdirectories --- Makefile | 2 +- asm/{ => enemy}/armos.s | 0 asm/{ => enemy}/ballChainSoldier.s | 0 asm/{ => enemy}/bombarossa.s | 0 asm/{ => enemy}/bowMoblin.s | 0 asm/{ => enemy}/businessScrubPrologue.s | 0 asm/{ => enemy}/chuchuBoss.s | 0 asm/{ => enemy}/cloudPiranha.s | 0 asm/{ => enemy}/code_080300AC.s | 0 asm/{ => enemy}/crow.s | 0 asm/{ => enemy}/cuccoAggr.s | 0 asm/{ => enemy}/curtain.s | 0 asm/{ => enemy}/dust.s | 0 asm/{ => enemy}/enemy49.s | 0 asm/{ => enemy}/enemy4D.s | 0 asm/{ => enemy}/enemy50.s | 0 asm/{ => enemy}/enemy62.s | 0 asm/{ => enemy}/enemy64.s | 0 asm/{ => enemy}/enemy66.s | 0 asm/{ => enemy}/eyegore.s | 0 asm/{ => enemy}/flyingPot.s | 0 asm/{ => enemy}/flyingSkull.s | 0 asm/{ => enemy}/ghini.s | 0 asm/{ => enemy}/gleerok.s | 0 asm/{ => enemy}/gyorgChild.s | 0 asm/{ => enemy}/gyorgFemale.s | 0 asm/{ => enemy}/gyorgFemaleEye.s | 0 asm/{ => enemy}/gyorgFemaleMouth.s | 0 asm/{ => enemy}/mulldozer.s | 0 asm/{ => enemy}/octorokGolden.s | 0 asm/{ => enemy}/scissorsBeetle.s | 0 asm/{ => enemy}/spinyBeetle.s | 0 asm/{ => enemy}/stalfos.s | 0 asm/{ => enemy}/sub_080451CC.s | 0 asm/{ => enemy}/takkuri.s | 0 asm/{ => enemy}/wizzrobeFire.s | 0 asm/{ => enemy}/wizzrobeIce.s | 0 asm/{ => enemy}/wizzrobeWind.s | 0 asm/{ => object}/ambientClouds.s | 0 asm/{ => object}/angryStatue.s | 0 asm/{ => object}/barrelInside.s | 0 asm/{ => object}/beanstalk.s | 0 asm/{ => object}/bigBarrel.s | 0 asm/{ => object}/bigIceBlock.s | 0 asm/{ => object}/bigPushableLever.s | 0 asm/{ => object}/bird.s | 0 asm/{ => object}/blockPushed.s | 0 asm/{ => object}/board.s | 0 asm/{ => object}/bollard.s | 0 asm/{ => object}/bossDoor.s | 0 asm/{ => object}/cabinFurniture.s | 0 asm/{ => object}/chestSpawner.s | 0 asm/{ => object}/code_0808C964.s | 0 asm/{ => object}/crenalBeanSprout.s | 0 asm/{ => object}/deathFx.s | 0 asm/{ => object}/doubleBookshelf.s | 0 asm/{ => object}/enemyItem.s | 0 asm/{ => object}/evilSpirit.s | 0 asm/{ => object}/eyeSwitch.s | 0 asm/{ => object}/ezloCap.s | 0 asm/{ => object}/fairy.s | 0 asm/{ => object}/fan.s | 0 asm/{ => object}/figurineDevice.s | 0 asm/{ => object}/fireballChain.s | 0 asm/{ => object}/floatingPlatform.s | 0 asm/{ => object}/fourElements.s | 0 asm/{ => object}/frozenWaterElement.s | 0 asm/{ => object}/gentariCurtains.s | 0 asm/{ => object}/giantBookLadder.s | 0 asm/{ => object}/giantRock.s | 0 asm/{ => object}/giantRock2.s | 0 asm/{ => object}/giantTwig.s | 0 asm/{ => object}/gyorgBossObject.s | 0 asm/{ => object}/hittableLever.s | 0 asm/{ => object}/houseDoorInterior.s | 0 asm/{ => object}/itemForSale.s | 0 asm/{ => object}/ladderHoleInBookshelf.s | 0 asm/{ => object}/ladderUp.s | 0 asm/{ => object}/lamp.s | 0 asm/{ => object}/lavaPlatform.s | 0 asm/{ => object}/lilypadLarge.s | 0 asm/{ => object}/litArea.s | 0 asm/{ => object}/macroAcorn.s | 0 asm/{ => object}/macroBook.s | 0 asm/{ => object}/macroDecorations.s | 0 asm/{ => object}/macroMushroomStalks.s | 0 asm/{ => object}/macroPlayer.s | 0 asm/{ => object}/macroShoes.s | 0 asm/{ => object}/mazaalBossObject.s | 0 asm/{ => object}/minecart.s | 0 asm/{ => object}/minecartDoor.s | 0 asm/{ => object}/minishEmoticon.s | 0 asm/{ => object}/object10.s | 0 asm/{ => object}/object11.s | 0 asm/{ => object}/object12.s | 0 asm/{ => object}/object15.s | 0 asm/{ => object}/object17.s | 0 asm/{ => object}/object1E.s | 0 asm/{ => object}/object1F.s | 0 asm/{ => object}/object20.s | 0 asm/{ => object}/object21.s | 0 asm/{ => object}/object28.s | 0 asm/{ => object}/object2A.s | 0 asm/{ => object}/object2B.s | 0 asm/{ => object}/object30.s | 0 asm/{ => object}/object35.s | 0 asm/{ => object}/object36.s | 0 asm/{ => object}/object37.s | 0 asm/{ => object}/object3A.s | 0 asm/{ => object}/object3D.s | 0 asm/{ => object}/object3E.s | 0 asm/{ => object}/object42.s | 0 asm/{ => object}/object43.s | 0 asm/{ => object}/object44.s | 0 asm/{ => object}/object45.s | 0 asm/{ => object}/object4B.s | 0 asm/{ => object}/object52.s | 0 asm/{ => object}/object53.s | 0 asm/{ => object}/object5B.s | 0 asm/{ => object}/object61.s | 0 asm/{ => object}/object63.s | 0 asm/{ => object}/object64.s | 0 asm/{ => object}/object66.s | 0 asm/{ => object}/object67.s | 0 asm/{ => object}/object68.s | 0 asm/{ => object}/object69.s | 0 asm/{ => object}/object70.s | 0 asm/{ => object}/object74.s | 0 asm/{ => object}/object75.s | 0 asm/{ => object}/object76.s | 0 asm/{ => object}/object79.s | 0 asm/{ => object}/object81.s | 0 asm/{ => object}/object8E.s | 0 asm/{ => object}/object9.s | 0 asm/{ => object}/object90.s | 0 asm/{ => object}/object91.s | 0 asm/{ => object}/object96.s | 0 asm/{ => object}/object97.s | 0 asm/{ => object}/object98.s | 0 asm/{ => object}/object99.s | 0 asm/{ => object}/object9B.s | 0 asm/{ => object}/objectA6.s | 0 asm/{ => object}/objectA7.s | 0 asm/{ => object}/objectA8.s | 0 asm/{ => object}/objectA9.s | 0 asm/{ => object}/objectAB.s | 0 asm/{ => object}/objectAD.s | 0 asm/{ => object}/objectB.s | 0 asm/{ => object}/objectB3.s | 0 asm/{ => object}/objectB4.s | 0 asm/{ => object}/objectB6.s | 0 asm/{ => object}/objectB9.s | 0 asm/{ => object}/objectBD.s | 0 asm/{ => object}/objectBF.s | 0 asm/{ => object}/objectBlockingStairs.s | 0 asm/{ => object}/objectC1.s | 0 asm/{ => object}/objectD.s | 0 asm/{ => object}/objectE.s | 0 asm/{ => object}/objectOnPillar.s | 0 asm/{ => object}/objectOnSpinyBeetle.s | 0 asm/{ => object}/paper.s | 0 asm/{ => object}/picoBloom.s | 0 asm/{ => object}/pressurePlate.s | 0 asm/{ => object}/pullableLever.s | 0 asm/{ => object}/pullableMushroom.s | 0 asm/{ => object}/pushableFurniture.s | 0 asm/{ => object}/pushableGrave.s | 0 asm/{ => object}/pushableLever.s | 0 asm/{ => object}/pushableRock.s | 0 asm/{ => object}/pushableStatue.s | 0 asm/{ => object}/smallIceBlock.s | 0 asm/{ => object}/specialFx.s | 0 asm/{ => object}/steam.s | 0 asm/{ => object}/stoneTablet.s | 0 asm/{ => object}/treeHidingPortal.s | 0 asm/{ => object}/waterfallOpening.s | 0 asm/{ => object}/whirlwind.s | 0 asm/{ => object}/windTribeTeleporter.s | 0 include/enemy.h | 2 +- include/fileScreen.h | 2 +- include/{overworld.h => game.h} | 6 +- include/{textbox.h => message.h} | 6 +- include/npc.h | 4 +- include/object.h | 2 +- include/{audio.h => sound.h} | 6 +- linker.ld | 370 +++++++++++------------ src/code_0808091C.c | 2 +- src/code_080A29BC.c | 58 ---- src/collision.c | 2 +- src/coord.c | 2 +- src/debugScreen.c | 4 +- src/demoScreen.c | 2 +- src/enemy/bladeTrap.c | 2 +- src/enemy/bobomb.c | 2 +- src/enemy/businessScrub.c | 4 +- src/{ => enemy}/code_080300AC.c | 0 src/enemy/doorMimic.c | 2 +- src/enemy/likeLike.c | 2 +- src/enemy/octorokBoss.c | 2 +- src/enemy/pesto.c | 2 +- src/enemy/rupeeLike.c | 2 +- src/enemy/vaatiTransfiguredEye.c | 2 +- src/enemy/vaatiWrath.c | 2 +- src/entity.c | 2 +- src/ezloNag.c | 4 +- src/fileScreen.c | 2 +- src/{overworld.c => game.c} | 6 +- src/interrupts.c | 4 +- src/intro.c | 4 +- src/item/itemBomb.c | 2 +- src/item/itemLantern.c | 2 +- src/item/itemMoleMitts.c | 2 +- src/item/itemOcarina.c | 2 +- src/item/itemPegasusBoots.c | 2 +- src/item/itemRocsCape.c | 2 +- src/item/itemSword.c | 2 +- src/main.c | 4 +- src/manager/manager10.c | 2 +- src/manager/manager15.c | 2 +- src/manager/manager23.c | 2 +- src/manager/manager24.c | 4 +- src/manager/manager27.c | 2 +- src/manager/manager2E.c | 2 +- src/manager/manager3.c | 2 +- src/manager/manager30.c | 2 +- src/manager/manager32.c | 2 +- src/manager/manager33.c | 2 +- src/manager/manager34.c | 2 +- src/manager/manager36.c | 2 +- src/manager/manager37.c | 4 +- src/manager/manager39.c | 4 +- src/manager/manager5.c | 2 +- src/manager/managerB.c | 2 +- src/manager/managerC.c | 2 +- src/manager/managerE.c | 2 +- src/manager/managerF.c | 4 +- src/{textbox.c => message.c} | 4 +- src/npc/beedle.c | 4 +- src/npc/bladeBrothers.c | 2 +- src/npc/brocco.c | 2 +- src/npc/carlov.c | 2 +- src/npc/castleMaid.c | 2 +- src/npc/castorWildsStatue.c | 2 +- src/npc/cat.c | 2 +- src/npc/cow.c | 2 +- src/npc/dampe.c | 2 +- src/npc/epona.c | 4 +- src/npc/ghostBrothers.c | 2 +- src/npc/goron.c | 2 +- src/npc/goronMerchant.c | 2 +- src/npc/guard.c | 2 +- src/npc/kid.c | 2 +- src/npc/librarians.c | 4 +- src/npc/mailbox.c | 2 +- src/npc/marcy.c | 2 +- src/npc/minishEzlo.c | 2 +- src/npc/ministerPotho.c | 2 +- src/npc/mountainMinish.c | 2 +- src/npc/mutoh.c | 2 +- src/npc/npc23.c | 2 +- src/npc/npc4E.c | 2 +- src/npc/npc5.c | 2 +- src/npc/npc9.c | 2 +- src/npc/picolyteBottle.c | 2 +- src/npc/pina.c | 2 +- src/npc/postman.c | 2 +- src/npc/simon.c | 2 +- src/npc/stamp.c | 2 +- src/npc/stockwell.c | 2 +- src/npc/vaati.c | 2 +- src/npc/windTribespeople.c | 2 +- src/npc/zelda.c | 2 +- src/object/archway.c | 2 +- src/object/book.c | 2 +- src/object/heartContainer.c | 2 +- src/object/houseDoorExterior.c | 2 +- src/object/itemOnGround.c | 2 +- src/object/jailBars.c | 2 +- src/object/lightableSwitch.c | 2 +- src/object/lockedDoor.c | 4 +- src/object/metalDoor.c | 2 +- src/object/minishSizedArchway.c | 2 +- src/object/minishSizedEntrance.c | 2 +- src/object/object2A.c | 2 +- src/object/object6A.c | 2 +- src/object/objectA.c | 2 +- src/object/octorokBossObject.c | 2 +- src/object/pot.c | 2 +- src/object/railtrack.c | 2 +- src/object/swordsmanNewsletter.c | 2 +- src/object/thoughtBubble.c | 2 +- src/object/treeHidingPortal.c | 2 +- src/object/warpPoint.c | 2 +- src/object/windcrest.c | 2 +- src/player.c | 6 +- src/playerItem/playerItem11.c | 2 +- src/playerItem/playerItem12.c | 2 +- src/playerItem/playerItem14.c | 2 +- src/playerItem/playerItem15.c | 2 +- src/playerItem/playerItem3.c | 2 +- src/playerItem/playerItemPacciCane.c | 2 +- src/playerItem/playerItemSwordBeam.c | 2 +- src/playerItemUtils.c | 4 +- src/projectile/dirtBallProjectile.c | 2 +- src/projectile/gyorgTail.c | 2 +- src/projectile/mandiblesProjectile.c | 2 +- src/projectile/mazaalEnergyBeam.c | 2 +- src/room.c | 2 +- src/roomInit.c | 4 +- src/save.c | 4 +- src/script.c | 2 +- src/{code_0807CC3C.c => scroll.c} | 1 - src/{audio.c => sound.c} | 2 +- 313 files changed, 346 insertions(+), 405 deletions(-) rename asm/{ => enemy}/armos.s (100%) rename asm/{ => enemy}/ballChainSoldier.s (100%) rename asm/{ => enemy}/bombarossa.s (100%) rename asm/{ => enemy}/bowMoblin.s (100%) rename asm/{ => enemy}/businessScrubPrologue.s (100%) rename asm/{ => enemy}/chuchuBoss.s (100%) rename asm/{ => enemy}/cloudPiranha.s (100%) rename asm/{ => enemy}/code_080300AC.s (100%) rename asm/{ => enemy}/crow.s (100%) rename asm/{ => enemy}/cuccoAggr.s (100%) rename asm/{ => enemy}/curtain.s (100%) rename asm/{ => enemy}/dust.s (100%) rename asm/{ => enemy}/enemy49.s (100%) rename asm/{ => enemy}/enemy4D.s (100%) rename asm/{ => enemy}/enemy50.s (100%) rename asm/{ => enemy}/enemy62.s (100%) rename asm/{ => enemy}/enemy64.s (100%) rename asm/{ => enemy}/enemy66.s (100%) rename asm/{ => enemy}/eyegore.s (100%) rename asm/{ => enemy}/flyingPot.s (100%) rename asm/{ => enemy}/flyingSkull.s (100%) rename asm/{ => enemy}/ghini.s (100%) rename asm/{ => enemy}/gleerok.s (100%) rename asm/{ => enemy}/gyorgChild.s (100%) rename asm/{ => enemy}/gyorgFemale.s (100%) rename asm/{ => enemy}/gyorgFemaleEye.s (100%) rename asm/{ => enemy}/gyorgFemaleMouth.s (100%) rename asm/{ => enemy}/mulldozer.s (100%) rename asm/{ => enemy}/octorokGolden.s (100%) rename asm/{ => enemy}/scissorsBeetle.s (100%) rename asm/{ => enemy}/spinyBeetle.s (100%) rename asm/{ => enemy}/stalfos.s (100%) rename asm/{ => enemy}/sub_080451CC.s (100%) rename asm/{ => enemy}/takkuri.s (100%) rename asm/{ => enemy}/wizzrobeFire.s (100%) rename asm/{ => enemy}/wizzrobeIce.s (100%) rename asm/{ => enemy}/wizzrobeWind.s (100%) rename asm/{ => object}/ambientClouds.s (100%) rename asm/{ => object}/angryStatue.s (100%) rename asm/{ => object}/barrelInside.s (100%) rename asm/{ => object}/beanstalk.s (100%) rename asm/{ => object}/bigBarrel.s (100%) rename asm/{ => object}/bigIceBlock.s (100%) rename asm/{ => object}/bigPushableLever.s (100%) rename asm/{ => object}/bird.s (100%) rename asm/{ => object}/blockPushed.s (100%) rename asm/{ => object}/board.s (100%) rename asm/{ => object}/bollard.s (100%) rename asm/{ => object}/bossDoor.s (100%) rename asm/{ => object}/cabinFurniture.s (100%) rename asm/{ => object}/chestSpawner.s (100%) rename asm/{ => object}/code_0808C964.s (100%) rename asm/{ => object}/crenalBeanSprout.s (100%) rename asm/{ => object}/deathFx.s (100%) rename asm/{ => object}/doubleBookshelf.s (100%) rename asm/{ => object}/enemyItem.s (100%) rename asm/{ => object}/evilSpirit.s (100%) rename asm/{ => object}/eyeSwitch.s (100%) rename asm/{ => object}/ezloCap.s (100%) rename asm/{ => object}/fairy.s (100%) rename asm/{ => object}/fan.s (100%) rename asm/{ => object}/figurineDevice.s (100%) rename asm/{ => object}/fireballChain.s (100%) rename asm/{ => object}/floatingPlatform.s (100%) rename asm/{ => object}/fourElements.s (100%) rename asm/{ => object}/frozenWaterElement.s (100%) rename asm/{ => object}/gentariCurtains.s (100%) rename asm/{ => object}/giantBookLadder.s (100%) rename asm/{ => object}/giantRock.s (100%) rename asm/{ => object}/giantRock2.s (100%) rename asm/{ => object}/giantTwig.s (100%) rename asm/{ => object}/gyorgBossObject.s (100%) rename asm/{ => object}/hittableLever.s (100%) rename asm/{ => object}/houseDoorInterior.s (100%) rename asm/{ => object}/itemForSale.s (100%) rename asm/{ => object}/ladderHoleInBookshelf.s (100%) rename asm/{ => object}/ladderUp.s (100%) rename asm/{ => object}/lamp.s (100%) rename asm/{ => object}/lavaPlatform.s (100%) rename asm/{ => object}/lilypadLarge.s (100%) rename asm/{ => object}/litArea.s (100%) rename asm/{ => object}/macroAcorn.s (100%) rename asm/{ => object}/macroBook.s (100%) rename asm/{ => object}/macroDecorations.s (100%) rename asm/{ => object}/macroMushroomStalks.s (100%) rename asm/{ => object}/macroPlayer.s (100%) rename asm/{ => object}/macroShoes.s (100%) rename asm/{ => object}/mazaalBossObject.s (100%) rename asm/{ => object}/minecart.s (100%) rename asm/{ => object}/minecartDoor.s (100%) rename asm/{ => object}/minishEmoticon.s (100%) rename asm/{ => object}/object10.s (100%) rename asm/{ => object}/object11.s (100%) rename asm/{ => object}/object12.s (100%) rename asm/{ => object}/object15.s (100%) rename asm/{ => object}/object17.s (100%) rename asm/{ => object}/object1E.s (100%) rename asm/{ => object}/object1F.s (100%) rename asm/{ => object}/object20.s (100%) rename asm/{ => object}/object21.s (100%) rename asm/{ => object}/object28.s (100%) rename asm/{ => object}/object2A.s (100%) rename asm/{ => object}/object2B.s (100%) rename asm/{ => object}/object30.s (100%) rename asm/{ => object}/object35.s (100%) rename asm/{ => object}/object36.s (100%) rename asm/{ => object}/object37.s (100%) rename asm/{ => object}/object3A.s (100%) rename asm/{ => object}/object3D.s (100%) rename asm/{ => object}/object3E.s (100%) rename asm/{ => object}/object42.s (100%) rename asm/{ => object}/object43.s (100%) rename asm/{ => object}/object44.s (100%) rename asm/{ => object}/object45.s (100%) rename asm/{ => object}/object4B.s (100%) rename asm/{ => object}/object52.s (100%) rename asm/{ => object}/object53.s (100%) rename asm/{ => object}/object5B.s (100%) rename asm/{ => object}/object61.s (100%) rename asm/{ => object}/object63.s (100%) rename asm/{ => object}/object64.s (100%) rename asm/{ => object}/object66.s (100%) rename asm/{ => object}/object67.s (100%) rename asm/{ => object}/object68.s (100%) rename asm/{ => object}/object69.s (100%) rename asm/{ => object}/object70.s (100%) rename asm/{ => object}/object74.s (100%) rename asm/{ => object}/object75.s (100%) rename asm/{ => object}/object76.s (100%) rename asm/{ => object}/object79.s (100%) rename asm/{ => object}/object81.s (100%) rename asm/{ => object}/object8E.s (100%) rename asm/{ => object}/object9.s (100%) rename asm/{ => object}/object90.s (100%) rename asm/{ => object}/object91.s (100%) rename asm/{ => object}/object96.s (100%) rename asm/{ => object}/object97.s (100%) rename asm/{ => object}/object98.s (100%) rename asm/{ => object}/object99.s (100%) rename asm/{ => object}/object9B.s (100%) rename asm/{ => object}/objectA6.s (100%) rename asm/{ => object}/objectA7.s (100%) rename asm/{ => object}/objectA8.s (100%) rename asm/{ => object}/objectA9.s (100%) rename asm/{ => object}/objectAB.s (100%) rename asm/{ => object}/objectAD.s (100%) rename asm/{ => object}/objectB.s (100%) rename asm/{ => object}/objectB3.s (100%) rename asm/{ => object}/objectB4.s (100%) rename asm/{ => object}/objectB6.s (100%) rename asm/{ => object}/objectB9.s (100%) rename asm/{ => object}/objectBD.s (100%) rename asm/{ => object}/objectBF.s (100%) rename asm/{ => object}/objectBlockingStairs.s (100%) rename asm/{ => object}/objectC1.s (100%) rename asm/{ => object}/objectD.s (100%) rename asm/{ => object}/objectE.s (100%) rename asm/{ => object}/objectOnPillar.s (100%) rename asm/{ => object}/objectOnSpinyBeetle.s (100%) rename asm/{ => object}/paper.s (100%) rename asm/{ => object}/picoBloom.s (100%) rename asm/{ => object}/pressurePlate.s (100%) rename asm/{ => object}/pullableLever.s (100%) rename asm/{ => object}/pullableMushroom.s (100%) rename asm/{ => object}/pushableFurniture.s (100%) rename asm/{ => object}/pushableGrave.s (100%) rename asm/{ => object}/pushableLever.s (100%) rename asm/{ => object}/pushableRock.s (100%) rename asm/{ => object}/pushableStatue.s (100%) rename asm/{ => object}/smallIceBlock.s (100%) rename asm/{ => object}/specialFx.s (100%) rename asm/{ => object}/steam.s (100%) rename asm/{ => object}/stoneTablet.s (100%) rename asm/{ => object}/treeHidingPortal.s (100%) rename asm/{ => object}/waterfallOpening.s (100%) rename asm/{ => object}/whirlwind.s (100%) rename asm/{ => object}/windTribeTeleporter.s (100%) rename include/{overworld.h => game.h} (95%) rename include/{textbox.h => message.h} (97%) rename include/{audio.h => sound.h} (99%) delete mode 100644 src/code_080A29BC.c rename src/{ => enemy}/code_080300AC.c (100%) rename src/{overworld.c => game.c} (99%) rename src/{textbox.c => message.c} (99%) rename src/{code_0807CC3C.c => scroll.c} (74%) rename src/{audio.c => sound.c} (99%) diff --git a/Makefile b/Makefile index ddd26c61..d9d5f42d 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,7 @@ C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c) C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS)) ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s $(ASM_SUBDIR)/*/*.s) -ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS)) +ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS)) $(patsubst $(ASM_SUBDIR)/*/%.s,$(ASM_BUILDDIR)/**/%.o,$(ASM_SRCS)) DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s $(DATA_ASM_SUBDIR)/**/*.s $(DATA_ASM_SUBDIR)/**/**/*.s) DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS)) diff --git a/asm/armos.s b/asm/enemy/armos.s similarity index 100% rename from asm/armos.s rename to asm/enemy/armos.s diff --git a/asm/ballChainSoldier.s b/asm/enemy/ballChainSoldier.s similarity index 100% rename from asm/ballChainSoldier.s rename to asm/enemy/ballChainSoldier.s diff --git a/asm/bombarossa.s b/asm/enemy/bombarossa.s similarity index 100% rename from asm/bombarossa.s rename to asm/enemy/bombarossa.s diff --git a/asm/bowMoblin.s b/asm/enemy/bowMoblin.s similarity index 100% rename from asm/bowMoblin.s rename to asm/enemy/bowMoblin.s diff --git a/asm/businessScrubPrologue.s b/asm/enemy/businessScrubPrologue.s similarity index 100% rename from asm/businessScrubPrologue.s rename to asm/enemy/businessScrubPrologue.s diff --git a/asm/chuchuBoss.s b/asm/enemy/chuchuBoss.s similarity index 100% rename from asm/chuchuBoss.s rename to asm/enemy/chuchuBoss.s diff --git a/asm/cloudPiranha.s b/asm/enemy/cloudPiranha.s similarity index 100% rename from asm/cloudPiranha.s rename to asm/enemy/cloudPiranha.s diff --git a/asm/code_080300AC.s b/asm/enemy/code_080300AC.s similarity index 100% rename from asm/code_080300AC.s rename to asm/enemy/code_080300AC.s diff --git a/asm/crow.s b/asm/enemy/crow.s similarity index 100% rename from asm/crow.s rename to asm/enemy/crow.s diff --git a/asm/cuccoAggr.s b/asm/enemy/cuccoAggr.s similarity index 100% rename from asm/cuccoAggr.s rename to asm/enemy/cuccoAggr.s diff --git a/asm/curtain.s b/asm/enemy/curtain.s similarity index 100% rename from asm/curtain.s rename to asm/enemy/curtain.s diff --git a/asm/dust.s b/asm/enemy/dust.s similarity index 100% rename from asm/dust.s rename to asm/enemy/dust.s diff --git a/asm/enemy49.s b/asm/enemy/enemy49.s similarity index 100% rename from asm/enemy49.s rename to asm/enemy/enemy49.s diff --git a/asm/enemy4D.s b/asm/enemy/enemy4D.s similarity index 100% rename from asm/enemy4D.s rename to asm/enemy/enemy4D.s diff --git a/asm/enemy50.s b/asm/enemy/enemy50.s similarity index 100% rename from asm/enemy50.s rename to asm/enemy/enemy50.s diff --git a/asm/enemy62.s b/asm/enemy/enemy62.s similarity index 100% rename from asm/enemy62.s rename to asm/enemy/enemy62.s diff --git a/asm/enemy64.s b/asm/enemy/enemy64.s similarity index 100% rename from asm/enemy64.s rename to asm/enemy/enemy64.s diff --git a/asm/enemy66.s b/asm/enemy/enemy66.s similarity index 100% rename from asm/enemy66.s rename to asm/enemy/enemy66.s diff --git a/asm/eyegore.s b/asm/enemy/eyegore.s similarity index 100% rename from asm/eyegore.s rename to asm/enemy/eyegore.s diff --git a/asm/flyingPot.s b/asm/enemy/flyingPot.s similarity index 100% rename from asm/flyingPot.s rename to asm/enemy/flyingPot.s diff --git a/asm/flyingSkull.s b/asm/enemy/flyingSkull.s similarity index 100% rename from asm/flyingSkull.s rename to asm/enemy/flyingSkull.s diff --git a/asm/ghini.s b/asm/enemy/ghini.s similarity index 100% rename from asm/ghini.s rename to asm/enemy/ghini.s diff --git a/asm/gleerok.s b/asm/enemy/gleerok.s similarity index 100% rename from asm/gleerok.s rename to asm/enemy/gleerok.s diff --git a/asm/gyorgChild.s b/asm/enemy/gyorgChild.s similarity index 100% rename from asm/gyorgChild.s rename to asm/enemy/gyorgChild.s diff --git a/asm/gyorgFemale.s b/asm/enemy/gyorgFemale.s similarity index 100% rename from asm/gyorgFemale.s rename to asm/enemy/gyorgFemale.s diff --git a/asm/gyorgFemaleEye.s b/asm/enemy/gyorgFemaleEye.s similarity index 100% rename from asm/gyorgFemaleEye.s rename to asm/enemy/gyorgFemaleEye.s diff --git a/asm/gyorgFemaleMouth.s b/asm/enemy/gyorgFemaleMouth.s similarity index 100% rename from asm/gyorgFemaleMouth.s rename to asm/enemy/gyorgFemaleMouth.s diff --git a/asm/mulldozer.s b/asm/enemy/mulldozer.s similarity index 100% rename from asm/mulldozer.s rename to asm/enemy/mulldozer.s diff --git a/asm/octorokGolden.s b/asm/enemy/octorokGolden.s similarity index 100% rename from asm/octorokGolden.s rename to asm/enemy/octorokGolden.s diff --git a/asm/scissorsBeetle.s b/asm/enemy/scissorsBeetle.s similarity index 100% rename from asm/scissorsBeetle.s rename to asm/enemy/scissorsBeetle.s diff --git a/asm/spinyBeetle.s b/asm/enemy/spinyBeetle.s similarity index 100% rename from asm/spinyBeetle.s rename to asm/enemy/spinyBeetle.s diff --git a/asm/stalfos.s b/asm/enemy/stalfos.s similarity index 100% rename from asm/stalfos.s rename to asm/enemy/stalfos.s diff --git a/asm/sub_080451CC.s b/asm/enemy/sub_080451CC.s similarity index 100% rename from asm/sub_080451CC.s rename to asm/enemy/sub_080451CC.s diff --git a/asm/takkuri.s b/asm/enemy/takkuri.s similarity index 100% rename from asm/takkuri.s rename to asm/enemy/takkuri.s diff --git a/asm/wizzrobeFire.s b/asm/enemy/wizzrobeFire.s similarity index 100% rename from asm/wizzrobeFire.s rename to asm/enemy/wizzrobeFire.s diff --git a/asm/wizzrobeIce.s b/asm/enemy/wizzrobeIce.s similarity index 100% rename from asm/wizzrobeIce.s rename to asm/enemy/wizzrobeIce.s diff --git a/asm/wizzrobeWind.s b/asm/enemy/wizzrobeWind.s similarity index 100% rename from asm/wizzrobeWind.s rename to asm/enemy/wizzrobeWind.s diff --git a/asm/ambientClouds.s b/asm/object/ambientClouds.s similarity index 100% rename from asm/ambientClouds.s rename to asm/object/ambientClouds.s diff --git a/asm/angryStatue.s b/asm/object/angryStatue.s similarity index 100% rename from asm/angryStatue.s rename to asm/object/angryStatue.s diff --git a/asm/barrelInside.s b/asm/object/barrelInside.s similarity index 100% rename from asm/barrelInside.s rename to asm/object/barrelInside.s diff --git a/asm/beanstalk.s b/asm/object/beanstalk.s similarity index 100% rename from asm/beanstalk.s rename to asm/object/beanstalk.s diff --git a/asm/bigBarrel.s b/asm/object/bigBarrel.s similarity index 100% rename from asm/bigBarrel.s rename to asm/object/bigBarrel.s diff --git a/asm/bigIceBlock.s b/asm/object/bigIceBlock.s similarity index 100% rename from asm/bigIceBlock.s rename to asm/object/bigIceBlock.s diff --git a/asm/bigPushableLever.s b/asm/object/bigPushableLever.s similarity index 100% rename from asm/bigPushableLever.s rename to asm/object/bigPushableLever.s diff --git a/asm/bird.s b/asm/object/bird.s similarity index 100% rename from asm/bird.s rename to asm/object/bird.s diff --git a/asm/blockPushed.s b/asm/object/blockPushed.s similarity index 100% rename from asm/blockPushed.s rename to asm/object/blockPushed.s diff --git a/asm/board.s b/asm/object/board.s similarity index 100% rename from asm/board.s rename to asm/object/board.s diff --git a/asm/bollard.s b/asm/object/bollard.s similarity index 100% rename from asm/bollard.s rename to asm/object/bollard.s diff --git a/asm/bossDoor.s b/asm/object/bossDoor.s similarity index 100% rename from asm/bossDoor.s rename to asm/object/bossDoor.s diff --git a/asm/cabinFurniture.s b/asm/object/cabinFurniture.s similarity index 100% rename from asm/cabinFurniture.s rename to asm/object/cabinFurniture.s diff --git a/asm/chestSpawner.s b/asm/object/chestSpawner.s similarity index 100% rename from asm/chestSpawner.s rename to asm/object/chestSpawner.s diff --git a/asm/code_0808C964.s b/asm/object/code_0808C964.s similarity index 100% rename from asm/code_0808C964.s rename to asm/object/code_0808C964.s diff --git a/asm/crenalBeanSprout.s b/asm/object/crenalBeanSprout.s similarity index 100% rename from asm/crenalBeanSprout.s rename to asm/object/crenalBeanSprout.s diff --git a/asm/deathFx.s b/asm/object/deathFx.s similarity index 100% rename from asm/deathFx.s rename to asm/object/deathFx.s diff --git a/asm/doubleBookshelf.s b/asm/object/doubleBookshelf.s similarity index 100% rename from asm/doubleBookshelf.s rename to asm/object/doubleBookshelf.s diff --git a/asm/enemyItem.s b/asm/object/enemyItem.s similarity index 100% rename from asm/enemyItem.s rename to asm/object/enemyItem.s diff --git a/asm/evilSpirit.s b/asm/object/evilSpirit.s similarity index 100% rename from asm/evilSpirit.s rename to asm/object/evilSpirit.s diff --git a/asm/eyeSwitch.s b/asm/object/eyeSwitch.s similarity index 100% rename from asm/eyeSwitch.s rename to asm/object/eyeSwitch.s diff --git a/asm/ezloCap.s b/asm/object/ezloCap.s similarity index 100% rename from asm/ezloCap.s rename to asm/object/ezloCap.s diff --git a/asm/fairy.s b/asm/object/fairy.s similarity index 100% rename from asm/fairy.s rename to asm/object/fairy.s diff --git a/asm/fan.s b/asm/object/fan.s similarity index 100% rename from asm/fan.s rename to asm/object/fan.s diff --git a/asm/figurineDevice.s b/asm/object/figurineDevice.s similarity index 100% rename from asm/figurineDevice.s rename to asm/object/figurineDevice.s diff --git a/asm/fireballChain.s b/asm/object/fireballChain.s similarity index 100% rename from asm/fireballChain.s rename to asm/object/fireballChain.s diff --git a/asm/floatingPlatform.s b/asm/object/floatingPlatform.s similarity index 100% rename from asm/floatingPlatform.s rename to asm/object/floatingPlatform.s diff --git a/asm/fourElements.s b/asm/object/fourElements.s similarity index 100% rename from asm/fourElements.s rename to asm/object/fourElements.s diff --git a/asm/frozenWaterElement.s b/asm/object/frozenWaterElement.s similarity index 100% rename from asm/frozenWaterElement.s rename to asm/object/frozenWaterElement.s diff --git a/asm/gentariCurtains.s b/asm/object/gentariCurtains.s similarity index 100% rename from asm/gentariCurtains.s rename to asm/object/gentariCurtains.s diff --git a/asm/giantBookLadder.s b/asm/object/giantBookLadder.s similarity index 100% rename from asm/giantBookLadder.s rename to asm/object/giantBookLadder.s diff --git a/asm/giantRock.s b/asm/object/giantRock.s similarity index 100% rename from asm/giantRock.s rename to asm/object/giantRock.s diff --git a/asm/giantRock2.s b/asm/object/giantRock2.s similarity index 100% rename from asm/giantRock2.s rename to asm/object/giantRock2.s diff --git a/asm/giantTwig.s b/asm/object/giantTwig.s similarity index 100% rename from asm/giantTwig.s rename to asm/object/giantTwig.s diff --git a/asm/gyorgBossObject.s b/asm/object/gyorgBossObject.s similarity index 100% rename from asm/gyorgBossObject.s rename to asm/object/gyorgBossObject.s diff --git a/asm/hittableLever.s b/asm/object/hittableLever.s similarity index 100% rename from asm/hittableLever.s rename to asm/object/hittableLever.s diff --git a/asm/houseDoorInterior.s b/asm/object/houseDoorInterior.s similarity index 100% rename from asm/houseDoorInterior.s rename to asm/object/houseDoorInterior.s diff --git a/asm/itemForSale.s b/asm/object/itemForSale.s similarity index 100% rename from asm/itemForSale.s rename to asm/object/itemForSale.s diff --git a/asm/ladderHoleInBookshelf.s b/asm/object/ladderHoleInBookshelf.s similarity index 100% rename from asm/ladderHoleInBookshelf.s rename to asm/object/ladderHoleInBookshelf.s diff --git a/asm/ladderUp.s b/asm/object/ladderUp.s similarity index 100% rename from asm/ladderUp.s rename to asm/object/ladderUp.s diff --git a/asm/lamp.s b/asm/object/lamp.s similarity index 100% rename from asm/lamp.s rename to asm/object/lamp.s diff --git a/asm/lavaPlatform.s b/asm/object/lavaPlatform.s similarity index 100% rename from asm/lavaPlatform.s rename to asm/object/lavaPlatform.s diff --git a/asm/lilypadLarge.s b/asm/object/lilypadLarge.s similarity index 100% rename from asm/lilypadLarge.s rename to asm/object/lilypadLarge.s diff --git a/asm/litArea.s b/asm/object/litArea.s similarity index 100% rename from asm/litArea.s rename to asm/object/litArea.s diff --git a/asm/macroAcorn.s b/asm/object/macroAcorn.s similarity index 100% rename from asm/macroAcorn.s rename to asm/object/macroAcorn.s diff --git a/asm/macroBook.s b/asm/object/macroBook.s similarity index 100% rename from asm/macroBook.s rename to asm/object/macroBook.s diff --git a/asm/macroDecorations.s b/asm/object/macroDecorations.s similarity index 100% rename from asm/macroDecorations.s rename to asm/object/macroDecorations.s diff --git a/asm/macroMushroomStalks.s b/asm/object/macroMushroomStalks.s similarity index 100% rename from asm/macroMushroomStalks.s rename to asm/object/macroMushroomStalks.s diff --git a/asm/macroPlayer.s b/asm/object/macroPlayer.s similarity index 100% rename from asm/macroPlayer.s rename to asm/object/macroPlayer.s diff --git a/asm/macroShoes.s b/asm/object/macroShoes.s similarity index 100% rename from asm/macroShoes.s rename to asm/object/macroShoes.s diff --git a/asm/mazaalBossObject.s b/asm/object/mazaalBossObject.s similarity index 100% rename from asm/mazaalBossObject.s rename to asm/object/mazaalBossObject.s diff --git a/asm/minecart.s b/asm/object/minecart.s similarity index 100% rename from asm/minecart.s rename to asm/object/minecart.s diff --git a/asm/minecartDoor.s b/asm/object/minecartDoor.s similarity index 100% rename from asm/minecartDoor.s rename to asm/object/minecartDoor.s diff --git a/asm/minishEmoticon.s b/asm/object/minishEmoticon.s similarity index 100% rename from asm/minishEmoticon.s rename to asm/object/minishEmoticon.s diff --git a/asm/object10.s b/asm/object/object10.s similarity index 100% rename from asm/object10.s rename to asm/object/object10.s diff --git a/asm/object11.s b/asm/object/object11.s similarity index 100% rename from asm/object11.s rename to asm/object/object11.s diff --git a/asm/object12.s b/asm/object/object12.s similarity index 100% rename from asm/object12.s rename to asm/object/object12.s diff --git a/asm/object15.s b/asm/object/object15.s similarity index 100% rename from asm/object15.s rename to asm/object/object15.s diff --git a/asm/object17.s b/asm/object/object17.s similarity index 100% rename from asm/object17.s rename to asm/object/object17.s diff --git a/asm/object1E.s b/asm/object/object1E.s similarity index 100% rename from asm/object1E.s rename to asm/object/object1E.s diff --git a/asm/object1F.s b/asm/object/object1F.s similarity index 100% rename from asm/object1F.s rename to asm/object/object1F.s diff --git a/asm/object20.s b/asm/object/object20.s similarity index 100% rename from asm/object20.s rename to asm/object/object20.s diff --git a/asm/object21.s b/asm/object/object21.s similarity index 100% rename from asm/object21.s rename to asm/object/object21.s diff --git a/asm/object28.s b/asm/object/object28.s similarity index 100% rename from asm/object28.s rename to asm/object/object28.s diff --git a/asm/object2A.s b/asm/object/object2A.s similarity index 100% rename from asm/object2A.s rename to asm/object/object2A.s diff --git a/asm/object2B.s b/asm/object/object2B.s similarity index 100% rename from asm/object2B.s rename to asm/object/object2B.s diff --git a/asm/object30.s b/asm/object/object30.s similarity index 100% rename from asm/object30.s rename to asm/object/object30.s diff --git a/asm/object35.s b/asm/object/object35.s similarity index 100% rename from asm/object35.s rename to asm/object/object35.s diff --git a/asm/object36.s b/asm/object/object36.s similarity index 100% rename from asm/object36.s rename to asm/object/object36.s diff --git a/asm/object37.s b/asm/object/object37.s similarity index 100% rename from asm/object37.s rename to asm/object/object37.s diff --git a/asm/object3A.s b/asm/object/object3A.s similarity index 100% rename from asm/object3A.s rename to asm/object/object3A.s diff --git a/asm/object3D.s b/asm/object/object3D.s similarity index 100% rename from asm/object3D.s rename to asm/object/object3D.s diff --git a/asm/object3E.s b/asm/object/object3E.s similarity index 100% rename from asm/object3E.s rename to asm/object/object3E.s diff --git a/asm/object42.s b/asm/object/object42.s similarity index 100% rename from asm/object42.s rename to asm/object/object42.s diff --git a/asm/object43.s b/asm/object/object43.s similarity index 100% rename from asm/object43.s rename to asm/object/object43.s diff --git a/asm/object44.s b/asm/object/object44.s similarity index 100% rename from asm/object44.s rename to asm/object/object44.s diff --git a/asm/object45.s b/asm/object/object45.s similarity index 100% rename from asm/object45.s rename to asm/object/object45.s diff --git a/asm/object4B.s b/asm/object/object4B.s similarity index 100% rename from asm/object4B.s rename to asm/object/object4B.s diff --git a/asm/object52.s b/asm/object/object52.s similarity index 100% rename from asm/object52.s rename to asm/object/object52.s diff --git a/asm/object53.s b/asm/object/object53.s similarity index 100% rename from asm/object53.s rename to asm/object/object53.s diff --git a/asm/object5B.s b/asm/object/object5B.s similarity index 100% rename from asm/object5B.s rename to asm/object/object5B.s diff --git a/asm/object61.s b/asm/object/object61.s similarity index 100% rename from asm/object61.s rename to asm/object/object61.s diff --git a/asm/object63.s b/asm/object/object63.s similarity index 100% rename from asm/object63.s rename to asm/object/object63.s diff --git a/asm/object64.s b/asm/object/object64.s similarity index 100% rename from asm/object64.s rename to asm/object/object64.s diff --git a/asm/object66.s b/asm/object/object66.s similarity index 100% rename from asm/object66.s rename to asm/object/object66.s diff --git a/asm/object67.s b/asm/object/object67.s similarity index 100% rename from asm/object67.s rename to asm/object/object67.s diff --git a/asm/object68.s b/asm/object/object68.s similarity index 100% rename from asm/object68.s rename to asm/object/object68.s diff --git a/asm/object69.s b/asm/object/object69.s similarity index 100% rename from asm/object69.s rename to asm/object/object69.s diff --git a/asm/object70.s b/asm/object/object70.s similarity index 100% rename from asm/object70.s rename to asm/object/object70.s diff --git a/asm/object74.s b/asm/object/object74.s similarity index 100% rename from asm/object74.s rename to asm/object/object74.s diff --git a/asm/object75.s b/asm/object/object75.s similarity index 100% rename from asm/object75.s rename to asm/object/object75.s diff --git a/asm/object76.s b/asm/object/object76.s similarity index 100% rename from asm/object76.s rename to asm/object/object76.s diff --git a/asm/object79.s b/asm/object/object79.s similarity index 100% rename from asm/object79.s rename to asm/object/object79.s diff --git a/asm/object81.s b/asm/object/object81.s similarity index 100% rename from asm/object81.s rename to asm/object/object81.s diff --git a/asm/object8E.s b/asm/object/object8E.s similarity index 100% rename from asm/object8E.s rename to asm/object/object8E.s diff --git a/asm/object9.s b/asm/object/object9.s similarity index 100% rename from asm/object9.s rename to asm/object/object9.s diff --git a/asm/object90.s b/asm/object/object90.s similarity index 100% rename from asm/object90.s rename to asm/object/object90.s diff --git a/asm/object91.s b/asm/object/object91.s similarity index 100% rename from asm/object91.s rename to asm/object/object91.s diff --git a/asm/object96.s b/asm/object/object96.s similarity index 100% rename from asm/object96.s rename to asm/object/object96.s diff --git a/asm/object97.s b/asm/object/object97.s similarity index 100% rename from asm/object97.s rename to asm/object/object97.s diff --git a/asm/object98.s b/asm/object/object98.s similarity index 100% rename from asm/object98.s rename to asm/object/object98.s diff --git a/asm/object99.s b/asm/object/object99.s similarity index 100% rename from asm/object99.s rename to asm/object/object99.s diff --git a/asm/object9B.s b/asm/object/object9B.s similarity index 100% rename from asm/object9B.s rename to asm/object/object9B.s diff --git a/asm/objectA6.s b/asm/object/objectA6.s similarity index 100% rename from asm/objectA6.s rename to asm/object/objectA6.s diff --git a/asm/objectA7.s b/asm/object/objectA7.s similarity index 100% rename from asm/objectA7.s rename to asm/object/objectA7.s diff --git a/asm/objectA8.s b/asm/object/objectA8.s similarity index 100% rename from asm/objectA8.s rename to asm/object/objectA8.s diff --git a/asm/objectA9.s b/asm/object/objectA9.s similarity index 100% rename from asm/objectA9.s rename to asm/object/objectA9.s diff --git a/asm/objectAB.s b/asm/object/objectAB.s similarity index 100% rename from asm/objectAB.s rename to asm/object/objectAB.s diff --git a/asm/objectAD.s b/asm/object/objectAD.s similarity index 100% rename from asm/objectAD.s rename to asm/object/objectAD.s diff --git a/asm/objectB.s b/asm/object/objectB.s similarity index 100% rename from asm/objectB.s rename to asm/object/objectB.s diff --git a/asm/objectB3.s b/asm/object/objectB3.s similarity index 100% rename from asm/objectB3.s rename to asm/object/objectB3.s diff --git a/asm/objectB4.s b/asm/object/objectB4.s similarity index 100% rename from asm/objectB4.s rename to asm/object/objectB4.s diff --git a/asm/objectB6.s b/asm/object/objectB6.s similarity index 100% rename from asm/objectB6.s rename to asm/object/objectB6.s diff --git a/asm/objectB9.s b/asm/object/objectB9.s similarity index 100% rename from asm/objectB9.s rename to asm/object/objectB9.s diff --git a/asm/objectBD.s b/asm/object/objectBD.s similarity index 100% rename from asm/objectBD.s rename to asm/object/objectBD.s diff --git a/asm/objectBF.s b/asm/object/objectBF.s similarity index 100% rename from asm/objectBF.s rename to asm/object/objectBF.s diff --git a/asm/objectBlockingStairs.s b/asm/object/objectBlockingStairs.s similarity index 100% rename from asm/objectBlockingStairs.s rename to asm/object/objectBlockingStairs.s diff --git a/asm/objectC1.s b/asm/object/objectC1.s similarity index 100% rename from asm/objectC1.s rename to asm/object/objectC1.s diff --git a/asm/objectD.s b/asm/object/objectD.s similarity index 100% rename from asm/objectD.s rename to asm/object/objectD.s diff --git a/asm/objectE.s b/asm/object/objectE.s similarity index 100% rename from asm/objectE.s rename to asm/object/objectE.s diff --git a/asm/objectOnPillar.s b/asm/object/objectOnPillar.s similarity index 100% rename from asm/objectOnPillar.s rename to asm/object/objectOnPillar.s diff --git a/asm/objectOnSpinyBeetle.s b/asm/object/objectOnSpinyBeetle.s similarity index 100% rename from asm/objectOnSpinyBeetle.s rename to asm/object/objectOnSpinyBeetle.s diff --git a/asm/paper.s b/asm/object/paper.s similarity index 100% rename from asm/paper.s rename to asm/object/paper.s diff --git a/asm/picoBloom.s b/asm/object/picoBloom.s similarity index 100% rename from asm/picoBloom.s rename to asm/object/picoBloom.s diff --git a/asm/pressurePlate.s b/asm/object/pressurePlate.s similarity index 100% rename from asm/pressurePlate.s rename to asm/object/pressurePlate.s diff --git a/asm/pullableLever.s b/asm/object/pullableLever.s similarity index 100% rename from asm/pullableLever.s rename to asm/object/pullableLever.s diff --git a/asm/pullableMushroom.s b/asm/object/pullableMushroom.s similarity index 100% rename from asm/pullableMushroom.s rename to asm/object/pullableMushroom.s diff --git a/asm/pushableFurniture.s b/asm/object/pushableFurniture.s similarity index 100% rename from asm/pushableFurniture.s rename to asm/object/pushableFurniture.s diff --git a/asm/pushableGrave.s b/asm/object/pushableGrave.s similarity index 100% rename from asm/pushableGrave.s rename to asm/object/pushableGrave.s diff --git a/asm/pushableLever.s b/asm/object/pushableLever.s similarity index 100% rename from asm/pushableLever.s rename to asm/object/pushableLever.s diff --git a/asm/pushableRock.s b/asm/object/pushableRock.s similarity index 100% rename from asm/pushableRock.s rename to asm/object/pushableRock.s diff --git a/asm/pushableStatue.s b/asm/object/pushableStatue.s similarity index 100% rename from asm/pushableStatue.s rename to asm/object/pushableStatue.s diff --git a/asm/smallIceBlock.s b/asm/object/smallIceBlock.s similarity index 100% rename from asm/smallIceBlock.s rename to asm/object/smallIceBlock.s diff --git a/asm/specialFx.s b/asm/object/specialFx.s similarity index 100% rename from asm/specialFx.s rename to asm/object/specialFx.s diff --git a/asm/steam.s b/asm/object/steam.s similarity index 100% rename from asm/steam.s rename to asm/object/steam.s diff --git a/asm/stoneTablet.s b/asm/object/stoneTablet.s similarity index 100% rename from asm/stoneTablet.s rename to asm/object/stoneTablet.s diff --git a/asm/treeHidingPortal.s b/asm/object/treeHidingPortal.s similarity index 100% rename from asm/treeHidingPortal.s rename to asm/object/treeHidingPortal.s diff --git a/asm/waterfallOpening.s b/asm/object/waterfallOpening.s similarity index 100% rename from asm/waterfallOpening.s rename to asm/object/waterfallOpening.s diff --git a/asm/whirlwind.s b/asm/object/whirlwind.s similarity index 100% rename from asm/whirlwind.s rename to asm/object/whirlwind.s diff --git a/asm/windTribeTeleporter.s b/asm/object/windTribeTeleporter.s similarity index 100% rename from asm/windTribeTeleporter.s rename to asm/object/windTribeTeleporter.s diff --git a/include/enemy.h b/include/enemy.h index 8595b8f3..5905ce5b 100644 --- a/include/enemy.h +++ b/include/enemy.h @@ -4,7 +4,7 @@ #include "global.h" #include "asm.h" -#include "audio.h" +#include "sound.h" #include "effects.h" #include "flags.h" #include "utils.h" diff --git a/include/fileScreen.h b/include/fileScreen.h index 8d67cf82..78a36f90 100644 --- a/include/fileScreen.h +++ b/include/fileScreen.h @@ -1,7 +1,7 @@ #ifndef FILESELECT_H #define FILESELECT_H -#include "audio.h" +#include "sound.h" #include "global.h" #include "save.h" diff --git a/include/overworld.h b/include/game.h similarity index 95% rename from include/overworld.h rename to include/game.h index 43ae0c1a..8fb5253f 100644 --- a/include/overworld.h +++ b/include/game.h @@ -1,5 +1,5 @@ -#ifndef OVERWORLD_H -#define OVERWORLD_H +#ifndef GAME_H +#define GAME_H #include "global.h" #include "area.h" @@ -58,4 +58,4 @@ void sub_08053500(void); u32 GetBottleContaining(u32); -#endif // OVERWORLD_H +#endif // GAME_H diff --git a/include/textbox.h b/include/message.h similarity index 97% rename from include/textbox.h rename to include/message.h index 894c5d9d..f7f8c25d 100644 --- a/include/textbox.h +++ b/include/message.h @@ -1,5 +1,5 @@ -#ifndef TEXTBOX_H -#define TEXTBOX_H +#ifndef MESSAGE_H +#define MESSAGE_H #include "global.h" #include "entity.h" @@ -128,4 +128,4 @@ void MessageAtHeight(u32 index, u32 y); void DispMessageFrame(u16*, u32, u32, u32); -#endif +#endif // MESSAGE_H diff --git a/include/npc.h b/include/npc.h index d67652de..3e049fb0 100644 --- a/include/npc.h +++ b/include/npc.h @@ -5,12 +5,12 @@ #include "asm.h" #include "utils.h" -#include "audio.h" +#include "sound.h" #include "effects.h" #include "room.h" #include "flags.h" #include "coord.h" -#include "textbox.h" +#include "message.h" #include "script.h" #include "save.h" diff --git a/include/object.h b/include/object.h index d7256397..84f9c02c 100644 --- a/include/object.h +++ b/include/object.h @@ -5,7 +5,7 @@ #include "asm.h" #include "utils.h" -#include "audio.h" +#include "sound.h" #include "flags.h" #include "effects.h" #include "room.h" diff --git a/include/audio.h b/include/sound.h similarity index 99% rename from include/audio.h rename to include/sound.h index e5e4c0e4..8549510f 100644 --- a/include/audio.h +++ b/include/sound.h @@ -1,5 +1,5 @@ -#ifndef AUDIO_H -#define AUDIO_H +#ifndef SOUND_H +#define SOUND_H #include "global.h" @@ -597,4 +597,4 @@ typedef enum { SONG_BGM_0 = 0x80110000, } Sound; -#endif // AUDIO_H +#endif // SOUND_H diff --git a/linker.ld b/linker.ld index 225731fc..76401066 100644 --- a/linker.ld +++ b/linker.ld @@ -384,7 +384,7 @@ SECTIONS { src/enemy/pesto.o(.text); src/enemy/puffstool.o(.text); src/enemy/chuchuBoss.o(.text); - asm/chuchuBoss.o(.text); + asm/enemy/chuchuBoss.o(.text); src/enemy/likeLike.o(.text); src/enemy/spearMoblin.o(.text); src/enemy/businessScrub.o(.text); @@ -401,77 +401,77 @@ SECTIONS { src/enemy/fallingBoulder.o(.text); src/enemy/bobomb.o(.text); src/enemy/wallMaster2.o(.text); - asm/gleerok.o(.text); + asm/enemy/gleerok.o(.text); src/enemy/vaatiEyesMacro.o(.text); src/enemy/tektite.o(.text); - asm/wizzrobeWind.o(.text); - asm/wizzrobeFire.o(.text); - asm/wizzrobeIce.o(.text); - src/code_080300AC.o(.text); - asm/code_080300AC.o(.text); - asm/armos.o(.text); - asm/eyegore.o(.text); + asm/enemy/wizzrobeWind.o(.text); + asm/enemy/wizzrobeFire.o(.text); + asm/enemy/wizzrobeIce.o(.text); + src/enemy/code_080300AC.o(.text); + asm/enemy/code_080300AC.o(.text); + asm/enemy/armos.o(.text); + asm/enemy/eyegore.o(.text); src/enemy/rope.o(.text); src/enemy/smallPesto.o(.text); src/enemy/acroBandits.o(.text); src/enemy/bladeTrap.o(.text); src/enemy/keaton.o(.text); - asm/crow.o(.text); - asm/mulldozer.o(.text); - asm/bombarossa.o(.text); + asm/enemy/crow.o(.text); + asm/enemy/mulldozer.o(.text); + asm/enemy/bombarossa.o(.text); src/enemy/wisp.o(.text); - asm/spinyBeetle.o(.text); + asm/enemy/spinyBeetle.o(.text); src/enemy/mazaalHead.o(.text); src/enemy/mazaalMacro.o(.text); src/enemy/mazaalHand.o(.text); src/enemy/octorokBoss.o(.text); - asm/flyingPot.o(.text); + asm/enemy/flyingPot.o(.text); src/enemy/gibdo.o(.text); - asm/octorokGolden.o(.text); + asm/enemy/octorokGolden.o(.text); src/enemy/tektiteGolden.o(.text); src/enemy/ropeGolden.o(.text); - asm/cloudPiranha.o(.text); - asm/scissorsBeetle.o(.text); - asm/cuccoAggr.o(.text); - asm/stalfos.o(.text); - asm/flyingSkull.o(.text); + asm/enemy/cloudPiranha.o(.text); + asm/enemy/scissorsBeetle.o(.text); + asm/enemy/cuccoAggr.o(.text); + asm/enemy/stalfos.o(.text); + asm/enemy/flyingSkull.o(.text); src/enemy/mazaalBracelet.o(.text); - asm/takkuri.o(.text); + asm/enemy/takkuri.o(.text); src/enemy/bowMoblin.o(.text); - asm/bowMoblin.o(.text); + asm/enemy/bowMoblin.o(.text); src/enemy/lakitu.o(.text); src/enemy/lakituCloud.o(.text); - asm/enemy49.o(.text); + asm/enemy/enemy49.o(.text); src/enemy/vaatiRebornEnemy.o(.text); src/enemy/vaatiProjectile.o(.text); - asm/ballChainSoldier.o(.text); + asm/enemy/ballChainSoldier.o(.text); src/enemy/enemy4D.o(.text); - asm/enemy4D.o(.text); - asm/ghini.o(.text); + asm/enemy/enemy4D.o(.text); + asm/enemy/ghini.o(.text); src/enemy/vaatiTransfigured.o(.text); - asm/enemy50.o(.text); + asm/enemy/enemy50.o(.text); src/enemy/vaatiWrath.o(.text); src/enemy/vaatiArm.o(.text); - asm/dust.o(.text); + asm/enemy/dust.o(.text); src/enemy/vaatiBall.o(.text); src/enemy/slime.o(.text); - asm/sub_080451CC.o(.text); + asm/enemy/sub_080451CC.o(.text); src/enemy/miniSlime.o(.text); src/enemy/fireballGuy.o(.text); src/enemy/miniFireballGuy.o(.text); src/enemy/vaatiTransfiguredEye.o(.text); - asm/businessScrubPrologue.o(.text); - asm/gyorgFemale.o(.text); + asm/enemy/businessScrubPrologue.o(.text); + asm/enemy/gyorgFemale.o(.text); src/enemy/gyorgMale.o(.text); - asm/curtain.o(.text); + asm/enemy/curtain.o(.text); src/enemy/vaatiWrathEye.o(.text); - asm/gyorgChild.o(.text); - asm/gyorgFemaleEye.o(.text); - asm/enemy62.o(.text); - asm/gyorgFemaleMouth.o(.text); - asm/enemy64.o(.text); + asm/enemy/gyorgChild.o(.text); + asm/enemy/gyorgFemaleEye.o(.text); + asm/enemy/enemy62.o(.text); + asm/enemy/gyorgFemaleMouth.o(.text); + asm/enemy/enemy64.o(.text); src/enemy/treeItem.o(.text); - asm/enemy66.o(.text); + asm/enemy/enemy66.o(.text); /* END enemies */ src/code_08049CD4.o(.text); asm/code_08049D30.o(.text); @@ -486,7 +486,7 @@ SECTIONS { src/fade.o(.text); src/fileScreen.o(.text); asm/fileScreen.o(.text); - src/overworld.o(.text); + src/game.o(.text); asm/code_080526F8.o(.text); asm/modBombs.o(.text); asm/modArrows.o(.text); @@ -496,7 +496,7 @@ SECTIONS { asm/code_08054C04.o(.text); src/sub_08055E08.o(.text); src/main.o(.text); - src/textbox.o(.text); + src/message.o(.text); asm/code_08056418.o(.text); src/manager/manager1.o(.text); src/manager/manager2.o(.text); @@ -686,214 +686,214 @@ SECTIONS { asm/code_0807CAA0.o(.text); src/flags.o(.text); src/save.o(.text); - src/code_0807CC3C.o(.text); + src/scroll.o(.text); src/script.o(.text); asm/code_0807F0D8.o(.text); src/code_0808091C.o(.text); asm/code_0808091C.o(.text); /* objects */ src/object/itemOnGround.o(.text); - asm/deathFx.o(.text); - asm/itemForSale.o(.text); + asm/object/deathFx.o(.text); + asm/object/itemForSale.o(.text); src/object/button.o(.text); - asm/minishEmoticon.o(.text); + asm/object/minishEmoticon.o(.text); src/object/pot.o(.text); - asm/ezloCap.o(.text); - asm/blockPushed.o(.text); + asm/object/ezloCap.o(.text); + asm/object/blockPushed.o(.text); src/object/lockedDoor.o(.text); - asm/object9.o(.text); + asm/object/object9.o(.text); src/object/objectA.o(.text); - asm/objectB.o(.text); + asm/object/objectB.o(.text); src/object/chestSpawner.o(.text); - asm/chestSpawner.o(.text); - asm/objectD.o(.text); - asm/objectE.o(.text); - asm/specialFx.o(.text); - asm/object10.o(.text); - asm/object11.o(.text); - asm/object12.o(.text); + asm/object/chestSpawner.o(.text); + asm/object/objectD.o(.text); + asm/object/objectE.o(.text); + asm/object/specialFx.o(.text); + asm/object/object10.o(.text); + asm/object/object11.o(.text); + asm/object/object12.o(.text); src/object/railtrack.o(.text); - asm/lilypadLarge.o(.text); - asm/object15.o(.text); - asm/floatingPlatform.o(.text); - asm/object17.o(.text); - asm/evilSpirit.o(.text); + asm/object/lilypadLarge.o(.text); + asm/object/object15.o(.text); + asm/object/floatingPlatform.o(.text); + asm/object/object17.o(.text); + asm/object/evilSpirit.o(.text); src/object/houseDoorExterior.o(.text); src/object/object1A.o(.text); src/object/greatFairy.o(.text); src/object/object1C.o(.text); src/object/object1D.o(.text); - asm/object1E.o(.text); - asm/object1F.o(.text); - asm/object20.o(.text); - asm/object21.o(.text); - asm/figurineDevice.o(.text); - asm/eyeSwitch.o(.text); - asm/pressurePlate.o(.text); - asm/bigBarrel.o(.text); - asm/barrelInside.o(.text); - asm/pushableStatue.o(.text); - asm/object28.o(.text); - asm/ambientClouds.o(.text); + asm/object/object1E.o(.text); + asm/object/object1F.o(.text); + asm/object/object20.o(.text); + asm/object/object21.o(.text); + asm/object/figurineDevice.o(.text); + asm/object/eyeSwitch.o(.text); + asm/object/pressurePlate.o(.text); + asm/object/bigBarrel.o(.text); + asm/object/barrelInside.o(.text); + asm/object/pushableStatue.o(.text); + asm/object/object28.o(.text); + asm/object/ambientClouds.o(.text); src/object/object2A.o(.text); - asm/object2A.o(.text); - asm/object2B.o(.text); - asm/beanstalk.o(.text); + asm/object/object2A.o(.text); + asm/object/object2B.o(.text); + asm/object/beanstalk.o(.text); src/object/smoke.o(.text); - asm/pushableRock.o(.text); - asm/hittableLever.o(.text); - asm/object30.o(.text); + asm/object/pushableRock.o(.text); + asm/object/hittableLever.o(.text); + asm/object/object30.o(.text); src/object/frozenFlower.o(.text); - asm/pullableMushroom.o(.text); - asm/bollard.o(.text); + asm/object/pullableMushroom.o(.text); + asm/object/bollard.o(.text); src/object/warpPoint.o(.text); - asm/object35.o(.text); - asm/object36.o(.text); - asm/object37.o(.text); + asm/object/object35.o(.text); + asm/object/object36.o(.text); + asm/object/object37.o(.text); src/object/jarPortal.o(.text); - asm/bossDoor.o(.text); - asm/object3A.o(.text); - asm/macroMushroomStalks.o(.text); - asm/object75.o(.text); /* 75 and 76 are mislocated in base game */ - asm/object76.o(.text); - asm/code_0808C964.o(.text); - asm/macroPlayer.o(.text); - asm/object3D.o(.text); - asm/object3E.o(.text); + asm/object/bossDoor.o(.text); + asm/object/object3A.o(.text); + asm/object/macroMushroomStalks.o(.text); + asm/object/object75.o(.text); /* 75 and 76 are mislocated in base game */ + asm/object/object76.o(.text); + asm/object/code_0808C964.o(.text); + asm/object/macroPlayer.o(.text); + asm/object/object3D.o(.text); + asm/object/object3E.o(.text); src/object/giantLeaf.o(.text); - asm/fairy.o(.text); - asm/ladderUp.o(.text); - asm/object42.o(.text); - asm/object43.o(.text); - asm/object44.o(.text); - asm/object45.o(.text); - asm/giantBookLadder.o(.text); + asm/object/fairy.o(.text); + asm/object/ladderUp.o(.text); + asm/object/object42.o(.text); + asm/object/object43.o(.text); + asm/object/object44.o(.text); + asm/object/object45.o(.text); + asm/object/giantBookLadder.o(.text); src/object/heartContainer.o(.text); src/object/fileScreenObjects.o(.text); src/object/object49.o(.text); src/object/backgroundCloud.o(.text); - asm/object4B.o(.text); - asm/pushableFurniture.o(.text); + asm/object/object4B.o(.text); + asm/object/pushableFurniture.o(.text); src/object/furniture.o(.text); src/object/minishSizedEntrance.o(.text); src/object/archway.o(.text); - asm/giantRock.o(.text); - asm/giantRock2.o(.text); - asm/object52.o(.text); - asm/object53.o(.text); - asm/pullableLever.o(.text); + asm/object/giantRock.o(.text); + asm/object/giantRock2.o(.text); + asm/object/object52.o(.text); + asm/object/object53.o(.text); + asm/object/pullableLever.o(.text); src/object/minecart.o(.text); - asm/minecart.o(.text); + asm/object/minecart.o(.text); src/object/thoughtBubble.o(.text); src/object/hiddenLadderDown.o(.text); - asm/gentariCurtains.o(.text); - asm/lavaPlatform.o(.text); - asm/paper.o(.text); - asm/object5B.o(.text); + asm/object/gentariCurtains.o(.text); + asm/object/lavaPlatform.o(.text); + asm/object/paper.o(.text); + asm/object/object5B.o(.text); src/object/mask.o(.text); - asm/houseDoorInterior.o(.text); - asm/whirlwind.o(.text); - asm/objectBlockingStairs.o(.text); + asm/object/houseDoorInterior.o(.text); + asm/object/whirlwind.o(.text); + asm/object/objectBlockingStairs.o(.text); src/object/swordsmanNewsletter.o(.text); - asm/object61.o(.text); - asm/giantTwig.o(.text); - asm/object63.o(.text); - asm/object64.o(.text); - asm/ladderHoleInBookshelf.o(.text); - asm/object66.o(.text); - asm/object67.o(.text); - asm/object68.o(.text); - asm/object69.o(.text); + asm/object/object61.o(.text); + asm/object/giantTwig.o(.text); + asm/object/object63.o(.text); + asm/object/object64.o(.text); + asm/object/ladderHoleInBookshelf.o(.text); + asm/object/object66.o(.text); + asm/object/object67.o(.text); + asm/object/object68.o(.text); + asm/object/object69.o(.text); src/object/object6A.o(.text); - asm/crenalBeanSprout.o(.text); - asm/minecartDoor.o(.text); - asm/objectOnPillar.o(.text); + asm/object/crenalBeanSprout.o(.text); + asm/object/minecartDoor.o(.text); + asm/object/objectOnPillar.o(.text); src/object/mineralWaterSource.o(.text); src/object/minishSizedArchway.o(.text); - asm/object70.o(.text); - asm/pushableGrave.o(.text); - asm/stoneTablet.o(.text); + asm/object/object70.o(.text); + asm/object/pushableGrave.o(.text); + asm/object/stoneTablet.o(.text); src/object/lilypadSmall.o(.text); - asm/object74.o(.text); + asm/object/object74.o(.text); src/object/bell.o(.text); - asm/macroDecorations.o(.text); - asm/object79.o(.text); - asm/steam.o(.text); - asm/pushableLever.o(.text); - asm/macroShoes.o(.text); - asm/objectOnSpinyBeetle.o(.text); + asm/object/macroDecorations.o(.text); + asm/object/object79.o(.text); + asm/object/steam.o(.text); + asm/object/pushableLever.o(.text); + asm/object/macroShoes.o(.text); + asm/object/objectOnSpinyBeetle.o(.text); src/object/object7E.o(.text); - asm/picoBloom.o(.text); - asm/board.o(.text); - asm/object81.o(.text); + asm/object/picoBloom.o(.text); + asm/object/board.o(.text); + asm/object/object81.o(.text); src/object/bigVortex.o(.text); - asm/bigPushableLever.o(.text); - asm/smallIceBlock.o(.text); - asm/bigIceBlock.o(.text); + asm/object/bigPushableLever.o(.text); + asm/object/smallIceBlock.o(.text); + asm/object/bigIceBlock.o(.text); src/object/object86.o(.text); src/object/octorokBossObject.o(.text); - asm/macroBook.o(.text); - asm/mazaalBossObject.o(.text); - asm/cabinFurniture.o(.text); - asm/doubleBookshelf.o(.text); + asm/object/macroBook.o(.text); + asm/object/mazaalBossObject.o(.text); + asm/object/cabinFurniture.o(.text); + asm/object/doubleBookshelf.o(.text); src/object/book.o(.text); src/object/fireplace.o(.text); - asm/object8E.o(.text); - asm/frozenWaterElement.o(.text); - asm/object90.o(.text); - asm/object91.o(.text); + asm/object/object8E.o(.text); + asm/object/frozenWaterElement.o(.text); + asm/object/object90.o(.text); + asm/object/object91.o(.text); src/object/bakerOven.o(.text); - asm/lamp.o(.text); + asm/object/lamp.o(.text); src/object/windTribeFlag.o(.text); src/object/bird.o(.text); - asm/bird.o(.text); - asm/object96.o(.text); - asm/object97.o(.text); - asm/object98.o(.text); - asm/object99.o(.text); - asm/macroAcorn.o(.text); - asm/object9B.o(.text); + asm/object/bird.o(.text); + asm/object/object96.o(.text); + asm/object/object97.o(.text); + asm/object/object98.o(.text); + asm/object/object99.o(.text); + asm/object/macroAcorn.o(.text); + asm/object/object9B.o(.text); src/object/treeHidingPortal.o(.text); - asm/treeHidingPortal.o(.text); + asm/object/treeHidingPortal.o(.text); src/object/lightableSwitch.o(.text); src/object/treeThorns.o(.text); src/object/fan.o(.text); - asm/fan.o(.text); - asm/angryStatue.o(.text); + asm/object/fan.o(.text); + asm/object/angryStatue.o(.text); src/object/palaceArchway.o(.text); src/object/objectA2.o(.text); src/object/cloud.o(.text); src/object/minishLight.o(.text); - asm/fireballChain.o(.text); - asm/objectA6.o(.text); - asm/objectA7.o(.text); + asm/object/fireballChain.o(.text); + asm/object/objectA6.o(.text); + asm/object/objectA7.o(.text); src/object/objectA8.o(.text); - asm/objectA8.o(.text); - asm/objectA9.o(.text); - asm/waterfallOpening.o(.text); - asm/objectAB.o(.text); - asm/fourElements.o(.text); - asm/objectAD.o(.text); + asm/object/objectA8.o(.text); + asm/object/objectA9.o(.text); + asm/object/waterfallOpening.o(.text); + asm/object/objectAB.o(.text); + asm/object/fourElements.o(.text); + asm/object/objectAD.o(.text); src/object/floatingBlock.o(.text); src/object/objectAF.o(.text); src/object/metalDoor.o(.text); src/object/jailBars.o(.text); src/object/objectB2.o(.text); - asm/objectB3.o(.text); - asm/objectB4.o(.text); + asm/object/objectB3.o(.text); + asm/object/objectB4.o(.text); src/object/objectB5.o(.text); - asm/objectB6.o(.text); + asm/object/objectB6.o(.text); src/object/well.o(.text); - asm/windTribeTeleporter.o(.text); - asm/objectB9.o(.text); - asm/gyorgBossObject.o(.text); + asm/object/windTribeTeleporter.o(.text); + asm/object/objectB9.o(.text); + asm/object/gyorgBossObject.o(.text); src/object/windcrest.o(.text); - asm/litArea.o(.text); - asm/objectBD.o(.text); + asm/object/litArea.o(.text); + asm/object/objectBD.o(.text); src/object/pinwheel.o(.text); - asm/objectBF.o(.text); - asm/enemyItem.o(.text); - asm/objectC1.o(.text); + asm/object/objectBF.o(.text); + asm/object/enemyItem.o(.text); + asm/object/objectC1.o(.text); /* END objects */ asm/sub_080A276C.o(.text); src/objectUtils.o(.text); @@ -903,7 +903,7 @@ SECTIONS { #ifdef DEMO_USA src/demoScreen.o(.text); #endif - src/audio.o(.text); + src/sound.o(.text); asm/code_080A3480.o(.text); src/sub_080A3B84.o(.text); asm/code_080A3BD0.o(.text); @@ -1173,7 +1173,7 @@ SECTIONS { data/data_080FC3C4.o(.rodata); src/fileScreen.o(.rodata); data/data_080FC8A4.o(.rodata); - src/overworld.o(.rodata); + src/game.o(.rodata); data/data_080FCAC8.o(.rodata); data/const/playerItem/playerItemLantern.o(.rodata); data/data_080FEEB8.o(.rodata); @@ -1183,7 +1183,7 @@ SECTIONS { data/map/tileset_headers.o(.rodata); data/map/metatile_headers.o(.rodata); data/map/map_headers.o(.rodata); - src/textbox.o(.rodata); + src/message.o(.rodata); data/const/manager/manager1.o(.rodata); data/const/manager/manager3.o(.rodata); data/const/manager/manager4.o(.rodata); @@ -1737,7 +1737,7 @@ SECTIONS { src/gba/m4a.o(.rodata); data/sound/voicegroups.o(.rodata); data/sound/programmable_wave_samples.o(.rodata); - src/audio.o(.rodata); + src/sound.o(.rodata); data/sound/direct_sound_samples.o(.rodata); data/sound/sounds.o(.rodata); src/eeprom.o(.rodata); diff --git a/src/code_0808091C.c b/src/code_0808091C.c index 51e23169..fd82dfa6 100644 --- a/src/code_0808091C.c +++ b/src/code_0808091C.c @@ -2,7 +2,7 @@ #include "entity.h" #include "structures.h" #include "functions.h" -#include "overworld.h" +#include "game.h" extern void sub_08080BC4(void); diff --git a/src/code_080A29BC.c b/src/code_080A29BC.c deleted file mode 100644 index 17ea28b0..00000000 --- a/src/code_080A29BC.c +++ /dev/null @@ -1,58 +0,0 @@ -#include "global.h" -#include "entity.h" -#include "room.h" -#include "object.h" - -void sub_080A29C8(s32 xOff, s32 yOff, u32 layer) { - Entity* pEVar1; - - pEVar1 = CreateObject(SPECIAL_FX, 2, 0); - if (pEVar1 != NULL) { - pEVar1->x.HALF.HI = gRoomControls.roomOriginX + xOff; - pEVar1->y.HALF.HI = gRoomControls.roomOriginY + yOff; - pEVar1->collisionLayer = layer; - } -} - -void sub_080A29FC(Entity* parent) { - CreateFx(parent, FX_DASH, 0); -} - -void sub_080A2A08(Entity* parent) { - CreateFx(parent, FX_6, 0); -} - -void sub_080A2A14(Entity* parent) { - CreateFx(parent, FX_WATER_SPLASH, 0); -} - -Entity* sub_080A2A20(Entity* parent, u32 form, u32 parameter) { - Entity* pEVar1; - - pEVar1 = CreateObjectWithParent(parent, GROUND_ITEM, form, parameter); - if (pEVar1 != NULL) { - pEVar1->actionDelay = 5; - } - return pEVar1; -} - -Entity* sub_080A2A3C(Entity* parent, u32 form, u32 subtype, u32 param_4) { - Entity* ent; - - ent = CreateObjectWithParent(parent, GROUND_ITEM, form, subtype); - if (ent != NULL) { - ent->actionDelay = 5; - *(u32*)(&ent->field_0x86) = param_4; - } - return ent; -} - -Entity* sub_080A2A64(Entity* parent) { - Entity* pEVar1; - - pEVar1 = CreateFx(parent, FX_SPARKLE2, 0); - if (pEVar1 != NULL) { - pEVar1->spritePriority.b0 = 7; - } - return pEVar1; -} diff --git a/src/collision.c b/src/collision.c index db07ec77..d39cb4a2 100644 --- a/src/collision.c +++ b/src/collision.c @@ -7,7 +7,7 @@ #include "functions.h" #include "enemy.h" #include "object.h" -#include "overworld.h" +#include "game.h" extern u8 gCollidableCount; extern u8 gUnk_080B3740[]; diff --git a/src/coord.c b/src/coord.c index b9209b69..87108481 100644 --- a/src/coord.c +++ b/src/coord.c @@ -3,7 +3,7 @@ #include "player.h" #include "coord.h" #include "utils.h" -#include "audio.h" +#include "sound.h" #include "room.h" #include "functions.h" diff --git a/src/debugScreen.c b/src/debugScreen.c index 958791fa..b3300574 100644 --- a/src/debugScreen.c +++ b/src/debugScreen.c @@ -1,11 +1,11 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "utils.h" #include "functions.h" #include "main.h" #include "menu.h" #include "screen.h" -#include "textbox.h" +#include "message.h" extern void (*const gUnk_08109A30[])(); diff --git a/src/demoScreen.c b/src/demoScreen.c index efc3368d..e2d7c911 100644 --- a/src/demoScreen.c +++ b/src/demoScreen.c @@ -2,7 +2,7 @@ #include "functions.h" #include "main.h" #include "utils.h" -#include "textbox.h" +#include "message.h" #include "fileScreen.h" #include "screen.h" diff --git a/src/enemy/bladeTrap.c b/src/enemy/bladeTrap.c index ecad5157..ceea0b5d 100644 --- a/src/enemy/bladeTrap.c +++ b/src/enemy/bladeTrap.c @@ -1,4 +1,4 @@ -#include "audio.h" +#include "sound.h" #include "entity.h" #include "room.h" #include "functions.h" diff --git a/src/enemy/bobomb.c b/src/enemy/bobomb.c index 32e72b86..94ba6b9d 100644 --- a/src/enemy/bobomb.c +++ b/src/enemy/bobomb.c @@ -1,5 +1,5 @@ #include "asm.h" -#include "audio.h" +#include "sound.h" #include "enemy.h" #include "object.h" #include "functions.h" diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c index e6b544b3..1bff3860 100644 --- a/src/enemy/businessScrub.c +++ b/src/enemy/businessScrub.c @@ -1,10 +1,10 @@ #include "asm.h" #include "enemy.h" -#include "textbox.h" +#include "message.h" #include "save.h" #include "npc.h" #include "functions.h" -#include "overworld.h" +#include "game.h" extern Entity* sub_08049DF4(u32); extern bool32 sub_08056338(void); diff --git a/src/code_080300AC.c b/src/enemy/code_080300AC.c similarity index 100% rename from src/code_080300AC.c rename to src/enemy/code_080300AC.c diff --git a/src/enemy/doorMimic.c b/src/enemy/doorMimic.c index 299601f8..af328474 100644 --- a/src/enemy/doorMimic.c +++ b/src/enemy/doorMimic.c @@ -1,4 +1,4 @@ -#include "audio.h" +#include "sound.h" #include "enemy.h" #include "functions.h" diff --git a/src/enemy/likeLike.c b/src/enemy/likeLike.c index edab8bed..f0b08684 100644 --- a/src/enemy/likeLike.c +++ b/src/enemy/likeLike.c @@ -1,5 +1,5 @@ #include "enemy.h" -#include "textbox.h" +#include "message.h" #include "save.h" #include "object.h" #include "functions.h" diff --git a/src/enemy/octorokBoss.c b/src/enemy/octorokBoss.c index 1d1c6ab3..b6e207d3 100644 --- a/src/enemy/octorokBoss.c +++ b/src/enemy/octorokBoss.c @@ -2,7 +2,7 @@ #include "functions.h" #include "object.h" #include "projectile.h" -#include "overworld.h" +#include "game.h" extern void sub_08078AC0(u32, u32, u32); extern u32 GetRandomByWeight(const u8*); diff --git a/src/enemy/pesto.c b/src/enemy/pesto.c index 73bc1509..676ecfcf 100644 --- a/src/enemy/pesto.c +++ b/src/enemy/pesto.c @@ -1,6 +1,6 @@ #include "enemy.h" #include "object.h" -#include "overworld.h" +#include "game.h" #include "functions.h" #include "save.h" diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c index 351c56a1..7aacbee9 100644 --- a/src/enemy/rupeeLike.c +++ b/src/enemy/rupeeLike.c @@ -1,6 +1,6 @@ #include "global.h" #include "asm.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "enemy.h" #include "object.h" diff --git a/src/enemy/vaatiTransfiguredEye.c b/src/enemy/vaatiTransfiguredEye.c index f43e6290..67e795ac 100644 --- a/src/enemy/vaatiTransfiguredEye.c +++ b/src/enemy/vaatiTransfiguredEye.c @@ -1,6 +1,6 @@ #include "entity.h" #include "enemy.h" -#include "textbox.h" +#include "message.h" #include "coord.h" #include "functions.h" diff --git a/src/enemy/vaatiWrath.c b/src/enemy/vaatiWrath.c index 49049925..23e49183 100644 --- a/src/enemy/vaatiWrath.c +++ b/src/enemy/vaatiWrath.c @@ -1,6 +1,6 @@ #include "enemy.h" #include "object.h" -#include "textbox.h" +#include "message.h" #include "functions.h" #include "save.h" #include "screen.h" diff --git a/src/entity.c b/src/entity.c index a2d4085f..2902c057 100644 --- a/src/entity.c +++ b/src/entity.c @@ -2,7 +2,7 @@ #include "utils.h" #include "functions.h" #include "area.h" -#include "textbox.h" +#include "message.h" #include "npc.h" extern u8 gUnk_081091F8[]; diff --git a/src/ezloNag.c b/src/ezloNag.c index e0edff23..addcacd2 100644 --- a/src/ezloNag.c +++ b/src/ezloNag.c @@ -1,6 +1,6 @@ #include "global.h" -#include "audio.h" -#include "textbox.h" +#include "sound.h" +#include "message.h" typedef struct { s8 unk0; diff --git a/src/fileScreen.c b/src/fileScreen.c index ab3c3729..8d221ccd 100644 --- a/src/fileScreen.c +++ b/src/fileScreen.c @@ -3,7 +3,7 @@ #include "utils.h" #include "screen.h" #include "menu.h" -#include "textbox.h" +#include "message.h" #include "object.h" #include "functions.h" diff --git a/src/overworld.c b/src/game.c similarity index 99% rename from src/overworld.c rename to src/game.c index cc70b283..72fd56c0 100644 --- a/src/overworld.c +++ b/src/game.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "screen.h" #include "entity.h" #include "player.h" @@ -12,8 +12,8 @@ #include "menu.h" #include "functions.h" #include "area.h" -#include "textbox.h" -#include "overworld.h" +#include "message.h" +#include "game.h" extern u32 gUnk_03003FC0; diff --git a/src/interrupts.c b/src/interrupts.c index 72022c22..253c0aa0 100644 --- a/src/interrupts.c +++ b/src/interrupts.c @@ -1,10 +1,10 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "main.h" #include "player.h" #include "structures.h" #include "save.h" -#include "textbox.h" +#include "message.h" #include "functions.h" #include "screen.h" #include "gba/m4a.h" diff --git a/src/intro.c b/src/intro.c index 30aad962..c9eb0f73 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1,10 +1,10 @@ -#include "audio.h" +#include "sound.h" #include "main.h" #include "entity.h" #include "utils.h" #include "screen.h" #include "object.h" -#include "textbox.h" +#include "message.h" #include "functions.h" typedef struct { diff --git a/src/item/itemBomb.c b/src/item/itemBomb.c index 0ed4d65a..c0ce310c 100644 --- a/src/item/itemBomb.c +++ b/src/item/itemBomb.c @@ -1,6 +1,6 @@ #include "item.h" #include "coord.h" -#include "audio.h" +#include "sound.h" #include "functions.h" extern void (*const gUnk_0811BD98[])(ItemBehavior*, u32); diff --git a/src/item/itemLantern.c b/src/item/itemLantern.c index 88245ad8..9399ef1b 100644 --- a/src/item/itemLantern.c +++ b/src/item/itemLantern.c @@ -1,6 +1,6 @@ #include "item.h" #include "functions.h" -#include "audio.h" +#include "sound.h" #include "object.h" extern void (*const gUnk_0811BD68[])(ItemBehavior*, u32); diff --git a/src/item/itemMoleMitts.c b/src/item/itemMoleMitts.c index 82fbecac..9bce54e5 100644 --- a/src/item/itemMoleMitts.c +++ b/src/item/itemMoleMitts.c @@ -1,7 +1,7 @@ #include "item.h" #include "functions.h" -#include "audio.h" +#include "sound.h" extern void (*const gUnk_0811BE04[])(ItemBehavior*, u32); diff --git a/src/item/itemOcarina.c b/src/item/itemOcarina.c index 0ea670a5..5913c477 100644 --- a/src/item/itemOcarina.c +++ b/src/item/itemOcarina.c @@ -1,5 +1,5 @@ #include "item.h" -#include "audio.h" +#include "sound.h" #include "functions.h" extern void (*const gOcarinaStates[4])(ItemBehavior*, u32); diff --git a/src/item/itemPegasusBoots.c b/src/item/itemPegasusBoots.c index e60d820c..cf2bd6ac 100644 --- a/src/item/itemPegasusBoots.c +++ b/src/item/itemPegasusBoots.c @@ -1,6 +1,6 @@ #include "asm.h" #include "item.h" -#include "audio.h" +#include "sound.h" #include "functions.h" #include "effects.h" diff --git a/src/item/itemRocsCape.c b/src/item/itemRocsCape.c index 1e649198..cad38c43 100644 --- a/src/item/itemRocsCape.c +++ b/src/item/itemRocsCape.c @@ -1,5 +1,5 @@ #include "item.h" -#include "audio.h" +#include "sound.h" #include "functions.h" void sub_08076758(ItemBehavior*, u32); diff --git a/src/item/itemSword.c b/src/item/itemSword.c index fda041fb..773403fa 100644 --- a/src/item/itemSword.c +++ b/src/item/itemSword.c @@ -1,6 +1,6 @@ #include "item.h" #include "functions.h" -#include "audio.h" +#include "sound.h" #include "object.h" extern void (*const gUnk_0811BD44[])(ItemBehavior*, u32); diff --git a/src/main.c b/src/main.c index 6052ad10..9cf1eafb 100644 --- a/src/main.c +++ b/src/main.c @@ -1,10 +1,10 @@ -#include "audio.h" +#include "sound.h" #include "functions.h" #include "main.h" #include "screen.h" #include "utils.h" #include "save.h" -#include "textbox.h" +#include "message.h" #include "interrupts.h" extern u32 gRand; diff --git a/src/manager/manager10.c b/src/manager/manager10.c index 7b8460e0..adfbf44c 100644 --- a/src/manager/manager10.c +++ b/src/manager/manager10.c @@ -3,7 +3,7 @@ #include "manager.h" #include "room.h" #include "area.h" -#include "audio.h" +#include "sound.h" #include "screen.h" #include "utils.h" #include "fileScreen.h" diff --git a/src/manager/manager15.c b/src/manager/manager15.c index 8dc10a8f..c23c24fd 100644 --- a/src/manager/manager15.c +++ b/src/manager/manager15.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "flags.h" #include "screen.h" #include "manager.h" diff --git a/src/manager/manager23.c b/src/manager/manager23.c index 494018a4..4fd43d8a 100644 --- a/src/manager/manager23.c +++ b/src/manager/manager23.c @@ -4,7 +4,7 @@ #include "functions.h" #include "flags.h" #include "object.h" -#include "overworld.h" +#include "game.h" extern void (*const gUnk_08108CCC[])(Manager*); diff --git a/src/manager/manager24.c b/src/manager/manager24.c index e1a9ecee..1f200d47 100644 --- a/src/manager/manager24.c +++ b/src/manager/manager24.c @@ -1,8 +1,8 @@ #include "entity.h" #include "functions.h" #include "flags.h" -#include "audio.h" -#include "overworld.h" +#include "sound.h" +#include "game.h" #include "object.h" extern void (*const gUnk_08108CDC[])(Manager24*); diff --git a/src/manager/manager27.c b/src/manager/manager27.c index 1addc549..a8e66939 100644 --- a/src/manager/manager27.c +++ b/src/manager/manager27.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "flags.h" #include "functions.h" diff --git a/src/manager/manager2E.c b/src/manager/manager2E.c index 7dbb3aa5..1bfc410b 100644 --- a/src/manager/manager2E.c +++ b/src/manager/manager2E.c @@ -3,7 +3,7 @@ #include "manager.h" #include "flags.h" #include "functions.h" -#include "audio.h" +#include "sound.h" typedef struct { Manager manager; diff --git a/src/manager/manager3.c b/src/manager/manager3.c index b4554896..b31a3f1c 100644 --- a/src/manager/manager3.c +++ b/src/manager/manager3.c @@ -5,7 +5,7 @@ #include "area.h" #include "room.h" #include "player.h" -#include "audio.h" +#include "sound.h" #include "object.h" // Facilitates the usage of minish portals. diff --git a/src/manager/manager30.c b/src/manager/manager30.c index 307884ea..ec5f9a52 100644 --- a/src/manager/manager30.c +++ b/src/manager/manager30.c @@ -1,6 +1,6 @@ #include "global.h" #include "asm.h" -#include "audio.h" +#include "sound.h" #include "manager.h" #include "flags.h" #include "functions.h" diff --git a/src/manager/manager32.c b/src/manager/manager32.c index 4aec05ba..1e6580d8 100644 --- a/src/manager/manager32.c +++ b/src/manager/manager32.c @@ -4,7 +4,7 @@ #include "functions.h" #include "area.h" #include "utils.h" -#include "overworld.h" +#include "game.h" typedef struct { Manager manager; diff --git a/src/manager/manager33.c b/src/manager/manager33.c index b0c7fa29..63f3c533 100644 --- a/src/manager/manager33.c +++ b/src/manager/manager33.c @@ -1,7 +1,7 @@ #include "manager.h" #include "room.h" #include "player.h" -#include "audio.h" +#include "sound.h" #include "object.h" void Manager33_Main(Manager* this) { diff --git a/src/manager/manager34.c b/src/manager/manager34.c index a3f83418..e811aaea 100644 --- a/src/manager/manager34.c +++ b/src/manager/manager34.c @@ -1,7 +1,7 @@ #include "manager.h" #include "structures.h" #include "functions.h" -#include "audio.h" +#include "sound.h" typedef struct { Manager manager; diff --git a/src/manager/manager36.c b/src/manager/manager36.c index a0ab4a62..ca9c5c24 100644 --- a/src/manager/manager36.c +++ b/src/manager/manager36.c @@ -1,5 +1,5 @@ #include "manager.h" -#include "audio.h" +#include "sound.h" #include "script.h" typedef struct { diff --git a/src/manager/manager37.c b/src/manager/manager37.c index 0258dee6..8140ac22 100644 --- a/src/manager/manager37.c +++ b/src/manager/manager37.c @@ -2,8 +2,8 @@ #include "structures.h" #include "functions.h" #include "flags.h" -#include "textbox.h" -#include "audio.h" +#include "message.h" +#include "sound.h" #include "save.h" #include "object.h" #include "area.h" diff --git a/src/manager/manager39.c b/src/manager/manager39.c index c3795422..bf69d08a 100644 --- a/src/manager/manager39.c +++ b/src/manager/manager39.c @@ -2,9 +2,9 @@ #include "manager.h" #include "screen.h" #include "area.h" -#include "textbox.h" +#include "message.h" #include "utils.h" -#include "overworld.h" +#include "game.h" #include "functions.h" typedef struct { diff --git a/src/manager/manager5.c b/src/manager/manager5.c index bc9293b7..59473ab7 100644 --- a/src/manager/manager5.c +++ b/src/manager/manager5.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "manager.h" #include "flags.h" #include "functions.h" diff --git a/src/manager/managerB.c b/src/manager/managerB.c index 4f9cbdb6..9bf28b87 100644 --- a/src/manager/managerB.c +++ b/src/manager/managerB.c @@ -4,7 +4,7 @@ #include "room.h" #include "area.h" #include "utils.h" -#include "audio.h" +#include "sound.h" /* * Manager B is used to create fights: diff --git a/src/manager/managerC.c b/src/manager/managerC.c index 1dae3225..8f467f8e 100644 --- a/src/manager/managerC.c +++ b/src/manager/managerC.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "manager.h" #include "flags.h" #include "structures.h" diff --git a/src/manager/managerE.c b/src/manager/managerE.c index b1651333..e11c664a 100644 --- a/src/manager/managerE.c +++ b/src/manager/managerE.c @@ -2,7 +2,7 @@ #include "manager.h" #include "flags.h" #include "room.h" -#include "audio.h" +#include "sound.h" #include "functions.h" void ManagerE_Main(ManagerE* this) { diff --git a/src/manager/managerF.c b/src/manager/managerF.c index 27c4e877..15fa53fa 100644 --- a/src/manager/managerF.c +++ b/src/manager/managerF.c @@ -1,12 +1,12 @@ #include "global.h" #include "manager.h" #include "flags.h" -#include "audio.h" +#include "sound.h" #include "room.h" #include "player.h" #include "functions.h" #include "area.h" -#include "textbox.h" +#include "message.h" #include "utils.h" #include "tiles.h" #include "object.h" diff --git a/src/textbox.c b/src/message.c similarity index 99% rename from src/textbox.c rename to src/message.c index f09ed255..3560df71 100644 --- a/src/textbox.c +++ b/src/message.c @@ -1,10 +1,10 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "asm.h" #include "room.h" #include "utils.h" #include "functions.h" -#include "textbox.h" +#include "message.h" #include "save.h" #define MESSAGE_ADVANCE_KEYS (A_BUTTON | B_BUTTON | DPAD_ANY | R_BUTTON) diff --git a/src/npc/beedle.c b/src/npc/beedle.c index 54eedff3..703773ff 100644 --- a/src/npc/beedle.c +++ b/src/npc/beedle.c @@ -1,10 +1,10 @@ #include "global.h" #include "entity.h" -#include "textbox.h" +#include "message.h" #include "room.h" #include "script.h" #include "npc.h" -#include "overworld.h" +#include "game.h" typedef struct { u32 unk_00; diff --git a/src/npc/bladeBrothers.c b/src/npc/bladeBrothers.c index 09eec8d5..d0620938 100644 --- a/src/npc/bladeBrothers.c +++ b/src/npc/bladeBrothers.c @@ -3,7 +3,7 @@ #include "flags.h" #include "player.h" #include "room.h" -#include "textbox.h" +#include "message.h" #include "save.h" #include "script.h" #include "npc.h" diff --git a/src/npc/brocco.c b/src/npc/brocco.c index 22c3dedb..b960237c 100644 --- a/src/npc/brocco.c +++ b/src/npc/brocco.c @@ -1,5 +1,5 @@ #include "entity.h" -#include "textbox.h" +#include "message.h" #include "save.h" #include "npc.h" diff --git a/src/npc/carlov.c b/src/npc/carlov.c index 25aa49ca..6fc9ad81 100644 --- a/src/npc/carlov.c +++ b/src/npc/carlov.c @@ -1,4 +1,4 @@ -#include "audio.h" +#include "sound.h" #include "entity.h" #include "room.h" #include "npc.h" diff --git a/src/npc/castleMaid.c b/src/npc/castleMaid.c index 75533301..cfd0dd9e 100644 --- a/src/npc/castleMaid.c +++ b/src/npc/castleMaid.c @@ -2,7 +2,7 @@ #include "script.h" #include "save.h" #include "flags.h" -#include "textbox.h" +#include "message.h" #include "npc.h" #include "manager.h" diff --git a/src/npc/castorWildsStatue.c b/src/npc/castorWildsStatue.c index b621b86f..c0637c96 100644 --- a/src/npc/castorWildsStatue.c +++ b/src/npc/castorWildsStatue.c @@ -1,4 +1,4 @@ -#include "audio.h" +#include "sound.h" #include "entity.h" #include "script.h" #include "functions.h" diff --git a/src/npc/cat.c b/src/npc/cat.c index af53d0c3..09ec72d2 100644 --- a/src/npc/cat.c +++ b/src/npc/cat.c @@ -2,7 +2,7 @@ #include "entity.h" #include "functions.h" #include "save.h" -#include "textbox.h" +#include "message.h" #include "npc.h" extern void sub_08067C44(); diff --git a/src/npc/cow.c b/src/npc/cow.c index 0437072f..5f0bcc0a 100644 --- a/src/npc/cow.c +++ b/src/npc/cow.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "player.h" #include "npc.h" diff --git a/src/npc/dampe.c b/src/npc/dampe.c index d1009033..31eb8c7b 100644 --- a/src/npc/dampe.c +++ b/src/npc/dampe.c @@ -3,7 +3,7 @@ #include "player.h" #include "room.h" #include "flags.h" -#include "textbox.h" +#include "message.h" #include "npc.h" extern u16 gUnk_08113344[]; diff --git a/src/npc/epona.c b/src/npc/epona.c index 9a43655b..b4840bbe 100644 --- a/src/npc/epona.c +++ b/src/npc/epona.c @@ -1,7 +1,7 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" -#include "textbox.h" +#include "message.h" #include "npc.h" #include "functions.h" diff --git a/src/npc/ghostBrothers.c b/src/npc/ghostBrothers.c index 96130800..192509ff 100644 --- a/src/npc/ghostBrothers.c +++ b/src/npc/ghostBrothers.c @@ -2,7 +2,7 @@ #include "functions.h" #include "save.h" #include "screen.h" -#include "textbox.h" +#include "message.h" #include "npc.h" extern void (*const gUnk_0811017C[])(Entity*); diff --git a/src/npc/goron.c b/src/npc/goron.c index 144cc808..22a217ca 100644 --- a/src/npc/goron.c +++ b/src/npc/goron.c @@ -1,7 +1,7 @@ #include "global.h" #include "entity.h" #include "functions.h" -#include "textbox.h" +#include "message.h" #include "effects.h" #include "npc.h" diff --git a/src/npc/goronMerchant.c b/src/npc/goronMerchant.c index b00f3898..503717a6 100644 --- a/src/npc/goronMerchant.c +++ b/src/npc/goronMerchant.c @@ -1,7 +1,7 @@ #include "global.h" #include "entity.h" #include "functions.h" -#include "textbox.h" +#include "message.h" #include "flags.h" #include "save.h" #include "npc.h" diff --git a/src/npc/guard.c b/src/npc/guard.c index c456d95e..50f559c7 100644 --- a/src/npc/guard.c +++ b/src/npc/guard.c @@ -2,7 +2,7 @@ #include "entity.h" #include "player.h" #include "flags.h" -#include "textbox.h" +#include "message.h" #include "room.h" #include "script.h" #include "functions.h" diff --git a/src/npc/kid.c b/src/npc/kid.c index 1655b279..c5b5872a 100644 --- a/src/npc/kid.c +++ b/src/npc/kid.c @@ -1,5 +1,5 @@ #include "functions.h" -#include "textbox.h" +#include "message.h" #include "npc.h" extern void (*const gUnk_0810BE0C[])(Entity*); diff --git a/src/npc/librarians.c b/src/npc/librarians.c index 9b134e7a..95d1fd2f 100644 --- a/src/npc/librarians.c +++ b/src/npc/librarians.c @@ -2,8 +2,8 @@ #include "script.h" #include "functions.h" #include "flags.h" -#include "textbox.h" -#include "audio.h" +#include "message.h" +#include "sound.h" extern u16 gUnk_08113078[]; diff --git a/src/npc/mailbox.c b/src/npc/mailbox.c index 89901625..9dc5df22 100644 --- a/src/npc/mailbox.c +++ b/src/npc/mailbox.c @@ -1,6 +1,6 @@ #include "global.h" #include "entity.h" -#include "textbox.h" +#include "message.h" #include "effects.h" #include "npc.h" diff --git a/src/npc/marcy.c b/src/npc/marcy.c index ae888d2e..c187fd76 100644 --- a/src/npc/marcy.c +++ b/src/npc/marcy.c @@ -1,7 +1,7 @@ #include "entity.h" #include "functions.h" #include "flags.h" -#include "textbox.h" +#include "message.h" extern u16 gUnk_0810C34C[]; diff --git a/src/npc/minishEzlo.c b/src/npc/minishEzlo.c index 08e255bb..3ae0b056 100644 --- a/src/npc/minishEzlo.c +++ b/src/npc/minishEzlo.c @@ -1,6 +1,6 @@ #include "entity.h" #include "functions.h" -#include "audio.h" +#include "sound.h" extern SpriteLoadData gUnk_0810C48C; diff --git a/src/npc/ministerPotho.c b/src/npc/ministerPotho.c index eb38d37f..70e012eb 100644 --- a/src/npc/ministerPotho.c +++ b/src/npc/ministerPotho.c @@ -1,6 +1,6 @@ #include "entity.h" #include "flags.h" -#include "textbox.h" +#include "message.h" #include "npc.h" extern void (*const gUnk_08110644[])(Entity*); diff --git a/src/npc/mountainMinish.c b/src/npc/mountainMinish.c index 6616a452..ed76f1e1 100644 --- a/src/npc/mountainMinish.c +++ b/src/npc/mountainMinish.c @@ -1,7 +1,7 @@ #include "entity.h" #include "script.h" #include "functions.h" -#include "textbox.h" +#include "message.h" #include "flags.h" #include "npc.h" diff --git a/src/npc/mutoh.c b/src/npc/mutoh.c index 6106baf2..7d0751c7 100644 --- a/src/npc/mutoh.c +++ b/src/npc/mutoh.c @@ -2,7 +2,7 @@ #include "entity.h" #include "player.h" #include "flags.h" -#include "textbox.h" +#include "message.h" #include "npc.h" extern SpriteLoadData gUnk_08110C00; diff --git a/src/npc/npc23.c b/src/npc/npc23.c index 3fc78f64..df0786e4 100644 --- a/src/npc/npc23.c +++ b/src/npc/npc23.c @@ -2,7 +2,7 @@ #include "player.h" #include "structures.h" #include "functions.h" -#include "textbox.h" +#include "message.h" #include "npc.h" extern void (*const gUnk_081104C8[])(Entity*); diff --git a/src/npc/npc4E.c b/src/npc/npc4E.c index ca9f114b..23afefed 100644 --- a/src/npc/npc4E.c +++ b/src/npc/npc4E.c @@ -1,7 +1,7 @@ #include "global.h" #include "entity.h" #include "functions.h" -#include "audio.h" +#include "sound.h" #include "save.h" #include "flags.h" #include "object.h" diff --git a/src/npc/npc5.c b/src/npc/npc5.c index 350e1630..05d2c7e0 100644 --- a/src/npc/npc5.c +++ b/src/npc/npc5.c @@ -1,5 +1,5 @@ #include "functions.h" -#include "textbox.h" +#include "message.h" #include "npc.h" extern void (*const gUnk_0810AC1C[])(Entity*); diff --git a/src/npc/npc9.c b/src/npc/npc9.c index e4f879f9..df8cc07e 100644 --- a/src/npc/npc9.c +++ b/src/npc/npc9.c @@ -1,6 +1,6 @@ #include "global.h" #include "entity.h" -#include "textbox.h" +#include "message.h" #include "npc.h" extern void (*const gUnk_0810C290[])(Entity*); diff --git a/src/npc/picolyteBottle.c b/src/npc/picolyteBottle.c index fa39f1b9..962ca337 100644 --- a/src/npc/picolyteBottle.c +++ b/src/npc/picolyteBottle.c @@ -2,7 +2,7 @@ #include "script.h" #include "structures.h" #include "functions.h" -#include "textbox.h" +#include "message.h" #include "object.h" extern ScreenTransitionData gUnk_0813AD4C; diff --git a/src/npc/pina.c b/src/npc/pina.c index 179ee9d5..a36763ae 100644 --- a/src/npc/pina.c +++ b/src/npc/pina.c @@ -1,6 +1,6 @@ #include "entity.h" #include "functions.h" -#include "textbox.h" +#include "message.h" #include "save.h" #include "npc.h" diff --git a/src/npc/postman.c b/src/npc/postman.c index 79a12f3a..f72ec6d3 100644 --- a/src/npc/postman.c +++ b/src/npc/postman.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "functions.h" #include "npc.h" diff --git a/src/npc/simon.c b/src/npc/simon.c index 3fffc8cc..c5e40ce5 100644 --- a/src/npc/simon.c +++ b/src/npc/simon.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "room.h" #include "flags.h" diff --git a/src/npc/stamp.c b/src/npc/stamp.c index 193ae976..645fe1cc 100644 --- a/src/npc/stamp.c +++ b/src/npc/stamp.c @@ -1,6 +1,6 @@ #include "global.h" #include "entity.h" -#include "textbox.h" +#include "message.h" #include "functions.h" #include "effects.h" #include "npc.h" diff --git a/src/npc/stockwell.c b/src/npc/stockwell.c index e6beed01..40ad8706 100644 --- a/src/npc/stockwell.c +++ b/src/npc/stockwell.c @@ -1,7 +1,7 @@ #include "entity.h" #include "script.h" #include "room.h" -#include "textbox.h" +#include "message.h" #include "functions.h" #include "npc.h" diff --git a/src/npc/vaati.c b/src/npc/vaati.c index a550c1a8..9db43d90 100644 --- a/src/npc/vaati.c +++ b/src/npc/vaati.c @@ -1,7 +1,7 @@ #include "global.h" #include "entity.h" #include "script.h" -#include "audio.h" +#include "sound.h" #include "functions.h" extern void sub_08095CB0(Entity*); diff --git a/src/npc/windTribespeople.c b/src/npc/windTribespeople.c index 76b73c07..ff20d96d 100644 --- a/src/npc/windTribespeople.c +++ b/src/npc/windTribespeople.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "npc.h" diff --git a/src/npc/zelda.c b/src/npc/zelda.c index 296e27e0..b66b879a 100644 --- a/src/npc/zelda.c +++ b/src/npc/zelda.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "functions.h" #include "flags.h" diff --git a/src/object/archway.c b/src/object/archway.c index a8f659dc..e05095d5 100644 --- a/src/object/archway.c +++ b/src/object/archway.c @@ -1,5 +1,5 @@ #include "entity.h" -#include "overworld.h" +#include "game.h" void Archway(Entity* this) { if (this->action == 0) { diff --git a/src/object/book.c b/src/object/book.c index 9f3a5396..2ad7a40b 100644 --- a/src/object/book.c +++ b/src/object/book.c @@ -1,6 +1,6 @@ #include "object.h" #include "functions.h" -#include "textbox.h" +#include "message.h" extern void (*const BookActionFuncs[])(Entity*); extern s8 const gUnk_08123D94[]; diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c index a8868df2..433fb87e 100644 --- a/src/object/heartContainer.c +++ b/src/object/heartContainer.c @@ -1,4 +1,4 @@ -#include "audio.h" +#include "sound.h" #include "entity.h" #include "flags.h" #include "functions.h" diff --git a/src/object/houseDoorExterior.c b/src/object/houseDoorExterior.c index 137b19a5..77736989 100644 --- a/src/object/houseDoorExterior.c +++ b/src/object/houseDoorExterior.c @@ -3,7 +3,7 @@ #include "flags.h" #include "room.h" #include "script.h" -#include "audio.h" +#include "sound.h" #include "object.h" #include "functions.h" #include "npc.h" diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c index a7fa6987..d0874cba 100644 --- a/src/object/itemOnGround.c +++ b/src/object/itemOnGround.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "flags.h" #include "player.h" diff --git a/src/object/jailBars.c b/src/object/jailBars.c index da5844e5..84b44b61 100644 --- a/src/object/jailBars.c +++ b/src/object/jailBars.c @@ -2,7 +2,7 @@ #include "entity.h" #include "flags.h" #include "room.h" -#include "audio.h" +#include "sound.h" extern void sub_080A0960(Entity*, u32); extern void sub_0801AF18(u8*, u32, u32); diff --git a/src/object/lightableSwitch.c b/src/object/lightableSwitch.c index 14364188..639ffa17 100644 --- a/src/object/lightableSwitch.c +++ b/src/object/lightableSwitch.c @@ -1,6 +1,6 @@ #include "global.h" #include "asm.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "room.h" #include "flags.h" diff --git a/src/object/lockedDoor.c b/src/object/lockedDoor.c index b7fc357a..6f23a9d8 100644 --- a/src/object/lockedDoor.c +++ b/src/object/lockedDoor.c @@ -2,10 +2,10 @@ #include "asm.h" #include "entity.h" #include "flags.h" -#include "audio.h" +#include "sound.h" #include "functions.h" #include "effects.h" -#include "overworld.h" +#include "game.h" void sub_08083338(Entity*); void sub_080834B4(Entity*); diff --git a/src/object/metalDoor.c b/src/object/metalDoor.c index b8506bd8..ed89d276 100644 --- a/src/object/metalDoor.c +++ b/src/object/metalDoor.c @@ -3,7 +3,7 @@ #include "entity.h" #include "room.h" #include "flags.h" -#include "audio.h" +#include "sound.h" #include "functions.h" #include "effects.h" diff --git a/src/object/minishSizedArchway.c b/src/object/minishSizedArchway.c index ad109449..d087c8dc 100644 --- a/src/object/minishSizedArchway.c +++ b/src/object/minishSizedArchway.c @@ -1,5 +1,5 @@ #include "entity.h" -#include "overworld.h" +#include "game.h" void MinishSizedArchway(Entity* this) { if (this->action == 0) { diff --git a/src/object/minishSizedEntrance.c b/src/object/minishSizedEntrance.c index 5b891dd0..36d8e27a 100644 --- a/src/object/minishSizedEntrance.c +++ b/src/object/minishSizedEntrance.c @@ -1,5 +1,5 @@ #include "object.h" -#include "overworld.h" +#include "game.h" #include "functions.h" extern void (*const gUnk_08122254[])(Entity*); diff --git a/src/object/object2A.c b/src/object/object2A.c index 9e36b439..5ef7ba3e 100644 --- a/src/object/object2A.c +++ b/src/object/object2A.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "functions.h" #include "flags.h" diff --git a/src/object/object6A.c b/src/object/object6A.c index 456c28f2..13b93cce 100644 --- a/src/object/object6A.c +++ b/src/object/object6A.c @@ -2,7 +2,7 @@ #include "object.h" #include "area.h" #include "script.h" -#include "textbox.h" +#include "message.h" #include "functions.h" #include "screen.h" diff --git a/src/object/objectA.c b/src/object/objectA.c index 8578c1be..c302382e 100644 --- a/src/object/objectA.c +++ b/src/object/objectA.c @@ -4,7 +4,7 @@ #include "flags.h" #include "object.h" #include "functions.h" -#include "overworld.h" +#include "game.h" extern Hitbox gHitbox_2; diff --git a/src/object/octorokBossObject.c b/src/object/octorokBossObject.c index 0e1caf10..9a50f902 100644 --- a/src/object/octorokBossObject.c +++ b/src/object/octorokBossObject.c @@ -1,6 +1,6 @@ #include "functions.h" #include "object.h" -#include "overworld.h" +#include "game.h" extern void sub_0807B9B8(s32, s32, s32); diff --git a/src/object/pot.c b/src/object/pot.c index fae971d8..bf94a8be 100644 --- a/src/object/pot.c +++ b/src/object/pot.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "flags.h" #include "player.h" diff --git a/src/object/railtrack.c b/src/object/railtrack.c index 3344feaf..d92a9546 100644 --- a/src/object/railtrack.c +++ b/src/object/railtrack.c @@ -1,6 +1,6 @@ #include "global.h" #include "asm.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "room.h" #include "flags.h" diff --git a/src/object/swordsmanNewsletter.c b/src/object/swordsmanNewsletter.c index 1cca2ba0..d71fd1f8 100644 --- a/src/object/swordsmanNewsletter.c +++ b/src/object/swordsmanNewsletter.c @@ -1,6 +1,6 @@ #include "global.h" #include "entity.h" -#include "textbox.h" +#include "message.h" extern void sub_080787B4(Entity*); diff --git a/src/object/thoughtBubble.c b/src/object/thoughtBubble.c index e90cfbd7..57ba5cae 100644 --- a/src/object/thoughtBubble.c +++ b/src/object/thoughtBubble.c @@ -1,6 +1,6 @@ #include "global.h" #include "entity.h" -#include "audio.h" +#include "sound.h" extern void (*const ThoughtBubble_Behaviors[])(Entity*); diff --git a/src/object/treeHidingPortal.c b/src/object/treeHidingPortal.c index de23744d..d88f1c8e 100644 --- a/src/object/treeHidingPortal.c +++ b/src/object/treeHidingPortal.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "flags.h" #include "player.h" diff --git a/src/object/warpPoint.c b/src/object/warpPoint.c index 893ddddd..bfa09ca0 100644 --- a/src/object/warpPoint.c +++ b/src/object/warpPoint.c @@ -1,6 +1,6 @@ #include "global.h" #include "object.h" -#include "overworld.h" +#include "game.h" #include "functions.h" extern Hitbox gHitbox_1; diff --git a/src/object/windcrest.c b/src/object/windcrest.c index edbe2e75..15828253 100644 --- a/src/object/windcrest.c +++ b/src/object/windcrest.c @@ -1,5 +1,5 @@ #include "global.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "save.h" #include "script.h" diff --git a/src/player.c b/src/player.c index 12c3ac59..3a12ef17 100644 --- a/src/player.c +++ b/src/player.c @@ -1,9 +1,9 @@ #include "global.h" #include "asm.h" -#include "audio.h" +#include "sound.h" #include "entity.h" #include "player.h" -#include "textbox.h" +#include "message.h" #include "utils.h" #include "area.h" #include "item.h" @@ -11,7 +11,7 @@ #include "object.h" #include "functions.h" #include "hitbox.h" -#include "overworld.h" +#include "game.h" #include "screen.h" #include "main.h" diff --git a/src/playerItem/playerItem11.c b/src/playerItem/playerItem11.c index 242dc616..d8f3a3a7 100644 --- a/src/playerItem/playerItem11.c +++ b/src/playerItem/playerItem11.c @@ -2,7 +2,7 @@ #include "entity.h" #include "player.h" #include "functions.h" -#include "audio.h" +#include "sound.h" extern void sub_08078CD0(Entity*); extern void sub_08018FA0(Entity*); diff --git a/src/playerItem/playerItem12.c b/src/playerItem/playerItem12.c index 90eb82c2..f2fc617a 100644 --- a/src/playerItem/playerItem12.c +++ b/src/playerItem/playerItem12.c @@ -1,7 +1,7 @@ #include "asm.h" #include "entity.h" #include "functions.h" -#include "audio.h" +#include "sound.h" extern void (*const gUnk_0811B98C[])(Entity*); diff --git a/src/playerItem/playerItem14.c b/src/playerItem/playerItem14.c index f7e04fb3..e48fd10b 100644 --- a/src/playerItem/playerItem14.c +++ b/src/playerItem/playerItem14.c @@ -1,5 +1,5 @@ #include "entity.h" -#include "audio.h" +#include "sound.h" #include "functions.h" #include "effects.h" diff --git a/src/playerItem/playerItem15.c b/src/playerItem/playerItem15.c index 375e480f..16d0e35c 100644 --- a/src/playerItem/playerItem15.c +++ b/src/playerItem/playerItem15.c @@ -1,5 +1,5 @@ #include "entity.h" -#include "audio.h" +#include "sound.h" #include "coord.h" #include "functions.h" diff --git a/src/playerItem/playerItem3.c b/src/playerItem/playerItem3.c index 4de73cc2..beaf69a0 100644 --- a/src/playerItem/playerItem3.c +++ b/src/playerItem/playerItem3.c @@ -1,5 +1,5 @@ #include "entity.h" -#include "audio.h" +#include "sound.h" #include "functions.h" extern void (*const gUnk_080B77FC[])(Entity*); diff --git a/src/playerItem/playerItemPacciCane.c b/src/playerItem/playerItemPacciCane.c index 0b26c6fd..0e15c369 100644 --- a/src/playerItem/playerItemPacciCane.c +++ b/src/playerItem/playerItemPacciCane.c @@ -1,5 +1,5 @@ #include "entity.h" -#include "audio.h" +#include "sound.h" #include "functions.h" extern void (*const gUnk_0811B9D8[])(Entity*); diff --git a/src/playerItem/playerItemSwordBeam.c b/src/playerItem/playerItemSwordBeam.c index 24099003..0d72189d 100644 --- a/src/playerItem/playerItemSwordBeam.c +++ b/src/playerItem/playerItemSwordBeam.c @@ -2,7 +2,7 @@ #include "player.h" #include "coord.h" #include "functions.h" -#include "audio.h" +#include "sound.h" #include "effects.h" extern void (*const gUnk_080B43F4[])(Entity*); diff --git a/src/playerItemUtils.c b/src/playerItemUtils.c index 22772e62..be571896 100644 --- a/src/playerItemUtils.c +++ b/src/playerItemUtils.c @@ -2,9 +2,9 @@ #include "functions.h" #include "save.h" #include "utils.h" -#include "audio.h" +#include "sound.h" #include "flags.h" -#include "textbox.h" +#include "message.h" #include "object.h" #include "player.h" diff --git a/src/projectile/dirtBallProjectile.c b/src/projectile/dirtBallProjectile.c index 3723a0c7..a4a0d8e1 100644 --- a/src/projectile/dirtBallProjectile.c +++ b/src/projectile/dirtBallProjectile.c @@ -1,4 +1,4 @@ -#include "audio.h" +#include "sound.h" #include "entity.h" #include "enemy.h" #include "player.h" diff --git a/src/projectile/gyorgTail.c b/src/projectile/gyorgTail.c index 556087f7..c36bc6ad 100644 --- a/src/projectile/gyorgTail.c +++ b/src/projectile/gyorgTail.c @@ -1,7 +1,7 @@ #include "entity.h" #include "asm.h" #include "coord.h" -#include "audio.h" +#include "sound.h" #include "functions.h" extern u8 gEntCount; diff --git a/src/projectile/mandiblesProjectile.c b/src/projectile/mandiblesProjectile.c index f01fc3b2..e5b27454 100644 --- a/src/projectile/mandiblesProjectile.c +++ b/src/projectile/mandiblesProjectile.c @@ -2,7 +2,7 @@ #include "enemy.h" #include "coord.h" #include "functions.h" -#include "overworld.h" +#include "game.h" extern Entity* sub_08049DF4(u32); extern u32 sub_08049F1C(Entity*, Entity*, u32); diff --git a/src/projectile/mazaalEnergyBeam.c b/src/projectile/mazaalEnergyBeam.c index 8d617ba3..6e284ccf 100644 --- a/src/projectile/mazaalEnergyBeam.c +++ b/src/projectile/mazaalEnergyBeam.c @@ -1,5 +1,5 @@ #include "entity.h" -#include "audio.h" +#include "sound.h" #include "coord.h" extern void (*const MazaalEnergyBeam_Actions[])(Entity*); diff --git a/src/room.c b/src/room.c index dc8739d6..d752abfb 100644 --- a/src/room.c +++ b/src/room.c @@ -5,7 +5,7 @@ #include "functions.h" #include "utils.h" #include "object.h" -#include "overworld.h" +#include "game.h" extern void sub_0804B058(EntityData* dat); extern void sub_0801AC98(); diff --git a/src/roomInit.c b/src/roomInit.c index 9b9c8612..8c0557c2 100644 --- a/src/roomInit.c +++ b/src/roomInit.c @@ -5,7 +5,7 @@ #include "functions.h" -#include "audio.h" +#include "sound.h" #include "effects.h" #include "screen.h" #include "flags.h" @@ -13,7 +13,7 @@ #include "save.h" #include "area.h" -#include "overworld.h" +#include "game.h" #include "npc.h" diff --git a/src/save.c b/src/save.c index a5b8caea..aa401f10 100644 --- a/src/save.c +++ b/src/save.c @@ -1,10 +1,10 @@ #include "save.h" #include "gba/eeprom.h" -#include "audio.h" +#include "sound.h" #include "menu.h" #include "main.h" #include "functions.h" -#include "overworld.h" +#include "game.h" typedef struct SaveFileStatus { u16 checksum1; diff --git a/src/script.c b/src/script.c index 4e573495..b2648251 100644 --- a/src/script.c +++ b/src/script.c @@ -2,7 +2,7 @@ #include "main.h" #include "screen.h" #include "area.h" -#include "overworld.h" +#include "game.h" #include "object.h" #include "npc.h" diff --git a/src/code_0807CC3C.c b/src/scroll.c similarity index 74% rename from src/code_0807CC3C.c rename to src/scroll.c index de4f6e24..d6079438 100644 --- a/src/code_0807CC3C.c +++ b/src/scroll.c @@ -1,6 +1,5 @@ #include "global.h" -// these three functions use gRoomControls, maybe once that is understood better, these can be decompiled easier ASM_FUNC("asm/non_matching/code_0807CC3C/sub_0807D280.inc", void sub_0807D280(u32 unk_1, u32 unk_2)) ASM_FUNC("asm/non_matching/code_0807CC3C/sub_0807D46C.inc", void sub_0807D46C(u32 unk_1, u32 unk_2)) diff --git a/src/audio.c b/src/sound.c similarity index 99% rename from src/audio.c rename to src/sound.c index 998b00b4..32dc20c4 100644 --- a/src/audio.c +++ b/src/sound.c @@ -1,7 +1,7 @@ #include "global.h" #include "main.h" #include "gba/m4a.h" -#include "audio.h" +#include "sound.h" #include "utils.h" #define IS_BGM(song) ((song)-1 <= NUM_BGM - 1)