From 068b8a5b0811c0287a65d783c5d0886d6cea6f64 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 29 Oct 2021 13:57:15 -0400 Subject: [PATCH] B4580 and d0a70_len_4fe0 (#502) * func_80133A94 * animator stuff * add_anim_node and animator_node_update_model_transform * a bunch more * more * . * temp * create_mesh_animator * 2 mo * d0a70 funcs * more d0a70 * 2 mo * 1 + cleanup * 2 mo * cleanup * revert change to verbosity for splat * PR comments --- include/common_structs.h | 107 ++- include/functions.h | 18 +- include/map.h | 281 +----- include/model.h | 10 + include/npc.h | 543 +++++++++++ src/17D6A0.c | 1 - src/190B20.c | 10 +- src/1a1f0_len_5390.c | 2 +- src/20ec0_len_5040.c | 2 +- src/23680.c | 2 +- src/25AF0.c | 2 +- src/77480.c | 12 +- src/7E9D0.c | 6 +- src/B4580.c | 867 +++++++++++++++++- src/C50A0.c | 17 +- src/battle/partner/lakilester.c | 4 +- src/common/Dist3D.inc.c | 2 +- src/common/FadeBackgroundToBlack.inc.c | 2 +- src/common/FreeIcon.inc.c | 2 +- src/common/GetItemEntityPosition.inc.c | 2 +- src/common/GetModelPos.inc.c | 1 + src/common/GetSelectedMoveID.inc.c | 2 +- src/common/IsGameStatusUnkAA_1.inc.c | 2 +- src/common/IsSaveVar123.inc.c | 2 +- src/common/Set80218630_Var0.inc.c | 2 +- src/common/SetBackgroundAlpha.inc.c | 2 +- src/common/StartRumbleWithParams.inc.c | 2 +- src/common/UnkBattleFunc2.inc.c | 2 +- src/common/UnkFloatFunc.inc.c | 2 +- src/common/UnkFloatFunc2.inc.c | 2 +- src/d0a70_len_4fe0.c | 378 +++++++- src/e0b30_len_b80.c | 2 +- src/encounter_api.c | 2 +- src/entity/BlueWarpPipe.c | 2 +- src/entity/ItemBlock.c | 2 +- src/entity/WoodenCrate.c | 2 +- src/evt/cam_api.c | 318 +------ src/evt/map_api.c | 1 + src/evt/model_api.c | 243 +++++ src/evt/npc_api.c | 1 - src/evt/player_api.c | 1 + src/npc.c | 3 +- src/npc.h | 268 ------ src/sprite.c | 18 +- src/state_pause.c | 2 +- src/state_world.c | 3 + src/world/action/use_tweester.c | 2 +- src/world/area_dgb/dgb_02/C2EBA0.c | 1 - src/world/area_dgb/dgb_03/C31730.c | 1 - src/world/area_dgb/dgb_05/C3AA10.c | 1 - src/world/area_dgb/dgb_07/C3DBF0.c | 1 - src/world/area_dgb/dgb_08/C3FDB0.c | 2 - src/world/area_dgb/dgb_09/C46BE0.c | 1 - src/world/area_dgb/dgb_15/C4F510.c | 2 - src/world/area_dgb/dgb_16/C52540.c | 1 - src/world/area_dro/dro_01/95B7E0.c | 1 - src/world/area_flo/flo_10/CB96B0.c | 1 + src/world/area_mac/mac_01/805DD0.c | 101 +- src/world/common/AddPlayerHandsOffset.inc.c | 2 +- src/world/common/AwaitPlayerNearNpc.inc.c | 2 +- src/world/common/AwaitScriptComplete.inc.c | 2 +- src/world/common/Bandit_DropCoin.inc.c | 2 +- src/world/common/Call800E9894.inc.c | 2 +- .../common/Call800E98C4SyncStatusMenu.inc.c | 2 +- src/world/common/CamSetFOV.inc.c | 2 +- src/world/common/CheckItemFlags40.inc.c | 2 +- src/world/common/CheckPartnerFlags1000.inc.c | 2 +- src/world/common/DoesPlayerNeedSleep.inc.c | 2 +- src/world/common/GetCamVfov.inc.c | 2 +- .../GetCurrentCameraYawClamped180.inc.c | 2 +- src/world/common/GetCurrentFloor.inc.c | 2 +- .../common/GetEncounterEnemyIsOwner.inc.c | 2 +- src/world/common/GetEntityPosition.inc.c | 2 +- src/world/common/GetEntryPos.inc.c | 2 +- src/world/common/GetFloorCollider.inc.c | 2 +- src/world/common/GetGameStatus75.inc.c | 2 +- src/world/common/GetItemName.inc.c | 2 +- src/world/common/GetNpcCollisionHeight.inc.c | 2 +- src/world/common/GetPartnerCall800EB168.inc.c | 2 +- src/world/common/GetPlayerCoins.inc.c | 2 +- src/world/common/IsBerserkerEquipped.inc.c | 2 +- src/world/common/IsHammerMaxCharged.inc.c | 2 +- src/world/common/IsJumpMaxCharged.inc.c | 2 +- src/world/common/IsRightOnEquipped.inc.c | 2 +- src/world/common/LoadPartyImage.inc.c | 2 +- src/world/common/NpcJumpFunc.inc.c | 2 +- src/world/common/NpcJumpFunc2.inc.c | 2 +- src/world/common/NpcJumpFunc3.inc.c | 2 +- .../common/PartnerToggleAbilityScript.inc.c | 2 +- src/world/common/Set80151310.inc.c | 2 +- src/world/common/Set80151310_0.inc.c | 2 +- src/world/common/SetCamVfov.inc.c | 2 +- src/world/common/SetCamera0Flag1000.inc.c | 2 +- src/world/common/SetCamera0MoveFlag1.inc.c | 2 +- src/world/common/SetEntityFlags100000.inc.c | 2 +- src/world/common/SetEntityPosition.inc.c | 2 +- src/world/common/SetForeverForestFog.inc.c | 2 +- src/world/common/SetGameStatusUnk84_1.inc.c | 2 +- src/world/common/SetManyVars.inc.c | 2 +- src/world/common/SetNpcB5_3.inc.c | 2 +- src/world/common/SetOverrideFlags_40.inc.c | 2 +- .../SetPlayerStatusAnimFlags100000.inc.c | 2 +- src/world/common/SomeItemEntityFunc.inc.c | 2 +- src/world/common/SomeXYZFunc2.inc.c | 2 +- src/world/common/SpawnSunEffect.inc.c | 2 +- src/world/common/StarSpiritEffectFunc.inc.c | 2 +- src/world/common/StashVars.inc.c | 2 +- src/world/common/SyncStatusMenu.inc.c | 2 +- src/world/common/UnkCameraFunc.inc.c | 2 +- src/world/common/UnkDistFunc.inc.c | 2 +- src/world/common/UnkDurationCheck.inc.c | 2 +- src/world/common/UnkFloatFuncAbs.inc.c | 2 +- src/world/common/UnkFunc1.inc.c | 2 +- src/world/common/UnkFunc10.inc.c | 2 +- src/world/common/UnkFunc11.inc.c | 2 +- src/world/common/UnkFunc12.inc.c | 2 +- src/world/common/UnkFunc13.inc.c | 2 +- src/world/common/UnkFunc13_copy.inc.c | 51 -- src/world/common/UnkFunc14.inc.c | 2 +- src/world/common/UnkFunc14_copy.inc.c | 32 - src/world/common/UnkFunc15.inc.c | 2 +- src/world/common/UnkFunc15_copy.inc.c | 23 - src/world/common/UnkFunc16.inc.c | 2 +- src/world/common/UnkFunc16_copy.inc.c | 20 - src/world/common/UnkFunc17.inc.c | 2 +- src/world/common/UnkFunc18.inc.c | 2 +- src/world/common/UnkFunc19.inc.c | 2 +- src/world/common/UnkFunc20.inc.c | 2 +- src/world/common/UnkFunc21.inc.c | 2 +- src/world/common/UnkFunc22.inc.c | 2 +- src/world/common/UnkFunc23.inc.c | 2 +- src/world/common/UnkFunc24.inc.c | 2 +- src/world/common/UnkFunc25.inc.c | 2 +- src/world/common/UnkFunc26.inc.c | 2 +- src/world/common/UnkFunc27.inc.c | 2 +- src/world/common/UnkFunc31.inc.c | 6 +- src/world/common/UnkFunc32.inc.c | 2 +- src/world/common/UnkFunc35.inc.c | 2 +- src/world/common/UnkFunc36.inc.c | 2 +- src/world/common/UnkFunc39.inc.c | 2 +- src/world/common/UnkFunc4.inc.c | 2 +- src/world/common/UnkFunc40.inc.c | 2 +- src/world/common/UnkFunc41.inc.c | 2 +- src/world/common/UnkFunc42.inc.c | 2 +- src/world/common/UnkFunc43.inc.c | 2 +- src/world/common/UnkFunc44.inc.c | 2 +- src/world/common/UnkFunc45.inc.c | 2 +- src/world/common/UnkFunc46.inc.c | 2 +- src/world/common/UnkFunc47.inc.c | 2 +- src/world/common/UnkFunc48.inc.c | 2 +- src/world/common/UnkFunc49.inc.c | 2 +- src/world/common/UnkFunc5.inc.c | 2 +- src/world/common/UnkFunc50.inc.c | 2 +- src/world/common/UnkFunc51.inc.c | 2 +- src/world/common/UnkFunc6.inc.c | 2 +- src/world/common/UnkFunc7.inc.c | 2 +- src/world/common/UnkFunc8.inc.c | 2 +- src/world/common/UnkFunc9.inc.c | 2 +- src/world/common/UnkMoveFunc1.inc.c | 2 +- src/world/common/UnkMoveFunc2.inc.c | 2 +- src/world/common/UnkMoveFunc3.inc.c | 2 +- src/world/common/UnkMusicFunc.inc.c | 2 +- src/world/common/UnkNpcAIFunc1.inc.c | 2 +- src/world/common/UnkNpcAIFunc10.inc.c | 2 +- src/world/common/UnkNpcAIFunc11.inc.c | 2 +- src/world/common/UnkNpcAIFunc12.inc.c | 2 +- src/world/common/UnkNpcAIFunc13.inc.c | 2 +- src/world/common/UnkNpcAIFunc13_2.inc.c | 2 +- src/world/common/UnkNpcAIFunc14.inc.c | 2 +- src/world/common/UnkNpcAIFunc15.inc.c | 2 +- src/world/common/UnkNpcAIFunc16.inc.c | 2 +- src/world/common/UnkNpcAIFunc17.inc.c | 2 +- src/world/common/UnkNpcAIFunc18.inc.c | 2 +- src/world/common/UnkNpcAIFunc19.inc.c | 2 +- src/world/common/UnkNpcAIFunc1_copy.inc.c | 2 +- src/world/common/UnkNpcAIFunc2.inc.c | 2 +- src/world/common/UnkNpcAIFunc20.inc.c | 2 +- src/world/common/UnkNpcAIFunc21.inc.c | 2 +- src/world/common/UnkNpcAIFunc22.inc.c | 2 +- src/world/common/UnkNpcAIFunc23.inc.c | 2 +- src/world/common/UnkNpcAIFunc24.inc.c | 2 +- src/world/common/UnkNpcAIFunc25.inc.c | 2 +- src/world/common/UnkNpcAIFunc26.inc.c | 2 +- src/world/common/UnkNpcAIFunc27.inc.c | 2 +- src/world/common/UnkNpcAIFunc28.inc.c | 2 +- src/world/common/UnkNpcAIFunc29.inc.c | 2 +- src/world/common/UnkNpcAIFunc3.inc.c | 2 +- src/world/common/UnkNpcAIFunc30.inc.c | 2 +- src/world/common/UnkNpcAIFunc31.inc.c | 2 +- src/world/common/UnkNpcAIFunc32.inc.c | 2 +- src/world/common/UnkNpcAIFunc33.inc.c | 2 +- src/world/common/UnkNpcAIFunc34.inc.c | 2 +- src/world/common/UnkNpcAIFunc4.inc.c | 2 +- src/world/common/UnkNpcAIFunc5.inc.c | 2 +- src/world/common/UnkNpcAIFunc6.inc.c | 2 +- src/world/common/UnkNpcAIFunc7.inc.c | 2 +- src/world/common/UnkNpcAIFunc8.inc.c | 2 +- src/world/common/UnkNpcAIFunc9.inc.c | 2 +- .../common/UnkNpcDurationAnimationFunc.inc.c | 2 +- src/world/common/UnkNpcDurationFlagFunc.inc.c | 2 +- .../common/UnkNpcDurationFlagFunc2.inc.c | 2 +- .../common/UnkNpcDurationFlagFunc3.inc.c | 2 +- src/world/common/UnkPartnerFuncs.inc.c | 2 +- src/world/common/UnkPositionFunc.inc.c | 2 +- src/world/common/UnkQuizFunc.inc.c | 2 +- src/world/common/UnkRotatePlayer.inc.c | 2 +- src/world/common/UnkSetDurationFunc.inc.c | 2 +- src/world/common/UnkTexturePanFunc.inc.c | 2 +- src/world/common/UnkTexturePanFunc2.inc.c | 2 +- src/world/common/UnkYawFunc.inc.c | 2 +- src/world/common/UnsetCamera0Flag1000.inc.c | 2 +- src/world/common/UnsetCamera0MoveFlag1.inc.c | 2 +- src/world/common/foliage.inc.c | 3 +- src/world/common/reflection.inc.c | 2 +- .../common/set_script_owner_npc_anim.inc.c | 2 +- .../set_script_owner_npc_col_height.inc.c | 2 +- src/world/partner/bow.c | 2 +- src/world/partner/watt.c | 9 +- src/world/partners.c | 1 - src/world/world.c | 2 +- tools/build/configure.py | 2 +- ver/us/asm/nonmatchings/B4580/add_anim_node.s | 126 --- .../B4580/animator_make_identity.s | 20 - .../B4580/animator_make_mirrorX.s | 21 - .../B4580/animator_make_mirrorY.s | 21 - .../B4580/animator_make_mirrorZ.s | 21 - .../animator_node_update_model_transform.s | 131 --- .../B4580/animator_update_model_transforms.s | 59 -- .../nonmatchings/B4580/appendGfx_animator.s | 12 +- .../B4580/appendGfx_animator_node.s | 4 +- .../nonmatchings/B4580/clear_animator_flags.s | 16 - .../nonmatchings/B4580/clear_animator_list.s | 68 -- .../nonmatchings/B4580/create_mesh_animator.s | 90 -- .../B4580/create_model_animator.s | 87 -- .../B4580/delete_model_animator.s | 40 - .../B4580/delete_model_animator_node.s | 32 - .../B4580/delete_model_animator_nodes.s | 19 - .../B4580/disable_anim_model_fog.s | 8 - .../B4580/enable_anim_model_fog.s | 9 - .../nonmatchings/B4580/free_animator_nodes.s | 30 - ver/us/asm/nonmatchings/B4580/func_8011EA54.s | 120 --- .../B4580/get_anim_model_fog_color.s | 17 - .../B4580/get_anim_model_fog_distance.s | 11 - .../B4580/get_animator_child_for_model.s | 37 - .../B4580/get_animator_child_with_id.s | 37 - .../B4580/get_animator_node_with_id.s | 11 - .../B4580/is_anim_model_fog_enabled.s | 8 - .../B4580/load_mesh_animator_node.s | 28 - .../B4580/load_mesh_animator_tree.s | 54 -- .../B4580/load_model_animator_node.s | 113 --- .../B4580/load_model_animator_tree.s | 34 - .../nonmatchings/B4580/play_model_animation.s | 25 - .../play_model_animation_starting_from.s | 46 - .../B4580/reload_mesh_animator_node.s | 99 -- .../B4580/reload_mesh_animator_tree.s | 37 - .../B4580/render_animated_model.s | 64 -- .../render_animated_model_with_vertices.s | 66 -- .../nonmatchings/B4580/reset_animator_list.s | 40 - .../B4580/set_anim_model_fog_color.s | 14 - .../B4580/set_anim_model_fog_dist.s | 10 - .../nonmatchings/B4580/set_animator_flags.s | 15 - .../B4580/set_animator_tree_to_node_map.s | 17 - .../B4580/update_model_animator.s | 119 --- ver/us/asm/nonmatchings/C50A0/func_80133A94.s | 35 - .../nonmatchings/C50A0/item_entity_update.s | 13 +- .../d0a70_len_4fe0/func_8013A370.s | 7 - .../d0a70_len_4fe0/func_8013A37C.s | 93 -- .../d0a70_len_4fe0/func_8013A4D0.s | 88 -- .../d0a70_len_4fe0/func_8013A610.s | 22 - .../d0a70_len_4fe0/func_8013A650.s | 46 - .../d0a70_len_4fe0/func_8013A6E8.s | 11 - .../d0a70_len_4fe0/func_8013A704.s | 98 -- .../d0a70_len_4fe0/func_8013A888.s | 28 - .../d0a70_len_4fe0/func_8013A8E0.s | 22 - .../d0a70_len_4fe0/func_8013A920.s | 11 - .../d0a70_len_4fe0/func_8013A93C.s | 44 - .../d0a70_len_4fe0/func_8013A9C8.s | 12 - .../d0a70_len_4fe0/func_8013A9E8.s | 53 -- .../d0a70_len_4fe0/func_8013AF20.s | 26 - .../d0a70_len_4fe0/func_8013B0EC.s | 69 -- .../d0a70_len_4fe0/func_8013EE48.s | 12 - .../GetAnimatedNodePosition.s | 0 .../GetAnimatedNodeRotation.s | 0 .../GetAnimatedPositionByTreeIndex.s | 0 .../GetAnimatedRotationByTreeIndex.s | 0 .../SetAnimatedNodeFlags.s | 0 .../render_animated_models.s | 0 .../reset_model_animators.s | 0 .../mac_01/805DD0/func_802460E4_806964.s | 8 +- ver/us/splat.yaml | 1 + ver/us/symbol_addrs.txt | 30 +- ver/us/undefined_syms.txt | 28 +- 292 files changed, 2373 insertions(+), 3947 deletions(-) create mode 100644 include/npc.h create mode 100644 src/evt/model_api.c delete mode 100644 src/npc.h delete mode 100644 src/world/common/UnkFunc13_copy.inc.c delete mode 100644 src/world/common/UnkFunc14_copy.inc.c delete mode 100644 src/world/common/UnkFunc15_copy.inc.c delete mode 100644 src/world/common/UnkFunc16_copy.inc.c delete mode 100644 ver/us/asm/nonmatchings/B4580/add_anim_node.s delete mode 100644 ver/us/asm/nonmatchings/B4580/animator_make_identity.s delete mode 100644 ver/us/asm/nonmatchings/B4580/animator_make_mirrorX.s delete mode 100644 ver/us/asm/nonmatchings/B4580/animator_make_mirrorY.s delete mode 100644 ver/us/asm/nonmatchings/B4580/animator_make_mirrorZ.s delete mode 100644 ver/us/asm/nonmatchings/B4580/animator_node_update_model_transform.s delete mode 100644 ver/us/asm/nonmatchings/B4580/animator_update_model_transforms.s delete mode 100644 ver/us/asm/nonmatchings/B4580/clear_animator_flags.s delete mode 100644 ver/us/asm/nonmatchings/B4580/clear_animator_list.s delete mode 100644 ver/us/asm/nonmatchings/B4580/create_mesh_animator.s delete mode 100644 ver/us/asm/nonmatchings/B4580/create_model_animator.s delete mode 100644 ver/us/asm/nonmatchings/B4580/delete_model_animator.s delete mode 100644 ver/us/asm/nonmatchings/B4580/delete_model_animator_node.s delete mode 100644 ver/us/asm/nonmatchings/B4580/delete_model_animator_nodes.s delete mode 100644 ver/us/asm/nonmatchings/B4580/disable_anim_model_fog.s delete mode 100644 ver/us/asm/nonmatchings/B4580/enable_anim_model_fog.s delete mode 100644 ver/us/asm/nonmatchings/B4580/free_animator_nodes.s delete mode 100644 ver/us/asm/nonmatchings/B4580/func_8011EA54.s delete mode 100644 ver/us/asm/nonmatchings/B4580/get_anim_model_fog_color.s delete mode 100644 ver/us/asm/nonmatchings/B4580/get_anim_model_fog_distance.s delete mode 100644 ver/us/asm/nonmatchings/B4580/get_animator_child_for_model.s delete mode 100644 ver/us/asm/nonmatchings/B4580/get_animator_child_with_id.s delete mode 100644 ver/us/asm/nonmatchings/B4580/get_animator_node_with_id.s delete mode 100644 ver/us/asm/nonmatchings/B4580/is_anim_model_fog_enabled.s delete mode 100644 ver/us/asm/nonmatchings/B4580/load_mesh_animator_node.s delete mode 100644 ver/us/asm/nonmatchings/B4580/load_mesh_animator_tree.s delete mode 100644 ver/us/asm/nonmatchings/B4580/load_model_animator_node.s delete mode 100644 ver/us/asm/nonmatchings/B4580/load_model_animator_tree.s delete mode 100644 ver/us/asm/nonmatchings/B4580/play_model_animation.s delete mode 100644 ver/us/asm/nonmatchings/B4580/play_model_animation_starting_from.s delete mode 100644 ver/us/asm/nonmatchings/B4580/reload_mesh_animator_node.s delete mode 100644 ver/us/asm/nonmatchings/B4580/reload_mesh_animator_tree.s delete mode 100644 ver/us/asm/nonmatchings/B4580/render_animated_model.s delete mode 100644 ver/us/asm/nonmatchings/B4580/render_animated_model_with_vertices.s delete mode 100644 ver/us/asm/nonmatchings/B4580/reset_animator_list.s delete mode 100644 ver/us/asm/nonmatchings/B4580/set_anim_model_fog_color.s delete mode 100644 ver/us/asm/nonmatchings/B4580/set_anim_model_fog_dist.s delete mode 100644 ver/us/asm/nonmatchings/B4580/set_animator_flags.s delete mode 100644 ver/us/asm/nonmatchings/B4580/set_animator_tree_to_node_map.s delete mode 100644 ver/us/asm/nonmatchings/B4580/update_model_animator.s delete mode 100644 ver/us/asm/nonmatchings/C50A0/func_80133A94.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A370.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A37C.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A4D0.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A610.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A650.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A6E8.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A704.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A888.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A8E0.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A920.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A93C.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A9C8.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A9E8.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013AF20.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013B0EC.s delete mode 100644 ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013EE48.s rename ver/us/asm/nonmatchings/evt/{cam_api => model_api}/GetAnimatedNodePosition.s (100%) rename ver/us/asm/nonmatchings/evt/{cam_api => model_api}/GetAnimatedNodeRotation.s (100%) rename ver/us/asm/nonmatchings/evt/{cam_api => model_api}/GetAnimatedPositionByTreeIndex.s (100%) rename ver/us/asm/nonmatchings/evt/{cam_api => model_api}/GetAnimatedRotationByTreeIndex.s (100%) rename ver/us/asm/nonmatchings/evt/{cam_api => model_api}/SetAnimatedNodeFlags.s (100%) rename ver/us/asm/nonmatchings/evt/{cam_api => model_api}/render_animated_models.s (100%) rename ver/us/asm/nonmatchings/evt/{cam_api => model_api}/reset_model_animators.s (100%) diff --git a/include/common_structs.h b/include/common_structs.h index 1f1df02201..b63e6771ca 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -392,7 +392,7 @@ typedef struct Entity { /* 0x74 */ char unk_74[60]; /* 0xB0 */ float effectiveSize; /* 0xB4 */ char unk_B4[4]; - /* 0xB8 */ Matrix4s transformMatrix; + /* 0xB8 */ Mtx transformMatrix; } Entity; // size = 0xF8 typedef Entity* EntityList[MAX_ENTITIES]; @@ -715,7 +715,7 @@ typedef struct BattleStatus { /* 0x0A4 */ s8 cloudNineTurnsLeft; /* 0x0A5 */ s8 cloudNineDodgeChance; /* = 50% */ /* 0x0A6 */ char unk_A6[2]; - /* 0x0A8 */ s32 cloudNineEffect; + /* 0x0A8 */ struct EffectInstance* cloudNineEffect; /* 0x0AC */ char unk_AC; /* 0x0AD */ s8 unk_AD; /* 0x0AE */ s8 hammerLossTurns; @@ -838,23 +838,70 @@ typedef struct ModelDisplayData { /* 0x4 */ char unk_00[0x4]; } ModelDisplayData; // size = 0x8 -typedef struct AnimatedMesh { - /* 0x000 */ s32 flags; - /* 0x004 */ u8 renderMode; - /* 0x005 */ char unk_05[3]; - /* 0x008 */ u32* animation1; - /* 0x00C */ u32* animation2; - /* 0x010 */ char unk_10[136]; - /* 0x098 */ Matrix4s mtx; - /* 0x0D8 */ char unk_D8[500]; - /* 0x2CC */ s32 time; - /* 0x2D0 */ char unk_2D0[4]; - /* 0x2D4 */ s32 unk_2D4; - /* 0x2D8 */ s32 unk_2D8; - /* 0x2DC */ char unk_2DC[4]; -} AnimatedMesh; // size = 0x2E0 +typedef struct AnimatorNode { + /* 0x00 */ Gfx* displayList; + /* 0x04 */ struct AnimatorNode* children[0x20]; + /* 0x84 */ Vec3f basePos; // ? + /* 0x90 */ Vec3f pos; + /* 0x9C */ Vec3f rotation; + /* 0xA8 */ Vec3f scale; + /* 0xB4 */ Matrix4f mtx; + /* 0xF4 */ s16 flags; + /* 0xF6 */ s16 uniqueIndex; + /* 0xF8 */ s16 vertexStartOffset; + /* 0xFA */ char unk_FA[2]; + /* 0xFC */ union { + /* */ s32 modelID; + /* */ Vtx* vtxList; + /* */ } fcData; +} AnimatorNode; // size = 0x100 -typedef AnimatedMesh* AnimatedMeshList[MAX_ANIMATED_MESHES]; +typedef struct AnimatorNodeBlueprint { + /* 0x00 */ Gfx* displayList; + /* 0x04 */ Vec3f basePos; + /* 0x10 */ Vec3f rotation; + /* 0x1C */ char unk_1C[0x4]; +} AnimatorNodeBlueprint; // size = 0x20 + +typedef struct StaticAnimatorNode { + /* 0x00 */ Gfx* displayList; // can sometime point to a node??? + /* 0x04 */ Vec3s rot; /* range = -180,180 */ + /* 0x0A */ char unk_0A[0x2]; + /* 0x0C */ Vec3f pos; + /* 0x18 */ struct StaticAnimatorNode* sibling; + /* 0x1C */ struct StaticAnimatorNode* child; + /* 0x20 */ s16 vertexStartOffset; + /* 0x22 */ char unk_22[0x2]; + /* 0x24 */ Vtx* vtxList; + /* 0x28 */ s16 modelID; + /* 0x2A */ char unk_2A[0x2]; +} StaticAnimatorNode; // size = 0x2C + +typedef struct ModelAnimator { + /* 0x000 */ u32 flags; + /* 0x004 */ s8 renderMode; + /* 0x005 */ char unk_05[3]; + /* 0x008 */ s8* animReadPos; + /* 0x00C */ s8* savedReadPos; + /* 0x010 */ AnimatorNode* rootNode; + /* 0x014 */ u8 nextUniqueID; + /* 0x015 */ u8 staticNodeIDs[0x7A]; // ? + /* 0x08F */ char unk_08F[0x1]; + /* 0x090 */ f32 nextUpdateTime; + /* 0x094 */ f32 timeScale; + /* 0x098 */ Mtx mtx; + /* 0x0D8 */ Vtx** vertexArray; + /* 0x0DC */ s8* animationBuffer; + /* 0x0E0 */ StaticAnimatorNode* staticNodes[0x7A]; + /* 0x2C8 */ StaticAnimatorNode** staticRoot; + /* 0x2CC */ s32 treeIndexPos; + /* 0x2D0 */ s32 savedTreePos; + /* 0x2D4 */ void (*fpRenderCallback)(void); + /* 0x2D8 */ s32 renderCallbackArg; + /* 0x2DC */ char unk_2DC[4]; +} ModelAnimator; // size = 0x2E0 + +typedef ModelAnimator* AnimatedMeshList[MAX_ANIMATED_MESHES]; typedef struct PrintHandle { /* 0x000 */ char unk_00[16]; @@ -926,20 +973,6 @@ typedef struct ItemEntity { /* 0x58 */ s32 unk_58; } ItemEntity; // size = 0x5C -typedef struct StaticAnimatorNode { - /* 0x00 */ u32* displayList; // can sometime point to a node??? - /* 0x04 */ Vec3s rot; /* range = -180,180 */ - /* 0x0A */ char unk_0A[0x2]; - /* 0x0C */ Vec3f pos; - /* 0x18 */ struct StaticAnimatorNode* sibling; - /* 0x1C */ struct StaticAnimatorNode* child; - /* 0x20 */ s16 vertexStartOffset; - /* 0x22 */ char unk_22[0x2]; - /* 0x24 */ Vtx* vtxList; - /* 0x28 */ s16 modelID; - /* 0x2A */ char unk_2A[0x2]; -} StaticAnimatorNode; // size = 0x2C - typedef struct MessagePrintState { /* 0x000 */ s8* srcBuffer; /* 0x004 */ s16 printBufferPos; @@ -1220,7 +1253,7 @@ typedef struct Shadow { /* 0x1C */ Vec3f scale; /* 0x28 */ Vec3f rotation; /* 0x34 */ char unk_34[0x4]; - /* 0x38 */ Matrix4s transformMatrix; + /* 0x38 */ Mtx transformMatrix; } Shadow; // size = 0x78 typedef Shadow* ShadowList[MAX_SHADOWS]; @@ -1521,8 +1554,7 @@ typedef struct AnimatedModel { /* 0x04 */ Vec3f pos; /* 0x10 */ Vec3f rot; /* 0x1C */ Vec3f scale; - /* 0x28 */ Matrix4s* mtx; - /* 0x2C */ char unk_2C[60]; + /* 0x28 */ Mtx mtx; /* 0x68 */ u32 currentAnimData; /* 0x6C */ char unk_6C[4]; } AnimatedModel; // size = 0x70 @@ -1656,7 +1688,7 @@ typedef struct Actor { /* 0x207 */ s8 extraCoinBonus; /* 0x208 */ s8 unk_208; /* 0x209 */ char unk_209[3]; - /* 0x20C */ u32* statusTable; + /* 0x20C */ struct DictionaryEntry* statusTable; /* 0x210 */ s8 debuff; /* 0x211 */ s8 debuffDuration; /* 0x212 */ s8 staticStatus; /* 0B = yes */ @@ -2089,7 +2121,8 @@ typedef struct PartnerActionStatus { /* 0x00C */ s32 pressedButtons; /* 0x010 */ s32 heldButtons; /* 0x014 */ s8 inputDisabled; - /* 0x015 */ char unk_15[0x343]; + /* 0x015 */ char unk_15[0x3]; + /* 0x018 */ Npc unk_18; /* 0x358 */ s32 unk_358; /* 0x35C */ char unk_35C[0x4]; } PartnerActionStatus; // size = 0x360 diff --git a/include/functions.h b/include/functions.h index c88a489c41..bd5367efe7 100644 --- a/include/functions.h +++ b/include/functions.h @@ -22,8 +22,10 @@ OSThread* osGetActiveQueue(void); f32 signF(f32 val); void* heap_malloc(s32 size); +s32* _heap_malloc(HeapNode* head, s32 size); HeapNode* _heap_create(s32* addr, u32 size); s32 dma_copy(Addr romStart, Addr romEnd, void* vramDest); +void copy_matrix(Matrix4f src, Matrix4f dest); s32 _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap); @@ -88,7 +90,7 @@ s32 can_trigger_loading_zone(void); void func_802667F0(s32, Actor*, f32, f32, f32); void* general_heap_malloc(s32 size); -s32 general_heap_free(s32* size); +s32 general_heap_free(s32* data); void entity_Shadow_init(Shadow* entity); void entity_SaveBlock_idle(Entity* entity); @@ -128,7 +130,7 @@ void get_screen_coords(s32 camID, f32 x, f32 y, f32 z, s32* screenX, s32* screen void parent_collider_to_model(s32 colliderID, s16 modelIndex); void clone_model(u16 srcModelID, u16 newModelID); -Model* get_model_from_list_index(s32 listIndex); +struct Model* get_model_from_list_index(s32 listIndex); s32 get_model_list_index_from_tree_index(s32 treeIndex); s32 get_transform_group_index(s32); void get_model_center_and_size(u16 modelID, f32* centerX, f32* centerY, f32* centerZ, f32* sizeX, f32* sizeY, @@ -229,6 +231,7 @@ void init_virtual_entity_list(void); void init_model_animators(void); s32 heap_free(void* ptr); void btl_state_update_switch_to_partner(void); +void btl_set_popup_duration(s32 duration); void switch_to_partner(s32 arg0); void delete_trigger(Trigger* toDelete); @@ -258,8 +261,6 @@ s32 npc_test_move_taller_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32 s32 npc_test_move_simple_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32); s32 npc_test_move_complex_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32); -Npc* get_npc_by_index(s32 listIndex); - // Partner void partner_walking_update_player_tracking(Npc* partner); void partner_walking_update_motion(Npc* partner); @@ -283,7 +284,7 @@ void set_standard_shadow_scale(Shadow* shadow, f32 scale); void set_peach_shadow_scale(Shadow* shadow, f32 scale); void set_animation_rate(s32 actorID, s32 partIndex, f32 rate); void func_8011B7C0(u16, s32, s32); -AnimatedMesh* get_animator_by_index(s32 arg0); +ModelAnimator* get_animator_by_index(s32 arg0); void set_screen_overlay_params_front(u8, f32); void set_screen_overlay_params_back(s32, f32); void set_screen_overlay_alpha(s32, f32); @@ -309,7 +310,7 @@ void enable_entity_fog(void); void set_entity_fog_dist(s32 start, s32 end); void set_entity_fog_color(s32 r, s32 g, s32 b, s32 a); -ModelTransformGroup* get_transform_group(s32 index); +struct ModelTransformGroup* get_transform_group(s32 index); s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 facingAngleSign, s32 pickupVar); @@ -331,11 +332,7 @@ s32 enable_player_static_collisions(void); s32 check_input_jump(void); s32 check_input_hammer(void); -Npc* get_npc_safe(s32 npcId); -Npc* get_npc_unsafe(s32 npcId); Npc* resolve_npc(Evt* script, s32 npcIdOrPtr); -void set_npc_yaw(Npc* npcPtr, f32 angle); -void npc_move_heading(Npc* npc, f32 speed, f32 yaw); void enable_npc_blur(Npc* npc); void disable_npc_blur(Npc* npc); @@ -453,6 +450,7 @@ void state_drawUI_intro(void); void state_init_demo(void); void state_step_demo(void); void state_drawUI_demo(void); +void game_mode_set_fpDrawAuxUI(s32 i, void (*fn)(void)); void func_802B2078(void); diff --git a/include/map.h b/include/map.h index 16d52e7ca8..2ad6af3686 100644 --- a/include/map.h +++ b/include/map.h @@ -4,7 +4,7 @@ #include "common_structs.h" #include "enums.h" #include "script_api/map.h" -#include "model.h" +#include "npc.h" // TODO: consider moving Npc here @@ -13,7 +13,7 @@ typedef Vec4f EntryList[]; /// Fields other than main, entryList, entryCount, background, and tattle are initialised when the map loads. typedef struct MapConfig { - /* 0x00 */ ModelNode* modelTreeRoot; + /* 0x00 */ struct ModelNode* modelTreeRoot; /* 0x04 */ UNK_PTR collision; /* 0x08 */ UNK_PTR unk_08; /* 0x0C */ char unk_0C[4]; @@ -60,285 +60,8 @@ typedef struct Area { /* 0x0C */ char* name; ///< JP debug name. } Area; // size = 0x10 -typedef struct NpcBlueprint { - /* 0x00 */ s32 flags; - /* 0x04 */ s32 initialAnim; - /* 0x08 */ void (*onUpdate)(struct Npc*); - /* 0x0C */ void (*onRender)(struct Npc*); -} NpcBlueprint; // size = 0x10 - -typedef struct NpcAISettings { - /* 0x00 */ f32 moveSpeed; - /* 0x04 */ s32 moveTime; - /* 0x08 */ s32 waitTime; - /* 0x0C */ f32 alertRadius; - /* 0x10 */ X32 unk_10; - /* 0x14 */ s32 unk_14; - /* 0x18 */ f32 chaseSpeed; - /* 0x1C */ X32 unk_1C; // chase turn step? - /* 0x20 */ s32 unk_20; - /* 0x24 */ f32 chaseRadius; - /* 0x28 */ X32 unk_28; - /* 0x2C */ s32 unk_2C; // bool -} NpcAISettings; // size = 0x30 - -typedef struct NpcSettings { - /* 0x00 */ char unk_00[4]; - /* 0x04 */ s16 height; - /* 0x06 */ s16 radius; - /* 0x08 */ UNK_PTR otherAI; - /* 0x0C */ EvtSource* onInteract; - /* 0x10 */ EvtSource* ai; - /* 0x14 */ EvtSource* onHit; - /* 0x18 */ EvtSource* aux; - /* 0x1C */ EvtSource* onDefeat; - /* 0x20 */ s32 flags; - /* 0x24 */ char unk_24[4]; - /* 0x28 */ s16 level; - /* 0x2A */ s16 unk_2A; -} NpcSettings; // size = 0x2C - -typedef struct ItemDrop { - /* 0x00 */ s16 item; - /* 0x02 */ s16 weight; - /* 0x04 */ s16 unk_08; -} ItemDrop; // size = 0x06 - -/// @brief Describes heart/flower drop chances after defeating an Npc in the overworld. -/// -/// The algorithm for calculating the number of hearts/flowers from a StatDrop is: -/// - If current HP/FP > cutoff, drop 0. -/// - Roll generalChance. If it fails, drop 0. -/// - Roll chancePerAttempt attempts times. For each success, drop a heart/flower. -/// -/// StaticNpc holds a table of StatDrops for each stat (hearts, flowers). All are checked together -/// and the number of hearts/flowers to drop is the total number of successful attempts for each stat. -/// -/// Each heart/flower is worth 1 HP and 1 FP respectively, if picked up. -/// -/// cutoff, generalChance, and chancePerAttempt are short fixed-point percentage values. -/// That is, `F16(0)` is a 0% chance and `F16(100)` is a 100% chance. -typedef struct StatDrop { - /* 0x00 */ s16 cutoff; ///< % of max HP/FP. If current HP/FP > cutoff, no hearts/flowers can be dropped. - /* 0x02 */ s16 generalChance; ///< % chance for any hearts/flowers to be dropped at all from this StatDrop. - /* 0x04 */ s16 attempts; ///< Maximum number of hearts/flowers that can be dropped from this StatDrop. - /* 0x06 */ s16 chancePerAttempt; ///< % chance for a single heart/flower to be dropped from each attempt. -} StatDrop; // size = 0x08 - -#define NO_DROPS { { F16(100), F16(0), 0, F16(0) }, } - -#define STANDARD_HEART_DROPS(attempts) { \ - { F16(20), F16(70), attempts, F16(50) }, \ - { F16(30), F16(60), attempts, F16(50) }, \ - { F16(50), F16(50), attempts, F16(40) }, \ - { F16(80), F16(40), attempts, F16(40) }, \ - { F16(100), F16(30), attempts, F16(30) }, \ -} - -#define GENEROUS_HEART_DROPS(attempts) { \ - { F16(20), F16(80), attempts, F16(50) } \ - { F16(30), F16(70), attempts, F16(50) } \ - { F16(50), F16(60), attempts, F16(40) } \ - { F16(80), F16(50), attempts, F16(40) } \ - { F16(100), F16(40), attempts, F16(30) }, \ -} - -#define GENEROUS_WHEN_LOW_HEART_DROPS(attempts) { \ - { F16(20), F16(80), attempts, F16(60) }, \ - { F16(30), F16(70), attempts, F16(50) }, \ - { F16(50), F16(60), attempts, F16(50) }, \ - { F16(80), F16(50), attempts, F16(40) }, \ - { F16(100), F16(30), attempts, F16(30) }, \ -} - -#define STANDARD_FLOWER_DROPS(attempts) { \ - { F16(20), F16(50), attempts, F16(40) }, \ - { F16(30), F16(40), attempts, F16(40) }, \ - { F16(50), F16(40), attempts, F16(40) }, \ - { F16(80), F16(40), attempts, F16(40) }, \ - { F16(100), F16(30), attempts, F16(40) }, \ -} - -#define GENEROUS_WHEN_LOW_FLOWER_DROPS(attempts) { \ - { F16(20), F16(70), attempts, F16(50) }, \ - { F16(30), F16(60), attempts, F16(50) }, \ - { F16(50), F16(50), attempts, F16(40) }, \ - { F16(80), F16(40), attempts, F16(40) }, \ - { F16(100), F16(30), attempts, F16(40) }, \ -} - -#define REDUCED_FLOWER_DROPS(attempts) { \ - { F16(20), F16(40), attempts, F16(40) }, \ - { F16(30), F16(40), attempts, F16(40) }, \ - { F16(50), F16(40), attempts, F16(40) }, \ - { F16(80), F16(40), attempts, F16(40) }, \ - { F16(100), F16(30), attempts, F16(40) }, \ -} - -#define OVERRIDE_MOVEMENT_SPEED(speed) (speed * 32767) -#define NO_OVERRIDE_MOVEMENT_SPEED OVERRIDE_MOVEMENT_SPEED(-1) - -typedef struct EnemyDrops { - /* 0x00 */ s8 dropFlags; - /* 0x01 */ s8 itemDropChance; // % - /* 0x02 */ ItemDrop itemDrops[8]; - /* 0x32 */ StatDrop heartDrops[8]; - /* 0x72 */ StatDrop flowerDrops[8]; - /* 0xB2 */ s16 minCoinBonus; - /* 0xB4 */ s16 maxCoinBonus; - /* 0xB6 */ char unk_DE[2]; -} EnemyDrops; // size = 0xB8 - -typedef struct StaticNpc { - /* 0x000 */ s32 id; - /* 0x004 */ NpcSettings* settings; - /* 0x008 */ Vec3f pos; - /* 0x014 */ s32 flags; - /* 0x018 */ EvtSource* init; - /* 0x01C */ char unk_1C[8]; - /* 0x024 */ s32 yaw; - /* 0x028 */ s8 dropFlags; // TODO: use EnemyDrops (requires tons of map edits) - /* 0x029 */ s8 itemDropChance; // % - /* 0x02A */ ItemDrop itemDrops[8]; - /* 0x05A */ StatDrop heartDrops[8]; - /* 0x09A */ StatDrop flowerDrops[8]; - /* 0x0DA */ s16 minCoinBonus; - /* 0x0DC */ s16 maxCoinBonus; - /* 0x0E0 */ s32 movement[48]; // TODO: type - /* 0x1A0 */ struct { - /* 0x00 */ s32 idle; - /* 0x04 */ s32 walk; - /* 0x08 */ s32 run; - /* 0x0C */ s32 chase; - /* 0x10 */ s32 unk_10; - /* 0x14 */ s32 unk_14; - /* 0x18 */ s32 death; - /* 0x1C */ s32 hit; - /* 0x20 */ s32 unk_20; - /* 0x24 */ s32 unk_24; - /* 0x28 */ s32 unk_28; - /* 0x2C */ s32 unk_2C; - /* 0x30 */ s32 unk_30; - /* 0x34 */ s32 unk_34; - /* 0x38 */ s32 unk_38; - /* 0x3C */ s32 unk_3C; - } animations; - /* 0x1E0 */ char unk_1E0[8]; - /* 0x1E8 */ s32* extraAnimations; - /* 0x1EC */ s32 tattle; -} StaticNpc; // size = 0x1F0 - -enum TerritoryShape { SHAPE_CYLINDER, SHAPE_RECT }; - -typedef struct { - /* 0x00 */ s32 unk_00; - /* 0x04 */ enum TerritoryShape shape; - /* 0x08 */ s32 pointX; - /* 0x0C */ s32 pointZ; - /* 0x10 */ s32 sizeX; - /* 0x14 */ s32 sizeZ; - /* 0x18 */ f32 unk_18; - /* 0x1C */ s16 unk_1C; -} EnemyTerritoryThing; // size = 0x20 - -typedef struct { - /* 0x00 */ Vec3i point; - /* 0x0C */ s32 wanderSizeX; - /* 0x10 */ s32 wanderSizeZ; - /* 0x14 */ s32 moveSpeedOverride; - /* 0x18 */ enum TerritoryShape wanderShape; - /* 0x1C */ Vec3i detect; - /* 0x28 */ s32 detectSizeX; - /* 0x2C */ s32 detectSizeZ; - /* 0x30 */ enum TerritoryShape detectShape; - /* 0x34 */ s32 isFlying; -} EnemyTerritoryWander; // size = 0x38 - -typedef struct { - /* 0x00 */ s32 numPoints; - /* 0x04 */ Vec3i points[10]; - /* 0x7C */ s32 moveSpeedOverride; - /* 0x80 */ Vec3i detect; - /* 0x8C */ s32 detectSizeX; - /* 0x90 */ s32 detectSizeZ; - /* 0x94 */ enum TerritoryShape detectShape; - /* 0x98 */ s32 isFlying; -} EnemyTerritoryPatrol; // size = 0x9C - -typedef union { - EnemyTerritoryWander wander; - EnemyTerritoryPatrol patrol; - char PADDING[0xC0]; -} EnemyTerritory; // size = 0xC0 - -typedef struct Enemy { - /* 0x00 */ s32 flags; - /* 0x04 */ s8 encounterIndex; - /* 0x05 */ s8 encountered; - /* 0x06 */ u8 scriptGroup; /* scripts launched for this npc controller will be assigned this group */ - /* 0x07 */ s8 unk_07; - /* 0x08 */ s16 npcID; - /* 0x0A */ s16 spawnPos[3]; - /* 0x10 */ Vec3s unk_10; - /* 0x16 */ char unk_16[2]; - /* 0x18 */ struct NpcSettings* npcSettings; - /* 0x1C */ EvtSource* initBytecode; - /* 0x20 */ EvtSource* interactBytecode; - /* 0x24 */ EvtSource* aiBytecode; - /* 0x28 */ EvtSource* hitBytecode; - /* 0x2C */ EvtSource* auxBytecode; - /* 0x30 */ EvtSource* defeatBytecode; - /* 0x34 */ struct Evt* initScript; - /* 0x38 */ struct Evt* interactScript; - /* 0x3C */ struct Evt* aiScript; - /* 0x40 */ struct Evt* hitScript; - /* 0x44 */ struct Evt* auxScript; - /* 0x48 */ struct Evt* defeatScript; - /* 0x4C */ s32 initScriptID; - /* 0x50 */ s32 interactScriptID; - /* 0x54 */ s32 aiScriptID; - /* 0x58 */ s32 hitScriptID; - /* 0x5C */ s32 auxScriptID; - /* 0x60 */ s32 defeatScriptID; - /* 0x64 */ UNK_PTR unk_64; - /* 0x68 */ char unk_68[4]; - /* 0x6C */ s32 varTable[16]; - /* 0xAC */ char unk_AC[4]; - /* 0xB0 */ s32 unk_B0; - /* 0xB4 */ s8 unk_B4; - /* 0xB5 */ s8 unk_B5; - /* 0xB6 */ char unk_B6[2]; - /* 0xB8 */ EvtSource* unk_B8; // some bytecode - /* 0xBC */ struct Evt* unk_BC; // some script - /* 0xC0 */ s32 unk_C0; // some script ID - /* 0xC4 */ s32 unk_C4; - /* 0xC8 */ s32 unk_C8; - /* 0xCC */ s32* animList; - /* 0xD0 */ EnemyTerritory* territory; - /* 0xD4 */ EnemyDrops* drops; - /* 0xD8 */ u32 tattleMsg; - /* 0xDC */ char unk_DC[20]; -} Enemy; // size = 0xF0 - -/// Zero-terminated. -typedef struct { - /* 0x00 */ s32 npcCount; - /* 0x04 */ StaticNpc* npcs; - /* 0x08 */ s32 battle; -} NpcGroupList[]; // size = 0x0C - -typedef struct QuizRequirements { - s32 unk_00; - s32 unk_04; -} QuizRequirements; // size = 0x8 - -#define NPC_GROUP(npcs, battle) { sizeof(npcs) / sizeof(StaticNpc), (StaticNpc*) &npcs, battle } - -Enemy* get_enemy(s32 npcId); MapConfig* get_current_map_header(void); -s32 func_800490B4(EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, f32 arg3, s32 arg4); - /// Zero-terminated. extern Area gAreas[29]; diff --git a/include/model.h b/include/model.h index 10c88a1296..0243fb406b 100644 --- a/include/model.h +++ b/include/model.h @@ -138,4 +138,14 @@ typedef enum ShapeTypes { typedef ModelTreeInfo ModelTreeInfoList[0x200]; extern ModelTreeInfoList* mdl_currentModelTreeNodeInfo; +void update_model_animator_with_transform(s32 animatorID, Mtx* mtx); +s32 step_model_animator(ModelAnimator* animator); +void animator_update_model_transforms(ModelAnimator* animator, Mtx* rootTransform); +void render_animated_model(s32 animatorID, Mtx* rootTransform); +void animator_node_update_model_transform(ModelAnimator* animator, f32 (*flipMtx)[4], AnimatorNode* node, + Mtx* rootTransform); +void appendGfx_animator(ModelAnimator* animator); +void reload_mesh_animator_tree(ModelAnimator* animator); +s32 step_mesh_animator(ModelAnimator* animator); + #endif diff --git a/include/npc.h b/include/npc.h new file mode 100644 index 0000000000..c760e502a5 --- /dev/null +++ b/include/npc.h @@ -0,0 +1,543 @@ +#ifndef _NPC_H_ +#define _NPC_H_ + +#include "common_structs.h" +#include "enums.h" +#include "script_api/map.h" + +#define NO_DROPS { { F16(100), F16(0), 0, F16(0) }, } + +#define STANDARD_HEART_DROPS(attempts) { \ + { F16(20), F16(70), attempts, F16(50) }, \ + { F16(30), F16(60), attempts, F16(50) }, \ + { F16(50), F16(50), attempts, F16(40) }, \ + { F16(80), F16(40), attempts, F16(40) }, \ + { F16(100), F16(30), attempts, F16(30) }, \ +} + +#define GENEROUS_HEART_DROPS(attempts) { \ + { F16(20), F16(80), attempts, F16(50) } \ + { F16(30), F16(70), attempts, F16(50) } \ + { F16(50), F16(60), attempts, F16(40) } \ + { F16(80), F16(50), attempts, F16(40) } \ + { F16(100), F16(40), attempts, F16(30) }, \ +} + +#define GENEROUS_WHEN_LOW_HEART_DROPS(attempts) { \ + { F16(20), F16(80), attempts, F16(60) }, \ + { F16(30), F16(70), attempts, F16(50) }, \ + { F16(50), F16(60), attempts, F16(50) }, \ + { F16(80), F16(50), attempts, F16(40) }, \ + { F16(100), F16(30), attempts, F16(30) }, \ +} + +#define STANDARD_FLOWER_DROPS(attempts) { \ + { F16(20), F16(50), attempts, F16(40) }, \ + { F16(30), F16(40), attempts, F16(40) }, \ + { F16(50), F16(40), attempts, F16(40) }, \ + { F16(80), F16(40), attempts, F16(40) }, \ + { F16(100), F16(30), attempts, F16(40) }, \ +} + +#define GENEROUS_WHEN_LOW_FLOWER_DROPS(attempts) { \ + { F16(20), F16(70), attempts, F16(50) }, \ + { F16(30), F16(60), attempts, F16(50) }, \ + { F16(50), F16(50), attempts, F16(40) }, \ + { F16(80), F16(40), attempts, F16(40) }, \ + { F16(100), F16(30), attempts, F16(40) }, \ +} + +#define REDUCED_FLOWER_DROPS(attempts) { \ + { F16(20), F16(40), attempts, F16(40) }, \ + { F16(30), F16(40), attempts, F16(40) }, \ + { F16(50), F16(40), attempts, F16(40) }, \ + { F16(80), F16(40), attempts, F16(40) }, \ + { F16(100), F16(30), attempts, F16(40) }, \ +} + +#define OVERRIDE_MOVEMENT_SPEED(speed) (speed * 32767) +#define NO_OVERRIDE_MOVEMENT_SPEED OVERRIDE_MOVEMENT_SPEED(-1) + +typedef struct QuizRequirements { + s32 unk_00; + s32 unk_04; +} QuizRequirements; // size = 0x8 + +typedef struct NpcBlueprint { + /* 0x00 */ s32 flags; + /* 0x04 */ s32 initialAnim; + /* 0x08 */ void (*onUpdate)(struct Npc*); + /* 0x0C */ void (*onRender)(struct Npc*); +} NpcBlueprint; // size = 0x10 + +typedef struct NpcAISettings { + /* 0x00 */ f32 moveSpeed; + /* 0x04 */ s32 moveTime; + /* 0x08 */ s32 waitTime; + /* 0x0C */ f32 alertRadius; + /* 0x10 */ X32 unk_10; + /* 0x14 */ s32 unk_14; + /* 0x18 */ f32 chaseSpeed; + /* 0x1C */ X32 unk_1C; // chase turn step? + /* 0x20 */ s32 unk_20; + /* 0x24 */ f32 chaseRadius; + /* 0x28 */ X32 unk_28; + /* 0x2C */ s32 unk_2C; // bool +} NpcAISettings; // size = 0x30 + +typedef struct NpcSettings { + /* 0x00 */ char unk_00[4]; + /* 0x04 */ s16 height; + /* 0x06 */ s16 radius; + /* 0x08 */ UNK_PTR otherAI; + /* 0x0C */ EvtSource* onInteract; + /* 0x10 */ EvtSource* ai; + /* 0x14 */ EvtSource* onHit; + /* 0x18 */ EvtSource* aux; + /* 0x1C */ EvtSource* onDefeat; + /* 0x20 */ s32 flags; + /* 0x24 */ char unk_24[4]; + /* 0x28 */ s16 level; + /* 0x2A */ s16 unk_2A; +} NpcSettings; // size = 0x2C + +typedef struct ItemDrop { + /* 0x00 */ s16 item; + /* 0x02 */ s16 weight; + /* 0x04 */ s16 unk_08; +} ItemDrop; // size = 0x06 + +/// @brief Describes heart/flower drop chances after defeating an Npc in the overworld. +/// +/// The algorithm for calculating the number of hearts/flowers from a StatDrop is: +/// - If current HP/FP > cutoff, drop 0. +/// - Roll generalChance. If it fails, drop 0. +/// - Roll chancePerAttempt attempts times. For each success, drop a heart/flower. +/// +/// StaticNpc holds a table of StatDrops for each stat (hearts, flowers). All are checked together +/// and the number of hearts/flowers to drop is the total number of successful attempts for each stat. +/// +/// Each heart/flower is worth 1 HP and 1 FP respectively, if picked up. +/// +/// cutoff, generalChance, and chancePerAttempt are short fixed-point percentage values. +/// That is, `F16(0)` is a 0% chance and `F16(100)` is a 100% chance. +typedef struct StatDrop { + /* 0x00 */ s16 cutoff; ///< % of max HP/FP. If current HP/FP > cutoff, no hearts/flowers can be dropped. + /* 0x02 */ s16 generalChance; ///< % chance for any hearts/flowers to be dropped at all from this StatDrop. + /* 0x04 */ s16 attempts; ///< Maximum number of hearts/flowers that can be dropped from this StatDrop. + /* 0x06 */ s16 chancePerAttempt; ///< % chance for a single heart/flower to be dropped from each attempt. +} StatDrop; // size = 0x08 + +typedef struct StaticNpc { + /* 0x000 */ s32 id; + /* 0x004 */ NpcSettings* settings; + /* 0x008 */ Vec3f pos; + /* 0x014 */ s32 flags; + /* 0x018 */ EvtSource* init; + /* 0x01C */ char unk_1C[8]; + /* 0x024 */ s32 yaw; + /* 0x028 */ s8 dropFlags; // TODO: use EnemyDrops (requires tons of map edits) + /* 0x029 */ s8 itemDropChance; // % + /* 0x02A */ ItemDrop itemDrops[8]; + /* 0x05A */ StatDrop heartDrops[8]; + /* 0x09A */ StatDrop flowerDrops[8]; + /* 0x0DA */ s16 minCoinBonus; + /* 0x0DC */ s16 maxCoinBonus; + /* 0x0E0 */ s32 movement[48]; // TODO: type + /* 0x1A0 */ struct { + /* 0x00 */ s32 idle; + /* 0x04 */ s32 walk; + /* 0x08 */ s32 run; + /* 0x0C */ s32 chase; + /* 0x10 */ s32 unk_10; + /* 0x14 */ s32 unk_14; + /* 0x18 */ s32 death; + /* 0x1C */ s32 hit; + /* 0x20 */ s32 unk_20; + /* 0x24 */ s32 unk_24; + /* 0x28 */ s32 unk_28; + /* 0x2C */ s32 unk_2C; + /* 0x30 */ s32 unk_30; + /* 0x34 */ s32 unk_34; + /* 0x38 */ s32 unk_38; + /* 0x3C */ s32 unk_3C; + } animations; + /* 0x1E0 */ char unk_1E0[8]; + /* 0x1E8 */ s32* extraAnimations; + /* 0x1EC */ s32 tattle; +} StaticNpc; // size = 0x1F0 + +/// Zero-terminated. +typedef struct { + /* 0x00 */ s32 npcCount; + /* 0x04 */ StaticNpc* npcs; + /* 0x08 */ s32 battle; +} NpcGroupList[]; // size = 0x0C + +#define NPC_GROUP(npcs, battle) { sizeof(npcs) / sizeof(StaticNpc), (StaticNpc*) &npcs, battle } + +typedef struct EnemyDrops { + /* 0x00 */ s8 dropFlags; + /* 0x01 */ s8 itemDropChance; // % + /* 0x02 */ ItemDrop itemDrops[8]; + /* 0x32 */ StatDrop heartDrops[8]; + /* 0x72 */ StatDrop flowerDrops[8]; + /* 0xB2 */ s16 minCoinBonus; + /* 0xB4 */ s16 maxCoinBonus; + /* 0xB6 */ char unk_DE[2]; +} EnemyDrops; // size = 0xB8 + +enum TerritoryShape { SHAPE_CYLINDER, SHAPE_RECT }; + +typedef struct { + /* 0x00 */ s32 unk_00; + /* 0x04 */ enum TerritoryShape shape; + /* 0x08 */ s32 pointX; + /* 0x0C */ s32 pointZ; + /* 0x10 */ s32 sizeX; + /* 0x14 */ s32 sizeZ; + /* 0x18 */ f32 unk_18; + /* 0x1C */ s16 unk_1C; +} EnemyTerritoryThing; // size = 0x20 + +typedef struct { + /* 0x00 */ Vec3i point; + /* 0x0C */ s32 wanderSizeX; + /* 0x10 */ s32 wanderSizeZ; + /* 0x14 */ s32 moveSpeedOverride; + /* 0x18 */ enum TerritoryShape wanderShape; + /* 0x1C */ Vec3i detect; + /* 0x28 */ s32 detectSizeX; + /* 0x2C */ s32 detectSizeZ; + /* 0x30 */ enum TerritoryShape detectShape; + /* 0x34 */ s32 isFlying; +} EnemyTerritoryWander; // size = 0x38 + +typedef struct { + /* 0x00 */ s32 numPoints; + /* 0x04 */ Vec3i points[10]; + /* 0x7C */ s32 moveSpeedOverride; + /* 0x80 */ Vec3i detect; + /* 0x8C */ s32 detectSizeX; + /* 0x90 */ s32 detectSizeZ; + /* 0x94 */ enum TerritoryShape detectShape; + /* 0x98 */ s32 isFlying; +} EnemyTerritoryPatrol; // size = 0x9C + +typedef union { + EnemyTerritoryWander wander; + EnemyTerritoryPatrol patrol; + char PADDING[0xC0]; +} EnemyTerritory; // size = 0xC0 + +typedef struct Enemy { + /* 0x00 */ s32 flags; + /* 0x04 */ s8 encounterIndex; + /* 0x05 */ s8 encountered; + /* 0x06 */ u8 scriptGroup; /* scripts launched for this npc controller will be assigned this group */ + /* 0x07 */ s8 unk_07; + /* 0x08 */ s16 npcID; + /* 0x0A */ s16 spawnPos[3]; + /* 0x10 */ Vec3s unk_10; + /* 0x16 */ char unk_16[2]; + /* 0x18 */ struct NpcSettings* npcSettings; + /* 0x1C */ EvtSource* initBytecode; + /* 0x20 */ EvtSource* interactBytecode; + /* 0x24 */ EvtSource* aiBytecode; + /* 0x28 */ EvtSource* hitBytecode; + /* 0x2C */ EvtSource* auxBytecode; + /* 0x30 */ EvtSource* defeatBytecode; + /* 0x34 */ struct Evt* initScript; + /* 0x38 */ struct Evt* interactScript; + /* 0x3C */ struct Evt* aiScript; + /* 0x40 */ struct Evt* hitScript; + /* 0x44 */ struct Evt* auxScript; + /* 0x48 */ struct Evt* defeatScript; + /* 0x4C */ s32 initScriptID; + /* 0x50 */ s32 interactScriptID; + /* 0x54 */ s32 aiScriptID; + /* 0x58 */ s32 hitScriptID; + /* 0x5C */ s32 auxScriptID; + /* 0x60 */ s32 defeatScriptID; + /* 0x64 */ UNK_PTR unk_64; + /* 0x68 */ char unk_68[4]; + /* 0x6C */ s32 varTable[16]; + /* 0xAC */ char unk_AC[4]; + /* 0xB0 */ s32 unk_B0; + /* 0xB4 */ s8 unk_B4; + /* 0xB5 */ s8 unk_B5; + /* 0xB6 */ char unk_B6[2]; + /* 0xB8 */ EvtSource* unk_B8; // some bytecode + /* 0xBC */ struct Evt* unk_BC; // some script + /* 0xC0 */ s32 unk_C0; // some script ID + /* 0xC4 */ s32 unk_C4; + /* 0xC8 */ s32 unk_C8; + /* 0xCC */ s32* animList; + /* 0xD0 */ EnemyTerritory* territory; + /* 0xD4 */ EnemyDrops* drops; + /* 0xD8 */ u32 tattleMsg; + /* 0xDC */ char unk_DC[20]; +} Enemy; // size = 0xF0 + +s32 func_800490B4(EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, f32 arg3, s32 arg4); + +/// The default Npc::onUpdate and Npc::onRender callback. +void STUB_npc_callback(void); + +void mtx_ident_mirror_y(Matrix4f mtx); + +void clear_npcs(void); + +/// Points the current NPC list to the world or battle lists depending on game state. +void init_npc_list(void); + +/// Iterates over the NPC list, doing absolutely nothing. +/// Presumably did something once upon a time but got commented out. +void npc_iter_no_op(void); + +s32 _create_npc(NpcBlueprint* blueprint, s32** animList, s32 skipLoadingAnims); + +s32 _create_npc_basic(NpcBlueprint* blueprint); + +s32 _create_npc_standard(NpcBlueprint* blueprint, s32** animList); + +void _create_npc_partner(NpcBlueprint* blueprint); + +void free_npc_by_index(s32 listIndex); + +void free_npc(Npc* npc); + +Npc* get_npc_by_index(s32 listIndex); + +void npc_do_world_collision(Npc* npc); + +void npc_do_other_npc_collision(Npc* npc); + +/// @returns TRUE if a collision occurred +s32 npc_do_player_collision(Npc* npc); + +void npc_do_gravity(Npc* npc); + +s32 func_800397E8(Npc* npc, f32 arg1); + +/// Updates all NPCs. +void update_npcs(void); + +f32 npc_get_render_yaw(void); + +void appendGfx_npc(Npc* npc); + +/// Renders all NPCs. +void render_npcs(void); + +void npc_move_heading(Npc* npc, f32 speed, f32 yaw); + +Npc* get_npc_unsafe(s32 npcID); + +/// @returns NULL if not found +Npc* get_npc_safe(s32 npcID); + +void enable_npc_shadow(Npc* npc); + +void disable_npc_shadow(Npc* npc); + +void update_npc_blur(Npc* npc); + +void appendGfx_npc_blur(Npc* npc); + +void npc_enable_collisions(void); + +void npc_disable_collisions(void); + +void func_8003B1A8(void); + +void npc_reload_all(void); + +void set_npc_yaw(Npc* npc, f32 yaw); + +void npc_set_palswap_mode_A(Npc* npc, s32 arg1); + +void npc_set_palswap_mode_B(Npc* npc, s32 arg1); + +void func_8003B420(Npc* npc); + +void npc_set_palswap_1(Npc* npc, s32 palIndexA, s32 palIndexB, s32 timeHoldA, s32 timeAB); + +void npc_set_palswap_2(Npc* npc, s32 timeHoldB, s32 timeBA, s32 palIndexC, s32 palIndexD); + +void npc_draw_with_palswap(Npc* npc, s32 arg1, s32 arg2); + +void npc_draw_palswap_mode_0(Npc* npc, s32 arg1, s32 arg2); + +s32 npc_draw_palswap_mode_1(Npc*, s32, s32); + +s32 npc_blend_palette_colors(void); + +s32 npc_draw_palswap_mode_2(Npc*, s32, s32, s32); + +s32 npc_draw_palswap_mode_4(Npc*, s32, s32); + +void npc_set_decoration(Npc* npc, s32 idx, s32 decorationType); + +void npc_remove_decoration(Npc* npc, s32 idx); + +s32 npc_update_decorations(Npc* npc); + +void npc__remove_decoration(Npc* npc, s32 idx); + +void npc_reset_current_decoration(Npc* npc, s32 idx); + +void npc_update_decoration_none(Npc* npc, s32 idx); + +void npc_remove_decoration_none(Npc* npc, s32 idx); + +void npc_update_decoration_bowser_aura(Npc* npc, s32 idx); + +void npc_remove_decoration_bowser_aura(Npc* npc, s32 idx); + +void npc_update_decoration_sweat(Npc* npc, s32 idx); + +void npc_remove_decoration_sweat(Npc* npc, s32 idx); + +void npc_update_decoration_seeing_stars(Npc* npc, s32 idx); + +void npc_remove_decoration_seeing_stars(Npc* npc, s32 idx); + +void npc_update_decoration_glow_in_front(Npc* npc, s32 idx); + +void npc_remove_decoration_glow_in_front(Npc* npc, s32 idx); + +void npc_update_decoration_glow_behind(Npc* npc, s32 idx); + +void npc_remove_decoration_glow_behind(Npc* npc, s32 idx); + +void npc_update_decoration_charged(Npc* npc, s32 idx); + +void npc_remove_decoration_charged(Npc* npc, s32 idx); + +void npc__reset_current_decoration(Npc* npc, s32 idx); + +/// Finds the closest NPC to a given point within a radius. Ignores Y position. +/// +/// NPCs with NPC_FLAG_PARTICLE set are ignored. +/// See also npc_find_closest_simple(), which requires that NPC_FLAG_PARTICLE be set. +/// +/// @param x X position +/// @param y Y position (unused) +/// @param z Z position +/// @param radius No NPCs further than this distance will be considered +/// +/// @returns NULL if there are no NPCs within radius +Npc* npc_find_closest(f32 x, f32 y, f32 z, f32 radius); + +/// Finds the closest simple-hitbox NPC to a given point within a radius. Ignores Y position. +/// +/// Only NPCs with NPC_FLAG_PARTICLE set are considered. +/// See also npc_find_closest(), which requires that NPC_FLAG_PARTICLE be unset. +/// +/// @param x X position +/// @param y Y position (unused) +/// @param z Z position +/// @param radius No NPCs further than this distance will be considered +/// +/// @returns NULL if there are no NPCs within radius +Npc* npc_find_closest_simple(f32 x, f32 y, f32 z, f32 radius); + +//s32 npc_find_standing_on_entity(); + +s32 npc_get_collider_below(Npc* npc); + +void func_8003D3BC(Npc* npc); + +void func_8003D624(Npc* npc, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6); + +void func_8003D660(Npc* npc, s32 arg1); + +void func_8003D788(Npc* npc, s32 arg1); + +void func_8003DA38(Npc* npc, s32 arg1); + +s32 func_8003DC38(void); + +void func_8003DFA0(Npc* npc); + +void func_8003E0D4(Npc* npc); + +void func_8003E1D0(Npc* npc); + +/// Duplicate of set_defeated(). +void COPY_set_defeated(s32 mapID, s32 encounterID); + +void init_encounter_status(void); + +void clear_encounter_status(void); + +void func_8003E50C(void); + +void func_8003E514(s8 arg0); + +void update_encounters(void); + +void draw_encounter_ui(void); + +void draw_first_strike_ui(void); + +void npc_dyn_entity_draw_no_op(void); + +void make_npcs(s32 flags, s32 mapID, s32* npcGroupList); + +s32 kill_encounter(Enemy* enemy); + +void kill_enemy(Enemy* enemy); + +/// Binds the specified ai script to the specified enemy +/// +/// @param enemy pointer to the enemy to bind the script to +/// @param aiScriptBytecode pointer to the script to be bound. +s32 bind_enemy_ai(Enemy* enemy, EvtSource* aiScriptBytecode); + +/// Binds the specified auxillary script to the specified enemy +/// +/// @param enemy pointer to the enemy to bind the script to +/// @param auxScriptBytecode pointer to the script to be bound. +s32 bind_enemy_aux(Enemy* enemy, EvtSource* auxScriptBytecode); + +/// Binds the specified interact script to the specified enemy +/// +/// @param enemy pointer to the enemy to bind the script to +/// @param interactScriptBytecode pointer to the script to be bound. +s32 bind_enemy_interact(Enemy* enemy, EvtSource* interactScriptBytecode); + +/// Binds the specified ai script to the npc matching the specified npcId +/// +/// @param npcID ID of the desired npc +/// @param npcAiBytecode pointer to the script to be bound. +void bind_npc_ai(s32 npcID, EvtSource* npcAiBytecode); + +/// Binds the specified auxillary script to the npc matching the specified npcId +/// +/// @param npcID ID of the desired npc +/// @param npcAuxBytecode pointer to the script to be bound. +void bind_npc_aux(s32 npcID, EvtSource* npcAuxBytecode); + +/// Binds the specified interact script to the npc matching the specified npcId +/// +/// @param npcID ID of the desired npc +/// @param npcInteractBytecode pointer to the script to be bound. +void bind_npc_interact(s32 npcID, EvtSource* npcInteractBytecode); + +/// Looks for an enemy matching the specified npcID. +/// +/// @param npcID ID of the npc bound to the desired enemy. +/// +/// @returns pointer to Enemy struct, if one is found. If one is not found, a panic occurs. +Enemy* get_enemy(s32 npcID); + +/// Same as get_enemy(), with the exception of always returning a value if an enemy is not found. +/// +/// @param npcID ID of the npc bound to the desired enemy. +/// +/// @returns pointer to Enemy struct, if one is found. Otherwise, NULL. +Enemy* get_enemy_safe(s32 npcID); + +#endif diff --git a/src/17D6A0.c b/src/17D6A0.c index 869b5aa36a..4b7cd9019d 100644 --- a/src/17D6A0.c +++ b/src/17D6A0.c @@ -176,7 +176,6 @@ void btl_set_popup_duration(s32 duration) { } } #else -void btl_set_popup_duration(s32 duration); INCLUDE_ASM(void, "17D6A0", btl_set_popup_duration); #endif diff --git a/src/190B20.c b/src/190B20.c index 6b2aa3776b..98d227c6c9 100644 --- a/src/190B20.c +++ b/src/190B20.c @@ -3,6 +3,7 @@ #include "battle/battle.h" #include "hud_element.h" #include "message_ids.h" +#include "model.h" s32 D_80280FC0[] = { 0x000A005A, 0x00000032, 0x0003000B, 0x00000032, 0x0001002D, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000032, 0x00010031, 0x00000032, 0x00010031, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000032, 0x00010032, 0x00000032, 0x00010032, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000032, 0x0003000A, 0x00000032, 0x0003000A, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000050, 0x0003000A, 0x00000014, 0x0003000B, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, @@ -1008,8 +1009,8 @@ ActorPartDesc bMarioParts[] = { Vec3s D_80283524[] = { { 0x0005, 0x0000, 0xFFEC }, { 0x002D, 0x0000, 0xFFFB }, - { 0x0055, 0x0000, 0x000A }, - { 0x007D, 0x0000, 0x0019 }, + { 0x0055, 0x0000, 0x000A }, + { 0x007D, 0x0000, 0x0019 }, { 0x000A, 0x0032, 0xFFEC }, { 0x0032, 0x002D, 0xFFFB }, { 0x005A, 0x0032, 0x000A }, @@ -1068,6 +1069,7 @@ s32 bActorMessages[] = { s32 D_802838F8 = 0; +void create_target_list(Actor* actor, s32 arg1); INCLUDE_ASM(s32, "190B20", create_target_list); void player_create_target_list(Actor* actor) { @@ -1407,7 +1409,7 @@ s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration) { return TRUE; } -s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags) { +s32 get_defense(Actor* actor, DictionaryEntry* defenseTable, s32 elementFlags) { s32 defense; s32 minDefense = 0xFF; @@ -1712,7 +1714,7 @@ void remove_player_buffs(s32 buffs) { battleStatus->cloudNineTurnsLeft = 0; battleStatus->unk_43C->unk_0C->unk_1A = 0; remove_effect(battleStatus->cloudNineEffect); - battleStatus->cloudNineEffect = 0; + battleStatus->cloudNineEffect = NULL; } if (partner != NULL && (buffs & 0x10000)) { diff --git a/src/1a1f0_len_5390.c b/src/1a1f0_len_5390.c index 838b00b495..f6f7e86b81 100644 --- a/src/1a1f0_len_5390.c +++ b/src/1a1f0_len_5390.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" extern s16 D_8009A668; diff --git a/src/20ec0_len_5040.c b/src/20ec0_len_5040.c index 384ece45e4..142aa4f93a 100644 --- a/src/20ec0_len_5040.c +++ b/src/20ec0_len_5040.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" extern s32 D_800A0F40; extern PopupMessage D_800A0BC0[32]; diff --git a/src/23680.c b/src/23680.c index 691d89af3f..e438f52002 100644 --- a/src/23680.c +++ b/src/23680.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" INCLUDE_ASM(s32, "23680", spawn_drops); diff --git a/src/25AF0.c b/src/25AF0.c index 7c51fd65ea..80305b9046 100644 --- a/src/25AF0.c +++ b/src/25AF0.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void func_8004A6F0(Evt* script) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); diff --git a/src/77480.c b/src/77480.c index c0d2fa9be5..b94ed16d93 100644 --- a/src/77480.c +++ b/src/77480.c @@ -9,9 +9,19 @@ extern s32 D_8010C958; extern s32 D_802BDF60; -void func_802B72C0_E22870(); +void func_802B72C0_E22870(void); +s32 func_800E0208(void); +void func_800E0330(void); +void func_800E0374(void); +void func_800E04D0(void); void func_800E0514(void); +void func_800E0658(void); +void func_800E069C(void); +void func_800E0AD0(void); +void func_800E0B14(void); +void update_partner_timers(void); +void update_player_shadow(void); s32 player_raycast_below(f32 yaw, f32 diameter, f32* outX, f32* outY, f32* outZ, f32* outLength, f32* hitRx, f32* hitRz, f32* hitDirX, f32* hitDirZ) { diff --git a/src/7E9D0.c b/src/7E9D0.c index 90723d17c5..9e45e98e08 100644 --- a/src/7E9D0.c +++ b/src/7E9D0.c @@ -72,7 +72,7 @@ INCLUDE_ASM(s32, "7bb60_len_41b0", phys_peach_update); void set_action_state(s32 actionState) { PlayerStatus* playerStatus = &gPlayerStatus; PlayerData* playerData = &gPlayerData; - UNK_TYPE* unknownStruct = &D_8010F250; + Temp8010F250* unknownStruct = &D_8010F250; if (playerStatus->flags & 0x200) { playerStatus->flags &= ~0x200; @@ -144,8 +144,8 @@ void set_action_state(s32 actionState) { playerStatus->flags &= ~0x20000; playerStatus->animFlags &= ~0x10000; - if (unknownStruct[0xC]) { - sfx_stop_sound(unknownStruct[0xC]); + if (unknownStruct->unk_30 != 0) { + sfx_stop_sound(unknownStruct->unk_30); } if (playerStatus->unk_D8) { diff --git a/src/B4580.c b/src/B4580.c index b516cc891e..bcf6a159a1 100644 --- a/src/B4580.c +++ b/src/B4580.c @@ -1,107 +1,880 @@ -#include "common.h" +#include "model.h" -s32 D_8014C250[] = {0x0001003C, 0x00000000, 0x00000000, 0x00000000}; +s8 D_8014C250[] = {0x00, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; +extern s32 gAnimCount; + +typedef struct DisplayListBufferHandle { + /* 0x0 */ s32 mode; + /* 0x4 */ Gfx* addr; +} DisplayListBufferHandle; // size = 0x8 + +typedef DisplayListBufferHandle AnimatedMeshVertexCopyList[0x60]; + +extern AnimatedMeshVertexCopyList D_801533C0; +extern AnimatedMeshVertexCopyList D_801536C0; +extern AnimatedMeshList D_801539C0; +extern AnimatedMeshList D_80153A00; +extern s32 gAnimModelFogEnabled; +extern s32 gAnimModelFogR; +extern s32 gAnimModelFogG; +extern s32 gAnimModelFogB; +extern s32 gAnimModelFogA; +extern s32 gAnimModelFogStart; +extern s32 gAnimModelFogEnd; +extern s32 D_80153A60; +extern Matrix4f gAnimRotMtx; +extern Matrix4f gAnimScaleMtx; +extern Matrix4f gAnimTranslateMtx; +extern Matrix4f gAnimRotScaleMtx; +extern StaticAnimatorNode** gAnimTreeRoot; + +// reg swap +#ifdef NON_MATCHING +Vtx* animator_copy_vertices_to_buffer(ModelAnimator* animator, AnimatorNode* node, Vec3s* buffer, s32 vtxCount, + s32 overhead, s32 startIdx) { + DisplayListBufferHandle* handle; + Vtx* bufferMem; + Vtx* phi_v1; + s32 i; + + for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) { + handle = &D_801533C0[i]; + if (handle->mode < 0) { + break; + } + } + + ASSERT(i < ARRAY_COUNT(D_801533C0)); + + bufferMem = general_heap_malloc((vtxCount + overhead) * sizeof(*bufferMem)); + handle->addr = bufferMem; + + ASSERT(bufferMem != NULL); + + handle->mode = 3; + phi_v1 = &node->fcData.vtxList[startIdx]; + + if (animator->vertexArray != NULL) { + buffer = ((s32)buffer & 0xFFFFFF) + (s32)animator->vertexArray; + } + + for (i = 0; i < vtxCount; i++) { + *bufferMem = *phi_v1; + bufferMem->v.ob[0] = buffer->x; + bufferMem->v.ob[1] = buffer->y; + bufferMem->v.ob[2] = buffer->z; + bufferMem++; + buffer++; + phi_v1++; + } + return handle->addr; +} +#else INCLUDE_ASM(s32, "B4580", animator_copy_vertices_to_buffer); +#endif -INCLUDE_ASM(s32, "B4580", animator_make_mirrorZ); +void animator_make_mirrorZ(Matrix4f mtx) { + guMtxIdentF(mtx); + mtx[0][0] = 1.0f; + mtx[1][1] = 1.0f; + mtx[2][2] = -1.0f; + mtx[3][3] = 1.0f; +} -INCLUDE_ASM(s32, "B4580", animator_make_mirrorY); +void animator_make_mirrorY(Matrix4f mtx) { + guMtxIdentF(mtx); + mtx[0][0] = 1.0f; + mtx[1][1] = -1.0f; + mtx[2][2] = 1.0f; + mtx[3][3] = 1.0f; +} -INCLUDE_ASM(s32, "B4580", animator_make_mirrorX); +void animator_make_mirrorX(Matrix4f mtx) { + guMtxIdentF(mtx); + mtx[0][0] = -1.0f; + mtx[1][1] = 1.0f; + mtx[2][2] = 1.0f; + mtx[3][3] = 1.0f; +} -INCLUDE_ASM(s32, "B4580", animator_make_identity); +void animator_make_identity(Matrix4f mtx) { + guMtxIdentF(mtx); + mtx[0][0] = 1.0f; + mtx[1][1] = 1.0f; + mtx[2][2] = 1.0f; + mtx[3][3] = 1.0f; +} -INCLUDE_ASM(s32, "B4580", get_animator_child_with_id); +AnimatorNode* get_animator_child_with_id(AnimatorNode* node, s32 id) { + s32 i; -INCLUDE_ASM(s32, "B4580", get_animator_child_for_model); + if (node->uniqueIndex == id) { + return node; + } -INCLUDE_ASM(s32, "B4580", free_animator_nodes); + for (i = 0; i < ARRAY_COUNT(node->children); i++) { + if (node->children[i] != NULL) { + AnimatorNode* child = get_animator_child_with_id(node->children[i], id); -INCLUDE_ASM(s32, "B4580", clear_animator_list); + if (child != NULL) { + return child; + } -INCLUDE_ASM(s32, "B4580", reset_animator_list); + } + } -INCLUDE_ASM(s32, "B4580", delete_model_animator_node); + return NULL; +} -INCLUDE_ASM(s32, "B4580", delete_model_animator_nodes); +AnimatorNode* get_animator_child_for_model(AnimatorNode* node, s32 id) { + s32 i; -INCLUDE_ASM(s32, "B4580", delete_model_animator); + if (node->fcData.modelID == id) { + return node; + } -INCLUDE_ASM(s32, "B4580", create_model_animator); + for (i = 0; i < ARRAY_COUNT(node->children); i++) { + if (node->children[i] != NULL) { + AnimatorNode* child = get_animator_child_for_model(node->children[i], id); -INCLUDE_ASM(s32, "B4580", create_mesh_animator); + if (child != NULL) { + return child; + } -INCLUDE_ASM(s32, "B4580", add_anim_node); + } + } -INCLUDE_ASM(s32, "B4580", update_model_animator); + return NULL; +} -INCLUDE_ASM(s32, "B4580", func_8011EA54); +void free_animator_nodes(AnimatorNode* root) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(root->children); i++) { + if (root->children[i] != NULL) { + free_animator_nodes(root->children[i]); + } + } + heap_free(root); +} + +void clear_animator_list(void) { + s32 i; + + if (!gGameStatusPtr->isBattle) { + gCurrentAnimMeshListPtr = &D_801539C0; + for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) { + D_801533C0[i].mode = -1; + } + + for (i = 0; i < ARRAY_COUNT(D_801536C0); i++) { + D_801536C0[i].mode = -1; + } + } else { + gCurrentAnimMeshListPtr = &D_80153A00; + } + + for (i = 0; i < ARRAY_COUNT(*gCurrentAnimMeshListPtr); i++) { + (*gCurrentAnimMeshListPtr)[i] = NULL; + } + + gAnimModelFogR = 10; + gAnimModelFogG = 10; + gAnimModelFogB = 10; + gAnimModelFogA = 10; + gAnimModelFogStart = 800; + gAnimCount = 0; + gAnimModelFogEnabled = 0; + gAnimModelFogEnd = 1000; +} + +void reset_animator_list(void) { + if (!gGameStatusPtr->isBattle) { + gCurrentAnimMeshListPtr = &D_801539C0; + } else { + gCurrentAnimMeshListPtr = &D_80153A00; + } + + gAnimModelFogR = 10; + gAnimModelFogG = 10; + gAnimModelFogB = 10; + gAnimModelFogA = 10; + gAnimModelFogStart = 800; + gAnimCount = 0; + gAnimModelFogEnabled = 0; + gAnimModelFogEnd = 1000; +} + +void delete_model_animator_node(AnimatorNode* node) { + s32 i; + + node->flags = 0; + + for (i = 0; i < ARRAY_COUNT(node->children); i++) { + if (node->children[i] != NULL) { + delete_model_animator_node(node->children[i]); + node->children[i] = NULL; + } + } + + heap_free(node); +} + +void delete_model_animator_nodes(ModelAnimator* animator) { + animator->nextUniqueID = 0; + + if (animator->rootNode != NULL) { + delete_model_animator_node(animator->rootNode); + animator->rootNode = NULL; + } +} + +void delete_model_animator(ModelAnimator* animator) { + s32 i; + + animator->nextUniqueID = 0; + + if (animator->rootNode != NULL) { + delete_model_animator_node(animator->rootNode); + animator->rootNode = NULL; + + for (i = 0; i < ARRAY_COUNT(*gCurrentAnimMeshListPtr); i++) { + if ((*gCurrentAnimMeshListPtr)[i] == animator) { + (*gCurrentAnimMeshListPtr)[i] = NULL; + break; + } + } + + heap_free(animator); + gAnimCount--; + } +} + +s32 create_model_animator(s8* animPos) { + ModelAnimator* animator; + s32 i, j; + + for (i = 0; i < ARRAY_COUNT(*gCurrentAnimMeshListPtr); i++) { + if ((*gCurrentAnimMeshListPtr)[i] == NULL) { + break; + } + } + + ASSERT(i < ARRAY_COUNT(*gCurrentAnimMeshListPtr)); + + (*gCurrentAnimMeshListPtr)[i] = animator = heap_malloc(sizeof(*animator)); + gAnimCount += 1; + + ASSERT(animator != NULL); + + animator->flags = 0x40 | 0x10 | 0x4 | 0x2 | 0x1; + animator->renderMode = RENDER_MODE_ALPHATEST; + animator->nextUpdateTime = 1.0f; + animator->timeScale = 1.0f; + animator->animReadPos = animPos; + + if (animPos == NULL) { + animator->animReadPos = D_8014C250; + } + + animator->savedReadPos = animPos; + animator->animationBuffer = NULL; + animator->vertexArray = NULL; + animator->fpRenderCallback = NULL; + animator->rootNode = NULL; + animator->nextUniqueID = 0; + + for (j = 0; j < ARRAY_COUNT(animator->staticNodeIDs); j++) { + animator->staticNodeIDs[j] = j + 1; + } + + if (gGameStatusPtr->isBattle) { + i |= 0x800; + } + return i; +} + +s32 create_mesh_animator(s32 animPos, s8* animBuffer) { + ModelAnimator* animator; + s32 i, j; + + for (i = 0; i < ARRAY_COUNT(*gCurrentAnimMeshListPtr); i++) { + if ((*gCurrentAnimMeshListPtr)[i] == NULL) { + break; + } + } + + ASSERT(i < ARRAY_COUNT(*gCurrentAnimMeshListPtr)); + + (*gCurrentAnimMeshListPtr)[i] = animator = heap_malloc(sizeof(*animator)); + gAnimCount += 1; + + ASSERT(animator != NULL); + + animator->flags = 0x40 | 0x10 | 0x4 | 0x2 | 0x1; + animator->renderMode = RENDER_MODE_ALPHATEST; + animator->vertexArray = NULL; + animator->fpRenderCallback = NULL; + animator->rootNode = NULL; + animator->nextUniqueID = 0; + animator->animationBuffer = animBuffer; + animator->nextUpdateTime = 1.0f; + animator->timeScale = 1.0f; + animPos = (animPos & 0xFFFFFF) + (s32)animator->animationBuffer; + animator->animReadPos = (s8*)animPos; + animator->savedReadPos = (s8*)animPos; + + for (j = 0; j < ARRAY_COUNT(animator->staticNodeIDs); j++) { + animator->staticNodeIDs[j] = j + 1; + } + + if (gGameStatusPtr->isBattle) { + i |= 0x800; + } + return i; +} + +AnimatorNode* add_anim_node(ModelAnimator* animator, s32 parentNodeID, AnimatorNodeBlueprint* nodeBP) { + AnimatorNode* ret; + AnimatorNode* child; + s32 nextUniqueID; + s32 nullRootNode; + s32 i; + + ret = heap_malloc(sizeof(*ret)); + ASSERT(ret != NULL); + + ret->flags = 0x10; + ret->displayList = nodeBP->displayList; + ret->basePos.x = nodeBP->basePos.x; + ret->basePos.y = nodeBP->basePos.y; + ret->basePos.z = nodeBP->basePos.z; + ret->pos.x = 0.0f; + ret->pos.y = 0.0f; + ret->pos.z = 0.0f; + ret->rotation.x = nodeBP->rotation.x; + ret->rotation.y = nodeBP->rotation.y; + ret->rotation.z = nodeBP->rotation.z; + ret->scale.x = 1.0f; + ret->scale.y = 1.0f; + ret->scale.z = 1.0f; + ret->vertexStartOffset = -1; + + for (i = 0; i < ARRAY_COUNT(ret->children); i++) { + ret->children[i] = NULL; + } + + nextUniqueID = animator->nextUniqueID; + nextUniqueID = nextUniqueID + 1; + + if (parentNodeID == 0) { + s32 nullRootNode = animator->rootNode == NULL; // todo ??? + + ret->uniqueIndex = nextUniqueID; + + if (nullRootNode) { + animator->rootNode = ret; + } else { + child = get_animator_child_with_id(animator->rootNode, 1); + ASSERT(child != NULL); + + for (i = 0; i < ARRAY_COUNT(child->children); i++) { + if (child->children[i] == NULL) { + child->children[i] = ret; + break; + } + } + + ASSERT(i < ARRAY_COUNT(child->children)); + } + } else { + ret->uniqueIndex = nextUniqueID; + child = get_animator_child_with_id(animator->rootNode, parentNodeID); + ASSERT(child != NULL); + + for (i = 0; i < ARRAY_COUNT(child->children); i++) { + if (child->children[i] == NULL) { + child->children[i] = ret; + break; + } + } + + ASSERT(i < ARRAY_COUNT(child->children)); + } + + animator->nextUniqueID = nextUniqueID; + return ret; +} + +void update_model_animator(s32 animatorID) { + if (!gGameStatusPtr->isBattle || animatorID & 0x800) { + ModelAnimator* animator; + + animatorID &= ~0x800; + animator = (*gCurrentAnimMeshListPtr)[animatorID]; + + if (animator != NULL && animator->flags != 0) { + s32 temp = 0; + + if (!(animator->flags & 0x40000)) { + animator->flags &= ~0x40; + animator->nextUpdateTime -= animator->timeScale; + if (animator->nextUpdateTime <= 0.0f) { + if (!(animator->flags & 0x8000)) { + do { + temp = step_model_animator(animator); + } while (temp > 0); + } else { + animator->nextUpdateTime = 1.0f; + reload_mesh_animator_tree(animator); + do { + temp = step_mesh_animator(animator); + } while (temp > 0); + } + } + + if (temp != -1) { + s32 i; + + animator_update_model_transforms(animator, NULL); + + for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) { + if (D_801533C0[i].mode >= 0) { + D_801533C0[i].mode--; + if (D_801533C0[i].mode == 0) { + D_801533C0[i].mode = -1; + general_heap_free(D_801533C0[i].addr); + } + } + } + + for (i = 0; i < ARRAY_COUNT(D_801536C0); i++) { + if (D_801536C0[i].mode >= 0) { + D_801536C0[i].mode--; + if (D_801536C0[i].mode == 0) { + D_801536C0[i].mode = -1; + general_heap_free(D_801536C0[i].addr); + } + } + } + } + } + } + } +} + +void update_model_animator_with_transform(s32 animatorID, Mtx* mtx) { + if (!gGameStatusPtr->isBattle || animatorID & 0x800) { + ModelAnimator* animator; + + animatorID &= ~0x800; + animator = (*gCurrentAnimMeshListPtr)[animatorID]; + + if (animator != NULL && animator->flags != 0) { + s32 temp = 0; + + if (!(animator->flags & 0x40000)) { + animator->flags &= ~0x40; + animator->nextUpdateTime -= animator->timeScale; + if (animator->nextUpdateTime <= 0.0f) { + if (!(animator->flags & 0x8000)) { + do { + temp = step_model_animator(animator); + } while (temp > 0); + } else { + animator->nextUpdateTime = 1.0f; + reload_mesh_animator_tree(animator); + do { + temp = step_mesh_animator(animator); + } while (temp > 0); + } + } + + if (temp != -1) { + s32 i; + + animator_update_model_transforms(animator, mtx); + + for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) { + if (D_801533C0[i].mode >= 0) { + D_801533C0[i].mode--; + if (D_801533C0[i].mode == 0) { + D_801533C0[i].mode = -1; + general_heap_free(D_801533C0[i].addr); + } + } + } + + for (i = 0; i < ARRAY_COUNT(D_801536C0); i++) { + if (D_801536C0[i].mode >= 0) { + D_801536C0[i].mode--; + if (D_801536C0[i].mode == 0) { + D_801536C0[i].mode = -1; + general_heap_free(D_801536C0[i].addr); + } + } + } + } + } + } + } +} INCLUDE_ASM(s32, "B4580", step_model_animator); -INCLUDE_ASM(s32, "B4580", animator_update_model_transforms); +void animator_update_model_transforms(ModelAnimator* animator, Mtx* rootTransform) { + Matrix4f flipMtx; -INCLUDE_ASM(s32, "B4580", animator_node_update_model_transform); + if (animator->rootNode != NULL) { + switch (animator->flags & 0x700) { + case 0x100: + animator_make_mirrorZ(flipMtx); + break; + case 0x200: + animator_make_mirrorY(flipMtx); + break; + case 0x400: + animator_make_mirrorX(flipMtx); + break; + default: + animator_make_identity(flipMtx); + break; + } + animator_node_update_model_transform(animator, flipMtx, animator->rootNode, rootTransform); + } +} -INCLUDE_ASM(s32, "B4580", render_animated_model); +void animator_node_update_model_transform(ModelAnimator* animator, f32 (*flipMtx)[4], AnimatorNode* node, + Mtx* rootTransform) { + Matrix4f sp10; + s32 i; -INCLUDE_ASM(s32, "B4580", render_animated_model_with_vertices); + guRotateRPYF(gAnimRotMtx, clamp_angle(node->rotation.x), clamp_angle(node->rotation.y), clamp_angle(node->rotation.z)); + guScaleF(gAnimScaleMtx, node->scale.x, node->scale.y, node->scale.z); + guTranslateF(gAnimTranslateMtx, node->basePos.x + node->pos.x, node->basePos.y + node->pos.y, node->basePos.z + node->pos.z); + guMtxCatF(gAnimScaleMtx, gAnimRotMtx, gAnimRotScaleMtx); + guMtxCatF(gAnimRotScaleMtx, gAnimTranslateMtx, sp10); + + if (!(animator->flags & 0x20000)) { + guMtxCatF(sp10, flipMtx, sp10); + } + + copy_matrix(sp10, node->mtx); + + if (node->flags & 0x1000) { + Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(node->fcData.modelID)); + + copy_matrix(sp10, model->transformMatrix); + guMtxL2F(sp10, rootTransform); + guMtxCatF(model->transformMatrix, sp10, model->transformMatrix); + model->flags |= 0x1000; + } + + for (i = 0; i < ARRAY_COUNT(node->children); i++) { + if (node->children[i] != NULL) { + animator_node_update_model_transform(animator, sp10, node->children[i], rootTransform); + } + } +} + +void render_animated_model(s32 animatorID, Mtx* rootTransform) { + RenderTask rt; + RenderTask* rtPtr = &rt; + + if (!gGameStatusPtr->isBattle || animatorID & 0x800) { + ModelAnimator* animator; + + animatorID &= ~0x800; + animator = (*gCurrentAnimMeshListPtr)[animatorID]; + if (animator != NULL && animator->flags != 0 && !(animator->flags & 0x40) && + animator->flags & (1 << gCurrentCamID) && !(animator->flags & 0x80)) + { + animator->mtx = *rootTransform; + animator->vertexArray = NULL; + rtPtr->appendGfxArg = animator; + rtPtr->appendGfx = &appendGfx_animator; + rtPtr->distance = 0; + rtPtr->renderMode = animator->renderMode; + queue_render_task(rtPtr); + } + } +} + +void render_animated_model_with_vertices(s32 animatorID, Mtx* rootTransform, s32 vtxSegment, Vtx* vertexArray) { + RenderTask rt; + RenderTask* rtPtr = &rt; + + if (!gGameStatusPtr->isBattle || animatorID & 0x800) { + ModelAnimator* animator; + + animatorID &= ~0x800; + animator = (*gCurrentAnimMeshListPtr)[animatorID]; + if (animator != NULL && animator->flags != 0 && !(animator->flags & 0x40) && + animator->flags & (1 << gCurrentCamID) && !(animator->flags & 0x80)) + { + animator->mtx = *rootTransform; + D_80153A60 = vtxSegment; + animator->vertexArray = vertexArray; + rtPtr->appendGfxArg = animator; + rtPtr->appendGfx = &appendGfx_animator; + rtPtr->distance = 0; + rtPtr->renderMode = animator->renderMode; + queue_render_task(rtPtr); + } + } +} INCLUDE_ASM(s32, "B4580", appendGfx_animator); INCLUDE_ASM(s32, "B4580", appendGfx_animator_node); +AnimatorNode* get_animator_node_for_tree_index(ModelAnimator* animator, s32 treeIndex); INCLUDE_ASM(s32, "B4580", get_animator_node_for_tree_index); +// AnimatorNode* get_animator_node_for_tree_index(ModelAnimator* animator, s32 arg1) { +// return get_animator_child_with_id(animator->rootNode, animator->unk_14[arg1]); +// } -INCLUDE_ASM(s32, "B4580", get_animator_node_with_id); +AnimatorNode* get_animator_node_with_id(ModelAnimator* animator, s32 id) { + return get_animator_child_for_model(animator->rootNode, id); +} -INCLUDE_ASM(s32, "B4580", set_animator_tree_to_node_map); +void set_animator_tree_to_node_map(ModelAnimator* animator, s32* nodeIDs, s32 count) { + s32 i; -AnimatedMesh* get_animator_by_index(s32 animModelID) { + for (i = 0; i < count; i++) { + animator->staticNodeIDs[i] = *nodeIDs; + nodeIDs++; + } +} + +ModelAnimator* get_animator_by_index(s32 animModelID) { return (*gCurrentAnimMeshListPtr)[animModelID & ~0x800]; } -AnimatedMesh* set_animator_render_callback(s32 animModelID, s32 arg1, s32 arg2) { - AnimatedMesh* ret = (*gCurrentAnimMeshListPtr)[animModelID & ~0x800]; +ModelAnimator* set_animator_render_callback(s32 animModelID, s32 callbackArg, s32 callbackFunc) { + ModelAnimator* ret = (*gCurrentAnimMeshListPtr)[animModelID & ~0x800]; - ret->unk_2D4 = arg2; - ret->unk_2D8 = arg1; + ret->fpRenderCallback = callbackFunc; + ret->renderCallbackArg = callbackArg; return ret; } -INCLUDE_ASM(s32, "B4580", enable_anim_model_fog); +void enable_anim_model_fog(void) { + gAnimModelFogEnabled = TRUE; +} -INCLUDE_ASM(s32, "B4580", disable_anim_model_fog); +void disable_anim_model_fog(void) { + gAnimModelFogEnabled = FALSE; +} -INCLUDE_ASM(s32, "B4580", set_anim_model_fog_dist); +void set_anim_model_fog_dist(s32 start, s32 end) { + gAnimModelFogStart = start; + gAnimModelFogEnd = end; +} -INCLUDE_ASM(s32, "B4580", set_anim_model_fog_color); +void set_anim_model_fog_color(s32 r, s32 g, s32 b, s32 a) { + gAnimModelFogR = r; + gAnimModelFogG = g; + gAnimModelFogB = b; + gAnimModelFogA = a; +} -INCLUDE_ASM(s32, "B4580", is_anim_model_fog_enabled); +s32 is_anim_model_fog_enabled(void) { + return gAnimModelFogEnabled; +} -INCLUDE_ASM(s32, "B4580", get_anim_model_fog_distance); +void get_anim_model_fog_distance(s32* start, s32* end) { + *start = gAnimModelFogStart; + *end = gAnimModelFogEnd; +} -INCLUDE_ASM(s32, "B4580", get_anim_model_fog_color); +void get_anim_model_fog_color(s32* r, s32* g, s32* b, s32* a) { + *r = gAnimModelFogR; + *g = gAnimModelFogG; + *b = gAnimModelFogB; + *a = gAnimModelFogA; +} -INCLUDE_ASM(s32, "B4580", set_animator_flags); +void set_animator_flags(s32 index, s32 bits) { + ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~0x800]; -INCLUDE_ASM(s32, "B4580", clear_animator_flags); + animator->flags |= bits; +} -INCLUDE_ASM(s32, "B4580", play_model_animation); +void clear_animator_flags(s32 index, s32 bits) { + ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~0x800]; -INCLUDE_ASM(s32, "B4580", play_model_animation_starting_from); + animator->flags &= ~bits; +} -INCLUDE_ASM(s32, "B4580", load_model_animator_node); +void play_model_animation(s32 index, s32 animPos) { + ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~0x800]; -INCLUDE_ASM(s32, "B4580", load_model_animator_tree); + if (animator->animationBuffer != NULL) { + animPos = (animPos & 0xFFFFFF) + (s32)animator->animationBuffer; // TODO: array access? + } + animator->animReadPos = (s8*)animPos; + animator->savedReadPos = (s8*)animPos; + animator->treeIndexPos = 0; + animator->nextUpdateTime = 1.0f; +} -INCLUDE_ASM(s32, "B4580", load_mesh_animator_node); +void play_model_animation_starting_from(s32 index, s32 animPos, s32 framesToSkip) { + s32 indexMasked = index & ~0x800; + ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[indexMasked]; + s32 i; -INCLUDE_ASM(s32, "B4580", load_mesh_animator_tree); + if (animator->animationBuffer != NULL) { + animPos = (animPos & 0xFFFFFF) + (s32)animator->animationBuffer; // TODO: array access? + } -INCLUDE_ASM(s32, "B4580", reload_mesh_animator_node); + animator->animReadPos = (s8*)animPos; + animator->savedReadPos = (s8*)animPos; + animator->treeIndexPos = 0; + animator->nextUpdateTime = 1.0f; -INCLUDE_ASM(s32, "B4580", reload_mesh_animator_tree); + for (i = 0; i < framesToSkip; i++) { + update_model_animator(indexMasked); + } +} + +void load_model_animator_node(StaticAnimatorNode* node, ModelAnimator* animator, s32 parentNodeID, s32* treeIndexToNodeIDs) { + AnimatorNodeBlueprint bp; + AnimatorNodeBlueprint* bpPtr = &bp; + AnimatorNode* newNode; + s32 i; + + if (node != NULL) { + bpPtr->displayList = node->displayList; + bpPtr->basePos.x = 0.0f; + bpPtr->basePos.y = 0.0f; + bpPtr->basePos.z = 0.0f; + bpPtr->rotation.x = ((f32) node->rot.x * 180.0) / 32767.0; + bpPtr->rotation.y = ((f32) node->rot.y * 180.0) / 32767.0; + bpPtr->rotation.z = ((f32) node->rot.z * 180.0) / 32767.0; + + newNode = add_anim_node(animator, parentNodeID, bpPtr); + + if (node->modelID != 0) { + newNode->fcData.modelID = node->modelID - 1; + newNode->flags |= 0x1000; + } + + i = 0; + while (gAnimTreeRoot[i] != node) { + i++; + } + + treeIndexToNodeIDs[i] = newNode->uniqueIndex; + + if (node->child != NULL) { + load_model_animator_node(node->child, animator, newNode->uniqueIndex, treeIndexToNodeIDs); + } + + if (node->sibling != NULL) { + load_model_animator_node(node->sibling, animator, parentNodeID, treeIndexToNodeIDs); + } + } +} + +void load_model_animator_tree(s32 index, StaticAnimatorNode** tree) { + ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~0x800]; + s32 nodeIDs[ARRAY_COUNT(animator->staticNodeIDs)]; + + if (animator != NULL && animator->flags != 0) { + gAnimTreeRoot = tree; + load_model_animator_node(*tree, animator, 0, nodeIDs); + set_animator_tree_to_node_map(animator, nodeIDs, ARRAY_COUNT(animator->staticNodeIDs)); + } +} + +void load_mesh_animator_node(StaticAnimatorNode* node, ModelAnimator* animator, s32 parentNodeID, s32* treeIndexToNodeIDs) { + if (node != NULL) { + if (node->child != NULL && parentNodeID == 0) { + load_mesh_animator_node(node->child, animator, 0, treeIndexToNodeIDs); + } else { + do { + animator->staticNodes[parentNodeID] = node; + node = node->sibling; + parentNodeID++; + } while (node != NULL); + } + } +} + +void load_mesh_animator_tree(s32 index, StaticAnimatorNode** tree) { + s32 indexMasked = index & ~0x800; + ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[indexMasked]; + s32 nodeIDs[ARRAY_COUNT(animator->staticNodeIDs)]; + s32 i; + + if (animator != NULL && animator->flags != 0) { + if ((*tree)->vertexStartOffset == 0) { + load_model_animator_tree(indexMasked, tree); + return; + } + + gAnimTreeRoot = tree; + animator->staticRoot = tree; + animator->treeIndexPos = 0; + animator->savedTreePos = 0; + + for (i = 0; i < ARRAY_COUNT(animator->staticNodes); i++) { + animator->staticNodes[i] = NULL; + } + + load_mesh_animator_node(*gAnimTreeRoot, animator, 0, nodeIDs); + animator->flags |= 0x8000; + } +} + +void reload_mesh_animator_node(StaticAnimatorNode* node, ModelAnimator* animator, s32 parentNodeID, s32* treeIndexToNodeIDs) { + AnimatorNodeBlueprint bp; + AnimatorNodeBlueprint* bpPtr = &bp; + AnimatorNode* newNode; + s32 i; + + if (node != NULL) { + bpPtr->displayList = node->displayList; + bpPtr->basePos.x = 0.0f; + bpPtr->basePos.y = 0.0f; + bpPtr->basePos.z = 0.0f; + bpPtr->rotation.x = ((f32) node->rot.x * 180.0) / 32767.0; + bpPtr->rotation.y = ((f32) node->rot.y * 180.0) / 32767.0; + bpPtr->rotation.z = ((f32) node->rot.z * 180.0) / 32767.0; + + newNode = add_anim_node(animator, parentNodeID, bpPtr); + newNode->vertexStartOffset = node->vertexStartOffset; + newNode->fcData.vtxList = node->vtxList; + + i = 0; + while (gAnimTreeRoot[i] != node) { + i++; + } + + treeIndexToNodeIDs[i] = newNode->uniqueIndex; + + if (node->child != NULL) { + reload_mesh_animator_node(node->child, animator, newNode->uniqueIndex, treeIndexToNodeIDs); + } + } +} + +void reload_mesh_animator_tree(ModelAnimator* animator) { + s32 nodeIDs[ARRAY_COUNT(animator->staticNodeIDs)]; + s32 i; + + delete_model_animator_nodes(animator); + gAnimTreeRoot = animator->staticRoot; + + for (i = 0; i < ARRAY_COUNT(animator->staticNodes); i++) { + nodeIDs[i] = 0; + } + + reload_mesh_animator_node(animator->staticNodes[animator->treeIndexPos], animator, 0, nodeIDs); + nodeIDs[0] = -1; + set_animator_tree_to_node_map(animator, nodeIDs, ARRAY_COUNT(nodeIDs)); +} INCLUDE_ASM(s32, "B4580", step_mesh_animator); diff --git a/src/C50A0.c b/src/C50A0.c index 637b595d0b..648288bbdd 100644 --- a/src/C50A0.c +++ b/src/C50A0.c @@ -187,6 +187,7 @@ INCLUDE_ASM(s32, "C50A0", item_entity_update); INCLUDE_ASM(s32, "C50A0", update_item_entities); INCLUDE_ASM(s32, "C50A0", appendGfx_item_entity); +void appendGfx_item_entity(ItemEntity* itemEntity); INCLUDE_ASM(s32, "C50A0", draw_item_entities); @@ -244,7 +245,21 @@ void remove_item_entity_by_index(s32 index) { D_801565A4 = 0; } -INCLUDE_ASM(s32, "C50A0", func_80133A94); +void func_80133A94(s32 idx, s32 itemID) { + ItemEntity* item = D_801565A0[idx]; + + item->itemID = itemID; + + item->flags |= 0x4000; + item->flags &= ~0x40000; + + if (gItemTable[itemID].typeFlags & 0x1000) { + item->flags |= 0x40000; + item->flags &= ~0x4000; + } + + item_entity_load(item); +} s32 test_item_player_collision(ItemEntity* itemEntity); INCLUDE_ASM(s32, "C50A0", test_item_player_collision); diff --git a/src/battle/partner/lakilester.c b/src/battle/partner/lakilester.c index 51032ecfe2..08a76fe5dc 100644 --- a/src/battle/partner/lakilester.c +++ b/src/battle/partner/lakilester.c @@ -37,11 +37,11 @@ ApiStatus func_80238A6C_70C77C(Evt* script, s32 isInitialCall) { INCLUDE_ASM(s32, "battle/partner/lakilester", func_80238B50_70C860); ApiStatus func_80238C14_70C924(Evt* script, s32 isInitialCall) { - s32 effect = gBattleStatus.cloudNineEffect; + EffectInstance* effect = gBattleStatus.cloudNineEffect; if (effect != NULL) { remove_effect(effect); - gBattleStatus.cloudNineEffect = 0; + gBattleStatus.cloudNineEffect = NULL; gBattleStatus.cloudNineTurnsLeft = 0; return ApiStatus_DONE2; } diff --git a/src/common/Dist3D.inc.c b/src/common/Dist3D.inc.c index 25baffb308..389e4f22d9 100644 --- a/src/common/Dist3D.inc.c +++ b/src/common/Dist3D.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(Dist3D)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/common/FadeBackgroundToBlack.inc.c b/src/common/FadeBackgroundToBlack.inc.c index 2a548889a9..b5a9f9dc33 100644 --- a/src/common/FadeBackgroundToBlack.inc.c +++ b/src/common/FadeBackgroundToBlack.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall) { if (isInitialCall) { diff --git a/src/common/FreeIcon.inc.c b/src/common/FreeIcon.inc.c index 12167eb679..d1138c17b1 100644 --- a/src/common/FreeIcon.inc.c +++ b/src/common/FreeIcon.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(FreeIcon)(Evt* script, s32 isInitialCall) { free_hud_element(evt_get_variable(script, *script->ptrReadPos)); diff --git a/src/common/GetItemEntityPosition.inc.c b/src/common/GetItemEntityPosition.inc.c index af5f734f45..f600cf4768 100644 --- a/src/common/GetItemEntityPosition.inc.c +++ b/src/common/GetItemEntityPosition.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetItemEntityPosition)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/common/GetModelPos.inc.c b/src/common/GetModelPos.inc.c index 5bee2b4e29..bfd59c602b 100644 --- a/src/common/GetModelPos.inc.c +++ b/src/common/GetModelPos.inc.c @@ -1,4 +1,5 @@ #include "common.h" +#include "model.h" ApiStatus N(GetModelPos)(Evt* script, s32 isInitialCall) { Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(script->varTable[10])); diff --git a/src/common/GetSelectedMoveID.inc.c b/src/common/GetSelectedMoveID.inc.c index 3f995bc504..7d46af3fe1 100644 --- a/src/common/GetSelectedMoveID.inc.c +++ b/src/common/GetSelectedMoveID.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetSelectedMoveID)(Evt* script, s32 isInitialCall) { evt_set_variable(script, *script->ptrReadPos, gBattleStatus.selectedMoveID); diff --git a/src/common/IsGameStatusUnkAA_1.inc.c b/src/common/IsGameStatusUnkAA_1.inc.c index 8d6d15fa35..bcda07ecbe 100644 --- a/src/common/IsGameStatusUnkAA_1.inc.c +++ b/src/common/IsGameStatusUnkAA_1.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(IsGameStatusUnkAA_1)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; diff --git a/src/common/IsSaveVar123.inc.c b/src/common/IsSaveVar123.inc.c index f69e75254e..2ff6cf6ee0 100644 --- a/src/common/IsSaveVar123.inc.c +++ b/src/common/IsSaveVar123.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(IsSaveVar123)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; diff --git a/src/common/Set80218630_Var0.inc.c b/src/common/Set80218630_Var0.inc.c index 97a132c094..8d1e4eebb9 100644 --- a/src/common/Set80218630_Var0.inc.c +++ b/src/common/Set80218630_Var0.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" extern s16 D_802809F8; diff --git a/src/common/SetBackgroundAlpha.inc.c b/src/common/SetBackgroundAlpha.inc.c index 4d864db8a3..3a3b6445d2 100644 --- a/src/common/SetBackgroundAlpha.inc.c +++ b/src/common/SetBackgroundAlpha.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SetBackgroundAlpha)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/common/StartRumbleWithParams.inc.c b/src/common/StartRumbleWithParams.inc.c index 9e64f2fea0..46a40a6a28 100644 --- a/src/common/StartRumbleWithParams.inc.c +++ b/src/common/StartRumbleWithParams.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(StartRumbleWithParams)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/common/UnkBattleFunc2.inc.c b/src/common/UnkBattleFunc2.inc.c index a2de8c9b58..7b64e4f188 100644 --- a/src/common/UnkBattleFunc2.inc.c +++ b/src/common/UnkBattleFunc2.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkBattleFunc2)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/common/UnkFloatFunc.inc.c b/src/common/UnkFloatFunc.inc.c index f8795bd531..eda07adbaa 100644 --- a/src/common/UnkFloatFunc.inc.c +++ b/src/common/UnkFloatFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFloatFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/common/UnkFloatFunc2.inc.c b/src/common/UnkFloatFunc2.inc.c index d67aa979ef..4066e855e0 100644 --- a/src/common/UnkFloatFunc2.inc.c +++ b/src/common/UnkFloatFunc2.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFloatFunc2)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/d0a70_len_4fe0.c b/src/d0a70_len_4fe0.c index d4871237cf..f3c0bb0765 100644 --- a/src/d0a70_len_4fe0.c +++ b/src/d0a70_len_4fe0.c @@ -1,8 +1,49 @@ #include "common.h" +typedef struct { + /* 0x00 */ s8 unk_00; + /* 0x01 */ u8 unk_01; + /* 0x02 */ s8 unk_02; + /* 0x03 */ s8 unk_03; + /* 0x04 */ s8 unk_04; + /* 0x05 */ s8 unk_05; + /* 0x06 */ s8 unk_06; + /* 0x07 */ char unk_07[0x1]; + /* 0x08 */ s16 unk_08; + /* 0x0A */ s16 unk_0A; + /* 0x0C */ s16 unk_0C; + /* 0x0E */ s16 unk_0E; + /* 0x10 */ s16 unk_10; + /* 0x14 */ s32 unk_14; + /* 0x18 */ char unk_18[0x4]; + /* 0x1C */ s32 unk_1C[2][4]; + /* 0x3C */ f32 unk_3C[2][4]; + /* 0x5C */ s32* unk_5C; + /* 0x60 */ s16 unk_60; + /* 0x62 */ char unk_62[0x2]; + /* 0x64 */ s32* unk_64; + /* 0x68 */ s32* unk_68; + /* 0x6C */ s32* unk_6C; + /* 0x70 */ s32* unk_70; + /* 0x74 */ s32* unk_74; + /* 0x78 */ char unk_78[0x4]; +} UnkD0A70Struct; // size = 0x7C + +typedef struct Unk8Struct { + /* 0x00 */ s32* unk_00; + /* 0x04 */ u8 unk_04; + /* 0x05 */ u8 unk_05; + /* 0x06 */ char unk_06[0x2]; +} Unk8Struct; // size = 0x8 + +typedef UnkD0A70Struct UnkD0A70StructList[90]; + s32 D_8014EE10[] = { 0x80156920, }; -s32 D_8014EE14[] = { 0x00000000, }; +s16 D_8014EE14 = 0; + +// padding +s16 D_8014EE16 = { 0x0000 }; s32 D_8014EE18[] = { 0x90909000, 0x90909000, 0xFFFFFF00, 0xFFFFFF00, 0x00007800, 0x00000000, 0xFFFFFF00, 0xFFFFFF00, 0x00008800, 0x00000000, @@ -12,7 +53,10 @@ s32 D_8014EE40[] = { 0x028001E0, 0x01FF0000, 0x028001E0, 0x01FF0000, }; s32 D_8014EE50[] = { 0x028001E0, 0x01FF0000, 0x028001E0, 0x02000000, }; -s32 D_8014EE60[] = { 0x012C0000, 0x00000000, }; +u16 D_8014EE60 = 300; + +// padding +s16 D_8014EE62[] = {0}; s32 D_8014EE68[] = { 0xD9FDF9FF, 0x00000000, 0xD9FFFFFF, 0x00200005, 0xD7000002, 0xFFFFFFFF, 0xE2001E01, 0x00000000, 0xE3000A11, 0x00082CF0, 0xDF000000, 0x00000000, @@ -32,62 +76,328 @@ s32 D_8014EF64[] = { 0x00014358, 0x00018200, 0x0001A858, 0x0001E830, 0x00029458, 0x000C0490, 0x000C49B8, 0x000C6150, 0x000CA380, 0x00000000, 0x00000000, 0x00000000, }; +extern s32* D_80156948[2]; +extern s32* D_80156950; +extern UnkD0A70StructList* D_80156954; +extern s8 D_80156958[2]; +extern s32 D_80156960[2]; +extern s32 D_80156968[2]; +extern s8 D_80156970; -#define UNKSTRUCT8013A854_SIZE 90 +extern Unk8Struct D_80156F20[8]; -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A370); +void func_8013A93C(UnkD0A70Struct*); +void func_8013A9C8(UnkD0A70Struct*); +void func_8013A9E8(UnkD0A70Struct*); +void func_8013BC88(UnkD0A70Struct*); +void func_8013C048(UnkD0A70Struct*); +void func_8013C220(UnkD0A70Struct*); +void func_8013C3F0(UnkD0A70Struct*); +void func_8013EE68(UnkD0A70Struct*); +void func_8013F1F8(UnkD0A70Struct*); -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A37C); +void func_8013A370(s16 arg0) { + D_8014EE60 = arg0; +} -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A4D0); +void func_8013A37C(void) { + s32 i; -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A610); + for (i = 0; i < ARRAY_COUNT(D_80156948); i++) { + D_80156948[i] = _heap_malloc(&gSpriteHeapPtr, D_8014EE60 * 0x10); + } -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A650); + D_80156954 = (UnkD0A70StructList*)_heap_malloc(&gSpriteHeapPtr, ARRAY_COUNT(*D_80156954) * sizeof((*D_80156954)[0])); -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A6E8); + for (i = 0; i < ARRAY_COUNT(*D_80156954); i++) { + func_8013A9E8(&(*D_80156954)[i]); + func_8013A9C8(&(*D_80156954)[i]); + } -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A704); + for (i = 0; i < ARRAY_COUNT(D_80156958); i++) { + D_80156958[i] = -1; + D_80156960[i] = 0; + D_80156968[i] = 0; + D_80156970 = 0; + } -typedef struct { - /* 0x00 */ char unk_0[0x10]; - /* 0x10 */ s16 unk_10; - /* 0x14 */ s32 unk_14; - /* 0x18 */ char unk_18[0x64]; -} UnkStruct8013A854 ; // size = 0x7C + for (i = 0; i < ARRAY_COUNT(D_80156F20); i++) { + D_80156F20[i].unk_00 = 0; + D_80156F20[i].unk_04 = 0; + D_80156F20[i].unk_05 = 0; + } -typedef UnkStruct8013A854 UnkStruct8013A854List[UNKSTRUCT8013A854_SIZE]; + D_8014EE14 = 0; + D_80156950 = D_80156948[gCurrentDisplayContextIndex]; +} -extern UnkStruct8013A854List* D_80156954[UNKSTRUCT8013A854_SIZE]; +void func_8013A4D0(void) { + s32 i; -void func_8013A854(u32 i) { + D_80156950 = D_80156948[gCurrentDisplayContextIndex]; + D_8014EE14 = 0; + func_8013A9E8(&(*D_80156954)[0]); - if (i < 90) { - UnkStruct8013A854* unkStruct80156954ListPtr = *D_80156954; - unkStruct80156954ListPtr[i].unk_14 = 0; - unkStruct80156954ListPtr[i].unk_10 = -1; + (*D_80156954)[0].unk_14 |= 1; + + for (i = 1; i < ARRAY_COUNT(*D_80156954); i++) { + if (((*D_80156954)[i].unk_14 & 1) && ((*D_80156954)[i].unk_05 != 5)) { + func_8013A93C(&(*D_80156954)[i]); + } + } + + for (i = 1; i < ARRAY_COUNT(*D_80156954); i++) { + if ((*D_80156954)[i].unk_14 & 1 && (*D_80156954)[i].unk_5C != NULL) { + s32 temp = (*D_80156954)[i].unk_06; // TODO find a better way to match + + if (temp == 11 || (*D_80156954)[i].unk_06 == 12) { + continue; + } + + general_heap_free((*D_80156954)[i].unk_5C); + (*D_80156954)[i].unk_5C = 0; + (*D_80156954)[i].unk_60 = 0; + } } } -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A888); +void func_8013A610(s32* arg0, s8 arg1) { + s32 i; -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A8E0); + for (i = 0; i < ARRAY_COUNT(D_80156F20); i++) { + if (D_80156F20[i].unk_00 == NULL) { + D_80156F20[i].unk_00 = arg0; + D_80156F20[i].unk_04 = 4; + D_80156F20[i].unk_05 = arg1; + return; + } + } +} -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A920); +void func_8013A650(void) { + s32 i; -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A93C); + for (i = 0; i < ARRAY_COUNT(D_80156F20); i++) { + if (D_80156F20[i].unk_00 != 0) { + D_80156F20[i].unk_04--; -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A9C8); + if (D_80156F20[i].unk_04 == 0) { + if (D_80156F20[i].unk_05 != 0) { + heap_free(D_80156F20[i].unk_00); + D_80156F20[i].unk_00 = NULL; + } else { + general_heap_free(D_80156F20[i].unk_00); + D_80156F20[i].unk_00 = NULL; + } -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013A9E8); + D_80156F20[i].unk_04 = 0; + D_80156F20[i].unk_05 = 0; + } + } + } +} + +void func_8013A6E8(void) { + func_8013A650(); +} + +s32 func_8013A704(s32 arg0) { + s32 count; + s32 cond; + s32 iPrev; + s32 ret; + s32 i; + + count = 0; + for (i = 1; i < ARRAY_COUNT(*D_80156954); i++) { + if (!((*D_80156954)[i].unk_14 & 1)) { + count++; + } + } + + if (count < arg0) { + return -1; + } + + ret = 0; + cond = FALSE; + count = 0; + iPrev = -1; + for (i = 1; i < ARRAY_COUNT(*D_80156954); i++) { + if (!((*D_80156954)[i].unk_14 & 1)) { + if (!cond) { + ret = i; + cond = TRUE; + } else { + (*D_80156954)[iPrev].unk_10 = i; + } + + (*D_80156954)[i].unk_00 = i; + func_8013A9E8(&(*D_80156954)[i]); + count++; + (*D_80156954)[i].unk_14 |= 1; + iPrev = i; + if (count == arg0) { + (*D_80156954)[i].unk_10 = -1; + break; + } + } + } + + return ret; +} + +void func_8013A854(u32 idx) { + if (idx < 90) { + (*D_80156954)[idx].unk_14 = 0; + (*D_80156954)[idx].unk_10 = -1; + } +} + +void func_8013A888(u32 idx) { + if (idx < 90) { + s32 temp_s0; + + do { + temp_s0 = (*D_80156954)[idx].unk_10; + func_8013A854(idx); + idx = temp_s0; + } while (temp_s0 != -1); + } +} + +s16 func_8013A8E0(s32 idx) { + // TODO find better match + if ((u32)idx >= 90) { + return -1; + } + + if (idx >= 90) { + return 0xFF; + } else { + return (*D_80156954)[idx].unk_10; + } +} + +UnkD0A70Struct* func_8013A920(s32 idx) { + return &(*D_80156954)[idx]; +} + +void func_8013A93C(UnkD0A70Struct* arg0) { + if (arg0->unk_64 != 0) { + arg0->unk_64 = 0; + } + if (arg0->unk_68 != 0) { + func_8013A610(arg0->unk_68, 1); + arg0->unk_68 = 0; + } + if (arg0->unk_6C != 0) { + func_8013A610(arg0->unk_6C, 1); + arg0->unk_6C = 0; + } + if (arg0->unk_70 != 0) { + func_8013A610(arg0->unk_70, 1); + arg0->unk_70 = 0; + } + if (arg0->unk_74 != 0) { + func_8013A610(arg0->unk_74, 1); + arg0->unk_74 = 0; + } +} + +void func_8013A9C8(UnkD0A70Struct* arg0) { + arg0->unk_64 = 0; + arg0->unk_68 = 0; + arg0->unk_6C = 0; + arg0->unk_70 = 0; + arg0->unk_74 = 0; + arg0->unk_5C = 0; + arg0->unk_60 = 0; +} + +void func_8013A9E8(UnkD0A70Struct* arg0) { + s32 i; + s32 j; + + arg0->unk_10 = -1; + arg0->unk_05 = 0; + arg0->unk_06 = 0; + arg0->unk_14 = 0; + arg0->unk_01 = 0; + arg0->unk_02 = 0; + arg0->unk_08 = 0; + arg0->unk_0A = 0; + arg0->unk_0C = 0; + arg0->unk_0E = 0; + arg0->unk_1C[0][3] = 255; + arg0->unk_1C[1][3] = 255; + arg0->unk_03 = 0; + arg0->unk_04 = 0; + arg0->unk_08 = 0; + arg0->unk_0A = 0; + + for (i = 0; i < ARRAY_COUNT(arg0->unk_1C); i++) { + for (j = 0; j < ARRAY_COUNT(arg0->unk_1C[0]); j++) { + arg0->unk_1C[i][j] = 0; + } + } + + for (i = 0; i < ARRAY_COUNT(arg0->unk_3C); i++) { + for (j = 0; j < ARRAY_COUNT(arg0->unk_3C[0]); j++) { + arg0->unk_3C[i][j] = 0; + } + } +} INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013AA9C); -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013AF20); +void func_8013AF20(s32 idx, u16 arg1, s32 arg2) { + if ((*D_80156954)[idx].unk_14 & 1) { + if (arg2 != 0) { + (*D_80156954)[idx].unk_14 |= arg1; + } else { + (*D_80156954)[idx].unk_14 &= ~arg1; + } + } +} INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013AF70); -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013B0EC); +void func_8013B0EC(UnkD0A70Struct* arg0) { + switch (arg0->unk_01) { + case 3: + if (arg0->unk_1C[1][2] == 0) { + arg0->unk_03 = 1; + arg0->unk_04 = 16; + } else { + arg0->unk_03 = 1; + arg0->unk_04 = 1; + } + case 1: + func_8013C048(arg0); + break; + case 2: + func_8013C3F0(arg0); + break; + case 0: + case 4: + func_8013BC88(arg0); + break; + default: + return; + } + + if (arg0->unk_05 == 4) { + func_8013EE68(arg0); + } + + switch (arg0->unk_06) { + case 11: + case 12: + func_8013F1F8(arg0); + break; + } +} INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013B1B0); @@ -107,7 +417,11 @@ INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013E2F0); INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013E904); -INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013EE48); +void func_8013EE48(UnkD0A70Struct* arg0) { + arg0->unk_3C[0][0] = 0.0f; + arg0->unk_3C[0][1] = 50.0f; + arg0->unk_3C[0][2] = 30.0f; +} INCLUDE_ASM(s32, "d0a70_len_4fe0", func_8013EE68); diff --git a/src/e0b30_len_b80.c b/src/e0b30_len_b80.c index 03dc45de35..7ccac55b09 100644 --- a/src/e0b30_len_b80.c +++ b/src/e0b30_len_b80.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" MusicSettings D_8014F6F0 = { .flags = 0, diff --git a/src/encounter_api.c b/src/encounter_api.c index 6d3ff9ded0..13707882b9 100644 --- a/src/encounter_api.c +++ b/src/encounter_api.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" ApiStatus SetEncounterStatusFlags(Evt* script, s32 isInitialCall) { diff --git a/src/entity/BlueWarpPipe.c b/src/entity/BlueWarpPipe.c index c7737cd6a9..05bb842a74 100644 --- a/src/entity/BlueWarpPipe.c +++ b/src/entity/BlueWarpPipe.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "sprite.h" typedef struct struct802E89B0 { diff --git a/src/entity/ItemBlock.c b/src/entity/ItemBlock.c index f5a56eb746..fba41310de 100644 --- a/src/entity/ItemBlock.c +++ b/src/entity/ItemBlock.c @@ -210,7 +210,7 @@ void entity_HiddenItemBlock_init(Entity* entity) { } void entity_ItemlessBlock_init(Entity* entity) { - AnimatedMesh* animMesh; + ModelAnimator* animMesh; entity_base_block_init(entity); entity->renderSetupFunc = entity_ItemBlock_setupGfx; diff --git a/src/entity/WoodenCrate.c b/src/entity/WoodenCrate.c index f757356f22..360f201666 100644 --- a/src/entity/WoodenCrate.c +++ b/src/entity/WoodenCrate.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" typedef struct struct802E7DE0 { /* 0x000 */ s32 unk_000; diff --git a/src/evt/cam_api.c b/src/evt/cam_api.c index 7149508644..017c251e35 100644 --- a/src/evt/cam_api.c +++ b/src/evt/cam_api.c @@ -48,8 +48,7 @@ ApiStatus SetCamPerspective(Evt* script, s32 isInitialCall) { f32 vfov = evt_get_float_variable(script, *args++); s16 nearClip = evt_get_variable(script, *args++); s16 farClip = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; camera->farClip = farClip; camera->updateMode = mode; @@ -64,8 +63,7 @@ ApiStatus func_802CA90C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); s16 mode = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; camera->updateMode = mode; camera->unk_06 = 0; @@ -122,8 +120,7 @@ ApiStatus func_802CABE8(Evt* script, s32 isInitialCall) { s32 value2 = evt_get_variable(script, *args++); s32 value3 = evt_get_variable(script, *args++); s16 value4 = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; camera->unk_22 = value4; camera->unk_1C = value1; @@ -139,8 +136,7 @@ ApiStatus func_802CACC0(Evt* script, s32 isInitialCall) { s32 value2 = evt_get_variable(script, *args++); s32 value3 = evt_get_variable(script, *args++); s16 zoomPercent = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; camera->zoomPercent = zoomPercent; camera->unk_24 = value1; @@ -155,8 +151,7 @@ ApiStatus SetCamBGColor(Evt* script, s32 isInitialCall) { s16 r = evt_get_variable(script, *args++); s16 g = evt_get_variable(script, *args++); s16 b = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; camera->bgColor[0] = r; camera->bgColor[1] = g; @@ -170,8 +165,7 @@ ApiStatus func_802CAE50(Evt* script, s32 isInitialCall) { s32 value1 = evt_get_variable(script, *args++); s32 value2 = evt_get_variable(script, *args++); s32 value3 = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; camera->unk_54 = value1; camera->unk_58 = value2; @@ -185,8 +179,7 @@ ApiStatus SetCamTarget(Evt* script, s32 isInitialCall) { s32 x = evt_get_variable(script, *args++); s32 y = evt_get_variable(script, *args++); s32 z = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; camera->targetPos.x = x; camera->targetPos.y = y; @@ -221,8 +214,7 @@ ApiStatus SetCamLeadPlayer(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); s32 enabled = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; if (enabled) { camera->flags |= CAM_FLAG_LEAD_PLAYER; @@ -236,8 +228,7 @@ ApiStatus func_802CB710(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); f32 value = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; camera->unk_520 = (value / 100.0f); return ApiStatus_DONE2; @@ -248,8 +239,7 @@ ApiStatus PanToTarget(Evt* script, s32 isInitialCall) { s32 id = evt_get_variable(script, *args++); f32 panPhase = evt_get_float_variable(script, *args++); s32 targetType = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; camera->unk_506 = 1; if (targetType != 0) { @@ -270,8 +260,7 @@ INCLUDE_ASM(s32, "evt/cam_api", LoadSettings, Evt* script, s32 isInitialCall); ApiStatus SetCamType(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; s32 controllerType = evt_get_variable(script, *args++); s32 enabled = evt_get_variable(script, *args++); @@ -283,8 +272,7 @@ ApiStatus SetCamType(Evt* script, s32 isInitialCall) { ApiStatus SetCamPitch(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; f32 boomPitch = evt_get_float_variable(script, *args++); f32 viewPitch = evt_get_float_variable(script, *args++); @@ -296,8 +284,7 @@ ApiStatus SetCamPitch(Evt* script, s32 isInitialCall) { ApiStatus SetCamDistance(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; f32 boomLength = evt_get_float_variable(script, *args++); camera->controlSettings.boomLength = boomLength; @@ -307,8 +294,7 @@ ApiStatus SetCamDistance(Evt* script, s32 isInitialCall) { ApiStatus SetCamPosA(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; f32 x = evt_get_float_variable(script, *args++); f32 z = evt_get_float_variable(script, *args++); @@ -320,8 +306,7 @@ ApiStatus SetCamPosA(Evt* script, s32 isInitialCall) { ApiStatus SetCamPosB(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; f32 x = evt_get_float_variable(script, *args++); f32 z = evt_get_float_variable(script, *args++); @@ -333,8 +318,7 @@ ApiStatus SetCamPosB(Evt* script, s32 isInitialCall) { ApiStatus SetCamPosC(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; f32 y1 = evt_get_float_variable(script, *args++); f32 y2 = evt_get_float_variable(script, *args++); @@ -346,8 +330,7 @@ ApiStatus SetCamPosC(Evt* script, s32 isInitialCall) { ApiStatus SetPanTarget(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; f32 x = evt_get_float_variable(script, *args++); f32 y = evt_get_float_variable(script, *args++); f32 z = evt_get_float_variable(script, *args++); @@ -363,8 +346,7 @@ ApiStatus SetCamSpeed(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); f32 speed = evt_get_float_variable(script, *args++); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; camera->moveSpeed = speed; return ApiStatus_DONE2; @@ -375,8 +357,7 @@ ApiStatus GetCamType(Evt* script, s32 isInitialCall) { s32 id = evt_get_variable(script, *args++); Bytecode outVar1 = *args++; Bytecode outVar2 = *args++; - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; evt_set_variable(script, outVar1, camera->controlSettings.type); evt_set_variable(script, outVar2, camera->controlSettings.flag); @@ -388,8 +369,7 @@ ApiStatus GetCamPitch(Evt* script, s32 isInitialCall) { s32 id = evt_get_variable(script, *args++); Bytecode outVar1 = *args++; Bytecode outVar2 = *args++; - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; evt_set_float_variable(script, outVar1, camera->controlSettings.boomPitch); evt_set_float_variable(script, outVar2, camera->controlSettings.viewPitch); @@ -400,8 +380,7 @@ ApiStatus GetCamDistance(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); Bytecode outVar1 = *args++; - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; evt_set_float_variable(script, outVar1, camera->controlSettings.boomLength); return ApiStatus_DONE2; @@ -412,8 +391,7 @@ ApiStatus GetCamPosA(Evt* script, s32 isInitialCall) { s32 id = evt_get_variable(script, *args++); Bytecode outVar1 = *args++; Bytecode outVar2 = *args++; - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; evt_set_float_variable(script, outVar1, camera->controlSettings.posA.x); evt_set_float_variable(script, outVar2, camera->controlSettings.posA.z); @@ -425,8 +403,7 @@ ApiStatus GetCamPosB(Evt* script, s32 isInitialCall) { s32 id = evt_get_variable(script, *args++); Bytecode outVar1 = *args++; Bytecode outVar2 = *args++; - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; evt_set_float_variable(script, outVar1, camera->controlSettings.posB.x); evt_set_float_variable(script, outVar2, camera->controlSettings.posB.z); @@ -438,8 +415,7 @@ ApiStatus GetCamPosC(Evt* script, s32 isInitialCall) { s32 id = evt_get_variable(script, *args++); Bytecode outVar1 = *args++; Bytecode outVar2 = *args++; - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; evt_set_float_variable(script, outVar1, camera->controlSettings.posA.y); evt_set_float_variable(script, outVar2, camera->controlSettings.posB.y); @@ -452,8 +428,7 @@ ApiStatus GetCamPosition(Evt* script, s32 isInitialCall) { Bytecode outVar1 = *args++; Bytecode outVar2 = *args++; Bytecode outVar3 = *args++; - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; evt_set_float_variable(script, outVar1, camera->movePos.x); evt_set_float_variable(script, outVar2, camera->movePos.y); @@ -465,8 +440,7 @@ ApiStatus WaitForCam(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, args[0]); f32 endInterpValue = evt_get_float_variable(script, args[1]); - Camera* cameras = gCameras; - Camera* camera = &cameras[id]; + Camera* camera = &gCameras[id]; if (isInitialCall || !(endInterpValue <= camera->interpAlpha)) { return ApiStatus_BLOCK; @@ -479,243 +453,3 @@ INCLUDE_ASM(s32, "evt/cam_api", SetCamProperties, Evt* script, s32 isInitialCall INCLUDE_ASM(s32, "evt/cam_api", AdjustCam, Evt* script, s32 isInitialCall); INCLUDE_ASM(s32, "evt/cam_api", ResetCam, Evt* script, s32 isInitialCall); - -void update_animated_models(void) { - s32 i; - - for (i = 0; i < MAX_ANIMATED_MODELS; i++) { - AnimatedModel* anim = (*gCurrentMeshAnimationListPtr)[i]; - - if (anim->animModelID >= 0) { - func_8011EA54(anim->animModelID, &anim->mtx); - } - } -} - -INCLUDE_ASM(s32, "evt/cam_api", render_animated_models); - -ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall) { - if (!gGameStatusPtr->isBattle) { - gCurrentMeshAnimationListPtr = &gWorldMeshAnimationList; - } else { - gCurrentMeshAnimationListPtr = &gBattleMeshAnimationList; - } - - return ApiStatus_DONE2; -} - -ApiStatus LoadAnimatedModel(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - s32 var1 = evt_get_variable(script, *args++); - AnimatedModel* animModel = (*gCurrentMeshAnimationListPtr)[index]; - s32 animModelID = create_model_animator(0); - - load_model_animator_tree(animModelID, var1); - animModel->animModelID = animModelID; - animModel->pos.x = 0; - animModel->pos.y = 0; - animModel->pos.z = 0; - animModel->rot.x = 0; - animModel->rot.y = 0; - animModel->rot.z = 0; - animModel->scale.x = 1.0f; - animModel->scale.y = 1.0f; - animModel->scale.z = 1.0f; - animModel->currentAnimData = NULL; - guMtxIdent(&animModel->mtx); - - return ApiStatus_DONE2; -} - -ApiStatus LoadAnimatedMesh(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - s32 var1 = evt_get_variable(script, *args++); - AnimatedModel* animModel = (*gCurrentMeshAnimationListPtr)[index]; - s32 animModelID = create_model_animator(0); - - load_mesh_animator_tree(animModelID, var1); - animModel->animModelID = animModelID; - animModel->pos.x = 0; - animModel->pos.y = 0; - animModel->pos.z = 0; - animModel->rot.x = 0; - animModel->rot.y = 0; - animModel->rot.z = 0; - animModel->scale.x = 1.0f; - animModel->scale.y = 1.0f; - animModel->scale.z = 1.0f; - animModel->currentAnimData = NULL; - guMtxIdent(&animModel->mtx); - - return ApiStatus_DONE2; -} - -ApiStatus PlayModelAnimation(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - s32 var2 = evt_get_variable(script, *args++); - AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; - - model->currentAnimData = var2; - play_model_animation(model->animModelID, var2); - - return ApiStatus_DONE2; -} - -ApiStatus PlayModelAnimationStartingFrom(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - s32 var2 = evt_get_variable(script, *args++); - s32 var3 = evt_get_variable(script, *args++); - AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; - - model->currentAnimData = var2; - play_model_animation_starting_from(model->animModelID, var2, var3); - - return ApiStatus_DONE2; -} - -ApiStatus ChangeModelAnimation(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - s32 var2 = evt_get_variable(script, *args++); - AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; - - if (model->currentAnimData == var2) { - return ApiStatus_DONE2; - } - - model->currentAnimData = var2; - play_model_animation(model->animModelID, var2); - return ApiStatus_DONE2; -} - -ApiStatus SetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - f32 x = evt_get_float_variable(script, *args++); - f32 y = evt_get_float_variable(script, *args++); - f32 z = evt_get_float_variable(script, *args++); - AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; - - model->pos.x = x; - model->pos.y = y; - model->pos.z = z; - - return ApiStatus_DONE2; -} - -ApiStatus GetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - s32 outX = *args++; - s32 outY = *args++; - s32 outZ = *args++; - AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; - - evt_set_float_variable(script, outX, model->pos.x); - evt_set_float_variable(script, outY, model->pos.y); - evt_set_float_variable(script, outZ, model->pos.z); - - return ApiStatus_DONE2; -} - -ApiStatus AddAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - f32 x = evt_get_float_variable(script, *args++); - f32 y = evt_get_float_variable(script, *args++); - f32 z = evt_get_float_variable(script, *args++); - AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; - - model->pos.x += x; - model->pos.y += y; - model->pos.z += z; - - return ApiStatus_DONE2; -} - -ApiStatus SetAnimatedModelRootRotation(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - f32 x = evt_get_float_variable(script, *args++); - f32 y = evt_get_float_variable(script, *args++); - f32 z = evt_get_float_variable(script, *args++); - AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; - - model->rot.x = x; - model->rot.y = y; - model->rot.z = z; - - return ApiStatus_DONE2; -} - -ApiStatus SetAnimatedModelRootScale(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - f32 x = evt_get_float_variable(script, *args++); - f32 y = evt_get_float_variable(script, *args++); - f32 z = evt_get_float_variable(script, *args++); - AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; - - model->scale.x = x; - model->scale.y = y; - model->scale.z = z; - - return ApiStatus_DONE2; -} - -ApiStatus SetAnimatedModelRenderMode(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - s32 renderMode = evt_get_float_variable(script, *args++); - - get_animator_by_index((*gCurrentMeshAnimationListPtr)[index]->animModelID)->renderMode = renderMode; - return ApiStatus_DONE2; -} - -ApiStatus DeleteAnimatedModel(Evt* script, s32 isInitialCall) { - AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[evt_get_variable(script, *script->ptrReadPos)]; - - delete_model_animator(get_animator_by_index(model->animModelID)); - model->animModelID = -1; - return ApiStatus_DONE2; -} - -ApiStatus SetAnimatorFlags(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 index = evt_get_variable(script, *args++); - s32 a1 = *args++; - s32 enable = evt_get_variable(script, *args++); - AnimatedMesh* animMesh = get_animator_by_index((*gCurrentMeshAnimationListPtr)[index]->animModelID); - - if (enable) { - animMesh->flags |= a1; - } else { - animMesh->flags &= ~a1; - } - - return ApiStatus_DONE2; -} - -INCLUDE_ASM(s32, "evt/cam_api", reset_model_animators); - -void init_model_animators(void) { - if (!gGameStatusPtr->isBattle) { - gCurrentMeshAnimationListPtr = &gWorldMeshAnimationList; - } else { - gCurrentMeshAnimationListPtr = &gBattleMeshAnimationList; - } -} - -INCLUDE_ASM(s32, "evt/cam_api", GetAnimatedNodePosition); - -INCLUDE_ASM(s32, "evt/cam_api", GetAnimatedNodeRotation); - -INCLUDE_ASM(s32, "evt/cam_api", GetAnimatedPositionByTreeIndex); - -INCLUDE_ASM(s32, "evt/cam_api", GetAnimatedRotationByTreeIndex); - -INCLUDE_ASM(s32, "evt/cam_api", SetAnimatedNodeFlags); diff --git a/src/evt/map_api.c b/src/evt/map_api.c index 624641b679..add44e2807 100644 --- a/src/evt/map_api.c +++ b/src/evt/map_api.c @@ -1,4 +1,5 @@ #include "common.h" +#include "model.h" typedef struct LavaReset { /* 0x00 */ s32 colliderID; diff --git a/src/evt/model_api.c b/src/evt/model_api.c new file mode 100644 index 0000000000..7c99b42f19 --- /dev/null +++ b/src/evt/model_api.c @@ -0,0 +1,243 @@ +#include "model.h" + +void update_animated_models(void) { + s32 i; + + for (i = 0; i < MAX_ANIMATED_MODELS; i++) { + AnimatedModel* anim = (*gCurrentMeshAnimationListPtr)[i]; + + if (anim->animModelID >= 0) { + update_model_animator_with_transform(anim->animModelID, &anim->mtx); + } + } +} + +INCLUDE_ASM(s32, "evt/model_api", render_animated_models); + +// split here? + +ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall) { + if (!gGameStatusPtr->isBattle) { + gCurrentMeshAnimationListPtr = &gWorldMeshAnimationList; + } else { + gCurrentMeshAnimationListPtr = &gBattleMeshAnimationList; + } + + return ApiStatus_DONE2; +} + +ApiStatus LoadAnimatedModel(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + s32 var1 = evt_get_variable(script, *args++); + AnimatedModel* animModel = (*gCurrentMeshAnimationListPtr)[index]; + s32 animModelID = create_model_animator(0); + + load_model_animator_tree(animModelID, var1); + animModel->animModelID = animModelID; + animModel->pos.x = 0; + animModel->pos.y = 0; + animModel->pos.z = 0; + animModel->rot.x = 0; + animModel->rot.y = 0; + animModel->rot.z = 0; + animModel->scale.x = 1.0f; + animModel->scale.y = 1.0f; + animModel->scale.z = 1.0f; + animModel->currentAnimData = NULL; + guMtxIdent(&animModel->mtx); + + return ApiStatus_DONE2; +} + +ApiStatus LoadAnimatedMesh(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + s32 var1 = evt_get_variable(script, *args++); + AnimatedModel* animModel = (*gCurrentMeshAnimationListPtr)[index]; + s32 animModelID = create_model_animator(0); + + load_mesh_animator_tree(animModelID, var1); + animModel->animModelID = animModelID; + animModel->pos.x = 0; + animModel->pos.y = 0; + animModel->pos.z = 0; + animModel->rot.x = 0; + animModel->rot.y = 0; + animModel->rot.z = 0; + animModel->scale.x = 1.0f; + animModel->scale.y = 1.0f; + animModel->scale.z = 1.0f; + animModel->currentAnimData = NULL; + guMtxIdent(&animModel->mtx); + + return ApiStatus_DONE2; +} + +ApiStatus PlayModelAnimation(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + s32 var2 = evt_get_variable(script, *args++); + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; + + model->currentAnimData = var2; + play_model_animation(model->animModelID, var2); + + return ApiStatus_DONE2; +} + +ApiStatus PlayModelAnimationStartingFrom(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + s32 var2 = evt_get_variable(script, *args++); + s32 var3 = evt_get_variable(script, *args++); + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; + + model->currentAnimData = var2; + play_model_animation_starting_from(model->animModelID, var2, var3); + + return ApiStatus_DONE2; +} + +ApiStatus ChangeModelAnimation(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + s32 var2 = evt_get_variable(script, *args++); + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; + + if (model->currentAnimData == var2) { + return ApiStatus_DONE2; + } + + model->currentAnimData = var2; + play_model_animation(model->animModelID, var2); + return ApiStatus_DONE2; +} + +ApiStatus SetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + f32 x = evt_get_float_variable(script, *args++); + f32 y = evt_get_float_variable(script, *args++); + f32 z = evt_get_float_variable(script, *args++); + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; + + model->pos.x = x; + model->pos.y = y; + model->pos.z = z; + + return ApiStatus_DONE2; +} + +ApiStatus GetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + s32 outX = *args++; + s32 outY = *args++; + s32 outZ = *args++; + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; + + evt_set_float_variable(script, outX, model->pos.x); + evt_set_float_variable(script, outY, model->pos.y); + evt_set_float_variable(script, outZ, model->pos.z); + + return ApiStatus_DONE2; +} + +ApiStatus AddAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + f32 x = evt_get_float_variable(script, *args++); + f32 y = evt_get_float_variable(script, *args++); + f32 z = evt_get_float_variable(script, *args++); + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; + + model->pos.x += x; + model->pos.y += y; + model->pos.z += z; + + return ApiStatus_DONE2; +} + +ApiStatus SetAnimatedModelRootRotation(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + f32 x = evt_get_float_variable(script, *args++); + f32 y = evt_get_float_variable(script, *args++); + f32 z = evt_get_float_variable(script, *args++); + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; + + model->rot.x = x; + model->rot.y = y; + model->rot.z = z; + + return ApiStatus_DONE2; +} + +ApiStatus SetAnimatedModelRootScale(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + f32 x = evt_get_float_variable(script, *args++); + f32 y = evt_get_float_variable(script, *args++); + f32 z = evt_get_float_variable(script, *args++); + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; + + model->scale.x = x; + model->scale.y = y; + model->scale.z = z; + + return ApiStatus_DONE2; +} + +ApiStatus SetAnimatedModelRenderMode(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + s32 renderMode = evt_get_float_variable(script, *args++); + + get_animator_by_index((*gCurrentMeshAnimationListPtr)[index]->animModelID)->renderMode = renderMode; + return ApiStatus_DONE2; +} + +ApiStatus DeleteAnimatedModel(Evt* script, s32 isInitialCall) { + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[evt_get_variable(script, *script->ptrReadPos)]; + + delete_model_animator(get_animator_by_index(model->animModelID)); + model->animModelID = -1; + return ApiStatus_DONE2; +} + +ApiStatus SetAnimatorFlags(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = evt_get_variable(script, *args++); + s32 a1 = *args++; + s32 enable = evt_get_variable(script, *args++); + ModelAnimator* animMesh = get_animator_by_index((*gCurrentMeshAnimationListPtr)[index]->animModelID); + + if (enable) { + animMesh->flags |= a1; + } else { + animMesh->flags &= ~a1; + } + + return ApiStatus_DONE2; +} + +INCLUDE_ASM(s32, "evt/model_api", reset_model_animators); + +void init_model_animators(void) { + if (!gGameStatusPtr->isBattle) { + gCurrentMeshAnimationListPtr = &gWorldMeshAnimationList; + } else { + gCurrentMeshAnimationListPtr = &gBattleMeshAnimationList; + } +} + +INCLUDE_ASM(s32, "evt/model_api", GetAnimatedNodePosition); + +INCLUDE_ASM(s32, "evt/model_api", GetAnimatedNodeRotation); + +INCLUDE_ASM(s32, "evt/model_api", GetAnimatedPositionByTreeIndex); + +INCLUDE_ASM(s32, "evt/model_api", GetAnimatedRotationByTreeIndex); + +INCLUDE_ASM(s32, "evt/model_api", SetAnimatedNodeFlags); diff --git a/src/evt/npc_api.c b/src/evt/npc_api.c index f9425689ed..144f48cb49 100644 --- a/src/evt/npc_api.c +++ b/src/evt/npc_api.c @@ -1,5 +1,4 @@ #include "common.h" -#include "map.h" #include "npc.h" extern s32 D_802DAE40; diff --git a/src/evt/player_api.c b/src/evt/player_api.c index 8fc877b1f9..91f081c1df 100644 --- a/src/evt/player_api.c +++ b/src/evt/player_api.c @@ -1,4 +1,5 @@ #include "common.h" +#include "npc.h" #include "sprite.h" Npc* playerNpc = (Npc*) 0x802DB270; // XXX: raw ptr diff --git a/src/npc.c b/src/npc.c index 642329415b..1fd0a61c23 100644 --- a/src/npc.c +++ b/src/npc.c @@ -1,5 +1,4 @@ #include "common.h" -#include "map.h" #include "npc.h" #include "effects.h" #include "sprite.h" @@ -1625,7 +1624,7 @@ void draw_first_strike_ui(void) { void npc_dyn_entity_draw_no_op(void) { } -void make_npcs(s8 flags, s8 mapID, s32* npcGroupList) { +void make_npcs(s32 flags, s32 mapID, s32* npcGroupList) { EncounterStatus* currentEncounter = &gCurrentEncounter; s32 i; s32 j; diff --git a/src/npc.h b/src/npc.h deleted file mode 100644 index 265095f9c5..0000000000 --- a/src/npc.h +++ /dev/null @@ -1,268 +0,0 @@ -#ifndef _NPC_H_ -#define _NPC_H_ - -#include "common.h" -#include "map.h" // TODO move npc-related structs here - -/// The default Npc::onUpdate and Npc::onRender callback. -void STUB_npc_callback(void); - -void npc_dyn_entity_draw_no_op(void); - -void mtx_ident_mirror_y(Matrix4f mtx); - -void clear_npcs(void); - -/// Points the current NPC list to the world or battle lists depending on game state. -void init_npc_list(void); - -/// Iterates over the NPC list, doing absolutely nothing. -/// Presumably did something once upon a time but got commented out. -void npc_iter_no_op(void); - -s32 _create_npc(NpcBlueprint* blueprint, s32** animList, s32 skipLoadingAnims); - -s32 _create_npc_basic(NpcBlueprint* blueprint); - -s32 _create_npc_standard(NpcBlueprint* blueprint, s32** animList); - -void _create_npc_partner(NpcBlueprint* blueprint); - -void free_npc_by_index(s32 listIndex); - -void free_npc(Npc* npc); - -Npc* get_npc_by_index(s32 listIndex); - -void npc_do_world_collision(Npc* npc); - -void npc_do_other_npc_collision(Npc* npc); - -/// @returns TRUE if a collision occurred -s32 npc_do_player_collision(Npc* npc); - -void npc_do_gravity(Npc* npc); - -s32 func_800397E8(Npc* npc, f32 arg1); - -/// Updates all NPCs. -void update_npcs(void); - -f32 npc_get_render_yaw(); - -void appendGfx_npc(Npc* npc); - -/// Renders all NPCs. -void render_npcs(void); - -void npc_move_heading(Npc* npc, f32 speed, f32 yaw); - -Npc* get_npc_unsafe(s32 npcID); - -/// @returns NULL if not found -Npc* get_npc_safe(s32 npcID); - -void enable_npc_shadow(Npc* npc); - -void disable_npc_shadow(Npc* npc); - -void update_npc_blur(Npc* npc); - -void appendGfx_npc_blur(Npc* npc); - -void npc_enable_collisions(void); - -void npc_disable_collisions(void); - -void func_8003B1A8(void); - -void npc_reload_all(void); - -void set_npc_yaw(Npc* npc, f32 yaw); - -void npc_set_palswap_mode_A(Npc* npc, s32 arg1); - -void npc_set_palswap_mode_B(Npc* npc, s32 arg1); - -void func_8003B420(Npc* npc); - -void npc_set_palswap_1(Npc* npc, s32 palIndexA, s32 palIndexB, s32 timeHoldA, s32 timeAB); - -void npc_set_palswap_2(Npc* npc, s32 timeHoldB, s32 timeBA, s32 palIndexC, s32 palIndexD); - -void npc_draw_with_palswap(Npc* npc, s32 arg1, s32 arg2); - -void npc_draw_palswap_mode_0(Npc* npc, s32 arg1, s32 arg2); - -s32 npc_draw_palswap_mode_1(Npc*, s32, s32); - -s32 npc_blend_palette_colors(void); - -s32 npc_draw_palswap_mode_2(Npc*, s32, s32, s32); - -s32 npc_draw_palswap_mode_4(Npc*, s32, s32); - -void npc_set_decoration(Npc* npc, s32 idx, s32 decorationType); - -void npc_remove_decoration(Npc* npc, s32 idx); - -s32 npc_update_decorations(Npc* npc); - -void npc__remove_decoration(Npc* npc, s32 idx); - -void npc_reset_current_decoration(Npc* npc, s32 idx); - -void npc_update_decoration_none(Npc* npc, s32 idx); - -void npc_remove_decoration_none(Npc* npc, s32 idx); - -void npc_update_decoration_bowser_aura(Npc* npc, s32 idx); - -void npc_remove_decoration_bowser_aura(Npc* npc, s32 idx); - -void npc_update_decoration_sweat(Npc* npc, s32 idx); - -void npc_remove_decoration_sweat(Npc* npc, s32 idx); - -void npc_update_decoration_seeing_stars(Npc* npc, s32 idx); - -void npc_remove_decoration_seeing_stars(Npc* npc, s32 idx); - -void npc_update_decoration_glow_in_front(Npc* npc, s32 idx); - -void npc_remove_decoration_glow_in_front(Npc* npc, s32 idx); - -void npc_update_decoration_glow_behind(Npc* npc, s32 idx); - -void npc_remove_decoration_glow_behind(Npc* npc, s32 idx); - -void npc_update_decoration_charged(Npc* npc, s32 idx); - -void npc_remove_decoration_charged(Npc* npc, s32 idx); - -void npc__reset_current_decoration(Npc* npc, s32 idx); - -/// Finds the closest NPC to a given point within a radius. Ignores Y position. -/// -/// NPCs with NPC_FLAG_PARTICLE set are ignored. -/// See also npc_find_closest_simple(), which requires that NPC_FLAG_PARTICLE be set. -/// -/// @param x X position -/// @param y Y position (unused) -/// @param z Z position -/// @param radius No NPCs further than this distance will be considered -/// -/// @returns NULL if there are no NPCs within radius -Npc* npc_find_closest(f32 x, f32 y, f32 z, f32 radius); - -/// Finds the closest simple-hitbox NPC to a given point within a radius. Ignores Y position. -/// -/// Only NPCs with NPC_FLAG_PARTICLE set are considered. -/// See also npc_find_closest(), which requires that NPC_FLAG_PARTICLE be unset. -/// -/// @param x X position -/// @param y Y position (unused) -/// @param z Z position -/// @param radius No NPCs further than this distance will be considered -/// -/// @returns NULL if there are no NPCs within radius -Npc* npc_find_closest_simple(f32 x, f32 y, f32 z, f32 radius); - -//s32 npc_find_standing_on_entity(); - -s32 npc_get_collider_below(Npc* npc); - -void func_8003D3BC(Npc* npc); - -void func_8003D624(Npc* npc, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6); - -void func_8003D660(Npc* npc, s32 arg1); - -void func_8003D788(Npc* npc, s32 arg1); - -void func_8003DA38(Npc* npc, s32 arg1); - -s32 func_8003DC38(); - -void func_8003DFA0(Npc* npc); - -void func_8003E0D4(); - -void func_8003E1D0(Npc* npc); - -/// Duplicate of set_defeated(). -void COPY_set_defeated(s32 mapID, s32 encounterID); - -void init_encounter_status(void); - -void clear_encounter_status(void); - -void func_8003E50C(void); - -void func_8003E514(s8 arg0); - -void update_encounters(void); - -void draw_encounter_ui(void); - -void draw_first_strike_ui(void); - -void npc_dyn_entity_draw_no_op(void); - -void make_npcs(s8 flags, s8 mapID, s32* npcGroupList); - -s32 kill_encounter(Enemy* enemy); - -void kill_enemy(Enemy* enemy); - -/// Binds the specified ai script to the specified enemy -/// -/// @param enemy pointer to the enemy to bind the script to -/// @param aiScriptBytecode pointer to the script to be bound. -s32 bind_enemy_ai(Enemy* enemy, EvtSource* aiScriptBytecode); - -/// Binds the specified auxillary script to the specified enemy -/// -/// @param enemy pointer to the enemy to bind the script to -/// @param auxScriptBytecode pointer to the script to be bound. -s32 bind_enemy_aux(Enemy* enemy, EvtSource* auxScriptBytecode); - -/// Binds the specified interact script to the specified enemy -/// -/// @param enemy pointer to the enemy to bind the script to -/// @param interactScriptBytecode pointer to the script to be bound. -s32 bind_enemy_interact(Enemy* enemy, EvtSource* interactScriptBytecode); - -/// Binds the specified ai script to the npc matching the specified npcId -/// -/// @param npcID ID of the desired npc -/// @param npcAiBytecode pointer to the script to be bound. -void bind_npc_ai(s32 npcID, EvtSource* npcAiBytecode); - -/// Binds the specified auxillary script to the npc matching the specified npcId -/// -/// @param npcID ID of the desired npc -/// @param npcAuxBytecode pointer to the script to be bound. -void bind_npc_aux(s32 npcID, EvtSource* npcAuxBytecode); - -/// Binds the specified interact script to the npc matching the specified npcId -/// -/// @param npcID ID of the desired npc -/// @param npcInteractBytecode pointer to the script to be bound. -void bind_npc_interact(s32 npcID, EvtSource* npcInteractBytecode); - -/// Looks for an enemy matching the specified npcID. -/// -/// @param npcID ID of the npc bound to the desired enemy. -/// -/// @returns pointer to Enemy struct, if one is found. If one is not found, a panic occurs. -Enemy* get_enemy(s32 npcID); - -/// Same as get_enemy(), with the exception of always returning a value if an enemy is not found. -/// -/// @param npcID ID of the npc bound to the desired enemy. -/// -/// @returns pointer to Enemy struct, if one is found. Otherwise, NULL. -Enemy* get_enemy_safe(s32 npcID); - -#endif diff --git a/src/sprite.c b/src/sprite.c index 2c26497a52..fd6bdafe25 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -218,15 +218,15 @@ void spr_init_component_anim_state(SpriteComponent* comp, s16*** anim) { comp->loopCounter = 0; comp->currentRaster = -1; comp->currentPalette = -1; - comp->posOffset.x = 0; - comp->posOffset.y = 0; - comp->posOffset.z = 0; - comp->compPos.x = 0; - comp->compPos.y = 0; - comp->compPos.z = 0; - comp->rotation.x = 0; - comp->rotation.y = 0; - comp->rotation.z = 0; + comp->posOffset.x = 0.0f; + comp->posOffset.y = 0.0f; + comp->posOffset.z = 0.0f; + comp->compPos.x = 0.0f; + comp->compPos.y = 0.0f; + comp->compPos.z = 0.0f; + comp->rotation.x = 0.0f; + comp->rotation.y = 0.0f; + comp->rotation.z = 0.0f; comp->scale.x = 1.0f; comp->scale.y = 1.0f; comp->scale.z = 1.0f; diff --git a/src/state_pause.c b/src/state_pause.c index 5fa51deb43..1a61fa5e65 100644 --- a/src/state_pause.c +++ b/src/state_pause.c @@ -1,6 +1,6 @@ #include "common.h" #include "ld_addrs.h" -#include "map.h" +#include "npc.h" #include "nu/nusys.h" #include "hud_element.h" #include "sprite.h" diff --git a/src/state_world.c b/src/state_world.c index 5109d833c6..9421fb44a9 100644 --- a/src/state_world.c +++ b/src/state_world.c @@ -1,3 +1,6 @@ +#include "functions.h" +#include "npc.h" + void state_world_draw_aux_ui(void); void state_init_world(void) { diff --git a/src/world/action/use_tweester.c b/src/world/action/use_tweester.c index ad1f0db7b2..7c7d686ac5 100644 --- a/src/world/action/use_tweester.c +++ b/src/world/action/use_tweester.c @@ -1,6 +1,6 @@ #include "common.h" #include "../partners.h" -#include "../../npc.h" +#include "npc.h" typedef struct unkTweesterStruct{ /* 0x000 */ s32 unk_00; diff --git a/src/world/area_dgb/dgb_02/C2EBA0.c b/src/world/area_dgb/dgb_02/C2EBA0.c index 323200d7f9..f0c7055775 100644 --- a/src/world/area_dgb/dgb_02/C2EBA0.c +++ b/src/world/area_dgb/dgb_02/C2EBA0.c @@ -2,7 +2,6 @@ #include "sprite/npc/world_clubba.h" #include "message_ids.h" -extern s16 gCurrentCamID; extern Npc* wPartnerNpc; enum { diff --git a/src/world/area_dgb/dgb_03/C31730.c b/src/world/area_dgb/dgb_03/C31730.c index a9df7177f4..ce96491c44 100644 --- a/src/world/area_dgb/dgb_03/C31730.c +++ b/src/world/area_dgb/dgb_03/C31730.c @@ -2,7 +2,6 @@ #include "sprite/npc/world_clubba.h" #include "message_ids.h" -extern s16 gCurrentCamID; extern Npc* wPartnerNpc; enum { diff --git a/src/world/area_dgb/dgb_05/C3AA10.c b/src/world/area_dgb/dgb_05/C3AA10.c index a0ec48d8ee..2021ee1c7f 100644 --- a/src/world/area_dgb/dgb_05/C3AA10.c +++ b/src/world/area_dgb/dgb_05/C3AA10.c @@ -2,7 +2,6 @@ #include "sprite/npc/world_clubba.h" #include "message_ids.h" -extern s16 gCurrentCamID; extern Npc* wPartnerNpc; enum { diff --git a/src/world/area_dgb/dgb_07/C3DBF0.c b/src/world/area_dgb/dgb_07/C3DBF0.c index 695b76a02a..8004cff008 100644 --- a/src/world/area_dgb/dgb_07/C3DBF0.c +++ b/src/world/area_dgb/dgb_07/C3DBF0.c @@ -2,7 +2,6 @@ #include "message_ids.h" #include "sprite/npc/world_clubba.h" -extern s16 gCurrentCamID; extern Npc* wPartnerNpc; enum { diff --git a/src/world/area_dgb/dgb_08/C3FDB0.c b/src/world/area_dgb/dgb_08/C3FDB0.c index 49c46cfe3f..4656080454 100644 --- a/src/world/area_dgb/dgb_08/C3FDB0.c +++ b/src/world/area_dgb/dgb_08/C3FDB0.c @@ -4,8 +4,6 @@ #include "sprite/npc/world_clubba.h" #include "sprite/npc/world_tubba.h" -extern s16 gCurrentCamID; - enum { NPC_WORLD_CLUBBA7, NPC_WORLD_CLUBBA0, diff --git a/src/world/area_dgb/dgb_09/C46BE0.c b/src/world/area_dgb/dgb_09/C46BE0.c index 5e5ac82b9e..6905b63380 100644 --- a/src/world/area_dgb/dgb_09/C46BE0.c +++ b/src/world/area_dgb/dgb_09/C46BE0.c @@ -3,7 +3,6 @@ #include "sprite/npc/sentinel.h" #include "sprite/npc/world_clubba.h" -extern s16 gCurrentCamID; extern Npc* wPartnerNpc; enum { diff --git a/src/world/area_dgb/dgb_15/C4F510.c b/src/world/area_dgb/dgb_15/C4F510.c index 019575fe71..2cc2a0a0c6 100644 --- a/src/world/area_dgb/dgb_15/C4F510.c +++ b/src/world/area_dgb/dgb_15/C4F510.c @@ -2,8 +2,6 @@ #include "message_ids.h" #include "sprite/npc/world_tubba.h" -extern s16 gCurrentCamID; - enum { NPC_WORLD_TUBBA, }; diff --git a/src/world/area_dgb/dgb_16/C52540.c b/src/world/area_dgb/dgb_16/C52540.c index ec5f48e71c..66bc059239 100644 --- a/src/world/area_dgb/dgb_16/C52540.c +++ b/src/world/area_dgb/dgb_16/C52540.c @@ -2,7 +2,6 @@ #include "message_ids.h" #include "sprite/npc/world_clubba.h" -extern s16 gCurrentCamID; extern Npc* wPartnerNpc; enum { diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index f46777c142..a0518ad747 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -11,7 +11,6 @@ #define UNK_ALPHA_FUNC_NPC 10 -extern s16 gCurrentCamID; extern s16 MessagePlural; extern s16 MessageSingular; diff --git a/src/world/area_flo/flo_10/CB96B0.c b/src/world/area_flo/flo_10/CB96B0.c index d93ae90799..a1c3c19ca6 100644 --- a/src/world/area_flo/flo_10/CB96B0.c +++ b/src/world/area_flo/flo_10/CB96B0.c @@ -1,5 +1,6 @@ #include "flo_10.h" #include "nu/nusys.h" +#include "model.h" void N(func_802404B0_CB96B0)(s32 arg0, s32 arg1, s32 arg2, s32 arg3); INCLUDE_ASM(void, "world/area_flo/flo_10/CB96B0", flo_10_func_802404B0_CB96B0); diff --git a/src/world/area_mac/mac_01/805DD0.c b/src/world/area_mac/mac_01/805DD0.c index 9485a6738f..9f727caae2 100644 --- a/src/world/area_mac/mac_01/805DD0.c +++ b/src/world/area_mac/mac_01/805DD0.c @@ -2,11 +2,15 @@ #include "world/common/UnkNpcAIFunc24.inc.c" -#include "world/common/UnkFunc13_copy.inc.c" +#define NAMESPACE dup_mac_01 +#include "world/common/UnkFunc13.inc.c" +#define NAMESPACE mac_01 #include "world/common/UnkNpcAIFunc1.inc.c" -#include "world/common/UnkFunc14_copy.inc.c" +#define NAMESPACE dup_mac_01 +#include "world/common/UnkFunc14.inc.c" +#define NAMESPACE mac_01 #include "world/common/UnkNpcAIFunc25.inc.c" @@ -16,98 +20,17 @@ #include "world/common/UnkNpcAIFunc13.inc.c" -#include "world/common/UnkFunc15_copy.inc.c" +#define NAMESPACE dup_mac_01 +#include "world/common/UnkFunc15.inc.c" +#define NAMESPACE mac_01 #include "world/common/UnkNpcDurationFlagFunc.inc.c" -#include "world/common/UnkFunc16_copy.inc.c" +#define NAMESPACE dup_mac_01 +#include "world/common/UnkFunc16.inc.c" +#define NAMESPACE mac_01 INCLUDE_ASM(s32, "world/area_mac/mac_01/805DD0", func_802460E4_806964); -/* -ApiStatus N(func_802460E4_806964)(Evt* script, s32 isInitialCall) { - Enemy* enemy = script->owner1.enemy; - Npc* npc = get_npc_unsafe(enemy->npcID); - Bytecode* args = script->ptrReadPos; - EnemyTerritoryThing territory; - EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* npcAISettings = (NpcAISettings*)evt_get_variable(script, *args++); - f32 posX, posY, posZ, posW; - - territory.unk_00 = 0; - territory.shape = enemy->territory->patrol.detectShape; - territory.pointX = enemy->territory->patrol.detect.x; - territory.pointZ = enemy->territory->patrol.detect.z; - territory.sizeX = enemy->territory->patrol.detectSizeX; - territory.sizeZ = enemy->territory->patrol.detectSizeZ; - territory.unk_18 = 65.0f; - territory.unk_1C = 0; - - if (isInitialCall || enemy->unk_B0 & 4) { - script->functionTemp[0] = 0; - npc->duration = 0; - npc->currentAnim = enemy->animList[0]; - npc->flags &= ~0x800; - if (!enemy->territory->patrol.isFlying) { - npc->flags = (npc->flags | 0x200) & ~8; - } else { - npc->flags = (npc->flags & ~0x200) | 8; - } - - if (enemy->unk_B0 & 4) { - script->functionTemp[0] = 99; - script->functionTemp[1] = 0; - enemy->unk_B0 &= ~4; - } else if (enemy->flags & 0x40000000) { - script->functionTemp[0] = 12; - enemy->flags &= ~0x40000000; - } - - posX = npc->pos.x; - posY = npc->pos.y + npc->collisionHeight; - posZ = npc->pos.z; - posW = 100.0f; - - if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) { - npc->pos.y = posY; - } - } - - switch (script->functionTemp[0]) { - case 0: -#include "world/common/UnkNpcAIFunc24.inc.c" - case 1: - N(func_802456A8_805F28)(script, npcAISettings, territoryPtr); - break; - case 2: - N(UnkNpcAIFunc1)(script, npcAISettings, territoryPtr); - case 3: - N(func_80245A10_806290)(script, npcAISettings, territoryPtr); - break; - case 4: -#include "world/common/UnkNpcAIFunc25.inc.c" - break; - case 10: - N(NpcJumpFunc2)(script, npcAISettings, territoryPtr); - case 11: - N(NpcJumpFunc)(script, npcAISettings, territoryPtr); - break; - case 12: - N(UnkNpcAIFunc13)(script, npcAISettings, territoryPtr); - case 13: - N(func_80245E9C_80671C)(script, npcAISettings, territoryPtr); - break; - case 14: - N(UnkNpcDurationFlagFunc)(script, npcAISettings, territoryPtr); - break; - case 15: - N(func_80246024_8068A4)(script, npcAISettings, territoryPtr); - break; - case 99: - func_8004A73C(script); - } - return ApiStatus_BLOCK; -} -*/ static char* N(exit_str_0) = "osr_00"; diff --git a/src/world/common/AddPlayerHandsOffset.inc.c b/src/world/common/AddPlayerHandsOffset.inc.c index c91504d274..c0dd756054 100644 --- a/src/world/common/AddPlayerHandsOffset.inc.c +++ b/src/world/common/AddPlayerHandsOffset.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; diff --git a/src/world/common/AwaitPlayerNearNpc.inc.c b/src/world/common/AwaitPlayerNearNpc.inc.c index 2d7d1df8ce..9bd796d161 100644 --- a/src/world/common/AwaitPlayerNearNpc.inc.c +++ b/src/world/common/AwaitPlayerNearNpc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(func_80240814_97BE44)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_safe(script->owner2.npcID); diff --git a/src/world/common/AwaitScriptComplete.inc.c b/src/world/common/AwaitScriptComplete.inc.c index 09eb3c379b..f555f6cb20 100644 --- a/src/world/common/AwaitScriptComplete.inc.c +++ b/src/world/common/AwaitScriptComplete.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(AwaitScriptComplete)(Evt* script, s32 isInitialCall) { return (!does_script_exist(evt_get_variable(script, *script->ptrReadPos))) * ApiStatus_DONE2; diff --git a/src/world/common/Bandit_DropCoin.inc.c b/src/world/common/Bandit_DropCoin.inc.c index 7a1705f50b..1f8e53cef0 100644 --- a/src/world/common/Bandit_DropCoin.inc.c +++ b/src/world/common/Bandit_DropCoin.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(Bandit_DropCoin)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/Call800E9894.inc.c b/src/world/common/Call800E9894.inc.c index 9a948ce8af..a770a83999 100644 --- a/src/world/common/Call800E9894.inc.c +++ b/src/world/common/Call800E9894.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(Call800E9894)(Evt* script, s32 isInitialCall) { func_800E9894(); diff --git a/src/world/common/Call800E98C4SyncStatusMenu.inc.c b/src/world/common/Call800E98C4SyncStatusMenu.inc.c index fe8d69ba5a..46f9ebd27d 100644 --- a/src/world/common/Call800E98C4SyncStatusMenu.inc.c +++ b/src/world/common/Call800E98C4SyncStatusMenu.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(Call800E98C4SyncStatusMenu)(Evt* script, s32 isInitialCall) { func_800E98C4(); diff --git a/src/world/common/CamSetFOV.inc.c b/src/world/common/CamSetFOV.inc.c index 36d11e1a0f..b48fb70293 100644 --- a/src/world/common/CamSetFOV.inc.c +++ b/src/world/common/CamSetFOV.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(CamSetFOV)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/CheckItemFlags40.inc.c b/src/world/common/CheckItemFlags40.inc.c index ba604b0fee..2e7fc2f51b 100644 --- a/src/world/common/CheckItemFlags40.inc.c +++ b/src/world/common/CheckItemFlags40.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(CheckItemFlags40)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/CheckPartnerFlags1000.inc.c b/src/world/common/CheckPartnerFlags1000.inc.c index fe0704a04e..32194bfb8e 100644 --- a/src/world/common/CheckPartnerFlags1000.inc.c +++ b/src/world/common/CheckPartnerFlags1000.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(CheckPartnerFlags1000)(Evt* script, s32 isInitialCall) { return ((get_npc_unsafe(NPC_PARTNER)->flags & 0x1000) != 0) * ApiStatus_DONE2; diff --git a/src/world/common/DoesPlayerNeedSleep.inc.c b/src/world/common/DoesPlayerNeedSleep.inc.c index 1bd9bf19fd..401048121b 100644 --- a/src/world/common/DoesPlayerNeedSleep.inc.c +++ b/src/world/common/DoesPlayerNeedSleep.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(DoesPlayerNeedSleep)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; diff --git a/src/world/common/GetCamVfov.inc.c b/src/world/common/GetCamVfov.inc.c index 86c9a23ddf..0f194bf605 100644 --- a/src/world/common/GetCamVfov.inc.c +++ b/src/world/common/GetCamVfov.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetCamVfov)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/GetCurrentCameraYawClamped180.inc.c b/src/world/common/GetCurrentCameraYawClamped180.inc.c index 0616fc542d..4a50e98d0d 100644 --- a/src/world/common/GetCurrentCameraYawClamped180.inc.c +++ b/src/world/common/GetCurrentCameraYawClamped180.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetCurrentCameraYawClamped180)(Evt* script, s32 isInitialCall) { script->varTable[0] = clamp_angle(gCameras[gCurrentCameraID].currentYaw + 180.0f); diff --git a/src/world/common/GetCurrentFloor.inc.c b/src/world/common/GetCurrentFloor.inc.c index 4f3854767e..7972b91912 100644 --- a/src/world/common/GetCurrentFloor.inc.c +++ b/src/world/common/GetCurrentFloor.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetCurrentFloor)(Evt* script, s32 isInitialCall) { script->varTable[0] = gCollisionStatus.currentFloor; diff --git a/src/world/common/GetEncounterEnemyIsOwner.inc.c b/src/world/common/GetEncounterEnemyIsOwner.inc.c index 4a2b8b034f..b07923c312 100644 --- a/src/world/common/GetEncounterEnemyIsOwner.inc.c +++ b/src/world/common/GetEncounterEnemyIsOwner.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetEncounterEnemyIsOwner)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/GetEntityPosition.inc.c b/src/world/common/GetEntityPosition.inc.c index b4fb02139e..ee225be3f3 100644 --- a/src/world/common/GetEntityPosition.inc.c +++ b/src/world/common/GetEntityPosition.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetEntityPosition)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/GetEntryPos.inc.c b/src/world/common/GetEntryPos.inc.c index de5a16baa3..bca44d73e8 100644 --- a/src/world/common/GetEntryPos.inc.c +++ b/src/world/common/GetEntryPos.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetEntryPos)(Evt* script, s32 isInitialCall) { MapConfig* mapConfig = get_current_map_header(); diff --git a/src/world/common/GetFloorCollider.inc.c b/src/world/common/GetFloorCollider.inc.c index 727a2f135b..4107d6805f 100644 --- a/src/world/common/GetFloorCollider.inc.c +++ b/src/world/common/GetFloorCollider.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetFloorCollider)(Evt* script, s32 isInitialCall) { CollisionStatus* collisionStatus = &gCollisionStatus; diff --git a/src/world/common/GetGameStatus75.inc.c b/src/world/common/GetGameStatus75.inc.c index dce895b9c6..4e5d3a72f1 100644 --- a/src/world/common/GetGameStatus75.inc.c +++ b/src/world/common/GetGameStatus75.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetGameStatus75)(Evt* script, s32 isInitialCall) { evt_set_variable(script, EVT_VAR(0), gGameStatusPtr->debugQuizmo); diff --git a/src/world/common/GetItemName.inc.c b/src/world/common/GetItemName.inc.c index 2588148065..8ba44a6c3b 100644 --- a/src/world/common/GetItemName.inc.c +++ b/src/world/common/GetItemName.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetItemName)(Evt* script, s32 isInitialCall) { Bytecode a0 = *script->ptrReadPos; diff --git a/src/world/common/GetNpcCollisionHeight.inc.c b/src/world/common/GetNpcCollisionHeight.inc.c index bbe1315634..2f53a4ef14 100644 --- a/src/world/common/GetNpcCollisionHeight.inc.c +++ b/src/world/common/GetNpcCollisionHeight.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetNpcCollisionHeight)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/GetPartnerCall800EB168.inc.c b/src/world/common/GetPartnerCall800EB168.inc.c index 63d4c7219f..af905e6ca1 100644 --- a/src/world/common/GetPartnerCall800EB168.inc.c +++ b/src/world/common/GetPartnerCall800EB168.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetPartnerCall800EB168)(Evt* script, s32 isInitialCall) { evt_set_variable(script, *script->ptrReadPos, gPlayerData.currentPartner); diff --git a/src/world/common/GetPlayerCoins.inc.c b/src/world/common/GetPlayerCoins.inc.c index 27cd5e16c3..a2e055f7f5 100644 --- a/src/world/common/GetPlayerCoins.inc.c +++ b/src/world/common/GetPlayerCoins.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(GetPlayerCoins)(Evt* script, s32 isInitialCall) { script->varTable[0] = gPlayerData.coins; diff --git a/src/world/common/IsBerserkerEquipped.inc.c b/src/world/common/IsBerserkerEquipped.inc.c index 21c897044a..d823228734 100644 --- a/src/world/common/IsBerserkerEquipped.inc.c +++ b/src/world/common/IsBerserkerEquipped.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(IsBerserkerEquipped)(Evt* script, s32 isInitialCall) { script->varTable[0] = gBattleStatus.unk_83; diff --git a/src/world/common/IsHammerMaxCharged.inc.c b/src/world/common/IsHammerMaxCharged.inc.c index 9d7a0ddec7..7297779d11 100644 --- a/src/world/common/IsHammerMaxCharged.inc.c +++ b/src/world/common/IsHammerMaxCharged.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(IsHammerMaxCharged)(Evt* script, s32 isInitialCall) { script->varTable[0] = FALSE; diff --git a/src/world/common/IsJumpMaxCharged.inc.c b/src/world/common/IsJumpMaxCharged.inc.c index 22443977b3..487796eb63 100644 --- a/src/world/common/IsJumpMaxCharged.inc.c +++ b/src/world/common/IsJumpMaxCharged.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(IsJumpMaxCharged)(Evt* script, s32 isInitialCall) { script->varTable[0] = FALSE; diff --git a/src/world/common/IsRightOnEquipped.inc.c b/src/world/common/IsRightOnEquipped.inc.c index d93cd80dfd..1e9de7b3d4 100644 --- a/src/world/common/IsRightOnEquipped.inc.c +++ b/src/world/common/IsRightOnEquipped.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(IsRightOnEquipped)(Evt* script, s32 isInitialCall) { script->varTable[0] = FALSE; diff --git a/src/world/common/LoadPartyImage.inc.c b/src/world/common/LoadPartyImage.inc.c index 6c2c75d277..47aba27aa2 100644 --- a/src/world/common/LoadPartyImage.inc.c +++ b/src/world/common/LoadPartyImage.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #ifndef PARTY_IMAGE #error "Define PARTY_IMAGE to the asset name to use LoadPartyImage." diff --git a/src/world/common/NpcJumpFunc.inc.c b/src/world/common/NpcJumpFunc.inc.c index d4c091440a..9bb0491737 100644 --- a/src/world/common/NpcJumpFunc.inc.c +++ b/src/world/common/NpcJumpFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(NpcJumpFunc)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); diff --git a/src/world/common/NpcJumpFunc2.inc.c b/src/world/common/NpcJumpFunc2.inc.c index 24f76f0810..07c11960c6 100644 --- a/src/world/common/NpcJumpFunc2.inc.c +++ b/src/world/common/NpcJumpFunc2.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(NpcJumpFunc2)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/NpcJumpFunc3.inc.c b/src/world/common/NpcJumpFunc3.inc.c index 916af1579a..c2c395eb74 100644 --- a/src/world/common/NpcJumpFunc3.inc.c +++ b/src/world/common/NpcJumpFunc3.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(NpcJumpFunc3)(Evt* script) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); diff --git a/src/world/common/PartnerToggleAbilityScript.inc.c b/src/world/common/PartnerToggleAbilityScript.inc.c index 43c593273e..145a027f05 100644 --- a/src/world/common/PartnerToggleAbilityScript.inc.c +++ b/src/world/common/PartnerToggleAbilityScript.inc.c @@ -1,6 +1,6 @@ #include "common.h" #include "../partners.h" -#include "map.h" +#include "npc.h" ApiStatus N(PartnerSuspendAbilityScript)(Evt* script, s32 isInitialCall) { if (gPlayerData.currentPartner == PARTNER_NONE) { diff --git a/src/world/common/Set80151310.inc.c b/src/world/common/Set80151310.inc.c index 51b82de0ea..56b490f093 100644 --- a/src/world/common/Set80151310.inc.c +++ b/src/world/common/Set80151310.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(Set80151310_1)(Evt* script, s32 isInitialCall) { D_80151310 = 1; diff --git a/src/world/common/Set80151310_0.inc.c b/src/world/common/Set80151310_0.inc.c index 7096bed93e..c6b52a70ec 100644 --- a/src/world/common/Set80151310_0.inc.c +++ b/src/world/common/Set80151310_0.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(Set80151310_0)(Evt* script, s32 isInitialCall) { D_80151310 = 0; diff --git a/src/world/common/SetCamVfov.inc.c b/src/world/common/SetCamVfov.inc.c index 5d3669dc0d..1d93ccf744 100644 --- a/src/world/common/SetCamVfov.inc.c +++ b/src/world/common/SetCamVfov.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SetCamVfov)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/SetCamera0Flag1000.inc.c b/src/world/common/SetCamera0Flag1000.inc.c index 0115594752..9aca7d6aca 100644 --- a/src/world/common/SetCamera0Flag1000.inc.c +++ b/src/world/common/SetCamera0Flag1000.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "camera.h" ApiStatus N(SetCamera0Flag1000)(Evt* script, s32 isInitialCall) { diff --git a/src/world/common/SetCamera0MoveFlag1.inc.c b/src/world/common/SetCamera0MoveFlag1.inc.c index 10e21f1c90..f7b0c1bbf2 100644 --- a/src/world/common/SetCamera0MoveFlag1.inc.c +++ b/src/world/common/SetCamera0MoveFlag1.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SetCamera0MoveFlag1)(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[0]; diff --git a/src/world/common/SetEntityFlags100000.inc.c b/src/world/common/SetEntityFlags100000.inc.c index 4b6fbda622..a69181d126 100644 --- a/src/world/common/SetEntityFlags100000.inc.c +++ b/src/world/common/SetEntityFlags100000.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SetEntityFlags100000)(Evt* script, s32 isInitialCall) { Entity* entity = get_entity_by_index(script->varTable[0]); diff --git a/src/world/common/SetEntityPosition.inc.c b/src/world/common/SetEntityPosition.inc.c index 915689ce02..b7b554c9c6 100644 --- a/src/world/common/SetEntityPosition.inc.c +++ b/src/world/common/SetEntityPosition.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SetEntityPosition)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/SetForeverForestFog.inc.c b/src/world/common/SetForeverForestFog.inc.c index a4a9c1eee9..ab94c79564 100644 --- a/src/world/common/SetForeverForestFog.inc.c +++ b/src/world/common/SetForeverForestFog.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SetForeverForestFog)(Evt* script, s32 isInitialCall) { enable_world_fog(); diff --git a/src/world/common/SetGameStatusUnk84_1.inc.c b/src/world/common/SetGameStatusUnk84_1.inc.c index 782110be96..30418d9fac 100644 --- a/src/world/common/SetGameStatusUnk84_1.inc.c +++ b/src/world/common/SetGameStatusUnk84_1.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SetGameStatusUnk84_1)(Evt* script, s32 isInitialCall) { gGameStatusPtr->playerSpriteSet = 1; diff --git a/src/world/common/SetManyVars.inc.c b/src/world/common/SetManyVars.inc.c index 1b59d2c286..a10c402dc4 100644 --- a/src/world/common/SetManyVars.inc.c +++ b/src/world/common/SetManyVars.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SetManyVars)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/SetNpcB5_3.inc.c b/src/world/common/SetNpcB5_3.inc.c index 64c971412e..9b84350937 100644 --- a/src/world/common/SetNpcB5_3.inc.c +++ b/src/world/common/SetNpcB5_3.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SetNpcB5_3)(Evt* script, s32 isInitialCall) { script->owner1.enemy->unk_B5 = 3; diff --git a/src/world/common/SetOverrideFlags_40.inc.c b/src/world/common/SetOverrideFlags_40.inc.c index 66323eca9f..88e00b5bf1 100644 --- a/src/world/common/SetOverrideFlags_40.inc.c +++ b/src/world/common/SetOverrideFlags_40.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SetOverrideFlags_40)(Evt* script, s32 isInitialCall) { gOverrideFlags |= 0x40; diff --git a/src/world/common/SetPlayerStatusAnimFlags100000.inc.c b/src/world/common/SetPlayerStatusAnimFlags100000.inc.c index 81b385a3c2..b4c7a6b580 100644 --- a/src/world/common/SetPlayerStatusAnimFlags100000.inc.c +++ b/src/world/common/SetPlayerStatusAnimFlags100000.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SetPlayerStatusAnimFlags100000)(Evt* script, s32 isInitialCall) { gPlayerStatusPtr->animFlags |= 0x100000; diff --git a/src/world/common/SomeItemEntityFunc.inc.c b/src/world/common/SomeItemEntityFunc.inc.c index d2401b4574..6e7a639594 100644 --- a/src/world/common/SomeItemEntityFunc.inc.c +++ b/src/world/common/SomeItemEntityFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SomeItemEntityFunc)(Evt* script, s32 isInitialCall) { ItemEntity* itemEntity = get_item_entity(script->varTable[0]); diff --git a/src/world/common/SomeXYZFunc2.inc.c b/src/world/common/SomeXYZFunc2.inc.c index 2e4f0ecf73..820fac8ebe 100644 --- a/src/world/common/SomeXYZFunc2.inc.c +++ b/src/world/common/SomeXYZFunc2.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SomeXYZFunc2)(Evt* script, s32 isInitialStatus) { PlayerStatus* playerStatus = &gPlayerStatus; diff --git a/src/world/common/SpawnSunEffect.inc.c b/src/world/common/SpawnSunEffect.inc.c index 9859d3fa81..8716fdc2e1 100644 --- a/src/world/common/SpawnSunEffect.inc.c +++ b/src/world/common/SpawnSunEffect.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" ApiStatus N(SpawnSunEffect)(Evt* script, s32 isInitialCall) { diff --git a/src/world/common/StarSpiritEffectFunc.inc.c b/src/world/common/StarSpiritEffectFunc.inc.c index 0b090e222b..cc8d7cab3a 100644 --- a/src/world/common/StarSpiritEffectFunc.inc.c +++ b/src/world/common/StarSpiritEffectFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" ApiStatus N(StarSpiritEffectFunc1)(Evt* script, s32 isInitialCall) { diff --git a/src/world/common/StashVars.inc.c b/src/world/common/StashVars.inc.c index ff569de6c9..11cc4bad0d 100644 --- a/src/world/common/StashVars.inc.c +++ b/src/world/common/StashVars.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(StashVars)(Evt* script, s32 isInitialCall) { static s32** varTable = NULL; diff --git a/src/world/common/SyncStatusMenu.inc.c b/src/world/common/SyncStatusMenu.inc.c index 90e12a3512..8dc9e768c4 100644 --- a/src/world/common/SyncStatusMenu.inc.c +++ b/src/world/common/SyncStatusMenu.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(SyncStatusMenu)(Evt* script, s32 isInitialCall) { sync_status_menu(); diff --git a/src/world/common/UnkCameraFunc.inc.c b/src/world/common/UnkCameraFunc.inc.c index 87e5abdd02..e2735add53 100644 --- a/src/world/common/UnkCameraFunc.inc.c +++ b/src/world/common/UnkCameraFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkCameraFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkDistFunc.inc.c b/src/world/common/UnkDistFunc.inc.c index 6dcfc643c1..a772376517 100644 --- a/src/world/common/UnkDistFunc.inc.c +++ b/src/world/common/UnkDistFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkDistFunc)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkDurationCheck.inc.c b/src/world/common/UnkDurationCheck.inc.c index 7e23b2d6ec..2fc1cee69f 100644 --- a/src/world/common/UnkDurationCheck.inc.c +++ b/src/world/common/UnkDurationCheck.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkDurationCheck)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); diff --git a/src/world/common/UnkFloatFuncAbs.inc.c b/src/world/common/UnkFloatFuncAbs.inc.c index 041e29f24b..334db4561e 100644 --- a/src/world/common/UnkFloatFuncAbs.inc.c +++ b/src/world/common/UnkFloatFuncAbs.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" // Same as UnkFloatFunc with an extra abs on diff ApiStatus N(UnkFloatFuncAbs)(Evt* script, s32 isInitialCall) { diff --git a/src/world/common/UnkFunc1.inc.c b/src/world/common/UnkFunc1.inc.c index 556086fb08..42c44e13ee 100644 --- a/src/world/common/UnkFunc1.inc.c +++ b/src/world/common/UnkFunc1.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc1)(Evt* script, s32 isInitialCall) { increment_status_menu_disabled(); diff --git a/src/world/common/UnkFunc10.inc.c b/src/world/common/UnkFunc10.inc.c index 0fccdd0cf5..f9f66a6c6c 100644 --- a/src/world/common/UnkFunc10.inc.c +++ b/src/world/common/UnkFunc10.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkFunc10)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkFunc11.inc.c b/src/world/common/UnkFunc11.inc.c index 12dedb9dc4..2eab93c9e9 100644 --- a/src/world/common/UnkFunc11.inc.c +++ b/src/world/common/UnkFunc11.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc11)(Evt* script, s32 isInitialCall) { s32 var = evt_get_variable(script, *script->ptrReadPos); diff --git a/src/world/common/UnkFunc12.inc.c b/src/world/common/UnkFunc12.inc.c index c43ddd954f..4c4f84eba0 100644 --- a/src/world/common/UnkFunc12.inc.c +++ b/src/world/common/UnkFunc12.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc12)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; diff --git a/src/world/common/UnkFunc13.inc.c b/src/world/common/UnkFunc13.inc.c index c94f9ef47d..9207abc66e 100644 --- a/src/world/common/UnkFunc13.inc.c +++ b/src/world/common/UnkFunc13.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" void N(UnkFunc13)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { diff --git a/src/world/common/UnkFunc13_copy.inc.c b/src/world/common/UnkFunc13_copy.inc.c deleted file mode 100644 index cb7a2a7b1d..0000000000 --- a/src/world/common/UnkFunc13_copy.inc.c +++ /dev/null @@ -1,51 +0,0 @@ -#include "common.h" -#include "map.h" -#include "effects.h" - -void N(UnkFunc13_copy)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { - Enemy* enemy = script->owner1.enemy; - Npc* npc = get_npc_unsafe(enemy->npcID); - f32 x, z; - s32 var; - - if (aiSettings->unk_14 >= 0) { - if (script->functionTemp[1] <= 0) { - script->functionTemp[1] = aiSettings->unk_14; - if (func_800490B4(territory, enemy, aiSettings->alertRadius, aiSettings->unk_10.f, 0)) { - fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 0xF, &var); - ai_enemy_play_sound(npc, 0x2F4, 0x200000); - if (enemy->npcSettings->unk_2A & 1) { - script->functionTemp[0] = 10; - } else { - script->functionTemp[0] = 12; - } - return; - } - } - script->functionTemp[1]--; - } - - if (npc->turnAroundYawAdjustment == 0) { - if (npc->moveSpeed < 4.0) { - func_8003D660(npc, 0); - } else { - func_8003D660(npc, 1); - } - - x = script->functionTemp[2][enemy->territory->patrol.points].x; - z = script->functionTemp[2][enemy->territory->patrol.points].z; - npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z); - npc_move_heading(npc, npc->moveSpeed, npc->yaw); - if (dist2D(npc->pos.x, npc->pos.z, x, z) <= npc->moveSpeed) { - script->functionTemp[0] = 2; - script->functionTemp[1] = (rand_int(1000) % 3) + 2; - if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || - (aiSettings->waitTime <= 0) || (script->functionTemp[1] == 0)) { - script->functionTemp[0] = 4; - } - if (rand_int(10000) % 100 < aiSettings->moveTime) { - script->functionTemp[0] = 4; - } - } - } -} diff --git a/src/world/common/UnkFunc14.inc.c b/src/world/common/UnkFunc14.inc.c index fbdea62117..6a488f8e7e 100644 --- a/src/world/common/UnkFunc14.inc.c +++ b/src/world/common/UnkFunc14.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkFunc14)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkFunc14_copy.inc.c b/src/world/common/UnkFunc14_copy.inc.c deleted file mode 100644 index 1f0dad61df..0000000000 --- a/src/world/common/UnkFunc14_copy.inc.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "common.h" -#include "map.h" - -void N(UnkFunc14_copy)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { - Enemy* enemy = script->owner1.enemy; - Npc* npc = get_npc_unsafe(enemy->npcID); - s32 var; - - if ((aiSettings->unk_14 >= 0) && func_800490B4(territory, enemy, aiSettings->chaseRadius, aiSettings->unk_28.f, 0)) { - fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 0xF, &var); - npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); - ai_enemy_play_sound(npc, 0x2F4, 0x200000); - if (!(enemy->npcSettings->unk_2A & 1)) { - script->functionTemp[0] = 12; - } else { - script->functionTemp[0] = 10; - } - } else if (npc->turnAroundYawAdjustment == 0) { - npc->duration--; - if (npc->duration == 0) { - script->functionTemp[1]--; - if (script->functionTemp[1] != 0) { - if (!(enemy->npcSettings->unk_2A & 0x10)) { - npc->yaw = clamp_angle(npc->yaw + 180.0f); - } - npc->duration = aiSettings->waitTime / 2 + rand_int(aiSettings->waitTime / 2 + 1); - } else { - script->functionTemp[0] = 4; - } - } - } -} diff --git a/src/world/common/UnkFunc15.inc.c b/src/world/common/UnkFunc15.inc.c index 245b9a4c77..72e200a954 100644 --- a/src/world/common/UnkFunc15.inc.c +++ b/src/world/common/UnkFunc15.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc15)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkFunc15_copy.inc.c b/src/world/common/UnkFunc15_copy.inc.c deleted file mode 100644 index 3f2eeba287..0000000000 --- a/src/world/common/UnkFunc15_copy.inc.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "common.h" -#include "map.h" - -ApiStatus N(UnkFunc15_copy)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { - Enemy* enemy = script->owner1.enemy; - Npc* npc = get_npc_unsafe(enemy->npcID); - s32 var; - - if (!func_800490B4(territory, enemy, aiSettings->chaseRadius, aiSettings->unk_28.f, 1)) { - fx_emote(2, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &var); - npc->currentAnim.w = enemy->animList[0]; - npc->duration = 25; - script->functionTemp[0] = 14; - } else { - func_8003D660(npc, 1); - npc_move_heading(npc, npc->moveSpeed, npc->yaw); - if (npc->duration > 0) { - npc->duration--; - } else { - script->functionTemp[0] = 12; - } - } -} diff --git a/src/world/common/UnkFunc16.inc.c b/src/world/common/UnkFunc16.inc.c index 60891f025a..07a7cb6c6a 100644 --- a/src/world/common/UnkFunc16.inc.c +++ b/src/world/common/UnkFunc16.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkFunc16)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkFunc16_copy.inc.c b/src/world/common/UnkFunc16_copy.inc.c deleted file mode 100644 index 1d73553532..0000000000 --- a/src/world/common/UnkFunc16_copy.inc.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "common.h" -#include "map.h" - -void N(UnkFunc16_copy)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { - Enemy* enemy = script->owner1.enemy; - Npc* npc = get_npc_unsafe(enemy->npcID); - s32 i; - - for (i = script->functionTemp[2]; i < enemy->territory->patrol.numPoints; i++) { - if (i[enemy->territory->patrol.points].y <= npc->pos.y) { - script->functionTemp[2] = i; - break; - } - } - - npc->moveSpeed = aiSettings->moveSpeed; - npc->currentAnim.w = enemy->animList[1]; - script->functionTemp[1] = 0; - script->functionTemp[0] = 1; -} diff --git a/src/world/common/UnkFunc17.inc.c b/src/world/common/UnkFunc17.inc.c index f9bb51de4b..09d533db15 100644 --- a/src/world/common/UnkFunc17.inc.c +++ b/src/world/common/UnkFunc17.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc17)(Evt* script, s32 isInitialCall) { gOverrideFlags &= ~0x40; diff --git a/src/world/common/UnkFunc18.inc.c b/src/world/common/UnkFunc18.inc.c index a4434031d3..a6176caca8 100644 --- a/src/world/common/UnkFunc18.inc.c +++ b/src/world/common/UnkFunc18.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc18)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; diff --git a/src/world/common/UnkFunc19.inc.c b/src/world/common/UnkFunc19.inc.c index c22101de1d..b67a22b8e6 100644 --- a/src/world/common/UnkFunc19.inc.c +++ b/src/world/common/UnkFunc19.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" extern s32 D_8008EF20[11][4]; diff --git a/src/world/common/UnkFunc20.inc.c b/src/world/common/UnkFunc20.inc.c index bb87e4db78..380a63233c 100644 --- a/src/world/common/UnkFunc20.inc.c +++ b/src/world/common/UnkFunc20.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" ApiStatus N(UnkFunc20)(Evt* script, s32 isInitialCall) { diff --git a/src/world/common/UnkFunc21.inc.c b/src/world/common/UnkFunc21.inc.c index ef10626884..e398e70e01 100644 --- a/src/world/common/UnkFunc21.inc.c +++ b/src/world/common/UnkFunc21.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc21)(Evt* script, s32 isInitialCall) { Entity* entity = get_entity_by_index(evt_get_variable(script, *script->ptrReadPos)); diff --git a/src/world/common/UnkFunc22.inc.c b/src/world/common/UnkFunc22.inc.c index 1dec31aa00..eb64744c2a 100644 --- a/src/world/common/UnkFunc22.inc.c +++ b/src/world/common/UnkFunc22.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc22)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_safe(-4); diff --git a/src/world/common/UnkFunc23.inc.c b/src/world/common/UnkFunc23.inc.c index a87ebb2503..157ab4c41c 100644 --- a/src/world/common/UnkFunc23.inc.c +++ b/src/world/common/UnkFunc23.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" s32 N(UnkFunc23)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkFunc24.inc.c b/src/world/common/UnkFunc24.inc.c index f2a60248ca..b3d5ce22cb 100644 --- a/src/world/common/UnkFunc24.inc.c +++ b/src/world/common/UnkFunc24.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc24)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; diff --git a/src/world/common/UnkFunc25.inc.c b/src/world/common/UnkFunc25.inc.c index 6df7d1e81d..577b98f05d 100644 --- a/src/world/common/UnkFunc25.inc.c +++ b/src/world/common/UnkFunc25.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc25)(Evt* script, s32 isInitialCall) { CollisionStatus* collisionStatus = &gCollisionStatus; diff --git a/src/world/common/UnkFunc26.inc.c b/src/world/common/UnkFunc26.inc.c index efb1dc4edd..4fb0b05ce3 100644 --- a/src/world/common/UnkFunc26.inc.c +++ b/src/world/common/UnkFunc26.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void set_model_fog_color_parameters(u8 var2, u8 var3, u8 var4, u8 var5, u8 var6, u8 var7, u8 var8, s32 var9, s32 var10); void set_model_env_color_parameters(u8 var2, u8 var3, u8 var4, u8 var5, u8 var6, u8 var7); diff --git a/src/world/common/UnkFunc27.inc.c b/src/world/common/UnkFunc27.inc.c index 53ddf34f3c..c587a93d7c 100644 --- a/src/world/common/UnkFunc27.inc.c +++ b/src/world/common/UnkFunc27.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void func_8011B950(u16, s32, s32, s32); diff --git a/src/world/common/UnkFunc31.inc.c b/src/world/common/UnkFunc31.inc.c index b76412d4a9..aa1fb3aef9 100644 --- a/src/world/common/UnkFunc31.inc.c +++ b/src/world/common/UnkFunc31.inc.c @@ -1,7 +1,7 @@ #include "common.h" -#include "map.h" +#include "npc.h" -s32 N(UnkFunc28)(Npc* npc); +void N(UnkFunc28)(Npc* npc); ApiStatus N(UnkFunc31)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(script->owner2.npcID); @@ -18,7 +18,7 @@ ApiStatus N(GetNpcUnsafeOwner2)(Evt* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -s32 N(UnkFunc28)(Npc* npc) { +void N(UnkFunc28)(Npc* npc) { Camera* camera = &gCameras[gCurrentCamID]; if (*((s32*)npc->blurBuf) & 1) { diff --git a/src/world/common/UnkFunc32.inc.c b/src/world/common/UnkFunc32.inc.c index f2e9508db4..32341b0177 100644 --- a/src/world/common/UnkFunc32.inc.c +++ b/src/world/common/UnkFunc32.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc32)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkFunc35.inc.c b/src/world/common/UnkFunc35.inc.c index c0d6bdbe0b..3ce4101e19 100644 --- a/src/world/common/UnkFunc35.inc.c +++ b/src/world/common/UnkFunc35.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc35)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkFunc36.inc.c b/src/world/common/UnkFunc36.inc.c index a222e4de1d..def2ae4621 100644 --- a/src/world/common/UnkFunc36.inc.c +++ b/src/world/common/UnkFunc36.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc36)(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; diff --git a/src/world/common/UnkFunc39.inc.c b/src/world/common/UnkFunc39.inc.c index 659c0bdc5e..f9cfe301f7 100644 --- a/src/world/common/UnkFunc39.inc.c +++ b/src/world/common/UnkFunc39.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc39)(Evt* script, s32 isInitialCall) { EffectGraphics* effect = (EffectGraphics*)evt_get_variable(script, *script->ptrReadPos); diff --git a/src/world/common/UnkFunc4.inc.c b/src/world/common/UnkFunc4.inc.c index f797032f0d..8f088f9bb6 100644 --- a/src/world/common/UnkFunc4.inc.c +++ b/src/world/common/UnkFunc4.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" void N(UnkFunc4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { diff --git a/src/world/common/UnkFunc40.inc.c b/src/world/common/UnkFunc40.inc.c index 7c359b5f9e..4eab916b5d 100644 --- a/src/world/common/UnkFunc40.inc.c +++ b/src/world/common/UnkFunc40.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc40)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; diff --git a/src/world/common/UnkFunc41.inc.c b/src/world/common/UnkFunc41.inc.c index 4b914e3bc6..30436a19b0 100644 --- a/src/world/common/UnkFunc41.inc.c +++ b/src/world/common/UnkFunc41.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc41)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkFunc42.inc.c b/src/world/common/UnkFunc42.inc.c index 2063e8c364..68566e4f16 100644 --- a/src/world/common/UnkFunc42.inc.c +++ b/src/world/common/UnkFunc42.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc42)(Evt* script, s32 isInitialCall) { script->varTable[10] = atan2(script->varTable[0], script->varTable[2], script->varTable[3], script->varTable[5]); diff --git a/src/world/common/UnkFunc43.inc.c b/src/world/common/UnkFunc43.inc.c index e3e61d95ce..12073e7626 100644 --- a/src/world/common/UnkFunc43.inc.c +++ b/src/world/common/UnkFunc43.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc43)(Evt* script, s32 isInitialCall) { f32 var1 = script->varTable[0] - script->varTable[3]; diff --git a/src/world/common/UnkFunc44.inc.c b/src/world/common/UnkFunc44.inc.c index b5fbb3ac55..eeb8f0087a 100644 --- a/src/world/common/UnkFunc44.inc.c +++ b/src/world/common/UnkFunc44.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc44)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; diff --git a/src/world/common/UnkFunc45.inc.c b/src/world/common/UnkFunc45.inc.c index 10611594b3..d464aa860a 100644 --- a/src/world/common/UnkFunc45.inc.c +++ b/src/world/common/UnkFunc45.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkFunc45)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkFunc46.inc.c b/src/world/common/UnkFunc46.inc.c index 8645d2d994..2cd78bf5df 100644 --- a/src/world/common/UnkFunc46.inc.c +++ b/src/world/common/UnkFunc46.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc46)(Evt* script, s32 isInitialCall) { f32 var1 = script->varTable[0]; diff --git a/src/world/common/UnkFunc47.inc.c b/src/world/common/UnkFunc47.inc.c index a17ce9384f..d927e2138d 100644 --- a/src/world/common/UnkFunc47.inc.c +++ b/src/world/common/UnkFunc47.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc47)(Evt* script, s32 isInitialCall) { f32 x = script->varTable[0] - gPlayerStatus.position.x; diff --git a/src/world/common/UnkFunc48.inc.c b/src/world/common/UnkFunc48.inc.c index df80984e44..4f00a2e829 100644 --- a/src/world/common/UnkFunc48.inc.c +++ b/src/world/common/UnkFunc48.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc48)(Evt* script, s32 isInitialCall) { gPlayerStatus.unk_8C = evt_get_variable(script, *script->ptrReadPos); diff --git a/src/world/common/UnkFunc49.inc.c b/src/world/common/UnkFunc49.inc.c index bef54eb645..e8fdfd3be4 100644 --- a/src/world/common/UnkFunc49.inc.c +++ b/src/world/common/UnkFunc49.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc49)(Evt* script, s32 isInitialCall) { script->varTable[5] = (cos_deg(-(f32) script->varTable[3] - 35.0) * 3.0) - 2.3; diff --git a/src/world/common/UnkFunc5.inc.c b/src/world/common/UnkFunc5.inc.c index 95c49dc7ee..2cec798d0f 100644 --- a/src/world/common/UnkFunc5.inc.c +++ b/src/world/common/UnkFunc5.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkFunc5)(Npc* npc, Enemy* enemy, Evt* script, NpcAISettings* aiSettings) { f32 posX, posY, posZ, posW; diff --git a/src/world/common/UnkFunc50.inc.c b/src/world/common/UnkFunc50.inc.c index d4003fb2a8..93553dad90 100644 --- a/src/world/common/UnkFunc50.inc.c +++ b/src/world/common/UnkFunc50.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc50)(Evt* script, s32 isInitialCall) { f32 x = UNK_FUNC_50_VAR1 - script->varTable[0]; diff --git a/src/world/common/UnkFunc51.inc.c b/src/world/common/UnkFunc51.inc.c index 3e47781359..cb643180ee 100644 --- a/src/world/common/UnkFunc51.inc.c +++ b/src/world/common/UnkFunc51.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc51)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkFunc6.inc.c b/src/world/common/UnkFunc6.inc.c index 119232b0e4..1f8972adcd 100644 --- a/src/world/common/UnkFunc6.inc.c +++ b/src/world/common/UnkFunc6.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkFunc6)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkFunc7.inc.c b/src/world/common/UnkFunc7.inc.c index 870fbed00a..d49114ff92 100644 --- a/src/world/common/UnkFunc7.inc.c +++ b/src/world/common/UnkFunc7.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkFunc7)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkFunc8.inc.c b/src/world/common/UnkFunc8.inc.c index 558b2dedd6..ff0c8be8f1 100644 --- a/src/world/common/UnkFunc8.inc.c +++ b/src/world/common/UnkFunc8.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" void N(UnkFunc8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { diff --git a/src/world/common/UnkFunc9.inc.c b/src/world/common/UnkFunc9.inc.c index 06e87fe43d..6942ad9cb6 100644 --- a/src/world/common/UnkFunc9.inc.c +++ b/src/world/common/UnkFunc9.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkFunc9)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkMoveFunc1.inc.c b/src/world/common/UnkMoveFunc1.inc.c index c45daa9b0b..e4f1bf3a8b 100644 --- a/src/world/common/UnkMoveFunc1.inc.c +++ b/src/world/common/UnkMoveFunc1.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkMoveFunc1)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; diff --git a/src/world/common/UnkMoveFunc2.inc.c b/src/world/common/UnkMoveFunc2.inc.c index 4c1c7249e0..e4d5cdd5af 100644 --- a/src/world/common/UnkMoveFunc2.inc.c +++ b/src/world/common/UnkMoveFunc2.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkMoveFunc2)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkMoveFunc3.inc.c b/src/world/common/UnkMoveFunc3.inc.c index 8783a0c737..3700064509 100644 --- a/src/world/common/UnkMoveFunc3.inc.c +++ b/src/world/common/UnkMoveFunc3.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkMoveFunc3)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkMusicFunc.inc.c b/src/world/common/UnkMusicFunc.inc.c index 7b9a9a9897..7762913808 100644 --- a/src/world/common/UnkMusicFunc.inc.c +++ b/src/world/common/UnkMusicFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkMusicFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkNpcAIFunc1.inc.c b/src/world/common/UnkNpcAIFunc1.inc.c index 3cacf5d576..fb253f9f16 100644 --- a/src/world/common/UnkNpcAIFunc1.inc.c +++ b/src/world/common/UnkNpcAIFunc1.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc1)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc10.inc.c b/src/world/common/UnkNpcAIFunc10.inc.c index 51428fb089..622976be78 100644 --- a/src/world/common/UnkNpcAIFunc10.inc.c +++ b/src/world/common/UnkNpcAIFunc10.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc10)(Evt* script) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc11.inc.c b/src/world/common/UnkNpcAIFunc11.inc.c index aebb2cfe36..405d504099 100644 --- a/src/world/common/UnkNpcAIFunc11.inc.c +++ b/src/world/common/UnkNpcAIFunc11.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" void N(UnkNpcAIFunc11)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* arg2) { diff --git a/src/world/common/UnkNpcAIFunc12.inc.c b/src/world/common/UnkNpcAIFunc12.inc.c index 816016fcdc..aee827d3c2 100644 --- a/src/world/common/UnkNpcAIFunc12.inc.c +++ b/src/world/common/UnkNpcAIFunc12.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc12)(Evt* script, NpcAISettings* aiSettings, s32 arg2) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc13.inc.c b/src/world/common/UnkNpcAIFunc13.inc.c index 0a3714f260..c83b2f48f2 100644 --- a/src/world/common/UnkNpcAIFunc13.inc.c +++ b/src/world/common/UnkNpcAIFunc13.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc13)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc13_2.inc.c b/src/world/common/UnkNpcAIFunc13_2.inc.c index 7f0e2b8cfa..44df9d7937 100644 --- a/src/world/common/UnkNpcAIFunc13_2.inc.c +++ b/src/world/common/UnkNpcAIFunc13_2.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc13_2)(Evt* script, NpcAISettings* aiSettings, s32 arg2) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc14.inc.c b/src/world/common/UnkNpcAIFunc14.inc.c index dd19808d9f..04e74c06e5 100644 --- a/src/world/common/UnkNpcAIFunc14.inc.c +++ b/src/world/common/UnkNpcAIFunc14.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc14)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc15.inc.c b/src/world/common/UnkNpcAIFunc15.inc.c index 310ad905c6..ac5b608077 100644 --- a/src/world/common/UnkNpcAIFunc15.inc.c +++ b/src/world/common/UnkNpcAIFunc15.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc15)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Npc* enemy = get_npc_unsafe(script->owner1.enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc16.inc.c b/src/world/common/UnkNpcAIFunc16.inc.c index 9a62450508..d751f2a71a 100644 --- a/src/world/common/UnkNpcAIFunc16.inc.c +++ b/src/world/common/UnkNpcAIFunc16.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc16)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc17.inc.c b/src/world/common/UnkNpcAIFunc17.inc.c index 357d7840af..3d388c95ec 100644 --- a/src/world/common/UnkNpcAIFunc17.inc.c +++ b/src/world/common/UnkNpcAIFunc17.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc17)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc18.inc.c b/src/world/common/UnkNpcAIFunc18.inc.c index 080e98f1da..f8c4d520fa 100644 --- a/src/world/common/UnkNpcAIFunc18.inc.c +++ b/src/world/common/UnkNpcAIFunc18.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc18)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc19.inc.c b/src/world/common/UnkNpcAIFunc19.inc.c index 60d5776a41..0d3874539b 100644 --- a/src/world/common/UnkNpcAIFunc19.inc.c +++ b/src/world/common/UnkNpcAIFunc19.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc19)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc1_copy.inc.c b/src/world/common/UnkNpcAIFunc1_copy.inc.c index ce86512376..8810a43392 100644 --- a/src/world/common/UnkNpcAIFunc1_copy.inc.c +++ b/src/world/common/UnkNpcAIFunc1_copy.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc1_copy)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc2.inc.c b/src/world/common/UnkNpcAIFunc2.inc.c index c06805509d..f4807214ec 100644 --- a/src/world/common/UnkNpcAIFunc2.inc.c +++ b/src/world/common/UnkNpcAIFunc2.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc2)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc20.inc.c b/src/world/common/UnkNpcAIFunc20.inc.c index cb5d192c6a..259c7078e5 100644 --- a/src/world/common/UnkNpcAIFunc20.inc.c +++ b/src/world/common/UnkNpcAIFunc20.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc20)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc21.inc.c b/src/world/common/UnkNpcAIFunc21.inc.c index 85162533ff..4fddb8561d 100644 --- a/src/world/common/UnkNpcAIFunc21.inc.c +++ b/src/world/common/UnkNpcAIFunc21.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc21)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc22.inc.c b/src/world/common/UnkNpcAIFunc22.inc.c index 81a5849f41..0e144e36f6 100644 --- a/src/world/common/UnkNpcAIFunc22.inc.c +++ b/src/world/common/UnkNpcAIFunc22.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc22)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc23.inc.c b/src/world/common/UnkNpcAIFunc23.inc.c index 4fd7ebb4b2..0d98d284bd 100644 --- a/src/world/common/UnkNpcAIFunc23.inc.c +++ b/src/world/common/UnkNpcAIFunc23.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc23)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc24.inc.c b/src/world/common/UnkNpcAIFunc24.inc.c index d66915a97e..5cffb0caf7 100644 --- a/src/world/common/UnkNpcAIFunc24.inc.c +++ b/src/world/common/UnkNpcAIFunc24.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc24)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc25.inc.c b/src/world/common/UnkNpcAIFunc25.inc.c index ddf4185a78..92c4a7fa1d 100644 --- a/src/world/common/UnkNpcAIFunc25.inc.c +++ b/src/world/common/UnkNpcAIFunc25.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc25)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc26.inc.c b/src/world/common/UnkNpcAIFunc26.inc.c index 583c689431..d2a3e1d0d8 100644 --- a/src/world/common/UnkNpcAIFunc26.inc.c +++ b/src/world/common/UnkNpcAIFunc26.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" s32 N(UnkNpcAIFunc26)(Evt* script) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc27.inc.c b/src/world/common/UnkNpcAIFunc27.inc.c index e70905e2c1..96a5b15c0d 100644 --- a/src/world/common/UnkNpcAIFunc27.inc.c +++ b/src/world/common/UnkNpcAIFunc27.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkNpcAIFunc27)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc28.inc.c b/src/world/common/UnkNpcAIFunc28.inc.c index 5cf1043c4c..fab48f4e33 100644 --- a/src/world/common/UnkNpcAIFunc28.inc.c +++ b/src/world/common/UnkNpcAIFunc28.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkNpcAIFunc28)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc29.inc.c b/src/world/common/UnkNpcAIFunc29.inc.c index b61dee087d..e5a2f3ea14 100644 --- a/src/world/common/UnkNpcAIFunc29.inc.c +++ b/src/world/common/UnkNpcAIFunc29.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" void N(UnkNpcAIFunc29)(Evt *script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { diff --git a/src/world/common/UnkNpcAIFunc3.inc.c b/src/world/common/UnkNpcAIFunc3.inc.c index 5c314077e6..8836f6faf7 100644 --- a/src/world/common/UnkNpcAIFunc3.inc.c +++ b/src/world/common/UnkNpcAIFunc3.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc3)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc30.inc.c b/src/world/common/UnkNpcAIFunc30.inc.c index d3d2416e3b..9d29551e45 100644 --- a/src/world/common/UnkNpcAIFunc30.inc.c +++ b/src/world/common/UnkNpcAIFunc30.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" void N(UnkNpcAIFunc30)(Evt *script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { diff --git a/src/world/common/UnkNpcAIFunc31.inc.c b/src/world/common/UnkNpcAIFunc31.inc.c index cbfbcf8b7a..273de2c328 100644 --- a/src/world/common/UnkNpcAIFunc31.inc.c +++ b/src/world/common/UnkNpcAIFunc31.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" void N(UnkNpcAIFunc31)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { diff --git a/src/world/common/UnkNpcAIFunc32.inc.c b/src/world/common/UnkNpcAIFunc32.inc.c index 20482bbdca..516b28cd8b 100644 --- a/src/world/common/UnkNpcAIFunc32.inc.c +++ b/src/world/common/UnkNpcAIFunc32.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" void N(UnkNpcAIFunc32)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { diff --git a/src/world/common/UnkNpcAIFunc33.inc.c b/src/world/common/UnkNpcAIFunc33.inc.c index 96c8388b36..dc69da3760 100644 --- a/src/world/common/UnkNpcAIFunc33.inc.c +++ b/src/world/common/UnkNpcAIFunc33.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" void N(UnkNpcAIFunc33)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { diff --git a/src/world/common/UnkNpcAIFunc34.inc.c b/src/world/common/UnkNpcAIFunc34.inc.c index 41a658bc96..667045ca91 100644 --- a/src/world/common/UnkNpcAIFunc34.inc.c +++ b/src/world/common/UnkNpcAIFunc34.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" void N(UnkNpcAIFunc34)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { diff --git a/src/world/common/UnkNpcAIFunc4.inc.c b/src/world/common/UnkNpcAIFunc4.inc.c index cf8ad78605..da353bf0c0 100644 --- a/src/world/common/UnkNpcAIFunc4.inc.c +++ b/src/world/common/UnkNpcAIFunc4.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc5.inc.c b/src/world/common/UnkNpcAIFunc5.inc.c index a1d65bf77d..f68fac08ce 100644 --- a/src/world/common/UnkNpcAIFunc5.inc.c +++ b/src/world/common/UnkNpcAIFunc5.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc5)(Evt* script) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc6.inc.c b/src/world/common/UnkNpcAIFunc6.inc.c index 23936c7ae8..f82496f515 100644 --- a/src/world/common/UnkNpcAIFunc6.inc.c +++ b/src/world/common/UnkNpcAIFunc6.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc6)(Evt* script) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc7.inc.c b/src/world/common/UnkNpcAIFunc7.inc.c index 70bcf30df0..7a813abe27 100644 --- a/src/world/common/UnkNpcAIFunc7.inc.c +++ b/src/world/common/UnkNpcAIFunc7.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc7)(Evt* script) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc8.inc.c b/src/world/common/UnkNpcAIFunc8.inc.c index d2e380b9db..ca36190a39 100644 --- a/src/world/common/UnkNpcAIFunc8.inc.c +++ b/src/world/common/UnkNpcAIFunc8.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "effects.h" void N(UnkNpcAIFunc8)(Evt* script) { diff --git a/src/world/common/UnkNpcAIFunc9.inc.c b/src/world/common/UnkNpcAIFunc9.inc.c index 051e085b62..dd24ed3fad 100644 --- a/src/world/common/UnkNpcAIFunc9.inc.c +++ b/src/world/common/UnkNpcAIFunc9.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcAIFunc9)(Evt* script) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcDurationAnimationFunc.inc.c b/src/world/common/UnkNpcDurationAnimationFunc.inc.c index 971e8d82cd..d3baaaf309 100644 --- a/src/world/common/UnkNpcDurationAnimationFunc.inc.c +++ b/src/world/common/UnkNpcDurationAnimationFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcDurationAnimationFunc)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcDurationFlagFunc.inc.c b/src/world/common/UnkNpcDurationFlagFunc.inc.c index 69979696cf..fd7c63f525 100644 --- a/src/world/common/UnkNpcDurationFlagFunc.inc.c +++ b/src/world/common/UnkNpcDurationFlagFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcDurationFlagFunc)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcDurationFlagFunc2.inc.c b/src/world/common/UnkNpcDurationFlagFunc2.inc.c index b98c569c87..69602b9fdd 100644 --- a/src/world/common/UnkNpcDurationFlagFunc2.inc.c +++ b/src/world/common/UnkNpcDurationFlagFunc2.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcDurationFlagFunc2)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcDurationFlagFunc3.inc.c b/src/world/common/UnkNpcDurationFlagFunc3.inc.c index 645b752be8..026b069eab 100644 --- a/src/world/common/UnkNpcDurationFlagFunc3.inc.c +++ b/src/world/common/UnkNpcDurationFlagFunc3.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkNpcDurationFlagFunc3)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkPartnerFuncs.inc.c b/src/world/common/UnkPartnerFuncs.inc.c index 5230a036ac..5224991c30 100644 --- a/src/world/common/UnkPartnerFuncs.inc.c +++ b/src/world/common/UnkPartnerFuncs.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkRotatePartner)(Evt* script, s32 isInitialCall) { Npc* partner = get_npc_unsafe(NPC_PARTNER); diff --git a/src/world/common/UnkPositionFunc.inc.c b/src/world/common/UnkPositionFunc.inc.c index a01583409e..779cc4f805 100644 --- a/src/world/common/UnkPositionFunc.inc.c +++ b/src/world/common/UnkPositionFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkPositionFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkQuizFunc.inc.c b/src/world/common/UnkQuizFunc.inc.c index a6f70a0196..89db6057ae 100644 --- a/src/world/common/UnkQuizFunc.inc.c +++ b/src/world/common/UnkQuizFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" extern QuizRequirements N(quizRequirements)[]; diff --git a/src/world/common/UnkRotatePlayer.inc.c b/src/world/common/UnkRotatePlayer.inc.c index 01f15520e0..1d4649101b 100644 --- a/src/world/common/UnkRotatePlayer.inc.c +++ b/src/world/common/UnkRotatePlayer.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkRotatePlayer)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; diff --git a/src/world/common/UnkSetDurationFunc.inc.c b/src/world/common/UnkSetDurationFunc.inc.c index 21f6d724ab..a02f631ba5 100644 --- a/src/world/common/UnkSetDurationFunc.inc.c +++ b/src/world/common/UnkSetDurationFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(UnkSetDurationFunc)(Evt* script) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkTexturePanFunc.inc.c b/src/world/common/UnkTexturePanFunc.inc.c index bd8c033ec5..16526ea72c 100644 --- a/src/world/common/UnkTexturePanFunc.inc.c +++ b/src/world/common/UnkTexturePanFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkTexturePanFunc)(Evt* script, s32 isInitialCall) { script->varTable[9] += script->varTable[1]; diff --git a/src/world/common/UnkTexturePanFunc2.inc.c b/src/world/common/UnkTexturePanFunc2.inc.c index 45f697f616..e3819b9880 100644 --- a/src/world/common/UnkTexturePanFunc2.inc.c +++ b/src/world/common/UnkTexturePanFunc2.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkTexturePanFunc2)(Evt* script, s32 isInitialCall) { if (isInitialCall) { diff --git a/src/world/common/UnkYawFunc.inc.c b/src/world/common/UnkYawFunc.inc.c index b2892a4a4a..6abfacc54f 100644 --- a/src/world/common/UnkYawFunc.inc.c +++ b/src/world/common/UnkYawFunc.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnkYawFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnsetCamera0Flag1000.inc.c b/src/world/common/UnsetCamera0Flag1000.inc.c index 39f795e89c..91a3aa9944 100644 --- a/src/world/common/UnsetCamera0Flag1000.inc.c +++ b/src/world/common/UnsetCamera0Flag1000.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" #include "camera.h" ApiStatus N(UnsetCamera0Flag1000)(Evt* script, s32 isInitialCall) { diff --git a/src/world/common/UnsetCamera0MoveFlag1.inc.c b/src/world/common/UnsetCamera0MoveFlag1.inc.c index b24296352b..54206cd766 100644 --- a/src/world/common/UnsetCamera0MoveFlag1.inc.c +++ b/src/world/common/UnsetCamera0MoveFlag1.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" ApiStatus N(UnsetCamera0MoveFlag1)(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[0]; diff --git a/src/world/common/foliage.inc.c b/src/world/common/foliage.inc.c index c8c2d0edbb..c505e7bc54 100644 --- a/src/world/common/foliage.inc.c +++ b/src/world/common/foliage.inc.c @@ -1,5 +1,6 @@ #include "common.h" -#include "map.h" +#include "npc.h" +#include "model.h" typedef struct FoliageModelList { s32 count; diff --git a/src/world/common/reflection.inc.c b/src/world/common/reflection.inc.c index ceddbec569..efc6854720 100644 --- a/src/world/common/reflection.inc.c +++ b/src/world/common/reflection.inc.c @@ -4,7 +4,7 @@ /// See also tst_11, which has a more primitive reflection implementation. #include "common.h" -#include "map.h" +#include "npc.h" #include "sprite.h" enum Reflection { diff --git a/src/world/common/set_script_owner_npc_anim.inc.c b/src/world/common/set_script_owner_npc_anim.inc.c index 42fe45a0ac..8e78ec5950 100644 --- a/src/world/common/set_script_owner_npc_anim.inc.c +++ b/src/world/common/set_script_owner_npc_anim.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(set_script_owner_npc_anim)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/set_script_owner_npc_col_height.inc.c b/src/world/common/set_script_owner_npc_col_height.inc.c index ca3ca2a151..e15d9bb3fe 100644 --- a/src/world/common/set_script_owner_npc_col_height.inc.c +++ b/src/world/common/set_script_owner_npc_col_height.inc.c @@ -1,5 +1,5 @@ #include "common.h" -#include "map.h" +#include "npc.h" void N(set_script_owner_npc_col_height)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { diff --git a/src/world/partner/bow.c b/src/world/partner/bow.c index 700c83a11c..ee422d9028 100644 --- a/src/world/partner/bow.c +++ b/src/world/partner/bow.c @@ -1,6 +1,6 @@ #include "common.h" #include "../partners.h" -#include "../../npc.h" +#include "npc.h" extern s32 D_802BE0C0; extern s32 D_802BE0C4; diff --git a/src/world/partner/watt.c b/src/world/partner/watt.c index b9f58b787d..7876a400f2 100644 --- a/src/world/partner/watt.c +++ b/src/world/partner/watt.c @@ -1,6 +1,7 @@ #include "common.h" #include "effects.h" #include "../src/world/partners.h" +#include "npc.h" void force_player_anim(s32 arg0); void func_802BE070_31DBE0(void); @@ -91,7 +92,7 @@ s32 func_802BDD0C_31D87C(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; PartnerActionStatus* partnerActionStatus = &gPartnerActionStatus; Npc* npc = script->owner2.npc; - + if (isInitialCall) { func_802BD180_31CCF0(); partner_init_put_away(npc); @@ -101,7 +102,7 @@ s32 func_802BDD0C_31D87C(Evt* script, s32 isInitialCall) { playerStatus->animFlags = playerStatus->animFlags & ~3; gGameStatusPtr->unk_7D = 0; } - + if (partner_put_away(npc) != 0) { return ApiStatus_DONE1; } else { @@ -156,7 +157,7 @@ ApiStatus func_802BDE88_31D9F8(Evt* script, s32 isInitialCall) { } break; } - + return ApiStatus_BLOCK; } @@ -164,7 +165,7 @@ void func_802BE014_31DB84(void) { PlayerStatus* playerStatus = &gPlayerStatus; f32 currentSpeed = playerStatus->currentSpeed; s32 animationID; - + if (playerStatus->runSpeed <= currentSpeed) { animationID = 0x60002; } else if (playerStatus->walkSpeed <= currentSpeed) { diff --git a/src/world/partners.c b/src/world/partners.c index b359d2511a..521888eb90 100644 --- a/src/world/partners.c +++ b/src/world/partners.c @@ -1,7 +1,6 @@ #include "common.h" #include "ld_addrs.h" #include "partners.h" -#include "map.h" #include "npc.h" #include "partner/goombario.h" diff --git a/src/world/world.c b/src/world/world.c index 09b325348f..f9fb6e0370 100644 --- a/src/world/world.c +++ b/src/world/world.c @@ -1,6 +1,6 @@ #include "common.h" #include "ld_addrs.h" -#include "map.h" +#include "npc.h" #include "camera.h" #include "hud_element.h" #include "sprite.h" diff --git a/tools/build/configure.py b/tools/build/configure.py index 6e505553b4..66838d745d 100755 --- a/tools/build/configure.py +++ b/tools/build/configure.py @@ -254,7 +254,7 @@ class Configure: None, str(self.version_path / "baserom.z64"), modes, - verbose=True, + verbose=False, ) self.linker_entries = split.linker_writer.entries[:] self.asset_stack = split.config["asset_stack"] diff --git a/ver/us/asm/nonmatchings/B4580/add_anim_node.s b/ver/us/asm/nonmatchings/B4580/add_anim_node.s deleted file mode 100644 index e7f24bfa4d..0000000000 --- a/ver/us/asm/nonmatchings/B4580/add_anim_node.s +++ /dev/null @@ -1,126 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel add_anim_node -/* B4E18 8011E718 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* B4E1C 8011E71C AFB20018 */ sw $s2, 0x18($sp) -/* B4E20 8011E720 0080902D */ daddu $s2, $a0, $zero -/* B4E24 8011E724 AFB3001C */ sw $s3, 0x1c($sp) -/* B4E28 8011E728 00A0982D */ daddu $s3, $a1, $zero -/* B4E2C 8011E72C AFB10014 */ sw $s1, 0x14($sp) -/* B4E30 8011E730 00C0882D */ daddu $s1, $a2, $zero -/* B4E34 8011E734 24040100 */ addiu $a0, $zero, 0x100 -/* B4E38 8011E738 AFBF0020 */ sw $ra, 0x20($sp) -/* B4E3C 8011E73C 0C00AB39 */ jal heap_malloc -/* B4E40 8011E740 AFB00010 */ sw $s0, 0x10($sp) -/* B4E44 8011E744 0040802D */ daddu $s0, $v0, $zero -/* B4E48 8011E748 16000003 */ bnez $s0, .L8011E758 -/* B4E4C 8011E74C 24020010 */ addiu $v0, $zero, 0x10 -.L8011E750: -/* B4E50 8011E750 080479D4 */ j .L8011E750 -/* B4E54 8011E754 00000000 */ nop -.L8011E758: -/* B4E58 8011E758 A60200F4 */ sh $v0, 0xf4($s0) -/* B4E5C 8011E75C 8E220000 */ lw $v0, ($s1) -/* B4E60 8011E760 AE020000 */ sw $v0, ($s0) -/* B4E64 8011E764 C6200004 */ lwc1 $f0, 4($s1) -/* B4E68 8011E768 E6000084 */ swc1 $f0, 0x84($s0) -/* B4E6C 8011E76C C6200008 */ lwc1 $f0, 8($s1) -/* B4E70 8011E770 E6000088 */ swc1 $f0, 0x88($s0) -/* B4E74 8011E774 C620000C */ lwc1 $f0, 0xc($s1) -/* B4E78 8011E778 AE000090 */ sw $zero, 0x90($s0) -/* B4E7C 8011E77C AE000094 */ sw $zero, 0x94($s0) -/* B4E80 8011E780 AE000098 */ sw $zero, 0x98($s0) -/* B4E84 8011E784 E600008C */ swc1 $f0, 0x8c($s0) -/* B4E88 8011E788 C6200010 */ lwc1 $f0, 0x10($s1) -/* B4E8C 8011E78C 2404001F */ addiu $a0, $zero, 0x1f -/* B4E90 8011E790 E600009C */ swc1 $f0, 0x9c($s0) -/* B4E94 8011E794 C6200014 */ lwc1 $f0, 0x14($s1) -/* B4E98 8011E798 2603007C */ addiu $v1, $s0, 0x7c -/* B4E9C 8011E79C E60000A0 */ swc1 $f0, 0xa0($s0) -/* B4EA0 8011E7A0 C6220018 */ lwc1 $f2, 0x18($s1) -/* B4EA4 8011E7A4 3C013F80 */ lui $at, 0x3f80 -/* B4EA8 8011E7A8 44810000 */ mtc1 $at, $f0 -/* B4EAC 8011E7AC 2402FFFF */ addiu $v0, $zero, -1 -/* B4EB0 8011E7B0 A60200F8 */ sh $v0, 0xf8($s0) -/* B4EB4 8011E7B4 E60000A8 */ swc1 $f0, 0xa8($s0) -/* B4EB8 8011E7B8 E60000AC */ swc1 $f0, 0xac($s0) -/* B4EBC 8011E7BC E60000B0 */ swc1 $f0, 0xb0($s0) -/* B4EC0 8011E7C0 E60200A4 */ swc1 $f2, 0xa4($s0) -.L8011E7C4: -/* B4EC4 8011E7C4 AC600004 */ sw $zero, 4($v1) -/* B4EC8 8011E7C8 2484FFFF */ addiu $a0, $a0, -1 -/* B4ECC 8011E7CC 0481FFFD */ bgez $a0, .L8011E7C4 -/* B4ED0 8011E7D0 2463FFFC */ addiu $v1, $v1, -4 -/* B4ED4 8011E7D4 92510014 */ lbu $s1, 0x14($s2) -/* B4ED8 8011E7D8 1660001A */ bnez $s3, .L8011E844 -/* B4EDC 8011E7DC 26310001 */ addiu $s1, $s1, 1 -/* B4EE0 8011E7E0 8E420010 */ lw $v0, 0x10($s2) -/* B4EE4 8011E7E4 14400003 */ bnez $v0, .L8011E7F4 -/* B4EE8 8011E7E8 A61100F6 */ sh $s1, 0xf6($s0) -/* B4EEC 8011E7EC 08047A26 */ j .L8011E898 -/* B4EF0 8011E7F0 AE500010 */ sw $s0, 0x10($s2) -.L8011E7F4: -/* B4EF4 8011E7F4 8E440010 */ lw $a0, 0x10($s2) -/* B4EF8 8011E7F8 0C047837 */ jal get_animator_child_with_id -/* B4EFC 8011E7FC 24050001 */ addiu $a1, $zero, 1 -/* B4F00 8011E800 14400003 */ bnez $v0, .L8011E810 -/* B4F04 8011E804 0000202D */ daddu $a0, $zero, $zero -.L8011E808: -/* B4F08 8011E808 08047A02 */ j .L8011E808 -/* B4F0C 8011E80C 00000000 */ nop -.L8011E810: -/* B4F10 8011E810 0040182D */ daddu $v1, $v0, $zero -.L8011E814: -/* B4F14 8011E814 8C620004 */ lw $v0, 4($v1) -/* B4F18 8011E818 50400005 */ beql $v0, $zero, .L8011E830 -/* B4F1C 8011E81C AC700004 */ sw $s0, 4($v1) -/* B4F20 8011E820 24840001 */ addiu $a0, $a0, 1 -/* B4F24 8011E824 28820020 */ slti $v0, $a0, 0x20 -/* B4F28 8011E828 1440FFFA */ bnez $v0, .L8011E814 -/* B4F2C 8011E82C 24630004 */ addiu $v1, $v1, 4 -.L8011E830: -/* B4F30 8011E830 28820020 */ slti $v0, $a0, 0x20 -/* B4F34 8011E834 14400019 */ bnez $v0, .L8011E89C -/* B4F38 8011E838 0200102D */ daddu $v0, $s0, $zero -.L8011E83C: -/* B4F3C 8011E83C 08047A0F */ j .L8011E83C -/* B4F40 8011E840 00000000 */ nop -.L8011E844: -/* B4F44 8011E844 A61100F6 */ sh $s1, 0xf6($s0) -/* B4F48 8011E848 8E440010 */ lw $a0, 0x10($s2) -/* B4F4C 8011E84C 0C047837 */ jal get_animator_child_with_id -/* B4F50 8011E850 0260282D */ daddu $a1, $s3, $zero -/* B4F54 8011E854 14400003 */ bnez $v0, .L8011E864 -/* B4F58 8011E858 0000202D */ daddu $a0, $zero, $zero -.L8011E85C: -/* B4F5C 8011E85C 08047A17 */ j .L8011E85C -/* B4F60 8011E860 00000000 */ nop -.L8011E864: -/* B4F64 8011E864 0040182D */ daddu $v1, $v0, $zero -.L8011E868: -/* B4F68 8011E868 8C620004 */ lw $v0, 4($v1) -/* B4F6C 8011E86C 50400005 */ beql $v0, $zero, .L8011E884 -/* B4F70 8011E870 AC700004 */ sw $s0, 4($v1) -/* B4F74 8011E874 24840001 */ addiu $a0, $a0, 1 -/* B4F78 8011E878 28820020 */ slti $v0, $a0, 0x20 -/* B4F7C 8011E87C 1440FFFA */ bnez $v0, .L8011E868 -/* B4F80 8011E880 24630004 */ addiu $v1, $v1, 4 -.L8011E884: -/* B4F84 8011E884 28820020 */ slti $v0, $a0, 0x20 -/* B4F88 8011E888 14400004 */ bnez $v0, .L8011E89C -/* B4F8C 8011E88C 0200102D */ daddu $v0, $s0, $zero -.L8011E890: -/* B4F90 8011E890 08047A24 */ j .L8011E890 -/* B4F94 8011E894 00000000 */ nop -.L8011E898: -/* B4F98 8011E898 0200102D */ daddu $v0, $s0, $zero -.L8011E89C: -/* B4F9C 8011E89C A2510014 */ sb $s1, 0x14($s2) -/* B4FA0 8011E8A0 8FBF0020 */ lw $ra, 0x20($sp) -/* B4FA4 8011E8A4 8FB3001C */ lw $s3, 0x1c($sp) -/* B4FA8 8011E8A8 8FB20018 */ lw $s2, 0x18($sp) -/* B4FAC 8011E8AC 8FB10014 */ lw $s1, 0x14($sp) -/* B4FB0 8011E8B0 8FB00010 */ lw $s0, 0x10($sp) -/* B4FB4 8011E8B4 03E00008 */ jr $ra -/* B4FB8 8011E8B8 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/B4580/animator_make_identity.s b/ver/us/asm/nonmatchings/B4580/animator_make_identity.s deleted file mode 100644 index 17be0469c6..0000000000 --- a/ver/us/asm/nonmatchings/B4580/animator_make_identity.s +++ /dev/null @@ -1,20 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel animator_make_identity -/* B479C 8011E09C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B47A0 8011E0A0 AFB00010 */ sw $s0, 0x10($sp) -/* B47A4 8011E0A4 AFBF0014 */ sw $ra, 0x14($sp) -/* B47A8 8011E0A8 0C019D28 */ jal guMtxIdentF -/* B47AC 8011E0AC 0080802D */ daddu $s0, $a0, $zero -/* B47B0 8011E0B0 3C013F80 */ lui $at, 0x3f80 -/* B47B4 8011E0B4 44810000 */ mtc1 $at, $f0 -/* B47B8 8011E0B8 00000000 */ nop -/* B47BC 8011E0BC E6000000 */ swc1 $f0, ($s0) -/* B47C0 8011E0C0 E6000014 */ swc1 $f0, 0x14($s0) -/* B47C4 8011E0C4 E6000028 */ swc1 $f0, 0x28($s0) -/* B47C8 8011E0C8 E600003C */ swc1 $f0, 0x3c($s0) -/* B47CC 8011E0CC 8FBF0014 */ lw $ra, 0x14($sp) -/* B47D0 8011E0D0 8FB00010 */ lw $s0, 0x10($sp) -/* B47D4 8011E0D4 03E00008 */ jr $ra -/* B47D8 8011E0D8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/B4580/animator_make_mirrorX.s b/ver/us/asm/nonmatchings/B4580/animator_make_mirrorX.s deleted file mode 100644 index 132016c3f3..0000000000 --- a/ver/us/asm/nonmatchings/B4580/animator_make_mirrorX.s +++ /dev/null @@ -1,21 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel animator_make_mirrorX -/* B4758 8011E058 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B475C 8011E05C AFB00010 */ sw $s0, 0x10($sp) -/* B4760 8011E060 AFBF0014 */ sw $ra, 0x14($sp) -/* B4764 8011E064 0C019D28 */ jal guMtxIdentF -/* B4768 8011E068 0080802D */ daddu $s0, $a0, $zero -/* B476C 8011E06C 3C01BF80 */ lui $at, 0xbf80 -/* B4770 8011E070 44811000 */ mtc1 $at, $f2 -/* B4774 8011E074 3C013F80 */ lui $at, 0x3f80 -/* B4778 8011E078 44810000 */ mtc1 $at, $f0 -/* B477C 8011E07C E6020000 */ swc1 $f2, ($s0) -/* B4780 8011E080 E6000014 */ swc1 $f0, 0x14($s0) -/* B4784 8011E084 E6000028 */ swc1 $f0, 0x28($s0) -/* B4788 8011E088 E600003C */ swc1 $f0, 0x3c($s0) -/* B478C 8011E08C 8FBF0014 */ lw $ra, 0x14($sp) -/* B4790 8011E090 8FB00010 */ lw $s0, 0x10($sp) -/* B4794 8011E094 03E00008 */ jr $ra -/* B4798 8011E098 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/B4580/animator_make_mirrorY.s b/ver/us/asm/nonmatchings/B4580/animator_make_mirrorY.s deleted file mode 100644 index e24fb88014..0000000000 --- a/ver/us/asm/nonmatchings/B4580/animator_make_mirrorY.s +++ /dev/null @@ -1,21 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel animator_make_mirrorY -/* B4714 8011E014 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B4718 8011E018 AFB00010 */ sw $s0, 0x10($sp) -/* B471C 8011E01C AFBF0014 */ sw $ra, 0x14($sp) -/* B4720 8011E020 0C019D28 */ jal guMtxIdentF -/* B4724 8011E024 0080802D */ daddu $s0, $a0, $zero -/* B4728 8011E028 3C013F80 */ lui $at, 0x3f80 -/* B472C 8011E02C 44810000 */ mtc1 $at, $f0 -/* B4730 8011E030 3C01BF80 */ lui $at, 0xbf80 -/* B4734 8011E034 44811000 */ mtc1 $at, $f2 -/* B4738 8011E038 E6000000 */ swc1 $f0, ($s0) -/* B473C 8011E03C E6020014 */ swc1 $f2, 0x14($s0) -/* B4740 8011E040 E6000028 */ swc1 $f0, 0x28($s0) -/* B4744 8011E044 E600003C */ swc1 $f0, 0x3c($s0) -/* B4748 8011E048 8FBF0014 */ lw $ra, 0x14($sp) -/* B474C 8011E04C 8FB00010 */ lw $s0, 0x10($sp) -/* B4750 8011E050 03E00008 */ jr $ra -/* B4754 8011E054 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/B4580/animator_make_mirrorZ.s b/ver/us/asm/nonmatchings/B4580/animator_make_mirrorZ.s deleted file mode 100644 index 23c4b29d71..0000000000 --- a/ver/us/asm/nonmatchings/B4580/animator_make_mirrorZ.s +++ /dev/null @@ -1,21 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel animator_make_mirrorZ -/* B46D0 8011DFD0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B46D4 8011DFD4 AFB00010 */ sw $s0, 0x10($sp) -/* B46D8 8011DFD8 AFBF0014 */ sw $ra, 0x14($sp) -/* B46DC 8011DFDC 0C019D28 */ jal guMtxIdentF -/* B46E0 8011DFE0 0080802D */ daddu $s0, $a0, $zero -/* B46E4 8011DFE4 3C013F80 */ lui $at, 0x3f80 -/* B46E8 8011DFE8 44810000 */ mtc1 $at, $f0 -/* B46EC 8011DFEC 3C01BF80 */ lui $at, 0xbf80 -/* B46F0 8011DFF0 44811000 */ mtc1 $at, $f2 -/* B46F4 8011DFF4 E6000000 */ swc1 $f0, ($s0) -/* B46F8 8011DFF8 E6000014 */ swc1 $f0, 0x14($s0) -/* B46FC 8011DFFC E6020028 */ swc1 $f2, 0x28($s0) -/* B4700 8011E000 E600003C */ swc1 $f0, 0x3c($s0) -/* B4704 8011E004 8FBF0014 */ lw $ra, 0x14($sp) -/* B4708 8011E008 8FB00010 */ lw $s0, 0x10($sp) -/* B470C 8011E00C 03E00008 */ jr $ra -/* B4710 8011E010 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/B4580/animator_node_update_model_transform.s b/ver/us/asm/nonmatchings/B4580/animator_node_update_model_transform.s deleted file mode 100644 index 3d499d8d35..0000000000 --- a/ver/us/asm/nonmatchings/B4580/animator_node_update_model_transform.s +++ /dev/null @@ -1,131 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel animator_node_update_model_transform -/* B5818 8011F118 27BDFF80 */ addiu $sp, $sp, -0x80 -/* B581C 8011F11C AFB40060 */ sw $s4, 0x60($sp) -/* B5820 8011F120 0080A02D */ daddu $s4, $a0, $zero -/* B5824 8011F124 AFB60068 */ sw $s6, 0x68($sp) -/* B5828 8011F128 00A0B02D */ daddu $s6, $a1, $zero -/* B582C 8011F12C AFB3005C */ sw $s3, 0x5c($sp) -/* B5830 8011F130 00C0982D */ daddu $s3, $a2, $zero -/* B5834 8011F134 AFBF006C */ sw $ra, 0x6c($sp) -/* B5838 8011F138 AFB50064 */ sw $s5, 0x64($sp) -/* B583C 8011F13C AFB20058 */ sw $s2, 0x58($sp) -/* B5840 8011F140 AFB10054 */ sw $s1, 0x54($sp) -/* B5844 8011F144 AFB00050 */ sw $s0, 0x50($sp) -/* B5848 8011F148 F7B60078 */ sdc1 $f22, 0x78($sp) -/* B584C 8011F14C F7B40070 */ sdc1 $f20, 0x70($sp) -/* B5850 8011F150 C66C009C */ lwc1 $f12, 0x9c($s3) -/* B5854 8011F154 0C00A6C9 */ jal clamp_angle -/* B5858 8011F158 00E0A82D */ daddu $s5, $a3, $zero -/* B585C 8011F15C C66C00A0 */ lwc1 $f12, 0xa0($s3) -/* B5860 8011F160 0C00A6C9 */ jal clamp_angle -/* B5864 8011F164 46000586 */ mov.s $f22, $f0 -/* B5868 8011F168 C66C00A4 */ lwc1 $f12, 0xa4($s3) -/* B586C 8011F16C 0C00A6C9 */ jal clamp_angle -/* B5870 8011F170 46000506 */ mov.s $f20, $f0 -/* B5874 8011F174 3C128015 */ lui $s2, %hi(D_80153A68) -/* B5878 8011F178 26523A68 */ addiu $s2, $s2, %lo(D_80153A68) -/* B587C 8011F17C 4405B000 */ mfc1 $a1, $f22 -/* B5880 8011F180 4406A000 */ mfc1 $a2, $f20 -/* B5884 8011F184 44070000 */ mfc1 $a3, $f0 -/* B5888 8011F188 0C0190B4 */ jal guRotateRPYF -/* B588C 8011F18C 0240202D */ daddu $a0, $s2, $zero -/* B5890 8011F190 3C108015 */ lui $s0, %hi(D_80153AA8) -/* B5894 8011F194 26103AA8 */ addiu $s0, $s0, %lo(D_80153AA8) -/* B5898 8011F198 8E6500A8 */ lw $a1, 0xa8($s3) -/* B589C 8011F19C 8E6600AC */ lw $a2, 0xac($s3) -/* B58A0 8011F1A0 8E6700B0 */ lw $a3, 0xb0($s3) -/* B58A4 8011F1A4 0C019DF0 */ jal guScaleF -/* B58A8 8011F1A8 0200202D */ daddu $a0, $s0, $zero -/* B58AC 8011F1AC C6620084 */ lwc1 $f2, 0x84($s3) -/* B58B0 8011F1B0 C6600090 */ lwc1 $f0, 0x90($s3) -/* B58B4 8011F1B4 46001080 */ add.s $f2, $f2, $f0 -/* B58B8 8011F1B8 C6600094 */ lwc1 $f0, 0x94($s3) -/* B58BC 8011F1BC 44051000 */ mfc1 $a1, $f2 -/* B58C0 8011F1C0 C6620088 */ lwc1 $f2, 0x88($s3) -/* B58C4 8011F1C4 46001080 */ add.s $f2, $f2, $f0 -/* B58C8 8011F1C8 C6600098 */ lwc1 $f0, 0x98($s3) -/* B58CC 8011F1CC 44061000 */ mfc1 $a2, $f2 -/* B58D0 8011F1D0 C662008C */ lwc1 $f2, 0x8c($s3) -/* B58D4 8011F1D4 46001080 */ add.s $f2, $f2, $f0 -/* B58D8 8011F1D8 3C118015 */ lui $s1, %hi(D_80153AE8) -/* B58DC 8011F1DC 26313AE8 */ addiu $s1, $s1, %lo(D_80153AE8) -/* B58E0 8011F1E0 44071000 */ mfc1 $a3, $f2 -/* B58E4 8011F1E4 0C019E40 */ jal guTranslateF -/* B58E8 8011F1E8 0220202D */ daddu $a0, $s1, $zero -/* B58EC 8011F1EC 0200202D */ daddu $a0, $s0, $zero -/* B58F0 8011F1F0 0240282D */ daddu $a1, $s2, $zero -/* B58F4 8011F1F4 3C108015 */ lui $s0, %hi(D_80153B28) -/* B58F8 8011F1F8 26103B28 */ addiu $s0, $s0, %lo(D_80153B28) -/* B58FC 8011F1FC 0C019D80 */ jal guMtxCatF -/* B5900 8011F200 0200302D */ daddu $a2, $s0, $zero -/* B5904 8011F204 0200202D */ daddu $a0, $s0, $zero -/* B5908 8011F208 0220282D */ daddu $a1, $s1, $zero -/* B590C 8011F20C 0C019D80 */ jal guMtxCatF -/* B5910 8011F210 27A60010 */ addiu $a2, $sp, 0x10 -/* B5914 8011F214 8E820000 */ lw $v0, ($s4) -/* B5918 8011F218 3C030002 */ lui $v1, 2 -/* B591C 8011F21C 00431024 */ and $v0, $v0, $v1 -/* B5920 8011F220 14400005 */ bnez $v0, .L8011F238 -/* B5924 8011F224 27A40010 */ addiu $a0, $sp, 0x10 -/* B5928 8011F228 02C0282D */ daddu $a1, $s6, $zero -/* B592C 8011F22C 0C019D80 */ jal guMtxCatF -/* B5930 8011F230 0080302D */ daddu $a2, $a0, $zero -/* B5934 8011F234 27A40010 */ addiu $a0, $sp, 0x10 -.L8011F238: -/* B5938 8011F238 0C00A5C8 */ jal copy_matrix -/* B593C 8011F23C 266500B4 */ addiu $a1, $s3, 0xb4 -/* B5940 8011F240 966200F4 */ lhu $v0, 0xf4($s3) -/* B5944 8011F244 30421000 */ andi $v0, $v0, 0x1000 -/* B5948 8011F248 10400016 */ beqz $v0, .L8011F2A4 -/* B594C 8011F24C 0000882D */ daddu $s1, $zero, $zero -/* B5950 8011F250 8E6400FC */ lw $a0, 0xfc($s3) -/* B5954 8011F254 0C046C04 */ jal get_model_list_index_from_tree_index -/* B5958 8011F258 00000000 */ nop -/* B595C 8011F25C 0C046B4C */ jal get_model_from_list_index -/* B5960 8011F260 0040202D */ daddu $a0, $v0, $zero -/* B5964 8011F264 27A40010 */ addiu $a0, $sp, 0x10 -/* B5968 8011F268 0040802D */ daddu $s0, $v0, $zero -/* B596C 8011F26C 26110058 */ addiu $s1, $s0, 0x58 -/* B5970 8011F270 0C00A5C8 */ jal copy_matrix -/* B5974 8011F274 0220282D */ daddu $a1, $s1, $zero -/* B5978 8011F278 27A40010 */ addiu $a0, $sp, 0x10 -/* B597C 8011F27C 0C019D60 */ jal guMtxL2F -/* B5980 8011F280 02A0282D */ daddu $a1, $s5, $zero -/* B5984 8011F284 0220202D */ daddu $a0, $s1, $zero -/* B5988 8011F288 27A50010 */ addiu $a1, $sp, 0x10 -/* B598C 8011F28C 0C019D80 */ jal guMtxCatF -/* B5990 8011F290 0080302D */ daddu $a2, $a0, $zero -/* B5994 8011F294 96020000 */ lhu $v0, ($s0) -/* B5998 8011F298 34421000 */ ori $v0, $v0, 0x1000 -/* B599C 8011F29C A6020000 */ sh $v0, ($s0) -/* B59A0 8011F2A0 0000882D */ daddu $s1, $zero, $zero -.L8011F2A4: -/* B59A4 8011F2A4 0260802D */ daddu $s0, $s3, $zero -.L8011F2A8: -/* B59A8 8011F2A8 8E060004 */ lw $a2, 4($s0) -/* B59AC 8011F2AC 50C00006 */ beql $a2, $zero, .L8011F2C8 -/* B59B0 8011F2B0 26310001 */ addiu $s1, $s1, 1 -/* B59B4 8011F2B4 0280202D */ daddu $a0, $s4, $zero -/* B59B8 8011F2B8 27A50010 */ addiu $a1, $sp, 0x10 -/* B59BC 8011F2BC 0C047C46 */ jal animator_node_update_model_transform -/* B59C0 8011F2C0 02A0382D */ daddu $a3, $s5, $zero -/* B59C4 8011F2C4 26310001 */ addiu $s1, $s1, 1 -.L8011F2C8: -/* B59C8 8011F2C8 2A220020 */ slti $v0, $s1, 0x20 -/* B59CC 8011F2CC 1440FFF6 */ bnez $v0, .L8011F2A8 -/* B59D0 8011F2D0 26100004 */ addiu $s0, $s0, 4 -/* B59D4 8011F2D4 8FBF006C */ lw $ra, 0x6c($sp) -/* B59D8 8011F2D8 8FB60068 */ lw $s6, 0x68($sp) -/* B59DC 8011F2DC 8FB50064 */ lw $s5, 0x64($sp) -/* B59E0 8011F2E0 8FB40060 */ lw $s4, 0x60($sp) -/* B59E4 8011F2E4 8FB3005C */ lw $s3, 0x5c($sp) -/* B59E8 8011F2E8 8FB20058 */ lw $s2, 0x58($sp) -/* B59EC 8011F2EC 8FB10054 */ lw $s1, 0x54($sp) -/* B59F0 8011F2F0 8FB00050 */ lw $s0, 0x50($sp) -/* B59F4 8011F2F4 D7B60078 */ ldc1 $f22, 0x78($sp) -/* B59F8 8011F2F8 D7B40070 */ ldc1 $f20, 0x70($sp) -/* B59FC 8011F2FC 03E00008 */ jr $ra -/* B5A00 8011F300 27BD0080 */ addiu $sp, $sp, 0x80 diff --git a/ver/us/asm/nonmatchings/B4580/animator_update_model_transforms.s b/ver/us/asm/nonmatchings/B4580/animator_update_model_transforms.s deleted file mode 100644 index b6caee52f3..0000000000 --- a/ver/us/asm/nonmatchings/B4580/animator_update_model_transforms.s +++ /dev/null @@ -1,59 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel animator_update_model_transforms -/* B5758 8011F058 27BDFFA0 */ addiu $sp, $sp, -0x60 -/* B575C 8011F05C AFB00050 */ sw $s0, 0x50($sp) -/* B5760 8011F060 0080802D */ daddu $s0, $a0, $zero -/* B5764 8011F064 AFBF0058 */ sw $ra, 0x58($sp) -/* B5768 8011F068 AFB10054 */ sw $s1, 0x54($sp) -/* B576C 8011F06C 8E020010 */ lw $v0, 0x10($s0) -/* B5770 8011F070 10400024 */ beqz $v0, .L8011F104 -/* B5774 8011F074 00A0882D */ daddu $s1, $a1, $zero -/* B5778 8011F078 8E020000 */ lw $v0, ($s0) -/* B577C 8011F07C 30430700 */ andi $v1, $v0, 0x700 -/* B5780 8011F080 24020200 */ addiu $v0, $zero, 0x200 -/* B5784 8011F084 10620010 */ beq $v1, $v0, .L8011F0C8 -/* B5788 8011F088 2C620201 */ sltiu $v0, $v1, 0x201 -/* B578C 8011F08C 10400005 */ beqz $v0, .L8011F0A4 -/* B5790 8011F090 24020100 */ addiu $v0, $zero, 0x100 -/* B5794 8011F094 10620008 */ beq $v1, $v0, .L8011F0B8 -/* B5798 8011F098 00000000 */ nop -/* B579C 8011F09C 08047C3A */ j .L8011F0E8 -/* B57A0 8011F0A0 00000000 */ nop -.L8011F0A4: -/* B57A4 8011F0A4 24020400 */ addiu $v0, $zero, 0x400 -/* B57A8 8011F0A8 1062000B */ beq $v1, $v0, .L8011F0D8 -/* B57AC 8011F0AC 00000000 */ nop -/* B57B0 8011F0B0 08047C3A */ j .L8011F0E8 -/* B57B4 8011F0B4 00000000 */ nop -.L8011F0B8: -/* B57B8 8011F0B8 0C0477F4 */ jal animator_make_mirrorZ -/* B57BC 8011F0BC 27A40010 */ addiu $a0, $sp, 0x10 -/* B57C0 8011F0C0 08047C3D */ j .L8011F0F4 -/* B57C4 8011F0C4 0200202D */ daddu $a0, $s0, $zero -.L8011F0C8: -/* B57C8 8011F0C8 0C047805 */ jal animator_make_mirrorY -/* B57CC 8011F0CC 27A40010 */ addiu $a0, $sp, 0x10 -/* B57D0 8011F0D0 08047C3D */ j .L8011F0F4 -/* B57D4 8011F0D4 0200202D */ daddu $a0, $s0, $zero -.L8011F0D8: -/* B57D8 8011F0D8 0C047816 */ jal animator_make_mirrorX -/* B57DC 8011F0DC 27A40010 */ addiu $a0, $sp, 0x10 -/* B57E0 8011F0E0 08047C3D */ j .L8011F0F4 -/* B57E4 8011F0E4 0200202D */ daddu $a0, $s0, $zero -.L8011F0E8: -/* B57E8 8011F0E8 0C047827 */ jal animator_make_identity -/* B57EC 8011F0EC 27A40010 */ addiu $a0, $sp, 0x10 -/* B57F0 8011F0F0 0200202D */ daddu $a0, $s0, $zero -.L8011F0F4: -/* B57F4 8011F0F4 27A50010 */ addiu $a1, $sp, 0x10 -/* B57F8 8011F0F8 8C860010 */ lw $a2, 0x10($a0) -/* B57FC 8011F0FC 0C047C46 */ jal animator_node_update_model_transform -/* B5800 8011F100 0220382D */ daddu $a3, $s1, $zero -.L8011F104: -/* B5804 8011F104 8FBF0058 */ lw $ra, 0x58($sp) -/* B5808 8011F108 8FB10054 */ lw $s1, 0x54($sp) -/* B580C 8011F10C 8FB00050 */ lw $s0, 0x50($sp) -/* B5810 8011F110 03E00008 */ jr $ra -/* B5814 8011F114 27BD0060 */ addiu $sp, $sp, 0x60 diff --git a/ver/us/asm/nonmatchings/B4580/appendGfx_animator.s b/ver/us/asm/nonmatchings/B4580/appendGfx_animator.s index 86ec831fa5..e472172927 100644 --- a/ver/us/asm/nonmatchings/B4580/appendGfx_animator.s +++ b/ver/us/asm/nonmatchings/B4580/appendGfx_animator.s @@ -81,8 +81,8 @@ glabel appendGfx_animator /* B5CD4 8011F5D4 A4820000 */ sh $v0, ($a0) /* B5CD8 8011F5D8 3C02800A */ lui $v0, %hi(gDisplayContext) /* B5CDC 8011F5DC 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) -/* B5CE0 8011F5E0 3C048015 */ lui $a0, %hi(D_80153A44) -/* B5CE4 8011F5E4 8C843A44 */ lw $a0, %lo(D_80153A44)($a0) +/* B5CE0 8011F5E0 3C048015 */ lui $a0, %hi(gAnimModelFogEnabled) +/* B5CE4 8011F5E4 8C843A44 */ lw $a0, %lo(gAnimModelFogEnabled)($a0) /* B5CE8 8011F5E8 00431021 */ addu $v0, $v0, $v1 /* B5CEC 8011F5EC 0004202B */ sltu $a0, $zero, $a0 /* B5CF0 8011F5F0 10800006 */ beqz $a0, .L8011F60C @@ -301,10 +301,10 @@ glabel L8011F8DC_B5FDC /* B6004 8011F904 AC820004 */ sw $v0, 4($a0) glabel L8011F908_B6008 /* B6008 8011F908 3C070001 */ lui $a3, 1 -/* B600C 8011F90C 3C028015 */ lui $v0, %hi(D_80153A5C) -/* B6010 8011F910 8C423A5C */ lw $v0, %lo(D_80153A5C)($v0) -/* B6014 8011F914 3C038015 */ lui $v1, %hi(D_80153A58) -/* B6018 8011F918 8C633A58 */ lw $v1, %lo(D_80153A58)($v1) +/* B600C 8011F90C 3C028015 */ lui $v0, %hi(gAnimModelFogEnd) +/* B6010 8011F910 8C423A5C */ lw $v0, %lo(gAnimModelFogEnd)($v0) +/* B6014 8011F914 3C038015 */ lui $v1, %hi(gAnimModelFogStart) +/* B6018 8011F918 8C633A58 */ lw $v1, %lo(gAnimModelFogStart)($v1) /* B601C 8011F91C 34E7F400 */ ori $a3, $a3, 0xf400 /* B6020 8011F920 00431023 */ subu $v0, $v0, $v1 /* B6024 8011F924 14400002 */ bnez $v0, .L8011F930 diff --git a/ver/us/asm/nonmatchings/B4580/appendGfx_animator_node.s b/ver/us/asm/nonmatchings/B4580/appendGfx_animator_node.s index 25f7e00173..ab0cc9b974 100644 --- a/ver/us/asm/nonmatchings/B4580/appendGfx_animator_node.s +++ b/ver/us/asm/nonmatchings/B4580/appendGfx_animator_node.s @@ -119,8 +119,8 @@ glabel appendGfx_animator_node /* B6310 8011FC10 24020400 */ addiu $v0, $zero, 0x400 /* B6314 8011FC14 AD02002C */ sw $v0, 0x2c($t0) .L8011FC18: -/* B6318 8011FC18 3C028015 */ lui $v0, %hi(D_80153A44) -/* B631C 8011FC1C 8C423A44 */ lw $v0, %lo(D_80153A44)($v0) +/* B6318 8011FC18 3C028015 */ lui $v0, %hi(gAnimModelFogEnabled) +/* B631C 8011FC1C 8C423A44 */ lw $v0, %lo(gAnimModelFogEnabled)($v0) /* B6320 8011FC20 1440000C */ bnez $v0, .L8011FC54 /* B6324 8011FC24 3C04FC12 */ lui $a0, 0xfc12 /* B6328 8011FC28 3C05FCFF */ lui $a1, 0xfcff diff --git a/ver/us/asm/nonmatchings/B4580/clear_animator_flags.s b/ver/us/asm/nonmatchings/B4580/clear_animator_flags.s deleted file mode 100644 index 114d5a3dae..0000000000 --- a/ver/us/asm/nonmatchings/B4580/clear_animator_flags.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel clear_animator_flags -/* B6818 80120118 2402F7FF */ addiu $v0, $zero, -0x801 -/* B681C 8012011C 00822024 */ and $a0, $a0, $v0 -/* B6820 80120120 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) -/* B6824 80120124 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) -/* B6828 80120128 00042080 */ sll $a0, $a0, 2 -/* B682C 8012012C 00822021 */ addu $a0, $a0, $v0 -/* B6830 80120130 8C830000 */ lw $v1, ($a0) -/* B6834 80120134 8C620000 */ lw $v0, ($v1) -/* B6838 80120138 00052827 */ nor $a1, $zero, $a1 -/* B683C 8012013C 00451024 */ and $v0, $v0, $a1 -/* B6840 80120140 03E00008 */ jr $ra -/* B6844 80120144 AC620000 */ sw $v0, ($v1) diff --git a/ver/us/asm/nonmatchings/B4580/clear_animator_list.s b/ver/us/asm/nonmatchings/B4580/clear_animator_list.s deleted file mode 100644 index e63ea53511..0000000000 --- a/ver/us/asm/nonmatchings/B4580/clear_animator_list.s +++ /dev/null @@ -1,68 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel clear_animator_list -/* B4924 8011E224 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* B4928 8011E228 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* B492C 8011E22C 80420070 */ lb $v0, 0x70($v0) -/* B4930 8011E230 14400016 */ bnez $v0, .L8011E28C -/* B4934 8011E234 2404FFFF */ addiu $a0, $zero, -1 -/* B4938 8011E238 3C028015 */ lui $v0, %hi(D_801539C0) -/* B493C 8011E23C 244239C0 */ addiu $v0, $v0, %lo(D_801539C0) -/* B4940 8011E240 3C018015 */ lui $at, %hi(gCurrentAnimMeshListPtr) -/* B4944 8011E244 AC223A40 */ sw $v0, %lo(gCurrentAnimMeshListPtr)($at) -/* B4948 8011E248 2403005F */ addiu $v1, $zero, 0x5f -/* B494C 8011E24C 3C028015 */ lui $v0, %hi(D_801536B8) -/* B4950 8011E250 244236B8 */ addiu $v0, $v0, %lo(D_801536B8) -.L8011E254: -/* B4954 8011E254 AC440000 */ sw $a0, ($v0) -/* B4958 8011E258 2463FFFF */ addiu $v1, $v1, -1 -/* B495C 8011E25C 0461FFFD */ bgez $v1, .L8011E254 -/* B4960 8011E260 2442FFF8 */ addiu $v0, $v0, -8 -/* B4964 8011E264 2404FFFF */ addiu $a0, $zero, -1 -/* B4968 8011E268 2403005F */ addiu $v1, $zero, 0x5f -/* B496C 8011E26C 3C028015 */ lui $v0, %hi(D_801539B8) -/* B4970 8011E270 244239B8 */ addiu $v0, $v0, %lo(D_801539B8) -.L8011E274: -/* B4974 8011E274 AC440000 */ sw $a0, ($v0) -/* B4978 8011E278 2463FFFF */ addiu $v1, $v1, -1 -/* B497C 8011E27C 0461FFFD */ bgez $v1, .L8011E274 -/* B4980 8011E280 2442FFF8 */ addiu $v0, $v0, -8 -/* B4984 8011E284 080478A7 */ j .L8011E29C -/* B4988 8011E288 00000000 */ nop -.L8011E28C: -/* B498C 8011E28C 3C028015 */ lui $v0, %hi(D_80153A00) -/* B4990 8011E290 24423A00 */ addiu $v0, $v0, %lo(D_80153A00) -/* B4994 8011E294 3C018015 */ lui $at, %hi(gCurrentAnimMeshListPtr) -/* B4998 8011E298 AC223A40 */ sw $v0, %lo(gCurrentAnimMeshListPtr)($at) -.L8011E29C: -/* B499C 8011E29C 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) -/* B49A0 8011E2A0 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) -/* B49A4 8011E2A4 2403000F */ addiu $v1, $zero, 0xf -/* B49A8 8011E2A8 2442003C */ addiu $v0, $v0, 0x3c -.L8011E2AC: -/* B49AC 8011E2AC AC400000 */ sw $zero, ($v0) -/* B49B0 8011E2B0 2463FFFF */ addiu $v1, $v1, -1 -/* B49B4 8011E2B4 0461FFFD */ bgez $v1, .L8011E2AC -/* B49B8 8011E2B8 2442FFFC */ addiu $v0, $v0, -4 -/* B49BC 8011E2BC 2402000A */ addiu $v0, $zero, 0xa -/* B49C0 8011E2C0 3C018015 */ lui $at, %hi(D_80153A48) -/* B49C4 8011E2C4 AC223A48 */ sw $v0, %lo(D_80153A48)($at) -/* B49C8 8011E2C8 3C018015 */ lui $at, %hi(D_80153A4C) -/* B49CC 8011E2CC AC223A4C */ sw $v0, %lo(D_80153A4C)($at) -/* B49D0 8011E2D0 3C018015 */ lui $at, %hi(D_80153A50) -/* B49D4 8011E2D4 AC223A50 */ sw $v0, %lo(D_80153A50)($at) -/* B49D8 8011E2D8 3C018015 */ lui $at, %hi(D_80153A54) -/* B49DC 8011E2DC AC223A54 */ sw $v0, %lo(D_80153A54)($at) -/* B49E0 8011E2E0 24020320 */ addiu $v0, $zero, 0x320 -/* B49E4 8011E2E4 3C018015 */ lui $at, %hi(D_80153A58) -/* B49E8 8011E2E8 AC223A58 */ sw $v0, %lo(D_80153A58)($at) -/* B49EC 8011E2EC 240203E8 */ addiu $v0, $zero, 0x3e8 -/* B49F0 8011E2F0 3C018015 */ lui $at, %hi(D_801512D4) -/* B49F4 8011E2F4 AC2012D4 */ sw $zero, %lo(D_801512D4)($at) -/* B49F8 8011E2F8 3C018015 */ lui $at, %hi(D_80153A44) -/* B49FC 8011E2FC AC203A44 */ sw $zero, %lo(D_80153A44)($at) -/* B4A00 8011E300 3C018015 */ lui $at, %hi(D_80153A5C) -/* B4A04 8011E304 AC223A5C */ sw $v0, %lo(D_80153A5C)($at) -/* B4A08 8011E308 03E00008 */ jr $ra -/* B4A0C 8011E30C 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/B4580/create_mesh_animator.s b/ver/us/asm/nonmatchings/B4580/create_mesh_animator.s deleted file mode 100644 index 4da4ebaa1f..0000000000 --- a/ver/us/asm/nonmatchings/B4580/create_mesh_animator.s +++ /dev/null @@ -1,90 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel create_mesh_animator -/* B4CE0 8011E5E0 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) -/* B4CE4 8011E5E4 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) -/* B4CE8 8011E5E8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B4CEC 8011E5EC AFB10014 */ sw $s1, 0x14($sp) -/* B4CF0 8011E5F0 0080882D */ daddu $s1, $a0, $zero -/* B4CF4 8011E5F4 AFB20018 */ sw $s2, 0x18($sp) -/* B4CF8 8011E5F8 00A0902D */ daddu $s2, $a1, $zero -/* B4CFC 8011E5FC AFB00010 */ sw $s0, 0x10($sp) -/* B4D00 8011E600 0000802D */ daddu $s0, $zero, $zero -/* B4D04 8011E604 AFBF001C */ sw $ra, 0x1c($sp) -.L8011E608: -/* B4D08 8011E608 8C620000 */ lw $v0, ($v1) -/* B4D0C 8011E60C 10400006 */ beqz $v0, .L8011E628 -/* B4D10 8011E610 2A020010 */ slti $v0, $s0, 0x10 -/* B4D14 8011E614 26100001 */ addiu $s0, $s0, 1 -/* B4D18 8011E618 2A020010 */ slti $v0, $s0, 0x10 -/* B4D1C 8011E61C 1440FFFA */ bnez $v0, .L8011E608 -/* B4D20 8011E620 24630004 */ addiu $v1, $v1, 4 -/* B4D24 8011E624 2A020010 */ slti $v0, $s0, 0x10 -.L8011E628: -/* B4D28 8011E628 14400003 */ bnez $v0, .L8011E638 -/* B4D2C 8011E62C 00000000 */ nop -.L8011E630: -/* B4D30 8011E630 0804798C */ j .L8011E630 -/* B4D34 8011E634 00000000 */ nop -.L8011E638: -/* B4D38 8011E638 0C00AB39 */ jal heap_malloc -/* B4D3C 8011E63C 240402E0 */ addiu $a0, $zero, 0x2e0 -/* B4D40 8011E640 00102080 */ sll $a0, $s0, 2 -/* B4D44 8011E644 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) -/* B4D48 8011E648 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) -/* B4D4C 8011E64C 3C058015 */ lui $a1, %hi(D_801512D4) -/* B4D50 8011E650 24A512D4 */ addiu $a1, $a1, %lo(D_801512D4) -/* B4D54 8011E654 00832021 */ addu $a0, $a0, $v1 -/* B4D58 8011E658 8CA30000 */ lw $v1, ($a1) -/* B4D5C 8011E65C 0040302D */ daddu $a2, $v0, $zero -/* B4D60 8011E660 AC860000 */ sw $a2, ($a0) -/* B4D64 8011E664 24630001 */ addiu $v1, $v1, 1 -/* B4D68 8011E668 14C00003 */ bnez $a2, .L8011E678 -/* B4D6C 8011E66C ACA30000 */ sw $v1, ($a1) -.L8011E670: -/* B4D70 8011E670 0804799C */ j .L8011E670 -/* B4D74 8011E674 00000000 */ nop -.L8011E678: -/* B4D78 8011E678 3C0300FF */ lui $v1, 0xff -/* B4D7C 8011E67C 3463FFFF */ ori $v1, $v1, 0xffff -/* B4D80 8011E680 0000202D */ daddu $a0, $zero, $zero -/* B4D84 8011E684 24020057 */ addiu $v0, $zero, 0x57 -/* B4D88 8011E688 ACC20000 */ sw $v0, ($a2) -/* B4D8C 8011E68C 2402000D */ addiu $v0, $zero, 0xd -/* B4D90 8011E690 02231824 */ and $v1, $s1, $v1 -/* B4D94 8011E694 A0C20004 */ sb $v0, 4($a2) -/* B4D98 8011E698 ACD200DC */ sw $s2, 0xdc($a2) -/* B4D9C 8011E69C 0240102D */ daddu $v0, $s2, $zero -/* B4DA0 8011E6A0 3C013F80 */ lui $at, 0x3f80 -/* B4DA4 8011E6A4 44810000 */ mtc1 $at, $f0 -/* B4DA8 8011E6A8 00628821 */ addu $s1, $v1, $v0 -/* B4DAC 8011E6AC ACC000D8 */ sw $zero, 0xd8($a2) -/* B4DB0 8011E6B0 ACC002D4 */ sw $zero, 0x2d4($a2) -/* B4DB4 8011E6B4 ACC00010 */ sw $zero, 0x10($a2) -/* B4DB8 8011E6B8 A0C00014 */ sb $zero, 0x14($a2) -/* B4DBC 8011E6BC ACD10008 */ sw $s1, 8($a2) -/* B4DC0 8011E6C0 ACD1000C */ sw $s1, 0xc($a2) -/* B4DC4 8011E6C4 E4C00090 */ swc1 $f0, 0x90($a2) -/* B4DC8 8011E6C8 E4C00094 */ swc1 $f0, 0x94($a2) -/* B4DCC 8011E6CC 00C41821 */ addu $v1, $a2, $a0 -.L8011E6D0: -/* B4DD0 8011E6D0 24820001 */ addiu $v0, $a0, 1 -/* B4DD4 8011E6D4 A0620015 */ sb $v0, 0x15($v1) -/* B4DD8 8011E6D8 0040202D */ daddu $a0, $v0, $zero -/* B4DDC 8011E6DC 2882007A */ slti $v0, $a0, 0x7a -/* B4DE0 8011E6E0 5440FFFB */ bnel $v0, $zero, .L8011E6D0 -/* B4DE4 8011E6E4 00C41821 */ addu $v1, $a2, $a0 -/* B4DE8 8011E6E8 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* B4DEC 8011E6EC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* B4DF0 8011E6F0 80420070 */ lb $v0, 0x70($v0) -/* B4DF4 8011E6F4 54400001 */ bnel $v0, $zero, .L8011E6FC -/* B4DF8 8011E6F8 36100800 */ ori $s0, $s0, 0x800 -.L8011E6FC: -/* B4DFC 8011E6FC 0200102D */ daddu $v0, $s0, $zero -/* B4E00 8011E700 8FBF001C */ lw $ra, 0x1c($sp) -/* B4E04 8011E704 8FB20018 */ lw $s2, 0x18($sp) -/* B4E08 8011E708 8FB10014 */ lw $s1, 0x14($sp) -/* B4E0C 8011E70C 8FB00010 */ lw $s0, 0x10($sp) -/* B4E10 8011E710 03E00008 */ jr $ra -/* B4E14 8011E714 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/B4580/create_model_animator.s b/ver/us/asm/nonmatchings/B4580/create_model_animator.s deleted file mode 100644 index 4f61516bc9..0000000000 --- a/ver/us/asm/nonmatchings/B4580/create_model_animator.s +++ /dev/null @@ -1,87 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel create_model_animator -/* B4BB8 8011E4B8 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) -/* B4BBC 8011E4BC 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) -/* B4BC0 8011E4C0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B4BC4 8011E4C4 AFB10014 */ sw $s1, 0x14($sp) -/* B4BC8 8011E4C8 0080882D */ daddu $s1, $a0, $zero -/* B4BCC 8011E4CC AFB00010 */ sw $s0, 0x10($sp) -/* B4BD0 8011E4D0 0000802D */ daddu $s0, $zero, $zero -/* B4BD4 8011E4D4 AFBF0018 */ sw $ra, 0x18($sp) -.L8011E4D8: -/* B4BD8 8011E4D8 8C620000 */ lw $v0, ($v1) -/* B4BDC 8011E4DC 10400006 */ beqz $v0, .L8011E4F8 -/* B4BE0 8011E4E0 2A020010 */ slti $v0, $s0, 0x10 -/* B4BE4 8011E4E4 26100001 */ addiu $s0, $s0, 1 -/* B4BE8 8011E4E8 2A020010 */ slti $v0, $s0, 0x10 -/* B4BEC 8011E4EC 1440FFFA */ bnez $v0, .L8011E4D8 -/* B4BF0 8011E4F0 24630004 */ addiu $v1, $v1, 4 -/* B4BF4 8011E4F4 2A020010 */ slti $v0, $s0, 0x10 -.L8011E4F8: -/* B4BF8 8011E4F8 14400003 */ bnez $v0, .L8011E508 -/* B4BFC 8011E4FC 00000000 */ nop -.L8011E500: -/* B4C00 8011E500 08047940 */ j .L8011E500 -/* B4C04 8011E504 00000000 */ nop -.L8011E508: -/* B4C08 8011E508 0C00AB39 */ jal heap_malloc -/* B4C0C 8011E50C 240402E0 */ addiu $a0, $zero, 0x2e0 -/* B4C10 8011E510 00102080 */ sll $a0, $s0, 2 -/* B4C14 8011E514 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) -/* B4C18 8011E518 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) -/* B4C1C 8011E51C 3C058015 */ lui $a1, %hi(D_801512D4) -/* B4C20 8011E520 24A512D4 */ addiu $a1, $a1, %lo(D_801512D4) -/* B4C24 8011E524 00832021 */ addu $a0, $a0, $v1 -/* B4C28 8011E528 8CA30000 */ lw $v1, ($a1) -/* B4C2C 8011E52C 0040302D */ daddu $a2, $v0, $zero -/* B4C30 8011E530 AC860000 */ sw $a2, ($a0) -/* B4C34 8011E534 24630001 */ addiu $v1, $v1, 1 -/* B4C38 8011E538 14C00003 */ bnez $a2, .L8011E548 -/* B4C3C 8011E53C ACA30000 */ sw $v1, ($a1) -.L8011E540: -/* B4C40 8011E540 08047950 */ j .L8011E540 -/* B4C44 8011E544 00000000 */ nop -.L8011E548: -/* B4C48 8011E548 3C013F80 */ lui $at, 0x3f80 -/* B4C4C 8011E54C 44810000 */ mtc1 $at, $f0 -/* B4C50 8011E550 24020057 */ addiu $v0, $zero, 0x57 -/* B4C54 8011E554 ACC20000 */ sw $v0, ($a2) -/* B4C58 8011E558 2402000D */ addiu $v0, $zero, 0xd -/* B4C5C 8011E55C A0C20004 */ sb $v0, 4($a2) -/* B4C60 8011E560 ACD10008 */ sw $s1, 8($a2) -/* B4C64 8011E564 E4C00090 */ swc1 $f0, 0x90($a2) -/* B4C68 8011E568 16200004 */ bnez $s1, .L8011E57C -/* B4C6C 8011E56C E4C00094 */ swc1 $f0, 0x94($a2) -/* B4C70 8011E570 3C028015 */ lui $v0, %hi(D_8014C250) -/* B4C74 8011E574 2442C250 */ addiu $v0, $v0, %lo(D_8014C250) -/* B4C78 8011E578 ACC20008 */ sw $v0, 8($a2) -.L8011E57C: -/* B4C7C 8011E57C 0000202D */ daddu $a0, $zero, $zero -/* B4C80 8011E580 ACD1000C */ sw $s1, 0xc($a2) -/* B4C84 8011E584 ACC000DC */ sw $zero, 0xdc($a2) -/* B4C88 8011E588 ACC000D8 */ sw $zero, 0xd8($a2) -/* B4C8C 8011E58C ACC002D4 */ sw $zero, 0x2d4($a2) -/* B4C90 8011E590 ACC00010 */ sw $zero, 0x10($a2) -/* B4C94 8011E594 A0C00014 */ sb $zero, 0x14($a2) -/* B4C98 8011E598 00C41821 */ addu $v1, $a2, $a0 -.L8011E59C: -/* B4C9C 8011E59C 24820001 */ addiu $v0, $a0, 1 -/* B4CA0 8011E5A0 A0620015 */ sb $v0, 0x15($v1) -/* B4CA4 8011E5A4 0040202D */ daddu $a0, $v0, $zero -/* B4CA8 8011E5A8 2882007A */ slti $v0, $a0, 0x7a -/* B4CAC 8011E5AC 5440FFFB */ bnel $v0, $zero, .L8011E59C -/* B4CB0 8011E5B0 00C41821 */ addu $v1, $a2, $a0 -/* B4CB4 8011E5B4 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* B4CB8 8011E5B8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* B4CBC 8011E5BC 80420070 */ lb $v0, 0x70($v0) -/* B4CC0 8011E5C0 54400001 */ bnel $v0, $zero, .L8011E5C8 -/* B4CC4 8011E5C4 36100800 */ ori $s0, $s0, 0x800 -.L8011E5C8: -/* B4CC8 8011E5C8 0200102D */ daddu $v0, $s0, $zero -/* B4CCC 8011E5CC 8FBF0018 */ lw $ra, 0x18($sp) -/* B4CD0 8011E5D0 8FB10014 */ lw $s1, 0x14($sp) -/* B4CD4 8011E5D4 8FB00010 */ lw $s0, 0x10($sp) -/* B4CD8 8011E5D8 03E00008 */ jr $ra -/* B4CDC 8011E5DC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/B4580/delete_model_animator.s b/ver/us/asm/nonmatchings/B4580/delete_model_animator.s deleted file mode 100644 index 556e28d47b..0000000000 --- a/ver/us/asm/nonmatchings/B4580/delete_model_animator.s +++ /dev/null @@ -1,40 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel delete_model_animator -/* B4B38 8011E438 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B4B3C 8011E43C AFB00010 */ sw $s0, 0x10($sp) -/* B4B40 8011E440 0080802D */ daddu $s0, $a0, $zero -/* B4B44 8011E444 AFBF0014 */ sw $ra, 0x14($sp) -/* B4B48 8011E448 8E040010 */ lw $a0, 0x10($s0) -/* B4B4C 8011E44C 10800016 */ beqz $a0, .L8011E4A8 -/* B4B50 8011E450 A2000014 */ sb $zero, 0x14($s0) -/* B4B54 8011E454 0C0478E6 */ jal delete_model_animator_node -/* B4B58 8011E458 00000000 */ nop -/* B4B5C 8011E45C 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) -/* B4B60 8011E460 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) -/* B4B64 8011E464 0000202D */ daddu $a0, $zero, $zero -/* B4B68 8011E468 AE000010 */ sw $zero, 0x10($s0) -.L8011E46C: -/* B4B6C 8011E46C 8C620000 */ lw $v0, ($v1) -/* B4B70 8011E470 14500003 */ bne $v0, $s0, .L8011E480 -/* B4B74 8011E474 24840001 */ addiu $a0, $a0, 1 -/* B4B78 8011E478 08047923 */ j .L8011E48C -/* B4B7C 8011E47C AC600000 */ sw $zero, ($v1) -.L8011E480: -/* B4B80 8011E480 28820010 */ slti $v0, $a0, 0x10 -/* B4B84 8011E484 1440FFF9 */ bnez $v0, .L8011E46C -/* B4B88 8011E488 24630004 */ addiu $v1, $v1, 4 -.L8011E48C: -/* B4B8C 8011E48C 0C00AB4B */ jal heap_free -/* B4B90 8011E490 0200202D */ daddu $a0, $s0, $zero -/* B4B94 8011E494 3C038015 */ lui $v1, %hi(D_801512D4) -/* B4B98 8011E498 246312D4 */ addiu $v1, $v1, %lo(D_801512D4) -/* B4B9C 8011E49C 8C620000 */ lw $v0, ($v1) -/* B4BA0 8011E4A0 2442FFFF */ addiu $v0, $v0, -1 -/* B4BA4 8011E4A4 AC620000 */ sw $v0, ($v1) -.L8011E4A8: -/* B4BA8 8011E4A8 8FBF0014 */ lw $ra, 0x14($sp) -/* B4BAC 8011E4AC 8FB00010 */ lw $s0, 0x10($sp) -/* B4BB0 8011E4B0 03E00008 */ jr $ra -/* B4BB4 8011E4B4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/B4580/delete_model_animator_node.s b/ver/us/asm/nonmatchings/B4580/delete_model_animator_node.s deleted file mode 100644 index 72ca824bce..0000000000 --- a/ver/us/asm/nonmatchings/B4580/delete_model_animator_node.s +++ /dev/null @@ -1,32 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel delete_model_animator_node -/* B4A98 8011E398 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B4A9C 8011E39C AFB20018 */ sw $s2, 0x18($sp) -/* B4AA0 8011E3A0 0080902D */ daddu $s2, $a0, $zero -/* B4AA4 8011E3A4 AFB10014 */ sw $s1, 0x14($sp) -/* B4AA8 8011E3A8 0000882D */ daddu $s1, $zero, $zero -/* B4AAC 8011E3AC AFB00010 */ sw $s0, 0x10($sp) -/* B4AB0 8011E3B0 0240802D */ daddu $s0, $s2, $zero -/* B4AB4 8011E3B4 AFBF001C */ sw $ra, 0x1c($sp) -/* B4AB8 8011E3B8 A64000F4 */ sh $zero, 0xf4($s2) -.L8011E3BC: -/* B4ABC 8011E3BC 8E040004 */ lw $a0, 4($s0) -/* B4AC0 8011E3C0 10800004 */ beqz $a0, .L8011E3D4 -/* B4AC4 8011E3C4 26310001 */ addiu $s1, $s1, 1 -/* B4AC8 8011E3C8 0C0478E6 */ jal delete_model_animator_node -/* B4ACC 8011E3CC 00000000 */ nop -/* B4AD0 8011E3D0 AE000004 */ sw $zero, 4($s0) -.L8011E3D4: -/* B4AD4 8011E3D4 2A220020 */ slti $v0, $s1, 0x20 -/* B4AD8 8011E3D8 1440FFF8 */ bnez $v0, .L8011E3BC -/* B4ADC 8011E3DC 26100004 */ addiu $s0, $s0, 4 -/* B4AE0 8011E3E0 0C00AB4B */ jal heap_free -/* B4AE4 8011E3E4 0240202D */ daddu $a0, $s2, $zero -/* B4AE8 8011E3E8 8FBF001C */ lw $ra, 0x1c($sp) -/* B4AEC 8011E3EC 8FB20018 */ lw $s2, 0x18($sp) -/* B4AF0 8011E3F0 8FB10014 */ lw $s1, 0x14($sp) -/* B4AF4 8011E3F4 8FB00010 */ lw $s0, 0x10($sp) -/* B4AF8 8011E3F8 03E00008 */ jr $ra -/* B4AFC 8011E3FC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/B4580/delete_model_animator_nodes.s b/ver/us/asm/nonmatchings/B4580/delete_model_animator_nodes.s deleted file mode 100644 index 5181458218..0000000000 --- a/ver/us/asm/nonmatchings/B4580/delete_model_animator_nodes.s +++ /dev/null @@ -1,19 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel delete_model_animator_nodes -/* B4B00 8011E400 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B4B04 8011E404 AFB00010 */ sw $s0, 0x10($sp) -/* B4B08 8011E408 0080802D */ daddu $s0, $a0, $zero -/* B4B0C 8011E40C AFBF0014 */ sw $ra, 0x14($sp) -/* B4B10 8011E410 8E040010 */ lw $a0, 0x10($s0) -/* B4B14 8011E414 10800004 */ beqz $a0, .L8011E428 -/* B4B18 8011E418 A2000014 */ sb $zero, 0x14($s0) -/* B4B1C 8011E41C 0C0478E6 */ jal delete_model_animator_node -/* B4B20 8011E420 00000000 */ nop -/* B4B24 8011E424 AE000010 */ sw $zero, 0x10($s0) -.L8011E428: -/* B4B28 8011E428 8FBF0014 */ lw $ra, 0x14($sp) -/* B4B2C 8011E42C 8FB00010 */ lw $s0, 0x10($sp) -/* B4B30 8011E430 03E00008 */ jr $ra -/* B4B34 8011E434 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/B4580/disable_anim_model_fog.s b/ver/us/asm/nonmatchings/B4580/disable_anim_model_fog.s deleted file mode 100644 index b5203a3492..0000000000 --- a/ver/us/asm/nonmatchings/B4580/disable_anim_model_fog.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel disable_anim_model_fog -/* B673C 8012003C 3C018015 */ lui $at, %hi(D_80153A44) -/* B6740 80120040 AC203A44 */ sw $zero, %lo(D_80153A44)($at) -/* B6744 80120044 03E00008 */ jr $ra -/* B6748 80120048 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/B4580/enable_anim_model_fog.s b/ver/us/asm/nonmatchings/B4580/enable_anim_model_fog.s deleted file mode 100644 index 5f0cda2c9e..0000000000 --- a/ver/us/asm/nonmatchings/B4580/enable_anim_model_fog.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel enable_anim_model_fog -/* B6728 80120028 24020001 */ addiu $v0, $zero, 1 -/* B672C 8012002C 3C018015 */ lui $at, %hi(D_80153A44) -/* B6730 80120030 AC223A44 */ sw $v0, %lo(D_80153A44)($at) -/* B6734 80120034 03E00008 */ jr $ra -/* B6738 80120038 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/B4580/free_animator_nodes.s b/ver/us/asm/nonmatchings/B4580/free_animator_nodes.s deleted file mode 100644 index 760b824bd7..0000000000 --- a/ver/us/asm/nonmatchings/B4580/free_animator_nodes.s +++ /dev/null @@ -1,30 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel free_animator_nodes -/* B48C4 8011E1C4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B48C8 8011E1C8 AFB20018 */ sw $s2, 0x18($sp) -/* B48CC 8011E1CC 0080902D */ daddu $s2, $a0, $zero -/* B48D0 8011E1D0 AFB10014 */ sw $s1, 0x14($sp) -/* B48D4 8011E1D4 0000882D */ daddu $s1, $zero, $zero -/* B48D8 8011E1D8 AFB00010 */ sw $s0, 0x10($sp) -/* B48DC 8011E1DC 0240802D */ daddu $s0, $s2, $zero -/* B48E0 8011E1E0 AFBF001C */ sw $ra, 0x1c($sp) -.L8011E1E4: -/* B48E4 8011E1E4 8E040004 */ lw $a0, 4($s0) -/* B48E8 8011E1E8 10800003 */ beqz $a0, .L8011E1F8 -/* B48EC 8011E1EC 26310001 */ addiu $s1, $s1, 1 -/* B48F0 8011E1F0 0C047871 */ jal free_animator_nodes -/* B48F4 8011E1F4 00000000 */ nop -.L8011E1F8: -/* B48F8 8011E1F8 2A220020 */ slti $v0, $s1, 0x20 -/* B48FC 8011E1FC 1440FFF9 */ bnez $v0, .L8011E1E4 -/* B4900 8011E200 26100004 */ addiu $s0, $s0, 4 -/* B4904 8011E204 0C00AB4B */ jal heap_free -/* B4908 8011E208 0240202D */ daddu $a0, $s2, $zero -/* B490C 8011E20C 8FBF001C */ lw $ra, 0x1c($sp) -/* B4910 8011E210 8FB20018 */ lw $s2, 0x18($sp) -/* B4914 8011E214 8FB10014 */ lw $s1, 0x14($sp) -/* B4918 8011E218 8FB00010 */ lw $s0, 0x10($sp) -/* B491C 8011E21C 03E00008 */ jr $ra -/* B4920 8011E220 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/B4580/func_8011EA54.s b/ver/us/asm/nonmatchings/B4580/func_8011EA54.s deleted file mode 100644 index 8aa5ccfec8..0000000000 --- a/ver/us/asm/nonmatchings/B4580/func_8011EA54.s +++ /dev/null @@ -1,120 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8011EA54 -/* B5154 8011EA54 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* B5158 8011EA58 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* B515C 8011EA5C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B5160 8011EA60 AFBF001C */ sw $ra, 0x1c($sp) -/* B5164 8011EA64 AFB20018 */ sw $s2, 0x18($sp) -/* B5168 8011EA68 AFB10014 */ sw $s1, 0x14($sp) -/* B516C 8011EA6C AFB00010 */ sw $s0, 0x10($sp) -/* B5170 8011EA70 80420070 */ lb $v0, 0x70($v0) -/* B5174 8011EA74 10400004 */ beqz $v0, .L8011EA88 -/* B5178 8011EA78 00A0882D */ daddu $s1, $a1, $zero -/* B517C 8011EA7C 30820800 */ andi $v0, $a0, 0x800 -/* B5180 8011EA80 10400055 */ beqz $v0, .L8011EBD8 -/* B5184 8011EA84 00000000 */ nop -.L8011EA88: -/* B5188 8011EA88 2402F7FF */ addiu $v0, $zero, -0x801 -/* B518C 8011EA8C 00822024 */ and $a0, $a0, $v0 -/* B5190 8011EA90 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) -/* B5194 8011EA94 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) -/* B5198 8011EA98 00041080 */ sll $v0, $a0, 2 -/* B519C 8011EA9C 00431021 */ addu $v0, $v0, $v1 -/* B51A0 8011EAA0 8C500000 */ lw $s0, ($v0) -/* B51A4 8011EAA4 1200004C */ beqz $s0, .L8011EBD8 -/* B51A8 8011EAA8 00000000 */ nop -/* B51AC 8011EAAC 8E040000 */ lw $a0, ($s0) -/* B51B0 8011EAB0 10800049 */ beqz $a0, .L8011EBD8 -/* B51B4 8011EAB4 3C020004 */ lui $v0, 4 -/* B51B8 8011EAB8 00821024 */ and $v0, $a0, $v0 -/* B51BC 8011EABC 14400046 */ bnez $v0, .L8011EBD8 -/* B51C0 8011EAC0 0000182D */ daddu $v1, $zero, $zero -/* B51C4 8011EAC4 C6000090 */ lwc1 $f0, 0x90($s0) -/* B51C8 8011EAC8 C6020094 */ lwc1 $f2, 0x94($s0) -/* B51CC 8011EACC 2402FFBF */ addiu $v0, $zero, -0x41 -/* B51D0 8011EAD0 46020001 */ sub.s $f0, $f0, $f2 -/* B51D4 8011EAD4 44801000 */ mtc1 $zero, $f2 -/* B51D8 8011EAD8 00821024 */ and $v0, $a0, $v0 -/* B51DC 8011EADC AE020000 */ sw $v0, ($s0) -/* B51E0 8011EAE0 4602003E */ c.le.s $f0, $f2 -/* B51E4 8011EAE4 00000000 */ nop -/* B51E8 8011EAE8 45000014 */ bc1f .L8011EB3C -/* B51EC 8011EAEC E6000090 */ swc1 $f0, 0x90($s0) -/* B51F0 8011EAF0 30428000 */ andi $v0, $v0, 0x8000 -/* B51F4 8011EAF4 14400008 */ bnez $v0, .L8011EB18 -/* B51F8 8011EAF8 0200202D */ daddu $a0, $s0, $zero -.L8011EAFC: -/* B51FC 8011EAFC 0C047AFC */ jal step_model_animator -/* B5200 8011EB00 0200202D */ daddu $a0, $s0, $zero -/* B5204 8011EB04 0040182D */ daddu $v1, $v0, $zero -/* B5208 8011EB08 1C60FFFC */ bgtz $v1, .L8011EAFC -/* B520C 8011EB0C 2402FFFF */ addiu $v0, $zero, -1 -/* B5210 8011EB10 08047AD0 */ j .L8011EB40 -/* B5214 8011EB14 00000000 */ nop -.L8011EB18: -/* B5218 8011EB18 3C013F80 */ lui $at, 0x3f80 -/* B521C 8011EB1C 44810000 */ mtc1 $at, $f0 -/* B5220 8011EB20 0C04819E */ jal reload_mesh_animator_tree -/* B5224 8011EB24 E6000090 */ swc1 $f0, 0x90($s0) -.L8011EB28: -/* B5228 8011EB28 0C0481BE */ jal step_mesh_animator -/* B522C 8011EB2C 0200202D */ daddu $a0, $s0, $zero -/* B5230 8011EB30 0040182D */ daddu $v1, $v0, $zero -/* B5234 8011EB34 1C60FFFC */ bgtz $v1, .L8011EB28 -/* B5238 8011EB38 00000000 */ nop -.L8011EB3C: -/* B523C 8011EB3C 2402FFFF */ addiu $v0, $zero, -1 -.L8011EB40: -/* B5240 8011EB40 10620025 */ beq $v1, $v0, .L8011EBD8 -/* B5244 8011EB44 0200202D */ daddu $a0, $s0, $zero -/* B5248 8011EB48 0C047C16 */ jal animator_update_model_transforms -/* B524C 8011EB4C 0220282D */ daddu $a1, $s1, $zero -/* B5250 8011EB50 0000882D */ daddu $s1, $zero, $zero -/* B5254 8011EB54 2412FFFF */ addiu $s2, $zero, -1 -/* B5258 8011EB58 3C108015 */ lui $s0, %hi(D_801533C0) -/* B525C 8011EB5C 261033C0 */ addiu $s0, $s0, %lo(D_801533C0) -.L8011EB60: -/* B5260 8011EB60 8E020000 */ lw $v0, ($s0) -/* B5264 8011EB64 04420008 */ bltzl $v0, .L8011EB88 -/* B5268 8011EB68 26310001 */ addiu $s1, $s1, 1 -/* B526C 8011EB6C 2442FFFF */ addiu $v0, $v0, -1 -/* B5270 8011EB70 14400004 */ bnez $v0, .L8011EB84 -/* B5274 8011EB74 AE020000 */ sw $v0, ($s0) -/* B5278 8011EB78 8E040004 */ lw $a0, 4($s0) -/* B527C 8011EB7C 0C00AB1E */ jal general_heap_free -/* B5280 8011EB80 AE120000 */ sw $s2, ($s0) -.L8011EB84: -/* B5284 8011EB84 26310001 */ addiu $s1, $s1, 1 -.L8011EB88: -/* B5288 8011EB88 2A220060 */ slti $v0, $s1, 0x60 -/* B528C 8011EB8C 1440FFF4 */ bnez $v0, .L8011EB60 -/* B5290 8011EB90 26100008 */ addiu $s0, $s0, 8 -/* B5294 8011EB94 0000882D */ daddu $s1, $zero, $zero -/* B5298 8011EB98 2412FFFF */ addiu $s2, $zero, -1 -/* B529C 8011EB9C 3C108015 */ lui $s0, %hi(D_801536C0) -/* B52A0 8011EBA0 261036C0 */ addiu $s0, $s0, %lo(D_801536C0) -.L8011EBA4: -/* B52A4 8011EBA4 8E020000 */ lw $v0, ($s0) -/* B52A8 8011EBA8 04420008 */ bltzl $v0, .L8011EBCC -/* B52AC 8011EBAC 26310001 */ addiu $s1, $s1, 1 -/* B52B0 8011EBB0 2442FFFF */ addiu $v0, $v0, -1 -/* B52B4 8011EBB4 14400004 */ bnez $v0, .L8011EBC8 -/* B52B8 8011EBB8 AE020000 */ sw $v0, ($s0) -/* B52BC 8011EBBC 8E040004 */ lw $a0, 4($s0) -/* B52C0 8011EBC0 0C00AB1E */ jal general_heap_free -/* B52C4 8011EBC4 AE120000 */ sw $s2, ($s0) -.L8011EBC8: -/* B52C8 8011EBC8 26310001 */ addiu $s1, $s1, 1 -.L8011EBCC: -/* B52CC 8011EBCC 2A220060 */ slti $v0, $s1, 0x60 -/* B52D0 8011EBD0 1440FFF4 */ bnez $v0, .L8011EBA4 -/* B52D4 8011EBD4 26100008 */ addiu $s0, $s0, 8 -.L8011EBD8: -/* B52D8 8011EBD8 8FBF001C */ lw $ra, 0x1c($sp) -/* B52DC 8011EBDC 8FB20018 */ lw $s2, 0x18($sp) -/* B52E0 8011EBE0 8FB10014 */ lw $s1, 0x14($sp) -/* B52E4 8011EBE4 8FB00010 */ lw $s0, 0x10($sp) -/* B52E8 8011EBE8 03E00008 */ jr $ra -/* B52EC 8011EBEC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/B4580/get_anim_model_fog_color.s b/ver/us/asm/nonmatchings/B4580/get_anim_model_fog_color.s deleted file mode 100644 index 9a7a707634..0000000000 --- a/ver/us/asm/nonmatchings/B4580/get_anim_model_fog_color.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel get_anim_model_fog_color -/* B67B8 801200B8 3C028015 */ lui $v0, %hi(D_80153A48) -/* B67BC 801200BC 8C423A48 */ lw $v0, %lo(D_80153A48)($v0) -/* B67C0 801200C0 AC820000 */ sw $v0, ($a0) -/* B67C4 801200C4 3C028015 */ lui $v0, %hi(D_80153A4C) -/* B67C8 801200C8 8C423A4C */ lw $v0, %lo(D_80153A4C)($v0) -/* B67CC 801200CC ACA20000 */ sw $v0, ($a1) -/* B67D0 801200D0 3C028015 */ lui $v0, %hi(D_80153A50) -/* B67D4 801200D4 8C423A50 */ lw $v0, %lo(D_80153A50)($v0) -/* B67D8 801200D8 ACC20000 */ sw $v0, ($a2) -/* B67DC 801200DC 3C028015 */ lui $v0, %hi(D_80153A54) -/* B67E0 801200E0 8C423A54 */ lw $v0, %lo(D_80153A54)($v0) -/* B67E4 801200E4 03E00008 */ jr $ra -/* B67E8 801200E8 ACE20000 */ sw $v0, ($a3) diff --git a/ver/us/asm/nonmatchings/B4580/get_anim_model_fog_distance.s b/ver/us/asm/nonmatchings/B4580/get_anim_model_fog_distance.s deleted file mode 100644 index dec6a6c780..0000000000 --- a/ver/us/asm/nonmatchings/B4580/get_anim_model_fog_distance.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel get_anim_model_fog_distance -/* B679C 8012009C 3C028015 */ lui $v0, %hi(D_80153A58) -/* B67A0 801200A0 8C423A58 */ lw $v0, %lo(D_80153A58)($v0) -/* B67A4 801200A4 AC820000 */ sw $v0, ($a0) -/* B67A8 801200A8 3C028015 */ lui $v0, %hi(D_80153A5C) -/* B67AC 801200AC 8C423A5C */ lw $v0, %lo(D_80153A5C)($v0) -/* B67B0 801200B0 03E00008 */ jr $ra -/* B67B4 801200B4 ACA20000 */ sw $v0, ($a1) diff --git a/ver/us/asm/nonmatchings/B4580/get_animator_child_for_model.s b/ver/us/asm/nonmatchings/B4580/get_animator_child_for_model.s deleted file mode 100644 index d98591a939..0000000000 --- a/ver/us/asm/nonmatchings/B4580/get_animator_child_for_model.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel get_animator_child_for_model -/* B4850 8011E150 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B4854 8011E154 AFBF001C */ sw $ra, 0x1c($sp) -/* B4858 8011E158 AFB20018 */ sw $s2, 0x18($sp) -/* B485C 8011E15C AFB10014 */ sw $s1, 0x14($sp) -/* B4860 8011E160 AFB00010 */ sw $s0, 0x10($sp) -/* B4864 8011E164 8C8200FC */ lw $v0, 0xfc($a0) -/* B4868 8011E168 00A0902D */ daddu $s2, $a1, $zero -/* B486C 8011E16C 14520003 */ bne $v0, $s2, .L8011E17C -/* B4870 8011E170 0000882D */ daddu $s1, $zero, $zero -/* B4874 8011E174 0804786B */ j .L8011E1AC -/* B4878 8011E178 0080102D */ daddu $v0, $a0, $zero -.L8011E17C: -/* B487C 8011E17C 0080802D */ daddu $s0, $a0, $zero -.L8011E180: -/* B4880 8011E180 8E040004 */ lw $a0, 4($s0) -/* B4884 8011E184 50800005 */ beql $a0, $zero, .L8011E19C -/* B4888 8011E188 26310001 */ addiu $s1, $s1, 1 -/* B488C 8011E18C 0C047854 */ jal get_animator_child_for_model -/* B4890 8011E190 0240282D */ daddu $a1, $s2, $zero -/* B4894 8011E194 14400005 */ bnez $v0, .L8011E1AC -/* B4898 8011E198 26310001 */ addiu $s1, $s1, 1 -.L8011E19C: -/* B489C 8011E19C 2A220020 */ slti $v0, $s1, 0x20 -/* B48A0 8011E1A0 1440FFF7 */ bnez $v0, .L8011E180 -/* B48A4 8011E1A4 26100004 */ addiu $s0, $s0, 4 -/* B48A8 8011E1A8 0000102D */ daddu $v0, $zero, $zero -.L8011E1AC: -/* B48AC 8011E1AC 8FBF001C */ lw $ra, 0x1c($sp) -/* B48B0 8011E1B0 8FB20018 */ lw $s2, 0x18($sp) -/* B48B4 8011E1B4 8FB10014 */ lw $s1, 0x14($sp) -/* B48B8 8011E1B8 8FB00010 */ lw $s0, 0x10($sp) -/* B48BC 8011E1BC 03E00008 */ jr $ra -/* B48C0 8011E1C0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/B4580/get_animator_child_with_id.s b/ver/us/asm/nonmatchings/B4580/get_animator_child_with_id.s deleted file mode 100644 index e6dd3f5cba..0000000000 --- a/ver/us/asm/nonmatchings/B4580/get_animator_child_with_id.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel get_animator_child_with_id -/* B47DC 8011E0DC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B47E0 8011E0E0 AFBF001C */ sw $ra, 0x1c($sp) -/* B47E4 8011E0E4 AFB20018 */ sw $s2, 0x18($sp) -/* B47E8 8011E0E8 AFB10014 */ sw $s1, 0x14($sp) -/* B47EC 8011E0EC AFB00010 */ sw $s0, 0x10($sp) -/* B47F0 8011E0F0 848200F6 */ lh $v0, 0xf6($a0) -/* B47F4 8011E0F4 00A0902D */ daddu $s2, $a1, $zero -/* B47F8 8011E0F8 14520003 */ bne $v0, $s2, .L8011E108 -/* B47FC 8011E0FC 0000882D */ daddu $s1, $zero, $zero -/* B4800 8011E100 0804784E */ j .L8011E138 -/* B4804 8011E104 0080102D */ daddu $v0, $a0, $zero -.L8011E108: -/* B4808 8011E108 0080802D */ daddu $s0, $a0, $zero -.L8011E10C: -/* B480C 8011E10C 8E040004 */ lw $a0, 4($s0) -/* B4810 8011E110 50800005 */ beql $a0, $zero, .L8011E128 -/* B4814 8011E114 26310001 */ addiu $s1, $s1, 1 -/* B4818 8011E118 0C047837 */ jal get_animator_child_with_id -/* B481C 8011E11C 0240282D */ daddu $a1, $s2, $zero -/* B4820 8011E120 14400005 */ bnez $v0, .L8011E138 -/* B4824 8011E124 26310001 */ addiu $s1, $s1, 1 -.L8011E128: -/* B4828 8011E128 2A220020 */ slti $v0, $s1, 0x20 -/* B482C 8011E12C 1440FFF7 */ bnez $v0, .L8011E10C -/* B4830 8011E130 26100004 */ addiu $s0, $s0, 4 -/* B4834 8011E134 0000102D */ daddu $v0, $zero, $zero -.L8011E138: -/* B4838 8011E138 8FBF001C */ lw $ra, 0x1c($sp) -/* B483C 8011E13C 8FB20018 */ lw $s2, 0x18($sp) -/* B4840 8011E140 8FB10014 */ lw $s1, 0x14($sp) -/* B4844 8011E144 8FB00010 */ lw $s0, 0x10($sp) -/* B4848 8011E148 03E00008 */ jr $ra -/* B484C 8011E14C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/B4580/get_animator_node_with_id.s b/ver/us/asm/nonmatchings/B4580/get_animator_node_with_id.s deleted file mode 100644 index aa49b305f8..0000000000 --- a/ver/us/asm/nonmatchings/B4580/get_animator_node_with_id.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel get_animator_node_with_id -/* B6698 8011FF98 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B669C 8011FF9C AFBF0010 */ sw $ra, 0x10($sp) -/* B66A0 8011FFA0 0C047854 */ jal get_animator_child_for_model -/* B66A4 8011FFA4 8C840010 */ lw $a0, 0x10($a0) -/* B66A8 8011FFA8 8FBF0010 */ lw $ra, 0x10($sp) -/* B66AC 8011FFAC 03E00008 */ jr $ra -/* B66B0 8011FFB0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/B4580/is_anim_model_fog_enabled.s b/ver/us/asm/nonmatchings/B4580/is_anim_model_fog_enabled.s deleted file mode 100644 index e901288d86..0000000000 --- a/ver/us/asm/nonmatchings/B4580/is_anim_model_fog_enabled.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel is_anim_model_fog_enabled -/* B678C 8012008C 3C028015 */ lui $v0, %hi(D_80153A44) -/* B6790 80120090 8C423A44 */ lw $v0, %lo(D_80153A44)($v0) -/* B6794 80120094 03E00008 */ jr $ra -/* B6798 80120098 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/B4580/load_mesh_animator_node.s b/ver/us/asm/nonmatchings/B4580/load_mesh_animator_node.s deleted file mode 100644 index 9a29fa7762..0000000000 --- a/ver/us/asm/nonmatchings/B4580/load_mesh_animator_node.s +++ /dev/null @@ -1,28 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel load_mesh_animator_node -/* B6B20 80120420 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B6B24 80120424 10800010 */ beqz $a0, .L80120468 -/* B6B28 80120428 AFBF0010 */ sw $ra, 0x10($sp) -/* B6B2C 8012042C 8C83001C */ lw $v1, 0x1c($a0) -/* B6B30 80120430 10600008 */ beqz $v1, .L80120454 -/* B6B34 80120434 00061080 */ sll $v0, $a2, 2 -/* B6B38 80120438 14C00007 */ bnez $a2, .L80120458 -/* B6B3C 8012043C 00451021 */ addu $v0, $v0, $a1 -/* B6B40 80120440 0060202D */ daddu $a0, $v1, $zero -/* B6B44 80120444 0C048108 */ jal load_mesh_animator_node -/* B6B48 80120448 0000302D */ daddu $a2, $zero, $zero -/* B6B4C 8012044C 0804811A */ j .L80120468 -/* B6B50 80120450 00000000 */ nop -.L80120454: -/* B6B54 80120454 00451021 */ addu $v0, $v0, $a1 -.L80120458: -/* B6B58 80120458 AC4400E0 */ sw $a0, 0xe0($v0) -/* B6B5C 8012045C 8C840018 */ lw $a0, 0x18($a0) -/* B6B60 80120460 1480FFFD */ bnez $a0, .L80120458 -/* B6B64 80120464 24420004 */ addiu $v0, $v0, 4 -.L80120468: -/* B6B68 80120468 8FBF0010 */ lw $ra, 0x10($sp) -/* B6B6C 8012046C 03E00008 */ jr $ra -/* B6B70 80120470 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/B4580/load_mesh_animator_tree.s b/ver/us/asm/nonmatchings/B4580/load_mesh_animator_tree.s deleted file mode 100644 index 54d648fbec..0000000000 --- a/ver/us/asm/nonmatchings/B4580/load_mesh_animator_tree.s +++ /dev/null @@ -1,54 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel load_mesh_animator_tree -/* B6B74 80120474 27BDFE00 */ addiu $sp, $sp, -0x200 -/* B6B78 80120478 2402F7FF */ addiu $v0, $zero, -0x801 -/* B6B7C 8012047C 00822024 */ and $a0, $a0, $v0 -/* B6B80 80120480 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) -/* B6B84 80120484 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) -/* B6B88 80120488 00041080 */ sll $v0, $a0, 2 -/* B6B8C 8012048C AFBF01FC */ sw $ra, 0x1fc($sp) -/* B6B90 80120490 AFB001F8 */ sw $s0, 0x1f8($sp) -/* B6B94 80120494 00431021 */ addu $v0, $v0, $v1 -/* B6B98 80120498 8C500000 */ lw $s0, ($v0) -/* B6B9C 8012049C 12000020 */ beqz $s0, .L80120520 -/* B6BA0 801204A0 00000000 */ nop -/* B6BA4 801204A4 8E020000 */ lw $v0, ($s0) -/* B6BA8 801204A8 1040001D */ beqz $v0, .L80120520 -/* B6BAC 801204AC 00000000 */ nop -/* B6BB0 801204B0 8CA20000 */ lw $v0, ($a1) -/* B6BB4 801204B4 84420020 */ lh $v0, 0x20($v0) -/* B6BB8 801204B8 14400005 */ bnez $v0, .L801204D0 -/* B6BBC 801204BC 24030079 */ addiu $v1, $zero, 0x79 -/* B6BC0 801204C0 0C0480EB */ jal load_model_animator_tree -/* B6BC4 801204C4 00000000 */ nop -/* B6BC8 801204C8 08048148 */ j .L80120520 -/* B6BCC 801204CC 00000000 */ nop -.L801204D0: -/* B6BD0 801204D0 260201E4 */ addiu $v0, $s0, 0x1e4 -/* B6BD4 801204D4 3C018015 */ lui $at, %hi(D_80153B68) -/* B6BD8 801204D8 AC253B68 */ sw $a1, %lo(D_80153B68)($at) -/* B6BDC 801204DC AE0502C8 */ sw $a1, 0x2c8($s0) -/* B6BE0 801204E0 AE0002CC */ sw $zero, 0x2cc($s0) -/* B6BE4 801204E4 AE0002D0 */ sw $zero, 0x2d0($s0) -.L801204E8: -/* B6BE8 801204E8 AC4000E0 */ sw $zero, 0xe0($v0) -/* B6BEC 801204EC 2463FFFF */ addiu $v1, $v1, -1 -/* B6BF0 801204F0 0461FFFD */ bgez $v1, .L801204E8 -/* B6BF4 801204F4 2442FFFC */ addiu $v0, $v0, -4 -/* B6BF8 801204F8 0200282D */ daddu $a1, $s0, $zero -/* B6BFC 801204FC 3C028015 */ lui $v0, %hi(D_80153B68) -/* B6C00 80120500 8C423B68 */ lw $v0, %lo(D_80153B68)($v0) -/* B6C04 80120504 0000302D */ daddu $a2, $zero, $zero -/* B6C08 80120508 8C440000 */ lw $a0, ($v0) -/* B6C0C 8012050C 0C048108 */ jal load_mesh_animator_node -/* B6C10 80120510 27A70010 */ addiu $a3, $sp, 0x10 -/* B6C14 80120514 8E020000 */ lw $v0, ($s0) -/* B6C18 80120518 34428000 */ ori $v0, $v0, 0x8000 -/* B6C1C 8012051C AE020000 */ sw $v0, ($s0) -.L80120520: -/* B6C20 80120520 8FBF01FC */ lw $ra, 0x1fc($sp) -/* B6C24 80120524 8FB001F8 */ lw $s0, 0x1f8($sp) -/* B6C28 80120528 03E00008 */ jr $ra -/* B6C2C 8012052C 27BD0200 */ addiu $sp, $sp, 0x200 diff --git a/ver/us/asm/nonmatchings/B4580/load_model_animator_node.s b/ver/us/asm/nonmatchings/B4580/load_model_animator_node.s deleted file mode 100644 index b9d4e513ff..0000000000 --- a/ver/us/asm/nonmatchings/B4580/load_model_animator_node.s +++ /dev/null @@ -1,113 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -glabel D_80150010 -.double 180.0 - -glabel D_80150018 -.double 32767.0 - -.section .text - -glabel load_model_animator_node -/* B6934 80120234 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* B6938 80120238 AFB00030 */ sw $s0, 0x30($sp) -/* B693C 8012023C 0080802D */ daddu $s0, $a0, $zero -/* B6940 80120240 AFB10034 */ sw $s1, 0x34($sp) -/* B6944 80120244 00A0882D */ daddu $s1, $a1, $zero -/* B6948 80120248 AFB3003C */ sw $s3, 0x3c($sp) -/* B694C 8012024C 00C0982D */ daddu $s3, $a2, $zero -/* B6950 80120250 AFB20038 */ sw $s2, 0x38($sp) -/* B6954 80120254 00E0902D */ daddu $s2, $a3, $zero -/* B6958 80120258 27A60010 */ addiu $a2, $sp, 0x10 -/* B695C 8012025C 1200004C */ beqz $s0, .L80120390 -/* B6960 80120260 AFBF0040 */ sw $ra, 0x40($sp) -/* B6964 80120264 8E020000 */ lw $v0, ($s0) -/* B6968 80120268 AFA00014 */ sw $zero, 0x14($sp) -/* B696C 8012026C AFA00018 */ sw $zero, 0x18($sp) -/* B6970 80120270 AFA0001C */ sw $zero, 0x1c($sp) -/* B6974 80120274 AFA20010 */ sw $v0, 0x10($sp) -/* B6978 80120278 86020004 */ lh $v0, 4($s0) -/* B697C 8012027C 3C018015 */ lui $at, %hi(D_80150010) -/* B6980 80120280 D4220010 */ ldc1 $f2, %lo(D_80150010)($at) -/* B6984 80120284 44820000 */ mtc1 $v0, $f0 -/* B6988 80120288 00000000 */ nop -/* B698C 8012028C 46800020 */ cvt.s.w $f0, $f0 -/* B6990 80120290 46000021 */ cvt.d.s $f0, $f0 -/* B6994 80120294 46220002 */ mul.d $f0, $f0, $f2 -/* B6998 80120298 00000000 */ nop -/* B699C 8012029C 3C018015 */ lui $at, %hi(D_80150018) -/* B69A0 801202A0 D4240018 */ ldc1 $f4, %lo(D_80150018)($at) -/* B69A4 801202A4 46240003 */ div.d $f0, $f0, $f4 -/* B69A8 801202A8 46200020 */ cvt.s.d $f0, $f0 -/* B69AC 801202AC E7A00020 */ swc1 $f0, 0x20($sp) -/* B69B0 801202B0 86020006 */ lh $v0, 6($s0) -/* B69B4 801202B4 44820000 */ mtc1 $v0, $f0 -/* B69B8 801202B8 00000000 */ nop -/* B69BC 801202BC 46800020 */ cvt.s.w $f0, $f0 -/* B69C0 801202C0 46000021 */ cvt.d.s $f0, $f0 -/* B69C4 801202C4 46220002 */ mul.d $f0, $f0, $f2 -/* B69C8 801202C8 00000000 */ nop -/* B69CC 801202CC 46240003 */ div.d $f0, $f0, $f4 -/* B69D0 801202D0 46200020 */ cvt.s.d $f0, $f0 -/* B69D4 801202D4 E7A00024 */ swc1 $f0, 0x24($sp) -/* B69D8 801202D8 86020008 */ lh $v0, 8($s0) -/* B69DC 801202DC 44820000 */ mtc1 $v0, $f0 -/* B69E0 801202E0 00000000 */ nop -/* B69E4 801202E4 46800020 */ cvt.s.w $f0, $f0 -/* B69E8 801202E8 46000021 */ cvt.d.s $f0, $f0 -/* B69EC 801202EC 46220002 */ mul.d $f0, $f0, $f2 -/* B69F0 801202F0 00000000 */ nop -/* B69F4 801202F4 0220202D */ daddu $a0, $s1, $zero -/* B69F8 801202F8 0260282D */ daddu $a1, $s3, $zero -/* B69FC 801202FC 46240003 */ div.d $f0, $f0, $f4 -/* B6A00 80120300 46200020 */ cvt.s.d $f0, $f0 -/* B6A04 80120304 0C0479C6 */ jal add_anim_node -/* B6A08 80120308 E7A00028 */ swc1 $f0, 0x28($sp) -/* B6A0C 8012030C 86030028 */ lh $v1, 0x28($s0) -/* B6A10 80120310 10600006 */ beqz $v1, .L8012032C -/* B6A14 80120314 0040302D */ daddu $a2, $v0, $zero -/* B6A18 80120318 94C200F4 */ lhu $v0, 0xf4($a2) -/* B6A1C 8012031C 2463FFFF */ addiu $v1, $v1, -1 -/* B6A20 80120320 ACC300FC */ sw $v1, 0xfc($a2) -/* B6A24 80120324 34421000 */ ori $v0, $v0, 0x1000 -/* B6A28 80120328 A4C200F4 */ sh $v0, 0xf4($a2) -.L8012032C: -/* B6A2C 8012032C 3C038015 */ lui $v1, %hi(D_80153B68) -/* B6A30 80120330 8C633B68 */ lw $v1, %lo(D_80153B68)($v1) -/* B6A34 80120334 8C620000 */ lw $v0, ($v1) -/* B6A38 80120338 10500005 */ beq $v0, $s0, .L80120350 -/* B6A3C 8012033C 0000202D */ daddu $a0, $zero, $zero -.L80120340: -/* B6A40 80120340 24630004 */ addiu $v1, $v1, 4 -/* B6A44 80120344 8C620000 */ lw $v0, ($v1) -/* B6A48 80120348 1450FFFD */ bne $v0, $s0, .L80120340 -/* B6A4C 8012034C 24840001 */ addiu $a0, $a0, 1 -.L80120350: -/* B6A50 80120350 00041080 */ sll $v0, $a0, 2 -/* B6A54 80120354 84C300F6 */ lh $v1, 0xf6($a2) -/* B6A58 80120358 00521021 */ addu $v0, $v0, $s2 -/* B6A5C 8012035C AC430000 */ sw $v1, ($v0) -/* B6A60 80120360 8E04001C */ lw $a0, 0x1c($s0) -/* B6A64 80120364 10800004 */ beqz $a0, .L80120378 -/* B6A68 80120368 0220282D */ daddu $a1, $s1, $zero -/* B6A6C 8012036C 84C600F6 */ lh $a2, 0xf6($a2) -/* B6A70 80120370 0C04808D */ jal load_model_animator_node -/* B6A74 80120374 0240382D */ daddu $a3, $s2, $zero -.L80120378: -/* B6A78 80120378 8E040018 */ lw $a0, 0x18($s0) -/* B6A7C 8012037C 10800004 */ beqz $a0, .L80120390 -/* B6A80 80120380 0220282D */ daddu $a1, $s1, $zero -/* B6A84 80120384 0260302D */ daddu $a2, $s3, $zero -/* B6A88 80120388 0C04808D */ jal load_model_animator_node -/* B6A8C 8012038C 0240382D */ daddu $a3, $s2, $zero -.L80120390: -/* B6A90 80120390 8FBF0040 */ lw $ra, 0x40($sp) -/* B6A94 80120394 8FB3003C */ lw $s3, 0x3c($sp) -/* B6A98 80120398 8FB20038 */ lw $s2, 0x38($sp) -/* B6A9C 8012039C 8FB10034 */ lw $s1, 0x34($sp) -/* B6AA0 801203A0 8FB00030 */ lw $s0, 0x30($sp) -/* B6AA4 801203A4 03E00008 */ jr $ra -/* B6AA8 801203A8 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/ver/us/asm/nonmatchings/B4580/load_model_animator_tree.s b/ver/us/asm/nonmatchings/B4580/load_model_animator_tree.s deleted file mode 100644 index a946fa36c0..0000000000 --- a/ver/us/asm/nonmatchings/B4580/load_model_animator_tree.s +++ /dev/null @@ -1,34 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel load_model_animator_tree -/* B6AAC 801203AC 27BDFE00 */ addiu $sp, $sp, -0x200 -/* B6AB0 801203B0 2402F7FF */ addiu $v0, $zero, -0x801 -/* B6AB4 801203B4 00822024 */ and $a0, $a0, $v0 -/* B6AB8 801203B8 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) -/* B6ABC 801203BC 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) -/* B6AC0 801203C0 00042080 */ sll $a0, $a0, 2 -/* B6AC4 801203C4 AFBF01FC */ sw $ra, 0x1fc($sp) -/* B6AC8 801203C8 AFB001F8 */ sw $s0, 0x1f8($sp) -/* B6ACC 801203CC 00822021 */ addu $a0, $a0, $v0 -/* B6AD0 801203D0 8C900000 */ lw $s0, ($a0) -/* B6AD4 801203D4 1200000E */ beqz $s0, .L80120410 -/* B6AD8 801203D8 00A0182D */ daddu $v1, $a1, $zero -/* B6ADC 801203DC 8E020000 */ lw $v0, ($s0) -/* B6AE0 801203E0 1040000B */ beqz $v0, .L80120410 -/* B6AE4 801203E4 0200282D */ daddu $a1, $s0, $zero -/* B6AE8 801203E8 0000302D */ daddu $a2, $zero, $zero -/* B6AEC 801203EC 3C018015 */ lui $at, %hi(D_80153B68) -/* B6AF0 801203F0 AC233B68 */ sw $v1, %lo(D_80153B68)($at) -/* B6AF4 801203F4 8C640000 */ lw $a0, ($v1) -/* B6AF8 801203F8 0C04808D */ jal load_model_animator_node -/* B6AFC 801203FC 27A70010 */ addiu $a3, $sp, 0x10 -/* B6B00 80120400 0200202D */ daddu $a0, $s0, $zero -/* B6B04 80120404 27A50010 */ addiu $a1, $sp, 0x10 -/* B6B08 80120408 0C047FED */ jal set_animator_tree_to_node_map -/* B6B0C 8012040C 2406007A */ addiu $a2, $zero, 0x7a -.L80120410: -/* B6B10 80120410 8FBF01FC */ lw $ra, 0x1fc($sp) -/* B6B14 80120414 8FB001F8 */ lw $s0, 0x1f8($sp) -/* B6B18 80120418 03E00008 */ jr $ra -/* B6B1C 8012041C 27BD0200 */ addiu $sp, $sp, 0x200 diff --git a/ver/us/asm/nonmatchings/B4580/play_model_animation.s b/ver/us/asm/nonmatchings/B4580/play_model_animation.s deleted file mode 100644 index a6e58b2ce2..0000000000 --- a/ver/us/asm/nonmatchings/B4580/play_model_animation.s +++ /dev/null @@ -1,25 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel play_model_animation -/* B6848 80120148 2402F7FF */ addiu $v0, $zero, -0x801 -/* B684C 8012014C 00822024 */ and $a0, $a0, $v0 -/* B6850 80120150 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) -/* B6854 80120154 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) -/* B6858 80120158 00042080 */ sll $a0, $a0, 2 -/* B685C 8012015C 00822021 */ addu $a0, $a0, $v0 -/* B6860 80120160 8C840000 */ lw $a0, ($a0) -/* B6864 80120164 8C8300DC */ lw $v1, 0xdc($a0) -/* B6868 80120168 10600004 */ beqz $v1, .L8012017C -/* B686C 8012016C 3C0200FF */ lui $v0, 0xff -/* B6870 80120170 3442FFFF */ ori $v0, $v0, 0xffff -/* B6874 80120174 00A21024 */ and $v0, $a1, $v0 -/* B6878 80120178 00432821 */ addu $a1, $v0, $v1 -.L8012017C: -/* B687C 8012017C 3C013F80 */ lui $at, 0x3f80 -/* B6880 80120180 44810000 */ mtc1 $at, $f0 -/* B6884 80120184 AC850008 */ sw $a1, 8($a0) -/* B6888 80120188 AC85000C */ sw $a1, 0xc($a0) -/* B688C 8012018C AC8002CC */ sw $zero, 0x2cc($a0) -/* B6890 80120190 03E00008 */ jr $ra -/* B6894 80120194 E4800090 */ swc1 $f0, 0x90($a0) diff --git a/ver/us/asm/nonmatchings/B4580/play_model_animation_starting_from.s b/ver/us/asm/nonmatchings/B4580/play_model_animation_starting_from.s deleted file mode 100644 index fb3a669819..0000000000 --- a/ver/us/asm/nonmatchings/B4580/play_model_animation_starting_from.s +++ /dev/null @@ -1,46 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel play_model_animation_starting_from -/* B6898 80120198 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B689C 8012019C 2402F7FF */ addiu $v0, $zero, -0x801 -/* B68A0 801201A0 AFB10014 */ sw $s1, 0x14($sp) -/* B68A4 801201A4 00828824 */ and $s1, $a0, $v0 -/* B68A8 801201A8 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) -/* B68AC 801201AC 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) -/* B68B0 801201B0 00111080 */ sll $v0, $s1, 2 -/* B68B4 801201B4 AFBF001C */ sw $ra, 0x1c($sp) -/* B68B8 801201B8 AFB20018 */ sw $s2, 0x18($sp) -/* B68BC 801201BC AFB00010 */ sw $s0, 0x10($sp) -/* B68C0 801201C0 00431021 */ addu $v0, $v0, $v1 -/* B68C4 801201C4 8C430000 */ lw $v1, ($v0) -/* B68C8 801201C8 8C6400DC */ lw $a0, 0xdc($v1) -/* B68CC 801201CC 10800005 */ beqz $a0, .L801201E4 -/* B68D0 801201D0 00C0902D */ daddu $s2, $a2, $zero -/* B68D4 801201D4 3C0200FF */ lui $v0, 0xff -/* B68D8 801201D8 3442FFFF */ ori $v0, $v0, 0xffff -/* B68DC 801201DC 00A21024 */ and $v0, $a1, $v0 -/* B68E0 801201E0 00442821 */ addu $a1, $v0, $a0 -.L801201E4: -/* B68E4 801201E4 3C013F80 */ lui $at, 0x3f80 -/* B68E8 801201E8 44810000 */ mtc1 $at, $f0 -/* B68EC 801201EC 0000802D */ daddu $s0, $zero, $zero -/* B68F0 801201F0 AC650008 */ sw $a1, 8($v1) -/* B68F4 801201F4 AC65000C */ sw $a1, 0xc($v1) -/* B68F8 801201F8 AC6002CC */ sw $zero, 0x2cc($v1) -/* B68FC 801201FC 1A400007 */ blez $s2, .L8012021C -/* B6900 80120200 E4600090 */ swc1 $f0, 0x90($v1) -.L80120204: -/* B6904 80120204 0C047A2F */ jal update_model_animator -/* B6908 80120208 0220202D */ daddu $a0, $s1, $zero -/* B690C 8012020C 26100001 */ addiu $s0, $s0, 1 -/* B6910 80120210 0212102A */ slt $v0, $s0, $s2 -/* B6914 80120214 1440FFFB */ bnez $v0, .L80120204 -/* B6918 80120218 00000000 */ nop -.L8012021C: -/* B691C 8012021C 8FBF001C */ lw $ra, 0x1c($sp) -/* B6920 80120220 8FB20018 */ lw $s2, 0x18($sp) -/* B6924 80120224 8FB10014 */ lw $s1, 0x14($sp) -/* B6928 80120228 8FB00010 */ lw $s0, 0x10($sp) -/* B692C 8012022C 03E00008 */ jr $ra -/* B6930 80120230 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/B4580/reload_mesh_animator_node.s b/ver/us/asm/nonmatchings/B4580/reload_mesh_animator_node.s deleted file mode 100644 index 5f13ee1a0c..0000000000 --- a/ver/us/asm/nonmatchings/B4580/reload_mesh_animator_node.s +++ /dev/null @@ -1,99 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -glabel D_80150020 -.double 180.0 - -glabel D_80150028 -.double 32767.0 - -.section .text - -glabel reload_mesh_animator_node -/* B6C30 80120530 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* B6C34 80120534 AFB00030 */ sw $s0, 0x30($sp) -/* B6C38 80120538 0080802D */ daddu $s0, $a0, $zero -/* B6C3C 8012053C AFB10034 */ sw $s1, 0x34($sp) -/* B6C40 80120540 00A0882D */ daddu $s1, $a1, $zero -/* B6C44 80120544 00C0282D */ daddu $a1, $a2, $zero -/* B6C48 80120548 AFB20038 */ sw $s2, 0x38($sp) -/* B6C4C 8012054C 00E0902D */ daddu $s2, $a3, $zero -/* B6C50 80120550 27A60010 */ addiu $a2, $sp, 0x10 -/* B6C54 80120554 12000042 */ beqz $s0, .L80120660 -/* B6C58 80120558 AFBF003C */ sw $ra, 0x3c($sp) -/* B6C5C 8012055C 8E020000 */ lw $v0, ($s0) -/* B6C60 80120560 AFA00014 */ sw $zero, 0x14($sp) -/* B6C64 80120564 AFA00018 */ sw $zero, 0x18($sp) -/* B6C68 80120568 AFA0001C */ sw $zero, 0x1c($sp) -/* B6C6C 8012056C AFA20010 */ sw $v0, 0x10($sp) -/* B6C70 80120570 86020004 */ lh $v0, 4($s0) -/* B6C74 80120574 3C018015 */ lui $at, %hi(D_80150020) -/* B6C78 80120578 D4220020 */ ldc1 $f2, %lo(D_80150020)($at) -/* B6C7C 8012057C 44820000 */ mtc1 $v0, $f0 -/* B6C80 80120580 00000000 */ nop -/* B6C84 80120584 46800020 */ cvt.s.w $f0, $f0 -/* B6C88 80120588 46000021 */ cvt.d.s $f0, $f0 -/* B6C8C 8012058C 46220002 */ mul.d $f0, $f0, $f2 -/* B6C90 80120590 00000000 */ nop -/* B6C94 80120594 3C018015 */ lui $at, %hi(D_80150028) -/* B6C98 80120598 D4240028 */ ldc1 $f4, %lo(D_80150028)($at) -/* B6C9C 8012059C 46240003 */ div.d $f0, $f0, $f4 -/* B6CA0 801205A0 46200020 */ cvt.s.d $f0, $f0 -/* B6CA4 801205A4 E7A00020 */ swc1 $f0, 0x20($sp) -/* B6CA8 801205A8 86020006 */ lh $v0, 6($s0) -/* B6CAC 801205AC 44820000 */ mtc1 $v0, $f0 -/* B6CB0 801205B0 00000000 */ nop -/* B6CB4 801205B4 46800020 */ cvt.s.w $f0, $f0 -/* B6CB8 801205B8 46000021 */ cvt.d.s $f0, $f0 -/* B6CBC 801205BC 46220002 */ mul.d $f0, $f0, $f2 -/* B6CC0 801205C0 00000000 */ nop -/* B6CC4 801205C4 46240003 */ div.d $f0, $f0, $f4 -/* B6CC8 801205C8 46200020 */ cvt.s.d $f0, $f0 -/* B6CCC 801205CC E7A00024 */ swc1 $f0, 0x24($sp) -/* B6CD0 801205D0 86020008 */ lh $v0, 8($s0) -/* B6CD4 801205D4 44820000 */ mtc1 $v0, $f0 -/* B6CD8 801205D8 00000000 */ nop -/* B6CDC 801205DC 46800020 */ cvt.s.w $f0, $f0 -/* B6CE0 801205E0 46000021 */ cvt.d.s $f0, $f0 -/* B6CE4 801205E4 46220002 */ mul.d $f0, $f0, $f2 -/* B6CE8 801205E8 00000000 */ nop -/* B6CEC 801205EC 0220202D */ daddu $a0, $s1, $zero -/* B6CF0 801205F0 46240003 */ div.d $f0, $f0, $f4 -/* B6CF4 801205F4 46200020 */ cvt.s.d $f0, $f0 -/* B6CF8 801205F8 0C0479C6 */ jal add_anim_node -/* B6CFC 801205FC E7A00028 */ swc1 $f0, 0x28($sp) -/* B6D00 80120600 96030020 */ lhu $v1, 0x20($s0) -/* B6D04 80120604 0040302D */ daddu $a2, $v0, $zero -/* B6D08 80120608 A4C300F8 */ sh $v1, 0xf8($a2) -/* B6D0C 8012060C 8E020024 */ lw $v0, 0x24($s0) -/* B6D10 80120610 3C038015 */ lui $v1, %hi(D_80153B68) -/* B6D14 80120614 8C633B68 */ lw $v1, %lo(D_80153B68)($v1) -/* B6D18 80120618 ACC200FC */ sw $v0, 0xfc($a2) -/* B6D1C 8012061C 8C620000 */ lw $v0, ($v1) -/* B6D20 80120620 10500005 */ beq $v0, $s0, .L80120638 -/* B6D24 80120624 0000202D */ daddu $a0, $zero, $zero -.L80120628: -/* B6D28 80120628 24630004 */ addiu $v1, $v1, 4 -/* B6D2C 8012062C 8C620000 */ lw $v0, ($v1) -/* B6D30 80120630 1450FFFD */ bne $v0, $s0, .L80120628 -/* B6D34 80120634 24840001 */ addiu $a0, $a0, 1 -.L80120638: -/* B6D38 80120638 00041080 */ sll $v0, $a0, 2 -/* B6D3C 8012063C 84C300F6 */ lh $v1, 0xf6($a2) -/* B6D40 80120640 00521021 */ addu $v0, $v0, $s2 -/* B6D44 80120644 AC430000 */ sw $v1, ($v0) -/* B6D48 80120648 8E04001C */ lw $a0, 0x1c($s0) -/* B6D4C 8012064C 10800004 */ beqz $a0, .L80120660 -/* B6D50 80120650 0220282D */ daddu $a1, $s1, $zero -/* B6D54 80120654 84C600F6 */ lh $a2, 0xf6($a2) -/* B6D58 80120658 0C04814C */ jal reload_mesh_animator_node -/* B6D5C 8012065C 0240382D */ daddu $a3, $s2, $zero -.L80120660: -/* B6D60 80120660 8FBF003C */ lw $ra, 0x3c($sp) -/* B6D64 80120664 8FB20038 */ lw $s2, 0x38($sp) -/* B6D68 80120668 8FB10034 */ lw $s1, 0x34($sp) -/* B6D6C 8012066C 8FB00030 */ lw $s0, 0x30($sp) -/* B6D70 80120670 03E00008 */ jr $ra -/* B6D74 80120674 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/ver/us/asm/nonmatchings/B4580/reload_mesh_animator_tree.s b/ver/us/asm/nonmatchings/B4580/reload_mesh_animator_tree.s deleted file mode 100644 index 97c945aa20..0000000000 --- a/ver/us/asm/nonmatchings/B4580/reload_mesh_animator_tree.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel reload_mesh_animator_tree -/* B6D78 80120678 27BDFE00 */ addiu $sp, $sp, -0x200 -/* B6D7C 8012067C AFB001F8 */ sw $s0, 0x1f8($sp) -/* B6D80 80120680 AFBF01FC */ sw $ra, 0x1fc($sp) -/* B6D84 80120684 0C047900 */ jal delete_model_animator_nodes -/* B6D88 80120688 0080802D */ daddu $s0, $a0, $zero -/* B6D8C 8012068C 24040079 */ addiu $a0, $zero, 0x79 -/* B6D90 80120690 8E0202C8 */ lw $v0, 0x2c8($s0) -/* B6D94 80120694 27A301F4 */ addiu $v1, $sp, 0x1f4 -/* B6D98 80120698 3C018015 */ lui $at, %hi(D_80153B68) -/* B6D9C 8012069C AC223B68 */ sw $v0, %lo(D_80153B68)($at) -.L801206A0: -/* B6DA0 801206A0 AC600000 */ sw $zero, ($v1) -/* B6DA4 801206A4 2484FFFF */ addiu $a0, $a0, -1 -/* B6DA8 801206A8 0481FFFD */ bgez $a0, .L801206A0 -/* B6DAC 801206AC 2463FFFC */ addiu $v1, $v1, -4 -/* B6DB0 801206B0 0200282D */ daddu $a1, $s0, $zero -/* B6DB4 801206B4 8E0202CC */ lw $v0, 0x2cc($s0) -/* B6DB8 801206B8 0000302D */ daddu $a2, $zero, $zero -/* B6DBC 801206BC 00021080 */ sll $v0, $v0, 2 -/* B6DC0 801206C0 02021021 */ addu $v0, $s0, $v0 -/* B6DC4 801206C4 8C4400E0 */ lw $a0, 0xe0($v0) -/* B6DC8 801206C8 0C04814C */ jal reload_mesh_animator_node -/* B6DCC 801206CC 27A70010 */ addiu $a3, $sp, 0x10 -/* B6DD0 801206D0 0200202D */ daddu $a0, $s0, $zero -/* B6DD4 801206D4 27A50010 */ addiu $a1, $sp, 0x10 -/* B6DD8 801206D8 2406007A */ addiu $a2, $zero, 0x7a -/* B6DDC 801206DC 2402FFFF */ addiu $v0, $zero, -1 -/* B6DE0 801206E0 0C047FED */ jal set_animator_tree_to_node_map -/* B6DE4 801206E4 AFA20010 */ sw $v0, 0x10($sp) -/* B6DE8 801206E8 8FBF01FC */ lw $ra, 0x1fc($sp) -/* B6DEC 801206EC 8FB001F8 */ lw $s0, 0x1f8($sp) -/* B6DF0 801206F0 03E00008 */ jr $ra -/* B6DF4 801206F4 27BD0200 */ addiu $sp, $sp, 0x200 diff --git a/ver/us/asm/nonmatchings/B4580/render_animated_model.s b/ver/us/asm/nonmatchings/B4580/render_animated_model.s deleted file mode 100644 index 6275ee2115..0000000000 --- a/ver/us/asm/nonmatchings/B4580/render_animated_model.s +++ /dev/null @@ -1,64 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel render_animated_model -/* B5A04 8011F304 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* B5A08 8011F308 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* B5A0C 8011F30C 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* B5A10 8011F310 AFBF0020 */ sw $ra, 0x20($sp) -/* B5A14 8011F314 80420070 */ lb $v0, 0x70($v0) -/* B5A18 8011F318 10400004 */ beqz $v0, .L8011F32C -/* B5A1C 8011F31C 27A80010 */ addiu $t0, $sp, 0x10 -/* B5A20 8011F320 30820800 */ andi $v0, $a0, 0x800 -/* B5A24 8011F324 1040002D */ beqz $v0, .L8011F3DC -/* B5A28 8011F328 00000000 */ nop -.L8011F32C: -/* B5A2C 8011F32C 2402F7FF */ addiu $v0, $zero, -0x801 -/* B5A30 8011F330 00822024 */ and $a0, $a0, $v0 -/* B5A34 8011F334 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) -/* B5A38 8011F338 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) -/* B5A3C 8011F33C 00041080 */ sll $v0, $a0, 2 -/* B5A40 8011F340 00431021 */ addu $v0, $v0, $v1 -/* B5A44 8011F344 8C470000 */ lw $a3, ($v0) -/* B5A48 8011F348 10E00024 */ beqz $a3, .L8011F3DC -/* B5A4C 8011F34C 00000000 */ nop -/* B5A50 8011F350 8CE60000 */ lw $a2, ($a3) -/* B5A54 8011F354 10C00021 */ beqz $a2, .L8011F3DC -/* B5A58 8011F358 30C20040 */ andi $v0, $a2, 0x40 -/* B5A5C 8011F35C 1440001F */ bnez $v0, .L8011F3DC -/* B5A60 8011F360 24020001 */ addiu $v0, $zero, 1 -/* B5A64 8011F364 3C03800A */ lui $v1, %hi(gCurrentCamID) -/* B5A68 8011F368 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) -/* B5A6C 8011F36C 00621004 */ sllv $v0, $v0, $v1 -/* B5A70 8011F370 00C21024 */ and $v0, $a2, $v0 -/* B5A74 8011F374 10400019 */ beqz $v0, .L8011F3DC -/* B5A78 8011F378 30C20080 */ andi $v0, $a2, 0x80 -/* B5A7C 8011F37C 14400017 */ bnez $v0, .L8011F3DC -/* B5A80 8011F380 24E20098 */ addiu $v0, $a3, 0x98 -/* B5A84 8011F384 24A30040 */ addiu $v1, $a1, 0x40 -.L8011F388: -/* B5A88 8011F388 8CA90000 */ lw $t1, ($a1) -/* B5A8C 8011F38C 8CAA0004 */ lw $t2, 4($a1) -/* B5A90 8011F390 8CAB0008 */ lw $t3, 8($a1) -/* B5A94 8011F394 8CAC000C */ lw $t4, 0xc($a1) -/* B5A98 8011F398 AC490000 */ sw $t1, ($v0) -/* B5A9C 8011F39C AC4A0004 */ sw $t2, 4($v0) -/* B5AA0 8011F3A0 AC4B0008 */ sw $t3, 8($v0) -/* B5AA4 8011F3A4 AC4C000C */ sw $t4, 0xc($v0) -/* B5AA8 8011F3A8 24A50010 */ addiu $a1, $a1, 0x10 -/* B5AAC 8011F3AC 14A3FFF6 */ bne $a1, $v1, .L8011F388 -/* B5AB0 8011F3B0 24420010 */ addiu $v0, $v0, 0x10 -/* B5AB4 8011F3B4 3C028012 */ lui $v0, %hi(appendGfx_animator) -/* B5AB8 8011F3B8 2442F4D4 */ addiu $v0, $v0, %lo(appendGfx_animator) -/* B5ABC 8011F3BC ACE000D8 */ sw $zero, 0xd8($a3) -/* B5AC0 8011F3C0 AD070008 */ sw $a3, 8($t0) -/* B5AC4 8011F3C4 AD02000C */ sw $v0, 0xc($t0) -/* B5AC8 8011F3C8 AD000004 */ sw $zero, 4($t0) -/* B5ACC 8011F3CC 80E20004 */ lb $v0, 4($a3) -/* B5AD0 8011F3D0 0100202D */ daddu $a0, $t0, $zero -/* B5AD4 8011F3D4 0C047644 */ jal queue_render_task -/* B5AD8 8011F3D8 AD020000 */ sw $v0, ($t0) -.L8011F3DC: -/* B5ADC 8011F3DC 8FBF0020 */ lw $ra, 0x20($sp) -/* B5AE0 8011F3E0 03E00008 */ jr $ra -/* B5AE4 8011F3E4 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/B4580/render_animated_model_with_vertices.s b/ver/us/asm/nonmatchings/B4580/render_animated_model_with_vertices.s deleted file mode 100644 index 0aa06303cc..0000000000 --- a/ver/us/asm/nonmatchings/B4580/render_animated_model_with_vertices.s +++ /dev/null @@ -1,66 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel render_animated_model_with_vertices -/* B5AE8 8011F3E8 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* B5AEC 8011F3EC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* B5AF0 8011F3F0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* B5AF4 8011F3F4 AFBF0020 */ sw $ra, 0x20($sp) -/* B5AF8 8011F3F8 80420070 */ lb $v0, 0x70($v0) -/* B5AFC 8011F3FC 10400004 */ beqz $v0, .L8011F410 -/* B5B00 8011F400 27AA0010 */ addiu $t2, $sp, 0x10 -/* B5B04 8011F404 30820800 */ andi $v0, $a0, 0x800 -/* B5B08 8011F408 1040002F */ beqz $v0, .L8011F4C8 -/* B5B0C 8011F40C 00000000 */ nop -.L8011F410: -/* B5B10 8011F410 2402F7FF */ addiu $v0, $zero, -0x801 -/* B5B14 8011F414 00822024 */ and $a0, $a0, $v0 -/* B5B18 8011F418 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) -/* B5B1C 8011F41C 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) -/* B5B20 8011F420 00041080 */ sll $v0, $a0, 2 -/* B5B24 8011F424 00431021 */ addu $v0, $v0, $v1 -/* B5B28 8011F428 8C490000 */ lw $t1, ($v0) -/* B5B2C 8011F42C 11200026 */ beqz $t1, .L8011F4C8 -/* B5B30 8011F430 00000000 */ nop -/* B5B34 8011F434 8D280000 */ lw $t0, ($t1) -/* B5B38 8011F438 11000023 */ beqz $t0, .L8011F4C8 -/* B5B3C 8011F43C 31020040 */ andi $v0, $t0, 0x40 -/* B5B40 8011F440 14400021 */ bnez $v0, .L8011F4C8 -/* B5B44 8011F444 24020001 */ addiu $v0, $zero, 1 -/* B5B48 8011F448 3C03800A */ lui $v1, %hi(gCurrentCamID) -/* B5B4C 8011F44C 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) -/* B5B50 8011F450 00621004 */ sllv $v0, $v0, $v1 -/* B5B54 8011F454 01021024 */ and $v0, $t0, $v0 -/* B5B58 8011F458 1040001B */ beqz $v0, .L8011F4C8 -/* B5B5C 8011F45C 31020080 */ andi $v0, $t0, 0x80 -/* B5B60 8011F460 14400019 */ bnez $v0, .L8011F4C8 -/* B5B64 8011F464 25220098 */ addiu $v0, $t1, 0x98 -/* B5B68 8011F468 24A30040 */ addiu $v1, $a1, 0x40 -.L8011F46C: -/* B5B6C 8011F46C 8CAB0000 */ lw $t3, ($a1) -/* B5B70 8011F470 8CAC0004 */ lw $t4, 4($a1) -/* B5B74 8011F474 8CAD0008 */ lw $t5, 8($a1) -/* B5B78 8011F478 8CAE000C */ lw $t6, 0xc($a1) -/* B5B7C 8011F47C AC4B0000 */ sw $t3, ($v0) -/* B5B80 8011F480 AC4C0004 */ sw $t4, 4($v0) -/* B5B84 8011F484 AC4D0008 */ sw $t5, 8($v0) -/* B5B88 8011F488 AC4E000C */ sw $t6, 0xc($v0) -/* B5B8C 8011F48C 24A50010 */ addiu $a1, $a1, 0x10 -/* B5B90 8011F490 14A3FFF6 */ bne $a1, $v1, .L8011F46C -/* B5B94 8011F494 24420010 */ addiu $v0, $v0, 0x10 -/* B5B98 8011F498 3C028012 */ lui $v0, %hi(appendGfx_animator) -/* B5B9C 8011F49C 2442F4D4 */ addiu $v0, $v0, %lo(appendGfx_animator) -/* B5BA0 8011F4A0 3C018015 */ lui $at, %hi(D_80153A60) -/* B5BA4 8011F4A4 AC263A60 */ sw $a2, %lo(D_80153A60)($at) -/* B5BA8 8011F4A8 AD2700D8 */ sw $a3, 0xd8($t1) -/* B5BAC 8011F4AC AD490008 */ sw $t1, 8($t2) -/* B5BB0 8011F4B0 AD42000C */ sw $v0, 0xc($t2) -/* B5BB4 8011F4B4 AD400004 */ sw $zero, 4($t2) -/* B5BB8 8011F4B8 81220004 */ lb $v0, 4($t1) -/* B5BBC 8011F4BC 0140202D */ daddu $a0, $t2, $zero -/* B5BC0 8011F4C0 0C047644 */ jal queue_render_task -/* B5BC4 8011F4C4 AD420000 */ sw $v0, ($t2) -.L8011F4C8: -/* B5BC8 8011F4C8 8FBF0020 */ lw $ra, 0x20($sp) -/* B5BCC 8011F4CC 03E00008 */ jr $ra -/* B5BD0 8011F4D0 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/B4580/reset_animator_list.s b/ver/us/asm/nonmatchings/B4580/reset_animator_list.s deleted file mode 100644 index 43ce55bbf5..0000000000 --- a/ver/us/asm/nonmatchings/B4580/reset_animator_list.s +++ /dev/null @@ -1,40 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel reset_animator_list -/* B4A10 8011E310 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* B4A14 8011E314 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* B4A18 8011E318 80420070 */ lb $v0, 0x70($v0) -/* B4A1C 8011E31C 14400005 */ bnez $v0, .L8011E334 -/* B4A20 8011E320 00000000 */ nop -/* B4A24 8011E324 3C028015 */ lui $v0, %hi(D_801539C0) -/* B4A28 8011E328 244239C0 */ addiu $v0, $v0, %lo(D_801539C0) -/* B4A2C 8011E32C 080478CF */ j .L8011E33C -/* B4A30 8011E330 00000000 */ nop -.L8011E334: -/* B4A34 8011E334 3C028015 */ lui $v0, %hi(D_80153A00) -/* B4A38 8011E338 24423A00 */ addiu $v0, $v0, %lo(D_80153A00) -.L8011E33C: -/* B4A3C 8011E33C 3C018015 */ lui $at, %hi(gCurrentAnimMeshListPtr) -/* B4A40 8011E340 AC223A40 */ sw $v0, %lo(gCurrentAnimMeshListPtr)($at) -/* B4A44 8011E344 2402000A */ addiu $v0, $zero, 0xa -/* B4A48 8011E348 3C018015 */ lui $at, %hi(D_80153A48) -/* B4A4C 8011E34C AC223A48 */ sw $v0, %lo(D_80153A48)($at) -/* B4A50 8011E350 3C018015 */ lui $at, %hi(D_80153A4C) -/* B4A54 8011E354 AC223A4C */ sw $v0, %lo(D_80153A4C)($at) -/* B4A58 8011E358 3C018015 */ lui $at, %hi(D_80153A50) -/* B4A5C 8011E35C AC223A50 */ sw $v0, %lo(D_80153A50)($at) -/* B4A60 8011E360 3C018015 */ lui $at, %hi(D_80153A54) -/* B4A64 8011E364 AC223A54 */ sw $v0, %lo(D_80153A54)($at) -/* B4A68 8011E368 24020320 */ addiu $v0, $zero, 0x320 -/* B4A6C 8011E36C 3C018015 */ lui $at, %hi(D_80153A58) -/* B4A70 8011E370 AC223A58 */ sw $v0, %lo(D_80153A58)($at) -/* B4A74 8011E374 240203E8 */ addiu $v0, $zero, 0x3e8 -/* B4A78 8011E378 3C018015 */ lui $at, %hi(D_801512D4) -/* B4A7C 8011E37C AC2012D4 */ sw $zero, %lo(D_801512D4)($at) -/* B4A80 8011E380 3C018015 */ lui $at, %hi(D_80153A44) -/* B4A84 8011E384 AC203A44 */ sw $zero, %lo(D_80153A44)($at) -/* B4A88 8011E388 3C018015 */ lui $at, %hi(D_80153A5C) -/* B4A8C 8011E38C AC223A5C */ sw $v0, %lo(D_80153A5C)($at) -/* B4A90 8011E390 03E00008 */ jr $ra -/* B4A94 8011E394 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/B4580/set_anim_model_fog_color.s b/ver/us/asm/nonmatchings/B4580/set_anim_model_fog_color.s deleted file mode 100644 index d5cd05108c..0000000000 --- a/ver/us/asm/nonmatchings/B4580/set_anim_model_fog_color.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_anim_model_fog_color -/* B6764 80120064 3C018015 */ lui $at, %hi(D_80153A48) -/* B6768 80120068 AC243A48 */ sw $a0, %lo(D_80153A48)($at) -/* B676C 8012006C 3C018015 */ lui $at, %hi(D_80153A4C) -/* B6770 80120070 AC253A4C */ sw $a1, %lo(D_80153A4C)($at) -/* B6774 80120074 3C018015 */ lui $at, %hi(D_80153A50) -/* B6778 80120078 AC263A50 */ sw $a2, %lo(D_80153A50)($at) -/* B677C 8012007C 3C018015 */ lui $at, %hi(D_80153A54) -/* B6780 80120080 AC273A54 */ sw $a3, %lo(D_80153A54)($at) -/* B6784 80120084 03E00008 */ jr $ra -/* B6788 80120088 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/B4580/set_anim_model_fog_dist.s b/ver/us/asm/nonmatchings/B4580/set_anim_model_fog_dist.s deleted file mode 100644 index 1c5784bf74..0000000000 --- a/ver/us/asm/nonmatchings/B4580/set_anim_model_fog_dist.s +++ /dev/null @@ -1,10 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_anim_model_fog_dist -/* B674C 8012004C 3C018015 */ lui $at, %hi(D_80153A58) -/* B6750 80120050 AC243A58 */ sw $a0, %lo(D_80153A58)($at) -/* B6754 80120054 3C018015 */ lui $at, %hi(D_80153A5C) -/* B6758 80120058 AC253A5C */ sw $a1, %lo(D_80153A5C)($at) -/* B675C 8012005C 03E00008 */ jr $ra -/* B6760 80120060 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/B4580/set_animator_flags.s b/ver/us/asm/nonmatchings/B4580/set_animator_flags.s deleted file mode 100644 index c656ee516f..0000000000 --- a/ver/us/asm/nonmatchings/B4580/set_animator_flags.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_animator_flags -/* B67EC 801200EC 2402F7FF */ addiu $v0, $zero, -0x801 -/* B67F0 801200F0 00822024 */ and $a0, $a0, $v0 -/* B67F4 801200F4 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) -/* B67F8 801200F8 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) -/* B67FC 801200FC 00042080 */ sll $a0, $a0, 2 -/* B6800 80120100 00822021 */ addu $a0, $a0, $v0 -/* B6804 80120104 8C830000 */ lw $v1, ($a0) -/* B6808 80120108 8C620000 */ lw $v0, ($v1) -/* B680C 8012010C 00451025 */ or $v0, $v0, $a1 -/* B6810 80120110 03E00008 */ jr $ra -/* B6814 80120114 AC620000 */ sw $v0, ($v1) diff --git a/ver/us/asm/nonmatchings/B4580/set_animator_tree_to_node_map.s b/ver/us/asm/nonmatchings/B4580/set_animator_tree_to_node_map.s deleted file mode 100644 index 1343722846..0000000000 --- a/ver/us/asm/nonmatchings/B4580/set_animator_tree_to_node_map.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_animator_tree_to_node_map -/* B66B4 8011FFB4 18C00008 */ blez $a2, .L8011FFD8 -/* B66B8 8011FFB8 0000382D */ daddu $a3, $zero, $zero -.L8011FFBC: -/* B66BC 8011FFBC 90A30003 */ lbu $v1, 3($a1) -/* B66C0 8011FFC0 00871021 */ addu $v0, $a0, $a3 -/* B66C4 8011FFC4 24E70001 */ addiu $a3, $a3, 1 -/* B66C8 8011FFC8 A0430015 */ sb $v1, 0x15($v0) -/* B66CC 8011FFCC 00E6102A */ slt $v0, $a3, $a2 -/* B66D0 8011FFD0 1440FFFA */ bnez $v0, .L8011FFBC -/* B66D4 8011FFD4 24A50004 */ addiu $a1, $a1, 4 -.L8011FFD8: -/* B66D8 8011FFD8 03E00008 */ jr $ra -/* B66DC 8011FFDC 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/B4580/update_model_animator.s b/ver/us/asm/nonmatchings/B4580/update_model_animator.s deleted file mode 100644 index 71e78b6837..0000000000 --- a/ver/us/asm/nonmatchings/B4580/update_model_animator.s +++ /dev/null @@ -1,119 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel update_model_animator -/* B4FBC 8011E8BC 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* B4FC0 8011E8C0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* B4FC4 8011E8C4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B4FC8 8011E8C8 AFBF001C */ sw $ra, 0x1c($sp) -/* B4FCC 8011E8CC AFB20018 */ sw $s2, 0x18($sp) -/* B4FD0 8011E8D0 AFB10014 */ sw $s1, 0x14($sp) -/* B4FD4 8011E8D4 AFB00010 */ sw $s0, 0x10($sp) -/* B4FD8 8011E8D8 80420070 */ lb $v0, 0x70($v0) -/* B4FDC 8011E8DC 10400003 */ beqz $v0, .L8011E8EC -/* B4FE0 8011E8E0 30820800 */ andi $v0, $a0, 0x800 -/* B4FE4 8011E8E4 10400055 */ beqz $v0, .L8011EA3C -/* B4FE8 8011E8E8 00000000 */ nop -.L8011E8EC: -/* B4FEC 8011E8EC 2402F7FF */ addiu $v0, $zero, -0x801 -/* B4FF0 8011E8F0 00822024 */ and $a0, $a0, $v0 -/* B4FF4 8011E8F4 3C038015 */ lui $v1, %hi(gCurrentAnimMeshListPtr) -/* B4FF8 8011E8F8 8C633A40 */ lw $v1, %lo(gCurrentAnimMeshListPtr)($v1) -/* B4FFC 8011E8FC 00041080 */ sll $v0, $a0, 2 -/* B5000 8011E900 00431021 */ addu $v0, $v0, $v1 -/* B5004 8011E904 8C500000 */ lw $s0, ($v0) -/* B5008 8011E908 1200004C */ beqz $s0, .L8011EA3C -/* B500C 8011E90C 00000000 */ nop -/* B5010 8011E910 8E040000 */ lw $a0, ($s0) -/* B5014 8011E914 10800049 */ beqz $a0, .L8011EA3C -/* B5018 8011E918 3C020004 */ lui $v0, 4 -/* B501C 8011E91C 00821024 */ and $v0, $a0, $v0 -/* B5020 8011E920 14400046 */ bnez $v0, .L8011EA3C -/* B5024 8011E924 0000182D */ daddu $v1, $zero, $zero -/* B5028 8011E928 C6000090 */ lwc1 $f0, 0x90($s0) -/* B502C 8011E92C C6020094 */ lwc1 $f2, 0x94($s0) -/* B5030 8011E930 2402FFBF */ addiu $v0, $zero, -0x41 -/* B5034 8011E934 46020001 */ sub.s $f0, $f0, $f2 -/* B5038 8011E938 44801000 */ mtc1 $zero, $f2 -/* B503C 8011E93C 00821024 */ and $v0, $a0, $v0 -/* B5040 8011E940 AE020000 */ sw $v0, ($s0) -/* B5044 8011E944 4602003E */ c.le.s $f0, $f2 -/* B5048 8011E948 00000000 */ nop -/* B504C 8011E94C 45000014 */ bc1f .L8011E9A0 -/* B5050 8011E950 E6000090 */ swc1 $f0, 0x90($s0) -/* B5054 8011E954 30428000 */ andi $v0, $v0, 0x8000 -/* B5058 8011E958 14400008 */ bnez $v0, .L8011E97C -/* B505C 8011E95C 0200202D */ daddu $a0, $s0, $zero -.L8011E960: -/* B5060 8011E960 0C047AFC */ jal step_model_animator -/* B5064 8011E964 0200202D */ daddu $a0, $s0, $zero -/* B5068 8011E968 0040182D */ daddu $v1, $v0, $zero -/* B506C 8011E96C 1C60FFFC */ bgtz $v1, .L8011E960 -/* B5070 8011E970 2402FFFF */ addiu $v0, $zero, -1 -/* B5074 8011E974 08047A69 */ j .L8011E9A4 -/* B5078 8011E978 00000000 */ nop -.L8011E97C: -/* B507C 8011E97C 3C013F80 */ lui $at, 0x3f80 -/* B5080 8011E980 44810000 */ mtc1 $at, $f0 -/* B5084 8011E984 0C04819E */ jal reload_mesh_animator_tree -/* B5088 8011E988 E6000090 */ swc1 $f0, 0x90($s0) -.L8011E98C: -/* B508C 8011E98C 0C0481BE */ jal step_mesh_animator -/* B5090 8011E990 0200202D */ daddu $a0, $s0, $zero -/* B5094 8011E994 0040182D */ daddu $v1, $v0, $zero -/* B5098 8011E998 1C60FFFC */ bgtz $v1, .L8011E98C -/* B509C 8011E99C 00000000 */ nop -.L8011E9A0: -/* B50A0 8011E9A0 2402FFFF */ addiu $v0, $zero, -1 -.L8011E9A4: -/* B50A4 8011E9A4 10620025 */ beq $v1, $v0, .L8011EA3C -/* B50A8 8011E9A8 0200202D */ daddu $a0, $s0, $zero -/* B50AC 8011E9AC 0C047C16 */ jal animator_update_model_transforms -/* B50B0 8011E9B0 0000282D */ daddu $a1, $zero, $zero -/* B50B4 8011E9B4 0000882D */ daddu $s1, $zero, $zero -/* B50B8 8011E9B8 2412FFFF */ addiu $s2, $zero, -1 -/* B50BC 8011E9BC 3C108015 */ lui $s0, %hi(D_801533C0) -/* B50C0 8011E9C0 261033C0 */ addiu $s0, $s0, %lo(D_801533C0) -.L8011E9C4: -/* B50C4 8011E9C4 8E020000 */ lw $v0, ($s0) -/* B50C8 8011E9C8 04420008 */ bltzl $v0, .L8011E9EC -/* B50CC 8011E9CC 26310001 */ addiu $s1, $s1, 1 -/* B50D0 8011E9D0 2442FFFF */ addiu $v0, $v0, -1 -/* B50D4 8011E9D4 14400004 */ bnez $v0, .L8011E9E8 -/* B50D8 8011E9D8 AE020000 */ sw $v0, ($s0) -/* B50DC 8011E9DC 8E040004 */ lw $a0, 4($s0) -/* B50E0 8011E9E0 0C00AB1E */ jal general_heap_free -/* B50E4 8011E9E4 AE120000 */ sw $s2, ($s0) -.L8011E9E8: -/* B50E8 8011E9E8 26310001 */ addiu $s1, $s1, 1 -.L8011E9EC: -/* B50EC 8011E9EC 2A220060 */ slti $v0, $s1, 0x60 -/* B50F0 8011E9F0 1440FFF4 */ bnez $v0, .L8011E9C4 -/* B50F4 8011E9F4 26100008 */ addiu $s0, $s0, 8 -/* B50F8 8011E9F8 0000882D */ daddu $s1, $zero, $zero -/* B50FC 8011E9FC 2412FFFF */ addiu $s2, $zero, -1 -/* B5100 8011EA00 3C108015 */ lui $s0, %hi(D_801536C0) -/* B5104 8011EA04 261036C0 */ addiu $s0, $s0, %lo(D_801536C0) -.L8011EA08: -/* B5108 8011EA08 8E020000 */ lw $v0, ($s0) -/* B510C 8011EA0C 04420008 */ bltzl $v0, .L8011EA30 -/* B5110 8011EA10 26310001 */ addiu $s1, $s1, 1 -/* B5114 8011EA14 2442FFFF */ addiu $v0, $v0, -1 -/* B5118 8011EA18 14400004 */ bnez $v0, .L8011EA2C -/* B511C 8011EA1C AE020000 */ sw $v0, ($s0) -/* B5120 8011EA20 8E040004 */ lw $a0, 4($s0) -/* B5124 8011EA24 0C00AB1E */ jal general_heap_free -/* B5128 8011EA28 AE120000 */ sw $s2, ($s0) -.L8011EA2C: -/* B512C 8011EA2C 26310001 */ addiu $s1, $s1, 1 -.L8011EA30: -/* B5130 8011EA30 2A220060 */ slti $v0, $s1, 0x60 -/* B5134 8011EA34 1440FFF4 */ bnez $v0, .L8011EA08 -/* B5138 8011EA38 26100008 */ addiu $s0, $s0, 8 -.L8011EA3C: -/* B513C 8011EA3C 8FBF001C */ lw $ra, 0x1c($sp) -/* B5140 8011EA40 8FB20018 */ lw $s2, 0x18($sp) -/* B5144 8011EA44 8FB10014 */ lw $s1, 0x14($sp) -/* B5148 8011EA48 8FB00010 */ lw $s0, 0x10($sp) -/* B514C 8011EA4C 03E00008 */ jr $ra -/* B5150 8011EA50 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/C50A0/func_80133A94.s b/ver/us/asm/nonmatchings/C50A0/func_80133A94.s deleted file mode 100644 index ccda179d93..0000000000 --- a/ver/us/asm/nonmatchings/C50A0/func_80133A94.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80133A94 -/* CA194 80133A94 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* CA198 80133A98 3C028015 */ lui $v0, %hi(D_801565A0) -/* CA19C 80133A9C 8C4265A0 */ lw $v0, %lo(D_801565A0)($v0) -/* CA1A0 80133AA0 00042080 */ sll $a0, $a0, 2 -/* CA1A4 80133AA4 AFBF0010 */ sw $ra, 0x10($sp) -/* CA1A8 80133AA8 00822021 */ addu $a0, $a0, $v0 -/* CA1AC 80133AAC 8C840000 */ lw $a0, ($a0) -/* CA1B0 80133AB0 3C03FFFB */ lui $v1, 0xfffb -/* CA1B4 80133AB4 8C820000 */ lw $v0, ($a0) -/* CA1B8 80133AB8 3463FFFF */ ori $v1, $v1, 0xffff -/* CA1BC 80133ABC A4850018 */ sh $a1, 0x18($a0) -/* CA1C0 80133AC0 00052940 */ sll $a1, $a1, 5 -/* CA1C4 80133AC4 34424000 */ ori $v0, $v0, 0x4000 -/* CA1C8 80133AC8 00431824 */ and $v1, $v0, $v1 -/* CA1CC 80133ACC AC830000 */ sw $v1, ($a0) -/* CA1D0 80133AD0 3C028008 */ lui $v0, %hi(gItemTable+0x18) -/* CA1D4 80133AD4 00451021 */ addu $v0, $v0, $a1 -/* CA1D8 80133AD8 944278F8 */ lhu $v0, %lo(gItemTable+0x18)($v0) -/* CA1DC 80133ADC 30421000 */ andi $v0, $v0, 0x1000 -/* CA1E0 80133AE0 10400005 */ beqz $v0, .L80133AF8 -/* CA1E4 80133AE4 3C020004 */ lui $v0, 4 -/* CA1E8 80133AE8 00621025 */ or $v0, $v1, $v0 -/* CA1EC 80133AEC 2403BFFF */ addiu $v1, $zero, -0x4001 -/* CA1F0 80133AF0 00431024 */ and $v0, $v0, $v1 -/* CA1F4 80133AF4 AC820000 */ sw $v0, ($a0) -.L80133AF8: -/* CA1F8 80133AF8 0C04C44A */ jal item_entity_load -/* CA1FC 80133AFC 00000000 */ nop -/* CA200 80133B00 8FBF0010 */ lw $ra, 0x10($sp) -/* CA204 80133B04 03E00008 */ jr $ra -/* CA208 80133B08 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/C50A0/item_entity_update.s b/ver/us/asm/nonmatchings/C50A0/item_entity_update.s index a5da4e6b2c..6958e09507 100644 --- a/ver/us/asm/nonmatchings/C50A0/item_entity_update.s +++ b/ver/us/asm/nonmatchings/C50A0/item_entity_update.s @@ -3,8 +3,8 @@ .section .rodata -glabel D_80150BC0 -.word 0x80131E38, 0x80131E44, 0x80131EC4, 0x80131E98, 0x80131EA4, 0x00000000 +glabel jtbl_80150BC0 +.word L80131E38, L80131E44, L80131EC4, L80131E98, L80131EA4, 0 .section .text @@ -22,8 +22,8 @@ glabel item_entity_update /* C84FC 80131DFC 304200FF */ andi $v0, $v0, 0xff /* C8500 80131E00 14400033 */ bnez $v0, .L80131ED0 /* C8504 80131E04 00000000 */ nop -/* C8508 80131E08 3C138015 */ lui $s3, %hi(D_80150BC0) -/* C850C 80131E0C 26730BC0 */ addiu $s3, $s3, %lo(D_80150BC0) +/* C8508 80131E08 3C138015 */ lui $s3, %hi(jtbl_80150BC0) +/* C850C 80131E0C 26730BC0 */ addiu $s3, $s3, %lo(jtbl_80150BC0) .L80131E10: /* C8510 80131E10 8E510024 */ lw $s1, 0x24($s2) /* C8514 80131E14 8E230000 */ lw $v1, ($s1) @@ -35,9 +35,11 @@ glabel item_entity_update /* C852C 80131E2C 8C420000 */ lw $v0, ($v0) /* C8530 80131E30 00400008 */ jr $v0 /* C8534 80131E34 00000000 */ nop +glabel L80131E38 /* C8538 80131E38 2402003C */ addiu $v0, $zero, 0x3c /* C853C 80131E3C 0804C7B4 */ j .L80131ED0 /* C8540 80131E40 A242002E */ sb $v0, 0x2e($s2) +glabel L80131E44 /* C8544 80131E44 92220003 */ lbu $v0, 3($s1) /* C8548 80131E48 A242002E */ sb $v0, 0x2e($s2) /* C854C 80131E4C 3C028007 */ lui $v0, %hi(gGameStatusPtr) @@ -61,9 +63,11 @@ glabel item_entity_update /* C858C 80131E8C A242002D */ sb $v0, 0x2d($s2) /* C8590 80131E90 0804C7B4 */ j .L80131ED0 /* C8594 80131E94 AE510024 */ sw $s1, 0x24($s2) +glabel L80131E98 /* C8598 80131E98 AE510028 */ sw $s1, 0x28($s2) /* C859C 80131E9C 0804C784 */ j .L80131E10 /* C85A0 80131EA0 AE510024 */ sw $s1, 0x24($s2) +glabel L80131EA4 /* C85A4 80131EA4 8E240000 */ lw $a0, ($s1) /* C85A8 80131EA8 26310004 */ addiu $s1, $s1, 4 /* C85AC 80131EAC 8E300000 */ lw $s0, ($s1) @@ -72,6 +76,7 @@ glabel item_entity_update /* C85B8 80131EB8 0050102A */ slt $v0, $v0, $s0 /* C85BC 80131EBC 5040FFD4 */ beql $v0, $zero, .L80131E10 /* C85C0 80131EC0 AE510024 */ sw $s1, 0x24($s2) +glabel L80131EC4 /* C85C4 80131EC4 8E420028 */ lw $v0, 0x28($s2) /* C85C8 80131EC8 0804C784 */ j .L80131E10 /* C85CC 80131ECC AE420024 */ sw $v0, 0x24($s2) diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A370.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A370.s deleted file mode 100644 index 8f1c768174..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A370.s +++ /dev/null @@ -1,7 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A370 -/* D0A70 8013A370 3C018015 */ lui $at, %hi(D_8014EE60) -/* D0A74 8013A374 03E00008 */ jr $ra -/* D0A78 8013A378 A424EE60 */ sh $a0, %lo(D_8014EE60)($at) diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A37C.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A37C.s deleted file mode 100644 index 5f9d7f34b4..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A37C.s +++ /dev/null @@ -1,93 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A37C -/* D0A7C 8013A37C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* D0A80 8013A380 AFB10014 */ sw $s1, 0x14($sp) -/* D0A84 8013A384 0000882D */ daddu $s1, $zero, $zero -/* D0A88 8013A388 AFB00010 */ sw $s0, 0x10($sp) -/* D0A8C 8013A38C 3C108015 */ lui $s0, %hi(D_80156948) -/* D0A90 8013A390 26106948 */ addiu $s0, $s0, %lo(D_80156948) -/* D0A94 8013A394 AFBF001C */ sw $ra, 0x1c($sp) -/* D0A98 8013A398 AFB20018 */ sw $s2, 0x18($sp) -.L8013A39C: -/* D0A9C 8013A39C 3C048035 */ lui $a0, %hi(gSpriteHeapPtr) -/* D0AA0 8013A3A0 2484F800 */ addiu $a0, $a0, %lo(gSpriteHeapPtr) -/* D0AA4 8013A3A4 3C058015 */ lui $a1, %hi(D_8014EE60) -/* D0AA8 8013A3A8 94A5EE60 */ lhu $a1, %lo(D_8014EE60)($a1) -/* D0AAC 8013A3AC 26310001 */ addiu $s1, $s1, 1 -/* D0AB0 8013A3B0 0C00A41B */ jal _heap_malloc -/* D0AB4 8013A3B4 00052900 */ sll $a1, $a1, 4 -/* D0AB8 8013A3B8 AE020000 */ sw $v0, ($s0) -/* D0ABC 8013A3BC 2A220002 */ slti $v0, $s1, 2 -/* D0AC0 8013A3C0 1440FFF6 */ bnez $v0, .L8013A39C -/* D0AC4 8013A3C4 26100004 */ addiu $s0, $s0, 4 -/* D0AC8 8013A3C8 3C048035 */ lui $a0, %hi(gSpriteHeapPtr) -/* D0ACC 8013A3CC 2484F800 */ addiu $a0, $a0, %lo(gSpriteHeapPtr) -/* D0AD0 8013A3D0 0C00A41B */ jal _heap_malloc -/* D0AD4 8013A3D4 24052B98 */ addiu $a1, $zero, 0x2b98 -/* D0AD8 8013A3D8 3C038015 */ lui $v1, %hi(D_80156954) -/* D0ADC 8013A3DC 24636954 */ addiu $v1, $v1, %lo(D_80156954) -/* D0AE0 8013A3E0 AC620000 */ sw $v0, ($v1) -/* D0AE4 8013A3E4 0000882D */ daddu $s1, $zero, $zero -/* D0AE8 8013A3E8 0060902D */ daddu $s2, $v1, $zero -/* D0AEC 8013A3EC 0220802D */ daddu $s0, $s1, $zero -.L8013A3F0: -/* D0AF0 8013A3F0 8E440000 */ lw $a0, ($s2) -/* D0AF4 8013A3F4 0C04EA7A */ jal func_8013A9E8 -/* D0AF8 8013A3F8 00902021 */ addu $a0, $a0, $s0 -/* D0AFC 8013A3FC 8E440000 */ lw $a0, ($s2) -/* D0B00 8013A400 26310001 */ addiu $s1, $s1, 1 -/* D0B04 8013A404 0C04EA72 */ jal func_8013A9C8 -/* D0B08 8013A408 00902021 */ addu $a0, $a0, $s0 -/* D0B0C 8013A40C 2A22005A */ slti $v0, $s1, 0x5a -/* D0B10 8013A410 1440FFF7 */ bnez $v0, .L8013A3F0 -/* D0B14 8013A414 2610007C */ addiu $s0, $s0, 0x7c -/* D0B18 8013A418 0000882D */ daddu $s1, $zero, $zero -/* D0B1C 8013A41C 3C078015 */ lui $a3, %hi(D_80156958) -/* D0B20 8013A420 24E76958 */ addiu $a3, $a3, %lo(D_80156958) -/* D0B24 8013A424 2406FFFF */ addiu $a2, $zero, -1 -/* D0B28 8013A428 3C058015 */ lui $a1, %hi(D_80156970) -/* D0B2C 8013A42C 24A56970 */ addiu $a1, $a1, %lo(D_80156970) -/* D0B30 8013A430 3C048015 */ lui $a0, %hi(D_80156968) -/* D0B34 8013A434 24846968 */ addiu $a0, $a0, %lo(D_80156968) -/* D0B38 8013A438 3C038015 */ lui $v1, %hi(D_80156960) -/* D0B3C 8013A43C 24636960 */ addiu $v1, $v1, %lo(D_80156960) -.L8013A440: -/* D0B40 8013A440 02271021 */ addu $v0, $s1, $a3 -/* D0B44 8013A444 A0460000 */ sb $a2, ($v0) -/* D0B48 8013A448 AC600000 */ sw $zero, ($v1) -/* D0B4C 8013A44C AC800000 */ sw $zero, ($a0) -/* D0B50 8013A450 24840004 */ addiu $a0, $a0, 4 -/* D0B54 8013A454 24630004 */ addiu $v1, $v1, 4 -/* D0B58 8013A458 26310001 */ addiu $s1, $s1, 1 -/* D0B5C 8013A45C 2A220002 */ slti $v0, $s1, 2 -/* D0B60 8013A460 1440FFF7 */ bnez $v0, .L8013A440 -/* D0B64 8013A464 A0A00000 */ sb $zero, ($a1) -/* D0B68 8013A468 0000882D */ daddu $s1, $zero, $zero -/* D0B6C 8013A46C 3C038015 */ lui $v1, %hi(D_80156F20) -/* D0B70 8013A470 24636F20 */ addiu $v1, $v1, %lo(D_80156F20) -.L8013A474: -/* D0B74 8013A474 AC600000 */ sw $zero, ($v1) -/* D0B78 8013A478 A0600004 */ sb $zero, 4($v1) -/* D0B7C 8013A47C A0600005 */ sb $zero, 5($v1) -/* D0B80 8013A480 26310001 */ addiu $s1, $s1, 1 -/* D0B84 8013A484 2A220008 */ slti $v0, $s1, 8 -/* D0B88 8013A488 1440FFFA */ bnez $v0, .L8013A474 -/* D0B8C 8013A48C 24630008 */ addiu $v1, $v1, 8 -/* D0B90 8013A490 3C028007 */ lui $v0, %hi(gCurrentDisplayContextIndex) -/* D0B94 8013A494 8C4241F4 */ lw $v0, %lo(gCurrentDisplayContextIndex)($v0) -/* D0B98 8013A498 8FBF001C */ lw $ra, 0x1c($sp) -/* D0B9C 8013A49C 8FB20018 */ lw $s2, 0x18($sp) -/* D0BA0 8013A4A0 8FB10014 */ lw $s1, 0x14($sp) -/* D0BA4 8013A4A4 8FB00010 */ lw $s0, 0x10($sp) -/* D0BA8 8013A4A8 00021080 */ sll $v0, $v0, 2 -/* D0BAC 8013A4AC 3C018015 */ lui $at, %hi(D_80156948) -/* D0BB0 8013A4B0 00220821 */ addu $at, $at, $v0 -/* D0BB4 8013A4B4 8C226948 */ lw $v0, %lo(D_80156948)($at) -/* D0BB8 8013A4B8 3C018015 */ lui $at, %hi(D_8014EE14) -/* D0BBC 8013A4BC A420EE14 */ sh $zero, %lo(D_8014EE14)($at) -/* D0BC0 8013A4C0 3C018015 */ lui $at, %hi(D_80156950) -/* D0BC4 8013A4C4 AC226950 */ sw $v0, %lo(D_80156950)($at) -/* D0BC8 8013A4C8 03E00008 */ jr $ra -/* D0BCC 8013A4CC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A4D0.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A4D0.s deleted file mode 100644 index 64482b54e8..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A4D0.s +++ /dev/null @@ -1,88 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A4D0 -/* D0BD0 8013A4D0 3C028007 */ lui $v0, %hi(gCurrentDisplayContextIndex) -/* D0BD4 8013A4D4 8C4241F4 */ lw $v0, %lo(gCurrentDisplayContextIndex)($v0) -/* D0BD8 8013A4D8 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* D0BDC 8013A4DC AFB00010 */ sw $s0, 0x10($sp) -/* D0BE0 8013A4E0 3C108015 */ lui $s0, %hi(D_80156954) -/* D0BE4 8013A4E4 26106954 */ addiu $s0, $s0, %lo(D_80156954) -/* D0BE8 8013A4E8 AFBF0024 */ sw $ra, 0x24($sp) -/* D0BEC 8013A4EC AFB40020 */ sw $s4, 0x20($sp) -/* D0BF0 8013A4F0 AFB3001C */ sw $s3, 0x1c($sp) -/* D0BF4 8013A4F4 AFB20018 */ sw $s2, 0x18($sp) -/* D0BF8 8013A4F8 AFB10014 */ sw $s1, 0x14($sp) -/* D0BFC 8013A4FC 8E040000 */ lw $a0, ($s0) -/* D0C00 8013A500 00021080 */ sll $v0, $v0, 2 -/* D0C04 8013A504 3C018015 */ lui $at, %hi(D_80156948) -/* D0C08 8013A508 00220821 */ addu $at, $at, $v0 -/* D0C0C 8013A50C 8C226948 */ lw $v0, %lo(D_80156948)($at) -/* D0C10 8013A510 3C018015 */ lui $at, %hi(D_8014EE14) -/* D0C14 8013A514 A420EE14 */ sh $zero, %lo(D_8014EE14)($at) -/* D0C18 8013A518 3C018015 */ lui $at, %hi(D_80156950) -/* D0C1C 8013A51C AC226950 */ sw $v0, %lo(D_80156950)($at) -/* D0C20 8013A520 0C04EA7A */ jal func_8013A9E8 -/* D0C24 8013A524 24110001 */ addiu $s1, $zero, 1 -/* D0C28 8013A528 8E030000 */ lw $v1, ($s0) -/* D0C2C 8013A52C 24120005 */ addiu $s2, $zero, 5 -/* D0C30 8013A530 8C620014 */ lw $v0, 0x14($v1) -/* D0C34 8013A534 2410007C */ addiu $s0, $zero, 0x7c -/* D0C38 8013A538 00511025 */ or $v0, $v0, $s1 -/* D0C3C 8013A53C AC620014 */ sw $v0, 0x14($v1) -.L8013A540: -/* D0C40 8013A540 3C028015 */ lui $v0, %hi(D_80156954) -/* D0C44 8013A544 8C426954 */ lw $v0, %lo(D_80156954)($v0) -/* D0C48 8013A548 02022021 */ addu $a0, $s0, $v0 -/* D0C4C 8013A54C 8C820014 */ lw $v0, 0x14($a0) -/* D0C50 8013A550 30420001 */ andi $v0, $v0, 1 -/* D0C54 8013A554 10400006 */ beqz $v0, .L8013A570 -/* D0C58 8013A558 26310001 */ addiu $s1, $s1, 1 -/* D0C5C 8013A55C 80820005 */ lb $v0, 5($a0) -/* D0C60 8013A560 10520003 */ beq $v0, $s2, .L8013A570 -/* D0C64 8013A564 00000000 */ nop -/* D0C68 8013A568 0C04EA4F */ jal func_8013A93C -/* D0C6C 8013A56C 00000000 */ nop -.L8013A570: -/* D0C70 8013A570 2A22005A */ slti $v0, $s1, 0x5a -/* D0C74 8013A574 1440FFF2 */ bnez $v0, .L8013A540 -/* D0C78 8013A578 2610007C */ addiu $s0, $s0, 0x7c -/* D0C7C 8013A57C 24110001 */ addiu $s1, $zero, 1 -/* D0C80 8013A580 3C128015 */ lui $s2, %hi(D_80156954) -/* D0C84 8013A584 26526954 */ addiu $s2, $s2, %lo(D_80156954) -/* D0C88 8013A588 2414000B */ addiu $s4, $zero, 0xb -/* D0C8C 8013A58C 2413000C */ addiu $s3, $zero, 0xc -/* D0C90 8013A590 2410007C */ addiu $s0, $zero, 0x7c -.L8013A594: -/* D0C94 8013A594 8E420000 */ lw $v0, ($s2) -/* D0C98 8013A598 02021821 */ addu $v1, $s0, $v0 -/* D0C9C 8013A59C 8C620014 */ lw $v0, 0x14($v1) -/* D0CA0 8013A5A0 30420001 */ andi $v0, $v0, 1 -/* D0CA4 8013A5A4 5040000F */ beql $v0, $zero, .L8013A5E4 -/* D0CA8 8013A5A8 26310001 */ addiu $s1, $s1, 1 -/* D0CAC 8013A5AC 8C64005C */ lw $a0, 0x5c($v1) -/* D0CB0 8013A5B0 5080000C */ beql $a0, $zero, .L8013A5E4 -/* D0CB4 8013A5B4 26310001 */ addiu $s1, $s1, 1 -/* D0CB8 8013A5B8 80620006 */ lb $v0, 6($v1) -/* D0CBC 8013A5BC 10540009 */ beq $v0, $s4, .L8013A5E4 -/* D0CC0 8013A5C0 26310001 */ addiu $s1, $s1, 1 -/* D0CC4 8013A5C4 10530007 */ beq $v0, $s3, .L8013A5E4 -/* D0CC8 8013A5C8 00000000 */ nop -/* D0CCC 8013A5CC 0C00AB1E */ jal general_heap_free -/* D0CD0 8013A5D0 00000000 */ nop -/* D0CD4 8013A5D4 8E420000 */ lw $v0, ($s2) -/* D0CD8 8013A5D8 02021021 */ addu $v0, $s0, $v0 -/* D0CDC 8013A5DC AC40005C */ sw $zero, 0x5c($v0) -/* D0CE0 8013A5E0 A4400060 */ sh $zero, 0x60($v0) -.L8013A5E4: -/* D0CE4 8013A5E4 2A22005A */ slti $v0, $s1, 0x5a -/* D0CE8 8013A5E8 1440FFEA */ bnez $v0, .L8013A594 -/* D0CEC 8013A5EC 2610007C */ addiu $s0, $s0, 0x7c -/* D0CF0 8013A5F0 8FBF0024 */ lw $ra, 0x24($sp) -/* D0CF4 8013A5F4 8FB40020 */ lw $s4, 0x20($sp) -/* D0CF8 8013A5F8 8FB3001C */ lw $s3, 0x1c($sp) -/* D0CFC 8013A5FC 8FB20018 */ lw $s2, 0x18($sp) -/* D0D00 8013A600 8FB10014 */ lw $s1, 0x14($sp) -/* D0D04 8013A604 8FB00010 */ lw $s0, 0x10($sp) -/* D0D08 8013A608 03E00008 */ jr $ra -/* D0D0C 8013A60C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A610.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A610.s deleted file mode 100644 index 3282e5c6ef..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A610.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A610 -/* D0D10 8013A610 0000302D */ daddu $a2, $zero, $zero -/* D0D14 8013A614 24070004 */ addiu $a3, $zero, 4 -/* D0D18 8013A618 3C038015 */ lui $v1, %hi(D_80156F20) -/* D0D1C 8013A61C 24636F20 */ addiu $v1, $v1, %lo(D_80156F20) -.L8013A620: -/* D0D20 8013A620 8C620000 */ lw $v0, ($v1) -/* D0D24 8013A624 14400005 */ bnez $v0, .L8013A63C -/* D0D28 8013A628 24C60001 */ addiu $a2, $a2, 1 -/* D0D2C 8013A62C AC640000 */ sw $a0, ($v1) -/* D0D30 8013A630 A0670004 */ sb $a3, 4($v1) -/* D0D34 8013A634 03E00008 */ jr $ra -/* D0D38 8013A638 A0650005 */ sb $a1, 5($v1) -.L8013A63C: -/* D0D3C 8013A63C 28C20008 */ slti $v0, $a2, 8 -/* D0D40 8013A640 1440FFF7 */ bnez $v0, .L8013A620 -/* D0D44 8013A644 24630008 */ addiu $v1, $v1, 8 -/* D0D48 8013A648 03E00008 */ jr $ra -/* D0D4C 8013A64C 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A650.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A650.s deleted file mode 100644 index d3674b7fca..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A650.s +++ /dev/null @@ -1,46 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A650 -/* D0D50 8013A650 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* D0D54 8013A654 AFB00010 */ sw $s0, 0x10($sp) -/* D0D58 8013A658 3C108015 */ lui $s0, %hi(D_80156F20) -/* D0D5C 8013A65C 26106F20 */ addiu $s0, $s0, %lo(D_80156F20) -/* D0D60 8013A660 AFB10014 */ sw $s1, 0x14($sp) -/* D0D64 8013A664 26110040 */ addiu $s1, $s0, 0x40 -/* D0D68 8013A668 AFBF0018 */ sw $ra, 0x18($sp) -.L8013A66C: -/* D0D6C 8013A66C 8E020000 */ lw $v0, ($s0) -/* D0D70 8013A670 50400015 */ beql $v0, $zero, .L8013A6C8 -/* D0D74 8013A674 26100008 */ addiu $s0, $s0, 8 -/* D0D78 8013A678 92020004 */ lbu $v0, 4($s0) -/* D0D7C 8013A67C 2442FFFF */ addiu $v0, $v0, -1 -/* D0D80 8013A680 A2020004 */ sb $v0, 4($s0) -/* D0D84 8013A684 304200FF */ andi $v0, $v0, 0xff -/* D0D88 8013A688 5440000F */ bnel $v0, $zero, .L8013A6C8 -/* D0D8C 8013A68C 26100008 */ addiu $s0, $s0, 8 -/* D0D90 8013A690 92020005 */ lbu $v0, 5($s0) -/* D0D94 8013A694 10400005 */ beqz $v0, .L8013A6AC -/* D0D98 8013A698 00000000 */ nop -/* D0D9C 8013A69C 0C00AB4B */ jal heap_free -/* D0DA0 8013A6A0 8E040000 */ lw $a0, ($s0) -/* D0DA4 8013A6A4 0804E9AF */ j .L8013A6BC -/* D0DA8 8013A6A8 AE000000 */ sw $zero, ($s0) -.L8013A6AC: -/* D0DAC 8013A6AC 8E040000 */ lw $a0, ($s0) -/* D0DB0 8013A6B0 0C00AB1E */ jal general_heap_free -/* D0DB4 8013A6B4 00000000 */ nop -/* D0DB8 8013A6B8 AE000000 */ sw $zero, ($s0) -.L8013A6BC: -/* D0DBC 8013A6BC A2000004 */ sb $zero, 4($s0) -/* D0DC0 8013A6C0 A2000005 */ sb $zero, 5($s0) -/* D0DC4 8013A6C4 26100008 */ addiu $s0, $s0, 8 -.L8013A6C8: -/* D0DC8 8013A6C8 0211102A */ slt $v0, $s0, $s1 -/* D0DCC 8013A6CC 1440FFE7 */ bnez $v0, .L8013A66C -/* D0DD0 8013A6D0 00000000 */ nop -/* D0DD4 8013A6D4 8FBF0018 */ lw $ra, 0x18($sp) -/* D0DD8 8013A6D8 8FB10014 */ lw $s1, 0x14($sp) -/* D0DDC 8013A6DC 8FB00010 */ lw $s0, 0x10($sp) -/* D0DE0 8013A6E0 03E00008 */ jr $ra -/* D0DE4 8013A6E4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A6E8.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A6E8.s deleted file mode 100644 index dc72395a5f..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A6E8.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A6E8 -/* D0DE8 8013A6E8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D0DEC 8013A6EC AFBF0010 */ sw $ra, 0x10($sp) -/* D0DF0 8013A6F0 0C04E994 */ jal func_8013A650 -/* D0DF4 8013A6F4 00000000 */ nop -/* D0DF8 8013A6F8 8FBF0010 */ lw $ra, 0x10($sp) -/* D0DFC 8013A6FC 03E00008 */ jr $ra -/* D0E00 8013A700 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A704.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A704.s deleted file mode 100644 index 56e944ac13..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A704.s +++ /dev/null @@ -1,98 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A704 -/* D0E04 8013A704 3C028015 */ lui $v0, %hi(D_80156954) -/* D0E08 8013A708 8C426954 */ lw $v0, %lo(D_80156954)($v0) -/* D0E0C 8013A70C 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* D0E10 8013A710 AFB60028 */ sw $s6, 0x28($sp) -/* D0E14 8013A714 0080B02D */ daddu $s6, $a0, $zero -/* D0E18 8013A718 AFB20018 */ sw $s2, 0x18($sp) -/* D0E1C 8013A71C 0000902D */ daddu $s2, $zero, $zero -/* D0E20 8013A720 AFB00010 */ sw $s0, 0x10($sp) -/* D0E24 8013A724 24100001 */ addiu $s0, $zero, 1 -/* D0E28 8013A728 AFBF002C */ sw $ra, 0x2c($sp) -/* D0E2C 8013A72C AFB50024 */ sw $s5, 0x24($sp) -/* D0E30 8013A730 AFB40020 */ sw $s4, 0x20($sp) -/* D0E34 8013A734 AFB3001C */ sw $s3, 0x1c($sp) -/* D0E38 8013A738 AFB10014 */ sw $s1, 0x14($sp) -/* D0E3C 8013A73C 2443007C */ addiu $v1, $v0, 0x7c -.L8013A740: -/* D0E40 8013A740 8C620014 */ lw $v0, 0x14($v1) -/* D0E44 8013A744 30420001 */ andi $v0, $v0, 1 -/* D0E48 8013A748 50400001 */ beql $v0, $zero, .L8013A750 -/* D0E4C 8013A74C 26520001 */ addiu $s2, $s2, 1 -.L8013A750: -/* D0E50 8013A750 26100001 */ addiu $s0, $s0, 1 -/* D0E54 8013A754 2A02005A */ slti $v0, $s0, 0x5a -/* D0E58 8013A758 1440FFF9 */ bnez $v0, .L8013A740 -/* D0E5C 8013A75C 2463007C */ addiu $v1, $v1, 0x7c -/* D0E60 8013A760 0256102A */ slt $v0, $s2, $s6 -/* D0E64 8013A764 10400006 */ beqz $v0, .L8013A780 -/* D0E68 8013A768 2402FFFF */ addiu $v0, $zero, -1 -/* D0E6C 8013A76C 0804EA0B */ j .L8013A82C -/* D0E70 8013A770 00000000 */ nop -.L8013A774: -/* D0E74 8013A774 2402FFFF */ addiu $v0, $zero, -1 -/* D0E78 8013A778 0804EA0A */ j .L8013A828 -/* D0E7C 8013A77C A4620010 */ sh $v0, 0x10($v1) -.L8013A780: -/* D0E80 8013A780 0000A82D */ daddu $s5, $zero, $zero -/* D0E84 8013A784 02A0982D */ daddu $s3, $s5, $zero -/* D0E88 8013A788 02A0902D */ daddu $s2, $s5, $zero -/* D0E8C 8013A78C 2404FFFF */ addiu $a0, $zero, -1 -/* D0E90 8013A790 24100001 */ addiu $s0, $zero, 1 -/* D0E94 8013A794 3C148015 */ lui $s4, %hi(D_80156954) -/* D0E98 8013A798 26946954 */ addiu $s4, $s4, %lo(D_80156954) -/* D0E9C 8013A79C 2411007C */ addiu $s1, $zero, 0x7c -.L8013A7A0: -/* D0EA0 8013A7A0 3C038015 */ lui $v1, %hi(D_80156954) -/* D0EA4 8013A7A4 8C636954 */ lw $v1, %lo(D_80156954)($v1) -/* D0EA8 8013A7A8 02231021 */ addu $v0, $s1, $v1 -/* D0EAC 8013A7AC 8C420014 */ lw $v0, 0x14($v0) -/* D0EB0 8013A7B0 30420001 */ andi $v0, $v0, 1 -/* D0EB4 8013A7B4 54400019 */ bnel $v0, $zero, .L8013A81C -/* D0EB8 8013A7B8 26100001 */ addiu $s0, $s0, 1 -/* D0EBC 8013A7BC 16600004 */ bnez $s3, .L8013A7D0 -/* D0EC0 8013A7C0 00041140 */ sll $v0, $a0, 5 -/* D0EC4 8013A7C4 0200A82D */ daddu $s5, $s0, $zero -/* D0EC8 8013A7C8 0804E9F8 */ j .L8013A7E0 -/* D0ECC 8013A7CC 24130001 */ addiu $s3, $zero, 1 -.L8013A7D0: -/* D0ED0 8013A7D0 00441023 */ subu $v0, $v0, $a0 -/* D0ED4 8013A7D4 00021080 */ sll $v0, $v0, 2 -/* D0ED8 8013A7D8 00431021 */ addu $v0, $v0, $v1 -/* D0EDC 8013A7DC A4500010 */ sh $s0, 0x10($v0) -.L8013A7E0: -/* D0EE0 8013A7E0 8E820000 */ lw $v0, ($s4) -/* D0EE4 8013A7E4 02221021 */ addu $v0, $s1, $v0 -/* D0EE8 8013A7E8 A0500000 */ sb $s0, ($v0) -/* D0EEC 8013A7EC 8E840000 */ lw $a0, ($s4) -/* D0EF0 8013A7F0 0C04EA7A */ jal func_8013A9E8 -/* D0EF4 8013A7F4 00912021 */ addu $a0, $a0, $s1 -/* D0EF8 8013A7F8 8E820000 */ lw $v0, ($s4) -/* D0EFC 8013A7FC 26520001 */ addiu $s2, $s2, 1 -/* D0F00 8013A800 02221821 */ addu $v1, $s1, $v0 -/* D0F04 8013A804 8C620014 */ lw $v0, 0x14($v1) -/* D0F08 8013A808 0200202D */ daddu $a0, $s0, $zero -/* D0F0C 8013A80C 34420001 */ ori $v0, $v0, 1 -/* D0F10 8013A810 1256FFD8 */ beq $s2, $s6, .L8013A774 -/* D0F14 8013A814 AC620014 */ sw $v0, 0x14($v1) -/* D0F18 8013A818 26100001 */ addiu $s0, $s0, 1 -.L8013A81C: -/* D0F1C 8013A81C 2A02005A */ slti $v0, $s0, 0x5a -/* D0F20 8013A820 1440FFDF */ bnez $v0, .L8013A7A0 -/* D0F24 8013A824 2631007C */ addiu $s1, $s1, 0x7c -.L8013A828: -/* D0F28 8013A828 02A0102D */ daddu $v0, $s5, $zero -.L8013A82C: -/* D0F2C 8013A82C 8FBF002C */ lw $ra, 0x2c($sp) -/* D0F30 8013A830 8FB60028 */ lw $s6, 0x28($sp) -/* D0F34 8013A834 8FB50024 */ lw $s5, 0x24($sp) -/* D0F38 8013A838 8FB40020 */ lw $s4, 0x20($sp) -/* D0F3C 8013A83C 8FB3001C */ lw $s3, 0x1c($sp) -/* D0F40 8013A840 8FB20018 */ lw $s2, 0x18($sp) -/* D0F44 8013A844 8FB10014 */ lw $s1, 0x14($sp) -/* D0F48 8013A848 8FB00010 */ lw $s0, 0x10($sp) -/* D0F4C 8013A84C 03E00008 */ jr $ra -/* D0F50 8013A850 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A888.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A888.s deleted file mode 100644 index 66d71b08e4..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A888.s +++ /dev/null @@ -1,28 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A888 -/* D0F88 8013A888 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* D0F8C 8013A88C 2C82005A */ sltiu $v0, $a0, 0x5a -/* D0F90 8013A890 AFBF0018 */ sw $ra, 0x18($sp) -/* D0F94 8013A894 AFB10014 */ sw $s1, 0x14($sp) -/* D0F98 8013A898 1040000C */ beqz $v0, .L8013A8CC -/* D0F9C 8013A89C AFB00010 */ sw $s0, 0x10($sp) -/* D0FA0 8013A8A0 2411FFFF */ addiu $s1, $zero, -1 -.L8013A8A4: -/* D0FA4 8013A8A4 00041140 */ sll $v0, $a0, 5 -/* D0FA8 8013A8A8 00441023 */ subu $v0, $v0, $a0 -/* D0FAC 8013A8AC 3C038015 */ lui $v1, %hi(D_80156954) -/* D0FB0 8013A8B0 8C636954 */ lw $v1, %lo(D_80156954)($v1) -/* D0FB4 8013A8B4 00021080 */ sll $v0, $v0, 2 -/* D0FB8 8013A8B8 00431021 */ addu $v0, $v0, $v1 -/* D0FBC 8013A8BC 0C04EA15 */ jal func_8013A854 -/* D0FC0 8013A8C0 84500010 */ lh $s0, 0x10($v0) -/* D0FC4 8013A8C4 1611FFF7 */ bne $s0, $s1, .L8013A8A4 -/* D0FC8 8013A8C8 0200202D */ daddu $a0, $s0, $zero -.L8013A8CC: -/* D0FCC 8013A8CC 8FBF0018 */ lw $ra, 0x18($sp) -/* D0FD0 8013A8D0 8FB10014 */ lw $s1, 0x14($sp) -/* D0FD4 8013A8D4 8FB00010 */ lw $s0, 0x10($sp) -/* D0FD8 8013A8D8 03E00008 */ jr $ra -/* D0FDC 8013A8DC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A8E0.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A8E0.s deleted file mode 100644 index d25e0b5b8b..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A8E0.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A8E0 -/* D0FE0 8013A8E0 2C82005A */ sltiu $v0, $a0, 0x5a -/* D0FE4 8013A8E4 14400003 */ bnez $v0, .L8013A8F4 -/* D0FE8 8013A8E8 2882005A */ slti $v0, $a0, 0x5a -/* D0FEC 8013A8EC 03E00008 */ jr $ra -/* D0FF0 8013A8F0 2402FFFF */ addiu $v0, $zero, -1 -.L8013A8F4: -/* D0FF4 8013A8F4 10400008 */ beqz $v0, .L8013A918 -/* D0FF8 8013A8F8 00041140 */ sll $v0, $a0, 5 -/* D0FFC 8013A8FC 00441023 */ subu $v0, $v0, $a0 -/* D1000 8013A900 3C038015 */ lui $v1, %hi(D_80156954) -/* D1004 8013A904 8C636954 */ lw $v1, %lo(D_80156954)($v1) -/* D1008 8013A908 00021080 */ sll $v0, $v0, 2 -/* D100C 8013A90C 00431021 */ addu $v0, $v0, $v1 -/* D1010 8013A910 03E00008 */ jr $ra -/* D1014 8013A914 84420010 */ lh $v0, 0x10($v0) -.L8013A918: -/* D1018 8013A918 03E00008 */ jr $ra -/* D101C 8013A91C 240200FF */ addiu $v0, $zero, 0xff diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A920.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A920.s deleted file mode 100644 index 92ace57cb9..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A920.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A920 -/* D1020 8013A920 00041940 */ sll $v1, $a0, 5 -/* D1024 8013A924 00641823 */ subu $v1, $v1, $a0 -/* D1028 8013A928 3C028015 */ lui $v0, %hi(D_80156954) -/* D102C 8013A92C 8C426954 */ lw $v0, %lo(D_80156954)($v0) -/* D1030 8013A930 00031880 */ sll $v1, $v1, 2 -/* D1034 8013A934 03E00008 */ jr $ra -/* D1038 8013A938 00431021 */ addu $v0, $v0, $v1 diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A93C.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A93C.s deleted file mode 100644 index 94cb2a0107..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A93C.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A93C -/* D103C 8013A93C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D1040 8013A940 AFB00010 */ sw $s0, 0x10($sp) -/* D1044 8013A944 0080802D */ daddu $s0, $a0, $zero -/* D1048 8013A948 AFBF0014 */ sw $ra, 0x14($sp) -/* D104C 8013A94C 8E020064 */ lw $v0, 0x64($s0) -/* D1050 8013A950 54400001 */ bnel $v0, $zero, .L8013A958 -/* D1054 8013A954 AE000064 */ sw $zero, 0x64($s0) -.L8013A958: -/* D1058 8013A958 8E040068 */ lw $a0, 0x68($s0) -/* D105C 8013A95C 10800004 */ beqz $a0, .L8013A970 -/* D1060 8013A960 00000000 */ nop -/* D1064 8013A964 0C04E984 */ jal func_8013A610 -/* D1068 8013A968 24050001 */ addiu $a1, $zero, 1 -/* D106C 8013A96C AE000068 */ sw $zero, 0x68($s0) -.L8013A970: -/* D1070 8013A970 8E04006C */ lw $a0, 0x6c($s0) -/* D1074 8013A974 10800004 */ beqz $a0, .L8013A988 -/* D1078 8013A978 00000000 */ nop -/* D107C 8013A97C 0C04E984 */ jal func_8013A610 -/* D1080 8013A980 24050001 */ addiu $a1, $zero, 1 -/* D1084 8013A984 AE00006C */ sw $zero, 0x6c($s0) -.L8013A988: -/* D1088 8013A988 8E040070 */ lw $a0, 0x70($s0) -/* D108C 8013A98C 10800004 */ beqz $a0, .L8013A9A0 -/* D1090 8013A990 00000000 */ nop -/* D1094 8013A994 0C04E984 */ jal func_8013A610 -/* D1098 8013A998 24050001 */ addiu $a1, $zero, 1 -/* D109C 8013A99C AE000070 */ sw $zero, 0x70($s0) -.L8013A9A0: -/* D10A0 8013A9A0 8E040074 */ lw $a0, 0x74($s0) -/* D10A4 8013A9A4 10800004 */ beqz $a0, .L8013A9B8 -/* D10A8 8013A9A8 00000000 */ nop -/* D10AC 8013A9AC 0C04E984 */ jal func_8013A610 -/* D10B0 8013A9B0 24050001 */ addiu $a1, $zero, 1 -/* D10B4 8013A9B4 AE000074 */ sw $zero, 0x74($s0) -.L8013A9B8: -/* D10B8 8013A9B8 8FBF0014 */ lw $ra, 0x14($sp) -/* D10BC 8013A9BC 8FB00010 */ lw $s0, 0x10($sp) -/* D10C0 8013A9C0 03E00008 */ jr $ra -/* D10C4 8013A9C4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A9C8.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A9C8.s deleted file mode 100644 index 6d46533319..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A9C8.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A9C8 -/* D10C8 8013A9C8 AC800064 */ sw $zero, 0x64($a0) -/* D10CC 8013A9CC AC800068 */ sw $zero, 0x68($a0) -/* D10D0 8013A9D0 AC80006C */ sw $zero, 0x6c($a0) -/* D10D4 8013A9D4 AC800070 */ sw $zero, 0x70($a0) -/* D10D8 8013A9D8 AC800074 */ sw $zero, 0x74($a0) -/* D10DC 8013A9DC AC80005C */ sw $zero, 0x5c($a0) -/* D10E0 8013A9E0 03E00008 */ jr $ra -/* D10E4 8013A9E4 A4800060 */ sh $zero, 0x60($a0) diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A9E8.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A9E8.s deleted file mode 100644 index e6b8dec6f0..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013A9E8.s +++ /dev/null @@ -1,53 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013A9E8 -/* D10E8 8013A9E8 0000302D */ daddu $a2, $zero, $zero -/* D10EC 8013A9EC 2402FFFF */ addiu $v0, $zero, -1 -/* D10F0 8013A9F0 A4820010 */ sh $v0, 0x10($a0) -/* D10F4 8013A9F4 240200FF */ addiu $v0, $zero, 0xff -/* D10F8 8013A9F8 A0800005 */ sb $zero, 5($a0) -/* D10FC 8013A9FC A0800006 */ sb $zero, 6($a0) -/* D1100 8013AA00 AC800014 */ sw $zero, 0x14($a0) -/* D1104 8013AA04 A0800001 */ sb $zero, 1($a0) -/* D1108 8013AA08 A0800002 */ sb $zero, 2($a0) -/* D110C 8013AA0C A4800008 */ sh $zero, 8($a0) -/* D1110 8013AA10 A480000A */ sh $zero, 0xa($a0) -/* D1114 8013AA14 A480000C */ sh $zero, 0xc($a0) -/* D1118 8013AA18 A480000E */ sh $zero, 0xe($a0) -/* D111C 8013AA1C AC820028 */ sw $v0, 0x28($a0) -/* D1120 8013AA20 AC820038 */ sw $v0, 0x38($a0) -/* D1124 8013AA24 A0800003 */ sb $zero, 3($a0) -/* D1128 8013AA28 A0800004 */ sb $zero, 4($a0) -/* D112C 8013AA2C A4800008 */ sh $zero, 8($a0) -/* D1130 8013AA30 A480000A */ sh $zero, 0xa($a0) -/* D1134 8013AA34 0000182D */ daddu $v1, $zero, $zero -.L8013AA38: -/* D1138 8013AA38 00062900 */ sll $a1, $a2, 4 -.L8013AA3C: -/* D113C 8013AA3C 00851021 */ addu $v0, $a0, $a1 -/* D1140 8013AA40 AC40001C */ sw $zero, 0x1c($v0) -/* D1144 8013AA44 24630001 */ addiu $v1, $v1, 1 -/* D1148 8013AA48 28620004 */ slti $v0, $v1, 4 -/* D114C 8013AA4C 1440FFFB */ bnez $v0, .L8013AA3C -/* D1150 8013AA50 24A50004 */ addiu $a1, $a1, 4 -/* D1154 8013AA54 24C60001 */ addiu $a2, $a2, 1 -/* D1158 8013AA58 28C20002 */ slti $v0, $a2, 2 -/* D115C 8013AA5C 1440FFF6 */ bnez $v0, .L8013AA38 -/* D1160 8013AA60 0000182D */ daddu $v1, $zero, $zero -/* D1164 8013AA64 0000302D */ daddu $a2, $zero, $zero -.L8013AA68: -/* D1168 8013AA68 00062900 */ sll $a1, $a2, 4 -.L8013AA6C: -/* D116C 8013AA6C 00851021 */ addu $v0, $a0, $a1 -/* D1170 8013AA70 AC40003C */ sw $zero, 0x3c($v0) -/* D1174 8013AA74 24630001 */ addiu $v1, $v1, 1 -/* D1178 8013AA78 28620004 */ slti $v0, $v1, 4 -/* D117C 8013AA7C 1440FFFB */ bnez $v0, .L8013AA6C -/* D1180 8013AA80 24A50004 */ addiu $a1, $a1, 4 -/* D1184 8013AA84 24C60001 */ addiu $a2, $a2, 1 -/* D1188 8013AA88 28C20002 */ slti $v0, $a2, 2 -/* D118C 8013AA8C 1440FFF6 */ bnez $v0, .L8013AA68 -/* D1190 8013AA90 0000182D */ daddu $v1, $zero, $zero -/* D1194 8013AA94 03E00008 */ jr $ra -/* D1198 8013AA98 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013AF20.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013AF20.s deleted file mode 100644 index 1de7d7fcc7..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013AF20.s +++ /dev/null @@ -1,26 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013AF20 -/* D1620 8013AF20 00041140 */ sll $v0, $a0, 5 -/* D1624 8013AF24 00441023 */ subu $v0, $v0, $a0 -/* D1628 8013AF28 3C038015 */ lui $v1, %hi(D_80156954) -/* D162C 8013AF2C 8C636954 */ lw $v1, %lo(D_80156954)($v1) -/* D1630 8013AF30 00021080 */ sll $v0, $v0, 2 -/* D1634 8013AF34 00432021 */ addu $a0, $v0, $v1 -/* D1638 8013AF38 8C830014 */ lw $v1, 0x14($a0) -/* D163C 8013AF3C 30620001 */ andi $v0, $v1, 1 -/* D1640 8013AF40 10400009 */ beqz $v0, .L8013AF68 -/* D1644 8013AF44 00000000 */ nop -/* D1648 8013AF48 10C00004 */ beqz $a2, .L8013AF5C -/* D164C 8013AF4C 30A2FFFF */ andi $v0, $a1, 0xffff -/* D1650 8013AF50 00621025 */ or $v0, $v1, $v0 -/* D1654 8013AF54 03E00008 */ jr $ra -/* D1658 8013AF58 AC820014 */ sw $v0, 0x14($a0) -.L8013AF5C: -/* D165C 8013AF5C 00021027 */ nor $v0, $zero, $v0 -/* D1660 8013AF60 00621024 */ and $v0, $v1, $v0 -/* D1664 8013AF64 AC820014 */ sw $v0, 0x14($a0) -.L8013AF68: -/* D1668 8013AF68 03E00008 */ jr $ra -/* D166C 8013AF6C 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013B0EC.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013B0EC.s deleted file mode 100644 index a3ff098aaa..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013B0EC.s +++ /dev/null @@ -1,69 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -glabel jtbl_80151038 -.word L8013B160_D1860, L8013B140_D1840, L8013B150_D1850, L8013B120_D1820, L8013B160_D1860, 0 - -.section .text - -glabel func_8013B0EC -/* D17EC 8013B0EC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D17F0 8013B0F0 AFB00010 */ sw $s0, 0x10($sp) -/* D17F4 8013B0F4 0080802D */ daddu $s0, $a0, $zero -/* D17F8 8013B0F8 AFBF0014 */ sw $ra, 0x14($sp) -/* D17FC 8013B0FC 92030001 */ lbu $v1, 1($s0) -/* D1800 8013B100 2C620005 */ sltiu $v0, $v1, 5 -/* D1804 8013B104 10400026 */ beqz $v0, .L8013B1A0 -/* D1808 8013B108 00031080 */ sll $v0, $v1, 2 -/* D180C 8013B10C 3C018015 */ lui $at, %hi(jtbl_80151038) -/* D1810 8013B110 00220821 */ addu $at, $at, $v0 -/* D1814 8013B114 8C221038 */ lw $v0, %lo(jtbl_80151038)($at) -/* D1818 8013B118 00400008 */ jr $v0 -/* D181C 8013B11C 00000000 */ nop -glabel L8013B120_D1820 -/* D1820 8013B120 8E020034 */ lw $v0, 0x34($s0) -/* D1824 8013B124 14400004 */ bnez $v0, .L8013B138 -/* D1828 8013B128 24020001 */ addiu $v0, $zero, 1 -/* D182C 8013B12C A2020003 */ sb $v0, 3($s0) -/* D1830 8013B130 0804EC4F */ j .L8013B13C -/* D1834 8013B134 24020010 */ addiu $v0, $zero, 0x10 -.L8013B138: -/* D1838 8013B138 A2020003 */ sb $v0, 3($s0) -.L8013B13C: -/* D183C 8013B13C A2020004 */ sb $v0, 4($s0) -glabel L8013B140_D1840 -/* D1840 8013B140 0C04F012 */ jal func_8013C048 -/* D1844 8013B144 0200202D */ daddu $a0, $s0, $zero -/* D1848 8013B148 0804EC5A */ j .L8013B168 -/* D184C 8013B14C 00000000 */ nop -glabel L8013B150_D1850 -/* D1850 8013B150 0C04F0FC */ jal func_8013C3F0 -/* D1854 8013B154 0200202D */ daddu $a0, $s0, $zero -/* D1858 8013B158 0804EC5A */ j .L8013B168 -/* D185C 8013B15C 00000000 */ nop -glabel L8013B160_D1860 -/* D1860 8013B160 0C04EF22 */ jal func_8013BC88 -/* D1864 8013B164 0200202D */ daddu $a0, $s0, $zero -.L8013B168: -/* D1868 8013B168 82030005 */ lb $v1, 5($s0) -/* D186C 8013B16C 24020004 */ addiu $v0, $zero, 4 -/* D1870 8013B170 14620003 */ bne $v1, $v0, .L8013B180 -/* D1874 8013B174 00000000 */ nop -/* D1878 8013B178 0C04FB9A */ jal func_8013EE68 -/* D187C 8013B17C 0200202D */ daddu $a0, $s0, $zero -.L8013B180: -/* D1880 8013B180 82030006 */ lb $v1, 6($s0) -/* D1884 8013B184 2862000D */ slti $v0, $v1, 0xd -/* D1888 8013B188 10400005 */ beqz $v0, .L8013B1A0 -/* D188C 8013B18C 2862000B */ slti $v0, $v1, 0xb -/* D1890 8013B190 14400003 */ bnez $v0, .L8013B1A0 -/* D1894 8013B194 00000000 */ nop -/* D1898 8013B198 0C04FC7E */ jal func_8013F1F8 -/* D189C 8013B19C 0200202D */ daddu $a0, $s0, $zero -.L8013B1A0: -/* D18A0 8013B1A0 8FBF0014 */ lw $ra, 0x14($sp) -/* D18A4 8013B1A4 8FB00010 */ lw $s0, 0x10($sp) -/* D18A8 8013B1A8 03E00008 */ jr $ra -/* D18AC 8013B1AC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013EE48.s b/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013EE48.s deleted file mode 100644 index 50425a7956..0000000000 --- a/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013EE48.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8013EE48 -/* D5548 8013EE48 3C014248 */ lui $at, 0x4248 -/* D554C 8013EE4C 44810000 */ mtc1 $at, $f0 -/* D5550 8013EE50 3C0141F0 */ lui $at, 0x41f0 -/* D5554 8013EE54 44811000 */ mtc1 $at, $f2 -/* D5558 8013EE58 AC80003C */ sw $zero, 0x3c($a0) -/* D555C 8013EE5C E4800040 */ swc1 $f0, 0x40($a0) -/* D5560 8013EE60 03E00008 */ jr $ra -/* D5564 8013EE64 E4820044 */ swc1 $f2, 0x44($a0) diff --git a/ver/us/asm/nonmatchings/evt/cam_api/GetAnimatedNodePosition.s b/ver/us/asm/nonmatchings/evt/model_api/GetAnimatedNodePosition.s similarity index 100% rename from ver/us/asm/nonmatchings/evt/cam_api/GetAnimatedNodePosition.s rename to ver/us/asm/nonmatchings/evt/model_api/GetAnimatedNodePosition.s diff --git a/ver/us/asm/nonmatchings/evt/cam_api/GetAnimatedNodeRotation.s b/ver/us/asm/nonmatchings/evt/model_api/GetAnimatedNodeRotation.s similarity index 100% rename from ver/us/asm/nonmatchings/evt/cam_api/GetAnimatedNodeRotation.s rename to ver/us/asm/nonmatchings/evt/model_api/GetAnimatedNodeRotation.s diff --git a/ver/us/asm/nonmatchings/evt/cam_api/GetAnimatedPositionByTreeIndex.s b/ver/us/asm/nonmatchings/evt/model_api/GetAnimatedPositionByTreeIndex.s similarity index 100% rename from ver/us/asm/nonmatchings/evt/cam_api/GetAnimatedPositionByTreeIndex.s rename to ver/us/asm/nonmatchings/evt/model_api/GetAnimatedPositionByTreeIndex.s diff --git a/ver/us/asm/nonmatchings/evt/cam_api/GetAnimatedRotationByTreeIndex.s b/ver/us/asm/nonmatchings/evt/model_api/GetAnimatedRotationByTreeIndex.s similarity index 100% rename from ver/us/asm/nonmatchings/evt/cam_api/GetAnimatedRotationByTreeIndex.s rename to ver/us/asm/nonmatchings/evt/model_api/GetAnimatedRotationByTreeIndex.s diff --git a/ver/us/asm/nonmatchings/evt/cam_api/SetAnimatedNodeFlags.s b/ver/us/asm/nonmatchings/evt/model_api/SetAnimatedNodeFlags.s similarity index 100% rename from ver/us/asm/nonmatchings/evt/cam_api/SetAnimatedNodeFlags.s rename to ver/us/asm/nonmatchings/evt/model_api/SetAnimatedNodeFlags.s diff --git a/ver/us/asm/nonmatchings/evt/cam_api/render_animated_models.s b/ver/us/asm/nonmatchings/evt/model_api/render_animated_models.s similarity index 100% rename from ver/us/asm/nonmatchings/evt/cam_api/render_animated_models.s rename to ver/us/asm/nonmatchings/evt/model_api/render_animated_models.s diff --git a/ver/us/asm/nonmatchings/evt/cam_api/reset_model_animators.s b/ver/us/asm/nonmatchings/evt/model_api/reset_model_animators.s similarity index 100% rename from ver/us/asm/nonmatchings/evt/cam_api/reset_model_animators.s rename to ver/us/asm/nonmatchings/evt/model_api/reset_model_animators.s diff --git a/ver/us/asm/nonmatchings/world/area_mac/mac_01/805DD0/func_802460E4_806964.s b/ver/us/asm/nonmatchings/world/area_mac/mac_01/805DD0/func_802460E4_806964.s index dc8f6fa46e..67a2a51d1a 100644 --- a/ver/us/asm/nonmatchings/world/area_mac/mac_01/805DD0/func_802460E4_806964.s +++ b/ver/us/asm/nonmatchings/world/area_mac/mac_01/805DD0/func_802460E4_806964.s @@ -144,7 +144,7 @@ glabel L802462C8_806B48 glabel L802462D8_806B58 /* 806B58 802462D8 0280202D */ daddu $a0, $s4, $zero /* 806B5C 802462DC 0260282D */ daddu $a1, $s3, $zero -/* 806B60 802462E0 0C0915AA */ jal mac_01_UnkFunc13_copy +/* 806B60 802462E0 0C0915AA */ jal dup_mac_01_UnkFunc13 /* 806B64 802462E4 02A0302D */ daddu $a2, $s5, $zero /* 806B68 802462E8 080918EE */ j L802463B8_806C38 /* 806B6C 802462EC 00000000 */ nop @@ -156,7 +156,7 @@ glabel L802462F0_806B70 glabel L80246300_806B80 /* 806B80 80246300 0280202D */ daddu $a0, $s4, $zero /* 806B84 80246304 0260282D */ daddu $a1, $s3, $zero -/* 806B88 80246308 0C091684 */ jal mac_01_UnkFunc14_copy +/* 806B88 80246308 0C091684 */ jal dup_mac_01_UnkFunc14 /* 806B8C 8024630C 02A0302D */ daddu $a2, $s5, $zero /* 806B90 80246310 080918EE */ j L802463B8_806C38 /* 806B94 80246314 00000000 */ nop @@ -187,7 +187,7 @@ glabel L80246358_806BD8 glabel L80246368_806BE8 /* 806BE8 80246368 0280202D */ daddu $a0, $s4, $zero /* 806BEC 8024636C 0260282D */ daddu $a1, $s3, $zero -/* 806BF0 80246370 0C0917A7 */ jal mac_01_UnkFunc15_copy +/* 806BF0 80246370 0C0917A7 */ jal dup_mac_01_UnkFunc15 /* 806BF4 80246374 02A0302D */ daddu $a2, $s5, $zero /* 806BF8 80246378 080918EE */ j L802463B8_806C38 /* 806BFC 8024637C 00000000 */ nop @@ -201,7 +201,7 @@ glabel L80246380_806C00 glabel L80246398_806C18 /* 806C18 80246398 0280202D */ daddu $a0, $s4, $zero /* 806C1C 8024639C 0260282D */ daddu $a1, $s3, $zero -/* 806C20 802463A0 0C091809 */ jal mac_01_UnkFunc16_copy +/* 806C20 802463A0 0C091809 */ jal dup_mac_01_UnkFunc16 /* 806C24 802463A4 02A0302D */ daddu $a2, $s5, $zero /* 806C28 802463A8 080918EE */ j L802463B8_806C38 /* 806C2C 802463AC 00000000 */ nop diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index b850f7126a..85d73a7c8a 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -735,6 +735,7 @@ segments: - [0xE92D0, c, evt] - [0xED510, c, map_api] - [0xEF070, c, cam_api] + - [0xF1470, c, model_api] - [0xF2470, c, npc_api] - [0xF4C60, c, msg_api] - [0xF5750, c, player_api] diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index ebd1fc4837..5fdb35e4fe 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -2121,7 +2121,7 @@ create_model_animator = 0x8011E4B8; // type:func rom:0xB4BB8 create_mesh_animator = 0x8011E5E0; // type:func rom:0xB4CE0 add_anim_node = 0x8011E718; // type:func rom:0xB4E18 update_model_animator = 0x8011E8BC; // type:func rom:0xB4FBC -func_8011EA54 = 0x8011EA54; // type:func rom:0xB5154 +update_model_animator_with_transform = 0x8011EA54; // type:func rom:0xB5154 step_model_animator = 0x8011EBF0; // type:func rom:0xB52F0 animator_update_model_transforms = 0x8011F058; // type:func rom:0xB5758 animator_node_update_model_transform = 0x8011F118; // type:func rom:0xB5818 @@ -18933,7 +18933,7 @@ gEntityHeapBase = 0x801512C4; // type:data D_801512C8 = 0x801512C8; // type:data gCurrentModels = 0x801512CC; // D_801512D0 = 0x801512D0; // type:data -D_801512D4 = 0x801512D4; // type:data +gAnimCount = 0x801512D4; // type:data gMsgBGScrollAmtX = 0x801512D8; // type:data D_801512DA = 0x801512DA; // type:data gCurrentTransformGroups = 0x801512E0; // type:data @@ -19016,29 +19016,27 @@ mdl_renderTaskLists = 0x801533A0; // type:data mdl_renderTaskMode = 0x801533AC; // type:data mdl_renderTaskCount = 0x801533B0; // type:data D_801533C0 = 0x801533C0; // type:data -D_801536B8 = 0x801536B8; // type:data D_801536C0 = 0x801536C0; // type:data -D_801539B8 = 0x801539B8; // type:data D_801539C0 = 0x801539C0; // type:data D_80153A00 = 0x80153A00; // type:data gCurrentAnimMeshListPtr = 0x80153A40; // -D_80153A44 = 0x80153A44; // type:data -D_80153A48 = 0x80153A48; // type:data +gAnimModelFogEnabled = 0x80153A44; // type:data +gAnimModelFogR = 0x80153A48; // type:data D_80153A4B = 0x80153A4B; // type:data -D_80153A4C = 0x80153A4C; // type:data +gAnimModelFogG = 0x80153A4C; // type:data D_80153A4F = 0x80153A4F; // type:data -D_80153A50 = 0x80153A50; // type:data +gAnimModelFogB = 0x80153A50; // type:data D_80153A53 = 0x80153A53; // type:data -D_80153A54 = 0x80153A54; // type:data +gAnimModelFogA = 0x80153A54; // type:data D_80153A57 = 0x80153A57; // type:data -D_80153A58 = 0x80153A58; // type:data -D_80153A5C = 0x80153A5C; // type:data +gAnimModelFogStart = 0x80153A58; // type:data +gAnimModelFogEnd = 0x80153A5C; // type:data D_80153A60 = 0x80153A60; // type:data -D_80153A68 = 0x80153A68; // type:data -D_80153AA8 = 0x80153AA8; // type:data -D_80153AE8 = 0x80153AE8; // type:data -D_80153B28 = 0x80153B28; // type:data -D_80153B68 = 0x80153B68; // type:data +gAnimRotMtx = 0x80153A68; // type:data +gAnimScaleMtx = 0x80153AA8; // type:data +gAnimTranslateMtx = 0x80153AE8; // type:data +gAnimRotScaleMtx = 0x80153B28; // type:data +gAnimTreeRoot = 0x80153B68; // type:data gWorldEntityModelList = 0x80153B70; // gBattleEntityModelList = 0x80153F70; // gCurrentEntityModelList = 0x80154370; // diff --git a/ver/us/undefined_syms.txt b/ver/us/undefined_syms.txt index 0af6fcba69..cdb00c9f6d 100644 --- a/ver/us/undefined_syms.txt +++ b/ver/us/undefined_syms.txt @@ -102,7 +102,7 @@ gEntityHeapBase = 0x801512C4; D_801512C8 = 0x801512C8; gCurrentModels = 0x801512CC; D_801512D0 = 0x801512D0; -D_801512D4 = 0x801512D4; +gAnimCount = 0x801512D4; gMsgBGScrollAmtX = 0x801512D8; D_801512DA = 0x801512DA; gCurrentTransformGroups = 0x801512E0; @@ -183,29 +183,27 @@ mdl_renderTaskLists = 0x801533A0; mdl_renderTaskMode = 0x801533AC; mdl_renderTaskCount = 0x801533B0; D_801533C0 = 0x801533C0; -D_801536B8 = 0x801536B8; D_801536C0 = 0x801536C0; -D_801539B8 = 0x801539B8; D_801539C0 = 0x801539C0; D_80153A00 = 0x80153A00; gCurrentAnimMeshListPtr = 0x80153A40; -D_80153A44 = 0x80153A44; -D_80153A48 = 0x80153A48; +gAnimModelFogEnabled = 0x80153A44; +gAnimModelFogR = 0x80153A48; D_80153A4B = 0x80153A4B; -D_80153A4C = 0x80153A4C; +gAnimModelFogG = 0x80153A4C; D_80153A4F = 0x80153A4F; -D_80153A50 = 0x80153A50; +gAnimModelFogB = 0x80153A50; D_80153A53 = 0x80153A53; -D_80153A54 = 0x80153A54; +gAnimModelFogA = 0x80153A54; D_80153A57 = 0x80153A57; -D_80153A58 = 0x80153A58; -D_80153A5C = 0x80153A5C; +gAnimModelFogStart = 0x80153A58; +gAnimModelFogEnd = 0x80153A5C; D_80153A60 = 0x80153A60; -D_80153A68 = 0x80153A68; -D_80153AA8 = 0x80153AA8; -D_80153AE8 = 0x80153AE8; -D_80153B28 = 0x80153B28; -D_80153B68 = 0x80153B68; +gAnimRotMtx = 0x80153A68; +gAnimScaleMtx = 0x80153AA8; +gAnimTranslateMtx = 0x80153AE8; +gAnimRotScaleMtx = 0x80153B28; +gAnimTreeRoot = 0x80153B68; gWorldEntityModelList = 0x80153B70; gBattleEntityModelList = 0x80153F70; gCurrentEntityModelList = 0x80154370;