From 3a578399fb0bbfaacd9a0d80647d9ee76e63c2f9 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 8 Feb 2022 13:33:05 -0500 Subject: [PATCH] calc_item_damage_enemy and some others (#641) * SFX funcs, configure fix * the actual rename (oops) * 3 sprite funcs * 2 funcz * calc_item_damage_enemy and cleanup, others * cleanup * Warnings * clean fx_api * match npc_raycast_general and name npc_collision.c * PR comment --- include/common_structs.h | 16 +- include/effects.h | 4 +- include/enums.h | 8 + include/functions.h | 30 +- include/variables.h | 2 +- install.sh | 13 +- src/17FEB0.c | 698 +++++----- src/18C790.c | 1111 +++++++++++++++- src/190B20.c | 23 +- src/1A5830.c | 12 +- src/80850_len_3060.c | 2 +- src/battle/area_arn/actor/hyper_cleft.c | 2 +- src/battle/area_arn/actor/hyper_paragoomba.c | 2 +- src/battle/area_arn/actor/hypergoomba.c | 2 +- src/battle/area_arn/actor/tubba_blubba.c | 2 +- src/battle/area_arn/actor/tubbas_heart.c | 2 +- src/battle/area_dgb/actor/clubba.c | 2 +- src/battle/area_dgb/actor/tubba_blubba.c | 2 +- src/battle/area_hos/actor/ember.c | 2 +- src/battle/area_hos/actor/goombario_tutor.c | 2 +- src/battle/area_hos/actor/magikoopa.c | 8 +- .../area_isk_part_1/actor/buzzy_beetle.c | 2 +- .../area_isk_part_1/actor/pokey_mummy.c | 2 +- .../area_isk_part_1/actor/stone_chomp.c | 2 +- src/battle/area_isk_part_1/actor/swooper.c | 2 +- .../area_isk_part_2/actor/chain_chomp.c | 2 +- src/battle/area_isk_part_2/actor/tutankoopa.c | 2 +- src/battle/area_iwa/actor/buzzar.c | 2 +- src/battle/area_iwa/actor/cleft.c | 2 +- src/battle/area_iwa/actor/monty_mole.c | 4 +- src/battle/area_iwa/actor/whacka.c | 2 +- src/battle/area_iwa/stage/iwa_01.c | 2 +- src/battle/area_iwa/stage/iwa_02.c | 2 +- src/battle/area_jan/actor/hurt_plant.c | 2 +- src/battle/area_jan/actor/jungle_fuzzy.c | 2 +- src/battle/area_jan/actor/m_bush.c | 2 +- src/battle/area_jan/actor/spear_guy.c | 2 +- src/battle/area_kgr/actor/fuzzipede.c | 2 +- .../area_kmr_part_2/actor/blue_goomba.c | 2 +- .../area_kmr_part_2/actor/blue_goomba2.c | 2 +- .../area_kmr_part_2/actor/goomba_king.c | 2 +- .../area_kmr_part_2/actor/goomnut_tree.c | 2 +- src/battle/area_kmr_part_2/actor/red_goomba.c | 2 +- .../area_kmr_part_2/actor/red_goomba2.c | 2 +- .../area_kmr_part_3/actor/egg_jr_troopa.c | 2 +- .../area_kmr_part_3/actor/final_jr_troopa.c | 2 +- src/battle/area_kmr_part_3/actor/jr_troopa.c | 2 +- .../area_kmr_part_3/actor/mage_jr_troopa.c | 2 +- .../area_kmr_part_3/actor/para_jr_troopa.c | 2 +- src/battle/area_kmr_part_3/actor/paragoomba.c | 2 +- .../area_kmr_part_3/actor/spiked_goomba.c | 2 +- .../actor/spiked_para_jr_troopa.c | 2 +- src/battle/area_kzn/actor/lava_bubble.c | 2 +- src/battle/area_kzn/actor/red_magikoopa.c | 4 +- src/battle/area_mac/actor/chan.c | 2 +- src/battle/area_mac/actor/lee.c | 18 +- src/battle/area_mac/actor/master1.c | 2 +- src/battle/area_mac/actor/master2.c | 2 +- src/battle/area_mac/actor/master3.c | 2 +- src/battle/area_mim/actor/bzzap.c | 2 +- src/battle/area_mim/actor/forest_fuzzy.c | 2 +- src/battle/area_mim/actor/piranha_plant.c | 2 +- src/battle/area_nok/actor/fuzzy.c | 2 +- src/battle/area_nok/actor/kent_c_koopa.c | 2 +- src/battle/area_omo/actor/anti_guy.c | 2 +- src/battle/area_omo/actor/blue_shy_guy.c | 2 +- src/battle/area_omo/actor/green_shy_guy.c | 2 +- src/battle/area_omo/actor/groove_guy.c | 2 +- src/battle/area_omo/actor/pink_shy_guy.c | 2 +- src/battle/area_omo/actor/pyro_guy.c | 2 +- src/battle/area_omo/actor/red_shy_guy.c | 2 +- src/battle/area_omo/actor/sky_guy.c | 2 +- src/battle/area_omo/actor/spy_guy.c | 2 +- src/battle/area_omo/actor/yellow_shy_guy.c | 2 +- src/battle/area_omo/stage/omo_04.c | 4 +- src/battle/area_sbk/actor/bandit.c | 4 +- src/battle/area_sbk/actor/pokey.c | 2 +- .../area_trd_part_1/actor/bill_blaster.c | 2 +- src/battle/area_trd_part_1/actor/bob_omb.c | 2 +- .../area_trd_part_1/actor/bullet_bill.c | 2 +- .../area_trd_part_2/actor/blue_ninja_koopa.c | 2 +- .../area_trd_part_2/actor/fake_bowser.c | 2 +- .../area_trd_part_2/actor/green_ninja_koopa.c | 2 +- .../area_trd_part_2/actor/red_ninja_koopa.c | 2 +- .../actor/yellow_ninja_koopa.c | 2 +- src/battle/area_trd_part_3/actor/eldstar.c | 2 +- src/battle/battle.h | 2 +- src/battle/common/actor/goomba.inc.c | 2 +- src/battle/common/actor/koopa_troopa.inc.c | 2 +- src/battle/common/actor/medi_guy.inc.c | 2 +- src/battle/common/actor/paragoomba.inc.c | 2 +- src/battle/common/actor/paratroopa.inc.c | 2 +- src/battle/common/actor/putrid_piranha.inc.c | 2 +- src/battle/common/actor/spike_top.inc.c | 2 +- src/battle/common/actor/spiked_goomba.inc.c | 2 +- src/battle/common/actor/white_magikoopa.inc.c | 4 +- src/battle/partner/bombette.c | 4 +- src/battle/partner/goombario.c | 2 +- src/battle/partner/goompa.c | 2 +- src/battle/partner/kooper.c | 4 +- src/de740_len_23f0.c | 53 +- src/e0b30_len_b80.c | 7 +- src/evt/fx_api.c | 18 +- src/hud_element.h | 1 + src/{759b0_len_61b0.c => npc_collision.c} | 11 +- src/world/script_api/7E0E80.c | 1 - tools/symz.txt | 2 - .../17FEB0/calc_item_damage_enemy.s | 1139 ----------------- .../18C790/btl_state_draw_celebration.s | 528 -------- .../18C790/btl_state_update_celebration.s | 4 +- .../asm/nonmatchings/18C790/func_8025DEC4.s | 100 -- .../asm/nonmatchings/18C790/func_80260948.s | 64 - .../nonmatchings/190B20/try_inflict_status.s | 106 -- .../759b0_len_61b0/npc_raycast_general.s | 97 -- .../clear_sprite_shading_data.s | 49 - .../de740_len_23f0/init_sprite_shading_data.s | 30 - .../sprite_shading_set_light_source.s | 33 - ver/us/splat.yaml | 18 +- ver/us/symbol_addrs.txt | 2 - ver/us/undefined_syms.txt | 2 - 120 files changed, 1726 insertions(+), 2672 deletions(-) rename src/{759b0_len_61b0.c => npc_collision.c} (97%) delete mode 100644 ver/us/asm/nonmatchings/17FEB0/calc_item_damage_enemy.s delete mode 100644 ver/us/asm/nonmatchings/18C790/btl_state_draw_celebration.s delete mode 100644 ver/us/asm/nonmatchings/18C790/func_8025DEC4.s delete mode 100644 ver/us/asm/nonmatchings/18C790/func_80260948.s delete mode 100644 ver/us/asm/nonmatchings/190B20/try_inflict_status.s delete mode 100644 ver/us/asm/nonmatchings/759b0_len_61b0/npc_raycast_general.s delete mode 100644 ver/us/asm/nonmatchings/de740_len_23f0/clear_sprite_shading_data.s delete mode 100644 ver/us/asm/nonmatchings/de740_len_23f0/init_sprite_shading_data.s delete mode 100644 ver/us/asm/nonmatchings/de740_len_23f0/sprite_shading_set_light_source.s diff --git a/include/common_structs.h b/include/common_structs.h index 3a7600b56c..081ff9c08e 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -218,10 +218,10 @@ typedef struct PlayerData { /* 0x001 */ s8 hammerLevel; /* 0x002 */ s8 curHP; /* 0x003 */ s8 curMaxHP; - /* 0x004 */ u8 hardMaxHP; + /* 0x004 */ s8 hardMaxHP; /* 0x005 */ s8 curFP; /* 0x006 */ s8 curMaxFP; - /* 0x007 */ u8 hardMaxFP; + /* 0x007 */ s8 hardMaxFP; /* 0x008 */ s8 maxBP; /* 0x009 */ s8 level; /* 0x00A */ s8 hasActionCommands; @@ -854,7 +854,7 @@ typedef struct BattleStatus { /* 0x000 */ s32 flags1; /* 0x004 */ s32 flags2; /* 0x008 */ s32 varTable[16]; - /* 0x048 */ u8 currentSubmenu; + /* 0x048 */ s8 currentSubmenu; /* 0x049 */ char unk_49[3]; /* 0x04C */ s8 unk_4C[16]; /* 0x05C */ s8 unk_5C[16]; @@ -862,8 +862,8 @@ typedef struct BattleStatus { /* 0x070 */ s16 menuDisableFlags; /* 1 = jump, 2 = hammer, 4 = items */ /* 0x072 */ char unk_72[2]; /* 0x074 */ s32 unk_74; - /* 0x078 */ u8 totalStarPoints; - /* 0x079 */ u8 pendingStarPoints; /* how many to add */ + /* 0x078 */ s8 totalStarPoints; + /* 0x079 */ s8 pendingStarPoints; /* how many to add */ /* 0x07A */ u8 incrementStarPointDelay; /* related to star points, set to 0x28 when they are dropped */ /* 0x07B */ u8 damageTaken; /* 0x07C */ s8 changePartnerAllowed; @@ -1866,7 +1866,7 @@ typedef struct Actor { /* 0x207 */ s8 extraCoinBonus; /* 0x208 */ s8 unk_208; /* 0x209 */ char unk_209[3]; - /* 0x20C */ struct s32* statusTable; + /* 0x20C */ s32* statusTable; /* 0x210 */ s8 debuff; /* 0x211 */ s8 debuffDuration; /* 0x212 */ s8 staticStatus; /* 0B = yes */ @@ -2350,7 +2350,7 @@ typedef struct SaveMetadata { typedef struct SpriteShadingLightSource { /* 0x00 */ s8 flags; - /* 0x01 */ s8 rgb[3]; + /* 0x01 */ Color_RGB8 rgb; /* 0x04 */ Vec3f pos; /* 0x10 */ f32 falloff; /* 0x14 */ s8 unk_14; @@ -2361,7 +2361,7 @@ typedef struct SpriteShadingProfile { /* 0x00 */ s16 flags; /* 0x02 */ char unk_02[0x2]; /* 0x04 */ SpriteShadingLightSource sources[7]; - /* 0xAC */ s8 ambientColor[3]; + /* 0xAC */ Color_RGB8 ambientColor; /* 0xAF */ s8 ambientPower; // ? } SpriteShadingProfile; // size = 0xB0 diff --git a/include/effects.h b/include/effects.h index 2ce686132c..5e0e29d0ee 100644 --- a/include/effects.h +++ b/include/effects.h @@ -659,7 +659,7 @@ EffectInstance* fx_lens_flare(s32, f32, f32, f32, s32); EffectInstance* fx_got_item_outline(s32, f32, f32, f32, f32, s32*); EffectInstance* fx_spiky_white_aura(s32, f32, f32, f32, s32); void fx_smoke_impact(s32, f32, f32, f32, f32, s32, f32, s32); -EffectInstance* fx_damage_indicator(s32, f32, f32, f32, f32, f32, s32, s32*); +EffectInstance* fx_damage_indicator(s32, f32, f32, f32, f32, f32, s32, EffectInstance**); EffectInstance* fx_purple_ring(s32, f32, f32, f32, f32, f32, f32, f32); EffectInstance* fx_flame(s32, f32, f32, f32, f32, EffectInstance**); EffectInstance* fx_stars_burst(s32, f32, f32, f32, f32, f32, s32); @@ -694,7 +694,7 @@ void fx_3D(s32, f32, f32, f32, f32, f32, f32, s32, s32*); EffectInstance* fx_blast(s32, f32, f32, f32, f32, s32); EffectInstance* fx_fire_flower(s32, f32, f32, f32, s32); EffectInstance* fx_recover(s32, f32, f32, f32, s32); -EffectInstance* fx_disable_x(s32, f32, f32, f32, s32); +struct HudElement* fx_disable_x(s32, f32, f32, f32, s32); EffectInstance* fx_bombette_breaking(s32, s32, s32, f32, s32, s32); EffectInstance* fx_firework(s32, f32, f32, f32, f32, s32); EffectInstance* fx_confetti(s32, f32, f32, f32, f32, s32); diff --git a/include/enums.h b/include/enums.h index c279bfd97c..b50d2bdd41 100644 --- a/include/enums.h +++ b/include/enums.h @@ -507,6 +507,7 @@ enum SoundIDs { SOUND_MENU_CHANGE_TAB = 0x000000C8, SOUND_MENU_NEXT = 0x000000C9, SOUND_MENU_BACK = 0x000000CA, + SOUND_D4 = 0x000000D4, SOUND_HIT_PLAYER_NORMAL = 0x000000E1, SOUND_HIT_PLAYER_FIRE = 0x000000E2, SOUND_HIT_PLAYER_ICE = 0x000000E3, @@ -542,6 +543,7 @@ enum SoundIDs { SOUND_METAL_GATE_CLOSE = 0x000001CA, SOUND_1CB = 0x000001CB, SOUND_1CC = 0x000001CC, + SOUND_215 = 0x00000215, SOUND_MENU_ERROR = 0x0000021D, SOUND_231 = 0x00000231, SOUND_246 = 0x00000246, @@ -597,6 +599,7 @@ enum SoundIDs { SOUND_MOLE_THROW = 0x000003E8, SOUND_3F3 = 0x000003F3, SOUND_THROW = 0x000003FA, + SOUND_749 = 0x00000749, SOUND_759 = 0x00000759, SOUND_2003 = 0x00002003, SOUND_200D = 0x0000200D, @@ -2366,6 +2369,7 @@ enum BattleStatusFlags1 { }; enum BattleStatusFlags2 { + BS_FLAGS2_1 = 0x00000001, BS_FLAGS2_2 = 0x00000002, BS_FLAGS2_4 = 0x00000004, BS_FLAGS2_8 = 0x00000008, @@ -2390,9 +2394,13 @@ enum BattleStates2 { BATTLE_STATES2_UNK_5 = 0x00000005, BATTLE_STATES2_UNK_6 = 0x00000006, BATTLE_STATES2_UNK_7 = 0x00000007, + BATTLE_STATES2_UNK_8 = 0x00000008, + BATTLE_STATES2_UNK_9 = 0x00000009, BATTLE_STATES2_PLAYER_DEFEATED = 0x0000000A, BATTLE_STATES2_UNK_B = 0x0000000B, BATTLE_STATES2_UNK_C = 0x0000000C, + BATTLE_STATES2_UNK_F = 0x0000000F, + BATTLE_STATES2_UNK_10 = 0x00000010, BATTLE_STATES2_UNK_14 = 0x00000014, BATTLE_STATES2_UNK_15 = 0x00000015, BATTLE_STATES2_UNK_16 = 0x00000016, diff --git a/include/functions.h b/include/functions.h index c960d35e0d..286689e5b0 100644 --- a/include/functions.h +++ b/include/functions.h @@ -104,6 +104,8 @@ void func_80257DA4(void*); void func_80254C50(Actor*); void func_80258E14(void*); +void func_80254610(Actor*); + f32 func_800E34D8(void); void func_800E4AD8(s32 arg0); f32 player_check_collision_below(f32, s32* colliderID); @@ -207,6 +209,7 @@ Trigger* get_trigger_by_id(s32 triggerID); Actor* get_actor(s32 actorID); ActorPart* get_actor_part(Actor* actor, s32 partIndex); s32 add_coins(s32 amt); +s32 is_partner_ability_active(s32); s32 phys_can_player_interact(void); @@ -329,12 +332,13 @@ void btl_state_update_22(void); void btl_state_draw_22(void); void btl_state_update_celebration(void); -void btl_draw_upgrade_windows(void); +void btl_draw_upgrade_windows(s32); void btl_state_draw_celebration(void); void func_8024F7C8(void); void func_80266978(void); void func_80266B14(void); +s32 func_8024E584(void); void func_8024EE48(void); void func_8024EEA8(void); void func_80255FD8(void); @@ -512,6 +516,8 @@ void func_80138D88(s32, s32, s32, s32, f32); void func_8013A4D0(void); void btl_cam_set_target_pos(f32, f32, f32); +void btl_cam_unfreeze(void); + void deduct_current_move_fp(void); void load_partner_actor(void); void dispatch_event_partner(s32); @@ -643,9 +649,11 @@ void sfx_play_sound_with_params(s32 arg0, u8 arg1, u8 arg2, s16 arg3); s32 func_8004A784(Npc* npc, f32 arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5); void base_UnkNpcAIFunc1(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); void UnkNpcAIFunc1(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); -void func_80266AF8(Actor*); + +s32 func_80263230(Actor*, Actor*); void func_80266EA8(ActorPart*, s32); void func_80266E40(Actor*); +void func_80267018(Actor* actor, s32 arg1); void remove_player_buffs(s32); s32 is_actor_hp_bar_visible(Actor*); @@ -710,15 +718,22 @@ void btl_cam_target_actor(s32); void btl_cam_set_zoom(s16); void btl_cam_move(s16); void func_8024E60C(void); + void dispatch_event_actor(Actor*, s32); +s32 dispatch_damage_event_actor_1(Actor* actor, s32 damageAmount, s32 event); + void btl_show_variable_battle_message(s32, s32, s32); s32 btl_is_popup_displayed(void); void func_8024E3D8(s32); s32 inflict_status(Actor*, s32, s32); s32 try_inflict_status(Actor*, s32, s32); +s32 inflict_status_set_duration(Actor* actor, s32 statusTypeKey, s32 statusDurationKey, s32 duration); void mdl_set_all_fog_mode(s32); void load_model_animator_tree(s32, StaticAnimatorNode**); +s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration); +s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags); + void func_8024EDC0(void); void update_effects(void); @@ -754,9 +769,14 @@ void func_8024EFE0(f32 x, f32 y, f32 z, s32, s32, s32); void func_802664DC(f32 x, f32 y, f32 z, s32 attack, s32 a); s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion); s32 calc_partner_test_enemy(void); +void disable_actor_blur(Actor*); void reset_actor_blur(Actor*); +void enable_actor_blur(Actor*); +void func_80251474(Actor*); s32 func_8025C8A0(s32, ActorPart*); void func_8025CD28(s32, ActorPart*); +void func_8025CEC8(ActorPart*); +void _remove_part_decoration(ActorPart* part, s32 decorationIndex); void func_8025D158(ActorPart*, s32); void func_8025D290(ActorPart*, s32); void func_8025D3C4(ActorPart*, s32); @@ -799,8 +819,13 @@ void update_encounters_conversation(void); void update_encounters_post_battle(void); void reset_background_settings(void); void func_80138188(void); +void func_80266970(Actor*); +void func_80266ADC(Actor*); +void func_80266AF8(Actor*); +void func_80266E14(ActorPart*); void func_80268770(s32, s32, s32); void func_80268C9C(void); +s32 check_block_input(s32 buttonMask); void func_802B6CF0_E2B3A0(void); void func_80269160(void); void func_800E24F8(void); @@ -820,6 +845,7 @@ void draw_encounters_neutral(void); void show_first_strike_message(void); void entity_upgrade_block_hide_content(s32); s32 lookup_defense(s32*, s32); +s32 lookup_status_chance(s32*, s32); void peach_check_for_parasol_input(void); void peach_sync_disguise_npc(void); s32 check_conversation_trigger(void); diff --git a/include/variables.h b/include/variables.h index 363006bd49..93e6862caf 100644 --- a/include/variables.h +++ b/include/variables.h @@ -150,9 +150,9 @@ extern s32 D_800A0964; extern s8 D_800A0B94; extern s16 D_800A0BB8; +extern SpriteShadingProfile* D_801512B0; extern SpriteShadingProfile* D_80151328; - extern Window gWindows[64]; extern s32 D_802A3838; diff --git a/install.sh b/install.sh index 25011ccf9e..d884aa102e 100755 --- a/install.sh +++ b/install.sh @@ -38,9 +38,6 @@ if [[ "$uname" == "Darwin" ]]; then echo "Installing extra" python3 -m pip install -U -r requirements_extra.txt || exit 1 fi - - echo "Done" - exit fi # Debian and derivatives (apt) @@ -59,8 +56,6 @@ if cat /etc/os-release | grep -E 'ID=debian|ID_LIKE=(.*)debian' &> /dev/null; th ${SUDO} apt install -y clang-tidy astyle doxygen || exit 1 python3 -m pip install -U -r requirements_extra.txt || exit 1 fi - - echo "Done" fi # Arch Linux and derivatives (pacman) @@ -101,8 +96,6 @@ if cat /etc/os-release | grep -E 'ID=arch|ID_LIKE=arch' &> /dev/null; then ${SUDO} pacman -S --noconfirm --needed clang astyle doxygen || exit 1 python3 -m pip install -U -r requirements_extra.txt || exit 1 fi - - echo "Done" fi # openSUSE (zypper) @@ -137,8 +130,6 @@ if cat /etc/os-release | grep ID=opensuse &> /dev/null; then ${SUDO} zypper -n install clang astyle doxygen || exit 1 python3 -m pip install -U -r requirements_extra.txt || exit 1 fi - - echo "Done" fi # Alpine Linux (apk) @@ -194,12 +185,10 @@ if cat /etc/os-release | grep ID=alpine &> /dev/null; then ${SUDO} apk add --no-cache clang-extra-tools astyle doxygen || exit 1 python3 -m pip install -U -r requirements_extra.txt || exit 1 fi - - echo "Done" fi -if [ "$supported" = false ]; then +if [ "$supported" != true ]; then echo "The following distros (and their derivatives) are supported by install.sh:" echo "- Debian/Ubuntu (apt)" echo "- Arch Linux (pacman)" diff --git a/src/17FEB0.c b/src/17FEB0.c index 9380ed8dee..054a80172f 100644 --- a/src/17FEB0.c +++ b/src/17FEB0.c @@ -5,7 +5,7 @@ s32 calc_item_check_hit(void) { BattleStatus* battleStatus = &gBattleStatus; - ActorMovement* walk = &battleStatus->playerActor->state; + ActorState* state = &battleStatus->playerActor->state; s32 actorID = battleStatus->currentTargetID; s8 currentTargetPartS8; u32 currentTargetPart; @@ -26,11 +26,11 @@ s32 calc_item_check_hit(void) { return HIT_RESULT_MISS; } if (actor->stoneStatus == 0xC) { - sfx_play_sound_at_position(0x10C, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); + sfx_play_sound_at_position(0x10C, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); return HIT_RESULT_IMMUNE; } if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP) && (actorPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)) { - sfx_play_sound_at_position(0xE9, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); + sfx_play_sound_at_position(0xE9, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); return HIT_RESULT_LANDED_ON_SPIKE; } } else { @@ -40,146 +40,158 @@ s32 calc_item_check_hit(void) { return HIT_RESULT_HIT; } -// Almost matching besides the parts that are marked as "TODO" -#ifdef NON_MATCHING s32 calc_item_damage_enemy(void) { BattleStatus* battleStatus = &gBattleStatus; - Actor* playerActor = battleStatus->playerActor; + Actor* player = battleStatus->playerActor; s32 currentTargetID = battleStatus->currentTargetID; - Actor* partnerActor = battleStatus->partnerActor; + Actor* partner = battleStatus->partnerActor; s32 currentTargetPartID = battleStatus->currentTargetPart; - Actor* targetActor; - ActorPart* targetActorPart; - ActorState* actorState; - Evt* attackScript; - s32 sp1C = 0; - s32 isFireDamage = 0; - s32 isElectricDamage = 0; - s32 isIceDamage = 0; - s8 wasStatusInflicted = FALSE; - s32 currentHP; - s32 baseStatusChance; + s32 sp18; + s32 sp1C = FALSE; + s32 actorClass; + s32 isFireDamage = FALSE; + s32 isElectricDamage = FALSE; + s32 isIceDamage = FALSE; + Actor* target; + ActorPart* targetPart; + Evt* script; s32 attackDamage; - s32 targetActorDefense; + s32 temp; + s32 targetDefense; + ActorState* state; s32 dispatchEvent; - u32 sp18; - s32 phi_a0_2; - s32 phi_fp; - + s32 wasStatusInflicted; + s32 ret; + battleStatus->wasStatusInflicted = FALSE; battleStatus->lastAttackDamage = 0; - battleStatus->attackerActorID = playerActor->actorID; + battleStatus->attackerActorID = player->actorID; battleStatus->currentTargetID2 = battleStatus->currentTargetID; battleStatus->currentTargetPart2 = battleStatus->currentTargetPart; - - targetActor = get_actor(currentTargetID); - if (targetActor == NULL) { + target = get_actor(currentTargetID); + wasStatusInflicted = FALSE; + + if (target == NULL) { return 0; } - targetActorPart = get_actor_part(targetActor, currentTargetPartID); - currentTargetID &= ACTOR_CLASS_MASK; - if (targetActorPart == NULL) { + targetPart = get_actor_part(target, currentTargetPartID); + if (targetPart == NULL) { PANIC(); - } - - targetActor->lastDamageTaken = 0; - if (gBattleStatus.flags1 & BS_FLAGS1_80000) { - actorState = &playerActor->state; - } else { - actorState = &partnerActor->state; } - phi_a0_2 = 0; + + + target->lastDamageTaken = 0; + actorClass = currentTargetID & ACTOR_CLASS_MASK; + if (!(gBattleStatus.flags1 & BS_FLAGS1_80000)) { + state = &player->state; + } else { + state = &partner->state; + } + if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) { - fx_ring_blast(0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z + 5.0f, 1.0f, 0x18); + fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 0x18); isFireDamage = TRUE; } if (battleStatus->currentAttackElement & DAMAGE_TYPE_ELECTRIC) { - func_80251474(targetActor); + func_80251474(target); isElectricDamage = TRUE; } if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) { - fx_water_splash(0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z + 5.0f, 1.0f, 0x18); + fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 0x18); } if (battleStatus->currentAttackElement & DAMAGE_TYPE_ICE) { - fx_big_snowflakes(0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z + 5.0f); + fx_big_snowflakes(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f); isIceDamage = TRUE; } - if ((battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) == 0) { - if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) { - return 6; - } - if (targetActor->transStatus == STATUS_E || targetActorPart->eventFlags & ACTOR_EVENT_FLAG_800 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)) { + + if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS)) { + if ((targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) || + ((target->transStatus == STATUS_E) || ((targetPart->eventFlags & ACTOR_EVENT_FLAG_800) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)))) + { return 6; } } - if (targetActor->stoneStatus == STATUS_STONE) { - sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); - func_8024EFE0(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, 0, 1, 1); - show_damage_popup(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, 0, 0); - + + if (target->stoneStatus == STATUS_STONE) { + sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); + func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1); + show_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0); + if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) { return 1; } else { return 0; } } - sp18 = (targetActorPart->partFlags3 & battleStatus->currentAttackElement) != 0; // TODO 3a8 - if (targetActorPart->eventFlags & (ACTOR_EVENT_FLAG_ENCHANTED | ACTOR_EVENT_FLAG_80000)) { + + if (targetPart->partFlags3 & battleStatus->currentAttackElement) { + sp18 = TRUE; + } else { + sp18 = FALSE; + } + + if (targetPart->eventFlags & (ACTOR_EVENT_FLAG_ENCHANTED | ACTOR_EVENT_FLAG_80000)) { battleStatus->currentAttackElement &= ~DAMAGE_TYPE_IGNORE_DEFENSE; } - targetActorDefense = get_defense(targetActor, targetActorPart->defenseTable, battleStatus->currentAttackElement); + + temp = get_defense(target, targetPart->defenseTable, battleStatus->currentAttackElement); if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_IGNORE_DEFENSE)) { - targetActorDefense += targetActor->defenseBoost; + temp += target->defenseBoost; } + attackDamage = battleStatus->currentAttackDamage; if (attackDamage > 99) { attackDamage = 99; } if (attackDamage <= 0) { - targetActorDefense = 0; + temp = 0; } - attackDamage -= targetActorDefense; - targetActor->hpChangeCounter = 0; - if (attackDamage <= 0) { // TODO 434 - targetActor->hpChangeCounter = 0; - + + attackDamage -= temp; + target->hpChangeCounter = 0; + + if (attackDamage <= 0) { + target->hpChangeCounter = 0; + ret = 2; if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) { - phi_fp = 2; dispatchEvent = EVENT_UNKNOWN_TRIGGER; - sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); - } else { + sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); battleStatus->lastAttackDamage = 0; + } else { dispatchEvent = EVENT_UNKNOWN_TRIGGER; + battleStatus->lastAttackDamage = 0; } } else { - targetActor->damageCounter += attackDamage; - targetActor->hpChangeCounter -= attackDamage; + target->damageCounter += attackDamage; + target->hpChangeCounter -= attackDamage; battleStatus->lastAttackDamage = 0; dispatchEvent = EVENT_HIT_COMBO; - phi_fp = 0; - if (!(targetActorPart->flags & ACTOR_PART_FLAG_2000) && sp18 == 0 && !(targetActorPart->targetFlags & ACTOR_PART_FLAG_4)) { - targetActor->currentHP -= attackDamage; - if (targetActor->currentHP <= 0) { - targetActor->currentHP = 0; + ret = 0; + if (!(targetPart->flags & ACTOR_PART_FLAG_2000) && !sp18 && !(targetPart->targetFlags & ACTOR_PART_FLAG_4)) { + target->currentHP -= attackDamage; + if (target->currentHP <= 0) { + target->currentHP = 0; dispatchEvent = EVENT_DEATH; } } battleStatus->lastAttackDamage += attackDamage; - targetActor->lastDamageTaken = battleStatus->lastAttackDamage; - targetActor->hpChangeCounter = 0; + target->lastDamageTaken = battleStatus->lastAttackDamage; + target->hpChangeCounter = 0; } - if (targetActorPart->flags & ACTOR_PART_FLAG_2000) { - dispatch_event_actor(targetActor, dispatchEvent); - func_8024EFE0(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, 0, 1, 3); - sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); + + if (targetPart->flags & ACTOR_PART_FLAG_2000) { + dispatch_event_actor(target, dispatchEvent); + func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3); + sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); return 2; } if (battleStatus->currentAttackElement & DAMAGE_TYPE_2000) { battleStatus->lastAttackDamage = 0; dispatchEvent = EVENT_DEATH; - phi_fp = 0; + ret = 0; } + if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { if (dispatchEvent == EVENT_HIT_COMBO) { dispatchEvent = EVENT_HIT; @@ -187,302 +199,330 @@ s32 calc_item_damage_enemy(void) { if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) { dispatchEvent = EVENT_IMMUNE; } - - if (targetActor->currentHP <= 0) { - if (dispatchEvent == EVENT_IMMUNE) { - dispatchEvent = EVENT_DEATH; - } + if (target->currentHP <= 0 && dispatchEvent == EVENT_IMMUNE) { + dispatchEvent = EVENT_DEATH; } } else if (dispatchEvent == EVENT_DEATH) { dispatchEvent = EVENT_HIT_COMBO; } + if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { - if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS)) { - goto block_80; + if (battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) { + dispatchEvent = EVENT_IMMUNE; + if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) { + dispatchEvent = EVENT_STAR_BEAM; + wasStatusInflicted = TRUE; + } + if (targetPart->eventFlags & ACTOR_EVENT_FLAG_400000) { + dispatchEvent = EVENT_STAR_BEAM; + wasStatusInflicted = TRUE; + } + if (targetPart->eventFlags & ACTOR_EVENT_FLAG_80000) { + dispatchEvent = EVENT_1D; + } + ret = 0; } - dispatchEvent = EVENT_IMMUNE; - if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) { - dispatchEvent = EVENT_STAR_BEAM; - wasStatusInflicted = TRUE; - } - if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_400000) { - dispatchEvent = EVENT_STAR_BEAM; - wasStatusInflicted = TRUE; - } - if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_80000) { - dispatchEvent = EVENT_1D; - } - phi_fp = 0; } - if (battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS - && gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE - && targetActor->attackBoost <= 0 - && targetActor->defenseBoost <= 0 - && targetActor->staticStatus == STATUS_END - && targetActor->transStatus == STATUS_END) { - targetActor->attackBoost = 0; - targetActor->defenseBoost = 0; - targetActor->isGlowing = FALSE; - dispatchEvent = EVENT_HIT; // TODO 660 - if (targetActor->staticStatus != STATUS_END) { - targetActor->staticStatus = STATUS_END; - targetActor->staticDuration = 0; - remove_status_static(targetActor->hudElementDataIndex); + + if (battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) { + if (gBattleStatus.flags1 & 0x20) { + if ((target->attackBoost > 0 || target->defenseBoost > 0) || + ((target->staticStatus == 0 && target->transStatus != 0) || target->staticStatus != 0)) + { + target->attackBoost = 0; + target->defenseBoost = 0; + target->isGlowing = FALSE; + dispatchEvent = EVENT_HIT; + if (target->staticStatus != 0) { + target->staticStatus = 0; + target->staticDuration = 0; + remove_status_static(target->hudElementDataIndex); + } + if (target->transStatus != 0) { + target->transStatus = 0; + target->transDuration = 0; + remove_status_transparent(target->hudElementDataIndex); + } + wasStatusInflicted = TRUE; + ret = 0; + } } - if (targetActor->transStatus != STATUS_END) { - targetActor->transStatus = STATUS_END; - targetActor->transDuration = 0; - remove_status_transparent(targetActor->hudElementDataIndex); - } - wasStatusInflicted = TRUE; - phi_fp = 0; - } -block_80: + } + if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { if (battleStatus->currentAttackElement & DAMAGE_TYPE_PEACH_BEAM) { dispatchEvent = EVENT_IMMUNE; - if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) { + if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) { dispatchEvent = EVENT_14; wasStatusInflicted = TRUE; } - if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_80000) { + if (targetPart->eventFlags & ACTOR_EVENT_FLAG_80000) { dispatchEvent = EVENT_14; wasStatusInflicted = TRUE; } } - if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { - if (battleStatus->currentAttackElement & DAMAGE_TYPE_SPIN_SMASH) { - if (dispatchEvent == EVENT_HIT) { - dispatchEvent = EVENT_SPIN_SMASH_HIT; - } - if (dispatchEvent == EVENT_DEATH) { - dispatchEvent = EVENT_SPIN_SMASH_DEATH; - } - } - if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { - if (battleStatus->currentAttackElement & (DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POW) && targetActorPart->eventFlags & ACTOR_EVENT_FLAG_GROUNDABLE) { - if (dispatchEvent == EVENT_HIT) { - dispatchEvent = EVENT_FALL_TRIGGER; - } - if (dispatchEvent == EVENT_IMMUNE) { - dispatchEvent = EVENT_FALL_TRIGGER; - } - } - if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { - if (battleStatus->currentAttackElement & DAMAGE_TYPE_POW && targetActorPart->eventFlags & ACTOR_EVENT_FLAG_800000) { - if (dispatchEvent == EVENT_HIT) { - dispatchEvent = EVENT_FALL_TRIGGER; - } - if (dispatchEvent == EVENT_IMMUNE) { - dispatchEvent = EVENT_FALL_TRIGGER; - } - } - if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { - if (battleStatus->currentAttackElement & (DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE) && targetActorPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE) { - if (dispatchEvent == EVENT_HIT) { - dispatchEvent = EVENT_FLIP_TRIGGER; - } - if (dispatchEvent == EVENT_IMMUNE) { - dispatchEvent = EVENT_FLIP_TRIGGER; - } - } - if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { - if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) { - if (dispatchEvent == EVENT_HIT) { - dispatchEvent = EVENT_BURN_HIT; - } - if (dispatchEvent == EVENT_DEATH) { - dispatchEvent = EVENT_BURN_DEATH; - } - isFireDamage = 1; - } - if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE - && battleStatus->lastAttackDamage >= 0 - && dispatchEvent != EVENT_DEATH - && dispatchEvent != EVENT_SPIN_SMASH_DEATH - && dispatchEvent != EVENT_EXPLODE_TRIGGER) { - if (battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK && try_inflict_status(targetActor, STATUS_SHRINK, STATUS_SHRINK_TURN_MOD)) { - wasStatusInflicted = TRUE; - } - if (battleStatus->currentAttackStatus & STATUS_FLAG_POISON && try_inflict_status(targetActor, STATUS_POISON, STATUS_POISON_TURN_MOD)) { - wasStatusInflicted = TRUE; - } - if (battleStatus->currentAttackStatus & STATUS_FLAG_STONE && try_inflict_status(targetActor, STATUS_STONE, STATUS_STONE_TURN_MOD)) { - wasStatusInflicted = TRUE; - } - if (battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP && try_inflict_status(targetActor, STATUS_SLEEP, STATUS_SLEEP_TURN_MOD)) { - wasStatusInflicted = TRUE; - } - if (battleStatus->currentAttackStatus & STATUS_FLAG_STOP && try_inflict_status(targetActor, STATUS_STOP, STATUS_STOP_TURN_MOD)) { - wasStatusInflicted = TRUE; - } - if (battleStatus->currentAttackStatus & STATUS_FLAG_STATIC && try_inflict_status(targetActor, STATUS_STATIC, STATUS_STATIC_TURN_MOD)) { - wasStatusInflicted = TRUE; - } - if (battleStatus->currentAttackStatus & STATUS_FLAG_FEAR && try_inflict_status(targetActor, STATUS_FEAR, STATUS_FEAR_TURN_MOD)) { - wasStatusInflicted = TRUE; - } - if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && try_inflict_status(targetActor, STATUS_PARALYZE, STATUS_PARALYZE_TURN_MOD)) { - wasStatusInflicted = TRUE; - } - if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && try_inflict_status(targetActor, STATUS_DIZZY, STATUS_DIZZY_TURN_MOD)) { - wasStatusInflicted = TRUE; - } - if (wasStatusInflicted != FALSE) { - if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) { - dispatchEvent = EVENT_HIT_COMBO; - } - if (dispatchEvent == EVENT_IMMUNE) { - dispatchEvent = EVENT_HIT; - } - } - } - } - } - } - } - } - } - baseStatusChance = (battleStatus->statusChance * targetActor->actorBlueprint->baseStatusChance) / 100; // TODO a70 - if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE && battleStatus->currentAttackElement & DAMAGE_TYPE_FEAR) { - //dispatchEvent = EVENT_IMMUNE; - if (rand_int(99) < baseStatusChance) { - dispatchEvent = EVENT_IMMUNE; - phi_fp = 2; - if (targetActor->debuff - 3 >= 6) { - phi_fp = 2; - if (!(targetActor->flags & ACTOR_FLAG_400)) { - sp1C = 1; - gBattleStatus.flags1 |= (BS_FLAGS1_1 | BS_FLAGS1_8 | BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_40); - sfx_play_sound_at_position(SOUND_UNKNOWN_231, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); - wasStatusInflicted = TRUE; - dispatchEvent = EVENT_SCARE_AWAY; - phi_fp = 0; - } - } - } else { - phi_fp = 2; - } - } - battleStatus->wasStatusInflicted = wasStatusInflicted; // TODO b8c - if (sp1C != 0 && (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200) || gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200) && gBattleStatus.flags1 & BS_FLAGS1_80 && battleStatus->lastAttackDamage > 0) && (sfx_play_sound_at_position(0x231, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z), battleStatus->lastAttackDamage > 0) || battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS && sp1C != 0) { - if (!(gBattleStatus.flags1 & BS_FLAGS1_40)) { - phi_a0_2 = 3; - } - func_802667F0(phi_a0_2, targetActor, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); } + if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { - func_80266970(targetActor); - } - dispatch_event_actor(targetActor, dispatchEvent); - if (currentTargetID == 0x100) { - if (battleStatus->lastAttackDamage > 0 && gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { - inflict_status(targetActor, 13, battleStatus->lastAttackDamage); + if (battleStatus->currentAttackElement & DAMAGE_TYPE_SPIN_SMASH) { + if (dispatchEvent == EVENT_HIT) { + dispatchEvent = EVENT_SPIN_SMASH_HIT; + } + if (dispatchEvent == EVENT_DEATH) { + dispatchEvent = EVENT_SPIN_SMASH_DEATH; + } } } - if (!(targetActor->flags & ACTOR_FLAG_NO_DMG_POPUP)) { + + if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { + if ((battleStatus->currentAttackElement & (DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POW)) && + (targetPart->eventFlags & ACTOR_EVENT_FLAG_GROUNDABLE)) + { + if (dispatchEvent == EVENT_HIT) { + dispatchEvent = EVENT_FALL_TRIGGER; + } + if (dispatchEvent == EVENT_IMMUNE) { + dispatchEvent = EVENT_FALL_TRIGGER; + } + } + } + + if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { + if ((battleStatus->currentAttackElement & DAMAGE_TYPE_POW) && + (targetPart->eventFlags & ACTOR_EVENT_FLAG_800000)) + { + if (dispatchEvent == EVENT_HIT) { + dispatchEvent = EVENT_FALL_TRIGGER; + } + if (dispatchEvent == EVENT_IMMUNE) { + dispatchEvent = EVENT_FALL_TRIGGER; + } + } + } + + if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { + if ((battleStatus->currentAttackElement & (DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE)) && + (targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE)) + { + if (dispatchEvent == EVENT_HIT) { + dispatchEvent = EVENT_FLIP_TRIGGER; + } + if (dispatchEvent == EVENT_IMMUNE) { + dispatchEvent = EVENT_FLIP_TRIGGER; + } + } + } + + if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { + if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) { + if (dispatchEvent == EVENT_HIT) { + dispatchEvent = EVENT_BURN_HIT; + } + if (dispatchEvent == EVENT_DEATH) { + dispatchEvent = EVENT_BURN_DEATH; + } + isFireDamage = TRUE; + } + } + + if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) && + battleStatus->lastAttackDamage >= 0 && + dispatchEvent != EVENT_DEATH && + dispatchEvent != EVENT_SPIN_SMASH_DEATH && + dispatchEvent != EVENT_EXPLODE_TRIGGER) + { + // Using this macro because it's nicer to look at, and it also is necessary to wrap the first 5 of these in a + // do-while-0 OR to wrap each one individually. It's more likely that it's a macro instead, and much cleaner + #define INFLICT_STATUS(STATUS_TYPE) \ + do { \ + if ((battleStatus->currentAttackStatus & STATUS_FLAG_##STATUS_TYPE) && \ + try_inflict_status(target, STATUS_##STATUS_TYPE, STATUS_##STATUS_TYPE##_TURN_MOD)) { \ + wasStatusInflicted = TRUE; \ + } \ + } while (0); + + INFLICT_STATUS(SHRINK); + INFLICT_STATUS(POISON); + INFLICT_STATUS(STONE); + INFLICT_STATUS(SLEEP); + INFLICT_STATUS(STOP); + INFLICT_STATUS(STATIC); + INFLICT_STATUS(FEAR); + INFLICT_STATUS(PARALYZE); + INFLICT_STATUS(DIZZY); + + #undef INFLICT_STATUS + + if (wasStatusInflicted) { + if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) { + dispatchEvent = EVENT_HIT_COMBO; + } + if (dispatchEvent == EVENT_IMMUNE) { + dispatchEvent = EVENT_HIT; + } + } + + } + + temp = target->actorBlueprint->baseStatusChance; + temp = (battleStatus->statusChance * temp) / 100; + + if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) && (battleStatus->currentAttackElement & DAMAGE_TYPE_FEAR)) { + if (rand_int(99) < temp && + !(target->debuff == STATUS_FEAR || + target->debuff == STATUS_DIZZY || + target->debuff == STATUS_PARALYZE || + target->debuff == STATUS_SLEEP || + target->debuff == STATUS_FROZEN || + target->debuff == STATUS_STOP) && + !(target->flags & ACTOR_FLAG_400)) + { + dispatchEvent = EVENT_SCARE_AWAY; + ret = 0; + sp1C = TRUE; + gBattleStatus.flags1 |= 0x39; + sfx_play_sound_at_position(SOUND_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); + wasStatusInflicted = TRUE; + gBattleStatus.flags1 |= 0x40; + } else { + dispatchEvent = EVENT_IMMUNE; + ret = 2; + } + } + + battleStatus->wasStatusInflicted = wasStatusInflicted; + + if ( + (sp1C && (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200))) || + ((gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) && !(gBattleStatus.flags1 & BS_FLAGS1_80)) + ) { + if (battleStatus->lastAttackDamage > 0) { + sfx_play_sound_at_position(SOUND_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); + } + + if (battleStatus->lastAttackDamage > 0 || (battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS) && sp1C) { + if (gBattleStatus.flags1 & BS_FLAGS1_40) { + func_802667F0(0, target, state->goalPos.x, state->goalPos.y, state->goalPos.z); + } else { + func_802667F0(3, target, state->goalPos.x, state->goalPos.y, state->goalPos.z); + } + } + } + + if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { + func_80266970(target); + } + + dispatch_event_actor(target, dispatchEvent); + + if (actorClass == ACTOR_PARTNER) { + if ((battleStatus->lastAttackDamage > 0) && (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) { + inflict_status(target, STATUS_DAZE, battleStatus->lastAttackDamage); + } + } + + if (!(target->flags & ACTOR_FLAG_NO_DMG_POPUP)) { if (battleStatus->lastAttackDamage == 0) { - if (sp1C == 0 && !wasStatusInflicted) { - func_8024EFE0(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, 0, 1, 3); + if (!sp1C && !wasStatusInflicted) { + func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3); } - } else if (sp18 == 0) { + } else if (!sp18) { if (battleStatus->currentAttackElement & (DAMAGE_TYPE_SMASH | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS)) { - show_damage_popup(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, battleStatus->lastAttackDamage, 0); + show_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0); } else { - func_802664DC(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, battleStatus->lastAttackDamage, 0); + func_802664DC(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0); } - if (!(targetActorPart->targetFlags & 4)) { - func_802666E4(targetActor, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, battleStatus->lastAttackDamage); + if (!(targetPart->targetFlags & 4)) { + func_802666E4(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage); } } } - if (battleStatus->lastAttackDamage > 0) { - if (sp18 == 0) { - func_80267018(targetActor, 1); - if (isFireDamage) { - sfx_play_sound_at_position(SOUND_HIT_FIRE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); - } else if (isElectricDamage) { - sfx_play_sound_at_position(SOUND_HIT_SHOCK, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); - } else if (isIceDamage) { - sfx_play_sound_at_position(SOUND_HIT_ICE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); - } else { - sfx_play_sound_at_position(SOUND_HIT_NORMAL, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); - } + + if (battleStatus->lastAttackDamage > 0 && !sp18) { + func_80267018(target, 1); + if (isFireDamage) { + sfx_play_sound_at_position(SOUND_HIT_FIRE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); + } else if (isElectricDamage) { + sfx_play_sound_at_position(SOUND_HIT_SHOCK, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); + } else if (isIceDamage) { + sfx_play_sound_at_position(SOUND_HIT_ICE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); + } else { + sfx_play_sound_at_position(SOUND_HIT_NORMAL, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } } - if (battleStatus->lastAttackDamage <= 0 && wasStatusInflicted && targetActorPart->flags & ACTOR_FLAG_2000) { - sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); + + if ((battleStatus->lastAttackDamage <= 0 && !wasStatusInflicted) || (targetPart->flags & ACTOR_FLAG_2000)) { + sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } - if (battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP && wasStatusInflicted) { - attackScript = start_script(DoSleepHit, 10, 0); - attackScript->varTable[0] = actorState->goalPos.x; - attackScript->varTable[1] = actorState->goalPos.y; - attackScript->varTable[2] = actorState->goalPos.z; - sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); + + if ((battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP) && wasStatusInflicted) { + script = start_script(DoSleepHit, 0xA, 0); + script->varTable[0] = state->goalPos.x; + script->varTable[1] = state->goalPos.y; + script->varTable[2] = state->goalPos.z; + sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } - if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && wasStatusInflicted) { - attackScript = start_script(DoDizzyHit, 10, 0); - attackScript->varTable[0] = actorState->goalPos.x; - attackScript->varTable[1] = actorState->goalPos.y; - attackScript->varTable[2] = actorState->goalPos.z; - sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); + if ((battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY) && wasStatusInflicted) { + script = start_script(DoDizzyHit, 0xA, 0); + script->varTable[0] = state->goalPos.x; + script->varTable[1] = state->goalPos.y; + script->varTable[2] = state->goalPos.z; + sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } - if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && wasStatusInflicted) { - attackScript = start_script(DoParalyzeHit, 10, 0); - attackScript->varTable[0] = actorState->goalPos.x; - attackScript->varTable[1] = actorState->goalPos.y; - attackScript->varTable[2] = actorState->goalPos.z; - sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); + if ((battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE) && wasStatusInflicted) { + script = start_script(DoParalyzeHit, 0xA, 0); + script->varTable[0] = state->goalPos.x; + script->varTable[1] = state->goalPos.y; + script->varTable[2] = state->goalPos.z; + sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } - if (battleStatus->currentAttackStatus & STATUS_FLAG_POISON && wasStatusInflicted) { - attackScript = start_script(DoPoisonHit, 10, 0); - attackScript->varTable[0] = actorState->goalPos.x; - attackScript->varTable[1] = actorState->goalPos.y; - attackScript->varTable[2] = actorState->goalPos.z; - sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); + if ((battleStatus->currentAttackStatus & STATUS_FLAG_POISON) && wasStatusInflicted) { + script = start_script(DoPoisonHit, 0xA, 0); + script->varTable[0] = state->goalPos.x; + script->varTable[1] = state->goalPos.y; + script->varTable[2] = state->goalPos.z; + sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } - if (battleStatus->currentAttackStatus & STATUS_FLAG_STOP && wasStatusInflicted) { - attackScript = start_script(DoStopHit, 10, 0); - attackScript->varTable[0] = actorState->goalPos.x; - attackScript->varTable[1] = actorState->goalPos.y; - attackScript->varTable[2] = actorState->goalPos.z; - sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); + if ((battleStatus->currentAttackStatus & STATUS_FLAG_STOP) && wasStatusInflicted) { + script = start_script(DoStopHit, 0xA, 0); + script->varTable[0] = state->goalPos.x; + script->varTable[1] = state->goalPos.y; + script->varTable[2] = state->goalPos.z; + sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } - if (battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN && wasStatusInflicted) { - attackScript = start_script(DoFreezeHit, 10, 0); - attackScript->varTable[0] = actorState->goalPos.x; - attackScript->varTable[1] = actorState->goalPos.y; - attackScript->varTable[2] = actorState->goalPos.z; - attackScript->varTable[3] = targetActor; - sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); + if ((battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN) && wasStatusInflicted) { + script = start_script(DoFreezeHit, 0xA, 0); + script->varTable[0] = state->goalPos.x; + script->varTable[1] = state->goalPos.y; + script->varTable[2] = state->goalPos.z; + script->varTable[3] = target; + sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } - if (battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK && wasStatusInflicted) { - attackScript = start_script(DoShrinkHit, 10, 0); - attackScript->varTable[0] = actorState->goalPos.x; - attackScript->varTable[1] = actorState->goalPos.y; - attackScript->varTable[2] = actorState->goalPos.z; - attackScript->varTable[3] = targetActor; - sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); + if ((battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK) && wasStatusInflicted) { + script = start_script(DoShrinkHit, 0xA, 0); + script->varTable[0] = state->goalPos.x; + script->varTable[1] = state->goalPos.y; + script->varTable[2] = state->goalPos.z; + script->varTable[3] = target; + sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } - if (battleStatus->currentAttackElement & DAMAGE_TYPE_SMASH && targetActor->actorType == 0x93) { - sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z); + if ((battleStatus->currentAttackElement & DAMAGE_TYPE_SMASH) && (target->actorType == ACTOR_TYPE_GOOMNUT_TREE)) { + sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } - - func_80266ADC(targetActor); + + func_80266ADC(target); + if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) { - if (phi_fp == 0) { - phi_fp = 1; + if (ret == 0) { + ret = 1; } - if (phi_fp == 2) { - phi_fp = 3; + if (ret == 2) { + ret = 3; } } - return phi_fp; - + + return ret; } -#else -INCLUDE_ASM(s32, "17FEB0", calc_item_damage_enemy); -#endif ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; diff --git a/src/18C790.c b/src/18C790.c index e6a973d432..b5fd8955f9 100644 --- a/src/18C790.c +++ b/src/18C790.c @@ -1,15 +1,90 @@ #include "common.h" #include "effects.h" +#include "hud_element.h" +#include "ld_addrs.h" +extern s32 D_80284150; +extern s32 D_80284154[]; +extern s32* D_80284188[]; +extern s32 D_802841B0; +extern HudScript* D_802841B4; +extern HudScript* D_802841B8; +extern HudScript* D_802841BC; +extern HudScript* D_802841C0[]; +extern HudScript* D_802841E8[]; +extern HudScript* D_80284210[]; +extern HudScript* D_80284238[]; +extern HudScript* D_80284260[]; +extern HudScript* D_80284288[]; +extern EvtScript D_802842B0; +extern EvtScript D_80284880; + +extern s32 D_8029FA88; +extern s32 D_8029FAA8; +extern s32 D_8029FAC4; +extern s32 D_8029FB4C; +extern s32 D_8029FB50; +extern s32 D_8029FB54; +extern s32 D_8029FB6C; +extern s32 D_8029FB70; +extern s32 D_8029FB74; +extern Evt* D_8029FB7C; +extern s32 D_8029FB80; +extern s32 D_8029FB84; +extern HudScript D_802A9F0C; +extern HudScript D_802AA320; +extern HudScript D_802AA694; +extern HudScript D_802AAA08; +extern HudScript D_802AAA30; +extern HudScript HudScript_ProjectorBeam; +extern EvtScript PlayerScriptDispatcher; + +extern s32 D_8029FA80[4]; +extern s32 D_8029FA90[3][7]; +extern s32 D_8029FAE8; +extern s32 D_8029FB48; +extern s32 D_8029FB60[]; extern s32 D_8029FB78; +extern s32 D_8029FB88; +extern s32 D_8029FB8C; +extern HudScript D_802A9F34; +extern HudScript D_802A9F5C; +extern HudScript D_802A9F84; +extern HudScript D_802A9FAC; + s32* virtual_entity_get_by_index(s32); +void func_80260948(s32 arg0, s32 posX, s32 posY); +void func_80260A20(s64 posX, s32 posY); + ApiStatus func_8025DEB0(Evt* script, s32 isInitialCall) { script->varTable[0] = (s8)gBattleStatus.totalStarPoints; return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "18C790", func_8025DEC4); +s32 func_8025DEC4(Evt* script, s32 isInitialCall) { + s32 levelUp = FALSE; + + script->varTable[10] = gBattleStatus.totalStarPoints / 100; // star points in hundreds (levels to gain) + script->varTable[11] = (gBattleStatus.totalStarPoints % 100) / 10; // star points in tens + script->varTable[12] = gBattleStatus.totalStarPoints % 10; // star points in ones + + if (script->varTable[10] > 0) { + script->varTable[10] = (s32) D_80284188[script->varTable[10]]; + levelUp = TRUE; + } else { + script->varTable[10] = D_802841B0; + } + + if ((script->varTable[11] > 0) || levelUp) { + script->varTable[11] = (s32) D_80284188[script->varTable[11]]; + } else { + script->varTable[11] = D_802841B0; + } + + script->varTable[12] = (s32) D_80284188[script->varTable[12]]; + return ApiStatus_DONE2; +} ApiStatus func_8025E030(Evt* script, s32 isInitialCall) { return D_8029FB78 != 0 ? ApiStatus_DONE2 : ApiStatus_BLOCK; @@ -46,18 +121,1038 @@ ApiStatus func_8025E108(Evt* script, s32 isInitialCall) { } ApiStatus func_8025E14C(Evt* script, s32 isInitialCall) { - fx_confetti(3, 0.0f, 100.0f, 0.0f, 1.0f, 0x78); + fx_confetti(3, 0.0f, 100.0f, 0.0f, 1.0f, 120); return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "18C790", btl_state_update_celebration); +// Some issues with symbols +#ifdef NON_MATCHING +void btl_state_update_celebration(void) { + BattleStatus* battleStatus = &gBattleStatus; + PlayerData* playerData = &gPlayerData; + Actor* player = battleStatus->playerActor; + Actor* partner = battleStatus->partnerActor; + s8 currentSubmenu; + s32 newSubmenu; + s32 id; + s32 x; + s32 y; + s32 width; -INCLUDE_ASM(s32, "18C790", btl_draw_upgrade_windows); + Evt* takeTurnScript; + Evt* script; -INCLUDE_ASM(s32, "18C790", btl_state_draw_celebration); + s32 temp_v1_4; + s32 temp_v1_5; -INCLUDE_ASM(s32, "18C790", func_80260948); + s32 fpTens; + s32 fpOnes; -void func_80260A20(s64 posX, s32 posY) { - draw_msg(0x1D00AB, posX + 11, posY + 6, 0xFF, 0xF, 0); + s32 leftoverSP; + s32 oldSP; + + s32 i; + s32 j; + + HudScript* new_var; + + switch (gBattleState2) { + case BATTLE_STATES2_UNK_0: + if (battleStatus->pendingStarPoints <= 0) { + player->flags &= ~0x8000000; + D_8029FB6C = battleStatus->totalStarPoints * 100; + D_8029FB74 = 0; + D_8029FB50 = 0; + D_80284150 = 0; + D_8029FB88 = 0; + D_8029FB8C = 0; + sfx_play_sound(SOUND_D4); + + oldSP = playerData->starPoints; + if (oldSP + battleStatus->totalStarPoints >= 100) { + bgm_set_song(0, SONG_LEVEL_UP, 0, 250, 8); + } else { + bgm_set_song(0, SONG_BATTLE_END, 0, 250, 8); + } + + D_8029FB84 = 0; + func_8024E40C(0x17); + D_8029FB54 = 0; + D_8029FB4C = 1; + gBattleState2 = BATTLE_STATES2_UNK_1; + gBattleStatus.flags2 |= BS_FLAGS2_1; + } + break; + case BATTLE_STATES2_UNK_1: + if (D_8029FB4C != 0) { + D_8029FB4C--; + } else if (func_8024E584() != 0) { + dma_copy(_7A89A0_ROM_START, _7A89A0_ROM_END, _7A89A0_VRAM); + script = start_script(D_802842B0, 0xA, 0); + D_8029FB78 = 0; + D_8029FB54 = 20; + D_8029FB70 = D_8029FB6C / D_8029FB54; + player->takeTurnScript = script; + D_8029FB4C = 1; + player->takeTurnID = script->id; + script->owner1.enemyID = 0; + gBattleState2 = BATTLE_STATES2_UNK_2; + } + break; + case BATTLE_STATES2_UNK_2: + if (D_8029FB4C == 0) { + if (battleStatus->totalStarPoints != 0) { + D_8029FB6C -= D_8029FB70; + oldSP = battleStatus->totalStarPoints; + battleStatus->totalStarPoints = D_8029FB6C / 100; + leftoverSP = oldSP - battleStatus->totalStarPoints; + if (leftoverSP > 0) { + sfx_play_sound(SOUND_215); + } + + playerData->starPoints += leftoverSP; + D_80284150 += 1; + if (D_8029FB54 == 0 && battleStatus->totalStarPoints != 0) { + playerData->starPoints++; + } + } + if (playerData->level >= 27) { + playerData->starPoints = 0; + } + if (playerData->starPoints >= 100) { + D_8029FB74 = 1; + playerData->starPoints -= 100; + } + if (playerData->level + D_8029FB74 == 27) { + playerData->starPoints = 0; + } + if (battleStatus->totalStarPoints == 0) { + if (D_8029FB54 == 0) { + D_8029FB78 = 1; + player->flags &= ~(ACTOR_FLAG_4000000 | ACTOR_FLAG_8000000); + if (partner != NULL) { + partner->flags &= ~(ACTOR_FLAG_4000000 | ACTOR_FLAG_8000000); + } + battleStatus->battlePhase = 5; + takeTurnScript = start_script(PlayerScriptDispatcher, 0xA, 0); + player->takeTurnScript = takeTurnScript; + player->takeTurnID = takeTurnScript->id; + takeTurnScript->owner1.actorID = ACTOR_PLAYER; + if (partner != NULL) { + takeTurnScript = start_script(partner->takeTurnScriptSource, 0xA, 0); + partner->takeTurnScript = takeTurnScript; + partner->takeTurnID = takeTurnScript->id; + takeTurnScript->owner1.actorID = ACTOR_PARTNER; + } + D_8029FB4C = 40; + gBattleState2 = BATTLE_STATES2_UNK_3; + } else { + D_8029FB54--; + } + } + } else { + D_8029FB4C--; + } + break; + case BATTLE_STATES2_UNK_3: + if (D_8029FB4C == 0) { + if (D_8029FB74 == 0) { + gBattleState2 = BATTLE_STATES2_UNK_14; + } else { + gBattleState2 = BATTLE_STATES2_UNK_4; + } + break; + } + D_8029FB4C--; + break; + case BATTLE_STATES2_UNK_4: + if (D_8029FB84 >= 99) { + playerData->level++; + func_8024E40C(2); + btl_cam_move(5); + dma_copy(_79EF40_ROM_START, _79EF40_ROM_END, _79EF40_VRAM); + sfx_play_sound(0x80000008); + D_8029FB84 = 0; + gBattleState2 = BATTLE_STATES2_UNK_5; + } + break; + case BATTLE_STATES2_UNK_5: + D_8029FB7C = start_script(D_80284880, 0xA, 0); + D_8029FB4C = 25; + gBattleState2 = BATTLE_STATES2_UNK_6; + D_8029FB80 = D_8029FB7C->id; + mdl_set_all_fog_mode(1); + *D_801512F0 = 1; + set_background_color_blend(0, 0, 0, 0); + break; + case BATTLE_STATES2_UNK_6: + if (D_8029FB4C == 18) { + playerData->curHP = playerData->curMaxHP; + playerData->curFP = playerData->curMaxFP; + x = player->currentPos.x + 0.0f; + y = player->currentPos.y + 35.0f; + fx_recover(0, x, y, (s32) player->currentPos.z, playerData->curHP); + x = player->currentPos.x + 20.0f; + y = player->currentPos.y + 25.0f; + fx_recover(1, x, y, (s32) player->currentPos.z, playerData->curFP); + playerData->specialBarsFilled = playerData->maxStarPower * 256; + } + + if (D_8029FB4C != 0) { + D_8029FB4C--; + if (D_8029FB4C < 10) { + set_background_color_blend(0, 0, 0, ((10 - D_8029FB4C) * 0x10) & 0xF0); + } + } else { + id = create_hud_element(D_802A9F0C); + D_8029FA80[0] = id; + set_hud_element_render_pos(id, 310, 140); + set_hud_element_flags(id, 0x80); + + id = create_hud_element(D_802A9F5C); + D_8029FA80[1] = id; + set_hud_element_render_pos(id, 158, 340); + set_hud_element_flags(id, 0x80); + + id = create_hud_element(D_802A9F84); + D_8029FA80[3] = id; + set_hud_element_render_pos(id, 158, 340); + set_hud_element_flags(id, 0x80); + + id = create_hud_element(D_802A9FAC); + D_8029FA80[2] = id; + set_hud_element_render_pos(id, 6, 140); + set_hud_element_flags(id, 0x80); + + id = create_hud_element(D_802841B4); + D_8029FA90[0][0] = id; + set_hud_element_render_pos(id, 160, 317); + set_hud_element_flags(id, 0x80); + + for (i = 1; i < ARRAY_COUNT(D_8029FA90[0]); i++) { + id = create_hud_element(D_802841C0[0]); + D_8029FA90[0][i] = id; + set_hud_element_render_pos(id, 160, 317); + set_hud_element_flags(id, 0x82); + } + + id = create_hud_element(D_802841B8); + D_8029FA90[0][7] = id; + set_hud_element_render_pos(id, 312, 117); + set_hud_element_flags(id, 0x80); + + for (i = 1; i < ARRAY_COUNT(D_8029FA90[0]); i++) { + id = create_hud_element(D_802841C0[10]); + D_8029FA90[1][i] = id; + set_hud_element_render_pos(id, 312, 117); + set_hud_element_flags(id, 0x82); + } + + id = create_hud_element(D_802841BC); + D_8029FA90[2][0] = id; + set_hud_element_render_pos(id, 8, 117); + set_hud_element_flags(id, 0x80); + + for (i = 1; i < ARRAY_COUNT(D_8029FA90[20]); i++) { + id = create_hud_element(D_802841C0[20]); + D_8029FA90[2][i] = id; + set_hud_element_render_pos(id, 8, 117); + set_hud_element_flags(id, 0x82); + } + + D_8029FB60[0] = 0; + D_8029FB60[1] = 0; + D_8029FB60[2] = 0; + + if (playerData->hardMaxFP != 50) { + id = D_8029FA90[0][1]; + fpTens = playerData->curMaxFP / 10; + fpOnes = playerData->curMaxFP % 10; + set_hud_element_anim(id, D_80284238[fpTens]); + if (fpTens != 0) { + clear_hud_element_flags(id, 2); + } + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 14, y + 46); + + id = D_8029FA90[0][2]; + set_hud_element_anim(id, D_80284238[fpOnes]); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 8, y + 46); + + id = D_8029FA90[0][3]; + set_hud_element_anim(id, D_802AA320); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 3, y + 46); + + temp_v1_4 = playerData->curMaxFP + 5; + id = D_8029FA90[0][4]; + fpTens = temp_v1_4 / 10; + fpOnes = temp_v1_4 % 10; + set_hud_element_anim(id, D_802841C0[fpTens]); + if (fpTens != 0) { + clear_hud_element_flags(id, 2); + } + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x + 3, y + 46); + + id = D_8029FA90[0][5]; + set_hud_element_anim(id, D_802841C0[fpOnes]); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x + 10, y + 46); + } else { + id = D_8029FA90[0][4]; + fpTens = playerData->curMaxFP / 10; + fpOnes = playerData->curMaxFP % 10; + set_hud_element_anim(id, D_802841C0[fpTens]); + if (fpTens != 0) { + clear_hud_element_flags(id, 2); + } + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 6, y + 46); + + id = D_8029FA90[0][5]; + set_hud_element_anim(id, D_802841C0[fpOnes]); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x + 2, y + 46); + D_8029FB60[1] = 1; + } + + if (is_ability_active(0xC)) { + id = D_8029FAA8; + set_hud_element_anim(id, gItemHudScripts[gItemTable[248].iconID][0]); + clear_hud_element_flags(id, 2); + set_hud_element_scale(id, 0.5f); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x + 17, y + 46); + } + + if (playerData->hardMaxHP != 50) { + HudScript** scriptsTemp; + + scriptsTemp = D_80284238; + id = D_8029FA90[1][1]; + fpTens = playerData->curMaxHP / 10; + fpOnes = playerData->curMaxHP % 10; + set_hud_element_anim(id, D_80284260[fpTens]); + if (fpTens != 0) { + clear_hud_element_flags(id, 2); + } + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 14, y + 46); + + id = D_8029FA90[1][2]; + set_hud_element_anim(id, scriptsTemp[fpOnes + 10]); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 8, y + 46); + + id = D_8029FA90[1][3]; + set_hud_element_anim(id, D_802AA694); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 3, y + 46); + + temp_v1_5 = playerData->curMaxHP + 5; + id = D_8029FA90[1][4]; + + fpTens = temp_v1_5 / 10; + fpOnes = temp_v1_5 % 10; + scriptsTemp = D_802841C0; + new_var = scriptsTemp[fpOnes + 10]; + set_hud_element_anim(id, D_802841E8[fpTens]); + if (fpTens != 0) { + clear_hud_element_flags(id, 2); + } + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x + 3, y + 46); + + id = D_8029FA90[1][5]; + set_hud_element_anim(id, new_var); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x + 10, y + 46); + } else { + HudScript** scriptsTemp; + scriptsTemp = D_802841C0; + + id = D_8029FA90[1][4]; + fpTens = playerData->curMaxHP / 10; + fpOnes = playerData->curMaxHP % 10; + set_hud_element_anim(id, scriptsTemp[fpTens]); + if (fpTens != 0) { + clear_hud_element_flags(id, 2); + } + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 6, y + 46); + + id = D_8029FA90[1][5]; + set_hud_element_anim(id, scriptsTemp[fpOnes + 10]); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x + 2, y + 46); + D_8029FB60[0] = 1; + } + + if (is_ability_active(4)) { + id = D_8029FAC4; + set_hud_element_anim(id, gItemHudScripts[gItemTable[231].iconID][0]); + clear_hud_element_flags(id, 2); + set_hud_element_scale(id, 0.5f); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x + 17, y + 46); + } + + if (playerData->maxBP != 30) { + HudScript** scriptsTemp; + HudScript* new_var2; + + new_var2 = D_802AAA08; + scriptsTemp = D_80284238; + id = D_8029FA90[2][1]; + fpTens = playerData->maxBP / 10; + fpOnes = playerData->maxBP % 10; + set_hud_element_anim(id, D_80284288[fpTens]); + if (fpTens != 0) { + clear_hud_element_flags(id, 2); + } + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 14, y + 46); + + id = D_8029FA90[2][2]; + set_hud_element_anim(id, scriptsTemp[fpOnes + 20]); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 8, y + 46); + + id = D_8029FA90[2][3]; + set_hud_element_anim(id, new_var2); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 3, y + 46); + temp_v1_5 = playerData->maxBP + 3; + + scriptsTemp = D_802841C0; + id = D_8029FA90[2][4]; + fpTens = temp_v1_5 / 10; + fpOnes = temp_v1_5 % 10; + set_hud_element_anim(id, D_80284210[fpTens]); + if (fpTens != 0) { + clear_hud_element_flags(id, 2); + } + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x + 3, y + 46); + + id = D_8029FA90[2][5]; + set_hud_element_anim(id, scriptsTemp[fpOnes + 20]); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x + 10, y + 46); + } else { + id = D_8029FA90[2][4]; + set_hud_element_anim(id, D_802841C0[23]); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x - 6, y + 46); + + id = D_8029FA90[2][5]; + set_hud_element_anim(id, D_802841C0[20]); + clear_hud_element_flags(id, 2); + get_hud_element_render_pos(id, &x, &y); + set_hud_element_render_pos(id, x + 2, y + 46); + D_8029FB60[2] = 1; + } + + D_8029FAE8 = id = create_hud_element(HudScript_ProjectorBeam); + create_hud_element_transform_B(id); + set_hud_element_render_pos(id, 156, 13); + set_hud_element_tint(id, 255, 255, 255); + set_hud_element_transform_rotation_pivot(id, 0, -35); + set_hud_element_transform_rotation(id, 0.0f, 0.0f, 180.0f); + set_hud_element_transform_scale(id, 1.0f, 1.5f, 1.0f); + set_hud_element_alpha(id, 200); + set_hud_element_flags(id, 0x8080); + + D_8029FB48 = id = create_hud_element(D_802AAA30); + set_hud_element_render_pos(id, 0, 0); + set_hud_element_flags(id, 0x80); + battleStatus->currentSubmenu = 1; + D_8029FB4C = 10; + gBattleState2 = BATTLE_STATES2_UNK_7; + } + break; + case BATTLE_STATES2_UNK_7: + id = D_8029FA80[0]; + get_hud_element_render_pos(id, &x, &y); + x -= 20; + set_hud_element_render_pos(id, x, y); + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) { + id = D_8029FA90[1][i]; + get_hud_element_render_pos(id, &x, &y); + x -= 20; + set_hud_element_render_pos(id, x, y); + } + + id = D_8029FA80[1]; + get_hud_element_render_pos(id, &x, &y); + y -= 20; + set_hud_element_render_pos(id, x, y); + + id = D_8029FA80[3]; + get_hud_element_render_pos(id, &x, &y); + y -= 20; + set_hud_element_render_pos(id, x, y); + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) { + id = D_8029FA90[0][i]; + get_hud_element_render_pos(id, &x, &y); + y -= 20; + set_hud_element_render_pos(id, x, y); + } + + id = D_8029FA88; + get_hud_element_render_pos(id, &x, &y); + x += 20; + set_hud_element_render_pos(id, x, y); + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) { + id = D_8029FA90[2][i]; + get_hud_element_render_pos(id, &x, &y); + x += 20; + set_hud_element_render_pos(id, x, y); + } + + D_8029FB4C--; + if (D_8029FB4C == 0) { + set_hud_element_tint(id, 128, 128, 128); + x = 20; + y = 186; + set_window_properties(8, 20, 186, 280, 32, 20, func_80260948, NULL, -1); + set_window_update(8, 1); + gBattleState2 = BATTLE_STATES2_UNK_8; + } + break; + case BATTLE_STATES2_UNK_8: + if (battleStatus->currentButtonsPressed & 0x8000) { + if (D_8029FB60[battleStatus->currentSubmenu] == 0) { + sfx_play_sound(SOUND_MENU_NEXT); + sfx_play_sound(SOUND_749); + gBattleState2 = BATTLE_STATES2_UNK_9; + } else { + sfx_play_sound(0x21D); + gBattleState2 = BATTLE_STATES2_UNK_F; + } + break; + } + + newSubmenu = currentSubmenu = battleStatus->currentSubmenu; + if (battleStatus->currentButtonsHeld & BUTTON_STICK_LEFT) { + newSubmenu--; + } + if (battleStatus->currentButtonsHeld & BUTTON_STICK_RIGHT) { + newSubmenu++; + } + if (newSubmenu < 0) { + newSubmenu = 0; + } + if (newSubmenu > 2) { + newSubmenu = 2; + } + if (newSubmenu != currentSubmenu) { + sfx_play_sound(SOUND_MENU_CHANGE_SELECTION); + battleStatus->currentSubmenu = newSubmenu; + } + + D_8029FB84++; + if (D_8029FB84 > 100) { + fx_confetti(3, 0.0f, 100.0f, 0.0f, 1.0f, 0x78); + D_8029FB84 = 0; + } + break; + case BATTLE_STATES2_UNK_9: + free_hud_element(D_8029FAE8); + set_window_update(8, 2); + + switch (battleStatus->currentSubmenu) { + case 0: + playerData->hardMaxHP += 5; + playerData->curMaxHP += 5; + playerData->curHP += 5; + if (playerData->curMaxHP > 75) { + playerData->curMaxHP = 75; + } + if (playerData->curHP > playerData->curMaxHP) { + playerData->curHP = playerData->curMaxHP; + } + player->maxHP = playerData->curMaxHP; + player->currentHP = playerData->curHP; + break; + case 1: + playerData->hardMaxFP += 5; + playerData->curMaxFP += 5; + playerData->curFP += 5; + if (playerData->curMaxFP > 75) { + playerData->curMaxFP = 75; + } + if (playerData->curFP > playerData->curMaxFP) { + playerData->curFP = playerData->curMaxFP; + } + break; + case 2: + playerData->maxBP += 3; + if (playerData->maxBP > 30) { + playerData->maxBP = 30; + } + break; + } + + set_animation(0, 0, 0x30009); + + if (partner != NULL) { + script = start_script(partner->takeTurnScriptSource, 0xA, 0); + partner->takeTurnScript = script; + partner->takeTurnID = script->id; + script->owner1.actorID = ACTOR_PARTNER; + } + if (!(gBattleStatus.flags2 & BS_FLAGS2_2000000)) { + bgm_set_song(0, -1, 0, 2000, 8); + } + D_80284150 = 0; + gBattleState2 = BATTLE_STATES2_PLAYER_DEFEATED; + break; + case BATTLE_STATES2_PLAYER_DEFEATED: + if ((gGameStatusPtr->frameCounter % 2) != 0) { + switch (battleStatus->currentSubmenu) { + case 0: + set_hud_element_flags(D_8029FA80[0], 2); + break; + case 1: + set_hud_element_flags(D_8029FA80[1], 2); + set_hud_element_flags(D_8029FA80[3], 2); + break; + case 2: + set_hud_element_flags(D_8029FA88, 2); + break; + } + } else { + switch (battleStatus->currentSubmenu) { + case 0: + clear_hud_element_flags(D_8029FA80[0], 2); + break; + case 1: + clear_hud_element_flags(D_8029FA80[1], 2); + clear_hud_element_flags(D_8029FA80[3], 2); + break; + case 2: + clear_hud_element_flags(D_8029FA88, 2); + break; + } + } + if (D_80284150 == 0xFF) { + gBattleState2 = BATTLE_STATES2_UNK_B; + break; + } + D_80284150 += 10; + if (D_80284150 > 255) { + D_80284150 = 255; + } + break; + case BATTLE_STATES2_UNK_B: + free_hud_element(D_8029FA80[0]); + free_hud_element(D_8029FA80[1]); + free_hud_element(D_8029FA80[3]); + free_hud_element(D_8029FA80[2]); + + for (i = 0; i < ARRAY_COUNT(D_8029FA90); i++) { + for (j = 0; j < ARRAY_COUNT(D_8029FA90[0]); j++) { + free_hud_element(D_8029FA90[i][j]); + } + } + + free_hud_element(D_8029FB48); + set_background_color_blend(0, 0, 0, 0); + btl_set_state(0x20); + gBattleState2 = BATTLE_STATES2_UNK_2; + break; + case BATTLE_STATES2_UNK_F: + width = get_msg_width(0x1D00AB, 0) + 31; + x = 160 - (width / 2); + y = 80; + set_window_properties(9, x, y, width, 28, 10, func_80260A20, NULL, -1); + set_window_update(9, 1); + D_8029FB4C = 60; + gBattleState2 = BATTLE_STATES2_UNK_10; + break; + case BATTLE_STATES2_UNK_10: + if (gGameStatusPtr->pressedButtons & (BUTTON_A | BUTTON_B)) { + D_8029FB4C = 0; + } + if (D_8029FB4C != 0) { + D_8029FB4C--; + break; + } + set_window_update(9, 2); + gBattleState2 = BATTLE_STATES2_UNK_8; + break; + case BATTLE_STATES2_UNK_14: + if (battleStatus->currentButtonsPressed & (BUTTON_A | BUTTON_B)) { + D_8029FB84 = 99; + } + if (D_8029FB84 >= 99) { + if (!(gBattleStatus.flags2 & 0x02000000)) { + bgm_set_song(0, -1, 0, 1500, 8); + } + D_80284150 = 0; + func_8024E484(1, 270, 100, 8, 0, 0x2400, 0, 100); + set_animation(0, 0, 0x30009); + if (partner != NULL) { + set_animation(ACTOR_PARTNER, 0, D_80284154[playerData->currentPartner]); + } + D_8029FB4C = 6; + gBattleState2 = BATTLE_STATES2_UNK_15; + break; + } + break; + case BATTLE_STATES2_UNK_15: + if (D_8029FB4C != 0) { + D_8029FB4C--; + if (D_8029FB4C == 0) { + set_animation(0, 0, 0x10004); + } + } else { + player->yaw = 0.0f; + if (partner != NULL) { + partner->yaw = 0.0f; + } + + player->currentPos.x += 4.0f; + if (partner != NULL) { + partner->currentPos.x += 4.0f; + } + } + if (D_80284150 == 0xFF) { + gBattleState2 = BATTLE_STATES2_UNK_16; + break; + } + D_80284150 += 20; + if (D_80284150 > 255) { + D_80284150 = 255; + } + break; + case BATTLE_STATES2_UNK_16: + if (does_script_exist(player->takeTurnID)) { + kill_script_by_ID(player->takeTurnID); + } + if (partner != NULL && does_script_exist(partner->takeTurnID)) { + kill_script_by_ID(partner->takeTurnID); + } + btl_set_state(0x20); + gBattleState2 = BATTLE_STATES2_UNK_2; + break; + } + D_8029FB84 += 1; +} +#else +INCLUDE_ASM(s32, "18C790", btl_state_update_celebration); +#endif + +// d1, d2, d3 hell +#ifdef NON_MATCHING +void btl_draw_upgrade_windows(s32 arg0) { + BattleStatus* battleStatus = &gBattleStatus; + s32 x; + s32 y; + s32 d1; + s32 d2; + s32 d3; + + switch (arg0) { + case 1: + if (battleStatus->currentSubmenu != 0) { + if (battleStatus->currentSubmenu == arg0) { + d1 = 0; + d2 = 0; + d3 = 100; + } else { + d1 = 0; + d2 = 100; + d3 = 0; + } + } else { + d1 = 0; + d2 = 100; + d3 = 100; + } + break; + default: + case 0: + d1 = 100; + d2 = 100; + d3 = 100; + break; + } + + get_hud_element_render_pos(D_8029FA80[0], &x, &y); + draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d1, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, + SCREEN_WIDTH, SCREEN_HEIGHT, NULL); + get_hud_element_render_pos(D_8029FA80[3], &x, &y); + draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d2, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, + SCREEN_WIDTH, SCREEN_HEIGHT, NULL); + get_hud_element_render_pos(D_8029FA80[2], &x, &y); + draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d3, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, + SCREEN_WIDTH, SCREEN_HEIGHT, NULL); +} +#else +INCLUDE_ASM(s32, "18C790", btl_draw_upgrade_windows); +#endif + +void btl_state_draw_celebration(void) { + BattleStatus* battleStatus = &gBattleStatus; + s32 rotZ; + s32 id; + s32 i; + s32 j; + + switch (gBattleState2) { + case BATTLE_STATES2_UNK_7: + btl_draw_upgrade_windows(0); + id = D_8029FA80[0]; + set_hud_element_tint(id, 128, 128, 128); + draw_hud_element_clipped(id); + id = D_8029FA80[3]; + set_hud_element_tint(id, 128, 128, 128); + draw_hud_element_clipped(id); + id = D_8029FA80[1]; + set_hud_element_tint(id, 128, 128, 128); + draw_hud_element_clipped(id); + id = D_8029FA80[2]; + set_hud_element_tint(id, 128, 128, 128); + draw_hud_element_clipped(id); + + for (j = 0; j < ARRAY_COUNT(D_8029FA90); j++) { + for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) { + id = D_8029FA90[j][i]; + + set_hud_element_tint(id, 128, 128, 128); + draw_hud_element_clipped(id); + } + } + break; + case BATTLE_STATES2_UNK_8: + case BATTLE_STATES2_UNK_F: + case BATTLE_STATES2_UNK_10: + switch (battleStatus->currentSubmenu) { + case 0: + rotZ = 152; + set_hud_element_tint(D_8029FA80[0], 255, 255, 255); + set_hud_element_tint(D_8029FA80[3], 128, 128, 128); + set_hud_element_tint(D_8029FA80[1], 128, 128, 128); + set_hud_element_tint(D_8029FA80[2], 128, 128, 128); + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) { + id = D_8029FA90[0][i]; + + set_hud_element_tint(id, 128, 128, 128); + } + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) { + id = D_8029FA90[1][i]; + + set_hud_element_tint(id, 255, 255, 255); + } + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) { + id = D_8029FA90[2][i]; + + set_hud_element_tint(id, 128, 128, 128); + } + + id = D_8029FA80[0]; + if (get_hud_element_anim(id) != &D_802A9F34) { + set_hud_element_anim(id, &D_802A9F34); + } + id = D_8029FA80[3]; + if (get_hud_element_anim(id) != &D_802A9F84) { + set_hud_element_anim(id, &D_802A9F84); + } + id = D_8029FA80[1]; + if (get_hud_element_anim(id) != &D_802A9F5C) { + set_hud_element_anim(id, &D_802A9F5C); + } + id = D_8029FA80[2]; + if (get_hud_element_anim(id) != &D_802A9FAC) { + set_hud_element_anim(id, &D_802A9FAC); + } + break; + case 1: + rotZ = 180; + set_hud_element_tint(D_8029FA80[0], 128, 128, 128); + set_hud_element_tint(D_8029FA80[3], 255, 255, 255); + set_hud_element_tint(D_8029FA80[1], 255, 255, 255); + set_hud_element_tint(D_8029FA80[2], 128, 128, 128); + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) { + id = D_8029FA90[0][i]; + + set_hud_element_tint(id, 255, 255, 255); + } + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) { + id = D_8029FA90[1][i]; + + set_hud_element_tint(id, 128, 128, 128); + } + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) { + id = D_8029FA90[2][i]; + + set_hud_element_tint(id, 128, 128, 128); + } + break; + case 2: + default: + rotZ = 208; + set_hud_element_tint(D_8029FA80[0], 128, 128, 128); + set_hud_element_tint(D_8029FA80[3], 128, 128, 128); + set_hud_element_tint(D_8029FA80[1], 128, 128, 128); + set_hud_element_tint(D_8029FA80[2], 255, 255, 255); + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) { + id = D_8029FA90[0][i]; + + set_hud_element_tint(id, 128, 128, 128); + } + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) { + id = D_8029FA90[1][i]; + + set_hud_element_tint(id, 128, 128, 128); + } + + for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) { + id = D_8029FA90[2][i]; + + set_hud_element_tint(id, 255, 255, 255); + } + break; + } + + btl_draw_upgrade_windows(1); + draw_hud_element_clipped(D_8029FA80[0]); + draw_hud_element_clipped(D_8029FA80[3]); + draw_hud_element_clipped(D_8029FA80[1]); + draw_hud_element_clipped(D_8029FA80[2]); + + for (j = 0; j < ARRAY_COUNT(D_8029FA90); j++) { + for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) { + draw_hud_element_clipped(D_8029FA90[j][i]); + } + } + + func_80144218(-1); + id = D_8029FAE8; + set_hud_element_transform_rotation(id, 0.0f, 0.0f, rotZ); + func_80144238(id); + break; + case BATTLE_STATES2_UNK_9: + case BATTLE_STATES2_PLAYER_DEFEATED: + btl_draw_upgrade_windows(1); + draw_hud_element_clipped(D_8029FA80[0]); + draw_hud_element_clipped(D_8029FA80[3]); + draw_hud_element_clipped(D_8029FA80[1]); + draw_hud_element_clipped(D_8029FA80[2]); + + for (j = 0; j < ARRAY_COUNT(D_8029FA90); j++) { + for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) { + draw_hud_element_clipped(D_8029FA90[j][i]); + } + } + + set_screen_overlay_params_front(0, D_80284150); + break; + case BATTLE_STATES2_UNK_B: + set_screen_overlay_params_front(0, D_80284150); + break; + case BATTLE_STATES2_UNK_15: + if (D_80284150 != 0) { + set_screen_overlay_params_front(0, D_80284150); + } + break; + } + + switch (gBattleState2) { + case BATTLE_STATES2_UNK_7: + case BATTLE_STATES2_UNK_8: + case BATTLE_STATES2_UNK_9: + D_8029FB8C += 2; + D_8029FB88 += D_8029FB8C; + if (D_8029FB88 > 200) { + D_8029FB88 = 200; + D_8029FB8C = -D_8029FB8C / 3; + } + id = D_8029FB48; + set_hud_element_render_pos(id, D_8029FB88 - 43, 176); + draw_hud_element_clipped(id); + break; + case BATTLE_STATES2_PLAYER_DEFEATED: + D_8029FB8C += 4; + D_8029FB88 += D_8029FB8C; + if (D_8029FB88 > 500) { + D_8029FB88 = 500; + } + id = D_8029FB48; + set_hud_element_render_pos(id, D_8029FB88 - 43, 176); + draw_hud_element_clipped(id); + break; + } +} + +void func_80260948(s32 arg0, s32 posX, s32 posY) { + BattleStatus* battleStatus = &gBattleStatus; + s32 xOffset; + s32 msgID; + + switch (gBattleState2) { + case BATTLE_STATES2_UNK_8: + case BATTLE_STATES2_UNK_F: + case BATTLE_STATES2_UNK_10: + switch (battleStatus->currentSubmenu) { + case 0: + if (D_8029FB60[0] == 0) { + msgID = 0x1D00A5; + } else { + msgID = 0x1D00A8; + } + xOffset = 9; + break; + case 1: + if (D_8029FB60[1] == 0) { + msgID = 0x1D00A6; + } else { + msgID = 0x1D00A9; + } + xOffset = 9; + break; + default: + if (D_8029FB60[2] == 0) { + msgID = 0x1D00A7; + } else { + msgID = 0x1D00AA; + } + xOffset = 9; + break; + } + draw_msg(msgID, posX + xOffset + 0x11, posY, 255, 0xA, 0); + break; + } +} + +// TODO type is almost definitely incorrect +void func_80260A20(s64 posX, s32 posY) { + draw_msg(0x1D00AB, posX + 11, posY + 6, 255, 0xF, 0); } diff --git a/src/190B20.c b/src/190B20.c index 51385ca7a0..c4240307f9 100644 --- a/src/190B20.c +++ b/src/190B20.c @@ -8,9 +8,9 @@ #include "sprite.h" typedef struct PartnerDMAData { - /* 0x00 */ s32 dmaStart; - /* 0x04 */ s32 dmaEnd; - /* 0x08 */ s32 dmaDest; + /* 0x00 */ u32 dmaStart; + /* 0x04 */ u32 dmaEnd; + /* 0x08 */ void* dmaDest; /* 0x0C */ ActorBlueprint* ActorBlueprint; /* 0x10 */ s32 y; } PartnerDMAData; // size = 0x14 @@ -1197,8 +1197,8 @@ s32 func_80263064(Actor* actor0, Actor* actor1, s32 unused) { return ret; } -void func_80263230(Actor* arg0, Actor* arg1) { - func_80263064(arg0, arg1, 0); +s32 func_80263230(Actor* arg0, Actor* arg1) { + return func_80263064(arg0, arg1, 0); } void func_8026324C(Actor* arg0, Actor* arg1) { @@ -2857,7 +2857,7 @@ s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration) { if (statusTypeKey == STATUS_DAZE) { if (statusTypeKey != target->koStatus) { inflict_status(target, STATUS_DAZE, duration); - sfx_play_sound(0x2107); + sfx_play_sound(SOUND_2107); } else { target->koDuration += duration; if (target->koDuration > 9) { @@ -3127,8 +3127,7 @@ void func_80266B14(void) { } } -// dumb label -#ifdef NON_MATCHING +// TODO dumb label required to match, clean up s32 try_inflict_status(Actor* actor, s32 statusTypeKey, s32 statusKey) { BattleStatus* battleStatus = &gBattleStatus; s32 phi_s0; @@ -3163,7 +3162,6 @@ s32 try_inflict_status(Actor* actor, s32 statusTypeKey, s32 statusKey) { duration = 3; } -// TODO remove this label (required to match) meow: if (duration > 0) { if (battleStatus->currentAttackStatus < 0) { @@ -3179,12 +3177,9 @@ meow: } return duration; } -#else -INCLUDE_ASM(s32, "190B20", try_inflict_status); -#endif s32 inflict_status_set_duration(Actor* actor, s32 statusTypeKey, s32 statusDurationKey, s32 duration) { - s32 var0 = duration; + s32 var0 = duration; // TODO required to match, look into s32 statusDuration = 0; if (actor->statusTable == NULL || lookup_status_chance(actor->statusTable, statusTypeKey) > 0) { @@ -3690,7 +3685,7 @@ void start_rumble_type(u32 arg0) { case 9: case 10: case 11: - D_802939C0 = start_script(D_80293AC4, 0xA, 0x20)->id; + D_802939C0 = start_script(&D_80293AC4, 0xA, 0x20)->id; break; } } diff --git a/src/1A5830.c b/src/1A5830.c index 0354b19057..73b17d1f84 100644 --- a/src/1A5830.c +++ b/src/1A5830.c @@ -3,13 +3,10 @@ #include "script_api/battle.h" #include "effects.h" #include "hud_element.h" +#include "sprite.h" s32 D_802946E0[] = { 100, 100, 100, 110, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130 }; -s32 dispatch_damage_event_actor_1(Actor* actor, s32 damageAmount, s32 event); -s32 func_80263230(Actor*, Actor*); -void func_80267018(Actor* actor, s32 arg1); - s32 has_enchanted_part(Actor* actor) { ActorPart* partIt = actor->partsTable; s32 ret = FALSE; @@ -820,7 +817,7 @@ s32 dispatch_damage_event_actor(Actor* actor, s32 damageAmount, s32 originalEven if (actor->currentHP <= 0) { battleStatus->lastAttackDamage += actor->currentHP; actor->currentHP = 0; - dispatchEvent = EVENT_DEATH; + dispatchEvent = EVENT_DEATH; } battleStatus->lastAttackDamage += temp_v1; @@ -870,6 +867,7 @@ s32 dispatch_damage_event_actor(Actor* actor, s32 damageAmount, s32 originalEven return 0; } #else +s32 dispatch_damage_event_actor(Actor* actor, s32 damageAmount, s32 originalEvent, s32 stopMotion); INCLUDE_ASM(s32, "1A5830", dispatch_damage_event_actor); #endif @@ -1095,11 +1093,11 @@ s32 LandJumpPart(Evt* script, s32 isInitialCall) { script->functionTemp[0] = 1; } - part = script->functionTemp[2]; + part = (ActorPart*)script->functionTemp[2]; movement = part->movement; movement->unk_00.y += movement->unk_2C; movement->unk_2C -= movement->jumpScale; - add_xz_vec3f_copy1(movement, movement->moveSpeed, movement->unk_30); + add_xz_vec3f_copy1(&movement->unk_00, movement->moveSpeed, movement->unk_30); part->absolutePosition.x = movement->unk_00.x; part->absolutePosition.y = movement->unk_00.y; part->absolutePosition.z = movement->unk_00.z; diff --git a/src/80850_len_3060.c b/src/80850_len_3060.c index 9f00ebd867..10479259f6 100644 --- a/src/80850_len_3060.c +++ b/src/80850_len_3060.c @@ -1122,7 +1122,7 @@ INCLUDE_ASM(s32, "80850_len_3060", is_ability_active); #endif -s32 is_partner_ability_active(void) { +s32 is_partner_ability_active(s32 ability) { return 0; } diff --git a/src/battle/area_arn/actor/hyper_cleft.c b/src/battle/area_arn/actor/hyper_cleft.c index 8b50f01f43..aa38493a68 100644 --- a/src/battle/area_arn/actor/hyper_cleft.c +++ b/src/battle/area_arn/actor/hyper_cleft.c @@ -75,7 +75,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 4, .partCount = ARRAY_COUNT(N(partsTable_80220C14)), .partsData = N(partsTable_80220C14), - .script = N(init_80220CAC), + .script = &N(init_80220CAC), .statusTable = N(statusTable_80220B68), .escapeChance = 70, .airLiftChance = 30, diff --git a/src/battle/area_arn/actor/hyper_paragoomba.c b/src/battle/area_arn/actor/hyper_paragoomba.c index 899f597c0d..34c6b1541a 100644 --- a/src/battle/area_arn/actor/hyper_paragoomba.c +++ b/src/battle/area_arn/actor/hyper_paragoomba.c @@ -144,7 +144,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_8021B460)), .partsData = N(partsTable_8021B460), - .script = N(init_8021B564), + .script = &N(init_8021B564), .statusTable = N(statusTable_8021B3B4), .escapeChance = 50, .airLiftChance = 95, diff --git a/src/battle/area_arn/actor/hypergoomba.c b/src/battle/area_arn/actor/hypergoomba.c index aab472f2e1..ddbb984780 100644 --- a/src/battle/area_arn/actor/hypergoomba.c +++ b/src/battle/area_arn/actor/hypergoomba.c @@ -66,7 +66,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_80218828)), .partsData = N(partsTable_80218828), - .script = N(init_802188C0), + .script = &N(init_802188C0), .statusTable = N(statusTable_8021877C), .escapeChance = 60, .airLiftChance = 90, diff --git a/src/battle/area_arn/actor/tubba_blubba.c b/src/battle/area_arn/actor/tubba_blubba.c index 023afdad0e..ffcafa0398 100644 --- a/src/battle/area_arn/actor/tubba_blubba.c +++ b/src/battle/area_arn/actor/tubba_blubba.c @@ -81,7 +81,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 10, .partCount = ARRAY_COUNT(N(partsTable_80225D4C)), .partsData = N(partsTable_80225D4C), - .script = N(init_80225D98), + .script = &N(init_80225D98), .statusTable = N(statusTable_80225CA0), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_arn/actor/tubbas_heart.c b/src/battle/area_arn/actor/tubbas_heart.c index 531e733c81..06642d4a56 100644 --- a/src/battle/area_arn/actor/tubbas_heart.c +++ b/src/battle/area_arn/actor/tubbas_heart.c @@ -111,7 +111,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 50, .partCount = ARRAY_COUNT(N(partsTable_80223D30)), .partsData = N(partsTable_80223D30), - .script = N(init_80223DA0), + .script = &N(init_80223DA0), .statusTable = N(statusTable_80223C84), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_dgb/actor/clubba.c b/src/battle/area_dgb/actor/clubba.c index 1efca9bc1b..9b99ad27a5 100644 --- a/src/battle/area_dgb/actor/clubba.c +++ b/src/battle/area_dgb/actor/clubba.c @@ -76,7 +76,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 8, .partCount = ARRAY_COUNT(N(partsTable_80218104)), .partsData = N(partsTable_80218104), - .script = N(init_80218150), + .script = &N(init_80218150), .statusTable = N(statusTable_80218058), .escapeChance = 60, .airLiftChance = 60, diff --git a/src/battle/area_dgb/actor/tubba_blubba.c b/src/battle/area_dgb/actor/tubba_blubba.c index 2e013a56dd..a7d4a23dc2 100644 --- a/src/battle/area_dgb/actor/tubba_blubba.c +++ b/src/battle/area_dgb/actor/tubba_blubba.c @@ -82,7 +82,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 10, .partCount = ARRAY_COUNT(N(partsTable_80218D24)), .partsData = N(partsTable_80218D24), - .script = N(init_80218D70), + .script = &N(init_80218D70), .statusTable = N(statusTable_80218C78), .escapeChance = 15, .airLiftChance = 0, diff --git a/src/battle/area_hos/actor/ember.c b/src/battle/area_hos/actor/ember.c index 4ab88d5f74..890695972f 100644 --- a/src/battle/area_hos/actor/ember.c +++ b/src/battle/area_hos/actor/ember.c @@ -118,7 +118,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 10, .partCount = ARRAY_COUNT(N(partsTable_8021AD80)), .partsData = N(partsTable_8021AD80), - .script = N(init_8021AEB4), + .script = &N(init_8021AEB4), .statusTable = N(statusTable_8021ACD4), .escapeChance = 60, .airLiftChance = 80, diff --git a/src/battle/area_hos/actor/goombario_tutor.c b/src/battle/area_hos/actor/goombario_tutor.c index f0c5134356..eb9b5f2386 100644 --- a/src/battle/area_hos/actor/goombario_tutor.c +++ b/src/battle/area_hos/actor/goombario_tutor.c @@ -73,7 +73,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_80219114)), .partsData = N(partsTable_80219114), - .script = N(init_80219160), + .script = &N(init_80219160), .statusTable = N(statusTable_80219068), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_hos/actor/magikoopa.c b/src/battle/area_hos/actor/magikoopa.c index 4098c30ce5..189ef3bcbe 100644 --- a/src/battle/area_hos/actor/magikoopa.c +++ b/src/battle/area_hos/actor/magikoopa.c @@ -136,7 +136,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 8, .partCount = ARRAY_COUNT(N(partsTable_8021D5F0)), .partsData = N(partsTable_8021D5F0), - .script = N(init_8021E100), + .script = &N(init_8021E100), .statusTable = N(statusTable_8021D498), .escapeChance = 0, .airLiftChance = 0, @@ -161,7 +161,7 @@ ActorBlueprint N(flying) = { .maxHP = 8, .partCount = ARRAY_COUNT(N(partsTable_8021D614)), .partsData = N(partsTable_8021D614), - .script = N(init_8021E2C0), + .script = &N(init_8021E2C0), .statusTable = N(statusTable_8021D544), .escapeChance = 0, .airLiftChance = 0, @@ -1304,7 +1304,7 @@ ActorBlueprint N(clone) = { .maxHP = 11, .partCount = ARRAY_COUNT(N(partsTable_80221624)), .partsData = N(partsTable_80221624), - .script = N(init_8022143C), + .script = &N(init_8022143C), .statusTable = N(statusTable_802214CC), .escapeChance = 40, .airLiftChance = 0, @@ -1327,7 +1327,7 @@ ActorBlueprint N(flying_clone) = { .maxHP = 11, .partCount = ARRAY_COUNT(N(partsTable_80221648)), .partsData = N(partsTable_80221648), - .script = N(init_80221478), + .script = &N(init_80221478), .statusTable = N(statusTable_80221578), .escapeChance = 40, .airLiftChance = 0, diff --git a/src/battle/area_isk_part_1/actor/buzzy_beetle.c b/src/battle/area_isk_part_1/actor/buzzy_beetle.c index 963fe6d25e..170021651c 100644 --- a/src/battle/area_isk_part_1/actor/buzzy_beetle.c +++ b/src/battle/area_isk_part_1/actor/buzzy_beetle.c @@ -74,7 +74,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 3, .partCount = ARRAY_COUNT(N(partsTable_8021E594)), .partsData = N(partsTable_8021E594), - .script = N(init_8021E6BC), + .script = &N(init_8021E6BC), .statusTable = N(statusTable_8021E4E8), .escapeChance = 60, .airLiftChance = 75, diff --git a/src/battle/area_isk_part_1/actor/pokey_mummy.c b/src/battle/area_isk_part_1/actor/pokey_mummy.c index 479be5c38f..cfcbf800a3 100644 --- a/src/battle/area_isk_part_1/actor/pokey_mummy.c +++ b/src/battle/area_isk_part_1/actor/pokey_mummy.c @@ -131,7 +131,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 4, .partCount = ARRAY_COUNT(N(partsTable_80218CC8)), .partsData = N(partsTable_80218CC8), - .script = N(init_80218EC4), + .script = &N(init_80218EC4), .statusTable = N(statusTable_80218C1C), .escapeChance = 60, .airLiftChance = 90, diff --git a/src/battle/area_isk_part_1/actor/stone_chomp.c b/src/battle/area_isk_part_1/actor/stone_chomp.c index 58752ea52b..3f78097c9f 100644 --- a/src/battle/area_isk_part_1/actor/stone_chomp.c +++ b/src/battle/area_isk_part_1/actor/stone_chomp.c @@ -221,7 +221,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 4, .partCount = ARRAY_COUNT(N(partsTable_80221604)), .partsData = N(partsTable_80221604), - .script = N(init_80221ABC), + .script = &N(init_80221ABC), .statusTable = N(statusTable_80221558), .escapeChance = 0, .airLiftChance = 25, diff --git a/src/battle/area_isk_part_1/actor/swooper.c b/src/battle/area_isk_part_1/actor/swooper.c index 6fd457038b..1a0446c8fd 100644 --- a/src/battle/area_isk_part_1/actor/swooper.c +++ b/src/battle/area_isk_part_1/actor/swooper.c @@ -64,7 +64,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 4, .partCount = ARRAY_COUNT(N(partsTable_8021C568)), .partsData = N(partsTable_8021C568), - .script = N(init_8021C64C), + .script = &N(init_8021C64C), .statusTable = N(statusTable_8021C4BC), .escapeChance = 50, .airLiftChance = 100, diff --git a/src/battle/area_isk_part_2/actor/chain_chomp.c b/src/battle/area_isk_part_2/actor/chain_chomp.c index cf4a335c87..b898d1a692 100644 --- a/src/battle/area_isk_part_2/actor/chain_chomp.c +++ b/src/battle/area_isk_part_2/actor/chain_chomp.c @@ -232,7 +232,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 4, .partCount = ARRAY_COUNT(N(partsTable_80218D34)), .partsData = N(partsTable_80218D34), - .script = N(init_80218EC4), + .script = &N(init_80218EC4), .statusTable = N(statusTable_80218C88), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_isk_part_2/actor/tutankoopa.c b/src/battle/area_isk_part_2/actor/tutankoopa.c index afa6d8083a..22725f1357 100644 --- a/src/battle/area_isk_part_2/actor/tutankoopa.c +++ b/src/battle/area_isk_part_2/actor/tutankoopa.c @@ -204,7 +204,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 30, .partCount = ARRAY_COUNT(N(partsTable_8021BAD4)), .partsData = N(partsTable_8021BAD4), - .script = N(init_8021BC1C), + .script = &N(init_8021BC1C), .statusTable = N(statusTable_8021BA28), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_iwa/actor/buzzar.c b/src/battle/area_iwa/actor/buzzar.c index 43a93ef701..1a7537acb2 100644 --- a/src/battle/area_iwa/actor/buzzar.c +++ b/src/battle/area_iwa/actor/buzzar.c @@ -141,7 +141,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 40, .partCount = ARRAY_COUNT(N(partsTable_8021B708)), .partsData = N(partsTable_8021B708), - .script = N(init_8021B7E4), + .script = &N(init_8021B7E4), .statusTable = N(statusTable_8021B65C), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_iwa/actor/cleft.c b/src/battle/area_iwa/actor/cleft.c index f5abf141ed..d30250b94e 100644 --- a/src/battle/area_iwa/actor/cleft.c +++ b/src/battle/area_iwa/actor/cleft.c @@ -72,7 +72,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 2, .partCount = ARRAY_COUNT(N(partsTable_802187EC)), .partsData = N(partsTable_802187EC), - .script = N(init_802188D0), + .script = &N(init_802188D0), .statusTable = N(statusTable_80218740), .escapeChance = 80, .airLiftChance = 40, diff --git a/src/battle/area_iwa/actor/monty_mole.c b/src/battle/area_iwa/actor/monty_mole.c index dcc29b68ef..48994994c8 100644 --- a/src/battle/area_iwa/actor/monty_mole.c +++ b/src/battle/area_iwa/actor/monty_mole.c @@ -88,7 +88,7 @@ ActorBlueprint N(1) = { .maxHP = 3, .partCount = ARRAY_COUNT(N(partsTable_8021A508)), .partsData = N(partsTable_8021A508), - .script = N(init_8021A7B0), + .script = &N(init_8021A7B0), .statusTable = N(statusTable_8021A45C), .escapeChance = 80, .airLiftChance = 70, @@ -162,7 +162,7 @@ ActorBlueprint N(2) = { .maxHP = 5, .partCount = ARRAY_COUNT(N(partsTable_8021A60C)), .partsData = N(partsTable_8021A60C), - .script = N(init_8021A630), + .script = &N(init_8021A630), .statusTable = NULL, .escapeChance = 80, .airLiftChance = 0, diff --git a/src/battle/area_iwa/actor/whacka.c b/src/battle/area_iwa/actor/whacka.c index 21dad98c7a..34700bca53 100644 --- a/src/battle/area_iwa/actor/whacka.c +++ b/src/battle/area_iwa/actor/whacka.c @@ -77,7 +77,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_8021FD54)), .partsData = N(partsTable_8021FD54), - .script = N(init_8021FDA0), + .script = &N(init_8021FDA0), .statusTable = N(statusTable_8021FCA8), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_iwa/stage/iwa_01.c b/src/battle/area_iwa/stage/iwa_01.c index 797602337e..472a39ffa1 100644 --- a/src/battle/area_iwa/stage/iwa_01.c +++ b/src/battle/area_iwa/stage/iwa_01.c @@ -114,7 +114,7 @@ ActorBlueprint N(whacka) = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_80220A04)), .partsData = N(partsTable_80220A04), - .script = N(init_80220A50), + .script = &N(init_80220A50), .statusTable = N(statusTable_80220958), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_iwa/stage/iwa_02.c b/src/battle/area_iwa/stage/iwa_02.c index c9427ebe7d..1c60783045 100644 --- a/src/battle/area_iwa/stage/iwa_02.c +++ b/src/battle/area_iwa/stage/iwa_02.c @@ -109,7 +109,7 @@ ActorBlueprint N(whacka) = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_80221720)), .partsData = N(partsTable_80221720), - .script = N(init_8022176C), + .script = &N(init_8022176C), .statusTable = N(statusTable_80221674), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_jan/actor/hurt_plant.c b/src/battle/area_jan/actor/hurt_plant.c index 69d32f2613..c42437f799 100644 --- a/src/battle/area_jan/actor/hurt_plant.c +++ b/src/battle/area_jan/actor/hurt_plant.c @@ -77,7 +77,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 8, .partCount = ARRAY_COUNT(N(partsTable_8021DA4C)), .partsData = N(partsTable_8021DA4C), - .script = N(init_8021DA98), + .script = &N(init_8021DA98), .statusTable = N(statusTable_8021D9A0), .escapeChance = 70, .airLiftChance = 20, diff --git a/src/battle/area_jan/actor/jungle_fuzzy.c b/src/battle/area_jan/actor/jungle_fuzzy.c index ca32a6e827..858e1a83b0 100644 --- a/src/battle/area_jan/actor/jungle_fuzzy.c +++ b/src/battle/area_jan/actor/jungle_fuzzy.c @@ -67,7 +67,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_8021EA90)), .partsData = N(partsTable_8021EA90), - .script = N(init_8021EB28), + .script = &N(init_8021EB28), .statusTable = N(statusTable_8021E9E4), .escapeChance = 30, .airLiftChance = 85, diff --git a/src/battle/area_jan/actor/m_bush.c b/src/battle/area_jan/actor/m_bush.c index fc3ff89457..5a480554f0 100644 --- a/src/battle/area_jan/actor/m_bush.c +++ b/src/battle/area_jan/actor/m_bush.c @@ -76,7 +76,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 8, .partCount = ARRAY_COUNT(N(partsTable_8022193C)), .partsData = N(partsTable_8022193C), - .script = N(init_80221988), + .script = &N(init_80221988), .statusTable = N(statusTable_80221890), .escapeChance = 70, .airLiftChance = 85, diff --git a/src/battle/area_jan/actor/spear_guy.c b/src/battle/area_jan/actor/spear_guy.c index 8a2d097df8..d51c7efbfa 100644 --- a/src/battle/area_jan/actor/spear_guy.c +++ b/src/battle/area_jan/actor/spear_guy.c @@ -178,7 +178,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_802187F0)), .partsData = N(partsTable_802187F0), - .script = N(init_80218980), + .script = &N(init_80218980), .statusTable = N(statusTable_80218698), .escapeChance = 50, .airLiftChance = 85, diff --git a/src/battle/area_kgr/actor/fuzzipede.c b/src/battle/area_kgr/actor/fuzzipede.c index 182afb8d7d..3393548bd6 100644 --- a/src/battle/area_kgr/actor/fuzzipede.c +++ b/src/battle/area_kgr/actor/fuzzipede.c @@ -106,7 +106,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 20, .partCount = ARRAY_COUNT(N(partsTable_80218B00)), .partsData = N(partsTable_80218B00), - .script = N(init_80218B70), + .script = &N(init_80218B70), .statusTable = N(statusTable_80218A54), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_2/actor/blue_goomba.c b/src/battle/area_kmr_part_2/actor/blue_goomba.c index 38a9e1ff34..4d9bbcbb7f 100644 --- a/src/battle/area_kmr_part_2/actor/blue_goomba.c +++ b/src/battle/area_kmr_part_2/actor/blue_goomba.c @@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 6, .partCount = ARRAY_COUNT(N(partsTable_80219968)), .partsData = N(partsTable_80219968), - .script = N(init_8021B268), + .script = &N(init_8021B268), .statusTable = N(statusTable_802198BC), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_2/actor/blue_goomba2.c b/src/battle/area_kmr_part_2/actor/blue_goomba2.c index 1d8be1a4bd..3b2a9e0499 100644 --- a/src/battle/area_kmr_part_2/actor/blue_goomba2.c +++ b/src/battle/area_kmr_part_2/actor/blue_goomba2.c @@ -63,7 +63,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 6, .partCount = ARRAY_COUNT(N(partsTable_8021D4B8)), .partsData = N(partsTable_8021D4B8), - .script = N(init_8021EDB8), + .script = &N(init_8021EDB8), .statusTable = N(statusTable_8021D40C), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_2/actor/goomba_king.c b/src/battle/area_kmr_part_2/actor/goomba_king.c index b3647fd3b9..40d7203df5 100644 --- a/src/battle/area_kmr_part_2/actor/goomba_king.c +++ b/src/battle/area_kmr_part_2/actor/goomba_king.c @@ -128,7 +128,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 10, .partCount = ARRAY_COUNT(N(partsTable_802209C8)), .partsData = N(partsTable_802209C8), - .script = N(init_80220A38), + .script = &N(init_80220A38), .statusTable = N(statusTable_8022091C), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_2/actor/goomnut_tree.c b/src/battle/area_kmr_part_2/actor/goomnut_tree.c index 63a7e033f3..98925b0c29 100644 --- a/src/battle/area_kmr_part_2/actor/goomnut_tree.c +++ b/src/battle/area_kmr_part_2/actor/goomnut_tree.c @@ -118,7 +118,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 255, .partCount = ARRAY_COUNT(N(partsTable_8022339C)), .partsData = N(partsTable_8022339C), - .script = N(init_80223488), + .script = &N(init_80223488), .statusTable = N(statusTable_802232F0), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_2/actor/red_goomba.c b/src/battle/area_kmr_part_2/actor/red_goomba.c index e7efffce44..0fdd09dc76 100644 --- a/src/battle/area_kmr_part_2/actor/red_goomba.c +++ b/src/battle/area_kmr_part_2/actor/red_goomba.c @@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_8021B778)), .partsData = N(partsTable_8021B778), - .script = N(init_8021D078), + .script = &N(init_8021D078), .statusTable = N(statusTable_8021B6CC), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_2/actor/red_goomba2.c b/src/battle/area_kmr_part_2/actor/red_goomba2.c index 14b948f51b..b07eeb9e68 100644 --- a/src/battle/area_kmr_part_2/actor/red_goomba2.c +++ b/src/battle/area_kmr_part_2/actor/red_goomba2.c @@ -63,7 +63,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_8021EEB8)), .partsData = N(partsTable_8021EEB8), - .script = N(init_802207B8), + .script = &N(init_802207B8), .statusTable = N(statusTable_8021EE0C), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_3/actor/egg_jr_troopa.c b/src/battle/area_kmr_part_3/actor/egg_jr_troopa.c index 3a621e92e9..7f7b8de639 100644 --- a/src/battle/area_kmr_part_3/actor/egg_jr_troopa.c +++ b/src/battle/area_kmr_part_3/actor/egg_jr_troopa.c @@ -88,7 +88,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 15, .partCount = ARRAY_COUNT(N(partsTable_802244C4)), .partsData = N(partsTable_802244C4), - .script = N(init_80224A94), + .script = &N(init_80224A94), .statusTable = N(statusTable_80224418), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_3/actor/final_jr_troopa.c b/src/battle/area_kmr_part_3/actor/final_jr_troopa.c index 568b689025..8f0ec035cc 100644 --- a/src/battle/area_kmr_part_3/actor/final_jr_troopa.c +++ b/src/battle/area_kmr_part_3/actor/final_jr_troopa.c @@ -184,7 +184,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 60, .partCount = ARRAY_COUNT(N(partsTable_8022C640)), .partsData = N(partsTable_8022C640), - .script = N(init_8022CF80), + .script = &N(init_8022CF80), .statusTable = N(statusTable_8022C43C), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_3/actor/jr_troopa.c b/src/battle/area_kmr_part_3/actor/jr_troopa.c index ae9a133634..88cb3b2a9e 100644 --- a/src/battle/area_kmr_part_3/actor/jr_troopa.c +++ b/src/battle/area_kmr_part_3/actor/jr_troopa.c @@ -71,7 +71,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 5, .partCount = ARRAY_COUNT(N(partsTable_80222AE4)), .partsData = N(partsTable_80222AE4), - .script = N(init_80223180), + .script = &N(init_80223180), .statusTable = N(statusTable_80222A38), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_3/actor/mage_jr_troopa.c b/src/battle/area_kmr_part_3/actor/mage_jr_troopa.c index e4d6e86095..984e861845 100644 --- a/src/battle/area_kmr_part_3/actor/mage_jr_troopa.c +++ b/src/battle/area_kmr_part_3/actor/mage_jr_troopa.c @@ -115,7 +115,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 50, .partCount = ARRAY_COUNT(N(partsTable_8022A6E0)), .partsData = N(partsTable_8022A6E0), - .script = N(init_8022ACE4), + .script = &N(init_8022ACE4), .statusTable = N(statusTable_8022A634), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_3/actor/para_jr_troopa.c b/src/battle/area_kmr_part_3/actor/para_jr_troopa.c index 0b1df6b1ef..092c2e4bbb 100644 --- a/src/battle/area_kmr_part_3/actor/para_jr_troopa.c +++ b/src/battle/area_kmr_part_3/actor/para_jr_troopa.c @@ -101,7 +101,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 40, .partCount = ARRAY_COUNT(N(partsTable_80225F0C)), .partsData = N(partsTable_80225F0C), - .script = N(init_80226510), + .script = &N(init_80226510), .statusTable = N(statusTable_80225E60), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kmr_part_3/actor/paragoomba.c b/src/battle/area_kmr_part_3/actor/paragoomba.c index acd42f0ceb..a990948b86 100644 --- a/src/battle/area_kmr_part_3/actor/paragoomba.c +++ b/src/battle/area_kmr_part_3/actor/paragoomba.c @@ -133,7 +133,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 2, .partCount = ARRAY_COUNT(N(partsTable)), .partsData = N(partsTable), - .script = N(init_8021F450), + .script = &N(init_8021F450), .statusTable = N(statusTable_8021C274), .escapeChance = 90, .airLiftChance = 100, diff --git a/src/battle/area_kmr_part_3/actor/spiked_goomba.c b/src/battle/area_kmr_part_3/actor/spiked_goomba.c index 5ba0bf61d2..1993a053d1 100644 --- a/src/battle/area_kmr_part_3/actor/spiked_goomba.c +++ b/src/battle/area_kmr_part_3/actor/spiked_goomba.c @@ -63,7 +63,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 2, .partCount = ARRAY_COUNT(N(partsTable_8021A448)), .partsData = N(partsTable_8021A448), - .script = N(init_8021BEBC), + .script = &N(init_8021BEBC), .statusTable = N(statusTable_8021A39C), .escapeChance = 90, .airLiftChance = 95, diff --git a/src/battle/area_kmr_part_3/actor/spiked_para_jr_troopa.c b/src/battle/area_kmr_part_3/actor/spiked_para_jr_troopa.c index b79fa76bdf..8caeca6be7 100644 --- a/src/battle/area_kmr_part_3/actor/spiked_para_jr_troopa.c +++ b/src/battle/area_kmr_part_3/actor/spiked_para_jr_troopa.c @@ -95,7 +95,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 40, .partCount = ARRAY_COUNT(N(partsTable_80228014)), .partsData = N(partsTable_80228014), - .script = N(init_80228618), + .script = &N(init_80228618), .statusTable = N(statusTable_80227F68), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_kzn/actor/lava_bubble.c b/src/battle/area_kzn/actor/lava_bubble.c index e5be4b61aa..e0848812e2 100644 --- a/src/battle/area_kzn/actor/lava_bubble.c +++ b/src/battle/area_kzn/actor/lava_bubble.c @@ -121,7 +121,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 9, .partCount = ARRAY_COUNT(N(partsTable_80218EE8)), .partsData = N(partsTable_80218EE8), - .script = N(init_8021901C), + .script = &N(init_8021901C), .statusTable = N(statusTable_80218E3C), .escapeChance = 50, .airLiftChance = 90, diff --git a/src/battle/area_kzn/actor/red_magikoopa.c b/src/battle/area_kzn/actor/red_magikoopa.c index f0fb26a457..a12cb6ed4e 100644 --- a/src/battle/area_kzn/actor/red_magikoopa.c +++ b/src/battle/area_kzn/actor/red_magikoopa.c @@ -138,7 +138,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 11, .partCount = ARRAY_COUNT(N(partsTable_80220FD0)), .partsData = N(partsTable_80220FD0), - .script = N(init_80223298), + .script = &N(init_80223298), .statusTable = N(statusTable_80220E78), .escapeChance = 40, .airLiftChance = 80, @@ -161,7 +161,7 @@ ActorBlueprint N(flying) = { .maxHP = 11, .partCount = ARRAY_COUNT(N(partsTable_80220FF4)), .partsData = N(partsTable_80220FF4), - .script = N(init_8022333C), + .script = &N(init_8022333C), .statusTable = N(statusTable_80220F24), .escapeChance = 40, .airLiftChance = 95, diff --git a/src/battle/area_mac/actor/chan.c b/src/battle/area_mac/actor/chan.c index 09fb414388..b455ffb5c3 100644 --- a/src/battle/area_mac/actor/chan.c +++ b/src/battle/area_mac/actor/chan.c @@ -68,7 +68,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 15, .partCount = ARRAY_COUNT(N(partsTable_80219E24)), .partsData = N(partsTable_80219E24), - .script = N(init_8021CCDC), + .script = &N(init_8021CCDC), .statusTable = N(statusTable_80219D78), .escapeChance = 100, .airLiftChance = 0, diff --git a/src/battle/area_mac/actor/lee.c b/src/battle/area_mac/actor/lee.c index 1a92c0f571..384fa78b56 100644 --- a/src/battle/area_mac/actor/lee.c +++ b/src/battle/area_mac/actor/lee.c @@ -90,7 +90,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 20, .partCount = ARRAY_COUNT(N(partsTable_8021D47C)), .partsData = N(partsTable_8021D47C), - .script = N(init_8021D4C8), + .script = &N(init_8021D4C8), .statusTable = N(statusTable_8021D3D0), .escapeChance = 100, .airLiftChance = 0, @@ -519,7 +519,7 @@ ActorBlueprint N(goombario) = { .maxHP = 20, .partCount = ARRAY_COUNT(N(partsTable_8021EA50)), .partsData = N(partsTable_8021EA50), - .script = N(init_Goombario), + .script = &N(init_Goombario), .statusTable = N(statusTable_8021E9A4), .escapeChance = 100, .airLiftChance = 0, @@ -1097,7 +1097,7 @@ ActorBlueprint N(kooper) = { .maxHP = 20, .partCount = ARRAY_COUNT(N(partsTable_8022069C)), .partsData = N(partsTable_8022069C), - .script = N(init_Kooper), + .script = &N(init_Kooper), .statusTable = N(statusTable_802205F0), .escapeChance = 100, .airLiftChance = 0, @@ -1609,7 +1609,7 @@ ActorBlueprint N(bombette) = { .maxHP = 20, .partCount = ARRAY_COUNT(N(partsTable_80222394)), .partsData = N(partsTable_80222394), - .script = N(init_LeeBombette), + .script = &N(init_LeeBombette), .statusTable = N(statusTable_802222E8), .escapeChance = 100, .airLiftChance = 0, @@ -1975,7 +1975,7 @@ ActorBlueprint N(parakerry) = { .maxHP = 20, .partCount = ARRAY_COUNT(N(partsTable_8022348C)), .partsData = N(partsTable_8022348C), - .script = N(init_Parakarry), + .script = &N(init_Parakarry), .statusTable = N(statusTable_802233E0), .escapeChance = 100, .airLiftChance = 0, @@ -2337,7 +2337,7 @@ ActorBlueprint N(bow) = { .maxHP = 20, .partCount = ARRAY_COUNT(N(partsTable_80224514)), .partsData = N(partsTable_80224514), - .script = N(init_Bow), + .script = &N(init_Bow), .statusTable = N(statusTable_80224468), .escapeChance = 100, .airLiftChance = 0, @@ -2789,7 +2789,7 @@ ActorBlueprint N(watt) = { .maxHP = 20, .partCount = ARRAY_COUNT(N(partsTable_80225A80)), .partsData = N(partsTable_80225A80), - .script = N(init_Watt), + .script = &N(init_Watt), .statusTable = N(statusTable_802259D4), .escapeChance = 100, .airLiftChance = 0, @@ -3173,7 +3173,7 @@ ActorBlueprint N(sushie) = { .maxHP = 20, .partCount = ARRAY_COUNT(N(partsTable_80226A80)), .partsData = N(partsTable_80226A80), - .script = N(init_Sushie), + .script = &N(init_Sushie), .statusTable = N(statusTable_802269D4), .escapeChance = 100, .airLiftChance = 0, @@ -3665,7 +3665,7 @@ ActorBlueprint N(lakilester) = { .maxHP = 20, .partCount = ARRAY_COUNT(N(partsTable_8022851C)), .partsData = N(partsTable_8022851C), - .script = N(init_Lakilester), + .script = &N(init_Lakilester), .statusTable = N(statusTable_80228470), .escapeChance = 100, .airLiftChance = 0, diff --git a/src/battle/area_mac/actor/master1.c b/src/battle/area_mac/actor/master1.c index f28dad50a0..0b6539c31f 100644 --- a/src/battle/area_mac/actor/master1.c +++ b/src/battle/area_mac/actor/master1.c @@ -73,7 +73,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 50, .partCount = ARRAY_COUNT(N(partsTable_8022A364)), .partsData = N(partsTable_8022A364), - .script = N(init_8022A3B0), + .script = &N(init_8022A3B0), .statusTable = N(statusTable_8022A2B8), .escapeChance = 100, .airLiftChance = 0, diff --git a/src/battle/area_mac/actor/master2.c b/src/battle/area_mac/actor/master2.c index 374ef68659..f72ecd6321 100644 --- a/src/battle/area_mac/actor/master2.c +++ b/src/battle/area_mac/actor/master2.c @@ -86,7 +86,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 75, .partCount = ARRAY_COUNT(N(partsTable_8022B790)), .partsData = N(partsTable_8022B790), - .script = N(init_8022B7DC), + .script = &N(init_8022B7DC), .statusTable = N(statusTable_8022B6E4), .escapeChance = 100, .airLiftChance = 0, diff --git a/src/battle/area_mac/actor/master3.c b/src/battle/area_mac/actor/master3.c index f23ae1e73b..10e4e5c131 100644 --- a/src/battle/area_mac/actor/master3.c +++ b/src/battle/area_mac/actor/master3.c @@ -98,7 +98,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_8022DAF0)), .partsData = N(partsTable_8022DAF0), - .script = N(init_8022DB60), + .script = &N(init_8022DB60), .statusTable = N(statusTable_8022DA44), .escapeChance = 100, .airLiftChance = 0, diff --git a/src/battle/area_mim/actor/bzzap.c b/src/battle/area_mim/actor/bzzap.c index f283e126a5..647a183475 100644 --- a/src/battle/area_mim/actor/bzzap.c +++ b/src/battle/area_mim/actor/bzzap.c @@ -141,7 +141,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 3, .partCount = ARRAY_COUNT(N(partsTable_8021A924)), .partsData = N(partsTable_8021A924), - .script = N(init_8021AA24), + .script = &N(init_8021AA24), .statusTable = N(statusTable_8021A878), .escapeChance = 40, .airLiftChance = 95, diff --git a/src/battle/area_mim/actor/forest_fuzzy.c b/src/battle/area_mim/actor/forest_fuzzy.c index e7b3acec22..6c7b923f28 100644 --- a/src/battle/area_mim/actor/forest_fuzzy.c +++ b/src/battle/area_mim/actor/forest_fuzzy.c @@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 6, .partCount = ARRAY_COUNT(N(partsTable_80218478)), .partsData = N(partsTable_80218478), - .script = N(init_80218510), + .script = &N(init_80218510), .statusTable = N(statusTable_802183CC), .escapeChance = 40, .airLiftChance = 90, diff --git a/src/battle/area_mim/actor/piranha_plant.c b/src/battle/area_mim/actor/piranha_plant.c index c8ff4d64a3..a3b813bf4a 100644 --- a/src/battle/area_mim/actor/piranha_plant.c +++ b/src/battle/area_mim/actor/piranha_plant.c @@ -86,7 +86,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 5, .partCount = ARRAY_COUNT(N(partsTable_8021D44C)), .partsData = N(partsTable_8021D44C), - .script = N(init_8021D498), + .script = &N(init_8021D498), .statusTable = N(statusTable_8021D3A0), .escapeChance = 70, .airLiftChance = 20, diff --git a/src/battle/area_nok/actor/fuzzy.c b/src/battle/area_nok/actor/fuzzy.c index 5bf16a37e5..457edfad11 100644 --- a/src/battle/area_nok/actor/fuzzy.c +++ b/src/battle/area_nok/actor/fuzzy.c @@ -61,7 +61,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 3, .partCount = ARRAY_COUNT(N(partsTable_80222108)), .partsData = N(partsTable_80222108), - .script = N(init_802221A0), + .script = &N(init_802221A0), .statusTable = N(statusTable_8022205C), .escapeChance = 50, .airLiftChance = 95, diff --git a/src/battle/area_nok/actor/kent_c_koopa.c b/src/battle/area_nok/actor/kent_c_koopa.c index 59684f4489..50e40c8fd4 100644 --- a/src/battle/area_nok/actor/kent_c_koopa.c +++ b/src/battle/area_nok/actor/kent_c_koopa.c @@ -198,7 +198,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 70, .partCount = ARRAY_COUNT(N(partsTable_80227AB4)), .partsData = N(partsTable_80227AB4), - .script = N(init_80227C20), + .script = &N(init_80227C20), .statusTable = N(statusTable_80227A08), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_omo/actor/anti_guy.c b/src/battle/area_omo/actor/anti_guy.c index 616b3cb850..f22869c049 100644 --- a/src/battle/area_omo/actor/anti_guy.c +++ b/src/battle/area_omo/actor/anti_guy.c @@ -64,7 +64,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 50, .partCount = ARRAY_COUNT(N(partsTable_802219C8)), .partsData = N(partsTable_802219C8), - .script = N(init_80221A60), + .script = &N(init_80221A60), .statusTable = N(statusTable_8022191C), .escapeChance = 50, .airLiftChance = 0, diff --git a/src/battle/area_omo/actor/blue_shy_guy.c b/src/battle/area_omo/actor/blue_shy_guy.c index 4d753b59c0..61289cf8bf 100644 --- a/src/battle/area_omo/actor/blue_shy_guy.c +++ b/src/battle/area_omo/actor/blue_shy_guy.c @@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_8021ADD0)), .partsData = N(partsTable_8021ADD0), - .script = N(init_8021AE68), + .script = &N(init_8021AE68), .statusTable = N(statusTable_8021AD24), .escapeChance = 60, .airLiftChance = 85, diff --git a/src/battle/area_omo/actor/green_shy_guy.c b/src/battle/area_omo/actor/green_shy_guy.c index 30b6c27ef4..efcfc251dc 100644 --- a/src/battle/area_omo/actor/green_shy_guy.c +++ b/src/battle/area_omo/actor/green_shy_guy.c @@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_8021FED0)), .partsData = N(partsTable_8021FED0), - .script = N(init_8021FF68), + .script = &N(init_8021FF68), .statusTable = N(statusTable_8021FE24), .escapeChance = 60, .airLiftChance = 85, diff --git a/src/battle/area_omo/actor/groove_guy.c b/src/battle/area_omo/actor/groove_guy.c index 5e3219f5f8..bc88d29ce1 100644 --- a/src/battle/area_omo/actor/groove_guy.c +++ b/src/battle/area_omo/actor/groove_guy.c @@ -87,7 +87,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_80224AEC)), .partsData = N(partsTable_80224AEC), - .script = N(init_80224B38), + .script = &N(init_80224B38), .statusTable = N(statusTable_80224A40), .escapeChance = 50, .airLiftChance = 85, diff --git a/src/battle/area_omo/actor/pink_shy_guy.c b/src/battle/area_omo/actor/pink_shy_guy.c index 2ff3c63013..06a7adadc2 100644 --- a/src/battle/area_omo/actor/pink_shy_guy.c +++ b/src/battle/area_omo/actor/pink_shy_guy.c @@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_8021E3D0)), .partsData = N(partsTable_8021E3D0), - .script = N(init_8021E468), + .script = &N(init_8021E468), .statusTable = N(statusTable_8021E324), .escapeChance = 60, .airLiftChance = 85, diff --git a/src/battle/area_omo/actor/pyro_guy.c b/src/battle/area_omo/actor/pyro_guy.c index cfacd3f0ad..e0cdea2500 100644 --- a/src/battle/area_omo/actor/pyro_guy.c +++ b/src/battle/area_omo/actor/pyro_guy.c @@ -83,7 +83,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_8022CC34)), .partsData = N(partsTable_8022CC34), - .script = N(init_8022CC80), + .script = &N(init_8022CC80), .statusTable = N(statusTable_8022CB88), .escapeChance = 60, .airLiftChance = 85, diff --git a/src/battle/area_omo/actor/red_shy_guy.c b/src/battle/area_omo/actor/red_shy_guy.c index 3032437f6b..1e45f8c9f1 100644 --- a/src/battle/area_omo/actor/red_shy_guy.c +++ b/src/battle/area_omo/actor/red_shy_guy.c @@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_802192D0)), .partsData = N(partsTable_802192D0), - .script = N(init_80219368), + .script = &N(init_80219368), .statusTable = N(statusTable_80219224), .escapeChance = 60, .airLiftChance = 85, diff --git a/src/battle/area_omo/actor/sky_guy.c b/src/battle/area_omo/actor/sky_guy.c index c3dc44d871..895ccd84ab 100644 --- a/src/battle/area_omo/actor/sky_guy.c +++ b/src/battle/area_omo/actor/sky_guy.c @@ -223,7 +223,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_8022977C)), .partsData = N(partsTable_8022977C), - .script = N(init_8022987C), + .script = &N(init_8022987C), .statusTable = N(statusTable_80229624), .escapeChance = 50, .airLiftChance = 90, diff --git a/src/battle/area_omo/actor/spy_guy.c b/src/battle/area_omo/actor/spy_guy.c index b7e3d466d2..d9b1d52617 100644 --- a/src/battle/area_omo/actor/spy_guy.c +++ b/src/battle/area_omo/actor/spy_guy.c @@ -109,7 +109,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_80227564)), .partsData = N(partsTable_80227564), - .script = N(init_802275D4), + .script = &N(init_802275D4), .statusTable = N(statusTable_802274B8), .escapeChance = 50, .airLiftChance = 85, diff --git a/src/battle/area_omo/actor/yellow_shy_guy.c b/src/battle/area_omo/actor/yellow_shy_guy.c index 6d02995462..aff176adcb 100644 --- a/src/battle/area_omo/actor/yellow_shy_guy.c +++ b/src/battle/area_omo/actor/yellow_shy_guy.c @@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_8021C8D0)), .partsData = N(partsTable_8021C8D0), - .script = N(init_8021C968), + .script = &N(init_8021C968), .statusTable = N(statusTable_8021C824), .escapeChance = 60, .airLiftChance = 85, diff --git a/src/battle/area_omo/stage/omo_04.c b/src/battle/area_omo/stage/omo_04.c index f5a35bf8a3..526de8d289 100644 --- a/src/battle/area_omo/stage/omo_04.c +++ b/src/battle/area_omo/stage/omo_04.c @@ -130,7 +130,7 @@ ActorBlueprint N(slot_machine_stop) = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_8022DFEC)), .partsData = N(partsTable_8022DFEC), - .script = N(init_8022E060), + .script = &N(init_8022E060), .statusTable = N(statusTable_8022DF40), .escapeChance = 0, .airLiftChance = 0, @@ -153,7 +153,7 @@ ActorBlueprint N(slot_machine_start) = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_8022DFEC)), .partsData = N(partsTable_8022DFEC), - .script = N(init_8022E060), + .script = &N(init_8022E060), .statusTable = N(statusTable_8022DF40), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_sbk/actor/bandit.c b/src/battle/area_sbk/actor/bandit.c index e1d568df49..545e1c4f8e 100644 --- a/src/battle/area_sbk/actor/bandit.c +++ b/src/battle/area_sbk/actor/bandit.c @@ -125,7 +125,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 5, .partCount = ARRAY_COUNT(N(partsTable_8021D66C)), .partsData = N(partsTable_8021D66C), - .script = N(init_8021D750), + .script = &N(init_8021D750), .statusTable = N(statusTable_8021D5C0), .escapeChance = 40, .airLiftChance = 90, @@ -148,7 +148,7 @@ ActorBlueprint N(2) = { .maxHP = 5, .partCount = ARRAY_COUNT(N(partsTable_8021D6B4)), .partsData = N(partsTable_8021D6B4), - .script = N(init_8021D7C4), + .script = &N(init_8021D7C4), .statusTable = N(statusTable_8021D5C0), .escapeChance = 40, .airLiftChance = 90, diff --git a/src/battle/area_sbk/actor/pokey.c b/src/battle/area_sbk/actor/pokey.c index a20495c60b..37448d8bbc 100644 --- a/src/battle/area_sbk/actor/pokey.c +++ b/src/battle/area_sbk/actor/pokey.c @@ -133,7 +133,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 4, .partCount = ARRAY_COUNT(N(partsTable_80218338)), .partsData = N(partsTable_80218338), - .script = N(init_80218534), + .script = &N(init_80218534), .statusTable = N(statusTable_8021828C), .escapeChance = 70, .airLiftChance = 90, diff --git a/src/battle/area_trd_part_1/actor/bill_blaster.c b/src/battle/area_trd_part_1/actor/bill_blaster.c index e1778064b8..1275b08f37 100644 --- a/src/battle/area_trd_part_1/actor/bill_blaster.c +++ b/src/battle/area_trd_part_1/actor/bill_blaster.c @@ -75,7 +75,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 4, .partCount = ARRAY_COUNT(N(partsTable_80219DD8)), .partsData = N(partsTable_80219DD8), - .script = N(init_80219E6C), + .script = &N(init_80219E6C), .statusTable = N(statusTable_80219D2C), .escapeChance = 0, .airLiftChance = 20, diff --git a/src/battle/area_trd_part_1/actor/bob_omb.c b/src/battle/area_trd_part_1/actor/bob_omb.c index 6bd9fe670f..7870a364a7 100644 --- a/src/battle/area_trd_part_1/actor/bob_omb.c +++ b/src/battle/area_trd_part_1/actor/bob_omb.c @@ -111,7 +111,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 3, .partCount = ARRAY_COUNT(N(partsTable_8021A70C)), .partsData = N(partsTable_8021A70C), - .script = N(init_8021A758), + .script = &N(init_8021A758), .statusTable = N(statusTable_8021A5B4), .escapeChance = 70, .airLiftChance = 90, diff --git a/src/battle/area_trd_part_1/actor/bullet_bill.c b/src/battle/area_trd_part_1/actor/bullet_bill.c index ff091e6e34..93f98df5ea 100644 --- a/src/battle/area_trd_part_1/actor/bullet_bill.c +++ b/src/battle/area_trd_part_1/actor/bullet_bill.c @@ -61,7 +61,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 2, .partCount = ARRAY_COUNT(N(partsTable_80219018)), .partsData = N(partsTable_80219018), - .script = N(init_80219088), + .script = &N(init_80219088), .statusTable = N(statusTable_80218F6C), .escapeChance = 50, .airLiftChance = 100, diff --git a/src/battle/area_trd_part_2/actor/blue_ninja_koopa.c b/src/battle/area_trd_part_2/actor/blue_ninja_koopa.c index 38b5fcc78f..859019e400 100644 --- a/src/battle/area_trd_part_2/actor/blue_ninja_koopa.c +++ b/src/battle/area_trd_part_2/actor/blue_ninja_koopa.c @@ -70,7 +70,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 5, .partCount = ARRAY_COUNT(N(partsTable_8022B564)), .partsData = N(partsTable_8022B564), - .script = N(init_8022DC2C), + .script = &N(init_8022DC2C), .statusTable = N(statusTable_8022B4B8), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_trd_part_2/actor/fake_bowser.c b/src/battle/area_trd_part_2/actor/fake_bowser.c index 67bde62944..47d3264d9f 100644 --- a/src/battle/area_trd_part_2/actor/fake_bowser.c +++ b/src/battle/area_trd_part_2/actor/fake_bowser.c @@ -218,7 +218,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 10, .partCount = ARRAY_COUNT(N(partsTable_8021A748)), .partsData = N(partsTable_8021A748), - .script = N(init_8021A968), + .script = &N(init_8021A968), .statusTable = N(statusTable_8021A690), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_trd_part_2/actor/green_ninja_koopa.c b/src/battle/area_trd_part_2/actor/green_ninja_koopa.c index 0d4398051c..1395c92b12 100644 --- a/src/battle/area_trd_part_2/actor/green_ninja_koopa.c +++ b/src/battle/area_trd_part_2/actor/green_ninja_koopa.c @@ -70,7 +70,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 5, .partCount = ARRAY_COUNT(N(partsTable_80225624)), .partsData = N(partsTable_80225624), - .script = N(init_80227CEC), + .script = &N(init_80227CEC), .statusTable = N(statusTable_80225578), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_trd_part_2/actor/red_ninja_koopa.c b/src/battle/area_trd_part_2/actor/red_ninja_koopa.c index 1f08a06adc..b1edec2ea1 100644 --- a/src/battle/area_trd_part_2/actor/red_ninja_koopa.c +++ b/src/battle/area_trd_part_2/actor/red_ninja_koopa.c @@ -70,7 +70,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 5, .partCount = ARRAY_COUNT(N(partsTable_802285C4)), .partsData = N(partsTable_802285C4), - .script = N(init_8022AC8C), + .script = &N(init_8022AC8C), .statusTable = N(statusTable_80228518), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_trd_part_2/actor/yellow_ninja_koopa.c b/src/battle/area_trd_part_2/actor/yellow_ninja_koopa.c index 1ee0db2ad6..abd9f3a882 100644 --- a/src/battle/area_trd_part_2/actor/yellow_ninja_koopa.c +++ b/src/battle/area_trd_part_2/actor/yellow_ninja_koopa.c @@ -70,7 +70,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 5, .partCount = ARRAY_COUNT(N(partsTable_8022E504)), .partsData = N(partsTable_8022E504), - .script = N(init_80230BCC), + .script = &N(init_80230BCC), .statusTable = N(statusTable_8022E458), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/area_trd_part_3/actor/eldstar.c b/src/battle/area_trd_part_3/actor/eldstar.c index 4e4b6f383d..f15fa4438f 100644 --- a/src/battle/area_trd_part_3/actor/eldstar.c +++ b/src/battle/area_trd_part_3/actor/eldstar.c @@ -71,7 +71,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_80218344)), .partsData = N(partsTable_80218344), - .script = N(init_80218390), + .script = &N(init_80218390), .statusTable = N(statusTable_80218298), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/battle.h b/src/battle/battle.h index badcd18a6f..c66d5c441c 100644 --- a/src/battle/battle.h +++ b/src/battle/battle.h @@ -239,7 +239,7 @@ typedef struct ActorBlueprint { /* 0x08 */ s16 partCount; /* 0x0A */ char unk_0A[2]; /* 0x0C */ struct ActorPartBlueprint* partsData; - /* 0x10 */ Bytecode* script; + /* 0x10 */ EvtScript* script; /* 0x14 */ s32* statusTable; /* 0x18 */ u8 escapeChance; /* 0x19 */ u8 airLiftChance; diff --git a/src/battle/common/actor/goomba.inc.c b/src/battle/common/actor/goomba.inc.c index 5345f22b78..0e398f5f48 100644 --- a/src/battle/common/actor/goomba.inc.c +++ b/src/battle/common/actor/goomba.inc.c @@ -58,7 +58,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 2, .partCount = ARRAY_COUNT(N(partsTable_80219808)), .partsData = N(partsTable_80219808), - .script = N(init_802198EC), + .script = &N(init_802198EC), .statusTable = N(statusTable_8021975C), .escapeChance = 90, .airLiftChance = 100, diff --git a/src/battle/common/actor/koopa_troopa.inc.c b/src/battle/common/actor/koopa_troopa.inc.c index 728c09e65d..06a26ba5a8 100644 --- a/src/battle/common/actor/koopa_troopa.inc.c +++ b/src/battle/common/actor/koopa_troopa.inc.c @@ -68,7 +68,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 4, .partCount = ARRAY_COUNT(N(partsTable_8021CA44)), .partsData = N(partsTable_8021CA44), - .script = N(init_8021CB74), + .script = &N(init_8021CB74), .statusTable = N(statusTable_8021C998), .escapeChance = 70, .airLiftChance = 90, diff --git a/src/battle/common/actor/medi_guy.inc.c b/src/battle/common/actor/medi_guy.inc.c index d9fa4089ce..db52dd4377 100644 --- a/src/battle/common/actor/medi_guy.inc.c +++ b/src/battle/common/actor/medi_guy.inc.c @@ -80,7 +80,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 7, .partCount = ARRAY_COUNT(N(partsTable_8021F99C)), .partsData = N(partsTable_8021F99C), - .script = N(init_8021F9E8), + .script = &N(init_8021F9E8), .statusTable = N(statusTable_8021F8F0), .escapeChance = 60, .airLiftChance = 90, diff --git a/src/battle/common/actor/paragoomba.inc.c b/src/battle/common/actor/paragoomba.inc.c index a425b24726..a88a26ce1e 100644 --- a/src/battle/common/actor/paragoomba.inc.c +++ b/src/battle/common/actor/paragoomba.inc.c @@ -129,7 +129,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 2, .partCount = ARRAY_COUNT(N(partsTable_8021B280)), .partsData = N(partsTable_8021B280), - .script = N(init_8021B3E8), + .script = &N(init_8021B3E8), .statusTable = N(statusTable_8021B1D4), .escapeChance = 90, .airLiftChance = 100, diff --git a/src/battle/common/actor/paratroopa.inc.c b/src/battle/common/actor/paratroopa.inc.c index 2c4f6274f7..ee32027a73 100644 --- a/src/battle/common/actor/paratroopa.inc.c +++ b/src/battle/common/actor/paratroopa.inc.c @@ -126,7 +126,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 4, .partCount = ARRAY_COUNT(N(partsTable_8021EC6C)), .partsData = N(partsTable_8021EC6C), - .script = N(init_8021EE0C), + .script = &N(init_8021EE0C), .statusTable = N(statusTable_8021EBC0), .escapeChance = 60, .airLiftChance = 95, diff --git a/src/battle/common/actor/putrid_piranha.inc.c b/src/battle/common/actor/putrid_piranha.inc.c index aa4e89d22a..81ee76d4f7 100644 --- a/src/battle/common/actor/putrid_piranha.inc.c +++ b/src/battle/common/actor/putrid_piranha.inc.c @@ -77,7 +77,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 12, .partCount = ARRAY_COUNT(N(partsTable_8021B1AC)), .partsData = N(partsTable_8021B1AC), - .script = N(init_8021B1F8), + .script = &N(init_8021B1F8), .statusTable = N(statusTable_8021B100), .escapeChance = 60, .airLiftChance = 20, diff --git a/src/battle/common/actor/spike_top.inc.c b/src/battle/common/actor/spike_top.inc.c index 9d6d916bdb..9888e69cc3 100644 --- a/src/battle/common/actor/spike_top.inc.c +++ b/src/battle/common/actor/spike_top.inc.c @@ -71,7 +71,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 4, .partCount = ARRAY_COUNT(N(partsTable_8021C984)), .partsData = N(partsTable_8021C984), - .script = N(init_8021CAAC), + .script = &N(init_8021CAAC), .statusTable = N(statusTable_8021C8D8), .escapeChance = 60, .airLiftChance = 70, diff --git a/src/battle/common/actor/spiked_goomba.inc.c b/src/battle/common/actor/spiked_goomba.inc.c index 2c673411f0..db549900f8 100644 --- a/src/battle/common/actor/spiked_goomba.inc.c +++ b/src/battle/common/actor/spiked_goomba.inc.c @@ -59,7 +59,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 2, .partCount = ARRAY_COUNT(N(partsTable_8021E468)), .partsData = N(partsTable_8021E468), - .script = N(init_8021E54C), + .script = &N(init_8021E54C), .statusTable = N(statusTable_8021E3BC), .escapeChance = 90, .airLiftChance = 95, diff --git a/src/battle/common/actor/white_magikoopa.inc.c b/src/battle/common/actor/white_magikoopa.inc.c index ef2c72a29e..4f4890a169 100644 --- a/src/battle/common/actor/white_magikoopa.inc.c +++ b/src/battle/common/actor/white_magikoopa.inc.c @@ -135,7 +135,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 11, .partCount = ARRAY_COUNT(N(partsTable_80223C90)), .partsData = N(partsTable_80223C90), - .script = N(init_80225F58), + .script = &N(init_80225F58), .statusTable = N(statusTable_80223B38), .escapeChance = 40, .airLiftChance = 80, @@ -158,7 +158,7 @@ ActorBlueprint N(flying) = { .maxHP = 11, .partCount = ARRAY_COUNT(N(partsTable_80223CB4)), .partsData = N(partsTable_80223CB4), - .script = N(init_80225FBC), + .script = &N(init_80225FBC), .statusTable = N(statusTable_80223BE4), .escapeChance = 40, .airLiftChance = 95, diff --git a/src/battle/partner/bombette.c b/src/battle/partner/bombette.c index 1123e9ce20..71b4f91e46 100644 --- a/src/battle/partner/bombette.c +++ b/src/battle/partner/bombette.c @@ -69,7 +69,7 @@ ApiStatus func_80238000_6FAD10(Evt* script, s32 isInitialCall) { ApiStatus func_80238244_6FAF54(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; - ActorMovement* partnerActorMovement = &partnerActor->state; + ActorState* partnerActorMovement = &partnerActor->state; if (isInitialCall) { partnerActor->state.currentPos.x = partnerActor->currentPos.x; @@ -306,7 +306,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_80238734)), .partsData = N(partsTable_80238734), - .script = N(init_80238780), + .script = &N(init_80238780), .statusTable = N(statusTable_80238688), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/partner/goombario.c b/src/battle/partner/goombario.c index e50ebbf79f..203bd1fac0 100644 --- a/src/battle/partner/goombario.c +++ b/src/battle/partner/goombario.c @@ -301,7 +301,7 @@ ActorBlueprint N(goombario) = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_802392A4)), .partsData = N(partsTable_802392A4), - .script = N(init_802392F0), + .script = &N(init_802392F0), .statusTable = N(statusTable_802391F8), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/battle/partner/goompa.c b/src/battle/partner/goompa.c index 7469a8ef1d..982ee951e5 100644 --- a/src/battle/partner/goompa.c +++ b/src/battle/partner/goompa.c @@ -64,7 +64,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_802380C4)), .partsData = N(partsTable_802380C4), - .script = N(init_80238110), + .script = &N(init_80238110), .statusTable = N(statusTable_80238018), .spinSmashReq = 4, .powerBounceChance = 80, diff --git a/src/battle/partner/kooper.c b/src/battle/partner/kooper.c index 6f5d1b233e..8091996893 100644 --- a/src/battle/partner/kooper.c +++ b/src/battle/partner/kooper.c @@ -28,7 +28,7 @@ extern EvtScript N(8023C754); ApiStatus func_80238000_6F5E80(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; - ActorMovement* partnerActorMovement = &partnerActor->state; + ActorState* partnerActorMovement = &partnerActor->state; if (isInitialCall) { partnerActor->state.currentPos.x = partnerActor->currentPos.x; @@ -191,7 +191,7 @@ ActorBlueprint NAMESPACE = { .maxHP = 99, .partCount = ARRAY_COUNT(N(partsTable_80238524)), .partsData = N(partsTable_80238524), - .script = N(init_80238570), + .script = &N(init_80238570), .statusTable = N(statusTable_80238478), .escapeChance = 0, .airLiftChance = 0, diff --git a/src/de740_len_23f0.c b/src/de740_len_23f0.c index 880bfc20b3..1de0e48187 100644 --- a/src/de740_len_23f0.c +++ b/src/de740_len_23f0.c @@ -1,10 +1,57 @@ #include "common.h" -INCLUDE_ASM(s32, "de740_len_23f0", clear_sprite_shading_data); +extern SpriteShadingProfile D_801595C0; +extern SpriteShadingProfile D_80159670; +extern SpriteShadingProfile D_80159720; +extern SpriteShadingProfile D_801597D0; -INCLUDE_ASM(s32, "de740_len_23f0", init_sprite_shading_data); +void init_sprite_shading_data(void); -INCLUDE_ASM(s32, "de740_len_23f0", sprite_shading_set_light_source); +void clear_sprite_shading_data(void) { + s32 i; + + init_sprite_shading_data(); + + for (i = 0; i < ARRAY_COUNT(D_80151328->sources); i++) { + D_80151328->sources[i].flags = 0; + D_801512B0->sources[i].flags = 0; + } + + D_80151328->flags = 0; + D_80151328->ambientColor.r = D_80151328->ambientColor.g = D_80151328->ambientColor.b = 50; + D_80151328->ambientPower = 10; + + D_801512B0->flags = 0; + D_801512B0->ambientColor.r = D_801512B0->ambientColor.g = D_801512B0->ambientColor.b = 50; + D_801512B0->ambientPower = 20; +} + +void init_sprite_shading_data(void) { + if (!gGameStatusPtr->isBattle) { + D_80151328 = &D_801595C0; + D_801512B0 = &D_80159720; + } else { + D_80151328 = &D_80159670; + D_801512B0 = &D_801597D0; + } +} + +void sprite_shading_set_light_source(u32 idx, s8 flags, f32 x, f32 y, f32 z, u8 r, u8 g, u8 b, f32 falloff, s8 arg9) { + SpriteShadingLightSource* lightSource; + + if (idx < ARRAY_COUNT(D_80151328->sources)) { + lightSource = &D_80151328->sources[idx]; + lightSource->flags = flags; + lightSource->pos.x = x; + lightSource->pos.y = y; + lightSource->pos.z = z; + lightSource->rgb.r = r; + lightSource->rgb.g = g; + lightSource->rgb.b = b; + lightSource->falloff = falloff; + lightSource->unk_14 = arg9; + } +} INCLUDE_ASM(s32, "de740_len_23f0", render_shaded_sprite); diff --git a/src/e0b30_len_b80.c b/src/e0b30_len_b80.c index d4df11a41a..91302725e6 100644 --- a/src/e0b30_len_b80.c +++ b/src/e0b30_len_b80.c @@ -17,9 +17,10 @@ MusicSettings D_8014F6F0 = { .unk_2C = 0 }; -s32 gSongsUsingVariationFlag[] = { SONG_SPECIAL_BATTLE, SONG_TUBBA_BLUBBA_BATTLE, SONG_JR_TROOPA_BATTLE, - SONG_YOSHI_KIDS_FOUND, SONG_ITEM_UPGRADE, SONG_NEW_PARTNER, - }; +s32 gSongsUsingVariationFlag[] = { + SONG_SPECIAL_BATTLE, SONG_TUBBA_BLUBBA_BATTLE, SONG_JR_TROOPA_BATTLE, SONG_YOSHI_KIDS_FOUND, SONG_ITEM_UPGRADE, + SONG_NEW_PARTNER, +}; s16 D_8014F738 = 0; diff --git a/src/evt/fx_api.c b/src/evt/fx_api.c index 66ab95c975..c7c0fe7442 100644 --- a/src/evt/fx_api.c +++ b/src/evt/fx_api.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "evt/fx_api", ShowEmote, Evt* script, s32 isInitialCall); ApiStatus RemoveEffect(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - remove_effect(evt_get_variable(script, *args++)); + remove_effect((EffectInstance*)evt_get_variable(script, *args++)); return ApiStatus_DONE2; } @@ -72,7 +72,7 @@ ApiStatus func_802D7BA4(Evt* script, s32 isInitialCall) { s32 var5 = script->varTable[5]; s32 var6 = script->varTable[6]; s32 temp; - f32 t0; + u8 t0; f32 t1; if (isInitialCall) { @@ -111,7 +111,7 @@ ApiStatus Spawn802D9D50(Evt* script, s32 isInitialCall) { s32 var5 = evt_get_variable(script, *args++); s32 var6 = evt_get_variable(script, *args++); - Evt* newScript = start_script(D_802D9D50, 1, 0); + Evt* newScript = start_script(&D_802D9D50, 1, 0); newScript->varTable[0] = var0; newScript->varTable[1] = var1; newScript->varTable[2] = var2; @@ -229,7 +229,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) { fx_star(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8); break; case EFFECT_EMOTE: - fx_emote(iVar1, (Npc* ) a2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp30); + fx_emote(iVar1, (Npc*)a2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp30); evt_set_variable(script, a8, sp30); break; case EFFECT_SPARKLES: @@ -273,7 +273,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) { fx_smoke_impact(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, fVar7, iVar8); break; case EFFECT_DAMAGE_INDICATOR: - fx_damage_indicator(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, &sp30); + fx_damage_indicator(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, (EffectInstance**)&sp30); evt_set_variable(script, a8, sp30); break; case EFFECT_PURPLE_RING: @@ -311,7 +311,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) { fx_windy_leaves(iVar1, fVar2, fVar3, fVar4); break; case EFFECT_FLAME: - fx_flame(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34); + fx_flame(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**)&sp34); evt_set_variable(script, a6, sp34); break; case EFFECT_FALLING_LEAVES: @@ -384,7 +384,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) { effectRet = fx_recover(iVar1, fVar2, fVar3, fVar4, iVar5); break; case EFFECT_DISABLE_X: - effectRet = fx_disable_x(iVar1, fVar2, fVar3, fVar4, iVar5); + effectRet = (EffectInstance*)fx_disable_x(iVar1, fVar2, fVar3, fVar4, iVar5); break; case EFFECT_BOMBETTE_BREAKING: effectRet = fx_bombette_breaking(iVar1, iVar2, iVar3, fVar4, iVar5, iVar6); @@ -399,7 +399,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) { effectRet = fx_snowfall(iVar1, iVar2); break; case EFFECT_46: - effectRet = fx_46(iVar1, a2, fVar3, iVar4); + effectRet = fx_46(iVar1, (EffectWhirlwind*)a2, fVar3, iVar4); break; case EFFECT_GATHER_MAGIC: effectRet = fx_gather_magic(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6); @@ -586,7 +586,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) { } if (effectRet != NULL) { - evt_set_variable(script, EVT_VAR(15), effectRet); + evt_set_variable(script, EVT_VAR(15), (s32)effectRet); } return ApiStatus_DONE2; diff --git a/src/hud_element.h b/src/hud_element.h index 784d0f9992..7d08e40fb5 100644 --- a/src/hud_element.h +++ b/src/hud_element.h @@ -191,6 +191,7 @@ void render_hud_elements_world(void); void func_80143C48(s32 arg0, s32 arg1, s32 arg2); void func_80144218(s32 arg0); +void func_80144238(s32 arg0); void func_80144258(s32 arg0); void func_80144278(s32 arg0); diff --git a/src/759b0_len_61b0.c b/src/npc_collision.c similarity index 97% rename from src/759b0_len_61b0.c rename to src/npc_collision.c index d8e95d7ed7..884d4b8dc1 100644 --- a/src/759b0_len_61b0.c +++ b/src/npc_collision.c @@ -440,10 +440,6 @@ s32 npc_raycast_up_corners(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32 return ret; } -s32 npc_raycast_general(s32 ignoreFlags, f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 dirZ, f32* hitX, - f32* hitY, f32* hitZ, f32* outDepth, f32* hitNx, f32* hitNy, f32* hitNz); -// Dumb float regalloc -#ifdef NON_EQUIVALENT s32 npc_raycast_general(s32 flags, f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 dirZ, f32* hitX, f32* hitY, f32* hitZ, f32* outDepth, f32* hitNx, f32* hitNy, f32* hitNz) { s32 ret; @@ -468,13 +464,12 @@ s32 npc_raycast_general(s32 flags, f32 startX, f32 startY, f32 startZ, f32 dirX, if (entityID >= 0) { ret = entityID | 0x4000; } + + // TODO required to match + if ((s32)startY && startY && startY); } return ret; } -#else -INCLUDE_ASM(s32, "759b0_len_61b0", npc_raycast_general, s32 ignoreFlags, f32 startX, f32 startY, f32 startZ, f32 dirX, - f32 dirY, f32 dirZ, f32* hitX, f32* hitY, f32* hitZ, f32* outDepth, f32* hitNx, f32* hitNy, f32* hitNz); -#endif void npc_get_slip_vector(f32* outX, f32* outZ, f32 aX, f32 aZ, f32 bX, f32 bZ) { f32 dotProduct = (aX * bX) + (aZ * bZ); diff --git a/src/world/script_api/7E0E80.c b/src/world/script_api/7E0E80.c index 2a9f1cb7a8..0081e6de5d 100644 --- a/src/world/script_api/7E0E80.c +++ b/src/world/script_api/7E0E80.c @@ -361,7 +361,6 @@ ApiStatus ShowShopPurchaseDialog(Evt* script, s32 isInitialCall) { //dumb stuff #ifdef NON_EQUIVALENT -extern HudScriptAnim* gItemHudScripts[337][2]; void shop_open_item_select_popup(s32 mode) { Shop* shop = gGameStatusPtr->mapShop; diff --git a/tools/symz.txt b/tools/symz.txt index bfb7e560e7..5b9b355182 100644 --- a/tools/symz.txt +++ b/tools/symz.txt @@ -555,8 +555,6 @@ D_8029FB4C = 0x8029FB4C; D_8029FB50 = 0x8029FB50; D_8029FB54 = 0x8029FB54; D_8029FB60 = 0x8029FB60; -D_8029FB64 = 0x8029FB64; -D_8029FB68 = 0x8029FB68; D_8029FB6C = 0x8029FB6C; D_8029FB70 = 0x8029FB70; D_8029FB74 = 0x8029FB74; diff --git a/ver/us/asm/nonmatchings/17FEB0/calc_item_damage_enemy.s b/ver/us/asm/nonmatchings/17FEB0/calc_item_damage_enemy.s deleted file mode 100644 index 53c011e53c..0000000000 --- a/ver/us/asm/nonmatchings/17FEB0/calc_item_damage_enemy.s +++ /dev/null @@ -1,1139 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel calc_item_damage_enemy -/* 17FFC8 802516E8 27BDFFA8 */ addiu $sp, $sp, -0x58 -/* 17FFCC 802516EC AFB40040 */ sw $s4, 0x40($sp) -/* 17FFD0 802516F0 3C14800E */ lui $s4, %hi(gBattleStatus) -/* 17FFD4 802516F4 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus) -/* 17FFD8 802516F8 AFBF0054 */ sw $ra, 0x54($sp) -/* 17FFDC 802516FC AFBE0050 */ sw $fp, 0x50($sp) -/* 17FFE0 80251700 AFB7004C */ sw $s7, 0x4c($sp) -/* 17FFE4 80251704 AFB60048 */ sw $s6, 0x48($sp) -/* 17FFE8 80251708 AFB50044 */ sw $s5, 0x44($sp) -/* 17FFEC 8025170C AFB3003C */ sw $s3, 0x3c($sp) -/* 17FFF0 80251710 AFB20038 */ sw $s2, 0x38($sp) -/* 17FFF4 80251714 AFB10034 */ sw $s1, 0x34($sp) -/* 17FFF8 80251718 AFB00030 */ sw $s0, 0x30($sp) -/* 17FFFC 8025171C AFA0001C */ sw $zero, 0x1c($sp) -/* 180000 80251720 AFA00024 */ sw $zero, 0x24($sp) -/* 180004 80251724 AFA00028 */ sw $zero, 0x28($sp) -/* 180008 80251728 AFA0002C */ sw $zero, 0x2c($sp) -/* 18000C 8025172C 8E9600D8 */ lw $s6, 0xd8($s4) -/* 180010 80251730 968201A0 */ lhu $v0, 0x1a0($s4) -/* 180014 80251734 869101A0 */ lh $s1, 0x1a0($s4) -/* 180018 80251738 928301A2 */ lbu $v1, 0x1a2($s4) -/* 18001C 8025173C 8E9200DC */ lw $s2, 0xdc($s4) -/* 180020 80251740 829001A2 */ lb $s0, 0x1a2($s4) -/* 180024 80251744 0000A82D */ daddu $s5, $zero, $zero -/* 180028 80251748 A2800199 */ sb $zero, 0x199($s4) -/* 18002C 8025174C A6800180 */ sh $zero, 0x180($s4) -/* 180030 80251750 96C50192 */ lhu $a1, 0x192($s6) -/* 180034 80251754 0220202D */ daddu $a0, $s1, $zero -/* 180038 80251758 A68201A4 */ sh $v0, 0x1a4($s4) -/* 18003C 8025175C A28301A6 */ sb $v1, 0x1a6($s4) -/* 180040 80251760 0C09A75B */ jal get_actor -/* 180044 80251764 A68501A8 */ sh $a1, 0x1a8($s4) -/* 180048 80251768 0040982D */ daddu $s3, $v0, $zero -/* 18004C 8025176C 16600003 */ bnez $s3, .L8025177C -/* 180050 80251770 0260202D */ daddu $a0, $s3, $zero -/* 180054 80251774 080949BE */ j .L802526F8 -/* 180058 80251778 02A0102D */ daddu $v0, $s5, $zero -.L8025177C: -/* 18005C 8025177C 0C099117 */ jal get_actor_part -/* 180060 80251780 0200282D */ daddu $a1, $s0, $zero -/* 180064 80251784 0040B82D */ daddu $s7, $v0, $zero -/* 180068 80251788 56E00003 */ bnel $s7, $zero, .L80251798 -/* 18006C 8025178C 32310700 */ andi $s1, $s1, 0x700 -.L80251790: -/* 180070 80251790 080945E4 */ j .L80251790 -/* 180074 80251794 00000000 */ nop -.L80251798: -/* 180078 80251798 A66001F8 */ sh $zero, 0x1f8($s3) -/* 18007C 8025179C 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 180080 802517A0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 180084 802517A4 3C030008 */ lui $v1, 8 -/* 180088 802517A8 00431024 */ and $v0, $v0, $v1 -/* 18008C 802517AC 14400003 */ bnez $v0, .L802517BC -/* 180090 802517B0 AFB10020 */ sw $s1, 0x20($sp) -/* 180094 802517B4 080945F0 */ j .L802517C0 -/* 180098 802517B8 26D1000C */ addiu $s1, $s6, 0xc -.L802517BC: -/* 18009C 802517BC 2651000C */ addiu $s1, $s2, 0xc -.L802517C0: -/* 1800A0 802517C0 8E820188 */ lw $v0, 0x188($s4) -/* 1800A4 802517C4 30420002 */ andi $v0, $v0, 2 -/* 1800A8 802517C8 10400010 */ beqz $v0, .L8025180C -/* 1800AC 802517CC 0000202D */ daddu $a0, $zero, $zero -/* 1800B0 802517D0 C6240014 */ lwc1 $f4, 0x14($s1) -/* 1800B4 802517D4 3C0140A0 */ lui $at, 0x40a0 -/* 1800B8 802517D8 44810000 */ mtc1 $at, $f0 -/* 1800BC 802517DC 3C013F80 */ lui $at, 0x3f80 -/* 1800C0 802517E0 44811000 */ mtc1 $at, $f2 -/* 1800C4 802517E4 24020018 */ addiu $v0, $zero, 0x18 -/* 1800C8 802517E8 AFA20014 */ sw $v0, 0x14($sp) -/* 1800CC 802517EC 46002100 */ add.s $f4, $f4, $f0 -/* 1800D0 802517F0 E7A20010 */ swc1 $f2, 0x10($sp) -/* 1800D4 802517F4 8E25000C */ lw $a1, 0xc($s1) -/* 1800D8 802517F8 8E260010 */ lw $a2, 0x10($s1) -/* 1800DC 802517FC 44072000 */ mfc1 $a3, $f4 -/* 1800E0 80251800 24080001 */ addiu $t0, $zero, 1 -/* 1800E4 80251804 0C01C184 */ jal fx_ring_blast -/* 1800E8 80251808 AFA80024 */ sw $t0, 0x24($sp) -.L8025180C: -/* 1800EC 8025180C 8E820188 */ lw $v0, 0x188($s4) -/* 1800F0 80251810 30420020 */ andi $v0, $v0, 0x20 -/* 1800F4 80251814 10400005 */ beqz $v0, .L8025182C -/* 1800F8 80251818 00000000 */ nop -/* 1800FC 8025181C 0C09451D */ jal func_80251474 -/* 180100 80251820 0260202D */ daddu $a0, $s3, $zero -/* 180104 80251824 24080001 */ addiu $t0, $zero, 1 -/* 180108 80251828 AFA80028 */ sw $t0, 0x28($sp) -.L8025182C: -/* 18010C 8025182C 8E820188 */ lw $v0, 0x188($s4) -/* 180110 80251830 30420004 */ andi $v0, $v0, 4 -/* 180114 80251834 1040000E */ beqz $v0, .L80251870 -/* 180118 80251838 24020018 */ addiu $v0, $zero, 0x18 -/* 18011C 8025183C C6240014 */ lwc1 $f4, 0x14($s1) -/* 180120 80251840 3C0140A0 */ lui $at, 0x40a0 -/* 180124 80251844 44810000 */ mtc1 $at, $f0 -/* 180128 80251848 3C013F80 */ lui $at, 0x3f80 -/* 18012C 8025184C 44811000 */ mtc1 $at, $f2 -/* 180130 80251850 AFA20014 */ sw $v0, 0x14($sp) -/* 180134 80251854 46002100 */ add.s $f4, $f4, $f0 -/* 180138 80251858 E7A20010 */ swc1 $f2, 0x10($sp) -/* 18013C 8025185C 8E25000C */ lw $a1, 0xc($s1) -/* 180140 80251860 8E260010 */ lw $a2, 0x10($s1) -/* 180144 80251864 44072000 */ mfc1 $a3, $f4 -/* 180148 80251868 0C01C70C */ jal fx_water_splash -/* 18014C 8025186C 0000202D */ daddu $a0, $zero, $zero -.L80251870: -/* 180150 80251870 8E820188 */ lw $v0, 0x188($s4) -/* 180154 80251874 30420008 */ andi $v0, $v0, 8 -/* 180158 80251878 1040000C */ beqz $v0, .L802518AC -/* 18015C 8025187C 0000202D */ daddu $a0, $zero, $zero -/* 180160 80251880 C6220014 */ lwc1 $f2, 0x14($s1) -/* 180164 80251884 3C0140A0 */ lui $at, 0x40a0 -/* 180168 80251888 44810000 */ mtc1 $at, $f0 -/* 18016C 8025188C 00000000 */ nop -/* 180170 80251890 46001080 */ add.s $f2, $f2, $f0 -/* 180174 80251894 8E25000C */ lw $a1, 0xc($s1) -/* 180178 80251898 8E260010 */ lw $a2, 0x10($s1) -/* 18017C 8025189C 44071000 */ mfc1 $a3, $f2 -/* 180180 802518A0 24080001 */ addiu $t0, $zero, 1 -/* 180184 802518A4 0C01C2A4 */ jal fx_big_snowflakes -/* 180188 802518A8 AFA8002C */ sw $t0, 0x2c($sp) -.L802518AC: -/* 18018C 802518AC 8E850188 */ lw $a1, 0x188($s4) -/* 180190 802518B0 3C020040 */ lui $v0, 0x40 -/* 180194 802518B4 00A21024 */ and $v0, $a1, $v0 -/* 180198 802518B8 1440000F */ bnez $v0, .L802518F8 -/* 18019C 802518BC 00000000 */ nop -/* 1801A0 802518C0 8EE4007C */ lw $a0, 0x7c($s7) -/* 1801A4 802518C4 30820020 */ andi $v0, $a0, 0x20 -/* 1801A8 802518C8 1440038B */ bnez $v0, .L802526F8 -/* 1801AC 802518CC 24020006 */ addiu $v0, $zero, 6 -/* 1801B0 802518D0 82630218 */ lb $v1, 0x218($s3) -/* 1801B4 802518D4 2402000E */ addiu $v0, $zero, 0xe -/* 1801B8 802518D8 10620005 */ beq $v1, $v0, .L802518F0 -/* 1801BC 802518DC 30820800 */ andi $v0, $a0, 0x800 -/* 1801C0 802518E0 10400005 */ beqz $v0, .L802518F8 -/* 1801C4 802518E4 30A20800 */ andi $v0, $a1, 0x800 -/* 1801C8 802518E8 14400003 */ bnez $v0, .L802518F8 -/* 1801CC 802518EC 00000000 */ nop -.L802518F0: -/* 1801D0 802518F0 080949BE */ j .L802526F8 -/* 1801D4 802518F4 24020006 */ addiu $v0, $zero, 6 -.L802518F8: -/* 1801D8 802518F8 82630214 */ lb $v1, 0x214($s3) -/* 1801DC 802518FC 2402000C */ addiu $v0, $zero, 0xc -/* 1801E0 80251900 1462001B */ bne $v1, $v0, .L80251970 -/* 1801E4 80251904 3C03000C */ lui $v1, 0xc -/* 1801E8 80251908 C6200014 */ lwc1 $f0, 0x14($s1) -/* 1801EC 8025190C 2404010C */ addiu $a0, $zero, 0x10c -/* 1801F0 80251910 E7A00010 */ swc1 $f0, 0x10($sp) -/* 1801F4 80251914 8E26000C */ lw $a2, 0xc($s1) -/* 1801F8 80251918 8E270010 */ lw $a3, 0x10($s1) -/* 1801FC 8025191C 0C052757 */ jal sfx_play_sound_at_position -/* 180200 80251920 0000282D */ daddu $a1, $zero, $zero -/* 180204 80251924 24020001 */ addiu $v0, $zero, 1 -/* 180208 80251928 AFA20010 */ sw $v0, 0x10($sp) -/* 18020C 8025192C AFA20014 */ sw $v0, 0x14($sp) -/* 180210 80251930 C62C000C */ lwc1 $f12, 0xc($s1) -/* 180214 80251934 C62E0010 */ lwc1 $f14, 0x10($s1) -/* 180218 80251938 8E260014 */ lw $a2, 0x14($s1) -/* 18021C 8025193C 0C093BF8 */ jal func_8024EFE0 -/* 180220 80251940 0000382D */ daddu $a3, $zero, $zero -/* 180224 80251944 AFA00010 */ sw $zero, 0x10($sp) -/* 180228 80251948 C62C000C */ lwc1 $f12, 0xc($s1) -/* 18022C 8025194C C62E0010 */ lwc1 $f14, 0x10($s1) -/* 180230 80251950 8E260014 */ lw $a2, 0x14($s1) -/* 180234 80251954 0C09996B */ jal show_damage_popup -/* 180238 80251958 0000382D */ daddu $a3, $zero, $zero -/* 18023C 8025195C 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 180240 80251960 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 180244 80251964 30420240 */ andi $v0, $v0, 0x240 -/* 180248 80251968 080949BE */ j .L802526F8 -/* 18024C 8025196C 0002102B */ sltu $v0, $zero, $v0 -.L80251970: -/* 180250 80251970 8EE20080 */ lw $v0, 0x80($s7) -/* 180254 80251974 8E840188 */ lw $a0, 0x188($s4) -/* 180258 80251978 00441024 */ and $v0, $v0, $a0 -/* 18025C 8025197C 0002102B */ sltu $v0, $zero, $v0 -/* 180260 80251980 AFA20018 */ sw $v0, 0x18($sp) -/* 180264 80251984 8EE2007C */ lw $v0, 0x7c($s7) -/* 180268 80251988 00431024 */ and $v0, $v0, $v1 -/* 18026C 8025198C 10400004 */ beqz $v0, .L802519A0 -/* 180270 80251990 3C02F7FF */ lui $v0, 0xf7ff -/* 180274 80251994 3442FFFF */ ori $v0, $v0, 0xffff -/* 180278 80251998 00821024 */ and $v0, $a0, $v0 -/* 18027C 8025199C AE820188 */ sw $v0, 0x188($s4) -.L802519A0: -/* 180280 802519A0 8EE50078 */ lw $a1, 0x78($s7) -/* 180284 802519A4 8E860188 */ lw $a2, 0x188($s4) -/* 180288 802519A8 0C0998AF */ jal get_defense -/* 18028C 802519AC 0260202D */ daddu $a0, $s3, $zero -/* 180290 802519B0 0040802D */ daddu $s0, $v0, $zero -/* 180294 802519B4 8E820188 */ lw $v0, 0x188($s4) -/* 180298 802519B8 3C030800 */ lui $v1, 0x800 -/* 18029C 802519BC 00431024 */ and $v0, $v0, $v1 -/* 1802A0 802519C0 14400003 */ bnez $v0, .L802519D0 -/* 1802A4 802519C4 00000000 */ nop -/* 1802A8 802519C8 82620222 */ lb $v0, 0x222($s3) -/* 1802AC 802519CC 02028021 */ addu $s0, $s0, $v0 -.L802519D0: -/* 1802B0 802519D0 8684017E */ lh $a0, 0x17e($s4) -/* 1802B4 802519D4 28820064 */ slti $v0, $a0, 0x64 -/* 1802B8 802519D8 50400001 */ beql $v0, $zero, .L802519E0 -/* 1802BC 802519DC 24040063 */ addiu $a0, $zero, 0x63 -.L802519E0: -/* 1802C0 802519E0 58800001 */ blezl $a0, .L802519E8 -/* 1802C4 802519E4 0000802D */ daddu $s0, $zero, $zero -.L802519E8: -/* 1802C8 802519E8 00902023 */ subu $a0, $a0, $s0 -/* 1802CC 802519EC 1C800014 */ bgtz $a0, .L80251A40 -/* 1802D0 802519F0 A66001FA */ sh $zero, 0x1fa($s3) -/* 1802D4 802519F4 A66001FA */ sh $zero, 0x1fa($s3) -/* 1802D8 802519F8 8E820188 */ lw $v0, 0x188($s4) -/* 1802DC 802519FC 3C034000 */ lui $v1, 0x4000 -/* 1802E0 80251A00 00431024 */ and $v0, $v0, $v1 -/* 1802E4 80251A04 1440000B */ bnez $v0, .L80251A34 -/* 1802E8 80251A08 241E0002 */ addiu $fp, $zero, 2 -/* 1802EC 80251A0C 24120017 */ addiu $s2, $zero, 0x17 -/* 1802F0 80251A10 C6200014 */ lwc1 $f0, 0x14($s1) -/* 1802F4 80251A14 2404010C */ addiu $a0, $zero, 0x10c -/* 1802F8 80251A18 E7A00010 */ swc1 $f0, 0x10($sp) -/* 1802FC 80251A1C 8E26000C */ lw $a2, 0xc($s1) -/* 180300 80251A20 8E270010 */ lw $a3, 0x10($s1) -/* 180304 80251A24 0C052757 */ jal sfx_play_sound_at_position -/* 180308 80251A28 0000282D */ daddu $a1, $zero, $zero -/* 18030C 80251A2C 080946B0 */ j .L80251AC0 -/* 180310 80251A30 A6800180 */ sh $zero, 0x180($s4) -.L80251A34: -/* 180314 80251A34 24120017 */ addiu $s2, $zero, 0x17 -/* 180318 80251A38 080946B0 */ j .L80251AC0 -/* 18031C 80251A3C A6800180 */ sh $zero, 0x180($s4) -.L80251A40: -/* 180320 80251A40 24120009 */ addiu $s2, $zero, 9 -/* 180324 80251A44 966201FC */ lhu $v0, 0x1fc($s3) -/* 180328 80251A48 966301FA */ lhu $v1, 0x1fa($s3) -/* 18032C 80251A4C 00441021 */ addu $v0, $v0, $a0 -/* 180330 80251A50 00641823 */ subu $v1, $v1, $a0 -/* 180334 80251A54 A66201FC */ sh $v0, 0x1fc($s3) -/* 180338 80251A58 A66301FA */ sh $v1, 0x1fa($s3) -/* 18033C 80251A5C A6800180 */ sh $zero, 0x180($s4) -/* 180340 80251A60 8EE20000 */ lw $v0, ($s7) -/* 180344 80251A64 30422000 */ andi $v0, $v0, 0x2000 -/* 180348 80251A68 14400010 */ bnez $v0, .L80251AAC -/* 18034C 80251A6C 0000F02D */ daddu $fp, $zero, $zero -/* 180350 80251A70 8FA80018 */ lw $t0, 0x18($sp) -/* 180354 80251A74 1500000D */ bnez $t0, .L80251AAC -/* 180358 80251A78 00000000 */ nop -/* 18035C 80251A7C 8EE20004 */ lw $v0, 4($s7) -/* 180360 80251A80 30420004 */ andi $v0, $v0, 4 -/* 180364 80251A84 14400009 */ bnez $v0, .L80251AAC -/* 180368 80251A88 00000000 */ nop -/* 18036C 80251A8C 926201B8 */ lbu $v0, 0x1b8($s3) -/* 180370 80251A90 00441023 */ subu $v0, $v0, $a0 -/* 180374 80251A94 A26201B8 */ sb $v0, 0x1b8($s3) -/* 180378 80251A98 00021600 */ sll $v0, $v0, 0x18 -/* 18037C 80251A9C 1C400003 */ bgtz $v0, .L80251AAC -/* 180380 80251AA0 00000000 */ nop -/* 180384 80251AA4 A26001B8 */ sb $zero, 0x1b8($s3) -/* 180388 80251AA8 24120020 */ addiu $s2, $zero, 0x20 -.L80251AAC: -/* 18038C 80251AAC 96820180 */ lhu $v0, 0x180($s4) -/* 180390 80251AB0 00441021 */ addu $v0, $v0, $a0 -/* 180394 80251AB4 A6820180 */ sh $v0, 0x180($s4) -/* 180398 80251AB8 A66201F8 */ sh $v0, 0x1f8($s3) -/* 18039C 80251ABC A66001FA */ sh $zero, 0x1fa($s3) -.L80251AC0: -/* 1803A0 80251AC0 8EE20000 */ lw $v0, ($s7) -/* 1803A4 80251AC4 30422000 */ andi $v0, $v0, 0x2000 -/* 1803A8 80251AC8 10400015 */ beqz $v0, .L80251B20 -/* 1803AC 80251ACC 0260202D */ daddu $a0, $s3, $zero -/* 1803B0 80251AD0 0C09DC58 */ jal dispatch_event_actor -/* 1803B4 80251AD4 0240282D */ daddu $a1, $s2, $zero -/* 1803B8 80251AD8 24020001 */ addiu $v0, $zero, 1 -/* 1803BC 80251ADC AFA20010 */ sw $v0, 0x10($sp) -/* 1803C0 80251AE0 24020003 */ addiu $v0, $zero, 3 -/* 1803C4 80251AE4 AFA20014 */ sw $v0, 0x14($sp) -/* 1803C8 80251AE8 C62C000C */ lwc1 $f12, 0xc($s1) -/* 1803CC 80251AEC C62E0010 */ lwc1 $f14, 0x10($s1) -/* 1803D0 80251AF0 8E260014 */ lw $a2, 0x14($s1) -/* 1803D4 80251AF4 0C093BF8 */ jal func_8024EFE0 -/* 1803D8 80251AF8 0000382D */ daddu $a3, $zero, $zero -/* 1803DC 80251AFC C6200014 */ lwc1 $f0, 0x14($s1) -/* 1803E0 80251B00 2404010C */ addiu $a0, $zero, 0x10c -/* 1803E4 80251B04 E7A00010 */ swc1 $f0, 0x10($sp) -/* 1803E8 80251B08 8E26000C */ lw $a2, 0xc($s1) -/* 1803EC 80251B0C 8E270010 */ lw $a3, 0x10($s1) -/* 1803F0 80251B10 0C052757 */ jal sfx_play_sound_at_position -/* 1803F4 80251B14 0000282D */ daddu $a1, $zero, $zero -/* 1803F8 80251B18 080949BE */ j .L802526F8 -/* 1803FC 80251B1C 24020002 */ addiu $v0, $zero, 2 -.L80251B20: -/* 180400 80251B20 8E820188 */ lw $v0, 0x188($s4) -/* 180404 80251B24 30422000 */ andi $v0, $v0, 0x2000 -/* 180408 80251B28 10400004 */ beqz $v0, .L80251B3C -/* 18040C 80251B2C 00000000 */ nop -/* 180410 80251B30 A6800180 */ sh $zero, 0x180($s4) -/* 180414 80251B34 24120020 */ addiu $s2, $zero, 0x20 -/* 180418 80251B38 0000F02D */ daddu $fp, $zero, $zero -.L80251B3C: -/* 18041C 80251B3C 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 180420 80251B40 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 180424 80251B44 30420020 */ andi $v0, $v0, 0x20 -/* 180428 80251B48 1040000D */ beqz $v0, .L80251B80 -/* 18042C 80251B4C 24020009 */ addiu $v0, $zero, 9 -/* 180430 80251B50 52420001 */ beql $s2, $v0, .L80251B58 -/* 180434 80251B54 2412000A */ addiu $s2, $zero, 0xa -.L80251B58: -/* 180438 80251B58 24020017 */ addiu $v0, $zero, 0x17 -/* 18043C 80251B5C 52420001 */ beql $s2, $v0, .L80251B64 -/* 180440 80251B60 24120019 */ addiu $s2, $zero, 0x19 -.L80251B64: -/* 180444 80251B64 826201B8 */ lb $v0, 0x1b8($s3) -/* 180448 80251B68 1C400008 */ bgtz $v0, .L80251B8C -/* 18044C 80251B6C 24020019 */ addiu $v0, $zero, 0x19 -/* 180450 80251B70 52420006 */ beql $s2, $v0, .L80251B8C -/* 180454 80251B74 24120020 */ addiu $s2, $zero, 0x20 -/* 180458 80251B78 080946E3 */ j .L80251B8C -/* 18045C 80251B7C 00000000 */ nop -.L80251B80: -/* 180460 80251B80 24020020 */ addiu $v0, $zero, 0x20 -/* 180464 80251B84 52420001 */ beql $s2, $v0, .L80251B8C -/* 180468 80251B88 24120009 */ addiu $s2, $zero, 9 -.L80251B8C: -/* 18046C 80251B8C 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 180470 80251B90 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 180474 80251B94 30420020 */ andi $v0, $v0, 0x20 -/* 180478 80251B98 10400014 */ beqz $v0, .L80251BEC -/* 18047C 80251B9C 3C040040 */ lui $a0, 0x40 -/* 180480 80251BA0 8E820188 */ lw $v0, 0x188($s4) -/* 180484 80251BA4 00441024 */ and $v0, $v0, $a0 -/* 180488 80251BA8 10400039 */ beqz $v0, .L80251C90 -/* 18048C 80251BAC 3C020004 */ lui $v0, 4 -/* 180490 80251BB0 8EE3007C */ lw $v1, 0x7c($s7) -/* 180494 80251BB4 00621024 */ and $v0, $v1, $v0 -/* 180498 80251BB8 10400003 */ beqz $v0, .L80251BC8 -/* 18049C 80251BBC 24120019 */ addiu $s2, $zero, 0x19 -/* 1804A0 80251BC0 24120013 */ addiu $s2, $zero, 0x13 -/* 1804A4 80251BC4 24150001 */ addiu $s5, $zero, 1 -.L80251BC8: -/* 1804A8 80251BC8 00641024 */ and $v0, $v1, $a0 -/* 1804AC 80251BCC 10400003 */ beqz $v0, .L80251BDC -/* 1804B0 80251BD0 3C020008 */ lui $v0, 8 -/* 1804B4 80251BD4 24120013 */ addiu $s2, $zero, 0x13 -/* 1804B8 80251BD8 24150001 */ addiu $s5, $zero, 1 -.L80251BDC: -/* 1804BC 80251BDC 00621024 */ and $v0, $v1, $v0 -/* 1804C0 80251BE0 54400001 */ bnel $v0, $zero, .L80251BE8 -/* 1804C4 80251BE4 2412001D */ addiu $s2, $zero, 0x1d -.L80251BE8: -/* 1804C8 80251BE8 0000F02D */ daddu $fp, $zero, $zero -.L80251BEC: -/* 1804CC 80251BEC 8E820188 */ lw $v0, 0x188($s4) -/* 1804D0 80251BF0 3C030040 */ lui $v1, 0x40 -/* 1804D4 80251BF4 00431024 */ and $v0, $v0, $v1 -/* 1804D8 80251BF8 10400025 */ beqz $v0, .L80251C90 -/* 1804DC 80251BFC 00000000 */ nop -/* 1804E0 80251C00 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1804E4 80251C04 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 1804E8 80251C08 30420020 */ andi $v0, $v0, 0x20 -/* 1804EC 80251C0C 104000F4 */ beqz $v0, .L80251FE0 -/* 1804F0 80251C10 00000000 */ nop -/* 1804F4 80251C14 82620221 */ lb $v0, 0x221($s3) -/* 1804F8 80251C18 1C40000A */ bgtz $v0, .L80251C44 -/* 1804FC 80251C1C 00000000 */ nop -/* 180500 80251C20 82620222 */ lb $v0, 0x222($s3) -/* 180504 80251C24 1C400007 */ bgtz $v0, .L80251C44 -/* 180508 80251C28 00000000 */ nop -/* 18050C 80251C2C 82620212 */ lb $v0, 0x212($s3) -/* 180510 80251C30 54400006 */ bnel $v0, $zero, .L80251C4C -/* 180514 80251C34 2412000A */ addiu $s2, $zero, 0xa -/* 180518 80251C38 82620218 */ lb $v0, 0x218($s3) -/* 18051C 80251C3C 10400014 */ beqz $v0, .L80251C90 -/* 180520 80251C40 00000000 */ nop -.L80251C44: -/* 180524 80251C44 82620212 */ lb $v0, 0x212($s3) -/* 180528 80251C48 2412000A */ addiu $s2, $zero, 0xa -.L80251C4C: -/* 18052C 80251C4C A2600221 */ sb $zero, 0x221($s3) -/* 180530 80251C50 A2600222 */ sb $zero, 0x222($s3) -/* 180534 80251C54 10400005 */ beqz $v0, .L80251C6C -/* 180538 80251C58 A2600220 */ sb $zero, 0x220($s3) -/* 18053C 80251C5C 86640436 */ lh $a0, 0x436($s3) -/* 180540 80251C60 A2600212 */ sb $zero, 0x212($s3) -/* 180544 80251C64 0C011E68 */ jal remove_status_static -/* 180548 80251C68 A2600213 */ sb $zero, 0x213($s3) -.L80251C6C: -/* 18054C 80251C6C 82620218 */ lb $v0, 0x218($s3) -/* 180550 80251C70 10400006 */ beqz $v0, .L80251C8C -/* 180554 80251C74 24150001 */ addiu $s5, $zero, 1 -/* 180558 80251C78 86640436 */ lh $a0, 0x436($s3) -/* 18055C 80251C7C A2600218 */ sb $zero, 0x218($s3) -/* 180560 80251C80 0C011EAA */ jal remove_status_transparent -/* 180564 80251C84 A2600219 */ sb $zero, 0x219($s3) -/* 180568 80251C88 24150001 */ addiu $s5, $zero, 1 -.L80251C8C: -/* 18056C 80251C8C 0000F02D */ daddu $fp, $zero, $zero -.L80251C90: -/* 180570 80251C90 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 180574 80251C94 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 180578 80251C98 30420020 */ andi $v0, $v0, 0x20 -/* 18057C 80251C9C 104000D0 */ beqz $v0, .L80251FE0 -/* 180580 80251CA0 3C030080 */ lui $v1, 0x80 -/* 180584 80251CA4 8E820188 */ lw $v0, 0x188($s4) -/* 180588 80251CA8 00431024 */ and $v0, $v0, $v1 -/* 18058C 80251CAC 1040000D */ beqz $v0, .L80251CE4 -/* 180590 80251CB0 3C020004 */ lui $v0, 4 -/* 180594 80251CB4 8EE3007C */ lw $v1, 0x7c($s7) -/* 180598 80251CB8 00621024 */ and $v0, $v1, $v0 -/* 18059C 80251CBC 10400003 */ beqz $v0, .L80251CCC -/* 1805A0 80251CC0 24120019 */ addiu $s2, $zero, 0x19 -/* 1805A4 80251CC4 24120014 */ addiu $s2, $zero, 0x14 -/* 1805A8 80251CC8 24150001 */ addiu $s5, $zero, 1 -.L80251CCC: -/* 1805AC 80251CCC 3C020008 */ lui $v0, 8 -/* 1805B0 80251CD0 00621024 */ and $v0, $v1, $v0 -/* 1805B4 80251CD4 10400003 */ beqz $v0, .L80251CE4 -/* 1805B8 80251CD8 00000000 */ nop -/* 1805BC 80251CDC 24120014 */ addiu $s2, $zero, 0x14 -/* 1805C0 80251CE0 24150001 */ addiu $s5, $zero, 1 -.L80251CE4: -/* 1805C4 80251CE4 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1805C8 80251CE8 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 1805CC 80251CEC 30420020 */ andi $v0, $v0, 0x20 -/* 1805D0 80251CF0 104000BB */ beqz $v0, .L80251FE0 -/* 1805D4 80251CF4 3C030400 */ lui $v1, 0x400 -/* 1805D8 80251CF8 8E820188 */ lw $v0, 0x188($s4) -/* 1805DC 80251CFC 00431024 */ and $v0, $v0, $v1 -/* 1805E0 80251D00 10400006 */ beqz $v0, .L80251D1C -/* 1805E4 80251D04 2402000A */ addiu $v0, $zero, 0xa -/* 1805E8 80251D08 52420001 */ beql $s2, $v0, .L80251D10 -/* 1805EC 80251D0C 2412000B */ addiu $s2, $zero, 0xb -.L80251D10: -/* 1805F0 80251D10 24020020 */ addiu $v0, $zero, 0x20 -/* 1805F4 80251D14 52420001 */ beql $s2, $v0, .L80251D1C -/* 1805F8 80251D18 24120021 */ addiu $s2, $zero, 0x21 -.L80251D1C: -/* 1805FC 80251D1C 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 180600 80251D20 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 180604 80251D24 30420020 */ andi $v0, $v0, 0x20 -/* 180608 80251D28 104000AD */ beqz $v0, .L80251FE0 -/* 18060C 80251D2C 00000000 */ nop -/* 180610 80251D30 8E820188 */ lw $v0, 0x188($s4) -/* 180614 80251D34 30420480 */ andi $v0, $v0, 0x480 -/* 180618 80251D38 1040000A */ beqz $v0, .L80251D64 -/* 18061C 80251D3C 00000000 */ nop -/* 180620 80251D40 8EE2007C */ lw $v0, 0x7c($s7) -/* 180624 80251D44 30424000 */ andi $v0, $v0, 0x4000 -/* 180628 80251D48 10400006 */ beqz $v0, .L80251D64 -/* 18062C 80251D4C 2402000A */ addiu $v0, $zero, 0xa -/* 180630 80251D50 52420001 */ beql $s2, $v0, .L80251D58 -/* 180634 80251D54 2412000C */ addiu $s2, $zero, 0xc -.L80251D58: -/* 180638 80251D58 24020019 */ addiu $v0, $zero, 0x19 -/* 18063C 80251D5C 52420001 */ beql $s2, $v0, .L80251D64 -/* 180640 80251D60 2412000C */ addiu $s2, $zero, 0xc -.L80251D64: -/* 180644 80251D64 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 180648 80251D68 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 18064C 80251D6C 30420020 */ andi $v0, $v0, 0x20 -/* 180650 80251D70 1040009B */ beqz $v0, .L80251FE0 -/* 180654 80251D74 00000000 */ nop -/* 180658 80251D78 8E820188 */ lw $v0, 0x188($s4) -/* 18065C 80251D7C 30420400 */ andi $v0, $v0, 0x400 -/* 180660 80251D80 1040000A */ beqz $v0, .L80251DAC -/* 180664 80251D84 3C030080 */ lui $v1, 0x80 -/* 180668 80251D88 8EE2007C */ lw $v0, 0x7c($s7) -/* 18066C 80251D8C 00431024 */ and $v0, $v0, $v1 -/* 180670 80251D90 10400006 */ beqz $v0, .L80251DAC -/* 180674 80251D94 2402000A */ addiu $v0, $zero, 0xa -/* 180678 80251D98 52420001 */ beql $s2, $v0, .L80251DA0 -/* 18067C 80251D9C 2412000C */ addiu $s2, $zero, 0xc -.L80251DA0: -/* 180680 80251DA0 24020019 */ addiu $v0, $zero, 0x19 -/* 180684 80251DA4 52420001 */ beql $s2, $v0, .L80251DAC -/* 180688 80251DA8 2412000C */ addiu $s2, $zero, 0xc -.L80251DAC: -/* 18068C 80251DAC 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 180690 80251DB0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 180694 80251DB4 30420020 */ andi $v0, $v0, 0x20 -/* 180698 80251DB8 10400089 */ beqz $v0, .L80251FE0 -/* 18069C 80251DBC 00000000 */ nop -/* 1806A0 80251DC0 8E820188 */ lw $v0, 0x188($s4) -/* 1806A4 80251DC4 30420C80 */ andi $v0, $v0, 0xc80 -/* 1806A8 80251DC8 1040000A */ beqz $v0, .L80251DF4 -/* 1806AC 80251DCC 00000000 */ nop -/* 1806B0 80251DD0 8EE2007C */ lw $v0, 0x7c($s7) -/* 1806B4 80251DD4 30421000 */ andi $v0, $v0, 0x1000 -/* 1806B8 80251DD8 10400006 */ beqz $v0, .L80251DF4 -/* 1806BC 80251DDC 2402000A */ addiu $v0, $zero, 0xa -/* 1806C0 80251DE0 52420001 */ beql $s2, $v0, .L80251DE8 -/* 1806C4 80251DE4 2412000D */ addiu $s2, $zero, 0xd -.L80251DE8: -/* 1806C8 80251DE8 24020019 */ addiu $v0, $zero, 0x19 -/* 1806CC 80251DEC 52420001 */ beql $s2, $v0, .L80251DF4 -/* 1806D0 80251DF0 2412000D */ addiu $s2, $zero, 0xd -.L80251DF4: -/* 1806D4 80251DF4 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1806D8 80251DF8 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 1806DC 80251DFC 30420020 */ andi $v0, $v0, 0x20 -/* 1806E0 80251E00 10400077 */ beqz $v0, .L80251FE0 -/* 1806E4 80251E04 00000000 */ nop -/* 1806E8 80251E08 8E820188 */ lw $v0, 0x188($s4) -/* 1806EC 80251E0C 30420002 */ andi $v0, $v0, 2 -/* 1806F0 80251E10 10400008 */ beqz $v0, .L80251E34 -/* 1806F4 80251E14 2402000A */ addiu $v0, $zero, 0xa -/* 1806F8 80251E18 52420001 */ beql $s2, $v0, .L80251E20 -/* 1806FC 80251E1C 2412000E */ addiu $s2, $zero, 0xe -.L80251E20: -/* 180700 80251E20 24020020 */ addiu $v0, $zero, 0x20 -/* 180704 80251E24 52420001 */ beql $s2, $v0, .L80251E2C -/* 180708 80251E28 24120024 */ addiu $s2, $zero, 0x24 -.L80251E2C: -/* 18070C 80251E2C 24080001 */ addiu $t0, $zero, 1 -/* 180710 80251E30 AFA80024 */ sw $t0, 0x24($sp) -.L80251E34: -/* 180714 80251E34 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 180718 80251E38 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 18071C 80251E3C 30420020 */ andi $v0, $v0, 0x20 -/* 180720 80251E40 10400067 */ beqz $v0, .L80251FE0 -/* 180724 80251E44 00000000 */ nop -/* 180728 80251E48 86820180 */ lh $v0, 0x180($s4) -/* 18072C 80251E4C 04400064 */ bltz $v0, .L80251FE0 -/* 180730 80251E50 24020020 */ addiu $v0, $zero, 0x20 -/* 180734 80251E54 12420062 */ beq $s2, $v0, .L80251FE0 -/* 180738 80251E58 24020021 */ addiu $v0, $zero, 0x21 -/* 18073C 80251E5C 12420060 */ beq $s2, $v0, .L80251FE0 -/* 180740 80251E60 24020022 */ addiu $v0, $zero, 0x22 -/* 180744 80251E64 1242005E */ beq $s2, $v0, .L80251FE0 -/* 180748 80251E68 3C030008 */ lui $v1, 8 -/* 18074C 80251E6C 8E820190 */ lw $v0, 0x190($s4) -/* 180750 80251E70 00431024 */ and $v0, $v0, $v1 -/* 180754 80251E74 10400006 */ beqz $v0, .L80251E90 -/* 180758 80251E78 0260202D */ daddu $a0, $s3, $zero -/* 18075C 80251E7C 2405000A */ addiu $a1, $zero, 0xa -/* 180760 80251E80 0C099ADE */ jal try_inflict_status -/* 180764 80251E84 24060027 */ addiu $a2, $zero, 0x27 -/* 180768 80251E88 54400001 */ bnel $v0, $zero, .L80251E90 -/* 18076C 80251E8C 24150001 */ addiu $s5, $zero, 1 -.L80251E90: -/* 180770 80251E90 8E820190 */ lw $v0, 0x190($s4) -/* 180774 80251E94 3C030002 */ lui $v1, 2 -/* 180778 80251E98 00431024 */ and $v0, $v0, $v1 -/* 18077C 80251E9C 10400006 */ beqz $v0, .L80251EB8 -/* 180780 80251EA0 0260202D */ daddu $a0, $s3, $zero -/* 180784 80251EA4 24050009 */ addiu $a1, $zero, 9 -/* 180788 80251EA8 0C099ADE */ jal try_inflict_status -/* 18078C 80251EAC 24060025 */ addiu $a2, $zero, 0x25 -/* 180790 80251EB0 54400001 */ bnel $v0, $zero, .L80251EB8 -/* 180794 80251EB4 24150001 */ addiu $s5, $zero, 1 -.L80251EB8: -/* 180798 80251EB8 8E820190 */ lw $v0, 0x190($s4) -/* 18079C 80251EBC 3C030010 */ lui $v1, 0x10 -/* 1807A0 80251EC0 00431024 */ and $v0, $v0, $v1 -/* 1807A4 80251EC4 10400006 */ beqz $v0, .L80251EE0 -/* 1807A8 80251EC8 0260202D */ daddu $a0, $s3, $zero -/* 1807AC 80251ECC 2405000C */ addiu $a1, $zero, 0xc -/* 1807B0 80251ED0 0C099ADE */ jal try_inflict_status -/* 1807B4 80251ED4 24060028 */ addiu $a2, $zero, 0x28 -/* 1807B8 80251ED8 54400001 */ bnel $v0, $zero, .L80251EE0 -/* 1807BC 80251EDC 24150001 */ addiu $s5, $zero, 1 -.L80251EE0: -/* 1807C0 80251EE0 8E820190 */ lw $v0, 0x190($s4) -/* 1807C4 80251EE4 30421000 */ andi $v0, $v0, 0x1000 -/* 1807C8 80251EE8 10400006 */ beqz $v0, .L80251F04 -/* 1807CC 80251EEC 0260202D */ daddu $a0, $s3, $zero -/* 1807D0 80251EF0 24050006 */ addiu $a1, $zero, 6 -/* 1807D4 80251EF4 0C099ADE */ jal try_inflict_status -/* 1807D8 80251EF8 24060020 */ addiu $a2, $zero, 0x20 -/* 1807DC 80251EFC 54400001 */ bnel $v0, $zero, .L80251F04 -/* 1807E0 80251F00 24150001 */ addiu $s5, $zero, 1 -.L80251F04: -/* 1807E4 80251F04 8E820190 */ lw $v0, 0x190($s4) -/* 1807E8 80251F08 3C030020 */ lui $v1, 0x20 -/* 1807EC 80251F0C 00431024 */ and $v0, $v0, $v1 -/* 1807F0 80251F10 10400006 */ beqz $v0, .L80251F2C -/* 1807F4 80251F14 0260202D */ daddu $a0, $s3, $zero -/* 1807F8 80251F18 24050008 */ addiu $a1, $zero, 8 -/* 1807FC 80251F1C 0C099ADE */ jal try_inflict_status -/* 180800 80251F20 24060029 */ addiu $a2, $zero, 0x29 -/* 180804 80251F24 54400001 */ bnel $v0, $zero, .L80251F2C -/* 180808 80251F28 24150001 */ addiu $s5, $zero, 1 -.L80251F2C: -/* 18080C 80251F2C 8E820190 */ lw $v0, 0x190($s4) -/* 180810 80251F30 30422000 */ andi $v0, $v0, 0x2000 -/* 180814 80251F34 10400006 */ beqz $v0, .L80251F50 -/* 180818 80251F38 0260202D */ daddu $a0, $s3, $zero -/* 18081C 80251F3C 2405000B */ addiu $a1, $zero, 0xb -/* 180820 80251F40 0C099ADE */ jal try_inflict_status -/* 180824 80251F44 24060021 */ addiu $a2, $zero, 0x21 -/* 180828 80251F48 54400001 */ bnel $v0, $zero, .L80251F50 -/* 18082C 80251F4C 24150001 */ addiu $s5, $zero, 1 -.L80251F50: -/* 180830 80251F50 8E820190 */ lw $v0, 0x190($s4) -/* 180834 80251F54 30428000 */ andi $v0, $v0, 0x8000 -/* 180838 80251F58 10400006 */ beqz $v0, .L80251F74 -/* 18083C 80251F5C 0260202D */ daddu $a0, $s3, $zero -/* 180840 80251F60 24050003 */ addiu $a1, $zero, 3 -/* 180844 80251F64 0C099ADE */ jal try_inflict_status -/* 180848 80251F68 24060023 */ addiu $a2, $zero, 0x23 -/* 18084C 80251F6C 54400001 */ bnel $v0, $zero, .L80251F74 -/* 180850 80251F70 24150001 */ addiu $s5, $zero, 1 -.L80251F74: -/* 180854 80251F74 8E820190 */ lw $v0, 0x190($s4) -/* 180858 80251F78 3C030001 */ lui $v1, 1 -/* 18085C 80251F7C 00431024 */ and $v0, $v0, $v1 -/* 180860 80251F80 10400006 */ beqz $v0, .L80251F9C -/* 180864 80251F84 0260202D */ daddu $a0, $s3, $zero -/* 180868 80251F88 24050005 */ addiu $a1, $zero, 5 -/* 18086C 80251F8C 0C099ADE */ jal try_inflict_status -/* 180870 80251F90 24060026 */ addiu $a2, $zero, 0x26 -/* 180874 80251F94 54400001 */ bnel $v0, $zero, .L80251F9C -/* 180878 80251F98 24150001 */ addiu $s5, $zero, 1 -.L80251F9C: -/* 18087C 80251F9C 8E820190 */ lw $v0, 0x190($s4) -/* 180880 80251FA0 3C030004 */ lui $v1, 4 -/* 180884 80251FA4 00431024 */ and $v0, $v0, $v1 -/* 180888 80251FA8 10400006 */ beqz $v0, .L80251FC4 -/* 18088C 80251FAC 0260202D */ daddu $a0, $s3, $zero -/* 180890 80251FB0 24050004 */ addiu $a1, $zero, 4 -/* 180894 80251FB4 0C099ADE */ jal try_inflict_status -/* 180898 80251FB8 24060024 */ addiu $a2, $zero, 0x24 -/* 18089C 80251FBC 54400001 */ bnel $v0, $zero, .L80251FC4 -/* 1808A0 80251FC0 24150001 */ addiu $s5, $zero, 1 -.L80251FC4: -/* 1808A4 80251FC4 12A00006 */ beqz $s5, .L80251FE0 -/* 1808A8 80251FC8 24020017 */ addiu $v0, $zero, 0x17 -/* 1808AC 80251FCC 52420001 */ beql $s2, $v0, .L80251FD4 -/* 1808B0 80251FD0 24120009 */ addiu $s2, $zero, 9 -.L80251FD4: -/* 1808B4 80251FD4 24020019 */ addiu $v0, $zero, 0x19 -/* 1808B8 80251FD8 52420001 */ beql $s2, $v0, .L80251FE0 -/* 1808BC 80251FDC 2412000A */ addiu $s2, $zero, 0xa -.L80251FE0: -/* 1808C0 80251FE0 8E620008 */ lw $v0, 8($s3) -/* 1808C4 80251FE4 92830194 */ lbu $v1, 0x194($s4) -/* 1808C8 80251FE8 9050001B */ lbu $s0, 0x1b($v0) -/* 1808CC 80251FEC 00700018 */ mult $v1, $s0 -/* 1808D0 80251FF0 00001812 */ mflo $v1 -/* 1808D4 80251FF4 3C0251EB */ lui $v0, 0x51eb -/* 1808D8 80251FF8 3442851F */ ori $v0, $v0, 0x851f -/* 1808DC 80251FFC 00620018 */ mult $v1, $v0 -/* 1808E0 80252000 3C16800E */ lui $s6, %hi(gBattleStatus) -/* 1808E4 80252004 26D6C070 */ addiu $s6, $s6, %lo(gBattleStatus) -/* 1808E8 80252008 8EC20000 */ lw $v0, ($s6) -/* 1808EC 8025200C 00031FC3 */ sra $v1, $v1, 0x1f -/* 1808F0 80252010 30420020 */ andi $v0, $v0, 0x20 -/* 1808F4 80252014 00004810 */ mfhi $t1 -/* 1808F8 80252018 00092143 */ sra $a0, $t1, 5 -/* 1808FC 8025201C 10400027 */ beqz $v0, .L802520BC -/* 180900 80252020 00838023 */ subu $s0, $a0, $v1 -/* 180904 80252024 8E820188 */ lw $v0, 0x188($s4) -/* 180908 80252028 30421000 */ andi $v0, $v0, 0x1000 -/* 18090C 8025202C 50400024 */ beql $v0, $zero, .L802520C0 -/* 180910 80252030 A2950199 */ sb $s5, 0x199($s4) -/* 180914 80252034 0C00A67F */ jal rand_int -/* 180918 80252038 24040063 */ addiu $a0, $zero, 0x63 -/* 18091C 8025203C 0050102A */ slt $v0, $v0, $s0 -/* 180920 80252040 1040001D */ beqz $v0, .L802520B8 -/* 180924 80252044 24120019 */ addiu $s2, $zero, 0x19 -/* 180928 80252048 92620210 */ lbu $v0, 0x210($s3) -/* 18092C 8025204C 2442FFFD */ addiu $v0, $v0, -3 -/* 180930 80252050 2C420006 */ sltiu $v0, $v0, 6 -/* 180934 80252054 14400019 */ bnez $v0, .L802520BC -/* 180938 80252058 241E0002 */ addiu $fp, $zero, 2 -/* 18093C 8025205C 8E620000 */ lw $v0, ($s3) -/* 180940 80252060 30420400 */ andi $v0, $v0, 0x400 -/* 180944 80252064 14400015 */ bnez $v0, .L802520BC -/* 180948 80252068 00000000 */ nop -/* 18094C 8025206C 24120039 */ addiu $s2, $zero, 0x39 -/* 180950 80252070 0000F02D */ daddu $fp, $zero, $zero -/* 180954 80252074 8EC20000 */ lw $v0, ($s6) -/* 180958 80252078 24080001 */ addiu $t0, $zero, 1 -/* 18095C 8025207C AFA8001C */ sw $t0, 0x1c($sp) -/* 180960 80252080 00521025 */ or $v0, $v0, $s2 -/* 180964 80252084 AEC20000 */ sw $v0, ($s6) -/* 180968 80252088 C6200014 */ lwc1 $f0, 0x14($s1) -/* 18096C 8025208C 24040231 */ addiu $a0, $zero, 0x231 -/* 180970 80252090 E7A00010 */ swc1 $f0, 0x10($sp) -/* 180974 80252094 8E26000C */ lw $a2, 0xc($s1) -/* 180978 80252098 8E270010 */ lw $a3, 0x10($s1) -/* 18097C 8025209C 0C052757 */ jal sfx_play_sound_at_position -/* 180980 802520A0 03C0282D */ daddu $a1, $fp, $zero -/* 180984 802520A4 8EC20000 */ lw $v0, ($s6) -/* 180988 802520A8 24150001 */ addiu $s5, $zero, 1 -/* 18098C 802520AC 34420040 */ ori $v0, $v0, 0x40 -/* 180990 802520B0 0809482F */ j .L802520BC -/* 180994 802520B4 AEC20000 */ sw $v0, ($s6) -.L802520B8: -/* 180998 802520B8 241E0002 */ addiu $fp, $zero, 2 -.L802520BC: -/* 18099C 802520BC A2950199 */ sb $s5, 0x199($s4) -.L802520C0: -/* 1809A0 802520C0 8FA8001C */ lw $t0, 0x1c($sp) -/* 1809A4 802520C4 11000006 */ beqz $t0, .L802520E0 -/* 1809A8 802520C8 00000000 */ nop -/* 1809AC 802520CC 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1809B0 802520D0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 1809B4 802520D4 30420240 */ andi $v0, $v0, 0x240 -/* 1809B8 802520D8 14400008 */ bnez $v0, .L802520FC -/* 1809BC 802520DC 00000000 */ nop -.L802520E0: -/* 1809C0 802520E0 3C03800E */ lui $v1, %hi(gBattleStatus) -/* 1809C4 802520E4 8C63C070 */ lw $v1, %lo(gBattleStatus)($v1) -/* 1809C8 802520E8 30620240 */ andi $v0, $v1, 0x240 -/* 1809CC 802520EC 10400027 */ beqz $v0, .L8025218C -/* 1809D0 802520F0 30620080 */ andi $v0, $v1, 0x80 -/* 1809D4 802520F4 14400025 */ bnez $v0, .L8025218C -/* 1809D8 802520F8 00000000 */ nop -.L802520FC: -/* 1809DC 802520FC 86820180 */ lh $v0, 0x180($s4) -/* 1809E0 80252100 1840000B */ blez $v0, .L80252130 -/* 1809E4 80252104 00000000 */ nop -/* 1809E8 80252108 C6200014 */ lwc1 $f0, 0x14($s1) -/* 1809EC 8025210C 24040231 */ addiu $a0, $zero, 0x231 -/* 1809F0 80252110 E7A00010 */ swc1 $f0, 0x10($sp) -/* 1809F4 80252114 8E26000C */ lw $a2, 0xc($s1) -/* 1809F8 80252118 8E270010 */ lw $a3, 0x10($s1) -/* 1809FC 8025211C 0C052757 */ jal sfx_play_sound_at_position -/* 180A00 80252120 0000282D */ daddu $a1, $zero, $zero -/* 180A04 80252124 86820180 */ lh $v0, 0x180($s4) -/* 180A08 80252128 1C400009 */ bgtz $v0, .L80252150 -/* 180A0C 8025212C 00000000 */ nop -.L80252130: -/* 180A10 80252130 8E820188 */ lw $v0, 0x188($s4) -/* 180A14 80252134 3C034000 */ lui $v1, 0x4000 -/* 180A18 80252138 00431024 */ and $v0, $v0, $v1 -/* 180A1C 8025213C 10400013 */ beqz $v0, .L8025218C -/* 180A20 80252140 00000000 */ nop -/* 180A24 80252144 8FA8001C */ lw $t0, 0x1c($sp) -/* 180A28 80252148 11000010 */ beqz $t0, .L8025218C -/* 180A2C 8025214C 00000000 */ nop -.L80252150: -/* 180A30 80252150 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 180A34 80252154 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 180A38 80252158 30420040 */ andi $v0, $v0, 0x40 -/* 180A3C 8025215C 10400004 */ beqz $v0, .L80252170 -/* 180A40 80252160 0000202D */ daddu $a0, $zero, $zero -/* 180A44 80252164 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180A48 80252168 0809485F */ j .L8025217C -/* 180A4C 8025216C E7A00010 */ swc1 $f0, 0x10($sp) -.L80252170: -/* 180A50 80252170 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180A54 80252174 24040003 */ addiu $a0, $zero, 3 -/* 180A58 80252178 E7A00010 */ swc1 $f0, 0x10($sp) -.L8025217C: -/* 180A5C 8025217C 8E26000C */ lw $a2, 0xc($s1) -/* 180A60 80252180 8E270010 */ lw $a3, 0x10($s1) -/* 180A64 80252184 0C0999FC */ jal func_802667F0 -/* 180A68 80252188 0260282D */ daddu $a1, $s3, $zero -.L8025218C: -/* 180A6C 8025218C 3C10800E */ lui $s0, %hi(gBattleStatus) -/* 180A70 80252190 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus) -/* 180A74 80252194 8E020000 */ lw $v0, ($s0) -/* 180A78 80252198 30420020 */ andi $v0, $v0, 0x20 -/* 180A7C 8025219C 10400004 */ beqz $v0, .L802521B0 -/* 180A80 802521A0 0260202D */ daddu $a0, $s3, $zero -/* 180A84 802521A4 0C099A5C */ jal func_80266970 -/* 180A88 802521A8 0260202D */ daddu $a0, $s3, $zero -/* 180A8C 802521AC 0260202D */ daddu $a0, $s3, $zero -.L802521B0: -/* 180A90 802521B0 0C09DC58 */ jal dispatch_event_actor -/* 180A94 802521B4 0240282D */ daddu $a1, $s2, $zero -/* 180A98 802521B8 8FA80020 */ lw $t0, 0x20($sp) -/* 180A9C 802521BC 24020100 */ addiu $v0, $zero, 0x100 -/* 180AA0 802521C0 1502000A */ bne $t0, $v0, .L802521EC -/* 180AA4 802521C4 00000000 */ nop -/* 180AA8 802521C8 86860180 */ lh $a2, 0x180($s4) -/* 180AAC 802521CC 18C00007 */ blez $a2, .L802521EC -/* 180AB0 802521D0 00000000 */ nop -/* 180AB4 802521D4 8E020000 */ lw $v0, ($s0) -/* 180AB8 802521D8 30420020 */ andi $v0, $v0, 0x20 -/* 180ABC 802521DC 10400003 */ beqz $v0, .L802521EC -/* 180AC0 802521E0 0260202D */ daddu $a0, $s3, $zero -/* 180AC4 802521E4 0C0997D0 */ jal inflict_status -/* 180AC8 802521E8 2405000D */ addiu $a1, $zero, 0xd -.L802521EC: -/* 180ACC 802521EC 8E620000 */ lw $v0, ($s3) -/* 180AD0 802521F0 3C030200 */ lui $v1, 0x200 -/* 180AD4 802521F4 00431024 */ and $v0, $v0, $v1 -/* 180AD8 802521F8 14400030 */ bnez $v0, .L802522BC -/* 180ADC 802521FC 00000000 */ nop -/* 180AE0 80252200 86870180 */ lh $a3, 0x180($s4) -/* 180AE4 80252204 14E00010 */ bnez $a3, .L80252248 -/* 180AE8 80252208 00000000 */ nop -/* 180AEC 8025220C 8FA8001C */ lw $t0, 0x1c($sp) -/* 180AF0 80252210 1500002A */ bnez $t0, .L802522BC -/* 180AF4 80252214 00000000 */ nop -/* 180AF8 80252218 16A00028 */ bnez $s5, .L802522BC -/* 180AFC 8025221C 24020001 */ addiu $v0, $zero, 1 -/* 180B00 80252220 AFA20010 */ sw $v0, 0x10($sp) -/* 180B04 80252224 24020003 */ addiu $v0, $zero, 3 -/* 180B08 80252228 AFA20014 */ sw $v0, 0x14($sp) -/* 180B0C 8025222C C62C000C */ lwc1 $f12, 0xc($s1) -/* 180B10 80252230 C62E0010 */ lwc1 $f14, 0x10($s1) -/* 180B14 80252234 8E260014 */ lw $a2, 0x14($s1) -/* 180B18 80252238 0C093BF8 */ jal func_8024EFE0 -/* 180B1C 8025223C 0000382D */ daddu $a3, $zero, $zero -/* 180B20 80252240 080948AF */ j .L802522BC -/* 180B24 80252244 00000000 */ nop -.L80252248: -/* 180B28 80252248 8FA80018 */ lw $t0, 0x18($sp) -/* 180B2C 8025224C 1500001B */ bnez $t0, .L802522BC -/* 180B30 80252250 3C032000 */ lui $v1, 0x2000 -/* 180B34 80252254 8E820188 */ lw $v0, 0x188($s4) -/* 180B38 80252258 34630040 */ ori $v1, $v1, 0x40 -/* 180B3C 8025225C 00431024 */ and $v0, $v0, $v1 -/* 180B40 80252260 10400007 */ beqz $v0, .L80252280 -/* 180B44 80252264 AFA00010 */ sw $zero, 0x10($sp) -/* 180B48 80252268 C62C000C */ lwc1 $f12, 0xc($s1) -/* 180B4C 8025226C C62E0010 */ lwc1 $f14, 0x10($s1) -/* 180B50 80252270 0C09996B */ jal show_damage_popup -/* 180B54 80252274 8E260014 */ lw $a2, 0x14($s1) -/* 180B58 80252278 080948A4 */ j .L80252290 -/* 180B5C 8025227C 00000000 */ nop -.L80252280: -/* 180B60 80252280 C62C000C */ lwc1 $f12, 0xc($s1) -/* 180B64 80252284 C62E0010 */ lwc1 $f14, 0x10($s1) -/* 180B68 80252288 0C099937 */ jal func_802664DC -/* 180B6C 8025228C 8E260014 */ lw $a2, 0x14($s1) -.L80252290: -/* 180B70 80252290 8EE20004 */ lw $v0, 4($s7) -/* 180B74 80252294 30420004 */ andi $v0, $v0, 4 -/* 180B78 80252298 14400008 */ bnez $v0, .L802522BC -/* 180B7C 8025229C 00000000 */ nop -/* 180B80 802522A0 86820180 */ lh $v0, 0x180($s4) -/* 180B84 802522A4 AFA20010 */ sw $v0, 0x10($sp) -/* 180B88 802522A8 8E25000C */ lw $a1, 0xc($s1) -/* 180B8C 802522AC 8E260010 */ lw $a2, 0x10($s1) -/* 180B90 802522B0 8E270014 */ lw $a3, 0x14($s1) -/* 180B94 802522B4 0C0999B9 */ jal func_802666E4 -/* 180B98 802522B8 0260202D */ daddu $a0, $s3, $zero -.L802522BC: -/* 180B9C 802522BC 86820180 */ lh $v0, 0x180($s4) -/* 180BA0 802522C0 18400022 */ blez $v0, .L8025234C -/* 180BA4 802522C4 00000000 */ nop -/* 180BA8 802522C8 8FA80018 */ lw $t0, 0x18($sp) -/* 180BAC 802522CC 1500001D */ bnez $t0, .L80252344 -/* 180BB0 802522D0 0260202D */ daddu $a0, $s3, $zero -/* 180BB4 802522D4 0C099C06 */ jal func_80267018 -/* 180BB8 802522D8 24050001 */ addiu $a1, $zero, 1 -/* 180BBC 802522DC 8FA80024 */ lw $t0, 0x24($sp) -/* 180BC0 802522E0 11000004 */ beqz $t0, .L802522F4 -/* 180BC4 802522E4 240400EA */ addiu $a0, $zero, 0xea -/* 180BC8 802522E8 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180BCC 802522EC 080948CC */ j .L80252330 -/* 180BD0 802522F0 E7A00010 */ swc1 $f0, 0x10($sp) -.L802522F4: -/* 180BD4 802522F4 8FA80028 */ lw $t0, 0x28($sp) -/* 180BD8 802522F8 11000004 */ beqz $t0, .L8025230C -/* 180BDC 802522FC 2404037B */ addiu $a0, $zero, 0x37b -/* 180BE0 80252300 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180BE4 80252304 080948CC */ j .L80252330 -/* 180BE8 80252308 E7A00010 */ swc1 $f0, 0x10($sp) -.L8025230C: -/* 180BEC 8025230C 8FA8002C */ lw $t0, 0x2c($sp) -/* 180BF0 80252310 11000004 */ beqz $t0, .L80252324 -/* 180BF4 80252314 240400EB */ addiu $a0, $zero, 0xeb -/* 180BF8 80252318 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180BFC 8025231C 080948CC */ j .L80252330 -/* 180C00 80252320 E7A00010 */ swc1 $f0, 0x10($sp) -.L80252324: -/* 180C04 80252324 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180C08 80252328 240400E9 */ addiu $a0, $zero, 0xe9 -/* 180C0C 8025232C E7A00010 */ swc1 $f0, 0x10($sp) -.L80252330: -/* 180C10 80252330 8E26000C */ lw $a2, 0xc($s1) -/* 180C14 80252334 8E270010 */ lw $a3, 0x10($s1) -/* 180C18 80252338 0C052757 */ jal sfx_play_sound_at_position -/* 180C1C 8025233C 0000282D */ daddu $a1, $zero, $zero -/* 180C20 80252340 86820180 */ lh $v0, 0x180($s4) -.L80252344: -/* 180C24 80252344 1C400003 */ bgtz $v0, .L80252354 -/* 180C28 80252348 00000000 */ nop -.L8025234C: -/* 180C2C 8025234C 12A00005 */ beqz $s5, .L80252364 -/* 180C30 80252350 00000000 */ nop -.L80252354: -/* 180C34 80252354 8EE20000 */ lw $v0, ($s7) -/* 180C38 80252358 30422000 */ andi $v0, $v0, 0x2000 -/* 180C3C 8025235C 10400008 */ beqz $v0, .L80252380 -/* 180C40 80252360 00000000 */ nop -.L80252364: -/* 180C44 80252364 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180C48 80252368 2404010C */ addiu $a0, $zero, 0x10c -/* 180C4C 8025236C E7A00010 */ swc1 $f0, 0x10($sp) -/* 180C50 80252370 8E26000C */ lw $a2, 0xc($s1) -/* 180C54 80252374 8E270010 */ lw $a3, 0x10($s1) -/* 180C58 80252378 0C052757 */ jal sfx_play_sound_at_position -/* 180C5C 8025237C 0000282D */ daddu $a1, $zero, $zero -.L80252380: -/* 180C60 80252380 8E820190 */ lw $v0, 0x190($s4) -/* 180C64 80252384 30421000 */ andi $v0, $v0, 0x1000 -/* 180C68 80252388 10400018 */ beqz $v0, .L802523EC -/* 180C6C 8025238C 00000000 */ nop -/* 180C70 80252390 12A00016 */ beqz $s5, .L802523EC -/* 180C74 80252394 00000000 */ nop -/* 180C78 80252398 3C048029 */ lui $a0, %hi(DoSleepHit) -/* 180C7C 8025239C 248445E0 */ addiu $a0, $a0, %lo(DoSleepHit) -/* 180C80 802523A0 2405000A */ addiu $a1, $zero, 0xa -/* 180C84 802523A4 0C0B0CF8 */ jal start_script -/* 180C88 802523A8 0000302D */ daddu $a2, $zero, $zero -/* 180C8C 802523AC C620000C */ lwc1 $f0, 0xc($s1) -/* 180C90 802523B0 4600018D */ trunc.w.s $f6, $f0 -/* 180C94 802523B4 E4460084 */ swc1 $f6, 0x84($v0) -/* 180C98 802523B8 C6200010 */ lwc1 $f0, 0x10($s1) -/* 180C9C 802523BC 4600018D */ trunc.w.s $f6, $f0 -/* 180CA0 802523C0 E4460088 */ swc1 $f6, 0x88($v0) -/* 180CA4 802523C4 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180CA8 802523C8 4600018D */ trunc.w.s $f6, $f0 -/* 180CAC 802523CC E446008C */ swc1 $f6, 0x8c($v0) -/* 180CB0 802523D0 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180CB4 802523D4 24042031 */ addiu $a0, $zero, 0x2031 -/* 180CB8 802523D8 E7A00010 */ swc1 $f0, 0x10($sp) -/* 180CBC 802523DC 8E26000C */ lw $a2, 0xc($s1) -/* 180CC0 802523E0 8E270010 */ lw $a3, 0x10($s1) -/* 180CC4 802523E4 0C052757 */ jal sfx_play_sound_at_position -/* 180CC8 802523E8 0000282D */ daddu $a1, $zero, $zero -.L802523EC: -/* 180CCC 802523EC 8E820190 */ lw $v0, 0x190($s4) -/* 180CD0 802523F0 3C030004 */ lui $v1, 4 -/* 180CD4 802523F4 00431024 */ and $v0, $v0, $v1 -/* 180CD8 802523F8 10400018 */ beqz $v0, .L8025245C -/* 180CDC 802523FC 00000000 */ nop -/* 180CE0 80252400 12A00016 */ beqz $s5, .L8025245C -/* 180CE4 80252404 00000000 */ nop -/* 180CE8 80252408 3C048029 */ lui $a0, %hi(DoDizzyHit) -/* 180CEC 8025240C 248445FC */ addiu $a0, $a0, %lo(DoDizzyHit) -/* 180CF0 80252410 2405000A */ addiu $a1, $zero, 0xa -/* 180CF4 80252414 0C0B0CF8 */ jal start_script -/* 180CF8 80252418 0000302D */ daddu $a2, $zero, $zero -/* 180CFC 8025241C C620000C */ lwc1 $f0, 0xc($s1) -/* 180D00 80252420 4600018D */ trunc.w.s $f6, $f0 -/* 180D04 80252424 E4460084 */ swc1 $f6, 0x84($v0) -/* 180D08 80252428 C6200010 */ lwc1 $f0, 0x10($s1) -/* 180D0C 8025242C 4600018D */ trunc.w.s $f6, $f0 -/* 180D10 80252430 E4460088 */ swc1 $f6, 0x88($v0) -/* 180D14 80252434 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180D18 80252438 4600018D */ trunc.w.s $f6, $f0 -/* 180D1C 8025243C E446008C */ swc1 $f6, 0x8c($v0) -/* 180D20 80252440 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180D24 80252444 24042032 */ addiu $a0, $zero, 0x2032 -/* 180D28 80252448 E7A00010 */ swc1 $f0, 0x10($sp) -/* 180D2C 8025244C 8E26000C */ lw $a2, 0xc($s1) -/* 180D30 80252450 8E270010 */ lw $a3, 0x10($s1) -/* 180D34 80252454 0C052757 */ jal sfx_play_sound_at_position -/* 180D38 80252458 0000282D */ daddu $a1, $zero, $zero -.L8025245C: -/* 180D3C 8025245C 8E820190 */ lw $v0, 0x190($s4) -/* 180D40 80252460 3C030001 */ lui $v1, 1 -/* 180D44 80252464 00431024 */ and $v0, $v0, $v1 -/* 180D48 80252468 10400018 */ beqz $v0, .L802524CC -/* 180D4C 8025246C 00000000 */ nop -/* 180D50 80252470 12A00016 */ beqz $s5, .L802524CC -/* 180D54 80252474 00000000 */ nop -/* 180D58 80252478 3C048029 */ lui $a0, %hi(DoParalyzeHit) -/* 180D5C 8025247C 24844618 */ addiu $a0, $a0, %lo(DoParalyzeHit) -/* 180D60 80252480 2405000A */ addiu $a1, $zero, 0xa -/* 180D64 80252484 0C0B0CF8 */ jal start_script -/* 180D68 80252488 0000302D */ daddu $a2, $zero, $zero -/* 180D6C 8025248C C620000C */ lwc1 $f0, 0xc($s1) -/* 180D70 80252490 4600018D */ trunc.w.s $f6, $f0 -/* 180D74 80252494 E4460084 */ swc1 $f6, 0x84($v0) -/* 180D78 80252498 C6200010 */ lwc1 $f0, 0x10($s1) -/* 180D7C 8025249C 4600018D */ trunc.w.s $f6, $f0 -/* 180D80 802524A0 E4460088 */ swc1 $f6, 0x88($v0) -/* 180D84 802524A4 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180D88 802524A8 4600018D */ trunc.w.s $f6, $f0 -/* 180D8C 802524AC E446008C */ swc1 $f6, 0x8c($v0) -/* 180D90 802524B0 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180D94 802524B4 24042032 */ addiu $a0, $zero, 0x2032 -/* 180D98 802524B8 E7A00010 */ swc1 $f0, 0x10($sp) -/* 180D9C 802524BC 8E26000C */ lw $a2, 0xc($s1) -/* 180DA0 802524C0 8E270010 */ lw $a3, 0x10($s1) -/* 180DA4 802524C4 0C052757 */ jal sfx_play_sound_at_position -/* 180DA8 802524C8 0000282D */ daddu $a1, $zero, $zero -.L802524CC: -/* 180DAC 802524CC 8E820190 */ lw $v0, 0x190($s4) -/* 180DB0 802524D0 3C030002 */ lui $v1, 2 -/* 180DB4 802524D4 00431024 */ and $v0, $v0, $v1 -/* 180DB8 802524D8 10400018 */ beqz $v0, .L8025253C -/* 180DBC 802524DC 00000000 */ nop -/* 180DC0 802524E0 12A00016 */ beqz $s5, .L8025253C -/* 180DC4 802524E4 00000000 */ nop -/* 180DC8 802524E8 3C048029 */ lui $a0, %hi(DoPoisonHit) -/* 180DCC 802524EC 24844634 */ addiu $a0, $a0, %lo(DoPoisonHit) -/* 180DD0 802524F0 2405000A */ addiu $a1, $zero, 0xa -/* 180DD4 802524F4 0C0B0CF8 */ jal start_script -/* 180DD8 802524F8 0000302D */ daddu $a2, $zero, $zero -/* 180DDC 802524FC C620000C */ lwc1 $f0, 0xc($s1) -/* 180DE0 80252500 4600018D */ trunc.w.s $f6, $f0 -/* 180DE4 80252504 E4460084 */ swc1 $f6, 0x84($v0) -/* 180DE8 80252508 C6200010 */ lwc1 $f0, 0x10($s1) -/* 180DEC 8025250C 4600018D */ trunc.w.s $f6, $f0 -/* 180DF0 80252510 E4460088 */ swc1 $f6, 0x88($v0) -/* 180DF4 80252514 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180DF8 80252518 4600018D */ trunc.w.s $f6, $f0 -/* 180DFC 8025251C E446008C */ swc1 $f6, 0x8c($v0) -/* 180E00 80252520 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180E04 80252524 24042032 */ addiu $a0, $zero, 0x2032 -/* 180E08 80252528 E7A00010 */ swc1 $f0, 0x10($sp) -/* 180E0C 8025252C 8E26000C */ lw $a2, 0xc($s1) -/* 180E10 80252530 8E270010 */ lw $a3, 0x10($s1) -/* 180E14 80252534 0C052757 */ jal sfx_play_sound_at_position -/* 180E18 80252538 0000282D */ daddu $a1, $zero, $zero -.L8025253C: -/* 180E1C 8025253C 8E820190 */ lw $v0, 0x190($s4) -/* 180E20 80252540 3C030020 */ lui $v1, 0x20 -/* 180E24 80252544 00431024 */ and $v0, $v0, $v1 -/* 180E28 80252548 10400018 */ beqz $v0, .L802525AC -/* 180E2C 8025254C 00000000 */ nop -/* 180E30 80252550 12A00016 */ beqz $s5, .L802525AC -/* 180E34 80252554 00000000 */ nop -/* 180E38 80252558 3C048029 */ lui $a0, %hi(DoStopHit) -/* 180E3C 8025255C 24844650 */ addiu $a0, $a0, %lo(DoStopHit) -/* 180E40 80252560 2405000A */ addiu $a1, $zero, 0xa -/* 180E44 80252564 0C0B0CF8 */ jal start_script -/* 180E48 80252568 0000302D */ daddu $a2, $zero, $zero -/* 180E4C 8025256C C620000C */ lwc1 $f0, 0xc($s1) -/* 180E50 80252570 4600018D */ trunc.w.s $f6, $f0 -/* 180E54 80252574 E4460084 */ swc1 $f6, 0x84($v0) -/* 180E58 80252578 C6200010 */ lwc1 $f0, 0x10($s1) -/* 180E5C 8025257C 4600018D */ trunc.w.s $f6, $f0 -/* 180E60 80252580 E4460088 */ swc1 $f6, 0x88($v0) -/* 180E64 80252584 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180E68 80252588 4600018D */ trunc.w.s $f6, $f0 -/* 180E6C 8025258C E446008C */ swc1 $f6, 0x8c($v0) -/* 180E70 80252590 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180E74 80252594 24042032 */ addiu $a0, $zero, 0x2032 -/* 180E78 80252598 E7A00010 */ swc1 $f0, 0x10($sp) -/* 180E7C 8025259C 8E26000C */ lw $a2, 0xc($s1) -/* 180E80 802525A0 8E270010 */ lw $a3, 0x10($s1) -/* 180E84 802525A4 0C052757 */ jal sfx_play_sound_at_position -/* 180E88 802525A8 0000282D */ daddu $a1, $zero, $zero -.L802525AC: -/* 180E8C 802525AC 8E820190 */ lw $v0, 0x190($s4) -/* 180E90 802525B0 30424000 */ andi $v0, $v0, 0x4000 -/* 180E94 802525B4 10400019 */ beqz $v0, .L8025261C -/* 180E98 802525B8 00000000 */ nop -/* 180E9C 802525BC 12A00017 */ beqz $s5, .L8025261C -/* 180EA0 802525C0 00000000 */ nop -/* 180EA4 802525C4 3C048029 */ lui $a0, %hi(DoFreezeHit) -/* 180EA8 802525C8 2484466C */ addiu $a0, $a0, %lo(DoFreezeHit) -/* 180EAC 802525CC 2405000A */ addiu $a1, $zero, 0xa -/* 180EB0 802525D0 0C0B0CF8 */ jal start_script -/* 180EB4 802525D4 0000302D */ daddu $a2, $zero, $zero -/* 180EB8 802525D8 C620000C */ lwc1 $f0, 0xc($s1) -/* 180EBC 802525DC 4600018D */ trunc.w.s $f6, $f0 -/* 180EC0 802525E0 E4460084 */ swc1 $f6, 0x84($v0) -/* 180EC4 802525E4 C6200010 */ lwc1 $f0, 0x10($s1) -/* 180EC8 802525E8 4600018D */ trunc.w.s $f6, $f0 -/* 180ECC 802525EC E4460088 */ swc1 $f6, 0x88($v0) -/* 180ED0 802525F0 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180ED4 802525F4 AC530090 */ sw $s3, 0x90($v0) -/* 180ED8 802525F8 4600018D */ trunc.w.s $f6, $f0 -/* 180EDC 802525FC E446008C */ swc1 $f6, 0x8c($v0) -/* 180EE0 80252600 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180EE4 80252604 24042032 */ addiu $a0, $zero, 0x2032 -/* 180EE8 80252608 E7A00010 */ swc1 $f0, 0x10($sp) -/* 180EEC 8025260C 8E26000C */ lw $a2, 0xc($s1) -/* 180EF0 80252610 8E270010 */ lw $a3, 0x10($s1) -/* 180EF4 80252614 0C052757 */ jal sfx_play_sound_at_position -/* 180EF8 80252618 0000282D */ daddu $a1, $zero, $zero -.L8025261C: -/* 180EFC 8025261C 8E820190 */ lw $v0, 0x190($s4) -/* 180F00 80252620 3C030008 */ lui $v1, 8 -/* 180F04 80252624 00431024 */ and $v0, $v0, $v1 -/* 180F08 80252628 10400019 */ beqz $v0, .L80252690 -/* 180F0C 8025262C 00000000 */ nop -/* 180F10 80252630 12A00017 */ beqz $s5, .L80252690 -/* 180F14 80252634 00000000 */ nop -/* 180F18 80252638 3C048029 */ lui $a0, %hi(DoShrinkHit) -/* 180F1C 8025263C 248446B8 */ addiu $a0, $a0, %lo(DoShrinkHit) -/* 180F20 80252640 2405000A */ addiu $a1, $zero, 0xa -/* 180F24 80252644 0C0B0CF8 */ jal start_script -/* 180F28 80252648 0000302D */ daddu $a2, $zero, $zero -/* 180F2C 8025264C C620000C */ lwc1 $f0, 0xc($s1) -/* 180F30 80252650 4600018D */ trunc.w.s $f6, $f0 -/* 180F34 80252654 E4460084 */ swc1 $f6, 0x84($v0) -/* 180F38 80252658 C6200010 */ lwc1 $f0, 0x10($s1) -/* 180F3C 8025265C 4600018D */ trunc.w.s $f6, $f0 -/* 180F40 80252660 E4460088 */ swc1 $f6, 0x88($v0) -/* 180F44 80252664 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180F48 80252668 AC530090 */ sw $s3, 0x90($v0) -/* 180F4C 8025266C 4600018D */ trunc.w.s $f6, $f0 -/* 180F50 80252670 E446008C */ swc1 $f6, 0x8c($v0) -/* 180F54 80252674 C6200014 */ lwc1 $f0, 0x14($s1) -/* 180F58 80252678 24042032 */ addiu $a0, $zero, 0x2032 -/* 180F5C 8025267C E7A00010 */ swc1 $f0, 0x10($sp) -/* 180F60 80252680 8E26000C */ lw $a2, 0xc($s1) -/* 180F64 80252684 8E270010 */ lw $a3, 0x10($s1) -/* 180F68 80252688 0C052757 */ jal sfx_play_sound_at_position -/* 180F6C 8025268C 0000282D */ daddu $a1, $zero, $zero -.L80252690: -/* 180F70 80252690 8E820188 */ lw $v0, 0x188($s4) -/* 180F74 80252694 30420040 */ andi $v0, $v0, 0x40 -/* 180F78 80252698 1040000A */ beqz $v0, .L802526C4 -/* 180F7C 8025269C 24020093 */ addiu $v0, $zero, 0x93 -/* 180F80 802526A0 92630136 */ lbu $v1, 0x136($s3) -/* 180F84 802526A4 14620007 */ bne $v1, $v0, .L802526C4 -/* 180F88 802526A8 24040165 */ addiu $a0, $zero, 0x165 -/* 180F8C 802526AC C6200014 */ lwc1 $f0, 0x14($s1) -/* 180F90 802526B0 E7A00010 */ swc1 $f0, 0x10($sp) -/* 180F94 802526B4 8E26000C */ lw $a2, 0xc($s1) -/* 180F98 802526B8 8E270010 */ lw $a3, 0x10($s1) -/* 180F9C 802526BC 0C052757 */ jal sfx_play_sound_at_position -/* 180FA0 802526C0 0000282D */ daddu $a1, $zero, $zero -.L802526C4: -/* 180FA4 802526C4 0C099AB7 */ jal func_80266ADC -/* 180FA8 802526C8 0260202D */ daddu $a0, $s3, $zero -/* 180FAC 802526CC 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 180FB0 802526D0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 180FB4 802526D4 30420240 */ andi $v0, $v0, 0x240 -/* 180FB8 802526D8 10400007 */ beqz $v0, .L802526F8 -/* 180FBC 802526DC 03C0102D */ daddu $v0, $fp, $zero -/* 180FC0 802526E0 53C00001 */ beql $fp, $zero, .L802526E8 -/* 180FC4 802526E4 241E0001 */ addiu $fp, $zero, 1 -.L802526E8: -/* 180FC8 802526E8 24020002 */ addiu $v0, $zero, 2 -/* 180FCC 802526EC 53C20001 */ beql $fp, $v0, .L802526F4 -/* 180FD0 802526F0 241E0003 */ addiu $fp, $zero, 3 -.L802526F4: -/* 180FD4 802526F4 03C0102D */ daddu $v0, $fp, $zero -.L802526F8: -/* 180FD8 802526F8 8FBF0054 */ lw $ra, 0x54($sp) -/* 180FDC 802526FC 8FBE0050 */ lw $fp, 0x50($sp) -/* 180FE0 80252700 8FB7004C */ lw $s7, 0x4c($sp) -/* 180FE4 80252704 8FB60048 */ lw $s6, 0x48($sp) -/* 180FE8 80252708 8FB50044 */ lw $s5, 0x44($sp) -/* 180FEC 8025270C 8FB40040 */ lw $s4, 0x40($sp) -/* 180FF0 80252710 8FB3003C */ lw $s3, 0x3c($sp) -/* 180FF4 80252714 8FB20038 */ lw $s2, 0x38($sp) -/* 180FF8 80252718 8FB10034 */ lw $s1, 0x34($sp) -/* 180FFC 8025271C 8FB00030 */ lw $s0, 0x30($sp) -/* 181000 80252720 03E00008 */ jr $ra -/* 181004 80252724 27BD0058 */ addiu $sp, $sp, 0x58 diff --git a/ver/us/asm/nonmatchings/18C790/btl_state_draw_celebration.s b/ver/us/asm/nonmatchings/18C790/btl_state_draw_celebration.s deleted file mode 100644 index 5ea4c90dd3..0000000000 --- a/ver/us/asm/nonmatchings/18C790/btl_state_draw_celebration.s +++ /dev/null @@ -1,528 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_8029D550 -.word .L80260208_18EAE8, .L80260300_18EBE0, .L80260774_18F054, .L80260774_18F054, .L80260800_18F0E0, .L80260838_18F118, .L80260838_18F118, .L80260838_18F118, .L80260300_18EBE0, .L80260300_18EBE0, .L80260838_18F118, .L80260838_18F118, .L80260838_18F118, .L80260838_18F118, .L80260810_18F0F0, 0 - -.section .text - -glabel btl_state_draw_celebration -/* 18EA9C 802601BC 3C02800E */ lui $v0, %hi(gBattleState2) -/* 18EAA0 802601C0 8C42C4DC */ lw $v0, %lo(gBattleState2)($v0) -/* 18EAA4 802601C4 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 18EAA8 802601C8 AFBF0028 */ sw $ra, 0x28($sp) -/* 18EAAC 802601CC AFB50024 */ sw $s5, 0x24($sp) -/* 18EAB0 802601D0 AFB40020 */ sw $s4, 0x20($sp) -/* 18EAB4 802601D4 AFB3001C */ sw $s3, 0x1c($sp) -/* 18EAB8 802601D8 AFB20018 */ sw $s2, 0x18($sp) -/* 18EABC 802601DC AFB10014 */ sw $s1, 0x14($sp) -/* 18EAC0 802601E0 2443FFF9 */ addiu $v1, $v0, -7 -/* 18EAC4 802601E4 2C62000F */ sltiu $v0, $v1, 0xf -/* 18EAC8 802601E8 10400193 */ beqz $v0, .L80260838_18F118 -/* 18EACC 802601EC AFB00010 */ sw $s0, 0x10($sp) -/* 18EAD0 802601F0 00031080 */ sll $v0, $v1, 2 -/* 18EAD4 802601F4 3C01802A */ lui $at, %hi(jtbl_8029D550) -/* 18EAD8 802601F8 00220821 */ addu $at, $at, $v0 -/* 18EADC 802601FC 8C22D550 */ lw $v0, %lo(jtbl_8029D550)($at) -/* 18EAE0 80260200 00400008 */ jr $v0 -/* 18EAE4 80260204 00000000 */ nop -.L80260208_18EAE8: -/* 18EAE8 80260208 0C097FE3 */ jal btl_draw_upgrade_windows -/* 18EAEC 8026020C 0000202D */ daddu $a0, $zero, $zero -/* 18EAF0 80260210 24050080 */ addiu $a1, $zero, 0x80 -/* 18EAF4 80260214 00A0302D */ daddu $a2, $a1, $zero -/* 18EAF8 80260218 00A0382D */ daddu $a3, $a1, $zero -/* 18EAFC 8026021C 0000982D */ daddu $s3, $zero, $zero -/* 18EB00 80260220 3C15802A */ lui $s5, %hi(D_8029FA90) -/* 18EB04 80260224 26B5FA90 */ addiu $s5, $s5, %lo(D_8029FA90) -/* 18EB08 80260228 3C10802A */ lui $s0, %hi(D_8029FA80) -/* 18EB0C 8026022C 2610FA80 */ addiu $s0, $s0, %lo(D_8029FA80) -/* 18EB10 80260230 8E110000 */ lw $s1, ($s0) -/* 18EB14 80260234 0260A02D */ daddu $s4, $s3, $zero -/* 18EB18 80260238 0C0513BF */ jal set_hud_element_tint -/* 18EB1C 8026023C 0220202D */ daddu $a0, $s1, $zero -/* 18EB20 80260240 0C0511EA */ jal draw_hud_element_clipped -/* 18EB24 80260244 0220202D */ daddu $a0, $s1, $zero -/* 18EB28 80260248 24050080 */ addiu $a1, $zero, 0x80 -/* 18EB2C 8026024C 00A0302D */ daddu $a2, $a1, $zero -/* 18EB30 80260250 8E11000C */ lw $s1, 0xc($s0) -/* 18EB34 80260254 00A0382D */ daddu $a3, $a1, $zero -/* 18EB38 80260258 0C0513BF */ jal set_hud_element_tint -/* 18EB3C 8026025C 0220202D */ daddu $a0, $s1, $zero -/* 18EB40 80260260 0C0511EA */ jal draw_hud_element_clipped -/* 18EB44 80260264 0220202D */ daddu $a0, $s1, $zero -/* 18EB48 80260268 24050080 */ addiu $a1, $zero, 0x80 -/* 18EB4C 8026026C 00A0302D */ daddu $a2, $a1, $zero -/* 18EB50 80260270 8E110004 */ lw $s1, 4($s0) -/* 18EB54 80260274 00A0382D */ daddu $a3, $a1, $zero -/* 18EB58 80260278 0C0513BF */ jal set_hud_element_tint -/* 18EB5C 8026027C 0220202D */ daddu $a0, $s1, $zero -/* 18EB60 80260280 0C0511EA */ jal draw_hud_element_clipped -/* 18EB64 80260284 0220202D */ daddu $a0, $s1, $zero -/* 18EB68 80260288 24050080 */ addiu $a1, $zero, 0x80 -/* 18EB6C 8026028C 00A0302D */ daddu $a2, $a1, $zero -/* 18EB70 80260290 8E110008 */ lw $s1, 8($s0) -/* 18EB74 80260294 00A0382D */ daddu $a3, $a1, $zero -/* 18EB78 80260298 0C0513BF */ jal set_hud_element_tint -/* 18EB7C 8026029C 0220202D */ daddu $a0, $s1, $zero -/* 18EB80 802602A0 0C0511EA */ jal draw_hud_element_clipped -/* 18EB84 802602A4 0220202D */ daddu $a0, $s1, $zero -.L802602A8: -/* 18EB88 802602A8 0000902D */ daddu $s2, $zero, $zero -/* 18EB8C 802602AC 0280802D */ daddu $s0, $s4, $zero -/* 18EB90 802602B0 02151021 */ addu $v0, $s0, $s5 -.L802602B4: -/* 18EB94 802602B4 8C510000 */ lw $s1, ($v0) -/* 18EB98 802602B8 24050080 */ addiu $a1, $zero, 0x80 -/* 18EB9C 802602BC 00A0302D */ daddu $a2, $a1, $zero -/* 18EBA0 802602C0 00A0382D */ daddu $a3, $a1, $zero -/* 18EBA4 802602C4 26100004 */ addiu $s0, $s0, 4 -/* 18EBA8 802602C8 26520001 */ addiu $s2, $s2, 1 -/* 18EBAC 802602CC 0C0513BF */ jal set_hud_element_tint -/* 18EBB0 802602D0 0220202D */ daddu $a0, $s1, $zero -/* 18EBB4 802602D4 0C0511EA */ jal draw_hud_element_clipped -/* 18EBB8 802602D8 0220202D */ daddu $a0, $s1, $zero -/* 18EBBC 802602DC 2A420007 */ slti $v0, $s2, 7 -/* 18EBC0 802602E0 1440FFF4 */ bnez $v0, .L802602B4 -/* 18EBC4 802602E4 02151021 */ addu $v0, $s0, $s5 -/* 18EBC8 802602E8 26730001 */ addiu $s3, $s3, 1 -/* 18EBCC 802602EC 2A620003 */ slti $v0, $s3, 3 -/* 18EBD0 802602F0 1440FFED */ bnez $v0, .L802602A8 -/* 18EBD4 802602F4 2694001C */ addiu $s4, $s4, 0x1c -/* 18EBD8 802602F8 0809820E */ j .L80260838_18F118 -/* 18EBDC 802602FC 00000000 */ nop -.L80260300_18EBE0: -/* 18EBE0 80260300 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 18EBE4 80260304 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 18EBE8 80260308 80430048 */ lb $v1, 0x48($v0) -/* 18EBEC 8026030C 24020001 */ addiu $v0, $zero, 1 -/* 18EBF0 80260310 1062006B */ beq $v1, $v0, .L802604C0 -/* 18EBF4 80260314 28620002 */ slti $v0, $v1, 2 -/* 18EBF8 80260318 104000A9 */ beqz $v0, .L802605C0 -/* 18EBFC 8026031C 241500D0 */ addiu $s5, $zero, 0xd0 -/* 18EC00 80260320 146000A8 */ bnez $v1, .L802605C4 -/* 18EC04 80260324 24050080 */ addiu $a1, $zero, 0x80 -/* 18EC08 80260328 24150098 */ addiu $s5, $zero, 0x98 -/* 18EC0C 8026032C 240500FF */ addiu $a1, $zero, 0xff -/* 18EC10 80260330 00A0302D */ daddu $a2, $a1, $zero -/* 18EC14 80260334 00A0382D */ daddu $a3, $a1, $zero -/* 18EC18 80260338 3C10802A */ lui $s0, %hi(D_8029FA80) -/* 18EC1C 8026033C 2610FA80 */ addiu $s0, $s0, %lo(D_8029FA80) -/* 18EC20 80260340 8E040000 */ lw $a0, ($s0) -/* 18EC24 80260344 3C11802A */ lui $s1, %hi(D_8029FA90) -/* 18EC28 80260348 2631FA90 */ addiu $s1, $s1, %lo(D_8029FA90) -/* 18EC2C 8026034C 0C0513BF */ jal set_hud_element_tint -/* 18EC30 80260350 0000902D */ daddu $s2, $zero, $zero -/* 18EC34 80260354 24050080 */ addiu $a1, $zero, 0x80 -/* 18EC38 80260358 00A0302D */ daddu $a2, $a1, $zero -/* 18EC3C 8026035C 8E04000C */ lw $a0, 0xc($s0) -/* 18EC40 80260360 0C0513BF */ jal set_hud_element_tint -/* 18EC44 80260364 00A0382D */ daddu $a3, $a1, $zero -/* 18EC48 80260368 24050080 */ addiu $a1, $zero, 0x80 -/* 18EC4C 8026036C 00A0302D */ daddu $a2, $a1, $zero -/* 18EC50 80260370 8E040004 */ lw $a0, 4($s0) -/* 18EC54 80260374 0C0513BF */ jal set_hud_element_tint -/* 18EC58 80260378 00A0382D */ daddu $a3, $a1, $zero -/* 18EC5C 8026037C 24050080 */ addiu $a1, $zero, 0x80 -/* 18EC60 80260380 00A0302D */ daddu $a2, $a1, $zero -/* 18EC64 80260384 8E040008 */ lw $a0, 8($s0) -/* 18EC68 80260388 0C0513BF */ jal set_hud_element_tint -/* 18EC6C 8026038C 00A0382D */ daddu $a3, $a1, $zero -.L80260390: -/* 18EC70 80260390 8E240000 */ lw $a0, ($s1) -/* 18EC74 80260394 24050080 */ addiu $a1, $zero, 0x80 -/* 18EC78 80260398 00A0302D */ daddu $a2, $a1, $zero -/* 18EC7C 8026039C 00A0382D */ daddu $a3, $a1, $zero -/* 18EC80 802603A0 26310004 */ addiu $s1, $s1, 4 -/* 18EC84 802603A4 0C0513BF */ jal set_hud_element_tint -/* 18EC88 802603A8 26520001 */ addiu $s2, $s2, 1 -/* 18EC8C 802603AC 2A420007 */ slti $v0, $s2, 7 -/* 18EC90 802603B0 1440FFF7 */ bnez $v0, .L80260390 -/* 18EC94 802603B4 00000000 */ nop -/* 18EC98 802603B8 0000902D */ daddu $s2, $zero, $zero -/* 18EC9C 802603BC 3C10802A */ lui $s0, %hi(D_8029FA90) -/* 18ECA0 802603C0 2610FA90 */ addiu $s0, $s0, %lo(D_8029FA90) -.L802603C4: -/* 18ECA4 802603C4 8E04001C */ lw $a0, 0x1c($s0) -/* 18ECA8 802603C8 240500FF */ addiu $a1, $zero, 0xff -/* 18ECAC 802603CC 00A0302D */ daddu $a2, $a1, $zero -/* 18ECB0 802603D0 00A0382D */ daddu $a3, $a1, $zero -/* 18ECB4 802603D4 26100004 */ addiu $s0, $s0, 4 -/* 18ECB8 802603D8 0C0513BF */ jal set_hud_element_tint -/* 18ECBC 802603DC 26520001 */ addiu $s2, $s2, 1 -/* 18ECC0 802603E0 2A420007 */ slti $v0, $s2, 7 -/* 18ECC4 802603E4 1440FFF7 */ bnez $v0, .L802603C4 -/* 18ECC8 802603E8 00000000 */ nop -/* 18ECCC 802603EC 0000902D */ daddu $s2, $zero, $zero -/* 18ECD0 802603F0 3C10802A */ lui $s0, %hi(D_8029FA90) -/* 18ECD4 802603F4 2610FA90 */ addiu $s0, $s0, %lo(D_8029FA90) -.L802603F8: -/* 18ECD8 802603F8 8E040038 */ lw $a0, 0x38($s0) -/* 18ECDC 802603FC 24050080 */ addiu $a1, $zero, 0x80 -/* 18ECE0 80260400 00A0302D */ daddu $a2, $a1, $zero -/* 18ECE4 80260404 00A0382D */ daddu $a3, $a1, $zero -/* 18ECE8 80260408 26100004 */ addiu $s0, $s0, 4 -/* 18ECEC 8026040C 0C0513BF */ jal set_hud_element_tint -/* 18ECF0 80260410 26520001 */ addiu $s2, $s2, 1 -/* 18ECF4 80260414 2A420007 */ slti $v0, $s2, 7 -/* 18ECF8 80260418 1440FFF7 */ bnez $v0, .L802603F8 -/* 18ECFC 8026041C 00000000 */ nop -/* 18ED00 80260420 3C10802A */ lui $s0, %hi(D_8029FA80) -/* 18ED04 80260424 2610FA80 */ addiu $s0, $s0, %lo(D_8029FA80) -/* 18ED08 80260428 8E110000 */ lw $s1, ($s0) -/* 18ED0C 8026042C 0C05122C */ jal get_hud_element_anim -/* 18ED10 80260430 0220202D */ daddu $a0, $s1, $zero -/* 18ED14 80260434 3C05802B */ lui $a1, %hi(D_802A9F34) -/* 18ED18 80260438 24A59F34 */ addiu $a1, $a1, %lo(D_802A9F34) -/* 18ED1C 8026043C 10450003 */ beq $v0, $a1, .L8026044C -/* 18ED20 80260440 00000000 */ nop -/* 18ED24 80260444 0C0511FF */ jal set_hud_element_anim -/* 18ED28 80260448 0220202D */ daddu $a0, $s1, $zero -.L8026044C: -/* 18ED2C 8026044C 8E11000C */ lw $s1, 0xc($s0) -/* 18ED30 80260450 0C05122C */ jal get_hud_element_anim -/* 18ED34 80260454 0220202D */ daddu $a0, $s1, $zero -/* 18ED38 80260458 3C05802B */ lui $a1, %hi(D_802A9F84) -/* 18ED3C 8026045C 24A59F84 */ addiu $a1, $a1, %lo(D_802A9F84) -/* 18ED40 80260460 10450003 */ beq $v0, $a1, .L80260470 -/* 18ED44 80260464 00000000 */ nop -/* 18ED48 80260468 0C0511FF */ jal set_hud_element_anim -/* 18ED4C 8026046C 0220202D */ daddu $a0, $s1, $zero -.L80260470: -/* 18ED50 80260470 8E110004 */ lw $s1, 4($s0) -/* 18ED54 80260474 0C05122C */ jal get_hud_element_anim -/* 18ED58 80260478 0220202D */ daddu $a0, $s1, $zero -/* 18ED5C 8026047C 3C05802B */ lui $a1, %hi(D_802A9F5C) -/* 18ED60 80260480 24A59F5C */ addiu $a1, $a1, %lo(D_802A9F5C) -/* 18ED64 80260484 10450003 */ beq $v0, $a1, .L80260494 -/* 18ED68 80260488 00000000 */ nop -/* 18ED6C 8026048C 0C0511FF */ jal set_hud_element_anim -/* 18ED70 80260490 0220202D */ daddu $a0, $s1, $zero -.L80260494: -/* 18ED74 80260494 8E110008 */ lw $s1, 8($s0) -/* 18ED78 80260498 0C05122C */ jal get_hud_element_anim -/* 18ED7C 8026049C 0220202D */ daddu $a0, $s1, $zero -/* 18ED80 802604A0 3C05802B */ lui $a1, %hi(D_802A9FAC) -/* 18ED84 802604A4 24A59FAC */ addiu $a1, $a1, %lo(D_802A9FAC) -/* 18ED88 802604A8 10450082 */ beq $v0, $a1, .L802606B4 -/* 18ED8C 802604AC 00000000 */ nop -/* 18ED90 802604B0 0C0511FF */ jal set_hud_element_anim -/* 18ED94 802604B4 0220202D */ daddu $a0, $s1, $zero -/* 18ED98 802604B8 080981AD */ j .L802606B4 -/* 18ED9C 802604BC 00000000 */ nop -.L802604C0: -/* 18EDA0 802604C0 241500B4 */ addiu $s5, $zero, 0xb4 -/* 18EDA4 802604C4 24050080 */ addiu $a1, $zero, 0x80 -/* 18EDA8 802604C8 00A0302D */ daddu $a2, $a1, $zero -/* 18EDAC 802604CC 00A0382D */ daddu $a3, $a1, $zero -/* 18EDB0 802604D0 3C10802A */ lui $s0, %hi(D_8029FA80) -/* 18EDB4 802604D4 2610FA80 */ addiu $s0, $s0, %lo(D_8029FA80) -/* 18EDB8 802604D8 8E040000 */ lw $a0, ($s0) -/* 18EDBC 802604DC 3C11802A */ lui $s1, %hi(D_8029FA90) -/* 18EDC0 802604E0 2631FA90 */ addiu $s1, $s1, %lo(D_8029FA90) -/* 18EDC4 802604E4 0C0513BF */ jal set_hud_element_tint -/* 18EDC8 802604E8 0000902D */ daddu $s2, $zero, $zero -/* 18EDCC 802604EC 240500FF */ addiu $a1, $zero, 0xff -/* 18EDD0 802604F0 00A0302D */ daddu $a2, $a1, $zero -/* 18EDD4 802604F4 8E04000C */ lw $a0, 0xc($s0) -/* 18EDD8 802604F8 0C0513BF */ jal set_hud_element_tint -/* 18EDDC 802604FC 00A0382D */ daddu $a3, $a1, $zero -/* 18EDE0 80260500 240500FF */ addiu $a1, $zero, 0xff -/* 18EDE4 80260504 00A0302D */ daddu $a2, $a1, $zero -/* 18EDE8 80260508 8E040004 */ lw $a0, 4($s0) -/* 18EDEC 8026050C 0C0513BF */ jal set_hud_element_tint -/* 18EDF0 80260510 00A0382D */ daddu $a3, $a1, $zero -/* 18EDF4 80260514 24050080 */ addiu $a1, $zero, 0x80 -/* 18EDF8 80260518 00A0302D */ daddu $a2, $a1, $zero -/* 18EDFC 8026051C 8E040008 */ lw $a0, 8($s0) -/* 18EE00 80260520 0C0513BF */ jal set_hud_element_tint -/* 18EE04 80260524 00A0382D */ daddu $a3, $a1, $zero -.L80260528: -/* 18EE08 80260528 8E240000 */ lw $a0, ($s1) -/* 18EE0C 8026052C 240500FF */ addiu $a1, $zero, 0xff -/* 18EE10 80260530 00A0302D */ daddu $a2, $a1, $zero -/* 18EE14 80260534 00A0382D */ daddu $a3, $a1, $zero -/* 18EE18 80260538 26310004 */ addiu $s1, $s1, 4 -/* 18EE1C 8026053C 0C0513BF */ jal set_hud_element_tint -/* 18EE20 80260540 26520001 */ addiu $s2, $s2, 1 -/* 18EE24 80260544 2A420007 */ slti $v0, $s2, 7 -/* 18EE28 80260548 1440FFF7 */ bnez $v0, .L80260528 -/* 18EE2C 8026054C 00000000 */ nop -/* 18EE30 80260550 0000902D */ daddu $s2, $zero, $zero -/* 18EE34 80260554 3C10802A */ lui $s0, %hi(D_8029FA90) -/* 18EE38 80260558 2610FA90 */ addiu $s0, $s0, %lo(D_8029FA90) -.L8026055C: -/* 18EE3C 8026055C 8E04001C */ lw $a0, 0x1c($s0) -/* 18EE40 80260560 24050080 */ addiu $a1, $zero, 0x80 -/* 18EE44 80260564 00A0302D */ daddu $a2, $a1, $zero -/* 18EE48 80260568 00A0382D */ daddu $a3, $a1, $zero -/* 18EE4C 8026056C 26100004 */ addiu $s0, $s0, 4 -/* 18EE50 80260570 0C0513BF */ jal set_hud_element_tint -/* 18EE54 80260574 26520001 */ addiu $s2, $s2, 1 -/* 18EE58 80260578 2A420007 */ slti $v0, $s2, 7 -/* 18EE5C 8026057C 1440FFF7 */ bnez $v0, .L8026055C -/* 18EE60 80260580 00000000 */ nop -/* 18EE64 80260584 0000902D */ daddu $s2, $zero, $zero -/* 18EE68 80260588 3C10802A */ lui $s0, %hi(D_8029FA90) -/* 18EE6C 8026058C 2610FA90 */ addiu $s0, $s0, %lo(D_8029FA90) -.L80260590: -/* 18EE70 80260590 8E040038 */ lw $a0, 0x38($s0) -/* 18EE74 80260594 24050080 */ addiu $a1, $zero, 0x80 -/* 18EE78 80260598 00A0302D */ daddu $a2, $a1, $zero -/* 18EE7C 8026059C 00A0382D */ daddu $a3, $a1, $zero -/* 18EE80 802605A0 26100004 */ addiu $s0, $s0, 4 -/* 18EE84 802605A4 0C0513BF */ jal set_hud_element_tint -/* 18EE88 802605A8 26520001 */ addiu $s2, $s2, 1 -/* 18EE8C 802605AC 2A420007 */ slti $v0, $s2, 7 -/* 18EE90 802605B0 10400040 */ beqz $v0, .L802606B4 -/* 18EE94 802605B4 00000000 */ nop -/* 18EE98 802605B8 08098164 */ j .L80260590 -/* 18EE9C 802605BC 00000000 */ nop -.L802605C0: -/* 18EEA0 802605C0 24050080 */ addiu $a1, $zero, 0x80 -.L802605C4: -/* 18EEA4 802605C4 00A0302D */ daddu $a2, $a1, $zero -/* 18EEA8 802605C8 00A0382D */ daddu $a3, $a1, $zero -/* 18EEAC 802605CC 3C10802A */ lui $s0, %hi(D_8029FA80) -/* 18EEB0 802605D0 2610FA80 */ addiu $s0, $s0, %lo(D_8029FA80) -/* 18EEB4 802605D4 8E040000 */ lw $a0, ($s0) -/* 18EEB8 802605D8 3C11802A */ lui $s1, %hi(D_8029FA90) -/* 18EEBC 802605DC 2631FA90 */ addiu $s1, $s1, %lo(D_8029FA90) -/* 18EEC0 802605E0 0C0513BF */ jal set_hud_element_tint -/* 18EEC4 802605E4 0000902D */ daddu $s2, $zero, $zero -/* 18EEC8 802605E8 24050080 */ addiu $a1, $zero, 0x80 -/* 18EECC 802605EC 00A0302D */ daddu $a2, $a1, $zero -/* 18EED0 802605F0 8E04000C */ lw $a0, 0xc($s0) -/* 18EED4 802605F4 0C0513BF */ jal set_hud_element_tint -/* 18EED8 802605F8 00A0382D */ daddu $a3, $a1, $zero -/* 18EEDC 802605FC 24050080 */ addiu $a1, $zero, 0x80 -/* 18EEE0 80260600 00A0302D */ daddu $a2, $a1, $zero -/* 18EEE4 80260604 8E040004 */ lw $a0, 4($s0) -/* 18EEE8 80260608 0C0513BF */ jal set_hud_element_tint -/* 18EEEC 8026060C 00A0382D */ daddu $a3, $a1, $zero -/* 18EEF0 80260610 240500FF */ addiu $a1, $zero, 0xff -/* 18EEF4 80260614 00A0302D */ daddu $a2, $a1, $zero -/* 18EEF8 80260618 8E040008 */ lw $a0, 8($s0) -/* 18EEFC 8026061C 0C0513BF */ jal set_hud_element_tint -/* 18EF00 80260620 00A0382D */ daddu $a3, $a1, $zero -.L80260624: -/* 18EF04 80260624 8E240000 */ lw $a0, ($s1) -/* 18EF08 80260628 24050080 */ addiu $a1, $zero, 0x80 -/* 18EF0C 8026062C 00A0302D */ daddu $a2, $a1, $zero -/* 18EF10 80260630 00A0382D */ daddu $a3, $a1, $zero -/* 18EF14 80260634 26310004 */ addiu $s1, $s1, 4 -/* 18EF18 80260638 0C0513BF */ jal set_hud_element_tint -/* 18EF1C 8026063C 26520001 */ addiu $s2, $s2, 1 -/* 18EF20 80260640 2A420007 */ slti $v0, $s2, 7 -/* 18EF24 80260644 1440FFF7 */ bnez $v0, .L80260624 -/* 18EF28 80260648 00000000 */ nop -/* 18EF2C 8026064C 0000902D */ daddu $s2, $zero, $zero -/* 18EF30 80260650 3C10802A */ lui $s0, %hi(D_8029FA90) -/* 18EF34 80260654 2610FA90 */ addiu $s0, $s0, %lo(D_8029FA90) -.L80260658: -/* 18EF38 80260658 8E04001C */ lw $a0, 0x1c($s0) -/* 18EF3C 8026065C 24050080 */ addiu $a1, $zero, 0x80 -/* 18EF40 80260660 00A0302D */ daddu $a2, $a1, $zero -/* 18EF44 80260664 00A0382D */ daddu $a3, $a1, $zero -/* 18EF48 80260668 26100004 */ addiu $s0, $s0, 4 -/* 18EF4C 8026066C 0C0513BF */ jal set_hud_element_tint -/* 18EF50 80260670 26520001 */ addiu $s2, $s2, 1 -/* 18EF54 80260674 2A420007 */ slti $v0, $s2, 7 -/* 18EF58 80260678 1440FFF7 */ bnez $v0, .L80260658 -/* 18EF5C 8026067C 00000000 */ nop -/* 18EF60 80260680 0000902D */ daddu $s2, $zero, $zero -/* 18EF64 80260684 3C10802A */ lui $s0, %hi(D_8029FA90) -/* 18EF68 80260688 2610FA90 */ addiu $s0, $s0, %lo(D_8029FA90) -.L8026068C: -/* 18EF6C 8026068C 8E040038 */ lw $a0, 0x38($s0) -/* 18EF70 80260690 240500FF */ addiu $a1, $zero, 0xff -/* 18EF74 80260694 00A0302D */ daddu $a2, $a1, $zero -/* 18EF78 80260698 00A0382D */ daddu $a3, $a1, $zero -/* 18EF7C 8026069C 26100004 */ addiu $s0, $s0, 4 -/* 18EF80 802606A0 0C0513BF */ jal set_hud_element_tint -/* 18EF84 802606A4 26520001 */ addiu $s2, $s2, 1 -/* 18EF88 802606A8 2A420007 */ slti $v0, $s2, 7 -/* 18EF8C 802606AC 1440FFF7 */ bnez $v0, .L8026068C -/* 18EF90 802606B0 00000000 */ nop -.L802606B4: -/* 18EF94 802606B4 0C097FE3 */ jal btl_draw_upgrade_windows -/* 18EF98 802606B8 24040001 */ addiu $a0, $zero, 1 -/* 18EF9C 802606BC 3C10802A */ lui $s0, %hi(D_8029FA80) -/* 18EFA0 802606C0 2610FA80 */ addiu $s0, $s0, %lo(D_8029FA80) -/* 18EFA4 802606C4 8E040000 */ lw $a0, ($s0) -/* 18EFA8 802606C8 0C0511EA */ jal draw_hud_element_clipped -/* 18EFAC 802606CC 0000982D */ daddu $s3, $zero, $zero -/* 18EFB0 802606D0 8E04000C */ lw $a0, 0xc($s0) -/* 18EFB4 802606D4 0C0511EA */ jal draw_hud_element_clipped -/* 18EFB8 802606D8 0260882D */ daddu $s1, $s3, $zero -/* 18EFBC 802606DC 8E040004 */ lw $a0, 4($s0) -/* 18EFC0 802606E0 3C14802A */ lui $s4, %hi(D_8029FA90) -/* 18EFC4 802606E4 2694FA90 */ addiu $s4, $s4, %lo(D_8029FA90) -/* 18EFC8 802606E8 0C0511EA */ jal draw_hud_element_clipped -/* 18EFCC 802606EC 00000000 */ nop -/* 18EFD0 802606F0 0C0511EA */ jal draw_hud_element_clipped -/* 18EFD4 802606F4 8E040008 */ lw $a0, 8($s0) -.L802606F8: -/* 18EFD8 802606F8 0000902D */ daddu $s2, $zero, $zero -/* 18EFDC 802606FC 0220802D */ daddu $s0, $s1, $zero -/* 18EFE0 80260700 02141021 */ addu $v0, $s0, $s4 -.L80260704: -/* 18EFE4 80260704 8C440000 */ lw $a0, ($v0) -/* 18EFE8 80260708 26100004 */ addiu $s0, $s0, 4 -/* 18EFEC 8026070C 0C0511EA */ jal draw_hud_element_clipped -/* 18EFF0 80260710 26520001 */ addiu $s2, $s2, 1 -/* 18EFF4 80260714 2A420007 */ slti $v0, $s2, 7 -/* 18EFF8 80260718 1440FFFA */ bnez $v0, .L80260704 -/* 18EFFC 8026071C 02141021 */ addu $v0, $s0, $s4 -/* 18F000 80260720 26730001 */ addiu $s3, $s3, 1 -/* 18F004 80260724 2A620003 */ slti $v0, $s3, 3 -/* 18F008 80260728 1440FFF3 */ bnez $v0, .L802606F8 -/* 18F00C 8026072C 2631001C */ addiu $s1, $s1, 0x1c -/* 18F010 80260730 0C051086 */ jal func_80144218 -/* 18F014 80260734 2404FFFF */ addiu $a0, $zero, -1 -/* 18F018 80260738 44951000 */ mtc1 $s5, $f2 -/* 18F01C 8026073C 00000000 */ nop -/* 18F020 80260740 468010A0 */ cvt.s.w $f2, $f2 -/* 18F024 80260744 44071000 */ mfc1 $a3, $f2 -/* 18F028 80260748 44800000 */ mtc1 $zero, $f0 -/* 18F02C 8026074C 3C11802A */ lui $s1, %hi(D_8029FAE8) -/* 18F030 80260750 8E31FAE8 */ lw $s1, %lo(D_8029FAE8)($s1) -/* 18F034 80260754 44050000 */ mfc1 $a1, $f0 -/* 18F038 80260758 0220202D */ daddu $a0, $s1, $zero -/* 18F03C 8026075C 0C051489 */ jal set_hud_element_transform_rotation -/* 18F040 80260760 00A0302D */ daddu $a2, $a1, $zero -/* 18F044 80260764 0C05108E */ jal func_80144238 -/* 18F048 80260768 0220202D */ daddu $a0, $s1, $zero -/* 18F04C 8026076C 0809820E */ j .L80260838_18F118 -/* 18F050 80260770 00000000 */ nop -.L80260774_18F054: -/* 18F054 80260774 0C097FE3 */ jal btl_draw_upgrade_windows -/* 18F058 80260778 24040001 */ addiu $a0, $zero, 1 -/* 18F05C 8026077C 3C10802A */ lui $s0, %hi(D_8029FA80) -/* 18F060 80260780 2610FA80 */ addiu $s0, $s0, %lo(D_8029FA80) -/* 18F064 80260784 8E040000 */ lw $a0, ($s0) -/* 18F068 80260788 0C0511EA */ jal draw_hud_element_clipped -/* 18F06C 8026078C 0000982D */ daddu $s3, $zero, $zero -/* 18F070 80260790 8E04000C */ lw $a0, 0xc($s0) -/* 18F074 80260794 0C0511EA */ jal draw_hud_element_clipped -/* 18F078 80260798 0260882D */ daddu $s1, $s3, $zero -/* 18F07C 8026079C 8E040004 */ lw $a0, 4($s0) -/* 18F080 802607A0 3C14802A */ lui $s4, %hi(D_8029FA90) -/* 18F084 802607A4 2694FA90 */ addiu $s4, $s4, %lo(D_8029FA90) -/* 18F088 802607A8 0C0511EA */ jal draw_hud_element_clipped -/* 18F08C 802607AC 00000000 */ nop -/* 18F090 802607B0 0C0511EA */ jal draw_hud_element_clipped -/* 18F094 802607B4 8E040008 */ lw $a0, 8($s0) -.L802607B8: -/* 18F098 802607B8 0000902D */ daddu $s2, $zero, $zero -/* 18F09C 802607BC 0220802D */ daddu $s0, $s1, $zero -/* 18F0A0 802607C0 02141021 */ addu $v0, $s0, $s4 -.L802607C4: -/* 18F0A4 802607C4 8C440000 */ lw $a0, ($v0) -/* 18F0A8 802607C8 26100004 */ addiu $s0, $s0, 4 -/* 18F0AC 802607CC 0C0511EA */ jal draw_hud_element_clipped -/* 18F0B0 802607D0 26520001 */ addiu $s2, $s2, 1 -/* 18F0B4 802607D4 2A420007 */ slti $v0, $s2, 7 -/* 18F0B8 802607D8 1440FFFA */ bnez $v0, .L802607C4 -/* 18F0BC 802607DC 02141021 */ addu $v0, $s0, $s4 -/* 18F0C0 802607E0 26730001 */ addiu $s3, $s3, 1 -/* 18F0C4 802607E4 2A620003 */ slti $v0, $s3, 3 -/* 18F0C8 802607E8 1440FFF3 */ bnez $v0, .L802607B8 -/* 18F0CC 802607EC 2631001C */ addiu $s1, $s1, 0x1c -/* 18F0D0 802607F0 3C018028 */ lui $at, %hi(D_80284150) -/* 18F0D4 802607F4 C4224150 */ lwc1 $f2, %lo(D_80284150)($at) -/* 18F0D8 802607F8 0809820B */ j .L8026082C -/* 18F0DC 802607FC 468010A0 */ cvt.s.w $f2, $f2 -.L80260800_18F0E0: -/* 18F0E0 80260800 3C018028 */ lui $at, %hi(D_80284150) -/* 18F0E4 80260804 C4224150 */ lwc1 $f2, %lo(D_80284150)($at) -/* 18F0E8 80260808 0809820B */ j .L8026082C -/* 18F0EC 8026080C 468010A0 */ cvt.s.w $f2, $f2 -.L80260810_18F0F0: -/* 18F0F0 80260810 3C058028 */ lui $a1, %hi(D_80284150) -/* 18F0F4 80260814 8CA54150 */ lw $a1, %lo(D_80284150)($a1) -/* 18F0F8 80260818 10A00007 */ beqz $a1, .L80260838_18F118 -/* 18F0FC 8026081C 00000000 */ nop -/* 18F100 80260820 44851000 */ mtc1 $a1, $f2 -/* 18F104 80260824 00000000 */ nop -/* 18F108 80260828 468010A0 */ cvt.s.w $f2, $f2 -.L8026082C: -/* 18F10C 8026082C 44051000 */ mfc1 $a1, $f2 -/* 18F110 80260830 0C04DF62 */ jal set_screen_overlay_params_front -/* 18F114 80260834 0000202D */ daddu $a0, $zero, $zero -.L80260838_18F118: -/* 18F118 80260838 3C03800E */ lui $v1, %hi(gBattleState2) -/* 18F11C 8026083C 8C63C4DC */ lw $v1, %lo(gBattleState2)($v1) -/* 18F120 80260840 28620007 */ slti $v0, $v1, 7 -/* 18F124 80260844 14400037 */ bnez $v0, .L80260924 -/* 18F128 80260848 2862000A */ slti $v0, $v1, 0xa -/* 18F12C 8026084C 14400005 */ bnez $v0, .L80260864 -/* 18F130 80260850 2402000A */ addiu $v0, $zero, 0xa -/* 18F134 80260854 1062001B */ beq $v1, $v0, .L802608C4 -/* 18F138 80260858 00000000 */ nop -/* 18F13C 8026085C 08098249 */ j .L80260924 -/* 18F140 80260860 00000000 */ nop -.L80260864: -/* 18F144 80260864 3C06802A */ lui $a2, %hi(D_8029FB8C) -/* 18F148 80260868 24C6FB8C */ addiu $a2, $a2, %lo(D_8029FB8C) -/* 18F14C 8026086C 3C05802A */ lui $a1, %hi(D_8029FB88) -/* 18F150 80260870 24A5FB88 */ addiu $a1, $a1, %lo(D_8029FB88) -/* 18F154 80260874 8CC30000 */ lw $v1, ($a2) -/* 18F158 80260878 8CA20000 */ lw $v0, ($a1) -/* 18F15C 8026087C 24640002 */ addiu $a0, $v1, 2 -/* 18F160 80260880 00441021 */ addu $v0, $v0, $a0 -/* 18F164 80260884 ACC40000 */ sw $a0, ($a2) -/* 18F168 80260888 ACA20000 */ sw $v0, ($a1) -/* 18F16C 8026088C 284200C9 */ slti $v0, $v0, 0xc9 -/* 18F170 80260890 5440001C */ bnel $v0, $zero, .L80260904 -/* 18F174 80260894 240600B0 */ addiu $a2, $zero, 0xb0 -/* 18F178 80260898 3C035555 */ lui $v1, 0x5555 -/* 18F17C 8026089C 34635556 */ ori $v1, $v1, 0x5556 -/* 18F180 802608A0 00041023 */ negu $v0, $a0 -/* 18F184 802608A4 00430018 */ mult $v0, $v1 -/* 18F188 802608A8 240300C8 */ addiu $v1, $zero, 0xc8 -/* 18F18C 802608AC 000217C3 */ sra $v0, $v0, 0x1f -/* 18F190 802608B0 ACA30000 */ sw $v1, ($a1) -/* 18F194 802608B4 00004010 */ mfhi $t0 -/* 18F198 802608B8 01021023 */ subu $v0, $t0, $v0 -/* 18F19C 802608BC 08098240 */ j .L80260900 -/* 18F1A0 802608C0 ACC20000 */ sw $v0, ($a2) -.L802608C4: -/* 18F1A4 802608C4 3C02802A */ lui $v0, %hi(D_8029FB8C) -/* 18F1A8 802608C8 2442FB8C */ addiu $v0, $v0, %lo(D_8029FB8C) -/* 18F1AC 802608CC 3C05802A */ lui $a1, %hi(D_8029FB88) -/* 18F1B0 802608D0 24A5FB88 */ addiu $a1, $a1, %lo(D_8029FB88) -/* 18F1B4 802608D4 8C430000 */ lw $v1, ($v0) -/* 18F1B8 802608D8 8CA40000 */ lw $a0, ($a1) -/* 18F1BC 802608DC 24630004 */ addiu $v1, $v1, 4 -/* 18F1C0 802608E0 00832021 */ addu $a0, $a0, $v1 -/* 18F1C4 802608E4 AC430000 */ sw $v1, ($v0) -/* 18F1C8 802608E8 ACA40000 */ sw $a0, ($a1) -/* 18F1CC 802608EC 288401F5 */ slti $a0, $a0, 0x1f5 -/* 18F1D0 802608F0 14800004 */ bnez $a0, .L80260904 -/* 18F1D4 802608F4 240600B0 */ addiu $a2, $zero, 0xb0 -/* 18F1D8 802608F8 240201F4 */ addiu $v0, $zero, 0x1f4 -/* 18F1DC 802608FC ACA20000 */ sw $v0, ($a1) -.L80260900: -/* 18F1E0 80260900 240600B0 */ addiu $a2, $zero, 0xb0 -.L80260904: -/* 18F1E4 80260904 3C11802A */ lui $s1, %hi(D_8029FB48) -/* 18F1E8 80260908 8E31FB48 */ lw $s1, %lo(D_8029FB48)($s1) -/* 18F1EC 8026090C 8CA50000 */ lw $a1, ($a1) -/* 18F1F0 80260910 0220202D */ daddu $a0, $s1, $zero -/* 18F1F4 80260914 0C051261 */ jal set_hud_element_render_pos -/* 18F1F8 80260918 24A5FFD5 */ addiu $a1, $a1, -0x2b -/* 18F1FC 8026091C 0C0511EA */ jal draw_hud_element_clipped -/* 18F200 80260920 0220202D */ daddu $a0, $s1, $zero -.L80260924: -/* 18F204 80260924 8FBF0028 */ lw $ra, 0x28($sp) -/* 18F208 80260928 8FB50024 */ lw $s5, 0x24($sp) -/* 18F20C 8026092C 8FB40020 */ lw $s4, 0x20($sp) -/* 18F210 80260930 8FB3001C */ lw $s3, 0x1c($sp) -/* 18F214 80260934 8FB20018 */ lw $s2, 0x18($sp) -/* 18F218 80260938 8FB10014 */ lw $s1, 0x14($sp) -/* 18F21C 8026093C 8FB00010 */ lw $s0, 0x10($sp) -/* 18F220 80260940 03E00008 */ jr $ra -/* 18F224 80260944 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/18C790/btl_state_update_celebration.s b/ver/us/asm/nonmatchings/18C790/btl_state_update_celebration.s index ea2c72e428..6f0ac09348 100644 --- a/ver/us/asm/nonmatchings/18C790/btl_state_update_celebration.s +++ b/ver/us/asm/nonmatchings/18C790/btl_state_update_celebration.s @@ -1289,8 +1289,8 @@ glabel btl_state_update_celebration /* 18DDC8 8025F4E8 0C051261 */ jal set_hud_element_render_pos /* 18DDCC 8025F4EC 24C6002E */ addiu $a2, $a2, 0x2e /* 18DDD0 8025F4F0 24020001 */ addiu $v0, $zero, 1 -/* 18DDD4 8025F4F4 3C01802A */ lui $at, %hi(D_8029FB68) -/* 18DDD8 8025F4F8 AC22FB68 */ sw $v0, %lo(D_8029FB68)($at) +/* 18DDD4 8025F4F4 3C01802A */ lui $at, %hi(D_8029FB60+0x8) +/* 18DDD8 8025F4F8 AC22FB68 */ sw $v0, %lo(D_8029FB60+0x8)($at) .L8025F4FC: /* 18DDDC 8025F4FC 3C048029 */ lui $a0, %hi(HudScript_ProjectorBeam) /* 18DDE0 8025F500 24842C28 */ addiu $a0, $a0, %lo(HudScript_ProjectorBeam) diff --git a/ver/us/asm/nonmatchings/18C790/func_8025DEC4.s b/ver/us/asm/nonmatchings/18C790/func_8025DEC4.s deleted file mode 100644 index 246d56731f..0000000000 --- a/ver/us/asm/nonmatchings/18C790/func_8025DEC4.s +++ /dev/null @@ -1,100 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8025DEC4 -/* 18C7A4 8025DEC4 3C0651EB */ lui $a2, 0x51eb -/* 18C7A8 8025DEC8 3C05800E */ lui $a1, %hi(gBattleStatus) -/* 18C7AC 8025DECC 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus) -/* 18C7B0 8025DED0 90A30078 */ lbu $v1, 0x78($a1) -/* 18C7B4 8025DED4 34C6851F */ ori $a2, $a2, 0x851f -/* 18C7B8 8025DED8 00031E00 */ sll $v1, $v1, 0x18 -/* 18C7BC 8025DEDC 00031603 */ sra $v0, $v1, 0x18 -/* 18C7C0 8025DEE0 00460018 */ mult $v0, $a2 -/* 18C7C4 8025DEE4 0080382D */ daddu $a3, $a0, $zero -/* 18C7C8 8025DEE8 00031FC3 */ sra $v1, $v1, 0x1f -/* 18C7CC 8025DEEC 00004010 */ mfhi $t0 -/* 18C7D0 8025DEF0 00081143 */ sra $v0, $t0, 5 -/* 18C7D4 8025DEF4 00431023 */ subu $v0, $v0, $v1 -/* 18C7D8 8025DEF8 00021600 */ sll $v0, $v0, 0x18 -/* 18C7DC 8025DEFC 00021603 */ sra $v0, $v0, 0x18 -/* 18C7E0 8025DF00 ACE200AC */ sw $v0, 0xac($a3) -/* 18C7E4 8025DF04 90A20078 */ lbu $v0, 0x78($a1) -/* 18C7E8 8025DF08 00021600 */ sll $v0, $v0, 0x18 -/* 18C7EC 8025DF0C 00022603 */ sra $a0, $v0, 0x18 -/* 18C7F0 8025DF10 00860018 */ mult $a0, $a2 -/* 18C7F4 8025DF14 3C066666 */ lui $a2, 0x6666 -/* 18C7F8 8025DF18 34C66667 */ ori $a2, $a2, 0x6667 -/* 18C7FC 8025DF1C 000217C3 */ sra $v0, $v0, 0x1f -/* 18C800 8025DF20 00004010 */ mfhi $t0 -/* 18C804 8025DF24 00081943 */ sra $v1, $t0, 5 -/* 18C808 8025DF28 00621823 */ subu $v1, $v1, $v0 -/* 18C80C 8025DF2C 00031040 */ sll $v0, $v1, 1 -/* 18C810 8025DF30 00431021 */ addu $v0, $v0, $v1 -/* 18C814 8025DF34 000210C0 */ sll $v0, $v0, 3 -/* 18C818 8025DF38 00431021 */ addu $v0, $v0, $v1 -/* 18C81C 8025DF3C 00021080 */ sll $v0, $v0, 2 -/* 18C820 8025DF40 00822023 */ subu $a0, $a0, $v0 -/* 18C824 8025DF44 00042600 */ sll $a0, $a0, 0x18 -/* 18C828 8025DF48 00041603 */ sra $v0, $a0, 0x18 -/* 18C82C 8025DF4C 00460018 */ mult $v0, $a2 -/* 18C830 8025DF50 000427C3 */ sra $a0, $a0, 0x1f -/* 18C834 8025DF54 00004010 */ mfhi $t0 -/* 18C838 8025DF58 00081083 */ sra $v0, $t0, 2 -/* 18C83C 8025DF5C 00441023 */ subu $v0, $v0, $a0 -/* 18C840 8025DF60 00021600 */ sll $v0, $v0, 0x18 -/* 18C844 8025DF64 00021603 */ sra $v0, $v0, 0x18 -/* 18C848 8025DF68 ACE200B0 */ sw $v0, 0xb0($a3) -/* 18C84C 8025DF6C 90A20078 */ lbu $v0, 0x78($a1) -/* 18C850 8025DF70 00021600 */ sll $v0, $v0, 0x18 -/* 18C854 8025DF74 00022603 */ sra $a0, $v0, 0x18 -/* 18C858 8025DF78 00860018 */ mult $a0, $a2 -/* 18C85C 8025DF7C 0000282D */ daddu $a1, $zero, $zero -/* 18C860 8025DF80 000217C3 */ sra $v0, $v0, 0x1f -/* 18C864 8025DF84 00004010 */ mfhi $t0 -/* 18C868 8025DF88 00081883 */ sra $v1, $t0, 2 -/* 18C86C 8025DF8C 00621823 */ subu $v1, $v1, $v0 -/* 18C870 8025DF90 00031080 */ sll $v0, $v1, 2 -/* 18C874 8025DF94 00431021 */ addu $v0, $v0, $v1 -/* 18C878 8025DF98 00021040 */ sll $v0, $v0, 1 -/* 18C87C 8025DF9C 00822023 */ subu $a0, $a0, $v0 -/* 18C880 8025DFA0 00042600 */ sll $a0, $a0, 0x18 -/* 18C884 8025DFA4 8CE200AC */ lw $v0, 0xac($a3) -/* 18C888 8025DFA8 00042603 */ sra $a0, $a0, 0x18 -/* 18C88C 8025DFAC 18400007 */ blez $v0, .L8025DFCC -/* 18C890 8025DFB0 ACE400B4 */ sw $a0, 0xb4($a3) -/* 18C894 8025DFB4 00021080 */ sll $v0, $v0, 2 -/* 18C898 8025DFB8 3C018028 */ lui $at, %hi(D_80284188) -/* 18C89C 8025DFBC 00220821 */ addu $at, $at, $v0 -/* 18C8A0 8025DFC0 8C224188 */ lw $v0, %lo(D_80284188)($at) -/* 18C8A4 8025DFC4 080977F5 */ j .L8025DFD4 -/* 18C8A8 8025DFC8 24050001 */ addiu $a1, $zero, 1 -.L8025DFCC: -/* 18C8AC 8025DFCC 3C028028 */ lui $v0, %hi(D_802841B0) -/* 18C8B0 8025DFD0 8C4241B0 */ lw $v0, %lo(D_802841B0)($v0) -.L8025DFD4: -/* 18C8B4 8025DFD4 ACE200AC */ sw $v0, 0xac($a3) -/* 18C8B8 8025DFD8 8CE200B0 */ lw $v0, 0xb0($a3) -/* 18C8BC 8025DFDC 5C400004 */ bgtzl $v0, .L8025DFF0 -/* 18C8C0 8025DFE0 00021080 */ sll $v0, $v0, 2 -/* 18C8C4 8025DFE4 10A00007 */ beqz $a1, .L8025E004 -/* 18C8C8 8025DFE8 00000000 */ nop -/* 18C8CC 8025DFEC 00021080 */ sll $v0, $v0, 2 -.L8025DFF0: -/* 18C8D0 8025DFF0 3C018028 */ lui $at, %hi(D_80284188) -/* 18C8D4 8025DFF4 00220821 */ addu $at, $at, $v0 -/* 18C8D8 8025DFF8 8C224188 */ lw $v0, %lo(D_80284188)($at) -/* 18C8DC 8025DFFC 08097804 */ j .L8025E010 -/* 18C8E0 8025E000 ACE200B0 */ sw $v0, 0xb0($a3) -.L8025E004: -/* 18C8E4 8025E004 3C028028 */ lui $v0, %hi(D_802841B0) -/* 18C8E8 8025E008 8C4241B0 */ lw $v0, %lo(D_802841B0)($v0) -/* 18C8EC 8025E00C ACE200B0 */ sw $v0, 0xb0($a3) -.L8025E010: -/* 18C8F0 8025E010 8CE200B4 */ lw $v0, 0xb4($a3) -/* 18C8F4 8025E014 00021080 */ sll $v0, $v0, 2 -/* 18C8F8 8025E018 3C018028 */ lui $at, %hi(D_80284188) -/* 18C8FC 8025E01C 00220821 */ addu $at, $at, $v0 -/* 18C900 8025E020 8C224188 */ lw $v0, %lo(D_80284188)($at) -/* 18C904 8025E024 ACE200B4 */ sw $v0, 0xb4($a3) -/* 18C908 8025E028 03E00008 */ jr $ra -/* 18C90C 8025E02C 24020002 */ addiu $v0, $zero, 2 diff --git a/ver/us/asm/nonmatchings/18C790/func_80260948.s b/ver/us/asm/nonmatchings/18C790/func_80260948.s deleted file mode 100644 index d716590d25..0000000000 --- a/ver/us/asm/nonmatchings/18C790/func_80260948.s +++ /dev/null @@ -1,64 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80260948 -/* 18F228 80260948 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 18F22C 8026094C 3C03800E */ lui $v1, %hi(gBattleState2) -/* 18F230 80260950 8C63C4DC */ lw $v1, %lo(gBattleState2)($v1) -/* 18F234 80260954 24020008 */ addiu $v0, $zero, 8 -/* 18F238 80260958 10620008 */ beq $v1, $v0, .L8026097C -/* 18F23C 8026095C AFBF0018 */ sw $ra, 0x18($sp) -/* 18F240 80260960 0062102A */ slt $v0, $v1, $v0 -/* 18F244 80260964 1440002B */ bnez $v0, .L80260A14 -/* 18F248 80260968 28620011 */ slti $v0, $v1, 0x11 -/* 18F24C 8026096C 10400029 */ beqz $v0, .L80260A14 -/* 18F250 80260970 2862000F */ slti $v0, $v1, 0xf -/* 18F254 80260974 14400027 */ bnez $v0, .L80260A14 -/* 18F258 80260978 00000000 */ nop -.L8026097C: -/* 18F25C 8026097C 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 18F260 80260980 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 18F264 80260984 80430048 */ lb $v1, 0x48($v0) -/* 18F268 80260988 10600005 */ beqz $v1, .L802609A0 -/* 18F26C 8026098C 24020001 */ addiu $v0, $zero, 1 -/* 18F270 80260990 1062000B */ beq $v1, $v0, .L802609C0 -/* 18F274 80260994 3C04001D */ lui $a0, 0x1d -/* 18F278 80260998 08098277 */ j .L802609DC -/* 18F27C 8026099C 00000000 */ nop -.L802609A0: -/* 18F280 802609A0 3C04001D */ lui $a0, 0x1d -/* 18F284 802609A4 3C02802A */ lui $v0, %hi(D_8029FB60) -/* 18F288 802609A8 8C42FB60 */ lw $v0, %lo(D_8029FB60)($v0) -/* 18F28C 802609AC 14400011 */ bnez $v0, .L802609F4 -/* 18F290 802609B0 348400A8 */ ori $a0, $a0, 0xa8 -/* 18F294 802609B4 3C04001D */ lui $a0, 0x1d -/* 18F298 802609B8 0809827D */ j .L802609F4 -/* 18F29C 802609BC 348400A5 */ ori $a0, $a0, 0xa5 -.L802609C0: -/* 18F2A0 802609C0 3C02802A */ lui $v0, %hi(D_8029FB64) -/* 18F2A4 802609C4 8C42FB64 */ lw $v0, %lo(D_8029FB64)($v0) -/* 18F2A8 802609C8 1440000A */ bnez $v0, .L802609F4 -/* 18F2AC 802609CC 348400A9 */ ori $a0, $a0, 0xa9 -/* 18F2B0 802609D0 3C04001D */ lui $a0, 0x1d -/* 18F2B4 802609D4 0809827D */ j .L802609F4 -/* 18F2B8 802609D8 348400A6 */ ori $a0, $a0, 0xa6 -.L802609DC: -/* 18F2BC 802609DC 3C02802A */ lui $v0, %hi(D_8029FB68) -/* 18F2C0 802609E0 8C42FB68 */ lw $v0, %lo(D_8029FB68)($v0) -/* 18F2C4 802609E4 14400003 */ bnez $v0, .L802609F4 -/* 18F2C8 802609E8 348400AA */ ori $a0, $a0, 0xaa -/* 18F2CC 802609EC 3C04001D */ lui $a0, 0x1d -/* 18F2D0 802609F0 348400A7 */ ori $a0, $a0, 0xa7 -.L802609F4: -/* 18F2D4 802609F4 24030009 */ addiu $v1, $zero, 9 -/* 18F2D8 802609F8 2402000A */ addiu $v0, $zero, 0xa -/* 18F2DC 802609FC 00A32821 */ addu $a1, $a1, $v1 -/* 18F2E0 80260A00 24A50011 */ addiu $a1, $a1, 0x11 -/* 18F2E4 80260A04 240700FF */ addiu $a3, $zero, 0xff -/* 18F2E8 80260A08 AFA20010 */ sw $v0, 0x10($sp) -/* 18F2EC 80260A0C 0C04993B */ jal draw_msg -/* 18F2F0 80260A10 AFA00014 */ sw $zero, 0x14($sp) -.L80260A14: -/* 18F2F4 80260A14 8FBF0018 */ lw $ra, 0x18($sp) -/* 18F2F8 80260A18 03E00008 */ jr $ra -/* 18F2FC 80260A1C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/190B20/try_inflict_status.s b/ver/us/asm/nonmatchings/190B20/try_inflict_status.s deleted file mode 100644 index 39125e3888..0000000000 --- a/ver/us/asm/nonmatchings/190B20/try_inflict_status.s +++ /dev/null @@ -1,106 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel try_inflict_status -/* 195458 80266B78 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 19545C 80266B7C AFB20018 */ sw $s2, 0x18($sp) -/* 195460 80266B80 0080902D */ daddu $s2, $a0, $zero -/* 195464 80266B84 AFB40020 */ sw $s4, 0x20($sp) -/* 195468 80266B88 00A0A02D */ daddu $s4, $a1, $zero -/* 19546C 80266B8C AFB50024 */ sw $s5, 0x24($sp) -/* 195470 80266B90 AFB3001C */ sw $s3, 0x1c($sp) -/* 195474 80266B94 3C13800E */ lui $s3, %hi(gBattleStatus) -/* 195478 80266B98 2673C070 */ addiu $s3, $s3, %lo(gBattleStatus) -/* 19547C 80266B9C AFBF0028 */ sw $ra, 0x28($sp) -/* 195480 80266BA0 AFB10014 */ sw $s1, 0x14($sp) -/* 195484 80266BA4 AFB00010 */ sw $s0, 0x10($sp) -/* 195488 80266BA8 92630194 */ lbu $v1, 0x194($s3) -/* 19548C 80266BAC 240200FE */ addiu $v0, $zero, 0xfe -/* 195490 80266BB0 1462000C */ bne $v1, $v0, .L80266BE4 -/* 195494 80266BB4 00C0A82D */ daddu $s5, $a2, $zero -/* 195498 80266BB8 8E44020C */ lw $a0, 0x20c($s2) -/* 19549C 80266BBC 82710195 */ lb $s1, 0x195($s3) -/* 1954A0 80266BC0 0C0997BB */ jal lookup_status_duration_mod -/* 1954A4 80266BC4 02A0282D */ daddu $a1, $s5, $zero -/* 1954A8 80266BC8 0240202D */ daddu $a0, $s2, $zero -/* 1954AC 80266BCC 0280282D */ daddu $a1, $s4, $zero -/* 1954B0 80266BD0 02A0302D */ daddu $a2, $s5, $zero -/* 1954B4 80266BD4 0C099B3C */ jal inflict_status_set_duration -/* 1954B8 80266BD8 02223821 */ addu $a3, $s1, $v0 -/* 1954BC 80266BDC 08099B33 */ j .L80266CCC -/* 1954C0 80266BE0 00000000 */ nop -.L80266BE4: -/* 1954C4 80266BE4 8E44020C */ lw $a0, 0x20c($s2) -/* 1954C8 80266BE8 10800026 */ beqz $a0, .L80266C84 -/* 1954CC 80266BEC 0000882D */ daddu $s1, $zero, $zero -/* 1954D0 80266BF0 8E620190 */ lw $v0, 0x190($s3) -/* 1954D4 80266BF4 3C034000 */ lui $v1, 0x4000 -/* 1954D8 80266BF8 00431024 */ and $v0, $v0, $v1 -/* 1954DC 80266BFC 14400005 */ bnez $v0, .L80266C14 -/* 1954E0 80266C00 00000000 */ nop -/* 1954E4 80266C04 0C0997A6 */ jal lookup_status_chance -/* 1954E8 80266C08 0280282D */ daddu $a1, $s4, $zero -/* 1954EC 80266C0C 08099B09 */ j .L80266C24 -/* 1954F0 80266C10 0040802D */ daddu $s0, $v0, $zero -.L80266C14: -/* 1954F4 80266C14 0C0997A6 */ jal lookup_status_chance -/* 1954F8 80266C18 0280282D */ daddu $a1, $s4, $zero -/* 1954FC 80266C1C 1040001A */ beqz $v0, .L80266C88 -/* 195500 80266C20 24100064 */ addiu $s0, $zero, 0x64 -.L80266C24: -/* 195504 80266C24 1A000018 */ blez $s0, .L80266C88 -/* 195508 80266C28 3C0351EB */ lui $v1, 0x51eb -/* 19550C 80266C2C 92620194 */ lbu $v0, 0x194($s3) -/* 195510 80266C30 02020018 */ mult $s0, $v0 -/* 195514 80266C34 00001012 */ mflo $v0 -/* 195518 80266C38 3463851F */ ori $v1, $v1, 0x851f -/* 19551C 80266C3C 00000000 */ nop -/* 195520 80266C40 00430018 */ mult $v0, $v1 -/* 195524 80266C44 000217C3 */ sra $v0, $v0, 0x1f -/* 195528 80266C48 00001810 */ mfhi $v1 -/* 19552C 80266C4C 00031943 */ sra $v1, $v1, 5 -/* 195530 80266C50 00628023 */ subu $s0, $v1, $v0 -/* 195534 80266C54 1A00000C */ blez $s0, .L80266C88 -/* 195538 80266C58 00000000 */ nop -/* 19553C 80266C5C 0C00A67F */ jal rand_int -/* 195540 80266C60 24040064 */ addiu $a0, $zero, 0x64 -/* 195544 80266C64 0202102A */ slt $v0, $s0, $v0 -/* 195548 80266C68 14400007 */ bnez $v0, .L80266C88 -/* 19554C 80266C6C 00000000 */ nop -/* 195550 80266C70 8E44020C */ lw $a0, 0x20c($s2) -/* 195554 80266C74 0C0997BB */ jal lookup_status_duration_mod -/* 195558 80266C78 02A0282D */ daddu $a1, $s5, $zero -/* 19555C 80266C7C 08099B22 */ j .L80266C88 -/* 195560 80266C80 24510003 */ addiu $s1, $v0, 3 -.L80266C84: -/* 195564 80266C84 24110003 */ addiu $s1, $zero, 3 -.L80266C88: -/* 195568 80266C88 5A20000F */ blezl $s1, .L80266CC8 -/* 19556C 80266C8C 0000882D */ daddu $s1, $zero, $zero -/* 195570 80266C90 8E620190 */ lw $v0, 0x190($s3) -/* 195574 80266C94 04410007 */ bgez $v0, .L80266CB4 -/* 195578 80266C98 0240202D */ daddu $a0, $s2, $zero -/* 19557C 80266C9C 8E44020C */ lw $a0, 0x20c($s2) -/* 195580 80266CA0 82710195 */ lb $s1, 0x195($s3) -/* 195584 80266CA4 0C0997BB */ jal lookup_status_duration_mod -/* 195588 80266CA8 02A0282D */ daddu $a1, $s5, $zero -/* 19558C 80266CAC 02228821 */ addu $s1, $s1, $v0 -/* 195590 80266CB0 0240202D */ daddu $a0, $s2, $zero -.L80266CB4: -/* 195594 80266CB4 0280282D */ daddu $a1, $s4, $zero -/* 195598 80266CB8 0C0997D0 */ jal inflict_status -/* 19559C 80266CBC 0220302D */ daddu $a2, $s1, $zero -/* 1955A0 80266CC0 08099B33 */ j .L80266CCC -/* 1955A4 80266CC4 0220102D */ daddu $v0, $s1, $zero -.L80266CC8: -/* 1955A8 80266CC8 0220102D */ daddu $v0, $s1, $zero -.L80266CCC: -/* 1955AC 80266CCC 8FBF0028 */ lw $ra, 0x28($sp) -/* 1955B0 80266CD0 8FB50024 */ lw $s5, 0x24($sp) -/* 1955B4 80266CD4 8FB40020 */ lw $s4, 0x20($sp) -/* 1955B8 80266CD8 8FB3001C */ lw $s3, 0x1c($sp) -/* 1955BC 80266CDC 8FB20018 */ lw $s2, 0x18($sp) -/* 1955C0 80266CE0 8FB10014 */ lw $s1, 0x14($sp) -/* 1955C4 80266CE4 8FB00010 */ lw $s0, 0x10($sp) -/* 1955C8 80266CE8 03E00008 */ jr $ra -/* 1955CC 80266CEC 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/759b0_len_61b0/npc_raycast_general.s b/ver/us/asm/nonmatchings/759b0_len_61b0/npc_raycast_general.s deleted file mode 100644 index a7df5e4ea9..0000000000 --- a/ver/us/asm/nonmatchings/759b0_len_61b0/npc_raycast_general.s +++ /dev/null @@ -1,97 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel npc_raycast_general -/* 768FC 800DD44C 27BDFF70 */ addiu $sp, $sp, -0x90 -/* 76900 800DD450 F7B40060 */ sdc1 $f20, 0x60($sp) -/* 76904 800DD454 4485A000 */ mtc1 $a1, $f20 -/* 76908 800DD458 F7BA0078 */ sdc1 $f26, 0x78($sp) -/* 7690C 800DD45C 4486D000 */ mtc1 $a2, $f26 -/* 76910 800DD460 F7B80070 */ sdc1 $f24, 0x70($sp) -/* 76914 800DD464 4487C000 */ mtc1 $a3, $f24 -/* 76918 800DD468 F7B60068 */ sdc1 $f22, 0x68($sp) -/* 7691C 800DD46C C7B600A0 */ lwc1 $f22, 0xa0($sp) -/* 76920 800DD470 F7BC0080 */ sdc1 $f28, 0x80($sp) -/* 76924 800DD474 C7BC00A4 */ lwc1 $f28, 0xa4($sp) -/* 76928 800DD478 F7BE0088 */ sdc1 $f30, 0x88($sp) -/* 7692C 800DD47C C7BE00A8 */ lwc1 $f30, 0xa8($sp) -/* 76930 800DD480 AFB20040 */ sw $s2, 0x40($sp) -/* 76934 800DD484 8FB200AC */ lw $s2, 0xac($sp) -/* 76938 800DD488 AFB30044 */ sw $s3, 0x44($sp) -/* 7693C 800DD48C 8FB300B0 */ lw $s3, 0xb0($sp) -/* 76940 800DD490 AFB40048 */ sw $s4, 0x48($sp) -/* 76944 800DD494 8FB400B4 */ lw $s4, 0xb4($sp) -/* 76948 800DD498 AFB5004C */ sw $s5, 0x4c($sp) -/* 7694C 800DD49C 8FB500B8 */ lw $s5, 0xb8($sp) -/* 76950 800DD4A0 AFB60050 */ sw $s6, 0x50($sp) -/* 76954 800DD4A4 8FB600BC */ lw $s6, 0xbc($sp) -/* 76958 800DD4A8 AFB1003C */ sw $s1, 0x3c($sp) -/* 7695C 800DD4AC 0080882D */ daddu $s1, $a0, $zero -/* 76960 800DD4B0 AFB00038 */ sw $s0, 0x38($sp) -/* 76964 800DD4B4 2410FFFF */ addiu $s0, $zero, -1 -/* 76968 800DD4B8 AFB70054 */ sw $s7, 0x54($sp) -/* 7696C 800DD4BC 8FB700C0 */ lw $s7, 0xc0($sp) -/* 76970 800DD4C0 3C020010 */ lui $v0, 0x10 -/* 76974 800DD4C4 AFBE0058 */ sw $fp, 0x58($sp) -/* 76978 800DD4C8 8FBE00C4 */ lw $fp, 0xc4($sp) -/* 7697C 800DD4CC 02221024 */ and $v0, $s1, $v0 -/* 76980 800DD4D0 14400015 */ bnez $v0, .L800DD528 -/* 76984 800DD4D4 AFBF005C */ sw $ra, 0x5c($sp) -/* 76988 800DD4D8 4406D000 */ mfc1 $a2, $f26 -/* 7698C 800DD4DC 4407C000 */ mfc1 $a3, $f24 -/* 76990 800DD4E0 4405A000 */ mfc1 $a1, $f20 -/* 76994 800DD4E4 0220202D */ daddu $a0, $s1, $zero -/* 76998 800DD4E8 E7B60010 */ swc1 $f22, 0x10($sp) -/* 7699C 800DD4EC E7BC0014 */ swc1 $f28, 0x14($sp) -/* 769A0 800DD4F0 E7BE0018 */ swc1 $f30, 0x18($sp) -/* 769A4 800DD4F4 AFB2001C */ sw $s2, 0x1c($sp) -/* 769A8 800DD4F8 AFB30020 */ sw $s3, 0x20($sp) -/* 769AC 800DD4FC AFB40024 */ sw $s4, 0x24($sp) -/* 769B0 800DD500 AFB50028 */ sw $s5, 0x28($sp) -/* 769B4 800DD504 AFB6002C */ sw $s6, 0x2c($sp) -/* 769B8 800DD508 AFB70030 */ sw $s7, 0x30($sp) -/* 769BC 800DD50C 0C017334 */ jal test_ray_colliders -/* 769C0 800DD510 AFBE0034 */ sw $fp, 0x34($sp) -/* 769C4 800DD514 0040802D */ daddu $s0, $v0, $zero -/* 769C8 800DD518 3C020004 */ lui $v0, 4 -/* 769CC 800DD51C 02221024 */ and $v0, $s1, $v0 -/* 769D0 800DD520 14400012 */ bnez $v0, .L800DD56C -/* 769D4 800DD524 0200102D */ daddu $v0, $s0, $zero -.L800DD528: -/* 769D8 800DD528 4600A306 */ mov.s $f12, $f20 -/* 769DC 800DD52C 4406C000 */ mfc1 $a2, $f24 -/* 769E0 800DD530 4407B000 */ mfc1 $a3, $f22 -/* 769E4 800DD534 4600D386 */ mov.s $f14, $f26 -/* 769E8 800DD538 E7BC0010 */ swc1 $f28, 0x10($sp) -/* 769EC 800DD53C E7BE0014 */ swc1 $f30, 0x14($sp) -/* 769F0 800DD540 AFB20018 */ sw $s2, 0x18($sp) -/* 769F4 800DD544 AFB3001C */ sw $s3, 0x1c($sp) -/* 769F8 800DD548 AFB40020 */ sw $s4, 0x20($sp) -/* 769FC 800DD54C AFB50024 */ sw $s5, 0x24($sp) -/* 76A00 800DD550 AFB60028 */ sw $s6, 0x28($sp) -/* 76A04 800DD554 AFB7002C */ sw $s7, 0x2c($sp) -/* 76A08 800DD558 0C017512 */ jal test_ray_entities -/* 76A0C 800DD55C AFBE0030 */ sw $fp, 0x30($sp) -/* 76A10 800DD560 04430001 */ bgezl $v0, .L800DD568 -/* 76A14 800DD564 34504000 */ ori $s0, $v0, 0x4000 -.L800DD568: -/* 76A18 800DD568 0200102D */ daddu $v0, $s0, $zero -.L800DD56C: -/* 76A1C 800DD56C 8FBF005C */ lw $ra, 0x5c($sp) -/* 76A20 800DD570 8FBE0058 */ lw $fp, 0x58($sp) -/* 76A24 800DD574 8FB70054 */ lw $s7, 0x54($sp) -/* 76A28 800DD578 8FB60050 */ lw $s6, 0x50($sp) -/* 76A2C 800DD57C 8FB5004C */ lw $s5, 0x4c($sp) -/* 76A30 800DD580 8FB40048 */ lw $s4, 0x48($sp) -/* 76A34 800DD584 8FB30044 */ lw $s3, 0x44($sp) -/* 76A38 800DD588 8FB20040 */ lw $s2, 0x40($sp) -/* 76A3C 800DD58C 8FB1003C */ lw $s1, 0x3c($sp) -/* 76A40 800DD590 8FB00038 */ lw $s0, 0x38($sp) -/* 76A44 800DD594 D7BE0088 */ ldc1 $f30, 0x88($sp) -/* 76A48 800DD598 D7BC0080 */ ldc1 $f28, 0x80($sp) -/* 76A4C 800DD59C D7BA0078 */ ldc1 $f26, 0x78($sp) -/* 76A50 800DD5A0 D7B80070 */ ldc1 $f24, 0x70($sp) -/* 76A54 800DD5A4 D7B60068 */ ldc1 $f22, 0x68($sp) -/* 76A58 800DD5A8 D7B40060 */ ldc1 $f20, 0x60($sp) -/* 76A5C 800DD5AC 03E00008 */ jr $ra -/* 76A60 800DD5B0 27BD0090 */ addiu $sp, $sp, 0x90 diff --git a/ver/us/asm/nonmatchings/de740_len_23f0/clear_sprite_shading_data.s b/ver/us/asm/nonmatchings/de740_len_23f0/clear_sprite_shading_data.s deleted file mode 100644 index ca8e931e5c..0000000000 --- a/ver/us/asm/nonmatchings/de740_len_23f0/clear_sprite_shading_data.s +++ /dev/null @@ -1,49 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel clear_sprite_shading_data -/* DE740 80148040 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* DE744 80148044 AFBF0010 */ sw $ra, 0x10($sp) -/* DE748 80148048 0C05203C */ jal init_sprite_shading_data -/* DE74C 8014804C 00000000 */ nop -/* DE750 80148050 0000202D */ daddu $a0, $zero, $zero -/* DE754 80148054 3C068015 */ lui $a2, %hi(D_80151328) -/* DE758 80148058 24C61328 */ addiu $a2, $a2, %lo(D_80151328) -/* DE75C 8014805C 3C058015 */ lui $a1, %hi(D_801512B0) -/* DE760 80148060 24A512B0 */ addiu $a1, $a1, %lo(D_801512B0) -/* DE764 80148064 0080182D */ daddu $v1, $a0, $zero -.L80148068: -/* DE768 80148068 8CC20000 */ lw $v0, ($a2) -/* DE76C 8014806C 00431021 */ addu $v0, $v0, $v1 -/* DE770 80148070 A0400004 */ sb $zero, 4($v0) -/* DE774 80148074 8CA20000 */ lw $v0, ($a1) -/* DE778 80148078 24840001 */ addiu $a0, $a0, 1 -/* DE77C 8014807C 00431021 */ addu $v0, $v0, $v1 -/* DE780 80148080 A0400004 */ sb $zero, 4($v0) -/* DE784 80148084 28820007 */ slti $v0, $a0, 7 -/* DE788 80148088 1440FFF7 */ bnez $v0, .L80148068 -/* DE78C 8014808C 24630018 */ addiu $v1, $v1, 0x18 -/* DE790 80148090 3C048015 */ lui $a0, %hi(D_80151328) -/* DE794 80148094 24841328 */ addiu $a0, $a0, %lo(D_80151328) -/* DE798 80148098 8C820000 */ lw $v0, ($a0) -/* DE79C 8014809C 24030032 */ addiu $v1, $zero, 0x32 -/* DE7A0 801480A0 A4400000 */ sh $zero, ($v0) -/* DE7A4 801480A4 A04300AE */ sb $v1, 0xae($v0) -/* DE7A8 801480A8 A04300AD */ sb $v1, 0xad($v0) -/* DE7AC 801480AC A04300AC */ sb $v1, 0xac($v0) -/* DE7B0 801480B0 8C840000 */ lw $a0, ($a0) -/* DE7B4 801480B4 2402000A */ addiu $v0, $zero, 0xa -/* DE7B8 801480B8 A08200AF */ sb $v0, 0xaf($a0) -/* DE7BC 801480BC 3C048015 */ lui $a0, %hi(D_801512B0) -/* DE7C0 801480C0 248412B0 */ addiu $a0, $a0, %lo(D_801512B0) -/* DE7C4 801480C4 8C820000 */ lw $v0, ($a0) -/* DE7C8 801480C8 A4400000 */ sh $zero, ($v0) -/* DE7CC 801480CC A04300AE */ sb $v1, 0xae($v0) -/* DE7D0 801480D0 A04300AD */ sb $v1, 0xad($v0) -/* DE7D4 801480D4 A04300AC */ sb $v1, 0xac($v0) -/* DE7D8 801480D8 8C830000 */ lw $v1, ($a0) -/* DE7DC 801480DC 24020014 */ addiu $v0, $zero, 0x14 -/* DE7E0 801480E0 A06200AF */ sb $v0, 0xaf($v1) -/* DE7E4 801480E4 8FBF0010 */ lw $ra, 0x10($sp) -/* DE7E8 801480E8 03E00008 */ jr $ra -/* DE7EC 801480EC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/de740_len_23f0/init_sprite_shading_data.s b/ver/us/asm/nonmatchings/de740_len_23f0/init_sprite_shading_data.s deleted file mode 100644 index 774dfcd518..0000000000 --- a/ver/us/asm/nonmatchings/de740_len_23f0/init_sprite_shading_data.s +++ /dev/null @@ -1,30 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel init_sprite_shading_data -/* DE7F0 801480F0 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* DE7F4 801480F4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* DE7F8 801480F8 80420070 */ lb $v0, 0x70($v0) -/* DE7FC 801480FC 1440000B */ bnez $v0, .L8014812C -/* DE800 80148100 00000000 */ nop -/* DE804 80148104 3C028016 */ lui $v0, %hi(D_801595C0) -/* DE808 80148108 244295C0 */ addiu $v0, $v0, %lo(D_801595C0) -/* DE80C 8014810C 3C018015 */ lui $at, %hi(D_80151328) -/* DE810 80148110 AC221328 */ sw $v0, %lo(D_80151328)($at) -/* DE814 80148114 3C028016 */ lui $v0, %hi(D_80159720) -/* DE818 80148118 24429720 */ addiu $v0, $v0, %lo(D_80159720) -/* DE81C 8014811C 3C018015 */ lui $at, %hi(D_801512B0) -/* DE820 80148120 AC2212B0 */ sw $v0, %lo(D_801512B0)($at) -/* DE824 80148124 03E00008 */ jr $ra -/* DE828 80148128 00000000 */ nop -.L8014812C: -/* DE82C 8014812C 3C028016 */ lui $v0, %hi(D_80159670) -/* DE830 80148130 24429670 */ addiu $v0, $v0, %lo(D_80159670) -/* DE834 80148134 3C018015 */ lui $at, %hi(D_80151328) -/* DE838 80148138 AC221328 */ sw $v0, %lo(D_80151328)($at) -/* DE83C 8014813C 3C028016 */ lui $v0, %hi(D_801597D0) -/* DE840 80148140 244297D0 */ addiu $v0, $v0, %lo(D_801597D0) -/* DE844 80148144 3C018015 */ lui $at, %hi(D_801512B0) -/* DE848 80148148 AC2212B0 */ sw $v0, %lo(D_801512B0)($at) -/* DE84C 8014814C 03E00008 */ jr $ra -/* DE850 80148150 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/de740_len_23f0/sprite_shading_set_light_source.s b/ver/us/asm/nonmatchings/de740_len_23f0/sprite_shading_set_light_source.s deleted file mode 100644 index 1b2a8d9a10..0000000000 --- a/ver/us/asm/nonmatchings/de740_len_23f0/sprite_shading_set_light_source.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel sprite_shading_set_light_source -/* DE854 80148154 2C820007 */ sltiu $v0, $a0, 7 -/* DE858 80148158 44860000 */ mtc1 $a2, $f0 -/* DE85C 8014815C 44871000 */ mtc1 $a3, $f2 -/* DE860 80148160 8FA60014 */ lw $a2, 0x14($sp) -/* DE864 80148164 8FA70018 */ lw $a3, 0x18($sp) -/* DE868 80148168 8FA8001C */ lw $t0, 0x1c($sp) -/* DE86C 8014816C 8FA90024 */ lw $t1, 0x24($sp) -/* DE870 80148170 10400012 */ beqz $v0, .L801481BC -/* DE874 80148174 00041040 */ sll $v0, $a0, 1 -/* DE878 80148178 00441021 */ addu $v0, $v0, $a0 -/* DE87C 8014817C 000210C0 */ sll $v0, $v0, 3 -/* DE880 80148180 3C038015 */ lui $v1, %hi(D_80151328) -/* DE884 80148184 8C631328 */ lw $v1, %lo(D_80151328)($v1) -/* DE888 80148188 24420004 */ addiu $v0, $v0, 4 -/* DE88C 8014818C 00621821 */ addu $v1, $v1, $v0 -/* DE890 80148190 A0650000 */ sb $a1, ($v1) -/* DE894 80148194 E4600004 */ swc1 $f0, 4($v1) -/* DE898 80148198 E4620008 */ swc1 $f2, 8($v1) -/* DE89C 8014819C C7A00010 */ lwc1 $f0, 0x10($sp) -/* DE8A0 801481A0 A0660001 */ sb $a2, 1($v1) -/* DE8A4 801481A4 A0670002 */ sb $a3, 2($v1) -/* DE8A8 801481A8 A0680003 */ sb $t0, 3($v1) -/* DE8AC 801481AC E460000C */ swc1 $f0, 0xc($v1) -/* DE8B0 801481B0 C7A00020 */ lwc1 $f0, 0x20($sp) -/* DE8B4 801481B4 A0690014 */ sb $t1, 0x14($v1) -/* DE8B8 801481B8 E4600010 */ swc1 $f0, 0x10($v1) -.L801481BC: -/* DE8BC 801481BC 03E00008 */ jr $ra -/* DE8C0 801481C0 00000000 */ nop diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index d8a6aa44f3..97fdd36211 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -343,7 +343,7 @@ segments: vram: 0x800DC500 subsegments: - [0x759B0, c, bss2] - - [0x759B0, c, 759b0_len_61b0] + - [0x759B0, c, npc_collision] - [0x77480, c, 77480] - [0x7B440, c, 7B440] - [0x7BB60, c, 7bb60_len_41b0] @@ -356,7 +356,7 @@ segments: - [0x8A160, c, 8a160_len_700] - [0x8A860, c, 8a860_len_3f30] - [0x8E790, c, 8e790_len_2850] - - [0x90FE0, .data, 759b0_len_61b0] + - [0x90FE0, .data, npc_collision] - [0x913B0, .data, world/actions] - [0x914E0, .data, world/partners] # TODO shiftability: include following images in c file to fix padding issues - [0x919B0, ci4, ui/a_button_unpressed, 48, 40] @@ -5130,7 +5130,19 @@ segments: subsegments: - [0x79D8A0, c] - [0x79DE50] - - [0x79EF40, bin] # todo identify + - type: code # todo identify + start: 0x79EF40 + vram: 0x802A1000 + overlay: True + subsegments: + - [0x79EF40, bin] + - type: code # todo identify + start: 0x7A89A0 + vram: 0x802A1000 + overlay: True + subsegments: + - [0x7A89A0, bin] + - [0x7B5960, bin] # todo identify - dir: world/script_api type: code start: 0x7E0E80 diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 0ae0880b4b..f25f41f78c 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -20763,8 +20763,6 @@ D_8029FB4C = 0x8029FB4C; // type:data D_8029FB50 = 0x8029FB50; // type:data D_8029FB54 = 0x8029FB54; // type:data D_8029FB60 = 0x8029FB60; // type:data -D_8029FB64 = 0x8029FB64; // type:data -D_8029FB68 = 0x8029FB68; // type:data D_8029FB6C = 0x8029FB6C; // type:data D_8029FB70 = 0x8029FB70; // type:data D_8029FB74 = 0x8029FB74; // type:data diff --git a/ver/us/undefined_syms.txt b/ver/us/undefined_syms.txt index 06ee12db2f..cfe29424f5 100644 --- a/ver/us/undefined_syms.txt +++ b/ver/us/undefined_syms.txt @@ -806,8 +806,6 @@ D_8029FB4C = 0x8029FB4C; D_8029FB50 = 0x8029FB50; D_8029FB54 = 0x8029FB54; D_8029FB60 = 0x8029FB60; -D_8029FB64 = 0x8029FB64; -D_8029FB68 = 0x8029FB68; D_8029FB6C = 0x8029FB6C; D_8029FB70 = 0x8029FB70; D_8029FB74 = 0x8029FB74;