From b656ab90b4d38edb94a654f2553c34c6de5c3f34 Mon Sep 17 00:00:00 2001 From: HailSanta <53960937+HailSanta@users.noreply.github.com> Date: Sun, 30 Oct 2022 11:23:13 -0400 Subject: [PATCH] area_flo (#839) * some reorg * minor stuff * flo_03 * flo_08 * flo_09 * flo_00 * flo_11/12 * flo_10 * flo 24/25 * flo 22/23 * flo 21 * flo_19 * flo 17/23 * flo 16 * flo 15 * flo_14 * flo_13 * area flo * tik_06 * couple missed things Co-authored-by: HailSanta --- include/common_structs.h | 13 + include/effects.h | 53 +- include/enums.h | 17 + include/saved_flag_names.h | 2 +- include/script_api/macros.h | 3 + src/C50A0.c | 2 +- src/audio/private.h | 2 +- src/audio/public.h | 2 +- src/audio/sfx.c | 100 +- src/battle/area_kpa2/actor/bowser_phase_3.c | 12 +- src/battle/area_pra2/actor/crystal_king.c | 12 +- src/common/MakeSun.inc.c | 17 +- src/common/UnkLightningBoltFxFunc1.inc.c | 12 +- src/effects/lightning_bolt.c | 98 +- src/effects/misc_particles.c | 329 +-- src/evt/fa4c0_len_3bf0.c | 4 +- src/world/area_arn/arn_07/arn_07_2_main.c | 16 +- src/world/area_arn/arn_07/arn_07_5_npc.c | 6 +- src/world/area_dro/dro_01/dro_01_5_building.c | 6 +- .../dro_01/npc_hint_dryite_companion.c | 20 +- src/world/area_dro/dro_02/dro_02_4_building.c | 4 +- .../area_end/end_00/end_00_9_huff_n_puff.c | 2 - src/world/area_flo/flo.h | 92 +- src/world/area_flo/flo_00/C9DF20.c | 8 - src/world/area_flo/flo_00/C9DF60.c | 2124 ----------------- src/world/area_flo/flo_00/C9EE30.c | 55 - src/world/area_flo/flo_00/flo_00.h | 66 +- src/world/area_flo/flo_00/flo_00_0_header.c | 23 + src/world/area_flo/flo_00/flo_00_1_music.c | 37 + src/world/area_flo/flo_00/flo_00_2_main.c | 219 ++ src/world/area_flo/flo_00/flo_00_3_npc.c | 798 +++++++ src/world/area_flo/flo_00/flo_00_4_epilogue.c | 182 ++ .../area_flo/flo_00/flo_00_5_beanstalk.c | 668 ++++++ src/world/area_flo/flo_00/flo_00_6_entity.c | 10 + src/world/area_flo/flo_03/CA72A0.c | 7 - src/world/area_flo/flo_03/CA72E0.c | 1226 ---------- src/world/area_flo/flo_03/flo_03.h | 48 +- src/world/area_flo/flo_03/flo_03_0_header.c | 15 + src/world/area_flo/flo_03/flo_03_1_music.c | 45 + src/world/area_flo/flo_03/flo_03_2_main.c | 51 + src/world/area_flo/flo_03/flo_03_3_npc.c | 980 ++++++++ src/world/area_flo/flo_03/flo_03_4_foliage.c | 56 + src/world/area_flo/flo_03/flo_03_5_entity.c | 14 + src/world/area_flo/flo_07/CAC1F0.c | 18 - src/world/area_flo/flo_07/CAC5D0.c | 521 ---- src/world/area_flo/flo_07/flo_07.h | 31 +- src/world/area_flo/flo_07/flo_07_0_header.c | 14 + src/world/area_flo/flo_07/flo_07_1_music.c | 32 + src/world/area_flo/flo_07/flo_07_2_main.c | 77 + src/world/area_flo/flo_07/flo_07_3_npc.c | 262 ++ src/world/area_flo/flo_08/CAED40.c | 3 - src/world/area_flo/flo_08/CAFA80.c | 14 - src/world/area_flo/flo_08/CAFAC0.c | 1027 -------- src/world/area_flo/flo_08/CB0B80.c | 3 - src/world/area_flo/flo_08/flo_08.h | 43 +- src/world/area_flo/flo_08/flo_08_0_header.c | 14 + src/world/area_flo/flo_08/flo_08_1_music.c | 12 + src/world/area_flo/flo_08/flo_08_2_entity.c | 14 + src/world/area_flo/flo_08/flo_08_3_main.c | 83 + src/world/area_flo/flo_08/flo_08_4_npc.c | 389 +++ src/world/area_flo/flo_08/flo_08_5_foliage.c | 56 + src/world/area_flo/flo_08/flo_08_6_vines.c | 17 + src/world/area_flo/flo_09/CB5000.c | 7 - src/world/area_flo/flo_09/CB5040.c | 3 - src/world/area_flo/flo_09/CB50E0.c | 708 ------ src/world/area_flo/flo_09/CB5320.c | 3 - src/world/area_flo/flo_09/flo_09.h | 30 +- src/world/area_flo/flo_09/flo_09_0_header.c | 14 + src/world/area_flo/flo_09/flo_09_1_music.c | 12 + src/world/area_flo/flo_09/flo_09_2_main.c | 45 + src/world/area_flo/flo_09/flo_09_3_vines.c | 19 + src/world/area_flo/flo_09/flo_09_4_foliage.c | 149 ++ src/world/area_flo/flo_09/flo_09_5_npc.c | 160 ++ src/world/area_flo/flo_10/CB9200.c | 9 - src/world/area_flo/flo_10/CB9240.c | 7 - src/world/area_flo/flo_10/CB9280.c | 856 ------- src/world/area_flo/flo_10/CBA430.c | 41 - src/world/area_flo/flo_10/flo_10.h | 38 +- src/world/area_flo/flo_10/flo_10_0_header.c | 23 + src/world/area_flo/flo_10/flo_10_1_music.c | 34 + src/world/area_flo/flo_10/flo_10_2_entity.c | 9 + src/world/area_flo/flo_10/flo_10_3_main.c | 53 + src/world/area_flo/flo_10/flo_10_4_fountain.c | 315 +++ src/world/area_flo/flo_10/flo_10_5_npc.c | 216 ++ .../flo_10/{CB96B0.c => flo_10_6_waterfx.c} | 21 +- src/world/area_flo/flo_10/flo_10_7_foliage.c | 50 + src/world/area_flo/flo_11/CBDCD0.c | 664 ------ src/world/area_flo/flo_11/flo_11.h | 28 +- src/world/area_flo/flo_11/flo_11_0_header.c | 20 + src/world/area_flo/flo_11/flo_11_1_music.c | 12 + src/world/area_flo/flo_11/flo_11_2_main.c | 94 + src/world/area_flo/flo_11/flo_11_3_npc.c | 397 +++ src/world/area_flo/flo_11/flo_11_4_entity.c | 9 + src/world/area_flo/flo_12/CC0E30.c | 7 - src/world/area_flo/flo_12/CC0E70.c | 530 ---- src/world/area_flo/flo_12/flo_12.h | 26 +- src/world/area_flo/flo_12/flo_12_0_header.c | 14 + src/world/area_flo/flo_12/flo_12_1_music.c | 31 + src/world/area_flo/flo_12/flo_12_2_main.c | 44 + src/world/area_flo/flo_12/flo_12_3_npc.c | 217 ++ src/world/area_flo/flo_13/CC3810.c | 7 - src/world/area_flo/flo_13/CC3850.c | 1296 ---------- src/world/area_flo/flo_13/flo_13.h | 45 +- src/world/area_flo/flo_13/flo_13_0_header.c | 14 + src/world/area_flo/flo_13/flo_13_1_music.c | 59 + src/world/area_flo/flo_13/flo_13_2_entity.c | 21 + src/world/area_flo/flo_13/flo_13_3_main.c | 43 + src/world/area_flo/flo_13/flo_13_4_npc.c | 897 +++++++ .../flo_13/{CC6DE0.c => flo_13_5_new_party.c} | 0 src/world/area_flo/flo_14/CCB310.c | 692 ------ src/world/area_flo/flo_14/CCBE20.c | 334 --- src/world/area_flo/flo_14/CCD670.c | 8 - src/world/area_flo/flo_14/flo_14.h | 54 +- src/world/area_flo/flo_14/flo_14_0_header.c | 14 + src/world/area_flo/flo_14/flo_14_1_music.c | 12 + src/world/area_flo/flo_14/flo_14_2_main.c | 98 + src/world/area_flo/flo_14/flo_14_3_bubbles.c | 402 ++++ src/world/area_flo/flo_14/flo_14_4_npc.c | 120 + src/world/area_flo/flo_14/flo_14_5_entity.c | 7 + src/world/area_flo/flo_14/flo_14_6_logs.c | 10 + src/world/area_flo/flo_15/CD06C0.c | 437 ---- src/world/area_flo/flo_15/flo_15.h | 23 +- src/world/area_flo/flo_15/flo_15_0_header.c | 14 + src/world/area_flo/flo_15/flo_15_1_music.c | 17 + src/world/area_flo/flo_15/flo_15_2_main.c | 31 + src/world/area_flo/flo_15/flo_15_3_npc.c | 228 ++ src/world/area_flo/flo_15/flo_15_4_entity.c | 17 + src/world/area_flo/flo_15/flo_15_5_stairs.c | 72 + src/world/area_flo/flo_16/CD1E30.c | 7 - src/world/area_flo/flo_16/CD1E70.c | 3 - src/world/area_flo/flo_16/CD1F10.c | 300 --- src/world/area_flo/flo_16/CD2C80.c | 362 --- src/world/area_flo/flo_16/CD4770.c | 10 - src/world/area_flo/flo_16/flo_16.h | 33 +- src/world/area_flo/flo_16/flo_16_0_header.c | 14 + src/world/area_flo/flo_16/flo_16_1_music.c | 12 + src/world/area_flo/flo_16/flo_16_2_main.c | 74 + src/world/area_flo/flo_16/flo_16_3_vines.c | 17 + src/world/area_flo/flo_16/flo_16_4_entity.c | 68 + src/world/area_flo/flo_16/flo_16_5_npc.c | 56 + src/world/area_flo/flo_16/flo_16_6_puzzle.c | 235 ++ src/world/area_flo/flo_17/CD72E0.c | 7 - src/world/area_flo/flo_17/CD7320.c | 8 - src/world/area_flo/flo_17/CD7350.c | 644 ----- src/world/area_flo/flo_17/flo_17.h | 37 +- src/world/area_flo/flo_17/flo_17_0_header.c | 14 + src/world/area_flo/flo_17/flo_17_1_music.c | 12 + src/world/area_flo/flo_17/flo_17_2_main.c | 130 + src/world/area_flo/flo_17/flo_17_3_logs.c | 11 + src/world/area_flo/flo_17/flo_17_4_npc.c | 155 ++ src/world/area_flo/flo_17/flo_17_5_entity.c | 10 + src/world/area_flo/flo_18/CDC6A0.c | 1765 -------------- src/world/area_flo/flo_18/CDCBD0.c | 3 - src/world/area_flo/flo_18/flo_18.h | 46 +- src/world/area_flo/flo_18/flo_18_0_header.c | 14 + src/world/area_flo/flo_18/flo_18_1_music.c | 13 + src/world/area_flo/flo_18/flo_18_2_main.c | 80 + src/world/area_flo/flo_18/flo_18_3_machine.c | 767 ++++++ src/world/area_flo/flo_18/flo_18_4_npc.c | 661 +++++ .../flo_18/{CDCC30.c => flo_18_5_foliage.c} | 2 +- src/world/area_flo/flo_19/CE36F0.c | 777 ------ src/world/area_flo/flo_19/flo_19.h | 40 +- src/world/area_flo/flo_19/flo_19_0_header.c | 16 + src/world/area_flo/flo_19/flo_19_1_music.c | 23 + src/world/area_flo/flo_19/flo_19_2_entity.c | 7 + src/world/area_flo/flo_19/flo_19_3_main.c | 72 + src/world/area_flo/flo_19/flo_19_4_clouds.c | 191 ++ .../area_flo/flo_19/flo_19_5_beanstalk.c | 392 +++ src/world/area_flo/flo_21/CE6700.c | 1427 ----------- src/world/area_flo/flo_21/CE7240.c | 5 - src/world/area_flo/flo_21/flo_21.h | 58 +- src/world/area_flo/flo_21/flo_21_0_header.c | 13 + src/world/area_flo/flo_21/flo_21_1_music.c | 11 + src/world/area_flo/flo_21/flo_21_2_main.c | 116 + src/world/area_flo/flo_21/flo_21_3_clouds.c | 73 + src/world/area_flo/flo_21/flo_21_4_npc.c | 818 +++++++ src/world/area_flo/flo_22/CEC240.c | 392 --- src/world/area_flo/flo_22/CEC280.c | 5 - src/world/area_flo/flo_22/CEC290.c | 36 - src/world/area_flo/flo_22/flo_22.h | 33 +- src/world/area_flo/flo_22/flo_22_0_header.c | 13 + src/world/area_flo/flo_22/flo_22_1_music.c | 12 + src/world/area_flo/flo_22/flo_22_2_main.c | 36 + src/world/area_flo/flo_22/flo_22_3_npc.c | 133 ++ src/world/area_flo/flo_22/flo_22_4_well.c | 134 ++ src/world/area_flo/flo_22/flo_22_5_foliage.c | 50 + src/world/area_flo/flo_23/CEE260.c | 7 - src/world/area_flo/flo_23/CEE2A0.c | 480 ---- src/world/area_flo/flo_23/flo_23.h | 28 +- src/world/area_flo/flo_23/flo_23_0_header.c | 14 + src/world/area_flo/flo_23/flo_23_1_music.c | 12 + src/world/area_flo/flo_23/flo_23_2_main.c | 39 + src/world/area_flo/flo_23/flo_23_3_npc.c | 221 ++ src/world/area_flo/flo_23/flo_23_4_entity.c | 13 + src/world/area_flo/flo_24/CF0940.c | 7 - src/world/area_flo/flo_24/CF0980.c | 422 ---- src/world/area_flo/flo_24/CF0BC0.c | 4 - src/world/area_flo/flo_24/flo_24.h | 20 +- src/world/area_flo/flo_24/flo_24_0_header.c | 15 + src/world/area_flo/flo_24/flo_24_1_music.c | 14 + src/world/area_flo/flo_24/flo_24_2_main.c | 56 + src/world/area_flo/flo_24/flo_24_3_foliage.c | 61 + src/world/area_flo/flo_24/flo_24_4_water.c | 114 + src/world/area_flo/flo_24/flo_24_5_entity.c | 13 + src/world/area_flo/flo_25/CF2BD0.c | 7 - src/world/area_flo/flo_25/CF2C10.c | 531 ----- src/world/area_flo/flo_25/CF4BC0.c | 179 -- src/world/area_flo/flo_25/CF4E00.c | 3 - src/world/area_flo/flo_25/flo_25.h | 34 +- src/world/area_flo/flo_25/flo_25_0_header.c | 14 + src/world/area_flo/flo_25/flo_25_1_music.c | 12 + src/world/area_flo/flo_25/flo_25_2_main.c | 41 + src/world/area_flo/flo_25/flo_25_3_npc.c | 223 ++ src/world/area_flo/flo_25/flo_25_4_entity.c | 9 + src/world/area_flo/flo_25/flo_25_5_foliage.c | 58 + src/world/area_flo/flo_25/flo_25_6_vine.c | 17 + src/world/area_iwa/iwa_02/iwa_02_3_npc.c | 4 +- src/world/area_iwa/iwa_10/iwa_10_1_music.c | 2 +- src/world/area_jan/jan_00/jan_00_1_main.c | 2 +- src/world/area_jan/jan_01/B28030.c | 2 +- src/world/area_jan/jan_02/B2C4A0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_jan/jan_11/B70860.c | 2 +- src/world/area_kmr/kmr_04/kmr_04_1_music.c | 2 +- src/world/area_kmr/kmr_23/kmr_23_2_npc.c | 75 +- src/world/area_kzn/kzn_19/kzn_19.h | 2 +- src/world/area_kzn/kzn_19/kzn_19_2_main.c | 12 +- src/world/area_kzn/kzn_19/kzn_19_4_npc.c | 2 +- src/world/area_mgm/mgm_00/mgm_00_1_main.c | 11 +- src/world/area_mgm/mgm_01/mgm_01_2_npc.c | 2 +- src/world/area_mgm/mgm_02/mgm_02_2_npc.c | 2 +- src/world/area_mim/mim_04/mim_04_6_npc.c | 4 +- src/world/area_mim/mim_07/mim_07_6_npc.c | 2 +- src/world/area_omo/omo_13/DE2710.c | 10 +- src/world/area_osr/osr_00/AAC830.c | 2 +- src/world/area_sbk/sbk_02/sbk_02_4_npc.c | 6 +- src/world/area_tik/tik.h | 23 + src/world/area_tik/tik_01/869AA0.c | 2 +- src/world/area_tik/tik_02/86CD10.c | 2 +- src/world/area_tik/tik_03/86F0F0.c | 2 +- src/world/area_tik/tik_04/872020.c | 2 +- src/world/area_tik/tik_05/8750D0.c | 2 +- src/world/area_tik/tik_06/876EE0.c | 13 - src/world/area_tik/tik_06/8774D0.c | 3 - src/world/area_tik/tik_06/tik_06.h | 10 +- src/world/area_tik/tik_06/tik_06_0_header.c | 15 + src/world/area_tik/tik_06/tik_06_1_music.c | 7 + src/world/area_tik/tik_06/tik_06_2_main.c | 116 + src/world/area_tik/tik_06/tik_06_3_drips.c | 32 + src/world/area_tik/tik_06/tik_06_4_entity.c | 72 + src/world/area_tik/tik_07/87AC00.c | 2 +- src/world/area_tik/tik_08/87F3E0.c | 2 +- src/world/area_tik/tik_09/8827B0.c | 2 +- src/world/area_tik/tik_10/8866D0.c | 2 +- src/world/area_tik/tik_12/8891C0.c | 2 +- src/world/area_tik/tik_14/88DBF0.c | 2 +- src/world/area_tik/tik_15/890190.c | 2 +- src/world/area_tik/tik_18/8959F0.c | 2 +- src/world/area_tik/tik_20/89A350.c | 2 +- src/world/area_tik/tik_21/89D7A0.c | 2 +- src/world/area_tik/tik_22/89FEF0.c | 2 +- src/world/area_tik/tik_23/8A23D0.c | 2 +- src/world/area_tik/tik_24/8A5DE0.c | 2 +- src/world/area_tik/tik_25/8A7F80.c | 2 +- src/world/area_trd/trd_00/trd_00_3_npc.c | 6 +- src/world/area_trd/trd_06/trd_06_0_header.c | 2 +- src/world/area_trd/trd_10/trd_10_1_main.c | 8 +- .../common/atomic/flo_DroppingVine.inc.c | 73 + .../common/atomic/flo_FlowerSpawnRegion.inc.c | 57 + src/world/common/atomic/flo_LogBridge.inc.c | 65 + src/world/common/atomic/tik_DripVolumes.inc.c | 200 ++ src/world/common/complete/KeyItemChoice.inc.c | 2 +- .../common/complete/NormalItemChoice.inc.c | 4 +- src/world/common/enemy/ai/FlyingAI.data.inc.c | 9 + src/world/common/enemy/complete/AmazyDayzee.h | 37 + .../common/enemy/complete/AmazyDayzee.inc.c | 46 + src/world/common/enemy/complete/Bzzap.h | 14 + src/world/common/enemy/complete/Bzzap.inc.c | 5 +- src/world/common/enemy/complete/CrazyDayzee.h | 36 + .../common/enemy/complete/CrazyDayzee.inc.c | 31 + src/world/common/enemy/complete/HuffNPuff.h | 29 + src/world/common/enemy/complete/Lakitu.h | 38 + .../enemy/complete/Lakitu_SpinySpawner.inc.c | 93 + .../enemy/complete/Lakitu_Stationary.inc.c | 9 + src/world/common/enemy/complete/Magikoopa.h | 59 + src/world/common/enemy/complete/Spiny.h | 31 + src/world/common/enemy/complete/Spiny.inc.c | 35 + src/world/common/enemy/complete/TuffPuff.h | 42 + .../common/enemy/complete/TuffPuff.inc.c | 37 + src/world/common/entity/Pipe.data.inc.c | 23 + src/world/common/npc/Bubulb.h | 78 +- src/world/common/npc/Bubulb_Patrol.inc.c | 25 + src/world/common/npc/Dummy.inc.c | 7 + src/world/common/npc/GateFlower.h | 69 + src/world/common/npc/GateFlower.inc.c | 7 + src/world/common/npc/Lily.h | 29 + src/world/common/npc/Lily.inc.c | 7 + src/world/common/npc/Posie.h | 29 + src/world/common/npc/Posie.inc.c | 7 + src/world/common/npc/Rosie.h | 29 + src/world/common/npc/Rosie.inc.c | 7 + src/world/common/npc/Sun.h | 29 + src/world/common/npc/Sun.inc.c | 7 + src/world/common/npc/Tolielup.h | 29 + src/world/common/npc/Tolielup.inc.c | 7 + ....inc.c => CheckDripCollisionWithNPC.inc.c} | 4 +- ...unc43.inc.c => CheckVineTriggerDist.inc.c} | 2 +- src/world/common/todo/DeadUnkFunc1.inc.c | 2 +- src/world/common/todo/LoadPartyImage.inc.c | 2 +- src/world/common/todo/SpawnSunEffect.inc.c | 4 +- .../common/todo/StarSpiritEffectFunc.inc.c | 10 + src/world/common/todo/UnkFunc44.inc.c | 11 +- src/world/dead/flo_00/EB8E50.c | 2 +- src/world/dead/flo_00/EB8E90.c | 2 +- src/world/dead/flo_07/EC71B0.c | 12 +- src/world/dead/flo_08/ECBB70.c | 2 +- src/world/dead/flo_09/ED0030.c | 2 +- src/world/dead/flo_11/ED8E20.c | 5 +- src/world/dead/flo_12/EDBFE0.c | 2 +- src/world/dead/flo_13/EDE9C0.c | 2 +- src/world/dead/flo_14/EE65B0.c | 4 +- src/world/dead/flo_16/EED140.c | 2 +- src/world/entrances.h | 1 + src/world/world.c | 44 +- tools/saved_flag_renames.txt | 2 +- .../data/world/area_jan/jan_11/B710F0.data.s | 2 +- .../data/world/area_obk/obk_01/BC11A0.data.s | 4 +- .../data/world/area_omo/omo_13/DE3F70.data.s | 2 +- .../data/world/area_tik/tik_01/86B350.data.s | 2 +- .../data/world/area_tik/tik_02/86D800.data.s | 2 +- .../data/world/area_tik/tik_03/870B60.data.s | 2 +- .../data/world/area_tik/tik_04/8739F0.data.s | 2 +- .../data/world/area_tik/tik_05/875D10.data.s | 2 +- .../data/world/area_tik/tik_06/877840.data.s | 6 - .../data/world/area_tik/tik_06/8778F0.data.s | 45 - .../data/world/area_tik/tik_06/878F90.data.s | 15 - .../data/world/area_tik/tik_06/879860.data.s | 15 - .../data/world/area_tik/tik_07/87D5D0.data.s | 2 +- .../data/world/area_tik/tik_08/87F9A0.data.s | 2 +- .../data/world/area_tik/tik_09/883500.data.s | 2 +- .../data/world/area_tik/tik_10/887B20.data.s | 2 +- .../data/world/area_tik/tik_12/88BF60.data.s | 2 +- .../data/world/area_tik/tik_14/88F180.data.s | 2 +- .../data/world/area_tik/tik_15/891890.data.s | 2 +- .../data/world/area_tik/tik_18/895E20.data.s | 2 +- .../data/world/area_tik/tik_20/89B530.data.s | 2 +- .../data/world/area_tik/tik_21/89E1A0.data.s | 2 +- .../data/world/area_tik/tik_22/8A0930.data.s | 2 +- .../data/world/area_tik/tik_23/8A35A0.data.s | 2 +- .../data/world/area_tik/tik_24/8A69C0.data.s | 2 +- .../data/world/area_tik/tik_25/8A8800.data.s | 2 +- .../asm/data/world/dead/flo_00/EBA260.data.s | 2 +- .../asm/data/world/dead/flo_07/EC78F0.data.s | 10 +- .../asm/data/world/dead/flo_08/ECBC10.data.s | 2 +- .../asm/data/world/dead/flo_09/ED1840.data.s | 2 +- .../asm/data/world/dead/flo_14/EE8970.data.s | 2 +- .../asm/data/world/dead/flo_16/EEFAD0.data.s | 2 +- .../func_80240DA4_9087D4.s | 0 .../obk_01/BBD980/func_80240BB0_BBDD50.s | 12 +- ver/us/splat.yaml | 191 +- ver/us/symbol_addrs.txt | 139 +- ver/us/undefined_syms.txt | 2 + 362 files changed, 16448 insertions(+), 19088 deletions(-) delete mode 100644 src/world/area_flo/flo_00/C9DF20.c delete mode 100644 src/world/area_flo/flo_00/C9DF60.c delete mode 100644 src/world/area_flo/flo_00/C9EE30.c create mode 100644 src/world/area_flo/flo_00/flo_00_0_header.c create mode 100644 src/world/area_flo/flo_00/flo_00_1_music.c create mode 100644 src/world/area_flo/flo_00/flo_00_2_main.c create mode 100644 src/world/area_flo/flo_00/flo_00_3_npc.c create mode 100644 src/world/area_flo/flo_00/flo_00_4_epilogue.c create mode 100644 src/world/area_flo/flo_00/flo_00_5_beanstalk.c create mode 100644 src/world/area_flo/flo_00/flo_00_6_entity.c delete mode 100644 src/world/area_flo/flo_03/CA72A0.c delete mode 100644 src/world/area_flo/flo_03/CA72E0.c create mode 100644 src/world/area_flo/flo_03/flo_03_0_header.c create mode 100644 src/world/area_flo/flo_03/flo_03_1_music.c create mode 100644 src/world/area_flo/flo_03/flo_03_2_main.c create mode 100644 src/world/area_flo/flo_03/flo_03_3_npc.c create mode 100644 src/world/area_flo/flo_03/flo_03_4_foliage.c create mode 100644 src/world/area_flo/flo_03/flo_03_5_entity.c delete mode 100644 src/world/area_flo/flo_07/CAC1F0.c delete mode 100644 src/world/area_flo/flo_07/CAC5D0.c create mode 100644 src/world/area_flo/flo_07/flo_07_0_header.c create mode 100644 src/world/area_flo/flo_07/flo_07_1_music.c create mode 100644 src/world/area_flo/flo_07/flo_07_2_main.c create mode 100644 src/world/area_flo/flo_07/flo_07_3_npc.c delete mode 100644 src/world/area_flo/flo_08/CAED40.c delete mode 100644 src/world/area_flo/flo_08/CAFA80.c delete mode 100644 src/world/area_flo/flo_08/CAFAC0.c delete mode 100644 src/world/area_flo/flo_08/CB0B80.c create mode 100644 src/world/area_flo/flo_08/flo_08_0_header.c create mode 100644 src/world/area_flo/flo_08/flo_08_1_music.c create mode 100644 src/world/area_flo/flo_08/flo_08_2_entity.c create mode 100644 src/world/area_flo/flo_08/flo_08_3_main.c create mode 100644 src/world/area_flo/flo_08/flo_08_4_npc.c create mode 100644 src/world/area_flo/flo_08/flo_08_5_foliage.c create mode 100644 src/world/area_flo/flo_08/flo_08_6_vines.c delete mode 100644 src/world/area_flo/flo_09/CB5000.c delete mode 100644 src/world/area_flo/flo_09/CB5040.c delete mode 100644 src/world/area_flo/flo_09/CB50E0.c delete mode 100644 src/world/area_flo/flo_09/CB5320.c create mode 100644 src/world/area_flo/flo_09/flo_09_0_header.c create mode 100644 src/world/area_flo/flo_09/flo_09_1_music.c create mode 100644 src/world/area_flo/flo_09/flo_09_2_main.c create mode 100644 src/world/area_flo/flo_09/flo_09_3_vines.c create mode 100644 src/world/area_flo/flo_09/flo_09_4_foliage.c create mode 100644 src/world/area_flo/flo_09/flo_09_5_npc.c delete mode 100644 src/world/area_flo/flo_10/CB9200.c delete mode 100644 src/world/area_flo/flo_10/CB9240.c delete mode 100644 src/world/area_flo/flo_10/CB9280.c delete mode 100644 src/world/area_flo/flo_10/CBA430.c create mode 100644 src/world/area_flo/flo_10/flo_10_0_header.c create mode 100644 src/world/area_flo/flo_10/flo_10_1_music.c create mode 100644 src/world/area_flo/flo_10/flo_10_2_entity.c create mode 100644 src/world/area_flo/flo_10/flo_10_3_main.c create mode 100644 src/world/area_flo/flo_10/flo_10_4_fountain.c create mode 100644 src/world/area_flo/flo_10/flo_10_5_npc.c rename src/world/area_flo/flo_10/{CB96B0.c => flo_10_6_waterfx.c} (93%) create mode 100644 src/world/area_flo/flo_10/flo_10_7_foliage.c delete mode 100644 src/world/area_flo/flo_11/CBDCD0.c create mode 100644 src/world/area_flo/flo_11/flo_11_0_header.c create mode 100644 src/world/area_flo/flo_11/flo_11_1_music.c create mode 100644 src/world/area_flo/flo_11/flo_11_2_main.c create mode 100644 src/world/area_flo/flo_11/flo_11_3_npc.c create mode 100644 src/world/area_flo/flo_11/flo_11_4_entity.c delete mode 100644 src/world/area_flo/flo_12/CC0E30.c delete mode 100644 src/world/area_flo/flo_12/CC0E70.c create mode 100644 src/world/area_flo/flo_12/flo_12_0_header.c create mode 100644 src/world/area_flo/flo_12/flo_12_1_music.c create mode 100644 src/world/area_flo/flo_12/flo_12_2_main.c create mode 100644 src/world/area_flo/flo_12/flo_12_3_npc.c delete mode 100644 src/world/area_flo/flo_13/CC3810.c delete mode 100644 src/world/area_flo/flo_13/CC3850.c create mode 100644 src/world/area_flo/flo_13/flo_13_0_header.c create mode 100644 src/world/area_flo/flo_13/flo_13_1_music.c create mode 100644 src/world/area_flo/flo_13/flo_13_2_entity.c create mode 100644 src/world/area_flo/flo_13/flo_13_3_main.c create mode 100644 src/world/area_flo/flo_13/flo_13_4_npc.c rename src/world/area_flo/flo_13/{CC6DE0.c => flo_13_5_new_party.c} (100%) delete mode 100644 src/world/area_flo/flo_14/CCB310.c delete mode 100644 src/world/area_flo/flo_14/CCBE20.c delete mode 100644 src/world/area_flo/flo_14/CCD670.c create mode 100644 src/world/area_flo/flo_14/flo_14_0_header.c create mode 100644 src/world/area_flo/flo_14/flo_14_1_music.c create mode 100644 src/world/area_flo/flo_14/flo_14_2_main.c create mode 100644 src/world/area_flo/flo_14/flo_14_3_bubbles.c create mode 100644 src/world/area_flo/flo_14/flo_14_4_npc.c create mode 100644 src/world/area_flo/flo_14/flo_14_5_entity.c create mode 100644 src/world/area_flo/flo_14/flo_14_6_logs.c delete mode 100644 src/world/area_flo/flo_15/CD06C0.c create mode 100644 src/world/area_flo/flo_15/flo_15_0_header.c create mode 100644 src/world/area_flo/flo_15/flo_15_1_music.c create mode 100644 src/world/area_flo/flo_15/flo_15_2_main.c create mode 100644 src/world/area_flo/flo_15/flo_15_3_npc.c create mode 100644 src/world/area_flo/flo_15/flo_15_4_entity.c create mode 100644 src/world/area_flo/flo_15/flo_15_5_stairs.c delete mode 100644 src/world/area_flo/flo_16/CD1E30.c delete mode 100644 src/world/area_flo/flo_16/CD1E70.c delete mode 100644 src/world/area_flo/flo_16/CD1F10.c delete mode 100644 src/world/area_flo/flo_16/CD2C80.c delete mode 100644 src/world/area_flo/flo_16/CD4770.c create mode 100644 src/world/area_flo/flo_16/flo_16_0_header.c create mode 100644 src/world/area_flo/flo_16/flo_16_1_music.c create mode 100644 src/world/area_flo/flo_16/flo_16_2_main.c create mode 100644 src/world/area_flo/flo_16/flo_16_3_vines.c create mode 100644 src/world/area_flo/flo_16/flo_16_4_entity.c create mode 100644 src/world/area_flo/flo_16/flo_16_5_npc.c create mode 100644 src/world/area_flo/flo_16/flo_16_6_puzzle.c delete mode 100644 src/world/area_flo/flo_17/CD72E0.c delete mode 100644 src/world/area_flo/flo_17/CD7320.c delete mode 100644 src/world/area_flo/flo_17/CD7350.c create mode 100644 src/world/area_flo/flo_17/flo_17_0_header.c create mode 100644 src/world/area_flo/flo_17/flo_17_1_music.c create mode 100644 src/world/area_flo/flo_17/flo_17_2_main.c create mode 100644 src/world/area_flo/flo_17/flo_17_3_logs.c create mode 100644 src/world/area_flo/flo_17/flo_17_4_npc.c create mode 100644 src/world/area_flo/flo_17/flo_17_5_entity.c delete mode 100644 src/world/area_flo/flo_18/CDC6A0.c delete mode 100644 src/world/area_flo/flo_18/CDCBD0.c create mode 100644 src/world/area_flo/flo_18/flo_18_0_header.c create mode 100644 src/world/area_flo/flo_18/flo_18_1_music.c create mode 100644 src/world/area_flo/flo_18/flo_18_2_main.c create mode 100644 src/world/area_flo/flo_18/flo_18_3_machine.c create mode 100644 src/world/area_flo/flo_18/flo_18_4_npc.c rename src/world/area_flo/flo_18/{CDCC30.c => flo_18_5_foliage.c} (71%) delete mode 100644 src/world/area_flo/flo_19/CE36F0.c create mode 100644 src/world/area_flo/flo_19/flo_19_0_header.c create mode 100644 src/world/area_flo/flo_19/flo_19_1_music.c create mode 100644 src/world/area_flo/flo_19/flo_19_2_entity.c create mode 100644 src/world/area_flo/flo_19/flo_19_3_main.c create mode 100644 src/world/area_flo/flo_19/flo_19_4_clouds.c create mode 100644 src/world/area_flo/flo_19/flo_19_5_beanstalk.c delete mode 100644 src/world/area_flo/flo_21/CE6700.c delete mode 100644 src/world/area_flo/flo_21/CE7240.c create mode 100644 src/world/area_flo/flo_21/flo_21_0_header.c create mode 100644 src/world/area_flo/flo_21/flo_21_1_music.c create mode 100644 src/world/area_flo/flo_21/flo_21_2_main.c create mode 100644 src/world/area_flo/flo_21/flo_21_3_clouds.c create mode 100644 src/world/area_flo/flo_21/flo_21_4_npc.c delete mode 100644 src/world/area_flo/flo_22/CEC240.c delete mode 100644 src/world/area_flo/flo_22/CEC280.c delete mode 100644 src/world/area_flo/flo_22/CEC290.c create mode 100644 src/world/area_flo/flo_22/flo_22_0_header.c create mode 100644 src/world/area_flo/flo_22/flo_22_1_music.c create mode 100644 src/world/area_flo/flo_22/flo_22_2_main.c create mode 100644 src/world/area_flo/flo_22/flo_22_3_npc.c create mode 100644 src/world/area_flo/flo_22/flo_22_4_well.c create mode 100644 src/world/area_flo/flo_22/flo_22_5_foliage.c delete mode 100644 src/world/area_flo/flo_23/CEE260.c delete mode 100644 src/world/area_flo/flo_23/CEE2A0.c create mode 100644 src/world/area_flo/flo_23/flo_23_0_header.c create mode 100644 src/world/area_flo/flo_23/flo_23_1_music.c create mode 100644 src/world/area_flo/flo_23/flo_23_2_main.c create mode 100644 src/world/area_flo/flo_23/flo_23_3_npc.c create mode 100644 src/world/area_flo/flo_23/flo_23_4_entity.c delete mode 100644 src/world/area_flo/flo_24/CF0940.c delete mode 100644 src/world/area_flo/flo_24/CF0980.c delete mode 100644 src/world/area_flo/flo_24/CF0BC0.c create mode 100644 src/world/area_flo/flo_24/flo_24_0_header.c create mode 100644 src/world/area_flo/flo_24/flo_24_1_music.c create mode 100644 src/world/area_flo/flo_24/flo_24_2_main.c create mode 100644 src/world/area_flo/flo_24/flo_24_3_foliage.c create mode 100644 src/world/area_flo/flo_24/flo_24_4_water.c create mode 100644 src/world/area_flo/flo_24/flo_24_5_entity.c delete mode 100644 src/world/area_flo/flo_25/CF2BD0.c delete mode 100644 src/world/area_flo/flo_25/CF2C10.c delete mode 100644 src/world/area_flo/flo_25/CF4BC0.c delete mode 100644 src/world/area_flo/flo_25/CF4E00.c create mode 100644 src/world/area_flo/flo_25/flo_25_0_header.c create mode 100644 src/world/area_flo/flo_25/flo_25_1_music.c create mode 100644 src/world/area_flo/flo_25/flo_25_2_main.c create mode 100644 src/world/area_flo/flo_25/flo_25_3_npc.c create mode 100644 src/world/area_flo/flo_25/flo_25_4_entity.c create mode 100644 src/world/area_flo/flo_25/flo_25_5_foliage.c create mode 100644 src/world/area_flo/flo_25/flo_25_6_vine.c delete mode 100644 src/world/area_tik/tik_06/876EE0.c delete mode 100644 src/world/area_tik/tik_06/8774D0.c create mode 100644 src/world/area_tik/tik_06/tik_06_0_header.c create mode 100644 src/world/area_tik/tik_06/tik_06_1_music.c create mode 100644 src/world/area_tik/tik_06/tik_06_2_main.c create mode 100644 src/world/area_tik/tik_06/tik_06_3_drips.c create mode 100644 src/world/area_tik/tik_06/tik_06_4_entity.c create mode 100644 src/world/common/atomic/flo_DroppingVine.inc.c create mode 100644 src/world/common/atomic/flo_FlowerSpawnRegion.inc.c create mode 100644 src/world/common/atomic/flo_LogBridge.inc.c create mode 100644 src/world/common/atomic/tik_DripVolumes.inc.c create mode 100644 src/world/common/enemy/ai/FlyingAI.data.inc.c create mode 100644 src/world/common/enemy/complete/AmazyDayzee.h create mode 100644 src/world/common/enemy/complete/AmazyDayzee.inc.c create mode 100644 src/world/common/enemy/complete/CrazyDayzee.h create mode 100644 src/world/common/enemy/complete/CrazyDayzee.inc.c create mode 100644 src/world/common/enemy/complete/HuffNPuff.h create mode 100644 src/world/common/enemy/complete/Lakitu.h create mode 100644 src/world/common/enemy/complete/Lakitu_SpinySpawner.inc.c create mode 100644 src/world/common/enemy/complete/Lakitu_Stationary.inc.c create mode 100644 src/world/common/enemy/complete/Magikoopa.h create mode 100644 src/world/common/enemy/complete/Spiny.h create mode 100644 src/world/common/enemy/complete/Spiny.inc.c create mode 100644 src/world/common/enemy/complete/TuffPuff.h create mode 100644 src/world/common/enemy/complete/TuffPuff.inc.c create mode 100644 src/world/common/npc/Bubulb_Patrol.inc.c create mode 100644 src/world/common/npc/Dummy.inc.c create mode 100644 src/world/common/npc/GateFlower.h create mode 100644 src/world/common/npc/GateFlower.inc.c create mode 100644 src/world/common/npc/Lily.h create mode 100644 src/world/common/npc/Lily.inc.c create mode 100644 src/world/common/npc/Posie.h create mode 100644 src/world/common/npc/Posie.inc.c create mode 100644 src/world/common/npc/Rosie.h create mode 100644 src/world/common/npc/Rosie.inc.c create mode 100644 src/world/common/npc/Sun.h create mode 100644 src/world/common/npc/Sun.inc.c create mode 100644 src/world/common/npc/Tolielup.h create mode 100644 src/world/common/npc/Tolielup.inc.c rename src/world/common/todo/{UnkPosFunc2.inc.c => CheckDripCollisionWithNPC.inc.c} (93%) rename src/world/common/todo/{UnkFunc43.inc.c => CheckVineTriggerDist.inc.c} (84%) delete mode 100644 ver/us/asm/data/world/area_tik/tik_06/877840.data.s delete mode 100644 ver/us/asm/data/world/area_tik/tik_06/8778F0.data.s delete mode 100644 ver/us/asm/data/world/area_tik/tik_06/878F90.data.s delete mode 100644 ver/us/asm/data/world/area_tik/tik_06/879860.data.s rename ver/us/asm/nonmatchings/world/area_kmr/kmr_23/{907A40 => kmr_23_2_npc}/func_80240DA4_9087D4.s (100%) diff --git a/include/common_structs.h b/include/common_structs.h index a1d0816415..7ed21ec465 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -111,6 +111,19 @@ typedef struct Color4f { /* 0x0C */ f32 a; } Color4f; // size = 0x10 +typedef struct Color3i { + /* 0x00 */ s32 r; + /* 0x04 */ s32 g; + /* 0x08 */ s32 b; +} Color3i; // size = 0xC + +typedef struct Color4i { + /* 0x00 */ s32 r; + /* 0x04 */ s32 g; + /* 0x08 */ s32 b; + /* 0x0C */ s32 a; +} Color4i; // size = 0x10 + typedef f32 Matrix4f[4][4]; // size = 0x40 typedef struct Matrix4s { diff --git a/include/effects.h b/include/effects.h index 93d9f44aec..d32d305d91 100644 --- a/include/effects.h +++ b/include/effects.h @@ -1647,25 +1647,14 @@ typedef struct UnderwaterFXData { } UnderwaterFXData; // size = unknown typedef struct LightningBoltFXData { - /* 0x000 */ s32 unk_00; - /* 0x004 */ f32 unk_04; - /* 0x008 */ f32 unk_08; - /* 0x00C */ f32 unk_0C; - /* 0x010 */ f32 unk_10; - /* 0x014 */ f32 unk_14; - /* 0x018 */ f32 unk_18; - /* 0x01C */ f32 unk_1C; - /* 0x020 */ f32 unk_20; - /* 0x024 */ f32 unk_24; - /* 0x028 */ s32 unk_28; - /* 0x02C */ s32 unk_2C; - /* 0x030 */ s32 unk_30; - /* 0x034 */ s32 unk_34; - /* 0x038 */ s32 unk_38; - /* 0x03C */ s32 unk_3C; - /* 0x040 */ s32 unk_40; - /* 0x044 */ s32 unk_44; - /* 0x048 */ s32 unk_48; + /* 0x000 */ s32 type; + /* 0x004 */ Vec3f tipPos; + /* 0x010 */ Vec3f startPos; + /* 0x01C */ Vec3f endPos; + /* 0x028 */ s32 timeLeft; + /* 0x02C */ s32 lifetime; + /* 0x030 */ Color4i outerColor; + /* 0x040 */ Color3i innerColor; /* 0x04C */ f32 unk_4C; /* 0x050 */ f32 unk_50[12]; /* 0x080 */ f32 unk_80[12]; @@ -2052,7 +2041,7 @@ typedef struct HieroglyphsFXData { } HieroglyphsFXData; // size = 0x3C typedef struct MiscParticlesFXData { - /* 0x00 */ s32 unk_00; + /* 0x00 */ s32 variation; /* 0x04 */ Vec3f pos; /* 0x10 */ f32 scaleX; /* 0x14 */ f32 scaleY; @@ -2061,18 +2050,12 @@ typedef struct MiscParticlesFXData { /* 0x20 */ char unk_20[4]; /* 0x24 */ f32 unk_24; /* 0x28 */ f32 unk_28; - /* 0x2C */ s32 unk_2C; - /* 0x30 */ s32 unk_30; - /* 0x34 */ s32 unk_34; - /* 0x38 */ s32 unk_38; - /* 0x3C */ s32 unk_3C; - /* 0x40 */ s32 unk_40; - /* 0x44 */ s32 unk_44; - /* 0x48 */ s32 unk_48; - /* 0x4C */ s32 unk_4C; - /* 0x50 */ s32 unk_50; - /* 0x54 */ s32 unk_54; - /* 0x58 */ f32 unk_58; + /* 0x2C */ s32 animTime; + /* 0x30 */ s32 timeLeft; + /* 0x34 */ s32 lifetime; + /* 0x38 */ Color4i innerColor; + /* 0x48 */ Color4i glowColor; + /* 0x58 */ f32 scale; /* 0x5C */ f32 unk_5C; /* 0x60 */ f32 unk_60; } MiscParticlesFXData; // size = 0x64 @@ -2354,6 +2337,12 @@ typedef struct IcePillarFXData { /* 0x24 */ char todo[0]; } IcePillarFXData; // size = unknown +// sun shine directions +enum { + FX_SUN_FROM_LEFT = 0, + FX_SUN_FROM_RIGHT = 1, +}; + typedef struct SunFXData { /* 0x00 */ s32 shineFromRight; /* 0x04 */ Vec3f pos; // does nothing diff --git a/include/enums.h b/include/enums.h index b471a9ad7f..97aebba38c 100644 --- a/include/enums.h +++ b/include/enums.h @@ -1461,6 +1461,21 @@ enum SoundInstanceFlags { SOUND_INSTANCE_FLAG_4 = 0x00000004, }; +enum SoundSpatializationFlags { + SOUND_SPACE_MODE_MASK = 0x0000FFFF, + SOUND_SPACE_MODE_0 = 0x00000000, + SOUND_SPACE_MODE_1 = 0x00000001, + SOUND_SPACE_FULL = 0x00000002, + SOUND_SPACE_PARAMS_MASK = 0xFFFF0000, + SOUND_PARAM_MUTE = 0x00010000, + SOUND_PARAM_CLIP_OFFSCREEN_ANY = 0x00020000, + SOUND_PARAM_CLIP_OFFSCREEN_X = 0x00040000, + SOUND_PARAM_CLIP_OFFSCREEN_Y = 0x00080000, + SOUND_PARAM_MOST_QUIET = 0x00100000, + SOUND_PARAM_MORE_QUIET = 0x00200000, + SOUND_PARAM_QUIET = 0x00400000, +}; + enum SoundType { SOUND_TYPE_SPECIAL = 0x80000000, SOUND_TYPE_LOOPING = 0, @@ -2654,6 +2669,8 @@ enum VisibilityGroup { VIS_GROUP_1 = 1, VIS_GROUP_2 = 2, VIS_GROUP_3 = 3, + VIS_GROUP_4 = 4, + VIS_GROUP_5 = 5, }; enum ItemSpawnModes { diff --git a/include/saved_flag_names.h b/include/saved_flag_names.h index 0ecca2455b..bac59466de 100644 --- a/include/saved_flag_names.h +++ b/include/saved_flag_names.h @@ -1381,7 +1381,7 @@ enum GameFlags { GF_FLO11_Defeated_Lakitus = GameFlag(0x561), GF_FLO12_Met_Rosie = GameFlag(0x562), GF_FLO12_RosieRequestedSomethingBeautiful = GameFlag(0x563), - GF_Unused_FLO_12 = GameFlag(0x564), + GF_FLO12_HeldItemPickup = GameFlag(0x564), GF_FLO08_Item_StarPiece = GameFlag(0x565), GF_FLO09_Item_HappyFlowerB = GameFlag(0x566), GF_FLO10_Tree1_JamminJelly = GameFlag(0x567), diff --git a/include/script_api/macros.h b/include/script_api/macros.h index 4a2b9088ac..ff6f9895bf 100644 --- a/include/script_api/macros.h +++ b/include/script_api/macros.h @@ -571,6 +571,9 @@ /****** COMMON SCRIPTS ************************************************************************************************/ +#define EVT_IF_TRUE(b) EVT_IF_NE(b, 0) +#define EVT_IF_FALSE(b) EVT_IF_EQ(b, 0) + #define EVT_SET_VEC2(baseVar, x, y, z) \ EVT_SET(baseVar + 0, x) \ EVT_SET(baseVar + 1, y) diff --git a/src/C50A0.c b/src/C50A0.c index 5f4b20d875..76bbb3fad8 100644 --- a/src/C50A0.c +++ b/src/C50A0.c @@ -816,7 +816,7 @@ s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pic ASSERT(itemEntity != NULL); itemEntity->renderGroup = ((u32)itemID >> 0x10) & 0xF; - if (itemEntity->renderGroup == 5) { + if (itemEntity->renderGroup == VIS_GROUP_5) { itemEntity->renderGroup = -1; } diff --git a/src/audio/private.h b/src/audio/private.h index 9022bc6b52..5cbee72c7a 100644 --- a/src/audio/private.h +++ b/src/audio/private.h @@ -322,5 +322,5 @@ void sfx_play_sound_at_position(s32 soundID, s32 flags, f32 posX, f32 posY, f32 void sfx_get_spatialized_sound_params(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags); void sfx_compute_spatialized_sound_params_0(f32 x, f32 y, f32 z, s16* volume, s16* pan); void sfx_compute_spatialized_sound_params_1(f32 x, f32 y, f32 z, s16* volume, s16* pan); -void sfx_compute_spatialized_sound_params_2(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags); +void sfx_compute_spatialized_sound_params_full(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags); */ diff --git a/src/audio/public.h b/src/audio/public.h index 4b7f790b2a..73f2eeb4e8 100644 --- a/src/audio/public.h +++ b/src/audio/public.h @@ -92,6 +92,6 @@ void sfx_play_sound_at_position(s32 soundID, s32 flags, f32 posX, f32 posY, f32 void sfx_get_spatialized_sound_params(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags); void sfx_compute_spatialized_sound_params_0(f32 x, f32 y, f32 z, s16* volume, s16* pan); void sfx_compute_spatialized_sound_params_1(f32 x, f32 y, f32 z, s16* volume, s16* pan); -void sfx_compute_spatialized_sound_params_2(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags); +void sfx_compute_spatialized_sound_params_full(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags); #endif diff --git a/src/audio/sfx.c b/src/audio/sfx.c index d7397a9149..6e8547be3a 100644 --- a/src/audio/sfx.c +++ b/src/audio/sfx.c @@ -210,10 +210,10 @@ extern SoundInstance D_801599B8[MAX_SOUND_INSTANCES]; extern SoundInstance* D_80159AD0; extern s32 D_80159AD4; -void sfx_compute_spatialized_sound_params_2(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags) { +void sfx_compute_spatialized_sound_params_full(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags) { s32 screenX, screenY, screenZ; - f32 f1, f2, f3; - f32 lerp1, lerp2, lerp3; + f32 volAmtOffsetX, volAmtDeltaY, volAmtDepth; + f32 offsetX, offsetY, depth; f32 volTemp, panTemp; s32 phi_v0; @@ -225,63 +225,57 @@ void sfx_compute_spatialized_sound_params_2(f32 x, f32 y, f32 z, s16* volume, s1 return; } - if (flags & 0x20000) { - if (screenX < -30 || screenX > 350 || screenY < -30) { + if (flags & SOUND_PARAM_CLIP_OFFSCREEN_ANY) { + if (screenX < -30 || screenX > SCREEN_WIDTH + 30 || screenY < -30 || screenY > SCREEN_HEIGHT + 30) { *volume = -1; *pan = 0; return; } - - if (screenY > 270) { + } else if (flags & SOUND_PARAM_CLIP_OFFSCREEN_X) { + if (screenX < -30 || screenX > SCREEN_WIDTH + 30) { *volume = -1; *pan = 0; return; } - } else if (flags & 0x40000) { - if (screenX < -30 || screenX > 350) { - *volume = -1; - *pan = 0; - return; - } - } else if (flags & 0x80000) { - if (screenY < -30 || screenY > 270) { + } else if (flags & SOUND_PARAM_CLIP_OFFSCREEN_Y) { + if (screenY < -30 || screenY > SCREEN_HEIGHT + 30) { *volume = -1; *pan = 0; return; } } - lerp1 = abs(160 - screenX) - 145; - if (lerp1 < 0.0) { - lerp1 = 0.0f; + offsetX = abs((SCREEN_WIDTH / 2) - screenX) - 145; + if (offsetX < 0.0) { + offsetX = 0.0f; } - f1 = update_lerp(0, 1.0f, 0.0f, lerp1, 200); - if (f1 < 0.0) { - f1 = 0.0f; + volAmtOffsetX = update_lerp(0, 1.0f, 0.0f, offsetX, 200); + if (volAmtOffsetX < 0.0) { + volAmtOffsetX = 0.0f; } - lerp2 = abs(120 - screenY) - 105; - if (lerp2 < 0.0) { - lerp2 = 0.0f; + offsetY = abs((SCREEN_HEIGHT / 2) - screenY) - 105; + if (offsetY < 0.0) { + offsetY = 0.0f; } - f2 = update_lerp(0, 1.0f, 0.0f, lerp2, 130); - if (f2 < 0.0) { - f2 = 0.0f; + volAmtDeltaY = update_lerp(0, 1.0f, 0.0f, offsetY, 130); + if (volAmtDeltaY < 0.0) { + volAmtDeltaY = 0.0f; } - lerp3 = screenZ - 5550.0; - if (lerp3 < 0.0) { - lerp3 = 0.0f; + depth = screenZ - 5550.0; + if (depth < 0.0) { + depth = 0.0f; } - f3 = update_lerp(0, 1.0f, 0.0f, lerp3, 250); - if (f3 < 0.0) { - f3 = 0.0f; + volAmtDepth = update_lerp(0, 1.0f, 0.0f, depth, 250); + if (volAmtDepth < 0.0) { + volAmtDepth = 0.0f; } - volTemp = (f1 * f2 * f3) * 127.0; + volTemp = (volAmtOffsetX * volAmtDeltaY * volAmtDepth) * 127.0; if (volTemp < 15.0) { volTemp = 15.0f; } else if (volTemp > 127.0) { @@ -549,38 +543,38 @@ void sfx_play_sound_at_position(s32 soundID, s32 flags, f32 posX, f32 posY, f32 } void sfx_get_spatialized_sound_params(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags) { - u32 upperFlags; - u32 lowerFlags; + u32 paramFlags; + u32 spaceMode; - upperFlags = flags & 0xFFFF0000; + paramFlags = flags & SOUND_SPACE_PARAMS_MASK; do { - lowerFlags = flags & 0xFFFF; + spaceMode = flags & SOUND_SPACE_MODE_MASK; } while (0); // required to match - switch (lowerFlags) { - case 0: + switch (spaceMode) { + case SOUND_SPACE_MODE_0: sfx_compute_spatialized_sound_params_0(x, y, z, volume, pan); break; - case 1: + case SOUND_SPACE_MODE_1: sfx_compute_spatialized_sound_params_1(x, y, z, volume, pan); break; - case 2: - sfx_compute_spatialized_sound_params_2(x, y, z, volume, pan, upperFlags); + case SOUND_SPACE_FULL: + sfx_compute_spatialized_sound_params_full(x, y, z, volume, pan, paramFlags); break; } - if (upperFlags & 0x10000) { + if (paramFlags & SOUND_PARAM_MUTE) { *volume = 0; - } else if (upperFlags & 0x400000) { + } else if (paramFlags & SOUND_PARAM_QUIET) { if (*volume < 80) { *volume = 80; } - } else if (upperFlags & 0x200000) { + } else if (paramFlags & SOUND_PARAM_MORE_QUIET) { if (*volume < 60) { *volume = 60; } - } else if (upperFlags & 0x100000) { + } else if (paramFlags & SOUND_PARAM_MOST_QUIET) { if (*volume < 40) { *volume = 40; } @@ -622,7 +616,7 @@ void sfx_compute_spatialized_sound_params_0(f32 x, f32 y, f32 z, s16* volume, s1 if (!gGameStatusPtr->isBattle) { *pan = (screenX * 0.2f) + 32.0f; } else { - f32 temp_f20 = ((screenX * 127.0) / 320.0) - 64.0; + f32 temp_f20 = ((screenX * 127.0) / SCREEN_WIDTH) - 64.0; *pan = (s32) (temp_f20 * sin_rad(DEG_TO_RAD(fabs(temp_f20) * 90.0 / 64.0))) + 64; } } @@ -630,7 +624,7 @@ void sfx_compute_spatialized_sound_params_0(f32 x, f32 y, f32 z, s16* volume, s1 void sfx_compute_spatialized_sound_params_1(f32 x, f32 y, f32 z, s16* volume, s16* pan) { Camera* camera = &gCameras[gCurrentCameraID]; s32 screenX, screenY, screenZ; - f32 temp_f0; + f32 depth; get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ); @@ -651,12 +645,12 @@ void sfx_compute_spatialized_sound_params_1(f32 x, f32 y, f32 z, s16* volume, s1 screenX = camera->viewportW; } - temp_f0 = fabsf(5000 - screenZ); - if (temp_f0 > 1000.0f) { - temp_f0 = 1000.0f; + depth = fabsf(5000 - screenZ); + if (depth > 1000.0f) { + depth = 1000.0f; } - *volume = *volume * (1500.0f - temp_f0) * 0.001f; + *volume = *volume * (1500.0f - depth) * 0.001f; if (*volume > 127) { *volume = 127; } diff --git a/src/battle/area_kpa2/actor/bowser_phase_3.c b/src/battle/area_kpa2/actor/bowser_phase_3.c index 59ff41b1bd..8eb8d272a5 100644 --- a/src/battle/area_kpa2/actor/bowser_phase_3.c +++ b/src/battle/area_kpa2/actor/bowser_phase_3.c @@ -188,13 +188,13 @@ ApiStatus N(MakeLightnings)(Evt* script, s32 isInitialCall) { s32 y1 = cos_deg(angle) * 200.0f + y; s32 z1 = z + 20; EffectInstance* effect = fx_lightning_bolt(1, x, y, z, x1, y1, z1, scale, 11); - s32 temp1 = rand_int(256); - s32 temp2 = rand_int(256); - s32 temp3 = rand_int(256); + s32 r = rand_int(256); + s32 g = rand_int(256); + s32 b = rand_int(256); - effect->data.lightningBolt->unk_30 = temp1; - effect->data.lightningBolt->unk_34 = temp2; - effect->data.lightningBolt->unk_38 = temp3; + effect->data.lightningBolt->outerColor.r = r; + effect->data.lightningBolt->outerColor.g = g; + effect->data.lightningBolt->outerColor.b = b; } return ApiStatus_DONE2; } diff --git a/src/battle/area_pra2/actor/crystal_king.c b/src/battle/area_pra2/actor/crystal_king.c index 90cb8aa97b..9d434734a7 100644 --- a/src/battle/area_pra2/actor/crystal_king.c +++ b/src/battle/area_pra2/actor/crystal_king.c @@ -184,12 +184,12 @@ ApiStatus func_802182E4_660A34(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args); - effect->data.lightningBolt->unk_30 = 0xFF; - effect->data.lightningBolt->unk_34 = 0xFF; - effect->data.lightningBolt->unk_38 = 0xFF; - effect->data.lightningBolt->unk_40 = 0xC8; - effect->data.lightningBolt->unk_44 = 0xF0; - effect->data.lightningBolt->unk_48 = 0xFF; + effect->data.lightningBolt->outerColor.r = 255; + effect->data.lightningBolt->outerColor.g = 255; + effect->data.lightningBolt->outerColor.b = 255; + effect->data.lightningBolt->innerColor.r = 200; + effect->data.lightningBolt->innerColor.g = 240; + effect->data.lightningBolt->innerColor.b = 255; return ApiStatus_DONE2; } diff --git a/src/common/MakeSun.inc.c b/src/common/MakeSun.inc.c index 0acb83d497..d8c79bacf5 100644 --- a/src/common/MakeSun.inc.c +++ b/src/common/MakeSun.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "effects.h" -char* N(sunny_areas)[] = { +char* N(RightSunMaps)[] = { "flo_03", "flo_08", "flo_09", @@ -15,25 +15,24 @@ char* N(sunny_areas)[] = { "flo_24", }; -ApiStatus N(make_sun)(Evt* script, s32 isInitialCall) { - s32 var1 = FALSE; +API_CALLABLE(N(SpawnSunEffect)) { + s32 direction = FX_SUN_FROM_LEFT; u32 i; - for (i = 0; i < ARRAY_COUNT(N(sunny_areas)); i++) { - if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, N(sunny_areas)[i]) == 0) { - var1 = TRUE; + for (i = 0; i < ARRAY_COUNT(N(RightSunMaps)); i++) { + if (strcmp(gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID].id, N(RightSunMaps)[i]) == 0) { + direction = FX_SUN_FROM_RIGHT; break; } } - fx_sun(var1, 0, 0, 0, 0, 0); - + fx_sun(direction, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } EvtScript N(MakeSun) = { EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(make_sun)) + EVT_CALL(N(SpawnSunEffect)) EVT_END_IF EVT_RETURN EVT_END diff --git a/src/common/UnkLightningBoltFxFunc1.inc.c b/src/common/UnkLightningBoltFxFunc1.inc.c index 21d2b5f4ca..78cb9787e8 100644 --- a/src/common/UnkLightningBoltFxFunc1.inc.c +++ b/src/common/UnkLightningBoltFxFunc1.inc.c @@ -54,13 +54,13 @@ ApiStatus N(UnkLightningBoltFxFunc1)(Evt* script, s32 isInitialCall) { f32 x = effectState->pos.x + cos_deg(effectState->yaw) * effectState->radius; f32 z = effectState->pos.z + sin_deg(effectState->yaw) * effectState->radius; - effectState->effect->data.lightningBolt->unk_04 = x; - effectState->effect->data.lightningBolt->unk_10 = x; - effectState->effect->data.lightningBolt->unk_1C = x; + effectState->effect->data.lightningBolt->tipPos.x = x; + effectState->effect->data.lightningBolt->startPos.x = x; + effectState->effect->data.lightningBolt->endPos.x = x; - effectState->effect->data.lightningBolt->unk_0C = z; - effectState->effect->data.lightningBolt->unk_18 = z; - effectState->effect->data.lightningBolt->unk_24 = z; + effectState->effect->data.lightningBolt->tipPos.z = z; + effectState->effect->data.lightningBolt->startPos.z = z; + effectState->effect->data.lightningBolt->endPos.z = z; if (effectState->duration > 10) { effectState->radius += 1.5; diff --git a/src/effects/lightning_bolt.c b/src/effects/lightning_bolt.c index 9715fd4e4e..632575a1c8 100644 --- a/src/effects/lightning_bolt.c +++ b/src/effects/lightning_bolt.c @@ -13,15 +13,15 @@ void lightning_bolt_render(EffectInstance* effect); void lightning_bolt_appendGfx(void* effect); EffectInstance* lightning_bolt_main( - s32 arg0, - f32 arg1, - f32 arg2, - f32 arg3, - f32 arg4, - f32 arg5, - f32 arg6, - f32 arg7, - s32 arg8) + s32 type, + f32 startX, + f32 startY, + f32 startZ, + f32 endX, + f32 endY, + f32 endZ, + f32 scale, + s32 duration) { EffectBlueprint bp; EffectInstance* effect; @@ -41,35 +41,35 @@ EffectInstance* lightning_bolt_main( data = effect->data.lightningBolt = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(effect->data.lightningBolt != NULL); - data->unk_00 = arg0; - data->unk_2C = 0; - if (arg8 <= 0) { - data->unk_28 = 1000; + data->type = type; + data->lifetime = 0; + if (duration <= 0) { + data->timeLeft = 1000; } else { - data->unk_28 = arg8; + data->timeLeft = duration; } - data->unk_3C = 255; - data->unk_10 = arg1; - data->unk_14 = arg2; - data->unk_18 = arg3; - data->unk_1C = arg4; - data->unk_20 = arg5; - data->unk_24 = arg6; - data->unk_04 = arg1; - data->unk_08 = arg2; - data->unk_0C = arg3; - data->unk_4C = arg7; + data->outerColor.a = 255; + data->startPos.x = startX; + data->startPos.y = startY; + data->startPos.z = startZ; + data->endPos.x = endX; + data->endPos.y = endY; + data->endPos.z = endZ; + data->tipPos.x = startX; + data->tipPos.y = startY; + data->tipPos.z = startZ; + data->unk_4C = scale; - temp = SQ(arg1 - arg4) + SQ(arg2 - arg5) + SQ(arg3 - arg6); + temp = SQ(startX - endX) + SQ(startY - endY) + SQ(startZ - endZ); if (temp != 0.0f) { data->unk_114 = shim_sqrtf(temp) * 0.005; - data->unk_30 = 255; - data->unk_34 = 220; - data->unk_38 = 20; - data->unk_40 = 255; - data->unk_44 = 255; - data->unk_48 = 255; + data->outerColor.r = 255; + data->outerColor.g = 220; + data->outerColor.b = 20; + data->innerColor.r = 255; + data->innerColor.g = 255; + data->innerColor.b = 255; data->unk_110 = shim_rand_int(359); return effect; @@ -81,43 +81,43 @@ EffectInstance* lightning_bolt_main( void lightning_bolt_init(EffectInstance* effect) { } -f32 func_E00BC1D8(f32 arg0) { - return (f32)shim_rand_int(arg0) - arg0 * 0.5; +f32 lightning_bolt_get_rand_symmetric(f32 interval) { + return (f32)shim_rand_int(interval) - interval * 0.5; } void lightning_bolt_update(EffectInstance* effect) { LightningBoltFXData* data = effect->data.lightningBolt; - s32 unk_00 = data->unk_00; + s32 type = data->type; - if (effect->flags & 0x10) { - effect->flags &= ~0x10; - data->unk_28 = 16; + if (effect->flags & EFFECT_INSTANCE_FLAGS_10) { + effect->flags &= ~EFFECT_INSTANCE_FLAGS_10; + data->timeLeft = 16; } - if (data->unk_28 < 1000) { - data->unk_28--; + if (data->timeLeft < 1000) { + data->timeLeft--; } - data->unk_2C++; + data->lifetime++; - if (data->unk_28 < 0) { + if (data->timeLeft < 0) { shim_remove_effect(effect); return; } - if (unk_00 == 2) { - if (data->unk_2C >= 40) { - data->unk_3C *= 0.5; + if (type == 2) { + if (data->lifetime >= 40) { + data->outerColor.a *= 0.5; } } else { - if (data->unk_2C >= 11) { - data->unk_3C *= 0.5; + if (data->lifetime >= 11) { + data->outerColor.a *= 0.5; } } } void lightning_bolt_render(EffectInstance *effect) { - LightningBoltFXData* effect94 = effect->data.lightningBolt; + LightningBoltFXData* data = effect->data.lightningBolt; RenderTask renderTask; RenderTask* retTask; RenderTask* renderTaskPointer = &renderTask; @@ -125,7 +125,7 @@ void lightning_bolt_render(EffectInstance *effect) { renderTask.appendGfx = lightning_bolt_appendGfx; renderTask.appendGfxArg = effect; if (gGameStatusPtr->isBattle == TRUE) { - renderTask.distance = effect94->unk_0C + 1000.0f; + renderTask.distance = data->tipPos.z + 1000.0f; } else { renderTask.distance = 10; } diff --git a/src/effects/misc_particles.c b/src/effects/misc_particles.c index 8cd9859572..26cae70977 100644 --- a/src/effects/misc_particles.c +++ b/src/effects/misc_particles.c @@ -21,15 +21,21 @@ Gfx* D_E00E4DA8[] = { }; u8 D_E00E4DC0[] = { - 0x02, 0x04, 0x08, 0x0D, 0x0F, 0x0D, 0x09, 0x06, 0x04, 0x03, 0x02, 0x04, 0x08, 0x0D, 0x0F, 0x0D, 0x09, 0x06, 0x04, 0x03, 0x02, 0x04, 0x08, 0x0D, 0x0F, 0x0D, 0x09, 0x06, 0x04, 0x03, 0x00, 0x00 + 0x02, 0x04, 0x08, 0x0D, 0x0F, 0x0D, 0x09, 0x06, 0x04, 0x03, + 0x02, 0x04, 0x08, 0x0D, 0x0F, 0x0D, 0x09, 0x06, 0x04, 0x03, + 0x02, 0x04, 0x08, 0x0D, 0x0F, 0x0D, 0x09, 0x06, 0x04, 0x03 }; u8 D_E00E4DE0[] = { - 0x28, 0x5A, 0x51, 0x48, 0x41, 0x3B, 0x35, 0x2F, 0x2B, 0x26, 0x22, 0x1F, 0x1C, 0x19, 0x16, 0x14, 0x12, 0x10, 0x0F, 0x0D, 0x0C, 0x0A, 0x09, 0x08, 0x07, 0x07, 0x06, 0x05, 0x05, 0x04, 0x00, 0x00 + 0x28, 0x5A, 0x51, 0x48, 0x41, 0x3B, 0x35, 0x2F, 0x2B, 0x26, + 0x22, 0x1F, 0x1C, 0x19, 0x16, 0x14, 0x12, 0x10, 0x0F, 0x0D, + 0x0C, 0x0A, 0x09, 0x08, 0x07, 0x07, 0x06, 0x05, 0x05, 0x04 }; u8 D_E00E4E00[] = { - 0xC8, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC8, 0x00, 0x00 + 0xC8, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC8 }; void misc_particles_init(EffectInstance* effect); @@ -38,23 +44,23 @@ void misc_particles_render(EffectInstance* effect); void misc_particles_appendGfx(void* effect); EffectInstance* misc_particles_main( - s32 arg0, - f32 arg1, - f32 arg2, - f32 arg3, - f32 arg4, - f32 arg5, + s32 variation, + f32 posX, + f32 posY, + f32 posZ, + f32 scaleX, + f32 scaleY, f32 arg6, - s32 arg7, - s32 arg8 + s32 numParticles, + s32 duration ) { EffectBlueprint bp; EffectInstance* effect; MiscParticlesFXData* part; - f32 temp; + f32 interval; s32 i; - arg7++; + numParticles++; bp.init = misc_particles_init; bp.update = misc_particles_update; @@ -64,69 +70,72 @@ EffectInstance* misc_particles_main( bp.effectID = EFFECT_MISC_PARTICLES; effect = shim_create_effect_instance(&bp); - effect->numParts = arg7; - part = effect->data.miscParticles = shim_general_heap_malloc(arg7 * sizeof(*part)); + effect->numParts = numParticles; + part = effect->data.miscParticles = shim_general_heap_malloc(numParticles * sizeof(*part)); ASSERT(effect->data.miscParticles != NULL); - part->unk_00 = arg0; - part->unk_34 = 0; - if (arg8 <= 0) { - part->unk_30 = 1000; + part->variation = variation; + part->lifetime = 0; + if (duration <= 0) { + part->timeLeft = 1000; } else { - part->unk_30 = arg8; + part->timeLeft = duration; } - part->unk_44 = 255; - part->pos.x = arg1; - part->pos.y = arg2; - part->pos.z = arg3; - part->unk_58 = arg6; - part->scaleX = arg4; - part->scaleY = arg5; - part->unk_38 = 255; - part->unk_3C = 255; - part->unk_40 = 255; + part->innerColor.a = 255; + part->pos.x = posX; + part->pos.y = posY; + part->pos.z = posZ; + part->scale = arg6; + part->scaleX = scaleX; + part->scaleY = scaleY; + part->innerColor.r = 255; + part->innerColor.g = 255; + part->innerColor.b = 255; - switch (arg0) { + switch (variation) { case 0: - part->unk_48 = 255; - part->unk_4C = 255; - part->unk_50 = 255; - part->unk_54 = 255; + part->glowColor.r = 255; + part->glowColor.g = 255; + part->glowColor.b = 255; + part->glowColor.a = 255; break; case 1: - part->unk_48 = 0; - part->unk_4C = 127; - part->unk_50 = 255; - part->unk_54 = 255; + part->glowColor.r = 0; + part->glowColor.g = 127; + part->glowColor.b = 255; + part->glowColor.a = 255; break; case 2: case 3: - part->unk_48 = 255; - part->unk_4C = 255; - part->unk_50 = 128; - part->unk_54 = 255; + part->glowColor.r = 255; + part->glowColor.g = 255; + part->glowColor.b = 128; + part->glowColor.a = 255; break; default: - part->unk_38 = shim_rand_int(127) + 128; - part->unk_3C = shim_rand_int(255 - part->unk_38) + 128; - part->unk_40 = shim_rand_int(383 - part->unk_38 - part->unk_3C) + 128; - part->unk_48 = 127; - part->unk_4C = 127; - part->unk_50 = 127; - part->unk_54 = 127; + part->innerColor.r = shim_rand_int(127) + 128; + part->innerColor.g = shim_rand_int(255 - part->innerColor.r) + 128; + part->innerColor.b = shim_rand_int(383 - part->innerColor.r - part->innerColor.g) + 128; + part->glowColor.r = 127; + part->glowColor.g = 127; + part->glowColor.b = 127; + part->glowColor.a = 127; break; } - if (part->unk_30 < 30) { - temp = (f32) part->unk_30 / (arg7 - 1); + // determine delay for particles to appear + if (part->timeLeft < 30) { + interval = (f32) part->timeLeft / (numParticles - 1); } else { - temp = 30.0f / (arg7 - 1); + interval = 30.0f / (numParticles - 1); } + // skip delay for first particle part++; - for (i = 1; i < arg7; i++, part++) { - s32 temp_f0 = -(f32) i * temp; - part->unk_2C = temp_f0 - 1; + + // set initial delay for each particle after the first + for (i = 1; i < numParticles; i++, part++) { + part->animTime = (s32)(-1.0f * i * interval) - 1; } return effect; @@ -136,134 +145,136 @@ void misc_particles_init(EffectInstance* effect) { } void misc_particles_update(EffectInstance* effect) { - MiscParticlesFXData* part = ((EffectInstance*)effect)->data.miscParticles; - s32 unk_00 = part->unk_00; + MiscParticlesFXData* particle = effect->data.miscParticles; + s32 variation = particle->variation; f32 scaleX; f32 scaleY; f32 posX; f32 posY; f32 posZ; - s32 unk_30; - s32 unk_38; - s32 unk_3C; - s32 unk_40; + s32 timeLeft; + s32 innerColorR; + s32 innerColorG; + s32 innerColorB; f32 temp_sin; f32 temp_cos; s32 i; - if (effect->flags & 0x10) { - effect->flags &= ~0x10; - part->unk_30 = 16; + if (effect->flags & EFFECT_INSTANCE_FLAGS_10) { + effect->flags &= ~EFFECT_INSTANCE_FLAGS_10; + particle->timeLeft = 16; } - if (part->unk_30 < 1000) { - part->unk_30--; + if (particle->timeLeft < 1000) { + particle->timeLeft--; } - part->unk_34++; + particle->lifetime++; - if (part->unk_30 < 0) { + if (particle->timeLeft < 0) { shim_remove_effect(effect); return; } - unk_30 = part->unk_30; + timeLeft = particle->timeLeft; - if (unk_30 < 8) { - part->unk_44 = unk_30 * 32; + if (particle->timeLeft < 8) { + particle->innerColor.a = particle->timeLeft * 32; } - scaleX = part->scaleX; - scaleY = part->scaleY; - posX = part->pos.x; - posY = part->pos.y; - posZ = part->pos.z; + scaleX = particle->scaleX; + scaleY = particle->scaleY; + posX = particle->pos.x; + posY = particle->pos.y; + posZ = particle->pos.z; temp_cos = shim_cos_deg(gCameras[gCurrentCameraID].currentYaw); temp_sin = shim_sin_deg(gCameras[gCurrentCameraID].currentYaw); - unk_38 = part->unk_38; - unk_3C = part->unk_3C; - unk_40 = part->unk_40; + innerColorR = particle->innerColor.r; + innerColorG = particle->innerColor.g; + innerColorB = particle->innerColor.b; - part++; - for (i = 1; i < effect->numParts; i++, part++) { - part->unk_2C++; - if (part->unk_2C >= 30) { - if (unk_30 < 30) { - part->unk_2C = 20; + particle++; + for (i = 1; i < effect->numParts; i++, particle++) { + particle->animTime++; + if (particle->animTime >= 30) { + if (timeLeft < 30) { + // perform final fadeout + particle->animTime = 20; } else { - part->unk_2C = 0; + // recycle the particle + particle->animTime = 0; } } - if (part->unk_2C >= 0) { - if (part->unk_2C == 0) { - f32 temp_f20 = shim_rand_int(scaleX) - scaleX * 0.5; - part->pos.x = posX + temp_f20 * temp_cos - temp_sin; - part->pos.y = posY + shim_rand_int(scaleY); - part->pos.z = posZ + temp_f20 * temp_sin + temp_cos; - part->unk_38 = unk_38; - part->unk_3C = unk_3C; - part->unk_40 = unk_40; + if (particle->animTime >= 0) { + if (particle->animTime == 0) { + f32 randMag = shim_rand_int(scaleX) - scaleX * 0.5; + particle->pos.x = posX + randMag * temp_cos - temp_sin; + particle->pos.y = posY + shim_rand_int(scaleY); + particle->pos.z = posZ + randMag * temp_sin + temp_cos; + particle->innerColor.r = innerColorR; + particle->innerColor.g = innerColorG; + particle->innerColor.b = innerColorB; } - switch (unk_00) { + switch (variation) { case 0: case 1: - if (part->unk_2C == 0) { - part->unk_18 = 0.0f; - part->unk_1C = 0.0f; - part->unk_24 = 0.0f; - part->unk_28 = (f32) (-shim_rand_int(10) - 2) * 0.05; - part->unk_5C = 0.0f; - part->unk_60 = 0.0f; - part->unk_58 = (f32) shim_rand_int(10) * 0.05 + 0.5; + if (particle->animTime == 0) { + particle->unk_18 = 0.0f; + particle->unk_1C = 0.0f; + particle->unk_24 = 0.0f; + particle->unk_28 = (f32) (-shim_rand_int(10) - 2) * 0.05; + particle->unk_5C = 0.0f; + particle->unk_60 = 0.0f; + particle->scale = (f32) shim_rand_int(10) * 0.05 + 0.5; } - part->unk_44 = D_E00E4E00[part->unk_2C]; - part->pos.x += part->unk_18; - part->pos.y += part->unk_1C; - part->unk_5C += 0.2; - part->unk_60 += 0.6; - part->unk_18 += (part->unk_24 - part->unk_18) * 0.04; - part->unk_1C += (part->unk_28 - part->unk_1C) * 0.04; + particle->innerColor.a = D_E00E4E00[particle->animTime]; + particle->pos.x += particle->unk_18; + particle->pos.y += particle->unk_1C; + particle->unk_5C += 0.2; + particle->unk_60 += 0.6; + particle->unk_18 += (particle->unk_24 - particle->unk_18) * 0.04; + particle->unk_1C += (particle->unk_28 - particle->unk_1C) * 0.04; break; case 2: case 3: - if (part->unk_2C == 0) { - if (unk_00 == 2) { - part->unk_18 = (f32) (shim_rand_int(20) - 10) * 0.05; - part->unk_1C = (f32) (shim_rand_int(20) - 10) * 0.05; + if (particle->animTime == 0) { + if (variation == 2) { + particle->unk_18 = (f32) (shim_rand_int(20) - 10) * 0.05; + particle->unk_1C = (f32) (shim_rand_int(20) - 10) * 0.05; } else { - part->unk_18 = 0.0f; - part->unk_1C = 0.0f; + particle->unk_18 = 0.0f; + particle->unk_1C = 0.0f; } - part->unk_24 = 0.0f; - part->unk_28 = 0.0f; - part->unk_5C = shim_rand_int(15); - part->unk_60 = shim_rand_int(15); - part->unk_44 = 255; + particle->unk_24 = 0.0f; + particle->unk_28 = 0.0f; + particle->unk_5C = shim_rand_int(15); + particle->unk_60 = shim_rand_int(15); + particle->innerColor.a = 255; } - part->unk_58 = (f32) D_E00E4DC0[part->unk_2C] * 0.1; - part->pos.x += part->unk_18; - part->pos.y += part->unk_1C; - part->unk_5C += 0.2; - part->unk_60 += 0.6; - part->unk_18 += (part->unk_24 - part->unk_18) * 0.04; - part->unk_1C += (part->unk_28 - part->unk_1C) * 0.04; + particle->scale = (f32) D_E00E4DC0[particle->animTime] * 0.1; + particle->pos.x += particle->unk_18; + particle->pos.y += particle->unk_1C; + particle->unk_5C += 0.2; + particle->unk_60 += 0.6; + particle->unk_18 += (particle->unk_24 - particle->unk_18) * 0.04; + particle->unk_1C += (particle->unk_28 - particle->unk_1C) * 0.04; break; default: - if (part->unk_2C == 0) { - part->unk_5C = 0.0f; - part->unk_60 = 0.0f; - part->unk_44 = 255; - part->unk_58 = 1.0f; - part->unk_38 = shim_rand_int(127) + 128; - part->unk_3C = shim_rand_int(255 - part->unk_38) + 128; - part->unk_40 = shim_rand_int(383 - part->unk_38 - part->unk_3C) + 128; + if (particle->animTime == 0) { + particle->unk_5C = 0.0f; + particle->unk_60 = 0.0f; + particle->innerColor.a = 255; + particle->scale = 1.0f; + particle->innerColor.r = shim_rand_int(127) + 128; + particle->innerColor.g = shim_rand_int(255 - particle->innerColor.r) + 128; + particle->innerColor.b = shim_rand_int(383 - particle->innerColor.r - particle->innerColor.g) + 128; } - if (unk_00 == 4) { - part->unk_58 = (f32) D_E00E4DE0[part->unk_2C] * 0.01; + if (variation == 4) { + particle->scale = (f32) D_E00E4DE0[particle->animTime] * 0.01; } else { - part->unk_58 = (f32) D_E00E4DC0[part->unk_2C] * 0.01; + particle->scale = (f32) D_E00E4DC0[particle->animTime] * 0.01; } break; } @@ -288,39 +299,39 @@ void func_E00E4954(void) { } void misc_particles_appendGfx(void* effect) { - MiscParticlesFXData* part = ((EffectInstance*)effect)->data.miscParticles; - s32 unk_00 = part->unk_00; - f32 temp_f20 = (part->unk_44 / 255.0f) * part->unk_58; - Matrix4f sp20; + MiscParticlesFXData* particle = ((EffectInstance*)effect)->data.miscParticles; + s32 variation = particle->variation; + f32 alphaScale = (particle->innerColor.a / 255.0f) * particle->scale; + Matrix4f mtxTransform; Matrix4f unused; s32 i; gDPPipeSync(gMasterGfxPos++); gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); - gDPSetEnvColor(gMasterGfxPos++, part->unk_48, part->unk_4C, part->unk_50, part->unk_54); - gSPDisplayList(gMasterGfxPos++, D_E00E4DA8[unk_00]); + gDPSetEnvColor(gMasterGfxPos++, particle->glowColor.r, particle->glowColor.g, particle->glowColor.b, particle->glowColor.a); + gSPDisplayList(gMasterGfxPos++, D_E00E4DA8[variation]); - part++; - for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { - if (part->unk_2C >= 0) { - shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, part->unk_58 * temp_f20, part->pos.x, part->pos.y, part->pos.z); - shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); + particle++; + for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, particle++) { + if (particle->animTime >= 0) { + shim_guPositionF(mtxTransform, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, particle->scale * alphaScale, particle->pos.x, particle->pos.y, particle->pos.z); + shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); - gDPSetPrimColor(gMasterGfxPos++, 0, 80 - part->unk_2C, part->unk_38, part->unk_3C, part->unk_40, temp_f20 * part->unk_44); + gDPSetPrimColor(gMasterGfxPos++, 0, 80 - particle->animTime, particle->innerColor.r, particle->innerColor.g, particle->innerColor.b, alphaScale * particle->innerColor.a); gDPSetTileSize(gMasterGfxPos++, 1, - (s32) part->unk_5C * 4, - (s32) part->unk_60 * 4, - ((s32) part->unk_5C + 15) * 4, - ((s32) part->unk_60 + 15) * 4); + (s32) particle->unk_5C * 4, + (s32) particle->unk_60 * 4, + ((s32) particle->unk_5C + 15) * 4, + ((s32) particle->unk_60 + 15) * 4); - if (unk_00 == 2) { + if (variation == 2) { gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, ((i & 0x1F) * 32 ) * 4, 31 * 4, ((i & 0x1F) * 32 + 31) * 4, 31 * 4); } - gSPDisplayList(gMasterGfxPos++, D_E00E4D90[unk_00]); + gSPDisplayList(gMasterGfxPos++, D_E00E4D90[variation]); gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW); } } diff --git a/src/evt/fa4c0_len_3bf0.c b/src/evt/fa4c0_len_3bf0.c index 6ba3146855..a9a5deb056 100644 --- a/src/evt/fa4c0_len_3bf0.c +++ b/src/evt/fa4c0_len_3bf0.c @@ -216,12 +216,12 @@ ApiStatus PlaySoundWithVolume(Evt* script, s32 isInitialCall) { ApiStatus PlaySoundAt(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 soundID = evt_get_variable(script, *args++); - s32 value2 = evt_get_variable(script, *args++); + s32 flags = evt_get_variable(script, *args++); s32 x = evt_get_variable(script, *args++); s32 y = evt_get_variable(script, *args++); s32 z = evt_get_variable(script, *args++); - sfx_play_sound_at_position(soundID, value2, x, y, z); + sfx_play_sound_at_position(soundID, flags, x, y, z); return ApiStatus_DONE2; } diff --git a/src/world/area_arn/arn_07/arn_07_2_main.c b/src/world/area_arn/arn_07/arn_07_2_main.c index 3f48045729..73a4668577 100644 --- a/src/world/area_arn/arn_07/arn_07_2_main.c +++ b/src/world/area_arn/arn_07/arn_07_2_main.c @@ -15,13 +15,7 @@ EvtScript N(EVS_SpawnStarCard) = { EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 145, 65, 0) EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) EVT_CALL(SetPanTarget, CAM_DEFAULT, 145, 30, 0) - EVT_CALL(GetCamDistance, CAM_DEFAULT, LVar1) - EVT_SUB(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_IF_NE(10000, 10000) - EVT_CALL(GetCamPitch, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar2, 10000) - EVT_END_IF + EVT_SPIRIT_ADJUST_CAM(10000) EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) EVT_CALL(N(StarSpiritEffectFunc2), 2, 50, 100, 31, -6, 145, 65, 0, 30, 0) EVT_THREAD @@ -83,13 +77,7 @@ EvtScript N(EVS_RespawnStarCard) = { EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 145, 65, 0) EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) EVT_CALL(SetPanTarget, CAM_DEFAULT, 145, 30, 0) - EVT_CALL(GetCamDistance, CAM_DEFAULT, LVar1) - EVT_SUB(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_IF_NE(10000, 10000) - EVT_CALL(GetCamPitch, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar2, 10000) - EVT_END_IF + EVT_SPIRIT_ADJUST_CAM(10000) EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) EVT_CALL(N(StarSpiritEffectFunc2), 2, 50, 100, 31, -6, 145, 65, 0, 30, 0) EVT_THREAD diff --git a/src/world/area_arn/arn_07/arn_07_5_npc.c b/src/world/area_arn/arn_07/arn_07_5_npc.c index 490aafa34c..079d058a53 100644 --- a/src/world/area_arn/arn_07/arn_07_5_npc.c +++ b/src/world/area_arn/arn_07/arn_07_5_npc.c @@ -8,11 +8,9 @@ #include "world/common/npc/StarSpirit.inc.c" API_CALLABLE(N(UpgradeStarPower)) { - PlayerData* playerData = &gPlayerData; - set_max_SP(3); - playerData->curHP = playerData->curMaxHP; - playerData->curFP = playerData->curMaxFP; + gPlayerData.curHP = gPlayerData.curMaxHP; + gPlayerData.curFP = gPlayerData.curMaxFP; sync_status_menu(); return ApiStatus_DONE2; } diff --git a/src/world/area_dro/dro_01/dro_01_5_building.c b/src/world/area_dro/dro_01/dro_01_5_building.c index d22a919a58..4c74b56654 100644 --- a/src/world/area_dro/dro_01/dro_01_5_building.c +++ b/src/world/area_dro/dro_01/dro_01_5_building.c @@ -156,7 +156,7 @@ s32 N(InteriorNPCs_RightHouse)[] = { EvtScript N(EVS_SetupBuildings) = { EVT_CALL(MakeDoorAdvanced, - VIS_GROUP_PAIR(0, 5), + VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_5), EVT_PTR(N(EVS_SetDoorRot_LeftHouse)), EVT_PTR(N(EVS_MoveWalls_LeftHouse)), EVT_PTR(N(EVS_DropDoor_LeftHouse)), @@ -166,7 +166,7 @@ EvtScript N(EVS_SetupBuildings) = { MODEL_k_i1, EVT_PTR(N(InteriorNPCs_LeftHouse))) EVT_CALL(MakeDoorAdvanced, - VIS_GROUP_PAIR(0, 5), + VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_5), EVT_PTR(N(EVS_SetDoorRot_Shop)), EVT_PTR(N(EVS_MoveWalls_Shop)), NULL, @@ -176,7 +176,7 @@ EvtScript N(EVS_SetupBuildings) = { MODEL_k_m1, EVT_PTR(N(InteriorNPCs_Shop))) EVT_CALL(MakeDoorAdvanced, - VIS_GROUP_PAIR(0, 5), + VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_5), EVT_PTR(N(EVS_SetDoorRot_RightHouse)), EVT_PTR(N(EVS_MoveWalls_RightHouse)), EVT_PTR(N(EVS_DropDoor_RightHouse)), diff --git a/src/world/area_dro/dro_01/npc_hint_dryite_companion.c b/src/world/area_dro/dro_01/npc_hint_dryite_companion.c index 4b89c0a598..c2e7bd9ce5 100644 --- a/src/world/area_dro/dro_01/npc_hint_dryite_companion.c +++ b/src/world/area_dro/dro_01/npc_hint_dryite_companion.c @@ -4,21 +4,21 @@ API_CALLABLE(N(GetRunToPos)) { PlayerStatus* playerStatus = &gPlayerStatus; Npc* npc = get_npc_safe(script->owner2.npcID); s32 rand; - f32 temp_f22; - f32 temp_f24; + f32 npcAngle; + f32 angle; - temp_f24 = atan2(183.0f, -75.0f, playerStatus->position.x, playerStatus->position.z); - temp_f22 = atan2(183.0f, -75.0f, npc->pos.x, npc->pos.z); - temp_f24 = get_clamped_angle_diff(temp_f22, temp_f24); + angle = atan2(183.0f, -75.0f, playerStatus->position.x, playerStatus->position.z); + npcAngle = atan2(183.0f, -75.0f, npc->pos.x, npc->pos.z); + angle = get_clamped_angle_diff(npcAngle, angle); rand = rand_int(10) + 30; - if (temp_f24 < 0.0f) { - temp_f22 += rand; + if (angle < 0.0f) { + npcAngle += rand; } else { - temp_f22 -= rand; + npcAngle -= rand; } rand = rand_int(20) + 30; - script->varTable[0] = 183.0f + (sin_deg(temp_f22) * rand); - script->varTable[1] = -75.0f - (cos_deg(temp_f22) * rand); + script->varTable[0] = 183.0f + (sin_deg(npcAngle) * rand); + script->varTable[1] = -75.0f - (cos_deg(npcAngle) * rand); return ApiStatus_DONE2; } diff --git a/src/world/area_dro/dro_02/dro_02_4_building.c b/src/world/area_dro/dro_02/dro_02_4_building.c index f0407cec34..722e247c53 100644 --- a/src/world/area_dro/dro_02/dro_02_4_building.c +++ b/src/world/area_dro/dro_02/dro_02_4_building.c @@ -215,7 +215,7 @@ EvtScript N(EVS_SetupBuildings) = { EVT_CALL(UpdateColliderTransform, COLLIDER_o1287) EVT_END_IF EVT_CALL(MakeDoorAdvanced, - VIS_GROUP_PAIR(0, 4), + VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_4), EVT_PTR(N(EVS_OpenDoor_Hideout)), EVT_PTR(N(EVS_MoveWalls_Hideout)), EVT_PTR(N(EVS_DropDoor_Hideout)), @@ -229,7 +229,7 @@ EvtScript N(EVS_SetupBuildings) = { EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OpenSecretDoor_FromInside)), TRIGGER_WALL_PRESS_A, COLLIDER_o1289, 1, 0) EVT_END_IF EVT_CALL(MakeDoorAdvanced, - VIS_GROUP_PAIR(1, 5), + VIS_GROUP_PAIR(VIS_GROUP_1, VIS_GROUP_5), EVT_PTR(N(EVS_OpenDoor_ToadHouse)), EVT_PTR(N(EVS_MoveWalls_ToadHouse)), NULL, diff --git a/src/world/area_end/end_00/end_00_9_huff_n_puff.c b/src/world/area_end/end_00/end_00_9_huff_n_puff.c index d3cd0bcafb..0106e88054 100644 --- a/src/world/area_end/end_00/end_00_9_huff_n_puff.c +++ b/src/world/area_end/end_00/end_00_9_huff_n_puff.c @@ -3,8 +3,6 @@ extern EvtScript N(EVS_SetNpcShadowScale); -API_CALLABLE(N(AddScrollToNpcPos)); - EvtScript N(EVS_HoldPosition_Yoshis) = { EVT_CALL(GetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) EVT_SETF(LVar0, LVar0) diff --git a/src/world/area_flo/flo.h b/src/world/area_flo/flo.h index 5bca6f78b4..44ac11ac88 100644 --- a/src/world/area_flo/flo.h +++ b/src/world/area_flo/flo.h @@ -2,24 +2,82 @@ #define _WORLD_AREA_FLO_FLO_H_ enum { - AB_FLO_0 = AreaByte(0), - AB_FLO_1 = AreaByte(1), - AB_FLO_2 = AreaByte(2), - AB_FLO_3 = AreaByte(3), - AB_FLO_4 = AreaByte(4), - AB_FLO_5 = AreaByte(5), - AB_FLO_6 = AreaByte(6), - AB_FLO_7 = AreaByte(7), - AB_FLO_8 = AreaByte(8), - AB_FLO_9 = AreaByte(9), - AB_FLO_A = AreaByte(10), - AB_FLO_B = AreaByte(11), - AB_FLO_C = AreaByte(12), - AB_FLO_D = AreaByte(13), - AB_FLO_E = AreaByte(14), - AB_FLO_F = AreaByte(15), + AB_FLO_TolielupDialogue = AreaByte(0), + AB_FLO_PetuniaDialogue = AreaByte(1), + AB_FLO_CrystalTreeHitCount = AreaByte(2), + AB_FLO_PoiseKickedOutCount = AreaByte(3), + AB_FLO_TreePuzzle_FirstCorrect = AreaByte(4), + AB_FLO_TreePuzzle_SecondCorrect = AreaByte(5), + AB_FLO_GuardLakituTalkCount = AreaByte(6), + AB_FLO_GuardedMachineHitCount = AreaByte(7), }; -#define AF_FLO(index) AreaFlag(index) +enum { + // flo_07 + AF_FLO_PoiseHintDialogue = AreaFlag(5), + AF_FLO_MadeCrystalBerry = AreaFlag(6), + // flo_00 + AF_FLO_BeanstalkFacingRight = AreaFlag(16), + AF_FLO_PlatingInstructionsToggle = AreaFlag(17), + AF_FLO_PinkBubulbDialogueToggle = AreaFlag(18), + AF_FLO_PurpleBubulbDialogueToggle = AreaFlag(19), + AF_FLO_GreenBubulbDialogueToggle = AreaFlag(20), + AF_FLO_YellowBubulbDialogueToggle = AreaFlag(21), + // flo_12 + AF_FLO_GivenCrystalBerry = AreaFlag(22), + // flo_03 + AF_FLO_IsUnderground_Mole_01 = AreaFlag(23), + AF_FLO_IsUnderground_Mole_02 = AreaFlag(24), + AF_FLO_IsUnderground_Mole_03 = AreaFlag(25), + AF_FLO_IsUnderground_Mole_04 = AreaFlag(26), + AF_FLO_TreeDrop_RedBerry1 = AreaFlag(27), + AF_FLO_TreeDrop_RedBerry2 = AreaFlag(28), + // flo_08 + AF_FLO_TreeDrop_BlueBerry1 = AreaFlag(29), + AF_FLO_TreeDrop_BlueBerry2 = AreaFlag(30), + // flo_24 + AF_FLO_TreeDrop_BubbleBerry1 = AreaFlag(31), + AF_FLO_TreeDrop_BubbleBerry2 = AreaFlag(32), + // flo_25 + AF_FLO_TreeDrop_YellowBerry1 = AreaFlag(33), + AF_FLO_TreeDrop_YellowBerry2 = AreaFlag(34), + // flo_14 + AF_FLO_PauseBlowingBubbles = AreaFlag(35), + AF_FLO_BlowingBigBubble = AreaFlag(36), + AF_FLO_BigBubbleReady = AreaFlag(37), + // flo_15 + AF_FLO_MetTheSun = AreaFlag(38), + // flo_16 + AF_FLO16_FoundHiddenStarPiece = AreaFlag(39), + // flo_19 + AF_FLO_BeanstalkGrowing = AreaFlag(40), + // flo_16 + AF_FLO_RaisedRedPillar = AreaFlag(41), + AF_FLO_RaisedGreenPillar = AreaFlag(42), + AF_FLO_LoweredPurplePillar = AreaFlag(43), + AF_FLO_RidingBeanstalk = AreaFlag(44), + AF_FLO_BeanstalkFadedOut = AreaFlag(45), +}; #endif + +extern MapSettings flo_00_settings; +extern MapSettings flo_03_settings; +extern MapSettings flo_07_settings; +extern MapSettings flo_08_settings; +extern MapSettings flo_09_settings; +extern MapSettings flo_10_settings; +extern MapSettings flo_11_settings; +extern MapSettings flo_12_settings; +extern MapSettings flo_13_settings; +extern MapSettings flo_14_settings; +extern MapSettings flo_15_settings; +extern MapSettings flo_16_settings; +extern MapSettings flo_17_settings; +extern MapSettings flo_18_settings; +extern MapSettings flo_19_settings; +extern MapSettings flo_21_settings; +extern MapSettings flo_22_settings; +extern MapSettings flo_23_settings; +extern MapSettings flo_24_settings; +extern MapSettings flo_25_settings; diff --git a/src/world/area_flo/flo_00/C9DF20.c b/src/world/area_flo/flo_00/C9DF20.c deleted file mode 100644 index 8091ec2e4a..0000000000 --- a/src/world/area_flo/flo_00/C9DF20.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "flo_00.h" -#include "effects.h" - -// Same as SpawnSunEffect, but doesn't touch float regs like SpawnSunEffect does -ApiStatus N(func_80240000_C9DF20)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_00/C9DF60.c b/src/world/area_flo/flo_00/C9DF60.c deleted file mode 100644 index 9b34eeb85b..0000000000 --- a/src/world/area_flo/flo_00/C9DF60.c +++ /dev/null @@ -1,2124 +0,0 @@ -#include "flo_00.h" -#include "script_api/common.h" -#include "message_ids.h" -#include "effects.h" -#include "entity.h" -#include "sprite/npc/Bubulb.h" -#include "sprite/npc/Lakilulu.h" -#include "sprite/npc/Tolielup.h" -#include "sprite/npc/WorldKlevar.h" -#include "sprite/npc/WorldLakilester.h" -#include "sprite/npc/WorldParakarry.h" - - -enum { - NPC_BUBULB0, - NPC_BUBULB1, - NPC_BUBULB2, - NPC_BUBULB3, - NPC_BUBULB4, - NPC_TOLIELUP, - NPC_WORLD_KLEVAR, - NPC_LAKILULU, -}; - -EntryList N(entryList) = { - { 0.0f, 0.0f, -310.0f, 170.0f }, - { -320.0f, 0.0f, -335.0f, 135.0f }, - { -470.0f, 0.0f, 0.0f, 90.0f }, - { -320.0f, 0.0f, 335.0f, 45.0f }, - { 320.0f, 0.0f, -335.0f, 225.0f }, - { 465.0f, 0.0f, 0.0f, 270.0f }, - { 320.0f, 0.0f, 335.0f, 315.0f }, - { -30.0f, 0.0f, 120.0f, 270.0f }, - { -30.0f, 0.0f, 120.0f, 270.0f }, - { -470.0f, 0.0f, 0.0f, 90.0f }, - { 40.0f, 0.0f, -30.0f, 270.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_00 }, -}; - -EvtScript N(802414D0) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(8) - EVT_IF_NE(AreaFlag(44), 0) - EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_IF - EVT_CASE_EQ(9) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_CASE_EQ(10) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_GE(GB_StoryProgress, 59) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_THREAD - EVT_CASE_EQ(11) - EVT_CALL(FadeInMusic, 0, 49, 0, 3000, 0, 127) - EVT_CASE_DEFAULT - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -static s32 N(pad_16BC) = { - 0x00000000, -}; - -EvtScript N(802416C0) = { - EVT_SET_GROUP(11) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024196C) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 2, 0x7FFFFE00) - EVT_CALL(PlayerMoveTo, 30, -170, 10) - EVT_CALL(InterpPlayerYaw, 0, 0) - EVT_CALL(PlaySoundAtCollider, 2, 463, 0) - EVT_CALL(MakeLerp, 0, -100, 20, 4) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, 28, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(func_802D2C14, 1) - EVT_CALL(PlayerMoveTo, 0, -310, 30) - EVT_CALL(func_802D2C14, 0) - EVT_IF_EQ(GB_StoryProgress, 59) - EVT_SET(GB_StoryProgress, 60) - EVT_END_IF - EVT_CALL(MakeLerp, -100, 0, 30, 1) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, 28, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, 2, 464, 0) - EVT_CALL(GotoMap, EVT_PTR("mac_01"), 5) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241B90) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 2, 0x7FFFFE00) - EVT_CALL(InterpPlayerYaw, 180, 0) - EVT_CALL(PlaySoundAtCollider, 2, 463, 0) - EVT_CALL(MakeLerp, 0, -100, 30, 1) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, 28, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(func_802D2C14, 1) - EVT_CALL(PlayerMoveTo, 0, -135, 30) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(MakeLerp, -100, 0, 30, 1) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, 28, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, 2, 464, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(ModifyColliderFlags, 1, 2, 0x7FFFFE00) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_80241D7C) = EVT_EXIT_WALK(60, 1, "flo_14", 0); - -EvtScript N(exitWalk_80241DD8) = EVT_EXIT_WALK(60, 2, "flo_23", 0); - -EvtScript N(exitWalk_80241E34) = EVT_EXIT_WALK(60, 3, "flo_25", 0); - -EvtScript N(exitWalk_80241E90) = EVT_EXIT_WALK(60, 4, "flo_16", 0); - -EvtScript N(exitWalk_80241EEC) = EVT_EXIT_WALK(60, 5, "flo_09", 0); - -EvtScript N(exitWalk_80241F48) = EVT_EXIT_WALK(60, 6, "flo_08", 0); - -const s32 N(pad_XXXX)[] = { 0, 0}; - -EvtScript N(80241FA4) = { - EVT_BIND_TRIGGER(N(exitWalk_80241D7C), TRIGGER_FLOOR_ABOVE, 5, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_80241DD8), TRIGGER_FLOOR_ABOVE, 9, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_80241E34), TRIGGER_FLOOR_ABOVE, 13, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_80241E90), TRIGGER_FLOOR_ABOVE, 17, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_80241EEC), TRIGGER_FLOOR_ABOVE, 21, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_80241F48), TRIGGER_FLOOR_ABOVE, 25, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(enterWalk_8024205C) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(80241FA4)) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, 8) - EVT_SET(AreaFlag(44), 0) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_THREAD - EVT_EXEC_WAIT(N(80241B90)) - EVT_EXEC(N(80241FA4)) - EVT_END_THREAD - EVT_CASE_RANGE(1, 6) - EVT_SET(LVar0, EVT_PTR(N(80241FA4))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(7) - EVT_THREAD - EVT_EXEC_WAIT(flo_00_8024834C) - EVT_EXEC(N(80241FA4)) - EVT_END_THREAD - EVT_CASE_EQ(8) - EVT_THREAD - EVT_EXEC_WAIT(flo_00_80247BCC) - EVT_EXEC(N(80241FA4)) - EVT_END_THREAD - EVT_CASE_EQ(9) - EVT_EXEC(flo_00_80242998) - EVT_SET(LVar0, EVT_PTR(N(80241FA4))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(10) - EVT_EXEC(N(80241FA4)) - EVT_CASE_EQ(11) - EVT_EXEC(flo_00_80245EB8) - EVT_END_SWITCH - EVT_END_IF - EVT_BIND_TRIGGER(flo_00_80242FCC, TRIGGER_WALL_PRESS_A, 2, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_SET(GF_MAP_FlowerFields, 1) - EVT_IF_LT(GB_StoryProgress, 55) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 48, 0x7FFFFE00) - EVT_END_IF - EVT_SET(GF_MAC01_RowfBadgesChosen, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 11) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80246834))) - EVT_ELSE - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80245DE4))) - EVT_END_IF - EVT_EXEC_WAIT(flo_00_makeEntities) - EVT_CALL(ParentColliderToModel, 46, 81) - EVT_EXEC(flo_00_80248F48) - EVT_EXEC(flo_00_80248E30) - EVT_CALL(ModifyColliderFlags, 3, 30, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 31, 0x00000006) - EVT_SET(LVar0, 150) - EVT_SET(LVar1, -270) - EVT_SET(LVar2, 410) - EVT_SET(LVar3, 170) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802416C0)) - EVT_SET(LVar0, 115) - EVT_SET(LVar1, -450) - EVT_SET(LVar2, 250) - EVT_SET(LVar3, -270) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802416C0)) - EVT_SET(LVar0, -330) - EVT_SET(LVar1, 220) - EVT_SET(LVar2, 45) - EVT_SET(LVar3, 410) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802416C0)) - EVT_SET(LVar0, -420) - EVT_SET(LVar1, -260) - EVT_SET(LVar2, -140) - EVT_SET(LVar3, 160) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802416C0)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 26, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 18, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 14, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 6, 0x7FFFFE00) - EVT_EXEC(N(enterWalk_8024205C)) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_NE(LVar1, 1) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 10) - EVT_WAIT(65) - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(802414D0)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(func_80240000_C9DF20)) - EVT_END_IF - EVT_THREAD - EVT_CALL(EnableTexPanning, 35, 1) - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_CALL(RandInt, 300, LVar1) - EVT_ADD(LVar1, 100) - EVT_CALL(RandInt, 1, LVar2) - EVT_ADD(LVar2, 1) - EVT_WAIT(LVar1) - EVT_LOOP(LVar2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x18000, 0) - EVT_CALL(RandInt, 5, LVar3) - EVT_ADD(LVar3, 2) - EVT_WAIT(LVar3) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, 0, 0) - EVT_CALL(RandInt, 5, LVar3) - EVT_ADD(LVar3, 2) - EVT_WAIT(LVar3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_80242840) = { - .height = 24, - .radius = 24, - .level = 99, -}; - -MobileAISettings N(npcAISettings_8024286C) = { - .moveSpeed = 1.5f, - .moveTime = 30, - .waitTime = 30, - .playerSearchInterval = -1, - .unk_AI_2C = 1, -}; - -EvtScript N(npcAI_8024289C) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(npcAISettings_8024286C))) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_802428BC) = { - .height = 42, - .radius = 28, - .ai = &N(npcAI_8024289C), - .level = 99, -}; - -NpcSettings N(npcSettings_802428E8) = { - .height = 56, - .radius = 40, - .level = 99, -}; - -NpcSettings N(npcSettings_80242914) = { - .height = 26, - .radius = 24, - .level = 99, -}; - -NpcSettings N(npcSettings_80242940) = { - .height = 20, - .radius = 20, - .level = 99, -}; - -NpcSettings N(npcSettings_8024296C) = { - .height = 22, - .radius = 24, - .level = 99, -}; - -extern const char N(flo_07_name_hack)[]; - -EvtScript N(80242998) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(UseSettingsFrom, 0, 50, 0, -200) - EVT_CALL(SetPanTarget, 0, 50, 0, -200) - EVT_CALL(SetCamDistance, 0, 700) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(10.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamPosA, 0, -27, 0) - EVT_CALL(SetCamPosB, 0, 0, -50) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00C4, 0, 50, -200) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR(N(flo_07_name_hack)), 1) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242AF0) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, 0, 0, 0, -170) - EVT_CALL(SetPanTarget, 0, 0, 0, -170) - EVT_CALL(SetCamDistance, 0, 300) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_WAIT(75) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_0000, 160, 40) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.5)) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 12) - EVT_WAIT(10) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(15) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_WAIT(15) - EVT_CALL(SetCamDistance, 0, 800) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(15.0), EVT_FLOAT(-5.8)) - EVT_CALL(SetCamPosA, 0, -2, 0) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, 0, -1, -1, 5, MSG_CH6_0001) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_CALL(InterpPlayerYaw, 350, 0) - EVT_WAIT(15) - EVT_CALL(ContinueSpeech, 0, -1, -1, 5, MSG_CH6_0002) - EVT_WAIT(10) - EVT_CALL(SetCamDistance, 0, 333) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(9.0), EVT_FLOAT(-22.0)) - EVT_CALL(SetCamPosA, 0, -2, 0) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(func_802D2C14, 1) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0003, 0, 70, -200) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(16.5), EVT_FLOAT(-11.8)) - EVT_CALL(SetCamDistance, 0, 525) - EVT_CALL(SetCamPosA, 0, -14, 0) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0004, 0, 50, -200) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(9.0), EVT_FLOAT(-22.0)) - EVT_CALL(SetCamDistance, 0, 333) - EVT_CALL(SetCamPosA, 0, -2, 0) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0005, 0, 70, -200) - EVT_CALL(ResetCam, 0, EVT_FLOAT(90.0)) - EVT_SET(GB_StoryProgress, 43) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242FCC) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(2) - EVT_CALL(GetPlayerActionState, LVar3) - EVT_SET(LVar4, 0) - EVT_IF_EQ(LVar3, 0) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, 1) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, 2) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar4, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_StoryProgress, 53) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0006, 0, 50, -200) - EVT_SET(GB_StoryProgress, 54) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, 60) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000D, 0, 50, -200) - EVT_CALL(ShowChoice, MSG_Choice_001F) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(45) - EVT_CALL(SwitchMessage, MSG_CH6_000E) - EVT_CASE_LT(46) - EVT_CALL(SwitchMessage, MSG_CH6_000F) - EVT_CASE_LT(49) - EVT_CALL(SwitchMessage, MSG_CH6_0010) - EVT_CASE_LT(53) - EVT_CALL(SwitchMessage, MSG_CH6_0011) - EVT_CASE_LT(55) - EVT_CALL(SwitchMessage, MSG_CH6_0007) - EVT_CASE_LT(58) - EVT_CALL(SwitchMessage, MSG_CH6_0012) - EVT_CASE_DEFAULT - EVT_CALL(SwitchMessage, MSG_CH6_0013) - EVT_END_SWITCH - EVT_CASE_EQ(1) - EVT_CALL(CloseMessage) - EVT_EXEC(N(8024196C)) - EVT_RETURN - EVT_CASE_EQ(2) - EVT_CALL(CloseMessage) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0014, 0, 50, -200) - EVT_CALL(ShowChoice, MSG_Choice_001F) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SwitchMessage, MSG_CH6_0015) - EVT_CASE_EQ(1) - EVT_CALL(CloseMessage) - EVT_EXEC(N(8024196C)) - EVT_RETURN - EVT_CASE_EQ(2) - EVT_CALL(CloseMessage) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(80243368) = { - EVT_CALL(AdjustCam, 0, EVT_FLOAT(90.0), 0, 600, EVT_FLOAT(21.0), EVT_FLOAT(-12.0)) - EVT_WAIT(20) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000B, 0, 50, -200) - EVT_CALL(SetPanTarget, 0, 0, 0, -30) - EVT_CALL(SetCamDistance, 0, 250) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(25.0), EVT_FLOAT(-25.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000C, 0, 50, -200) - EVT_CALL(ResetCam, 0, EVT_FLOAT(90.0)) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80243474) = { - EVT_CALL(EnableGroup, 121, 0) - EVT_CALL(EnableGroup, 80, 0) - EVT_CALL(EnableGroup, 132, 0) - EVT_CALL(SetNpcPos, NPC_SELF, 50, 70, -230) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_2, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_EXEC(N(80242AF0)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_8024352C) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(45) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0016) - EVT_CASE_LT(46) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0017) - EVT_CASE_LT(49) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0018) - EVT_CASE_LT(53) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0019) - EVT_CASE_LT(57) - EVT_SWITCH(AreaFlag(18)) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001A) - EVT_SET(AreaFlag(18), 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001B) - EVT_SET(AreaFlag(18), 0) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001C) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_802436C0) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(45) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001D) - EVT_CASE_LT(46) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001E) - EVT_CASE_LT(49) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001F) - EVT_CASE_LT(53) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0020) - EVT_CASE_LT(57) - EVT_SWITCH(AreaFlag(19)) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0021) - EVT_SET(AreaFlag(19), 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0022) - EVT_SET(AreaFlag(19), 0) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0023) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_80243854) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(45) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0024) - EVT_CASE_LT(46) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0025) - EVT_CASE_LT(49) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0026) - EVT_CASE_LT(53) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0027) - EVT_CASE_LT(57) - EVT_SWITCH(AreaFlag(20)) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0028) - EVT_SET(AreaFlag(20), 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0029) - EVT_SET(AreaFlag(20), 0) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_002A) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_802439E8) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(45) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002B) - EVT_CASE_LT(46) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002C) - EVT_CASE_LT(49) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002D) - EVT_CASE_LT(53) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002E) - EVT_CASE_LT(57) - EVT_SWITCH(AreaFlag(21)) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_002F) - EVT_SET(AreaFlag(21), 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0030) - EVT_SET(AreaFlag(21), 0) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0031) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80243B7C) = { - EVT_SET(AreaFlag(18), 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_8024352C))) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80243BB0) = { - EVT_SET(AreaFlag(19), 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_802436C0))) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80243BE4) = { - EVT_SET(AreaFlag(20), 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80243854))) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80243C18) = { - EVT_SET(AreaFlag(21), 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_802439E8))) - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_80243C4C) = { - EVT_IF_EQ(GF_FLO00_Met_Tolielup, 0) - EVT_CALL(AdjustCam, 0, EVT_FLOAT(4.0), -30, 300, EVT_FLOAT(20.0), EVT_FLOAT(-9.5)) - EVT_SET(GF_FLO00_Met_Tolielup, 1) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(45) - EVT_SWITCH(AreaByte(0)) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0035) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AreaByte(0), 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AreaByte(0), 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AreaByte(0), 0) - EVT_END_SWITCH - EVT_CASE_LT(47) - EVT_SWITCH(AreaByte(0)) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0036) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AreaByte(0), 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AreaByte(0), 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AreaByte(0), 0) - EVT_END_SWITCH - EVT_CASE_LT(53) - EVT_SWITCH(AreaByte(0)) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0037) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AreaByte(0), 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AreaByte(0), 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AreaByte(0), 0) - EVT_END_SWITCH - EVT_CASE_LT(57) - EVT_SWITCH(AreaByte(0)) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AreaByte(0), 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_003A) - EVT_CALL(EndSpeech, -1, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_END_SWITCH - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_8024414C) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80243C4C))) - EVT_CALL(SetNpcCollisionSize, -1, 65, 50) - EVT_RETURN - EVT_END -}; - -EvtScript N(idle_80244188) = { - EVT_LOOP(0) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(8024427C) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -50) - EVT_SET(LVar4, LVar1) - EVT_ADD(LVar4, 26) - EVT_CALL(SetNpcPos, 6, LVar3, LVar4, LVar2) - EVT_CALL(PlayerFaceNpc, 6, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, 6, 0) - EVT_ADD(LVar0, -25) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, EVT_FLOAT(475.0)) - EVT_CALL(SetCamPitch, 0, 18, -8) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_WAIT(1) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40) - EVT_CALL(SpeakToPlayer, 6, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, 512, MSG_CH6_00D8) - EVT_CALL(SetCamDistance, 0, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, 0, 18, -9) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(MakeLerp, 0, 360, 10, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, 6, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableNpcAI, 6, 0) - EVT_CALL(SetNpcAnimation, 6, ANIM_WorldKlevar_Leap) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_GotItem) - EVT_CALL(PlaySoundAtPlayer, 313, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar1, 50) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar3, 30) - EVT_LOOP(5) - EVT_CALL(PlayEffect, EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(6) - EVT_CALL(PlayEffect, EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(6) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(PlaySoundAtPlayer, 392, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(PlayEffect, EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_CALL(SetNpcAnimation, 6, ANIM_WorldKlevar_Idle) - EVT_CALL(EnableNpcAI, 6, 1) - EVT_CALL(N(PostChapter6StatUpdate)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0196, 160, 40) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, 6, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, EVT_FLOAT(250.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, 6, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, 512, MSG_CH6_00D9) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -25) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, 6, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, 512, MSG_CH6_00DA) - EVT_CALL(SetNpcFlagBits, 6, NPC_FLAG_40000, TRUE) - EVT_THREAD - EVT_LOOP(25) - EVT_CALL(GetNpcPos, 6, LVar0, LVar1, LVar2) - EVT_CALL(PlayEffect, EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 1800) - EVT_CALL(MakeLerp, LVar2, LVar3, 100, 2) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, 6, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, 6, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 180) - EVT_CALL(MakeLerp, LVar3, LVar5, 100, 2) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, 6, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, 6, 0, -1000, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtNpc, 6, 0x2045, 0) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A) - EVT_WAIT(110) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_SET(GB_StoryProgress, 59) - EVT_EXEC_WAIT(N(80243368)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80244BF4) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_NE(LVar1, 1) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 10) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80244188))) - EVT_EXEC(N(8024427C)) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_80244C98) = { - EVT_IF_LE(GB_StoryProgress, 53) - EVT_CALL(SpeakToPlayer, 7, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_ELSE - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, 8) - EVT_CALL(SpeakToPlayer, 7, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_WAIT(10) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 5, MSG_CH6_0033) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldLakilester_Idle) - EVT_CALL(EndSpeech, -4, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5) - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_CALL(SpeakToPlayer, 7, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80244DD0) = { - EVT_IF_GE(GB_StoryProgress, 58) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80244C98))) - EVT_CALL(SetNpcCollisionSize, -1, 36, 28) - EVT_CALL(SetNpcPos, NPC_SELF, -200, 15, -300) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80244E64) = { - .id = NPC_BUBULB0, - .settings = &N(npcSettings_80242840), - .pos = { -72.0f, 60.0f, -100.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_GRAVITY | NPC_FLAG_JUMPING, - .init = &N(init_80243474), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Walk, - ANIM_Bubulb_Pink_Walk, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - }, -}; - -StaticNpc N(npcGroup_80245054)[] = { - { - .id = NPC_BUBULB1, - .settings = &N(npcSettings_802428BC), - .pos = { -59.0f, 0.0f, -40.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .init = &N(init_80243B7C), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .territory = { .temp = { 2, -59, 0, -40, -80, 0, -40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32767, -59, 0, -40, 100, 0, 0, 1 }}, - .animations = { - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Walk, - ANIM_Bubulb_Pink_Walk, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - }, - .tattle = MSG_NpcTattle_FLO_BubulbA, - }, - { - .id = NPC_BUBULB2, - .settings = &N(npcSettings_802428BC), - .pos = { 67.0f, 0.0f, 85.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .init = &N(init_80243BB0), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .territory = { .temp = { 2, 67, 0, 85, 97, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32767, -59, 0, -40, 100, 0, 0, 1 }}, - .animations = { - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Walk, - ANIM_Bubulb_Purple_Walk, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - ANIM_Bubulb_Purple_Idle, - }, - .tattle = MSG_NpcTattle_FLO_BubulbB, - }, - { - .id = NPC_BUBULB3, - .settings = &N(npcSettings_802428BC), - .pos = { 90.0f, 0.0f, 410.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .init = &N(init_80243BE4), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .territory = { .temp = { 2, 90, 0, 410, 120, 0, 410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32767, -59, 0, -40, 100, 0, 0, 1 }}, - .animations = { - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Walk, - ANIM_Bubulb_Green_Walk, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - ANIM_Bubulb_Green_Idle, - }, - .tattle = MSG_NpcTattle_FLO_BubulbC, - }, - { - .id = NPC_BUBULB4, - .settings = &N(npcSettings_802428BC), - .pos = { 200.0f, 0.0f, 430.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .init = &N(init_80243C18), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .territory = { .temp = { 2, 200, 0, 430, 240, 0, 430, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32767, -59, 0, -40, 100, 0, 0, 1 }}, - .animations = { - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Walk, - ANIM_Bubulb_Yellow_Walk, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - ANIM_Bubulb_Yellow_Idle, - }, - .tattle = MSG_NpcTattle_FLO_BubulbD, - }, -}; - -StaticNpc N(npcGroup_80245814) = { - .id = NPC_TOLIELUP, - .settings = &N(npcSettings_802428E8), - .pos = { -400.0f, 0.0f, 190.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, - .init = &N(init_8024414C), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - ANIM_Tolielup_Idle, - }, - .tattle = MSG_NpcTattle_Tolielup, -}; - -StaticNpc N(npcGroup_80245A04) = { - .id = NPC_WORLD_KLEVAR, - .settings = &N(npcSettings_80242914), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_80244BF4), - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Still, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - ANIM_WorldKlevar_Idle, - }, -}; - -StaticNpc N(npcGroup_80245BF4) = { - .id = NPC_LAKILULU, - .settings = &N(npcSettings_80242840), - .pos = { 198.0f, 0.0f, 363.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_80244DD0), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - }, - .tattle = MSG_NpcTattle_Lakilulu, -}; - -NpcGroupList N(npcGroupList_80245DE4) = { - NPC_GROUP(N(npcGroup_80244E64)), - NPC_GROUP(N(npcGroup_80245054)), - NPC_GROUP(N(npcGroup_80245814)), - NPC_GROUP(N(npcGroup_80245A04)), - NPC_GROUP(N(npcGroup_80245BF4)), - {}, -}; - -static s32 N(pad_5E2C) = { - 0x00000000, -}; - -NpcSettings N(npcSettings_80245E30) = { - .height = 24, - .radius = 24, - .level = 99, -}; - -NpcSettings N(npcSettings_80245E5C) = { - .height = 35, - .radius = 24, - .level = 99, - .actionFlags = 16, -}; - -f32 N(D_80245E88_CA3DA8)[] = { - 266.0f, 20.0f, 322.0f, 310.0f, - 30.0f, 312.0f, 346.0f, 90.0f, - 300.0f, 400.0f, 200.0f, 287.0f, -}; - -extern const char N(sam_11_name_hack)[]; - -EvtScript N(80245EB8) = { - EVT_CALL(SetPlayerPos, -400, 0, 200) - EVT_CALL(SetNpcPos, NPC_PARTNER, -380, 0, 200) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_SET(LVar0, 230) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 350) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamDistance, 0, 350) - EVT_CALL(SetCamPosA, 0, EVT_FLOAT(17.5), EVT_FLOAT(35.0)) - EVT_CALL(SetCamPosB, 0, 0, -50) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(70) - EVT_CALL(InterpNpcYaw, 0, 90, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, 0, ANIM_WorldLakilester_Talk) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, 0, ANIM_WorldLakilester_Idle) - EVT_CALL(SetNpcAnimation, 2, ANIM_WorldParakarry_Talk) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, 2, ANIM_WorldParakarry_Idle) - EVT_CALL(InterpNpcYaw, 2, 90, 0) - EVT_CALL(NpcFlyTo, 2, 400, 200, 287, 80, -5, 0) - EVT_CALL(InterpNpcYaw, 0, 270, 0) - EVT_WAIT(40) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(GotoMap, EVT_PTR(N(sam_11_name_hack)), 2) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80246170) = { - EVT_CALL(SetPlayerPos, -400, 0, 200) - EVT_CALL(SetNpcPos, NPC_PARTNER, -380, 0, 200) - EVT_CALL(SetNpcPos, 0, 196, 20, 354) - EVT_CALL(SetNpcYaw, 0, 270) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_802461E4) = { - EVT_CALL(SetNpcPos, 1, 163, 20, 370) - EVT_CALL(SetNpcYaw, 1, 90) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80246224) = { - EVT_CALL(SetNpcPos, 2, 266, 20, 322) - EVT_CALL(SetNpcYaw, 2, 270) - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80246264)[] = { - { - .id = NPC_BUBULB0, - .settings = &N(npcSettings_80245E30), - .pos = { 144.0f, 0.0f, 374.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING, - .init = &N(init_80246170), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - }, - }, - { - .id = NPC_BUBULB1, - .settings = &N(npcSettings_80245E30), - .pos = { 198.0f, 0.0f, 363.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING, - .init = &N(init_802461E4), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - }, - }, - { - .id = NPC_BUBULB2, - .settings = &N(npcSettings_80245E5C), - .pos = { 266.0f, 0.0f, 322.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING, - .init = &N(init_80246224), - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_WorldParakarry_Idle, - ANIM_WorldParakarry_Walk, - ANIM_WorldParakarry_Run, - ANIM_WorldParakarry_Run, - ANIM_WorldParakarry_Idle, - ANIM_WorldParakarry_Idle, - ANIM_WorldParakarry_Still, - ANIM_WorldParakarry_Still, - ANIM_WorldParakarry_Idle, - ANIM_WorldParakarry_Idle, - ANIM_WorldParakarry_Idle, - ANIM_WorldParakarry_Idle, - ANIM_WorldParakarry_Idle, - ANIM_WorldParakarry_Idle, - ANIM_WorldParakarry_Idle, - ANIM_WorldParakarry_Idle, - }, - }, -}; - -NpcGroupList N(npcGroupList_80246834) = { - NPC_GROUP(N(npcGroup_80246264)), - {}, -}; - -static s32 N(pad_684C) = { - 0x00000000, -}; - -EvtScript N(80246850) = { - EVT_SETF(LVar1, LVar0) - EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) - EVT_DIVF(LVar1, EVT_FLOAT(100.0)) - EVT_SETF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_IF_GT(LVar2, 100) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(ScaleGroup, 74, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 89, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 91, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 93, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 95, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 97, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 99, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 101, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 103, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 105, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 107, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 109, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 111, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 113, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 115, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 117, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, 119, LVar1, 1, LVar1) - EVT_CALL(TranslateGroup, 74, 0, LVar0, 0) - EVT_CALL(TranslateModel, 89, 0, LVar0, 0) - EVT_CALL(TranslateModel, 91, 0, LVar0, 0) - EVT_CALL(TranslateModel, 93, 0, LVar0, 0) - EVT_CALL(TranslateModel, 95, 0, LVar0, 0) - EVT_CALL(TranslateModel, 97, 0, LVar0, 0) - EVT_CALL(TranslateModel, 99, 0, LVar0, 0) - EVT_CALL(TranslateModel, 101, 0, LVar0, 0) - EVT_CALL(TranslateModel, 103, 0, LVar0, 0) - EVT_CALL(TranslateModel, 105, 0, LVar0, 0) - EVT_CALL(TranslateModel, 107, 0, LVar0, 0) - EVT_CALL(TranslateModel, 109, 0, LVar0, 0) - EVT_CALL(TranslateModel, 111, 0, LVar0, 0) - EVT_CALL(TranslateModel, 113, 0, LVar0, 0) - EVT_CALL(TranslateModel, 115, 0, LVar0, 0) - EVT_CALL(TranslateModel, 117, 0, LVar0, 0) - EVT_CALL(TranslateModel, 119, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, 74, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 89, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 91, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 93, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 95, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 97, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 99, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 101, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 103, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 105, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 107, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 109, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 111, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 113, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 115, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 117, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, 119, LVar1, 0, 1, 0) - EVT_CALL(TranslateModel, 89, EVT_FLOAT(8.1220703125), EVT_FLOAT(56.1533203125), EVT_FLOAT(1.166015625)) - EVT_CALL(TranslateModel, 91, EVT_FLOAT(-6.8779296875), EVT_FLOAT(91.1533203125), EVT_FLOAT(1.166015625)) - EVT_CALL(TranslateModel, 93, EVT_FLOAT(13.1220703125), EVT_FLOAT(106.1533203125), EVT_FLOAT(1.166015625)) - EVT_CALL(TranslateModel, 95, EVT_FLOAT(-9.8779296875), EVT_FLOAT(136.1533203125), EVT_FLOAT(1.166015625)) - EVT_CALL(TranslateModel, 97, EVT_FLOAT(-7.8779296875), EVT_FLOAT(201.1533203125), EVT_FLOAT(1.166015625)) - EVT_CALL(TranslateModel, 99, EVT_FLOAT(13.1220703125), EVT_FLOAT(221.1533203125), EVT_FLOAT(1.166015625)) - EVT_CALL(TranslateModel, 101, EVT_FLOAT(8.126953125), EVT_FLOAT(261.2294921875), EVT_FLOAT(1.166015625)) - EVT_CALL(TranslateModel, 103, EVT_FLOAT(-12.8779296875), EVT_FLOAT(266.1533203125), EVT_FLOAT(1.166015625)) - EVT_CALL(TranslateModel, 105, EVT_FLOAT(8.1220703125), EVT_FLOAT(316.1533203125), EVT_FLOAT(-13.833984375)) - EVT_CALL(TranslateModel, 107, EVT_FLOAT(-10.943359375), EVT_FLOAT(391.1533203125), EVT_FLOAT(10.56640625)) - EVT_CALL(TranslateModel, 109, EVT_FLOAT(-7.001953125), EVT_FLOAT(456.1533203125), EVT_FLOAT(0.947265625)) - EVT_CALL(TranslateModel, 111, EVT_FLOAT(12.998046875), EVT_FLOAT(471.1533203125), EVT_FLOAT(0.947265625)) - EVT_CALL(TranslateModel, 113, EVT_FLOAT(-10.001953125), EVT_FLOAT(501.1533203125), EVT_FLOAT(0.947265625)) - EVT_CALL(TranslateModel, 115, EVT_FLOAT(8.0029296875), EVT_FLOAT(536.2294921875), EVT_FLOAT(0.947265625)) - EVT_CALL(TranslateModel, 117, EVT_FLOAT(12.998046875), EVT_FLOAT(586.1533203125), EVT_FLOAT(0.947265625)) - EVT_CALL(TranslateModel, 119, EVT_FLOAT(-13.001953125), EVT_FLOAT(631.1533203125), EVT_FLOAT(0.947265625)) - EVT_SETF(LVar1, LVar0) - EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) - EVT_DIVF(LVar1, EVT_FLOAT(300.0)) - EVT_SETF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_IF_GT(LVar2, 100) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(ScaleModel, 89, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 91, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 93, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 95, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 97, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 99, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 101, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 103, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 105, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 107, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 109, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 111, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 113, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 115, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 117, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, 119, LVar1, LVar1, LVar1) - EVT_CALL(TranslateModel, 89, EVT_FLOAT(-8.12109375), EVT_FLOAT(-56.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, 91, EVT_FLOAT(6.87890625), EVT_FLOAT(-91.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, 93, EVT_FLOAT(-13.12109375), EVT_FLOAT(-106.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, 95, EVT_FLOAT(9.87890625), EVT_FLOAT(-136.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, 97, EVT_FLOAT(7.87890625), EVT_FLOAT(-201.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, 99, EVT_FLOAT(-13.12109375), EVT_FLOAT(-221.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, 101, EVT_FLOAT(-8.1259765625), EVT_FLOAT(-261.228515625), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, 103, EVT_FLOAT(12.87890625), EVT_FLOAT(-266.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, 105, EVT_FLOAT(-8.12109375), EVT_FLOAT(-316.15234375), EVT_FLOAT(13.8349609375)) - EVT_CALL(TranslateModel, 107, EVT_FLOAT(10.9443359375), EVT_FLOAT(-391.15234375), EVT_FLOAT(-10.5654296875)) - EVT_CALL(TranslateModel, 109, EVT_FLOAT(7.0029296875), EVT_FLOAT(-456.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, 111, EVT_FLOAT(-12.9970703125), EVT_FLOAT(-471.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, 113, EVT_FLOAT(10.0029296875), EVT_FLOAT(-501.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, 115, EVT_FLOAT(-8.001953125), EVT_FLOAT(-536.228515625), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, 117, EVT_FLOAT(-12.9970703125), EVT_FLOAT(-586.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, 119, EVT_FLOAT(13.0029296875), EVT_FLOAT(-631.15234375), EVT_FLOAT(-0.9462890625)) - EVT_RETURN - EVT_END -}; - -EvtScript N(80247488) = { - EVT_SETF(LVar1, LVar0) - EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) - EVT_DIVF(LVar1, EVT_FLOAT(100.0)) - EVT_SETF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_IF_GT(LVar2, 100) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(ScaleGroup, 79, LVar1, 1, LVar1) - EVT_CALL(TranslateGroup, 79, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, 79, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80247588) = { - EVT_CALL(TranslateModel, 83, EVT_FLOAT(9.5), EVT_FLOAT(12.0), EVT_FLOAT(15.0)) - EVT_CALL(TranslateModel, 85, EVT_FLOAT(-9.5), EVT_FLOAT(12.0), EVT_FLOAT(15.0)) - EVT_CALL(TranslateModel, 87, EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(17.0)) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(90.0)) - EVT_CALL(RotateModel, 83, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, 85, LVar1, 0, 0, 1) - EVT_CALL(TranslateModel, 83, EVT_FLOAT(-9.5), EVT_FLOAT(-12.0), EVT_FLOAT(-15.0)) - EVT_CALL(TranslateModel, 85, EVT_FLOAT(9.5), EVT_FLOAT(-12.0), EVT_FLOAT(-15.0)) - EVT_CALL(TranslateModel, 87, EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(-17.0)) - EVT_CALL(ScaleModel, 83, LVar0, LVar0, LVar0) - EVT_CALL(ScaleModel, 85, LVar0, LVar0, LVar0) - EVT_CALL(ScaleModel, 87, LVar0, LVar0, LVar0) - EVT_RETURN - EVT_END -}; - -EvtScript N(802476F4) = { - EVT_CALL(ScaleModel, 81, LVar0, LVar0, LVar0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(90.0)) - EVT_ADDF(LVar1, EVT_FLOAT(-90.0)) - EVT_CALL(RotateModel, 81, LVar1, 1, 0, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80247770) = { - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-3.0)) - EVT_CALL(TranslateModel, 81, EVT_FLOAT(-0.26), LVar0, EVT_FLOAT(1.4775390625)) - EVT_CALL(RotateModel, 81, LVar1, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, 46) - EVT_RETURN - EVT_END -}; - -extern const char N(flo_19_name_hack)[]; - -EvtScript N(802477EC) = { - EVT_IF_EQ(AreaFlag(44), 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(15) - EVT_CALL(DisablePartnerAI, 0) - EVT_SET(AreaFlag(44), 1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 47, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 48, 0x7FFFFE00) - EVT_SET(LVar9, EVT_FLOAT(-59.0)) - EVT_SET(LVarA, EVT_FLOAT(22.0)) - EVT_SET(LVarB, EVT_FLOAT(125.0)) - EVT_SET(LVarC, EVT_FLOAT(-55.0)) - EVT_SET(LVarD, EVT_FLOAT(24.0)) - EVT_SET(LVarE, EVT_FLOAT(145.0)) - EVT_CALL(PlayerMoveTo, LVar9, LVarB, 8) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) - EVT_CALL(PlaySound, 0x19C) - EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, 0x000106) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking) - EVT_CALL(N(func_80240F10_C9EE30), LVar3, LVar4) - EVT_SWITCH(LVar4) - EVT_CASE_LT(90) - EVT_SET(AreaFlag(16), 0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_GE(270) - EVT_SET(AreaFlag(16), 1) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_CALL(TranslateModel, 81, EVT_FLOAT(-0.26), EVT_FLOAT(2.0), EVT_FLOAT(1.4775390625)) - EVT_CALL(UpdateColliderTransform, 46) - EVT_SET(MapVar(10), 0) - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(0) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, 700, 800, 0, 0) - EVT_EXEC(N(80247770)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(func_80240F80_C9EEA0)) - EVT_CALL(N(func_802410B4_C9EFD4)) - EVT_IF_EQ(LVarF, 350) - EVT_SET(MapVar(10), 1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(MapVar(10), 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR(N(flo_19_name_hack)), 3) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80247BCC) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerActionState, 10) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 47, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 48, 0x7FFFFE00) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_SET(LVar9, EVT_FLOAT(-59.0)) - EVT_SET(LVarA, EVT_FLOAT(22.0)) - EVT_SET(LVarB, EVT_FLOAT(125.0)) - EVT_SET(LVarC, EVT_FLOAT(-55.0)) - EVT_SET(LVarD, EVT_FLOAT(23.0)) - EVT_SET(LVarE, EVT_FLOAT(145.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, 0x000106) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking) - EVT_SWITCH(AreaFlag(16)) - EVT_CASE_EQ(0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_EQ(1) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(TranslateModel, 81, EVT_FLOAT(-0.26), EVT_FLOAT(2.0), EVT_FLOAT(1.4775390625)) - EVT_CALL(UpdateColliderTransform, 46) - EVT_SET(LVarF, 0) - EVT_LOOP(120) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 70, 0, 120, 0, 0) - EVT_EXEC(N(80247770)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(func_80240F80_C9EEA0)) - EVT_CALL(N(func_802410B4_C9EFD4)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnablePartnerAI) - EVT_CALL(ClearPartnerMoveHistory, -4) - EVT_CALL(SetPlayerJumpscale, 1) - EVT_CALL(PlayerJump, 10, 0, 110, 20) - EVT_CALL(SetPlayerActionState, 10) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(5) - EVT_CALL(ModifyColliderFlags, 1, 47, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, 1, 48, 0x7FFFFE00) - EVT_SET(AreaFlag(44), 0) - EVT_CALL(StopSound, 413) - EVT_EXEC_WAIT(N(802414D0)) - EVT_CALL(ResetCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(80247FAC) = { - EVT_CALL(PlaySoundAtCollider, 47, 411, 0) - EVT_SET(LVarF, 0) - EVT_LOOP(100) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, EVT_FLOAT(1.0), 100, 0, 0) - EVT_EXEC(N(80247588)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(MapVar(10), 0) - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(1200) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -700, 0, 1200, 0, 0) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(80246850)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(80247488)) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(200) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A) - EVT_CASE_EQ(250) - EVT_SET(LVar0, -60) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 65) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(12.5), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, 0, 800) - EVT_CALL(SetCamPosA, 0, -200, 0) - EVT_CALL(SetCamPosB, 0, 0, -300) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_IF_GT(LVarF, 550) - EVT_SET(MapVar(10), 1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(MapVar(10), 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(FadeInMusic, 0, 50, 0, 3000, 0, 127) - EVT_CALL(FadeOutMusic, 1, 3000) - EVT_CALL(GotoMap, EVT_PTR(N(flo_19_name_hack)), 2) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024834C) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpPlayerYaw, 200, 0) - EVT_CALL(SetPlayerPos, -60, 0, 30) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 1) - EVT_CALL(SetNpcPos, NPC_PARTNER, -20, 0, 10) - EVT_SET(LVar0, -60) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 65) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(12.5), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, 0, 800) - EVT_CALL(SetCamPosA, 0, -200, 0) - EVT_CALL(SetCamPosB, 0, 0, -300) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_SET(LVarF, 0) - EVT_LOOP(5) - EVT_ADD(LVarF, 20) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.0), EVT_FLOAT(1.0), 100, 0, 0) - EVT_EXEC(N(802476F4)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, 1, 46, 0x7FFFFE00) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000A, 0, 50, -200) - EVT_CALL(ResetCam, 0, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -s32 N(itemList_80248598)[] = { - ITEM_FERTILE_SOIL, - ITEM_MAGICAL_BEAN, - ITEM_MIRACLE_WATER, - ITEM_NONE, -}; - -EvtScript N(802485A8) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802D2884, -85, 85, 0) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_IF_EQ(GF_FLO00_PlacedFertileSoil, 0) - EVT_SET_GROUP(0) - EVT_CALL(SetTimeFreezeMode, 1) - EVT_LABEL(10) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_LE(0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, 0) - EVT_CALL(AwaitPlayerLeave, -85, 85, 28) - EVT_RETURN - EVT_CASE_EQ(89) - EVT_CALL(SetPlayerAnimation, 393222) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, ITEM_FERTILE_SOIL, -83, 0, 87, 1, 0) - EVT_SET(MapVar(11), LVar0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_WAIT(20) - EVT_CASE_DEFAULT - EVT_SWITCH(AreaFlag(17)) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) - EVT_SET(AreaFlag(17), 1) - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_IF_NE(LVar2, 89) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(GF_FLO00_PlacedFertileSoil, 1) - EVT_END_IF - EVT_IF_EQ(GF_FLO00_PlacedMagicalBean, 0) - EVT_SET_GROUP(0) - EVT_CALL(SetTimeFreezeMode, 1) - EVT_LABEL(20) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_LE(0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, 0) - EVT_CALL(AwaitPlayerLeave, -85, 85, 28) - EVT_RETURN - EVT_CASE_EQ(88) - EVT_CALL(RemoveItemEntity, MapVar(11)) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, 393222) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, ITEM_MAGICAL_BEAN, -83, 0, 87, 1, 0) - EVT_SET(MapVar(11), LVar0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_WAIT(20) - EVT_CASE_DEFAULT - EVT_SWITCH(AreaFlag(17)) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) - EVT_SET(AreaFlag(17), 1) - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_IF_NE(LVar2, 88) - EVT_GOTO(20) - EVT_END_IF - EVT_SET(GF_FLO00_PlacedMagicalBean, 1) - EVT_END_IF - EVT_SET_GROUP(0) - EVT_CALL(SetTimeFreezeMode, 1) - EVT_LABEL(30) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_LE(0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, 0) - EVT_CALL(AwaitPlayerLeave, -85, 85, 28) - EVT_RETURN - EVT_CASE_EQ(90) - EVT_CALL(RemoveItemEntity, MapVar(11)) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, 393222) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(N(SyncStatusMenu)) - EVT_CALL(MakeItemEntity, ITEM_MIRACLE_WATER, -83, 0, 87, 1, 0) - EVT_SET(MapVar(11), LVar0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_WAIT(30) - EVT_CALL(RemoveItemEntity, MapVar(11)) - EVT_WAIT(30) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 47, 0x7FFFFE00) - EVT_CALL(PlayerMoveTo, -60, 30, 20) - EVT_CALL(ModifyColliderFlags, 1, 47, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, 1, 48, 0x7FFFFE00) - EVT_CALL(InterpPlayerYaw, 200, 0) - EVT_CALL(func_802CF56C, 2) - EVT_WAIT(60) - EVT_CALL(FadeInMusic, 1, 123, 0, 3000, 0, 127) - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_CALL(UseSettingsFrom, 0, -85, 0, 75) - EVT_CALL(SetPanTarget, 0, -85, 0, 75) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(1.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamDistance, 0, 250) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(80247FAC)) - EVT_END_SWITCH - EVT_IF_NE(LVar2, 90) - EVT_GOTO(30) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80248D3C) = { - EVT_LABEL(0) - EVT_CALL(IsPlayerWithin, -85, 85, 20, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_ELSE - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetCurrentPartner, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(N(func_8024139C_C9F2BC)) - EVT_EXEC_WAIT(N(802485A8)) - EVT_CALL(N(func_802413BC_C9F2DC)) - EVT_RETURN - EVT_END -}; - -EvtScript N(80248E30) = { - EVT_IF_LT(GB_StoryProgress, 55) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(GB_StoryProgress, 54) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_EQ(GF_FLO00_PlacedFertileSoil, 1) - EVT_IF_EQ(GF_FLO00_PlacedMagicalBean, 0) - EVT_CALL(MakeItemEntity, ITEM_FERTILE_SOIL, -83, 0, 87, 1, 0) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_MAGICAL_BEAN, -83, 0, 87, 1, 0) - EVT_END_IF - EVT_SET(MapVar(11), LVar0) - EVT_END_IF - EVT_BIND_PADLOCK(N(80248D3C), 0x10, 0, EVT_PTR(N(itemList_80248598)), 0, 1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80248F48) = { - EVT_BIND_TRIGGER(N(802477EC), TRIGGER_FLOOR_TOUCH, 46, 1, 0) - EVT_CALL(EnableGroup, 121, 1) - EVT_CALL(EnableGroup, 80, 1) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(54) - EVT_SET(LVar0, -700) - EVT_EXEC(N(80246850)) - EVT_EXEC(N(80247488)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(80247588)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(802476F4)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 46, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 47, 0x7FFFFE00) - EVT_CASE_GE(55) - EVT_SET(LVar0, 1) - EVT_EXEC(N(80247588)) - EVT_SET(LVar0, 1) - EVT_EXEC(N(802476F4)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, -700) - EVT_EXEC(N(80246850)) - EVT_EXEC(N(80247488)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(80247588)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(802476F4)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 46, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 47, 0x7FFFFE00) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -static s32 N(pad_9128)[] = { - 0x00000000, 0x00000000, -}; - -EvtScript N(makeEntities) = { - EVT_IF_LT(GB_StoryProgress, 96) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 110, 60, -100, 0, 0x80000000) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -#include "world/common/enemy/ai/PatrolNoAttackAI.inc.c" - -ApiStatus N(PostChapter6StatUpdate)(Evt* script, s32 isInitialCall) { - PlayerData* playerData = &gPlayerData; - - set_max_SP(6); - playerData->curHP = playerData->curMaxHP; - playerData->curFP = playerData->curMaxFP; - sync_status_menu(); - return ApiStatus_DONE2; -} - -const char N(flo_07_name_hack)[] = "flo_07"; -const s32 N(pad_XXX)[] = { 0, 0 }; -const char N(sam_11_name_hack)[] = "sam_11"; -const char N(flo_19_name_hack)[] = "flo_19"; diff --git a/src/world/area_flo/flo_00/C9EE30.c b/src/world/area_flo/flo_00/C9EE30.c deleted file mode 100644 index 3ffe7f4ab9..0000000000 --- a/src/world/area_flo/flo_00/C9EE30.c +++ /dev/null @@ -1,55 +0,0 @@ -#include "flo_00.h" - -ApiStatus N(func_80240F10_C9EE30)(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 var1 = *args++; - s32 var2 = *args++; - - evt_set_variable(script, var1, gPlayerStatus.spriteFacingAngle); - evt_set_variable(script, var2, gPlayerStatus.targetYaw); - - return ApiStatus_DONE2; -} - -ApiStatus N(func_80240F80_C9EEA0)(Evt* script, s32 isInitialCall) { - f32 var1 = evt_get_variable(NULL, script->varTable[2]); - f32 dist = dist2D(-83.0f, 87.0f, script->varTable[9], script->varTable[11]); - f32 clamped = clamp_angle(atan2(-83.0f, 87.0f, script->varTable[9], script->varTable[11]) - var1); - - var1 = sin_deg(clamped); - gPlayerStatus.position.x = (dist * var1) + -83.0f; - gPlayerStatus.position.y = evt_get_variable(NULL, script->varTable[10]) + evt_get_variable(NULL, script->varTable[3]); - var1 = cos_deg(clamped); - gPlayerStatus.position.z = 87.0f - (dist * var1); - - return ApiStatus_DONE2; -} - -ApiStatus N(func_802410B4_C9EFD4)(Evt* script, s32 isInitialCall) { - Npc* npc = get_npc_by_index(0); - f32 temp_f20 = evt_get_variable(NULL, script->varTable[2]); - f32 dist = dist2D(-83.0f, 87.0f, script->varTable[12], script->varTable[14]); - f32 clamped = clamp_angle(atan2(-83.0f, 87.0f, script->varTable[12], script->varTable[14]) - temp_f20); - - temp_f20 = sin_deg(clamped); - npc->pos.x = (dist * temp_f20) + -83.0f; - npc->pos.y = evt_get_variable(NULL, script->varTable[13]) + evt_get_variable(NULL, script->varTable[3]); - temp_f20 = cos_deg(clamped); - npc->pos.z = 87.0f - (dist * temp_f20); - - return ApiStatus_DONE2; -} - -#include "common/CosInterpMinMax.inc.c" - -#include "world/common/todo/SyncStatusMenu.inc.c" - -ApiStatus N(func_8024139C_C9F2BC)(Evt* script, s32 isInitialCall) { - increment_status_menu_disabled(); - return ApiStatus_DONE2; -} - -ApiStatus N(func_802413BC_C9F2DC)(Evt* script, s32 isInitialCall) { - decrement_status_menu_disabled(); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_00/flo_00.h b/src/world/area_flo/flo_00/flo_00.h index 015457c082..7e2c64c900 100644 --- a/src/world/area_flo/flo_00/flo_00.h +++ b/src/world/area_flo/flo_00/flo_00.h @@ -2,34 +2,50 @@ /// @brief Flower Fields - Center #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_00_shape.h" +#include "mapfs/flo_00_hit.h" + +#include "sprite/npc/Lakilulu.h" +#include "sprite/npc/WorldLakilester.h" +#include "sprite/npc/WorldParakarry.h" + +enum { + NPC_Dummy_Wisterwood = 0, + NPC_Bubulb_01 = 1, + NPC_Bubulb_02 = 2, + NPC_Bubulb_03 = 3, + NPC_Bubulb_04 = 4, + NPC_Tolielup = 5, + NPC_Klevar = 6, + NPC_Lakilulu = 7, + NPC_Lakilester_Epilogue = 0, + NPC_Lakilulu_Epilogue = 1, + NPC_Parakarry_Epilogue = 2, +}; + +enum { + MV_BeanstalkSceneSync = MapVar(10), + MV_BeanstalkItemEntity = MapVar(11), +}; + #define NAMESPACE flo_00 -ApiStatus N(SyncStatusMenu)(Evt* script, s32 isInitialCall); -ApiStatus N(PostChapter6StatUpdate)(Evt* script, s32 isInitialCall); -ApiStatus N(CosInterpMinMax)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240000_C9DF20)(Evt* script, s32 isInitialCall); -ApiStatus N(PatrolNoAttackAI_Main)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240ED0_C9EDF0)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240F10_C9EE30)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240F80_C9EEA0)(Evt* script, s32 isInitialCall); -ApiStatus N(func_802410B4_C9EFD4)(Evt* script, s32 isInitialCall); -ApiStatus N(func_802411EC_C9F10C)(Evt* script, s32 isInitialCall); -ApiStatus N(func_8024137C_C9F29C)(Evt* script, s32 isInitialCall); -ApiStatus N(func_8024139C_C9F2BC)(Evt* script, s32 isInitialCall); -ApiStatus N(func_802413BC_C9F2DC)(Evt* script, s32 isInitialCall); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_Scene_Epilogue); +extern EvtScript N(EVS_Interact_Wisterwood); +extern EvtScript N(EVS_Wisterwood_Exit); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_MakeEntities); -extern NpcGroupList N(npcGroupList_80245DE4); -extern NpcGroupList N(npcGroupList_80246834); -extern EvtScript N(80242998); -extern EvtScript N(80242FCC); -extern EvtScript N(80245EB8); -extern EvtScript N(80247BCC); -extern EvtScript N(8024834C); -extern EvtScript N(80248E30); -extern EvtScript N(80248F48); -extern EvtScript N(main); -extern EvtScript N(makeEntities); +extern EvtScript N(EVS_Scene_SunReturns); +extern EvtScript N(EVS_SetupBeanPatch); +extern EvtScript N(EVS_SetupBeanstalk); +extern EvtScript N(EVS_Enter_Beanstalk); +extern EvtScript N(EVS_Scene_BeanstalkGrewRemark); + +extern NpcGroupList N(DefaultNPCs); +extern NpcGroupList N(EpilogueNPCs); diff --git a/src/world/area_flo/flo_00/flo_00_0_header.c b/src/world/area_flo/flo_00/flo_00_0_header.c new file mode 100644 index 0000000000..665c7cd865 --- /dev/null +++ b/src/world/area_flo/flo_00/flo_00_0_header.c @@ -0,0 +1,23 @@ +#include "flo_00.h" + +EntryList N(Entrances) = { + [flo_00_ENTRY_0] { 0.0, 0.0, -310.0, 170.0 }, + [flo_00_ENTRY_1] { -320.0, 0.0, -335.0, 135.0 }, + [flo_00_ENTRY_2] { -470.0, 0.0, 0.0, 90.0 }, + [flo_00_ENTRY_3] { -320.0, 0.0, 335.0, 45.0 }, + [flo_00_ENTRY_4] { 320.0, 0.0, -335.0, 225.0 }, + [flo_00_ENTRY_5] { 465.0, 0.0, 0.0, 270.0 }, + [flo_00_ENTRY_6] { 320.0, 0.0, 335.0, 315.0 }, + [flo_00_ENTRY_7] { -30.0, 0.0, 120.0, 270.0 }, + [flo_00_ENTRY_8] { -30.0, 0.0, 120.0, 270.0 }, + [flo_00_ENTRY_9] { -470.0, 0.0, 0.0, 90.0 }, + [flo_00_ENTRY_A] { 40.0, 0.0, -30.0, 270.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_00 }, +}; diff --git a/src/world/area_flo/flo_00/flo_00_1_music.c b/src/world/area_flo/flo_00/flo_00_1_music.c new file mode 100644 index 0000000000..e85365b7c3 --- /dev/null +++ b/src/world/area_flo/flo_00/flo_00_1_music.c @@ -0,0 +1,37 @@ +#include "flo_00.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_CALL(GetEntryID, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(flo_00_ENTRY_8) + EVT_IF_NE(AF_FLO_RidingBeanstalk, FALSE) + EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) + EVT_ELSE + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_IF + EVT_CASE_EQ(flo_00_ENTRY_9) + EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + EVT_CASE_EQ(flo_00_ENTRY_A) + EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) + EVT_THREAD + EVT_LOOP(0) + EVT_WAIT(1) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_THREAD + EVT_CASE_EQ(flo_00_ENTRY_B) + EVT_CALL(FadeInMusic, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 3000, 0, 127) + EVT_CASE_DEFAULT + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_00/flo_00_2_main.c b/src/world/area_flo/flo_00/flo_00_2_main.c new file mode 100644 index 0000000000..26ba34dd09 --- /dev/null +++ b/src/world/area_flo/flo_00/flo_00_2_main.c @@ -0,0 +1,219 @@ +#include "flo_00.h" +#include "effects.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_Wisterwood_Exit) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(PlayerMoveTo, 30, -170, 10) + EVT_CALL(InterpPlayerYaw, 0, 0) + EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_1CF, 0) + EVT_CALL(MakeLerp, 0, -100, 20, EASING_QUADRATIC_OUT) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(func_802D2C14, 1) + EVT_CALL(PlayerMoveTo, 0, -310, 30) + EVT_CALL(func_802D2C14, 0) + EVT_IF_EQ(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) + EVT_SET(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) + EVT_END_IF + EVT_CALL(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_1D0, 0) + EVT_CALL(GotoMap, EVT_PTR("mac_01"), mac_01_ENTRY_5) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Wisterwood_Enter) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(InterpPlayerYaw, 180, 0) + EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_1CF, 0) + EVT_CALL(MakeLerp, 0, -100, 30, EASING_QUADRATIC_IN) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(func_802D2C14, 1) + EVT_CALL(PlayerMoveTo, 0, -135, 30) + EVT_CALL(func_802D2C14, 0) + EVT_CALL(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_1D0, 0) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_ExitWalk_flo_14_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_1, "flo_14", flo_14_ENTRY_0); +EvtScript N(EVS_ExitWalk_flo_23_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_2, "flo_23", flo_23_ENTRY_0); +EvtScript N(EVS_ExitWalk_flo_25_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_3, "flo_25", flo_25_ENTRY_0); +EvtScript N(EVS_ExitWalk_flo_16_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_4, "flo_16", flo_16_ENTRY_0); +EvtScript N(EVS_ExitWalk_flo_09_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_5, "flo_09", flo_09_ENTRY_0); +EvtScript N(EVS_ExitWalk_flo_08_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_6, "flo_08", flo_08_ENTRY_0); + +MAP_RODATA_PAD(1, exits) + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_25_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_EnterMap) = { + EVT_CALL(GetLoadType, LVar1) + EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) + EVT_EXEC(EnterSavePoint) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_ELSE + EVT_CALL(GetEntryID, LVar0) + EVT_IF_NE(LVar0, flo_00_ENTRY_8) + EVT_SET(AF_FLO_RidingBeanstalk, FALSE) + EVT_END_IF + EVT_SWITCH(LVar0) + EVT_CASE_EQ(flo_00_ENTRY_0) + EVT_THREAD + EVT_EXEC_WAIT(N(EVS_Wisterwood_Enter)) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_END_THREAD + EVT_CASE_RANGE(flo_00_ENTRY_1, flo_00_ENTRY_6) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_CASE_EQ(flo_00_ENTRY_7) + EVT_THREAD + EVT_EXEC_WAIT(N(EVS_Scene_BeanstalkGrewRemark)) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_END_THREAD + EVT_CASE_EQ(flo_00_ENTRY_8) + EVT_THREAD + EVT_EXEC_WAIT(N(EVS_Enter_Beanstalk)) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_END_THREAD + EVT_CASE_EQ(flo_00_ENTRY_9) + EVT_EXEC(N(EVS_Scene_SunReturns)) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_CASE_EQ(flo_00_ENTRY_A) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_CASE_EQ(flo_00_ENTRY_B) + EVT_EXEC(N(EVS_Scene_Epilogue)) + EVT_END_SWITCH + EVT_END_IF + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_Wisterwood)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_SET(GF_MAP_FlowerFields, TRUE) + EVT_IF_LT(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + EVT_END_IF + EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE) + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_00_ENTRY_B) + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs))) + EVT_ELSE + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_END_IF + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_CALL(ParentColliderToModel, COLLIDER_o240, MODEL_o142) + EVT_EXEC(N(EVS_SetupBeanstalk)) + EVT_EXEC(N(EVS_SetupBeanPatch)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o363, SURFACE_TYPE_FLOWERS) + EVT_FLOWER_SPAWN_REGION( 150, -270, 410, 170, 0) + EVT_FLOWER_SPAWN_REGION( 115, -450, 250, -270, 0) + EVT_FLOWER_SPAWN_REGION( -330, 220, 45, 410, 0) + EVT_FLOWER_SPAWN_REGION( -420, -260, -140, 160, 0) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitne, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitsw, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) + EVT_EXEC(N(EVS_EnterMap)) + EVT_CALL(GetLoadType, LVar1) + EVT_IF_NE(LVar1, LOAD_FROM_FILE_SELECT) + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_00_ENTRY_A) + EVT_WAIT(65) + EVT_END_IF + EVT_END_IF + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + // thread to manage wisterwood blinking + EVT_THREAD + EVT_CALL(EnableTexPanning, MODEL_o47, TRUE) + EVT_SET(LVar0, 0) + EVT_LABEL(0) + EVT_CALL(RandInt, 300, LVar1) + EVT_ADD(LVar1, 100) + EVT_CALL(RandInt, 1, LVar2) + EVT_ADD(LVar2, 1) + EVT_WAIT(LVar1) + EVT_LOOP(LVar2) + EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) + EVT_WAIT(2) + EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) + EVT_WAIT(2) + EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x18000, 0) + EVT_CALL(RandInt, 5, LVar3) + EVT_ADD(LVar3, 2) + EVT_WAIT(LVar3) + EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) + EVT_WAIT(2) + EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) + EVT_WAIT(2) + EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, 0, 0) + EVT_CALL(RandInt, 5, LVar3) + EVT_ADD(LVar3, 2) + EVT_WAIT(LVar3) + EVT_END_LOOP + EVT_GOTO(0) + EVT_END_THREAD + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_00/flo_00_3_npc.c b/src/world/area_flo/flo_00/flo_00_3_npc.c new file mode 100644 index 0000000000..273522f640 --- /dev/null +++ b/src/world/area_flo/flo_00/flo_00_3_npc.c @@ -0,0 +1,798 @@ +#include "flo_00.h" + +NpcSettings N(NpcSettings_Dummy) = { + .height = 24, + .radius = 24, + .level = 99, +}; + +#include "world/common/npc/Bubulb_Patrol.inc.c" +#include "world/common/npc/Tolielup.inc.c" +#include "world/common/npc/StarSpirit.inc.c" + +API_CALLABLE(N(UpgradeStarPower)) { + set_max_SP(6); + gPlayerData.curHP = gPlayerData.curMaxHP; + gPlayerData.curFP = gPlayerData.curMaxFP; + sync_status_menu(); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_Scene_SunReturns) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 50, 0, -200) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 0, -200) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 700) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-11.0)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, -27, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(20) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00C4, 0, 50, -200) + EVT_WAIT(10) + EVT_CALL(GotoMap, EVT_PTR("flo_07"), flo_07_ENTRY_1) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Wisterwood_Introduction) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, -170) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -170) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_WAIT(75) + EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_0000, 160, 40) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.5)) + EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 12) + EVT_WAIT(10) + EVT_CALL(DisablePartnerAI, 0) + EVT_CALL(InterpPlayerYaw, 270, 0) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) + EVT_WAIT(15) + EVT_CALL(InterpPlayerYaw, 90, 0) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) + EVT_WAIT(15) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-5.8)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_WAIT(15) + EVT_CALL(SpeakToPlayer, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0001) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) + EVT_CALL(InterpPlayerYaw, 350, 0) + EVT_WAIT(15) + EVT_CALL(ContinueSpeech, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0002) + EVT_WAIT(10) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 333) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(9.0), EVT_FLOAT(-22.0)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(EnablePartnerAI) + EVT_CALL(func_802D2C14, 1) + EVT_WAIT(10) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0003, 0, 70, -200) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.5), EVT_FLOAT(-11.8)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 525) + EVT_CALL(SetCamPosA, CAM_DEFAULT, -14, 0) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(10) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007) + EVT_WAIT(20) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0004, 0, 50, -200) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(9.0), EVT_FLOAT(-22.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 333) + EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(10) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0005, 0, 70, -200) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_SET(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + EVT_CALL(func_802D2C14, 0) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Interact_Wisterwood) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_WAIT(2) + EVT_CALL(GetPlayerActionState, LVar3) + EVT_SET(LVar4, 0) + EVT_IF_EQ(LVar3, ACTION_STATE_IDLE) + EVT_ADD(LVar4, 1) + EVT_END_IF + EVT_IF_EQ(LVar3, ACTION_STATE_WALK) + EVT_ADD(LVar4, 1) + EVT_END_IF + EVT_IF_EQ(LVar3, ACTION_STATE_RUN) + EVT_ADD(LVar4, 1) + EVT_END_IF + EVT_IF_EQ(LVar4, 0) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END_IF + EVT_IF_EQ(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0006, 0, 50, -200) + EVT_SET(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END_IF + EVT_IF_LT(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000D, 0, 50, -200) + EVT_CALL(ShowChoice, MSG_Choice_001F) + EVT_WAIT(10) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(0) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) + EVT_CALL(SwitchMessage, MSG_CH6_000E) + EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) + EVT_CALL(SwitchMessage, MSG_CH6_000F) + EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(SwitchMessage, MSG_CH6_0010) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SwitchMessage, MSG_CH6_0011) + EVT_CASE_LT(STORY_CH6_GREW_MAGIC_BEANSTALK) + EVT_CALL(SwitchMessage, MSG_CH6_0007) + EVT_CASE_LT(STORY_CH6_BEGAN_PEACH_MISSION) + EVT_CALL(SwitchMessage, MSG_CH6_0012) + EVT_CASE_DEFAULT + EVT_CALL(SwitchMessage, MSG_CH6_0013) + EVT_END_SWITCH + EVT_CASE_EQ(1) + EVT_CALL(CloseMessage) + EVT_EXEC(N(EVS_Wisterwood_Exit)) + EVT_RETURN + EVT_CASE_EQ(2) + EVT_CALL(CloseMessage) + EVT_END_SWITCH + EVT_ELSE + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0014, 0, 50, -200) + EVT_CALL(ShowChoice, MSG_Choice_001F) + EVT_WAIT(10) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(0) + EVT_CALL(SwitchMessage, MSG_CH6_0015) + EVT_CASE_EQ(1) + EVT_CALL(CloseMessage) + EVT_EXEC(N(EVS_Wisterwood_Exit)) + EVT_RETURN + EVT_CASE_EQ(2) + EVT_CALL(CloseMessage) + EVT_END_SWITCH + EVT_END_IF + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Wisterwood_Farewell) = { + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 600, EVT_FLOAT(21.0), EVT_FLOAT(-12.0)) + EVT_WAIT(20) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000B, 0, 50, -200) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -30) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-25.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(10) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000C, 0, 50, -200) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Wisterwood) = { + EVT_CALL(EnableGroup, MODEL_ha, FALSE) + EVT_CALL(EnableGroup, MODEL_tuta, FALSE) + EVT_CALL(EnableGroup, MODEL_g54, FALSE) + EVT_CALL(SetNpcPos, NPC_SELF, 50, 70, -230) + EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_2, TRUE) + EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) + EVT_IF_LT(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + EVT_EXEC(N(EVS_Wisterwood_Introduction)) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Bubulb1) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0016) + EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0017) + EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0018) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0019) + EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) + EVT_SWITCH(AF_FLO_PinkBubulbDialogueToggle) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001A) + EVT_SET(AF_FLO_PinkBubulbDialogueToggle, TRUE) + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001B) + EVT_SET(AF_FLO_PinkBubulbDialogueToggle, FALSE) + EVT_END_SWITCH + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001C) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Bubulb2) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001D) + EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001E) + EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001F) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0020) + EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) + EVT_SWITCH(AF_FLO_PurpleBubulbDialogueToggle) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0021) + EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, TRUE) + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0022) + EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, FALSE) + EVT_END_SWITCH + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0023) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Bubulb_03) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0024) + EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0025) + EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0026) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0027) + EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) + EVT_SWITCH(AF_FLO_GreenBubulbDialogueToggle) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0028) + EVT_SET(AF_FLO_GreenBubulbDialogueToggle, TRUE) + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0029) + EVT_SET(AF_FLO_GreenBubulbDialogueToggle, FALSE) + EVT_END_SWITCH + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_002A) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Bubulb_04) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002B) + EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002C) + EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002D) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002E) + EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) + EVT_SWITCH(AF_FLO_YellowBubulbDialogueToggle) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_002F) + EVT_SET(AF_FLO_YellowBubulbDialogueToggle, TRUE) + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0030) + EVT_SET(AF_FLO_YellowBubulbDialogueToggle, FALSE) + EVT_END_SWITCH + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0031) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Bubulb_01) = { + EVT_SET(AF_FLO_PinkBubulbDialogueToggle, FALSE) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb1))) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Bubulb_02) = { + EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, FALSE) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb2))) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Bubulb_03) = { + EVT_SET(AF_FLO_GreenBubulbDialogueToggle, FALSE) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb_03))) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Bubulb_04) = { + EVT_SET(AF_FLO_YellowBubulbDialogueToggle, FALSE) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb_04))) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Tolielup) = { + EVT_IF_EQ(GF_FLO00_Met_Tolielup, FALSE) + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), -30, 300, EVT_FLOAT(20.0), EVT_FLOAT(-9.5)) + EVT_SET(GF_FLO00_Met_Tolielup, TRUE) + EVT_END_IF + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) + EVT_SWITCH(AB_FLO_TolielupDialogue) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0035) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_SET(AB_FLO_TolielupDialogue, 1) + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_SET(AB_FLO_TolielupDialogue, 2) + EVT_CASE_EQ(2) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_SET(AB_FLO_TolielupDialogue, 0) + EVT_END_SWITCH + EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) + EVT_SWITCH(AB_FLO_TolielupDialogue) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0036) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_SET(AB_FLO_TolielupDialogue, 1) + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_SET(AB_FLO_TolielupDialogue, 2) + EVT_CASE_EQ(2) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_SET(AB_FLO_TolielupDialogue, 0) + EVT_END_SWITCH + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_SWITCH(AB_FLO_TolielupDialogue) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0037) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_SET(AB_FLO_TolielupDialogue, 1) + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_SET(AB_FLO_TolielupDialogue, 2) + EVT_CASE_EQ(2) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_SET(AB_FLO_TolielupDialogue, 0) + EVT_END_SWITCH + EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) + EVT_SWITCH(AB_FLO_TolielupDialogue) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_SET(AB_FLO_TolielupDialogue, 1) + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_END_SWITCH + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_003A) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EVT_END_SWITCH + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Tolielup) = { + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Tolielup))) + EVT_CALL(SetNpcCollisionSize, NPC_SELF, 65, 50) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcIdle_Klevar) = { + EVT_LOOP(0) + EVT_LOOP(10) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_SUB(LVar1, 1) + EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_WAIT(1) + EVT_END_LOOP + EVT_LOOP(10) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, 1) + EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_WAIT(1) + EVT_END_LOOP + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_RescuedKlevar) = { + EVT_CALL(DisablePartnerAI, 0) + EVT_CALL(func_802CF56C, 2) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_SET(LVar3, LVar0) + EVT_ADD(LVar3, -50) + EVT_SET(LVar4, LVar1) + EVT_ADD(LVar4, 26) + EVT_CALL(SetNpcPos, NPC_Klevar, LVar3, LVar4, LVar2) + EVT_CALL(PlayerFaceNpc, NPC_Klevar, FALSE) + EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Klevar, 0) + EVT_ADD(LVar0, -25) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(475.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -8) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_WAIT(1) + EVT_CALL(WaitForPlayerInputEnabled) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_WAIT(40) + EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D8) + EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -9) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(MakeLerp, 0, 360, 10, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(EnableNpcAI, NPC_Klevar, FALSE) + EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Leap) + EVT_WAIT(20) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_GotItem) + EVT_CALL(PlaySoundAtPlayer, SOUND_139, 0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_SET(LVar3, LVar1) + EVT_ADD(LVar1, 50) + EVT_ADD(LVar2, 10) + EVT_ADD(LVar3, 30) + EVT_LOOP(5) + EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) + EVT_WAIT(6) + EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) + EVT_WAIT(6) + EVT_END_LOOP + EVT_WAIT(20) + EVT_CALL(PlaySoundAtPlayer, SOUND_188, 0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, 20) + EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) + EVT_WAIT(30) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) + EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Idle) + EVT_CALL(EnableNpcAI, NPC_Klevar, TRUE) + EVT_CALL(N(UpgradeStarPower)) + EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0196, 160, 40) + EVT_WAIT(10) + EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(10) + EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D9) + EVT_WAIT(10) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, -25) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(10) + EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00DA) + EVT_CALL(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_40000, TRUE) + EVT_THREAD + EVT_LOOP(25) + EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) + EVT_WAIT(4) + EVT_END_LOOP + EVT_END_THREAD + EVT_THREAD + EVT_SET(LVar2, 0) + EVT_SET(LVar3, 1800) + EVT_CALL(MakeLerp, LVar2, LVar3, 100, EASING_CUBIC_IN) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_THREAD + EVT_THREAD + EVT_CALL(GetNpcPos, NPC_Klevar, LVar2, LVar3, LVar4) + EVT_SET(LVar5, LVar3) + EVT_ADD(LVar5, 180) + EVT_CALL(MakeLerp, LVar3, LVar5, 100, EASING_CUBIC_IN) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(SetNpcPos, NPC_Klevar, LVar2, LVar0, LVar4) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(SetNpcPos, NPC_Klevar, NPC_DISPOSE_LOCATION) + EVT_END_THREAD + EVT_THREAD + EVT_WAIT(15) + EVT_CALL(PlaySoundAtNpc, NPC_Klevar, SOUND_2045, 0) + EVT_END_THREAD + EVT_WAIT(10) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A) + EVT_WAIT(110) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) + EVT_SET(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) + EVT_EXEC_WAIT(N(EVS_Wisterwood_Farewell)) + EVT_CALL(EnablePartnerAI) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Klevar) = { + EVT_CALL(GetLoadType, LVar1) + EVT_IF_NE(LVar1, 1) + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_00_ENTRY_A) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Klevar))) + EVT_EXEC(N(EVS_Scene_RescuedKlevar)) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Lakilulu) = { + EVT_IF_LE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + EVT_ELSE + EVT_CALL(GetCurrentPartnerID, LVar0) + EVT_IF_EQ(LVar0, PARTNER_LAKILESTER) + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + EVT_WAIT(10) + EVT_CALL(DisablePartnerAI, 0) + EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 5, MSG_CH6_0033) + EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldLakilester_Idle) + EVT_CALL(EndSpeech, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5) + EVT_CALL(EnablePartnerAI) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) + EVT_END_IF + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakilulu) = { + EVT_IF_GE(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakilulu))) + EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 28) + EVT_CALL(SetNpcPos, NPC_SELF, -200, 15, -300) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_Wisterwood) = { + .id = NPC_Dummy_Wisterwood, + .settings = &N(NpcSettings_Dummy), + .pos = { -72.0f, 60.0f, -100.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_GRAVITY | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Wisterwood), + .drops = BUBULB_DROPS, + .animations = BUBULB_PINK_ANIMS, +}; + +StaticNpc N(NpcData_Bubulbs)[] = { + { + .id = NPC_Bubulb_01, + .settings = &N(NpcSettings_Bubulb_Patrol), + .pos = { -59.0f, 0.0f, -40.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .init = &N(EVS_NpcInit_Bubulb_01), + .drops = BUBULB_DROPS, + .territory = { + .patrol = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .numPoints = 2, + .points = { + { -59, 0, -40 }, + { -80, 0, -40 }, + }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -59, 0, -40 }, + .detectSize = { 100 }, + } + }, + .animations = BUBULB_PINK_ANIMS, + .tattle = MSG_NpcTattle_FLO_BubulbA, + }, + { + .id = NPC_Bubulb_02, + .settings = &N(NpcSettings_Bubulb_Patrol), + .pos = { 67.0f, 0.0f, 85.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .init = &N(EVS_NpcInit_Bubulb_02), + .drops = BUBULB_DROPS, + .territory = { + .patrol = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .numPoints = 2, + .points = { + { 67, 0, 85 }, + { 97, 0, 85 }, + }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -59, 0, -40 }, + .detectSize = { 100 }, + } + }, + .animations = BUBULB_PURPLE_ANIMS, + .tattle = MSG_NpcTattle_FLO_BubulbB, + }, + { + .id = NPC_Bubulb_03, + .settings = &N(NpcSettings_Bubulb_Patrol), + .pos = { 90.0f, 0.0f, 410.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .init = &N(EVS_NpcInit_Bubulb_03), + .drops = BUBULB_DROPS, + .territory = { + .patrol = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .numPoints = 2, + .points = { + { 90, 0, 410 }, + { 120, 0, 410 }, + }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -59, 0, -40 }, + .detectSize = { 100 }, + } + }, + .animations = BUBULB_GREEN_ANIMS, + .tattle = MSG_NpcTattle_FLO_BubulbC, + }, + { + .id = NPC_Bubulb_04, + .settings = &N(NpcSettings_Bubulb_Patrol), + .pos = { 200.0f, 0.0f, 430.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .init = &N(EVS_NpcInit_Bubulb_04), + .drops = BUBULB_DROPS, + .territory = { + .patrol = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .numPoints = 2, + .points = { + { 200, 0, 430 }, + { 240, 0, 430 }, + }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -59, 0, -40 }, + .detectSize = { 100 }, + } + }, + .animations = BUBULB_YELLOW_ANIMS, + .tattle = MSG_NpcTattle_FLO_BubulbD, + }, +}; + +StaticNpc N(NpcData_Tolielup) = { + .id = NPC_Tolielup, + .settings = &N(NpcSettings_Tolielup), + .pos = { -400.0f, 0.0f, 190.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .init = &N(EVS_NpcInit_Tolielup), + .drops = TOLIELUP_DROPS, + .animations = TOLIELUP_ANIMS, + .tattle = MSG_NpcTattle_Tolielup, +}; + +StaticNpc N(NpcData_Klevar) = { + .id = NPC_Klevar, + .settings = &N(NpcSettings_StarSpirit), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 0, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Klevar), + .drops = KLEVAR_DROPS, + .animations = KLEVAR_ANIMS, +}; + +StaticNpc N(NpcData_Lakilulu) = { + .id = NPC_Lakilulu, + .settings = &N(NpcSettings_Dummy), + .pos = { 198.0f, 0.0f, 363.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Lakilulu), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_Lakilulu_Idle, + .walk = ANIM_Lakilulu_Idle, + .run = ANIM_Lakilulu_Idle, + .chase = ANIM_Lakilulu_Idle, + .anim_4 = ANIM_Lakilulu_Idle, + .anim_5 = ANIM_Lakilulu_Idle, + .death = ANIM_Lakilulu_Idle, + .hit = ANIM_Lakilulu_Idle, + .anim_8 = ANIM_Lakilulu_Idle, + .anim_9 = ANIM_Lakilulu_Idle, + .anim_A = ANIM_Lakilulu_Idle, + .anim_B = ANIM_Lakilulu_Idle, + .anim_C = ANIM_Lakilulu_Idle, + .anim_D = ANIM_Lakilulu_Idle, + .anim_E = ANIM_Lakilulu_Idle, + .anim_F = ANIM_Lakilulu_Idle, + }, + .tattle = MSG_NpcTattle_Lakilulu, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Wisterwood)), + NPC_GROUP(N(NpcData_Bubulbs)), + NPC_GROUP(N(NpcData_Tolielup)), + NPC_GROUP(N(NpcData_Klevar)), + NPC_GROUP(N(NpcData_Lakilulu)), + {} +}; diff --git a/src/world/area_flo/flo_00/flo_00_4_epilogue.c b/src/world/area_flo/flo_00/flo_00_4_epilogue.c new file mode 100644 index 0000000000..648d20631f --- /dev/null +++ b/src/world/area_flo/flo_00/flo_00_4_epilogue.c @@ -0,0 +1,182 @@ +#include "flo_00.h" + +NpcSettings N(NpcSettings_Lakilester_Epilogue) = { + .height = 24, + .radius = 24, + .level = 99, +}; + +NpcSettings N(NpcSettings_Parakarry_Epilogue) = { + .height = 35, + .radius = 24, + .level = 99, + .actionFlags = AI_ACTION_LOOK_AROUND_DURING_LOITER, +}; + +Vec3f N(D_80245E88_CA3DA8)[] = { + { 266.0f, 20.0f, 322.0f }, + { 310.0f, 30.0f, 312.0f }, + { 346.0f, 90.0f, 300.0f }, + { 400.0f, 200.0f, 287.0f }, +}; + +EvtScript N(EVS_Scene_Epilogue) = { + EVT_CALL(SetPlayerPos, -400, 0, 200) + EVT_CALL(SetNpcPos, NPC_PARTNER, -380, 0, 200) + EVT_CALL(func_802CF56C, 2) + EVT_CALL(DisablePartnerAI, 0) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_SET_VEC3(LVar0, 230, 0, 350) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) + EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(35.0)) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(70) + EVT_CALL(InterpNpcYaw, NPC_Lakilester_Epilogue, 90, 0) + EVT_WAIT(10) + EVT_CALL(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Talk) + EVT_WAIT(40) + EVT_CALL(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Idle) + EVT_CALL(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Talk) + EVT_WAIT(40) + EVT_CALL(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Idle) + EVT_CALL(InterpNpcYaw, NPC_Parakarry_Epilogue, 90, 0) + EVT_CALL(NpcFlyTo, NPC_Parakarry_Epilogue, 400, 200, 287, 80, -5, EASING_LINEAR) + EVT_CALL(InterpNpcYaw, NPC_Lakilester_Epilogue, 270, 0) + EVT_WAIT(40) + EVT_CALL(FadeOutMusic, 0, 1000) + EVT_CALL(GotoMap, EVT_PTR("sam_11"), sam_11_ENTRY_2) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakilester_Epilogue) = { + EVT_CALL(SetPlayerPos, -400, 0, 200) + EVT_CALL(SetNpcPos, NPC_PARTNER, -380, 0, 200) + EVT_CALL(SetNpcPos, NPC_Lakilester_Epilogue, 196, 20, 354) + EVT_CALL(SetNpcYaw, NPC_Lakilester_Epilogue, 270) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakilulu_Epilogue) = { + EVT_CALL(SetNpcPos, NPC_Lakilulu_Epilogue, 163, 20, 370) + EVT_CALL(SetNpcYaw, NPC_Lakilulu_Epilogue, 90) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Parakarry_Epilogue) = { + EVT_CALL(SetNpcPos, NPC_Parakarry_Epilogue, 266, 20, 322) + EVT_CALL(SetNpcYaw, NPC_Parakarry_Epilogue, 270) + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_Lakilester_Epilogue)[] = { + { + .id = NPC_Lakilester_Epilogue, + .settings = &N(NpcSettings_Lakilester_Epilogue), + .pos = { 144.0f, 0.0f, 374.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Lakilester_Epilogue), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_WorldLakilester_Idle, + .walk = ANIM_WorldLakilester_Idle, + .run = ANIM_WorldLakilester_Idle, + .chase = ANIM_WorldLakilester_Idle, + .anim_4 = ANIM_WorldLakilester_Idle, + .anim_5 = ANIM_WorldLakilester_Idle, + .death = ANIM_WorldLakilester_Idle, + .hit = ANIM_WorldLakilester_Idle, + .anim_8 = ANIM_WorldLakilester_Idle, + .anim_9 = ANIM_WorldLakilester_Idle, + .anim_A = ANIM_WorldLakilester_Idle, + .anim_B = ANIM_WorldLakilester_Idle, + .anim_C = ANIM_WorldLakilester_Idle, + .anim_D = ANIM_WorldLakilester_Idle, + .anim_E = ANIM_WorldLakilester_Idle, + .anim_F = ANIM_WorldLakilester_Idle, + }, + }, + { + .id = NPC_Lakilulu_Epilogue, + .settings = &N(NpcSettings_Lakilester_Epilogue), + .pos = { 198.0f, 0.0f, 363.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Lakilulu_Epilogue), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_Lakilulu_Idle, + .walk = ANIM_Lakilulu_Idle, + .run = ANIM_Lakilulu_Idle, + .chase = ANIM_Lakilulu_Idle, + .anim_4 = ANIM_Lakilulu_Idle, + .anim_5 = ANIM_Lakilulu_Idle, + .death = ANIM_Lakilulu_Idle, + .hit = ANIM_Lakilulu_Idle, + .anim_8 = ANIM_Lakilulu_Idle, + .anim_9 = ANIM_Lakilulu_Idle, + .anim_A = ANIM_Lakilulu_Idle, + .anim_B = ANIM_Lakilulu_Idle, + .anim_C = ANIM_Lakilulu_Idle, + .anim_D = ANIM_Lakilulu_Idle, + .anim_E = ANIM_Lakilulu_Idle, + .anim_F = ANIM_Lakilulu_Idle, + }, + }, + { + .id = NPC_Parakarry_Epilogue, + .settings = &N(NpcSettings_Parakarry_Epilogue), + .pos = { 266.0f, 0.0f, 322.0f }, + .yaw = 0, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Parakarry_Epilogue), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_WorldParakarry_Idle, + .walk = ANIM_WorldParakarry_Walk, + .run = ANIM_WorldParakarry_Run, + .chase = ANIM_WorldParakarry_Run, + .anim_4 = ANIM_WorldParakarry_Idle, + .anim_5 = ANIM_WorldParakarry_Idle, + .death = ANIM_WorldParakarry_Still, + .hit = ANIM_WorldParakarry_Still, + .anim_8 = ANIM_WorldParakarry_Idle, + .anim_9 = ANIM_WorldParakarry_Idle, + .anim_A = ANIM_WorldParakarry_Idle, + .anim_B = ANIM_WorldParakarry_Idle, + .anim_C = ANIM_WorldParakarry_Idle, + .anim_D = ANIM_WorldParakarry_Idle, + .anim_E = ANIM_WorldParakarry_Idle, + .anim_F = ANIM_WorldParakarry_Idle, + }, + }, +}; + +NpcGroupList N(EpilogueNPCs) = { + NPC_GROUP(N(NpcData_Lakilester_Epilogue)), + {} +}; diff --git a/src/world/area_flo/flo_00/flo_00_5_beanstalk.c b/src/world/area_flo/flo_00/flo_00_5_beanstalk.c new file mode 100644 index 0000000000..e16dfed5a6 --- /dev/null +++ b/src/world/area_flo/flo_00/flo_00_5_beanstalk.c @@ -0,0 +1,668 @@ +#include "flo_00.h" + +#define BEANSTALK_BASE_X -83 +#define BEANSTALK_BASE_Z 87 + +API_CALLABLE(N(GetPlayerAngles)) { + Bytecode* args = script->ptrReadPos; + s32 var1 = *args++; + s32 var2 = *args++; + + evt_set_variable(script, var1, gPlayerStatus.spriteFacingAngle); + evt_set_variable(script, var2, gPlayerStatus.targetYaw); + + return ApiStatus_DONE2; +} + +API_CALLABLE(N(PlayerRideBeanstalk)) { + f32 temp = evt_get_variable(NULL, script->varTable[2]); + f32 dist = dist2D(BEANSTALK_BASE_X, BEANSTALK_BASE_Z, script->varTable[9], script->varTable[11]); + f32 angle = atan2(BEANSTALK_BASE_X, BEANSTALK_BASE_Z, script->varTable[9], script->varTable[11]); + f32 clamped = clamp_angle(angle - temp); + + temp = sin_deg(clamped); + gPlayerStatus.position.x = BEANSTALK_BASE_X + (dist * temp); + gPlayerStatus.position.y = evt_get_variable(NULL, script->varTable[10]) + evt_get_variable(NULL, script->varTable[3]); + temp = cos_deg(clamped); + gPlayerStatus.position.z = BEANSTALK_BASE_Z - (dist * temp); + + return ApiStatus_DONE2; +} + +API_CALLABLE(N(PartnerRideBeanstalk)) { + Npc* npc = get_npc_by_index(NPC_Dummy_Wisterwood); + f32 temp = evt_get_variable(NULL, script->varTable[2]); + f32 dist = dist2D(BEANSTALK_BASE_X, BEANSTALK_BASE_Z, script->varTable[12], script->varTable[14]); + f32 angle = atan2(BEANSTALK_BASE_X, BEANSTALK_BASE_Z, script->varTable[12], script->varTable[14]); + f32 clamped = clamp_angle(angle - temp); + + temp = sin_deg(clamped); + npc->pos.x = BEANSTALK_BASE_X + (dist * temp); + npc->pos.y = evt_get_variable(NULL, script->varTable[13]) + evt_get_variable(NULL, script->varTable[3]); + temp = cos_deg(clamped); + npc->pos.z = BEANSTALK_BASE_Z - (dist * temp); + + return ApiStatus_DONE2; +} + +#include "common/CosInterpMinMax.inc.c" + +#include "world/common/todo/SyncStatusMenu.inc.c" + +API_CALLABLE(N(DisableStatusMenu)) { + increment_status_menu_disabled(); + return ApiStatus_DONE2; +} + +API_CALLABLE(N(EnableStatusMenu)) { + decrement_status_menu_disabled(); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_SetExteriorVineGrowth) = { + EVT_SETF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown) + EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) + EVT_DIVF(LVar1, EVT_FLOAT(100.0)) + EVT_SETF(LVar2, LVar1) + EVT_MULF(LVar2, EVT_FLOAT(100.0)) + EVT_IF_GT(LVar2, 100) + EVT_SETF(LVar1, EVT_FLOAT(1.0)) + EVT_END_IF + EVT_CALL(ScaleGroup, MODEL_g35, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o117, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o141, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o140, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o138, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o139, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o143, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o144, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o145, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o146, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o188, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o187, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o186, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o185, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o182, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o183, LVar1, 1, LVar1) + EVT_CALL(ScaleModel, MODEL_o181, LVar1, 1, LVar1) + EVT_CALL(TranslateGroup, MODEL_g35, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o117, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o141, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o140, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o138, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o139, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o143, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o144, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o145, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o146, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o188, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o187, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o186, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o185, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o182, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o183, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_o181, 0, LVar0, 0) + EVT_SETF(LVar1, LVar0) + EVT_MULF(LVar1, EVT_FLOAT(-12.0)) + EVT_CALL(RotateGroup, MODEL_g35, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o117, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o141, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o140, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o138, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o139, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o143, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o144, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o145, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o146, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o188, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o187, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o186, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o185, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o182, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o181, LVar1, 0, 1, 0) + EVT_CALL(TranslateModel, MODEL_o117, EVT_FLOAT(8.1220703125), EVT_FLOAT(56.1533203125), EVT_FLOAT(1.166015625)) + EVT_CALL(TranslateModel, MODEL_o141, EVT_FLOAT(-6.8779296875), EVT_FLOAT(91.1533203125), EVT_FLOAT(1.166015625)) + EVT_CALL(TranslateModel, MODEL_o140, EVT_FLOAT(13.1220703125), EVT_FLOAT(106.1533203125), EVT_FLOAT(1.166015625)) + EVT_CALL(TranslateModel, MODEL_o138, EVT_FLOAT(-9.8779296875), EVT_FLOAT(136.1533203125), EVT_FLOAT(1.166015625)) + EVT_CALL(TranslateModel, MODEL_o139, EVT_FLOAT(-7.8779296875), EVT_FLOAT(201.1533203125), EVT_FLOAT(1.166015625)) + EVT_CALL(TranslateModel, MODEL_o143, EVT_FLOAT(13.1220703125), EVT_FLOAT(221.1533203125), EVT_FLOAT(1.166015625)) + EVT_CALL(TranslateModel, MODEL_o144, EVT_FLOAT(8.126953125), EVT_FLOAT(261.2294921875), EVT_FLOAT(1.166015625)) + EVT_CALL(TranslateModel, MODEL_o145, EVT_FLOAT(-12.8779296875), EVT_FLOAT(266.1533203125), EVT_FLOAT(1.166015625)) + EVT_CALL(TranslateModel, MODEL_o146, EVT_FLOAT(8.1220703125), EVT_FLOAT(316.1533203125), EVT_FLOAT(-13.833984375)) + EVT_CALL(TranslateModel, MODEL_o188, EVT_FLOAT(-10.943359375), EVT_FLOAT(391.1533203125), EVT_FLOAT(10.56640625)) + EVT_CALL(TranslateModel, MODEL_o187, EVT_FLOAT(-7.001953125), EVT_FLOAT(456.1533203125), EVT_FLOAT(0.947265625)) + EVT_CALL(TranslateModel, MODEL_o186, EVT_FLOAT(12.998046875), EVT_FLOAT(471.1533203125), EVT_FLOAT(0.947265625)) + EVT_CALL(TranslateModel, MODEL_o185, EVT_FLOAT(-10.001953125), EVT_FLOAT(501.1533203125), EVT_FLOAT(0.947265625)) + EVT_CALL(TranslateModel, MODEL_o182, EVT_FLOAT(8.0029296875), EVT_FLOAT(536.2294921875), EVT_FLOAT(0.947265625)) + EVT_CALL(TranslateModel, MODEL_o183, EVT_FLOAT(12.998046875), EVT_FLOAT(586.1533203125), EVT_FLOAT(0.947265625)) + EVT_CALL(TranslateModel, MODEL_o181, EVT_FLOAT(-13.001953125), EVT_FLOAT(631.1533203125), EVT_FLOAT(0.947265625)) + EVT_SETF(LVar1, LVar0) + EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) + EVT_DIVF(LVar1, EVT_FLOAT(300.0)) + EVT_SETF(LVar2, LVar1) + EVT_MULF(LVar2, EVT_FLOAT(100.0)) + EVT_IF_GT(LVar2, 100) + EVT_SETF(LVar1, EVT_FLOAT(1.0)) + EVT_END_IF + EVT_CALL(ScaleModel, MODEL_o117, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o141, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o140, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o138, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o139, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o143, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o144, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o145, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o146, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o188, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o187, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o186, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o185, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o182, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o183, LVar1, LVar1, LVar1) + EVT_CALL(ScaleModel, MODEL_o181, LVar1, LVar1, LVar1) + EVT_CALL(TranslateModel, MODEL_o117, EVT_FLOAT(-8.12109375), EVT_FLOAT(-56.15234375), EVT_FLOAT(-1.1650390625)) + EVT_CALL(TranslateModel, MODEL_o141, EVT_FLOAT(6.87890625), EVT_FLOAT(-91.15234375), EVT_FLOAT(-1.1650390625)) + EVT_CALL(TranslateModel, MODEL_o140, EVT_FLOAT(-13.12109375), EVT_FLOAT(-106.15234375), EVT_FLOAT(-1.1650390625)) + EVT_CALL(TranslateModel, MODEL_o138, EVT_FLOAT(9.87890625), EVT_FLOAT(-136.15234375), EVT_FLOAT(-1.1650390625)) + EVT_CALL(TranslateModel, MODEL_o139, EVT_FLOAT(7.87890625), EVT_FLOAT(-201.15234375), EVT_FLOAT(-1.1650390625)) + EVT_CALL(TranslateModel, MODEL_o143, EVT_FLOAT(-13.12109375), EVT_FLOAT(-221.15234375), EVT_FLOAT(-1.1650390625)) + EVT_CALL(TranslateModel, MODEL_o144, EVT_FLOAT(-8.1259765625), EVT_FLOAT(-261.228515625), EVT_FLOAT(-1.1650390625)) + EVT_CALL(TranslateModel, MODEL_o145, EVT_FLOAT(12.87890625), EVT_FLOAT(-266.15234375), EVT_FLOAT(-1.1650390625)) + EVT_CALL(TranslateModel, MODEL_o146, EVT_FLOAT(-8.12109375), EVT_FLOAT(-316.15234375), EVT_FLOAT(13.8349609375)) + EVT_CALL(TranslateModel, MODEL_o188, EVT_FLOAT(10.9443359375), EVT_FLOAT(-391.15234375), EVT_FLOAT(-10.5654296875)) + EVT_CALL(TranslateModel, MODEL_o187, EVT_FLOAT(7.0029296875), EVT_FLOAT(-456.15234375), EVT_FLOAT(-0.9462890625)) + EVT_CALL(TranslateModel, MODEL_o186, EVT_FLOAT(-12.9970703125), EVT_FLOAT(-471.15234375), EVT_FLOAT(-0.9462890625)) + EVT_CALL(TranslateModel, MODEL_o185, EVT_FLOAT(10.0029296875), EVT_FLOAT(-501.15234375), EVT_FLOAT(-0.9462890625)) + EVT_CALL(TranslateModel, MODEL_o182, EVT_FLOAT(-8.001953125), EVT_FLOAT(-536.228515625), EVT_FLOAT(-0.9462890625)) + EVT_CALL(TranslateModel, MODEL_o183, EVT_FLOAT(-12.9970703125), EVT_FLOAT(-586.15234375), EVT_FLOAT(-0.9462890625)) + EVT_CALL(TranslateModel, MODEL_o181, EVT_FLOAT(13.0029296875), EVT_FLOAT(-631.15234375), EVT_FLOAT(-0.9462890625)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetInteriorVineGrowth) = { + EVT_SETF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown) + EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) + EVT_DIVF(LVar1, EVT_FLOAT(100.0)) + EVT_SETF(LVar2, LVar1) + EVT_MULF(LVar2, EVT_FLOAT(100.0)) + EVT_IF_GT(LVar2, 100) + EVT_SETF(LVar1, EVT_FLOAT(1.0)) + EVT_END_IF + EVT_CALL(ScaleGroup, MODEL_g37, LVar1, 1, LVar1) + EVT_CALL(TranslateGroup, MODEL_g37, 0, LVar0, 0) + EVT_SETF(LVar1, LVar0) + EVT_MULF(LVar1, EVT_FLOAT(-12.0)) + EVT_CALL(RotateGroup, MODEL_g37, LVar1, 0, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetSproutGrowth) = { + EVT_CALL(TranslateModel, MODEL_o147, EVT_FLOAT(9.5), EVT_FLOAT(12.0), EVT_FLOAT(15.0)) + EVT_CALL(TranslateModel, MODEL_o149, EVT_FLOAT(-9.5), EVT_FLOAT(12.0), EVT_FLOAT(15.0)) + EVT_CALL(TranslateModel, MODEL_o148, EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(17.0)) + EVT_SETF(LVar1, LVar0) + EVT_MULF(LVar1, EVT_FLOAT(90.0)) + EVT_CALL(RotateModel, MODEL_o147, LVar1, 0, 0, -1) + EVT_CALL(RotateModel, MODEL_o149, LVar1, 0, 0, 1) + EVT_CALL(TranslateModel, MODEL_o147, EVT_FLOAT(-9.5), EVT_FLOAT(-12.0), EVT_FLOAT(-15.0)) + EVT_CALL(TranslateModel, MODEL_o149, EVT_FLOAT(9.5), EVT_FLOAT(-12.0), EVT_FLOAT(-15.0)) + EVT_CALL(TranslateModel, MODEL_o148, EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(-17.0)) + EVT_CALL(ScaleModel, MODEL_o147, LVar0, LVar0, LVar0) + EVT_CALL(ScaleModel, MODEL_o149, LVar0, LVar0, LVar0) + EVT_CALL(ScaleModel, MODEL_o148, LVar0, LVar0, LVar0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetBigLeafGrowth) = { + EVT_CALL(ScaleModel, MODEL_o142, LVar0, LVar0, LVar0) + EVT_SETF(LVar1, LVar0) + EVT_MULF(LVar1, EVT_FLOAT(90.0)) + EVT_ADDF(LVar1, EVT_FLOAT(-90.0)) + EVT_CALL(RotateModel, MODEL_o142, LVar1, 1, 0, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetBigLeafPosition) = { + EVT_SETF(LVar1, LVar0) + EVT_MULF(LVar1, EVT_FLOAT(-3.0)) + EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), LVar0, EVT_FLOAT(1.4775391)) + EVT_CALL(RotateModel, MODEL_o142, LVar1, 0, 1, 0) + EVT_CALL(UpdateColliderTransform, COLLIDER_o240) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Exit_Beanstalk) = { + EVT_IF_EQ(AF_FLO_RidingBeanstalk, FALSE) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(InterruptUsePartner) + EVT_WAIT(15) + EVT_CALL(DisablePartnerAI, 0) + EVT_SET(AF_FLO_RidingBeanstalk, TRUE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET_VEC3(LVar9, EVT_FLOAT(-59.0), EVT_FLOAT(22.0), EVT_FLOAT(125.0)) // target player pos + EVT_SET_VEC3(LVarC, EVT_FLOAT(-55.0), EVT_FLOAT(24.0), EVT_FLOAT(145.0)) // target partner pos + EVT_CALL(PlayerMoveTo, LVar9, LVarB, 8) + EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) + EVT_CALL(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) + EVT_CALL(PlaySound, SOUND_19C) + EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) + EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking) + EVT_CALL(N(GetPlayerAngles), LVar3, LVar4) + EVT_SWITCH(LVar4) + EVT_CASE_LT(90) + EVT_SET(AF_FLO_BeanstalkFacingRight, FALSE) + EVT_CALL(InterpPlayerYaw, 90, 0) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) + EVT_CASE_GE(270) + EVT_SET(AF_FLO_BeanstalkFacingRight, TRUE) + EVT_CALL(InterpPlayerYaw, 270, 0) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) + EVT_END_SWITCH + EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), EVT_FLOAT(2.0), EVT_FLOAT(1.4775391)) + EVT_CALL(UpdateColliderTransform, COLLIDER_o240) + EVT_SET(MV_BeanstalkSceneSync, FALSE) + EVT_THREAD + EVT_SET(LVarF, 0) + EVT_LOOP(0) + EVT_ADD(LVarF, 1) + EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, 700, 800, 0, 0) + EVT_EXEC(N(EVS_SetBigLeafPosition)) + EVT_SETF(LVar2, LVar0) + EVT_MULF(LVar2, EVT_FLOAT(-3.0)) + EVT_SETF(LVar3, LVar0) + EVT_CALL(N(PlayerRideBeanstalk)) + EVT_CALL(N(PartnerRideBeanstalk)) + EVT_IF_EQ(LVarF, 350) + EVT_SET(MV_BeanstalkSceneSync, TRUE) + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_END_THREAD + EVT_LABEL(10) + EVT_IF_EQ(MV_BeanstalkSceneSync, FALSE) + EVT_WAIT(1) + EVT_GOTO(10) + EVT_END_IF + EVT_CALL(GotoMap, EVT_PTR("flo_19"), flo_19_ENTRY_3) + EVT_WAIT(100) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Enter_Beanstalk) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_SET(LVar9, EVT_FLOAT(-59.0)) + EVT_SET(LVarA, EVT_FLOAT(22.0)) + EVT_SET(LVarB, EVT_FLOAT(125.0)) + EVT_SET(LVarC, EVT_FLOAT(-55.0)) + EVT_SET(LVarD, EVT_FLOAT(23.0)) + EVT_SET(LVarE, EVT_FLOAT(145.0)) + EVT_THREAD + EVT_WAIT(5) + EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking) + EVT_SWITCH(AF_FLO_BeanstalkFacingRight) + EVT_CASE_EQ(0) + EVT_CALL(InterpPlayerYaw, 90, 0) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) + EVT_CASE_EQ(1) + EVT_CALL(InterpPlayerYaw, 270, 0) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) + EVT_END_SWITCH + EVT_END_THREAD + EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), EVT_FLOAT(2.0), EVT_FLOAT(1.4775391)) + EVT_CALL(UpdateColliderTransform, COLLIDER_o240) + EVT_SET(LVarF, 0) + EVT_LOOP(120) + EVT_ADD(LVarF, 1) + EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 70, 0, 120, 0, 0) + EVT_EXEC(N(EVS_SetBigLeafPosition)) + EVT_SETF(LVar2, LVar0) + EVT_MULF(LVar2, EVT_FLOAT(-3.0)) + EVT_SETF(LVar3, LVar0) + EVT_CALL(N(PlayerRideBeanstalk)) + EVT_CALL(N(PartnerRideBeanstalk)) + EVT_WAIT(1) + EVT_END_LOOP + EVT_CALL(EnablePartnerAI) + EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) + EVT_CALL(SetPlayerJumpscale, 1) + EVT_CALL(PlayerJump, 10, 0, 110, 20) + EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) + EVT_CALL(InterpPlayerYaw, 90, 0) + EVT_WAIT(5) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(AF_FLO_RidingBeanstalk, FALSE) + EVT_CALL(StopSound, SOUND_19D) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_BeanstalkGrowing) = { + EVT_CALL(PlaySoundAtCollider, COLLIDER_o261, SOUND_19B, 0) + EVT_SET(LVarF, 0) + EVT_LOOP(100) + EVT_ADD(LVarF, 1) + EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, EVT_FLOAT(1.0), 100, 0, 0) + EVT_EXEC(N(EVS_SetSproutGrowth)) + EVT_WAIT(1) + EVT_END_LOOP + EVT_SET(MV_BeanstalkSceneSync, FALSE) + EVT_THREAD + EVT_SET(LVarF, 0) + EVT_LOOP(1200) + EVT_ADD(LVarF, 1) + EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -700, 0, 1200, 0, 0) + EVT_SETF(LVar2, LVar0) + EVT_MULF(LVar2, EVT_FLOAT(1.0)) + EVT_SETF(LVar0, LVar2) + EVT_EXEC(N(EVS_SetExteriorVineGrowth)) + EVT_SETF(LVar2, LVar0) + EVT_MULF(LVar2, EVT_FLOAT(1.0)) + EVT_SETF(LVar0, LVar2) + EVT_EXEC(N(EVS_SetInteriorVineGrowth)) + EVT_SWITCH(LVarF) + EVT_CASE_EQ(200) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A) + EVT_CASE_EQ(250) + EVT_SET(LVar0, -60) + EVT_SET(LVar1, 0) + EVT_SET(LVar2, 65) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.5), EVT_FLOAT(-7.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) + EVT_CALL(SetCamPosA, CAM_DEFAULT, -200, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -300) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CASE_DEFAULT + EVT_END_SWITCH + EVT_IF_GT(LVarF, 550) + EVT_SET(MV_BeanstalkSceneSync, TRUE) + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_END_THREAD + EVT_LABEL(10) + EVT_IF_EQ(MV_BeanstalkSceneSync, FALSE) + EVT_WAIT(1) + EVT_GOTO(10) + EVT_END_IF + EVT_CALL(FadeInMusic, 0, SONG_CLOUDY_CLIMB, 0, 3000, 0, 127) + EVT_CALL(FadeOutMusic, 1, 3000) + EVT_CALL(GotoMap, EVT_PTR("flo_19"), flo_19_ENTRY_2) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_BeanstalkGrewRemark) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(InterpPlayerYaw, 200, 0) + EVT_CALL(SetPlayerPos, -60, 0, 30) + EVT_CALL(NpcFacePlayer, NPC_PARTNER, 1) + EVT_CALL(SetNpcPos, NPC_PARTNER, -20, 0, 10) + EVT_SET(LVar0, -60) + EVT_SET(LVar1, 0) + EVT_SET(LVar2, 65) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.5), EVT_FLOAT(-7.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) + EVT_CALL(SetCamPosA, CAM_DEFAULT, -200, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -300) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_SET(LVarF, 0) + EVT_LOOP(5) + EVT_ADD(LVarF, 20) + EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.0), EVT_FLOAT(1.0), 100, 0, 0) + EVT_EXEC(N(EVS_SetBigLeafGrowth)) + EVT_WAIT(1) + EVT_END_LOOP + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000A, 0, 50, -200) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +s32 N(BeanstalkIngredients)[] = { + ITEM_FERTILE_SOIL, + ITEM_MAGICAL_BEAN, + ITEM_MIRACLE_WATER, + ITEM_NONE +}; + +EvtScript N(EVS_BeanPatch_ItemPrompt) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(func_802D2884, -85, 85, 0) + EVT_CALL(func_802CF56C, 2) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_IF_EQ(GF_FLO00_PlacedFertileSoil, FALSE) + EVT_SET_GROUP(EVT_GROUP_00) + EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + EVT_LABEL(10) + EVT_CALL(ShowKeyChoicePopup) + EVT_SET(LVar2, LVar0) + EVT_SWITCH(LVar2) + EVT_CASE_LE(ITEM_NONE) + EVT_CALL(CloseChoicePopup) + EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + EVT_CALL(AwaitPlayerLeave, -85, 85, 28) + EVT_RETURN + EVT_CASE_EQ(ITEM_FERTILE_SOIL) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_60006) + EVT_WAIT(5) + EVT_CALL(RemoveKeyItemAt, LVar1) + EVT_CALL(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_SET(MV_BeanstalkItemEntity, LVar0) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_WAIT(20) + EVT_CASE_DEFAULT + EVT_SWITCH(AF_FLO_PlatingInstructionsToggle) + EVT_CASE_EQ(0) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) + EVT_SET(AF_FLO_PlatingInstructionsToggle, TRUE) + EVT_CASE_DEFAULT + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) + EVT_END_SWITCH + EVT_END_SWITCH + EVT_CALL(DisablePlayerInput, FALSE) + EVT_CALL(DisablePlayerPhysics, FALSE) + EVT_IF_NE(LVar2, 89) + EVT_GOTO(10) + EVT_END_IF + EVT_SET(GF_FLO00_PlacedFertileSoil, TRUE) + EVT_END_IF + EVT_IF_EQ(GF_FLO00_PlacedMagicalBean, FALSE) + EVT_SET_GROUP(EVT_GROUP_00) + EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + EVT_LABEL(20) + EVT_CALL(ShowKeyChoicePopup) + EVT_SET(LVar2, LVar0) + EVT_SWITCH(LVar2) + EVT_CASE_LE(ITEM_NONE) + EVT_CALL(CloseChoicePopup) + EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + EVT_CALL(AwaitPlayerLeave, -85, 85, 28) + EVT_RETURN + EVT_CASE_EQ(ITEM_MAGICAL_BEAN) + EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity) + EVT_WAIT(5) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_60006) + EVT_WAIT(5) + EVT_CALL(RemoveKeyItemAt, LVar1) + EVT_CALL(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_SET(MV_BeanstalkItemEntity, LVar0) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_WAIT(20) + EVT_CASE_DEFAULT + EVT_SWITCH(AF_FLO_PlatingInstructionsToggle) + EVT_CASE_EQ(0) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) + EVT_SET(AF_FLO_PlatingInstructionsToggle, TRUE) + EVT_CASE_DEFAULT + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) + EVT_END_SWITCH + EVT_END_SWITCH + EVT_CALL(DisablePlayerInput, FALSE) + EVT_CALL(DisablePlayerPhysics, FALSE) + EVT_IF_NE(LVar2, 88) + EVT_GOTO(20) + EVT_END_IF + EVT_SET(GF_FLO00_PlacedMagicalBean, TRUE) + EVT_END_IF + EVT_SET_GROUP(EVT_GROUP_00) + EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + EVT_LABEL(30) + EVT_CALL(ShowKeyChoicePopup) + EVT_SET(LVar2, LVar0) + EVT_SWITCH(LVar2) + EVT_CASE_LE(ITEM_NONE) + EVT_CALL(CloseChoicePopup) + EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + EVT_CALL(AwaitPlayerLeave, -85, 85, 28) + EVT_RETURN + EVT_CASE_EQ(ITEM_MIRACLE_WATER) + EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity) + EVT_WAIT(5) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_60006) + EVT_WAIT(5) + EVT_CALL(RemoveKeyItemAt, LVar1) + EVT_CALL(N(SyncStatusMenu)) + EVT_CALL(MakeItemEntity, ITEM_MIRACLE_WATER, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_SET(MV_BeanstalkItemEntity, LVar0) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_WAIT(30) + EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity) + EVT_WAIT(30) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(PlayerMoveTo, -60, 30, 20) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(InterpPlayerYaw, 200, 0) + EVT_CALL(func_802CF56C, 2) + EVT_WAIT(60) + EVT_CALL(FadeInMusic, 1, SONG_MAGIC_BEANSTALK, 0, 3000, 0, 127) + EVT_CALL(FadeOutMusic, 0, 3000) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -85, 0, 75) + EVT_CALL(SetPanTarget, CAM_DEFAULT, -85, 0, 75) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_EXEC_WAIT(N(EVS_Scene_BeanstalkGrowing)) + EVT_END_SWITCH + EVT_IF_NE(LVar2, 90) + EVT_GOTO(30) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_BeanPatch_TryInteract) = { + EVT_LABEL(0) + EVT_CALL(IsPlayerWithin, -85, 85, 20, LVar0) + EVT_IF_EQ(LVar0, 0) + EVT_RETURN + EVT_ELSE + EVT_CALL(IsPlayerOnValidFloor, LVar0) + EVT_IF_EQ(LVar0, FALSE) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_END_IF + EVT_CALL(GetCurrentPartner, LVar0) + EVT_IF_NE(LVar0, PARTNER_NONE) + EVT_RETURN + EVT_END_IF + EVT_END_IF + EVT_CALL(N(DisableStatusMenu)) + EVT_EXEC_WAIT(N(EVS_BeanPatch_ItemPrompt)) + EVT_CALL(N(EnableStatusMenu)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupBeanPatch) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) + EVT_LOOP(0) + EVT_WAIT(1) + EVT_IF_EQ(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_IF_EQ(GF_FLO00_PlacedFertileSoil, TRUE) + EVT_IF_EQ(GF_FLO00_PlacedMagicalBean, FALSE) + EVT_CALL(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_ELSE + EVT_CALL(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_END_IF + EVT_SET(MV_BeanstalkItemEntity, LVar0) + EVT_END_IF + EVT_BIND_PADLOCK(EVT_PTR(N(EVS_BeanPatch_TryInteract)), TRIGGER_FORCE_ACTIVATE, 0, EVT_PTR(N(BeanstalkIngredients)), 0, 1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupBeanstalk) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Exit_Beanstalk)), TRIGGER_FLOOR_TOUCH, COLLIDER_o240, 1, 0) + EVT_CALL(EnableGroup, MODEL_ha, TRUE) + EVT_CALL(EnableGroup, MODEL_tuta, TRUE) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_EQ(STORY_CH6_WISTERWOOD_GAVE_HINT) + EVT_SET(LVar0, -700) + EVT_EXEC(N(EVS_SetExteriorVineGrowth)) + EVT_EXEC(N(EVS_SetInteriorVineGrowth)) + EVT_SET(LVar0, 0) + EVT_EXEC(N(EVS_SetSproutGrowth)) + EVT_SET(LVar0, 0) + EVT_EXEC(N(EVS_SetBigLeafGrowth)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + EVT_CASE_GE(STORY_CH6_GREW_MAGIC_BEANSTALK) + EVT_SET(LVar0, 1) + EVT_EXEC(N(EVS_SetSproutGrowth)) + EVT_SET(LVar0, 1) + EVT_EXEC(N(EVS_SetBigLeafGrowth)) + EVT_CASE_DEFAULT + EVT_SET(LVar0, -700) + EVT_EXEC(N(EVS_SetExteriorVineGrowth)) + EVT_EXEC(N(EVS_SetInteriorVineGrowth)) + EVT_SET(LVar0, 0) + EVT_EXEC(N(EVS_SetSproutGrowth)) + EVT_SET(LVar0, 0) + EVT_EXEC(N(EVS_SetBigLeafGrowth)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_00/flo_00_6_entity.c b/src/world/area_flo/flo_00/flo_00_6_entity.c new file mode 100644 index 0000000000..99bbcada6e --- /dev/null +++ b/src/world/area_flo/flo_00/flo_00_6_entity.c @@ -0,0 +1,10 @@ +#include "flo_00.h" +#include "entity.h" + +EvtScript N(EVS_MakeEntities) = { + EVT_IF_LT(GB_StoryProgress, STORY_EPILOGUE) + EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 110, 60, -100, 0, MAKE_ENTITY_END) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_03/CA72A0.c b/src/world/area_flo/flo_03/CA72A0.c deleted file mode 100644 index f84696b470..0000000000 --- a/src/world/area_flo/flo_03/CA72A0.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "flo_03.h" -#include "effects.h" - -ApiStatus N(func_80240000_CA72A0)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(1, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_03/CA72E0.c b/src/world/area_flo/flo_03/CA72E0.c deleted file mode 100644 index 65306d99cb..0000000000 --- a/src/world/area_flo/flo_03/CA72E0.c +++ /dev/null @@ -1,1226 +0,0 @@ -#include "flo_03.h" -#include "message_ids.h" -#include "entity.h" -#include "sprite/npc/Dayzee.h" -#include "sprite/npc/MontyMole.h" -#include "sprite/npc/Petunia.h" - -enum { - NPC_PETUNIA, - NPC_DAYZEE, - NPC_MONTY_MOLE0, - NPC_MONTY_MOLE1, - NPC_MONTY_MOLE2, - NPC_MONTY_MOLE3, -}; - -EntryList N(entryList) = { - { -325.0f, 0.0f, 0.0f, 90.0f }, - { 325.0f, 0.0f, 0.0f, 270.0f }, - { -325.0f, 0.0f, 0.0f, 90.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_03 }, -}; - -EvtScript N(802406A0) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LE(44) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, 0) - EVT_CALL(SetMusicTrack, 0, SONG_MONTY_MOLE_ASSAULT, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_END_IF - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(802407C0) = { - EVT_IF_GE(GB_StoryProgress, 44) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, 1) - EVT_CALL(PushSong, 137, 0) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80240814) = { - EVT_IF_GE(GB_StoryProgress, 44) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, 1) - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80240880) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_80240B2C) = EVT_EXIT_WALK(60, 0, "flo_09", 1); - -EvtScript N(exitWalk_80240B88) = EVT_EXIT_WALK(60, 1, "flo_22", 0); - -EvtScript N(80240BE4) = { - EVT_BIND_TRIGGER(N(exitWalk_80240B2C), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_80240B88), TRIGGER_FLOOR_ABOVE, 4, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_SET(AreaFlag(27), 0) - EVT_SET(AreaFlag(28), 0) - EVT_SET(AreaByte(1), 0) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_8024442C))) - EVT_EXEC_WAIT(N(makeEntities)) - EVT_EXEC_WAIT(N(80241EF4)) - EVT_EXEC(N(80244E54)) - EVT_EXEC(N(80244ED0)) - EVT_CALL(ModifyColliderFlags, 3, 9, 0x00000006) - EVT_SET(LVar0, -145) - EVT_SET(LVar1, -335) - EVT_SET(LVar2, 182) - EVT_SET(LVar3, -180) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80240880)) - EVT_SET(LVar0, 200) - EVT_SET(LVar1, -170) - EVT_SET(LVar2, 310) - EVT_SET(LVar3, 150) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80240880)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_EXEC(N(80240FFC)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80240BE4))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_EXEC_WAIT(N(802406A0)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240000_CA72A0)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_EA4)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -NpcSettings N(npcSettings_80240EB0) = { - .height = 24, - .radius = 24, - .level = 99, -}; - -NpcSettings N(npcSettings_80240EDC) = { - .height = 56, - .radius = 40, - .level = 99, -}; - -s32** N(varStash) = NULL; - -EvtScript N(80240F0C) = { - EVT_CALL(ShowGotItem, LVar0, 1, 0) - EVT_RETURN - EVT_RETURN - EVT_END -}; - -EvtScript N(80240F3C) = { - EVT_CALL(ShowGotItem, LVar0, 1, 16) - EVT_RETURN - EVT_RETURN - EVT_END -}; - -s32 N(intTable_80240F6C)[] = { - 0xFFFFFF9C, 0x00000000, 0x000000D2, 0xFFFFFF60, 0x00000000, 0x0000011D, 0xFFFFFFDD, 0x00000000, - 0x00000131, -}; - -s32 N(intTable_80240F90)[] = { - 0xFFFFFF42, 0x00000000, 0x00000050, 0xFFFFFF7E, 0x00000000, 0x00000000, 0xFFFFFFBA, 0x00000000, - 0xFFFFFFC4, -}; - -s32 N(intTable_80240FB4)[] = { - 0x0000004B, 0x00000000, 0xFFFFFFF1, 0x00000023, 0x00000000, 0xFFFFFF9C, 0x00000082, 0x00000000, - 0x00000000, -}; - -s32 N(intTable_80240FD8)[] = { - 0x00000073, 0x00000000, 0x000000B4, 0x00000055, 0x00000000, 0x00000122, 0x00000091, 0x00000000, - 0x0000008C, -}; - -EvtScript N(80240FFC) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcYaw, 0, 90) - EVT_CALL(GetNpcPos, 0, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 300) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamPosA, 0, -27, 0) - EVT_CALL(SetCamPosB, 0, 0, -50) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, 0, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_00C8) - EVT_CALL(SetNpcAnimation, 0, ANIM_Petunia_Dance) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_18"), 1) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(npcAI_8024119C) = { - EVT_CALL(N(func_80240158_CA73F8)) - EVT_RETURN - EVT_END -}; - -EvtScript N(defeat_802411B8) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(GF_FLO03_Defeated_Dayzee, 1) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(1) - EVT_CASE_EQ(2) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(8024122C) = { - EVT_CALL(GetPlayerPos, LVar3, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(SetCamProperties, 0, LVar4, LVar0, LVar1, LVar2, 300, EVT_FLOAT(20.0), EVT_FLOAT(-9.5)) - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_802412BC) = { - EVT_EXEC_WAIT(N(802407C0)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(44) - EVT_SET(MapVar(14), 1) - EVT_SET(LVar4, EVT_FLOAT(3.5)) - EVT_EXEC_WAIT(N(8024122C)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0050) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_NodYes) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0051) - EVT_CALL(SetNpcAnimation, 2, ANIM_MontyMole_Dark_Anim12) - EVT_CALL(SetNpcYaw, 2, 270) - EVT_CALL(GetNpcPos, 2, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamDistance, 0, 200) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtNpc, 2, SOUND_BURROW_SURFACE, 0) - EVT_CALL(SetNpcAnimation, 2, ANIM_MontyMole_Dark_Anim16) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, 2, 0x263, 0) - EVT_CALL(ShowEmote, 2, EMOTE_QUESTION, -45, 30, 1, 0, 0, 0, 0) - EVT_CALL(GetNpcPos, 3, LVar0, LVar1, LVar2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0052) - EVT_CALL(SetNpcYaw, 3, 90) - EVT_CALL(SetNpcPos, 3, 0, -1000, 0) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 200) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, 3, ANIM_MontyMole_Dark_Anim00) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtNpc, 3, SOUND_BURROW_SURFACE, 0) - EVT_CALL(SetNpcPos, 3, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, 3, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0053) - EVT_CALL(SetNpcYaw, 4, 270) - EVT_CALL(GetNpcPos, 4, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 200) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, 4, ANIM_MontyMole_Dark_Anim14) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0054) - EVT_CALL(SetNpcYaw, 5, 270) - EVT_CALL(GetNpcPos, 5, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 200) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, 5, ANIM_MontyMole_Dark_Anim06) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, 5, ANIM_MontyMole_Dark_Anim07) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, 5, ANIM_MontyMole_Dark_Anim08) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, 5, ANIM_MontyMole_Dark_Anim16) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0055) - EVT_CALL(SetNpcPos, 1, -233, 0, -217) - EVT_CALL(GetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 300) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, 1, ANIM_Dayzee_Anim0D) - EVT_CALL(PlaySoundAtNpc, 1, SOUND_262, 0) - EVT_CALL(ShowEmote, 1, EMOTE_EXCLAMATION, 45, 30, 1, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0056) - EVT_SET(LVar4, EVT_FLOAT(90.0)) - EVT_EXEC_WAIT(N(8024122C)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0057) - EVT_CALL(SetEnemyFlagBits, 1, 1, 0) - EVT_CALL(SetEnemyFlagBits, 2, 1, 0) - EVT_CALL(SetEnemyFlagBits, 3, 1, 0) - EVT_CALL(SetEnemyFlagBits, 4, 1, 0) - EVT_CALL(SetEnemyFlagBits, 5, 1, 0) - EVT_CALL(BindNpcAI, 1, EVT_PTR(N(npcAI_8024119C))) - EVT_SET(MapVar(14), 0) - EVT_SET(MapVar(15), 60) - EVT_SET(GB_StoryProgress, 44) - EVT_CASE_EQ(44) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0058) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) - EVT_ELSE - EVT_SET(LVar4, EVT_FLOAT(3.5)) - EVT_EXEC_WAIT(N(8024122C)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_HappyTalk, ANIM_Petunia_Dance, 0, MSG_CH6_0059) - EVT_CALL(EndSpeech, -1, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_GiveItem) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Idle) - EVT_SET(LVar0, 88) - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(80240F0C)) - EVT_CALL(AddKeyItem, ITEM_MAGICAL_BEAN) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005A) - EVT_CALL(EndSpeech, -1, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0) - EVT_SET(GB_StoryProgress, 45) - EVT_END_IF - EVT_CASE_LT(53) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005B) - EVT_CASE_LT(60) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005C) - EVT_CASE_DEFAULT - EVT_IF_EQ(AreaByte(1), 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005D) - EVT_SET(AreaByte(1), 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005E) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(ResetCam, 0, EVT_FLOAT(8.0)) - EVT_EXEC_WAIT(N(80240814)) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80241DA4) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_802412BC))) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, 0) - EVT_CALL(SetNpcAnimation, 0, ANIM_Petunia_Angry) - EVT_ELSE - EVT_CALL(SetNpcAnimation, 0, ANIM_Petunia_Idle) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80241E10) = { - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_802411B8))) - EVT_CALL(EnableNpcShadow, 1, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(44) - EVT_CALL(SetNpcPos, 1, 0, -1000, 0) - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_FLO03_Defeated_Dayzee, 0) - EVT_CALL(SetEnemyFlagBits, 1, 1, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(npcAI_8024119C))) - EVT_ELSE - EVT_CALL(SetNpcPos, 1, 0, -1000, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(80241EF4) = { - EVT_SET(MapVar(14), 0) - EVT_SET(MapVar(10), 0) - EVT_SET(MapVar(11), 0) - EVT_SET(MapVar(12), 0) - EVT_SET(MapVar(13), 0) - EVT_SET(MapVar(15), 100) - EVT_RETURN - EVT_END -}; - -EvtScript N(defeat_80241F64) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(2) - EVT_SET(GF_FLO03_Defeated_MontyMoleA, 1) - EVT_CASE_EQ(3) - EVT_SET(GF_FLO03_Defeated_MontyMoleB, 1) - EVT_CASE_EQ(4) - EVT_SET(GF_FLO03_Defeated_MontyMoleC, 1) - EVT_CASE_EQ(5) - EVT_SET(GF_FLO03_Defeated_MontyMoleD, 1) - EVT_END_SWITCH - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleA) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleB) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleC) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleD) - EVT_IF_NE(LVar0, 4) - EVT_CALL(SetNpcAnimation, 0, ANIM_Petunia_Angry) - EVT_ELSE - EVT_CALL(SetNpcAnimation, 0, ANIM_Petunia_Idle) - EVT_SET(GF_FLO03_DefeatedAll_MontyMoles, 1) - EVT_EXEC_WAIT(N(802406A0)) - EVT_END_IF - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) - EVT_CASE_EQ(2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(hit_80242138) = { - EVT_IF_EQ(GB_StoryProgress, 44) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_IF_NE(LVar0, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim05) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(idle_8024219C) = { - EVT_LOOP(0) - EVT_IF_EQ(MapVar(10), 0) - EVT_IF_EQ(AreaFlag(23), 1) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LVar3, 1) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, 2, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MapVar(15), LVar3) - EVT_END_IF - EVT_CALL(GetCurrentPartner, LVar9) - EVT_IF_EQ(LVar9, 9) - EVT_SET(LVar3, 0) - EVT_END_IF - EVT_IF_EQ(MapVar(14), 1) - EVT_SET(LVar3, 0) - EVT_END_IF - EVT_IF_EQ(LVar3, 1) - EVT_IF_EQ(AreaFlag(23), 0) - EVT_CALL(SetNpcFlagBits, 2, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE) - EVT_CALL(NpcFacePlayer, 2, 1) - EVT_WAIT(1) - EVT_SET(AreaFlag(23), 1) - EVT_IF_NE(MapVar(10), 0) - EVT_IF_LT(GB_StoryProgress, 44) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, 2, SOUND_262, 0) - EVT_CALL(ShowEmote, 2, EMOTE_EXCLAMATION, 0, LVar1, 1, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), TRUE) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, 2, SOUND_BURROW_DIG, 0) - EVT_CALL(SetNpcAnimation, 2, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, 0) - EVT_CALL(SetNpcPos, 2, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AreaFlag(23), 1) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, 0) - EVT_CALL(RandInt, 2, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(intTable_80240F6C))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, 2, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, 2, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE) - EVT_SET(AreaFlag(23), 0) - EVT_CALL(NpcFacePlayer, 2, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, 2, SOUND_BURROW_SURFACE, 0) - EVT_CALL(SetNpcAnimation, 2, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), FALSE) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 60) - EVT_SET(MapVar(10), LVar0) - EVT_ELSE - EVT_IF_GT(MapVar(10), 0) - EVT_SUB(MapVar(10), 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(idle_80242618) = { - EVT_LOOP(0) - EVT_IF_EQ(MapVar(11), 0) - EVT_IF_EQ(AreaFlag(24), 1) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LVar3, 1) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, 3, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MapVar(15), LVar3) - EVT_END_IF - EVT_CALL(GetCurrentPartner, LVar9) - EVT_IF_EQ(LVar9, 9) - EVT_SET(LVar3, 0) - EVT_END_IF - EVT_IF_EQ(MapVar(14), 1) - EVT_SET(LVar3, 0) - EVT_END_IF - EVT_IF_EQ(LVar3, 1) - EVT_IF_EQ(AreaFlag(24), 0) - EVT_CALL(SetNpcFlagBits, 3, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE) - EVT_CALL(NpcFacePlayer, 3, 1) - EVT_WAIT(1) - EVT_SET(AreaFlag(24), 1) - EVT_IF_NE(MapVar(11), 0) - EVT_IF_LT(GB_StoryProgress, 44) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, 3, SOUND_262, 0) - EVT_CALL(ShowEmote, 3, EMOTE_EXCLAMATION, 0, LVar1, 1, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), TRUE) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, 3, SOUND_BURROW_DIG, 0) - EVT_CALL(SetNpcAnimation, 3, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, 0) - EVT_CALL(SetNpcPos, 3, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AreaFlag(24), 1) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, 0) - EVT_CALL(RandInt, 2, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(intTable_80240F90))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, 3, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, 3, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE) - EVT_SET(AreaFlag(24), 0) - EVT_CALL(NpcFacePlayer, 3, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, 3, SOUND_BURROW_SURFACE, 0) - EVT_CALL(SetNpcAnimation, 3, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), FALSE) - EVT_CALL(RandInt, 35, LVar0) - EVT_ADD(LVar0, 55) - EVT_SET(MapVar(11), LVar0) - EVT_ELSE - EVT_IF_GT(MapVar(11), 0) - EVT_SUB(MapVar(11), 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(idle_80242A94) = { - EVT_LOOP(0) - EVT_IF_EQ(MapVar(12), 0) - EVT_IF_EQ(AreaFlag(25), 1) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LVar3, 1) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, 4, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MapVar(15), LVar3) - EVT_END_IF - EVT_CALL(GetCurrentPartner, LVar9) - EVT_IF_EQ(LVar9, 9) - EVT_SET(LVar3, 0) - EVT_END_IF - EVT_IF_EQ(MapVar(14), 1) - EVT_SET(LVar3, 0) - EVT_END_IF - EVT_IF_EQ(LVar3, 1) - EVT_IF_EQ(AreaFlag(25), 0) - EVT_CALL(SetNpcFlagBits, 4, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE) - EVT_CALL(NpcFacePlayer, 4, 1) - EVT_WAIT(1) - EVT_SET(AreaFlag(25), 1) - EVT_IF_NE(MapVar(12), 0) - EVT_IF_LT(GB_StoryProgress, 44) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, 4, SOUND_262, 0) - EVT_CALL(ShowEmote, 4, EMOTE_EXCLAMATION, 0, LVar1, 1, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), TRUE) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, 4, SOUND_BURROW_DIG, 0) - EVT_CALL(SetNpcAnimation, 4, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, 0) - EVT_CALL(SetNpcPos, 4, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AreaFlag(25), 1) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, 0) - EVT_CALL(RandInt, 2, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(intTable_80240FB4))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, 4, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, 4, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE) - EVT_SET(AreaFlag(25), 0) - EVT_CALL(NpcFacePlayer, 4, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, 4, SOUND_BURROW_SURFACE, 0) - EVT_CALL(SetNpcAnimation, 4, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), FALSE) - EVT_CALL(RandInt, 40, LVar0) - EVT_ADD(LVar0, 50) - EVT_SET(MapVar(12), LVar0) - EVT_ELSE - EVT_IF_GT(MapVar(12), 0) - EVT_SUB(MapVar(12), 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(idle_80242F10) = { - EVT_LOOP(0) - EVT_IF_EQ(MapVar(13), 0) - EVT_IF_EQ(AreaFlag(26), 1) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LVar3, 1) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, 5, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MapVar(15), LVar3) - EVT_END_IF - EVT_CALL(GetCurrentPartner, LVar9) - EVT_IF_EQ(LVar9, 9) - EVT_SET(LVar3, 0) - EVT_END_IF - EVT_IF_EQ(MapVar(14), 1) - EVT_SET(LVar3, 0) - EVT_END_IF - EVT_IF_EQ(LVar3, 1) - EVT_IF_EQ(AreaFlag(26), 0) - EVT_CALL(SetNpcFlagBits, 5, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE) - EVT_CALL(NpcFacePlayer, 5, 1) - EVT_WAIT(1) - EVT_SET(AreaFlag(26), 1) - EVT_IF_NE(MapVar(13), 0) - EVT_IF_LT(GB_StoryProgress, 44) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, 5, SOUND_262, 0) - EVT_CALL(ShowEmote, 5, EMOTE_EXCLAMATION, 0, LVar1, 1, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), TRUE) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, 5, SOUND_BURROW_DIG, 0) - EVT_CALL(SetNpcAnimation, 5, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, 0) - EVT_CALL(SetNpcPos, 5, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AreaFlag(26), 1) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, 0) - EVT_CALL(RandInt, 2, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(intTable_80240FD8))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, 5, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, 5, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE) - EVT_SET(AreaFlag(26), 0) - EVT_CALL(NpcFacePlayer, 5, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, 5, SOUND_BURROW_SURFACE, 0) - EVT_CALL(SetNpcAnimation, 5, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), FALSE) - EVT_CALL(RandInt, 45, LVar0) - EVT_ADD(LVar0, 45) - EVT_SET(MapVar(13), LVar0) - EVT_ELSE - EVT_IF_GT(MapVar(13), 0) - EVT_SUB(MapVar(13), 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(init_8024338C) = { - EVT_CALL(BindNpcHit, -1, EVT_PTR(N(hit_80242138))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80241F64))) - EVT_CALL(EnableNpcShadow, 2, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(44) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_8024219C))) - EVT_CALL(SetNpcAnimation, 2, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(44) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_8024219C))) - EVT_CALL(SetNpcAnimation, 2, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, 2, 1, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, 2, 0, -1000, 0) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, 2, 0, -1000, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(init_802434CC) = { - EVT_CALL(BindNpcHit, -1, EVT_PTR(N(hit_80242138))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80241F64))) - EVT_CALL(EnableNpcShadow, 3, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(44) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80242618))) - EVT_CALL(SetNpcAnimation, 3, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(44) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80242618))) - EVT_CALL(SetNpcAnimation, 3, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, 3, 1, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, 3, 0, -1000, 0) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, 3, 0, -1000, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(init_8024360C) = { - EVT_CALL(BindNpcHit, -1, EVT_PTR(N(hit_80242138))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80241F64))) - EVT_CALL(EnableNpcShadow, 4, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(44) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80242A94))) - EVT_CALL(SetNpcAnimation, 4, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(44) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80242A94))) - EVT_CALL(SetNpcAnimation, 4, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, 4, 1, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, 4, 0, -1000, 0) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, 4, 0, -1000, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(init_8024374C) = { - EVT_CALL(BindNpcHit, -1, EVT_PTR(N(hit_80242138))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80241F64))) - EVT_CALL(EnableNpcShadow, 5, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(44) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80242F10))) - EVT_CALL(SetNpcAnimation, 5, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(44) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80242F10))) - EVT_CALL(SetNpcAnimation, 5, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, 5, 1, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, 5, 0, -1000, 0) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, 5, 0, -1000, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_8024388C) = { - .id = NPC_PETUNIA, - .settings = &N(npcSettings_80240EDC), - .pos = { -30.0f, 0.0f, 100.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_80241DA4), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - ANIM_Petunia_Idle, - }, - .tattle = MSG_NpcTattle_Petunia, -}; - -StaticNpc N(npcGroup_80243A7C) = { - .id = NPC_DAYZEE, - .settings = &N(npcSettings_80240EB0), - .pos = { -233.0f, 0.0f, -217.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_80241E10), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim02, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim06, - ANIM_Dayzee_Anim07, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - }, -}; - -StaticNpc N(npcGroup_80243C6C) = { - .id = NPC_MONTY_MOLE0, - .settings = &N(npcSettings_80240EB0), - .pos = { -100.0f, 0.0f, 210.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_8024338C), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim02, - ANIM_MontyMole_Dark_Anim03, - ANIM_MontyMole_Dark_Anim03, - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim05, - ANIM_MontyMole_Dark_Anim05, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - }, -}; - -StaticNpc N(npcGroup_80243E5C) = { - .id = NPC_MONTY_MOLE1, - .settings = &N(npcSettings_80240EB0), - .pos = { -130.0f, 0.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802434CC), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim02, - ANIM_MontyMole_Dark_Anim03, - ANIM_MontyMole_Dark_Anim03, - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim05, - ANIM_MontyMole_Dark_Anim05, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - }, -}; - -StaticNpc N(npcGroup_8024404C) = { - .id = NPC_MONTY_MOLE2, - .settings = &N(npcSettings_80240EB0), - .pos = { 75.0f, 0.0f, 20.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_8024360C), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim02, - ANIM_MontyMole_Dark_Anim03, - ANIM_MontyMole_Dark_Anim03, - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim05, - ANIM_MontyMole_Dark_Anim05, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - }, -}; - -StaticNpc N(npcGroup_8024423C) = { - .id = NPC_MONTY_MOLE3, - .settings = &N(npcSettings_80240EB0), - .pos = { 71.0f, 0.0f, 200.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_8024374C), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim02, - ANIM_MontyMole_Dark_Anim03, - ANIM_MontyMole_Dark_Anim03, - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim01, - ANIM_MontyMole_Dark_Anim05, - ANIM_MontyMole_Dark_Anim05, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - ANIM_MontyMole_Dark_Anim00, - }, -}; - -NpcGroupList N(npcGroupList_8024442C) = { - NPC_GROUP(N(npcGroup_8024388C)), - NPC_GROUP(N(npcGroup_80243A7C), 0x180F, 0x01), - NPC_GROUP(N(npcGroup_80243C6C), 0x1902, 0x01), - NPC_GROUP(N(npcGroup_80243E5C), 0x1901, 0x01), - NPC_GROUP(N(npcGroup_8024404C), 0x1903, 0x01), - NPC_GROUP(N(npcGroup_8024423C), 0x1904, 0x01), - {}, -}; - -#include "world/common/todo/StashVars.inc.c" - -#include "world/common/todo/GetItemName.inc.c" - -ApiStatus N(func_80240158_CA73F8)(Evt* script, s32 isInitialCall) { - Enemy* enemy = script->owner1.enemy; - Npc* npc = get_npc_unsafe(enemy->npcID); - - f32 clamp = clamp_angle(atan2(-210.0f, -183.0f, gPlayerStatus.position.x, gPlayerStatus.position.z) + 180.0f); - f32 sp10 = -210.0f; - f32 sp14 = -183.0f; - - f32 temp_f20; - f32 temp_f4_2; - f64 temp_f4; - f32 phi_f2; - - add_vec2D_polar(&sp10, &sp14, 46.0f, clamp); - temp_f4 = dist2D(npc->pos.x, npc->pos.z, sp10, sp14); - if (temp_f4 > 2.0) { - temp_f20 = clamp_angle(atan2(-210.0f, -183.0f, npc->pos.x, npc->pos.z)); - temp_f4_2 = temp_f20 - clamp_angle(atan2(-210.0f, -183.0f, sp10, sp14)); - if (abs(temp_f4_2) >= 0x15) { - phi_f2 = temp_f4_2; - if (temp_f4_2 >= 180.0f) { - phi_f2 = temp_f4_2 - 360.0f; - } - if (phi_f2 <= -180.0f) { - phi_f2 += 360.0f; - } - if (temp_f4_2 == phi_f2) { - sp10 = -210.0f; - sp14 = -183.0f; - if (temp_f4_2 >= 0.0f) { - clamp = clamp_angle(temp_f20 - 20.0f); - } else { - clamp = clamp_angle(temp_f20 + 20.0f); - } - add_vec2D_polar(&sp10, &sp14, 46.0f, clamp); - } - } - npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_RUN]; - npc->yaw = atan2(npc->pos.x, npc->pos.z, sp10, sp14); - npc_move_heading(npc, 2.0f, npc->yaw); - } else if (temp_f4 > 0.2) { - npc->yaw = atan2(npc->pos.x, npc->pos.z, sp10, sp14); - npc->pos.x = sp10; - npc->pos.z = sp14; - npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_WALK]; - } else { - npc->pos.x = sp10; - npc->pos.z = sp14; - npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_IDLE]; - } - return ApiStatus_BLOCK; -} - -#include "common/foliage.inc.c" - -FoliageModelList N(tree1_Leaves) = { - .count = 1, - .models = { 23 } -}; - -FoliageModelList N(tree1_Trunk) = { - .count = 1, - .models = { 22 } -}; - -FoliageDropList N(tree1_Drops) = { - .count = 2, - .drops = { - { - .itemID = ITEM_RED_BERRY, - .pos = { -256, 102, -169 }, - .spawnMode = 0xC, - .spawnFlag = AreaFlag(27), - }, - { - .itemID = ITEM_RED_BERRY, - .pos = { -156, 102, -169 }, - .spawnMode = 0xC, - .spawnFlag = AreaFlag(28), - }, - } -}; - -ShakeTreeConfig N(tree1) = { - .leaves = &N(tree1_Leaves), - .trunk = &N(tree1_Trunk), - .drops = &N(tree1_Drops), -}; - -Vec4f N(triggerCoord_80244E44) = { -208.0f, 0.0f, -182.0f, 0.0f }; - -EvtScript N(80244E54) = { - EVT_SET(AreaFlag(27), 0) - EVT_SET(AreaFlag(28), 0) - EVT_SET(LVar0, EVT_PTR(N(tree1))) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 16, 1, 0) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_80244E44)), 1, 0) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_4ECC) = { - 0x00000000, -}; - -EvtScript N(80244ED0) = { - EVT_RETURN - EVT_END -}; - -EvtScript N(makeEntities) = { - EVT_CALL(MakeEntity, &Entity_HiddenPanel, -175, 0, 150, 0, 8, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_FLO03_HiddenPanel) - EVT_RETURN - EVT_END -}; diff --git a/src/world/area_flo/flo_03/flo_03.h b/src/world/area_flo/flo_03/flo_03.h index 73b9ffa610..5ab6c0b8f2 100644 --- a/src/world/area_flo/flo_03/flo_03.h +++ b/src/world/area_flo/flo_03/flo_03.h @@ -2,21 +2,45 @@ /// @brief Flower Fields - (East) Petunia's Field #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_03_shape.h" +#include "mapfs/flo_03_hit.h" + +#include "sprite/npc/Petunia.h" +#include "sprite/npc/MontyMole.h" +#include "sprite/npc/Dayzee.h" + +enum { + NPC_Petunia = 0, + NPC_Dayzee = 1, + NPC_MontyMole_01 = 2, + NPC_MontyMole_02 = 3, + NPC_MontyMole_03 = 4, + NPC_MontyMole_04 = 5, +}; + +enum { + MV_NextBurrowTime_Mole_01 = MapVar(10), + MV_NextBurrowTime_Mole_02 = MapVar(11), + MV_NextBurrowTime_Mole_03 = MapVar(12), + MV_NextBurrowTime_Mole_04 = MapVar(13), + MV_PauseBurrowing = MapVar(14), + MV_NextBurrowTriggerRadius = MapVar(15), +}; + #define NAMESPACE flo_03 -ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240000_CA72A0)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240158_CA73F8)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240460_CA7700)(Evt* script, s32 isInitialCall); +extern EvtScript N(EVS_Main); +extern NpcGroupList N(DefaultNPCs); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_PushFlowerSong); +extern EvtScript N(EVS_PopSong); +extern EvtScript N(EVS_SetupFoliage); +extern EvtScript N(EVS_MakeEntities); -extern NpcGroupList N(npcGroupList_8024442C); -extern EvtScript N(80240FFC); -extern EvtScript N(80241EF4); -extern EvtScript N(80244E54); -extern EvtScript N(80244ED0); -extern EvtScript N(main); -extern EvtScript N(makeEntities); +extern EvtScript N(EVS_Scene_SunReturns); +extern EvtScript N(EVS_SetupMoles); +extern EvtScript N(EVS_EmptyEntityHandler); diff --git a/src/world/area_flo/flo_03/flo_03_0_header.c b/src/world/area_flo/flo_03/flo_03_0_header.c new file mode 100644 index 0000000000..c554d7426a --- /dev/null +++ b/src/world/area_flo/flo_03/flo_03_0_header.c @@ -0,0 +1,15 @@ +#include "flo_03.h" + +EntryList N(Entrances) = { + [flo_03_ENTRY_0] { -325.0, 0.0, 0.0, 90.0 }, + [flo_03_ENTRY_1] { 325.0, 0.0, 0.0, 270.0 }, + [flo_03_ENTRY_2] { -325.0, 0.0, 0.0, 90.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_03 }, +}; diff --git a/src/world/area_flo/flo_03/flo_03_1_music.c b/src/world/area_flo/flo_03/flo_03_1_music.c new file mode 100644 index 0000000000..ec976c9d85 --- /dev/null +++ b/src/world/area_flo/flo_03/flo_03_1_music.c @@ -0,0 +1,45 @@ +#include "flo_03.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_03_ENTRY_2) + EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + EVT_ELSE + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LE(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE) + EVT_CALL(SetMusicTrack, 0, SONG_MONTY_MOLE_ASSAULT, 0, 8) + EVT_ELSE + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_END_IF + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PushFlowerSong) = { + EVT_IF_GE(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, TRUE) + EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 0) + EVT_END_IF + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PopSong) = { + EVT_IF_GE(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, TRUE) + EVT_CALL(FadeOutMusic, 0, 250) + EVT_WAIT(10) + EVT_CALL(PopSong) + EVT_END_IF + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_03/flo_03_2_main.c b/src/world/area_flo/flo_03/flo_03_2_main.c new file mode 100644 index 0000000000..5d2d6ffe93 --- /dev/null +++ b/src/world/area_flo/flo_03/flo_03_2_main.c @@ -0,0 +1,51 @@ +#include "flo_03.h" +#include "effects.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_09_1) = EVT_EXIT_WALK(60, flo_03_ENTRY_0, "flo_09", flo_09_ENTRY_1); +EvtScript N(EVS_ExitWalk_flo_22_0) = EVT_EXIT_WALK(60, flo_03_ENTRY_1, "flo_22", flo_22_ENTRY_0); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_22_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_SET(AF_FLO_TreeDrop_RedBerry1, FALSE) + EVT_SET(AF_FLO_TreeDrop_RedBerry2, FALSE) + EVT_SET(AB_FLO_PetuniaDialogue, 0) + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_EXEC_WAIT(N(EVS_SetupMoles)) + EVT_EXEC(N(EVS_SetupFoliage)) + EVT_EXEC(N(EVS_EmptyEntityHandler)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o160, SURFACE_TYPE_FLOWERS) + EVT_FLOWER_SPAWN_REGION( -145, -335, 182, -180, 0) + EVT_FLOWER_SPAWN_REGION( 200, -170, 310, 150, 0) + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_03_ENTRY_2) + EVT_EXEC(N(EVS_Scene_SunReturns)) + EVT_ELSE + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_END_IF + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_03/flo_03_3_npc.c b/src/world/area_flo/flo_03/flo_03_3_npc.c new file mode 100644 index 0000000000..8855b60612 --- /dev/null +++ b/src/world/area_flo/flo_03/flo_03_3_npc.c @@ -0,0 +1,980 @@ +#include "flo_03.h" + +NpcSettings N(NpcSettings_Dayzee) = { + .height = 24, + .radius = 24, + .level = 99, +}; + +NpcSettings N(NpcSettings_Petunia) = { + .height = 56, + .radius = 40, + .level = 99, +}; + +#include "world/common/complete/GiveReward.inc.c" + +Vec3i N(BurrowLocations_Mole_01)[] = { + { -100, 0, 210 }, + { -160, 0, 285 }, + { -35, 0, 305 }, +}; + +Vec3i N(BurrowLocations_Mole_02)[] = { + { -190, 0, 80 }, + { -130, 0, 0 }, + { -70, 0, -60 }, +}; + +Vec3i N(BurrowLocations_Mole_03)[] = { + { 75, 0, -15 }, + { 35, 0, -100 }, + { 130, 0, 0 }, +}; + +Vec3i N(BurrowLocations_Mole_04)[] = { + { 115, 0, 180 }, + { 85, 0, 290 }, + { 145, 0, 140 }, +}; + +EvtScript N(EVS_Scene_SunReturns) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_CALL(SetNpcYaw, NPC_Petunia, 90) + EVT_CALL(GetNpcPos, NPC_Petunia, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.5)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, -27, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(20) + EVT_CALL(SpeakToPlayer, NPC_Petunia, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_00C8) + EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Dance) + EVT_WAIT(10) + EVT_CALL(GotoMap, EVT_PTR("flo_18"), flo_18_ENTRY_1) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +API_CALLABLE(N(HideBehindTree)) { + Enemy* enemy = script->owner1.enemy; + Npc* npc = get_npc_unsafe(enemy->npcID); + f32 posX, posZ, yaw, angle; + f64 dist; + + // get a point 46 units away from the tree on the side opposite the player + yaw = clamp_angle(atan2(-210.0f, -183.0f, gPlayerStatus.position.x, gPlayerStatus.position.z) + 180.0f); + posX = -210.0f; + posZ = -183.0f; + add_vec2D_polar(&posX, &posZ, 46.0f, yaw); + + // run or walk to target position, based on the distance from current position + dist = dist2D(npc->pos.x, npc->pos.z, posX, posZ); + if (dist > 2.0) { + f32 curAngle = clamp_angle(atan2(-210.0f, -183.0f, npc->pos.x, npc->pos.z)); + f32 targetAngle = clamp_angle(atan2(-210.0f, -183.0f, posX, posZ)); + f32 deltaAngle = curAngle - targetAngle; + if (abs(deltaAngle) > 20) { + angle = deltaAngle; + if (angle >= 180.0f) { + angle -= 360.0f; + } + if (angle <= -180.0f) { + angle += 360.0f; + } + if (deltaAngle == angle) { + posX = -210.0f; + posZ = -183.0f; + if (deltaAngle >= 0.0f) { + yaw = clamp_angle(curAngle - 20.0f); + } else { + yaw = clamp_angle(curAngle + 20.0f); + } + add_vec2D_polar(&posX, &posZ, 46.0f, yaw); + } + } + npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_RUN]; + npc->yaw = atan2(npc->pos.x, npc->pos.z, posX, posZ); + npc_move_heading(npc, 2.0f, npc->yaw); + } else if (dist > 0.2) { + npc->yaw = atan2(npc->pos.x, npc->pos.z, posX, posZ); + npc->pos.x = posX; + npc->pos.z = posZ; + npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_WALK]; + } else { + npc->pos.x = posX; + npc->pos.z = posZ; + npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_IDLE]; + } + return ApiStatus_BLOCK; +} + +EvtScript N(EVS_NpcAI_Dayzee) = { + EVT_CALL(N(HideBehindTree)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_Dayzee) = { + EVT_CALL(GetBattleOutcome, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(OUTCOME_PLAYER_WON) + EVT_SET(GF_FLO03_Defeated_Dayzee, TRUE) + EVT_CALL(DoNpcDefeat) + EVT_CASE_EQ(OUTCOME_PLAYER_LOST) + EVT_CASE_EQ(OUTCOME_PLAYER_FLED) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_FocusCamBetween) = { + EVT_CALL(GetPlayerPos, LVar3, LVar1, LVar2) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, LVar3) + EVT_DIV(LVar0, 2) + EVT_CALL(SetCamProperties, CAM_DEFAULT, LVar4, LVar0, LVar1, LVar2, 300, EVT_FLOAT(20.0), EVT_FLOAT(-9.5)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Petunia) = { + EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_SET(MV_PauseBurrowing, TRUE) + EVT_SET(LVar4, EVT_FLOAT(3.5)) + EVT_EXEC_WAIT(N(EVS_FocusCamBetween)) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0050) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_NodYes) + EVT_WAIT(20) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0051) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim12) + EVT_CALL(SetNpcYaw, NPC_MontyMole_01, 270) + EVT_CALL(GetNpcPos, NPC_MontyMole_01, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(20) + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, 0) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim16) + EVT_WAIT(10) + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_263, 0) + EVT_CALL(ShowEmote, NPC_MontyMole_01, EMOTE_QUESTION, -45, 30, TRUE, 0, 0, 0, 0) + EVT_CALL(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0052) + EVT_CALL(SetNpcYaw, NPC_MontyMole_02, 90) + EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim00) + EVT_WAIT(20) + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, 0) + EVT_CALL(SetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + EVT_WAIT(20) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0053) + EVT_CALL(SetNpcYaw, NPC_MontyMole_03, 270) + EVT_CALL(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(20) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim14) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0054) + EVT_CALL(SetNpcYaw, NPC_MontyMole_04, 270) + EVT_CALL(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim06) + EVT_WAIT(20) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim07) + EVT_WAIT(20) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim08) + EVT_WAIT(20) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim16) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0055) + EVT_CALL(SetNpcPos, NPC_Dayzee, -233, 0, -217) + EVT_CALL(GetNpcPos, NPC_Dayzee, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SetNpcAnimation, NPC_Dayzee, ANIM_Dayzee_Anim0D) + EVT_CALL(PlaySoundAtNpc, NPC_Dayzee, SOUND_262, 0) + EVT_CALL(ShowEmote, NPC_Dayzee, EMOTE_EXCLAMATION, 45, 30, TRUE, 0, 0, 0, 0) + EVT_WAIT(15) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0056) + EVT_SET(LVar4, EVT_FLOAT(90.0)) + EVT_EXEC_WAIT(N(EVS_FocusCamBetween)) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0057) + EVT_CALL(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAGS_1, 0) + EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAGS_1, 0) + EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAGS_1, 0) + EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAGS_1, 0) + EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAGS_1, 0) + EVT_CALL(BindNpcAI, NPC_Dayzee, EVT_PTR(N(EVS_NpcAI_Dayzee))) + EVT_SET(MV_PauseBurrowing, FALSE) + EVT_SET(MV_NextBurrowTriggerRadius, 60) + EVT_SET(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0058) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) + EVT_ELSE + EVT_SET(LVar4, EVT_FLOAT(3.5)) + EVT_EXEC_WAIT(N(EVS_FocusCamBetween)) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_HappyTalk, ANIM_Petunia_Dance, 0, MSG_CH6_0059) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_GiveItem) + EVT_WAIT(20) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Idle) + EVT_GIVE_KEY_REWARD(ITEM_MAGICAL_BEAN) + EVT_WAIT(20) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005A) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0) + EVT_SET(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + EVT_END_IF + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005B) + EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005C) + EVT_CASE_DEFAULT + EVT_IF_EQ(AB_FLO_PetuniaDialogue, 0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005D) + EVT_SET(AB_FLO_PetuniaDialogue, 1) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005E) + EVT_END_IF + EVT_END_SWITCH + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(8.0)) + EVT_EXEC_WAIT(N(EVS_PopSong)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Petunia) = { + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Petunia))) + EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE) + EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry) + EVT_ELSE + EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Dayzee) = { + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Dayzee))) + EVT_CALL(EnableNpcShadow, NPC_Dayzee, FALSE) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_CALL(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION) + EVT_CASE_DEFAULT + EVT_IF_EQ(GF_FLO03_Defeated_Dayzee, FALSE) + EVT_CALL(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAGS_1, 0) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Dayzee))) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupMoles) = { + EVT_SET(MV_PauseBurrowing, FALSE) + EVT_SET(MV_NextBurrowTime_Mole_01, 0) + EVT_SET(MV_NextBurrowTime_Mole_02, 0) + EVT_SET(MV_NextBurrowTime_Mole_03, 0) + EVT_SET(MV_NextBurrowTime_Mole_04, 0) + EVT_SET(MV_NextBurrowTriggerRadius, 100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_MontyMole) = { + EVT_CALL(GetBattleOutcome, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(OUTCOME_PLAYER_WON) + // record defeat + EVT_CALL(GetSelfNpcID, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(NPC_MontyMole_01) + EVT_SET(GF_FLO03_Defeated_MontyMoleA, TRUE) + EVT_CASE_EQ(NPC_MontyMole_02) + EVT_SET(GF_FLO03_Defeated_MontyMoleB, TRUE) + EVT_CASE_EQ(NPC_MontyMole_03) + EVT_SET(GF_FLO03_Defeated_MontyMoleC, TRUE) + EVT_CASE_EQ(NPC_MontyMole_04) + EVT_SET(GF_FLO03_Defeated_MontyMoleD, TRUE) + EVT_END_SWITCH + // count number of defeated moles + EVT_SET(LVar0, 0) + EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleA) + EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleB) + EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleC) + EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleD) + // end the mole-hunting minigame if all 4 are defeated + EVT_IF_NE(LVar0, 4) + EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry) + EVT_ELSE + EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle) + EVT_SET(GF_FLO03_DefeatedAll_MontyMoles, TRUE) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_END_IF + EVT_CALL(DoNpcDefeat) + EVT_CASE_EQ(OUTCOME_PLAYER_LOST) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) + EVT_CASE_EQ(OUTCOME_PLAYER_FLED) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcHit_MontyMole) = { + EVT_IF_EQ(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_CALL(GetOwnerEncounterTrigger, LVar0) + EVT_IF_NE(LVar0, ENCOUNTER_TRIGGER_NONE) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim05) + EVT_END_IF + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcIdle_MontyMole_01) = { + #define LV_ShouldBurrow LVar3 + EVT_LOOP(0) + EVT_IF_EQ(MV_NextBurrowTime_Mole_01, 0) + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, TRUE) + EVT_GOTO(0) + EVT_END_IF + EVT_SET(LV_ShouldBurrow, TRUE) + EVT_ELSE + EVT_LABEL(0) + EVT_CALL(GetNpcPos, NPC_MontyMole_01, LVar0, LVar1, LVar2) + EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EVT_END_IF + EVT_CALL(GetCurrentPartner, LVar9) + EVT_IF_EQ(LVar9, PARTNER_BOW) + EVT_SET(LVar3, FALSE) + EVT_END_IF + EVT_IF_EQ(MV_PauseBurrowing, TRUE) + EVT_SET(LV_ShouldBurrow, FALSE) + EVT_END_IF + EVT_IF_EQ(LV_ShouldBurrow, TRUE) + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, FALSE) + EVT_CALL(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE) + EVT_CALL(NpcFacePlayer, NPC_MontyMole_01, 1) + EVT_WAIT(1) + EVT_SET(AF_FLO_IsUnderground_Mole_01, TRUE) + EVT_IF_NE(MV_NextBurrowTime_Mole_01, 0) + EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_SET(LVar1, 4) + EVT_ELSE + EVT_SET(LVar1, 10) + EVT_END_IF + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_262, 0) + EVT_CALL(ShowEmote, NPC_MontyMole_01, EMOTE_EXCLAMATION, 0, LVar1, TRUE, 0, 0, 0, 0) + EVT_WAIT(LVar1) + EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 1) + EVT_END_IF + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_DIG, 0) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim11) + EVT_WAIT(20) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE) + EVT_CALL(SetNpcPos, NPC_MontyMole_01, 0, -50, 0) + EVT_END_IF + EVT_WAIT(45) + EVT_END_IF + EVT_ELSE + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, TRUE) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE) + EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_01)) - 1, LVar0) + EVT_ADD(LVar0, 1) + EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_01))) + EVT_LOOP(LVar0) + EVT_BUF_READ3(LVar1, LVar2, LVar3) + EVT_END_LOOP + EVT_CALL(SetNpcPos, NPC_MontyMole_01, LVar1, LVar2, LVar3) + EVT_END_IF + EVT_CALL(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE) + EVT_SET(AF_FLO_IsUnderground_Mole_01, FALSE) + EVT_CALL(NpcFacePlayer, NPC_MontyMole_01, 1) + EVT_WAIT(1) + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, 0) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) + EVT_WAIT(10) + EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 0) + EVT_CALL(RandInt, 30, LVar0) + EVT_ADD(LVar0, 60) + EVT_SET(MV_NextBurrowTime_Mole_01, LVar0) + EVT_ELSE + EVT_IF_GT(MV_NextBurrowTime_Mole_01, 0) + EVT_SUB(MV_NextBurrowTime_Mole_01, 1) + EVT_END_IF + EVT_END_IF + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcIdle_MontyMole_02) = { + #define LV_ShouldBurrow LVar3 + EVT_LOOP(0) + EVT_IF_EQ(MV_NextBurrowTime_Mole_02, 0) + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, TRUE) + EVT_GOTO(0) + EVT_END_IF + EVT_SET(LV_ShouldBurrow, TRUE) + EVT_ELSE + EVT_LABEL(0) + EVT_CALL(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) + EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EVT_END_IF + EVT_CALL(GetCurrentPartner, LVar9) + EVT_IF_EQ(LVar9, PARTNER_BOW) + EVT_SET(LV_ShouldBurrow, FALSE) + EVT_END_IF + EVT_IF_EQ(MV_PauseBurrowing, TRUE) + EVT_SET(LV_ShouldBurrow, FALSE) + EVT_END_IF + EVT_IF_EQ(LV_ShouldBurrow, TRUE) + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, FALSE) + EVT_CALL(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE) + EVT_CALL(NpcFacePlayer, NPC_MontyMole_02, 1) + EVT_WAIT(1) + EVT_SET(AF_FLO_IsUnderground_Mole_02, TRUE) + EVT_IF_NE(MV_NextBurrowTime_Mole_02, 0) + EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_SET(LVar1, 4) + EVT_ELSE + EVT_SET(LVar1, 10) + EVT_END_IF + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_262, 0) + EVT_CALL(ShowEmote, NPC_MontyMole_02, EMOTE_EXCLAMATION, 0, LVar1, TRUE, 0, 0, 0, 0) + EVT_WAIT(LVar1) + EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 1) + EVT_END_IF + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_DIG, 0) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim11) + EVT_WAIT(20) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE) + EVT_CALL(SetNpcPos, NPC_MontyMole_02, 0, -50, 0) + EVT_END_IF + EVT_WAIT(45) + EVT_END_IF + EVT_ELSE + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, TRUE) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE) + EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_02)) - 1, LVar0) + EVT_ADD(LVar0, 1) + EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_02))) + EVT_LOOP(LVar0) + EVT_BUF_READ3(LVar1, LVar2, LVar3) + EVT_END_LOOP + EVT_CALL(SetNpcPos, NPC_MontyMole_02, LVar1, LVar2, LVar3) + EVT_END_IF + EVT_CALL(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE) + EVT_SET(AF_FLO_IsUnderground_Mole_02, FALSE) + EVT_CALL(NpcFacePlayer, NPC_MontyMole_02, 1) + EVT_WAIT(1) + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, 0) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + EVT_WAIT(10) + EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 0) + EVT_CALL(RandInt, 35, LVar0) + EVT_ADD(LVar0, 55) + EVT_SET(MV_NextBurrowTime_Mole_02, LVar0) + EVT_ELSE + EVT_IF_GT(MV_NextBurrowTime_Mole_02, 0) + EVT_SUB(MV_NextBurrowTime_Mole_02, 1) + EVT_END_IF + EVT_END_IF + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcIdle_MontyMole_03) = { + #define LV_ShouldBurrow LVar3 + EVT_LOOP(0) + EVT_IF_EQ(MV_NextBurrowTime_Mole_03, 0) + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, TRUE) + EVT_GOTO(0) + EVT_END_IF + EVT_SET(LV_ShouldBurrow, TRUE) + EVT_ELSE + EVT_LABEL(0) + EVT_CALL(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2) + EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EVT_END_IF + EVT_CALL(GetCurrentPartner, LVar9) + EVT_IF_EQ(LVar9, PARTNER_BOW) + EVT_SET(LV_ShouldBurrow, FALSE) + EVT_END_IF + EVT_IF_EQ(MV_PauseBurrowing, TRUE) + EVT_SET(LV_ShouldBurrow, FALSE) + EVT_END_IF + EVT_IF_EQ(LV_ShouldBurrow, TRUE) + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, FALSE) + EVT_CALL(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE) + EVT_CALL(NpcFacePlayer, NPC_MontyMole_03, 1) + EVT_WAIT(1) + EVT_SET(AF_FLO_IsUnderground_Mole_03, TRUE) + EVT_IF_NE(MV_NextBurrowTime_Mole_03, 0) + EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_SET(LVar1, 4) + EVT_ELSE + EVT_SET(LVar1, 10) + EVT_END_IF + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_262, 0) + EVT_CALL(ShowEmote, NPC_MontyMole_03, EMOTE_EXCLAMATION, 0, LVar1, TRUE, 0, 0, 0, 0) + EVT_WAIT(LVar1) + EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 1) + EVT_END_IF + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_DIG, 0) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim11) + EVT_WAIT(20) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE) + EVT_CALL(SetNpcPos, NPC_MontyMole_03, 0, -50, 0) + EVT_END_IF + EVT_WAIT(45) + EVT_END_IF + EVT_ELSE + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, TRUE) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE) + EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_03)) - 1, LVar0) + EVT_ADD(LVar0, 1) + EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_03))) + EVT_LOOP(LVar0) + EVT_BUF_READ3(LVar1, LVar2, LVar3) + EVT_END_LOOP + EVT_CALL(SetNpcPos, NPC_MontyMole_03, LVar1, LVar2, LVar3) + EVT_END_IF + EVT_CALL(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE) + EVT_SET(AF_FLO_IsUnderground_Mole_03, FALSE) + EVT_CALL(NpcFacePlayer, NPC_MontyMole_03, 1) + EVT_WAIT(1) + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_SURFACE, 0) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) + EVT_WAIT(10) + EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 0) + EVT_CALL(RandInt, 40, LVar0) + EVT_ADD(LVar0, 50) + EVT_SET(MV_NextBurrowTime_Mole_03, LVar0) + EVT_ELSE + EVT_IF_GT(MV_NextBurrowTime_Mole_03, 0) + EVT_SUB(MV_NextBurrowTime_Mole_03, 1) + EVT_END_IF + EVT_END_IF + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcIdle_MontyMole_04) = { + #define LV_ShouldBurrow LVar3 + EVT_LOOP(0) + EVT_IF_EQ(MV_NextBurrowTime_Mole_04, 0) + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, TRUE) + EVT_GOTO(0) + EVT_END_IF + EVT_SET(LV_ShouldBurrow, TRUE) + EVT_ELSE + EVT_LABEL(0) + EVT_CALL(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2) + EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EVT_END_IF + EVT_CALL(GetCurrentPartner, LVar9) + EVT_IF_EQ(LVar9, PARTNER_BOW) + EVT_SET(LV_ShouldBurrow, FALSE) + EVT_END_IF + EVT_IF_EQ(MV_PauseBurrowing, TRUE) + EVT_SET(LV_ShouldBurrow, FALSE) + EVT_END_IF + EVT_IF_EQ(LV_ShouldBurrow, TRUE) + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, FALSE) + EVT_CALL(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE) + EVT_CALL(NpcFacePlayer, NPC_MontyMole_04, 1) + EVT_WAIT(1) + EVT_SET(AF_FLO_IsUnderground_Mole_04, TRUE) + EVT_IF_NE(MV_NextBurrowTime_Mole_04, 0) + EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_SET(LVar1, 4) + EVT_ELSE + EVT_SET(LVar1, 10) + EVT_END_IF + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_262, 0) + EVT_CALL(ShowEmote, NPC_MontyMole_04, EMOTE_EXCLAMATION, 0, LVar1, TRUE, 0, 0, 0, 0) + EVT_WAIT(LVar1) + EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 1) + EVT_END_IF + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_DIG, 0) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim11) + EVT_WAIT(20) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE) + EVT_CALL(SetNpcPos, NPC_MontyMole_04, 0, -50, 0) + EVT_END_IF + EVT_WAIT(45) + EVT_END_IF + EVT_ELSE + EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, TRUE) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE) + EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_04)) - 1, LVar0) + EVT_ADD(LVar0, 1) + EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_04))) + EVT_LOOP(LVar0) + EVT_BUF_READ3(LVar1, LVar2, LVar3) + EVT_END_LOOP + EVT_CALL(SetNpcPos, NPC_MontyMole_04, LVar1, LVar2, LVar3) + EVT_END_IF + EVT_CALL(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE) + EVT_SET(AF_FLO_IsUnderground_Mole_04, FALSE) + EVT_CALL(NpcFacePlayer, NPC_MontyMole_04, 1) + EVT_WAIT(1) + EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_SURFACE, 0) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) + EVT_WAIT(10) + EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 0) + EVT_CALL(RandInt, 45, LVar0) + EVT_ADD(LVar0, 45) + EVT_SET(MV_NextBurrowTime_Mole_04, LVar0) + EVT_ELSE + EVT_IF_GT(MV_NextBurrowTime_Mole_04, 0) + EVT_SUB(MV_NextBurrowTime_Mole_04, 1) + EVT_END_IF + EVT_END_IF + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_MontyMole_01) = { + EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) + EVT_CALL(EnableNpcShadow, NPC_MontyMole_01, FALSE) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_01))) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) + EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_01))) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) + EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAGS_1, 0) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_CASE_DEFAULT + EVT_CALL(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_MontyMole_02) = { + EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) + EVT_CALL(EnableNpcShadow, NPC_MontyMole_02, FALSE) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_02))) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_02))) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAGS_1, 0) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_CASE_DEFAULT + EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_MontyMole_03) = { + EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) + EVT_CALL(EnableNpcShadow, NPC_MontyMole_03, FALSE) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_03))) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) + EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_03))) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) + EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAGS_1, 0) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_CASE_DEFAULT + EVT_CALL(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_MontyMole_04) = { + EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) + EVT_CALL(EnableNpcShadow, NPC_MontyMole_04, FALSE) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_04))) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) + EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_04))) + EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) + EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAGS_1, 0) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_CASE_DEFAULT + EVT_CALL(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_Petunia) = { + .id = NPC_Petunia, + .settings = &N(NpcSettings_Petunia), + .pos = { -30.0f, 0.0f, 100.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Petunia), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_Petunia_Idle, + .walk = ANIM_Petunia_Idle, + .run = ANIM_Petunia_Idle, + .chase = ANIM_Petunia_Idle, + .anim_4 = ANIM_Petunia_Idle, + .anim_5 = ANIM_Petunia_Idle, + .death = ANIM_Petunia_Idle, + .hit = ANIM_Petunia_Idle, + .anim_8 = ANIM_Petunia_Idle, + .anim_9 = ANIM_Petunia_Idle, + .anim_A = ANIM_Petunia_Idle, + .anim_B = ANIM_Petunia_Idle, + .anim_C = ANIM_Petunia_Idle, + .anim_D = ANIM_Petunia_Idle, + .anim_E = ANIM_Petunia_Idle, + .anim_F = ANIM_Petunia_Idle, + }, + .tattle = MSG_NpcTattle_Petunia, +}; + +StaticNpc N(NpcData_Dayzee) = { + .id = NPC_Dayzee, + .settings = &N(NpcSettings_Dayzee), + .pos = { -233.0f, 0.0f, -217.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Dayzee), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_Dayzee_Anim01, + .walk = ANIM_Dayzee_Anim02, + .run = ANIM_Dayzee_Anim03, + .chase = ANIM_Dayzee_Anim03, + .anim_4 = ANIM_Dayzee_Anim01, + .anim_5 = ANIM_Dayzee_Anim01, + .death = ANIM_Dayzee_Anim08, + .hit = ANIM_Dayzee_Anim08, + .anim_8 = ANIM_Dayzee_Anim06, + .anim_9 = ANIM_Dayzee_Anim07, + .anim_A = ANIM_Dayzee_Anim01, + .anim_B = ANIM_Dayzee_Anim01, + .anim_C = ANIM_Dayzee_Anim01, + .anim_D = ANIM_Dayzee_Anim01, + .anim_E = ANIM_Dayzee_Anim01, + .anim_F = ANIM_Dayzee_Anim01, + }, +}; + +StaticNpc N(NpcData_MontyMole_01) = { + .id = NPC_MontyMole_01, + .settings = &N(NpcSettings_Dayzee), + .pos = { -100.0f, 0.0f, 210.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_MontyMole_01), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_MontyMole_Dark_Anim01, + .walk = ANIM_MontyMole_Dark_Anim02, + .run = ANIM_MontyMole_Dark_Anim03, + .chase = ANIM_MontyMole_Dark_Anim03, + .anim_4 = ANIM_MontyMole_Dark_Anim01, + .anim_5 = ANIM_MontyMole_Dark_Anim01, + .death = ANIM_MontyMole_Dark_Anim05, + .hit = ANIM_MontyMole_Dark_Anim05, + .anim_8 = ANIM_MontyMole_Dark_Anim00, + .anim_9 = ANIM_MontyMole_Dark_Anim00, + .anim_A = ANIM_MontyMole_Dark_Anim00, + .anim_B = ANIM_MontyMole_Dark_Anim00, + .anim_C = ANIM_MontyMole_Dark_Anim00, + .anim_D = ANIM_MontyMole_Dark_Anim00, + .anim_E = ANIM_MontyMole_Dark_Anim00, + .anim_F = ANIM_MontyMole_Dark_Anim00, + }, +}; + +StaticNpc N(NpcData_MontyMole_02) = { + .id = NPC_MontyMole_02, + .settings = &N(NpcSettings_Dayzee), + .pos = { -130.0f, 0.0f, 0.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_MontyMole_02), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_MontyMole_Dark_Anim01, + .walk = ANIM_MontyMole_Dark_Anim02, + .run = ANIM_MontyMole_Dark_Anim03, + .chase = ANIM_MontyMole_Dark_Anim03, + .anim_4 = ANIM_MontyMole_Dark_Anim01, + .anim_5 = ANIM_MontyMole_Dark_Anim01, + .death = ANIM_MontyMole_Dark_Anim05, + .hit = ANIM_MontyMole_Dark_Anim05, + .anim_8 = ANIM_MontyMole_Dark_Anim00, + .anim_9 = ANIM_MontyMole_Dark_Anim00, + .anim_A = ANIM_MontyMole_Dark_Anim00, + .anim_B = ANIM_MontyMole_Dark_Anim00, + .anim_C = ANIM_MontyMole_Dark_Anim00, + .anim_D = ANIM_MontyMole_Dark_Anim00, + .anim_E = ANIM_MontyMole_Dark_Anim00, + .anim_F = ANIM_MontyMole_Dark_Anim00, + }, +}; + +StaticNpc N(NpcData_MontyMole_03) = { + .id = NPC_MontyMole_03, + .settings = &N(NpcSettings_Dayzee), + .pos = { 75.0f, 0.0f, 20.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_MontyMole_03), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_MontyMole_Dark_Anim01, + .walk = ANIM_MontyMole_Dark_Anim02, + .run = ANIM_MontyMole_Dark_Anim03, + .chase = ANIM_MontyMole_Dark_Anim03, + .anim_4 = ANIM_MontyMole_Dark_Anim01, + .anim_5 = ANIM_MontyMole_Dark_Anim01, + .death = ANIM_MontyMole_Dark_Anim05, + .hit = ANIM_MontyMole_Dark_Anim05, + .anim_8 = ANIM_MontyMole_Dark_Anim00, + .anim_9 = ANIM_MontyMole_Dark_Anim00, + .anim_A = ANIM_MontyMole_Dark_Anim00, + .anim_B = ANIM_MontyMole_Dark_Anim00, + .anim_C = ANIM_MontyMole_Dark_Anim00, + .anim_D = ANIM_MontyMole_Dark_Anim00, + .anim_E = ANIM_MontyMole_Dark_Anim00, + .anim_F = ANIM_MontyMole_Dark_Anim00, + }, +}; + +StaticNpc N(NpcData_MontyMole_04) = { + .id = NPC_MontyMole_04, + .settings = &N(NpcSettings_Dayzee), + .pos = { 71.0f, 0.0f, 200.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_MontyMole_04), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_MontyMole_Dark_Anim01, + .walk = ANIM_MontyMole_Dark_Anim02, + .run = ANIM_MontyMole_Dark_Anim03, + .chase = ANIM_MontyMole_Dark_Anim03, + .anim_4 = ANIM_MontyMole_Dark_Anim01, + .anim_5 = ANIM_MontyMole_Dark_Anim01, + .death = ANIM_MontyMole_Dark_Anim05, + .hit = ANIM_MontyMole_Dark_Anim05, + .anim_8 = ANIM_MontyMole_Dark_Anim00, + .anim_9 = ANIM_MontyMole_Dark_Anim00, + .anim_A = ANIM_MontyMole_Dark_Anim00, + .anim_B = ANIM_MontyMole_Dark_Anim00, + .anim_C = ANIM_MontyMole_Dark_Anim00, + .anim_D = ANIM_MontyMole_Dark_Anim00, + .anim_E = ANIM_MontyMole_Dark_Anim00, + .anim_F = ANIM_MontyMole_Dark_Anim00, + }, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Petunia)), + NPC_GROUP(N(NpcData_Dayzee), BTL_FLO_FORMATION_0F, BTL_FLO_STAGE_01), + NPC_GROUP(N(NpcData_MontyMole_01), BTL_FLO2_FORMATION_02, BTL_FLO2_STAGE_01), + NPC_GROUP(N(NpcData_MontyMole_02), BTL_FLO2_FORMATION_01, BTL_FLO2_STAGE_01), + NPC_GROUP(N(NpcData_MontyMole_03), BTL_FLO2_FORMATION_03, BTL_FLO2_STAGE_01), + NPC_GROUP(N(NpcData_MontyMole_04), BTL_FLO2_FORMATION_04, BTL_FLO2_STAGE_01), + {} +}; diff --git a/src/world/area_flo/flo_03/flo_03_4_foliage.c b/src/world/area_flo/flo_03/flo_03_4_foliage.c new file mode 100644 index 0000000000..6d7a967c87 --- /dev/null +++ b/src/world/area_flo/flo_03/flo_03_4_foliage.c @@ -0,0 +1,56 @@ +#include "flo_03.h" + +#include "common/foliage.inc.c" + +FoliageModelList N(Tree1_LeafModels) = { + .count = 1, + .models = { + MODEL_o170, + } +}; + +FoliageModelList N(Tree1_TrunkModels) = { + .count = 1, + .models = { + MODEL_o157, + } +}; + +FoliageDropList N(Tree1_Drops) = { + .count = 2, + .drops = { + { + .itemID = ITEM_RED_BERRY, + .pos = { -256, 102, -169 }, + .spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, + .spawnFlag = AF_FLO_TreeDrop_RedBerry1, + }, + { + .itemID = ITEM_RED_BERRY, + .pos = { -156, 102, -169 }, + .spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, + .spawnFlag = AF_FLO_TreeDrop_RedBerry2, + }, + } +}; + +ShakeTreeConfig N(ShakeTree_Tree1) = { + .leaves = &N(Tree1_LeafModels), + .trunk = &N(Tree1_TrunkModels), + .drops = &N(Tree1_Drops), +}; + +BombTrigger N(BombPos_Tree1) = { + .pos = { -208.0f, 0.0f, -182.0f }, + .radius = 0.0f +}; + +EvtScript N(EVS_SetupFoliage) = { + EVT_SET(AF_FLO_TreeDrop_RedBerry1, FALSE) + EVT_SET(AF_FLO_TreeDrop_RedBerry2, FALSE) + EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o242, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_03/flo_03_5_entity.c b/src/world/area_flo/flo_03/flo_03_5_entity.c new file mode 100644 index 0000000000..3afdd35e57 --- /dev/null +++ b/src/world/area_flo/flo_03/flo_03_5_entity.c @@ -0,0 +1,14 @@ +#include "flo_03.h" +#include "entity.h" + +EvtScript N(EVS_EmptyEntityHandler) = { + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_MakeEntities) = { + EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -175, 0, 150, 0, MODEL_o56, MAKE_ENTITY_END) + EVT_CALL(AssignPanelFlag, GF_FLO03_HiddenPanel) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_07/CAC1F0.c b/src/world/area_flo/flo_07/CAC1F0.c deleted file mode 100644 index a1207f8a36..0000000000 --- a/src/world/area_flo/flo_07/CAC1F0.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "flo_07.h" -#include "effects.h" - -#include "world/common/atomic/TexturePan.inc.c" - -#include "world/common/todo/SpawnSunEffect.inc.c" - -ApiStatus N(func_80240344_CAC534)(Evt* script, s32 isInitialCall) { - EffectInstance* effect = fx_misc_particles(3, -272.0f, 80.0f, 20.0f, 200.0f, 120.0f, 4.0f, 8, 0); - - effect->data.miscParticles->unk_38 = 240; - effect->data.miscParticles->unk_3C = 240; - effect->data.miscParticles->unk_40 = 240; - effect->data.miscParticles->unk_48 = 230; - effect->data.miscParticles->unk_4C = 230; - effect->data.miscParticles->unk_50 = 240; - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_07/CAC5D0.c b/src/world/area_flo/flo_07/CAC5D0.c deleted file mode 100644 index 1d6c7270cf..0000000000 --- a/src/world/area_flo/flo_07/CAC5D0.c +++ /dev/null @@ -1,521 +0,0 @@ -#include "flo_07.h" -#include "message_ids.h" -#include "sprite/npc/Posie.h" - -enum { - NPC_POSIE, -}; - -EntryList N(entryList) = { - { 375.0f, 0.0f, 0.0f, 270.0f }, - { 325.0f, 0.0f, 0.0f, 270.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_07 }, -}; - -EvtScript N(802407A0) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(PlaySound, 0x80000021) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024086C) = { - EVT_CALL(PushSong, 137, 1) - EVT_RETURN - EVT_END -}; - -EvtScript N(80240890) = { - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_8CC) = { - 0x00000000, -}; - -EvtScript N(updateTexturePan_802408D0) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_IF_EQ(LVar5, 1) - EVT_IF_EQ(LVar6, 1) - EVT_IF_EQ(LVar7, 1) - EVT_IF_EQ(LVar8, 1) - EVT_CALL(N(UpdateTexturePanSmooth)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(UpdateTexturePanStepped)) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024096C) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_80240C18) = EVT_EXIT_WALK(60, 0, "flo_25", 1); - -EvtScript N(80240C74) = { - EVT_BIND_TRIGGER(N(exitWalk_80240C18), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_SET(AreaFlag(6), 0) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80242B0C))) - EVT_EXEC_WAIT(N(802428C4)) - EVT_CALL(ModifyColliderFlags, 3, 6, 0x00000006) - EVT_SET(LVar0, 297) - EVT_SET(LVar1, -95) - EVT_SET(LVar2, 383) - EVT_SET(LVar3, -65) - EVT_SET(LVar4, 0) - EVT_EXEC(N(8024096C)) - EVT_SET(LVar0, 293) - EVT_SET(LVar1, 71) - EVT_SET(LVar2, 378) - EVT_SET(LVar3, 113) - EVT_SET(LVar4, 0) - EVT_EXEC(N(8024096C)) - EVT_SET(LVar0, 21) - EVT_SET(LVar1, -346) - EVT_SET(LVar2, 147) - EVT_SET(LVar3, -242) - EVT_SET(LVar4, 20) - EVT_EXEC(N(8024096C)) - EVT_SET(LVar0, -350) - EVT_SET(LVar1, -190) - EVT_SET(LVar2, -81) - EVT_SET(LVar3, -106) - EVT_SET(LVar4, 0) - EVT_EXEC(N(8024096C)) - EVT_SET(LVar0, -380) - EVT_SET(LVar1, 85) - EVT_SET(LVar2, -95) - EVT_SET(LVar3, 150) - EVT_SET(LVar4, 0) - EVT_EXEC(N(8024096C)) - EVT_CALL(EnableTexPanning, 51, 1) - EVT_CALL(EnableTexPanning, 49, 1) - EVT_CALL(EnableTexPanning, 50, 1) - EVT_THREAD - EVT_SET(LVar0, 2) - EVT_SET(LVar1, -100) - EVT_SET(LVar2, 100) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_802408D0)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 3) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -1200) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_802408D0)) - EVT_END_THREAD - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC(N(80241C14)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80240C74))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(802424F4)) - EVT_END_IF - EVT_EXEC_WAIT(N(802407A0)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_CALL(N(func_80240344_CAC534)) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_1214)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -NpcSettings N(npcSettings_80241220) = { - .height = 56, - .radius = 40, - .level = 99, -}; - -#include "common/foliage.inc.c" - -s32** N(varStash) = NULL; - -EvtScript N(80241BB4) = { - EVT_CALL(ShowGotItem, LVar0, 1, 0) - EVT_RETURN - EVT_RETURN - EVT_END -}; - -EvtScript N(80241BE4) = { - EVT_CALL(ShowGotItem, LVar0, 1, 16) - EVT_RETURN - EVT_RETURN - EVT_END -}; - -EvtScript N(80241C14) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetNpcPos, 0, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 300) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(11.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, 0, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_00C5) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_10"), 1) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241D6C) = { - EVT_LABEL(0) - EVT_CALL(ShakeCam, 0, 0, 1, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241DBC) = { - EVT_IF_EQ(AreaFlag(6), 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, 0, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0068) - EVT_THREAD - EVT_CALL(SetCamDistance, 0, 300) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(0.5)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_END_THREAD - EVT_CALL(PlaySound, 0x8000006B) - EVT_EXEC_GET_TID(N(80241D6C), MapVar(0)) - EVT_CALL(SpeakToPlayer, 0, ANIM_Posie_Strain, ANIM_Posie_Strain, 0, MSG_CH6_0069) - EVT_KILL_THREAD(MapVar(0)) - EVT_CALL(SetCamDistance, 0, 350) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(8.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, LVar2) - EVT_IF_LT(LVar0, -250) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 100, -25, 13, GF_FLO07_Item_CrystalBerry) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 100, 54, 13, GF_FLO07_Item_CrystalBerry) - EVT_SET(GF_FLO07_CrystalBerryFellOnLeftSide, 1) - EVT_END_IF - EVT_CALL(PlaySound, 0x7BC) - EVT_CALL(func_802D62E4, 956) - EVT_SET(AreaFlag(6), 1) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, 0, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006A) - EVT_SET(GB_StoryProgress, 47) - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_80242044) = { - EVT_EXEC_WAIT(N(8024086C)) - EVT_CALL(NpcFacePlayer, NPC_SELF, 1) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(45) - EVT_IF_EQ(AreaFlag(5), 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0070) - EVT_SET(AreaFlag(5), 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0071) - EVT_END_IF - EVT_CASE_LT(46) - EVT_CALL(AdjustCam, 0, EVT_FLOAT(4.0), 0, EVT_FLOAT(350.0), EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0065) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Posie_GiveItem) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Posie_Still) - EVT_SET(LVar0, 89) - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(80241BB4)) - EVT_CALL(AddKeyItem, ITEM_FERTILE_SOIL) - EVT_SET(GB_StoryProgress, 46) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0066) - EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, 1) - EVT_EXEC_WAIT(N(80241DBC)) - EVT_END_IF - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_CASE_LT(47) - EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, 1) - EVT_IF_EQ(AreaFlag(6), 0) - EVT_CALL(AdjustCam, 0, EVT_FLOAT(4.0), 0, EVT_FLOAT(350.0), EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_EXEC_WAIT(N(80241DBC)) - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) - EVT_END_IF - EVT_CASE_LT(53) - EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) - EVT_ELSE - EVT_IF_LT(GB_StoryProgress, 48) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0073) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0074) - EVT_END_IF - EVT_CALL(ContinueSpeech, -1, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0075) - EVT_END_IF - EVT_CASE_LT(60) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0076) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0077) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(80240890)) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80242428) = { - EVT_IF_EQ(GB_StoryProgress, 47) - EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, 0) - EVT_IF_EQ(GF_FLO07_CrystalBerryFellOnLeftSide, 0) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 0, -25, 17, GF_FLO07_Item_CrystalBerry) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 0, 54, 17, GF_FLO07_Item_CrystalBerry) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SET(AreaFlag(5), 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80242044))) - EVT_RETURN - EVT_END -}; - -EvtScript N(802424F4) = { - EVT_IF_NE(AreaByte(3), 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_IF_LT(AreaByte(3), 5) - EVT_CALL(SpeakToPlayer, 0, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006E) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(PlayerMoveTo, 410, LVar3, 10) - EVT_ADD(AreaByte(3), 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, 0, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006F) - EVT_SET(AreaByte(3), 0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -extern const char N(flo_25_name_hack)[]; - -EvtScript N(tree1_Callback) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_LT(GB_StoryProgress, 47) - EVT_CALL(NpcFacePlayer, 0, 1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, 0, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) - EVT_IF_EQ(GB_StoryProgress, 46) - EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, 1) - EVT_CALL(UseSettingsFrom, 0, -250, 0, 0) - EVT_CALL(SetPanTarget, 0, -250, 0, 0) - EVT_CALL(SetCamDistance, 0, 350) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_EXEC_WAIT(N(80241DBC)) - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, 0) - EVT_CALL(NpcFacePlayer, 0, 1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, 0, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) - EVT_ELSE - EVT_ADD(AreaByte(2), 1) - EVT_SWITCH(AreaByte(2)) - EVT_CASE_LT(2) - EVT_CALL(SpeakToPlayer, 0, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006B) - EVT_CASE_LT(5) - EVT_CALL(SpeakToPlayer, 0, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006C) - EVT_CASE_GE(5) - EVT_CALL(SpeakToPlayer, 0, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006D) - EVT_SET(AreaByte(3), 1) - EVT_CALL(GotoMap, EVT_PTR(N(flo_25_name_hack)), 1) - EVT_WAIT(100) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -FoliageModelList N(tree1_Leaves) = { - .count = 3, - .models = { 19, 20, 21 } -}; - -FoliageModelList N(tree1_Trunk) = { - .count = 1, - .models = { 18 } -}; - -ShakeTreeConfig N(tree1) = { - .leaves = &N(tree1_Leaves), - .trunk = &N(tree1_Trunk), - .callback = &N(tree1_Callback), -}; - -Vec4f N(triggerCoord_802428B4) = { -309.0f, 0.0f, 31.0f, 0.0f }; - -EvtScript N(802428C4) = { - EVT_SET(LVar0, EVT_PTR(N(tree1))) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 4, 1, 0) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_802428B4)), 1, 0) - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_8024291C) = { - .id = NPC_POSIE, - .settings = &N(npcSettings_80241220), - .pos = { -260.0f, 0.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_80242428), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - ANIM_Posie_Idle, - }, - .tattle = MSG_NpcTattle_Posie, -}; - -NpcGroupList N(npcGroupList_80242B0C) = { - NPC_GROUP(N(npcGroup_8024291C)), - {}, -}; - -#include "world/common/todo/StashVars.inc.c" - -#include "world/common/todo/GetItemName.inc.c" - -const char N(flo_25_name_hack)[] = "flo_25"; diff --git a/src/world/area_flo/flo_07/flo_07.h b/src/world/area_flo/flo_07/flo_07.h index 80f54d0a4b..e881456e31 100644 --- a/src/world/area_flo/flo_07/flo_07.h +++ b/src/world/area_flo/flo_07/flo_07.h @@ -2,20 +2,29 @@ /// @brief Flower Fields - (SW) Posie and Crystal Tree #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_07_shape.h" +#include "mapfs/flo_07_hit.h" + +enum { + NPC_Posie = 0, +}; + +enum { + MV_GroundShakingScript = MapVar(0), +}; + #define NAMESPACE flo_07 -ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); -ApiStatus N(SpawnSunEffect)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanSmooth)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanStepped)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240344_CAC534)(Evt* script, s32 isInitialCall); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_PushFlowerSong); +extern EvtScript N(EVS_PopSong); +extern EvtScript N(EVS_Scene_SunReturns); +extern EvtScript N(EVS_TryKickingPlayerOut); +extern EvtScript N(EVS_SetupFoliage); -extern NpcGroupList N(npcGroupList_80242B0C); -extern EvtScript N(80241C14); -extern EvtScript N(802424F4); -extern EvtScript N(802428C4); -extern EvtScript N(main); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_07/flo_07_0_header.c b/src/world/area_flo/flo_07/flo_07_0_header.c new file mode 100644 index 0000000000..e2ce220aeb --- /dev/null +++ b/src/world/area_flo/flo_07/flo_07_0_header.c @@ -0,0 +1,14 @@ +#include "flo_07.h" + +EntryList N(Entrances) = { + [flo_07_ENTRY_0] { 375.0, 0.0, 0.0, 270.0 }, + [flo_07_ENTRY_1] { 325.0, 0.0, 0.0, 270.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_07 }, +}; diff --git a/src/world/area_flo/flo_07/flo_07_1_music.c b/src/world/area_flo/flo_07/flo_07_1_music.c new file mode 100644 index 0000000000..124581dc10 --- /dev/null +++ b/src/world/area_flo/flo_07/flo_07_1_music.c @@ -0,0 +1,32 @@ +#include "flo_07.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_07_ENTRY_1) + EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + EVT_ELSE + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_END_IF + EVT_CALL(PlaySound, SOUND_80000021) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PushFlowerSong) = { + EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 1) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PopSong) = { + EVT_CALL(FadeOutMusic, 0, 250) + EVT_WAIT(10) + EVT_CALL(PopSong) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_07/flo_07_2_main.c b/src/world/area_flo/flo_07/flo_07_2_main.c new file mode 100644 index 0000000000..d86155a069 --- /dev/null +++ b/src/world/area_flo/flo_07/flo_07_2_main.c @@ -0,0 +1,77 @@ +#include "flo_07.h" + +#include "world/common/atomic/TexturePan.inc.c" +#include "world/common/atomic/TexturePan.data.inc.c" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +#include "world/common/todo/SpawnSunEffect.inc.c" + +EvtScript N(EVS_ExitWalk_flo_25_1) = EVT_EXIT_WALK(60, flo_07_ENTRY_0, "flo_25", flo_25_ENTRY_1); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_25_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +API_CALLABLE(N(CreateCrystalTreeSparkles)) { + EffectInstance* effect = fx_misc_particles(3, -272.0f, 80.0f, 20.0f, 200.0f, 120.0f, 4.0f, 8, 0); + + effect->data.miscParticles->innerColor.r = 240; + effect->data.miscParticles->innerColor.g = 240; + effect->data.miscParticles->innerColor.b = 240; + effect->data.miscParticles->glowColor.r = 230; + effect->data.miscParticles->glowColor.g = 230; + effect->data.miscParticles->glowColor.b = 240; + return ApiStatus_DONE2; +} + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_SET(AF_FLO_MadeCrystalBerry, FALSE) + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC_WAIT(N(EVS_SetupFoliage)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o76, SURFACE_TYPE_FLOWERS) + EVT_FLOWER_SPAWN_REGION( 297, -95, 383, -65, 0 ) + EVT_FLOWER_SPAWN_REGION( 293, 71, 378, 113, 0 ) + EVT_FLOWER_SPAWN_REGION( 21, -346, 147, -242, 20 ) + EVT_FLOWER_SPAWN_REGION( -350, -190, -81, -106, 0 ) + EVT_FLOWER_SPAWN_REGION( -380, 85, -95, 150, 0 ) + EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o36, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o37, TRUE) + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_2) + TEX_PAN_PARAMS_STEP( -100, 100, 0, 0) + TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_3) + TEX_PAN_PARAMS_STEP( 0,-1200, 0, 0) + TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_07_ENTRY_1) + EVT_EXEC(N(EVS_Scene_SunReturns)) + EVT_ELSE + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC(N(EVS_TryKickingPlayerOut)) + EVT_END_IF + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_CALL(N(CreateCrystalTreeSparkles)) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_07/flo_07_3_npc.c b/src/world/area_flo/flo_07/flo_07_3_npc.c new file mode 100644 index 0000000000..865797f49c --- /dev/null +++ b/src/world/area_flo/flo_07/flo_07_3_npc.c @@ -0,0 +1,262 @@ +#include "flo_07.h" + +#include "world/common/npc/Posie.inc.c" + +#include "common/foliage.inc.c" + +#include "world/common/complete/GiveReward.inc.c" + +EvtScript N(EVS_Scene_SunReturns) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_CALL(GetNpcPos, NPC_Posie, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 30) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(11.0), EVT_FLOAT(-11.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(20) + EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_00C5) + EVT_WAIT(10) + EVT_CALL(GotoMap, EVT_PTR("flo_10"), flo_10_ENTRY_1) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_ShakeGround) = { + EVT_LABEL(0) + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 1, EVT_FLOAT(1.0)) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_MakeCrystalBerry) = { + EVT_IF_EQ(AF_FLO_MadeCrystalBerry, TRUE) + EVT_RETURN + EVT_END_IF + EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0068) + EVT_THREAD + EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_END_THREAD + EVT_CALL(PlaySound, SOUND_8000006B) + EVT_EXEC_GET_TID(N(EVS_ShakeGround), MV_GroundShakingScript) + EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Strain, ANIM_Posie_Strain, 0, MSG_CH6_0069) + EVT_KILL_THREAD(MV_GroundShakingScript) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(8.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(10) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_SUB(LVar0, LVar2) + EVT_IF_LT(LVar0, -250) + EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 100, -25, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + EVT_ELSE + EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 100, 54, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + EVT_SET(GF_FLO07_CrystalBerryFellOnLeftSide, TRUE) + EVT_END_IF + EVT_CALL(PlaySound, SOUND_7BC) + EVT_CALL(func_802D62E4, 956) + EVT_SET(AF_FLO_MadeCrystalBerry, TRUE) + EVT_WAIT(20) + EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006A) + EVT_SET(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Posie) = { + EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) + EVT_CALL(NpcFacePlayer, NPC_SELF, 1) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) + EVT_IF_EQ(AF_FLO_PoiseHintDialogue, FALSE) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0070) + EVT_SET(AF_FLO_PoiseHintDialogue, TRUE) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0071) + EVT_END_IF + EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(350.0), EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0065) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Posie_GiveItem) + EVT_WAIT(20) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Posie_Still) + EVT_GIVE_KEY_REWARD(ITEM_FERTILE_SOIL) + EVT_SET(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0066) + EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry)) + EVT_END_IF + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) + EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + EVT_IF_EQ(AF_FLO_MadeCrystalBerry, FALSE) + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(350.0), EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) + EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry)) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) + EVT_END_IF + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) + EVT_END_IF + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) + EVT_ELSE + EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0073) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0074) + EVT_END_IF + EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0075) + EVT_END_IF + EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0076) + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0077) + EVT_END_SWITCH + EVT_EXEC_WAIT(N(EVS_PopSong)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Posie) = { + EVT_IF_EQ(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) + EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE) + EVT_IF_EQ(GF_FLO07_CrystalBerryFellOnLeftSide, FALSE) + EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 0, -25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + EVT_ELSE + EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 0, 54, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + EVT_END_IF + EVT_END_IF + EVT_END_IF + EVT_SET(AF_FLO_PoiseHintDialogue, FALSE) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Posie))) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_TryKickingPlayerOut) = { + EVT_IF_NE(AB_FLO_PoiseKickedOutCount, 0) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_WAIT(10) + EVT_IF_LT(AB_FLO_PoiseKickedOutCount, 5) + EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006E) + EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) + EVT_CALL(PlayerMoveTo, 410, LVar3, 10) + EVT_ADD(AB_FLO_PoiseKickedOutCount, 1) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006F) + EVT_SET(AB_FLO_PoiseKickedOutCount, 0) + EVT_END_IF + EVT_CALL(DisablePlayerInput, FALSE) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_OnHit_CrystalTree) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) + EVT_CALL(NpcFacePlayer, NPC_Posie, 1) + EVT_WAIT(10) + EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) + EVT_IF_EQ(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL) + EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -250, 0, 0) + EVT_CALL(SetPanTarget, CAM_DEFAULT, -250, 0, 0) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry)) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_END_IF + EVT_END_IF + EVT_ELSE + EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE) + EVT_CALL(NpcFacePlayer, NPC_Posie, 1) + EVT_WAIT(10) + EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) + EVT_ELSE + EVT_ADD(AB_FLO_CrystalTreeHitCount, 1) + EVT_SWITCH(AB_FLO_CrystalTreeHitCount) + EVT_CASE_LT(2) + EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006B) + EVT_CASE_LT(5) + EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006C) + EVT_CASE_GE(5) + EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006D) + EVT_SET(AB_FLO_PoiseKickedOutCount, 1) + EVT_CALL(GotoMap, EVT_PTR("flo_25"), flo_25_ENTRY_1) + EVT_WAIT(100) + EVT_END_SWITCH + EVT_END_IF + EVT_END_IF + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +FoliageModelList N(CrystalTree_LeafModels) = { + .count = 3, + .models = { + MODEL_o6, + MODEL_o7, + MODEL_o8, + } +}; + +FoliageModelList N(CrystalTree_TrunkModels) = { + .count = 1, + .models = { + MODEL_o5, + } +}; + +ShakeTreeConfig N(ShakeTree_CrystalTree) = { + .leaves = &N(CrystalTree_LeafModels), + .trunk = &N(CrystalTree_TrunkModels), + .callback = &N(EVS_OnHit_CrystalTree), +}; + +BombTrigger N(BombPos_CrystalTree) = { + .pos = { -309.0f, 0.0f, 31.0f }, + .radius = 0.0f +}; + +EvtScript N(EVS_SetupFoliage) = { + EVT_SET(LVar0, EVT_PTR(N(ShakeTree_CrystalTree))) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o5, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_CrystalTree)), 1, 0) + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_Posie) = { + .id = NPC_Posie, + .settings = &N(NpcSettings_Posie), + .pos = { -260.0f, 0.0f, 0.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Posie), + .drops = POSIE_DROPS, + .animations = POSIE_ANIMS, + .tattle = MSG_NpcTattle_Posie, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Posie)), + {} +}; diff --git a/src/world/area_flo/flo_08/CAED40.c b/src/world/area_flo/flo_08/CAED40.c deleted file mode 100644 index 6940defdc0..0000000000 --- a/src/world/area_flo/flo_08/CAED40.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "flo_08.h" - -#include "world/common/entity/SuperBlock.inc.c" diff --git a/src/world/area_flo/flo_08/CAFA80.c b/src/world/area_flo/flo_08/CAFA80.c deleted file mode 100644 index cb336770cc..0000000000 --- a/src/world/area_flo/flo_08/CAFA80.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "flo_08.h" - -// It seems like fx_sun was not properly defined for this file. Having a proper -// declaration makes it not match. -#ifdef AVOID_UB -void fx_sun(s32, f32, f32, f32, f32, s32); -#else -void fx_sun(s32, s32, s32, s32, s32, s32); -#endif - -ApiStatus N(func_80240D40_CAFA80)(Evt* script, s32 isInitialCall) { - fx_sun(1, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_08/CAFAC0.c b/src/world/area_flo/flo_08/CAFAC0.c deleted file mode 100644 index c6f85b856d..0000000000 --- a/src/world/area_flo/flo_08/CAFAC0.c +++ /dev/null @@ -1,1027 +0,0 @@ -#include "flo_08.h" -#include "message_ids.h" -#include "sprite/npc/Dayzee.h" -#include "sprite/npc/GateFlower.h" -#include "effects.h" -#include "entity.h" - -enum { - NPC_GATE_FLOWER, - NPC_DAYZEE0, - NPC_DAYZEE1, - NPC_DAYZEE2, - NPC_DAYZEE3, - NPC_DAYZEE4, - NPC_DAYZEE5, - NPC_DAYZEE6, - NPC_DAYZEE7, -}; - -// BSS -static s32 N(ItemChoiceList)[ITEM_NUM_CONSUMABLES + 1]; // extra entry for list terminator -static s32 N(FlowerGuard_ItemChoiceList)[ITEM_NUM_CONSUMABLES + 1]; // extra entry for list terminator - -// DATA -EntryList N(entryList) = { - { -870.0f, 0.0f, 0.0f, 90.0f }, - { 570.0f, 0.0f, 0.0f, 270.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_08 }, -}; - -EvtScript N(80241F40) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -#define SUPER_BLOCK_MAPVAR MapVar(0) -#define SUPER_BLOCK_GAMEFLAG GF_FLO08_SuperBlock -#include "world/common/entity/SuperBlock.data.inc.c" - -EvtScript N(makeEntities) = { - EVT_MAKE_SUPER_BLOCK(-780, 120, -110, 0) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 510, 0, -90, 17, GF_FLO08_Item_StarPiece) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242680) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_8024292C) = EVT_EXIT_WALK(60, 0, "flo_00", 6); - -EvtScript N(exitWalk_80242988) = EVT_EXIT_WALK(60, 1, "flo_24", 0); - -EvtScript N(802429E4) = { - EVT_BIND_TRIGGER(N(exitWalk_8024292C), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_80242988), TRIGGER_FLOOR_ABOVE, 4, 1, 0) - EVT_RETURN - EVT_END -}; - -s32 N(lavaResetList_80242A2C)[] = { - 0x00000009, 0xC4070000, 0x00000000, 0x42480000, 0x0000000A, 0x42700000, 0x00000000, 0x42480000, - 0x0000000F, 0x42700000, 0x00000000, 0x42480000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80244EC4))) - EVT_EXEC_WAIT(N(makeEntities)) - EVT_EXEC(N(80245F5C)) - EVT_CALL(ModifyColliderFlags, 3, 19, 0x00000002) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(lavaResetList_80242A2C))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, 22, 1) - EVT_CALL(EnableTexPanning, 23, 1) - EVT_CALL(EnableTexPanning, 25, 1) - EVT_CALL(EnableTexPanning, 27, 1) - EVT_CALL(EnableTexPanning, 29, 1) - EVT_CALL(EnableTexPanning, 31, 1) - EVT_CALL(EnableTexPanning, 41, 1) - EVT_CALL(EnableTexPanning, 24, 1) - EVT_CALL(EnableTexPanning, 26, 1) - EVT_CALL(EnableTexPanning, 28, 1) - EVT_CALL(EnableTexPanning, 30, 1) - EVT_CALL(EnableTexPanning, 32, 1) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 140) - EVT_IF_GT(LVar0, 65536) - EVT_ADD(LVar0, -65536) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar1, -200) - EVT_IF_LT(LVar1, 0) - EVT_ADD(LVar1, 65536) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, 3, 21, 0x00000006) - EVT_SET(LVar0, 140) - EVT_SET(LVar1, -137) - EVT_SET(LVar2, 340) - EVT_SET(LVar3, -60) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80242680)) - EVT_SET(LVar0, 450) - EVT_SET(LVar1, -137) - EVT_SET(LVar2, 590) - EVT_SET(LVar3, -60) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80242680)) - EVT_EXEC(N(80245914)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(802429E4))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(80241F40)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240D40_CAFA80)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_2EA8)[] = { - 0x00000000, 0x00000000, -}; - -MobileAISettings N(npcAISettings_80242EB0) = { - .moveSpeed = 1.5f, - .moveTime = 30, - .waitTime = 30, - .alertRadius = 100.0f, - .alertOffsetDist = 30.0f, - .playerSearchInterval = 3, - .chaseSpeed = 2.4f, - .chaseTurnRate= 15, - .chaseUpdateInterval = 1, - .chaseRadius = 140.0f, - .chaseOffsetDist = 30.0f, - .unk_AI_2C = 1, -}; - -EvtScript N(npcAI_80242EE0) = { - EVT_CALL(N(UnkFloAI_Main), EVT_PTR(N(npcAISettings_80242EB0))) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242F00) = { - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_SUB(LVar2, 2) - EVT_CALL(PlayEffect, 0x11, 3, LVar0, LVar1, LVar2, 30, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_80242FB4) = { - .height = 30, - .radius = 24, - .ai = &N(npcAI_80242EE0), - .onHit = &EnemyNpcHit, - .aux = &N(80242F00), - .onDefeat = &EnemyNpcDefeat, - .level = 100, -}; - -NpcSettings N(npcSettings_80242FE0) = { - .height = 56, - .radius = 40, - .level = 99, -}; - -MobileAISettings N(npcAISettings_8024300C) = { - .moveSpeed = 1.0f, - .moveTime = 500, - .waitTime = 10, - .alertRadius = 50.0f, - .alertOffsetDist = 30.0f, - .playerSearchInterval = 3, - .chaseSpeed = 3.5f, - .chaseTurnRate= 40, - .chaseUpdateInterval = 3, - .chaseRadius = 100.0f, - .chaseOffsetDist = 30.0f, - .unk_AI_2C = 1, -}; - -EvtScript N(npcAI_8024303C) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(npcAISettings_8024300C))) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_8024305C) = { - .height = 30, - .radius = 24, - .ai = &N(npcAI_8024303C), - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 19, -}; - -s32 N(ItemChoice_HasSelectedItem) = FALSE; - -s32 N(ItemChoice_SelectedItemID) = { - 0x00000000, -}; - -EvtScript N(80243090) = { - EVT_SET(LVar9, LVar1) - EVT_CALL(ShowConsumableChoicePopup) - EVT_SET(LVarA, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_CALL(RemoveItemAt, LVar1) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) - EVT_CALL(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, 1, 0) - EVT_CALL(SetPlayerAnimation, 393221) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_END_SWITCH - EVT_CALL(N(ItemChoice_SaveSelected), LVarA) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END -}; - -EvtScript N(802431C4) = { - EVT_CALL(N(BuildItemChoiceList), LVar0) - EVT_BIND_PADLOCK(N(80243090), 0x10, 0, EVT_PTR(N(ItemChoiceList)), 0, 1) - EVT_CALL(N(ItemChoice_WaitForSelection), LVar0) - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_80243214) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(GF_FLO08_GaveYellowBerry, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 350) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0042) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_Thinking) - EVT_CALL(N(FlowerGuard_MakeItemList)) - EVT_SET(LVar0, EVT_PTR(N(FlowerGuard_ItemChoiceList))) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(N(802431C4)) - EVT_SWITCH(LVar0) - EVT_CASE_LE(0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0043) - EVT_CASE_DEFAULT - EVT_SET(LVar8, LVar0) - EVT_CALL(N(FlowerGuard_JudgeItemTastiness), LVar0) - EVT_CALL(MakeItemEntity, LVar8, -695, 20, -29, 1, 0) - EVT_SET(LVar7, LVar0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2095, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Eat) - EVT_WAIT(20) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_SWITCH(LVar8) - EVT_CASE_EQ(160) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0046) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x21C, 0) - EVT_CALL(EndSpeech, -1, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_OpenGate) - EVT_CALL(PlaySoundAtCollider, 17, 457, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 17, 0x7FFFFE00) - EVT_CALL(MakeLerp, 0, 100, 30, 1) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar8, LVar0) - EVT_SETF(LVar9, LVar0) - EVT_MULF(LVar8, EVT_FLOAT(0.5)) - EVT_MULF(LVar9, EVT_FLOAT(1.2)) - EVT_CALL(RotateModel, 103, LVar8, 0, 1, 0) - EVT_CALL(RotateModel, 104, LVar8, 0, 1, 0) - EVT_CALL(RotateModel, 105, LVar8, 0, 1, 0) - EVT_CALL(RotateModel, 99, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, 100, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, 101, LVar9, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) - EVT_SET(GF_FLO08_GaveYellowBerry, 1) - EVT_CASE_EQ(159) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CASE_EQ(158) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0044) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Disgust) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x2096, 0) - EVT_CALL(MakeItemEntity, LVar8, 125, 20, 0, 1, 0) - EVT_SET(LVar7, LVar0) - EVT_WAIT(5) - EVT_CALL(GetAngleToPlayer, -1, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_CALL(MakeLerp, 0, 100, 7, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(-0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-700.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-25.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_CALL(MakeLerp, 0, 100, 7, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-690.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-25.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CALL(EndSpeech, -1, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(ResetCam, 0, EVT_FLOAT(6.0)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_ELSE - EVT_IF_LT(GB_StoryProgress, 57) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0047) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0048) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80243B20) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80243214))) - EVT_IF_EQ(GF_FLO08_GaveYellowBerry, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 17, 0x7FFFFE00) - EVT_CALL(RotateModel, 103, 50, 0, 1, 0) - EVT_CALL(RotateModel, 104, 50, 0, 1, 0) - EVT_CALL(RotateModel, 105, 50, 0, 1, 0) - EVT_CALL(RotateModel, 99, 120, 0, -1, 0) - EVT_CALL(RotateModel, 100, 120, 0, -1, 0) - EVT_CALL(RotateModel, 101, 120, 0, -1, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80243C48) = { - .id = NPC_GATE_FLOWER, - .settings = &N(npcSettings_80242FE0), - .pos = { -695.0f, 0.0f, -30.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, - .init = &N(init_80243B20), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - ANIM_GateFlower_Yellow_Idle, - }, - .tattle = MSG_NpcTattle_YellowGateFlower, -}; - -StaticNpc N(npcGroup_80243E38) = { - .id = NPC_DAYZEE0, - .settings = &N(npcSettings_8024305C), - .pos = { 205.0f, 0.0f, -80.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(4), - .maxCoinBonus = 3, - }, - .territory = { .temp = { 205, 0, -80, 30, 0, -32767, 0, 205, 0, -80, 200, 0, 0, 1 }}, - .animations = { - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim02, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim06, - ANIM_Dayzee_Anim07, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80244028) = { - .id = NPC_DAYZEE1, - .settings = &N(npcSettings_8024305C), - .pos = { 275.0f, 0.0f, -115.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(4), - .maxCoinBonus = 3, - }, - .territory = { .temp = { 275, 0, -115, 30, 0, -32767, 0, 275, 0, -115, 200, 0, 0, 1 }}, - .animations = { - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim02, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim06, - ANIM_Dayzee_Anim07, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80244218) = { - .id = NPC_DAYZEE2, - .settings = &N(npcSettings_8024305C), - .pos = { -230.0f, 60.0f, -110.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(4), - .maxCoinBonus = 3, - }, - .territory = { .temp = { -230, 60, -110, 30, 0, -32767, 0, -230, 60, -110, 200, 0, 0, 1 }}, - .animations = { - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim02, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim06, - ANIM_Dayzee_Anim07, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80244408) = { - .id = NPC_DAYZEE3, - .settings = &N(npcSettings_8024305C), - .pos = { -330.0f, 60.0f, -110.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(4), - .maxCoinBonus = 3, - }, - .territory = { .temp = { -330, 60, -110, 30, 0, -32767, 0, -330, 60, -110, 200, 0, 0, 1 }}, - .animations = { - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim02, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim06, - ANIM_Dayzee_Anim07, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_802445F8) = { - .id = NPC_DAYZEE4, - .settings = &N(npcSettings_8024305C), - .pos = { -430.0f, 60.0f, -110.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(4), - .maxCoinBonus = 3, - }, - .territory = { .temp = { -430, 60, -110, 30, 0, -32767, 0, -430, 60, -110, 200, 0, 0, 1 }}, - .animations = { - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim02, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim06, - ANIM_Dayzee_Anim07, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_802447E8) = { - .id = NPC_DAYZEE5, - .settings = &N(npcSettings_8024305C), - .pos = { -530.0f, 60.0f, -110.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(4), - .maxCoinBonus = 3, - }, - .territory = { .temp = { -530, 60, -110, 30, 0, -32767, 0, -530, 60, -110, 200, 0, 0, 1 }}, - .animations = { - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim02, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim06, - ANIM_Dayzee_Anim07, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_802449D8) = { - .id = NPC_DAYZEE6, - .settings = &N(npcSettings_8024305C), - .pos = { -630.0f, 60.0f, -110.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(4), - .maxCoinBonus = 3, - }, - .territory = { .temp = { -630, 60, -110, 30, 0, -32767, 0, -630, 60, -110, 150, 0, 0, 1 }}, - .animations = { - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim02, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim06, - ANIM_Dayzee_Anim07, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -EvtScript N(init_80244BC8) = { - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(GetNpcPointer, 2, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 30) - EVT_CALL(SetNpcFlagBits, 2, ((NPC_FLAG_2 | NPC_FLAG_4)), TRUE) - EVT_CALL(SetNpcPos, 2, 0, -1000, 0) - EVT_ELSE - EVT_CALL(SetNpcFlagBits, NPC_SELF, ((NPC_FLAG_2 | NPC_FLAG_4)), TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_IF - EVT_END_THREAD - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80244CD4) = { - .id = NPC_DAYZEE7, - .settings = &N(npcSettings_80242FB4), - .pos = { 240.0f, 0.0f, -90.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .init = &N(init_80244BC8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 20, - .itemDrops = { - { ITEM_HONEY_SYRUP, 24, 0 }, - { ITEM_MAPLE_SYRUP, 25, 0 }, - { ITEM_JAMMIN_JELLY, 1, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(6), - .minCoinBonus = 5, - .maxCoinBonus = 8, - }, - .territory = { .temp = { 240, 0, -90, 30, 0, -32767, 0, 240, 0, -90, 200, 0, 0, 1 }}, - .animations = { - ANIM_Dayzee_Amazy_Anim01, - ANIM_Dayzee_Amazy_Anim02, - ANIM_Dayzee_Amazy_Anim03, - ANIM_Dayzee_Amazy_Anim03, - ANIM_Dayzee_Amazy_Anim01, - ANIM_Dayzee_Amazy_Anim01, - ANIM_Dayzee_Amazy_Anim08, - ANIM_Dayzee_Amazy_Anim08, - ANIM_Dayzee_Amazy_Anim06, - ANIM_Dayzee_Amazy_Anim07, - ANIM_Dayzee_Amazy_Anim01, - ANIM_Dayzee_Amazy_Anim01, - ANIM_Dayzee_Amazy_Anim01, - ANIM_Dayzee_Amazy_Anim01, - ANIM_Dayzee_Amazy_Anim01, - ANIM_Dayzee_Amazy_Anim01, - }, - .aiDetectFlags = AI_DETECT_SENSITIVE_MOTION, -}; - -NpcGroupList N(npcGroupList_80244EC4) = { - NPC_GROUP(N(npcGroup_80243C48)), - NPC_GROUP(N(npcGroup_80243E38), 0x1814, 0x00), - NPC_GROUP(N(npcGroup_80244028), 0x180F, 0x00), - NPC_GROUP(N(npcGroup_80244218), 0x180F, 0x01), - NPC_GROUP(N(npcGroup_80244408), 0x180F, 0x01), - NPC_GROUP(N(npcGroup_802445F8), 0x180F, 0x01), - NPC_GROUP(N(npcGroup_802447E8), 0x180F, 0x01), - NPC_GROUP(N(npcGroup_802449D8), 0x1812, 0x01), - NPC_GROUP(N(npcGroup_80244CD4), 0x181C, 0x00), - {}, -}; - -static s32 N(pad_4F3C) = { - 0x00000000, -}; - -#include "world/common/enemy/ai/UnkFloAI.inc.c" - -#include "world/common/atomic/ItemChoice_PartA.inc.c" - -#include "world/common/atomic/MakeConsumableChoice.inc.c" - -#include "world/common/atomic/ItemChoice_FlowerGuard.inc.c" - -#include "common/foliage.inc.c" - -FoliageModelList N(tree1_Leaves) = { - .count = 1, - .models = { 46 } -}; - -FoliageModelList N(tree1_Trunk) = { - .count = 1, - .models = { 45 } -}; - -FoliageDropList N(tree1_Drops) = { - .count = 2, - .drops = { - { - .itemID = ITEM_BLUE_BERRY, - .pos = { 340, 102, -89 }, - .spawnMode = 0xC, - .spawnFlag = AreaFlag(29), - }, - { - .itemID = ITEM_BLUE_BERRY, - .pos = { 440, 102, -89 }, - .spawnMode = 0xC, - .spawnFlag = AreaFlag(30), - }, - } -}; - -ShakeTreeConfig N(tree1) = { - .leaves = &N(tree1_Leaves), - .trunk = &N(tree1_Trunk), - .drops = &N(tree1_Drops), -}; - -Vec4f N(triggerCoord_80245904) = { 391.0f, 0.0f, -102.0f, 0.0f }; - -EvtScript N(80245914) = { - EVT_SET(AreaFlag(29), 0) - EVT_SET(AreaFlag(30), 0) - EVT_SET(LVar0, EVT_PTR(N(tree1))) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 22, 1, 0) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_80245904)), 1, 0) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_598C) = { - 0x00000000, -}; - -EvtScript N(80245990) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80245C3C) = { - EVT_SET(LVar9, LVar6) - EVT_SET(LVar8, LVar5) - EVT_SET(LVar7, LVar4) - EVT_SET(LVar6, LVar3) - EVT_SET(LVar5, LVar2) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar3, LVar0) - EVT_CALL(EnableModel, LVar6, 0) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkFunc43)) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnableModel, LVar6, 1) - EVT_END_THREAD - EVT_IF_NE(LVarA, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 8) - EVT_CALL(PlayEffect, 0x11, 4, LVar0, LVar1, LVar2, 15, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_SUB(LVar1, 10) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 14, 0) - EVT_END_THREAD - EVT_END_IF - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAt, 0xF8, 0, LVar3, LVar4, LVar5) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 180, 20, 2) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar8, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, LVar9, LVar0, 1, 0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(EnableModel, LVar7, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80245F5C) = { - EVT_CALL(GetModelCenter, 60) - EVT_SET(LVar3, 60) - EVT_SET(LVar4, 61) - EVT_SET(LVar5, 62) - EVT_SET(LVar6, 63) - EVT_SET(LVarA, 0) - EVT_EXEC(N(80245C3C)) - EVT_CALL(GetModelCenter, 54) - EVT_SET(LVar3, 54) - EVT_SET(LVar4, 55) - EVT_SET(LVar5, 56) - EVT_SET(LVar6, 57) - EVT_SET(LVarA, 0) - EVT_EXEC(N(80245C3C)) - EVT_CALL(GetModelCenter, 48) - EVT_SET(LVar3, 48) - EVT_SET(LVar4, 49) - EVT_SET(LVar5, 50) - EVT_SET(LVar6, 51) - EVT_SET(LVarA, 0) - EVT_EXEC(N(80245C3C)) - EVT_CALL(GetModelCenter, 67) - EVT_SET(LVar3, 67) - EVT_SET(LVar4, 66) - EVT_SET(LVar5, 68) - EVT_SET(LVar6, 69) - EVT_SET(LVarA, 174) - EVT_EXEC(N(80245C3C)) - EVT_RETURN - EVT_END -}; diff --git a/src/world/area_flo/flo_08/CB0B80.c b/src/world/area_flo/flo_08/CB0B80.c deleted file mode 100644 index 578e9049a2..0000000000 --- a/src/world/area_flo/flo_08/CB0B80.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "flo_08.h" - -#include "world/common/todo/UnkFunc43.inc.c" diff --git a/src/world/area_flo/flo_08/flo_08.h b/src/world/area_flo/flo_08/flo_08.h index f66c223e63..5099ab32ab 100644 --- a/src/world/area_flo/flo_08/flo_08.h +++ b/src/world/area_flo/flo_08/flo_08.h @@ -2,25 +2,34 @@ /// @brief Flower Fields - (SE) Briar Platforming #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_08_shape.h" +#include "mapfs/flo_08_hit.h" + +enum { + NPC_GateFlower = 0, + NPC_Dayzee_01 = 1, + NPC_Dayzee_02 = 2, + NPC_Dayzee_03 = 3, + NPC_Dayzee_04 = 4, + NPC_Dayzee_05 = 5, + NPC_Dayzee_06 = 6, + NPC_Dayzee_07 = 7, + NPC_AmazyDayzee = 8, +}; + +enum { + MV_SuperBlock = MapVar(0), +}; + #define NAMESPACE flo_08 -ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall); -ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240D40_CAFA80)(Evt* script, s32 isInitialCall); -ApiStatus N(UnkFloAI_Main)(Evt* script, s32 isInitialCall); -ApiStatus N(ItemChoice_WaitForSelection)(Evt* script, s32 isInitialCall); -ApiStatus N(ItemChoice_SaveSelected)(Evt* script, s32 isInitialCall); -ApiStatus N(BuildItemChoiceList)(Evt* script, s32 isInitialCall); -ApiStatus N(FlowerGuard_SetItemEntityPosition)(Evt* script, s32 isInitialCall); -ApiStatus N(FlowerGuard_JudgeItemTastiness)(Evt* script, s32 isInitialCall); -ApiStatus N(FlowerGuard_MakeItemList)(Evt* script, s32 isInitialCall); -ApiStatus N(UnkFunc43)(Evt* script, s32 isInitialCall); - -extern NpcGroupList N(npcGroupList_80244EC4); -extern EvtScript N(80245914); -extern EvtScript N(80245F5C); -extern EvtScript N(main); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_MakeEntities); +extern EvtScript N(EVS_SetupFoliage); +extern EvtScript N(EVS_SetupVines); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_08/flo_08_0_header.c b/src/world/area_flo/flo_08/flo_08_0_header.c new file mode 100644 index 0000000000..b2a3d28edf --- /dev/null +++ b/src/world/area_flo/flo_08/flo_08_0_header.c @@ -0,0 +1,14 @@ +#include "flo_08.h" + +EntryList N(Entrances) = { + [flo_08_ENTRY_0] { -870.0, 0.0, 0.0, 90.0 }, + [flo_08_ENTRY_1] { 570.0, 0.0, 0.0, 270.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_08 }, +}; diff --git a/src/world/area_flo/flo_08/flo_08_1_music.c b/src/world/area_flo/flo_08/flo_08_1_music.c new file mode 100644 index 0000000000..7c2bbc4f0f --- /dev/null +++ b/src/world/area_flo/flo_08/flo_08_1_music.c @@ -0,0 +1,12 @@ +#include "flo_08.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_08/flo_08_2_entity.c b/src/world/area_flo/flo_08/flo_08_2_entity.c new file mode 100644 index 0000000000..80e764d937 --- /dev/null +++ b/src/world/area_flo/flo_08/flo_08_2_entity.c @@ -0,0 +1,14 @@ +#include "flo_08.h" +#include "entity.h" + +#define SUPER_BLOCK_MAPVAR MV_SuperBlock +#define SUPER_BLOCK_GAMEFLAG GF_FLO08_SuperBlock +#include "world/common/entity/SuperBlock.inc.c" +#include "world/common/entity/SuperBlock.data.inc.c" + +EvtScript N(EVS_MakeEntities) = { + EVT_MAKE_SUPER_BLOCK(-780, 120, -110, 0) + EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 510, 0, -90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO08_Item_StarPiece) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_08/flo_08_3_main.c b/src/world/area_flo/flo_08/flo_08_3_main.c new file mode 100644 index 0000000000..b8029029bf --- /dev/null +++ b/src/world/area_flo/flo_08/flo_08_3_main.c @@ -0,0 +1,83 @@ +#include "flo_08.h" +#include "effects.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_00_6) = EVT_EXIT_WALK(60, flo_08_ENTRY_0, "flo_00", flo_00_ENTRY_6); +EvtScript N(EVS_ExitWalk_flo_24_0) = EVT_EXIT_WALK(60, flo_08_ENTRY_1, "flo_24", flo_24_ENTRY_0); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_6)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_24_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +LavaReset N(SafeFloorColliders)[] = { + { .colliderID = COLLIDER_o158, .pos = { -540.0, 0.0, 50.0 }}, + { .colliderID = COLLIDER_o132, .pos = { 60.0, 0.0, 50.0 }}, + { .colliderID = COLLIDER_o223, .pos = { 60.0, 0.0, 50.0 }}, + { .colliderID = -1 } +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_EXEC(N(EVS_SetupVines)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES) + EVT_THREAD + EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) + EVT_END_THREAD + EVT_CALL(EnableTexPanning, MODEL_o25, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o27, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o31, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o33, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o35, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o37, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o55, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o28, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o32, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o34, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o36, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o38, TRUE) + EVT_THREAD + EVT_SET(LVar0, 0) + EVT_SET(LVar1, 0) + EVT_LABEL(0) + EVT_ADD(LVar0, 140) + EVT_IF_GT(LVar0, 0x10000) + EVT_ADD(LVar0, -0x10000) + EVT_END_IF + EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0) + EVT_ADD(LVar1, -200) + EVT_IF_LT(LVar1, 0) + EVT_ADD(LVar1, 0x10000) + EVT_END_IF + EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_END_THREAD + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + EVT_FLOWER_SPAWN_REGION(140, -137, 340, -60, 0) + EVT_FLOWER_SPAWN_REGION(450, -137, 590, -60, 0) + EVT_EXEC(N(EVS_SetupFoliage)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_08/flo_08_4_npc.c b/src/world/area_flo/flo_08/flo_08_4_npc.c new file mode 100644 index 0000000000..3ac4d8b38e --- /dev/null +++ b/src/world/area_flo/flo_08/flo_08_4_npc.c @@ -0,0 +1,389 @@ +#include "flo_08.h" + +#include "world/common/enemy/complete/AmazyDayzee.inc.c" +#include "world/common/npc/GateFlower.inc.c" +#include "world/common/enemy/complete/CrazyDayzee.inc.c" + +#include "world/common/complete/NormalItemChoice.inc.c" + +static s32 N(FlowerGuard_ItemChoiceList)[ITEM_NUM_CONSUMABLES + 1]; +#include "world/common/atomic/ItemChoice_FlowerGuard.inc.c" + +EvtScript N(EVS_NpcInteract_GateFlower) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_IF_EQ(GF_FLO08_GaveYellowBerry, FALSE) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0042) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_Thinking) + EVT_CALL(N(FlowerGuard_MakeItemList)) + EVT_CHOOSE_CONSUMABLE_FROM(N(FlowerGuard_ItemChoiceList), 0) + EVT_SWITCH(LVar0) + EVT_CASE_LE(0) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0043) + EVT_CASE_DEFAULT + EVT_SET(LVar8, LVar0) + EVT_CALL(N(FlowerGuard_JudgeItemTastiness), LVar0) + EVT_CALL(MakeItemEntity, LVar8, -695, 20, -29, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_SET(LVar7, LVar0) + EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2095, 0) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Eat) + EVT_WAIT(20) + EVT_CALL(RemoveItemEntity, LVar7) + EVT_SWITCH(LVar8) + EVT_CASE_EQ(160) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0046) + EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_21C, 0) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_OpenGate) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o96, SOUND_METAL_GATE_OPEN, 0) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_SETF(LVar8, LVar0) + EVT_SETF(LVar9, LVar0) + EVT_MULF(LVar8, EVT_FLOAT(0.5)) + EVT_MULF(LVar9, EVT_FLOAT(1.2)) + EVT_CALL(RotateModel, MODEL_o69, LVar8, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o70, LVar8, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o71, LVar8, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o148, LVar9, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o149, LVar9, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o150, LVar9, 0, -1, 0) + EVT_WAIT(1) + EVT_IF_NE(LVar1, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) + EVT_SET(GF_FLO08_GaveYellowBerry, TRUE) + EVT_CASE_EQ(159) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + EVT_CASE_EQ(158) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0044) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Disgust) + EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2096, 0) + EVT_CALL(MakeItemEntity, LVar8, 125, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_SET(LVar7, LVar0) + EVT_WAIT(5) + EVT_CALL(GetAngleToPlayer, NPC_SELF, LVar0) + EVT_IF_LT(LVar0, 180) + EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_SETF(LVar2, EVT_FLOAT(-0.5)) + EVT_SETF(LVar3, EVT_FLOAT(-0.2)) + EVT_SETF(LVar4, EVT_FLOAT(0.9)) + EVT_MULF(LVar2, LVar0) + EVT_MULF(LVar3, LVar0) + EVT_MULF(LVar4, LVar0) + EVT_ADDF(LVar2, EVT_FLOAT(-700.0)) + EVT_ADDF(LVar3, EVT_FLOAT(15.0)) + EVT_ADDF(LVar4, EVT_FLOAT(-25.0)) + EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_ELSE + EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_SETF(LVar2, EVT_FLOAT(0.5)) + EVT_SETF(LVar3, EVT_FLOAT(-0.2)) + EVT_SETF(LVar4, EVT_FLOAT(0.9)) + EVT_MULF(LVar2, LVar0) + EVT_MULF(LVar3, LVar0) + EVT_MULF(LVar4, LVar0) + EVT_ADDF(LVar2, EVT_FLOAT(-690.0)) + EVT_ADDF(LVar3, EVT_FLOAT(15.0)) + EVT_ADDF(LVar4, EVT_FLOAT(-25.0)) + EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_IF + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + EVT_CALL(RemoveItemEntity, LVar7) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0) + EVT_END_SWITCH + EVT_END_SWITCH + EVT_THREAD + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0)) + EVT_END_THREAD + EVT_WAIT(10) + EVT_ELSE + EVT_IF_LT(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0047) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0048) + EVT_END_IF + EVT_END_IF + EVT_CALL(DisablePlayerInput, FALSE) + EVT_UNBIND + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_GateFlower) = { + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GateFlower))) + EVT_IF_EQ(GF_FLO08_GaveYellowBerry, TRUE) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(RotateModel, MODEL_o69, 50, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o70, 50, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o71, 50, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o148, 120, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o149, 120, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o150, 120, 0, -1, 0) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_GateFlower) = { + .id = NPC_GateFlower, + .settings = &N(NpcSettings_GateFlower), + .pos = { -695.0f, 0.0f, -30.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .init = &N(EVS_NpcInit_GateFlower), + .drops = GATE_FLOWER_DROPS, + .animations = GATE_FLOWER_YELLOW_ANIMS, + .tattle = MSG_NpcTattle_YellowGateFlower, +}; + +StaticNpc N(NpcData_Dayzee_01) = { + .id = NPC_Dayzee_01, + .settings = &N(NpcSettings_CrazyDayzee), + .pos = { 205.0f, 0.0f, -80.0f }, + .yaw = 90, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .drops = CRAZY_DAYZEE_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 205, 0, -80 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 205, 0, -80 }, + .detectSize = { 200 }, + } + }, + .animations = CRAZY_DAYZEE_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Dayzee_02) = { + .id = NPC_Dayzee_02, + .settings = &N(NpcSettings_CrazyDayzee), + .pos = { 275.0f, 0.0f, -115.0f }, + .yaw = 270, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .drops = CRAZY_DAYZEE_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 275, 0, -115 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 275, 0, -115 }, + .detectSize = { 200 }, + } + }, + .animations = CRAZY_DAYZEE_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Dayzee_03) = { + .id = NPC_Dayzee_03, + .settings = &N(NpcSettings_CrazyDayzee), + .pos = { -230.0f, 60.0f, -110.0f }, + .yaw = 90, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .drops = CRAZY_DAYZEE_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -230, 60, -110 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -230, 60, -110 }, + .detectSize = { 200 }, + } + }, + .animations = CRAZY_DAYZEE_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Dayzee_04) = { + .id = NPC_Dayzee_04, + .settings = &N(NpcSettings_CrazyDayzee), + .pos = { -330.0f, 60.0f, -110.0f }, + .yaw = 270, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .drops = CRAZY_DAYZEE_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -330, 60, -110 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -330, 60, -110 }, + .detectSize = { 200 }, + } + }, + .animations = CRAZY_DAYZEE_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Dayzee_05) = { + .id = NPC_Dayzee_05, + .settings = &N(NpcSettings_CrazyDayzee), + .pos = { -430.0f, 60.0f, -110.0f }, + .yaw = 90, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .drops = CRAZY_DAYZEE_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -430, 60, -110 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -430, 60, -110 }, + .detectSize = { 200 }, + } + }, + .animations = CRAZY_DAYZEE_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Dayzee_06) = { + .id = NPC_Dayzee_06, + .settings = &N(NpcSettings_CrazyDayzee), + .pos = { -530.0f, 60.0f, -110.0f }, + .yaw = 270, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .drops = CRAZY_DAYZEE_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -530, 60, -110 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -530, 60, -110 }, + .detectSize = { 200 }, + } + }, + .animations = CRAZY_DAYZEE_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Dayzee_07) = { + .id = NPC_Dayzee_07, + .settings = &N(NpcSettings_CrazyDayzee), + .pos = { -630.0f, 60.0f, -110.0f }, + .yaw = 90, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .drops = CRAZY_DAYZEE_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -630, 60, -110 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -630, 60, -110 }, + .detectSize = { 150 }, + } + }, + .animations = CRAZY_DAYZEE_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +EvtScript N(EVS_NpcInit_AmazyDayzee) = { + EVT_THREAD + EVT_WAIT(2) + EVT_CALL(GetNpcPointer, NPC_Dayzee_02, LVar0) + EVT_IF_EQ(LVar0, 0) + EVT_CALL(RemoveNpc, NPC_SELF) + EVT_RETURN + EVT_END_IF + EVT_CALL(RandInt, 100, LVar0) + EVT_IF_LT(LVar0, 30) + EVT_CALL(SetNpcFlagBits, NPC_Dayzee_02, NPC_FLAG_2 | NPC_FLAG_4, TRUE) + EVT_CALL(SetNpcPos, NPC_Dayzee_02, NPC_DISPOSE_LOCATION) + EVT_ELSE + EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_2 | NPC_FLAG_4, TRUE) + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_END_THREAD + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_AmazyDayzee) = { + .id = NPC_AmazyDayzee, + .settings = &N(NpcSettings_AmazyDayzee), + .pos = { 240.0f, 0.0f, -90.0f }, + .yaw = 270, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .init = &N(EVS_NpcInit_AmazyDayzee), + .drops = AMAZY_DAYZEE_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 240, 0, -90 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 240, 0, -90 }, + .detectSize = { 200 }, + } + }, + .animations = AMAZY_DAYZEE_ANIMS, + .aiDetectFlags = AI_DETECT_SENSITIVE_MOTION, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_GateFlower)), + NPC_GROUP(N(NpcData_Dayzee_01), BTL_FLO_FORMATION_14, BTL_FLO_STAGE_00), + NPC_GROUP(N(NpcData_Dayzee_02), BTL_FLO_FORMATION_0F, BTL_FLO_STAGE_00), + NPC_GROUP(N(NpcData_Dayzee_03), BTL_FLO_FORMATION_0F, BTL_FLO_STAGE_01), + NPC_GROUP(N(NpcData_Dayzee_04), BTL_FLO_FORMATION_0F, BTL_FLO_STAGE_01), + NPC_GROUP(N(NpcData_Dayzee_05), BTL_FLO_FORMATION_0F, BTL_FLO_STAGE_01), + NPC_GROUP(N(NpcData_Dayzee_06), BTL_FLO_FORMATION_0F, BTL_FLO_STAGE_01), + NPC_GROUP(N(NpcData_Dayzee_07), BTL_FLO_FORMATION_12, BTL_FLO_STAGE_01), + NPC_GROUP(N(NpcData_AmazyDayzee), BTL_FLO_FORMATION_1C, BTL_FLO_STAGE_00), + {} +}; diff --git a/src/world/area_flo/flo_08/flo_08_5_foliage.c b/src/world/area_flo/flo_08/flo_08_5_foliage.c new file mode 100644 index 0000000000..7d83331add --- /dev/null +++ b/src/world/area_flo/flo_08/flo_08_5_foliage.c @@ -0,0 +1,56 @@ +#include "flo_08.h" + +#include "common/foliage.inc.c" + +FoliageModelList N(Tree1_LeafModels) = { + .count = 1, + .models = { + MODEL_o133, + } +}; + +FoliageModelList N(Tree1_TrunkModels) = { + .count = 1, + .models = { + MODEL_o132, + } +}; + +FoliageDropList N(Tree1_Drops) = { + .count = 2, + .drops = { + { + .itemID = ITEM_BLUE_BERRY, + .pos = { 340, 102, -89 }, + .spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, + .spawnFlag = AF_FLO_TreeDrop_BlueBerry1, + }, + { + .itemID = ITEM_BLUE_BERRY, + .pos = { 440, 102, -89 }, + .spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, + .spawnFlag = AF_FLO_TreeDrop_BlueBerry2, + }, + } +}; + +ShakeTreeConfig N(ShakeTree_Tree1) = { + .leaves = &N(Tree1_LeafModels), + .trunk = &N(Tree1_TrunkModels), + .drops = &N(Tree1_Drops), +}; + +BombTrigger N(BombPos_Tree1) = { + .pos = { 391.0f, 0.0f, -102.0f }, + .radius = 0.0f +}; + +EvtScript N(EVS_SetupFoliage) = { + EVT_SET(AF_FLO_TreeDrop_BlueBerry1, FALSE) + EVT_SET(AF_FLO_TreeDrop_BlueBerry2, FALSE) + EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o172, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_08/flo_08_6_vines.c b/src/world/area_flo/flo_08/flo_08_6_vines.c new file mode 100644 index 0000000000..a71a710263 --- /dev/null +++ b/src/world/area_flo/flo_08/flo_08_6_vines.c @@ -0,0 +1,17 @@ +#include "flo_08.h" + +// unused extra import for flower-spawning regions +#define NAMESPACE flo_08_vines +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" +#define NAMESPACE flo_08 + +#include "world/common/atomic/flo_DroppingVine.inc.c" + +EvtScript N(EVS_SetupVines) = { + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o78, MODEL_o79, MODEL_o80, MODEL_o81) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o82, MODEL_o83, MODEL_o84, MODEL_o85) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o88, MODEL_o89, MODEL_o90, MODEL_o91) + EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o159, MODEL_o158, MODEL_o160, MODEL_o161) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_09/CB5000.c b/src/world/area_flo/flo_09/CB5000.c deleted file mode 100644 index 42110ba223..0000000000 --- a/src/world/area_flo/flo_09/CB5000.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "flo_09.h" -#include "effects.h" - -ApiStatus N(func_80240000_CB5000)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(1, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_09/CB5040.c b/src/world/area_flo/flo_09/CB5040.c deleted file mode 100644 index 9a8d3bbad3..0000000000 --- a/src/world/area_flo/flo_09/CB5040.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "flo_09.h" - -#include "world/common/todo/UnkFunc43.inc.c" diff --git a/src/world/area_flo/flo_09/CB50E0.c b/src/world/area_flo/flo_09/CB50E0.c deleted file mode 100644 index 89e8a99fbc..0000000000 --- a/src/world/area_flo/flo_09/CB50E0.c +++ /dev/null @@ -1,708 +0,0 @@ -#include "flo_09.h" -#include "message_ids.h" -#include "sprite/npc/Bzzap.h" -#include "sprite/npc/Dayzee.h" - -enum { - NPC_DAYZEE0, - NPC_DAYZEE1, - NPC_BZZAP0, - NPC_BZZAP1, -}; - -EntryList N(entryList) = { - { -520.0f, 0.0f, 0.0f, 90.0f }, - { 520.0f, 0.0f, 0.0f, 270.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_09 }, -}; - -EvtScript N(80241880) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(802418F0) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_80241B9C) = EVT_EXIT_WALK(60, 0, "flo_00", 5); - -EvtScript N(exitWalk_80241BF8) = EVT_EXIT_WALK(60, 1, "flo_03", 0); - -EvtScript N(80241C54) = { - EVT_BIND_TRIGGER(N(exitWalk_80241B9C), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_80241BF8), TRIGGER_FLOOR_ABOVE, 4, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_8024414C))) - EVT_EXEC(N(802425DC)) - EVT_EXEC(N(802434A8)) - EVT_CALL(ModifyColliderFlags, 3, 9, 0x00000006) - EVT_SET(LVar0, -511) - EVT_SET(LVar1, -4) - EVT_SET(LVar2, -319) - EVT_SET(LVar3, 10) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802418F0)) - EVT_SET(LVar0, -302) - EVT_SET(LVar1, 77) - EVT_SET(LVar2, -32) - EVT_SET(LVar3, 116) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802418F0)) - EVT_SET(LVar0, 51) - EVT_SET(LVar1, 18) - EVT_SET(LVar2, 141) - EVT_SET(LVar3, 127) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802418F0)) - EVT_SET(LVar0, 234) - EVT_SET(LVar1, 38) - EVT_SET(LVar2, 502) - EVT_SET(LVar3, 98) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802418F0)) - EVT_SET(LVar0, -525) - EVT_SET(LVar1, -163) - EVT_SET(LVar2, -400) - EVT_SET(LVar3, -80) - EVT_SET(LVar4, 60) - EVT_EXEC(N(802418F0)) - EVT_SET(LVar0, -346) - EVT_SET(LVar1, -148) - EVT_SET(LVar2, 517) - EVT_SET(LVar3, -91) - EVT_SET(LVar4, 60) - EVT_EXEC(N(802418F0)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80241C54))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(80241880)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240000_CB5000)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_2004)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(80242010) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(802422BC) = { - EVT_SET(LVar9, LVar6) - EVT_SET(LVar8, LVar5) - EVT_SET(LVar7, LVar4) - EVT_SET(LVar6, LVar3) - EVT_SET(LVar5, LVar2) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar3, LVar0) - EVT_CALL(EnableModel, LVar6, 0) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkFunc43)) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnableModel, LVar6, 1) - EVT_END_THREAD - EVT_IF_NE(LVarA, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 8) - EVT_CALL(PlayEffect, 0x11, 4, LVar0, LVar1, LVar2, 15, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_SUB(LVar1, 10) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 14, 0) - EVT_END_THREAD - EVT_END_IF - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAt, 0xF8, 0, LVar3, LVar4, LVar5) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 180, 20, 2) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar8, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, LVar9, LVar0, 1, 0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(EnableModel, LVar7, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(802425DC) = { - EVT_CALL(GetModelCenter, 69) - EVT_SET(LVar3, 69) - EVT_SET(LVar4, 70) - EVT_SET(LVar5, 71) - EVT_SET(LVar6, 72) - EVT_SET(LVarA, 0) - EVT_EXEC(N(802422BC)) - EVT_CALL(GetModelCenter, 75) - EVT_SET(LVar3, 75) - EVT_SET(LVar4, 76) - EVT_SET(LVar5, 77) - EVT_SET(LVar6, 78) - EVT_SET(LVarA, 174) - EVT_EXEC(N(802422BC)) - EVT_CALL(GetModelCenter, 83) - EVT_SET(LVar3, 83) - EVT_SET(LVar4, 84) - EVT_SET(LVar5, 85) - EVT_SET(LVar6, 86) - EVT_SET(LVarA, 0) - EVT_EXEC(N(802422BC)) - EVT_CALL(GetModelCenter, 89) - EVT_SET(LVar3, 89) - EVT_SET(LVar4, 90) - EVT_SET(LVar5, 91) - EVT_SET(LVar6, 92) - EVT_SET(LVarA, 0) - EVT_EXEC(N(802422BC)) - EVT_CALL(GetModelCenter, 97) - EVT_SET(LVar3, 97) - EVT_SET(LVar4, 98) - EVT_SET(LVar5, 99) - EVT_SET(LVar6, 100) - EVT_SET(LVarA, 0) - EVT_EXEC(N(802422BC)) - EVT_CALL(GetModelCenter, 103) - EVT_SET(LVar3, 103) - EVT_SET(LVar4, 104) - EVT_SET(LVar5, 105) - EVT_SET(LVar6, 106) - EVT_SET(LVarA, 0) - EVT_EXEC(N(802422BC)) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_2874)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -#include "common/foliage.inc.c" - -EvtScript N(802431E4) = { - EVT_CALL(GetNpcPos, 3, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 0) - EVT_CALL(GetModelCenter, LVar9) - EVT_ADD(LVar2, 35) - EVT_CALL(SetNpcPos, 3, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(tree1_Callback) = { - EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, 0) - EVT_IF_EQ(AreaByte(5), 1) - EVT_CALL(MakeItemEntity, ITEM_HAPPY_FLOWER_B, -250, 100, 0, 13, GF_FLO09_Item_HappyFlowerB) - EVT_ELSE - EVT_SET(LVar9, 14) - EVT_EXEC(N(802431E4)) - EVT_END_IF - EVT_SET(AreaByte(4), 0) - EVT_SET(AreaByte(5), 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(tree2_Callback) = { - EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, 0) - EVT_SET(AreaByte(4), 1) - EVT_SET(AreaByte(5), 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(tree3_Callback) = { - EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, 0) - EVT_IF_EQ(AreaByte(4), 1) - EVT_IF_EQ(AreaByte(5), 0) - EVT_SET(AreaByte(5), 1) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SET(LVar9, 22) - EVT_EXEC(N(802431E4)) - EVT_SET(AreaByte(4), 0) - EVT_SET(AreaByte(5), 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -FoliageModelList N(tree1_Leaves) = { - .count = 2, - .models = { 15, 16 } -}; - -FoliageModelList N(tree1_Trunk) = { - .count = 1, - .models = { 14 } -}; - -ShakeTreeConfig N(tree1) = { - .leaves = &N(tree1_Leaves), - .trunk = &N(tree1_Trunk), - .callback = &N(tree1_Callback), -}; - -Vec4f N(triggerCoord_80243428) = { -200.0f, 0.0f, 1.0f, 0.0f }; - -FoliageModelList N(tree2_Leaves) = { - .count = 2, - .models = { 19, 20 } -}; - -FoliageModelList N(tree2_Trunk) = { - .count = 1, - .models = { 18 } -}; - -ShakeTreeConfig N(tree2) = { - .leaves = &N(tree2_Leaves), - .trunk = &N(tree2_Trunk), - .callback = &N(tree2_Callback), -}; - -Vec4f N(triggerCoord_80243460) = { 0.0f, 0.0f, 1.0f, 0.0f }; - -FoliageModelList N(tree3_Leaves) = { - .count = 2, - .models = { 23, 24 } -}; - -FoliageModelList N(tree3_Trunk) = { - .count = 1, - .models = { 22 } -}; - -ShakeTreeConfig N(tree3) = { - .leaves = &N(tree3_Leaves), - .trunk = &N(tree3_Trunk), - .callback = &N(tree3_Callback), -}; - -Vec4f N(triggerCoord_80243498) = { 200.0f, 0.0f, 1.0f, 0.0f }; - -EvtScript N(802434A8) = { - EVT_SET(AreaByte(4), 0) - EVT_SET(AreaByte(5), 0) - EVT_SET(LVar0, EVT_PTR(N(tree1))) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 15, 1, 0) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_80243428)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(tree2))) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 16, 1, 0) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_80243460)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(tree3))) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 17, 1, 0) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_80243498)), 1, 0) - EVT_RETURN - EVT_END -}; - -MobileAISettings N(npcAISettings_802435B0) = { - .moveSpeed = 1.0f, - .moveTime = 500, - .waitTime = 10, - .alertRadius = 50.0f, - .alertOffsetDist = 30.0f, - .playerSearchInterval = 3, - .chaseSpeed = 3.5f, - .chaseTurnRate= 40, - .chaseUpdateInterval = 3, - .chaseRadius = 100.0f, - .chaseOffsetDist = 30.0f, - .unk_AI_2C = 1, -}; - -EvtScript N(npcAI_802435E0) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(npcAISettings_802435B0))) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_80243600) = { - .height = 30, - .radius = 24, - .ai = &N(npcAI_802435E0), - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 19, -}; - -f32 N(FlyingAI_JumpVels)[] = { - 4.5f, 3.5f, 2.6f, 2.0f, - 1.5f, 20.0f, -}; - -MobileAISettings N(npcAISettings_80243644) = { - .moveSpeed = 1.0f, - .moveTime = 30, - .waitTime = 5, - .alertRadius = 80.0f, - .alertOffsetDist = 30.0f, - .playerSearchInterval = 2, - .chaseSpeed = 4.5f, - .chaseTurnRate= 6, - .chaseUpdateInterval = 1, - .chaseRadius = 90.0f, - .chaseOffsetDist = 30.0f, - .unk_AI_2C = 1, -}; - -EvtScript N(npcAI_80243674) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, -630) - EVT_CALL(SetSelfVar, 6, 50) - EVT_CALL(SetSelfVar, 1, 200) - EVT_CALL(N(FlyingAI_Main), EVT_PTR(N(npcAISettings_80243644))) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_802436E4) = { - .height = 26, - .radius = 24, - .ai = &N(npcAI_80243674), - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 19, -}; - -NpcSettings N(npcSettings_80243710) = { - .height = 24, - .radius = 24, - .level = 99, -}; - -EvtScript N(npcAI_8024373C) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 50, LVar2, 15) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(npcAI_80243674))) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(25) - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, ((NPC_FLAG_2)), FALSE) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(defeat_802438C8) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetSelfVar, 0, 2) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(npcAI_8024373C))) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(1) - EVT_CASE_EQ(2) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80243954) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(npcAI_8024373C))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_802438C8))) - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_8024398C) = { - .id = NPC_DAYZEE0, - .settings = &N(npcSettings_80243600), - .pos = { -350.0f, 0.0f, 40.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(4), - .maxCoinBonus = 3, - }, - .territory = { .temp = { -350, 0, 40, 30, 0, -32767, 0, -350, 0, 40, 200, 0, 0, 1 }}, - .animations = { - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim02, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim06, - ANIM_Dayzee_Anim07, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80243B7C) = { - .id = NPC_DAYZEE1, - .settings = &N(npcSettings_80243600), - .pos = { 260.0f, 0.0f, 75.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(4), - .maxCoinBonus = 3, - }, - .territory = { .temp = { 260, 0, 75, 30, 0, -32767, 0, 260, 0, 75, 200, 0, 0, 1 }}, - .animations = { - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim02, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim06, - ANIM_Dayzee_Anim07, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80243D6C) = { - .id = NPC_BZZAP0, - .settings = &N(npcSettings_802436E4), - .pos = { -50.0f, 55.0f, 90.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .minCoinBonus = 1, - .maxCoinBonus = 4, - }, - .territory = { .temp = { -50, 55, 90, 30, 0, -32767, 0, -50, 50, 90, 250, 0, 0, 1 }}, - .animations = { - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim03, - ANIM_Bzzap_Anim03, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim06, - ANIM_Bzzap_Anim06, - ANIM_Bzzap_Anim04, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80243F5C) = { - .id = NPC_BZZAP1, - .settings = &N(npcSettings_80243710), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .init = &N(init_80243954), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .minCoinBonus = 1, - .maxCoinBonus = 4, - }, - .territory = { .temp = { -50, 55, 90, 100, 0, -32767, 0, -50, 50, 90, 250, 0, 0, 1 }}, - .animations = { - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim03, - ANIM_Bzzap_Anim03, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim06, - ANIM_Bzzap_Anim06, - ANIM_Bzzap_Anim04, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -NpcGroupList N(npcGroupList_8024414C) = { - NPC_GROUP(N(npcGroup_8024398C), 0x1810, 0x04), - NPC_GROUP(N(npcGroup_80243B7C), 0x1815, 0x04), - NPC_GROUP(N(npcGroup_80243D6C), 0x1817, 0x01), - NPC_GROUP(N(npcGroup_80243F5C), 0x1817, 0x01), - {}, -}; - diff --git a/src/world/area_flo/flo_09/CB5320.c b/src/world/area_flo/flo_09/CB5320.c deleted file mode 100644 index 5a12f0ff1c..0000000000 --- a/src/world/area_flo/flo_09/CB5320.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "flo_09.h" - -#include "world/common/enemy/ai/FlyingAI.inc.c" diff --git a/src/world/area_flo/flo_09/flo_09.h b/src/world/area_flo/flo_09/flo_09.h index 957e6ed6b3..fd606bdf26 100644 --- a/src/world/area_flo/flo_09/flo_09.h +++ b/src/world/area_flo/flo_09/flo_09.h @@ -2,19 +2,27 @@ /// @brief Flower Fields - (East) Triple Tree Path #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_09_shape.h" +#include "mapfs/flo_09_hit.h" + +#include "sprite/npc/Dayzee.h" +#include "sprite/npc/Bzzap.h" + +enum { + NPC_Dayzee_01 = 0, + NPC_Dayzee_02 = 1, + NPC_Bzzap_01 = 2, + NPC_Bzzap_02 = 3, +}; + #define NAMESPACE flo_09 -ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240000_CB5000)(Evt* script, s32 isInitialCall); -ApiStatus N(UnkFunc43)(Evt* script, s32 isInitialCall); -ApiStatus N(FlyingAI_Main)(Evt* script, s32 isInitialCall); - -extern f32 N(FlyingAI_JumpVels)[]; -extern NpcGroupList N(npcGroupList_8024414C); -extern EvtScript N(802425DC); -extern EvtScript N(802434A8); -extern EvtScript N(main); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_SetupFoliage); +extern EvtScript N(EVS_SetupVines); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_09/flo_09_0_header.c b/src/world/area_flo/flo_09/flo_09_0_header.c new file mode 100644 index 0000000000..b978d39d1d --- /dev/null +++ b/src/world/area_flo/flo_09/flo_09_0_header.c @@ -0,0 +1,14 @@ +#include "flo_09.h" + +EntryList N(Entrances) = { + [flo_09_ENTRY_0] { -520.0, 0.0, 0.0, 90.0 }, + [flo_09_ENTRY_1] { 520.0, 0.0, 0.0, 270.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_09 }, +}; diff --git a/src/world/area_flo/flo_09/flo_09_1_music.c b/src/world/area_flo/flo_09/flo_09_1_music.c new file mode 100644 index 0000000000..effb8d484c --- /dev/null +++ b/src/world/area_flo/flo_09/flo_09_1_music.c @@ -0,0 +1,12 @@ +#include "flo_09.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_09/flo_09_2_main.c b/src/world/area_flo/flo_09/flo_09_2_main.c new file mode 100644 index 0000000000..0880126ce8 --- /dev/null +++ b/src/world/area_flo/flo_09/flo_09_2_main.c @@ -0,0 +1,45 @@ +#include "flo_09.h" +#include "effects.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_00_5) = EVT_EXIT_WALK(60, flo_09_ENTRY_0, "flo_00", flo_00_ENTRY_5); +EvtScript N(EVS_ExitWalk_flo_03_0) = EVT_EXIT_WALK(60, flo_09_ENTRY_1, "flo_03", flo_03_ENTRY_0); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_5)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC(N(EVS_SetupVines)) + EVT_EXEC(N(EVS_SetupFoliage)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_FLOWERS) + EVT_FLOWER_SPAWN_REGION( -511, -4, -319, 10, 0) + EVT_FLOWER_SPAWN_REGION( -302, 77, -32, 116, 0) + EVT_FLOWER_SPAWN_REGION( 51, 18, 141, 127, 0) + EVT_FLOWER_SPAWN_REGION( 234, 38, 502, 98, 0) + EVT_FLOWER_SPAWN_REGION( -525, -163, -400, -80, 60) + EVT_FLOWER_SPAWN_REGION( -346, -148, 517, -91, 60) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_09/flo_09_3_vines.c b/src/world/area_flo/flo_09/flo_09_3_vines.c new file mode 100644 index 0000000000..764f3a0e15 --- /dev/null +++ b/src/world/area_flo/flo_09/flo_09_3_vines.c @@ -0,0 +1,19 @@ +#include "flo_09.h" + +// unused extra import for flower-spawning regions +#define NAMESPACE flo_09_vines +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" +#define NAMESPACE flo_09 + +#include "world/common/atomic/flo_DroppingVine.inc.c" + +EvtScript N(EVS_SetupVines) = { + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o76, MODEL_o77, MODEL_o78, MODEL_o79) + EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o72, MODEL_o73, MODEL_o74, MODEL_o75) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o80, MODEL_o81, MODEL_o82, MODEL_o83) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o84, MODEL_o85, MODEL_o86, MODEL_o87) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o96, MODEL_o97, MODEL_o98, MODEL_o99) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o92, MODEL_o93, MODEL_o94, MODEL_o95) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_09/flo_09_4_foliage.c b/src/world/area_flo/flo_09/flo_09_4_foliage.c new file mode 100644 index 0000000000..bff932467f --- /dev/null +++ b/src/world/area_flo/flo_09/flo_09_4_foliage.c @@ -0,0 +1,149 @@ +#include "flo_09.h" + +#include "common/foliage.inc.c" + +EvtScript N(EVS_SpawnBzzap) = { + EVT_CALL(GetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2) + EVT_IF_LT(LVar1, 0) + EVT_CALL(GetModelCenter, LVar9) + EVT_ADD(LVar2, 35) + EVT_CALL(SetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(Tree1_CallbackScript) = { + EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE) + EVT_IF_EQ(AB_FLO_TreePuzzle_SecondCorrect, 1) + EVT_CALL(MakeItemEntity, ITEM_HAPPY_FLOWER_B, -250, 100, 0, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO09_Item_HappyFlowerB) + EVT_ELSE + EVT_SET(LVar9, MODEL_o10) + EVT_EXEC(N(EVS_SpawnBzzap)) + EVT_END_IF + EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0) + EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(Tree2_CallbackScript) = { + EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE) + EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 1) + EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(Tree3_CallbackScript) = { + EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE) + EVT_IF_EQ(AB_FLO_TreePuzzle_FirstCorrect, 1) + EVT_IF_EQ(AB_FLO_TreePuzzle_SecondCorrect, 0) + EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 1) + EVT_RETURN + EVT_END_IF + EVT_END_IF + EVT_SET(LVar9, MODEL_o13) + EVT_EXEC(N(EVS_SpawnBzzap)) + EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0) + EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +FoliageModelList N(Tree1_LeafModels) = { + .count = 2, + .models = { + MODEL_o11, + MODEL_o12, + } +}; + +FoliageModelList N(Tree1_TrunkModels) = { + .count = 1, + .models = { + MODEL_o10, + } +}; + +ShakeTreeConfig N(ShakeTree_Tree1) = { + .leaves = &N(Tree1_LeafModels), + .trunk = &N(Tree1_TrunkModels), + .callback = &N(Tree1_CallbackScript), +}; + +BombTrigger N(BombPos_Tree1) = { + .pos = { -200.0f, 0.0f, 1.0f }, + .radius = 0.0f +}; + +FoliageModelList N(Tree2_LeafModels) = { + .count = 2, + .models = { + MODEL_o4, + MODEL_o5, + } +}; + +FoliageModelList N(Tree2_TrunkModels) = { + .count = 1, + .models = { + MODEL_o3, + } +}; + +ShakeTreeConfig N(ShakeTree_Tree2) = { + .leaves = &N(Tree2_LeafModels), + .trunk = &N(Tree2_TrunkModels), + .callback = &N(Tree2_CallbackScript), +}; + +BombTrigger N(BombPos_Tree2) = { + .pos = { 0.0f, 0.0f, 1.0f }, + .radius = 0.0f +}; + +FoliageModelList N(Tree3_LeafModels) = { + .count = 2, + .models = { + MODEL_o14, + MODEL_o15, + } +}; + +FoliageModelList N(Tree3_TrunkModels) = { + .count = 1, + .models = { + MODEL_o13, + } +}; + +ShakeTreeConfig N(ShakeTree_Tree3) = { + .leaves = &N(Tree3_LeafModels), + .trunk = &N(Tree3_TrunkModels), + .callback = &N(Tree3_CallbackScript), +}; + +BombTrigger N(BombPos_Tree3) = { + .pos = { 200.0f, 0.0f, 1.0f }, + .radius = 0.0f +}; + +EvtScript N(EVS_SetupFoliage) = { + EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0) + EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) + EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o10, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) + EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o3, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) + EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o13, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_09/flo_09_5_npc.c b/src/world/area_flo/flo_09/flo_09_5_npc.c new file mode 100644 index 0000000000..feb58bb6bf --- /dev/null +++ b/src/world/area_flo/flo_09/flo_09_5_npc.c @@ -0,0 +1,160 @@ +#include "flo_09.h" + +#include "world/common/enemy/complete/CrazyDayzee.inc.c" + +#include "world/common/enemy/complete/Bzzap.inc.c" + +NpcSettings N(NpcSettings_Bzzap_02) = { + .height = 24, + .radius = 24, + .level = 99, +}; + +EvtScript N(EVS_NpcAI_Bzzap_02) = { + EVT_LOOP(0) + EVT_CALL(GetSelfVar, 0, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(0) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_IF_GT(LVar1, 0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) + EVT_CALL(NpcJump0, NPC_SELF, LVar0, 50, LVar2, 15) + EVT_CALL(SetSelfVar, 0, 1) + EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap))) + EVT_END_IF + EVT_CASE_EQ(2) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_WAIT(25) + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_2, FALSE) + EVT_CALL(SetSelfVar, 0, 0) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_END_SWITCH + EVT_WAIT(1) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_Bzzap_02) = { + EVT_CALL(GetBattleOutcome, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(OUTCOME_PLAYER_WON) + EVT_CALL(SetSelfVar, 0, 2) + EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap_02))) + EVT_CALL(DoNpcDefeat) + EVT_CASE_EQ(OUTCOME_PLAYER_LOST) + EVT_CASE_EQ(OUTCOME_PLAYER_FLED) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Bzzap_02) = { + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap_02))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Bzzap_02))) + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_Dayzee_01) = { + .id = NPC_Dayzee_01, + .settings = &N(NpcSettings_CrazyDayzee), + .pos = { -350.0f, 0.0f, 40.0f }, + .yaw = 90, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .drops = CRAZY_DAYZEE_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -350, 0, 40 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -350, 0, 40 }, + .detectSize = { 200 }, + } + }, + .animations = CRAZY_DAYZEE_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Dayzee_02) = { + .id = NPC_Dayzee_02, + .settings = &N(NpcSettings_CrazyDayzee), + .pos = { 260.0f, 0.0f, 75.0f }, + .yaw = 270, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .drops = CRAZY_DAYZEE_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 260, 0, 75 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 260, 0, 75 }, + .detectSize = { 200 }, + } + }, + .animations = CRAZY_DAYZEE_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Bzzap_01) = { + .id = NPC_Bzzap_01, + .settings = &N(NpcSettings_Bzzap), + .pos = { -50.0f, 55.0f, 90.0f }, + .yaw = 90, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .drops = BZZAP_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -50, 55, 90 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -50, 50, 90 }, + .detectSize = { 250 }, + } + }, + .animations = BZZAP_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Bzzap_02) = { + .id = NPC_Bzzap_02, + .settings = &N(NpcSettings_Bzzap_02), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 90, + .flags = NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .init = &N(EVS_NpcInit_Bzzap_02), + .drops = BZZAP_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -50, 55, 90 }, + .wanderSize = { 100 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -50, 50, 90 }, + .detectSize = { 250 }, + } + }, + .animations = BZZAP_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Dayzee_01), BTL_FLO_FORMATION_10, BTL_FLO_STAGE_04), + NPC_GROUP(N(NpcData_Dayzee_02), BTL_FLO_FORMATION_15, BTL_FLO_STAGE_04), + NPC_GROUP(N(NpcData_Bzzap_01), BTL_FLO_FORMATION_17, BTL_FLO_STAGE_01), + NPC_GROUP(N(NpcData_Bzzap_02), BTL_FLO_FORMATION_17, BTL_FLO_STAGE_01), + {} +}; diff --git a/src/world/area_flo/flo_10/CB9200.c b/src/world/area_flo/flo_10/CB9200.c deleted file mode 100644 index eac15dda7b..0000000000 --- a/src/world/area_flo/flo_10/CB9200.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "flo_10.h" - -s32 N(get_tattle)(void) { - if (evt_get_variable(NULL, GB_StoryProgress) < STORY_CH6_FILLED_SPRING_WITH_WATER) { - return MSG_MapTattle_flo_10_before; - } else { - return MSG_MapTattle_flo_10_after; - } -} diff --git a/src/world/area_flo/flo_10/CB9240.c b/src/world/area_flo/flo_10/CB9240.c deleted file mode 100644 index 51d25ea75e..0000000000 --- a/src/world/area_flo/flo_10/CB9240.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "flo_10.h" -#include "effects.h" - -ApiStatus N(func_80240040_CB9240)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(1, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_10/CB9280.c b/src/world/area_flo/flo_10/CB9280.c deleted file mode 100644 index 7d96999cb9..0000000000 --- a/src/world/area_flo/flo_10/CB9280.c +++ /dev/null @@ -1,856 +0,0 @@ -#include "flo_10.h" -#include "message_ids.h" -#include "effects.h" -#include "sprite/npc/Lily.h" - -enum { - NPC_LILY, -}; - -EntryList N(entryList) = { - { -360.0f, 0.0f, 0.0f, 90.0f }, - { -360.0f, 0.0f, 0.0f, 90.0f }, - { -100.0f, -10.0f, -172.0f, 135.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { .get = N(get_tattle) }, -}; - -EvtScript N(802414E0) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, 49) - EVT_CALL(PlaySound, 0x80000022) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(802415C4) = { - EVT_CALL(PushSong, 137, 2) - EVT_RETURN - EVT_END -}; - -EvtScript N(802415E8) = { - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_1624)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(80241630) = { - EVT_IF_GE(GB_StoryProgress, 49) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_167C) = { - 0x00000000, -}; - -EvtScript N(80241680) = { - EVT_SET_GROUP(11) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, EFFECT_FLOATING_FLOWER, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_8024192C) = EVT_EXIT_WALK(60, 0, "flo_24", 1); - -EvtScript N(80241988) = { - EVT_BIND_TRIGGER(N(exitWalk_8024192C), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80244054))) - EVT_EXEC_WAIT(N(80241630)) - EVT_EXEC(flo_10_80244A50) - EVT_EXEC(flo_10_802435F8) - EVT_EXEC(flo_10_80242AE8) - EVT_EXEC(flo_10_80244074) - EVT_CALL(ModifyColliderFlags, 3, 11, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 12, 0x00000006) - EVT_SET(LVar0, -265) - EVT_SET(LVar1, 247) - EVT_SET(LVar2, 199) - EVT_SET(LVar3, 313) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80241680)) - EVT_SET(LVar0, -300) - EVT_SET(LVar1, -275) - EVT_SET(LVar2, -140) - EVT_SET(LVar3, -185) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80241680)) - EVT_SET(LVar0, 263) - EVT_SET(LVar1, -248) - EVT_SET(LVar2, 362) - EVT_SET(LVar3, 146) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80241680)) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_EXEC(flo_10_8024324C) - EVT_CASE_EQ(2) - EVT_EXEC(flo_10_802427EC) - EVT_EXEC(N(80241988)) - EVT_CASE_DEFAULT - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80241988))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(802414E0)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240040_CB9240)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_1CA8)[] = { - 0x00000000, 0x00000000, -}; - -s32** N(varStash) = NULL; - -EvtScript N(80241CB4) = { - EVT_CALL(ShowGotItem, LVar0, 1, 0) - EVT_RETURN - EVT_RETURN - EVT_END -}; - -EvtScript N(80241CE4) = { - EVT_CALL(ShowGotItem, LVar0, 1, 16) - EVT_RETURN - EVT_RETURN - EVT_END -}; - -EvtScript N(updateTexturePan_80241D14) = { - EVT_SET_GROUP(0) - EVT_IF_EQ(LVar5, 1) - EVT_IF_EQ(LVar6, 1) - EVT_IF_EQ(LVar7, 1) - EVT_IF_EQ(LVar8, 1) - EVT_CALL(N(UpdateTexturePanSmooth)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(UpdateTexturePanStepped)) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241DB0) = { - EVT_CALL(MakeLerp, -50, 170, 385, 0) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, 56, 0, LVar0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80241E40) = { - EVT_CALL(MakeLerp, 0, 100, 90, 1) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_SETF(LVar3, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(333.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_ADDF(LVar2, EVT_FLOAT(0.703125)) - EVT_CALL(ScaleGroup, 56, LVar2, LVar3, LVar2) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80241F20) = { - EVT_CALL(EnableTexPanning, 53, 1) - EVT_THREAD - EVT_SET(LVar0, 10) - EVT_SET(LVar1, -150) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_80241D14)) - EVT_END_THREAD - EVT_RETURN - EVT_END -}; - -EvtScript N(80242030) = { - EVT_WAIT(60) - EVT_CALL(EnableModel, 53, 1) - EVT_EXEC(N(80241F20)) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024206C) = { - EVT_WAIT(80) - EVT_CALL(EnableNpcShadow, 0, FALSE) - EVT_CALL(GetNpcPos, 0, LVar3, LVar4, LVar5) - EVT_CALL(MakeLerp, 10, 55, 108, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar6, LVar4) - EVT_ADD(LVar6, LVar0) - EVT_ADD(LVar6, -10) - EVT_CALL(SetNpcPos, 0, LVar3, LVar6, LVar5) - EVT_CALL(TranslateGroup, 60, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(80242188) = { - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, 524324) - EVT_CALL(GetPlayerPos, LVar2, LVar0, LVar3) - EVT_CALL(MakeLerp, -50, 90, 60, 1) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar2, EVT_FLOAT(1.2)) - EVT_DIVF(LVar3, EVT_FLOAT(1.2)) - EVT_CALL(SetPlayerPos, LVar2, LVar0, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 90, 270, 280, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024230C) = { - EVT_WAIT(80) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, 0, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, 0, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(0.7)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(25.0), EVT_FLOAT(-22.0)) - EVT_CALL(SetCamDistance, 0, 450) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END -}; - -EvtScript N(802423E4) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_EXEC(N(80241DB0)) - EVT_EXEC(N(80241E40)) - EVT_EXEC(N(80242030)) - EVT_EXEC(N(8024206C)) - EVT_EXEC(N(80242188)) - EVT_EXEC(N(8024230C)) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024244C) = { - EVT_CALL(MakeLerp, 170, 75, 150, 0) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, 56, 0, LVar0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(802424DC) = { - EVT_CALL(MakeLerp, 100, 15, 150, 1) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_SETF(LVar3, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(333.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_ADDF(LVar2, EVT_FLOAT(0.703125)) - EVT_CALL(ScaleGroup, 56, LVar2, LVar3, LVar2) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(802425BC) = { - EVT_EXEC(N(8024244C)) - EVT_EXEC(N(802424DC)) - EVT_RETURN - EVT_END -}; - -extern const char N(flo_24_name_hack)[]; - -EvtScript N(802425E4) = { - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, 0, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, 0, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(1.0)) - EVT_CALL(SetCamDistance, 0, 600) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(EnableGroup, 56, 1) - EVT_CALL(TranslateGroup, 56, 0, -50, 0) - EVT_CALL(ScaleGroup, 56, 0, 0, 0) - EVT_CALL(EnableGroup, 60, 1) - EVT_EXEC_WAIT(N(802423E4)) - EVT_WAIT(20) - EVT_CALL(PlaySound, 0x80000024) - EVT_WAIT(360) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_80017) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2)) - EVT_CALL(PlayerJump1, -100, -10, -172, 75) - EVT_CALL(ShakeCam, 0, 0, 5, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(802425BC)) - EVT_WAIT(60) - EVT_CALL(GotoMap, EVT_PTR(N(flo_24_name_hack)), 2) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(802427EC) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, -100, -10, -172) - EVT_CALL(InterpPlayerYaw, 150, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_DeadStill) - EVT_CALL(SetNpcPos, NPC_PARTNER, -129, 9, -177) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ClearPartnerMoveHistory, -4) - EVT_CALL(EnableGroup, 52, 1) - EVT_CALL(EnableGroup, 19, 0) - EVT_CALL(EnableGroup, 61, 0) - EVT_CALL(EnableGroup, 60, 0) - EVT_CALL(SetNpcPos, 0, -57, -20, -105) - EVT_CALL(InterpNpcYaw, 0, 90, 0) - EVT_CALL(AdjustCam, 0, EVT_FLOAT(90.0), 0, 450, EVT_FLOAT(25.0), EVT_FLOAT(-6.0)) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_GetUp) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(802415C4)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, 0, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_0082) - EVT_CALL(NpcFacePlayer, 0, 1) - EVT_CALL(SpeakToPlayer, 0, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0083) - EVT_CALL(SetNpcAnimation, 0, ANIM_Lily_GiveItem) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, 0, ANIM_Lily_Idle) - EVT_SET(LVar0, 90) - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(80241CB4)) - EVT_CALL(AddKeyItem, ITEM_MIRACLE_WATER) - EVT_CALL(SpeakToPlayer, 0, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0084) - EVT_CALL(EndSpeech, 0, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) - EVT_CALL(SetNpcAnimation, 0, ANIM_Lily_Idle) - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(802415E8)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242AE8) = { - EVT_IF_LT(GB_StoryProgress, 49) - EVT_CALL(EnableGroup, 52, 0) - EVT_CALL(EnableGroup, 61, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 21, 0x7FFFFE00) - EVT_ELSE - EVT_CALL(EnableGroup, 19, 0) - EVT_CALL(EnableGroup, 61, 0) - EVT_CALL(EnableGroup, 60, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 14, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 15, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 16, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 17, 0x7FFFFE00) - EVT_END_IF - EVT_CALL(EnableTexPanning, 54, 1) - EVT_CALL(EnableTexPanning, 48, 1) - EVT_CALL(EnableTexPanning, 55, 1) - EVT_CALL(EnableTexPanning, 59, 1) - EVT_CALL(EnableTexPanning, 49, 1) - EVT_CALL(EnableTexPanning, 51, 1) - EVT_THREAD - EVT_SET(LVar0, 1) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -2000) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_80241D14)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 3) - EVT_SET(LVar1, -100) - EVT_SET(LVar2, 80) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_80241D14)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 5) - EVT_SET(LVar1, -1000) - EVT_SET(LVar2, 2000) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_80241D14)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 6) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -2000) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_80241D14)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 8) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -1500) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_80241D14)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 9) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -1000) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_80241D14)) - EVT_END_THREAD - EVT_IF_GE(GB_StoryProgress, 49) - EVT_EXEC(N(80241F20)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_3218)[] = { - 0x00000000, 0x00000000, -}; - -NpcSettings N(npcSettings_80243220) = { - .height = 45, - .radius = 65, - .level = 99, -}; - -const char N(flo_24_name_hack)[] = "flo_24"; - -EvtScript N(8024324C) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcPos, 0, 60, 0, 55) - EVT_CALL(UseSettingsFrom, 0, 0, 0, 0) - EVT_CALL(SetPanTarget, 0, 0, 0, 0) - EVT_CALL(SetCamDistance, 0, 450) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, 0, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_00C6) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_12"), 1) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -s32 N(itemList_80243394)[] = { - ITEM_WATER_STONE, - ITEM_NONE, -}; - -EvtScript N(8024339C) = { - EVT_IF_EQ(GF_FLO10_ShowedLilyTheWaterStone, 1) - EVT_CALL(GetCurrentPartner, LVarA) - EVT_IF_NE(LVarA, 0) - EVT_CALL(AwaitPlayerLeave, 0, 0, 19) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET_GROUP(0) - EVT_CALL(SetTimeFreezeMode, 1) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(-1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, 0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, 0, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0081) - EVT_CASE_DEFAULT - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(PlayerMoveTo, -17, -17, 20) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(InterpPlayerYaw, 100, 1) - EVT_WAIT(10) - EVT_CALL(AdjustCam, 0, EVT_FLOAT(1.0), 0, 450, EVT_FLOAT(25.0), EVT_FLOAT(-6.0)) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, 393222) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, 1, 0) - EVT_SET(LVarA, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, 0) - EVT_EXEC_WAIT(N(802425E4)) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerLeave, 0, 0, 19) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(802435F8) = { - EVT_BIND_PADLOCK(N(8024339C), TRIGGER_FLOOR_TOUCH, 15, EVT_PTR(N(itemList_80243394)), 0, 1) - EVT_RETURN - EVT_END -}; - -EvtScript N(80243628) = { - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar5, LVar2) - EVT_SET(LVar6, 30) - EVT_ELSE - EVT_SET(LVar6, 20) - EVT_END_IF - EVT_SET(LVar1, LVar0) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar1, LVar6) - EVT_ADD(LVar4, LVar6) - EVT_SWITCH(LVar3) - EVT_CASE_RANGE(LVar1, LVar4) - EVT_THREAD - EVT_IF_LT(LVar3, LVar0) - EVT_SUB(LVar0, 40) - EVT_ELSE - EVT_ADD(LVar0, 40) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE) - EVT_CALL(PlayerMoveTo, LVar0, LVar5, 15) - EVT_CALL(PlayerFaceNpc, 0, 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE) - EVT_END_THREAD - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_802437C8) = { - EVT_EXEC_WAIT(N(802415C4)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(45) - EVT_EXEC(N(80243628)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 325) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(23.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0078) - EVT_CALL(EndSpeech, -1, ANIM_Lily_DreadLoop, ANIM_Lily_Dread, 5) - EVT_CASE_LT(48) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, 0) - EVT_EXEC(N(80243628)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 325) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(23.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0079) - EVT_CALL(NpcFacePlayer, NPC_SELF, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lily_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_262, 0) - EVT_CALL(ShowEmote, -1, EMOTE_EXCLAMATION, 0, 15, 1, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Idle, ANIM_Lily_Idle, 0, MSG_CH6_007A) - EVT_CALL(EndSpeech, -1, ANIM_Lily_Dread, ANIM_Lily_Idle, 0) - EVT_CALL(GetPlayerTargetYaw, LVar0) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 1) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_007B) - EVT_CALL(NpcFacePlayer, NPC_SELF, 1) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_007C) - EVT_CALL(ShowChoice, MSG_Choice_0011) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ContinueSpeech, -1, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_007D) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, -1, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_007E) - EVT_END_SWITCH - EVT_WAIT(10) - EVT_SET(GF_FLO10_LilyRequestedWaterStone, 1) - EVT_CALL(SetEnemyFlagBits, -1, 4194304, 0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_007F) - EVT_END_IF - EVT_CASE_LT(49) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0080) - EVT_SET(GF_FLO10_ShowedLilyTheWaterStone, 1) - EVT_CASE_LT(53) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0085) - EVT_CALL(EndSpeech, -1, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) - EVT_CALL(EndSpeech, -1, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0) - EVT_CASE_LT(60) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0086) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0087) - EVT_END_SWITCH - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(802415E8)) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80243D78) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_802437C8))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(48) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lily_IdlePlead) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(SetEnemyFlagBits, -1, 4194304, 1) - EVT_END_IF - EVT_CASE_EQ(48) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CASE_GE(49) - EVT_CALL(SetNpcPos, NPC_SELF, -67, -20, -105) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80243E64) = { - .id = NPC_LILY, - .settings = &N(npcSettings_80243220), - .pos = { 80.0f, -60.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_80243D78), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - ANIM_Lily_Idle, - }, - .tattle = MSG_NpcTattle_Lily, -}; - -NpcGroupList N(npcGroupList_80244054) = { - NPC_GROUP(N(npcGroup_80243E64)), - {}, -}; - -static s32 N(pad_406C) = { - 0x00000000, -}; - -s32 N(D_80244070_CBD270) = { - 0x00000000, -}; - -EvtScript N(80244074) = { - EVT_RETURN - EVT_END -}; - -static s32 N(pad_4084)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -#include "world/common/todo/StashVars.inc.c" - -#include "world/common/todo/GetItemName.inc.c" - -#include "world/common/atomic/TexturePan.inc.c" - diff --git a/src/world/area_flo/flo_10/CBA430.c b/src/world/area_flo/flo_10/CBA430.c deleted file mode 100644 index b234b72272..0000000000 --- a/src/world/area_flo/flo_10/CBA430.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "flo_10.h" - -#include "common/foliage.inc.c" - -FoliageModelList N(tree1_Leaves) = { - .count = 3, - .models = { 33, 34, 35 } -}; - -FoliageModelList N(tree1_Trunk) = { - .count = 1, - .models = { 32 } -}; - -FoliageDropList N(tree1_Drops) = { - .count = 1, - .drops = { - { - .itemID = ITEM_JAMMIN_JELLY, - .pos = { 80, 100, -240 }, - .spawnMode = 0xF, - .pickupFlag = GF_FLO10_Tree1_JamminJelly, - }, - } -}; - -ShakeTreeConfig N(tree1) = { - .leaves = &N(tree1_Leaves), - .trunk = &N(tree1_Trunk), - .drops = &N(tree1_Drops), -}; - -Vec4f N(triggerCoord_80244A40) = { 137.0f, 0.0f, -283.0f, 0.0f }; - -EvtScript N(80244A50) = { - EVT_SET(LVar0, EVT_PTR(N(tree1))) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 9, 1, 0) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_80244A40)), 1, 0) - EVT_RETURN - EVT_END -}; diff --git a/src/world/area_flo/flo_10/flo_10.h b/src/world/area_flo/flo_10/flo_10.h index 955297c632..6fa0d71e8d 100644 --- a/src/world/area_flo/flo_10/flo_10.h +++ b/src/world/area_flo/flo_10/flo_10.h @@ -2,25 +2,31 @@ /// @brief Flower Fields - (SE) Lily's Fountain #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_10_shape.h" +#include "mapfs/flo_10_hit.h" + +enum { + NPC_Lily = 0, +}; + #define NAMESPACE flo_10 -ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanSmooth)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanStepped)(Evt* script, s32 isInitialCall); -s32 N(get_tattle)(void); -ApiStatus N(func_80240040_CB9240)(Evt* script, s32 isInitialCall); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_PushFlowerSong); +extern EvtScript N(EVS_PopSong); +extern EvtScript N(EVS_SetupFoliage); +extern EvtScript N(EVS_MakeEntities); +extern EvtScript N(EVS_SetupFountain); +extern EvtScript N(EVS_SetupWaterStoneSocket); +extern EvtScript N(EVS_SetupWaterEffect); -extern s32 N(D_80244070_CBD270); -extern s32** N(varStash); -extern NpcGroupList N(npcGroupList_80244054); -extern EvtScript N(802427EC); -extern EvtScript N(80242AE8); -extern EvtScript N(8024324C); -extern EvtScript N(802435F8); -extern EvtScript N(80244074); -extern EvtScript N(80244A50); -extern EvtScript N(main); +extern EvtScript N(EVS_Scene_ReleaseFountain); +extern EvtScript N(EVS_Scene_PostReleaseFountain); +extern EvtScript N(EVS_Scene_SunReturns); + +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_10/flo_10_0_header.c b/src/world/area_flo/flo_10/flo_10_0_header.c new file mode 100644 index 0000000000..3efc7ce4fe --- /dev/null +++ b/src/world/area_flo/flo_10/flo_10_0_header.c @@ -0,0 +1,23 @@ +#include "flo_10.h" + +s32 N(get_tattle)(void) { + if (evt_get_variable(NULL, GB_StoryProgress) < STORY_CH6_FILLED_SPRING_WITH_WATER) { + return MSG_MapTattle_flo_10_before; + } else { + return MSG_MapTattle_flo_10_after; + } +} + +EntryList N(Entrances) = { + [flo_10_ENTRY_0] { -360.0, 0.0, 0.0, 90.0 }, + [flo_10_ENTRY_1] { -360.0, 0.0, 0.0, 90.0 }, + [flo_10_ENTRY_2] { -100.0, -10.0, -172.0, 135.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { .get = &N(get_tattle) }, +}; diff --git a/src/world/area_flo/flo_10/flo_10_1_music.c b/src/world/area_flo/flo_10/flo_10_1_music.c new file mode 100644 index 0000000000..816998c4de --- /dev/null +++ b/src/world/area_flo/flo_10/flo_10_1_music.c @@ -0,0 +1,34 @@ +#include "flo_10.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_10_ENTRY_1) + EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + EVT_ELSE + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_END_IF + EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(PlaySound, SOUND_80000022) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PushFlowerSong) = { + EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 2) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PopSong) = { + EVT_CALL(FadeOutMusic, 0, 250) + EVT_WAIT(10) + EVT_CALL(PopSong) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_10/flo_10_2_entity.c b/src/world/area_flo/flo_10/flo_10_2_entity.c new file mode 100644 index 0000000000..7b5a111cd0 --- /dev/null +++ b/src/world/area_flo/flo_10/flo_10_2_entity.c @@ -0,0 +1,9 @@ +#include "flo_10.h" + +EvtScript N(EVS_MakeEntities) = { + EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_10/flo_10_3_main.c b/src/world/area_flo/flo_10/flo_10_3_main.c new file mode 100644 index 0000000000..2d7cfd75a6 --- /dev/null +++ b/src/world/area_flo/flo_10/flo_10_3_main.c @@ -0,0 +1,53 @@ +#include "flo_10.h" +#include "effects.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_24_1) = EVT_EXIT_WALK(60, flo_10_ENTRY_0, "flo_24", flo_24_ENTRY_1); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_24_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_EXEC(N(EVS_SetupFoliage)) + EVT_EXEC(N(EVS_SetupWaterStoneSocket)) + EVT_EXEC(N(EVS_SetupFountain)) + EVT_EXEC(N(EVS_SetupWaterEffect)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o80, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o93, SURFACE_TYPE_FLOWERS) + EVT_FLOWER_SPAWN_REGION( -265, 247, 199, 313, 0) + EVT_FLOWER_SPAWN_REGION( -300, -275, -140, -185, 0) + EVT_FLOWER_SPAWN_REGION( 263, -248, 362, 146, 0) + EVT_CALL(GetEntryID, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(flo_10_ENTRY_1) + EVT_EXEC(N(EVS_Scene_SunReturns)) + EVT_CASE_EQ(flo_10_ENTRY_2) + EVT_EXEC(N(EVS_Scene_PostReleaseFountain)) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_CASE_DEFAULT + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_END_SWITCH + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_10/flo_10_4_fountain.c b/src/world/area_flo/flo_10/flo_10_4_fountain.c new file mode 100644 index 0000000000..ab8b89bad5 --- /dev/null +++ b/src/world/area_flo/flo_10/flo_10_4_fountain.c @@ -0,0 +1,315 @@ +#include "flo_10.h" +#include "sprite/npc/Lily.h" + +#include "world/common/complete/GiveReward.inc.c" + +#include "world/common/atomic/TexturePan.inc.c" +#include "world/common/atomic/TexturePan.data.inc.c" + +EvtScript N(EVS_RaiseFountain) = { + EVT_CALL(MakeLerp, -50, 170, 385, EASING_LINEAR) + EVT_LABEL(1) + EVT_CALL(UpdateLerp) + EVT_CALL(TranslateGroup, MODEL_g22, 0, LVar0, 0) + EVT_IF_EQ(LVar1, 1) + EVT_WAIT(1) + EVT_GOTO(1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_GrowFountain) = { + EVT_CALL(MakeLerp, 0, 100, 90, EASING_QUADRATIC_IN) + EVT_LABEL(1) + EVT_CALL(UpdateLerp) + EVT_SETF(LVar2, LVar0) + EVT_SETF(LVar3, LVar0) + EVT_DIVF(LVar2, EVT_FLOAT(333.0)) + EVT_DIVF(LVar3, EVT_FLOAT(100.0)) + EVT_ADDF(LVar2, EVT_FLOAT(0.703125)) + EVT_CALL(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2) + EVT_IF_EQ(LVar1, 1) + EVT_WAIT(1) + EVT_GOTO(1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_TexPan_Rainbow) = { + EVT_CALL(EnableTexPanning, MODEL_o73, TRUE) + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_A) + TEX_PAN_PARAMS_STEP( -150, 0, 0, 0) + TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_EnableRainbow) = { + EVT_WAIT(60) + EVT_CALL(EnableModel, MODEL_o73, TRUE) + EVT_EXEC(N(EVS_TexPan_Rainbow)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_RaiseLily) = { + EVT_WAIT(80) + EVT_CALL(EnableNpcShadow, NPC_Lily, FALSE) + EVT_CALL(GetNpcPos, NPC_Lily, LVar3, LVar4, LVar5) + EVT_CALL(MakeLerp, 10, 55, 108, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_SET(LVar6, LVar4) + EVT_ADD(LVar6, LVar0) + EVT_ADD(LVar6, -10) + EVT_CALL(SetNpcPos, NPC_Lily, LVar3, LVar6, LVar5) + EVT_CALL(TranslateGroup, MODEL_g31, 0, LVar0, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_RaisePlayer) = { + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_WAIT(40) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_80024) + EVT_CALL(GetPlayerPos, LVar2, LVar0, LVar3) + EVT_CALL(MakeLerp, -50, 90, 60, EASING_QUADRATIC_IN) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_DIVF(LVar2, EVT_FLOAT(1.2)) + EVT_DIVF(LVar3, EVT_FLOAT(1.2)) + EVT_CALL(SetPlayerPos, LVar2, LVar0, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(MakeLerp, 90, 270, 280, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(SetPlayerPos, 0, LVar0, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(DisablePlayerPhysics, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_RaiseCamera) = { + EVT_WAIT(80) + EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.7)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-22.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_UnleashFountain) = { + EVT_CALL(DisablePartnerAI, 0) + EVT_EXEC(N(EVS_RaiseFountain)) + EVT_EXEC(N(EVS_GrowFountain)) + EVT_EXEC(N(EVS_EnableRainbow)) + EVT_EXEC(N(EVS_RaiseLily)) + EVT_EXEC(N(EVS_RaisePlayer)) + EVT_EXEC(N(EVS_RaiseCamera)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_LowerFountain) = { + EVT_CALL(MakeLerp, 170, 75, 150, EASING_LINEAR) + EVT_LABEL(1) + EVT_CALL(UpdateLerp) + EVT_CALL(TranslateGroup, MODEL_g22, 0, LVar0, 0) + EVT_IF_EQ(LVar1, 1) + EVT_WAIT(1) + EVT_GOTO(1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_ShrinkFountain) = { + EVT_CALL(MakeLerp, 100, 15, 150, EASING_QUADRATIC_IN) + EVT_LABEL(1) + EVT_CALL(UpdateLerp) + EVT_SETF(LVar2, LVar0) + EVT_SETF(LVar3, LVar0) + EVT_DIVF(LVar2, EVT_FLOAT(333.0)) + EVT_DIVF(LVar3, EVT_FLOAT(100.0)) + EVT_ADDF(LVar2, EVT_FLOAT(0.703125)) + EVT_CALL(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2) + EVT_IF_EQ(LVar1, 1) + EVT_WAIT(1) + EVT_GOTO(1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_FountainSlowing) = { + EVT_EXEC(N(EVS_LowerFountain)) + EVT_EXEC(N(EVS_ShrinkFountain)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_ReleaseFountain) = { + EVT_WAIT(20) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(EnableGroup, MODEL_g22, TRUE) + EVT_CALL(TranslateGroup, MODEL_g22, 0, -50, 0) + EVT_CALL(ScaleGroup, MODEL_g22, 0, 0, 0) + EVT_CALL(EnableGroup, MODEL_g31, TRUE) + EVT_EXEC_WAIT(N(EVS_UnleashFountain)) + EVT_WAIT(20) + EVT_CALL(PlaySound, SOUND_80000024) + EVT_WAIT(360) + EVT_CALL(InterpPlayerYaw, 90, 0) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_80017) + EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2)) + EVT_CALL(PlayerJump1, -100, -10, -172, 75) + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) + EVT_EXEC_WAIT(N(EVS_FountainSlowing)) + EVT_WAIT(60) + EVT_CALL(GotoMap, EVT_PTR("flo_24"), flo_24_ENTRY_2) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_PostReleaseFountain) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_CALL(SetPlayerPos, -100, -10, -172) + EVT_CALL(InterpPlayerYaw, 150, 0) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_DeadStill) + EVT_CALL(SetNpcPos, NPC_PARTNER, -129, 9, -177) + EVT_CALL(EnablePartnerAI) + EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) + EVT_CALL(EnableGroup, MODEL_water, TRUE) + EVT_CALL(EnableGroup, MODEL_g2, FALSE) + EVT_CALL(EnableGroup, MODEL_g12, FALSE) + EVT_CALL(EnableGroup, MODEL_g31, FALSE) + EVT_CALL(SetNpcPos, NPC_Lily, -57, -20, -105) + EVT_CALL(InterpNpcYaw, NPC_Lily, 90, 0) + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 450, EVT_FLOAT(25.0), EVT_FLOAT(-6.0)) + EVT_WAIT(30) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_GetUp) + EVT_WAIT(20) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) + EVT_WAIT(10) + EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) + EVT_WAIT(10) + EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_0082) + EVT_CALL(NpcFacePlayer, NPC_Lily, 1) + EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0083) + EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_GiveItem) + EVT_WAIT(20) + EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle) + EVT_GIVE_KEY_REWARD(ITEM_MIRACLE_WATER) + EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0084) + EVT_CALL(EndSpeech, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) + EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_EXEC_WAIT(N(EVS_PopSong)) + EVT_CALL(DisablePlayerPhysics, FALSE) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupFountain) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(EnableGroup, MODEL_water, FALSE) + EVT_CALL(EnableGroup, MODEL_g12, FALSE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_water, COLLIDER_FLAGS_UPPER_MASK) + EVT_ELSE + EVT_CALL(EnableGroup, MODEL_g2, FALSE) + EVT_CALL(EnableGroup, MODEL_g12, FALSE) + EVT_CALL(EnableGroup, MODEL_g31, FALSE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o83, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o86, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o87, COLLIDER_FLAGS_UPPER_MASK) + EVT_END_IF + EVT_CALL(EnableTexPanning, MODEL_o25, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o40, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o78, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o77, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o118, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o119, TRUE) + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_1) + TEX_PAN_PARAMS_STEP( 0,-2000, 0, 0) + TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_3) + TEX_PAN_PARAMS_STEP( -100, 80, 0, 0) + TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_5) + TEX_PAN_PARAMS_STEP(-1000, 2000, 0, 0) + TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_6) + TEX_PAN_PARAMS_STEP( 0,-2000, 0, 0) + TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_8) + TEX_PAN_PARAMS_STEP( 0,-1500, 0, 0) + TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_9) + TEX_PAN_PARAMS_STEP( 0,-1000, 0, 0) + TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_EXEC(N(EVS_TexPan_Rainbow)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_10/flo_10_5_npc.c b/src/world/area_flo/flo_10/flo_10_5_npc.c new file mode 100644 index 0000000000..e2a7cda8dd --- /dev/null +++ b/src/world/area_flo/flo_10/flo_10_5_npc.c @@ -0,0 +1,216 @@ +#include "flo_10.h" + +#include "world/common/npc/Lily.inc.c" + +EvtScript N(EVS_Scene_SunReturns) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_CALL(SetNpcPos, NPC_Lily, 60, 0, 55) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(20) + EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_00C6) + EVT_WAIT(10) + EVT_CALL(GotoMap, EVT_PTR("flo_12"), flo_12_ENTRY_1) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +s32 N(KeyList)[] = { + ITEM_WATER_STONE, + ITEM_NONE +}; + +EvtScript N(EVS_OnInteract_WaterStoneSocket) = { + EVT_IF_EQ(GF_FLO10_ShowedLilyTheWaterStone, TRUE) + EVT_CALL(GetCurrentPartner, LVarA) + EVT_IF_NE(LVarA, 0) + EVT_CALL(AwaitPlayerLeave, 0, 0, 19) + EVT_RETURN + EVT_END_IF + EVT_CALL(DisablePlayerInput, TRUE) + EVT_SET_GROUP(EVT_GROUP_00) + EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + EVT_CALL(ShowKeyChoicePopup) + EVT_SET(LVar2, LVar0) + EVT_SWITCH(LVar2) + EVT_CASE_EQ(-1) + EVT_CALL(CloseChoicePopup) + EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + EVT_WAIT(10) + EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0081) + EVT_CASE_DEFAULT + EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) + EVT_CALL(PlayerMoveTo, -17, -17, 20) + EVT_CALL(func_802CF56C, 2) + EVT_CALL(InterpPlayerYaw, 100, 1) + EVT_WAIT(10) + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(1.0), 0, 450, EVT_FLOAT(25.0), EVT_FLOAT(-6.0)) + EVT_WAIT(10) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_60006) + EVT_CALL(RemoveKeyItemAt, LVar1) + EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_SET(LVarA, LVar0) + EVT_CALL(CloseChoicePopup) + EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + EVT_EXEC_WAIT(N(EVS_Scene_ReleaseFountain)) + EVT_END_SWITCH + EVT_CALL(DisablePlayerInput, FALSE) + EVT_CALL(AwaitPlayerLeave, 0, 0, 19) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupWaterStoneSocket) = { + EVT_BIND_PADLOCK(EVT_PTR(N(EVS_OnInteract_WaterStoneSocket)), TRIGGER_FLOOR_TOUCH, COLLIDER_o83, EVT_PTR(N(KeyList)), 0, 1) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_MovePlayerToTalk) = { + EVT_WAIT(10) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) + EVT_IF_LT(LVar5, LVar2) + EVT_SET(LVar6, 30) + EVT_ELSE + EVT_SET(LVar6, 20) + EVT_END_IF + EVT_SET(LVar1, LVar0) + EVT_SET(LVar4, LVar0) + EVT_SUB(LVar1, LVar6) + EVT_ADD(LVar4, LVar6) + EVT_SWITCH(LVar3) + EVT_CASE_RANGE(LVar1, LVar4) + EVT_THREAD + EVT_IF_LT(LVar3, LVar0) + EVT_SUB(LVar0, 40) + EVT_ELSE + EVT_ADD(LVar0, 40) + EVT_END_IF + EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE) + EVT_CALL(PlayerMoveTo, LVar0, LVar5, 15) + EVT_CALL(PlayerFaceNpc, NPC_Lily, TRUE) + EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE) + EVT_END_THREAD + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Lily) = { + EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) + EVT_EXEC(N(EVS_MovePlayerToTalk)) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 325) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(23.0), EVT_FLOAT(-9.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(10) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0078) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_DreadLoop, ANIM_Lily_Dread, 5) + EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) + EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE) + EVT_EXEC(N(EVS_MovePlayerToTalk)) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 325) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(23.0), EVT_FLOAT(-9.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(10) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0079) + EVT_CALL(NpcFacePlayer, NPC_SELF, 1) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lily_Idle) + EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_262, 0) + EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, TRUE, 0, 0, 0, 0) + EVT_WAIT(15) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Idle, ANIM_Lily_Idle, 0, MSG_CH6_007A) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_Dread, ANIM_Lily_Idle, 0) + EVT_CALL(GetPlayerTargetYaw, LVar0) + EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 1) + EVT_WAIT(20) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_007B) + EVT_CALL(NpcFacePlayer, NPC_SELF, 1) + EVT_WAIT(20) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_007C) + EVT_CALL(ShowChoice, MSG_Choice_0011) + EVT_WAIT(10) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(0) + EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_007D) + EVT_CASE_EQ(1) + EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_007E) + EVT_END_SWITCH + EVT_WAIT(10) + EVT_SET(GF_FLO10_LilyRequestedWaterStone, TRUE) + EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAGS_400000, 0) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_007F) + EVT_END_IF + EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0080) + EVT_SET(GF_FLO10_ShowedLilyTheWaterStone, TRUE) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0085) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0) + EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0086) + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0087) + EVT_END_SWITCH + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_EXEC_WAIT(N(EVS_PopSong)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lily) = { + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lily))) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) + EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lily_IdlePlead) + EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) + EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAGS_400000, 1) + EVT_END_IF + EVT_CASE_EQ(STORY_CH6_GOT_WATER_STONE) + EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) + EVT_CASE_GE(STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(SetNpcPos, NPC_SELF, -67, -20, -105) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_Lily) = { + .id = NPC_Lily, + .settings = &N(NpcSettings_Lily), + .pos = { 80.0f, -60.0f, 0.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Lily), + .drops = LILY_DROPS, + .animations = LILY_ANIMS, + .tattle = MSG_NpcTattle_Lily, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Lily)), + {} +}; diff --git a/src/world/area_flo/flo_10/CB96B0.c b/src/world/area_flo/flo_10/flo_10_6_waterfx.c similarity index 93% rename from src/world/area_flo/flo_10/CB96B0.c rename to src/world/area_flo/flo_10/flo_10_6_waterfx.c index 2c0845df89..b03269a106 100644 --- a/src/world/area_flo/flo_10/CB96B0.c +++ b/src/world/area_flo/flo_10/flo_10_6_waterfx.c @@ -2,6 +2,16 @@ #include "nu/nusys.h" #include "model.h" +s32 N(WavePhase) = { + 0 +}; + +// unused wavy distortion effect for edge water -- unclear how it would have been used +EvtScript N(EVS_SetupWaterEffect) = { + EVT_RETURN + EVT_END +}; + void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) { s32 i; f32 f0; @@ -9,7 +19,7 @@ void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) { u16* img; s32 alpha; - N(D_80244070_CBD270) += 5; + N(WavePhase) += 5; if (x1 >= x2 || y1 >= y2) { return; @@ -58,13 +68,13 @@ void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) { if (alpha > 255) { alpha = 255; } - gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0xFF, 0xFF, 0xFF, alpha); + gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, alpha); gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(img), G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, 6, x1, y1 - 6 * i - 6, x2 - 1, y1 - 6 * i - 1, 0, G_TX_WRAP, G_TX_WRAP, 9, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle(gMasterGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + 6) * 4, - G_TX_RENDERTILE, x1 * 32, (y1 - i * 6) * 32, 1024, (s32)(sin_deg(N(D_80244070_CBD270) + i * 30) * 500.0f) - 500); + G_TX_RENDERTILE, x1 * 32, (y1 - i * 6) * 32, 1024, (s32)(sin_deg(N(WavePhase) + i * 30) * 500.0f) - 500); } } @@ -74,7 +84,7 @@ void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) { if (alpha > 255) { alpha = 255; } - gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0xFF, 0xFF, 0xFF, alpha); + gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, alpha); gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(img), G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, 6, x1, y1 - 6 * i - m, x2 - 1, y1 - 6 * i - 1, 0, @@ -87,7 +97,7 @@ void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) { void N(UnkModelFunc001)(void) { Camera* camera = &gCameras[gCurrentCameraID]; - Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(0x30)); + Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o40)); ModelBoundingBox* bb = (ModelBoundingBox*) model->modelNode->propertyList; f32 bbHalfX = bb->halfSizeX; f32 bbHalfZ = bb->halfSizeZ; @@ -247,3 +257,4 @@ void N(UnkModelFunc001)(void) { gDPSetDepthSource(gMasterGfxPos++, G_ZS_PIXEL); } } + diff --git a/src/world/area_flo/flo_10/flo_10_7_foliage.c b/src/world/area_flo/flo_10/flo_10_7_foliage.c new file mode 100644 index 0000000000..0e86487b5b --- /dev/null +++ b/src/world/area_flo/flo_10/flo_10_7_foliage.c @@ -0,0 +1,50 @@ +#include "flo_10.h" + +#include "common/foliage.inc.c" + +FoliageModelList N(Tree1_LeafModels) = { + .count = 3, + .models = { + MODEL_o47, + MODEL_o48, + MODEL_o49, + } +}; + +FoliageModelList N(Tree1_TrunkModels) = { + .count = 1, + .models = { + MODEL_o88, + } +}; + +FoliageDropList N(Tree1_Drops) = { + .count = 1, + .drops = { + { + .itemID = ITEM_JAMMIN_JELLY, + .pos = { 80, 100, -240 }, + .spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ONCE, + .pickupFlag = GF_FLO10_Tree1_JamminJelly, + }, + } +}; + +ShakeTreeConfig N(ShakeTree_Tree1) = { + .leaves = &N(Tree1_LeafModels), + .trunk = &N(Tree1_TrunkModels), + .drops = &N(Tree1_Drops), +}; + +BombTrigger N(BombPos_Tree1) = { + .pos = { 137.0f, 0.0f, -283.0f }, + .radius = 0.0f +}; + +EvtScript N(EVS_SetupFoliage) = { + EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o85, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_11/CBDCD0.c b/src/world/area_flo/flo_11/CBDCD0.c deleted file mode 100644 index e4bb3af3b4..0000000000 --- a/src/world/area_flo/flo_11/CBDCD0.c +++ /dev/null @@ -1,664 +0,0 @@ -#include "flo_11.h" -#include "message_ids.h" -#include "sprite/npc/Lakitu.h" -#include "entity.h" -#include "effects.h" - -enum { - NPC_LAKITU0, - NPC_LAKITU1, -}; - -EntryList N(entryList) = { - { 470.0f, 0.0f, -15.0f, 270.0f }, - { -470.0f, 0.0f, -15.0f, 90.0f }, - { 360.0f, 50.0f, -237.0f, 270.0f }, - { 118.0f, 50.0f, -420.0f, 270.0f }, - { 0.0f, 50.0f, 0.0f, 270.0f }, - { -120.0f, 50.0f, 357.0f, 90.0f }, - { -360.0f, 50.0f, -240.0f, 90.0f }, - { -360.0f, 35.0f, 0.0f, 90.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_11 }, -}; - -EvtScript N(802403E0) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(80240450) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -#include "world/common/entity/PipeData.inc.c" - -EvtScript N(exitWalk_8024142C) = EVT_EXIT_WALK(60, 0, "flo_23", 1); - -EvtScript N(exitWalk_80241488) = EVT_EXIT_WALK(60, 1, "flo_12", 0); - -EvtScript N(802414E4) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(GotoMap, EVT_PTR("flo_11"), 5) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241520) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(GotoMap, EVT_PTR("flo_11"), 6) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024155C) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(GotoMap, EVT_PTR("flo_11"), 7) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241598) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(GotoMap, EVT_PTR("flo_11"), 2) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(802415D4) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(GotoMap, EVT_PTR("flo_11"), 3) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241610) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(GotoMap, EVT_PTR("flo_11"), 4) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024164C) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_EXEC_WAIT(N(Pipe_ExitVertical)) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241698) = { - EVT_BIND_TRIGGER(N(exitWalk_80241488), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_8024142C), TRIGGER_FLOOR_ABOVE, 4, 1, 0) - EVT_SET(LVar0, 2) - EVT_SET(LVar1, 35) - EVT_SET(LVar2, EVT_PTR(N(802414E4))) - EVT_BIND_TRIGGER(N(8024164C), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) - EVT_SET(LVar0, 3) - EVT_SET(LVar1, 34) - EVT_SET(LVar2, EVT_PTR(N(80241520))) - EVT_BIND_TRIGGER(N(8024164C), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) - EVT_SET(LVar0, 4) - EVT_SET(LVar1, 33) - EVT_SET(LVar2, EVT_PTR(N(8024155C))) - EVT_BIND_TRIGGER(N(8024164C), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) - EVT_SET(LVar0, 5) - EVT_SET(LVar1, 32) - EVT_SET(LVar2, EVT_PTR(N(80241598))) - EVT_BIND_TRIGGER(N(8024164C), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) - EVT_SET(LVar0, 6) - EVT_SET(LVar1, 31) - EVT_SET(LVar2, EVT_PTR(N(802415D4))) - EVT_BIND_TRIGGER(N(8024164C), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) - EVT_SET(LVar0, 7) - EVT_SET(LVar1, 30) - EVT_SET(LVar2, EVT_PTR(N(80241610))) - EVT_BIND_TRIGGER(N(8024164C), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(func_80044238, 5) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_802430D4))) - EVT_EXEC_WAIT(N(makeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_LE(LVar0, 1) - EVT_SET(LVar0, EVT_PTR(N(80241698))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(80242240)) - EVT_WAIT(1) - EVT_ELSE - EVT_SET(LVarA, EVT_PTR(N(80241698))) - EVT_EXEC(N(Pipe_EnterVertical)) - EVT_WAIT(1) - EVT_END_IF - EVT_EXEC_WAIT(N(802403E0)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_802402E0_CBDFB0)) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, 3, 9, 0x00000009) - EVT_CALL(ModifyColliderFlags, 3, 10, 0x00000009) - EVT_CALL(ModifyColliderFlags, 3, 11, 0x00000009) - EVT_CALL(ModifyColliderFlags, 3, 12, 0x00000009) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_1AB8)[] = { - 0x00000000, 0x00000000, -}; - -NpcSettings N(npcSettings_80241AC0) = { - .height = 32, - .radius = 24, - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 20, -}; - -s32 N(vectorList_80241AEC)[] = { - 0x43E60000, 0x43480000, 0xC3700000, 0x43B40000, 0x43160000, 0xC30C0000, 0x43820000, 0x42C80000, - 0xC3700000, 0x43B40000, 0x42C80000, 0xC3DC0000, 0x43E60000, 0x42C80000, 0xC3700000, 0x43B40000, - 0x42C80000, 0xC30C0000, 0x43820000, 0x42C80000, 0xC3700000, 0x43B40000, 0x42C80000, 0xC3DC0000, -}; - -s32 N(vectorList_80241B4C)[] = { - 0xC2C80000, 0x43480000, 0xC2480000, 0x00000000, 0x43160000, 0xC3160000, 0x42C80000, 0x42C80000, - 0xC2480000, 0x00000000, 0x42C80000, 0x42480000, 0xC2C80000, 0x42C80000, 0xC2480000, 0x00000000, - 0x42C80000, 0xC3160000, 0x42C80000, 0x42C80000, 0xC2480000, 0x00000000, 0x42C80000, 0x42480000, -}; - -s32 N(vectorList_80241BAC)[] = { - 0x43B40000, 0x42C80000, 0xC3DC0000, 0x43AF0000, 0x42F00000, 0xC35C0000, 0x43960000, 0x42F00000, - 0xC3240000, 0x43200000, 0x42DC0000, 0xC3340000, -}; - -s32 N(vectorList_80241BDC)[] = { - 0x00000000, 0x42C80000, 0x42480000, 0x43480000, 0x42DC0000, 0x41E80000, 0x43670000, 0x42DC0000, - 0xC1900000, 0x42E60000, 0x42C80000, 0xC3160000, -}; - -s32 N(vectorList_80241C0C)[] = { - 0x438E8000, 0x42F00000, 0xC2D80000, 0x43B90000, 0x42C80000, 0xC3020000, 0x43E30000, 0x42700000, - 0xC1A00000, -}; - -s32 N(vectorList_80241C30)[] = { - 0x43838000, 0x42DC0000, 0xC2840000, 0x43B40000, 0x42B40000, 0x42480000, 0x43E30000, 0x42480000, - 0x41A00000, -}; - -s32 N(vectorList_80241C54)[] = { - 0x43C80000, 0x41F00000, 0xC2200000, 0x43960000, 0x42A00000, 0xC2200000, 0x43160000, 0x43480000, - 0xC2200000, 0x42C80000, 0x43AF0000, 0xC2200000, -}; - -s32 N(vectorList_80241C84)[] = { - 0x43C80000, 0x41F00000, 0x42200000, 0x43960000, 0x42A00000, 0x42200000, 0x43160000, 0x43480000, - 0x42200000, 0x42C80000, 0x43AF0000, 0x42200000, -}; - -EvtScript N(80241CB4) = { - EVT_LOOP(0) - EVT_CALL(PlaySound, SOUND_295) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(80241CF4) = { - EVT_SET(LVar0, 5) - EVT_EXEC_GET_TID(N(80241CB4), MapVar(11)) - EVT_THREAD - EVT_CALL(LoadPath, 160, EVT_PTR(N(vectorList_80241AEC)), 8, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 160, EVT_PTR(N(vectorList_80241B4C)), 8, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 1, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MapVar(10), 1) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241E4C) = { - EVT_THREAD - EVT_CALL(LoadPath, 30, EVT_PTR(N(vectorList_80241BAC)), 4, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 45, EVT_PTR(N(vectorList_80241BDC)), 4, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 1, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(MapVar(11)) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241F80) = { - EVT_SET(LVar0, 4) - EVT_EXEC_GET_TID(N(80241CB4), MapVar(11)) - EVT_THREAD - EVT_CALL(LoadPath, 35, EVT_PTR(N(vectorList_80241C0C)), 3, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 35, EVT_PTR(N(vectorList_80241C30)), 3, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 1, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(802420C8) = { - EVT_THREAD - EVT_CALL(LoadPath, 40, EVT_PTR(N(vectorList_80241C54)), 4, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, 0, 0, -1000, 0) - EVT_END_THREAD - EVT_CALL(LoadPath, 40, EVT_PTR(N(vectorList_80241C84)), 4, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 1, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, 1, 0, -1000, 0) - EVT_WAIT(40) - EVT_KILL_THREAD(MapVar(11)) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242240) = { - EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, 1) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, 45) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcPos, 0, 460, 200, -240) - EVT_CALL(SetNpcPos, 1, -100, 200, -50) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 440) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(MapVar(10), 0) - EVT_EXEC(N(80241CF4)) - EVT_CALL(SetCamType, 0, 1, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(25.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, 0, 450) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_SET(LVar0, 270) - EVT_SET(LVar1, 100) - EVT_SET(LVar2, -87) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamPosA, 0, 87, 0) - EVT_CALL(SetCamPosB, 0, 0, -50) - EVT_CALL(SetCamPosC, 0, 87, 0) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_CALL(SetCamDistance, 0, 150) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-16.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MapVar(10), 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(NpcFaceNpc, 0, 1, 1) - EVT_CALL(NpcFaceNpc, 1, 0, 1) - EVT_EXEC(N(80241E4C)) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, 0, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0088) - EVT_CALL(NpcFaceNpc, 1, 0, 1) - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0089) - EVT_CALL(InterpNpcYaw, 0, 0, 1) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, 0, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008A) - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008B) - EVT_CALL(SetCamType, 0, 1, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamDistance, 0, 450) - EVT_CALL(SetCamPosA, 0, 87, 0) - EVT_CALL(SetCamPosB, 0, 0, -50) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_EXEC(N(80241F80)) - EVT_CALL(SetNpcVar, 0, 0, 1) - EVT_RETURN - EVT_END -}; - -EvtScript N(idle_80242810) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_THREAD - EVT_CALL(AdjustCam, 0, EVT_FLOAT(4.0), 0, 1000, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) - EVT_END_THREAD - EVT_CALL(StartBossBattle, 3) - EVT_RETURN - EVT_END -}; - -EvtScript N(defeat_802428B8) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetNpcPos, 0, 400, 20, -40) - EVT_CALL(SetNpcPos, 1, 400, 20, 40) - EVT_CALL(InterpNpcYaw, 0, 270, 0) - EVT_CALL(InterpNpcYaw, 1, 270, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -60) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 900) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(24.0), EVT_FLOAT(-4.0)) - EVT_CALL(SetCamPosA, 0, EVT_FLOAT(-95.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamPosB, 0, EVT_FLOAT(0.0), EVT_FLOAT(-50.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(802420C8)) - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_SET(GF_FLO11_Defeated_Lakitus, 1) - EVT_SET(MapVar(0), 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(1) - EVT_CASE_EQ(2) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(defeat_80242AC4) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_LABEL(0) - EVT_IF_EQ(MapVar(0), 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CASE_EQ(2) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80242B58) = { - EVT_CALL(SetNpcPos, 0, 0, -1000, 0) - EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, 0) - EVT_IF_GE(GB_StoryProgress, 45) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, 1) - EVT_SET(MapVar(0), 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80242810))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_802428B8))) - EVT_CALL(SetNpcPos, 0, 350, 120, -220) - EVT_CALL(InterpNpcYaw, 0, 270, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80242C38) = { - EVT_CALL(SetNpcPos, 1, 0, -1000, 0) - EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, 0) - EVT_IF_GE(GB_StoryProgress, 45) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, 1) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80242AC4))) - EVT_CALL(SetNpcPos, 1, 200, 110, 29) - EVT_CALL(InterpNpcYaw, 1, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80242CF4)[] = { - { - .id = NPC_LAKITU0, - .settings = &N(npcSettings_80241AC0), - .pos = { 553.0f, 60.0f, 52.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, - .init = &N(init_80242B58), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 25, - .itemDrops = { - { ITEM_SUPER_SHROOM, 2, 0 }, - { ITEM_MAPLE_SYRUP, 2, 0 }, - { ITEM_THUNDER_RAGE, 2, 0 }, - { ITEM_STOP_WATCH, 2, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(3), - .maxCoinBonus = 2, - }, - .animations = { - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim02, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - }, - }, - { - .id = NPC_LAKITU1, - .settings = &N(npcSettings_80241AC0), - .pos = { 553.0f, 60.0f, 52.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, - .init = &N(init_80242C38), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 25, - .itemDrops = { - { ITEM_SUPER_SHROOM, 2, 0 }, - { ITEM_MAPLE_SYRUP, 2, 0 }, - { ITEM_THUNDER_RAGE, 2, 0 }, - { ITEM_STOP_WATCH, 2, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(3), - .maxCoinBonus = 2, - }, - .animations = { - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim02, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - }, - }, -}; - -NpcGroupList N(npcGroupList_802430D4) = { - NPC_GROUP(N(npcGroup_80242CF4), 0x1807, 0x08), - {}, -}; - -static s32 N(pad_30EC) = { - 0x00000000, -}; - -EvtScript N(makeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), -220, 60, -75, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO11_MultiCoinBrick) - EVT_RETURN - EVT_END -}; - -#include "world/common/entity/Pipe.inc.c" - -ApiStatus N(func_802402E0_CBDFB0)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_11/flo_11.h b/src/world/area_flo/flo_11/flo_11.h index 1be73fa439..1ecf48a574 100644 --- a/src/world/area_flo/flo_11/flo_11.h +++ b/src/world/area_flo/flo_11/flo_11.h @@ -2,16 +2,28 @@ /// @brief Flower Fields - (West) Maze #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_11_shape.h" +#include "mapfs/flo_11_hit.h" + +enum { + NPC_Lakitu_01 = 0, + NPC_Lakitu_02 = 1, +}; + +enum { + MV_LakituAmbushState = MapVar(0), + MV_LakituSearchSync = MapVar(10), + MV_FlyingSoundsScript = MapVar(11), +}; + #define NAMESPACE flo_11 -ApiStatus N(func_802402E0_CBDFB0)(Evt* script, s32 isInitialCall); - -extern NpcGroupList N(npcGroupList_802430D4); -extern EvtScript N(80240F1C); -extern EvtScript N(80242240); -extern EvtScript N(main); -extern EvtScript N(makeEntities); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_MakeEntities); +extern EvtScript N(EVS_Scene_LakituAmbush); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_11/flo_11_0_header.c b/src/world/area_flo/flo_11/flo_11_0_header.c new file mode 100644 index 0000000000..434cfc746b --- /dev/null +++ b/src/world/area_flo/flo_11/flo_11_0_header.c @@ -0,0 +1,20 @@ +#include "flo_11.h" + +EntryList N(Entrances) = { + [flo_11_ENTRY_0] { 470.0, 0.0, -15.0, 270.0 }, + [flo_11_ENTRY_1] { -470.0, 0.0, -15.0, 90.0 }, + [flo_11_ENTRY_2] { 360.0, 50.0, -237.0, 270.0 }, + [flo_11_ENTRY_3] { 118.0, 50.0, -420.0, 270.0 }, + [flo_11_ENTRY_4] { 0.0, 50.0, 0.0, 270.0 }, + [flo_11_ENTRY_5] { -120.0, 50.0, 357.0, 90.0 }, + [flo_11_ENTRY_6] { -360.0, 50.0, -240.0, 90.0 }, + [flo_11_ENTRY_7] { -360.0, 35.0, 0.0, 90.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_11 }, +}; diff --git a/src/world/area_flo/flo_11/flo_11_1_music.c b/src/world/area_flo/flo_11/flo_11_1_music.c new file mode 100644 index 0000000000..0fe004dc96 --- /dev/null +++ b/src/world/area_flo/flo_11/flo_11_1_music.c @@ -0,0 +1,12 @@ +#include "flo_11.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_11/flo_11_2_main.c b/src/world/area_flo/flo_11/flo_11_2_main.c new file mode 100644 index 0000000000..e5200c3210 --- /dev/null +++ b/src/world/area_flo/flo_11/flo_11_2_main.c @@ -0,0 +1,94 @@ +#include "flo_11.h" +#include "effects.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +#include "world/common/entity/Pipe.inc.c" +#include "world/common/entity/Pipe.data.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_23_1) = EVT_EXIT_WALK(60, flo_11_ENTRY_0, "flo_23", flo_23_ENTRY_1); +EvtScript N(EVS_ExitWalk_flo_12_0) = EVT_EXIT_WALK(60, flo_11_ENTRY_1, "flo_12", flo_12_ENTRY_0); + +// template for GotoMap exits used with pipes in the maze +#define EVT_GOTO_MAP(mapName, entry) \ +{ \ + EVT_SET_GROUP(EVT_GROUP_1B) \ + EVT_CALL(GotoMap, EVT_PTR(mapName), entry) \ + EVT_WAIT(100) \ + EVT_RETURN \ + EVT_END \ +} + +// template for binding the event for the generic EVS_OnEnterPipe +#define EVT_SETUP_PIPE(entry, collider, exitScript) \ + EVT_SET(LVar0, entry) \ + EVT_SET(LVar1, collider) \ + EVT_SET(LVar2, EVT_PTR(exitScript)) \ + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) + +EvtScript N(EVS_GotoMap_flo_11_5) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_5); +EvtScript N(EVS_GotoMap_flo_11_6) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_6); +EvtScript N(EVS_GotoMap_flo_11_7) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_7); +EvtScript N(EVS_GotoMap_flo_11_2) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_2); +EvtScript N(EVS_GotoMap_flo_11_3) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_3); +EvtScript N(EVS_GotoMap_flo_11_4) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_4); + +EvtScript N(EVS_OnEnterPipe) = { + EVT_SET(LVarA, LVar0) + EVT_SET(LVarB, LVar1) + EVT_SET(LVarC, LVar2) + EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_23_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_SETUP_PIPE(flo_11_ENTRY_2, COLLIDER_o91, N(EVS_GotoMap_flo_11_5)) // link 2 <--> 5 + EVT_SETUP_PIPE(flo_11_ENTRY_3, COLLIDER_o92, N(EVS_GotoMap_flo_11_6)) // link 3 <--> 6 + EVT_SETUP_PIPE(flo_11_ENTRY_4, COLLIDER_o93, N(EVS_GotoMap_flo_11_7)) // link 4 <--> 7 + EVT_SETUP_PIPE(flo_11_ENTRY_5, COLLIDER_o94, N(EVS_GotoMap_flo_11_2)) // link 2 <--> 5 + EVT_SETUP_PIPE(flo_11_ENTRY_6, COLLIDER_o95, N(EVS_GotoMap_flo_11_3)) // link 3 <--> 6 + EVT_SETUP_PIPE(flo_11_ENTRY_7, COLLIDER_o96, N(EVS_GotoMap_flo_11_4)) // link 4 <--> 7 + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(func_80044238, 5) + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(GetEntryID, LVar0) + EVT_IF_LE(LVar0, flo_11_ENTRY_1) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC(N(EVS_Scene_LakituAmbush)) + EVT_WAIT(1) + EVT_ELSE + EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(N(EVS_Pipe_EnterVertical)) + EVT_WAIT(1) + EVT_END_IF + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o90, SURFACE_TYPE_HEDGES) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_HEDGES) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o105, SURFACE_TYPE_HEDGES) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o109, SURFACE_TYPE_HEDGES) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_11/flo_11_3_npc.c b/src/world/area_flo/flo_11/flo_11_3_npc.c new file mode 100644 index 0000000000..6d578f4920 --- /dev/null +++ b/src/world/area_flo/flo_11/flo_11_3_npc.c @@ -0,0 +1,397 @@ +#include "flo_11.h" + +#include "world/common/enemy/complete/Lakitu_Stationary.inc.c" + +Vec3f N(FlightPath_Lakitu_01_Search)[] = { + { 460.0, 200.0, -240.0 }, + { 360.0, 150.0, -140.0 }, + { 260.0, 100.0, -240.0 }, + { 360.0, 100.0, -440.0 }, + { 460.0, 100.0, -240.0 }, + { 360.0, 100.0, -140.0 }, + { 260.0, 100.0, -240.0 }, + { 360.0, 100.0, -440.0 }, +}; + +Vec3f N(FlightPath_Lakitu_02_Search)[] = { + { -100.0, 200.0, -50.0 }, + { 0.0, 150.0, -150.0 }, + { 100.0, 100.0, -50.0 }, + { 0.0, 100.0, 50.0 }, + { -100.0, 100.0, -50.0 }, + { 0.0, 100.0, -150.0 }, + { 100.0, 100.0, -50.0 }, + { 0.0, 100.0, 50.0 }, +}; + +Vec3f N(FlightPath_Lakitu_01_Gather)[] = { + { 360.0, 100.0, -440.0 }, + { 350.0, 120.0, -220.0 }, + { 300.0, 120.0, -164.0 }, + { 160.0, 110.0, -180.0 }, +}; + +Vec3f N(FlightPath_Lakitu_02_Gather)[] = { + { 0.0, 100.0, 50.0 }, + { 200.0, 110.0, 29.0 }, + { 231.0, 110.0, -18.0 }, + { 115.0, 100.0, -150.0 }, +}; + +Vec3f N(FlightPath_Lakitu_01_Attack)[] = { + { 285.0, 120.0, -108.0 }, + { 370.0, 100.0, -130.0 }, + { 454.0, 60.0, -20.0 }, +}; + +Vec3f N(FlightPath_Lakitu_02_Attack)[] = { + { 263.0, 110.0, -66.0 }, + { 360.0, 90.0, 50.0 }, + { 454.0, 50.0, 20.0 }, +}; + +Vec3f N(FlightPath_Lakitu_01_Flee)[] = { + { 400.0, 30.0, -40.0 }, + { 300.0, 80.0, -40.0 }, + { 150.0, 200.0, -40.0 }, + { 100.0, 350.0, -40.0 }, +}; + +Vec3f N(FlightPath_Lakitu_02_Flee)[] = { + { 400.0, 30.0, 40.0 }, + { 300.0, 80.0, 40.0 }, + { 150.0, 200.0, 40.0 }, + { 100.0, 350.0, 40.0 }, +}; + +EvtScript N(EVS_PlayFlightSounds) = { + EVT_LOOP(0) + EVT_CALL(PlaySound, SOUND_295) + EVT_WAIT(LVar0) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_LakitusFlying_Search) = { + EVT_SET(LVar0, 5) + EVT_EXEC_GET_TID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript) + EVT_THREAD + EVT_CALL(LoadPath, 160, EVT_PTR(N(FlightPath_Lakitu_01_Search)), + ARRAY_COUNT(N(FlightPath_Lakitu_01_Search)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_THREAD + EVT_CALL(LoadPath, 160, EVT_PTR(N(FlightPath_Lakitu_02_Search)), + ARRAY_COUNT(N(FlightPath_Lakitu_02_Search)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_SET(MV_LakituSearchSync, 1) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_LakitusFlying_Gather) = { + EVT_THREAD + EVT_CALL(LoadPath, 30, EVT_PTR(N(FlightPath_Lakitu_01_Gather)), + ARRAY_COUNT(N(FlightPath_Lakitu_01_Gather)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_THREAD + EVT_CALL(LoadPath, 45, EVT_PTR(N(FlightPath_Lakitu_02_Gather)), + ARRAY_COUNT(N(FlightPath_Lakitu_02_Gather)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_KILL_THREAD(MV_FlyingSoundsScript) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_LakitusFlying_Attack) = { + EVT_SET(LVar0, 4) + EVT_EXEC_GET_TID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript) + EVT_THREAD + EVT_CALL(LoadPath, 35, EVT_PTR(N(FlightPath_Lakitu_01_Attack)), + ARRAY_COUNT(N(FlightPath_Lakitu_01_Attack)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_THREAD + EVT_CALL(LoadPath, 35, EVT_PTR(N(FlightPath_Lakitu_02_Attack)), + ARRAY_COUNT(N(FlightPath_Lakitu_02_Attack)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_LakitusFlying_Flee) = { + EVT_THREAD + EVT_CALL(LoadPath, 40, EVT_PTR(N(FlightPath_Lakitu_01_Flee)), + ARRAY_COUNT(N(FlightPath_Lakitu_01_Flee)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION) + EVT_END_THREAD + EVT_CALL(LoadPath, 40, EVT_PTR(N(FlightPath_Lakitu_02_Flee)), + ARRAY_COUNT(N(FlightPath_Lakitu_02_Flee)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION) + EVT_WAIT(40) + EVT_KILL_THREAD(MV_FlyingSoundsScript) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_LakituAmbush) = { + EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, TRUE) + EVT_RETURN + EVT_END_IF + EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + EVT_RETURN + EVT_END_IF + EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE) + EVT_RETURN + EVT_END_IF + EVT_CALL(SetNpcPos, NPC_Lakitu_01, 460, 200, -240) + EVT_CALL(SetNpcPos, NPC_Lakitu_02, -100, 200, -50) + EVT_LOOP(0) + EVT_WAIT(1) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_IF_LT(LVar0, 440) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(DisablePlayerInput, TRUE) + EVT_SET(MV_LakituSearchSync, 0) + EVT_EXEC(N(EVS_LakitusFlying_Search)) + EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-7.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(20) + EVT_SET(LVar0, 270) + EVT_SET(LVar1, 100) + EVT_SET(LVar2, -87) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, 87, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) + EVT_CALL(SetCamPosC, CAM_DEFAULT, 87, 0) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(30) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 150) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-16.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_LOOP(0) + EVT_WAIT(1) + EVT_IF_EQ(MV_LakituSearchSync, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(NpcFaceNpc, NPC_Lakitu_01, NPC_Lakitu_02, 1) + EVT_CALL(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1) + EVT_EXEC(N(EVS_LakitusFlying_Gather)) + EVT_WAIT(30) + EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0088) + EVT_CALL(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1) + EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0089) + EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 0, 1) + EVT_WAIT(20) + EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008A) + EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008B) + EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) + EVT_CALL(SetCamPosA, CAM_DEFAULT, 87, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_EXEC(N(EVS_LakitusFlying_Attack)) + EVT_CALL(SetNpcVar, NPC_Lakitu_01, 0, 1) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcIdle_Lakitu_01) = { + EVT_LOOP(0) + EVT_CALL(GetSelfVar, 0, LVar0) + EVT_IF_NE(LVar0, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_THREAD + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, 1000, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) + EVT_END_THREAD + EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_Lakitu_01) = { + EVT_CALL(GetBattleOutcome, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(OUTCOME_PLAYER_WON) + EVT_CALL(SetNpcPos, NPC_Lakitu_01, 400, 20, -40) + EVT_CALL(SetNpcPos, NPC_Lakitu_02, 400, 20, 40) + EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 270, 0) + EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 270, 0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar2, -60) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 900) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(24.0), EVT_FLOAT(-4.0)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-95.0), EVT_FLOAT(0.0)) + EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(-50.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_EXEC_WAIT(N(EVS_LakitusFlying_Flee)) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_SET(GF_FLO11_Defeated_Lakitus, TRUE) + EVT_SET(MV_LakituAmbushState, 1) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_CASE_EQ(OUTCOME_PLAYER_LOST) + EVT_CASE_EQ(OUTCOME_PLAYER_FLED) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_Lakitu_02) = { + EVT_CALL(GetBattleOutcome, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(OUTCOME_PLAYER_WON) + EVT_LABEL(0) + EVT_IF_EQ(MV_LakituAmbushState, 0) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_END_IF + EVT_CASE_EQ(OUTCOME_PLAYER_LOST) + EVT_CASE_EQ(OUTCOME_PLAYER_FLED) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakitu_01) = { + EVT_CALL(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION) + EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, FALSE) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE) + EVT_SET(MV_LakituAmbushState, 0) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Lakitu_01))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu_01))) + EVT_CALL(SetNpcPos, NPC_Lakitu_01, 350, 120, -220) + EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 270, 1) + EVT_END_IF + EVT_END_IF + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakitu_02) = { + EVT_CALL(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION) + EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, FALSE) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu_02))) + EVT_CALL(SetNpcPos, NPC_Lakitu_02, 200, 110, 29) + EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 0, 1) + EVT_END_IF + EVT_END_IF + EVT_END_IF + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_Lakitus)[] = { + { + .id = NPC_Lakitu_01, + .settings = &N(NpcSettings_Lakitu), + .pos = { 553.0f, 60.0f, 52.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, + .init = &N(EVS_NpcInit_Lakitu_01), + .drops = LAKITU_DROPS, + .animations = LAKITU_ANIMS, + }, + { + .id = NPC_Lakitu_02, + .settings = &N(NpcSettings_Lakitu), + .pos = { 553.0f, 60.0f, 52.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, + .init = &N(EVS_NpcInit_Lakitu_02), + .drops = LAKITU_DROPS, + .animations = LAKITU_ANIMS, + }, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Lakitus), BTL_FLO_FORMATION_07, BTL_FLO_STAGE_08), + {} +}; diff --git a/src/world/area_flo/flo_11/flo_11_4_entity.c b/src/world/area_flo/flo_11/flo_11_4_entity.c new file mode 100644 index 0000000000..a0b15ab008 --- /dev/null +++ b/src/world/area_flo/flo_11/flo_11_4_entity.c @@ -0,0 +1,9 @@ +#include "flo_11.h" +#include "entity.h" + +EvtScript N(EVS_MakeEntities) = { + EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), -220, 60, -75, 0, MAKE_ENTITY_END) + EVT_CALL(AssignBlockFlag, GF_FLO11_MultiCoinBrick) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_12/CC0E30.c b/src/world/area_flo/flo_12/CC0E30.c deleted file mode 100644 index 602e4457f0..0000000000 --- a/src/world/area_flo/flo_12/CC0E30.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "flo_12.h" -#include "effects.h" - -ApiStatus N(func_80240000_CC0E30)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_12/CC0E70.c b/src/world/area_flo/flo_12/CC0E70.c deleted file mode 100644 index 91eed60097..0000000000 --- a/src/world/area_flo/flo_12/CC0E70.c +++ /dev/null @@ -1,530 +0,0 @@ -#include "flo_12.h" -#include "message_ids.h" -#include "sprite/npc/Rosie.h" - -enum { - NPC_ROSIE0, - NPC_ROSIE1, -}; - -static s32 N(flo_12_D_802429E0)[112]; - -EntryList N(entryList) = { - { 280.0f, 0.0f, 0.0f, 270.0f }, - { 280.0f, 0.0f, 0.0f, 270.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_12 }, -}; - -EvtScript N(80240750) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(8024080C) = { - EVT_CALL(PushSong, 137, 3) - EVT_RETURN - EVT_END -}; - -EvtScript N(80240830) = { - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_86C) = { - 0x00000000, -}; - -EvtScript N(80240870) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_80240B1C) = EVT_EXIT_WALK(60, 0, "flo_11", 1); - -EvtScript N(80240B78) = { - EVT_BIND_TRIGGER(N(exitWalk_80240B1C), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_SET(AreaFlag(22), 0) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_802429B8))) - EVT_CALL(ModifyColliderFlags, 3, 11, 0x00000006) - EVT_SET(LVar0, -65) - EVT_SET(LVar1, -210) - EVT_SET(LVar2, 90) - EVT_SET(LVar3, -110) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80240870)) - EVT_SET(LVar0, -200) - EVT_SET(LVar1, 130) - EVT_SET(LVar2, -80) - EVT_SET(LVar3, 170) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80240870)) - EVT_SET(LVar0, -270) - EVT_SET(LVar1, -80) - EVT_SET(LVar2, -225) - EVT_SET(LVar3, 125) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80240870)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC(N(802419F4)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80240B78))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_EXEC_WAIT(N(80240750)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240000_CC0E30)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_E28)[] = { - 0x00000000, 0x00000000, -}; - -NpcSettings N(npcSettings_80240E30) = { - .height = 56, - .radius = 40, - .level = 99, -}; - -NpcSettings N(npcSettings_80240E5C) = { - .height = 24, - .radius = 24, - .level = 99, -}; - -#include "common/foliage.inc.c" - -s32** N(varStash) = NULL; - -EvtScript N(802417F0) = { - EVT_CALL(ShowGotItem, LVar0, 1, 0) - EVT_RETURN - EVT_RETURN - EVT_END -}; - -EvtScript N(80241820) = { - EVT_CALL(ShowGotItem, LVar0, 1, 16) - EVT_RETURN - EVT_RETURN - EVT_END -}; - -s32 N(D_80241850_CC2680) = { - 0x00000000, -}; - -s32 N(D_80241854_CC2684) = { - 0x00000000, -}; - -EvtScript N(80241858) = { - EVT_SET(LVar9, LVar1) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVarA, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) - EVT_BITWISE_OR_CONST(LVar0, 0x50000) - EVT_CALL(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, 1, 0) - EVT_CALL(SetPlayerAnimation, 393221) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_END_SWITCH - EVT_CALL(N(func_80240614_CC1444), LVarA) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END -}; - -EvtScript N(8024199C) = { - EVT_CALL(N(func_8024064C_CC147C), LVar0) - EVT_BIND_PADLOCK(N(80241858), 0x10, 0, EVT_PTR(N(flo_12_D_802429E0)), 0, 1) - EVT_CALL(N(func_802405C0_CC13F0), LVar0) - EVT_RETURN - EVT_END -}; - -s32 N(D_802419EC_CC281C)[] = { - 0x0000001E, 0x00000000, -}; - -EvtScript N(802419F4) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetNpcPos, 0, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 350) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamPosA, 0, 0, 0) - EVT_CALL(SetCamPosB, 0, 0, -50) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, 0, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_00C7) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_03"), 2) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241B6C) = { - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_100)), TRUE) - EVT_CALL(PlayerMoveTo, -5, 20, 20) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_100)), FALSE) - EVT_CALL(PlayerFaceNpc, 0, 1) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241BE4) = { - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_100)), TRUE) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_100)), TRUE) - EVT_CALL(PlayerMoveTo, -5, 20, 20) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_100)), FALSE) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_100)), FALSE) - EVT_CALL(PlayerFaceNpc, 0, 1) - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_80241C8C) = { - EVT_EXEC_WAIT(N(8024080C)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(47) - EVT_SWITCH(GF_FLO12_Met_Rosie) - EVT_CASE_EQ(0) - EVT_EXEC(N(80241B6C)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetCamProperties, 0, EVT_FLOAT(4.0), LVar0, LVar1, LVar2, 325, EVT_FLOAT(19.0), EVT_FLOAT(-9.5)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008C) - EVT_CALL(ShowChoice, MSG_Choice_0011) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ContinueSpeech, -1, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008D) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, -1, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008E) - EVT_END_SWITCH - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_100)), FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_TakeOut) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, 1, 1380) - EVT_WAIT(10) - EVT_SWITCH(GF_FLO10_LilyRequestedWaterStone) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) - EVT_CASE_EQ(1) - EVT_CALL(SetPlayerAnimation, 393218) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) - EVT_CALL(SetPlayerAnimation, 393221) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_AnimPray) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) - EVT_SET(GF_FLO12_RosieRequestedSomethingBeautiful, 1) - EVT_END_SWITCH - EVT_SET(GF_FLO12_Met_Rosie, 1) - EVT_CASE_EQ(1) - EVT_SWITCH(GF_FLO12_RosieRequestedSomethingBeautiful) - EVT_CASE_EQ(0) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, 1) - EVT_EXEC(N(80241BE4)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) - EVT_CALL(SetPlayerAnimation, 393221) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_AnimPray) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) - EVT_SET(GF_FLO12_RosieRequestedSomethingBeautiful, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CASE_LT(48) - EVT_CALL(FindKeyItem, ITEM_CRYSTAL_BERRY, LVar0) - EVT_IF_NE(LVar0, -1) - EVT_EXEC(N(80241BE4)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetCamProperties, 0, EVT_FLOAT(4.0), LVar0, LVar1, LVar2, 325, EVT_FLOAT(19.0), EVT_FLOAT(-9.5)) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0094) - EVT_SET(LVar0, EVT_PTR(N(D_802419EC_CC281C))) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(N(8024199C)) - EVT_SWITCH(LVar0) - EVT_CASE_LE(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0095) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, 1, 1380) - EVT_SET(LVar0, 87) - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(802417F0)) - EVT_CALL(AddKeyItem, ITEM_WATER_STONE) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) - EVT_SET(AreaFlag(22), 1) - EVT_SET(GB_StoryProgress, 48) - EVT_END_SWITCH - EVT_CASE_LT(53) - EVT_SWITCH(AreaFlag(22)) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0097) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) - EVT_END_SWITCH - EVT_CASE_LT(60) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0098) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0099) - EVT_END_SWITCH - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(80240830)) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_802423D0) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80241C8C))) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 35) - EVT_CALL(SetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_2)), TRUE) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_HAS_SHADOW)), TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(47) - EVT_IF_EQ(GF_FLO12_Met_Rosie, 1) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_100)), FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, 1, 1380) - EVT_SET(LVarA, LVar0) - EVT_END_IF - EVT_CASE_LT(48) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_100)), FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, 1, 1380) - EVT_SET(LVarA, LVar0) - EVT_CASE_DEFAULT - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_100)), FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, 1, 1380) - EVT_SET(LVarA, LVar0) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_802425D8)[] = { - { - .id = NPC_ROSIE0, - .settings = &N(npcSettings_80240E30), - .pos = { -70.0f, 0.0f, 20.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_400000, - .init = &N(init_802423D0), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - }, - .tattle = MSG_NpcTattle_Rosie, - }, - { - .id = NPC_ROSIE1, - .settings = &N(npcSettings_80240E5C), - .pos = { -70.0f, 0.0f, 20.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_GRAVITY, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - ANIM_Rosie_Idle, - }, - }, -}; - -NpcGroupList N(npcGroupList_802429B8) = { - NPC_GROUP(N(npcGroup_802425D8)), - {}, -}; - -#include "world/common/todo/StashVars.inc.c" - -#include "world/common/todo/GetItemName.inc.c" - -#include "world/common/todo/GetNpcCollisionHeight.inc.c" - -#include "world/common/todo/AddPlayerHandsOffset.inc.c" - -ApiStatus N(func_802405C0_CC13F0)(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - - if (isInitialCall) { - N(D_80241850_CC2680) = FALSE; - } - - if (N(D_80241850_CC2680)) { - N(D_80241850_CC2680) = FALSE; - evt_set_variable(script, *args, N(D_80241854_CC2684)); - return ApiStatus_DONE2; - } - - return ApiStatus_BLOCK; -} - -ApiStatus N(func_80240614_CC1444)(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - - N(D_80241854_CC2684) = evt_get_variable(script, *args); - N(D_80241850_CC2680) = TRUE; - return ApiStatus_DONE2; -} - -ApiStatus N(func_8024064C_CC147C)(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32* ptr = (s32*)evt_get_variable(script, *args); - s32 i; - - if (ptr != NULL) { - for (i = 0; ptr[i] != 0; i++) { - N(flo_12_D_802429E0)[i] = ptr[i]; - } - N(flo_12_D_802429E0)[i] = 0; - } else { - for (i = 0; i < 0x70; i++) { - N(flo_12_D_802429E0)[i] = i + 16; - N(flo_12_D_802429E0)[112] = 0; - } - } - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_12/flo_12.h b/src/world/area_flo/flo_12/flo_12.h index b048dc721a..996d6eb8fd 100644 --- a/src/world/area_flo/flo_12/flo_12.h +++ b/src/world/area_flo/flo_12/flo_12.h @@ -2,19 +2,23 @@ /// @brief Flower Fields - (West) Rosie's Trellis #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_12_shape.h" +#include "mapfs/flo_12_hit.h" + +enum { + NPC_Rosie = 0, + NPC_Dummy = 1, +}; + #define NAMESPACE flo_12 -ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall); -ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240000_CC0E30)(Evt* script, s32 isInitialCall); -ApiStatus N(func_802405C0_CC13F0)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240614_CC1444)(Evt* script, s32 isInitialCall); -ApiStatus N(func_8024064C_CC147C)(Evt* script, s32 isInitialCall); - -extern NpcGroupList N(npcGroupList_802429B8); -extern EvtScript N(802419F4); -extern EvtScript N(main); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_PushFlowerSong); +extern EvtScript N(EVS_PopMusic); +extern EvtScript N(EVS_Scene_SunReturns); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_12/flo_12_0_header.c b/src/world/area_flo/flo_12/flo_12_0_header.c new file mode 100644 index 0000000000..cb6d2fbea2 --- /dev/null +++ b/src/world/area_flo/flo_12/flo_12_0_header.c @@ -0,0 +1,14 @@ +#include "flo_12.h" + +EntryList N(Entrances) = { + [flo_12_ENTRY_0] { 280.0, 0.0, 0.0, 270.0 }, + [flo_12_ENTRY_1] { 280.0, 0.0, 0.0, 270.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_12 }, +}; diff --git a/src/world/area_flo/flo_12/flo_12_1_music.c b/src/world/area_flo/flo_12/flo_12_1_music.c new file mode 100644 index 0000000000..1c6bd2255a --- /dev/null +++ b/src/world/area_flo/flo_12/flo_12_1_music.c @@ -0,0 +1,31 @@ +#include "flo_12.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_12_ENTRY_1) + EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + EVT_ELSE + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PushFlowerSong) = { + EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 3) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PopMusic) = { + EVT_CALL(FadeOutMusic, 0, 250) + EVT_WAIT(10) + EVT_CALL(PopSong) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_12/flo_12_2_main.c b/src/world/area_flo/flo_12/flo_12_2_main.c new file mode 100644 index 0000000000..f04ac2e97b --- /dev/null +++ b/src/world/area_flo/flo_12/flo_12_2_main.c @@ -0,0 +1,44 @@ +#include "flo_12.h" +#include "effects.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_11_1) = EVT_EXIT_WALK(60, flo_12_ENTRY_0, "flo_11", flo_11_ENTRY_1); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_SET(AF_FLO_GivenCrystalBerry, FALSE) + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o180, SURFACE_TYPE_FLOWERS) + EVT_FLOWER_SPAWN_REGION( -65, -210, 90, -110, 0) + EVT_FLOWER_SPAWN_REGION( -200, 130, -80, 170, 0) + EVT_FLOWER_SPAWN_REGION( -270, -80, -225, 125, 0) + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_12_ENTRY_1) + EVT_EXEC(N(EVS_Scene_SunReturns)) + EVT_ELSE + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_END_IF + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_12/flo_12_3_npc.c b/src/world/area_flo/flo_12/flo_12_3_npc.c new file mode 100644 index 0000000000..c9b2d86d61 --- /dev/null +++ b/src/world/area_flo/flo_12/flo_12_3_npc.c @@ -0,0 +1,217 @@ +#include "flo_12.h" + +#include "world/common/npc/Rosie.inc.c" +#include "world/common/npc/Dummy.inc.c" + +#include "common/foliage.inc.c" + +#include "world/common/complete/GiveReward.inc.c" +#include "world/common/complete/KeyItemChoice.inc.c" + +s32 N(KeyList)[] = { + ITEM_CRYSTAL_BERRY, + ITEM_NONE +}; + +EvtScript N(EVS_Scene_SunReturns) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_CALL(GetNpcPos, NPC_Rosie, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.5)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(20) + EVT_CALL(SpeakToPlayer, NPC_Rosie, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_00C7) + EVT_WAIT(10) + EVT_CALL(GotoMap, EVT_PTR("flo_03"), flo_03_ENTRY_2) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PlayerApproachRosie) = { + EVT_WAIT(10) + EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_100, TRUE) + EVT_CALL(PlayerMoveTo, -5, 20, 20) + EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_100, FALSE) + EVT_CALL(PlayerFaceNpc, NPC_Rosie, TRUE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PlayerApproachRosieAndItem) = { + EVT_WAIT(10) + EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_100, TRUE) + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, TRUE) + EVT_CALL(PlayerMoveTo, -5, 20, 20) + EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_100, FALSE) + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, FALSE) + EVT_CALL(PlayerFaceNpc, NPC_Rosie, TRUE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Rosie) = { + EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) + EVT_SWITCH(GF_FLO12_Met_Rosie) + EVT_CASE_EQ(0) + EVT_EXEC(N(EVS_PlayerApproachRosie)) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 30) + EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), LVar0, LVar1, LVar2, 325, EVT_FLOAT(19.0), EVT_FLOAT(-9.5)) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008C) + EVT_CALL(ShowChoice, MSG_Choice_0011) + EVT_WAIT(10) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(0) + EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008D) + EVT_CASE_EQ(1) + EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008E) + EVT_END_SWITCH + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, FALSE) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_TakeOut) + EVT_WAIT(10) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, 0x00000564) + EVT_WAIT(10) + EVT_SWITCH(GF_FLO10_LilyRequestedWaterStone) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) + EVT_CASE_EQ(1) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_60002) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_60005) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_AnimPray) + EVT_WAIT(40) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) + EVT_SET(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + EVT_END_SWITCH + EVT_SET(GF_FLO12_Met_Rosie, TRUE) + EVT_CASE_EQ(1) + EVT_SWITCH(GF_FLO12_RosieRequestedSomethingBeautiful) + EVT_CASE_EQ(0) + EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE) + EVT_EXEC(N(EVS_PlayerApproachRosieAndItem)) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_60005) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_AnimPray) + EVT_WAIT(40) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) + EVT_SET(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) + EVT_END_IF + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) + EVT_END_SWITCH + EVT_END_SWITCH + EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) + EVT_CALL(FindKeyItem, ITEM_CRYSTAL_BERRY, LVar0) + EVT_IF_NE(LVar0, -1) + EVT_EXEC(N(EVS_PlayerApproachRosieAndItem)) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 30) + EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), LVar0, LVar1, LVar2, 325, EVT_FLOAT(19.0), EVT_FLOAT(-9.5)) + EVT_END_IF + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0094) + EVT_CHOOSE_KEY_ITEM_FROM(N(KeyList)) + EVT_SWITCH(LVar0) + EVT_CASE_LE(0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0095) + EVT_CALL(RemoveItemEntity, LVar7) + EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + EVT_GIVE_KEY_REWARD(ITEM_WATER_STONE) + EVT_WAIT(10) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) + EVT_SET(AF_FLO_GivenCrystalBerry, TRUE) + EVT_SET(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE) + EVT_END_SWITCH + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_SWITCH(AF_FLO_GivenCrystalBerry) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0097) + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) + EVT_END_SWITCH + EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0098) + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0099) + EVT_END_SWITCH + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_EXEC_WAIT(N(EVS_PopMusic)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Rosie) = { + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rosie))) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 35) + EVT_CALL(SetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_2, TRUE) + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, TRUE) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) + EVT_IF_EQ(GF_FLO12_Met_Rosie, TRUE) + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, FALSE) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + EVT_SET(LVarA, LVar0) + EVT_END_IF + EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, FALSE) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + EVT_SET(LVarA, LVar0) + EVT_CASE_DEFAULT + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, FALSE) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + EVT_SET(LVarA, LVar0) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_Rosie)[] = { + { + .id = NPC_Rosie, + .settings = &N(NpcSettings_Rosie), + .pos = { -70.0f, 0.0f, 20.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_400000, + .init = &N(EVS_NpcInit_Rosie), + .drops = ROSIE_DROPS, + .animations = ROSIE_ANIMS, + .tattle = MSG_NpcTattle_Rosie, + }, + { + .id = NPC_Dummy, + .settings = &N(NpcSettings_Dummy), + .pos = { -70.0f, 0.0f, 20.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_GRAVITY, + .drops = ROSIE_DROPS, + .animations = ROSIE_ANIMS, + }, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Rosie)), + {} +}; diff --git a/src/world/area_flo/flo_13/CC3810.c b/src/world/area_flo/flo_13/CC3810.c deleted file mode 100644 index b410872f6d..0000000000 --- a/src/world/area_flo/flo_13/CC3810.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "flo_13.h" -#include "effects.h" - -ApiStatus N(func_80240000_CC3810)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_13/CC3850.c b/src/world/area_flo/flo_13/CC3850.c deleted file mode 100644 index 48b951ec25..0000000000 --- a/src/world/area_flo/flo_13/CC3850.c +++ /dev/null @@ -1,1296 +0,0 @@ -#include "flo_13.h" -#include "message_ids.h" -#include "entity.h" -#include "sprite/npc/Lakilulu.h" -#include "sprite/npc/Lakitu.h" -#include "sprite/npc/Spiny.h" -#include "sprite/npc/WorldLakilester.h" - -enum { - NPC_WORLD_LAKILESTER, - NPC_LAKILULU0, - NPC_LAKILULU1, - NPC_LAKITU0, - NPC_LAKITU1, - NPC_SPINY0 = 50, - NPC_SPINY1, - NPC_SPINY2, - NPC_SPINY3, - NPC_SPINY4, - NPC_SPINY5, -}; - -EntryList N(entryList) = { - { 570.0f, 0.0f, 0.0f, 270.0f }, - { -570.0f, 0.0f, 0.0f, 90.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_13 }, -}; - -EvtScript N(802436D0) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -500) - EVT_GOTO(10) - EVT_END_IF - EVT_LABEL(0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -500) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(10) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -500) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(802438B0) = { - EVT_EXEC(N(802436D0)) - EVT_RETURN - EVT_END -}; - -EvtScript N(802438CC) = { - EVT_CALL(SetMusicTrack, 0, SONG_NEW_PARTNER, 0, 8) - EVT_RETURN - EVT_END -}; - -EvtScript N(802438F8) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(15) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_3944)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(80243950) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 14, 0x7FFFFE00) - EVT_RETURN - EVT_END -}; - -EvtScript N(makeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_MEGA_SMASH, -61, 60, -85, 17, GF_FLO13_Item_MegaSmash) - EVT_CALL(MakeItemEntity, ITEM_SHOOTING_STAR, 128, 0, 157, 17, GF_FLO13_Item_ShootingStar) - EVT_IF_EQ(GF_FLO13_Item_MegaSmash, 0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), -160, 160, -90, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(80243950))) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 14, 0x7FFFFE00) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_3A3C) = { - 0x00000000, -}; - -EvtScript N(80243A40) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_80243CEC) = EVT_EXIT_WALK(60, 0, "flo_14", 1); - -EvtScript N(exitWalk_80243D48) = EVT_EXIT_WALK(60, 1, "flo_15", 0); - -EvtScript N(80243DA4) = { - EVT_BIND_TRIGGER(N(exitWalk_80243D48), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_80243CEC), TRIGGER_FLOOR_ABOVE, 4, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80247984))) - EVT_EXEC_WAIT(N(makeEntities)) - EVT_CALL(ModifyColliderFlags, 3, 13, 0x00000006) - EVT_SET(LVar0, 274) - EVT_SET(LVar1, -137) - EVT_SET(LVar2, 583) - EVT_SET(LVar3, -64) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80243A40)) - EVT_SET(LVar0, 433) - EVT_SET(LVar1, 108) - EVT_SET(LVar2, 580) - EVT_SET(LVar3, 169) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80243A40)) - EVT_SET(LVar0, -460) - EVT_SET(LVar1, 90) - EVT_SET(LVar2, -125) - EVT_SET(LVar3, 130) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80243A40)) - EVT_SET(LVar0, -420) - EVT_SET(LVar1, -130) - EVT_SET(LVar2, -260) - EVT_SET(LVar3, -90) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80243A40)) - EVT_SET(LVar0, -220) - EVT_SET(LVar1, -137) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -50) - EVT_SET(LVar4, 160) - EVT_EXEC(N(80243A40)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80243DA4))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(802438B0)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240000_CC3810)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_80244100) = { - .height = 32, - .radius = 24, - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 20, -}; - -f32 N(FlyingAI_JumpVels)[] = { - 4.5f, 3.5f, 2.6f, 2.0f, - 1.5f, 20.0f, -}; - -MobileAISettings N(npcAISettings_80244144) = { - .moveSpeed = 1.5f, - .moveTime = 60, - .waitTime = 30, - .alertRadius = 60.0f, - .alertOffsetDist = 50.0f, - .playerSearchInterval = 3, - .chaseSpeed = 3.5f, - .chaseTurnRate= 60, - .chaseUpdateInterval = 10, - .chaseRadius = 80.0f, - .chaseOffsetDist = 70.0f, - .unk_AI_2C = 1, -}; - -EvtScript N(npcAI_80244174) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, -650) - EVT_CALL(SetSelfVar, 6, 30) - EVT_CALL(SetSelfVar, 1, 400) - EVT_CALL(N(LakituAI_Main), EVT_PTR(N(npcAISettings_80244144))) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_802441E4) = { - .height = 28, - .radius = 24, - .ai = &N(npcAI_80244174), - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 20, -}; - -MobileAISettings N(npcAISettings_80244210) = { - .moveSpeed = 1.5f, - .moveTime = 30, - .waitTime = 50, - .alertRadius = 60.0f, - .alertOffsetDist = 30.0f, - .playerSearchInterval = 3, - .chaseSpeed = 6.0f, - .chaseRadius = 100.0f, - .chaseOffsetDist = 30.0f, - .unk_AI_2C = 3, -}; - -EvtScript N(npcAI_80244240) = { - EVT_CALL(SetSelfVar, 2, 3) - EVT_CALL(SetSelfVar, 3, 18) - EVT_CALL(SetSelfVar, 5, 3) - EVT_CALL(SetSelfVar, 7, 4) - EVT_CALL(N(SpinyAI_Main), EVT_PTR(N(npcAISettings_80244210))) - EVT_RETURN - EVT_END -}; - -EvtScript N(802442B0) = { - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetSelfVar, 10, 100) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(2) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(3) - EVT_CALL(SetEnemyFlagBits, -1, 16, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_8024437C) = { - .height = 21, - .radius = 22, - .ai = &N(npcAI_80244240), - .onHit = &EnemyNpcHit, - .onDefeat = &N(802442B0), - .level = 19, -}; - -Vec3f N(vectorList_802443A8)[] = { - { -250.0, 130.0, 100.0 }, { -150.0, 90.0, 70.0 }, - { 50.0, 70.0, 10.0 }, { 200.0, 35.0, 30.0 }, - { 30.0, 10.0, 45.0 }, -}; - -Vec3f N(vectorList_802443E4)[] = { - { -285.0, 130.0, 45.0 }, { -185.0, 90.0, 25.0 }, - { 15.0, 70.0, 10.0 }, { 165.0, 35.0, 30.0 }, - { -5.0, 10.0, 45.0 }, -}; - -Vec3f N(vectorList_80244420)[] = { - { 10.0, 0.0, 45.0 }, { -90.0, 20.0, 45.0 }, - { -190.0, 60.0, 45.0 }, { -290.0, 140.0, 45.0 }, - { -390.0, 300.0, 45.0 }, -}; - -EvtScript N(8024445C) = { - EVT_CALL(GetNpcPos, 0, LVar0, LVar1, LVar2) - EVT_LABEL(0) - EVT_CALL(GetNpcPos, 0, LVar3, LVar4, LVar5) - EVT_CALL(N(UnkFunc42)) - EVT_CALL(InterpNpcYaw, 0, LVarA, 0) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_CALL(GetAngleBetweenNPCs, -4, 0, LVarA) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0) - EVT_CALL(PlayerFaceNpc, 0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80244560) = { - EVT_CALL(GetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_LABEL(0) - EVT_CALL(GetNpcPos, 1, LVar3, LVar4, LVar5) - EVT_CALL(N(UnkFunc42)) - EVT_CALL(InterpNpcYaw, 1, LVarA, 0) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_CALL(GetAngleBetweenNPCs, -4, 1, LVarA) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0) - EVT_IF_LT(GB_StoryProgress, 51) - EVT_CALL(GetAngleBetweenNPCs, 0, 1, LVarB) - EVT_CALL(InterpNpcYaw, 0, LVarB, 0) - EVT_END_IF - EVT_CALL(PlayerFaceNpc, 1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(802446AC) = { - EVT_SET(MapVar(10), 0) - EVT_LOOP(0) - EVT_LOOP(2) - EVT_CALL(GetNpcPos, 2, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(GetNpcPos, 2, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_EQ(MapVar(10), 1) - EVT_SET(MapVar(10), 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(80244888) = { - EVT_EXEC(N(802446AC)) - EVT_CALL(SetNpcAnimation, 1, ANIM_Lakilulu_Lift) - EVT_CALL(GetNpcPos, 1, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, -5) - EVT_ADD(LVar2, 30) - EVT_ADD(LVar3, 2) - EVT_CALL(SetNpcYaw, 2, 270) - EVT_CALL(SetNpcPos, 2, LVar1, LVar2, LVar3) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002B) - EVT_END_THREAD - EVT_CALL(ContinueSpeech, 1, -1, -1, 512, MSG_CH6_00A8) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(EndSpeech, 1, -1, -1, 512) - EVT_END_THREAD - EVT_SET(MapVar(10), 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MapVar(10), 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, 1, ANIM_Lakilulu_Throw) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 5) - EVT_ADD(LVar2, 20) - EVT_CALL(SetNpcJumpscale, 2, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, 2, LVar1, LVar2, LVar3, 7) - EVT_ADD(LVar1, -100) - EVT_ADD(LVar2, 10) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, 2, EVT_FLOAT(1.5)) - EVT_CALL(NpcJump0, 2, LVar1, LVar2, LVar3, 15) - EVT_CALL(SetNpcPos, 2, 0, -1000, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, 0, 0, 10, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtPlayer, 225, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_FallBack) - EVT_SET(LVar0, 90) - EVT_LOOP(20) - EVT_ADD(LVar0, 144) - EVT_IF_GT(LVar0, 359) - EVT_SUB(LVar0, 360) - EVT_END_IF - EVT_CALL(InterpPlayerYaw, LVar0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_CALL(SetNpcAnimation, 1, ANIM_Lakilulu_Idle) - EVT_RETURN - EVT_END -}; - -EvtScript N(idle_80244BF8) = { - EVT_IF_NE(GB_StoryProgress, 50) - EVT_RETURN - EVT_END_IF - EVT_CALL(AwaitPlayerApproach, 200, 20, 275) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, 0, -250, 120, 45) - EVT_CALL(SetMusicTrack, 0, SONG_LAKILESTER_THEME, 0, 8) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_00A0, 160, 40) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerAnimation, 65578) - EVT_WAIT(20) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_WAIT(20) - EVT_CALL(InterpPlayerYaw, 90, 1) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(SetNpcAnimation, 0, ANIM_WorldLakilester_Run) - EVT_THREAD - EVT_CALL(N(func_802434D4_CC6CE4)) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(8024445C), LVar9) - EVT_CALL(LoadPath, 80, EVT_PTR(N(vectorList_802443A8)), 5, 0) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetNpcAnimation, 0, ANIM_WorldLakilester_Idle) - EVT_CALL(PlayerFaceNpc, 0, 0) - EVT_WAIT(15) - EVT_CALL(GetNpcPos, 0, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 200) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(18.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(PlayerMoveTo, -75, 65, 10) - EVT_CALL(PlayerFaceNpc, 0, 0) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, 0, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A1) - EVT_CALL(SetNpcAnimation, 0, ANIM_WorldLakilester_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, 0, ANIM_WorldLakilester_Idle) - EVT_THREAD - EVT_CALL(SetCamDistance, 0, 1000) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, 3) - EVT_RETURN - EVT_END -}; - -EvtScript N(80245014) = { - EVT_CALL(GetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_CALL(AwaitPlayerLeave, LVar0, LVar2, 120) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, 0, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 250) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(5.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(NpcFaceNpc, 1, 0, 1) - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00B4) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, 1, 1) - EVT_CALL(SetCamDistance, 0, 600) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(10.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamPosA, 0, 0, 0) - EVT_CALL(SetCamPosB, 0, 130, -200) - EVT_CALL(SetCamPosC, 0, 0, 0) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(N(func_802433C0_CC6BD0), 55) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_100)), TRUE) - EVT_EXEC_GET_TID(N(80244560), LVar9) - EVT_CALL(LoadPath, 55, EVT_PTR(N(vectorList_80244420)), 5, 0) - EVT_LABEL(20) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 1, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, 8) - EVT_IF_NE(LVar0, 8) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) - EVT_END_IF - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00B5) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, 0, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(80245444) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, 0, ANIM_WorldLakilester_TiredTalk, ANIM_WorldLakilester_Tired, 0, MSG_CH6_00A2) - EVT_CALL(SetNpcPos, 1, -290, 120, 45) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Idle) - EVT_CALL(SetPlayerAnimation, 65578) - EVT_WAIT(20) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 5, MSG_CH6_00A3) - EVT_CALL(SetNpcAnimation, 1, ANIM_Lakilulu_Panic) - EVT_CALL(UseSettingsFrom, 0, 0, 0, 0) - EVT_CALL(SetPanTarget, 0, 0, 0, 0) - EVT_CALL(SetCamDistance, 0, 500) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(5.5), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamPosA, 0, 0, 0) - EVT_CALL(SetCamPosB, 0, 130, -200) - EVT_CALL(SetCamPosC, 0, 0, 0) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_WAIT(1) - EVT_THREAD - EVT_CALL(SetCamDistance, 0, 400) - EVT_CALL(SetCamPosB, 0, 130, 60) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(func_802433C0_CC6BD0), 80) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(80244560), LVar9) - EVT_CALL(LoadPath, 80, EVT_PTR(N(vectorList_802443E4)), 5, 0) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 1, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetNpcAnimation, 1, ANIM_Lakilulu_ConcernedNod) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_WAIT(20) - EVT_CALL(GetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 250) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(5.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, 0, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A4) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 300) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakilulu_Shout, ANIM_Lakilulu_Shout, 0, MSG_CH6_00A5) - EVT_CALL(GetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 250) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, 0, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00A6) - EVT_CALL(SetNpcAnimation, 0, ANIM_WorldLakilester_Idle) - EVT_CALL(EndSpeech, 0, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 350) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(10.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_LABEL(10) - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 0, MSG_CH6_00A7) - EVT_CALL(ShowChoice, MSG_Choice_0020) - EVT_IF_NE(LVar0, 0) - EVT_EXEC_WAIT(N(80244888)) - EVT_WAIT(10) - EVT_GOTO(10) - EVT_ELSE - EVT_CALL(ContinueSpeech, 1, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00A9) - EVT_CALL(SetNpcAnimation, 1, ANIM_Lakilulu_Idle) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_NodYes) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_WAIT(20) - EVT_CALL(GetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 250) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, 0, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AA) - EVT_CALL(SetNpcAnimation, 0, ANIM_WorldLakilester_Idle) - EVT_CALL(EndSpeech, 0, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 350) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, 0, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AB) - EVT_WAIT(10) - EVT_CALL(ShowChoice, MSG_Choice_0021) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CASE_EQ(0) - EVT_CALL(ContinueSpeech, 0, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AC) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, 0, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AD) - EVT_CASE_EQ(2) - EVT_CALL(ContinueSpeech, 0, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AE) - EVT_CASE_EQ(3) - EVT_CALL(ContinueSpeech, 0, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AF) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(InterpNpcYaw, 1, 90, 1) - EVT_CALL(SetNpcAnimation, 1, ANIM_Lakilulu_ConcernedNod) - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B0) - EVT_CALL(SpeakToPlayer, 0, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B1) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B2) - EVT_CALL(SpeakToPlayer, 0, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B3) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(ResetCam, 0, EVT_FLOAT(90.0)) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcSpeed, 0, EVT_FLOAT(3.5)) - EVT_CALL(NpcMoveTo, 0, LVar0, 60, 0) - EVT_CALL(N(ChangeNpcToPartner), 0, 8) - EVT_CALL(N(LoadPartyImage)) - EVT_EXEC(N(802438CC)) - EVT_WAIT(15) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0190, 160, 40) - EVT_EXEC(N(802438F8)) - EVT_WAIT(10) - EVT_CALL(PanToTarget, 0, 0, 0) - EVT_SET(GB_StoryProgress, 51) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_EXEC_WAIT(N(80245014)) - EVT_RETURN - EVT_END -}; - -EvtScript N(defeat_80246038) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Tired) - EVT_CALL(SetCamType, 0, 6, 1) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 300) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_EXEC(N(80245444)) - EVT_CASE_EQ(1) - EVT_CASE_EQ(2) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_802461C0) = { - EVT_IF_LE(GB_StoryProgress, 53) - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_ELSE - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, 8) - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) - EVT_ELSE - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80246280) = { - EVT_IF_LT(GB_StoryProgress, 51) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80244BF8))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80246038))) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_802462D0) = { - EVT_IF_LT(GB_StoryProgress, 58) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_802461C0))) - EVT_CALL(SetNpcCollisionSize, -1, 36, 28) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(SetNpcPos, NPC_SELF, -50, 180, -50) - EVT_END_IF - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80246370) = { - EVT_CALL(SetNpcPos, 2, 0, -1000, 0) - EVT_CALL(SetNpcAnimation, 2, ANIM_Lakilulu_Spiny) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_802463B0) = { - EVT_IF_EQ(GB_StoryProgress, 50) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_802463E8) = { - EVT_IF_EQ(GB_StoryProgress, 50) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_CALL(SetSelfVar, 13, 1) - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80246434) = { - .id = NPC_WORLD_LAKILESTER, - .settings = &N(npcSettings_80244100), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, - .init = &N(init_80246280), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - ANIM_WorldLakilester_Idle, - }, -}; - -StaticNpc N(npcGroup_80246624) = { - .id = NPC_LAKILULU0, - .settings = &N(npcSettings_80244100), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802462D0), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - }, - .tattle = MSG_NpcTattle_Lakilulu, -}; - -StaticNpc N(npcGroup_80246814) = { - .id = NPC_LAKILULU1, - .settings = &N(npcSettings_80244100), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_80246370), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - ANIM_Lakilulu_Idle, - }, -}; - -StaticNpc N(npcGroup_80246A04) = { - .id = NPC_LAKITU0, - .settings = &N(npcSettings_802441E4), - .pos = { 335.0f, 90.0f, 45.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802463B0), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 25, - .itemDrops = { - { ITEM_SUPER_SHROOM, 2, 0 }, - { ITEM_MAPLE_SYRUP, 2, 0 }, - { ITEM_THUNDER_RAGE, 2, 0 }, - { ITEM_STOP_WATCH, 2, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(3), - .maxCoinBonus = 2, - }, - .territory = { .temp = { 335, 90, 45, 30, 0, -32767, 0, 335, 90, 45, 250, 0, 0, 1 }}, - .animations = { - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim02, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80246BF4) = { - .id = NPC_LAKITU1, - .settings = &N(npcSettings_802441E4), - .pos = { -320.0f, 90.0f, 0.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802463B0), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 25, - .itemDrops = { - { ITEM_SUPER_SHROOM, 2, 0 }, - { ITEM_MAPLE_SYRUP, 2, 0 }, - { ITEM_THUNDER_RAGE, 2, 0 }, - { ITEM_STOP_WATCH, 2, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(3), - .maxCoinBonus = 2, - }, - .territory = { .temp = { -320, 90, 0, 30, 0, -32767, 0, -320, 90, 0, 200, 0, 0, 1 }}, - .animations = { - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim02, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80246DE4) = { - .id = NPC_SPINY0, - .settings = &N(npcSettings_8024437C), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, - .init = &N(init_802463E8), - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { 0, 0, 0, 0, 0, -32767 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80246FD4) = { - .id = NPC_SPINY1, - .settings = &N(npcSettings_8024437C), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, - .init = &N(init_802463E8), - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { 0, 0, 0, 0, 0, -32767 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_802471C4) = { - .id = NPC_SPINY2, - .settings = &N(npcSettings_8024437C), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, - .init = &N(init_802463E8), - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { 0, 0, 0, 0, 0, -32767 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_802473B4) = { - .id = NPC_SPINY3, - .settings = &N(npcSettings_8024437C), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, - .init = &N(init_802463E8), - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { 0, 0, 0, 0, 0, -32767 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_802475A4) = { - .id = NPC_SPINY4, - .settings = &N(npcSettings_8024437C), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, - .init = &N(init_802463E8), - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { 0, 0, 0, 0, 0, -32767 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80247794) = { - .id = NPC_SPINY5, - .settings = &N(npcSettings_8024437C), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, - .init = &N(init_802463E8), - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { 0, 0, 0, 0, 0, -32767 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -NpcGroupList N(npcGroupList_80247984) = { - NPC_GROUP(N(npcGroup_80246A04), 0x1806, 0x04), - NPC_GROUP(N(npcGroup_80246BF4), 0x1804, 0x04), - NPC_GROUP(N(npcGroup_80246DE4), 0x180C, 0x02), - NPC_GROUP(N(npcGroup_80246FD4), 0x180C, 0x02), - NPC_GROUP(N(npcGroup_802471C4), 0x180C, 0x02), - NPC_GROUP(N(npcGroup_802473B4), 0x180C, 0x02), - NPC_GROUP(N(npcGroup_802475A4), 0x180C, 0x02), - NPC_GROUP(N(npcGroup_80247794), 0x180C, 0x02), - NPC_GROUP(N(npcGroup_80246434), 0x1905, 0x01), - NPC_GROUP(N(npcGroup_80246624)), - NPC_GROUP(N(npcGroup_80246814)), - {}, -}; - -#include "world/common/util/ChangeNpcToPartner.inc.c" - -#define AI_LAKITU_FIRST_SPINY_ID 50 -#define AI_LAKITU_LAST_SPINY_ID 55 -#include "world/common/enemy/ai/LakituAI.inc.c" -#include "world/common/enemy/ai/SpinyAI.inc.c" - -#include "world/common/todo/UnkFunc42.inc.c" - -ApiStatus N(func_802433C0_CC6BD0)(Evt* script, s32 isInitialCall) { - Npc* npc = get_npc_unsafe(1); - s16 param1; - s16 param2; - - script->functionTemp[1] = evt_get_variable(script, *script->ptrReadPos); - - if (isInitialCall) { - script->functionTemp[0] = 0; - } - if (script->functionTemp[0] == (script->functionTemp[0] / 5) * 5) { - - sfx_get_spatialized_sound_params(npc->pos.x, npc->pos.y, npc->pos.z, - ¶m1, ¶m2, 0x200002); - - sfx_play_sound_with_params(SOUND_295, param1, param2, - update_lerp(0, 500.0f, 0.0f, script->functionTemp[0], script->functionTemp[1])); - } - - script->functionTemp[0]++; - return (script->functionTemp[1] < script->functionTemp[0]) * ApiStatus_DONE2; -} - -ApiStatus N(func_802434D4_CC6CE4)(Evt* script, s32 isInitialCall) { - Npc* npc = get_npc_unsafe(0); - s16 param1; - s16 param2; - - if (isInitialCall) { - script->functionTemp[0] = 0; - } - if (script->functionTemp[0] == (script->functionTemp[0] / 5) * 5) { - - sfx_get_spatialized_sound_params(npc->pos.x, npc->pos.y, npc->pos.z, - ¶m1, ¶m2, 0x200002); - - sfx_play_sound_with_params(SOUND_295, param1, param2, - update_lerp(0, 500.0f, 0.0f, script->functionTemp[0], 0x50)); - } - - script->functionTemp[0]++; - return (script->functionTemp[0] > 0x50) * ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_13/flo_13.h b/src/world/area_flo/flo_13/flo_13.h index 0319d845e2..c636f017cd 100644 --- a/src/world/area_flo/flo_13/flo_13.h +++ b/src/world/area_flo/flo_13/flo_13.h @@ -2,20 +2,43 @@ /// @brief Flower Fields - (NW) Lakilester #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_13_shape.h" +#include "mapfs/flo_13_hit.h" + +#include "sprite/npc/Lakilulu.h" +#include "sprite/npc/WorldLakilester.h" +#include "sprite/npc/Lakitu.h" +#include "sprite/npc/Spiny.h" + +enum { + NPC_Lakilester = 0, + NPC_Lakilulu = 1, + NPC_Lakilulu_Spiny = 2, + NPC_Lakitu_01 = 3, + NPC_Lakitu_02 = 4, + NPC_Spiny_01 = 50, + NPC_Spiny_02 = 51, + NPC_Spiny_03 = 52, + NPC_Spiny_04 = 53, + NPC_Spiny_05 = 54, + NPC_Spiny_06 = 55, +}; + +enum { + MV_LakiluluSpinySceneState = MapVar(10), +}; + #define NAMESPACE flo_13 -ApiStatus N(func_80240000_CC3810)(Evt* script, s32 isInitialCall); -ApiStatus N(ChangeNpcToPartner)(Evt* script, s32 isInitialCall); -ApiStatus N(LakituAI_Main)(Evt* script, s32 isInitialCall); -ApiStatus N(SpinyAI_Main)(Evt* script, s32 isInitialCall); -ApiStatus N(UnkFunc42)(Evt* script, s32 isInitialCall); -ApiStatus N(func_802433C0_CC6BD0)(Evt* script, s32 isInitialCall); -ApiStatus N(func_802434D4_CC6CE4)(Evt* script, s32 isInitialCall); -ApiStatus N(LoadPartyImage)(Evt* script, s32 isInitialCall); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_PushPartnerSong); +extern EvtScript N(EVS_PopSong); +extern EvtScript N(EVS_MakeEntities); +extern NpcGroupList N(DefaultNPCs); -extern NpcGroupList N(npcGroupList_80247984); -extern EvtScript N(main); +API_CALLABLE(N(LoadPartyImage)); diff --git a/src/world/area_flo/flo_13/flo_13_0_header.c b/src/world/area_flo/flo_13/flo_13_0_header.c new file mode 100644 index 0000000000..2ddb0b860e --- /dev/null +++ b/src/world/area_flo/flo_13/flo_13_0_header.c @@ -0,0 +1,14 @@ +#include "flo_13.h" + +EntryList N(Entrances) = { + [flo_13_ENTRY_0] { 570.0, 0.0, 0.0, 270.0 }, + [flo_13_ENTRY_1] { -570.0, 0.0, 0.0, 90.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_13 }, +}; diff --git a/src/world/area_flo/flo_13/flo_13_1_music.c b/src/world/area_flo/flo_13/flo_13_1_music.c new file mode 100644 index 0000000000..0149435545 --- /dev/null +++ b/src/world/area_flo/flo_13/flo_13_1_music.c @@ -0,0 +1,59 @@ +#include "flo_13.h" + +EvtScript N(EVS_PlaySongForPlayerPos) = { + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_IF_LT(LVar0, -500) + EVT_GOTO(10) + EVT_END_IF + EVT_LABEL(0) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_LOOP(0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_IF_LT(LVar0, -500) + EVT_BREAK_LOOP + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_LABEL(10) + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_LOOP(0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_IF_GT(LVar0, -500) + EVT_BREAK_LOOP + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupMusic) = { + EVT_EXEC(N(EVS_PlaySongForPlayerPos)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PushPartnerSong) = { + EVT_CALL(SetMusicTrack, 0, SONG_NEW_PARTNER, 0, 8) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_PopSong) = { + EVT_CALL(FadeOutMusic, 0, 500) + EVT_WAIT(15) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_13/flo_13_2_entity.c b/src/world/area_flo/flo_13/flo_13_2_entity.c new file mode 100644 index 0000000000..e2ce62e5e0 --- /dev/null +++ b/src/world/area_flo/flo_13/flo_13_2_entity.c @@ -0,0 +1,21 @@ +#include "flo_13.h" +#include "entity.h" + +EvtScript N(EVS_OnBlast_Rock) = { + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_MakeEntities) = { + EVT_CALL(MakeItemEntity, ITEM_MEGA_SMASH, -61, 60, -85, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_MegaSmash) + EVT_CALL(MakeItemEntity, ITEM_SHOOTING_STAR, 128, 0, 157, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_ShootingStar) + EVT_IF_EQ(GF_FLO13_Item_MegaSmash, FALSE) + EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), -160, 160, -90, 0, MAKE_ENTITY_END) + EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBlast_Rock))) + EVT_ELSE + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_13/flo_13_3_main.c b/src/world/area_flo/flo_13/flo_13_3_main.c new file mode 100644 index 0000000000..5b636eb3a2 --- /dev/null +++ b/src/world/area_flo/flo_13/flo_13_3_main.c @@ -0,0 +1,43 @@ +#include "flo_13.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_14_1) = EVT_EXIT_WALK(60, flo_13_ENTRY_0, "flo_14", flo_14_ENTRY_1); +EvtScript N(EVS_ExitWalk_flo_15_0) = EVT_EXIT_WALK(60, flo_13_ENTRY_1, "flo_15", flo_15_ENTRY_0); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o48, SURFACE_TYPE_FLOWERS) + EVT_FLOWER_SPAWN_REGION( 274, -137, 583, -64, 0) + EVT_FLOWER_SPAWN_REGION( 433, 108, 580, 169, 0) + EVT_FLOWER_SPAWN_REGION( -460, 90, -125, 130, 0) + EVT_FLOWER_SPAWN_REGION( -420, -130, -260, -90, 0) + EVT_FLOWER_SPAWN_REGION( -220, -137, 0, -50, 160) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_13/flo_13_4_npc.c b/src/world/area_flo/flo_13/flo_13_4_npc.c new file mode 100644 index 0000000000..ee557b86af --- /dev/null +++ b/src/world/area_flo/flo_13/flo_13_4_npc.c @@ -0,0 +1,897 @@ +#include "flo_13.h" + +#include "world/common/util/ChangeNpcToPartner.inc.c" + +NpcSettings N(NpcSettings_Lakilester) = { + .height = 32, + .radius = 24, + .level = 20, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, +}; + +#define AI_LAKITU_FIRST_SPINY_ID NPC_Spiny_01 +#define AI_LAKITU_LAST_SPINY_ID NPC_Spiny_06 +#include "world/common/enemy/complete/Lakitu_SpinySpawner.inc.c" + +#include "world/common/todo/UnkFunc42.inc.c" + +API_CALLABLE(N(PlayLakiluluFlightSounds)) { + Npc* npc = get_npc_unsafe(NPC_Lakilulu); + s16 volume; + s16 pan; + + script->functionTemp[1] = evt_get_variable(script, *script->ptrReadPos); + + if (isInitialCall) { + script->functionTemp[0] = 0; + } + + if (script->functionTemp[0] % 5 == 0) { + sfx_get_spatialized_sound_params(npc->pos.x, npc->pos.y, npc->pos.z, + &volume, &pan, SOUND_PARAM_MORE_QUIET | SOUND_SPACE_FULL); + sfx_play_sound_with_params(SOUND_295, volume, pan, + update_lerp(0, 500.0f, 0.0f, script->functionTemp[0], script->functionTemp[1])); + } + + script->functionTemp[0]++; + + if (script->functionTemp[0] > script->functionTemp[1]) { + return ApiStatus_DONE2; + } else { + return ApiStatus_BLOCK; + } +} + +API_CALLABLE(N(PlayLakilesterFlightSounds)) { + Npc* npc = get_npc_unsafe(NPC_Lakilester); + s16 volume; + s16 pan; + + if (isInitialCall) { + script->functionTemp[0] = 0; + } + + if (script->functionTemp[0] % 5 == 0) { + sfx_get_spatialized_sound_params(npc->pos.x, npc->pos.y, npc->pos.z, + &volume, &pan, SOUND_PARAM_MORE_QUIET | SOUND_SPACE_FULL); + sfx_play_sound_with_params(SOUND_295, volume, pan, + update_lerp(0, 500.0f, 0.0f, script->functionTemp[0], 80)); + } + + script->functionTemp[0]++; + + if (script->functionTemp[0] > 80) { + return ApiStatus_DONE2; + } else { + return ApiStatus_BLOCK; + } +} + +Vec3f N(FlightPath_LakilesterAmbush)[] = { + { -250.0, 130.0, 100.0 }, + { -150.0, 90.0, 70.0 }, + { 50.0, 70.0, 10.0 }, + { 200.0, 35.0, 30.0 }, + { 30.0, 10.0, 45.0 }, +}; + +Vec3f N(FlightPath_LakiluluArrives)[] = { + { -285.0, 130.0, 45.0 }, + { -185.0, 90.0, 25.0 }, + { 15.0, 70.0, 10.0 }, + { 165.0, 35.0, 30.0 }, + { -5.0, 10.0, 45.0 }, +}; + +Vec3f N(FlightPath_LakiluluDeparts)[] = { + { 10.0, 0.0, 45.0 }, + { -90.0, 20.0, 45.0 }, + { -190.0, 60.0, 45.0 }, + { -290.0, 140.0, 45.0 }, + { -390.0, 300.0, 45.0 }, +}; + +EvtScript N(EVS_Lakliester_ManageYaw) = { + EVT_CALL(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2) + EVT_LABEL(0) + EVT_CALL(GetNpcPos, NPC_Lakilester, LVar3, LVar4, LVar5) + EVT_CALL(N(UnkFunc42)) + EVT_CALL(InterpNpcYaw, NPC_Lakilester, LVarA, 0) + EVT_SET(LVar0, LVar3) + EVT_SET(LVar1, LVar4) + EVT_SET(LVar2, LVar5) + EVT_CALL(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilester, LVarA) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0) + EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Laklilulu_ManageYaw) = { + EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + EVT_LABEL(0) + EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar3, LVar4, LVar5) + EVT_CALL(N(UnkFunc42)) + EVT_CALL(InterpNpcYaw, NPC_Lakilulu, LVarA, 0) + EVT_SET(LVar0, LVar3) + EVT_SET(LVar1, LVar4) + EVT_SET(LVar2, LVar5) + EVT_CALL(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilulu, LVarA) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0) + EVT_IF_LT(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) + EVT_CALL(GetAngleBetweenNPCs, NPC_Lakilester, NPC_Lakilulu, LVarB) + EVT_CALL(InterpNpcYaw, NPC_Lakilester, LVarB, 0) + EVT_END_IF + EVT_CALL(PlayerFaceNpc, NPC_Lakilulu, FALSE) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_LakiluluAndSpiny_HoverBobbing) = { + EVT_SET(MV_LakiluluSpinySceneState, 0) + EVT_LOOP(0) + EVT_LOOP(2) + EVT_CALL(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, 1) + EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, 1) + EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + EVT_WAIT(2) + EVT_END_LOOP + EVT_WAIT(1) + EVT_LOOP(2) + EVT_CALL(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, -1) + EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, -1) + EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + EVT_WAIT(2) + EVT_END_LOOP + EVT_WAIT(1) + EVT_IF_EQ(MV_LakiluluSpinySceneState, 1) + EVT_SET(MV_LakiluluSpinySceneState, 2) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Lakilulu_SpinyToss) = { + EVT_EXEC(N(EVS_LakiluluAndSpiny_HoverBobbing)) + EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Lift) + EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) + EVT_ADD(LVar1, -5) + EVT_ADD(LVar2, 30) + EVT_ADD(LVar3, 2) + EVT_CALL(SetNpcYaw, NPC_Lakilulu_Spiny, 270) + EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3) + EVT_THREAD + EVT_WAIT(5) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002B) + EVT_END_THREAD + EVT_CALL(ContinueSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200, MSG_CH6_00A8) + EVT_THREAD + EVT_WAIT(15) + EVT_CALL(EndSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200) + EVT_END_THREAD + EVT_SET(MV_LakiluluSpinySceneState, 1) + EVT_LOOP(0) + EVT_WAIT(1) + EVT_IF_EQ(MV_LakiluluSpinySceneState, 2) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Throw) + EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) + EVT_ADD(LVar1, 5) + EVT_ADD(LVar2, 20) + EVT_CALL(SetNpcJumpscale, NPC_Lakilulu_Spiny, EVT_FLOAT(0.0)) + EVT_CALL(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 7) + EVT_ADD(LVar1, -100) + EVT_ADD(LVar2, 10) + EVT_THREAD + EVT_CALL(SetNpcJumpscale, NPC_Lakilulu_Spiny, EVT_FLOAT(1.5)) + EVT_CALL(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 15) + EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION) + EVT_END_THREAD + EVT_THREAD + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(2.0)) + EVT_END_THREAD + EVT_CALL(PlaySoundAtPlayer, SOUND_HIT_PLAYER_NORMAL, 0) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_FallBack) + EVT_SET(LVar0, 90) + EVT_LOOP(20) + EVT_ADD(LVar0, 144) + EVT_IF_GT(LVar0, 359) + EVT_SUB(LVar0, 360) + EVT_END_IF + EVT_CALL(InterpPlayerYaw, LVar0, 1) + EVT_WAIT(1) + EVT_END_LOOP + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcIdle_Lakilester) = { + EVT_IF_NE(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + EVT_RETURN + EVT_END_IF + EVT_CALL(AwaitPlayerApproach, 200, 20, 275) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(SetNpcPos, NPC_Lakilester, -250, 120, 45) + EVT_CALL(SetMusicTrack, 0, SONG_LAKILESTER_THEME, 0, 8) + EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_00A0, 160, 40) + EVT_CALL(InterruptUsePartner) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A) + EVT_WAIT(20) + EVT_CALL(InterpPlayerYaw, 270, 1) + EVT_WAIT(20) + EVT_CALL(InterpPlayerYaw, 90, 1) + EVT_WAIT(20) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_CALL(func_802CF56C, 2) + EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run) + EVT_THREAD + EVT_CALL(N(PlayLakilesterFlightSounds)) + EVT_END_THREAD + EVT_EXEC_GET_TID(N(EVS_Lakliester_ManageYaw), LVar9) + EVT_CALL(LoadPath, 80, EVT_PTR(N(FlightPath_LakilesterAmbush)), ARRAY_COUNT(N(FlightPath_LakilesterAmbush)), EASING_LINEAR) + EVT_LABEL(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakilester, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 1) + EVT_GOTO(0) + EVT_END_IF + EVT_KILL_THREAD(LVar9) + EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE) + EVT_WAIT(15) + EVT_CALL(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-8.5)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_THREAD + EVT_CALL(PlayerMoveTo, -75, 65, 10) + EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE) + EVT_END_THREAD + EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A1) + EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run) + EVT_WAIT(10) + EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + EVT_THREAD + EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_END_THREAD + EVT_CALL(DisablePlayerInput, FALSE) + EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Lakilulu_FlyAway) = { + EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + EVT_CALL(AwaitPlayerLeave, LVar0, LVar2, 120) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-7.5)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(NpcFaceNpc, NPC_Lakilulu, NPC_Lakilester, 1) + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00B4) + EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Lakilulu, 1) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-8.0)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, -200) + EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_THREAD + EVT_CALL(N(PlayLakiluluFlightSounds), 55) + EVT_END_THREAD + EVT_CALL(SetNpcFlagBits, NPC_Lakilulu, NPC_FLAG_100, TRUE) + EVT_EXEC_GET_TID(N(EVS_Laklilulu_ManageYaw), LVar9) + EVT_CALL(LoadPath, 55, EVT_PTR(N(FlightPath_LakiluluDeparts)), ARRAY_COUNT(N(FlightPath_LakiluluDeparts)), EASING_LINEAR) + EVT_LABEL(20) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 1) + EVT_GOTO(20) + EVT_END_IF + EVT_KILL_THREAD(LVar9) + EVT_CALL(GetCurrentPartnerID, LVar0) + EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) + EVT_IF_NE(LVar0, PARTNER_LAKILESTER) + EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) + EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) + EVT_ADD(LVar1, 20) + EVT_ADD(LVar2, 20) + EVT_ADD(LVar3, 20) + EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) + EVT_END_IF + EVT_CALL(DisablePartnerAI, 0) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) + EVT_WAIT(5) + EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00B5) + EVT_CALL(EnablePartnerAI) + EVT_CALL(PutPartnerAway) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_LakilesterDefeated) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_WAIT(30) + EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_TiredTalk, ANIM_WorldLakilester_Tired, 0, MSG_CH6_00A2) + EVT_CALL(SetNpcPos, NPC_Lakilulu, -290, 120, 45) + EVT_THREAD + EVT_WAIT(10) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Idle) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A) + EVT_WAIT(20) + EVT_CALL(InterpPlayerYaw, 270, 1) + EVT_END_THREAD + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 5, MSG_CH6_00A3) + EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Panic) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-6.0)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, -200) + EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_WAIT(1) + EVT_THREAD + EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, 60) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_END_THREAD + EVT_THREAD + EVT_CALL(N(PlayLakiluluFlightSounds), 80) + EVT_END_THREAD + EVT_EXEC_GET_TID(N(EVS_Laklilulu_ManageYaw), LVar9) + EVT_CALL(LoadPath, 80, EVT_PTR(N(FlightPath_LakiluluArrives)), ARRAY_COUNT(N(FlightPath_LakiluluArrives)), EASING_LINEAR) + EVT_LABEL(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 1) + EVT_GOTO(0) + EVT_END_IF + EVT_KILL_THREAD(LVar9) + EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_WAIT(20) + EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 20) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-7.5)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A4) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 40) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Shout, ANIM_Lakilulu_Shout, 0, MSG_CH6_00A5) + EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 20) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00A6) + EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + EVT_CALL(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 40) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_LABEL(10) + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 0, MSG_CH6_00A7) + EVT_CALL(ShowChoice, MSG_Choice_0020) + EVT_IF_NE(LVar0, 0) + EVT_EXEC_WAIT(N(EVS_Lakilulu_SpinyToss)) + EVT_WAIT(10) + EVT_GOTO(10) + EVT_ELSE + EVT_CALL(ContinueSpeech, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00A9) + EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_NodYes) + EVT_WAIT(10) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_WAIT(20) + EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 20) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AA) + EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + EVT_CALL(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 40) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(10) + EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AB) + EVT_WAIT(10) + EVT_CALL(ShowChoice, MSG_Choice_0021) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(-1) + EVT_CASE_EQ(0) + EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AC) + EVT_CASE_EQ(1) + EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AD) + EVT_CASE_EQ(2) + EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AE) + EVT_CASE_EQ(3) + EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AF) + EVT_END_SWITCH + EVT_END_IF + EVT_CALL(InterpNpcYaw, NPC_Lakilulu, 90, 1) + EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod) + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B0) + EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B1) + EVT_WAIT(15) + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B2) + EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B3) + EVT_WAIT(10) + EVT_THREAD + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_END_THREAD + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 30) + EVT_CALL(SetNpcSpeed, NPC_Lakilester, EVT_FLOAT(3.5)) + EVT_CALL(NpcMoveTo, NPC_Lakilester, LVar0, 60, 0) + EVT_CALL(N(ChangeNpcToPartner), 0, 8) + EVT_CALL(N(LoadPartyImage)) + EVT_EXEC(N(EVS_PushPartnerSong)) + EVT_WAIT(15) + EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0190, 160, 40) + EVT_EXEC(N(EVS_PopSong)) + EVT_WAIT(10) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) + EVT_SET(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) + EVT_CALL(EnablePartnerAI) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_EXEC_WAIT(N(EVS_Lakilulu_FlyAway)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_Lakilester) = { + EVT_CALL(GetBattleOutcome, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(OUTCOME_PLAYER_WON) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Tired) + EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE) + EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar1, LVar2) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, LVar3) + EVT_DIV(LVar0, 2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.5)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_EXEC(N(EVS_Scene_LakilesterDefeated)) + EVT_CASE_EQ(OUTCOME_PLAYER_LOST) + EVT_CASE_EQ(OUTCOME_PLAYER_FLED) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Lakilulu) = { + EVT_IF_LE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + EVT_ELSE + EVT_CALL(GetCurrentPartnerID, LVar0) + EVT_IF_NE(LVar0, PARTNER_LAKILESTER) + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + EVT_END_IF + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakilester) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Lakilester))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakilester))) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakilulu) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakilulu))) + EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 28) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetNpcPos, NPC_SELF, -50, 180, -50) + EVT_END_IF + EVT_ELSE + EVT_CALL(RemoveNpc, NPC_SELF) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakilulu_Spiny) = { + EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION) + EVT_CALL(SetNpcAnimation, NPC_Lakilulu_Spiny, ANIM_Lakilulu_Spiny) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakitu) = { + EVT_IF_EQ(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + EVT_CALL(RemoveNpc, NPC_SELF) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Spiny) = { + EVT_IF_EQ(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + EVT_CALL(RemoveNpc, NPC_SELF) + EVT_END_IF + EVT_CALL(SetSelfVar, 13, 1) + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_Lakilester) = { + .id = NPC_Lakilester, + .settings = &N(NpcSettings_Lakilester), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, + .init = &N(EVS_NpcInit_Lakilester), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_WorldLakilester_Idle, + .walk = ANIM_WorldLakilester_Idle, + .run = ANIM_WorldLakilester_Idle, + .chase = ANIM_WorldLakilester_Idle, + .anim_4 = ANIM_WorldLakilester_Idle, + .anim_5 = ANIM_WorldLakilester_Idle, + .death = ANIM_WorldLakilester_Idle, + .hit = ANIM_WorldLakilester_Idle, + .anim_8 = ANIM_WorldLakilester_Idle, + .anim_9 = ANIM_WorldLakilester_Idle, + .anim_A = ANIM_WorldLakilester_Idle, + .anim_B = ANIM_WorldLakilester_Idle, + .anim_C = ANIM_WorldLakilester_Idle, + .anim_D = ANIM_WorldLakilester_Idle, + .anim_E = ANIM_WorldLakilester_Idle, + .anim_F = ANIM_WorldLakilester_Idle, + }, +}; + +StaticNpc N(NpcData_Lakilulu) = { + .id = NPC_Lakilulu, + .settings = &N(NpcSettings_Lakilester), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Lakilulu), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_Lakilulu_Idle, + .walk = ANIM_Lakilulu_Idle, + .run = ANIM_Lakilulu_Idle, + .chase = ANIM_Lakilulu_Idle, + .anim_4 = ANIM_Lakilulu_Idle, + .anim_5 = ANIM_Lakilulu_Idle, + .death = ANIM_Lakilulu_Idle, + .hit = ANIM_Lakilulu_Idle, + .anim_8 = ANIM_Lakilulu_Idle, + .anim_9 = ANIM_Lakilulu_Idle, + .anim_A = ANIM_Lakilulu_Idle, + .anim_B = ANIM_Lakilulu_Idle, + .anim_C = ANIM_Lakilulu_Idle, + .anim_D = ANIM_Lakilulu_Idle, + .anim_E = ANIM_Lakilulu_Idle, + .anim_F = ANIM_Lakilulu_Idle, + }, + .tattle = MSG_NpcTattle_Lakilulu, +}; + +StaticNpc N(NpcData_Lakilulu_Spiny) = { + .id = NPC_Lakilulu_Spiny, + .settings = &N(NpcSettings_Lakilester), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Lakilulu_Spiny), + .drops = { + .dropFlags = NPC_DROP_FLAGS_80, + .heartDrops = NO_DROPS, + .flowerDrops = NO_DROPS, + }, + .animations = { + .idle = ANIM_Lakilulu_Idle, + .walk = ANIM_Lakilulu_Idle, + .run = ANIM_Lakilulu_Idle, + .chase = ANIM_Lakilulu_Idle, + .anim_4 = ANIM_Lakilulu_Idle, + .anim_5 = ANIM_Lakilulu_Idle, + .death = ANIM_Lakilulu_Idle, + .hit = ANIM_Lakilulu_Idle, + .anim_8 = ANIM_Lakilulu_Idle, + .anim_9 = ANIM_Lakilulu_Idle, + .anim_A = ANIM_Lakilulu_Idle, + .anim_B = ANIM_Lakilulu_Idle, + .anim_C = ANIM_Lakilulu_Idle, + .anim_D = ANIM_Lakilulu_Idle, + .anim_E = ANIM_Lakilulu_Idle, + .anim_F = ANIM_Lakilulu_Idle, + }, +}; + +StaticNpc N(NpcData_Lakitu_01) = { + .id = NPC_Lakitu_01, + .settings = &N(NpcSettings_Lakitu_SpinySpawner), + .pos = { 335.0f, 90.0f, 45.0f }, + .yaw = 270, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Lakitu), + .drops = LAKITU_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 335, 90, 45 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 335, 90, 45 }, + .detectSize = { 250 }, + } + }, + .animations = LAKITU_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Lakitu_02) = { + .id = NPC_Lakitu_02, + .settings = &N(NpcSettings_Lakitu_SpinySpawner), + .pos = { -320.0f, 90.0f, 0.0f }, + .yaw = 90, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Lakitu), + .drops = LAKITU_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -320, 90, 0 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -320, 90, 0 }, + .detectSize = { 200 }, + } + }, + .animations = LAKITU_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Spiny_01) = { + .id = NPC_Spiny_01, + .settings = &N(NpcSettings_SpawnedSpiny), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 0, + .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, + .init = &N(EVS_NpcInit_Spiny), + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = FALSE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 0, 0, 0 }, + .wanderSize = { 0 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0 }, + } + }, + .animations = SPINY_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Spiny_02) = { + .id = NPC_Spiny_02, + .settings = &N(NpcSettings_SpawnedSpiny), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 0, + .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, + .init = &N(EVS_NpcInit_Spiny), + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = FALSE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 0, 0, 0 }, + .wanderSize = { 0 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0 }, + } + }, + .animations = SPINY_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Spiny_03) = { + .id = NPC_Spiny_03, + .settings = &N(NpcSettings_SpawnedSpiny), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 0, + .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, + .init = &N(EVS_NpcInit_Spiny), + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = FALSE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 0, 0, 0 }, + .wanderSize = { 0 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0 }, + } + }, + .animations = SPINY_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Spiny_04) = { + .id = NPC_Spiny_04, + .settings = &N(NpcSettings_SpawnedSpiny), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 0, + .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, + .init = &N(EVS_NpcInit_Spiny), + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = FALSE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 0, 0, 0 }, + .wanderSize = { 0 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0 }, + } + }, + .animations = SPINY_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Spiny_05) = { + .id = NPC_Spiny_05, + .settings = &N(NpcSettings_SpawnedSpiny), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 0, + .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, + .init = &N(EVS_NpcInit_Spiny), + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = FALSE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 0, 0, 0 }, + .wanderSize = { 0 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0 }, + } + }, + .animations = SPINY_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Spiny_06) = { + .id = NPC_Spiny_06, + .settings = &N(NpcSettings_SpawnedSpiny), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 0, + .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS, + .init = &N(EVS_NpcInit_Spiny), + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = FALSE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 0, 0, 0 }, + .wanderSize = { 0 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0 }, + } + }, + .animations = SPINY_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Lakitu_01), BTL_FLO_FORMATION_06, BTL_FLO_STAGE_04), + NPC_GROUP(N(NpcData_Lakitu_02), BTL_FLO_FORMATION_04, BTL_FLO_STAGE_04), + NPC_GROUP(N(NpcData_Spiny_01), BTL_FLO_FORMATION_0C, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Spiny_02), BTL_FLO_FORMATION_0C, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Spiny_03), BTL_FLO_FORMATION_0C, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Spiny_04), BTL_FLO_FORMATION_0C, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Spiny_05), BTL_FLO_FORMATION_0C, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Spiny_06), BTL_FLO_FORMATION_0C, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Lakilester), BTL_FLO2_FORMATION_05, BTL_FLO2_STAGE_01), + NPC_GROUP(N(NpcData_Lakilulu)), + NPC_GROUP(N(NpcData_Lakilulu_Spiny)), + {} +}; diff --git a/src/world/area_flo/flo_13/CC6DE0.c b/src/world/area_flo/flo_13/flo_13_5_new_party.c similarity index 100% rename from src/world/area_flo/flo_13/CC6DE0.c rename to src/world/area_flo/flo_13/flo_13_5_new_party.c diff --git a/src/world/area_flo/flo_14/CCB310.c b/src/world/area_flo/flo_14/CCB310.c deleted file mode 100644 index fdcc24b5bd..0000000000 --- a/src/world/area_flo/flo_14/CCB310.c +++ /dev/null @@ -1,692 +0,0 @@ -#include "flo_14.h" -#include "message_ids.h" -#include "effects.h" - -EntryList N(entryList) = { - { 720.0f, 0.0f, 0.0f, 270.0f }, - { -720.0f, 0.0f, 0.0f, 90.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_14 }, -}; - -EvtScript N(802423F0) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(updateTexturePan_80242460) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_IF_EQ(LVar5, 1) - EVT_IF_EQ(LVar6, 1) - EVT_IF_EQ(LVar7, 1) - EVT_IF_EQ(LVar8, 1) - EVT_CALL(N(UpdateTexturePanSmooth)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(UpdateTexturePanStepped)) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_802424FC) = EVT_EXIT_WALK(60, 0, "flo_00", 1); - -EvtScript N(exitWalk_80242558) = EVT_EXIT_WALK(60, 1, "flo_13", 0); - -EvtScript N(802425B4) = { - EVT_BIND_TRIGGER(N(exitWalk_80242558), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_802424FC), TRIGGER_FLOOR_ABOVE, 4, 1, 0) - EVT_RETURN - EVT_END -}; - -s32 N(lavaResetList_802425FC)[] = { - 0x0000001F, 0xC3FA0000, 0x00000000, 0xC2B40000, 0x00000019, 0xC3FF0000, 0x00000000, 0x00000000, - 0x00000020, 0xC3FA0000, 0x00000000, 0x42DC0000, 0x00000021, 0xC37A0000, 0x00000000, 0xC2B40000, - 0x0000001A, 0xC3700000, 0x00000000, 0x00000000, 0x00000022, 0xC37A0000, 0x00000000, 0x42DC0000, - 0x0000001B, 0xC2480000, 0x00000000, 0x41C80000, 0x0000001C, 0x428C0000, 0x42700000, 0xC2BE0000, - 0x0000001D, 0x43CD0000, 0x42700000, 0xC2BE0000, 0x0000001E, 0x44098000, 0x00000000, 0x42480000, - 0x00000023, 0xC2480000, 0x00000000, 0x42DC0000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80244F00))) - EVT_EXEC(N(80244F30)) - EVT_CALL(ModifyColliderFlags, 3, 9, 0x00000002) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(lavaResetList_802425FC))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, 29, 1) - EVT_CALL(EnableTexPanning, 31, 1) - EVT_CALL(EnableTexPanning, 32, 1) - EVT_CALL(EnableTexPanning, 35, 1) - EVT_CALL(EnableTexPanning, 36, 1) - EVT_CALL(EnableTexPanning, 39, 1) - EVT_CALL(EnableTexPanning, 41, 1) - EVT_CALL(EnableTexPanning, 43, 1) - EVT_CALL(EnableTexPanning, 45, 1) - EVT_CALL(EnableTexPanning, 47, 1) - EVT_CALL(EnableTexPanning, 49, 1) - EVT_CALL(EnableTexPanning, 51, 1) - EVT_CALL(EnableTexPanning, 53, 1) - EVT_CALL(EnableTexPanning, 30, 1) - EVT_CALL(EnableTexPanning, 33, 1) - EVT_CALL(EnableTexPanning, 34, 1) - EVT_CALL(EnableTexPanning, 37, 1) - EVT_CALL(EnableTexPanning, 38, 1) - EVT_CALL(EnableTexPanning, 42, 1) - EVT_CALL(EnableTexPanning, 44, 1) - EVT_CALL(EnableTexPanning, 46, 1) - EVT_CALL(EnableTexPanning, 48, 1) - EVT_CALL(EnableTexPanning, 50, 1) - EVT_CALL(EnableTexPanning, 52, 1) - EVT_CALL(EnableTexPanning, 54, 1) - EVT_THREAD - EVT_SET(LVar0, 1) - EVT_SET(LVar1, 140) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_80242460)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 2) - EVT_SET(LVar1, -200) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_80242460)) - EVT_END_THREAD - EVT_EXEC(N(80243E78)) - EVT_EXEC(N(80245224)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(802425B4))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(802423F0)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_8024030C_CCB61C)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_2BF4)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(80242C00) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242EAC) = { - EVT_SET(LVar9, LVar6) - EVT_SET(LVar8, LVar5) - EVT_SET(LVar7, LVar4) - EVT_SET(LVar6, LVar3) - EVT_SET(LVar5, LVar2) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar3, LVar0) - EVT_CALL(EnableModel, LVar6, 0) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkFunc43)) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnableModel, LVar6, 1) - EVT_END_THREAD - EVT_IF_NE(LVarA, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 8) - EVT_CALL(PlayEffect, 0x11, 4, LVar0, LVar1, LVar2, 15, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_SUB(LVar1, 10) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 14, 0) - EVT_END_THREAD - EVT_END_IF - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAt, 0xF8, 0, LVar3, LVar4, LVar5) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 180, 20, 2) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar8, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, LVar9, LVar0, 1, 0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(EnableModel, LVar7, 0) - EVT_RETURN - EVT_END -}; - -s32 N(D_802431CC_CCE4DC) = FALSE; - -EvtScript N(802431D0) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(MakeLerp, LVar1, 48, 15, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(SetCamTarget, 0, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, 0, LVar0, 48, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(802432E8) = { - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_GRAVITY)), FALSE) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, -5) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -Vec3f N(vectorList_80243384)[] = { - { 531.0, 75.0, 81.0 }, { 481.0, 80.0, 81.0 }, - { 431.0, 75.0, 81.0 }, { 381.0, 70.0, 81.0 }, - { 331.0, 75.0, 81.0 }, { 281.0, 80.0, 81.0 }, - { 231.0, 75.0, 81.0 }, { 181.0, 70.0, 81.0 }, - { 131.0, 75.0, 81.0 }, { 81.0, 80.0, 81.0 }, - { 31.0, 75.0, 81.0 }, { -19.0, 70.0, 81.0 }, - { -69.0, 75.0, 81.0 }, -}; - -EvtScript N(80243420) = { - EVT_WAIT(20) - EVT_CALL(PlaySound, 0x80000023) - EVT_CALL(LoadPath, 165, EVT_PTR(N(vectorList_80243384)), 13, 10) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(TranslateModel, 123, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, -27) - EVT_ADD(LVar3, -10) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(N(func_8024046C_CCB77C), LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(StopSound, 0x80000023) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024352C) = { - EVT_CALL(IsPlayerWithin, 531, 81, 30, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetCurrentPartner, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_GRAVITY)), FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_100)), TRUE) - EVT_CALL(GetModelCenter, 123) - EVT_THREAD - EVT_ADD(LVar2, -10) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2)) - EVT_CALL(PlayerJump, 531, 48, LVar2, 10) - EVT_CALL(SetPlayerActionState, 10) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_ADD(LVar2, -15) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.2)) - EVT_CALL(NpcJump0, NPC_PARTNER, 531, 68, LVar2, 10) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(802431D0), MapVar(9)) - EVT_WAIT(15) - EVT_CALL(N(func_802403D4_CCB6E4)) - EVT_IF_NE(LVarE, 0) - EVT_EXEC_GET_TID(N(802432E8), LVarE) - EVT_END_IF - EVT_EXEC_WAIT(N(80243420)) - EVT_IF_NE(LVarE, 0) - EVT_KILL_THREAD(LVarE) - EVT_CALL(N(func_8024042C_CCB73C)) - EVT_END_IF - EVT_CALL(GetModelCenter, 123) - EVT_CALL(PlayEffect, 0x43, 0, LVar0, LVar1, LVar2, 2, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_CALL(PlaySoundAt, 0x2F3, 0, LVar0, LVar1, LVar2) - EVT_CALL(ClearPartnerMoveHistory, -4) - EVT_CALL(EnableModel, 123, 0) - EVT_SET(AreaFlag(37), 0) - EVT_KILL_THREAD(MapVar(9)) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_GRAVITY)), TRUE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END -}; - -EvtScript N(80243870) = { - EVT_CALL(PlaySoundAt, 0x193, 0, 591, 55, 121) - EVT_CALL(EnableModel, 123, 1) - EVT_SETF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_SETF(LVar6, EVT_FLOAT(0.0)) - EVT_SET(LVar7, -30) - EVT_SET(LVar8, 20) - EVT_DIVF(LVar7, EVT_FLOAT(90.0)) - EVT_DIVF(LVar8, EVT_FLOAT(90.0)) - EVT_SET(LVar9, 180) - EVT_LOOP(LVar9) - EVT_CALL(TranslateModel, 123, 591, 55, 121) - EVT_SETF(LVar3, LVar2) - EVT_DIVF(LVar3, 10) - EVT_CALL(ScaleModel, 123, LVar3, LVar3, LVar3) - EVT_CALL(TranslateModel, 123, LVar4, LVar5, LVar6) - EVT_ADDF(LVar2, EVT_FLOAT(0.05)) - EVT_IF_GT(LVar9, 90) - EVT_ADDF(LVar4, LVar7) - EVT_ADDF(LVar5, LVar8) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar7, -30) - EVT_SET(LVar8, -40) - EVT_DIVF(LVar7, EVT_FLOAT(60.0)) - EVT_DIVF(LVar8, EVT_FLOAT(60.0)) - EVT_LOOP(60) - EVT_CALL(TranslateModel, 123, 591, 55, 121) - EVT_CALL(ScaleModel, 123, LVar3, LVar3, LVar3) - EVT_CALL(TranslateModel, 123, LVar4, LVar5, LVar6) - EVT_ADDF(LVar4, LVar7) - EVT_ADDF(LVar6, LVar8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(AreaFlag(36), 0) - EVT_SET(AreaFlag(37), 1) - EVT_RETURN - EVT_END -}; - -f32 N(D_80243B14_CCEE24) = 0.0f; - -s32 N(D_80243B18_CCEE28) = { - 0x0000005A, -}; - -EvtScript N(80243B1C) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SET(LVarF, LVar0) - EVT_LABEL(0) - EVT_IF_EQ(AreaFlag(35), 1) - EVT_WAIT(10) - EVT_GOTO(0) - EVT_END_IF - EVT_USE_BUF(EVT_PTR(N(D_802431CC_CCE4DC))) - EVT_BUF_READ1(LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(EnableModel, LVarF, 1) - EVT_CALL(RandInt, 4, LVar0) - EVT_ADDF(LVar0, EVT_FLOAT(4.0)) - EVT_MULF(LVar0, EVT_FLOAT(-1.0)) - EVT_SETF(LVar1, EVT_FLOAT(2.0)) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(10.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_SETF(LVar4, EVT_FLOAT(591.0)) - EVT_SETF(LVar5, EVT_FLOAT(60.0)) - EVT_SETF(LVar6, EVT_FLOAT(121.0)) - EVT_CALL(RandInt, 3, LVar7) - EVT_ADDF(LVar7, EVT_FLOAT(3.0)) - EVT_MULF(LVar7, EVT_FLOAT(0.04)) - EVT_SETF(LVar9, LVar7) - EVT_DIVF(LVar9, EVT_FLOAT(5.0)) - EVT_CALL(RandInt, 50, LVar8) - EVT_ADD(LVar8, 50) - EVT_LOOP(LVar8) - EVT_SETF(LVarE, LVar2) - EVT_SUBF(LVarE, LVar0) - EVT_MULF(LVarE, EVT_FLOAT(0.046875)) - EVT_ADDF(LVar0, LVarE) - EVT_SETF(LVarE, LVar3) - EVT_SUBF(LVarE, LVar1) - EVT_MULF(LVarE, EVT_FLOAT(0.046875)) - EVT_ADDF(LVar1, LVarE) - EVT_ADDF(LVar4, LVar0) - EVT_ADDF(LVar5, LVar1) - EVT_SETF(LVarE, LVar7) - EVT_SUBF(LVarE, LVar9) - EVT_MULF(LVarE, EVT_FLOAT(0.203125)) - EVT_ADDF(LVar9, LVarE) - EVT_CALL(TranslateModel, LVarF, LVar4, LVar5, LVar6) - EVT_CALL(ScaleModel, LVarF, LVar9, LVar9, LVar9) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVarF, 0) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - - -EvtScript N(80243E78) = { - EVT_CALL(ModifyColliderFlags, 3, 31, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 32, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 33, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 34, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 35, 0x00000006) - EVT_SET(LVar0, -730) - EVT_SET(LVar1, -130) - EVT_SET(LVar2, -470) - EVT_SET(LVar3, -70) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80242C00)) - EVT_SET(LVar0, -730) - EVT_SET(LVar1, 70) - EVT_SET(LVar2, -470) - EVT_SET(LVar3, 140) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80242C00)) - EVT_SET(LVar0, -280) - EVT_SET(LVar1, 130) - EVT_SET(LVar2, -110) - EVT_SET(LVar3, -70) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80242C00)) - EVT_SET(LVar0, -280) - EVT_SET(LVar1, 70) - EVT_SET(LVar2, -10) - EVT_SET(LVar3, 140) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80242C00)) - EVT_CALL(GetModelCenter, 96) - EVT_SET(LVar3, 96) - EVT_SET(LVar4, 97) - EVT_SET(LVar5, 98) - EVT_SET(LVar6, 99) - EVT_SET(LVarA, 174) - EVT_EXEC(N(80242EAC)) - EVT_CALL(GetModelCenter, 82) - EVT_SET(LVar3, 82) - EVT_SET(LVar4, 83) - EVT_SET(LVar5, 84) - EVT_SET(LVar6, 85) - EVT_SET(LVarA, 0) - EVT_EXEC(N(80242EAC)) - EVT_CALL(GetModelCenter, 76) - EVT_SET(LVar3, 76) - EVT_SET(LVar4, 77) - EVT_SET(LVar5, 78) - EVT_SET(LVar6, 79) - EVT_SET(LVarA, 0) - EVT_EXEC(N(80242EAC)) - EVT_CALL(GetModelCenter, 90) - EVT_SET(LVar3, 90) - EVT_SET(LVar4, 91) - EVT_SET(LVar5, 92) - EVT_SET(LVar6, 93) - EVT_SET(LVarA, 0) - EVT_EXEC(N(80242EAC)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 15, 0x7FFFFE00) - EVT_CALL(CloneModel, 124, 10001) - EVT_CALL(CloneModel, 124, 10002) - EVT_CALL(CloneModel, 124, 10003) - EVT_CALL(CloneModel, 124, 10004) - EVT_CALL(CloneModel, 124, 10005) - EVT_CALL(EnableModel, 123, 0) - EVT_CALL(EnableModel, 124, 0) - EVT_CALL(EnableModel, 10001, 0) - EVT_CALL(EnableModel, 10002, 0) - EVT_CALL(EnableModel, 10003, 0) - EVT_CALL(EnableModel, 10004, 0) - EVT_CALL(EnableModel, 10005, 0) - EVT_SET(LVar0, 10001) - EVT_EXEC(N(80243B1C)) - EVT_SET(LVar0, 10002) - EVT_EXEC(N(80243B1C)) - EVT_SET(LVar0, 10003) - EVT_EXEC(N(80243B1C)) - EVT_SET(LVar0, 10004) - EVT_EXEC(N(80243B1C)) - EVT_SET(LVar0, 10005) - EVT_EXEC(N(80243B1C)) - EVT_CALL(MakeLocalVertexCopy, 0, 123, 1) - EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(func_80240504_CCB814)), 0) - EVT_CALL(SetModelCustomGfx, 123, 1, -1) - EVT_CALL(SetModelCustomGfx, 10001, 1, -1) - EVT_CALL(SetModelCustomGfx, 10002, 1, -1) - EVT_CALL(SetModelCustomGfx, 10003, 1, -1) - EVT_CALL(SetModelCustomGfx, 10004, 1, -1) - EVT_CALL(SetModelCustomGfx, 10005, 1, -1) - EVT_CALL(MakeLocalVertexCopy, 1, 57, 1) - EVT_CALL(SetCustomGfxBuilders, 2, EVT_PTR(N(func_802407D4_CCBAE4)), 0) - EVT_CALL(SetModelCustomGfx, 57, 2, -1) - EVT_RETURN - EVT_END -}; - -#include "world/common/atomic/TexturePan.inc.c" - -ApiStatus N(func_8024030C_CCB61C)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} - -#include "world/common/todo/UnkFunc43.inc.c" - -ApiStatus N(func_802403D4_CCB6E4)(Evt* script, s32 isInitialCall) { - if (gPlayerData.currentPartner == PARTNER_NONE) { - script->varTable[14] = 0; - return ApiStatus_DONE2; - } - - script->varTable[14] = 1; - evt_set_variable(NULL, MapVar(0), get_npc_unsafe(NPC_PARTNER)->flags); - return ApiStatus_DONE2; -} - -ApiStatus N(func_8024042C_CCB73C)(Evt* script, s32 isInitialCall) { - Npc* npc = get_npc_unsafe(NPC_PARTNER); - - npc->flags = evt_get_variable(NULL, MapVar(0)); - return ApiStatus_DONE2; -} - -ApiStatus N(func_8024046C_CCB77C)(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - - script->functionTemp[0] = evt_get_variable(script, *args++); - script->functionTemp[1] = evt_get_variable(script, *args++); - script->functionTemp[2] = evt_get_variable(script, *args++); - sfx_adjust_env_sound_pos(0x194, 0, script->functionTemp[0], script->functionTemp[1], script->functionTemp[2]); - return ApiStatus_DONE2; -} - -void N(func_80240504_CCB814)(void) { - Matrix4f matrix; - Vtx* sp50; - Vtx* sp54; - s32 sp58; - s32 new_var; - - guMtxIdentF(matrix); - - matrix[0][0] = (sin_rad(N(D_80243B14_CCEE24) / 11.0f) * 0.04) + 0.98; - matrix[0][1] = sin_rad(N(D_80243B14_CCEE24) / 12.0f) * 0.04; - matrix[0][2] = cos_rad(N(D_80243B14_CCEE24) / 13.0f) * 0.04; - - matrix[1][1] = (sin_rad(N(D_80243B14_CCEE24) / 7.0f + 1.0f) * 0.04) + 0.98; - matrix[1][0] = sin_rad(N(D_80243B14_CCEE24) / 14.0f) * 0.04; - matrix[1][2] = cos_rad(N(D_80243B14_CCEE24) / 15.0f) * 0.04; - - matrix[2][2] = (sin_rad(N(D_80243B14_CCEE24) * 0.25f + 2.0f) * 0.04) + 0.98; - matrix[2][0] = sin_rad(N(D_80243B14_CCEE24) * 0.0625f) * 0.04; - matrix[2][1] = cos_rad(N(D_80243B14_CCEE24) / 17.0f) * 0.04; - - guMtxF2L(matrix, &gDisplayContext->matrixStack[gMatrixListPos]); - mdl_get_copied_vertices(0, &sp50, &sp54, &sp58); - - new_var = 0; - while (new_var); // TODO required to match - - gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], - G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); - gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(0)); - - N(D_80243B14_CCEE24) += 1.0f; -} - -void N(func_802407D4_CCBAE4)(void) { - s32 i; - Vtx* verts; - Vtx* copied; - s32 numCopied; - f32 openedScale; // controls how open the flower is - f32 lengthScale; // controls longitudinal pulsing - - mdl_get_copied_vertices(1, &verts, &copied, &numCopied); - - for (i = 0; i < numCopied; i++) { - Vtx* src = &verts[i]; - Vtx* copy = &copied[i]; - - if (src->v.ob[0] <= 600) { - openedScale = 0.7 + (sin_rad((N(D_80243B18_CCEE28) / 180.0f) * PI_D) * 0.3); - lengthScale = 0.2 - (sin_rad((N(D_80243B18_CCEE28) / 180.0f) * PI_D) * 0.2); - copy->v.ob[0] = ((src->v.ob[0] - 616) * openedScale) + 616.0f + (lengthScale * -48.0f); - copy->v.ob[1] = ((src->v.ob[1] - 44) * openedScale) + 44.0f + (lengthScale * 25.0f); - copy->v.ob[2] = ((src->v.ob[2] - 113) * openedScale) + 113.0f + (lengthScale * -87.0f); - } - } - - gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1)); - - if (evt_get_variable(NULL, AreaFlag(36)) != 0) { - if (N(D_80243B18_CCEE28) > 90) { - N(D_80243B18_CCEE28) -= 360; - } - if (N(D_80243B18_CCEE28) >= -90) { - N(D_80243B18_CCEE28) += 5; - } else { - N(D_80243B18_CCEE28) += 20; - } - if (N(D_80243B18_CCEE28) >= 90) { - N(D_80243B18_CCEE28) = 90; - } - } else { - if (((u32)N(D_80243B18_CCEE28) - 141) < 119) { - N(D_802431CC_CCE4DC) = TRUE; - } else { - N(D_802431CC_CCE4DC) = FALSE; - } - N(D_80243B18_CCEE28) += 5; - } - - if (N(D_80243B18_CCEE28) >= 360) { - N(D_80243B18_CCEE28) -= 360; - } -} diff --git a/src/world/area_flo/flo_14/CCBE20.c b/src/world/area_flo/flo_14/CCBE20.c deleted file mode 100644 index 25c1626a9e..0000000000 --- a/src/world/area_flo/flo_14/CCBE20.c +++ /dev/null @@ -1,334 +0,0 @@ -#include "flo_14.h" -#include "sprite/npc/Bubulb.h" -#include "sprite/npc/Bzzap.h" - -enum { - NPC_BUBULB, - NPC_BZZAP, -}; - -BSS s32 N(ItemChoiceList)[91]; - -f32 N(FlyingAI_JumpVels)[] = { - 4.5f, 3.5f, 2.6f, 2.0f, - 1.5f, 20.0f, -}; - -MobileAISettings N(npcAISettings_802444D8) = { - .moveSpeed = 1.0f, - .moveTime = 30, - .waitTime = 5, - .alertRadius = 80.0f, - .alertOffsetDist = 30.0f, - .playerSearchInterval = 2, - .chaseSpeed = 4.5f, - .chaseTurnRate= 6, - .chaseUpdateInterval = 1, - .chaseRadius = 90.0f, - .chaseOffsetDist = 30.0f, - .unk_AI_2C = 1, -}; - -EvtScript N(npcAI_80244508) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, -630) - EVT_CALL(SetSelfVar, 6, 50) - EVT_CALL(SetSelfVar, 1, 200) - EVT_CALL(N(FlyingAI_Main), EVT_PTR(N(npcAISettings_802444D8))) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_80244578) = { - .height = 26, - .radius = 24, - .ai = &N(npcAI_80244508), - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 19, -}; - -NpcSettings N(npcSettings_802445A4) = { - .height = 56, - .radius = 40, - .level = 99, -}; - -NpcSettings N(npcSettings_802445D0) = { - .height = 24, - .radius = 24, - .level = 99, -}; - -s32 N(ItemChoice_HasSelectedItem) = { - 0x00000000, -}; - -s32 N(ItemChoice_SelectedItemID) = { - 0x00000000, -}; - -EvtScript N(80244604) = { - EVT_SET(LVar9, LVar1) - EVT_CALL(ShowConsumableChoicePopup) - EVT_SET(LVarA, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_CALL(RemoveItemAt, LVar1) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) - EVT_CALL(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, 1, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_60005) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_END_SWITCH - EVT_CALL(N(ItemChoice_SaveSelected), LVarA) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END -}; - -EvtScript N(80244738) = { - EVT_CALL(N(BuildItemChoiceList), LVar0) - EVT_BIND_PADLOCK(N(80244604), 0x10, 0, EVT_PTR(N(ItemChoiceList)), 0, 1) - EVT_CALL(N(ItemChoice_WaitForSelection), LVar0) - EVT_RETURN - EVT_END -}; - - -s32 N(D_80244788_CCFA98)[] = { - ITEM_BUBBLE_BERRY, ITEM_NONE -}; - -EvtScript N(interact_80244790) = { - EVT_IF_EQ(AreaFlag(37), 1) - EVT_SET(AreaFlag(35), 1) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0063) - EVT_SET(AreaFlag(35), 0) - EVT_RETURN - EVT_END_IF - EVT_SET(AreaFlag(35), 1) - EVT_IF_EQ(GF_FLO14_GaveBerryToBubblePlant, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_005F) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0060) - EVT_END_IF - EVT_CALL(FindItem, 161, LVar0) - EVT_IF_NE(LVar0, -1) - EVT_SET(LVar0, EVT_PTR(N(D_80244788_CCFA98))) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(N(80244738)) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0064) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0061) - EVT_SET(AreaFlag(36), 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, ((NPC_FLAG_100)), TRUE) - EVT_CALL(PlayerMoveTo, 555, 110, 20) - EVT_CALL(SetNpcFlagBits, NPC_SELF, ((NPC_FLAG_100)), FALSE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(func_802CF56C, 2) - EVT_WAIT(5) - EVT_CALL(AdjustCam, 0, EVT_FLOAT(1.0), 0, 350, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_EXEC(N(80243870)) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0062) - EVT_THREAD - EVT_WAIT(40) - EVT_CALL(InterpPlayerYaw, 315, 0) - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(AreaFlag(37), 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 5, MSG_CH6_0063) - EVT_SET(GF_FLO14_GaveBerryToBubblePlant, 1) - EVT_BIND_TRIGGER(N(8024352C), TRIGGER_FLOOR_PRESS_A, 30, 1, 0) - EVT_END_IF - EVT_END_IF - EVT_SET(AreaFlag(35), 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80244ADC) = { - EVT_SET(AreaFlag(36), 0) - EVT_SET(AreaFlag(37), 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80244790))) - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80244B20) = { - .id = NPC_BUBULB, - .settings = &N(npcSettings_802445A4), - .pos = { 617.0f, 0.0f, 108.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_4000, - .init = &N(init_80244ADC), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Walk, - ANIM_Bubulb_Pink_Walk, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - ANIM_Bubulb_Pink_Idle, - }, - .tattle = MSG_NpcTattle_BubblePlant, -}; - -StaticNpc N(npcGroup_80244D10) = { - .id = NPC_BZZAP, - .settings = &N(npcSettings_80244578), - .pos = { -175.0f, 55.0f, 15.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .minCoinBonus = 1, - .maxCoinBonus = 4, - }, - .territory = { .temp = { -175, 55, 15, 30, 0, -32767, 0, -175, 55, 15, 200, 0, 0, 1 }}, - .animations = { - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim03, - ANIM_Bzzap_Anim03, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim06, - ANIM_Bzzap_Anim06, - ANIM_Bzzap_Anim04, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -NpcGroupList N(npcGroupList_80244F00) = { - NPC_GROUP(N(npcGroup_80244B20)), - NPC_GROUP(N(npcGroup_80244D10), 0x1819, 0x00), - {}, -}; - -static s32 N(pad_4F24)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(80244F30) = { - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 675, 60, -100, 17, GF_FLO14_Item_StarPiece) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_4F64)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(80244F70) = { - EVT_LOOP(0) - EVT_CALL(N(func_80242360_CCD670), LVar0) - EVT_IF_EQ(LVar0, LVar4) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_NE(LVar0, 23) - EVT_IF_EQ(LVar8, 0) - EVT_THREAD - EVT_CALL(GetModelCenter, LVar5) - EVT_CALL(PlaySoundAt, 0x1DB, 4194304, LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_END_IF - EVT_IF_LT(LVar7, 90) - EVT_IF_EQ(LVar7, 0) - EVT_WAIT(5) - EVT_SET(LVar8, 6) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar9, 0x7FFFFE00) - EVT_END_IF - EVT_ADD(LVar8, 1) - EVT_ADD(LVar7, LVar8) - EVT_END_IF - EVT_GOTO(50) - EVT_END_IF - EVT_END_IF - EVT_IF_NE(LVar7, 0) - EVT_SUB(LVar8, 1) - EVT_ADD(LVar7, LVar8) - EVT_IF_LE(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar7, 0) - EVT_THREAD - EVT_CALL(GetModelCenter, LVar5) - EVT_CALL(PlaySoundAt, 0x1DC, 0, LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, 1, LVar9, 0x7FFFFE00) - EVT_END_IF - EVT_END_IF - EVT_LABEL(50) - EVT_IF_GE(LVar7, 90) - EVT_SET(LVar8, -1) - EVT_SET(LVar7, 90) - EVT_END_IF - EVT_CALL(RotateModel, LVar5, LVar7, -1, 0, 0) - EVT_CALL(RotateModel, LVar6, LVar7, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(80245224) = { - EVT_SET(LVar4, 21) - EVT_SET(LVar5, 21) - EVT_SET(LVar6, 20) - EVT_SET(LVar7, MapVar(10)) - EVT_SET(LVar8, MapVar(11)) - EVT_SET(LVar9, 22) - EVT_EXEC(N(80244F70)) - EVT_SET(LVar4, 17) - EVT_SET(LVar5, 26) - EVT_SET(LVar6, 25) - EVT_SET(LVar7, MapVar(12)) - EVT_SET(LVar8, MapVar(13)) - EVT_SET(LVar9, 18) - EVT_EXEC(N(80244F70)) - EVT_RETURN - EVT_END -}; - -#include "world/common/enemy/ai/FlyingAI.inc.c" - -#include "world/common/atomic/ItemChoice_PartA.inc.c" - -#include "world/common/atomic/MakeConsumableChoice.inc.c" diff --git a/src/world/area_flo/flo_14/CCD670.c b/src/world/area_flo/flo_14/CCD670.c deleted file mode 100644 index d308dd4189..0000000000 --- a/src/world/area_flo/flo_14/CCD670.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "flo_14.h" - -ApiStatus N(func_80242360_CCD670)(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - - evt_set_variable(script, *args++, gCollisionStatus.floorBelow); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_14/flo_14.h b/src/world/area_flo/flo_14/flo_14.h index f810b11e0f..3834f26f6c 100644 --- a/src/world/area_flo/flo_14/flo_14.h +++ b/src/world/area_flo/flo_14/flo_14.h @@ -2,33 +2,39 @@ /// @brief Flower Fields - (NW) Bubble Flower #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_14_shape.h" +#include "mapfs/flo_14_hit.h" + +#include "sprite/npc/Bubulb.h" +#include "sprite/npc/Bzzap.h" + +enum { + NPC_BubbleFlower = 0, + NPC_Bzzap = 1, +}; + +enum { + MV_SavedPartnerFlags = MapVar(0), + MV_BubbleCamScript = MapVar(9), + MV_RotAngle_Log_01 = MapVar(10), + MV_RotVelocity_Log_01 = MapVar(11), + MV_RotAngle_Log_02 = MapVar(12), + MV_RotVelocity_Log_02 = MapVar(13), +}; + #define NAMESPACE flo_14 -ApiStatus N(func_80242360_CCD670)(Evt *script, s32 isInitialCall); -ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanSmooth)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanStepped)(Evt* script, s32 isInitialCall); -ApiStatus N(func_8024030C_CCB61C)(Evt* script, s32 isInitialCall); -ApiStatus N(UnkFunc43)(Evt* script, s32 isInitialCall); -ApiStatus N(func_802403D4_CCB6E4)(Evt* script, s32 isInitialCall); -ApiStatus N(func_8024042C_CCB73C)(Evt* script, s32 isInitialCall); -ApiStatus N(func_8024046C_CCB77C)(Evt* script, s32 isInitialCall); -void N(func_80240504_CCB814)(void); -void N(func_802407D4_CCBAE4)(void); -ApiStatus N(FlyingAI_Main)(Evt* script, s32 isInitialCall); -ApiStatus N(ItemChoice_WaitForSelection)(Evt* script, s32 isInitialCall); -ApiStatus N(ItemChoice_SaveSelected)(Evt* script, s32 isInitialCall); -ApiStatus N(BuildItemChoiceList)(Evt* script, s32 isInitialCall); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_SetupBubbles); +extern EvtScript N(EVS_SetupLogBridges); +extern EvtScript N(EVS_MakeEntities); -extern NpcGroupList N(npcGroupList_80244F00); -extern EvtScript N(80243E78); -extern EvtScript N(8024352C); -extern EvtScript N(80243870); -extern EvtScript N(80244F30); -extern EvtScript N(80245224); -extern EvtScript N(d_80242360); -extern EvtScript N(main); +extern EvtScript N(EVS_BlowBigBubble); +extern EvtScript N(EVS_RideBigBubble); + +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_14/flo_14_0_header.c b/src/world/area_flo/flo_14/flo_14_0_header.c new file mode 100644 index 0000000000..2adc496f18 --- /dev/null +++ b/src/world/area_flo/flo_14/flo_14_0_header.c @@ -0,0 +1,14 @@ +#include "flo_14.h" + +EntryList N(Entrances) = { + [flo_14_ENTRY_0] { 720.0, 0.0, 0.0, 270.0 }, + [flo_14_ENTRY_1] { -720.0, 0.0, 0.0, 90.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_14 }, +}; diff --git a/src/world/area_flo/flo_14/flo_14_1_music.c b/src/world/area_flo/flo_14/flo_14_1_music.c new file mode 100644 index 0000000000..b59f8bf4e9 --- /dev/null +++ b/src/world/area_flo/flo_14/flo_14_1_music.c @@ -0,0 +1,12 @@ +#include "flo_14.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_14/flo_14_2_main.c b/src/world/area_flo/flo_14/flo_14_2_main.c new file mode 100644 index 0000000000..0878862b25 --- /dev/null +++ b/src/world/area_flo/flo_14/flo_14_2_main.c @@ -0,0 +1,98 @@ +#include "flo_14.h" +#include "effects.h" + +#include "world/common/atomic/TexturePan.inc.c" +#include "world/common/atomic/TexturePan.data.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_00_1) = EVT_EXIT_WALK(60, flo_14_ENTRY_0, "flo_00", flo_00_ENTRY_1); +EvtScript N(EVS_ExitWalk_flo_13_0) = EVT_EXIT_WALK(60, flo_14_ENTRY_1, "flo_13", flo_13_ENTRY_0); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +LavaReset N(SafeFloorColliders)[] = { + { .colliderID = COLLIDER_o129, .pos = { -500.0, 0.0, -90.0 }}, + { .colliderID = COLLIDER_o137, .pos = { -510.0, 0.0, 0.0 }}, + { .colliderID = COLLIDER_o155, .pos = { -500.0, 0.0, 110.0 }}, + { .colliderID = COLLIDER_o156, .pos = { -250.0, 0.0, -90.0 }}, + { .colliderID = COLLIDER_o140, .pos = { -240.0, 0.0, 0.0 }}, + { .colliderID = COLLIDER_o157, .pos = { -250.0, 0.0, 110.0 }}, + { .colliderID = COLLIDER_o151, .pos = { -50.0, 0.0, 25.0 }}, + { .colliderID = COLLIDER_o152, .pos = { 70.0, 60.0, -95.0 }}, + { .colliderID = COLLIDER_o153, .pos = { 410.0, 60.0, -95.0 }}, + { .colliderID = COLLIDER_o154, .pos = { 550.0, 0.0, 50.0 }}, + { .colliderID = COLLIDER_o158, .pos = { -50.0, 0.0, 110.0 }}, + { .colliderID = -1 } +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC(N(EVS_MakeEntities)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES) + EVT_THREAD + EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) + EVT_END_THREAD + EVT_CALL(EnableTexPanning, MODEL_o39, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o41, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o43, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o49, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o55, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o123, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o125, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o127, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o129, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o131, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o133, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o135, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o40, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o44, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o48, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o52, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o54, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o124, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o126, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o128, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o130, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o132, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o134, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o136, TRUE) + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_1) + TEX_PAN_PARAMS_STEP( 140, 0, 0, 0) + TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_2) + TEX_PAN_PARAMS_STEP( -200, 0, 0, 0) + TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_EXEC(N(EVS_SetupBubbles)) + EVT_EXEC(N(EVS_SetupLogBridges)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_14/flo_14_3_bubbles.c b/src/world/area_flo/flo_14/flo_14_3_bubbles.c new file mode 100644 index 0000000000..0ec44a22cd --- /dev/null +++ b/src/world/area_flo/flo_14/flo_14_3_bubbles.c @@ -0,0 +1,402 @@ +#include "flo_14.h" +#include "effects.h" +#include "model.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" +#include "world/common/atomic/flo_DroppingVine.inc.c" + +s32 N(BlowingBubbles) = FALSE; + +EvtScript N(EVS_BubbleUpdateCamera) = { + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_CALL(MakeLerp, LVar1, 48, 15, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) + EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_LOOP(0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, 48, LVar2) + EVT_WAIT(1) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_TetherParterToPlayer) = { + EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + EVT_LOOP(0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, 20) + EVT_ADD(LVar2, -5) + EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + EVT_WAIT(1) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +API_CALLABLE(N(SavePartnerFlags)) { + if (gPlayerData.currentPartner == PARTNER_NONE) { + script->varTable[14] = FALSE; + return ApiStatus_DONE2; + } + + script->varTable[14] = TRUE; + evt_set_variable(NULL, MV_SavedPartnerFlags, get_npc_unsafe(NPC_PARTNER)->flags); + return ApiStatus_DONE2; +} + +API_CALLABLE(N(RestorePartnerFlags)) { + get_npc_unsafe(NPC_PARTNER)->flags = evt_get_variable(NULL, MV_SavedPartnerFlags); + return ApiStatus_DONE2; +} + +API_CALLABLE(N(UpdateBubbleSoundPos)) { + Bytecode* args = script->ptrReadPos; + + script->functionTemp[0] = evt_get_variable(script, *args++); + script->functionTemp[1] = evt_get_variable(script, *args++); + script->functionTemp[2] = evt_get_variable(script, *args++); + sfx_adjust_env_sound_pos(SOUND_194, 0, script->functionTemp[0], script->functionTemp[1], script->functionTemp[2]); + return ApiStatus_DONE2; +} + +Vec3f N(BubbleFlightPath)[] = { + { 531.0, 75.0, 81.0 }, + { 481.0, 80.0, 81.0 }, + { 431.0, 75.0, 81.0 }, + { 381.0, 70.0, 81.0 }, + { 331.0, 75.0, 81.0 }, + { 281.0, 80.0, 81.0 }, + { 231.0, 75.0, 81.0 }, + { 181.0, 70.0, 81.0 }, + { 131.0, 75.0, 81.0 }, + { 81.0, 80.0, 81.0 }, + { 31.0, 75.0, 81.0 }, + { -19.0, 70.0, 81.0 }, + { -69.0, 75.0, 81.0 }, +}; + +EvtScript N(EVS_BubbleFollowPath) = { + EVT_WAIT(20) + EVT_CALL(PlaySound, SOUND_80000023) + EVT_CALL(LoadPath, 165, EVT_PTR(N(BubbleFlightPath)), 13, EASING_COS_IN_OUT) + EVT_LABEL(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(TranslateModel, MODEL_o167, LVar1, LVar2, LVar3) + EVT_ADD(LVar2, -27) + EVT_ADD(LVar3, -10) + EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) + EVT_CALL(N(UpdateBubbleSoundPos), LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 1) + EVT_GOTO(0) + EVT_END_IF + EVT_CALL(StopSound, SOUND_80000023) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_RideBigBubble) = { + EVT_CALL(IsPlayerWithin, 531, 81, 30, LVar0) + EVT_IF_EQ(LVar0, 0) + EVT_RETURN + EVT_END_IF + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(GetCurrentPartner, LVar0) + EVT_IF_NE(LVar0, PARTNER_NONE) + EVT_CALL(InterruptUsePartner) + EVT_WAIT(20) + EVT_END_IF + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_CALL(DisablePartnerAI, 0) + EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_100, TRUE) + EVT_CALL(GetModelCenter, MODEL_o167) + EVT_THREAD + EVT_ADD(LVar2, -10) + EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2)) + EVT_CALL(PlayerJump, 531, 48, LVar2, 10) + EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) + EVT_END_THREAD + EVT_THREAD + EVT_WAIT(5) + EVT_ADD(LVar2, -15) + EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.2)) + EVT_CALL(NpcJump0, NPC_PARTNER, 531, 68, LVar2, 10) + EVT_END_THREAD + EVT_EXEC_GET_TID(N(EVS_BubbleUpdateCamera), MV_BubbleCamScript) + EVT_WAIT(15) + EVT_CALL(N(SavePartnerFlags)) + EVT_IF_TRUE(LVarE) + EVT_EXEC_GET_TID(N(EVS_TetherParterToPlayer), LVarE) + EVT_END_IF + EVT_EXEC_WAIT(N(EVS_BubbleFollowPath)) + EVT_IF_TRUE(LVarE) + EVT_KILL_THREAD(LVarE) + EVT_CALL(N(RestorePartnerFlags)) + EVT_END_IF + EVT_CALL(GetModelCenter, MODEL_o167) + EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, 2, 0) + EVT_CALL(PlaySoundAt, SOUND_2F3, 0, LVar0, LVar1, LVar2) + EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) + EVT_CALL(EnableModel, MODEL_o167, FALSE) + EVT_SET(AF_FLO_BigBubbleReady, FALSE) + EVT_KILL_THREAD(MV_BubbleCamScript) + EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + EVT_CALL(EnablePartnerAI) + EVT_CALL(DisablePlayerPhysics, FALSE) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_UNBIND + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_BlowBigBubble) = { + EVT_CALL(PlaySoundAt, SOUND_193, 0, 591, 55, 121) + EVT_CALL(EnableModel, MODEL_o167, TRUE) + EVT_SETF(LVar2, EVT_FLOAT(1.0)) + EVT_SETF(LVar4, EVT_FLOAT(0.0)) + EVT_SETF(LVar5, EVT_FLOAT(0.0)) + EVT_SETF(LVar6, EVT_FLOAT(0.0)) + EVT_SET(LVar7, -30) + EVT_SET(LVar8, 20) + EVT_DIVF(LVar7, EVT_FLOAT(90.0)) + EVT_DIVF(LVar8, EVT_FLOAT(90.0)) + EVT_SET(LVar9, 180) + EVT_LOOP(LVar9) + EVT_CALL(TranslateModel, MODEL_o167, 591, 55, 121) + EVT_SETF(LVar3, LVar2) + EVT_DIVF(LVar3, 10) + EVT_CALL(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3) + EVT_CALL(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6) + EVT_ADDF(LVar2, EVT_FLOAT(0.05)) + EVT_IF_GT(LVar9, 90) + EVT_ADDF(LVar4, LVar7) + EVT_ADDF(LVar5, LVar8) + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_SET(LVar7, -30) + EVT_SET(LVar8, -40) + EVT_DIVF(LVar7, EVT_FLOAT(60.0)) + EVT_DIVF(LVar8, EVT_FLOAT(60.0)) + EVT_LOOP(60) + EVT_CALL(TranslateModel, MODEL_o167, 591, 55, 121) + EVT_CALL(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3) + EVT_CALL(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6) + EVT_ADDF(LVar4, LVar7) + EVT_ADDF(LVar6, LVar8) + EVT_WAIT(1) + EVT_END_LOOP + EVT_SET(AF_FLO_BlowingBigBubble, FALSE) + EVT_SET(AF_FLO_BigBubbleReady, TRUE) + EVT_RETURN + EVT_END +}; + +f32 N(BubblePhase) = 0.0f; + +void N(gfx_build_big_bubble)(void) { + Matrix4f matrix; + Vtx* src; + Vtx* dest; + s32 copyCount; + s32 new_var; + + guMtxIdentF(matrix); + + matrix[0][0] = (sin_rad(N(BubblePhase) / 11.0f) * 0.04) + 0.98; + matrix[0][1] = (sin_rad(N(BubblePhase) / 12.0f) * 0.04); + matrix[0][2] = (cos_rad(N(BubblePhase) / 13.0f) * 0.04); + + matrix[1][1] = (sin_rad(N(BubblePhase) / 7.0f + 1.0f) * 0.04) + 0.98; + matrix[1][0] = (sin_rad(N(BubblePhase) / 14.0f) * 0.04); + matrix[1][2] = (cos_rad(N(BubblePhase) / 15.0f) * 0.04); + + matrix[2][2] = (sin_rad(N(BubblePhase) * 0.25f + 2.0f) * 0.04) + 0.98; + matrix[2][0] = (sin_rad(N(BubblePhase) * 0.0625f) * 0.04); + matrix[2][1] = (cos_rad(N(BubblePhase) / 17.0f) * 0.04); + + guMtxF2L(matrix, &gDisplayContext->matrixStack[gMatrixListPos]); + mdl_get_copied_vertices(0, &src, &dest, ©Count); + + new_var = 0; + while (new_var); // TODO required to match + + gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], + G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); + gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(0)); + + N(BubblePhase) += 1.0f; +} + +s32 N(FlowerPhase) = 90; + +void N(gfx_build_bubble_flower)(void) { + s32 i; + Vtx* verts; + Vtx* copied; + s32 numCopied; + f32 openedScale; // controls how open the flower is + f32 lengthScale; // controls longitudinal pulsing + + mdl_get_copied_vertices(1, &verts, &copied, &numCopied); + + for (i = 0; i < numCopied; i++) { + Vtx* src = &verts[i]; + Vtx* copy = &copied[i]; + + if (src->v.ob[0] <= 600) { + openedScale = 0.7 + (sin_rad((N(FlowerPhase) / 180.0f) * PI_D) * 0.3); + lengthScale = 0.2 - (sin_rad((N(FlowerPhase) / 180.0f) * PI_D) * 0.2); + copy->v.ob[0] = ((src->v.ob[0] - 616) * openedScale) + 616.0f + (lengthScale * -48.0f); + copy->v.ob[1] = ((src->v.ob[1] - 44) * openedScale) + 44.0f + (lengthScale * 25.0f); + copy->v.ob[2] = ((src->v.ob[2] - 113) * openedScale) + 113.0f + (lengthScale * -87.0f); + } + } + + gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1)); + + if (evt_get_variable(NULL, AF_FLO_BlowingBigBubble)) { + if (N(FlowerPhase) > 90) { + N(FlowerPhase) -= 360; + } + if (N(FlowerPhase) >= -90) { + N(FlowerPhase) += 5; + } else { + N(FlowerPhase) += 20; + } + if (N(FlowerPhase) >= 90) { + N(FlowerPhase) = 90; + } + } else { + if (N(FlowerPhase) > 140 && N(FlowerPhase) < 260) { + N(BlowingBubbles) = TRUE; + } else { + N(BlowingBubbles) = FALSE; + } + N(FlowerPhase) += 5; + } + + if (N(FlowerPhase) >= 360) { + N(FlowerPhase) -= 360; + } +} + +EvtScript N(EVS_ManageBlownBubble) = { + EVT_SET_GROUP(EVT_GROUP_00) + EVT_SET(LVarF, LVar0) + EVT_LABEL(0) + EVT_IF_EQ(AF_FLO_PauseBlowingBubbles, TRUE) + EVT_WAIT(10) + EVT_GOTO(0) + EVT_END_IF + EVT_USE_BUF(EVT_PTR(N(BlowingBubbles))) + EVT_BUF_READ1(LVar0) + EVT_IF_EQ(LVar0, FALSE) + EVT_CALL(RandInt, 10, LVar0) + EVT_ADD(LVar0, 1) + EVT_WAIT(LVar0) + EVT_GOTO(0) + EVT_END_IF + EVT_CALL(EnableModel, LVarF, TRUE) + EVT_CALL(RandInt, 4, LVar0) + EVT_ADDF(LVar0, EVT_FLOAT(4.0)) + EVT_MULF(LVar0, EVT_FLOAT(-1.0)) + EVT_SETF(LVar1, EVT_FLOAT(2.0)) + EVT_SETF(LVar2, LVar0) + EVT_DIVF(LVar2, EVT_FLOAT(10.0)) + EVT_SETF(LVar3, EVT_FLOAT(0.4)) + EVT_SETF(LVar4, EVT_FLOAT(591.0)) + EVT_SETF(LVar5, EVT_FLOAT(60.0)) + EVT_SETF(LVar6, EVT_FLOAT(121.0)) + EVT_CALL(RandInt, 3, LVar7) + EVT_ADDF(LVar7, EVT_FLOAT(3.0)) + EVT_MULF(LVar7, EVT_FLOAT(0.04)) + EVT_SETF(LVar9, LVar7) + EVT_DIVF(LVar9, EVT_FLOAT(5.0)) + EVT_CALL(RandInt, 50, LVar8) + EVT_ADD(LVar8, 50) + EVT_LOOP(LVar8) + EVT_SETF(LVarE, LVar2) + EVT_SUBF(LVarE, LVar0) + EVT_MULF(LVarE, EVT_FLOAT(0.046875)) + EVT_ADDF(LVar0, LVarE) + EVT_SETF(LVarE, LVar3) + EVT_SUBF(LVarE, LVar1) + EVT_MULF(LVarE, EVT_FLOAT(0.046875)) + EVT_ADDF(LVar1, LVarE) + EVT_ADDF(LVar4, LVar0) + EVT_ADDF(LVar5, LVar1) + EVT_SETF(LVarE, LVar7) + EVT_SUBF(LVarE, LVar9) + EVT_MULF(LVarE, EVT_FLOAT(0.203125)) + EVT_ADDF(LVar9, LVarE) + EVT_CALL(TranslateModel, LVarF, LVar4, LVar5, LVar6) + EVT_CALL(ScaleModel, LVarF, LVar9, LVar9, LVar9) + EVT_WAIT(1) + EVT_END_LOOP + EVT_CALL(EnableModel, LVarF, FALSE) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupBubbles) = { + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o155, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o156, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o157, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o158, SURFACE_TYPE_FLOWERS) + EVT_FLOWER_SPAWN_REGION( -730, -130, -470, -70, 0) + EVT_FLOWER_SPAWN_REGION( -730, 70, -470, 140, 0) + EVT_FLOWER_SPAWN_REGION( -280, 130, -110, -70, 0) + EVT_FLOWER_SPAWN_REGION( -280, 70, -10, 140, 0) + EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o92, MODEL_o93, MODEL_o94, MODEL_o95) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o82, MODEL_o83, MODEL_o84, MODEL_o85) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o78, MODEL_o79, MODEL_o80, MODEL_o81) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o88, MODEL_o89, MODEL_o90, MODEL_o91) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o113, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(1)) + EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(2)) + EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(3)) + EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(4)) + EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(5)) + EVT_CALL(EnableModel, MODEL_o167, FALSE) + EVT_CALL(EnableModel, MODEL_o169, FALSE) + EVT_CALL(EnableModel, CLONED_MODEL(1), FALSE) + EVT_CALL(EnableModel, CLONED_MODEL(2), FALSE) + EVT_CALL(EnableModel, CLONED_MODEL(3), FALSE) + EVT_CALL(EnableModel, CLONED_MODEL(4), FALSE) + EVT_CALL(EnableModel, CLONED_MODEL(5), FALSE) + EVT_SET(LVar0, CLONED_MODEL(1)) + EVT_EXEC(N(EVS_ManageBlownBubble)) + EVT_SET(LVar0, CLONED_MODEL(2)) + EVT_EXEC(N(EVS_ManageBlownBubble)) + EVT_SET(LVar0, CLONED_MODEL(3)) + EVT_EXEC(N(EVS_ManageBlownBubble)) + EVT_SET(LVar0, CLONED_MODEL(4)) + EVT_EXEC(N(EVS_ManageBlownBubble)) + EVT_SET(LVar0, CLONED_MODEL(5)) + EVT_EXEC(N(EVS_ManageBlownBubble)) + EVT_CALL(MakeLocalVertexCopy, 0, MODEL_o167, TRUE) + EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(gfx_build_big_bubble)), 0) + EVT_CALL(SetModelCustomGfx, MODEL_o167, 1, -1) + EVT_CALL(SetModelCustomGfx, CLONED_MODEL(1), 1, -1) + EVT_CALL(SetModelCustomGfx, CLONED_MODEL(2), 1, -1) + EVT_CALL(SetModelCustomGfx, CLONED_MODEL(3), 1, -1) + EVT_CALL(SetModelCustomGfx, CLONED_MODEL(4), 1, -1) + EVT_CALL(SetModelCustomGfx, CLONED_MODEL(5), 1, -1) + EVT_CALL(MakeLocalVertexCopy, 1, MODEL_o57, TRUE) + EVT_CALL(SetCustomGfxBuilders, 2, EVT_PTR(N(gfx_build_bubble_flower)), 0) + EVT_CALL(SetModelCustomGfx, MODEL_o57, 2, -1) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_14/flo_14_4_npc.c b/src/world/area_flo/flo_14/flo_14_4_npc.c new file mode 100644 index 0000000000..1a31ada146 --- /dev/null +++ b/src/world/area_flo/flo_14/flo_14_4_npc.c @@ -0,0 +1,120 @@ +#include "flo_14.h" + +#include "world/common/enemy/complete/Bzzap.inc.c" + +#include "world/common/npc/Bubulb.h" + +NpcSettings N(NpcSettings_BubbleFlower) = { + .height = 56, + .radius = 40, + .level = 99, +}; + +#include "world/common/npc/Dummy.inc.c" + +#include "world/common/complete/NormalItemChoice.inc.c" + +s32 N(KeyList)[] = { + ITEM_BUBBLE_BERRY, + ITEM_NONE +}; + +EvtScript N(EVS_NpcInteract_BubbleFlower) = { + EVT_IF_EQ(AF_FLO_BigBubbleReady, TRUE) + EVT_SET(AF_FLO_PauseBlowingBubbles, TRUE) + EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0063) + EVT_SET(AF_FLO_PauseBlowingBubbles, FALSE) + EVT_RETURN + EVT_END_IF + EVT_SET(AF_FLO_PauseBlowingBubbles, TRUE) + EVT_IF_EQ(GF_FLO14_GaveBerryToBubblePlant, FALSE) + EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_005F) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0060) + EVT_END_IF + EVT_CALL(FindItem, ITEM_BUBBLE_BERRY, LVar0) + EVT_IF_NE(LVar0, -1) + EVT_CHOOSE_CONSUMABLE_FROM(N(KeyList), 0) + EVT_IF_EQ(LVar0, -1) + EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0064) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0061) + EVT_SET(AF_FLO_BlowingBigBubble, TRUE) + EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE) + EVT_CALL(PlayerMoveTo, 555, 110, 20) + EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE) + EVT_CALL(InterpPlayerYaw, 90, 0) + EVT_CALL(func_802CF56C, 2) + EVT_WAIT(5) + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(1.0), 0, 350, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) + EVT_EXEC(N(EVS_BlowBigBubble)) + EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0062) + EVT_THREAD + EVT_WAIT(40) + EVT_CALL(InterpPlayerYaw, 315, 0) + EVT_END_THREAD + EVT_LABEL(10) + EVT_IF_EQ(AF_FLO_BigBubbleReady, FALSE) + EVT_WAIT(1) + EVT_GOTO(10) + EVT_END_IF + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 5, MSG_CH6_0063) + EVT_SET(GF_FLO14_GaveBerryToBubblePlant, TRUE) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_RideBigBubble)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o154, 1, 0) + EVT_END_IF + EVT_END_IF + EVT_SET(AF_FLO_PauseBlowingBubbles, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_BubbleFlower) = { + EVT_SET(AF_FLO_BlowingBigBubble, FALSE) + EVT_SET(AF_FLO_BigBubbleReady, FALSE) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_BubbleFlower))) + EVT_RETURN + EVT_END +}; + +// uses a dummy bubulb for collision +StaticNpc N(NpcData_BubbleFlower) = { + .id = NPC_BubbleFlower, + .settings = &N(NpcSettings_BubbleFlower), + .pos = { 617.0f, 0.0f, 108.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_4000, + .init = &N(EVS_NpcInit_BubbleFlower), + .drops = BUBULB_DROPS, + .animations = BUBULB_PINK_ANIMS, + .tattle = MSG_NpcTattle_BubblePlant, +}; + +StaticNpc N(NpcData_Bzzap) = { + .id = NPC_Bzzap, + .settings = &N(NpcSettings_Bzzap), + .pos = { -175.0f, 55.0f, 15.0f }, + .yaw = 90, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .drops = BZZAP_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -175, 55, 15 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -175, 55, 15 }, + .detectSize = { 200 }, + } + }, + .animations = BZZAP_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_BubbleFlower)), + NPC_GROUP(N(NpcData_Bzzap), BTL_FLO_FORMATION_19, BTL_FLO_STAGE_00), + {} +}; diff --git a/src/world/area_flo/flo_14/flo_14_5_entity.c b/src/world/area_flo/flo_14/flo_14_5_entity.c new file mode 100644 index 0000000000..4e3f160f74 --- /dev/null +++ b/src/world/area_flo/flo_14/flo_14_5_entity.c @@ -0,0 +1,7 @@ +#include "flo_14.h" + +EvtScript N(EVS_MakeEntities) = { + EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 675, 60, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO14_Item_StarPiece) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_14/flo_14_6_logs.c b/src/world/area_flo/flo_14/flo_14_6_logs.c new file mode 100644 index 0000000000..bc712337ac --- /dev/null +++ b/src/world/area_flo/flo_14/flo_14_6_logs.c @@ -0,0 +1,10 @@ +#include "flo_14.h" + +#include "world/common/atomic/flo_LogBridge.inc.c" + +EvtScript N(EVS_SetupLogBridges) = { + EVT_MAKE_LOG_BRIDGE(COLLIDER_o162, COLLIDER_o166, MODEL_o15, MODEL_o16, MV_RotAngle_Log_01, MV_RotVelocity_Log_01) + EVT_MAKE_LOG_BRIDGE(COLLIDER_o161, COLLIDER_o167, MODEL_o17, MODEL_o18, MV_RotAngle_Log_02, MV_RotVelocity_Log_02) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_15/CD06C0.c b/src/world/area_flo/flo_15/CD06C0.c deleted file mode 100644 index 0540a76b59..0000000000 --- a/src/world/area_flo/flo_15/CD06C0.c +++ /dev/null @@ -1,437 +0,0 @@ -#include "flo_15.h" -#include "message_ids.h" -#include "entity.h" -#include "sprite/npc/Sun.h" - -enum { - NPC_SUN0 = 10, - NPC_SUN1, -}; - -EntryList N(entryList) = { - { 320.0f, 0.0f, 0.0f, 270.0f }, - { -170.0f, 0.0f, 55.0f, 0.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_15 }, -}; - -EvtScript N(80240060) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_11C) = { - 0x00000000, -}; - -EvtScript N(exitWalk_80240120) = EVT_EXIT_WALK(60, 0, "flo_13", 1); - -EvtScript N(8024017C) = { - EVT_BIND_TRIGGER(N(exitWalk_80240120), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_802412C0))) - EVT_EXEC_WAIT(N(makeEntities)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC(N(802404D8)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(8024017C))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 14, 0x7FFFFE00) - EVT_EXEC(N(802413B0)) - EVT_EXEC_WAIT(N(80240060)) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_2FC) = { - 0x00000000, -}; - -NpcSettings N(npcSettings_80240300) = { - .height = 24, - .radius = 24, - .level = 99, -}; - -EvtScript N(8024032C) = { - EVT_IF_LT(GB_StoryProgress, 53) - EVT_SET(LVar3, 7) - EVT_SET(LVar4, 5) - EVT_ELSE - EVT_SET(LVar3, 15) - EVT_SET(LVar4, 1) - EVT_END_IF - EVT_LOOP(0) - EVT_SET(LVar5, LVar3) - EVT_LOOP(LVar5) - EVT_CALL(GetNpcPos, 10, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, 10, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, 11, LVar0, LVar1, LVar2) - EVT_WAIT(LVar4) - EVT_END_LOOP - EVT_SET(LVar5, LVar3) - EVT_LOOP(LVar5) - EVT_CALL(GetNpcPos, 10, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, 10, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, 11, LVar0, LVar1, LVar2) - EVT_WAIT(LVar4) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(802404D8) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcPos, 10, 0, 270, 0) - EVT_CALL(SetNpcPos, 11, 0, -1000, 0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, 10, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 1050) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(10.0), EVT_FLOAT(4.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SetCamDistance, 0, 300) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(15.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(6.5)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, 10, ANIM_Sun_TalkJoy, ANIM_Sun_TalkJoy, 517, MSG_CH6_00C3) - EVT_CALL(SetNpcAnimation, 10, ANIM_Sun_TalkJoy) - EVT_THREAD - EVT_CALL(SetCamDistance, 0, 1000) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcJumpscale, 10, EVT_FLOAT(0.0)) - EVT_CALL(GetNpcPos, 10, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 400) - EVT_CALL(NpcJump0, 10, LVar0, LVar1, LVar2, 40) - EVT_CALL(GotoMap, EVT_PTR("flo_00"), 9) - EVT_WAIT(70) - EVT_RETURN - EVT_END -}; - -EvtScript N(aux_8024079C) = { - EVT_CALL(func_802CDE68, 11, 48) - EVT_LOOP(0) - EVT_CALL(MakeLerp, -30, 30, 20, 11) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, 11, 0, 0, LVar0) - EVT_CALL(GetNpcPos, 10, LVar2, LVar3, LVar4) - EVT_CALL(SetNpcPos, 11, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 30, -30, 20, 11) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, 11, 0, 0, LVar0) - EVT_CALL(GetNpcPos, 10, LVar2, LVar3, LVar4) - EVT_CALL(SetNpcPos, 11, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(8024094C) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 220) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlayerFaceNpc, 10, 0) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, 10, EVT_FLOAT(0.0)) - EVT_CALL(GetNpcPos, 10, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 400) - EVT_CALL(NpcJump0, 10, LVar0, 275, LVar2, 30) - EVT_EXEC_GET_TID(N(8024032C), LVar9) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(AreaFlag(38), 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetNpcFlagBits, 10, ((NPC_FLAG_100)), TRUE) - EVT_CALL(GetNpcPos, 10, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, 10, LVar0, 450, LVar2, 30) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_80240B28) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(50) - EVT_CALL(SpeakToPlayer, 10, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009A) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_Thinking) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_CALL(SpeakToPlayer, 10, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009B) - EVT_SET(GB_StoryProgress, 50) - EVT_CASE_LT(53) - EVT_CALL(SpeakToPlayer, 10, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009C) - EVT_CASE_LT(57) - EVT_IF_EQ(GF_FLO15_SunThankedPlayer, 0) - EVT_CALL(SpeakToPlayer, 10, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009D) - EVT_SET(GF_FLO15_SunThankedPlayer, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, 10, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009E) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, 10, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009F) - EVT_END_SWITCH - EVT_SET(AreaFlag(38), 1) - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80240CD0) = { - EVT_CALL(SetNpcCollisionSize, 10, 64, 40) - EVT_CALL(EnableNpcShadow, 10, FALSE) - EVT_IF_LT(GB_StoryProgress, 53) - EVT_CALL(SetNpcPos, 10, 0, 270, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80240B28))) - EVT_EXEC(N(8024032C)) - EVT_ELSE - EVT_CALL(SetNpcPos, 10, 0, 450, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80240B28))) - EVT_SET(AreaFlag(38), 0) - EVT_EXEC(N(8024094C)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80240DB4) = { - EVT_CALL(EnableNpcShadow, 11, FALSE) - EVT_CALL(SetNpcAnimation, 11, ANIM_Sun_FireIdle) - EVT_CALL(SetNpcPaletteSwapMode, 10, 3) - EVT_CALL(SetNpcPaletteSwapMode, 11, 3) - EVT_CALL(SetNpcPaletteSwapping, 10, 0, 1, 5, 5, 13, 5, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, 11, 0, 1, 5, 5, 13, 5, 0, 0) - EVT_IF_LT(GB_StoryProgress, 53) - EVT_CALL(SetNpcPos, 11, 0, 270, -5) - EVT_ELSE - EVT_CALL(SetNpcPos, 11, 0, 450, -5) - EVT_CALL(BindNpcAux, -1, EVT_PTR(N(aux_8024079C))) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80240EE0)[] = { - { - .id = NPC_SUN0, - .settings = &N(npcSettings_80240300), - .pos = { 0.0f, 250.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_400000, - .init = &N(init_80240CD0), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - }, - .tattle = MSG_NpcTattle_TheSun, - }, - { - .id = NPC_SUN1, - .settings = &N(npcSettings_80240300), - .pos = { 0.0f, 250.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_8000, - .init = &N(init_80240DB4), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - ANIM_Sun_Idle, - }, - .tattle = MSG_NpcTattle_TheSun, - }, -}; - -NpcGroupList N(npcGroupList_802412C0) = { - NPC_GROUP(N(npcGroup_80240EE0)), - {}, -}; - -static s32 N(pad_12D8)[] = { - 0x00000000, 0x00000000, -}; - -EvtScript N(802412E0) = { - EVT_SET(GF_FLO15_BombedRock, 1) - EVT_RETURN - EVT_END -}; - -EvtScript N(makeEntities) = { - EVT_IF_EQ(GF_FLO15_BombedRock, 0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), -180, 0, -18, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(802412E0))) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_135C) = { - 0x00000000, -}; - -s32 N(intTable_80241360)[] = { - 0x0000000A, 0xF24A7CE7, 0x0000000D, 0xF24A7D80, 0x00000010, 0xF24A7E1A, 0x00000013, 0xF24A7EB4, - 0x00000016, 0xF24A7F4D, 0x00000019, 0xF24A7EB4, 0x00000018, 0xF24A7E1A, 0x00000019, 0xF24A7D80, - 0x00000018, 0xF24A7CE7, 0x0000000A, 0xF24A814D, -}; - -EvtScript N(802413B0) = { - EVT_IF_EQ(GF_FLO15_BombedRock, 0) - EVT_LABEL(0) - EVT_IF_EQ(GF_FLO15_BombedRock, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_USE_BUF(EVT_PTR(N(intTable_80241360))) - EVT_LOOP(10) - EVT_BUF_READ2(LVar1, LVar2) - EVT_CALL(ShakeCam, 0, 0, LVar1, LVar2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, 0, -170, 0, 35) - EVT_CALL(SetPanTarget, 0, -170, 0, 35) - EVT_CALL(SetCamDistance, 0, 600) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(25.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamPosA, 0, EVT_FLOAT(-50.0), EVT_FLOAT(25.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(1.5)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(100) - EVT_CALL(PlayEffect, 0x6, 4, -180, 0, -15, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_CALL(PlayEffect, 0x6, 4, -190, 0, -35, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(6) - EVT_CALL(PlaySoundAtCollider, 11, 391, 0) - EVT_WAIT(20) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -50, 120, 2) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, 16, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 12, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, 1, 14, 0x7FFFFE00) - EVT_WAIT(15) - EVT_CALL(ResetCam, 0, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 12, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, 1, 14, 0x7FFFFE00) - EVT_CALL(TranslateGroup, 16, 0, -50, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; diff --git a/src/world/area_flo/flo_15/flo_15.h b/src/world/area_flo/flo_15/flo_15.h index ae359aae0d..8503821fab 100644 --- a/src/world/area_flo/flo_15/flo_15.h +++ b/src/world/area_flo/flo_15/flo_15.h @@ -2,14 +2,25 @@ /// @brief Flower Fields - (NW) Sun Tower #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_15_shape.h" +#include "mapfs/flo_15_hit.h" + +#include "sprite/npc/Sun.h" + +enum { + NPC_Sun_01 = 10, + NPC_Sun_02 = 11, +}; + #define NAMESPACE flo_15 -extern NpcGroupList N(npcGroupList_802412C0); -extern EvtScript N(802404D8); -extern EvtScript N(802413B0); -extern EvtScript N(main); -extern EvtScript N(makeEntities); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_MakeEntities); +extern EvtScript N(EVS_MonitorFallingStairs); +extern EvtScript N(EVS_Scene_SunReturns); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_15/flo_15_0_header.c b/src/world/area_flo/flo_15/flo_15_0_header.c new file mode 100644 index 0000000000..002e99fae7 --- /dev/null +++ b/src/world/area_flo/flo_15/flo_15_0_header.c @@ -0,0 +1,14 @@ +#include "flo_15.h" + +EntryList N(Entrances) = { + [flo_15_ENTRY_0] { 320.0, 0.0, 0.0, 270.0 }, + [flo_15_ENTRY_1] { -170.0, 0.0, 55.0, 0.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_15 }, +}; diff --git a/src/world/area_flo/flo_15/flo_15_1_music.c b/src/world/area_flo/flo_15/flo_15_1_music.c new file mode 100644 index 0000000000..d0d926c184 --- /dev/null +++ b/src/world/area_flo/flo_15/flo_15_1_music.c @@ -0,0 +1,17 @@ +#include "flo_15.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_15_ENTRY_1) + EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + EVT_ELSE + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_15/flo_15_2_main.c b/src/world/area_flo/flo_15/flo_15_2_main.c new file mode 100644 index 0000000000..4dbee813c0 --- /dev/null +++ b/src/world/area_flo/flo_15/flo_15_2_main.c @@ -0,0 +1,31 @@ +#include "flo_15.h" + +EvtScript N(EVS_ExitWalk_flo_13_1) = EVT_EXIT_WALK(60, flo_15_ENTRY_0, "flo_13", flo_13_ENTRY_1); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_15_ENTRY_1) + EVT_EXEC(N(EVS_Scene_SunReturns)) + EVT_ELSE + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_END_IF + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) + EVT_EXEC(N(EVS_MonitorFallingStairs)) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_15/flo_15_3_npc.c b/src/world/area_flo/flo_15/flo_15_3_npc.c new file mode 100644 index 0000000000..fe8f2085f8 --- /dev/null +++ b/src/world/area_flo/flo_15/flo_15_3_npc.c @@ -0,0 +1,228 @@ +#include "flo_15.h" + +#include "world/common/npc/Sun.inc.c" + +EvtScript N(EVS_Sun_AnimateBobbing) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_SET(LVar3, 7) + EVT_SET(LVar4, 5) + EVT_ELSE + EVT_SET(LVar3, 15) + EVT_SET(LVar4, 1) + EVT_END_IF + EVT_LOOP(0) + EVT_SET(LVar5, LVar3) + EVT_LOOP(LVar5) + EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, 1) + EVT_CALL(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + EVT_CALL(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2) + EVT_WAIT(LVar4) + EVT_END_LOOP + EVT_SET(LVar5, LVar3) + EVT_LOOP(LVar5) + EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, -1) + EVT_CALL(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + EVT_CALL(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2) + EVT_WAIT(LVar4) + EVT_END_LOOP + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_SunReturns) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 270, 0) + EVT_CALL(SetNpcPos, NPC_Sun_02, NPC_DISPOSE_LOCATION) + EVT_WAIT(1) + EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 1050) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(4.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-10.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.5)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkJoy, ANIM_Sun_TalkJoy, SPEECH_FLAG_200 | 5, MSG_CH6_00C3) + EVT_CALL(SetNpcAnimation, NPC_Sun_01, ANIM_Sun_TalkJoy) + EVT_THREAD + EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_END_THREAD + EVT_WAIT(15) + EVT_CALL(SetNpcJumpscale, NPC_Sun_01, EVT_FLOAT(0.0)) + EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, 400) + EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, LVar1, LVar2, 40) + EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_9) + EVT_WAIT(70) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcAux_Sun_02) = { + EVT_CALL(func_802CDE68, 11, 48) + EVT_LOOP(0) + EVT_CALL(MakeLerp, -30, 30, 20, EASING_SIN_OUT) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0) + EVT_CALL(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4) + EVT_CALL(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(MakeLerp, 30, -30, 20, EASING_SIN_OUT) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0) + EVT_CALL(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4) + EVT_CALL(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Sun_DescendFromSky) = { + EVT_LOOP(0) + EVT_WAIT(1) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_IF_GT(LVar1, 220) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_THREAD + EVT_WAIT(15) + EVT_CALL(PlayerFaceNpc, NPC_Sun_01, FALSE) + EVT_END_THREAD + EVT_CALL(SetNpcJumpscale, NPC_Sun_01, EVT_FLOAT(0.0)) + EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + EVT_SUB(LVar1, 400) + EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, 275, LVar2, 30) + EVT_EXEC_GET_TID(N(EVS_Sun_AnimateBobbing), LVar9) + EVT_LOOP(0) + EVT_WAIT(1) + EVT_IF_EQ(AF_FLO_MetTheSun, TRUE) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(DisablePlayerInput, TRUE) + EVT_WAIT(10) + EVT_KILL_THREAD(LVar9) + EVT_CALL(SetNpcFlagBits, NPC_Sun_01, NPC_FLAG_100, TRUE) + EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, 450, LVar2, 30) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_UNBIND + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Sun_01) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_SPOKE_WITH_THE_SUN) + EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009A) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_Thinking) + EVT_WAIT(20) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007) + EVT_WAIT(20) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) + EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009B) + EVT_SET(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009C) + EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) + EVT_IF_EQ(GF_FLO15_SunThankedPlayer, FALSE) + EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009D) + EVT_SET(GF_FLO15_SunThankedPlayer, TRUE) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009E) + EVT_END_IF + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009F) + EVT_END_SWITCH + EVT_SET(AF_FLO_MetTheSun, TRUE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Sun_01) = { + EVT_CALL(SetNpcCollisionSize, NPC_Sun_01, 64, 40) + EVT_CALL(EnableNpcShadow, NPC_Sun_01, FALSE) + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 270, 0) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Sun_01))) + EVT_EXEC(N(EVS_Sun_AnimateBobbing)) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 450, 0) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Sun_01))) + EVT_SET(AF_FLO_MetTheSun, FALSE) + EVT_EXEC(N(EVS_Sun_DescendFromSky)) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Sun_02) = { + EVT_CALL(EnableNpcShadow, NPC_Sun_02, FALSE) + EVT_CALL(SetNpcAnimation, NPC_Sun_02, ANIM_Sun_FireIdle) + EVT_CALL(SetNpcPaletteSwapMode, NPC_Sun_01, 3) + EVT_CALL(SetNpcPaletteSwapMode, NPC_Sun_02, 3) + EVT_CALL(SetNpcPaletteSwapping, NPC_Sun_01, 0, 1, 5, 5, 13, 5, 0, 0) + EVT_CALL(SetNpcPaletteSwapping, NPC_Sun_02, 0, 1, 5, 5, 13, 5, 0, 0) + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetNpcPos, NPC_Sun_02, 0, 270, -5) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_Sun_02, 0, 450, -5) + EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Sun_02))) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_Sun)[] = { + { + .id = NPC_Sun_01, + .settings = &N(NpcSettings_Sun), + .pos = { 0.0f, 250.0f, 0.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_400000, + .init = &N(EVS_NpcInit_Sun_01), + .drops = SUN_DROPS, + .animations = SUN_ANIMS, + .tattle = MSG_NpcTattle_TheSun, + }, + { + .id = NPC_Sun_02, + .settings = &N(NpcSettings_Sun), + .pos = { 0.0f, 250.0f, 0.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_8000, + .init = &N(EVS_NpcInit_Sun_02), + .drops = SUN_DROPS, + .animations = SUN_ANIMS, + .tattle = MSG_NpcTattle_TheSun, + }, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Sun)), + {} +}; diff --git a/src/world/area_flo/flo_15/flo_15_4_entity.c b/src/world/area_flo/flo_15/flo_15_4_entity.c new file mode 100644 index 0000000000..2122393158 --- /dev/null +++ b/src/world/area_flo/flo_15/flo_15_4_entity.c @@ -0,0 +1,17 @@ +#include "flo_15.h" +#include "entity.h" + +EvtScript N(EVS_OnBlast_Rock) = { + EVT_SET(GF_FLO15_BombedRock, TRUE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_MakeEntities) = { + EVT_IF_EQ(GF_FLO15_BombedRock, FALSE) + EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), -180, 0, -18, 0, MAKE_ENTITY_END) + EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBlast_Rock))) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_15/flo_15_5_stairs.c b/src/world/area_flo/flo_15/flo_15_5_stairs.c new file mode 100644 index 0000000000..e2c33c258b --- /dev/null +++ b/src/world/area_flo/flo_15/flo_15_5_stairs.c @@ -0,0 +1,72 @@ +#include "flo_15.h" +#include "effects.h" + +s32 N(ShakeCamParams)[] = { + 10, EVT_FLOAT(0.6), + 13, EVT_FLOAT(0.75), + 16, EVT_FLOAT(0.9), + 19, EVT_FLOAT(1.05), + 22, EVT_FLOAT(1.2), + 25, EVT_FLOAT(1.05), + 24, EVT_FLOAT(0.9), + 25, EVT_FLOAT(0.75), + 24, EVT_FLOAT(0.6), + 10, EVT_FLOAT(1.7), +}; + +EvtScript N(EVS_MonitorFallingStairs) = { + EVT_IF_EQ(GF_FLO15_BombedRock, FALSE) + EVT_LABEL(0) + EVT_IF_EQ(GF_FLO15_BombedRock, FALSE) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_END_IF + EVT_CALL(DisablePlayerInput, TRUE) + EVT_THREAD + EVT_USE_BUF(EVT_PTR(N(ShakeCamParams))) + EVT_LOOP(10) + EVT_BUF_READ2(LVar1, LVar2) + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, LVar1, LVar2) + EVT_END_LOOP + EVT_END_THREAD + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -170, 0, 35) + EVT_CALL(SetPanTarget, CAM_DEFAULT, -170, 0, 35) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-9.0)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-50.0), EVT_FLOAT(25.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_THREAD + EVT_WAIT(100) + EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -180, 0, -15, 0) + EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -190, 0, -35, 0) + EVT_END_THREAD + EVT_THREAD + EVT_LOOP(6) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o175, SOUND_187, 0) + EVT_WAIT(20) + EVT_END_LOOP + EVT_END_THREAD + EVT_CALL(MakeLerp, 0, -50, 120, EASING_CUBIC_IN) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(TranslateGroup, MODEL_g20, 0, LVar0, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) + EVT_WAIT(15) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_ELSE + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(TranslateGroup, MODEL_g20, 0, -50, 0) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_16/CD1E30.c b/src/world/area_flo/flo_16/CD1E30.c deleted file mode 100644 index 9e340d7c48..0000000000 --- a/src/world/area_flo/flo_16/CD1E30.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "flo_16.h" -#include "effects.h" - -ApiStatus N(func_80240000_CD1E30)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(1, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_16/CD1E70.c b/src/world/area_flo/flo_16/CD1E70.c deleted file mode 100644 index f489fe7825..0000000000 --- a/src/world/area_flo/flo_16/CD1E70.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "flo_16.h" - -#include "world/common/todo/UnkFunc43.inc.c" diff --git a/src/world/area_flo/flo_16/CD1F10.c b/src/world/area_flo/flo_16/CD1F10.c deleted file mode 100644 index 19e7130b6e..0000000000 --- a/src/world/area_flo/flo_16/CD1F10.c +++ /dev/null @@ -1,300 +0,0 @@ -#include "flo_16.h" -#include "message_ids.h" -#include "entity.h" - -EntryList N(entryList) = { - { -720.0f, 0.0f, 0.0f, 90.0f }, - { 710.0f, 100.0f, 0.0f, 270.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_16 }, -}; - -EvtScript N(802429D0) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_80242A40) = EVT_EXIT_WALK(60, 0, "flo_00", 4); - -EvtScript N(exitWalk_80242A9C) = EVT_EXIT_WALK(60, 1, "flo_17", 0); - -EvtScript N(80242AF8) = { - EVT_BIND_TRIGGER(N(exitWalk_80242A40), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_80242A9C), TRIGGER_FLOOR_ABOVE, 4, 1, 0) - EVT_RETURN - EVT_END -}; - -s32 N(lavaResetList_80242B40)[] = { - 0x0000000A, 0xC39B0000, 0x00000000, 0x00000000, 0x0000000B, 0x43988000, 0x42C80000, 0x00000000, - 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_802444D4))) - EVT_EXEC_WAIT(N(makeEntities)) - EVT_EXEC(N(8024346C)) - EVT_CALL(ModifyColliderFlags, 3, 9, 0x00000002) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(lavaResetList_80242B40))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, 16, 1) - EVT_CALL(EnableTexPanning, 17, 1) - EVT_CALL(EnableTexPanning, 18, 1) - EVT_CALL(EnableTexPanning, 20, 1) - EVT_CALL(EnableTexPanning, 22, 1) - EVT_CALL(EnableTexPanning, 24, 1) - EVT_CALL(EnableTexPanning, 19, 1) - EVT_CALL(EnableTexPanning, 21, 1) - EVT_CALL(EnableTexPanning, 23, 1) - EVT_CALL(EnableTexPanning, 25, 1) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 140) - EVT_IF_GT(LVar0, 65536) - EVT_ADD(LVar0, -65536) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar1, -200) - EVT_IF_LT(LVar1, 0) - EVT_ADD(LVar1, 65536) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_EXEC(N(802451C4)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80242AF8))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(802429D0)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240000_CD1E30)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80242EA0) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024314C) = { - EVT_SET(LVar9, LVar6) - EVT_SET(LVar8, LVar5) - EVT_SET(LVar7, LVar4) - EVT_SET(LVar6, LVar3) - EVT_SET(LVar5, LVar2) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar3, LVar0) - EVT_CALL(EnableModel, LVar6, 0) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkFunc43)) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnableModel, LVar6, 1) - EVT_END_THREAD - EVT_IF_NE(LVarA, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 8) - EVT_CALL(PlayEffect, 0x11, 4, LVar0, LVar1, LVar2, 15, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_SUB(LVar1, 10) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 14, 0) - EVT_END_THREAD - EVT_END_IF - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAt, 0xF8, 0, LVar3, LVar4, LVar5) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 180, 20, 2) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar8, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, LVar9, LVar0, 1, 0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(EnableModel, LVar7, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(8024346C) = { - EVT_CALL(ModifyColliderFlags, 3, 20, 0x00000006) - EVT_SET(LVar0, -740) - EVT_SET(LVar1, -140) - EVT_SET(LVar2, -260) - EVT_SET(LVar3, -55) - EVT_SET(LVar4, 100) - EVT_EXEC(N(80242EA0)) - EVT_SET(LVar0, 250) - EVT_SET(LVar1, -140) - EVT_SET(LVar2, 725) - EVT_SET(LVar3, -55) - EVT_SET(LVar4, 180) - EVT_EXEC(N(80242EA0)) - EVT_CALL(GetModelCenter, 65) - EVT_SET(LVar3, 65) - EVT_SET(LVar4, 66) - EVT_SET(LVar5, 67) - EVT_SET(LVar6, 68) - EVT_SET(LVarA, 0) - EVT_EXEC(N(8024314C)) - EVT_CALL(GetModelCenter, 71) - EVT_SET(LVar3, 71) - EVT_SET(LVar4, 72) - EVT_SET(LVar5, 73) - EVT_SET(LVar6, 74) - EVT_SET(LVarA, 174) - EVT_EXEC(N(8024314C)) - EVT_CALL(GetModelCenter, 79) - EVT_SET(LVar3, 79) - EVT_SET(LVar4, 80) - EVT_SET(LVar5, 81) - EVT_SET(LVar6, 82) - EVT_SET(LVarA, 0) - EVT_EXEC(N(8024314C)) - EVT_CALL(GetModelCenter, 85) - EVT_SET(LVar3, 85) - EVT_SET(LVar4, 86) - EVT_SET(LVar5, 87) - EVT_SET(LVar6, 88) - EVT_SET(LVarA, 0) - EVT_EXEC(N(8024314C)) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_36FC) = { - 0x00000000, -}; - -#define SUPER_BLOCK_MAPVAR MapVar(0) -#define SUPER_BLOCK_GAMEFLAG GF_FLO16_SuperBlock -#include "world/common/entity/SuperBlock.data.inc.c" - -EvtScript N(80243D48) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, 0, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80243DB0) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, 6) - EVT_WAIT(2) - EVT_CALL(GetPlayerPos, LVar7, LVar8, LVar9) - EVT_EXEC_GET_TID(N(80243D48), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, 450, 180, -120, 30) - EVT_CALL(SetPlayerActionState, 0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(80243E80) = { - EVT_IF_EQ(AreaFlag(39), 0) - EVT_CALL(N(UnkFunc44)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(620, 660) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 640, 145, -100, 13, GF_FLO16_Item_StarPiece) - EVT_SET(AreaFlag(39), 1) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(makeEntities) = { - EVT_SET(AreaFlag(39), 0) - EVT_BIND_TRIGGER(N(80243E80), TRIGGER_FLOOR_TOUCH, 20, 1, 0) - EVT_MAKE_SUPER_BLOCK(350, 240, -100, 0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 472, 100, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(80243DB0))) - EVT_RETURN - EVT_END -}; - -#include "world/common/entity/SuperBlock.inc.c" - -#include "world/common/todo/UnkFunc44.inc.c" diff --git a/src/world/area_flo/flo_16/CD2C80.c b/src/world/area_flo/flo_16/CD2C80.c deleted file mode 100644 index cabe65cc2b..0000000000 --- a/src/world/area_flo/flo_16/CD2C80.c +++ /dev/null @@ -1,362 +0,0 @@ -#include "flo_16.h" -#include "sprite.h" -#include "world/partners.h" -#include "sprite/npc/TuffPuff.h" - -enum { - NPC_TUFF_PUFF0, - NPC_TUFF_PUFF1, -}; - -f32 N(FlyingAI_JumpVels)[] = { - 4.5f, 3.5f, 2.6f, 2.0f, - 1.5f, 20.0f, -}; - -MobileAISettings N(npcAISettings_80244028) = { - .moveSpeed = 1.0f, - .moveTime = 45, - .waitTime = 60, - .alertRadius = 100.0f, - .playerSearchInterval = 3, - .chaseSpeed = 3.6f, - .chaseTurnRate= 10, - .chaseUpdateInterval = 1, - .chaseRadius = 120.0f, - .unk_AI_2C = 1, -}; - -EvtScript N(npcAI_80244058) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetSelfVar, 5, 0) - EVT_CALL(SetSelfVar, 6, 0) - EVT_CALL(SetSelfVar, 1, 600) - EVT_CALL(N(FlyingNoAttackAI_Main), EVT_PTR(N(npcAISettings_80244028))) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_802440C8) = { - .height = 24, - .radius = 28, - .ai = &N(npcAI_80244058), - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 19, -}; - -StaticNpc N(npcGroup_802440F4) = { - .id = NPC_TUFF_PUFF0, - .settings = &N(npcSettings_802440C8), - .pos = { 440.0f, 145.0f, 15.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 10, - .itemDrops = { - { ITEM_THUNDER_RAGE, 10, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 2, - }, - .territory = { .temp = { 440, 145, 15, 30, 0, -32767, 0, 485, 145, 55, 225, 95, 1 }}, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_802442E4) = { - .id = NPC_TUFF_PUFF1, - .settings = &N(npcSettings_802440C8), - .pos = { 600.0f, 145.0f, 15.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 10, - .itemDrops = { - { ITEM_THUNDER_RAGE, 10, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 2, - }, - .territory = { .temp = { 600, 145, 15, 30, 0, -32767, 0, 485, 145, 55, 225, 95, 1 }}, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -NpcGroupList N(npcGroupList_802444D4) = { - NPC_GROUP(N(npcGroup_802440F4), 0x1824, 0x05), - NPC_GROUP(N(npcGroup_802442E4), 0x1820, 0x05), - {}, -}; - -static s32 N(pad_44F8)[] = { - 0x00000000, 0x00000000, -}; - -EvtScript N(80244500) = { - EVT_CALL(N(func_80242940_CD4770)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(AreaFlag(41), 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 180) - EVT_SET(AreaFlag(41), 1) - EVT_ELSE - EVT_SET(LVar5, 50) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 180) - EVT_SET(LVar8, 0) - EVT_SET(AreaFlag(41), 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(PlaySound, 0x204D) - EVT_THREAD - EVT_CALL(ShakeCam, 0, 0, 30, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, 0, 0, 5, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar5, LVar6, 30, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, 94, 0, LVar0, 0) - EVT_CALL(TranslateGroup, 97, 0, LVar0, 0) - EVT_CALL(TranslateModel, 108, 0, LVar0, 0) - EVT_CALL(TranslateGroup, 111, 0, LVar0, 0) - EVT_CALL(RotateGroup, 97, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, 111, LVar7, 1, 0, 0) - EVT_CALL(UpdateColliderTransform, 26) - EVT_CALL(UpdateColliderTransform, 27) - EVT_CALL(UpdateColliderTransform, 32) - EVT_CALL(UpdateColliderTransform, 33) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(10) - EVT_CALL(MakeLerp, LVar7, LVar8, 15, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, 94, 0, LVar6, 0) - EVT_CALL(TranslateGroup, 97, 0, LVar6, 0) - EVT_CALL(TranslateModel, 108, 0, LVar6, 0) - EVT_CALL(TranslateGroup, 111, 0, LVar6, 0) - EVT_CALL(RotateGroup, 97, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, 111, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(802448FC) = { - EVT_CALL(N(func_80242940_CD4770)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(AreaFlag(42), 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 180) - EVT_SET(AreaFlag(42), 1) - EVT_ELSE - EVT_SET(LVar5, 50) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 180) - EVT_SET(LVar8, 0) - EVT_SET(AreaFlag(42), 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(PlaySound, 0x204D) - EVT_THREAD - EVT_CALL(ShakeCam, 0, 0, 30, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, 0, 0, 5, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar5, LVar6, 30, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, 101, 0, LVar0, 0) - EVT_CALL(TranslateGroup, 104, 0, LVar0, 0) - EVT_CALL(TranslateModel, 115, 0, LVar0, 0) - EVT_CALL(TranslateGroup, 118, 0, LVar0, 0) - EVT_CALL(TranslateModel, 129, 0, LVar0, 0) - EVT_CALL(TranslateGroup, 132, 0, LVar0, 0) - EVT_CALL(RotateGroup, 104, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, 118, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, 132, LVar7, 1, 0, 0) - EVT_CALL(UpdateColliderTransform, 29) - EVT_CALL(UpdateColliderTransform, 30) - EVT_CALL(UpdateColliderTransform, 35) - EVT_CALL(UpdateColliderTransform, 36) - EVT_CALL(UpdateColliderTransform, 41) - EVT_CALL(UpdateColliderTransform, 42) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(10) - EVT_CALL(MakeLerp, LVar7, LVar8, 15, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, 101, 0, LVar6, 0) - EVT_CALL(TranslateGroup, 104, 0, LVar6, 0) - EVT_CALL(TranslateModel, 115, 0, LVar6, 0) - EVT_CALL(TranslateGroup, 118, 0, LVar6, 0) - EVT_CALL(TranslateModel, 129, 0, LVar6, 0) - EVT_CALL(TranslateGroup, 132, 0, LVar6, 0) - EVT_CALL(RotateGroup, 104, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, 118, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, 132, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(80244DC8) = { - EVT_CALL(N(func_80242940_CD4770)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(AreaFlag(43), 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, -50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 180) - EVT_SET(AreaFlag(43), 1) - EVT_ELSE - EVT_SET(LVar5, -50) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 180) - EVT_SET(LVar8, 0) - EVT_SET(AreaFlag(43), 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(PlaySound, 0x204D) - EVT_THREAD - EVT_CALL(ShakeCam, 0, 0, 30, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, 0, 0, 5, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar5, LVar6, 30, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, 122, 0, LVar0, 0) - EVT_CALL(TranslateGroup, 125, 0, LVar0, 0) - EVT_CALL(TranslateModel, 136, 0, LVar0, 0) - EVT_CALL(TranslateGroup, 139, 0, LVar0, 0) - EVT_CALL(RotateGroup, 125, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, 139, LVar7, 1, 0, 0) - EVT_CALL(UpdateColliderTransform, 38) - EVT_CALL(UpdateColliderTransform, 39) - EVT_CALL(UpdateColliderTransform, 44) - EVT_CALL(UpdateColliderTransform, 45) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(10) - EVT_CALL(MakeLerp, LVar7, LVar8, 15, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, 122, 0, LVar6, 0) - EVT_CALL(TranslateGroup, 125, 0, LVar6, 0) - EVT_CALL(TranslateModel, 136, 0, LVar6, 0) - EVT_CALL(TranslateGroup, 139, 0, LVar6, 0) - EVT_CALL(RotateGroup, 125, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, 139, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(802451C4) = { - EVT_SET(AreaFlag(41), 0) - EVT_SET(AreaFlag(42), 0) - EVT_SET(AreaFlag(43), 0) - EVT_CALL(ParentColliderToModel, 26, 94) - EVT_CALL(ParentColliderToModel, 27, 94) - EVT_CALL(ParentColliderToModel, 29, 101) - EVT_CALL(ParentColliderToModel, 30, 101) - EVT_CALL(ParentColliderToModel, 32, 108) - EVT_CALL(ParentColliderToModel, 33, 108) - EVT_CALL(ParentColliderToModel, 35, 115) - EVT_CALL(ParentColliderToModel, 36, 115) - EVT_CALL(ParentColliderToModel, 38, 122) - EVT_CALL(ParentColliderToModel, 39, 122) - EVT_CALL(ParentColliderToModel, 41, 129) - EVT_CALL(ParentColliderToModel, 42, 129) - EVT_CALL(ParentColliderToModel, 44, 136) - EVT_CALL(ParentColliderToModel, 45, 136) - EVT_BIND_TRIGGER(N(80244500), TRIGGER_FLOOR_TOUCH, 26, 1, 0) - EVT_BIND_TRIGGER(N(802448FC), TRIGGER_FLOOR_TOUCH, 29, 1, 0) - EVT_BIND_TRIGGER(N(80244500), TRIGGER_FLOOR_TOUCH, 32, 1, 0) - EVT_BIND_TRIGGER(N(802448FC), TRIGGER_FLOOR_TOUCH, 35, 1, 0) - EVT_BIND_TRIGGER(N(80244DC8), TRIGGER_FLOOR_TOUCH, 38, 1, 0) - EVT_BIND_TRIGGER(N(802448FC), TRIGGER_FLOOR_TOUCH, 41, 1, 0) - EVT_BIND_TRIGGER(N(80244DC8), TRIGGER_FLOOR_TOUCH, 44, 1, 0) - EVT_RETURN - EVT_END -}; - -#include "world/common/enemy/ai/FlyingAI.inc.c" - -#include "world/common/enemy/ai/FlyingNoAttackAI.inc.c" diff --git a/src/world/area_flo/flo_16/CD4770.c b/src/world/area_flo/flo_16/CD4770.c deleted file mode 100644 index e2436552ec..0000000000 --- a/src/world/area_flo/flo_16/CD4770.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "flo_16.h" - -ApiStatus N(func_80242940_CD4770)(Evt* script, s32 isInitialCall) { - script->varTable[0] = 0; - do {} while (0); - if (gPlayerStatus.actionState == ACTION_STATE_SPIN_POUND || gPlayerStatus.actionState == ACTION_STATE_TORNADO_POUND) { - script->varTable[0] = 1; - } - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_16/flo_16.h b/src/world/area_flo/flo_16/flo_16.h index b708dcc721..8b6ccd69a1 100644 --- a/src/world/area_flo/flo_16/flo_16.h +++ b/src/world/area_flo/flo_16/flo_16.h @@ -2,21 +2,30 @@ /// @brief Flower Fields - (NE) Elevators #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_16_shape.h" +#include "mapfs/flo_16_hit.h" + +#include "sprite/npc/TuffPuff.h" + +enum { + NPC_TuffPuff_01 = 0, + NPC_TuffPuff_02 = 1, +}; + +enum { + MV_SuperBlock = MapVar(0), +}; + #define NAMESPACE flo_16 -ApiStatus N(UnkFunc43)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240000_CD1E30)(Evt* script, s32 isInitialCall); -ApiStatus N(UnkFunc44)(Evt* script, s32 isInitialCall); -ApiStatus N(FlyingNoAttackAI_Main)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80242940_CD4770)(Evt* script, s32 isInitialCall); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_SetupVines); +extern EvtScript N(EVS_SetupPillarPuzzle); +extern EvtScript N(EVS_MakeEntities); -extern NpcGroupList N(npcGroupList_802444D4); -extern EvtScript N(8024346C); -extern EvtScript N(802451C4); -extern EvtScript N(main); -extern EvtScript N(makeEntities); -extern EvtScript N(unkFunc23); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_16/flo_16_0_header.c b/src/world/area_flo/flo_16/flo_16_0_header.c new file mode 100644 index 0000000000..043f97c0b0 --- /dev/null +++ b/src/world/area_flo/flo_16/flo_16_0_header.c @@ -0,0 +1,14 @@ +#include "flo_16.h" + +EntryList N(Entrances) = { + [flo_16_ENTRY_0] { -720.0, 0.0, 0.0, 90.0 }, + [flo_16_ENTRY_1] { 710.0, 100.0, 0.0, 270.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_16 }, +}; diff --git a/src/world/area_flo/flo_16/flo_16_1_music.c b/src/world/area_flo/flo_16/flo_16_1_music.c new file mode 100644 index 0000000000..720dbd0fab --- /dev/null +++ b/src/world/area_flo/flo_16/flo_16_1_music.c @@ -0,0 +1,12 @@ +#include "flo_16.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_16/flo_16_2_main.c b/src/world/area_flo/flo_16/flo_16_2_main.c new file mode 100644 index 0000000000..4666ff1eaa --- /dev/null +++ b/src/world/area_flo/flo_16/flo_16_2_main.c @@ -0,0 +1,74 @@ +#include "flo_16.h" +#include "effects.h" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_00_4) = EVT_EXIT_WALK(60, flo_16_ENTRY_0, "flo_00", flo_00_ENTRY_4); +EvtScript N(EVS_ExitWalk_flo_17_0) = EVT_EXIT_WALK(60, flo_16_ENTRY_1, "flo_17", flo_17_ENTRY_0); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +LavaReset N(SafeFloorColliders)[] = { + { .colliderID = COLLIDER_o190, .pos = { -310.0, 0.0, 0.0 }}, + { .colliderID = COLLIDER_o191, .pos = { 305.0, 100.0, 0.0 }}, + { .colliderID = -1 } +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_EXEC(N(EVS_SetupVines)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o174, SURFACE_TYPE_SPIKES) + EVT_THREAD + EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) + EVT_END_THREAD + EVT_CALL(EnableTexPanning, MODEL_o59, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o142, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o58, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o136, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o146, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o143, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o135, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o138, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o139, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o140, TRUE) + EVT_THREAD + EVT_SET(LVar0, 0) + EVT_SET(LVar1, 0) + EVT_LABEL(0) + EVT_ADD(LVar0, 140) + EVT_IF_GT(LVar0, 0x10000) + EVT_ADD(LVar0, -0x10000) + EVT_END_IF + EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0) + EVT_ADD(LVar1, -200) + EVT_IF_LT(LVar1, 0) + EVT_ADD(LVar1, 0x10000) + EVT_END_IF + EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_END_THREAD + EVT_EXEC(N(EVS_SetupPillarPuzzle)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_16/flo_16_3_vines.c b/src/world/area_flo/flo_16/flo_16_3_vines.c new file mode 100644 index 0000000000..27bc068d4a --- /dev/null +++ b/src/world/area_flo/flo_16/flo_16_3_vines.c @@ -0,0 +1,17 @@ +#include "flo_16.h" +#include "entity.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" +#include "world/common/atomic/flo_DroppingVine.inc.c" + +EvtScript N(EVS_SetupVines) = { + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o214, SURFACE_TYPE_FLOWERS) + EVT_FLOWER_SPAWN_REGION( -740, -140, -260, -55, 100) + EVT_FLOWER_SPAWN_REGION( 250, -140, 725, -55, 180) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o199, MODEL_o200, MODEL_o201, MODEL_o202) + EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o203, MODEL_o204, MODEL_o205, MODEL_o206) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o209, MODEL_o210, MODEL_o211, MODEL_o212) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o213, MODEL_o214, MODEL_o215, MODEL_o216) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_16/flo_16_4_entity.c b/src/world/area_flo/flo_16/flo_16_4_entity.c new file mode 100644 index 0000000000..bec720effa --- /dev/null +++ b/src/world/area_flo/flo_16/flo_16_4_entity.c @@ -0,0 +1,68 @@ +#include "flo_16.h" +#include "entity.h" + +#define SUPER_BLOCK_MAPVAR MV_SuperBlock +#define SUPER_BLOCK_GAMEFLAG GF_FLO16_SuperBlock +#include "world/common/entity/SuperBlock.inc.c" +#include "world/common/entity/SuperBlock.data.inc.c" + +EvtScript N(EVS_TetherCameraToPlayer) = { + EVT_LABEL(0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_UseSpring) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) + EVT_WAIT(2) + EVT_CALL(GetPlayerPos, LVar7, LVar8, LVar9) + EVT_EXEC_GET_TID(N(EVS_TetherCameraToPlayer), LVarA) + EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) + EVT_CALL(PlayerJump, 450, 180, -120, 30) + EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) + EVT_CALL(DisablePlayerPhysics, FALSE) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +API_CALLABLE(N(UnkFunc44)) { + script->varTable[0] = FALSE; + if (gPlayerStatus.actionState == ACTION_STATE_SPIN_POUND || gPlayerStatus.actionState == ACTION_STATE_TORNADO_POUND) { + script->varTable[0] = TRUE; + } + return ApiStatus_DONE2; +} + +EvtScript N(EVS_MonitorCeilingPound) = { + EVT_IF_EQ(AF_FLO16_FoundHiddenStarPiece, FALSE) + EVT_CALL(N(UnkFunc44)) + EVT_IF_EQ(LVar0, 0) + EVT_RETURN + EVT_END_IF + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_SWITCH(LVar0) + EVT_CASE_RANGE(620, 660) + EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 640, 145, -100, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO16_Item_StarPiece) + EVT_SET(AF_FLO16_FoundHiddenStarPiece, TRUE) + EVT_END_SWITCH + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_MakeEntities) = { + EVT_SET(AF_FLO16_FoundHiddenStarPiece, FALSE) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_MonitorCeilingPound)), TRIGGER_FLOOR_TOUCH, COLLIDER_o214, 1, 0) + EVT_MAKE_SUPER_BLOCK(350, 240, -100, 0) + EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 472, 100, -100, 0, MAKE_ENTITY_END) + EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_16/flo_16_5_npc.c b/src/world/area_flo/flo_16/flo_16_5_npc.c new file mode 100644 index 0000000000..5ca163299d --- /dev/null +++ b/src/world/area_flo/flo_16/flo_16_5_npc.c @@ -0,0 +1,56 @@ +#include "flo_16.h" +#include "entity.h" + +#include "world/common/enemy/complete/TuffPuff.inc.c" + +StaticNpc N(NpcData_TuffPuff_01) = { + .id = NPC_TuffPuff_01, + .settings = &N(NpcSettings_TuffPuff), + .pos = { 440.0f, 145.0f, 15.0f }, + .yaw = 90, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .drops = TUFF_PUFF_DROPS, + .territory = { + .wander = { + .isFlying = FALSE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 440, 145, 15 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_RECT, + .detectPos = { 485, 145, 55 }, + .detectSize = { 225, 95 }, + } + }, + .animations = TUFF_PUFF_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_TuffPuff_02) = { + .id = NPC_TuffPuff_02, + .settings = &N(NpcSettings_TuffPuff), + .pos = { 600.0f, 145.0f, 15.0f }, + .yaw = 270, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .drops = TUFF_PUFF_DROPS, + .territory = { + .wander = { + .isFlying = FALSE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 600, 145, 15 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_RECT, + .detectPos = { 485, 145, 55 }, + .detectSize = { 225, 95 }, + } + }, + .animations = TUFF_PUFF_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_TuffPuff_01), BTL_FLO_FORMATION_24, BTL_FLO_STAGE_05), + NPC_GROUP(N(NpcData_TuffPuff_02), BTL_FLO_FORMATION_20, BTL_FLO_STAGE_05), + {} +}; diff --git a/src/world/area_flo/flo_16/flo_16_6_puzzle.c b/src/world/area_flo/flo_16/flo_16_6_puzzle.c new file mode 100644 index 0000000000..078e4cb9f7 --- /dev/null +++ b/src/world/area_flo/flo_16/flo_16_6_puzzle.c @@ -0,0 +1,235 @@ +#include "flo_16.h" + +API_CALLABLE(N(CheckForPoundInput)) { + script->varTable[0] = FALSE; + if (gPlayerStatus.actionState == ACTION_STATE_SPIN_POUND || gPlayerStatus.actionState == ACTION_STATE_TORNADO_POUND) { + script->varTable[0] = TRUE; + } + return ApiStatus_DONE2; +} + +EvtScript N(EVS_OnTouch_RedPillar) = { + EVT_CALL(N(CheckForPoundInput)) + EVT_IF_EQ(LVar0, FALSE) + EVT_RETURN + EVT_END_IF + EVT_CALL(DisablePlayerInput, TRUE) + EVT_IF_EQ(AF_FLO_RaisedRedPillar, FALSE) + EVT_SET(LVar5, 0) + EVT_SET(LVar6, 50) + EVT_SET(LVar7, 0) + EVT_SET(LVar8, 180) + EVT_SET(AF_FLO_RaisedRedPillar, TRUE) + EVT_ELSE + EVT_SET(LVar5, 50) + EVT_SET(LVar6, 0) + EVT_SET(LVar7, 180) + EVT_SET(LVar8, 0) + EVT_SET(AF_FLO_RaisedRedPillar, FALSE) + EVT_END_IF + EVT_WAIT(15) + EVT_CALL(PlaySound, SOUND_204D) + EVT_THREAD + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8)) + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2)) + EVT_END_THREAD + EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(TranslateModel, MODEL_g81, 0, LVar0, 0) + EVT_CALL(TranslateGroup, MODEL_g82, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_g85, 0, LVar0, 0) + EVT_CALL(TranslateGroup, MODEL_g86, 0, LVar0, 0) + EVT_CALL(RotateGroup, MODEL_g82, LVar7, 1, 0, 0) + EVT_CALL(RotateGroup, MODEL_g86, LVar7, 1, 0, 0) + EVT_CALL(UpdateColliderTransform, COLLIDER_o242) + EVT_CALL(UpdateColliderTransform, COLLIDER_o250) + EVT_CALL(UpdateColliderTransform, COLLIDER_o244) + EVT_CALL(UpdateColliderTransform, COLLIDER_o252) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(DisablePlayerInput, FALSE) + EVT_WAIT(10) + EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(TranslateModel, MODEL_g81, 0, LVar6, 0) + EVT_CALL(TranslateGroup, MODEL_g82, 0, LVar6, 0) + EVT_CALL(TranslateModel, MODEL_g85, 0, LVar6, 0) + EVT_CALL(TranslateGroup, MODEL_g86, 0, LVar6, 0) + EVT_CALL(RotateGroup, MODEL_g82, LVar0, 1, 0, 0) + EVT_CALL(RotateGroup, MODEL_g86, LVar0, 1, 0, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_OnTouch_GreenPillar) = { + EVT_CALL(N(CheckForPoundInput)) + EVT_IF_EQ(LVar0, FALSE) + EVT_RETURN + EVT_END_IF + EVT_CALL(DisablePlayerInput, TRUE) + EVT_IF_EQ(AF_FLO_RaisedGreenPillar, FALSE) + EVT_SET(LVar5, 0) + EVT_SET(LVar6, 50) + EVT_SET(LVar7, 0) + EVT_SET(LVar8, 180) + EVT_SET(AF_FLO_RaisedGreenPillar, TRUE) + EVT_ELSE + EVT_SET(LVar5, 50) + EVT_SET(LVar6, 0) + EVT_SET(LVar7, 180) + EVT_SET(LVar8, 0) + EVT_SET(AF_FLO_RaisedGreenPillar, FALSE) + EVT_END_IF + EVT_WAIT(15) + EVT_CALL(PlaySound, SOUND_204D) + EVT_THREAD + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8)) + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2)) + EVT_END_THREAD + EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(TranslateModel, MODEL_g83, 0, LVar0, 0) + EVT_CALL(TranslateGroup, MODEL_g84, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_g87, 0, LVar0, 0) + EVT_CALL(TranslateGroup, MODEL_g88, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_g91, 0, LVar0, 0) + EVT_CALL(TranslateGroup, MODEL_g92, 0, LVar0, 0) + EVT_CALL(RotateGroup, MODEL_g84, LVar7, 1, 0, 0) + EVT_CALL(RotateGroup, MODEL_g88, LVar7, 1, 0, 0) + EVT_CALL(RotateGroup, MODEL_g92, LVar7, 1, 0, 0) + EVT_CALL(UpdateColliderTransform, COLLIDER_o243) + EVT_CALL(UpdateColliderTransform, COLLIDER_o251) + EVT_CALL(UpdateColliderTransform, COLLIDER_o245) + EVT_CALL(UpdateColliderTransform, COLLIDER_o253) + EVT_CALL(UpdateColliderTransform, COLLIDER_o247) + EVT_CALL(UpdateColliderTransform, COLLIDER_o255) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(DisablePlayerInput, FALSE) + EVT_WAIT(10) + EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(TranslateModel, MODEL_g83, 0, LVar6, 0) + EVT_CALL(TranslateGroup, MODEL_g84, 0, LVar6, 0) + EVT_CALL(TranslateModel, MODEL_g87, 0, LVar6, 0) + EVT_CALL(TranslateGroup, MODEL_g88, 0, LVar6, 0) + EVT_CALL(TranslateModel, MODEL_g91, 0, LVar6, 0) + EVT_CALL(TranslateGroup, MODEL_g92, 0, LVar6, 0) + EVT_CALL(RotateGroup, MODEL_g84, LVar0, 1, 0, 0) + EVT_CALL(RotateGroup, MODEL_g88, LVar0, 1, 0, 0) + EVT_CALL(RotateGroup, MODEL_g92, LVar0, 1, 0, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_OnTouch_PurplePillar) = { + EVT_CALL(N(CheckForPoundInput)) + EVT_IF_EQ(LVar0, FALSE) + EVT_RETURN + EVT_END_IF + EVT_CALL(DisablePlayerInput, TRUE) + EVT_IF_EQ(AF_FLO_LoweredPurplePillar, FALSE) + EVT_SET(LVar5, 0) + EVT_SET(LVar6, -50) + EVT_SET(LVar7, 0) + EVT_SET(LVar8, 180) + EVT_SET(AF_FLO_LoweredPurplePillar, TRUE) + EVT_ELSE + EVT_SET(LVar5, -50) + EVT_SET(LVar6, 0) + EVT_SET(LVar7, 180) + EVT_SET(LVar8, 0) + EVT_SET(AF_FLO_LoweredPurplePillar, FALSE) + EVT_END_IF + EVT_WAIT(15) + EVT_CALL(PlaySound, SOUND_204D) + EVT_THREAD + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8)) + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2)) + EVT_END_THREAD + EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(TranslateModel, MODEL_g89, 0, LVar0, 0) + EVT_CALL(TranslateGroup, MODEL_g90, 0, LVar0, 0) + EVT_CALL(TranslateModel, MODEL_g93, 0, LVar0, 0) + EVT_CALL(TranslateGroup, MODEL_g94, 0, LVar0, 0) + EVT_CALL(RotateGroup, MODEL_g90, LVar7, 1, 0, 0) + EVT_CALL(RotateGroup, MODEL_g94, LVar7, 1, 0, 0) + EVT_CALL(UpdateColliderTransform, COLLIDER_o246) + EVT_CALL(UpdateColliderTransform, COLLIDER_o254) + EVT_CALL(UpdateColliderTransform, COLLIDER_o248) + EVT_CALL(UpdateColliderTransform, COLLIDER_o256) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(DisablePlayerInput, FALSE) + EVT_WAIT(10) + EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(TranslateModel, MODEL_g89, 0, LVar6, 0) + EVT_CALL(TranslateGroup, MODEL_g90, 0, LVar6, 0) + EVT_CALL(TranslateModel, MODEL_g93, 0, LVar6, 0) + EVT_CALL(TranslateGroup, MODEL_g94, 0, LVar6, 0) + EVT_CALL(RotateGroup, MODEL_g90, LVar0, 1, 0, 0) + EVT_CALL(RotateGroup, MODEL_g94, LVar0, 1, 0, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupPillarPuzzle) = { + EVT_SET(AF_FLO_RaisedRedPillar, FALSE) + EVT_SET(AF_FLO_RaisedGreenPillar, FALSE) + EVT_SET(AF_FLO_LoweredPurplePillar, FALSE) + EVT_CALL(ParentColliderToModel, COLLIDER_o242, MODEL_g81) + EVT_CALL(ParentColliderToModel, COLLIDER_o250, MODEL_g81) + EVT_CALL(ParentColliderToModel, COLLIDER_o243, MODEL_g83) + EVT_CALL(ParentColliderToModel, COLLIDER_o251, MODEL_g83) + EVT_CALL(ParentColliderToModel, COLLIDER_o244, MODEL_g85) + EVT_CALL(ParentColliderToModel, COLLIDER_o252, MODEL_g85) + EVT_CALL(ParentColliderToModel, COLLIDER_o245, MODEL_g87) + EVT_CALL(ParentColliderToModel, COLLIDER_o253, MODEL_g87) + EVT_CALL(ParentColliderToModel, COLLIDER_o246, MODEL_g89) + EVT_CALL(ParentColliderToModel, COLLIDER_o254, MODEL_g89) + EVT_CALL(ParentColliderToModel, COLLIDER_o247, MODEL_g91) + EVT_CALL(ParentColliderToModel, COLLIDER_o255, MODEL_g91) + EVT_CALL(ParentColliderToModel, COLLIDER_o248, MODEL_g93) + EVT_CALL(ParentColliderToModel, COLLIDER_o256, MODEL_g93) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o242, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o243, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o244, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o245, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o246, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o247, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o248, 1, 0) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_17/CD72E0.c b/src/world/area_flo/flo_17/CD72E0.c deleted file mode 100644 index 34a7f8667b..0000000000 --- a/src/world/area_flo/flo_17/CD72E0.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "flo_17.h" -#include "effects.h" - -ApiStatus N(func_80240000_CD72E0)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(1, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_17/CD7320.c b/src/world/area_flo/flo_17/CD7320.c deleted file mode 100644 index 36340795c4..0000000000 --- a/src/world/area_flo/flo_17/CD7320.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "flo_17.h" - -ApiStatus N(func_80240040_CD7320)(Evt* script, s32 isInitialCall) { - CollisionStatus* collisionStatus = &gCollisionStatus; - - evt_set_variable(script, *script->ptrReadPos, collisionStatus->floorBelow); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_17/CD7350.c b/src/world/area_flo/flo_17/CD7350.c deleted file mode 100644 index 75dec0b417..0000000000 --- a/src/world/area_flo/flo_17/CD7350.c +++ /dev/null @@ -1,644 +0,0 @@ -#include "flo_17.h" -#include "message_ids.h" -#include "entity.h" -#include "sprite/npc/Lakitu.h" -#include "sprite/npc/Spiny.h" - -enum { - NPC_LAKITU0, - NPC_LAKITU1, - NPC_SPINY0 = 50, - NPC_SPINY1, - NPC_SPINY2, - NPC_SPINY3, -}; - -EntryList N(entryList) = { - { -730.0f, 0.0f, 0.0f, 90.0f }, - { 730.0f, 0.0f, 0.0f, 270.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_17 }, -}; - -EvtScript N(80243280) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(802432F0) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_8024359C) = EVT_EXIT_WALK(60, 0, "flo_16", 1); - -EvtScript N(exitWalk_802435F8) = EVT_EXIT_WALK(60, 1, "flo_18", 0); - -EvtScript N(80243654) = { - EVT_BIND_TRIGGER(N(exitWalk_8024359C), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_802435F8), TRIGGER_FLOOR_ABOVE, 4, 1, 0) - EVT_RETURN - EVT_END -}; - -s32 N(lavaResetList_8024369C)[] = { - 0x0000000F, 0xC4048000, 0x00000000, 0xC2DC0000, 0x00000011, 0xC4070000, 0x00000000, 0xC2480000, - 0x00000010, 0xC4048000, 0x00000000, 0x42A00000, 0x00000014, 0xC3870000, 0x00000000, 0xC2F00000, - 0x00000013, 0xC3870000, 0x00000000, 0xC2F00000, 0x00000012, 0xC3870000, 0x00000000, 0x420C0000, - 0x00000017, 0xC3020000, 0x00000000, 0xC2480000, 0x00000016, 0xC3020000, 0x00000000, 0xC2480000, - 0x00000015, 0xC30C0000, 0x00000000, 0x42960000, 0x0000001B, 0x42F00000, 0x00000000, 0xC2480000, - 0x0000001A, 0x42F00000, 0x00000000, 0xC2480000, 0x00000018, 0x43020000, 0x00000000, 0x42700000, - 0x00000019, 0x42F00000, 0x00000000, 0x42F00000, 0x0000001F, 0x438C0000, 0x00000000, 0xC2DC0000, - 0x0000001E, 0x438C0000, 0x00000000, 0xC2DC0000, 0x0000001D, 0x43870000, 0x00000000, 0xC2480000, - 0x0000001C, 0x438C0000, 0x00000000, 0x42480000, 0x00000021, 0x44034000, 0x00000000, 0xC28C0000, - 0x00000020, 0x44034000, 0x00000000, 0x42480000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80245228))) - EVT_EXEC_WAIT(N(makeEntities)) - EVT_EXEC(N(80244284)) - EVT_CALL(ModifyColliderFlags, 3, 15, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 16, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 20, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 23, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 25, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 27, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 28, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 31, 0x00000006) - EVT_CALL(ModifyColliderFlags, 3, 32, 0x00000006) - EVT_SET(LVar0, -736) - EVT_SET(LVar1, -137) - EVT_SET(LVar2, -522) - EVT_SET(LVar3, -118) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802432F0)) - EVT_SET(LVar0, -728) - EVT_SET(LVar1, 76) - EVT_SET(LVar2, -496) - EVT_SET(LVar3, 137) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802432F0)) - EVT_SET(LVar0, -160) - EVT_SET(LVar1, -117) - EVT_SET(LVar2, -92) - EVT_SET(LVar3, -54) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802432F0)) - EVT_SET(LVar0, 76) - EVT_SET(LVar1, -124) - EVT_SET(LVar2, 150) - EVT_SET(LVar3, -55) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802432F0)) - EVT_SET(LVar0, 192) - EVT_SET(LVar1, 60) - EVT_SET(LVar2, 309) - EVT_SET(LVar3, 133) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802432F0)) - EVT_SET(LVar0, 488) - EVT_SET(LVar1, 46) - EVT_SET(LVar2, 733) - EVT_SET(LVar3, 137) - EVT_SET(LVar4, 0) - EVT_EXEC(N(802432F0)) - EVT_CALL(ModifyColliderFlags, 3, 9, 0x00000002) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(lavaResetList_8024369C))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, 30, 1) - EVT_CALL(EnableTexPanning, 32, 1) - EVT_CALL(EnableTexPanning, 33, 1) - EVT_CALL(EnableTexPanning, 36, 1) - EVT_CALL(EnableTexPanning, 37, 1) - EVT_CALL(EnableTexPanning, 40, 1) - EVT_CALL(EnableTexPanning, 42, 1) - EVT_CALL(EnableTexPanning, 44, 1) - EVT_CALL(EnableTexPanning, 45, 1) - EVT_CALL(EnableTexPanning, 48, 1) - EVT_CALL(EnableTexPanning, 49, 1) - EVT_CALL(EnableTexPanning, 52, 1) - EVT_CALL(EnableTexPanning, 54, 1) - EVT_CALL(EnableTexPanning, 56, 1) - EVT_CALL(EnableTexPanning, 57, 1) - EVT_CALL(EnableTexPanning, 60, 1) - EVT_CALL(EnableTexPanning, 61, 1) - EVT_CALL(EnableTexPanning, 64, 1) - EVT_CALL(EnableTexPanning, 31, 1) - EVT_CALL(EnableTexPanning, 34, 1) - EVT_CALL(EnableTexPanning, 35, 1) - EVT_CALL(EnableTexPanning, 38, 1) - EVT_CALL(EnableTexPanning, 39, 1) - EVT_CALL(EnableTexPanning, 43, 1) - EVT_CALL(EnableTexPanning, 46, 1) - EVT_CALL(EnableTexPanning, 47, 1) - EVT_CALL(EnableTexPanning, 50, 1) - EVT_CALL(EnableTexPanning, 51, 1) - EVT_CALL(EnableTexPanning, 55, 1) - EVT_CALL(EnableTexPanning, 58, 1) - EVT_CALL(EnableTexPanning, 59, 1) - EVT_CALL(EnableTexPanning, 62, 1) - EVT_CALL(EnableTexPanning, 63, 1) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 140) - EVT_IF_GT(LVar0, 65536) - EVT_ADD(LVar0, -65536) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar1, -200) - EVT_IF_LT(LVar1, 0) - EVT_ADD(LVar1, 65536) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80243654))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(80243280)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240000_CD72E0)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_3FCC) = { - 0x00000000, -}; - -EvtScript N(80243FD0) = { - EVT_LOOP(0) - EVT_CALL(N(func_80240040_CD7320), LVar0) - EVT_IF_EQ(LVar0, LVar4) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_NE(LVar0, 23) - EVT_IF_EQ(LVar8, 0) - EVT_THREAD - EVT_CALL(GetModelCenter, LVar5) - EVT_CALL(PlaySoundAt, 0x1DB, 4194304, LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_END_IF - EVT_IF_LT(LVar7, 90) - EVT_IF_EQ(LVar7, 0) - EVT_WAIT(5) - EVT_SET(LVar8, 6) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar9, 0x7FFFFE00) - EVT_END_IF - EVT_ADD(LVar8, 1) - EVT_ADD(LVar7, LVar8) - EVT_END_IF - EVT_GOTO(50) - EVT_END_IF - EVT_END_IF - EVT_IF_NE(LVar7, 0) - EVT_SUB(LVar8, 1) - EVT_ADD(LVar7, LVar8) - EVT_IF_LE(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar7, 0) - EVT_THREAD - EVT_CALL(GetModelCenter, LVar5) - EVT_CALL(PlaySoundAt, 0x1DC, 0, LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, 1, LVar9, 0x7FFFFE00) - EVT_END_IF - EVT_END_IF - EVT_LABEL(50) - EVT_IF_GE(LVar7, 90) - EVT_SET(LVar8, -1) - EVT_SET(LVar7, 90) - EVT_END_IF - EVT_CALL(RotateModel, LVar5, LVar7, -1, 0, 0) - EVT_CALL(RotateModel, LVar6, LVar7, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(80244284) = { - EVT_SET(LVar4, 35) - EVT_SET(LVar5, 14) - EVT_SET(LVar6, 15) - EVT_SET(LVar7, MapVar(10)) - EVT_SET(LVar8, MapVar(11)) - EVT_SET(LVar9, 38) - EVT_EXEC(N(80243FD0)) - EVT_SET(LVar4, 36) - EVT_SET(LVar5, 19) - EVT_SET(LVar6, 20) - EVT_SET(LVar7, MapVar(12)) - EVT_SET(LVar8, MapVar(13)) - EVT_SET(LVar9, 39) - EVT_EXEC(N(80243FD0)) - EVT_SET(LVar4, 37) - EVT_SET(LVar5, 24) - EVT_SET(LVar6, 25) - EVT_SET(LVar7, MapVar(14)) - EVT_SET(LVar8, MapVar(15)) - EVT_SET(LVar9, 40) - EVT_EXEC(N(80243FD0)) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_XXX)[] = { 0, 0}; - -NpcSettings N(npcSettings_802443D8) = { - .height = 24, - .radius = 24, - .level = 99, -}; - -f32 N(FlyingAI_JumpVels)[] = { - 4.5f, 3.5f, 2.6f, 2.0f, - 1.5f, 20.0f, -}; - -MobileAISettings N(npcAISettings_80244424) = { - .moveSpeed = 1.5f, - .moveTime = 60, - .waitTime = 30, - .alertRadius = 60.0f, - .alertOffsetDist = 50.0f, - .playerSearchInterval = 3, - .chaseSpeed = 3.5f, - .chaseTurnRate= 60, - .chaseUpdateInterval = 10, - .chaseRadius = 80.0f, - .chaseOffsetDist = 70.0f, - .unk_AI_2C = 1, -}; - -EvtScript N(npcAI_80244454) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, -650) - EVT_CALL(SetSelfVar, 6, 30) - EVT_CALL(SetSelfVar, 1, 400) - EVT_CALL(N(LakituAI_Main), EVT_PTR(N(npcAISettings_80244424))) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_802444C4) = { - .height = 28, - .radius = 24, - .ai = &N(npcAI_80244454), - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 20, -}; - -MobileAISettings N(npcAISettings_802444F0) = { - .moveSpeed = 1.5f, - .moveTime = 30, - .waitTime = 50, - .alertRadius = 60.0f, - .alertOffsetDist = 30.0f, - .playerSearchInterval = 3, - .chaseSpeed = 6.0f, - .chaseRadius = 100.0f, - .chaseOffsetDist = 30.0f, - .unk_AI_2C = 3, -}; - -EvtScript N(npcAI_80244520) = { - EVT_CALL(SetSelfVar, 2, 3) - EVT_CALL(SetSelfVar, 3, 18) - EVT_CALL(SetSelfVar, 5, 3) - EVT_CALL(SetSelfVar, 7, 4) - EVT_CALL(N(SpinyAI_Main), EVT_PTR(N(npcAISettings_802444F0))) - EVT_RETURN - EVT_END -}; - -EvtScript N(80244590) = { - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetSelfVar, 10, 100) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(2) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(3) - EVT_CALL(SetEnemyFlagBits, -1, 16, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_8024465C) = { - .height = 21, - .radius = 22, - .ai = &N(npcAI_80244520), - .onHit = &EnemyNpcHit, - .onDefeat = &N(80244590), - .level = 19, -}; - -StaticNpc N(npcGroup_80244688) = { - .id = NPC_LAKITU0, - .settings = &N(npcSettings_802444C4), - .pos = { -185.0f, 90.0f, 10.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 25, - .itemDrops = { - { ITEM_SUPER_SHROOM, 2, 0 }, - { ITEM_MAPLE_SYRUP, 2, 0 }, - { ITEM_THUNDER_RAGE, 2, 0 }, - { ITEM_STOP_WATCH, 2, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(3), - .maxCoinBonus = 2, - }, - .territory = { .temp = { -185, 90, 10, 30, 0, -32767, 0, -185, 90, 0, 85, 120, 1, 1 }}, - .animations = { - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim02, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80244878) = { - .id = NPC_LAKITU1, - .settings = &N(npcSettings_802444C4), - .pos = { 200.0f, 90.0f, -25.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 25, - .itemDrops = { - { ITEM_SUPER_SHROOM, 2, 0 }, - { ITEM_MAPLE_SYRUP, 2, 0 }, - { ITEM_THUNDER_RAGE, 2, 0 }, - { ITEM_STOP_WATCH, 2, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(3), - .maxCoinBonus = 2, - }, - .territory = { .temp = { 200, 90, -25, 30, 0, -32767, 0, 200, 90, 0, 85, 120, 1, 1 }}, - .animations = { - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim02, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80244A68) = { - .id = NPC_SPINY0, - .settings = &N(npcSettings_8024465C), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { 0, 0, 0, 0, 0, -32767, 0, 0, 0, 0, 0, 0, 0, 1 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80244C58) = { - .id = NPC_SPINY1, - .settings = &N(npcSettings_8024465C), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { 0, 0, 0, 0, 0, -32767, 0, 0, 0, 0, 0, 0, 0, 1 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80244E48) = { - .id = NPC_SPINY2, - .settings = &N(npcSettings_8024465C), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { 0, 0, 0, 0, 0, -32767, 0, 0, 0, 0, 0, 0, 0, 1 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80245038) = { - .id = NPC_SPINY3, - .settings = &N(npcSettings_8024465C), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .yaw = 0, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { 0, 0, 0, 0, 0, -32767, 0, 0, 0, 0, 0, 0, 0, 1 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -NpcGroupList N(npcGroupList_80245228) = { - NPC_GROUP(N(npcGroup_80244688), 0x1809, 0x02), - NPC_GROUP(N(npcGroup_80244878), 0x180A, 0x02), - NPC_GROUP(N(npcGroup_80244A68), 0x180C, 0x02), - NPC_GROUP(N(npcGroup_80244C58), 0x180C, 0x02), - NPC_GROUP(N(npcGroup_80244E48), 0x180C, 0x02), - NPC_GROUP(N(npcGroup_80245038), 0x180C, 0x02), - {}, -}; - -static s32 N(pad_527C) = { - 0x00000000, -}; - -EvtScript N(makeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 660, 60, -115, 0, 130, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO17_HiddenItem_ThunderRage) - EVT_CALL(MakeItemEntity, ITEM_LETTER09, -245, 0, 105, 17, GF_FLO17_Item_Letter09) - EVT_RETURN - EVT_END -}; - -#define AI_LAKITU_FIRST_SPINY_ID 50 -#define AI_LAKITU_LAST_SPINY_ID 53 -#include "world/common/enemy/ai/LakituAI.inc.c" -#include "world/common/enemy/ai/SpinyAI.inc.c" diff --git a/src/world/area_flo/flo_17/flo_17.h b/src/world/area_flo/flo_17/flo_17.h index 9defd3a9f8..959ef3570f 100644 --- a/src/world/area_flo/flo_17/flo_17.h +++ b/src/world/area_flo/flo_17/flo_17.h @@ -2,18 +2,35 @@ /// @brief Flower Fields - (NE) Fallen Logs #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_17_shape.h" +#include "mapfs/flo_17_hit.h" + +enum { + NPC_Lakitu_01 = 0, + NPC_Lakitu_02 = 1, + NPC_Spiny_01 = 50, + NPC_Spiny_02 = 51, + NPC_Spiny_03 = 52, + NPC_Spiny_04 = 53, +}; + +enum { + MV_RotAngle_Log_01 = MapVar(10), + MV_RotVelocity_Log_01 = MapVar(11), + MV_RotAngle_Log_02 = MapVar(12), + MV_RotVelocity_Log_02 = MapVar(13), + MV_RotAngle_Log_03 = MapVar(14), + MV_RotVelocity_Log_03 = MapVar(15), +}; + #define NAMESPACE flo_17 -ApiStatus N(func_80240000_CD72E0)(Evt* script, s32 isInitialCall); -ApiStatus N(LakituAI_Main)(Evt* script, s32 isInitialCall); -ApiStatus N(SpinyAI_Main)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240040_CD7320)(Evt *script, s32 isInitialCall); - -extern NpcGroupList N(npcGroupList_80245228); -extern EvtScript N(80244284); -extern EvtScript N(main); -extern EvtScript N(makeEntities); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_SetupLogBridges); +extern EvtScript N(EVS_MakeEntities); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_17/flo_17_0_header.c b/src/world/area_flo/flo_17/flo_17_0_header.c new file mode 100644 index 0000000000..8d761ffad7 --- /dev/null +++ b/src/world/area_flo/flo_17/flo_17_0_header.c @@ -0,0 +1,14 @@ +#include "flo_17.h" + +EntryList N(Entrances) = { + [flo_17_ENTRY_0] { -730.0, 0.0, 0.0, 90.0 }, + [flo_17_ENTRY_1] { 730.0, 0.0, 0.0, 270.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_17 }, +}; diff --git a/src/world/area_flo/flo_17/flo_17_1_music.c b/src/world/area_flo/flo_17/flo_17_1_music.c new file mode 100644 index 0000000000..1424ce37cc --- /dev/null +++ b/src/world/area_flo/flo_17/flo_17_1_music.c @@ -0,0 +1,12 @@ +#include "flo_17.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_17/flo_17_2_main.c b/src/world/area_flo/flo_17/flo_17_2_main.c new file mode 100644 index 0000000000..c93bd69cd7 --- /dev/null +++ b/src/world/area_flo/flo_17/flo_17_2_main.c @@ -0,0 +1,130 @@ +#include "flo_17.h" +#include "effects.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_16_1) = EVT_EXIT_WALK(60, flo_17_ENTRY_0, "flo_16", flo_16_ENTRY_1); +EvtScript N(EVS_ExitWalk_flo_18_0) = EVT_EXIT_WALK(60, flo_17_ENTRY_1, "flo_18", flo_18_ENTRY_0); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_16_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +LavaReset N(SafeFloorColliders)[] = { + { .colliderID = COLLIDER_o116, .pos = { -530.0, 0.0, -110.0 }}, + { .colliderID = COLLIDER_o118, .pos = { -540.0, 0.0, -50.0 }}, + { .colliderID = COLLIDER_o117, .pos = { -530.0, 0.0, 80.0 }}, + { .colliderID = COLLIDER_o121, .pos = { -270.0, 0.0, -120.0 }}, + { .colliderID = COLLIDER_o120, .pos = { -270.0, 0.0, -120.0 }}, + { .colliderID = COLLIDER_o119, .pos = { -270.0, 0.0, 35.0 }}, + { .colliderID = COLLIDER_o124, .pos = { -130.0, 0.0, -50.0 }}, + { .colliderID = COLLIDER_o123, .pos = { -130.0, 0.0, -50.0 }}, + { .colliderID = COLLIDER_o122, .pos = { -140.0, 0.0, 75.0 }}, + { .colliderID = COLLIDER_o128, .pos = { 120.0, 0.0, -50.0 }}, + { .colliderID = COLLIDER_o127, .pos = { 120.0, 0.0, -50.0 }}, + { .colliderID = COLLIDER_o125, .pos = { 130.0, 0.0, 60.0 }}, + { .colliderID = COLLIDER_o126, .pos = { 120.0, 0.0, 120.0 }}, + { .colliderID = COLLIDER_o132, .pos = { 280.0, 0.0, -110.0 }}, + { .colliderID = COLLIDER_o131, .pos = { 280.0, 0.0, -110.0 }}, + { .colliderID = COLLIDER_o130, .pos = { 270.0, 0.0, -50.0 }}, + { .colliderID = COLLIDER_o129, .pos = { 280.0, 0.0, 50.0 }}, + { .colliderID = COLLIDER_o134, .pos = { 525.0, 0.0, -70.0 }}, + { .colliderID = COLLIDER_o133, .pos = { 525.0, 0.0, 50.0 }}, + { .colliderID = -1 } +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_EXEC(N(EVS_SetupLogBridges)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o116, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o117, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o121, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o124, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o126, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o128, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o132, SURFACE_TYPE_FLOWERS) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o133, SURFACE_TYPE_FLOWERS) + EVT_FLOWER_SPAWN_REGION( -736, -137, -522, -118, 0) + EVT_FLOWER_SPAWN_REGION( -728, 76, -496, 137, 0) + EVT_FLOWER_SPAWN_REGION( -160, -117, -92, -54, 0) + EVT_FLOWER_SPAWN_REGION( 76, -124, 150, -55, 0) + EVT_FLOWER_SPAWN_REGION( 192, 60, 309, 133, 0) + EVT_FLOWER_SPAWN_REGION( 488, 46, 733, 137, 0) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o103, SURFACE_TYPE_SPIKES) + EVT_THREAD + EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) + EVT_END_THREAD + EVT_CALL(EnableTexPanning, MODEL_o34, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o36, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o37, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o40, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o41, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o44, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o45, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o47, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o48, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o52, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o55, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o23, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o25, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o26, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o29, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o30, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o33, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o35, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o38, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o39, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o42, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o43, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o46, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o49, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o50, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o53, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o54, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o24, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o27, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o28, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o31, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o32, TRUE) + EVT_THREAD + EVT_SET(LVar0, 0) + EVT_SET(LVar1, 0) + EVT_LABEL(0) + EVT_ADD(LVar0, 140) + EVT_IF_GT(LVar0, 0x10000) + EVT_ADD(LVar0, -0x10000) + EVT_END_IF + EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0) + EVT_ADD(LVar1, -200) + EVT_IF_LT(LVar1, 0) + EVT_ADD(LVar1, 0x10000) + EVT_END_IF + EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_END_THREAD + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_17/flo_17_3_logs.c b/src/world/area_flo/flo_17/flo_17_3_logs.c new file mode 100644 index 0000000000..7d6d059567 --- /dev/null +++ b/src/world/area_flo/flo_17/flo_17_3_logs.c @@ -0,0 +1,11 @@ +#include "flo_17.h" + +#include "world/common/atomic/flo_LogBridge.inc.c" + +EvtScript N(EVS_SetupLogBridges) = { + EVT_MAKE_LOG_BRIDGE(COLLIDER_o22, COLLIDER_o138, MODEL_o19, MODEL_o20, MV_RotAngle_Log_01, MV_RotVelocity_Log_01) + EVT_MAKE_LOG_BRIDGE(COLLIDER_o15, COLLIDER_o139, MODEL_o17, MODEL_o18, MV_RotAngle_Log_02, MV_RotVelocity_Log_02) + EVT_MAKE_LOG_BRIDGE(COLLIDER_o13, COLLIDER_o140, MODEL_o11, MODEL_o12, MV_RotAngle_Log_03, MV_RotVelocity_Log_03) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_17/flo_17_4_npc.c b/src/world/area_flo/flo_17/flo_17_4_npc.c new file mode 100644 index 0000000000..e1caa3ccac --- /dev/null +++ b/src/world/area_flo/flo_17/flo_17_4_npc.c @@ -0,0 +1,155 @@ +#include "flo_17.h" + +#include "world/common/npc/Dummy.inc.c" + +#define AI_LAKITU_FIRST_SPINY_ID NPC_Spiny_01 +#define AI_LAKITU_LAST_SPINY_ID NPC_Spiny_04 +#include "world/common/enemy/complete/Lakitu_SpinySpawner.inc.c" + +StaticNpc N(NpcData_Lakitu_01) = { + .id = NPC_Lakitu_01, + .settings = &N(NpcSettings_Lakitu_SpinySpawner), + .pos = { -185.0f, 90.0f, 10.0f }, + .yaw = 270, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .drops = LAKITU_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -185, 90, 10 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_RECT, + .detectPos = { -185, 90, 0 }, + .detectSize = { 85, 120 }, + } + }, + .animations = LAKITU_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Lakitu_02) = { + .id = NPC_Lakitu_02, + .settings = &N(NpcSettings_Lakitu_SpinySpawner), + .pos = { 200.0f, 90.0f, -25.0f }, + .yaw = 90, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .drops = LAKITU_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 200, 90, -25 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_RECT, + .detectPos = { 200, 90, 0 }, + .detectSize = { 85, 120 }, + } + }, + .animations = LAKITU_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Spiny_01) = { + .id = NPC_Spiny_01, + .settings = &N(NpcSettings_SpawnedSpiny), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 0, + .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 0, 0, 0 }, + .wanderSize = { 0 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0 }, + } + }, + .animations = SPINY_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Spiny_02) = { + .id = NPC_Spiny_02, + .settings = &N(NpcSettings_SpawnedSpiny), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 0, + .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 0, 0, 0 }, + .wanderSize = { 0 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0 }, + } + }, + .animations = SPINY_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Spiny_03) = { + .id = NPC_Spiny_03, + .settings = &N(NpcSettings_SpawnedSpiny), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 0, + .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 0, 0, 0 }, + .wanderSize = { 0 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0 }, + } + }, + .animations = SPINY_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Spiny_04) = { + .id = NPC_Spiny_04, + .settings = &N(NpcSettings_SpawnedSpiny), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 0, + .flags = NPC_FLAG_4 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 0, 0, 0 }, + .wanderSize = { 0 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0 }, + } + }, + .animations = SPINY_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Lakitu_01), BTL_FLO_FORMATION_09, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Lakitu_02), BTL_FLO_FORMATION_0A, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Spiny_01), BTL_FLO_FORMATION_0C, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Spiny_02), BTL_FLO_FORMATION_0C, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Spiny_03), BTL_FLO_FORMATION_0C, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Spiny_04), BTL_FLO_FORMATION_0C, BTL_FLO_STAGE_02), + {} +}; diff --git a/src/world/area_flo/flo_17/flo_17_5_entity.c b/src/world/area_flo/flo_17/flo_17_5_entity.c new file mode 100644 index 0000000000..822b7268cc --- /dev/null +++ b/src/world/area_flo/flo_17/flo_17_5_entity.c @@ -0,0 +1,10 @@ +#include "flo_17.h" +#include "entity.h" + +EvtScript N(EVS_MakeEntities) = { + EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 660, 60, -115, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END) + EVT_CALL(AssignBlockFlag, GF_FLO17_HiddenItem_ThunderRage) + EVT_CALL(MakeItemEntity, ITEM_LETTER09, -245, 0, 105, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO17_Item_Letter09) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_18/CDC6A0.c b/src/world/area_flo/flo_18/CDC6A0.c deleted file mode 100644 index a744cd39f7..0000000000 --- a/src/world/area_flo/flo_18/CDC6A0.c +++ /dev/null @@ -1,1765 +0,0 @@ -#include "flo_18.h" -#include "message_ids.h" -#include "sprite/npc/FlyingMagikoopa.h" -#include "sprite/npc/Lakitu.h" -#include "sprite/npc/Magikoopa.h" -#include "sprite/npc/WorldLakilester.h" -#include "effects.h" - -enum { - NPC_LAKITU0, - NPC_LAKITU1, - NPC_LAKITU2, - NPC_MAGIKOOPA, - NPC_FLYING_MAGIKOOPA, -}; - -EntryList N(entryList) = { - { -320.0f, 0.0f, 0.0f, 90.0f }, - { 36.0f, 0.0f, 40.0f, 270.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_18 }, -}; - -EvtScript N(80240830) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_PUFF_PUFF_MACHINE, 0, 8) - EVT_CALL(PlaySoundAtCollider, 20, 0x80000025, 0) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -static s32 N(pad_8B8)[] = { - 0x00000000, 0x00000000, -}; - -EvtScript N(updateTexturePan_802408C0) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_IF_EQ(LVar5, 1) - EVT_IF_EQ(LVar6, 1) - EVT_IF_EQ(LVar7, 1) - EVT_IF_EQ(LVar8, 1) - EVT_CALL(N(UpdateTexturePanSmooth)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(UpdateTexturePanStepped)) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_8024095C) = EVT_EXIT_WALK(60, 0, "flo_17", 1); - -EvtScript N(802409B8) = { - EVT_BIND_TRIGGER(N(exitWalk_8024095C), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_RETURN - EVT_END -}; - -s32 N(lavaResetList_802409E4)[] = { - 0x0000000B, 0xC3480000, 0x00000000, 0x42F00000, 0x0000000C, 0x00000000, 0x00000000, 0x42F00000, - 0x0000000D, 0x432A0000, 0x00000000, 0x42F00000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_8024669C))) - EVT_EXEC(N(80247024)) - EVT_EXEC(N(802436BC)) - EVT_EXEC(N(802456D4)) - EVT_CALL(ModifyColliderFlags, 3, 8, 0x00000002) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(lavaResetList_802409E4))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, 9, 1) - EVT_CALL(EnableTexPanning, 11, 1) - EVT_CALL(EnableTexPanning, 12, 1) - EVT_CALL(EnableTexPanning, 13, 1) - EVT_CALL(EnableTexPanning, 14, 1) - EVT_CALL(EnableTexPanning, 15, 1) - EVT_CALL(EnableTexPanning, 7, 1) - EVT_CALL(EnableTexPanning, 8, 1) - EVT_CALL(EnableTexPanning, 10, 1) - EVT_CALL(EnableTexPanning, 16, 1) - EVT_CALL(EnableTexPanning, 17, 1) - EVT_THREAD - EVT_SET(LVar0, 1) - EVT_SET(LVar1, -140) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_802408C0)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 2) - EVT_SET(LVar1, -200) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_802408C0)) - EVT_END_THREAD - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(802409B8))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_EXEC(N(80244058)) - EVT_EXEC(N(802409B8)) - EVT_END_IF - EVT_EXEC_WAIT(N(80240830)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_8024030C_CDC9AC)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_E88)[] = { - 0x00000000, 0x00000000, -}; - -EvtScript N(80240E90) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_LOOP(0) - EVT_CALL(PlayEffect, 0x5E, 0, EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6, 0, 0, 0, 0) - EVT_CALL(N(func_80240340_CDC9E0)) - EVT_WAIT(4) - EVT_CALL(PlayEffect, 0x5E, 0, EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6, 0, 0, 0, 0) - EVT_CALL(N(func_80240340_CDC9E0)) - EVT_WAIT(4) - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVar0, 6) - EVT_LOOP(5) - EVT_CALL(PlayEffect, 0x5E, 0, EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6, 0, 0, 0, 0) - EVT_CALL(N(func_80240340_CDC9E0)) - EVT_WAIT(LVar0) - EVT_ADD(LVar0, 2) - EVT_CALL(PlayEffect, 0x5E, 0, EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6, 0, 0, 0, 0) - EVT_CALL(N(func_80240340_CDC9E0)) - EVT_WAIT(LVar0) - EVT_ADD(LVar0, 2) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(80241094) = { - EVT_CALL(EnableModel, LVarF, 1) - EVT_SET(LVarE, 159) - EVT_LOOP(LVarE) - EVT_ADDF(LVar3, 0) - EVT_ADDF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(0.01)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_MULF(LVar6, EVT_FLOAT(1.01)) - EVT_ADDF(LVar7, EVT_FLOAT(0.01)) - EVT_SETF(LVar8, LVar6) - EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 15, 0, 0) - EVT_ADDF(LVar8, LVarA) - EVT_SETF(LVar9, LVar7) - EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 20, 0, 90) - EVT_ADDF(LVar9, LVarA) - EVT_SETF(LVarA, LVar0) - EVT_MULF(LVarA, EVT_FLOAT(10.0)) - EVT_CALL(TranslateModel, LVarF, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, LVarF, LVar8, LVar9, 1) - EVT_CALL(RotateModel, LVarF, LVarA, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVarF, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241284) = { - EVT_SET(LVarE, 0) - EVT_LABEL(0) - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_RETURN - EVT_END_IF - EVT_SETF(LVar0, EVT_FLOAT(132.0)) - EVT_SETF(LVar1, EVT_FLOAT(90.0)) - EVT_SETF(LVar2, EVT_FLOAT(-30.0)) - EVT_CALL(RandInt, 100, LVar3) - EVT_ADDF(LVar3, -50) - EVT_DIVF(LVar3, EVT_FLOAT(200.0)) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_SETF(LVar5, 0) - EVT_SETF(LVar6, EVT_FLOAT(0.296875)) - EVT_SETF(LVar7, EVT_FLOAT(0.296875)) - EVT_SET(LVarF, LVarE) - EVT_ADD(LVarF, 10000) - EVT_EXEC(N(80241094)) - EVT_ADD(LVarE, 1) - EVT_IF_GE(LVarE, 16) - EVT_SET(LVarE, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(802413F0) = { - EVT_IF_EQ(MapFlag(2), 1) - EVT_RETURN - EVT_END_IF - EVT_SET(MapFlag(2), 1) - EVT_SET(LVarF, 0) - EVT_LOOP(12) - EVT_CALL(RandInt, 80, LVar0) - EVT_SUB(LVar0, 40) - EVT_CALL(RandInt, 50, LVar1) - EVT_CALL(RandInt, 50, LVar2) - EVT_SUB(LVar2, 25) - EVT_CALL(PlayEffect, 0x0, LVar0, LVar1, LVar2, 5, 10, 1, 1, 0, 0, 0, 0, 0, 0) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVarE, EVT_FLOAT(1.0), EVT_FLOAT(1.09375), 2, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVarD, EVT_FLOAT(1.09375), EVT_FLOAT(1.0), 2, 0, 0) - EVT_SETF(LVar0, LVarE) - EVT_SETF(LVar1, LVarD) - EVT_SETF(LVar2, LVarE) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_CALL(ScaleModel, 31, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 32, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_CALL(ScaleModel, 19, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 20, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(ScaleModel, 21, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(ScaleModel, 22, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 23, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 24, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 25, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 26, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, 27, LVar0, LVar1, LVar2) - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(ScaleModel, 29, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 41, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 33, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, 36, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 37, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 38, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 39, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 40, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 34, LVar0, LVar1, LVar2) - EVT_SUBF(LVar0, EVT_FLOAT(1.046875)) - EVT_MULF(LVar0, EVT_FLOAT(100.0)) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_CALL(RotateModel, 31, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 32, LVar0, 0, 0, 1) - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_CALL(RotateModel, 19, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 20, LVar0, 0, 0, 1) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(RotateModel, 21, LVar0, 0, 0, 1) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(RotateModel, 22, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 23, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 24, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 25, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 26, LVar0, 0, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(RotateModel, 27, LVar0, 0, 0, 1) - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(RotateModel, 29, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 41, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 33, LVar0, 0, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(RotateModel, 36, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 37, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 38, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 39, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 40, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, 34, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SETF(LVar0, 1) - EVT_SETF(LVar1, 1) - EVT_SETF(LVar2, 1) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_CALL(ScaleModel, 31, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 32, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_CALL(ScaleModel, 19, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 20, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(ScaleModel, 21, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(ScaleModel, 22, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 23, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 24, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 25, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 26, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, 27, LVar0, LVar1, LVar2) - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(ScaleModel, 29, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 41, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 33, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, 36, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 37, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 38, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 39, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 40, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, 34, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(MapFlag(2), 0) - EVT_RETURN - EVT_END -}; - -#ifdef NON_EQUIVALENT -EvtScript N(80241ED4) = { - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(-1.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(3.0)) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtCollider, 19, 486, 0) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar5, EVT_FLOAT(0.09375)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LT(LVar1, -10) - EVT_SETF(LVar1, EVT_FLOAT(-10.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_IF_GE(LVar2, 80) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, 31, -78, 19, 2) - EVT_CALL(TranslateModel, 32, -78, 19, 2) - EVT_CALL(TranslateModel, 31, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, 32, LVar0, LVar1, 0) - EVT_CALL(RotateModel, 31, LVar2, 0, 0, 1) - EVT_CALL(RotateModel, 32, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, 31, 78, -19, -2) - EVT_CALL(TranslateModel, 32, 78, -19, -2) - EVT_WAIT(1) -EVT_END_LOOP -EVT_LABEL(0) -EVT_WAIT(30) -EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 19, 0x7FFFFE00) -EVT_RETURN -EVT_END -}; -#else -EvtScript N(80241ED4) = { - EVT_CMD(EVT_OP_SETF, LVar0, 0), - EVT_CMD(EVT_OP_SETF, LVar1, 0), - EVT_CMD(EVT_OP_SETF, LVar2, 0), - EVT_CMD(EVT_OP_SETF, LVar3, EVT_FLOAT(-1.0)), - EVT_CMD(EVT_OP_SETF, LVar4, EVT_FLOAT(0.0)), - EVT_CMD(EVT_OP_SETF, LVar5, EVT_FLOAT(3.0)), - EVT_CMD(EVT_OP_THREAD), - EVT_CMD(EVT_OP_WAIT_FRAMES, 10), - EVT_CMD(EVT_OP_CALL, EVT_PTR(PlaySoundAtCollider), 19, 486, 0), - EVT_CMD(EVT_OP_END_THREAD), - EVT_CMD(EVT_OP_LOOP, 300), - EVT_CMD(EVT_OP_ADDF, LVar4, EVT_FLOAT(-0.5)), - EVT_CMD(EVT_OP_ADDF, LVar5, EVT_FLOAT(0.09375)), - EVT_CMD(EVT_OP_ADDF, LVar0, LVar3), - EVT_CMD(EVT_OP_ADDF, LVar1, LVar4), - EVT_CMD(EVT_OP_ADDF, LVar2, LVar5), - EVT_CMD(EVT_OP_IF_LT, LVar1, -10), - EVT_CMD(EVT_OP_SETF, LVar1, EVT_FLOAT(-10.0)), - EVT_CMD(EVT_OP_SETF, LVar3, EVT_FLOAT(0.0)), - EVT_CMD(EVT_OP_SETF, LVar4, EVT_FLOAT(0.0)), - EVT_CMD(EVT_OP_IF_GE, LVar2, 80), - EVT_CMD(EVT_OP_GOTO, 0), - EVT_CMD(EVT_OP_END_IF), - EVT_CMD(EVT_OP_END_IF), - EVT_CMD(EVT_OP_END_IF), // BUG: extraneous END_IF - EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 31, -78, 19, 2), - EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 32, -78, 19, 2), - EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 31, LVar0, LVar1, 0), - EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 32, LVar0, LVar1, 0), - EVT_CMD(EVT_OP_CALL, EVT_PTR(RotateModel), 31, LVar2, 0, 0, 1), - EVT_CMD(EVT_OP_CALL, EVT_PTR(RotateModel), 32, LVar2, 0, 0, 1), - EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 31, 78, -19, -2), - EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 32, 78, -19, -2), - EVT_CMD(EVT_OP_WAIT_FRAMES, 1), -EVT_CMD(EVT_OP_END_LOOP), -EVT_CMD(EVT_OP_LABEL, 0), -EVT_CMD(EVT_OP_WAIT_FRAMES, 30), -EVT_CMD(EVT_OP_CALL, EVT_PTR(ModifyColliderFlags), 0, 19, 0x7FFFFE00), -EVT_CMD(EVT_OP_RETURN), -EVT_CMD(EVT_OP_END) -}; -#endif - -EvtScript N(80242174) = { - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(-5.0)) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(PlaySoundAtCollider, 21, 487, 0) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LT(LVar2, -45) - EVT_SET(LVar5, 5) - EVT_END_IF - EVT_IF_GT(LVar2, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 5) - EVT_END_IF - EVT_IF_LT(LVar1, -25) - EVT_SET(LVar4, 0) - EVT_SET(LVar1, -25) - EVT_END_IF - EVT_IF_GT(LVar0, 90) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(TranslateModel, 19, 50, 28, 27) - EVT_CALL(TranslateModel, 20, 50, 28, 27) - EVT_CALL(TranslateModel, 19, 0, LVar1, 1) - EVT_CALL(TranslateModel, 20, 0, LVar1, 1) - EVT_CALL(RotateModel, 19, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, 20, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, 19, LVar2, 0, 0, 1) - EVT_CALL(RotateModel, 20, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, 19, -50, -28, -27) - EVT_CALL(TranslateModel, 20, -50, -28, -27) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(30) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242474) = { - EVT_SETF(LVar2, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, 23, 487, 0) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar5, EVT_FLOAT(0.5)) - EVT_ADDF(LVar2, LVar5) - EVT_IF_GE(LVar2, 80) - EVT_SETF(LVar2, 80) - EVT_MULF(LVar5, EVT_FLOAT(-0.5)) - EVT_IF_EQ(LVar5, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, 21, -55, 5, 16) - EVT_CALL(TranslateModel, 21, LVar0, LVar1, 0) - EVT_CALL(RotateModel, 21, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, 21, 55, -5, -16) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(30) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242620) = { - EVT_SETF(LVar2, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, 22, 487, 0) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar5, EVT_FLOAT(0.5)) - EVT_ADDF(LVar2, LVar5) - EVT_IF_GE(LVar2, 80) - EVT_SETF(LVar2, 80) - EVT_MULF(LVar5, EVT_FLOAT(-0.5)) - EVT_IF_EQ(LVar5, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, 24, 60, 0, 16) - EVT_CALL(RotateModel, 24, LVar2, 0, 0, -1) - EVT_CALL(TranslateModel, 24, -60, 0, -16) - EVT_CALL(TranslateModel, 22, 0, 0, 27) - EVT_CALL(TranslateModel, 23, 0, 0, 27) - EVT_CALL(RotateModel, 22, LVar2, 1, 0, 0) - EVT_CALL(RotateModel, 23, LVar2, 1, 0, 0) - EVT_CALL(TranslateModel, 22, 0, 0, -27) - EVT_CALL(TranslateModel, 23, 0, 0, -27) - EVT_CALL(TranslateModel, 25, 0, 0, -41) - EVT_CALL(TranslateModel, 26, 0, 0, -41) - EVT_CALL(RotateModel, 25, LVar2, -1, 0, 0) - EVT_CALL(RotateModel, 26, LVar2, -1, 0, 0) - EVT_CALL(TranslateModel, 25, 0, 0, 41) - EVT_CALL(TranslateModel, 26, 0, 0, 41) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(30) - EVT_RETURN - EVT_END -}; - -#ifdef NON_EQUIVALENT -EvtScript N(80242910) = { - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(-1.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(3.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, 18, 486, 0) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar5, EVT_FLOAT(0.09375)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LT(LVar1, -25) - EVT_SETF(LVar1, EVT_FLOAT(-25.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_IF_GE(LVar2, 80) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, 29, 124, 17, 3) - EVT_CALL(TranslateModel, 29, LVar0, LVar1, 0) - EVT_CALL(RotateModel, 29, LVar2, 0, 0, -1) - EVT_CALL(TranslateModel, 29, -124, -17, -3) - EVT_WAIT(1) -EVT_END_LOOP -EVT_LABEL(0) -EVT_RETURN -EVT_END -}; -#else -EvtScript N(80242910) = { - EVT_CMD(EVT_OP_SETF, LVar0, 0), - EVT_CMD(EVT_OP_SETF, LVar1, 0), - EVT_CMD(EVT_OP_SETF, LVar2, 0), - EVT_CMD(EVT_OP_SETF, LVar3, EVT_FLOAT(-1.0)), - EVT_CMD(EVT_OP_SETF, LVar4, EVT_FLOAT(0.0)), - EVT_CMD(EVT_OP_SETF, LVar5, EVT_FLOAT(3.0)), - EVT_CMD(EVT_OP_THREAD), - EVT_CMD(EVT_OP_WAIT_FRAMES, 15), - EVT_CMD(EVT_OP_CALL, EVT_PTR(PlaySoundAtCollider), 18, 486, 0), - EVT_CMD(EVT_OP_END_THREAD), - EVT_CMD(EVT_OP_LOOP, 300), - EVT_CMD(EVT_OP_ADDF, LVar4, EVT_FLOAT(-0.5)), - EVT_CMD(EVT_OP_ADDF, LVar5, EVT_FLOAT(0.09375)), - EVT_CMD(EVT_OP_ADDF, LVar0, LVar3), - EVT_CMD(EVT_OP_ADDF, LVar1, LVar4), - EVT_CMD(EVT_OP_ADDF, LVar2, LVar5), - EVT_CMD(EVT_OP_IF_LT, LVar1, -25), - EVT_CMD(EVT_OP_SETF, LVar1, EVT_FLOAT(-25.0)), - EVT_CMD(EVT_OP_SETF, LVar3, EVT_FLOAT(0.0)), - EVT_CMD(EVT_OP_SETF, LVar4, EVT_FLOAT(0.0)), - EVT_CMD(EVT_OP_IF_GE, LVar2, 80), - EVT_CMD(EVT_OP_GOTO, 0), - EVT_CMD(EVT_OP_END_IF), - EVT_CMD(EVT_OP_END_IF), - EVT_CMD(EVT_OP_END_IF), // BUG: extraneous END_IF - EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 29, 124, 17, 3), - EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 29, LVar0, LVar1, 0), - EVT_CMD(EVT_OP_CALL, EVT_PTR(RotateModel), 29, LVar2, 0, 0, -1), - EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 29, -124, -17, -3), - EVT_CMD(EVT_OP_WAIT_FRAMES, 1), -EVT_CMD(EVT_OP_END_LOOP), -EVT_CMD(EVT_OP_LABEL, 0), -EVT_CMD(EVT_OP_RETURN), -EVT_CMD(EVT_OP_END) -}; -#endif - -EvtScript N(80242B18) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 18, 0x7FFFFE00) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(3.0)) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_SETF(LVar5, EVT_FLOAT(5.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, 20, 486, 0) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LE(LVar1, -40) - EVT_SETF(LVar1, -40) - EVT_MULF(LVar4, EVT_FLOAT(-0.5)) - EVT_IF_LE(LVar4, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_IF - EVT_IF_GE(LVar2, 60) - EVT_SETF(LVar2, 60) - EVT_SETF(LVar5, 0) - EVT_END_IF - EVT_CALL(TranslateModel, 41, -34, 50, 10) - EVT_CALL(TranslateModel, 33, -34, 50, 10) - EVT_CALL(TranslateModel, 41, 0, LVar1, LVar0) - EVT_CALL(RotateModel, 41, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, 33, 0, LVar1, LVar0) - EVT_CALL(RotateModel, 33, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, 41, 34, -50, -10) - EVT_CALL(TranslateModel, 33, 34, -50, -10) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(1) - EVT_WAIT(30) - EVT_RETURN - EVT_END -}; - -s32 N(intTable_80242DC8)[] = { - 0x00000000, 0x00000000, 0x0000001B, 0x00000050, 0x00000023, 0x0000001B, 0x0000003C, 0x0000000A, - 0x0000001B, 0x0000001E, 0x00000000, 0x0000001B, 0x00000050, 0x00000023, 0x0000001B, 0x0000001E, - 0x00000000, 0x0000001B, 0x00000055, 0x00000000, 0x0000001B, 0x00000050, 0x00000023, 0x0000001B, -}; - -EvtScript N(80242E28) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -210) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySound, 0x1E5) - EVT_EXEC_WAIT(N(802413F0)) - EVT_SET(LVar0, LVarA) - EVT_IF_LT(GB_StoryProgress, 52) - EVT_SET(MapFlag(1), 1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(MapFlag(3), 1) - EVT_RETURN - EVT_END_IF - EVT_SET(MapFlag(3), 1) - EVT_IF_GT(LVar0, 2) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LVar0, 2) - EVT_GOTO(11) - EVT_END_IF - EVT_IF_EQ(LVar0, 0) - EVT_LABEL(11) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_SET(GB_FLO18_MachineDamage_Left, 1) - EVT_EXEC(N(80241ED4)) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar0, 1) - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_SET(GB_FLO18_MachineDamage_Right, 1) - EVT_EXEC(N(80242174)) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar0, 0) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 1) - EVT_SET(GB_FLO18_MachineDamage_Left, 2) - EVT_EXEC(N(80242474)) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 1) - EVT_SET(GB_FLO18_MachineDamage_Right, 2) - EVT_EXEC(N(80242620)) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, 0, 40, 0, 0) - EVT_CALL(SetPanTarget, 0, 40, 0, 0) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(1.5)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_SET(GB_FLO18_MachineDamage_Right, 3) - EVT_EXEC_WAIT(N(802413F0)) - EVT_EXEC_WAIT(N(802413F0)) - EVT_EXEC_WAIT(N(802413F0)) - EVT_WAIT(30) - EVT_CALL(GetModelCenter, 27) - EVT_CALL(PlayEffect, 0x1D, 0, LVar0, 50, LVar2, 100, 20, 0, 30, 0, 0, 0, 0, 0) - EVT_CALL(PlayEffect, 0x1D, 0, LVar0, 30, LVar2, 120, 20, 0, 30, 0, 0, 0, 0, 0) - EVT_CALL(PlayEffect, 0x1D, 0, LVar0, 10, LVar2, 100, 20, 0, 30, 0, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_THREAD - EVT_SET(LVar3, 6) - EVT_USE_BUF(EVT_PTR(N(intTable_80242DC8))) - EVT_LOOP(8) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, 0x190, 0, LVar0, LVar1, LVar2) - EVT_CALL(PlayEffect, 0x27, 0, LVar0, LVar1, LVar2, 1, 6, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(2) - EVT_ADD(LVar1, 5) - EVT_CALL(PlaySoundAt, 0x190, 0, LVar0, LVar1, LVar2) - EVT_CALL(PlayEffect, 0x27, 0, LVar0, LVar1, LVar2, 2, 15, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVar3) - EVT_ADD(LVar3, 1) - EVT_END_LOOP - EVT_SETF(LVar4, EVT_FLOAT(2.0)) - EVT_LOOP(2) - EVT_USE_BUF(EVT_PTR(N(intTable_80242DC8))) - EVT_LOOP(8) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, 0x190, 0, LVar0, LVar1, LVar2) - EVT_CALL(PlayEffect, 0x27, 0, LVar0, LVar1, LVar2, 1, 25, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVar3) - EVT_ADD(LVar3, LVar4) - EVT_ADDF(LVar4, EVT_FLOAT(0.5)) - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAt, 0x1A0, 0, 70, 40, 10) - EVT_CALL(PlayEffect, 0x24, 0, 70, 40, 10, EVT_FLOAT(3.0), 30, 0, 0, 0, 0, 0, 0, 0) - EVT_CALL(ShakeCam, 0, 0, 20, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAt, 0x1A0, 0, 0, 30, 30) - EVT_CALL(PlayEffect, 0x24, 0, 0, 30, 30, EVT_FLOAT(4.0), 40, 0, 0, 0, 0, 0, 0, 0) - EVT_CALL(ShakeCam, 0, 0, 20, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(N(80242910)) - EVT_CALL(PlaySoundAtCollider, 20, 1169, 0) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(80242B18)) - EVT_SET(GB_StoryProgress, 53) - EVT_CALL(GotoMap, EVT_PTR("flo_15"), 1) - EVT_WAIT(70) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_LABEL(0) - EVT_SET(MapFlag(3), 0) - EVT_RETURN - EVT_END -}; - -Vec4f N(triggerCoord_8024367C) = { 5.0f, 0.0f, -10.0, 0.0f }; - -Vec4f N(triggerCoord_8024368C) = { -5.0f, 0.0f, -20.0f, 0.0f }; - -Vec4f N(triggerCoord_8024369C) = { 50.0f, 0.0f, -10.0, 0.0f }; - -Vec4f N(triggerCoord_802436AC) = { 105.0f, 0.0f, -10.0, 0.0f }; - -EvtScript N(802436BC) = { - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(EnableModel, 49, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 19, 0x7FFFFE00) - EVT_CALL(EnableModel, 31, 0) - EVT_CALL(EnableModel, 32, 0) - EVT_CALL(EnableModel, 19, 0) - EVT_CALL(EnableModel, 20, 0) - EVT_CALL(EnableModel, 21, 0) - EVT_CALL(EnableModel, 22, 0) - EVT_CALL(EnableModel, 23, 0) - EVT_CALL(EnableModel, 24, 0) - EVT_CALL(EnableModel, 25, 0) - EVT_CALL(EnableModel, 26, 0) - EVT_CALL(EnableModel, 29, 0) - EVT_CALL(EnableModel, 41, 0) - EVT_CALL(EnableModel, 33, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 18, 0x7FFFFE00) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(80240E90)) - EVT_CALL(EnableModel, 49, 0) - EVT_IF_GE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 19, 0x7FFFFE00) - EVT_CALL(EnableModel, 31, 0) - EVT_CALL(EnableModel, 32, 0) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(EnableModel, 19, 0) - EVT_CALL(EnableModel, 20, 0) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Left, 2) - EVT_CALL(EnableModel, 21, 0) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(EnableModel, 22, 0) - EVT_CALL(EnableModel, 23, 0) - EVT_CALL(EnableModel, 24, 0) - EVT_CALL(EnableModel, 25, 0) - EVT_CALL(EnableModel, 26, 0) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_CALL(EnableModel, 29, 0) - EVT_CALL(EnableModel, 41, 0) - EVT_CALL(EnableModel, 33, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 18, 0x7FFFFE00) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_BIND_TRIGGER(N(80242E28), TRIGGER_WALL_HAMMER, 23, 1, 0) - EVT_BIND_TRIGGER(N(80242E28), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_8024367C)), 1, 0) - EVT_BIND_TRIGGER(N(80242E28), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_8024368C)), 1, 0) - EVT_SET(LVar0, 1) - EVT_BIND_TRIGGER(N(80242E28), TRIGGER_WALL_HAMMER, 22, 1, 0) - EVT_BIND_TRIGGER(N(80242E28), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_8024369C)), 1, 0) - EVT_BIND_TRIGGER(N(80242E28), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_802436AC)), 1, 0) - EVT_SET(LVar0, 3) - EVT_BIND_TRIGGER(N(80242E28), TRIGGER_WALL_HAMMER, 19, 1, 0) - EVT_SET(LVar0, 4) - EVT_BIND_TRIGGER(N(80242E28), TRIGGER_WALL_HAMMER, 18, 1, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, 10000) - EVT_ADD(LVar0, 1) - EVT_CALL(CloneModel, 49, LVar1) - EVT_CALL(EnableModel, LVar1, 0) - EVT_END_LOOP - EVT_EXEC(N(80241284)) - EVT_CALL(EnableTexPanning, 36, 1) - EVT_CALL(EnableTexPanning, 37, 1) - EVT_CALL(EnableTexPanning, 38, 1) - EVT_CALL(EnableTexPanning, 39, 1) - EVT_CALL(EnableTexPanning, 40, 1) - EVT_CALL(EnableTexPanning, 41, 1) - EVT_THREAD - EVT_SETF(LVarE, EVT_FLOAT(1.0)) - EVT_LABEL(0) - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_MULF(LVarE, EVT_FLOAT(0.953125)) - EVT_END_IF - EVT_ADDF(LVarF, LVarE) - EVT_IF_EQ(LVarF, 1080) - EVT_SETF(LVarF, 0) - EVT_END_IF - EVT_SET(LVar0, LVarF) - EVT_DIV(LVar0, 9) - EVT_MOD(LVar0, 4) - EVT_MUL(LVar0, 16384) - EVT_SET(LVar1, LVarF) - EVT_DIV(LVar1, 4) - EVT_MOD(LVar1, 2) - EVT_MUL(LVar1, 16384) - EVT_SET(LVar2, LVarF) - EVT_DIV(LVar2, 5) - EVT_MOD(LVar2, 2) - EVT_MUL(LVar2, 16384) - EVT_SET(LVar3, LVarF) - EVT_DIV(LVar3, 6) - EVT_MOD(LVar3, 2) - EVT_MUL(LVar3, 16384) - EVT_SET(LVar4, LVarF) - EVT_DIV(LVar4, 2) - EVT_MOD(LVar4, 2) - EVT_MUL(LVar4, 32768) - EVT_SET(LVar5, LVarF) - EVT_DIV(LVar5, 8) - EVT_MOD(LVar5, 2) - EVT_MUL(LVar5, 16384) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar1, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar2, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_F, TEX_PANNER_MAIN, LVar3, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, LVar4, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_MAIN, LVar5, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_9, TEX_PANNER_MAIN, LVar5, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_80243F10) = { - .height = 32, - .radius = 24, - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 20, -}; - -NpcSettings N(npcSettings_80243F3C) = { - .height = 34, - .radius = 24, - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 26, -}; - -Vec3f N(vectorList_80243F68)[] = { - { -55.0, 15.0, 35.0 }, { -155.0, 35.0, 35.0 }, - { -255.0, 75.0, 35.0 }, { -355.0, 155.0, 35.0 }, - { -455.0, 315.0, 35.0 }, -}; - -Vec3f N(vectorList_80243FA4)[] = { - { -20.0, 15.0, 30.0 }, { -120.0, 35.0, 30.0 }, - { -220.0, 75.0, 30.0 }, { -320.0, 155.0, 30.0 }, - { -420.0, 315.0, 30.0 }, -}; - -Vec3f N(vectorList_80243FE0)[] = { - { 65.0, 15.0, 30.0 }, { -35.0, 35.0, 30.0 }, - { -135.0, 75.0, 30.0 }, { -235.0, 155.0, 30.0 }, - { -335.0, 315.0, 30.0 }, -}; - -Vec3f N(vectorList_8024401C)[] = { - { 120.0, 15.0, 30.0 }, { 20.0, 35.0, 30.0 }, - { -80.0, 75.0, 30.0 }, { -180.0, 155.0, 30.0 }, - { -280.0, 315.0, 30.0 }, -}; - -EvtScript N(80244058) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerPos, 30, 0, 50) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 65, 0, 50) - EVT_WAIT(30) - EVT_CALL(AdjustCam, 0, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-8.5)) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, 8) - EVT_IF_NE(LVar0, 8) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) - EVT_END_IF - EVT_CALL(PlayerFaceNpc, -4, 0) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C9) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_NodYes) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_WAIT(20) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(80244270) = { - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, 4, 0x19E, 0) - EVT_CALL(SetNpcFlagBits, 4, ((NPC_FLAG_100)), TRUE) - EVT_CALL(InterpNpcYaw, 4, 270, 0) - EVT_CALL(LoadPath, 60, EVT_PTR(N(vectorList_80243F68)), 5, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 4, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, 0, 0x19F, 0) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_100)), TRUE) - EVT_CALL(InterpNpcYaw, 0, 270, 0) - EVT_CALL(LoadPath, 60, EVT_PTR(N(vectorList_80243FA4)), 5, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_100)), TRUE) - EVT_CALL(InterpNpcYaw, 1, 270, 0) - EVT_CALL(LoadPath, 70, EVT_PTR(N(vectorList_80243FE0)), 5, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 1, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, 2, 0x19F, 0) - EVT_CALL(SetNpcFlagBits, 2, ((NPC_FLAG_100)), TRUE) - EVT_CALL(InterpNpcYaw, 2, 270, 0) - EVT_CALL(LoadPath, 80, EVT_PTR(N(vectorList_8024401C)), 5, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, 2, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(802445D4) = { - EVT_WAIT(5) - EVT_CALL(IsPlayerWithin, 40, 0, 200, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar3, 45) - EVT_ELSE - EVT_SET(LVar3, 25) - EVT_END_IF - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar4, -5) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar2, -61) - EVT_CHILD_THREAD - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_100)), TRUE) - EVT_CALL(NpcMoveTo, 0, LVar0, 55, LVar3) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_100)), TRUE) - EVT_CALL(NpcMoveTo, 1, LVar0, 55, LVar3) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(SetNpcFlagBits, 2, ((NPC_FLAG_100)), TRUE) - EVT_CALL(NpcMoveTo, 2, LVar0, 55, LVar3) - EVT_END_CHILD_THREAD - EVT_WAIT(LVar4) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80244774) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, 65, LVar1, 80) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) - EVT_CALL(AdjustCam, 0, EVT_FLOAT(8.0), 0, 450, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SpeakToPlayer, 4, ANIM_FlyingMagikoopa_Yellow_Anim09, ANIM_FlyingMagikoopa_Yellow_Anim01, 0, MSG_CH6_00BB) - EVT_WAIT(20) - EVT_EXEC(N(80244270)) - EVT_WAIT(80) - EVT_CALL(AdjustCam, 0, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-8.5)) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, 8) - EVT_IF_NE(LVar0, 8) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) - EVT_END_IF - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C1) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(20) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_SET(GB_StoryProgress, 52) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerApproach, -250, 0, 50) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, 8) - EVT_IF_NE(LVar0, 8) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) - EVT_END_IF - EVT_CALL(PlayerFaceNpc, -4, 0) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C2) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(idle_80244B3C) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 1000) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, 3) - EVT_RETURN - EVT_END -}; - -EvtScript N(defeat_80244C84) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SetNpcPos, 3, 0, -1000, 0) - EVT_CALL(SetNpcPos, 4, -55, 15, 35) - EVT_CALL(GetNpcYaw, 3, LVar0) - EVT_CALL(SetNpcYaw, 4, 90) - EVT_CALL(InterpPlayerYaw, 180, 0) - EVT_CALL(SetPlayerPos, 30, 0, 80) - EVT_CALL(SetNpcYaw, 0, 90) - EVT_CALL(SetNpcPos, 0, -20, 15, 30) - EVT_CALL(SetNpcYaw, 1, 270) - EVT_CALL(SetNpcPos, 1, 65, 15, 30) - EVT_CALL(SetNpcYaw, 2, 270) - EVT_CALL(SetNpcPos, 2, 120, 15, 30) - EVT_EXEC(N(80244774)) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CASE_EQ(2) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(80244E2C) = { - EVT_SWITCH(MapVar(10)) - EVT_CASE_EQ(0) - EVT_CALL(NpcFacePlayer, 3, 1) - EVT_CASE_EQ(1) - EVT_CALL(NpcFacePlayer, 0, 1) - EVT_CASE_EQ(2) - EVT_CALL(NpcFacePlayer, 1, 1) - EVT_CASE_EQ(3) - EVT_CALL(NpcFacePlayer, 2, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(80244ED0) = { - EVT_SWITCH(MapVar(10)) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, 3, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00B9) - EVT_CALL(InterpNpcYaw, 3, 90, 0) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, 0, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) - EVT_CALL(InterpNpcYaw, 0, 90, 0) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) - EVT_CALL(InterpNpcYaw, 1, 270, 0) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, 2, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) - EVT_CALL(InterpNpcYaw, 2, 270, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(80245004) = { - EVT_SWITCH(MapVar(10)) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, 3, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00BA) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, 0, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, 1, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, 2, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) - EVT_END_SWITCH - EVT_CALL(SetNpcVar, 3, 0, 1) - EVT_WAIT(5) - EVT_EXEC(N(802445D4)) - EVT_RETURN - EVT_END -}; - -EvtScript N(80245108) = { - EVT_IF_GE(GB_StoryProgress, 52) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802D2C14, 1) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_100)), TRUE) - EVT_CALL(AdjustCam, 0, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_EXEC_WAIT(N(80244E2C)) - EVT_SWITCH(AreaByte(7)) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(80244ED0)) - EVT_ADD(AreaByte(7), 1) - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(80245004)) - EVT_END_SWITCH - EVT_CALL(func_802D2C14, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(80245228) = { - EVT_IF_EQ(MapVar(10), -1) - EVT_SET(MapVar(10), 0) - EVT_EXEC_WAIT(N(80245108)) - EVT_SET(MapVar(10), -1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(8024527C) = { - EVT_IF_EQ(MapVar(10), -1) - EVT_SET(MapVar(10), 1) - EVT_EXEC_WAIT(N(80245108)) - EVT_SET(MapVar(10), -1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(802452D0) = { - EVT_IF_EQ(MapVar(10), -1) - EVT_SET(MapVar(10), 2) - EVT_EXEC_WAIT(N(80245108)) - EVT_SET(MapVar(10), -1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80245324) = { - EVT_IF_EQ(MapVar(10), -1) - EVT_SET(MapVar(10), 3) - EVT_EXEC_WAIT(N(80245108)) - EVT_SET(MapVar(10), -1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80245378) = { - EVT_IF_GE(GB_StoryProgress, 52) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(8.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamDistance, 0, 300) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(80244E2C)) - EVT_IF_EQ(AreaByte(7), 0) - EVT_EXEC_WAIT(N(80244ED0)) - EVT_ADD(AreaByte(7), 1) - EVT_CALL(ResetCam, 0, EVT_FLOAT(4.0)) - EVT_ELSE - EVT_EXEC_WAIT(N(80245004)) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(802454D4) = { - EVT_IF_EQ(MapVar(10), -1) - EVT_SET(MapVar(10), 0) - EVT_CALL(GetNpcPos, 3, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(80245378)) - EVT_SET(MapVar(10), -1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80245544) = { - EVT_IF_EQ(MapVar(10), -1) - EVT_SET(MapVar(10), 1) - EVT_CALL(GetNpcPos, 0, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(80245378)) - EVT_SET(MapVar(10), -1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(802455B4) = { - EVT_IF_EQ(MapVar(10), -1) - EVT_SET(MapVar(10), 2) - EVT_CALL(GetNpcPos, 1, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(80245378)) - EVT_SET(MapVar(10), -1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80245624) = { - EVT_IF_EQ(MapVar(10), -1) - EVT_SET(MapVar(10), 3) - EVT_CALL(GetNpcPos, 2, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(80245378)) - EVT_SET(MapVar(10), -1) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -Vec4f N(triggerCoord_80245694) = { 5.0f, 0.0f, -10.0, 0.0f }; - -Vec4f N(triggerCoord_802456A4) = { -5.0f, 0.0f, -20.0f, 0.0f }; - -Vec4f N(triggerCoord_802456B4) = { 50.0f, 0.0f, -10.0, 0.0f }; - -Vec4f N(triggerCoord_802456C4) = { 105.0f, 0.0f, -10.0, 0.0f }; - -EvtScript N(802456D4) = { - EVT_SET(MapVar(10), -1) - EVT_BIND_TRIGGER(N(80245228), TRIGGER_WALL_HAMMER, 23, 1, 0) - EVT_BIND_TRIGGER(N(80245228), TRIGGER_WALL_HAMMER, 19, 1, 0) - EVT_BIND_TRIGGER(N(802454D4), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_802456A4)), 1, 0) - EVT_BIND_TRIGGER(N(80245544), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_80245694)), 1, 0) - EVT_BIND_TRIGGER(N(802452D0), TRIGGER_WALL_HAMMER, 22, 1, 0) - EVT_BIND_TRIGGER(N(802455B4), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_802456B4)), 1, 0) - EVT_BIND_TRIGGER(N(80245324), TRIGGER_WALL_HAMMER, 18, 1, 0) - EVT_BIND_TRIGGER(N(80245624), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_802456C4)), 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_802457D4) = { - EVT_SWITCH(AreaByte(6)) - EVT_CASE_EQ(0) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B6) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BC) - EVT_END_IF - EVT_ADD(AreaByte(6), 1) - EVT_CASE_EQ(1) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B7) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BD) - EVT_END_IF - EVT_ADD(AreaByte(6), 1) - EVT_CASE_EQ(2) - EVT_CALL(AdjustCam, 0, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-9.0)) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B8) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(15) - EVT_CALL(EndSpeech, -1, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(15) - EVT_CALL(EndSpeech, -1, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0) - EVT_END_IF - EVT_CALL(SetNpcVar, 3, 0, 1) - EVT_WAIT(5) - EVT_EXEC(N(802445D4)) - EVT_CALL(BindNpcInteract, 0, 0) - EVT_CALL(BindNpcInteract, 1, 0) - EVT_CALL(BindNpcInteract, 2, 0) - EVT_CALL(BindNpcInteract, 3, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80245AA8) = { - EVT_IF_LT(GB_StoryProgress, 52) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80244B3C))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_802457D4))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80244C84))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80245B30) = { - EVT_IF_LT(GB_StoryProgress, 52) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80244C84))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80245B90) = { - EVT_IF_LT(GB_StoryProgress, 52) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_802457D4))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80244C84))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80245C04) = { - EVT_IF_LT(GB_StoryProgress, 52) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_802457D4))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80244C84))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80245C78) = { - EVT_IF_LT(GB_StoryProgress, 52) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_802457D4))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80244C84))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80245CEC)[] = { - { - .id = NPC_LAKITU0, - .settings = &N(npcSettings_80243F10), - .pos = { 0.0f, 15.0f, 60.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_400000, - .init = &N(init_80245B90), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 25, - .itemDrops = { - { ITEM_SUPER_SHROOM, 2, 0 }, - { ITEM_MAPLE_SYRUP, 2, 0 }, - { ITEM_THUNDER_RAGE, 2, 0 }, - { ITEM_STOP_WATCH, 2, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(3), - .maxCoinBonus = 2, - }, - .animations = { - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim02, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - }, - .tattle = MSG_NpcTattle_PuffPuffOperator, - }, - { - .id = NPC_LAKITU1, - .settings = &N(npcSettings_80243F10), - .pos = { 65.0f, 15.0f, 60.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_400000, - .init = &N(init_80245C04), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 25, - .itemDrops = { - { ITEM_SUPER_SHROOM, 2, 0 }, - { ITEM_MAPLE_SYRUP, 2, 0 }, - { ITEM_THUNDER_RAGE, 2, 0 }, - { ITEM_STOP_WATCH, 2, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(3), - .maxCoinBonus = 2, - }, - .animations = { - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim02, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - }, - .tattle = MSG_NpcTattle_PuffPuffOperator, - }, - { - .id = NPC_LAKITU2, - .settings = &N(npcSettings_80243F10), - .pos = { 135.0f, 15.0f, 35.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_400000, - .init = &N(init_80245C78), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 25, - .itemDrops = { - { ITEM_SUPER_SHROOM, 2, 0 }, - { ITEM_MAPLE_SYRUP, 2, 0 }, - { ITEM_THUNDER_RAGE, 2, 0 }, - { ITEM_STOP_WATCH, 2, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(3), - .maxCoinBonus = 2, - }, - .animations = { - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim02, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim04, - ANIM_Lakitu_Anim03, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - ANIM_Lakitu_Anim01, - }, - .tattle = MSG_NpcTattle_PuffPuffOperator, - }, - { - .id = NPC_MAGIKOOPA, - .settings = &N(npcSettings_80243F3C), - .pos = { -60.0f, 0.0f, 50.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_400000, - .init = &N(init_80245AA8), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 25, - .itemDrops = { - { ITEM_SUPER_SHROOM, 2, 0 }, - { ITEM_MAPLE_SYRUP, 2, 0 }, - { ITEM_THUNDER_RAGE, 2, 0 }, - { ITEM_STOP_WATCH, 2, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(3), - .maxCoinBonus = 2, - }, - .animations = { - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim04, - ANIM_Magikoopa_Yellow_Anim04, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - ANIM_Magikoopa_Yellow_Anim01, - }, - .tattle = MSG_NpcTattle_PuffPuffOperator, - }, - { - .id = NPC_FLYING_MAGIKOOPA, - .settings = &N(npcSettings_80243F3C), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_400000, - .init = &N(init_80245B30), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 25, - .itemDrops = { - { ITEM_SUPER_SHROOM, 2, 0 }, - { ITEM_MAPLE_SYRUP, 2, 0 }, - { ITEM_THUNDER_RAGE, 2, 0 }, - { ITEM_STOP_WATCH, 2, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(3), - .maxCoinBonus = 2, - }, - .animations = { - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim04, - ANIM_FlyingMagikoopa_Yellow_Anim04, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - ANIM_FlyingMagikoopa_Yellow_Anim01, - }, - .tattle = MSG_NpcTattle_PuffPuffOperator, - }, -}; - -NpcGroupList N(npcGroupList_8024669C) = { - NPC_GROUP(N(npcGroup_80245CEC), 0x180B, 0x06), - {}, -}; - -static s32 N(pad_66B4)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -#include "world/common/atomic/TexturePan.inc.c" - -ApiStatus N(func_8024030C_CDC9AC)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(1, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} - -ApiStatus N(func_80240340_CDC9E0)(Evt* script, s32 isInitialCall) { - EffectInstance* effect = (EffectInstance*) script->varTable[15]; - - effect->data.any[12] = 69; - effect->data.any[13] = 255; - effect->data.any[14] = 217; - effect->data.any[16] = 176; - effect->data.any[17] = 254; - effect->data.any[18] = 124; - return ApiStatus_DONE2; -} - -#include "common/CosInterpMinMax.inc.c" diff --git a/src/world/area_flo/flo_18/CDCBD0.c b/src/world/area_flo/flo_18/CDCBD0.c deleted file mode 100644 index d6c7de4a5c..0000000000 --- a/src/world/area_flo/flo_18/CDCBD0.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "flo_18.h" - -#include "world/common/todo/UnkFunc42.inc.c" diff --git a/src/world/area_flo/flo_18/flo_18.h b/src/world/area_flo/flo_18/flo_18.h index 65e911add9..a5b59777f9 100644 --- a/src/world/area_flo/flo_18/flo_18.h +++ b/src/world/area_flo/flo_18/flo_18.h @@ -2,23 +2,39 @@ /// @brief Flower Fields - (NE) Puff Puff Machine #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_18_shape.h" +#include "mapfs/flo_18_hit.h" + +#include "sprite/npc/WorldLakilester.h" + +enum { + NPC_Lakitu_01 = 0, + NPC_Lakitu_02 = 1, + NPC_Lakitu_03 = 2, + NPC_Magikoopa = 3, + NPC_FlyingMagikoopa = 4, +}; + +enum { + MF_HitGuardedMachine = MapFlag(1), + MF_MachineShaking = MapFlag(2), + MF_MachineBeingDamaged = MapFlag(3), +}; + +enum { + MV_ReactingNpc = MapVar(10), +}; + #define NAMESPACE flo_18 -ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanSmooth)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanStepped)(Evt* script, s32 isInitialCall); -ApiStatus N(CosInterpMinMax)(Evt* script, s32 isInitialCall); -ApiStatus N(func_8024030C_CDC9AC)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240340_CDC9E0)(Evt* script, s32 isInitialCall); - -extern NpcGroupList N(npcGroupList_8024669C); -extern EvtScript N(802436BC); -extern EvtScript N(80244058); -extern EvtScript N(802456D4); -extern EvtScript N(80247024); -extern EvtScript N(main); -extern EvtScript N(unkFloatFunc); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_SetupFoliage); +extern EvtScript N(EVS_SetupMachine); +extern EvtScript N(EVS_SetupMachineDamageReactions); +extern EvtScript N(EVS_Scene_LakilesterLikesBeingGood); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_18/flo_18_0_header.c b/src/world/area_flo/flo_18/flo_18_0_header.c new file mode 100644 index 0000000000..a82db552dd --- /dev/null +++ b/src/world/area_flo/flo_18/flo_18_0_header.c @@ -0,0 +1,14 @@ +#include "flo_18.h" + +EntryList N(Entrances) = { + [flo_18_ENTRY_0] { -320.0, 0.0, 0.0, 90.0 }, + [flo_18_ENTRY_1] { 36.0, 0.0, 40.0, 270.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_18 }, +}; diff --git a/src/world/area_flo/flo_18/flo_18_1_music.c b/src/world/area_flo/flo_18/flo_18_1_music.c new file mode 100644 index 0000000000..852d0ffa0d --- /dev/null +++ b/src/world/area_flo/flo_18/flo_18_1_music.c @@ -0,0 +1,13 @@ +#include "flo_18.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_PUFF_PUFF_MACHINE, 0, 8) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o126, SOUND_80000025, 0) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_18/flo_18_2_main.c b/src/world/area_flo/flo_18/flo_18_2_main.c new file mode 100644 index 0000000000..a52b73935a --- /dev/null +++ b/src/world/area_flo/flo_18/flo_18_2_main.c @@ -0,0 +1,80 @@ +#include "flo_18.h" +#include "effects.h" + +#include "world/common/atomic/TexturePan.inc.c" +#include "world/common/atomic/TexturePan.data.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_17_1) = EVT_EXIT_WALK(60, flo_18_ENTRY_0, "flo_17", flo_17_ENTRY_1); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_RETURN + EVT_END +}; + +LavaReset N(SafeFloorColliders)[] = { + { .colliderID = COLLIDER_o138, .pos = { -200.0, 0.0, 120.0 }}, + { .colliderID = COLLIDER_o140, .pos = { 0.0, 0.0, 120.0 }}, + { .colliderID = COLLIDER_o142, .pos = { 170.0, 0.0, 120.0 }}, + { .colliderID = -1 } +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC(N(EVS_SetupFoliage)) + EVT_EXEC(N(EVS_SetupMachine)) + EVT_EXEC(N(EVS_SetupMachineDamageReactions)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o44, SURFACE_TYPE_SPIKES) + EVT_THREAD + EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) + EVT_END_THREAD + EVT_CALL(EnableTexPanning, MODEL_o48, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o50, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o52, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o54, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o58, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o60, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o49, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o53, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o57, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o59, TRUE) + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_1) + TEX_PAN_PARAMS_STEP( -140, 0, 0, 0) + TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_2) + TEX_PAN_PARAMS_STEP( -200, 0, 0, 0) + TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_18_ENTRY_0) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_ELSE + EVT_EXEC(N(EVS_Scene_LakilesterLikesBeingGood)) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_END_IF + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_18/flo_18_3_machine.c b/src/world/area_flo/flo_18/flo_18_3_machine.c new file mode 100644 index 0000000000..0c31372aef --- /dev/null +++ b/src/world/area_flo/flo_18/flo_18_3_machine.c @@ -0,0 +1,767 @@ +#include "flo_18.h" +#include "effects.h" + +enum { + DAMAGE_PART_LEFT_SIDE, + DAMAGE_PART_RIGHT_SIDE, + DAMAGE_PART_PROTRUSTIONS, + DAMAGE_PART_LEVER, + DAMAGE_PART_SMOKE_STACK, +}; + +API_CALLABLE(N(SetMachineLightningColor)) { + EffectInstance* effect = (EffectInstance*) script->varTable[15]; + + effect->data.lightningBolt->outerColor.r = 69; + effect->data.lightningBolt->outerColor.g = 255; + effect->data.lightningBolt->outerColor.b = 217; + effect->data.lightningBolt->innerColor.r = 176; + effect->data.lightningBolt->innerColor.g = 254; + effect->data.lightningBolt->innerColor.b = 124; + return ApiStatus_DONE2; +} + +EvtScript N(EVS_AnimateMachineLightning) = { + EVT_SET_GROUP(EVT_GROUP_0B) + EVT_LOOP(0) + EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) + EVT_CALL(N(SetMachineLightningColor)) + EVT_WAIT(4) + EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) + EVT_CALL(N(SetMachineLightningColor)) + EVT_WAIT(4) + EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_SET(LVar0, 6) + EVT_LOOP(5) + EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) + EVT_CALL(N(SetMachineLightningColor)) + EVT_WAIT(LVar0) + EVT_ADD(LVar0, 2) + EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) + EVT_CALL(N(SetMachineLightningColor)) + EVT_WAIT(LVar0) + EVT_ADD(LVar0, 2) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +#include "common/CosInterpMinMax.inc.c" + +EvtScript N(EVS_UpdateSmokeParticle) = { + EVT_CALL(EnableModel, LVarF, TRUE) + EVT_SET(LVarE, 159) + EVT_LOOP(LVarE) + EVT_ADDF(LVar3, 0) + EVT_ADDF(LVar4, EVT_FLOAT(0.0)) + EVT_SETF(LVar5, EVT_FLOAT(0.01)) + EVT_ADDF(LVar0, LVar3) + EVT_ADDF(LVar1, LVar4) + EVT_ADDF(LVar2, LVar5) + EVT_MULF(LVar6, EVT_FLOAT(1.01)) + EVT_ADDF(LVar7, EVT_FLOAT(0.01)) + EVT_SETF(LVar8, LVar6) + EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 15, 0, 0) + EVT_ADDF(LVar8, LVarA) + EVT_SETF(LVar9, LVar7) + EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 20, 0, 90) + EVT_ADDF(LVar9, LVarA) + EVT_SETF(LVarA, LVar0) + EVT_MULF(LVarA, EVT_FLOAT(10.0)) + EVT_CALL(TranslateModel, LVarF, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, LVarF, LVar8, LVar9, 1) + EVT_CALL(RotateModel, LVarF, LVarA, 0, 0, 1) + EVT_WAIT(1) + EVT_END_LOOP + EVT_CALL(EnableModel, LVarF, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_ManageSmoke) = { + EVT_SET(LVarE, 0) + EVT_LABEL(0) + EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) + EVT_RETURN + EVT_END_IF + EVT_SETF(LVar0, EVT_FLOAT(132.0)) + EVT_SETF(LVar1, EVT_FLOAT(90.0)) + EVT_SETF(LVar2, EVT_FLOAT(-30.0)) + EVT_CALL(RandInt, 100, LVar3) + EVT_ADDF(LVar3, -50) + EVT_DIVF(LVar3, EVT_FLOAT(200.0)) + EVT_SETF(LVar4, EVT_FLOAT(1.0)) + EVT_SETF(LVar5, 0) + EVT_SETF(LVar6, EVT_FLOAT(0.296875)) + EVT_SETF(LVar7, EVT_FLOAT(0.296875)) + EVT_SET(LVarF, LVarE) + EVT_ADD(LVarF, CLONED_MODEL(0)) + EVT_EXEC(N(EVS_UpdateSmokeParticle)) + EVT_ADD(LVarE, 1) + EVT_IF_GE(LVarE, 16) + EVT_SET(LVarE, 0) + EVT_END_IF + EVT_WAIT(10) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_ShakeMachine) = { + EVT_IF_EQ(MF_MachineShaking, TRUE) + EVT_RETURN + EVT_END_IF + EVT_SET(MF_MachineShaking, TRUE) + EVT_SET(LVarF, 0) + EVT_LOOP(12) + EVT_CALL(RandInt, 80, LVar0) + EVT_SUB(LVar0, 40) + EVT_CALL(RandInt, 50, LVar1) + EVT_CALL(RandInt, 50, LVar2) + EVT_SUB(LVar2, 25) + EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar1, LVar2, 5, 10, 1, 1) + EVT_ADD(LVarF, 1) + EVT_CALL(N(CosInterpMinMax), LVarF, LVarE, EVT_FLOAT(1.0), EVT_FLOAT(1.09375), 2, 0, 0) + EVT_CALL(N(CosInterpMinMax), LVarF, LVarD, EVT_FLOAT(1.09375), EVT_FLOAT(1.0), 2, 0, 0) + EVT_SETF(LVar0, LVarE) + EVT_SETF(LVar1, LVarD) + EVT_SETF(LVar2, LVarE) + EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) + EVT_CALL(ScaleModel, MODEL_o115, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o116, LVar0, LVar1, LVar2) + EVT_END_IF + EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) + EVT_CALL(ScaleModel, MODEL_o117, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o118, LVar0, LVar1, LVar2) + EVT_END_IF + EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) + EVT_CALL(ScaleModel, MODEL_o119, LVar0, LVar1, LVar2) + EVT_END_IF + EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) + EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) + EVT_CALL(ScaleModel, MODEL_o120, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o121, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o122, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o123, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o124, LVar0, LVar1, LVar2) + EVT_END_IF + EVT_END_IF + EVT_CALL(ScaleModel, MODEL_o113, LVar0, LVar1, LVar2) + EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) + EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) + EVT_CALL(ScaleModel, MODEL_o100, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o99, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o125, LVar0, LVar1, LVar2) + EVT_END_IF + EVT_END_IF + EVT_CALL(ScaleModel, MODEL_o92, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o93, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o94, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o95, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o91, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o114, LVar0, LVar1, LVar2) + EVT_SUBF(LVar0, EVT_FLOAT(1.046875)) + EVT_MULF(LVar0, EVT_FLOAT(100.0)) + EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) + EVT_CALL(RotateModel, MODEL_o115, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o116, LVar0, 0, 0, 1) + EVT_END_IF + EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) + EVT_CALL(RotateModel, MODEL_o117, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o118, LVar0, 0, 0, 1) + EVT_END_IF + EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) + EVT_CALL(RotateModel, MODEL_o119, LVar0, 0, 0, 1) + EVT_END_IF + EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) + EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) + EVT_CALL(RotateModel, MODEL_o120, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o121, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o122, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o123, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o124, LVar0, 0, 0, 1) + EVT_END_IF + EVT_END_IF + EVT_CALL(RotateModel, MODEL_o113, LVar0, 0, 0, 1) + EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) + EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) + EVT_CALL(RotateModel, MODEL_o100, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o99, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o125, LVar0, 0, 0, 1) + EVT_END_IF + EVT_END_IF + EVT_CALL(RotateModel, MODEL_o92, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o93, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o94, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o95, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o91, LVar0, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o114, LVar0, 0, 0, 1) + EVT_WAIT(1) + EVT_END_LOOP + EVT_SETF(LVar0, 1) + EVT_SETF(LVar1, 1) + EVT_SETF(LVar2, 1) + EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) + EVT_CALL(ScaleModel, MODEL_o115, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o116, LVar0, LVar1, LVar2) + EVT_END_IF + EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) + EVT_CALL(ScaleModel, MODEL_o117, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o118, LVar0, LVar1, LVar2) + EVT_END_IF + EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) + EVT_CALL(ScaleModel, MODEL_o119, LVar0, LVar1, LVar2) + EVT_END_IF + EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) + EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) + EVT_CALL(ScaleModel, MODEL_o120, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o121, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o122, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o123, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o124, LVar0, LVar1, LVar2) + EVT_END_IF + EVT_END_IF + EVT_CALL(ScaleModel, MODEL_o113, LVar0, LVar1, LVar2) + EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) + EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) + EVT_CALL(ScaleModel, MODEL_o100, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o99, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o125, LVar0, LVar1, LVar2) + EVT_END_IF + EVT_END_IF + EVT_CALL(ScaleModel, MODEL_o92, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o93, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o94, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o95, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o91, LVar0, LVar1, LVar2) + EVT_CALL(ScaleModel, MODEL_o114, LVar0, LVar1, LVar2) + EVT_WAIT(1) + EVT_SET(MF_MachineShaking, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_DamagedLeftOnce) = { + EVT_SETF(LVar0, 0) + EVT_SETF(LVar1, 0) + EVT_SETF(LVar2, 0) + EVT_SETF(LVar3, EVT_FLOAT(-1.0)) + EVT_SETF(LVar4, EVT_FLOAT(0.0)) + EVT_SETF(LVar5, EVT_FLOAT(3.0)) + EVT_THREAD + EVT_WAIT(10) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o130, SOUND_1E6, 0) + EVT_END_THREAD + EVT_LOOP(300) + EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) + EVT_ADDF(LVar5, EVT_FLOAT(0.09375)) + EVT_ADDF(LVar0, LVar3) + EVT_ADDF(LVar1, LVar4) + EVT_ADDF(LVar2, LVar5) + EVT_IF_LT(LVar1, -10) + EVT_SETF(LVar1, EVT_FLOAT(-10.0)) + EVT_SETF(LVar3, EVT_FLOAT(0.0)) + EVT_SETF(LVar4, EVT_FLOAT(0.0)) + EVT_IF_GE(LVar2, 80) + EVT_GOTO(0) + EVT_END_IF + EVT_END_IF + EVT_END_IF + EVT_CALL(TranslateModel, MODEL_o115, -78, 19, 2) + EVT_CALL(TranslateModel, MODEL_o116, -78, 19, 2) + EVT_CALL(TranslateModel, MODEL_o115, LVar0, LVar1, 0) + EVT_CALL(TranslateModel, MODEL_o116, LVar0, LVar1, 0) + EVT_CALL(RotateModel, MODEL_o115, LVar2, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o116, LVar2, 0, 0, 1) + EVT_CALL(TranslateModel, MODEL_o115, 78, -19, -2) + EVT_CALL(TranslateModel, MODEL_o116, 78, -19, -2) + EVT_WAIT(1) +EVT_END_LOOP +EVT_LABEL(0) +EVT_WAIT(30) +EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) +EVT_RETURN +EVT_END +}; + +EvtScript N(EVS_DamagedRightOnce) = { + EVT_SETF(LVar0, 0) + EVT_SETF(LVar1, 0) + EVT_SETF(LVar2, 0) + EVT_SETF(LVar3, EVT_FLOAT(0.0)) + EVT_SETF(LVar4, EVT_FLOAT(0.0)) + EVT_SETF(LVar5, EVT_FLOAT(-5.0)) + EVT_THREAD + EVT_WAIT(12) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o175, SOUND_1E7, 0) + EVT_END_THREAD + EVT_LOOP(300) + EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) + EVT_ADDF(LVar0, LVar3) + EVT_ADDF(LVar1, LVar4) + EVT_ADDF(LVar2, LVar5) + EVT_IF_LT(LVar2, -45) + EVT_SET(LVar5, 5) + EVT_END_IF + EVT_IF_GT(LVar2, 0) + EVT_SET(LVar2, 0) + EVT_SET(LVar3, 5) + EVT_END_IF + EVT_IF_LT(LVar1, -25) + EVT_SET(LVar4, 0) + EVT_SET(LVar1, -25) + EVT_END_IF + EVT_IF_GT(LVar0, 90) + EVT_GOTO(0) + EVT_END_IF + EVT_CALL(TranslateModel, MODEL_o117, 50, 28, 27) + EVT_CALL(TranslateModel, MODEL_o118, 50, 28, 27) + EVT_CALL(TranslateModel, MODEL_o117, 0, LVar1, 1) + EVT_CALL(TranslateModel, MODEL_o118, 0, LVar1, 1) + EVT_CALL(RotateModel, MODEL_o117, LVar0, 1, 0, 0) + EVT_CALL(RotateModel, MODEL_o118, LVar0, 1, 0, 0) + EVT_CALL(RotateModel, MODEL_o117, LVar2, 0, 0, 1) + EVT_CALL(RotateModel, MODEL_o118, LVar2, 0, 0, 1) + EVT_CALL(TranslateModel, MODEL_o117, -50, -28, -27) + EVT_CALL(TranslateModel, MODEL_o118, -50, -28, -27) + EVT_WAIT(1) + EVT_END_LOOP + EVT_LABEL(0) + EVT_WAIT(30) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_DamagedLeftTwice) = { + EVT_SETF(LVar2, 0) + EVT_SETF(LVar1, 0) + EVT_SETF(LVar0, 0) + EVT_SETF(LVar5, EVT_FLOAT(0.0)) + EVT_THREAD + EVT_WAIT(15) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o174, SOUND_1E7, 0) + EVT_END_THREAD + EVT_LOOP(300) + EVT_ADDF(LVar5, EVT_FLOAT(0.5)) + EVT_ADDF(LVar2, LVar5) + EVT_IF_GE(LVar2, 80) + EVT_SETF(LVar2, 80) + EVT_MULF(LVar5, EVT_FLOAT(-0.5)) + EVT_IF_EQ(LVar5, 0) + EVT_GOTO(0) + EVT_END_IF + EVT_END_IF + EVT_CALL(TranslateModel, MODEL_o119, -55, 5, 16) + EVT_CALL(TranslateModel, MODEL_o119, LVar0, LVar1, 0) + EVT_CALL(RotateModel, MODEL_o119, LVar2, 0, 0, 1) + EVT_CALL(TranslateModel, MODEL_o119, 55, -5, -16) + EVT_WAIT(1) + EVT_END_LOOP + EVT_LABEL(0) + EVT_WAIT(30) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_DamagedRightTwice) = { + EVT_SETF(LVar2, 0) + EVT_SETF(LVar1, 0) + EVT_SETF(LVar0, 0) + EVT_SETF(LVar5, EVT_FLOAT(0.0)) + EVT_THREAD + EVT_WAIT(15) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o127, SOUND_1E7, 0) + EVT_END_THREAD + EVT_LOOP(300) + EVT_ADDF(LVar5, EVT_FLOAT(0.5)) + EVT_ADDF(LVar2, LVar5) + EVT_IF_GE(LVar2, 80) + EVT_SETF(LVar2, 80) + EVT_MULF(LVar5, EVT_FLOAT(-0.5)) + EVT_IF_EQ(LVar5, 0) + EVT_GOTO(0) + EVT_END_IF + EVT_END_IF + EVT_CALL(TranslateModel, MODEL_o122, 60, 0, 16) + EVT_CALL(RotateModel, MODEL_o122, LVar2, 0, 0, -1) + EVT_CALL(TranslateModel, MODEL_o122, -60, 0, -16) + EVT_CALL(TranslateModel, MODEL_o120, 0, 0, 27) + EVT_CALL(TranslateModel, MODEL_o121, 0, 0, 27) + EVT_CALL(RotateModel, MODEL_o120, LVar2, 1, 0, 0) + EVT_CALL(RotateModel, MODEL_o121, LVar2, 1, 0, 0) + EVT_CALL(TranslateModel, MODEL_o120, 0, 0, -27) + EVT_CALL(TranslateModel, MODEL_o121, 0, 0, -27) + EVT_CALL(TranslateModel, MODEL_o123, 0, 0, -41) + EVT_CALL(TranslateModel, MODEL_o124, 0, 0, -41) + EVT_CALL(RotateModel, MODEL_o123, LVar2, -1, 0, 0) + EVT_CALL(RotateModel, MODEL_o124, LVar2, -1, 0, 0) + EVT_CALL(TranslateModel, MODEL_o123, 0, 0, 41) + EVT_CALL(TranslateModel, MODEL_o124, 0, 0, 41) + EVT_WAIT(1) + EVT_END_LOOP + EVT_LABEL(0) + EVT_WAIT(30) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_BreakSmokestack) = { + EVT_SETF(LVar0, 0) + EVT_SETF(LVar1, 0) + EVT_SETF(LVar2, 0) + EVT_SETF(LVar3, EVT_FLOAT(-1.0)) + EVT_SETF(LVar4, EVT_FLOAT(0.0)) + EVT_SETF(LVar5, EVT_FLOAT(3.0)) + EVT_THREAD + EVT_WAIT(15) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o131, SOUND_1E6, 0) + EVT_END_THREAD + EVT_LOOP(300) + EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) + EVT_ADDF(LVar5, EVT_FLOAT(0.09375)) + EVT_ADDF(LVar0, LVar3) + EVT_ADDF(LVar1, LVar4) + EVT_ADDF(LVar2, LVar5) + EVT_IF_LT(LVar1, -25) + EVT_SETF(LVar1, EVT_FLOAT(-25.0)) + EVT_SETF(LVar3, EVT_FLOAT(0.0)) + EVT_SETF(LVar4, EVT_FLOAT(0.0)) + EVT_IF_GE(LVar2, 80) + EVT_GOTO(0) + EVT_END_IF + EVT_END_IF + EVT_END_IF + EVT_CALL(TranslateModel, MODEL_o100, 124, 17, 3) + EVT_CALL(TranslateModel, MODEL_o100, LVar0, LVar1, 0) + EVT_CALL(RotateModel, MODEL_o100, LVar2, 0, 0, -1) + EVT_CALL(TranslateModel, MODEL_o100, -124, -17, -3) + EVT_WAIT(1) +EVT_END_LOOP +EVT_LABEL(0) +EVT_RETURN +EVT_END +}; + +EvtScript N(EVS_BreakAntenna) = { + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) + EVT_SETF(LVar0, 0) + EVT_SETF(LVar1, 0) + EVT_SETF(LVar2, 0) + EVT_SETF(LVar3, EVT_FLOAT(3.0)) + EVT_SETF(LVar4, EVT_FLOAT(1.0)) + EVT_SETF(LVar5, EVT_FLOAT(5.0)) + EVT_THREAD + EVT_WAIT(15) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o126, SOUND_1E6, 0) + EVT_END_THREAD + EVT_LOOP(300) + EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) + EVT_ADDF(LVar0, LVar3) + EVT_ADDF(LVar1, LVar4) + EVT_ADDF(LVar2, LVar5) + EVT_IF_LE(LVar1, -40) + EVT_SETF(LVar1, -40) + EVT_MULF(LVar4, EVT_FLOAT(-0.5)) + EVT_IF_LE(LVar4, 1) + EVT_GOTO(1) + EVT_END_IF + EVT_END_IF + EVT_IF_GE(LVar2, 60) + EVT_SETF(LVar2, 60) + EVT_SETF(LVar5, 0) + EVT_END_IF + EVT_CALL(TranslateModel, MODEL_o99, -34, 50, 10) + EVT_CALL(TranslateModel, MODEL_o125, -34, 50, 10) + EVT_CALL(TranslateModel, MODEL_o99, 0, LVar1, LVar0) + EVT_CALL(RotateModel, MODEL_o99, LVar2, 0, 0, 1) + EVT_CALL(TranslateModel, MODEL_o125, 0, LVar1, LVar0) + EVT_CALL(RotateModel, MODEL_o125, LVar2, 0, 0, 1) + EVT_CALL(TranslateModel, MODEL_o99, 34, -50, -10) + EVT_CALL(TranslateModel, MODEL_o125, 34, -50, -10) + EVT_WAIT(1) + EVT_END_LOOP + EVT_LABEL(1) + EVT_WAIT(30) + EVT_RETURN + EVT_END +}; + +Vec3i N(SmokeBurstPositions)[] = { + { 0, 0, 27 }, + { 80, 35, 27 }, + { 60, 10, 27 }, + { 30, 0, 27 }, + { 80, 35, 27 }, + { 30, 0, 27 }, + { 85, 0, 27 }, + { 80, 35, 27 }, +}; + +EvtScript N(EVS_DamageMachine) = { + #define LABEL_DONE 0 + EVT_SET(LVarA, LVar0) // in: damage part + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_IF_LT(LVar0, -210) + EVT_RETURN + EVT_END_IF + EVT_CALL(PlaySound, SOUND_1E5) + EVT_EXEC_WAIT(N(EVS_ShakeMachine)) + EVT_SET(LVar0, LVarA) + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + EVT_SET(MF_HitGuardedMachine, TRUE) + EVT_RETURN + EVT_END_IF + EVT_IF_EQ(MF_MachineBeingDamaged, TRUE) + EVT_RETURN + EVT_END_IF + // check damage type + EVT_SET(MF_MachineBeingDamaged, TRUE) + EVT_IF_GT(LVar0, DAMAGE_PART_PROTRUSTIONS) + EVT_GOTO(LABEL_DONE) + EVT_END_IF + EVT_IF_EQ(LVar0, DAMAGE_PART_PROTRUSTIONS) + EVT_GOTO(11) + EVT_END_IF + EVT_IF_EQ(LVar0, DAMAGE_PART_LEFT_SIDE) + EVT_LABEL(11) + EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) + EVT_SET(GB_FLO18_MachineDamage_Left, 1) + EVT_EXEC(N(EVS_DamagedLeftOnce)) + EVT_GOTO(LABEL_DONE) + EVT_END_IF + EVT_END_IF + EVT_IF_EQ(LVar0, DAMAGE_PART_RIGHT_SIDE) + EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) + EVT_SET(GB_FLO18_MachineDamage_Right, 1) + EVT_EXEC(N(EVS_DamagedRightOnce)) + EVT_GOTO(LABEL_DONE) + EVT_END_IF + EVT_END_IF + EVT_IF_EQ(LVar0, DAMAGE_PART_LEFT_SIDE) + EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 1) + EVT_SET(GB_FLO18_MachineDamage_Left, 2) + EVT_EXEC(N(EVS_DamagedLeftTwice)) + EVT_GOTO(LABEL_DONE) + EVT_END_IF + EVT_END_IF + EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 2) + EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 1) + EVT_SET(GB_FLO18_MachineDamage_Right, 2) + EVT_EXEC(N(EVS_DamagedRightTwice)) + EVT_GOTO(LABEL_DONE) + EVT_END_IF + EVT_END_IF + // check if machine is fully broken (2 damage to each side) + EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 2) + EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 2) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 40, 0, 0) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 40, 0, 0) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_SET(GB_FLO18_MachineDamage_Right, 3) + EVT_EXEC_WAIT(N(EVS_ShakeMachine)) + EVT_EXEC_WAIT(N(EVS_ShakeMachine)) + EVT_EXEC_WAIT(N(EVS_ShakeMachine)) + EVT_WAIT(30) + EVT_CALL(GetModelCenter, MODEL_o113) + EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 50, LVar2, 100, 20, 0, 30) + EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 30, LVar2, 120, 20, 0, 30) + EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 10, LVar2, 100, 20, 0, 30) + EVT_WAIT(15) + EVT_THREAD + EVT_SET(LVar3, 6) + EVT_USE_BUF(EVT_PTR(N(SmokeBurstPositions))) + EVT_LOOP(ARRAY_COUNT(N(SmokeBurstPositions))) + EVT_BUF_READ3(LVar0, LVar1, LVar2) + EVT_CALL(PlaySoundAt, SOUND_190, 0, LVar0, LVar1, LVar2) + EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 6) + EVT_WAIT(2) + EVT_ADD(LVar1, 5) + EVT_CALL(PlaySoundAt, SOUND_190, 0, LVar0, LVar1, LVar2) + EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 2, 15) + EVT_WAIT(LVar3) + EVT_ADD(LVar3, 1) + EVT_END_LOOP + EVT_SETF(LVar4, EVT_FLOAT(2.0)) + EVT_LOOP(2) + EVT_USE_BUF(EVT_PTR(N(SmokeBurstPositions))) + EVT_LOOP(ARRAY_COUNT(N(SmokeBurstPositions))) + EVT_BUF_READ3(LVar0, LVar1, LVar2) + EVT_CALL(PlaySoundAt, SOUND_190, 0, LVar0, LVar1, LVar2) + EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 25) + EVT_WAIT(LVar3) + EVT_ADD(LVar3, LVar4) + EVT_ADDF(LVar4, EVT_FLOAT(0.5)) + EVT_END_LOOP + EVT_END_LOOP + EVT_END_THREAD + EVT_CALL(PlaySoundAt, SOUND_1A0, 0, 70, 40, 10) + EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 70, 40, 10, EVT_FLOAT(3.0), 30) + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(1.0)) + EVT_CALL(PlaySoundAt, SOUND_1A0, 0, 0, 30, 30) + EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 0, 30, 30, EVT_FLOAT(4.0), 40) + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0)) + EVT_EXEC_WAIT(N(EVS_BreakSmokestack)) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o126, SOUND_491, 0) + EVT_CALL(FadeOutMusic, 0, 1000) + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_WAIT(30) + EVT_EXEC_WAIT(N(EVS_BreakAntenna)) + EVT_SET(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(GotoMap, EVT_PTR("flo_15"), flo_15_ENTRY_1) + EVT_WAIT(70) + EVT_RETURN + EVT_END_IF + EVT_END_IF + EVT_LABEL(LABEL_DONE) + EVT_SET(MF_MachineBeingDamaged, FALSE) + EVT_RETURN + EVT_END +}; + +BombTrigger N(Machine_BombTrigger_01) = { + .pos = { 5.0f, 0.0f, -10.0f }, + .radius = 0.0f +}; + +BombTrigger N(Machine_BombTrigger_02) = { + .pos = { -5.0f, 0.0f, -20.0f }, + .radius = 0.0f +}; + +BombTrigger N(Machine_BombTrigger_03) = { + .pos = { 50.0f, 0.0f, -10.0f }, + .radius = 0.0f +}; + +BombTrigger N(Machine_BombTrigger_04) = { + .pos = { 105.0f, 0.0f, -10.0f }, + .radius = 0.0f +}; + +EvtScript N(EVS_SetupMachine) = { + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(EnableModel, MODEL_o101, FALSE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(EnableModel, MODEL_o115, FALSE) + EVT_CALL(EnableModel, MODEL_o116, FALSE) + EVT_CALL(EnableModel, MODEL_o117, FALSE) + EVT_CALL(EnableModel, MODEL_o118, FALSE) + EVT_CALL(EnableModel, MODEL_o119, FALSE) + EVT_CALL(EnableModel, MODEL_o120, FALSE) + EVT_CALL(EnableModel, MODEL_o121, FALSE) + EVT_CALL(EnableModel, MODEL_o122, FALSE) + EVT_CALL(EnableModel, MODEL_o123, FALSE) + EVT_CALL(EnableModel, MODEL_o124, FALSE) + EVT_CALL(EnableModel, MODEL_o100, FALSE) + EVT_CALL(EnableModel, MODEL_o99, FALSE) + EVT_CALL(EnableModel, MODEL_o125, FALSE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) + EVT_RETURN + EVT_END_IF + EVT_EXEC(N(EVS_AnimateMachineLightning)) + EVT_CALL(EnableModel, MODEL_o101, FALSE) + EVT_IF_GE(GB_FLO18_MachineDamage_Left, 1) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(EnableModel, MODEL_o115, FALSE) + EVT_CALL(EnableModel, MODEL_o116, FALSE) + EVT_END_IF + EVT_IF_GE(GB_FLO18_MachineDamage_Right, 1) + EVT_CALL(EnableModel, MODEL_o117, FALSE) + EVT_CALL(EnableModel, MODEL_o118, FALSE) + EVT_END_IF + EVT_IF_GE(GB_FLO18_MachineDamage_Left, 2) + EVT_CALL(EnableModel, MODEL_o119, FALSE) + EVT_END_IF + EVT_IF_GE(GB_FLO18_MachineDamage_Right, 2) + EVT_CALL(EnableModel, MODEL_o120, FALSE) + EVT_CALL(EnableModel, MODEL_o121, FALSE) + EVT_CALL(EnableModel, MODEL_o122, FALSE) + EVT_CALL(EnableModel, MODEL_o123, FALSE) + EVT_CALL(EnableModel, MODEL_o124, FALSE) + EVT_END_IF + EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) + EVT_CALL(EnableModel, MODEL_o100, FALSE) + EVT_CALL(EnableModel, MODEL_o99, FALSE) + EVT_CALL(EnableModel, MODEL_o125, FALSE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) + EVT_RETURN + EVT_END_IF + EVT_SET(LVar0, DAMAGE_PART_LEFT_SIDE) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o174, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_01)), 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_02)), 1, 0) + EVT_SET(LVar0, DAMAGE_PART_RIGHT_SIDE) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o127, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_03)), 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_04)), 1, 0) + EVT_SET(LVar0, DAMAGE_PART_LEVER) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o130, 1, 0) + EVT_SET(LVar0, DAMAGE_PART_SMOKE_STACK) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o131, 1, 0) + EVT_SET(LVar0, 0) + EVT_LOOP(16) + EVT_SET(LVar1, LVar0) + EVT_ADD(LVar1, CLONED_MODEL(0)) + EVT_ADD(LVar0, 1) + EVT_CALL(CloneModel, MODEL_o101, LVar1) + EVT_CALL(EnableModel, LVar1, FALSE) + EVT_END_LOOP + EVT_EXEC(N(EVS_ManageSmoke)) + EVT_CALL(EnableTexPanning, MODEL_o92, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o93, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o94, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o95, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o91, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o99, TRUE) + EVT_THREAD + EVT_SETF(LVarE, EVT_FLOAT(1.0)) + EVT_LABEL(0) + EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) + EVT_MULF(LVarE, EVT_FLOAT(0.953125)) + EVT_END_IF + EVT_ADDF(LVarF, LVarE) + EVT_IF_EQ(LVarF, 1080) + EVT_SETF(LVarF, 0) + EVT_END_IF + EVT_SET(LVar0, LVarF) + EVT_DIV(LVar0, 9) + EVT_MOD(LVar0, 4) + EVT_MUL(LVar0, 0x4000) + EVT_SET(LVar1, LVarF) + EVT_DIV(LVar1, 4) + EVT_MOD(LVar1, 2) + EVT_MUL(LVar1, 0x4000) + EVT_SET(LVar2, LVarF) + EVT_DIV(LVar2, 5) + EVT_MOD(LVar2, 2) + EVT_MUL(LVar2, 0x4000) + EVT_SET(LVar3, LVarF) + EVT_DIV(LVar3, 6) + EVT_MOD(LVar3, 2) + EVT_MUL(LVar3, 0x4000) + EVT_SET(LVar4, LVarF) + EVT_DIV(LVar4, 2) + EVT_MOD(LVar4, 2) + EVT_MUL(LVar4, 0x8000) + EVT_SET(LVar5, LVarF) + EVT_DIV(LVar5, 8) + EVT_MOD(LVar5, 2) + EVT_MUL(LVar5, 0x4000) + EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) + EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar1, 0) + EVT_CALL(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar2, 0) + EVT_CALL(SetTexPanOffset, TEX_PANNER_F, TEX_PANNER_MAIN, LVar3, 0) + EVT_CALL(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, LVar4, 0) + EVT_CALL(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_MAIN, LVar5, 0) + EVT_CALL(SetTexPanOffset, TEX_PANNER_9, TEX_PANNER_MAIN, LVar5, 0) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_END_THREAD + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_18/flo_18_4_npc.c b/src/world/area_flo/flo_18/flo_18_4_npc.c new file mode 100644 index 0000000000..2e2063b64e --- /dev/null +++ b/src/world/area_flo/flo_18/flo_18_4_npc.c @@ -0,0 +1,661 @@ +#include "flo_18.h" + +#include "world/common/todo/UnkFunc42.inc.c" + +#include "world/common/enemy/complete/Lakitu.h" +#include "world/common/enemy/complete/Magikoopa.h" + +NpcSettings N(NpcSettings_Lakitu) = { + .height = 32, + .radius = 24, + .level = 20, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, +}; + +NpcSettings N(NpcSettings_Magikoopa) = { + .height = 34, + .radius = 24, + .level = 26, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, +}; + +Vec3f N(RetreatPath_Magikoopa)[] = { + { -55.0, 15.0, 35.0 }, + { -155.0, 35.0, 35.0 }, + { -255.0, 75.0, 35.0 }, + { -355.0, 155.0, 35.0 }, + { -455.0, 315.0, 35.0 }, +}; + +Vec3f N(RetreatPath_Lakitu_01)[] = { + { -20.0, 15.0, 30.0 }, + { -120.0, 35.0, 30.0 }, + { -220.0, 75.0, 30.0 }, + { -320.0, 155.0, 30.0 }, + { -420.0, 315.0, 30.0 }, +}; + +Vec3f N(RetreatPath_Lakitu_02)[] = { + { 65.0, 15.0, 30.0 }, + { -35.0, 35.0, 30.0 }, + { -135.0, 75.0, 30.0 }, + { -235.0, 155.0, 30.0 }, + { -335.0, 315.0, 30.0 }, +}; + +Vec3f N(RetreatPath_Lakitu_03)[] = { + { 120.0, 15.0, 30.0 }, + { 20.0, 35.0, 30.0 }, + { -80.0, 75.0, 30.0 }, + { -180.0, 155.0, 30.0 }, + { -280.0, 315.0, 30.0 }, +}; + +EvtScript N(EVS_Scene_LakilesterLikesBeingGood) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePartnerAI, 0) + EVT_CALL(SetPlayerPos, 30, 0, 50) + EVT_CALL(InterpPlayerYaw, 90, 0) + EVT_CALL(SetNpcPos, NPC_PARTNER, 65, 0, 50) + EVT_WAIT(30) + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-8.5)) + EVT_CALL(GetCurrentPartnerID, LVar0) + EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) + EVT_IF_NE(LVar0, PARTNER_LAKILESTER) + EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) + EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) + EVT_ADD(LVar1, 20) + EVT_ADD(LVar2, 20) + EVT_ADD(LVar3, 20) + EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) + EVT_END_IF + EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) + EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) + EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C9) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_NodYes) + EVT_WAIT(10) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_WAIT(20) + EVT_CALL(EnablePartnerAI) + EVT_CALL(PutPartnerAway) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_GangRetreat) = { + EVT_THREAD + EVT_CALL(PlaySoundAtNpc, NPC_FlyingMagikoopa, SOUND_19E, 0) + EVT_CALL(SetNpcFlagBits, NPC_FlyingMagikoopa, NPC_FLAG_100, TRUE) + EVT_CALL(InterpNpcYaw, NPC_FlyingMagikoopa, 270, 0) + EVT_CALL(LoadPath, 60, EVT_PTR(N(RetreatPath_Magikoopa)), ARRAY_COUNT(N(RetreatPath_Magikoopa)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_FlyingMagikoopa, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_NE(LVar0, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_THREAD + EVT_WAIT(15) + EVT_THREAD + EVT_CALL(PlaySoundAtNpc, NPC_Lakitu_01, SOUND_19F, 0) + EVT_CALL(SetNpcFlagBits, NPC_Lakitu_01, NPC_FLAG_100, TRUE) + EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 270, 0) + EVT_CALL(LoadPath, 60, EVT_PTR(N(RetreatPath_Lakitu_01)), ARRAY_COUNT(N(RetreatPath_Lakitu_01)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_NE(LVar0, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_THREAD + EVT_THREAD + EVT_CALL(SetNpcFlagBits, NPC_Lakitu_02, NPC_FLAG_100, TRUE) + EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 270, 0) + EVT_CALL(LoadPath, 70, EVT_PTR(N(RetreatPath_Lakitu_02)), ARRAY_COUNT(N(RetreatPath_Lakitu_02)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_NE(LVar0, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_THREAD + EVT_CALL(PlaySoundAtNpc, NPC_Lakitu_03, SOUND_19F, 0) + EVT_CALL(SetNpcFlagBits, NPC_Lakitu_03, NPC_FLAG_100, TRUE) + EVT_CALL(InterpNpcYaw, NPC_Lakitu_03, 270, 0) + EVT_CALL(LoadPath, 80, EVT_PTR(N(RetreatPath_Lakitu_03)), ARRAY_COUNT(N(RetreatPath_Lakitu_03)), EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetNpcPos, NPC_Lakitu_03, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_NE(LVar0, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_ChargeAtPlayer) = { + EVT_WAIT(5) + EVT_CALL(IsPlayerWithin, 40, 0, 200, LVar0) + EVT_IF_EQ(LVar0, 0) + EVT_SET(LVar3, 45) + EVT_ELSE + EVT_SET(LVar3, 25) + EVT_END_IF + EVT_SET(LVar4, LVar3) + EVT_ADD(LVar4, -5) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_IF_GT(LVar2, -61) + EVT_CHILD_THREAD + EVT_CALL(SetNpcFlagBits, NPC_Lakitu_01, NPC_FLAG_100, TRUE) + EVT_CALL(NpcMoveTo, NPC_Lakitu_01, LVar0, 55, LVar3) + EVT_END_CHILD_THREAD + EVT_CHILD_THREAD + EVT_CALL(SetNpcFlagBits, NPC_Lakitu_02, NPC_FLAG_100, TRUE) + EVT_CALL(NpcMoveTo, NPC_Lakitu_02, LVar0, 55, LVar3) + EVT_END_CHILD_THREAD + EVT_CHILD_THREAD + EVT_CALL(SetNpcFlagBits, NPC_Lakitu_03, NPC_FLAG_100, TRUE) + EVT_CALL(NpcMoveTo, NPC_Lakitu_03, LVar0, 55, LVar3) + EVT_END_CHILD_THREAD + EVT_WAIT(LVar4) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_GangDefeated) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePartnerAI, 0) + EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + EVT_CALL(SetNpcPos, NPC_PARTNER, 65, LVar1, 80) + EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, 450, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) + EVT_CALL(SpeakToPlayer, NPC_FlyingMagikoopa, ANIM_FlyingMagikoopa_Yellow_Anim09, ANIM_FlyingMagikoopa_Yellow_Anim01, 0, MSG_CH6_00BB) + EVT_WAIT(20) + EVT_EXEC(N(EVS_GangRetreat)) + EVT_WAIT(80) + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-8.5)) + EVT_CALL(GetCurrentPartnerID, LVar0) + EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) + EVT_IF_NE(LVar0, PARTNER_LAKILESTER) + EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) + EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) + EVT_ADD(LVar1, 20) + EVT_ADD(LVar2, 20) + EVT_ADD(LVar3, 20) + EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) + EVT_END_IF + EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) + EVT_CALL(DisablePartnerAI, 0) + EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C1) + EVT_CALL(EnablePartnerAI) + EVT_WAIT(20) + EVT_CALL(PutPartnerAway) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_SET(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_CALL(AwaitPlayerApproach, -250, 0, 50) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(GetCurrentPartnerID, LVar0) + EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) + EVT_IF_NE(LVar0, PARTNER_LAKILESTER) + EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) + EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) + EVT_ADD(LVar1, 20) + EVT_ADD(LVar2, 20) + EVT_ADD(LVar3, 20) + EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) + EVT_END_IF + EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) + EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) + EVT_CALL(DisablePartnerAI, 0) + EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C2) + EVT_CALL(EnablePartnerAI) + EVT_CALL(PutPartnerAway) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcIdle_Magikoopa) = { + EVT_LOOP(0) + EVT_CALL(GetSelfVar, 0, LVar0) + EVT_IF_NE(LVar0, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_CALL(DisablePlayerInput, TRUE) + EVT_WAIT(10) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_Lakitu) = { + EVT_CALL(GetBattleOutcome, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(OUTCOME_PLAYER_WON) + EVT_CALL(GetSelfNpcID, LVar0) + EVT_IF_EQ(LVar0, 3) + EVT_CALL(SetNpcPos, NPC_Magikoopa, NPC_DISPOSE_LOCATION) + EVT_CALL(SetNpcPos, NPC_FlyingMagikoopa, -55, 15, 35) + EVT_CALL(GetNpcYaw, NPC_Magikoopa, LVar0) + EVT_CALL(SetNpcYaw, NPC_FlyingMagikoopa, 90) + EVT_CALL(InterpPlayerYaw, 180, 0) + EVT_CALL(SetPlayerPos, 30, 0, 80) + EVT_CALL(SetNpcYaw, NPC_Lakitu_01, 90) + EVT_CALL(SetNpcPos, NPC_Lakitu_01, -20, 15, 30) + EVT_CALL(SetNpcYaw, NPC_Lakitu_02, 270) + EVT_CALL(SetNpcPos, NPC_Lakitu_02, 65, 15, 30) + EVT_CALL(SetNpcYaw, NPC_Lakitu_03, 270) + EVT_CALL(SetNpcPos, NPC_Lakitu_03, 120, 15, 30) + EVT_EXEC(N(EVS_Scene_GangDefeated)) + EVT_END_IF + EVT_CASE_EQ(OUTCOME_PLAYER_LOST) + EVT_CASE_EQ(OUTCOME_PLAYER_FLED) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_ReactionFacePlayer) = { + EVT_SWITCH(MV_ReactingNpc) + EVT_CASE_EQ(0) + EVT_CALL(NpcFacePlayer, NPC_Magikoopa, 1) + EVT_CASE_EQ(1) + EVT_CALL(NpcFacePlayer, NPC_Lakitu_01, 1) + EVT_CASE_EQ(2) + EVT_CALL(NpcFacePlayer, NPC_Lakitu_02, 1) + EVT_CASE_EQ(3) + EVT_CALL(NpcFacePlayer, NPC_Lakitu_03, 1) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_FirstReactionDialogue) = { + EVT_SWITCH(MV_ReactingNpc) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00B9) + EVT_CALL(InterpNpcYaw, NPC_Magikoopa, 90, 0) + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) + EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 90, 0) + EVT_CASE_EQ(2) + EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) + EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 270, 0) + EVT_CASE_EQ(3) + EVT_CALL(SpeakToPlayer, NPC_Lakitu_03, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) + EVT_CALL(InterpNpcYaw, NPC_Lakitu_03, 270, 0) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SecondReactionDialogue) = { + EVT_SWITCH(MV_ReactingNpc) + EVT_CASE_EQ(0) + EVT_CALL(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00BA) + EVT_CASE_EQ(1) + EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) + EVT_CASE_EQ(2) + EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) + EVT_CASE_EQ(3) + EVT_CALL(SpeakToPlayer, NPC_Lakitu_03, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) + EVT_END_SWITCH + EVT_CALL(SetNpcVar, NPC_Magikoopa, 0, 1) + EVT_WAIT(5) + EVT_EXEC(N(EVS_ChargeAtPlayer)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_GenericHitReaction) = { + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + EVT_RETURN + EVT_END_IF + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(func_802D2C14, 1) + EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_100, TRUE) + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) + EVT_EXEC_WAIT(N(EVS_ReactionFacePlayer)) + EVT_SWITCH(AB_FLO_GuardedMachineHitCount) + EVT_CASE_EQ(0) + EVT_EXEC_WAIT(N(EVS_FirstReactionDialogue)) + EVT_ADD(AB_FLO_GuardedMachineHitCount, 1) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CASE_EQ(1) + EVT_EXEC_WAIT(N(EVS_SecondReactionDialogue)) + EVT_END_SWITCH + EVT_CALL(func_802D2C14, 0) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_HitReaction_Magikoopa) = { + EVT_IF_EQ(MV_ReactingNpc, -1) + EVT_SET(MV_ReactingNpc, 0) + EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) + EVT_SET(MV_ReactingNpc, -1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_HitReaction_Lakitu_01) = { + EVT_IF_EQ(MV_ReactingNpc, -1) + EVT_SET(MV_ReactingNpc, 1) + EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) + EVT_SET(MV_ReactingNpc, -1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_HitReaction_Lakitu_02) = { + EVT_IF_EQ(MV_ReactingNpc, -1) + EVT_SET(MV_ReactingNpc, 2) + EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) + EVT_SET(MV_ReactingNpc, -1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_HitReaction_Lakitu_03) = { + EVT_IF_EQ(MV_ReactingNpc, -1) + EVT_SET(MV_ReactingNpc, 3) + EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) + EVT_SET(MV_ReactingNpc, -1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_GenericBombReaction) = { + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + EVT_RETURN + EVT_END_IF + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(8.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_EXEC_WAIT(N(EVS_ReactionFacePlayer)) + EVT_IF_EQ(AB_FLO_GuardedMachineHitCount, 0) + EVT_EXEC_WAIT(N(EVS_FirstReactionDialogue)) + EVT_ADD(AB_FLO_GuardedMachineHitCount, 1) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_ELSE + EVT_EXEC_WAIT(N(EVS_SecondReactionDialogue)) + EVT_END_IF + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_BombReaction_Magikoopa) = { + EVT_IF_EQ(MV_ReactingNpc, -1) + EVT_SET(MV_ReactingNpc, 0) + EVT_CALL(GetNpcPos, NPC_Magikoopa, LVar0, LVar1, LVar2) + EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) + EVT_SET(MV_ReactingNpc, -1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_BombReaction_Lakitu_01) = { + EVT_IF_EQ(MV_ReactingNpc, -1) + EVT_SET(MV_ReactingNpc, 1) + EVT_CALL(GetNpcPos, NPC_Lakitu_01, LVar0, LVar1, LVar2) + EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) + EVT_SET(MV_ReactingNpc, -1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_BombReaction_Lakitu_02) = { + EVT_IF_EQ(MV_ReactingNpc, -1) + EVT_SET(MV_ReactingNpc, 2) + EVT_CALL(GetNpcPos, NPC_Lakitu_02, LVar0, LVar1, LVar2) + EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) + EVT_SET(MV_ReactingNpc, -1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_BombReaction_Lakitu_03) = { + EVT_IF_EQ(MV_ReactingNpc, -1) + EVT_SET(MV_ReactingNpc, 3) + EVT_CALL(GetNpcPos, NPC_Lakitu_03, LVar0, LVar1, LVar2) + EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) + EVT_SET(MV_ReactingNpc, -1) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +BombTrigger N(Npc_BombTrigger_01) = { + .pos = { 5.0f, 0.0f, -10.0f }, + .radius = 0.0f +}; + +BombTrigger N(Npc_BombTrigger_02) = { + .pos = { -5.0f, 0.0f, -20.0f }, + .radius = 0.0f +}; + +BombTrigger N(Npc_BombTrigger_03) = { + .pos = { 50.0f, 0.0f, -10.0f }, + .radius = 0.0f +}; + +BombTrigger N(Npc_BombTrigger_04) = { + .pos = { 105.0f, 0.0f, -10.0f }, + .radius = 0.0f +}; + +EvtScript N(EVS_SetupMachineDamageReactions) = { + EVT_SET(MV_ReactingNpc, -1) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Magikoopa)), TRIGGER_WALL_HAMMER, COLLIDER_o174, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Magikoopa)), TRIGGER_WALL_HAMMER, COLLIDER_o130, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Magikoopa)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_02)), 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Lakitu_01)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_01)), 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Lakitu_02)), TRIGGER_WALL_HAMMER, COLLIDER_o127, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Lakitu_02)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_03)), 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Lakitu_03)), TRIGGER_WALL_HAMMER, COLLIDER_o131, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Lakitu_03)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_04)), 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInteract_Lakitu) = { + EVT_SWITCH(AB_FLO_GuardLakituTalkCount) + EVT_CASE_EQ(0) + EVT_CALL(GetSelfNpcID, LVar0) + EVT_IF_EQ(LVar0, 3) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B6) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BC) + EVT_END_IF + EVT_ADD(AB_FLO_GuardLakituTalkCount, 1) + EVT_CASE_EQ(1) + EVT_CALL(GetSelfNpcID, LVar0) + EVT_IF_EQ(LVar0, 3) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B7) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BD) + EVT_END_IF + EVT_ADD(AB_FLO_GuardLakituTalkCount, 1) + EVT_CASE_EQ(2) + EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-9.0)) + EVT_CALL(GetSelfNpcID, LVar0) + EVT_IF_EQ(LVar0, 3) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B8) + EVT_CALL(NpcFacePlayer, NPC_SELF, 0) + EVT_WAIT(15) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 0) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BE) + EVT_CALL(NpcFacePlayer, NPC_SELF, 0) + EVT_WAIT(15) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0) + EVT_END_IF + EVT_CALL(SetNpcVar, NPC_Magikoopa, 0, 1) + EVT_WAIT(5) + EVT_EXEC(N(EVS_ChargeAtPlayer)) + EVT_CALL(BindNpcInteract, NPC_Lakitu_01, 0) + EVT_CALL(BindNpcInteract, NPC_Lakitu_02, 0) + EVT_CALL(BindNpcInteract, NPC_Lakitu_03, 0) + EVT_CALL(BindNpcInteract, NPC_Magikoopa, 0) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Magikoopa) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Magikoopa))) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_FlyingMagikoopa) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakitu_01) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakitu_02) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Lakitu_03) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_MachineGang)[] = { + { + .id = NPC_Lakitu_01, + .settings = &N(NpcSettings_Lakitu), + .pos = { 0.0f, 15.0f, 60.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_400000, + .init = &N(EVS_NpcInit_Lakitu_01), + .drops = LAKITU_DROPS, + .animations = LAKITU_ANIMS, + .tattle = MSG_NpcTattle_PuffPuffOperator, + }, + { + .id = NPC_Lakitu_02, + .settings = &N(NpcSettings_Lakitu), + .pos = { 65.0f, 15.0f, 60.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_400000, + .init = &N(EVS_NpcInit_Lakitu_02), + .drops = LAKITU_DROPS, + .animations = LAKITU_ANIMS, + .tattle = MSG_NpcTattle_PuffPuffOperator, + }, + { + .id = NPC_Lakitu_03, + .settings = &N(NpcSettings_Lakitu), + .pos = { 135.0f, 15.0f, 35.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_400000, + .init = &N(EVS_NpcInit_Lakitu_03), + .drops = LAKITU_DROPS, + .animations = LAKITU_ANIMS, + .tattle = MSG_NpcTattle_PuffPuffOperator, + }, + { + .id = NPC_Magikoopa, + .settings = &N(NpcSettings_Magikoopa), + .pos = { -60.0f, 0.0f, 50.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_400000, + .init = &N(EVS_NpcInit_Magikoopa), + .drops = MAGIKOOPA_DROPS, + .animations = MAGIKOOPA_YELLOW_ANIMS, + .tattle = MSG_NpcTattle_PuffPuffOperator, + }, + { + .id = NPC_FlyingMagikoopa, + .settings = &N(NpcSettings_Magikoopa), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_400000, + .init = &N(EVS_NpcInit_FlyingMagikoopa), + .drops = MAGIKOOPA_DROPS, + .animations = FLYING_MAGIKOOPA_YELLOW_ANIMS, + .tattle = MSG_NpcTattle_PuffPuffOperator, + }, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_MachineGang), BTL_FLO_FORMATION_0B, BTL_FLO_STAGE_06), + {} +}; diff --git a/src/world/area_flo/flo_18/CDCC30.c b/src/world/area_flo/flo_18/flo_18_5_foliage.c similarity index 71% rename from src/world/area_flo/flo_18/CDCC30.c rename to src/world/area_flo/flo_18/flo_18_5_foliage.c index 3f35c35c71..611317396b 100644 --- a/src/world/area_flo/flo_18/CDCC30.c +++ b/src/world/area_flo/flo_18/flo_18_5_foliage.c @@ -2,7 +2,7 @@ #include "common/foliage.inc.c" -EvtScript N(80247024) = { +EvtScript N(EVS_SetupFoliage) = { EVT_RETURN EVT_END }; diff --git a/src/world/area_flo/flo_19/CE36F0.c b/src/world/area_flo/flo_19/CE36F0.c deleted file mode 100644 index 940fa8f638..0000000000 --- a/src/world/area_flo/flo_19/CE36F0.c +++ /dev/null @@ -1,777 +0,0 @@ -#include "flo_19.h" -#include "message_ids.h" - -EntryList N(entryList) = { - { 0.0f, 0.0f, 100.0f, 90.0f }, - { 460.0f, 0.0f, 0.0f, 270.0f }, - { 0.0f, -500.0f, 0.0f, 0.0f }, - { 0.0f, 0.0f, 0.0f, 0.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_19 }, -}; - -// Extraneous END_CASE_MULTI -#ifdef NON_EQUIVALENT -EvtScript N(802409C0) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(0) - EVT_CASE_OR_EQ(1) - EVT_CALL(SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(2) - EVT_CASE_OR_EQ(7) - EVT_END_CASE_GROUP - EVT_CASE_EQ(3) - EVT_IF_NE(AreaFlag(44), 0) - EVT_ELSE - EVT_CALL(FadeOutMusic, 1, 3000) - EVT_CALL(FadeInMusic, 0, 50, 0, 3000, 0, 127) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; -#else -EvtScript N(802409C0) = { - EVT_CMD(EVT_OP_CALL, EVT_PTR(GetEntryID), LVar0), - EVT_CMD(EVT_OP_SWITCH, LVar0), - EVT_CMD(EVT_OP_CASE_OR_EQ, 0), - EVT_CMD(EVT_OP_CASE_OR_EQ, 1), - EVT_CMD(EVT_OP_CALL, EVT_PTR(SetMusicTrack), 0, SONG_CLOUDY_CLIMB, 0, 8), - EVT_CMD(EVT_OP_END_CASE_GROUP), - EVT_CMD(EVT_OP_CASE_OR_EQ, 2), - EVT_CMD(EVT_OP_CASE_OR_EQ, 7), - EVT_CMD(EVT_OP_END_CASE_GROUP), - EVT_CMD(EVT_OP_CASE_EQ, 3), - EVT_CMD(EVT_OP_IF_NE, AreaFlag(44), 0), - EVT_CMD(EVT_OP_ELSE), - EVT_CMD(EVT_OP_CALL, EVT_PTR(FadeOutMusic), 1, 3000), - EVT_CMD(EVT_OP_CALL, EVT_PTR(FadeInMusic), 0, 50, 0, 3000, 0, 127), - EVT_CMD(EVT_OP_END_IF), - EVT_CMD(EVT_OP_END_CASE_GROUP), - EVT_CMD(EVT_OP_END_SWITCH), - EVT_CMD(EVT_OP_RETURN), - EVT_CMD(EVT_OP_END) -}; -#endif - -static s32 N(pad_ABC) = { - 0x00000000, -}; - -EvtScript N(80240AC0) = { - EVT_CALL(MakeItemEntity, ITEM_S_JUMP_CHG, -200, 160, -213, 17, GF_FLO19_Item_SJumpChg) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_AF4)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(updateTexturePan_80240B00) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_IF_EQ(LVar5, 1) - EVT_IF_EQ(LVar6, 1) - EVT_IF_EQ(LVar7, 1) - EVT_IF_EQ(LVar8, 1) - EVT_CALL(N(UpdateTexturePanSmooth)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(UpdateTexturePanStepped)) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_80240B9C) = EVT_EXIT_WALK(60, 1, "flo_21", 0); - -EvtScript N(80240BF8) = { - EVT_BIND_TRIGGER(N(exitWalk_80240B9C), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 39) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_SET(GF_MAP_CloudyClimb, 1) - EVT_EXEC_WAIT(N(80240AC0)) - EVT_CALL(ParentColliderToModel, 12, 86) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_EXEC(N(80242FD0)) - EVT_EXEC(N(80241780)) - EVT_CALL(ModifyColliderFlags, 3, 5, 0x00000007) - EVT_CALL(EnableTexPanning, 17, 1) - EVT_CALL(EnableTexPanning, 18, 1) - EVT_THREAD - EVT_SET(LVar0, 1) - EVT_SET(LVar1, -120) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_80240B00)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 2) - EVT_SET(LVar1, -90) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_80240B00)) - EVT_END_THREAD - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, 3) - EVT_SET(AreaFlag(44), 0) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_EXEC(N(80240BF8)) - EVT_CASE_EQ(1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80240BF8))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(2) - EVT_EXEC(N(80242A2C)) - EVT_EXEC(N(80240BF8)) - EVT_CASE_EQ(3) - EVT_EXEC(N(80241CC4)) - EVT_EXEC(N(80240BF8)) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(802409C0)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_8024030C_CE39FC)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_1044)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(80241050) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_SETF(LVar0, EVT_FLOAT(-215.4375)) - EVT_SETF(LVar1, EVT_FLOAT(128.59375)) - EVT_SETF(LVar2, EVT_FLOAT(-200.0)) - EVT_ADDF(LVar1, MapVar(12)) - EVT_CALL(TranslateGroup, 28, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, EVT_FLOAT(-79.86)) - EVT_CALL(N(func_80240340_CE3A30), LVarF, LVar1, EVT_FLOAT(5.0), EVT_FLOAT(136.765625), 300, 0, 0) - EVT_SETF(LVar2, EVT_FLOAT(-200.0)) - EVT_ADDF(LVar1, MapVar(13)) - EVT_CALL(TranslateGroup, 32, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, EVT_FLOAT(-364.265625)) - EVT_CALL(N(func_80240340_CE3A30), LVarF, LVar1, EVT_FLOAT(5.0), EVT_FLOAT(106.765625), 300, 0, 0) - EVT_SETF(LVar2, EVT_FLOAT(10.0)) - EVT_ADDF(LVar1, MapVar(14)) - EVT_CALL(TranslateGroup, 36, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, EVT_FLOAT(295.734375)) - EVT_CALL(N(func_80240340_CE3A30), LVarF, LVar1, EVT_FLOAT(65.0), EVT_FLOAT(86.984375), 200, 0, 0) - EVT_SETF(LVar2, EVT_FLOAT(-80.0)) - EVT_ADDF(LVar1, MapVar(15)) - EVT_CALL(TranslateGroup, 40, LVar0, LVar1, LVar2) - EVT_CALL(N(func_80240340_CE3A30), LVarF, LVar2, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0) - EVT_CALL(N(func_80240340_CE3A30), LVarF, LVar3, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0) - EVT_SETF(LVar0, MapVar(12)) - EVT_SETF(LVar1, MapVar(12)) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, 28, LVar0, LVar1, 1) - EVT_SETF(LVar0, MapVar(13)) - EVT_SETF(LVar1, MapVar(13)) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, 32, LVar0, LVar1, 1) - EVT_SETF(LVar0, MapVar(14)) - EVT_SETF(LVar1, MapVar(14)) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, 36, LVar0, LVar1, 1) - EVT_SETF(LVar0, MapVar(15)) - EVT_SETF(LVar1, MapVar(15)) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, 40, LVar0, LVar1, 1) - EVT_CALL(UpdateColliderTransform, 8) - EVT_CALL(UpdateColliderTransform, 9) - EVT_CALL(UpdateColliderTransform, 7) - EVT_CALL(UpdateColliderTransform, 10) - EVT_ADD(LVarF, 1) - EVT_IF_GE(LVarF, 1200) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_SETF(LVar0, LVarA) - EVT_SETF(LVar1, LVarB) - EVT_SETF(LVar2, LVarC) - EVT_SETF(LVar3, LVarD) - EVT_MULF(LVar0, EVT_FLOAT(-0.046875)) - EVT_MULF(LVar1, EVT_FLOAT(-0.09375)) - EVT_MULF(LVar2, EVT_FLOAT(-0.09375)) - EVT_MULF(LVar3, EVT_FLOAT(-0.09375)) - EVT_ADDF(MapVar(12), LVar0) - EVT_ADDF(MapVar(13), LVar1) - EVT_ADDF(MapVar(14), LVar2) - EVT_ADDF(MapVar(15), LVar3) - EVT_MULF(MapVar(12), EVT_FLOAT(0.84375)) - EVT_MULF(MapVar(13), EVT_FLOAT(0.84375)) - EVT_MULF(MapVar(14), EVT_FLOAT(0.84375)) - EVT_MULF(MapVar(15), EVT_FLOAT(0.84375)) - EVT_ADDF(LVarA, MapVar(12)) - EVT_ADDF(LVarB, MapVar(13)) - EVT_ADDF(LVarC, MapVar(14)) - EVT_ADDF(LVarD, MapVar(15)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241650) = { - EVT_THREAD - EVT_ADDF(MapVar(12), EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MapVar(12), EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END -}; - -EvtScript N(8024169C) = { - EVT_THREAD - EVT_ADDF(MapVar(13), EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MapVar(13), EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END -}; - -EvtScript N(802416E8) = { - EVT_THREAD - EVT_ADDF(MapVar(14), EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MapVar(14), EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END -}; - -EvtScript N(80241734) = { - EVT_THREAD - EVT_ADDF(MapVar(15), EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MapVar(15), EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END -}; - -EvtScript N(80241780) = { - EVT_CALL(ParentColliderToModel, 8, 28) - EVT_CALL(ParentColliderToModel, 9, 32) - EVT_CALL(ParentColliderToModel, 7, 36) - EVT_CALL(ParentColliderToModel, 10, 40) - EVT_CALL(SetModelFlags, 28, 256, 1) - EVT_CALL(SetModelFlags, 32, 256, 1) - EVT_CALL(SetModelFlags, 36, 256, 1) - EVT_CALL(SetModelFlags, 40, 256, 1) - EVT_EXEC(N(80241050)) - EVT_BIND_TRIGGER(N(80241650), TRIGGER_FLOOR_TOUCH, 8, 1, 0) - EVT_BIND_TRIGGER(N(8024169C), TRIGGER_FLOOR_TOUCH, 9, 1, 0) - EVT_BIND_TRIGGER(N(802416E8), TRIGGER_FLOOR_TOUCH, 7, 1, 0) - EVT_BIND_TRIGGER(N(80241734), TRIGGER_FLOOR_TOUCH, 10, 1, 0) - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_CALL(N(func_80240340_CE3A30), LVarF, LVar0, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0) - EVT_CALL(N(func_80240340_CE3A30), LVarF, LVar1, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0) - EVT_CALL(ScaleModel, 70, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, 60, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, 64, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, 68, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, 66, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, 58, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, 62, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, 72, LVar0, LVar1, 1) - EVT_ADD(LVarF, 1) - EVT_IF_GE(LVarF, 30) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END -}; - -static s32 N(pad_1A68)[] = { - 0x00000000, 0x00000000, -}; - -EvtScript N(80241A70) = { - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_CALL(N(func_80240784_CE3E74)) - EVT_ADD(LVar0, 25) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 255) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar0, 255) - EVT_CALL(N(func_80240784_CE3E74)) - EVT_WAIT(1) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241B10) = { - EVT_SET(LVar0, 255) - EVT_LABEL(10) - EVT_CALL(N(func_80240784_CE3E74)) - EVT_SUB(LVar0, 25) - EVT_WAIT(1) - EVT_IF_GT(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_CALL(N(func_80240784_CE3E74)) - EVT_WAIT(1) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241BB0) = { - EVT_CALL(TranslateGroup, 79, 0, LVar0, 0) - EVT_CALL(TranslateGroup, 92, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, 79, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, 92, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241C58) = { - EVT_CALL(TranslateGroup, 84, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, 84, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241CC4) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerActionState, 10) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_100)), TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 13, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_CALL(SetCamType, 0, 1, 0) - EVT_CALL(UseSettingsFrom, 0, 0, 0, 0) - EVT_CALL(SetPanTarget, 0, 0, 0, 0) - EVT_CALL(SetCamDistance, 0, 350) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(11.0)) - EVT_CALL(SetCamPosA, 0, 0, 0) - EVT_CALL(SetCamPosB, 0, 0, 0) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(EnableGroup, 2, 0) - EVT_CALL(EnableGroup, 13, 0) - EVT_CALL(EnableGroup, 24, 0) - EVT_CALL(EnableGroup, 41, 0) - EVT_CALL(EnableGroup, 48, 0) - EVT_CALL(EnableGroup, 57, 0) - EVT_CALL(EnableGroup, 74, 0) - EVT_SET(LVar9, EVT_FLOAT(45.0)) - EVT_SET(LVarA, EVT_FLOAT(28.0)) - EVT_SET(LVarB, EVT_FLOAT(5.0)) - EVT_SET(LVarC, EVT_FLOAT(60.0)) - EVT_SET(LVarD, EVT_FLOAT(28.0)) - EVT_SET(LVarE, EVT_FLOAT(10.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, 0x106) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking) - EVT_SWITCH(AreaFlag(16)) - EVT_CASE_EQ(0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_EQ(1) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(TranslateModel, 86, EVT_FLOAT(1.3134765625), EVT_FLOAT(3.0), EVT_FLOAT(-0.56640625)) - EVT_CALL(UpdateColliderTransform, 12) - EVT_THREAD - EVT_SET(AreaFlag(45), 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking) - EVT_WAIT(200) - EVT_EXEC_WAIT(N(80241A70)) - EVT_SET(AreaFlag(45), 1) - EVT_WAIT(10) - EVT_CALL(EnableGroup, 2, 1) - EVT_CALL(EnableGroup, 13, 1) - EVT_CALL(EnableGroup, 24, 1) - EVT_CALL(EnableGroup, 41, 1) - EVT_CALL(EnableGroup, 48, 1) - EVT_CALL(EnableGroup, 57, 1) - EVT_CALL(EnableGroup, 74, 1) - EVT_CALL(SetCamDistance, 0, 450) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamPosA, 0, 0, 0) - EVT_CALL(SetCamPosB, 0, 0, 0) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(80241B10)) - EVT_WAIT(20) - EVT_SET(AreaFlag(45), 0) - EVT_END_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(344) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -210, 0, 344, 0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-3.0)) - EVT_CALL(TranslateModel, 86, EVT_FLOAT(1.3134765625), LVar0, EVT_FLOAT(-0.56640625)) - EVT_CALL(RotateModel, 86, LVar1, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, 12) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(func_80240540_CE3C30)) - EVT_CALL(N(func_80240660_CE3D50)) - EVT_LABEL(11) - EVT_WAIT(1) - EVT_IF_EQ(AreaFlag(45), 1) - EVT_GOTO(11) - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, 1, 13, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, 1, 5, 0x7FFFFE00) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ClearPartnerMoveHistory, -4) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, 100, 0, 60, 20) - EVT_CALL(SetPlayerActionState, 10) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(5) - EVT_SET(AreaFlag(44), 0) - EVT_CALL(StopSound, 412) - EVT_EXEC_WAIT(N(802409C0)) - EVT_CALL(ResetCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(802423F8) = { - EVT_IF_EQ(AreaFlag(44), 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(15) - EVT_CALL(DisablePartnerAI, 0) - EVT_SET(AreaFlag(44), 1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 13, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_SET(LVar9, EVT_FLOAT(45.0)) - EVT_SET(LVarA, EVT_FLOAT(28.0)) - EVT_SET(LVarB, EVT_FLOAT(5.0)) - EVT_SET(LVarC, EVT_FLOAT(60.0)) - EVT_SET(LVarD, EVT_FLOAT(28.0)) - EVT_SET(LVarE, EVT_FLOAT(10.0)) - EVT_CALL(PlayerMoveTo, LVar9, LVarB, 8) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) - EVT_CALL(PlaySound, 0x19D) - EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, 0x106) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking) - EVT_CALL(N(func_802404D0_CE3BC0), LVar3, LVar4) - EVT_SWITCH(LVar4) - EVT_CASE_LT(90) - EVT_SET(AreaFlag(16), 0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_GE(270) - EVT_SET(AreaFlag(16), 1) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_CALL(TranslateModel, 86, EVT_FLOAT(1.3134765625), EVT_FLOAT(3.0), EVT_FLOAT(-0.56640625)) - EVT_CALL(UpdateColliderTransform, 12) - EVT_SET(MapVar(10), 0) - EVT_THREAD - EVT_SET(AreaFlag(45), 0) - EVT_WAIT(120) - EVT_SET(AreaFlag(45), 1) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(80241A70)) - EVT_WAIT(10) - EVT_CALL(EnableGroup, 2, 0) - EVT_CALL(EnableGroup, 13, 0) - EVT_CALL(EnableGroup, 24, 0) - EVT_CALL(EnableGroup, 41, 0) - EVT_CALL(EnableGroup, 48, 0) - EVT_CALL(EnableGroup, 57, 0) - EVT_CALL(EnableGroup, 74, 0) - EVT_CALL(SetCamType, 0, 1, 0) - EVT_CALL(UseSettingsFrom, 0, 0, 0, 0) - EVT_CALL(SetPanTarget, 0, 0, 0, 0) - EVT_CALL(SetCamDistance, 0, 350) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(7.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_SET(AreaFlag(45), 0) - EVT_EXEC_WAIT(N(80241B10)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(344) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, -210, 344, 0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-3.0)) - EVT_CALL(TranslateModel, 86, EVT_FLOAT(1.3134765625), LVar0, EVT_FLOAT(-0.56640625)) - EVT_CALL(RotateModel, 86, LVar1, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, 12) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(func_80240540_CE3C30)) - EVT_CALL(N(func_80240660_CE3D50)) - EVT_IF_EQ(LVarF, 300) - EVT_SET(MapVar(10), 1) - EVT_END_IF - EVT_LABEL(11) - EVT_WAIT(1) - EVT_IF_EQ(AreaFlag(45), 1) - EVT_GOTO(11) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(MapVar(10), 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("flo_00"), 8) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80242A2C) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, 10) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_GRAVITY)), FALSE) - EVT_CALL(EnableModel, 86, 0) - EVT_CALL(EnableGroup, 2, 0) - EVT_CALL(EnableGroup, 13, 0) - EVT_CALL(EnableGroup, 24, 0) - EVT_CALL(EnableGroup, 41, 0) - EVT_CALL(EnableGroup, 48, 0) - EVT_CALL(EnableGroup, 57, 0) - EVT_CALL(EnableGroup, 74, 0) - EVT_CALL(SetCamType, 0, 1, 0) - EVT_CALL(UseSettingsFrom, 0, 0, 0, 0) - EVT_CALL(SetPanTarget, 0, 0, 0, 0) - EVT_CALL(SetCamDistance, 0, 800) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(-20.0), EVT_FLOAT(8.5)) - EVT_CALL(SetCamPosA, 0, 0, 0) - EVT_CALL(SetCamPosB, 0, 0, 0) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_SET(LVarF, 100) - EVT_SET(MapVar(11), LVarF) - EVT_SET(AreaFlag(40), 0) - EVT_LOOP(400) - EVT_IF_EQ(AreaFlag(40), 0) - EVT_IF_GT(MapVar(11), 400) - EVT_CALL(EnableGroup, 85, 0) - EVT_CALL(EnableGroup, 92, 0) - EVT_CALL(EnableGroup, 2, 1) - EVT_CALL(EnableGroup, 13, 1) - EVT_CALL(EnableGroup, 24, 1) - EVT_CALL(EnableGroup, 41, 1) - EVT_CALL(EnableGroup, 48, 1) - EVT_CALL(EnableGroup, 57, 1) - EVT_CALL(EnableGroup, 74, 1) - EVT_CALL(SetCamDistance, 0, 1000) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(45.0), EVT_FLOAT(-3.0)) - EVT_CALL(SetCamPosA, 0, 0, 0) - EVT_CALL(SetCamPosB, 0, 0, 0) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_SET(LVarF, 150) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnableGroup, 85, 1) - EVT_CALL(EnableGroup, 92, 1) - EVT_CALL(EnableModel, 86, 0) - EVT_WAIT(48) - EVT_CALL(PlayEffect, 0xA, 0, 22, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(PlayEffect, 0xA, 0, 22, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_THREAD - EVT_SET(AreaFlag(40), 1) - EVT_END_IF - EVT_END_IF - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -350, 0, 400, 0, 0) - EVT_SETF(MapVar(11), LVarF) - EVT_MULF(MapVar(11), EVT_FLOAT(1.6)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(80241BB0)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(80241C58)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_SET(GB_StoryProgress, 55) - EVT_CALL(GotoMap, EVT_PTR("flo_00"), 7) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242FD0) = { - EVT_BIND_TRIGGER(N(802423F8), TRIGGER_FLOOR_TOUCH, 12, 1, 0) - EVT_RETURN - EVT_END -}; - -#include "world/common/atomic/TexturePan.inc.c" - -// It seems like fx_sun was not properly defined for this file. Having a proper -// declaration makes it not match. -#ifdef AVOID_UB -void fx_sun(s32, f32, f32, f32, f32, s32); -#else -void fx_sun(s32, s32, s32, s32, s32, s32); -#endif - -ApiStatus N(func_8024030C_CE39FC)(Evt* script, s32 isInitialCall) { - fx_sun(1, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} - -// Identical to CosInterpMinMax except for the presence of the fabsf -ApiStatus N(func_80240340_CE3A30)(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 a1 = *args++; - s32 var0 = evt_get_variable(script, a1); - s32 a2 = *args++; - f32 var1 = evt_get_float_variable(script, *args++); - f32 var2 = evt_get_float_variable(script, *args++); - s32 var3 = evt_get_variable(script, *args++); - s32 var4 = evt_get_variable(script, *args++); - f32 temp = (evt_get_float_variable(script, *args++) / 180.0f) * PI; - f32 diff = fabsf(var2 - var1) / 2; - - if (var4 != 0 && var3 < var0) { - var0 = var3; - evt_set_variable(script, a1, var3); - } - - evt_set_float_variable(script, a2, (var1 + diff) - (diff * cos_rad(((var0 * PI) / var3) + temp))); - - return ApiStatus_DONE2; -} - -ApiStatus N(func_802404D0_CE3BC0)(Evt* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 var1 = *args++; - s32 var2 = *args++; - - evt_set_variable(script, var1, gPlayerStatus.spriteFacingAngle); - evt_set_variable(script, var2, gPlayerStatus.targetYaw); - - return ApiStatus_DONE2; -} - -ApiStatus N(func_80240540_CE3C30)(Evt* script, s32 isInitialCall) { - f32 temp_f20 = evt_get_variable(NULL, script->varTable[2]); - f32 dist = dist2D(0.0f, 0.0f, script->varTable[9], script->varTable[11]); - f32 temp_f22 = clamp_angle(atan2(0.0f, 0.0f, script->varTable[9], script->varTable[11]) - temp_f20); - - temp_f20 = sin_deg(temp_f22); - gPlayerStatus.position.x = (dist * temp_f20) + 0.0f; - gPlayerStatus.position.y = evt_get_variable(NULL, script->varTable[10]) + evt_get_variable(NULL, script->varTable[3]); - temp_f20 = cos_deg(temp_f22); - gPlayerStatus.position.z = 0.0f - (dist * temp_f20); - - return ApiStatus_DONE2; -} - -ApiStatus N(func_80240660_CE3D50)(Evt* script, s32 isInitialCall) { - Npc* npc = get_npc_by_index(0); - f32 temp_f20 = evt_get_variable(NULL, script->varTable[2]); - f32 dist = dist2D(0.0f, 0.0f, script->varTable[12], script->varTable[14]); - f32 clamped = clamp_angle(atan2(0.0f, 0.0f, script->varTable[12], script->varTable[14]) - temp_f20); - - temp_f20 = sin_deg(clamped); - npc->pos.x = (dist * temp_f20) + 0.0f; - npc->pos.y = evt_get_variable(NULL, script->varTable[13]) + evt_get_variable(NULL, script->varTable[3]); - temp_f20 = cos_deg(clamped); - npc->pos.z = 0.0f - (dist * temp_f20); - - return ApiStatus_DONE2; -} - -ApiStatus N(func_80240784_CE3E74)(Evt* script, s32 isInitialCall) { - set_screen_overlay_params_back(1, script->varTable[0]); - return ApiStatus_DONE2; -} - -#include "common/CosInterpMinMax.inc.c" diff --git a/src/world/area_flo/flo_19/flo_19.h b/src/world/area_flo/flo_19/flo_19.h index 9e030c4046..73855a9088 100644 --- a/src/world/area_flo/flo_19/flo_19.h +++ b/src/world/area_flo/flo_19/flo_19.h @@ -2,24 +2,32 @@ /// @brief Flower Fields - Cloudy Climb #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_19_shape.h" +#include "mapfs/flo_19_hit.h" + +enum { + NPC_Dummy_Partner = 0, +}; + +enum { + MV_BeanstalkSceneSync = MapVar(10), + MV_BeanstalkGrowthProgress = MapVar(11), + MV_Distortion_Platform_01 = MapVar(12), + MV_Distortion_Platform_02 = MapVar(13), + MV_Distortion_Platform_03 = MapVar(14), + MV_Distortion_Platform_04 = MapVar(15), +}; + #define NAMESPACE flo_19 -ApiStatus N(UpdateTexturePanSmooth)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanStepped)(Evt* script, s32 isInitialCall); -ApiStatus N(CosInterpMinMax)(Evt* script, s32 isInitialCall); -ApiStatus N(func_8024030C_CE39FC)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240340_CE3A30)(Evt* script, s32 isInitialCall); -ApiStatus N(func_802404D0_CE3BC0)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240540_CE3C30)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240660_CE3D50)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240784_CE3E74)(Evt* script, s32 isInitialCall); - -extern EvtScript N(80241780); -extern EvtScript N(80241CC4); -extern EvtScript N(80242A2C); -extern EvtScript N(80242FD0); -extern EvtScript N(main); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_MakeEntities); +extern EvtScript N(EVS_SetupClouds); +extern EvtScript N(EVS_SetupBeanstalk); +extern EvtScript N(EVS_Scene_BeanstalkGrowing); +extern EvtScript N(EVS_Enter_Beanstalk); diff --git a/src/world/area_flo/flo_19/flo_19_0_header.c b/src/world/area_flo/flo_19/flo_19_0_header.c new file mode 100644 index 0000000000..8efdd41ce2 --- /dev/null +++ b/src/world/area_flo/flo_19/flo_19_0_header.c @@ -0,0 +1,16 @@ +#include "flo_19.h" + +EntryList N(Entrances) = { + [flo_19_ENTRY_0] { 0.0, 0.0, 100.0, 90.0 }, + [flo_19_ENTRY_1] { 460.0, 0.0, 0.0, 270.0 }, + [flo_19_ENTRY_2] { 0.0, -500.0, 0.0, 0.0 }, + [flo_19_ENTRY_3] { 0.0, 0.0, 0.0, 0.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_19 }, +}; diff --git a/src/world/area_flo/flo_19/flo_19_1_music.c b/src/world/area_flo/flo_19/flo_19_1_music.c new file mode 100644 index 0000000000..07cbb890ac --- /dev/null +++ b/src/world/area_flo/flo_19/flo_19_1_music.c @@ -0,0 +1,23 @@ +#include "flo_19.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_CALL(GetEntryID, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_OR_EQ(flo_19_ENTRY_0) + EVT_CASE_OR_EQ(flo_19_ENTRY_1) + EVT_CALL(SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8) + EVT_END_CASE_GROUP + EVT_CASE_OR_EQ(flo_19_ENTRY_2) + EVT_CASE_OR_EQ(7) + EVT_END_CASE_GROUP + EVT_CASE_EQ(flo_19_ENTRY_3) + EVT_IF_NE(AF_FLO_RidingBeanstalk, FALSE) + EVT_ELSE + EVT_CALL(FadeOutMusic, 1, 3000) + EVT_CALL(FadeInMusic, 0, SONG_CLOUDY_CLIMB, 0, 3000, 0, 127) + EVT_END_IF + EVT_END_CASE_GROUP + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_19/flo_19_2_entity.c b/src/world/area_flo/flo_19/flo_19_2_entity.c new file mode 100644 index 0000000000..2747d4affc --- /dev/null +++ b/src/world/area_flo/flo_19/flo_19_2_entity.c @@ -0,0 +1,7 @@ +#include "flo_19.h" + +EvtScript N(EVS_MakeEntities) = { + EVT_CALL(MakeItemEntity, ITEM_S_JUMP_CHG, -200, 160, -213, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO19_Item_SJumpChg) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_19/flo_19_3_main.c b/src/world/area_flo/flo_19/flo_19_3_main.c new file mode 100644 index 0000000000..d2bcbe3a29 --- /dev/null +++ b/src/world/area_flo/flo_19/flo_19_3_main.c @@ -0,0 +1,72 @@ +#include "flo_19.h" +#include "effects.h" + +#include "world/common/atomic/TexturePan.inc.c" +#include "world/common/atomic/TexturePan.data.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_21_0) = EVT_EXIT_WALK(60, flo_19_ENTRY_1, "flo_21", flo_21_ENTRY_0); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_21_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_CLOUDY_CLIMB) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_SET(GF_MAP_CloudyClimb, TRUE) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_CALL(ParentColliderToModel, COLLIDER_o117, MODEL_o142) + EVT_CALL(HidePlayerShadow, TRUE) + EVT_EXEC(N(EVS_SetupBeanstalk)) + EVT_EXEC(N(EVS_SetupClouds)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o122, SURFACE_TYPE_CLOUD) + EVT_CALL(EnableTexPanning, MODEL_o59, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o60, TRUE) + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_1) + TEX_PAN_PARAMS_STEP( -120, 0, 0, 0) + TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_2) + TEX_PAN_PARAMS_STEP( -90, 0, 0, 0) + TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_CALL(GetEntryID, LVar0) + EVT_IF_NE(LVar0, flo_19_ENTRY_3) + EVT_SET(AF_FLO_RidingBeanstalk, FALSE) + EVT_END_IF + EVT_SWITCH(LVar0) + EVT_CASE_EQ(flo_19_ENTRY_0) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_CASE_EQ(flo_19_ENTRY_1) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_CASE_EQ(flo_19_ENTRY_2) + EVT_EXEC(N(EVS_Scene_BeanstalkGrowing)) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_CASE_EQ(flo_19_ENTRY_3) + EVT_EXEC(N(EVS_Enter_Beanstalk)) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_END_SWITCH + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_19/flo_19_4_clouds.c b/src/world/area_flo/flo_19/flo_19_4_clouds.c new file mode 100644 index 0000000000..474c112ff1 --- /dev/null +++ b/src/world/area_flo/flo_19/flo_19_4_clouds.c @@ -0,0 +1,191 @@ +#include "flo_19.h" + +API_CALLABLE(N(CosInterpAbsMinMax)) { + Bytecode* args = script->ptrReadPos; + s32 outVarTime = *args++; + s32 time = evt_get_variable(script, outVarTime); + s32 outValue = *args++; + f32 min = evt_get_float_variable(script, *args++); + f32 max = evt_get_float_variable(script, *args++); + s32 duration = evt_get_variable(script, *args++); + s32 onlyOnce = evt_get_variable(script, *args++); + f32 phaseOffset = (evt_get_float_variable(script, *args++) / 180.0f) * PI; + f32 delta = fabsf(max - min) / 2; // fabsf here is the only difference between this and CosInterpMinMax + + if (onlyOnce && duration < time) { + time = duration; + evt_set_variable(script, outVarTime, duration); + } + + evt_set_float_variable(script, outValue, + (min + delta) // average value + - (delta * cos_rad(((time * PI) / duration) + phaseOffset))); // perturbation + + return ApiStatus_DONE2; +} + +EvtScript N(EVS_AnimatePlatforms) = { + EVT_SET_GROUP(EVT_GROUP_EF) + EVT_SET(LVarF, 0) + EVT_LABEL(0) + EVT_SETF(LVar0, EVT_FLOAT(-215.4375)) + EVT_SETF(LVar1, EVT_FLOAT(128.59375)) + EVT_SETF(LVar2, EVT_FLOAT(-200.0)) + EVT_ADDF(LVar1, MV_Distortion_Platform_01) + EVT_CALL(TranslateGroup, MODEL_g17, LVar0, LVar1, LVar2) + EVT_SETF(LVar0, EVT_FLOAT(-79.86)) + EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(5.0), EVT_FLOAT(136.76562), 300, 0, 0) + EVT_SETF(LVar2, EVT_FLOAT(-200.0)) + EVT_ADDF(LVar1, MV_Distortion_Platform_02) + EVT_CALL(TranslateGroup, MODEL_g21, LVar0, LVar1, LVar2) + EVT_SETF(LVar0, EVT_FLOAT(-364.265625)) + EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(5.0), EVT_FLOAT(106.765625), 300, 0, 0) + EVT_SETF(LVar2, EVT_FLOAT(10.0)) + EVT_ADDF(LVar1, MV_Distortion_Platform_03) + EVT_CALL(TranslateGroup, MODEL_g22, LVar0, LVar1, LVar2) + EVT_SETF(LVar0, EVT_FLOAT(295.73438)) + EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(65.0), EVT_FLOAT(86.984375), 200, 0, 0) + EVT_SETF(LVar2, EVT_FLOAT(-80.0)) + EVT_ADDF(LVar1, MV_Distortion_Platform_04) + EVT_CALL(TranslateGroup, MODEL_g23, LVar0, LVar1, LVar2) + EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar2, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0) + EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar3, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0) + EVT_SETF(LVar0, MV_Distortion_Platform_01) + EVT_SETF(LVar1, MV_Distortion_Platform_01) + EVT_MULF(LVar0, EVT_FLOAT(-0.02)) + EVT_MULF(LVar1, EVT_FLOAT(0.04)) + EVT_ADDF(LVar0, LVar2) + EVT_ADDF(LVar1, LVar3) + EVT_CALL(ScaleGroup, MODEL_g17, LVar0, LVar1, 1) + EVT_SETF(LVar0, MV_Distortion_Platform_02) + EVT_SETF(LVar1, MV_Distortion_Platform_02) + EVT_MULF(LVar0, EVT_FLOAT(-0.02)) + EVT_MULF(LVar1, EVT_FLOAT(0.04)) + EVT_ADDF(LVar0, LVar2) + EVT_ADDF(LVar1, LVar3) + EVT_CALL(ScaleGroup, MODEL_g21, LVar0, LVar1, 1) + EVT_SETF(LVar0, MV_Distortion_Platform_03) + EVT_SETF(LVar1, MV_Distortion_Platform_03) + EVT_MULF(LVar0, EVT_FLOAT(-0.02)) + EVT_MULF(LVar1, EVT_FLOAT(0.04)) + EVT_ADDF(LVar0, LVar2) + EVT_ADDF(LVar1, LVar3) + EVT_CALL(ScaleGroup, MODEL_g22, LVar0, LVar1, 1) + EVT_SETF(LVar0, MV_Distortion_Platform_04) + EVT_SETF(LVar1, MV_Distortion_Platform_04) + EVT_MULF(LVar0, EVT_FLOAT(-0.02)) + EVT_MULF(LVar1, EVT_FLOAT(0.04)) + EVT_ADDF(LVar0, LVar2) + EVT_ADDF(LVar1, LVar3) + EVT_CALL(ScaleGroup, MODEL_g23, LVar0, LVar1, 1) + EVT_CALL(UpdateColliderTransform, COLLIDER_o77) + EVT_CALL(UpdateColliderTransform, COLLIDER_o78) + EVT_CALL(UpdateColliderTransform, COLLIDER_o76) + EVT_CALL(UpdateColliderTransform, COLLIDER_o79) + EVT_ADD(LVarF, 1) + EVT_IF_GE(LVarF, 1200) + EVT_SET(LVarF, 0) + EVT_END_IF + EVT_SETF(LVar0, LVarA) + EVT_SETF(LVar1, LVarB) + EVT_SETF(LVar2, LVarC) + EVT_SETF(LVar3, LVarD) + EVT_MULF(LVar0, EVT_FLOAT(-0.046875)) + EVT_MULF(LVar1, EVT_FLOAT(-0.09375)) + EVT_MULF(LVar2, EVT_FLOAT(-0.09375)) + EVT_MULF(LVar3, EVT_FLOAT(-0.09375)) + EVT_ADDF(MV_Distortion_Platform_01, LVar0) + EVT_ADDF(MV_Distortion_Platform_02, LVar1) + EVT_ADDF(MV_Distortion_Platform_03, LVar2) + EVT_ADDF(MV_Distortion_Platform_04, LVar3) + EVT_MULF(MV_Distortion_Platform_01, EVT_FLOAT(0.84375)) + EVT_MULF(MV_Distortion_Platform_02, EVT_FLOAT(0.84375)) + EVT_MULF(MV_Distortion_Platform_03, EVT_FLOAT(0.84375)) + EVT_MULF(MV_Distortion_Platform_04, EVT_FLOAT(0.84375)) + EVT_ADDF(LVarA, MV_Distortion_Platform_01) + EVT_ADDF(LVarB, MV_Distortion_Platform_02) + EVT_ADDF(LVarC, MV_Distortion_Platform_03) + EVT_ADDF(LVarD, MV_Distortion_Platform_04) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_AddPlayerWeight_Platform_01) = { + EVT_THREAD + EVT_ADDF(MV_Distortion_Platform_01, EVT_FLOAT(-1.5)) + EVT_WAIT(1) + EVT_ADDF(MV_Distortion_Platform_01, EVT_FLOAT(-1.5)) + EVT_END_THREAD + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_AddPlayerWeight_Platform_02) = { + EVT_THREAD + EVT_ADDF(MV_Distortion_Platform_02, EVT_FLOAT(-1.5)) + EVT_WAIT(1) + EVT_ADDF(MV_Distortion_Platform_02, EVT_FLOAT(-1.5)) + EVT_END_THREAD + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_AddPlayerWeight_Platform_03) = { + EVT_THREAD + EVT_ADDF(MV_Distortion_Platform_03, EVT_FLOAT(-1.5)) + EVT_WAIT(1) + EVT_ADDF(MV_Distortion_Platform_03, EVT_FLOAT(-1.5)) + EVT_END_THREAD + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_AddPlayerWeight_Platform_04) = { + EVT_THREAD + EVT_ADDF(MV_Distortion_Platform_04, EVT_FLOAT(-1.5)) + EVT_WAIT(1) + EVT_ADDF(MV_Distortion_Platform_04, EVT_FLOAT(-1.5)) + EVT_END_THREAD + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupClouds) = { + EVT_CALL(ParentColliderToModel, COLLIDER_o77, MODEL_g17) + EVT_CALL(ParentColliderToModel, COLLIDER_o78, MODEL_g21) + EVT_CALL(ParentColliderToModel, COLLIDER_o76, MODEL_g22) + EVT_CALL(ParentColliderToModel, COLLIDER_o79, MODEL_g23) + EVT_CALL(SetModelFlags, MODEL_g17, 256, TRUE) + EVT_CALL(SetModelFlags, MODEL_g21, 256, TRUE) + EVT_CALL(SetModelFlags, MODEL_g22, 256, TRUE) + EVT_CALL(SetModelFlags, MODEL_g23, 256, TRUE) + EVT_EXEC(N(EVS_AnimatePlatforms)) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_01)), TRIGGER_FLOOR_TOUCH, COLLIDER_o77, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_02)), TRIGGER_FLOOR_TOUCH, COLLIDER_o78, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_03)), TRIGGER_FLOOR_TOUCH, COLLIDER_o76, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_04)), TRIGGER_FLOOR_TOUCH, COLLIDER_o79, 1, 0) + EVT_THREAD + EVT_SET(LVarF, 0) + EVT_LABEL(0) + EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar0, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0) + EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0) + EVT_CALL(ScaleModel, MODEL_o73, LVar1, LVar0, 1) + EVT_CALL(ScaleModel, MODEL_o74, LVar1, LVar0, 1) + EVT_CALL(ScaleModel, MODEL_o75, LVar0, LVar1, 1) + EVT_CALL(ScaleModel, MODEL_o76, LVar0, LVar1, 1) + EVT_CALL(ScaleModel, MODEL_o77, LVar0, LVar1, 1) + EVT_CALL(ScaleModel, MODEL_o78, LVar1, LVar0, 1) + EVT_CALL(ScaleModel, MODEL_o45, LVar0, LVar1, 1) + EVT_CALL(ScaleModel, MODEL_o56, LVar0, LVar1, 1) + EVT_ADD(LVarF, 1) + EVT_IF_GE(LVarF, 30) + EVT_SET(LVarF, 0) + EVT_END_IF + EVT_WAIT(1) + EVT_GOTO(0) + EVT_END_THREAD + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_19/flo_19_5_beanstalk.c b/src/world/area_flo/flo_19/flo_19_5_beanstalk.c new file mode 100644 index 0000000000..3ff13dff6f --- /dev/null +++ b/src/world/area_flo/flo_19/flo_19_5_beanstalk.c @@ -0,0 +1,392 @@ +#include "flo_19.h" +#include "effects.h" + +API_CALLABLE(N(GetPlayerAngles)) { + Bytecode* args = script->ptrReadPos; + s32 var1 = *args++; + s32 var2 = *args++; + + evt_set_variable(script, var1, gPlayerStatus.spriteFacingAngle); + evt_set_variable(script, var2, gPlayerStatus.targetYaw); + + return ApiStatus_DONE2; +} + +API_CALLABLE(N(PlayerRideBeanstalk)) { + f32 temp = evt_get_variable(NULL, script->varTable[2]); + f32 dist = dist2D(0.0f, 0.0f, script->varTable[9], script->varTable[11]); + f32 angle = atan2(0.0f, 0.0f, script->varTable[9], script->varTable[11]); + f32 clamped = clamp_angle(angle - temp); + + temp = sin_deg(clamped); + gPlayerStatus.position.x = (dist * temp) + 0.0f; + gPlayerStatus.position.y = evt_get_variable(NULL, script->varTable[10]) + evt_get_variable(NULL, script->varTable[3]); + temp = cos_deg(clamped); + gPlayerStatus.position.z = 0.0f - (dist * temp); + + return ApiStatus_DONE2; +} + +API_CALLABLE(N(PartnerRideBeanstalk)) { + Npc* npc = get_npc_by_index(NPC_Dummy_Partner); + f32 temp = evt_get_variable(NULL, script->varTable[2]); + f32 dist = dist2D(0.0f, 0.0f, script->varTable[12], script->varTable[14]); + f32 angle = atan2(0.0f, 0.0f, script->varTable[12], script->varTable[14]); + f32 clamped = clamp_angle(angle - temp); + + temp = sin_deg(clamped); + npc->pos.x = (dist * temp) + 0.0f; + npc->pos.y = evt_get_variable(NULL, script->varTable[13]) + evt_get_variable(NULL, script->varTable[3]); + temp = cos_deg(clamped); + npc->pos.z = 0.0f - (dist * temp); + + return ApiStatus_DONE2; +} + +API_CALLABLE(N(SetScreenFadeAmount)) { + set_screen_overlay_params_back(1, script->varTable[0]); + return ApiStatus_DONE2; +} + +#include "common/CosInterpMinMax.inc.c" + +EvtScript N(EVS_FadeOutToBlack) = { + EVT_SET(LVar0, 0) + EVT_LABEL(10) + EVT_CALL(N(SetScreenFadeAmount)) + EVT_ADD(LVar0, 25) + EVT_WAIT(1) + EVT_IF_LT(LVar0, 255) + EVT_GOTO(10) + EVT_END_IF + EVT_SET(LVar0, 255) + EVT_CALL(N(SetScreenFadeAmount)) + EVT_WAIT(1) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_FadeInFromBlack) = { + EVT_SET(LVar0, 255) + EVT_LABEL(10) + EVT_CALL(N(SetScreenFadeAmount)) + EVT_SUB(LVar0, 25) + EVT_WAIT(1) + EVT_IF_GT(LVar0, 0) + EVT_GOTO(10) + EVT_END_IF + EVT_SET(LVar0, 0) + EVT_CALL(N(SetScreenFadeAmount)) + EVT_WAIT(1) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetExteriorVineGrowth) = { + EVT_CALL(TranslateGroup, MODEL_g83, 0, LVar0, 0) + EVT_CALL(TranslateGroup, MODEL_ha, 0, LVar0, 0) + EVT_SETF(LVar1, LVar0) + EVT_MULF(LVar1, EVT_FLOAT(-12.0)) + EVT_CALL(RotateGroup, MODEL_g83, LVar1, 0, 1, 0) + EVT_CALL(RotateGroup, MODEL_ha, LVar1, 0, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetInteriorVineGrowth) = { + EVT_CALL(TranslateGroup, MODEL_g84, 0, LVar0, 0) + EVT_SETF(LVar1, LVar0) + EVT_MULF(LVar1, EVT_FLOAT(-12.0)) + EVT_CALL(RotateGroup, MODEL_g84, LVar1, 0, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Enter_Beanstalk) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) + EVT_CALL(DisablePartnerAI, 0) + EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_100, TRUE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(11.0)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(EnableGroup, MODEL_g16, FALSE) + EVT_CALL(EnableGroup, MODEL_g2, FALSE) + EVT_CALL(EnableGroup, MODEL_g3, FALSE) + EVT_CALL(EnableGroup, MODEL_g19, FALSE) + EVT_CALL(EnableGroup, MODEL_g93, FALSE) + EVT_CALL(EnableGroup, MODEL_g15, FALSE) + EVT_CALL(EnableGroup, MODEL_g25, FALSE) + EVT_SET(LVar9, EVT_FLOAT(45.0)) + EVT_SET(LVarA, EVT_FLOAT(28.0)) + EVT_SET(LVarB, EVT_FLOAT(5.0)) + EVT_SET(LVarC, EVT_FLOAT(60.0)) + EVT_SET(LVarD, EVT_FLOAT(28.0)) + EVT_SET(LVarE, EVT_FLOAT(10.0)) + EVT_THREAD + EVT_WAIT(5) + EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking) + EVT_SWITCH(AF_FLO_BeanstalkFacingRight) + EVT_CASE_EQ(0) + EVT_CALL(InterpPlayerYaw, 90, 0) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) + EVT_CASE_EQ(1) + EVT_CALL(InterpPlayerYaw, 270, 0) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) + EVT_END_SWITCH + EVT_END_THREAD + EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.3134766), EVT_FLOAT(3.0), EVT_FLOAT(-0.56640625)) + EVT_CALL(UpdateColliderTransform, COLLIDER_o117) + EVT_THREAD + EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking) + EVT_WAIT(200) + EVT_EXEC_WAIT(N(EVS_FadeOutToBlack)) + EVT_SET(AF_FLO_BeanstalkFadedOut, TRUE) + EVT_WAIT(10) + EVT_CALL(EnableGroup, MODEL_g16, TRUE) + EVT_CALL(EnableGroup, MODEL_g2, TRUE) + EVT_CALL(EnableGroup, MODEL_g3, TRUE) + EVT_CALL(EnableGroup, MODEL_g19, TRUE) + EVT_CALL(EnableGroup, MODEL_g93, TRUE) + EVT_CALL(EnableGroup, MODEL_g15, TRUE) + EVT_CALL(EnableGroup, MODEL_g25, TRUE) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_EXEC_WAIT(N(EVS_FadeInFromBlack)) + EVT_WAIT(20) + EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) + EVT_END_THREAD + EVT_SET(LVarF, 0) + EVT_LOOP(344) + EVT_ADD(LVarF, 1) + EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -210, 0, 344, 0, 0) + EVT_SETF(LVar1, LVar0) + EVT_MULF(LVar1, EVT_FLOAT(-3.0)) + EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.3134766), LVar0, EVT_FLOAT(-0.56640625)) + EVT_CALL(RotateModel, MODEL_o142, LVar1, 0, 1, 0) + EVT_CALL(UpdateColliderTransform, COLLIDER_o117) + EVT_SETF(LVar2, LVar0) + EVT_MULF(LVar2, EVT_FLOAT(-3.0)) + EVT_SETF(LVar3, LVar0) + EVT_CALL(N(PlayerRideBeanstalk)) + EVT_CALL(N(PartnerRideBeanstalk)) + EVT_LABEL(11) + EVT_WAIT(1) + EVT_IF_EQ(AF_FLO_BeanstalkFadedOut, TRUE) + EVT_GOTO(11) + EVT_END_IF + EVT_END_LOOP + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(EnablePartnerAI) + EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) + EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) + EVT_CALL(PlayerJump, 100, 0, 60, 20) + EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) + EVT_CALL(InterpPlayerYaw, 90, 0) + EVT_WAIT(5) + EVT_SET(AF_FLO_RidingBeanstalk, FALSE) + EVT_CALL(StopSound, SOUND_19C) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Exit_Beanstalk) = { + EVT_IF_EQ(AF_FLO_RidingBeanstalk, FALSE) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(InterruptUsePartner) + EVT_WAIT(15) + EVT_CALL(DisablePartnerAI, 0) + EVT_SET(AF_FLO_RidingBeanstalk, TRUE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar9, EVT_FLOAT(45.0)) + EVT_SET(LVarA, EVT_FLOAT(28.0)) + EVT_SET(LVarB, EVT_FLOAT(5.0)) + EVT_SET(LVarC, EVT_FLOAT(60.0)) + EVT_SET(LVarD, EVT_FLOAT(28.0)) + EVT_SET(LVarE, EVT_FLOAT(10.0)) + EVT_CALL(PlayerMoveTo, LVar9, LVarB, 8) + EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) + EVT_CALL(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) + EVT_CALL(PlaySound, SOUND_19D) + EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) + EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking) + EVT_CALL(N(GetPlayerAngles), LVar3, LVar4) + EVT_SWITCH(LVar4) + EVT_CASE_LT(90) + EVT_SET(AF_FLO_BeanstalkFacingRight, FALSE) + EVT_CALL(InterpPlayerYaw, 90, 0) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) + EVT_CASE_GE(270) + EVT_SET(AF_FLO_BeanstalkFacingRight, TRUE) + EVT_CALL(InterpPlayerYaw, 270, 0) + EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) + EVT_END_SWITCH + EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.3134766), EVT_FLOAT(3.0), EVT_FLOAT(-0.56640625)) + EVT_CALL(UpdateColliderTransform, COLLIDER_o117) + EVT_SET(MV_BeanstalkSceneSync, FALSE) + EVT_THREAD + EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) + EVT_WAIT(120) + EVT_SET(AF_FLO_BeanstalkFadedOut, TRUE) + EVT_WAIT(20) + EVT_EXEC_WAIT(N(EVS_FadeOutToBlack)) + EVT_WAIT(10) + EVT_CALL(EnableGroup, MODEL_g16, FALSE) + EVT_CALL(EnableGroup, MODEL_g2, FALSE) + EVT_CALL(EnableGroup, MODEL_g3, FALSE) + EVT_CALL(EnableGroup, MODEL_g19, FALSE) + EVT_CALL(EnableGroup, MODEL_g93, FALSE) + EVT_CALL(EnableGroup, MODEL_g15, FALSE) + EVT_CALL(EnableGroup, MODEL_g25, FALSE) + EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(7.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) + EVT_EXEC_WAIT(N(EVS_FadeInFromBlack)) + EVT_END_THREAD + EVT_THREAD + EVT_SET(LVarF, 0) + EVT_LOOP(344) + EVT_ADD(LVarF, 1) + EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, -210, 344, 0, 0) + EVT_SETF(LVar1, LVar0) + EVT_MULF(LVar1, EVT_FLOAT(-3.0)) + EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.3134766), LVar0, EVT_FLOAT(-0.56640625)) + EVT_CALL(RotateModel, MODEL_o142, LVar1, 0, 1, 0) + EVT_CALL(UpdateColliderTransform, COLLIDER_o117) + EVT_SETF(LVar2, LVar0) + EVT_MULF(LVar2, EVT_FLOAT(-3.0)) + EVT_SETF(LVar3, LVar0) + EVT_CALL(N(PlayerRideBeanstalk)) + EVT_CALL(N(PartnerRideBeanstalk)) + EVT_IF_EQ(LVarF, 300) + EVT_SET(MV_BeanstalkSceneSync, TRUE) + EVT_END_IF + EVT_LABEL(11) + EVT_WAIT(1) + EVT_IF_EQ(AF_FLO_BeanstalkFadedOut, TRUE) + EVT_GOTO(11) + EVT_END_IF + EVT_END_LOOP + EVT_END_THREAD + EVT_LABEL(10) + EVT_IF_EQ(MV_BeanstalkSceneSync, FALSE) + EVT_WAIT(1) + EVT_GOTO(10) + EVT_END_IF + EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_8) + EVT_WAIT(100) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_BeanstalkGrowing) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) + EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + EVT_CALL(EnableModel, MODEL_o142, FALSE) + EVT_CALL(EnableGroup, MODEL_g16, FALSE) + EVT_CALL(EnableGroup, MODEL_g2, FALSE) + EVT_CALL(EnableGroup, MODEL_g3, FALSE) + EVT_CALL(EnableGroup, MODEL_g19, FALSE) + EVT_CALL(EnableGroup, MODEL_g93, FALSE) + EVT_CALL(EnableGroup, MODEL_g15, FALSE) + EVT_CALL(EnableGroup, MODEL_g25, FALSE) + EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-20.0), EVT_FLOAT(8.5)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_SET(LVarF, 100) + EVT_SET(MV_BeanstalkGrowthProgress, LVarF) + EVT_SET(AF_FLO_BeanstalkGrowing, FALSE) + EVT_LOOP(400) + EVT_IF_EQ(AF_FLO_BeanstalkGrowing, FALSE) + EVT_IF_GT(MV_BeanstalkGrowthProgress, 400) + EVT_CALL(EnableGroup, MODEL_tuta, FALSE) + EVT_CALL(EnableGroup, MODEL_ha, FALSE) + EVT_CALL(EnableGroup, MODEL_g16, TRUE) + EVT_CALL(EnableGroup, MODEL_g2, TRUE) + EVT_CALL(EnableGroup, MODEL_g3, TRUE) + EVT_CALL(EnableGroup, MODEL_g19, TRUE) + EVT_CALL(EnableGroup, MODEL_g93, TRUE) + EVT_CALL(EnableGroup, MODEL_g15, TRUE) + EVT_CALL(EnableGroup, MODEL_g25, TRUE) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(45.0), EVT_FLOAT(-3.0)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_SET(LVarF, 150) + EVT_THREAD + EVT_WAIT(5) + EVT_CALL(EnableGroup, MODEL_tuta, TRUE) + EVT_CALL(EnableGroup, MODEL_ha, TRUE) + EVT_CALL(EnableModel, MODEL_o142, FALSE) + EVT_WAIT(48) + EVT_PLAY_EFFECT(EFFECT_CLOUD_PUFF, 0, 22, 15, 0) + EVT_WAIT(10) + EVT_PLAY_EFFECT(EFFECT_CLOUD_PUFF, 0, 22, 15, 0) + EVT_END_THREAD + EVT_SET(AF_FLO_BeanstalkGrowing, TRUE) + EVT_END_IF + EVT_END_IF + EVT_ADD(LVarF, 1) + EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -350, 0, 400, 0, 0) + EVT_SETF(MV_BeanstalkGrowthProgress, LVarF) + EVT_MULF(MV_BeanstalkGrowthProgress, EVT_FLOAT(1.6)) + EVT_SETF(LVar2, LVar0) + EVT_MULF(LVar2, EVT_FLOAT(1.0)) + EVT_SETF(LVar0, LVar2) + EVT_EXEC(N(EVS_SetExteriorVineGrowth)) + EVT_SETF(LVar2, LVar0) + EVT_MULF(LVar2, EVT_FLOAT(1.0)) + EVT_SETF(LVar0, LVar2) + EVT_EXEC(N(EVS_SetInteriorVineGrowth)) + EVT_WAIT(1) + EVT_END_LOOP + EVT_WAIT(15) + EVT_SET(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) + EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_7) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupBeanstalk) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Exit_Beanstalk)), TRIGGER_FLOOR_TOUCH, COLLIDER_o117, 1, 0) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_21/CE6700.c b/src/world/area_flo/flo_21/CE6700.c deleted file mode 100644 index 54e0334f29..0000000000 --- a/src/world/area_flo/flo_21/CE6700.c +++ /dev/null @@ -1,1427 +0,0 @@ -#include "flo_21.h" -#include "message_ids.h" -#include "sprite/npc/HuffNPuff.h" -#include "sprite/npc/TuffPuff.h" - -enum { - NPC_HUFF_N_PUFF0, - NPC_HUFF_N_PUFF1, - NPC_HUFF_N_PUFF2, - NPC_TUFF_PUFF0, - NPC_TUFF_PUFF1, - NPC_TUFF_PUFF2, - NPC_TUFF_PUFF3, - NPC_TUFF_PUFF4, - NPC_TUFF_PUFF5, - NPC_TUFF_PUFF6, - NPC_TUFF_PUFF7, - NPC_TUFF_PUFF8, - NPC_TUFF_PUFF9, - NPC_TUFF_PUFF10, - NPC_TUFF_PUFF11, - NPC_TUFF_PUFF12, - NPC_TUFF_PUFF13, - NPC_TUFF_PUFF14, -}; - -EntryList N(entryList) = { - { -800.0f, -46.0f, 0.0f, 90.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_21 }, -}; - -EvtScript N(80240D40) = { - EVT_IF_EQ(GB_StoryProgress, 56) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -#include "world/common/todo/StarSpiritEffectFunc.inc.c" - -EvtScript N(80240DA0) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_IF_EQ(LVar5, 1) - EVT_IF_EQ(LVar6, 1) - EVT_IF_EQ(LVar7, 1) - EVT_IF_EQ(LVar8, 1) - EVT_CALL(N(UpdateTexturePanSmooth)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(UpdateTexturePanStepped)) - EVT_RETURN - EVT_END -}; - -EvtScript N(80240E3C) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(55) - EVT_SET(LVar0, 0) - EVT_IF_EQ(MapVar(10), 0) - EVT_RETURN - EVT_END_IF - EVT_SET(GB_StoryProgress, 56) - EVT_CASE_EQ(56) - EVT_SET(LVar0, 1) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_IF_EQ(LVar0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, 0, 650, 205, 0) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(0.6)) - EVT_CALL(SetPanTarget, 0, 650, 150, 0) - EVT_CALL(GetCamDistance, 0, LVar1) - EVT_SUB(LVar1, 100) - EVT_CALL(SetCamDistance, 0, LVar1) - EVT_IF_NE(EVT_FLOAT(-5.5), 10000) - EVT_CALL(GetCamPitch, 0, LVar2, LVar3) - EVT_CALL(SetCamPitch, 0, LVar2, EVT_FLOAT(-5.5)) - EVT_END_IF - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(N(StarSpiritEffectFunc2), 5, 180, 650, 170, 0, 650, 205, 0, 150, 120) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc3)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySound, 0x80000067) - EVT_CALL(N(StarSpiritEffectFunc1)) - EVT_CALL(StopSound, 0x80000067) - EVT_CALL(PlaySoundAt, 0xB2, 0, 650, 205, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(SetPlayerAnimation, 65578) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(180) - EVT_WAIT(115) - EVT_CALL(PlaySoundAt, 0x137, 0, 650, 205, 0) - EVT_END_THREAD - EVT_CALL(N(StarSpiritEffectFunc4), 1) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_END_THREAD - EVT_ADD(LVar1, 100) - EVT_CALL(SetCamDistance, 0, LVar1) - EVT_CALL(SetPanTarget, 0, 650, 120, 0) - EVT_CALL(N(StarSpiritEffectFunc4), 2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, 0, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, 0, LVar2, LVar3, LVar4) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, 0, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(N(StarSpiritEffectFunc5), 5, 650, 150, 0, 120) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc6)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(N(StarSpiritEffectFunc4), 3) - EVT_CALL(PlaySoundAtPlayer, 312, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GB_StoryProgress, 57) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), 5, 14) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_802412F4) = EVT_EXIT_WALK(60, 0, "flo_19", 1); - -EvtScript N(80241350) = { - EVT_BIND_TRIGGER(N(exitWalk_802412F4), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 39) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80245AEC))) - EVT_EXEC(N(80241B98)) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_EXEC(N(80241600)) - EVT_CALL(ModifyColliderFlags, 3, 5, 0x00000007) - EVT_CALL(ModifyColliderFlags, 3, 7, 0x00000007) - EVT_CALL(GetEntryID, LVar0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80241350))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(80240D40)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240B00_CE7200)) - EVT_END_IF - EVT_EXEC(N(80240E3C)) - EVT_RETURN - EVT_END -}; - -s32 N(D_802414FC_CE7BFC)[] = { - 0, - EVT_FLOAT(1), EVT_FLOAT(1), EVT_FLOAT(1), - EVT_FLOAT(1), EVT_FLOAT(1), EVT_FLOAT(1), - EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1), - EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1), - EVT_FLOAT(1), EVT_FLOAT(1), EVT_FLOAT(1), - EVT_FLOAT(1), EVT_FLOAT(1), EVT_FLOAT(1), - EVT_FLOAT(0.9), EVT_FLOAT(0.9), EVT_FLOAT(0.9), - EVT_FLOAT(0.9), EVT_FLOAT(0.9), EVT_FLOAT(0.9), -}; - -EvtScript N(80241560) = { - EVT_ADDF(MapVar(0), EVT_FLOAT(-1.5)) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241580) = { - EVT_ADDF(MapVar(1), EVT_FLOAT(-1.5)) - EVT_RETURN - EVT_END -}; - -EvtScript N(802415A0) = { - EVT_ADDF(MapVar(2), EVT_FLOAT(-1.5)) - EVT_RETURN - EVT_END -}; - -EvtScript N(802415C0) = { - EVT_ADDF(MapVar(3), EVT_FLOAT(-1.5)) - EVT_RETURN - EVT_END -}; - -EvtScript N(802415E0) = { - EVT_ADDF(MapVar(4), EVT_FLOAT(-1.5)) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241600) = { - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0) - EVT_CALL(ScaleModel, 88, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, 90, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, 92, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, 94, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, 96, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, 98, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, 100, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, 102, LVar0, LVar1, 1) - EVT_ADD(LVarF, 1) - EVT_IF_GE(LVarF, 30) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END -}; - -static s32 N(pad_17BC) = { - 0x00000000, -}; - -NpcSettings N(npcSettings_802417C0) = { - .height = 24, - .radius = 28, - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 16, -}; - -NpcSettings N(npcSettings_802417EC) = { - .height = 24, - .radius = 24, - .level = 99, -}; - -NpcSettings N(npcSettings_80241818) = { - .height = 26, - .radius = 24, - .level = 99, -}; - -NpcSettings N(npcSettings_80241844) = { - .height = 20, - .radius = 20, - .level = 99, -}; - -NpcSettings N(npcSettings_80241870) = { - .height = 22, - .radius = 24, - .level = 99, -}; - -Vec3f N(vectorList_8024189C)[] = { - { 600.0, 104.0, 0.0 }, { 575.0, 204.0, 0.0 }, - { 550.0, 104.0, 0.0 }, -}; - -EvtScript N(802418C0) = { - EVT_LABEL(0) - EVT_CALL(PlaySound, 0x20B6) - EVT_CALL(ShakeCam, 0, 0, 15, EVT_FLOAT(1.0)) - EVT_WAIT(15) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241920) = { - EVT_CALL(PlaySoundAtNpc, 0, 0x3C0, 0) - EVT_CALL(PlayEffect, 0x25, 3, 650, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_CALL(SetNpcJumpscale, 1, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, 1, 650, 50, 0, 5) - EVT_CALL(SetNpcPos, 0, 650, 50, 5) - EVT_CALL(SetNpcPos, 1, 650, 50, 0) - EVT_CALL(SetNpcPos, 2, 650, 50, 0) - EVT_CALL(SetNpcJumpscale, 0, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcJumpscale, 1, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcJumpscale, 2, EVT_FLOAT(0.0)) - EVT_THREAD - EVT_CALL(NpcJump0, 0, 650, 150, 5, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcJump0, 1, 650, 150, 0, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcJump0, 2, 650, 150, 0, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario_80017) - EVT_CALL(LoadPath, 30, EVT_PTR(N(vectorList_8024189C)), 3, 0) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002B) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241B98) = { - EVT_IF_GE(GB_StoryProgress, 56) - EVT_RETURN - EVT_END_IF - EVT_CALL(AwaitPlayerApproach, 650, 0, 30) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_HUFF_N_PUFF_THEME, 0, 8) - EVT_EXEC_GET_TID(N(802418C0), LVar9) - EVT_CALL(GetCurrentPartner, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(InterpPlayerYaw, 90, 1) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002B) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_100)), TRUE) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, 0, LVar2, LVar3, LVar4) - EVT_CALL(SetPanTarget, 0, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(MakeLerp, LVar2, 600, 20, 0) - EVT_SET(LVar2, LVar3) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 15) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar3, 3) - EVT_CALL(SetPlayerPos, LVar0, LVar3, LVar4) - EVT_IF_GT(LVar3, LVar5) - EVT_SET(LVar3, LVar2) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetPanTarget, 0, LVar0, LVar2, LVar4) - EVT_END_LOOP - EVT_CALL(func_802D2C14, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar2, LVar4) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_100)), FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CA, 630, 120, 0) - EVT_CALL(SetCamDistance, 0, EVT_FLOAT(600.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(30.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CB, 630, 120, 0) - EVT_CALL(SetCamDistance, 0, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(func_802D2C14, 0) - EVT_WAIT(10) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, 8) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CC, 630, 120, 0) - EVT_ELSE - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CD, 630, 120, 0) - EVT_END_IF - EVT_CHILD_THREAD - EVT_WAIT(15) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_SET(LVar3, 40) - EVT_LOOP(5) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, 0, LVar3) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_SUB(LVar3, 10) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, EVT_FLOAT(600.0)) - EVT_CALL(SetCamSpeed, 0, LVar3) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_ADD(LVar3, 7) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_EXEC_WAIT(N(80241920)) - EVT_KILL_THREAD(LVar9) - EVT_WAIT(30) - EVT_CALL(SetNpcVar, 0, 0, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(15) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242290) = { - EVT_SETF(LVar0, EVT_FLOAT(0.95)) - EVT_SETF(LVar1, EVT_FLOAT(1.1)) - EVT_LABEL(0) - EVT_SWITCH(MapVar(13)) - EVT_CASE_EQ(0) - EVT_SET(LVar3, 10) - EVT_SET(LVar2, 2) - EVT_CASE_EQ(1) - EVT_SET(LVar3, 5) - EVT_SET(LVar2, 1) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_SET(LVar4, LVar3) - EVT_LOOP(LVar4) - EVT_CALL(SetNpcScale, 0, LVar0, LVar1, 1) - EVT_CALL(SetNpcScale, 1, LVar0, LVar1, 1) - EVT_CALL(SetNpcScale, 2, LVar0, LVar1, 1) - EVT_ADDF(LVar0, EVT_FLOAT(0.015625)) - EVT_SUBF(LVar1, EVT_FLOAT(0.01)) - EVT_WAIT(LVar2) - EVT_END_LOOP - EVT_SET(LVar4, LVar3) - EVT_LOOP(LVar4) - EVT_CALL(SetNpcScale, 0, LVar0, LVar1, 1) - EVT_CALL(SetNpcScale, 1, LVar0, LVar1, 1) - EVT_CALL(SetNpcScale, 2, LVar0, LVar1, 1) - EVT_SUBF(LVar0, EVT_FLOAT(0.015625)) - EVT_ADDF(LVar1, EVT_FLOAT(0.01)) - EVT_WAIT(LVar2) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -s32 N(intTable_8024249C)[] = { - 0x0000027B, 0x000000A5, 0x000001C2, 0x00000078, 0x00000280, 0x000000AA, 0x00000208, 0x0000010E, - 0x0000028A, 0x000000AF, 0x0000028A, 0x00000113, 0x00000294, 0x000000AA, 0x000002DA, 0x00000113, - 0x00000299, 0x000000A5, 0x00000352, 0x00000078, 0x00000276, 0x00000096, 0x000001C2, 0x0000009B, - 0x0000027D, 0x00000096, 0x00000258, 0x00000113, 0x0000028A, 0x00000096, 0x00000352, 0x0000009B, - 0x00000297, 0x00000096, 0x000002EE, 0x0000010E, 0x0000029E, 0x00000096, 0x00000352, 0x000000C3, - 0x0000027B, 0x00000087, 0x000001C2, 0x000000C3, 0x00000280, 0x00000082, 0x000001C2, 0x000000EB, - 0x0000028A, 0x0000007D, 0x000001C2, 0x0000010E, 0x00000294, 0x00000082, 0x00000352, 0x0000010E, - 0x00000299, 0x00000087, 0x00000352, 0x000000EB, -}; - -s32 N(intTable_8024258C)[] = { - 0x0000000A, 0x0000000E, 0x00000007, 0x0000000E, 0x00000005, 0x00000006, 0x00000005, 0x0000000C, - 0x00000006, 0x0000000C, 0x00000005, 0x00000005, 0x00000005, 0x0000000A, 0x00000005, 0x0000000A, - 0x00000005, 0x00000004, -}; - -s32 N(intTable_802425D4)[] = { - 0x00000008, 0x0000000A, 0x0000000A, 0x00000008, -}; - -s32 N(intTable_802425E4)[] = { - 0x0000000A, 0x00000005, 0x00000007, 0x00000005, 0x0000000E, 0x00000006, 0x0000000E, 0x00000005, - 0x00000006, 0x00000005, 0x0000000C, 0x00000005, 0x0000000C, 0x00000005, 0x00000005, 0x00000005, - 0x0000000A, 0x00000004, -}; - -s32 N(intTable_8024262C)[] = { - 0x0000000A, 0x00000006, 0x00000006, 0x0000000A, -}; - -EvtScript N(8024263C) = { - EVT_SETF(LVar0, 10) - EVT_SETF(LVar1, 1) - EVT_CHILD_THREAD - EVT_LOOP(8) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_2)), FALSE) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_2)), FALSE) - EVT_CALL(SetNpcFlagBits, 2, ((NPC_FLAG_2)), FALSE) - EVT_WAIT(LVar0) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_2)), TRUE) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_2)), TRUE) - EVT_CALL(SetNpcFlagBits, 2, ((NPC_FLAG_2)), TRUE) - EVT_WAIT(LVar1) - EVT_SUBF(LVar0, 0) - EVT_ADDF(LVar1, 0) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_2)), FALSE) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_2)), FALSE) - EVT_CALL(SetNpcFlagBits, 2, ((NPC_FLAG_2)), FALSE) - EVT_WAIT(LVar0) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_2)), TRUE) - EVT_CALL(SetNpcFlagBits, 1, ((NPC_FLAG_2)), TRUE) - EVT_CALL(SetNpcFlagBits, 2, ((NPC_FLAG_2)), TRUE) - EVT_WAIT(LVar1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, 255, 10, 4) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(func_802CFD30, 0, 9, LVar0, LVar0, LVar0, 0) - EVT_CALL(func_802CFD30, 1, 9, LVar0, LVar0, LVar0, 0) - EVT_CALL(func_802CFD30, 2, 9, LVar0, LVar0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; - -EvtScript N(80242918) = { - EVT_SETF(MapVar(11), EVT_FLOAT(1.0)) - EVT_SETF(MapVar(12), EVT_FLOAT(1.0)) - EVT_CHILD_THREAD - EVT_USE_BUF(EVT_PTR(N(intTable_8024258C))) - EVT_LOOP(6) - EVT_CALL(PlaySoundAtNpc, 0, 0x20B6, 0) - EVT_BUF_READ3(LVar6, LVar7, LVar8) - EVT_CALL(MakeLerp, LVar6, LVar7, LVar8, 11) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(MapVar(11), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_USE_BUF(EVT_PTR(N(intTable_802425D4))) - EVT_LOOP(2) - EVT_CALL(PlaySoundAtNpc, 0, 0x20B6, 0) - EVT_BUF_READ2(LVar6, LVar7) - EVT_CALL(MakeLerp, LVar6, LVar7, 4, 11) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(MapVar(11), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_USE_BUF(EVT_PTR(N(intTable_802425E4))) - EVT_LOOP(6) - EVT_BUF_READ3(LVar6, LVar7, LVar8) - EVT_CALL(MakeLerp, LVar6, LVar7, LVar8, 11) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(MapVar(12), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_USE_BUF(EVT_PTR(N(intTable_8024262C))) - EVT_LOOP(2) - EVT_BUF_READ2(LVar6, LVar7) - EVT_CALL(MakeLerp, LVar6, LVar7, 4, 11) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(MapVar(12), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_LOOP(100) - EVT_CALL(SetNpcScale, 0, MapVar(11), MapVar(12), 1) - EVT_CALL(SetNpcScale, 1, MapVar(11), MapVar(12), 1) - EVT_CALL(SetNpcScale, 2, MapVar(11), MapVar(12), 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(80242D34) = { - EVT_CHILD_THREAD - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_SET(LVar0, 3) - EVT_LOOP(15) - EVT_CALL(SetNpcRotation, LVar0, 0, LVar1, 0) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_ADD(LVar1, 60) - EVT_IF_GT(LVar1, 360) - EVT_ADD(LVar1, -360) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_USE_BUF(EVT_PTR(N(intTable_8024249C))) - EVT_SET(LVar8, 3) - EVT_LOOP(14) - EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4) - EVT_THREAD - EVT_CALL(RandInt, 5, LVar5) - EVT_WAIT(LVar5) - EVT_CALL(SetNpcPos, LVar8, LVar1, LVar2, -30) - EVT_CALL(RandInt, 2, LVar5) - EVT_ADD(LVar5, 8) - EVT_CALL(PlaySoundAtNpc, LVar8, 0x3D5, 0) - EVT_CALL(NpcJump0, LVar8, LVar3, LVar4, -15, LVar5) - EVT_CALL(SetNpcPos, LVar8, 0, -1000, 0) - EVT_END_THREAD - EVT_ADD(LVar8, 1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, 0, 0, -1000, 0) - EVT_CALL(SetNpcPos, 1, 0, -1000, 0) - EVT_CALL(SetNpcPos, 2, 0, -1000, 0) - EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4) - EVT_WAIT(5) - EVT_CALL(SetNpcPos, LVar8, LVar1, LVar2, -30) - EVT_CALL(PlaySoundAtNpc, LVar8, 0x3D6, 0) - EVT_CALL(NpcJump0, LVar8, LVar3, LVar4, -15, 10) - EVT_CALL(SetNpcPos, LVar8, 0, -1000, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80243010) = { - EVT_CALL(SetNpcAnimation, 1, ANIM_HuffNPuff_Anim04) - EVT_CALL(SetNpcAnimation, 0, ANIM_HuffNPuff_Anim05) - EVT_CALL(SetNpcAnimation, 2, ANIM_HuffNPuff_Anim06) - EVT_CALL(GetNpcPos, 0, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar2, 40) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, 0, ANIM_HuffNPuff_Anim30, ANIM_HuffNPuff_Anim05, 256, -30, 30, MSG_CH6_00CE) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_SET(MapVar(13), 2) - EVT_CALL(GetNpcPos, 0, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar3, LVar0) - EVT_SET(LVar4, LVar0) - EVT_ADD(LVar3, -35) - EVT_ADD(LVar4, 35) - EVT_LOOP(3) - EVT_CALL(PlayEffect, 0x19, 0, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(12) - EVT_CALL(PlayEffect, 0x19, 0, LVar3, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_ADD(LVar3, 7) - EVT_WAIT(8) - EVT_CALL(PlayEffect, 0x19, 0, LVar4, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_ADD(LVar4, -7) - EVT_WAIT(14) - EVT_END_LOOP - EVT_CALL(PlayEffect, 0x19, 2, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_CALL(ShakeCam, 0, 0, 30, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30) - EVT_LOOP(10) - EVT_CALL(PlayEffect, 0x3A, 0, LVar0, LVar1, LVar2, 40, 65, 12, 15, 0, 0, 0, 0, 0) - EVT_WAIT(7) - EVT_END_LOOP - EVT_END_THREAD - EVT_EXEC(N(8024263C)) - EVT_EXEC_WAIT(N(80242918)) - EVT_EXEC_WAIT(N(80242D34)) - EVT_WAIT(10) - EVT_RETURN - EVT_END -}; - -EvtScript N(idle_80243428) = { - EVT_LABEL(0) - EVT_CALL(SetSelfVar, 0, 0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(MapVar(13), 1) - EVT_CALL(StartBossBattle, 14) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(defeat_802434D8) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetEncounterStatusFlags, 1, 1) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar3) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar3, -20) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar3) - EVT_EXEC_WAIT(N(80243010)) - EVT_WAIT(50) - EVT_SET(MapVar(10), 1) - EVT_EXEC(N(80240E3C)) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(defeat_802435D4) = { - EVT_RETURN - EVT_END -}; - -EvtScript N(init_802435E4) = { - EVT_IF_LT(GB_StoryProgress, 56) - EVT_CALL(SetEnemyFlagBits, -1, 4194304, 1) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80243428))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_802434D8))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim02) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80243684) = { - EVT_IF_LT(GB_StoryProgress, 56) - EVT_CALL(SetEnemyFlagBits, -1, 4194304, 1) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_802435D4))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim01) - EVT_EXEC(N(80242290)) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_8024371C) = { - EVT_IF_LT(GB_StoryProgress, 56) - EVT_CALL(SetEnemyFlagBits, -1, 4194304, 1) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_802435D4))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim19) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(init_802437A8) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TuffPuff_Dizzy) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_RETURN - EVT_END -}; - -s32 N(extraAnimationList_802437E0)[] = { - ANIM_HuffNPuff_Anim00, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim02, - ANIM_HuffNPuff_Anim04, - ANIM_HuffNPuff_Anim05, - ANIM_HuffNPuff_Anim31, - ANIM_HuffNPuff_Anim19, - ANIM_HuffNPuff_Anim2D, - ANIM_LIST_END, -}; - -StaticNpc N(npcGroup_80243804)[] = { - { - .id = NPC_HUFF_N_PUFF0, - .settings = &N(npcSettings_802417EC), - .pos = { 650.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, - .init = &N(init_802435E4), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - }, - .extraAnimations = N(extraAnimationList_802437E0), - }, - { - .id = NPC_HUFF_N_PUFF1, - .settings = &N(npcSettings_802417EC), - .pos = { 650.0f, 100.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, - .init = &N(init_80243684), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - }, - .extraAnimations = N(extraAnimationList_802437E0), - }, - { - .id = NPC_HUFF_N_PUFF2, - .settings = &N(npcSettings_802417EC), - .pos = { 650.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, - .init = &N(init_8024371C), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - ANIM_HuffNPuff_Anim01, - }, - .extraAnimations = N(extraAnimationList_802437E0), - }, -}; - -s32 N(extraAnimationList_80243DD4)[] = { - ANIM_TuffPuff_Dizzy, - ANIM_LIST_END, -}; - -StaticNpc N(npcGroup_80243DDC)[] = { - { - .id = NPC_TUFF_PUFF0, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF1, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF2, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF3, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF4, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF5, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF6, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF7, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF8, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF9, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF10, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF11, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF12, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF13, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, - { - .id = NPC_TUFF_PUFF14, - .settings = &N(npcSettings_802417C0), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802437A8), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .extraAnimations = N(extraAnimationList_80243DD4), - }, -}; - -NpcGroupList N(npcGroupList_80245AEC) = { - NPC_GROUP(N(npcGroup_80243804), 0x1900, 0x07), - NPC_GROUP(N(npcGroup_80243DDC), 0x181F, 0x07), - {}, -}; - -#include "world/common/atomic/TexturePan.inc.c" - -ApiStatus N(func_80240B00_CE7200)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(1, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_21/CE7240.c b/src/world/area_flo/flo_21/CE7240.c deleted file mode 100644 index b9720fddbe..0000000000 --- a/src/world/area_flo/flo_21/CE7240.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "flo_21.h" - -#include "common/CosInterpMinMax.inc.c" - -#include "world/common/todo/UnsetCamera0MoveFlag1.inc.c" diff --git a/src/world/area_flo/flo_21/flo_21.h b/src/world/area_flo/flo_21/flo_21.h index fa73fe5b47..c6b173518d 100644 --- a/src/world/area_flo/flo_21/flo_21.h +++ b/src/world/area_flo/flo_21/flo_21.h @@ -2,24 +2,52 @@ /// @brief Flower Fields - Huff N Puff Room #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_21_shape.h" +#include "mapfs/flo_21_hit.h" + +enum { + NPC_HuffNPuff_01 = 0, + NPC_HuffNPuff_02 = 1, + NPC_HuffNPuff_03 = 2, + NPC_TuffPuff_01 = 3, + NPC_TuffPuff_02 = 4, + NPC_TuffPuff_03 = 5, + NPC_TuffPuff_04 = 6, + NPC_TuffPuff_05 = 7, + NPC_TuffPuff_06 = 8, + NPC_TuffPuff_07 = 9, + NPC_TuffPuff_08 = 10, + NPC_TuffPuff_09 = 11, + NPC_TuffPuff_10 = 12, + NPC_TuffPuff_11 = 13, + NPC_TuffPuff_12 = 14, + NPC_TuffPuff_13 = 15, + NPC_TuffPuff_14 = 16, + NPC_TuffPuff_15 = 17, +}; + +enum { + MV_Unk_00 = MapVar(0), + MV_Unk_01 = MapVar(1), + MV_Unk_02 = MapVar(2), + MV_Unk_03 = MapVar(3), + MV_Unk_04 = MapVar(4), + MV_BossDefeated = MapVar(10), + MV_HuffScaleX = MapVar(11), + MV_HuffScaleY = MapVar(12), + MV_BossFightState = MapVar(13), +}; + #define NAMESPACE flo_21 -ApiStatus N(UpdateTexturePanSmooth)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanStepped)(Evt* script, s32 isInitialCall); -ApiStatus N(CosInterpMinMax)(Evt* script, s32 isInitialCall); -ApiStatus N(flo_21_StarSpiritEffectFunc1)(Evt* script, s32 isInitialCall); -ApiStatus N(flo_21_StarSpiritEffectFunc2)(Evt* script, s32 isInitialCall); -ApiStatus N(flo_21_StarSpiritEffectFunc3)(Evt* script, s32 isInitialCall); -ApiStatus N(flo_21_StarSpiritEffectFunc4)(Evt* script, s32 isInitialCall); -ApiStatus N(flo_21_StarSpiritEffectFunc5)(Evt* script, s32 isInitialCall); -ApiStatus N(flo_21_StarSpiritEffectFunc6)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240B00_CE7200)(Evt* script, s32 isInitialCall); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_SetupCloudPuffs); +extern EvtScript N(EVS_Scene_HuffNPuffAmbush); +extern EvtScript N(EVS_TrySpawningStarCard); -extern NpcGroupList N(npcGroupList_80245AEC); -extern EvtScript N(80241600); -extern EvtScript N(80241B98); -extern EvtScript N(main); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_21/flo_21_0_header.c b/src/world/area_flo/flo_21/flo_21_0_header.c new file mode 100644 index 0000000000..82ba723997 --- /dev/null +++ b/src/world/area_flo/flo_21/flo_21_0_header.c @@ -0,0 +1,13 @@ +#include "flo_21.h" + +EntryList N(Entrances) = { + [flo_21_ENTRY_0] { -800.0, -46.0, 0.0, 90.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_21 }, +}; diff --git a/src/world/area_flo/flo_21/flo_21_1_music.c b/src/world/area_flo/flo_21/flo_21_1_music.c new file mode 100644 index 0000000000..885dd1bdbe --- /dev/null +++ b/src/world/area_flo/flo_21/flo_21_1_music.c @@ -0,0 +1,11 @@ +#include "flo_21.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_IF_EQ(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + EVT_CALL(FadeOutMusic, 0, 500) + EVT_ELSE + EVT_CALL(SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_21/flo_21_2_main.c b/src/world/area_flo/flo_21/flo_21_2_main.c new file mode 100644 index 0000000000..9436b307b1 --- /dev/null +++ b/src/world/area_flo/flo_21/flo_21_2_main.c @@ -0,0 +1,116 @@ +#include "flo_21.h" + +#include "world/common/todo/StarSpiritEffectFunc.inc.c" + +#include "world/common/atomic/TexturePan.inc.c" +#include "world/common/atomic/TexturePan.data.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_TrySpawningStarCard) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_EQ(STORY_CH6_GREW_MAGIC_BEANSTALK) + EVT_SET(LVar0, FALSE) + EVT_IF_EQ(MV_BossDefeated, FALSE) + EVT_RETURN + EVT_END_IF + EVT_SET(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + EVT_CASE_EQ(STORY_CH6_DEFEATED_HUFF_N_PUFF) + EVT_SET(LVar0, TRUE) + EVT_CASE_DEFAULT + EVT_RETURN + EVT_END_SWITCH + EVT_IF_EQ(LVar0, FALSE) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 650, 205, 0) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 650, 150, 0) + EVT_SPIRIT_ADJUST_CAM(EVT_FLOAT(-5.5)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(N(StarSpiritEffectFunc2), 5, 180, 650, 170, 0, 650, 205, 0, 150, 120) + EVT_THREAD + EVT_CALL(N(StarSpiritEffectFunc3)) + EVT_END_THREAD + EVT_THREAD + EVT_WAIT(1) + EVT_CALL(PlaySound, SOUND_80000067) + EVT_CALL(N(StarSpiritEffectFunc1)) + EVT_CALL(StopSound, SOUND_80000067) + EVT_CALL(PlaySoundAt, SOUND_B2, 0, 650, 205, 0) + EVT_END_THREAD + EVT_THREAD + EVT_WAIT(45) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A) + EVT_END_THREAD + EVT_THREAD + EVT_WAIT(180) + EVT_WAIT(115) + EVT_CALL(PlaySoundAt, SOUND_137, 0, 650, 205, 0) + EVT_END_THREAD + EVT_CALL(N(StarSpiritEffectFunc4), 1) + EVT_THREAD + EVT_WAIT(80) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) + EVT_END_THREAD + EVT_ADD(LVar1, 100) + EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 650, 120, 0) + EVT_CALL(N(StarSpiritEffectFunc4), 2) + EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_ELSE + EVT_CALL(N(StarSpiritEffectFunc5), 5, 650, 150, 0, 120) + EVT_THREAD + EVT_CALL(N(StarSpiritEffectFunc6)) + EVT_END_THREAD + EVT_WAIT(1) + EVT_END_IF + EVT_CALL(N(StarSpiritEffectFunc4), 3) + EVT_CALL(PlaySoundAtPlayer, SOUND_138, 0) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_SET(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) + EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_5, TRANSITION_14) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_ExitWalk_flo_19_1) = EVT_EXIT_WALK(60, flo_21_ENTRY_0, "flo_19", flo_19_ENTRY_1); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_19_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_CLOUDY_CLIMB) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC(N(EVS_Scene_HuffNPuffAmbush)) + EVT_CALL(HidePlayerShadow, TRUE) + EVT_EXEC(N(EVS_SetupCloudPuffs)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_CLOUD) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o115, SURFACE_TYPE_CLOUD) + EVT_CALL(GetEntryID, LVar0) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_EXEC(N(EVS_TrySpawningStarCard)) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_21/flo_21_3_clouds.c b/src/world/area_flo/flo_21/flo_21_3_clouds.c new file mode 100644 index 0000000000..fecbc53489 --- /dev/null +++ b/src/world/area_flo/flo_21/flo_21_3_clouds.c @@ -0,0 +1,73 @@ +#include "flo_21.h" + +s32 N(UnusedScaleVectors)[] = { + EVT_FLOAT(1.0), EVT_FLOAT(1.0), + EVT_FLOAT(1.0), EVT_FLOAT(1.0), + EVT_FLOAT(1.0), EVT_FLOAT(1.0), + EVT_FLOAT(1.1), EVT_FLOAT(1.1), + EVT_FLOAT(1.1), EVT_FLOAT(1.1), + EVT_FLOAT(1.1), EVT_FLOAT(1.1), + EVT_FLOAT(1.0), EVT_FLOAT(1.0), + EVT_FLOAT(1.0), EVT_FLOAT(1.0), + EVT_FLOAT(1.0), EVT_FLOAT(1.0), + EVT_FLOAT(0.9), EVT_FLOAT(0.9), + EVT_FLOAT(0.9), EVT_FLOAT(0.9), + EVT_FLOAT(0.9), EVT_FLOAT(0.9), +}; + +EvtScript N(EVS_UnkInit_00) = { + EVT_ADDF(MV_Unk_00, EVT_FLOAT(-1.5)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_UnkInit_01) = { + EVT_ADDF(MV_Unk_01, EVT_FLOAT(-1.5)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_UnkInit_02) = { + EVT_ADDF(MV_Unk_02, EVT_FLOAT(-1.5)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_UnkInit_03) = { + EVT_ADDF(MV_Unk_03, EVT_FLOAT(-1.5)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_UnkInit_04) = { + EVT_ADDF(MV_Unk_04, EVT_FLOAT(-1.5)) + EVT_RETURN + EVT_END +}; + +#include "common/CosInterpMinMax.inc.c" + +EvtScript N(EVS_SetupCloudPuffs) = { + EVT_THREAD + EVT_SET(LVarF, 0) + EVT_LABEL(0) + EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0) + EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0) + EVT_CALL(ScaleModel, MODEL_o1, LVar1, LVar0, 1) + EVT_CALL(ScaleModel, MODEL_o2, LVar1, LVar0, 1) + EVT_CALL(ScaleModel, MODEL_o3, LVar0, LVar1, 1) + EVT_CALL(ScaleModel, MODEL_o4, LVar0, LVar1, 1) + EVT_CALL(ScaleModel, MODEL_o9, LVar0, LVar1, 1) + EVT_CALL(ScaleModel, MODEL_o14, LVar1, LVar0, 1) + EVT_CALL(ScaleModel, MODEL_o15, LVar0, LVar1, 1) + EVT_CALL(ScaleModel, MODEL_o16, LVar0, LVar1, 1) + EVT_ADD(LVarF, 1) + EVT_IF_GE(LVarF, 30) + EVT_SET(LVarF, 0) + EVT_END_IF + EVT_WAIT(1) + EVT_GOTO(0) + EVT_END_THREAD + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_21/flo_21_4_npc.c b/src/world/area_flo/flo_21/flo_21_4_npc.c new file mode 100644 index 0000000000..033040da03 --- /dev/null +++ b/src/world/area_flo/flo_21/flo_21_4_npc.c @@ -0,0 +1,818 @@ +#include "flo_21.h" +#include "effects.h" + +#include "world/common/enemy/complete/HuffNPuff.h" +#include "world/common/enemy/complete/TuffPuff.h" + +#include "world/common/todo/UnsetCamera0MoveFlag1.inc.c" + +NpcSettings N(NpcSettings_TuffPuff) = { + .height = 24, + .radius = 28, + .level = 16, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, +}; + +NpcSettings N(NpcSettings_HuffNPuff) = { + .height = 24, + .radius = 24, + .level = 99, +}; + +NpcSettings N(NpcSettings_Unused1) = { + .height = 26, + .radius = 24, + .level = 99, +}; + +NpcSettings N(NpcSettings_Unused2) = { + .height = 20, + .radius = 20, + .level = 99, +}; + +NpcSettings N(NpcSettings_Unused3) = { + .height = 22, + .radius = 24, + .level = 99, +}; + +Vec3f N(Path_JumpOut)[] = { + { 600.0, 104.0, 0.0 }, + { 575.0, 204.0, 0.0 }, + { 550.0, 104.0, 0.0 }, +}; + +EvtScript N(EVS_PlayRumbleSounds) = { + EVT_LABEL(0) + EVT_CALL(PlaySound, SOUND_20B6) + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(1.0)) + EVT_WAIT(15) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_HuffNPuff_JumpOut) = { + EVT_CALL(PlaySoundAtNpc, NPC_HuffNPuff_01, SOUND_3C0, 0) + EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 3, 650, 104, 0) + EVT_WAIT(15) + EVT_CALL(SetNpcJumpscale, NPC_HuffNPuff_02, EVT_FLOAT(0.0)) + EVT_CALL(NpcJump0, NPC_HuffNPuff_02, 650, 50, 0, 5) + EVT_CALL(SetNpcPos, NPC_HuffNPuff_01, 650, 50, 5) + EVT_CALL(SetNpcPos, NPC_HuffNPuff_02, 650, 50, 0) + EVT_CALL(SetNpcPos, NPC_HuffNPuff_03, 650, 50, 0) + EVT_CALL(SetNpcJumpscale, NPC_HuffNPuff_01, EVT_FLOAT(0.0)) + EVT_CALL(SetNpcJumpscale, NPC_HuffNPuff_02, EVT_FLOAT(0.0)) + EVT_CALL(SetNpcJumpscale, NPC_HuffNPuff_03, EVT_FLOAT(0.0)) + EVT_THREAD + EVT_CALL(NpcJump0, NPC_HuffNPuff_01, 650, 150, 5, 10) + EVT_END_THREAD + EVT_THREAD + EVT_CALL(NpcJump0, NPC_HuffNPuff_02, 650, 150, 0, 10) + EVT_END_THREAD + EVT_THREAD + EVT_CALL(NpcJump0, NPC_HuffNPuff_03, 650, 150, 0, 10) + EVT_END_THREAD + EVT_THREAD + EVT_CALL(SetPlayerAnimation, ANIM_Mario_80017) + EVT_CALL(LoadPath, 30, EVT_PTR(N(Path_JumpOut)), 3, EASING_LINEAR) + EVT_LABEL(0) + EVT_CALL(GetNextPathPos) + EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_IF_EQ(LVar0, 1) + EVT_GOTO(0) + EVT_END_IF + EVT_END_THREAD + EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002B) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_HuffNPuffAmbush) = { + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + EVT_RETURN + EVT_END_IF + EVT_CALL(AwaitPlayerApproach, 650, 0, 30) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(SetMusicTrack, 0, SONG_HUFF_N_PUFF_THEME, 0, 8) + EVT_EXEC_GET_TID(N(EVS_PlayRumbleSounds), LVar9) + EVT_CALL(GetCurrentPartner, LVar0) + EVT_IF_NE(LVar0, PARTNER_NONE) + EVT_CALL(InterruptUsePartner) + EVT_WAIT(20) + EVT_END_IF + EVT_CALL(DisablePlayerPhysics, TRUE) + EVT_CALL(InterpPlayerYaw, 90, 1) + EVT_WAIT(5) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002B) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_100, TRUE) + EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(MakeLerp, LVar2, 600, 20, EASING_LINEAR) + EVT_SET(LVar2, LVar3) + EVT_SET(LVar5, LVar3) + EVT_ADD(LVar5, 15) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_ADD(LVar3, 3) + EVT_CALL(SetPlayerPos, LVar0, LVar3, LVar4) + EVT_IF_GT(LVar3, LVar5) + EVT_SET(LVar3, LVar2) + EVT_END_IF + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar2, LVar4) + EVT_END_LOOP + EVT_CALL(func_802D2C14, 1) + EVT_CALL(SetPlayerPos, LVar0, LVar2, LVar4) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_100, FALSE) + EVT_CALL(DisablePlayerPhysics, FALSE) + EVT_WAIT(10) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 25) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_WAIT(10) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CA, 630, 120, 0) + EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(30.0), EVT_FLOAT(-9.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_WAIT(10) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CB, 630, 120, 0) + EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(func_802D2C14, 0) + EVT_WAIT(10) + EVT_CALL(GetCurrentPartnerID, LVar0) + EVT_IF_NE(LVar0, PARTNER_LAKILESTER) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CC, 630, 120, 0) + EVT_ELSE + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CD, 630, 120, 0) + EVT_END_IF + EVT_CHILD_THREAD + EVT_WAIT(15) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, 25) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) + EVT_SET(LVar3, 40) + EVT_LOOP(5) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar3) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_SUB(LVar3, 10) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar3) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_ADD(LVar3, 7) + EVT_END_LOOP + EVT_END_CHILD_THREAD + EVT_EXEC_WAIT(N(EVS_HuffNPuff_JumpOut)) + EVT_KILL_THREAD(LVar9) + EVT_WAIT(30) + EVT_CALL(SetNpcVar, NPC_HuffNPuff_01, 0, 1) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_WAIT(15) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_HuffNPuff_AnimateBodyScale) = { + EVT_SETF(LVar0, EVT_FLOAT(0.95)) + EVT_SETF(LVar1, EVT_FLOAT(1.1)) + EVT_LABEL(0) + EVT_SWITCH(MV_BossFightState) + EVT_CASE_EQ(0) + EVT_SET(LVar3, 10) + EVT_SET(LVar2, 2) + EVT_CASE_EQ(1) + EVT_SET(LVar3, 5) + EVT_SET(LVar2, 1) + EVT_CASE_DEFAULT + EVT_RETURN + EVT_END_SWITCH + EVT_SET(LVar4, LVar3) + EVT_LOOP(LVar4) + EVT_CALL(SetNpcScale, NPC_HuffNPuff_01, LVar0, LVar1, 1) + EVT_CALL(SetNpcScale, NPC_HuffNPuff_02, LVar0, LVar1, 1) + EVT_CALL(SetNpcScale, NPC_HuffNPuff_03, LVar0, LVar1, 1) + EVT_ADDF(LVar0, EVT_FLOAT(0.015625)) + EVT_SUBF(LVar1, EVT_FLOAT(0.01)) + EVT_WAIT(LVar2) + EVT_END_LOOP + EVT_SET(LVar4, LVar3) + EVT_LOOP(LVar4) + EVT_CALL(SetNpcScale, NPC_HuffNPuff_01, LVar0, LVar1, 1) + EVT_CALL(SetNpcScale, NPC_HuffNPuff_02, LVar0, LVar1, 1) + EVT_CALL(SetNpcScale, NPC_HuffNPuff_03, LVar0, LVar1, 1) + EVT_SUBF(LVar0, EVT_FLOAT(0.015625)) + EVT_ADDF(LVar1, EVT_FLOAT(0.01)) + EVT_WAIT(LVar2) + EVT_END_LOOP + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +// start and end positions for each of the Tuff Puffs when HuffNPuff explodes +Vec2i N(BlowUpPositions)[] = { + { 635, 165}, { 450, 120 }, + { 640, 170}, { 520, 270 }, + { 650, 175}, { 650, 275 }, + { 660, 170}, { 730, 275 }, + { 665, 165}, { 850, 120 }, + { 630, 150}, { 450, 155 }, + { 637, 150}, { 600, 275 }, + { 650, 150}, { 850, 155 }, + { 663, 150}, { 750, 270 }, + { 670, 150}, { 850, 195 }, + { 635, 135}, { 450, 195 }, + { 640, 130}, { 450, 235 }, + { 650, 125}, { 450, 270 }, + { 660, 130}, { 850, 270 }, + { 665, 135}, { 850, 235 }, +}; + +Vec3i N(BeginAnimScaleX)[] = { + { 10, 14, 7 }, + { 14, 5, 6 }, + { 5, 12, 6 }, + { 12, 5, 5 }, + { 5, 10, 5 }, + { 10, 5, 4 }, +}; + +Vec2i N(LoopAnimScaleX)[] = { + { 8, 10 }, + { 10, 8 }, +}; + +Vec3i N(BeginAnimScaleY)[] = { + { 10, 5, 7 }, + { 5, 14, 6 }, + { 14, 5, 6 }, + { 5, 12, 5 }, + { 12, 5, 5 }, + { 5, 10, 4 }, +}; + +Vec2i N(LoopAnimScaleY)[] = { + { 10, 6 }, + { 6, 10 }, +}; + +EvtScript N(EVS_HuffNPuff_Defeat_Flashing) = { + EVT_SETF(LVar0, 10) + EVT_SETF(LVar1, 1) + EVT_CHILD_THREAD + EVT_LOOP(8) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_2, FALSE) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_2, FALSE) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_2, FALSE) + EVT_WAIT(LVar0) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_2, TRUE) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_2, TRUE) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_2, TRUE) + EVT_WAIT(LVar1) + EVT_SUBF(LVar0, 0) + EVT_ADDF(LVar1, 0) + EVT_END_LOOP + EVT_LOOP(0) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_2, FALSE) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_2, FALSE) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_2, FALSE) + EVT_WAIT(LVar0) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_2, TRUE) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_2, TRUE) + EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_2, TRUE) + EVT_WAIT(LVar1) + EVT_END_LOOP + EVT_END_CHILD_THREAD + EVT_CHILD_THREAD + EVT_LOOP(0) + EVT_CALL(MakeLerp, 0, 255, 10, EASING_QUADRATIC_OUT) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(func_802CFD30, NPC_HuffNPuff_01, 9, LVar0, LVar0, LVar0, 0) + EVT_CALL(func_802CFD30, NPC_HuffNPuff_02, 9, LVar0, LVar0, LVar0, 0) + EVT_CALL(func_802CFD30, NPC_HuffNPuff_03, 9, LVar0, LVar0, LVar0, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_LOOP + EVT_END_CHILD_THREAD + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_HuffNPuff_Defeat_AnimateScale) = { + EVT_SETF(MV_HuffScaleX, EVT_FLOAT(1.0)) + EVT_SETF(MV_HuffScaleY, EVT_FLOAT(1.0)) + EVT_CHILD_THREAD + EVT_USE_BUF(EVT_PTR(N(BeginAnimScaleX))) + EVT_LOOP(ARRAY_COUNT(N(BeginAnimScaleX))) + EVT_CALL(PlaySoundAtNpc, NPC_HuffNPuff_01, SOUND_20B6, 0) + EVT_BUF_READ3(LVar6, LVar7, LVar8) + EVT_CALL(MakeLerp, LVar6, LVar7, LVar8, EASING_SIN_OUT) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_DIVF(LVar0, 10) + EVT_SETF(MV_HuffScaleX, LVar0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_WAIT(1) + EVT_END_LOOP + EVT_LOOP(0) + EVT_USE_BUF(EVT_PTR(N(LoopAnimScaleX))) + EVT_LOOP(ARRAY_COUNT(N(LoopAnimScaleX))) + EVT_CALL(PlaySoundAtNpc, NPC_HuffNPuff_01, SOUND_20B6, 0) + EVT_BUF_READ2(LVar6, LVar7) + EVT_CALL(MakeLerp, LVar6, LVar7, 4, EASING_SIN_OUT) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_DIVF(LVar0, 10) + EVT_SETF(MV_HuffScaleX, LVar0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_LOOP + EVT_END_LOOP + EVT_END_CHILD_THREAD + EVT_CHILD_THREAD + EVT_USE_BUF(EVT_PTR(N(BeginAnimScaleY))) + EVT_LOOP(ARRAY_COUNT(N(BeginAnimScaleY))) + EVT_BUF_READ3(LVar6, LVar7, LVar8) + EVT_CALL(MakeLerp, LVar6, LVar7, LVar8, EASING_SIN_OUT) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_DIVF(LVar0, 10) + EVT_SETF(MV_HuffScaleY, LVar0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_WAIT(1) + EVT_END_LOOP + EVT_LOOP(0) + EVT_USE_BUF(EVT_PTR(N(LoopAnimScaleY))) + EVT_LOOP(ARRAY_COUNT(N(LoopAnimScaleY))) + EVT_BUF_READ2(LVar6, LVar7) + EVT_CALL(MakeLerp, LVar6, LVar7, 4, EASING_SIN_OUT) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_DIVF(LVar0, 10) + EVT_SETF(MV_HuffScaleY, LVar0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_LOOP + EVT_END_LOOP + EVT_END_CHILD_THREAD + EVT_LOOP(100) + EVT_CALL(SetNpcScale, NPC_HuffNPuff_01, MV_HuffScaleX, MV_HuffScaleY, 1) + EVT_CALL(SetNpcScale, NPC_HuffNPuff_02, MV_HuffScaleX, MV_HuffScaleY, 1) + EVT_CALL(SetNpcScale, NPC_HuffNPuff_03, MV_HuffScaleX, MV_HuffScaleY, 1) + EVT_WAIT(1) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_HuffNPuff_Defeat_BlowUp) = { + EVT_CHILD_THREAD + EVT_SET(LVar1, 0) + EVT_LOOP(0) + EVT_SET(LVar0, 3) + EVT_LOOP(15) + EVT_CALL(SetNpcRotation, LVar0, 0, LVar1, 0) + EVT_ADD(LVar0, 1) + EVT_END_LOOP + EVT_ADD(LVar1, 60) + EVT_IF_GT(LVar1, 360) + EVT_ADD(LVar1, -360) + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_END_CHILD_THREAD + EVT_USE_BUF(EVT_PTR(N(BlowUpPositions))) + EVT_SET(LVar8, 3) + // all except the last one + EVT_LOOP((ARRAY_COUNT(N(BlowUpPositions))/ 2) - 1) + EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4) + EVT_THREAD + EVT_CALL(RandInt, 5, LVar5) + EVT_WAIT(LVar5) + EVT_CALL(SetNpcPos, LVar8, LVar1, LVar2, -30) + EVT_CALL(RandInt, 2, LVar5) + EVT_ADD(LVar5, 8) + EVT_CALL(PlaySoundAtNpc, LVar8, SOUND_3D5, 0) + EVT_CALL(NpcJump0, LVar8, LVar3, LVar4, -15, LVar5) + EVT_CALL(SetNpcPos, LVar8, NPC_DISPOSE_LOCATION) + EVT_END_THREAD + EVT_ADD(LVar8, 1) + EVT_END_LOOP + EVT_CALL(SetNpcPos, NPC_HuffNPuff_01, NPC_DISPOSE_LOCATION) + EVT_CALL(SetNpcPos, NPC_HuffNPuff_02, NPC_DISPOSE_LOCATION) + EVT_CALL(SetNpcPos, NPC_HuffNPuff_03, NPC_DISPOSE_LOCATION) + // the last one + EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4) + EVT_WAIT(5) + EVT_CALL(SetNpcPos, LVar8, LVar1, LVar2, -30) + EVT_CALL(PlaySoundAtNpc, LVar8, SOUND_3D6, 0) + EVT_CALL(NpcJump0, LVar8, LVar3, LVar4, -15, 10) + EVT_CALL(SetNpcPos, LVar8, NPC_DISPOSE_LOCATION) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Scene_BossDefeated) = { + EVT_CALL(SetNpcAnimation, NPC_HuffNPuff_02, ANIM_HuffNPuff_Anim04) + EVT_CALL(SetNpcAnimation, NPC_HuffNPuff_01, ANIM_HuffNPuff_Anim05) + EVT_CALL(SetNpcAnimation, NPC_HuffNPuff_03, ANIM_HuffNPuff_Anim06) + EVT_CALL(GetNpcPos, NPC_HuffNPuff_01, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_ADD(LVar0, -15) + EVT_ADD(LVar2, 40) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SpeakToPlayer, NPC_HuffNPuff_01, ANIM_HuffNPuff_Anim30, ANIM_HuffNPuff_Anim05, 256, -30, 30, MSG_CH6_00CE) + EVT_CALL(FadeOutMusic, 0, 1500) + EVT_SET(MV_BossFightState, 2) + EVT_CALL(GetNpcPos, NPC_HuffNPuff_01, LVar0, LVar1, LVar2) + EVT_THREAD + EVT_SET(LVar3, LVar0) + EVT_SET(LVar4, LVar0) + EVT_ADD(LVar3, -35) + EVT_ADD(LVar4, 35) + EVT_LOOP(3) + EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar0, LVar1, LVar2) + EVT_WAIT(12) + EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar3, LVar1, LVar2) + EVT_ADD(LVar3, 7) + EVT_WAIT(8) + EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar4, LVar1, LVar2) + EVT_ADD(LVar4, -7) + EVT_WAIT(14) + EVT_END_LOOP + EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 2, LVar0, LVar1, LVar2) + EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(1.5)) + EVT_END_THREAD + EVT_THREAD + EVT_WAIT(30) + EVT_LOOP(10) + EVT_PLAY_EFFECT(EFFECT_SHIMMER_WAVE, 0, LVar0, LVar1, LVar2, 40, 65, 12, 15) + EVT_WAIT(7) + EVT_END_LOOP + EVT_END_THREAD + EVT_EXEC(N(EVS_HuffNPuff_Defeat_Flashing)) + EVT_EXEC_WAIT(N(EVS_HuffNPuff_Defeat_AnimateScale)) + EVT_EXEC_WAIT(N(EVS_HuffNPuff_Defeat_BlowUp)) + EVT_WAIT(10) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcIdle_HuffNPuff_01) = { + EVT_LABEL(0) + EVT_CALL(SetSelfVar, 0, 0) + EVT_LOOP(0) + EVT_CALL(GetSelfVar, 0, LVar0) + EVT_IF_NE(LVar0, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_WAIT(1) + EVT_END_LOOP + EVT_SET(MV_BossFightState, 1) + EVT_CALL(StartBossBattle, SONG_HUFF_N_PUFF_BATTLE) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_HuffNPuff_Main) = { + EVT_CALL(GetBattleOutcome, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(OUTCOME_PLAYER_WON) + EVT_CALL(SetEncounterStatusFlags, 1, TRUE) + EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar3) + EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + EVT_ADD(LVar3, -20) + EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar3) + EVT_EXEC_WAIT(N(EVS_Scene_BossDefeated)) + EVT_WAIT(50) + EVT_SET(MV_BossDefeated, TRUE) + EVT_EXEC(N(EVS_TrySpawningStarCard)) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_HuffNPuff_Aux) = { + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_HuffNPuff_Face) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAGS_400000, 1) + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_HuffNPuff_01))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HuffNPuff_Main))) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim02) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_HuffNPuff_Body) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAGS_400000, 1) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HuffNPuff_Aux))) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim01) + EVT_EXEC(N(EVS_HuffNPuff_AnimateBodyScale)) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_HuffNPuff_Arms) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAGS_400000, 1) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HuffNPuff_Aux))) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim19) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_TuffPuff) = { + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TuffPuff_Dizzy) + EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) + EVT_RETURN + EVT_END +}; + +s32 N(ExtraAnims_HuffNPuff)[] = { + ANIM_HuffNPuff_Anim00, + ANIM_HuffNPuff_Anim01, + ANIM_HuffNPuff_Anim02, + ANIM_HuffNPuff_Anim04, + ANIM_HuffNPuff_Anim05, + ANIM_HuffNPuff_Anim31, + ANIM_HuffNPuff_Anim19, + ANIM_HuffNPuff_Anim2D, + ANIM_LIST_END +}; + +StaticNpc N(NpcData_HuffNPuff)[] = { + { + .id = NPC_HuffNPuff_01, + .settings = &N(NpcSettings_HuffNPuff), + .pos = { 650.0f, NPC_DISPOSE_POS_Y, 0.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, + .init = &N(EVS_NpcInit_HuffNPuff_Face), + .drops = HUFF_N_PUFF_NO_DROPS, + .animations = HUFF_N_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_HuffNPuff), + }, + { + .id = NPC_HuffNPuff_02, + .settings = &N(NpcSettings_HuffNPuff), + .pos = { 650.0f, 100.0f, 0.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, + .init = &N(EVS_NpcInit_HuffNPuff_Body), + .drops = HUFF_N_PUFF_NO_DROPS, + .animations = HUFF_N_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_HuffNPuff), + }, + { + .id = NPC_HuffNPuff_03, + .settings = &N(NpcSettings_HuffNPuff), + .pos = { 650.0f, NPC_DISPOSE_POS_Y, 0.0f }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000, + .init = &N(EVS_NpcInit_HuffNPuff_Arms), + .drops = HUFF_N_PUFF_NO_DROPS, + .animations = HUFF_N_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_HuffNPuff), + }, +}; + +s32 N(ExtraAnims_TuffPuff)[] = { + ANIM_TuffPuff_Dizzy, + ANIM_LIST_END +}; + +StaticNpc N(NpcData_TuffPuffs)[] = { + { + .id = NPC_TuffPuff_01, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_02, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_03, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_04, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_05, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_06, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_07, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_08, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_09, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_10, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_11, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_12, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_13, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_14, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, + { + .id = NPC_TuffPuff_15, + .settings = &N(NpcSettings_TuffPuff), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_TuffPuff), + .drops = TUFF_PUFF_NO_DROPS, + .animations = TUFF_PUFF_ANIMS, + .extraAnimations = N(ExtraAnims_TuffPuff), + }, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_HuffNPuff), BTL_FLO2_FORMATION_00, BTL_FLO2_STAGE_07), + NPC_GROUP(N(NpcData_TuffPuffs), BTL_FLO_FORMATION_1F, BTL_FLO_STAGE_07), + {} +}; diff --git a/src/world/area_flo/flo_22/CEC240.c b/src/world/area_flo/flo_22/CEC240.c deleted file mode 100644 index 92574b631e..0000000000 --- a/src/world/area_flo/flo_22/CEC240.c +++ /dev/null @@ -1,392 +0,0 @@ -#include "flo_22.h" -#include "message_ids.h" -#include "sprite/npc/Bzzap.h" -#include "sprite/npc/Dayzee.h" -#include "effects.h" - -enum { - NPC_BZZAP, - NPC_DAYZEE, -}; - -EntryList N(entryList) = { - { -230.0f, 0.0f, 0.0f, 90.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_22 }, -}; - -EvtScript N(802402E0) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_80240350) = EVT_EXIT_WALK(60, 0, "flo_03", 1); - -EvtScript N(802403AC) = { - EVT_BIND_TRIGGER(N(exitWalk_80240350), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80240DE4))) - EVT_EXEC(N(80241F6C)) - EVT_EXEC(N(80241528)) - EVT_CALL(GetEntryID, LVar0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(802403AC))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(80240E24)) - EVT_EXEC_WAIT(N(802402E0)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240000_CEC240)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_518)[] = { - 0x00000000, 0x00000000, -}; - -NpcSettings N(npcSettings_80240520) = { - .height = 24, - .radius = 24, - .level = 99, -}; - -EvtScript N(idle_8024054C) = { - EVT_SET(MapVar(10), 0) - EVT_LOOP(0) - EVT_SWITCH(MapVar(10)) - EVT_CASE_EQ(0) - EVT_CASE_EQ(1) - EVT_CALL(SetPlayerAnimation, 65582) - EVT_SET(MapVar(10), 0) - EVT_CALL(StartBattle) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(defeat_802405E4) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, ((NPC_FLAG_2)), FALSE) - EVT_END_THREAD - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(1) - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_CASE_EQ(2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bzzap_Anim01) - EVT_CALL(SetNpcPos, NPC_SELF, 30, 60, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_CALL(NpcJump0, NPC_SELF, 30, 0, 0, 15) - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80240740) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_8024054C))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_802405E4))) - EVT_RETURN - EVT_END -}; - -EvtScript N(idle_80240778) = { - EVT_SET(MapVar(11), 0) - EVT_LOOP(0) - EVT_SWITCH(MapVar(11)) - EVT_CASE_EQ(0) - EVT_CASE_EQ(1) - EVT_CALL(SetPlayerAnimation, 65582) - EVT_SET(MapVar(11), 0) - EVT_CALL(StartBattle) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END -}; - -EvtScript N(defeat_80240810) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, ((NPC_FLAG_2)), FALSE) - EVT_END_THREAD - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(1) - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_CASE_EQ(3) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dayzee_Anim01) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_SELF, 30, 0, 0, 15) - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_CASE_EQ(2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dayzee_Anim01) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_SELF, 30, 0, 0, 15) - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(init_802409CC) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80240778))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_80240810))) - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80240A04) = { - .id = NPC_BZZAP, - .settings = &N(npcSettings_80240520), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_80240740), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim03, - ANIM_Bzzap_Anim03, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim06, - ANIM_Bzzap_Anim06, - ANIM_Bzzap_Anim04, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - }, -}; - -StaticNpc N(npcGroup_80240BF4) = { - .id = NPC_DAYZEE, - .settings = &N(npcSettings_80240520), - .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, - .init = &N(init_802409CC), - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(4), - .maxCoinBonus = 3, - }, - .animations = { - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim02, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim03, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim08, - ANIM_Dayzee_Anim06, - ANIM_Dayzee_Anim07, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - ANIM_Dayzee_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -NpcGroupList N(npcGroupList_80240DE4) = { - NPC_GROUP(N(npcGroup_80240A04), 0x1817, 0x02), - NPC_GROUP(N(npcGroup_80240BF4), 0x180F, 0x01), - {}, -}; - -static s32 N(pad_E08)[] = { - 0x00000000, 0x00000000, -}; - -s32 N(itemList_80240E10)[] = { - ITEM_RED_BERRY, - ITEM_BLUE_BERRY, - ITEM_YELLOW_BERRY, - ITEM_BUBBLE_BERRY, - ITEM_NONE, -}; - -EvtScript N(80240E24) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_00DB, 300, 120) - EVT_WAIT(10) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(80240E84) = { - EVT_CALL(SetPlayerAnimation, 393230) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_SET(LVar6, 35) - EVT_SET(LVar5, 5) - EVT_CALL(MakeItemEntity, LVar8, LVar2, LVar6, 0, 1, 0) - EVT_SET(LVar7, LVar0) - EVT_CALL(MakeLerp, LVar2, 35, 20, 5) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemPos, LVar7, LVar0, LVar6, 0) - EVT_ADD(LVar6, LVar5) - EVT_ADD(LVar5, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVar7) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAt, 0x302, 0, 35, 0, 0) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_WAIT(10) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241028) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(ShowConsumableChoicePopup) - EVT_CALL(CloseChoicePopup) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar8, LVar0) - EVT_SWITCH(LVar8) - EVT_CASE_LE(-1) - EVT_CASE_LE(0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_Well, 160, 40) - EVT_CASE_EQ(158) - EVT_EXEC_WAIT(N(80240E84)) - EVT_CALL(RemoveItemAt, LVar1) - EVT_IF_EQ(GF_FLO22_ThrewBlueBerryDownWell, 0) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00DD, 35, 35, 0) - EVT_SET(GF_FLO22_ThrewBlueBerryDownWell, 1) - EVT_CALL(MakeItemEntity, ITEM_FLOWER_SAVER_B, -35, 0, 0, 0, GF_FLO22_Item_FlowerSaverB) - EVT_SET(LVar7, LVar0) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_2)), TRUE) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_HAS_SHADOW)), FALSE) - EVT_CALL(SetNpcPos, 0, 35, 0, 0) - EVT_CALL(SetNpcJumpscale, 0, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(NpcJump0, 0, -53, 0, 0, 25) - EVT_CALL(NpcJump0, 0, -73, 0, 0, 15) - EVT_CALL(NpcJump0, 0, -83, 0, 0, 8) - EVT_END_THREAD - EVT_LOOP(53) - EVT_CALL(GetNpcPos, 0, LVar1, LVar2, LVar3) - EVT_CALL(SetItemPos, LVar7, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, 0, 0, -1000, 0) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_2)), FALSE) - EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_HAS_SHADOW)), TRUE) - EVT_ELSE - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00DE, 35, 35, 0) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(80240E84)) - EVT_CALL(RemoveItemAt, LVar1) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00DC, 35, 35, 0) - EVT_CALL(RandInt, 1, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(SetNpcJumpscale, 0, EVT_FLOAT(0.0)) - EVT_CALL(NpcFacePlayer, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetNpcPos, 0, 30, 0, 0) - EVT_CALL(SetNpcAnimation, 0, ANIM_Bzzap_Anim01) - EVT_CALL(NpcJump0, 0, 30, 60, 0, 20) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, 0, ANIM_Bzzap_Anim04) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(NpcJump0, 0, LVar0, LVar1, LVar2, 5) - EVT_SET(MapVar(10), 1) - EVT_ELSE - EVT_CALL(SetNpcPos, 1, 30, 0, 0) - EVT_CALL(SetNpcAnimation, 1, ANIM_Dayzee_Anim0E) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetNpcJumpscale, 1, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, 1, LVar0, LVar1, LVar2, 20) - EVT_SET(MapVar(11), 1) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END -}; - -EvtScript N(80241528) = { - EVT_BIND_PADLOCK(N(80241028), TRIGGER_WALL_PRESS_A, 9, EVT_PTR(N(itemList_80240E10)), 0, 1) - EVT_IF_EQ(GF_FLO22_ThrewBlueBerryDownWell, 1) - EVT_CALL(MakeItemEntity, ITEM_FLOWER_SAVER_B, -83, 0, 0, 0, GF_FLO22_Item_FlowerSaverB) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_1594)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -ApiStatus N(func_80240000_CEC240)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(1, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_22/CEC280.c b/src/world/area_flo/flo_22/CEC280.c deleted file mode 100644 index c3915759b1..0000000000 --- a/src/world/area_flo/flo_22/CEC280.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "flo_22.h" - -ApiStatus N(80240040_CEC280)(Evt* script, s32 isInitialCall) { - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_22/CEC290.c b/src/world/area_flo/flo_22/CEC290.c deleted file mode 100644 index 7ab5aae3aa..0000000000 --- a/src/world/area_flo/flo_22/CEC290.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "flo_22.h" - -#include "common/foliage.inc.c" - -FoliageModelList N(tree1_Trunk) = { - .count = 3, - .models = { 21, 22, 23 } -}; - -ShakeTreeConfig N(tree1) = { - .trunk = &N(tree1_Trunk), -}; - -Vec4f N(triggerCoord_80241F28) = { 93.0f, 0.0f, -89.0f, 0.0f }; - -FoliageModelList N(tree2_Trunk) = { - .count = 3, - .models = { 25, 26, 27 } -}; - -ShakeTreeConfig N(tree2) = { - .trunk = &N(tree2_Trunk), -}; - -Vec4f N(triggerCoord_80241F5C) = { 150.0f, 0.0f, 135.0f, 0.0f }; - -EvtScript N(80241F6C) = { - EVT_SET(LVar0, EVT_PTR(N(tree1))) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 14, 1, 0) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_80241F28)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(tree2))) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 16, 1, 0) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_80241F5C)), 1, 0) - EVT_RETURN - EVT_END -}; diff --git a/src/world/area_flo/flo_22/flo_22.h b/src/world/area_flo/flo_22/flo_22.h index 145d3c3643..b75999576b 100644 --- a/src/world/area_flo/flo_22/flo_22.h +++ b/src/world/area_flo/flo_22/flo_22.h @@ -2,17 +2,32 @@ /// @brief Flower Fields - (East) Old Well #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_22_shape.h" +#include "mapfs/flo_22_hit.h" + +#include "sprite/npc/Bzzap.h" +#include "sprite/npc/Dayzee.h" + +enum { + NPC_Dummy = 0, // reused as a dummy for tossing badge out of the well + NPC_Bzzap = 0, + NPC_Dayzee = 1, +}; + +enum { + MV_Bzzap_State = MapVar(10), + MV_Dayzee_State = MapVar(11), +}; + #define NAMESPACE flo_22 -ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240000_CEC240)(Evt* script, s32 isInitialCall); - -extern NpcGroupList N(npcGroupList_80240DE4); -extern EvtScript N(80240E24); -extern EvtScript N(80241528); -extern EvtScript N(80241F6C); -extern EvtScript N(main); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupFoliage); +extern EvtScript N(EVS_SetupWell); +extern EvtScript N(EVS_SniffleHint); +extern EvtScript N(EVS_SetupMusic); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_22/flo_22_0_header.c b/src/world/area_flo/flo_22/flo_22_0_header.c new file mode 100644 index 0000000000..a4412e61bd --- /dev/null +++ b/src/world/area_flo/flo_22/flo_22_0_header.c @@ -0,0 +1,13 @@ +#include "flo_22.h" + +EntryList N(Entrances) = { + [flo_22_ENTRY_0] { -230.0, 0.0, 0.0, 90.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_22 }, +}; diff --git a/src/world/area_flo/flo_22/flo_22_1_music.c b/src/world/area_flo/flo_22/flo_22_1_music.c new file mode 100644 index 0000000000..6fa2c7d61d --- /dev/null +++ b/src/world/area_flo/flo_22/flo_22_1_music.c @@ -0,0 +1,12 @@ +#include "flo_22.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_22/flo_22_2_main.c b/src/world/area_flo/flo_22/flo_22_2_main.c new file mode 100644 index 0000000000..079f483708 --- /dev/null +++ b/src/world/area_flo/flo_22/flo_22_2_main.c @@ -0,0 +1,36 @@ +#include "flo_22.h" +#include "effects.h" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_03_1) = EVT_EXIT_WALK(60, flo_22_ENTRY_0, "flo_03", flo_03_ENTRY_1); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC(N(EVS_SetupFoliage)) + EVT_EXEC(N(EVS_SetupWell)) + EVT_CALL(GetEntryID, LVar0) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC(N(EVS_SniffleHint)) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_22/flo_22_3_npc.c b/src/world/area_flo/flo_22/flo_22_3_npc.c new file mode 100644 index 0000000000..770fadcc04 --- /dev/null +++ b/src/world/area_flo/flo_22/flo_22_3_npc.c @@ -0,0 +1,133 @@ +#include "flo_22.h" + +#include "world/common/npc/Dummy.inc.c" +#include "world/common/enemy/complete/Bzzap.h" +#include "world/common/enemy/complete/CrazyDayzee.h" + +EvtScript N(EVS_NpcIdle_Bzzap) = { + EVT_SET(MV_Bzzap_State, 0) + EVT_LOOP(0) + EVT_SWITCH(MV_Bzzap_State) + EVT_CASE_EQ(0) + EVT_CASE_EQ(1) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002E) + EVT_SET(MV_Bzzap_State, 0) + EVT_CALL(StartBattle) + EVT_END_SWITCH + EVT_WAIT(1) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_Bzzap) = { + EVT_CALL(GetBattleOutcome, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(OUTCOME_PLAYER_WON) + EVT_THREAD + EVT_WAIT(25) + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_2, FALSE) + EVT_END_THREAD + EVT_CALL(DoNpcDefeat) + EVT_CASE_EQ(OUTCOME_PLAYER_LOST) + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_CASE_EQ(OUTCOME_PLAYER_FLED) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bzzap_Anim01) + EVT_CALL(SetNpcPos, NPC_SELF, 30, 60, 0) + EVT_WAIT(10) + EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) + EVT_CALL(NpcJump0, NPC_SELF, 30, 0, 0, 15) + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Bzzap) = { + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Bzzap))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Bzzap))) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcIdle_Dayzee) = { + EVT_SET(MV_Dayzee_State, 0) + EVT_LOOP(0) + EVT_SWITCH(MV_Dayzee_State) + EVT_CASE_EQ(0) + EVT_CASE_EQ(1) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002E) + EVT_SET(MV_Dayzee_State, 0) + EVT_CALL(StartBattle) + EVT_END_SWITCH + EVT_WAIT(1) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_Dayzee) = { + EVT_CALL(GetBattleOutcome, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(OUTCOME_PLAYER_WON) + EVT_THREAD + EVT_WAIT(25) + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_2, FALSE) + EVT_END_THREAD + EVT_CALL(DoNpcDefeat) + EVT_CASE_EQ(OUTCOME_PLAYER_LOST) + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_CASE_EQ(OUTCOME_ENEMY_FLED) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dayzee_Anim01) + EVT_WAIT(10) + EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) + EVT_CALL(NpcJump0, NPC_SELF, 30, 0, 0, 15) + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_CASE_EQ(OUTCOME_PLAYER_FLED) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dayzee_Anim01) + EVT_WAIT(10) + EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) + EVT_CALL(NpcJump0, NPC_SELF, 30, 0, 0, 15) + EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_Dayzee) = { + EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Dayzee))) + EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Dayzee))) + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_Bzzap) = { + .id = NPC_Bzzap, + .settings = &N(NpcSettings_Dummy), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Bzzap), + .drops = BZZAP_NO_DROPS, + .animations = BZZAP_ANIMS, +}; + +StaticNpc N(NpcData_Dayzee) = { + .id = NPC_Dayzee, + .settings = &N(NpcSettings_Dummy), + .pos = { NPC_DISPOSE_LOCATION }, + .yaw = 270, + .flags = NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING, + .init = &N(EVS_NpcInit_Dayzee), + .drops = CRAZY_DAYZEE_DROPS, + .animations = CRAZY_DAYZEE_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Bzzap), BTL_FLO_FORMATION_17, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Dayzee), BTL_FLO_FORMATION_0F, BTL_FLO_STAGE_01), + {} +}; diff --git a/src/world/area_flo/flo_22/flo_22_4_well.c b/src/world/area_flo/flo_22/flo_22_4_well.c new file mode 100644 index 0000000000..1595447c58 --- /dev/null +++ b/src/world/area_flo/flo_22/flo_22_4_well.c @@ -0,0 +1,134 @@ +#include "flo_22.h" + +API_CALLABLE(N(UnusedCallback)) { + return ApiStatus_DONE2; +} + +s32 N(BerryList)[] = { + ITEM_RED_BERRY, + ITEM_BLUE_BERRY, + ITEM_YELLOW_BERRY, + ITEM_BUBBLE_BERRY, + ITEM_NONE +}; + +EvtScript N(EVS_SniffleHint) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_WAIT(20) + EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_00DB, 300, 120) + EVT_WAIT(10) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_TossItemIntoWell) = { + EVT_CALL(SetPlayerAnimation, ANIM_Mario_6000E) + EVT_THREAD + EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) + EVT_SET(LVar6, 35) + EVT_SET(LVar5, 5) + EVT_CALL(MakeItemEntity, LVar8, LVar2, LVar6, 0, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_SET(LVar7, LVar0) + EVT_CALL(MakeLerp, LVar2, 35, 20, EASING_CUBIC_OUT) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(SetItemPos, LVar7, LVar0, LVar6, 0) + EVT_ADD(LVar6, LVar5) + EVT_ADD(LVar5, -1) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(RemoveItemEntity, LVar7) + EVT_END_THREAD + EVT_WAIT(10) + EVT_CALL(PlaySoundAt, SOUND_302, 0, 35, 0, 0) + EVT_WAIT(5) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) + EVT_WAIT(10) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_OnInteract_Well) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(DisablePlayerInput, FALSE) + EVT_CALL(ShowConsumableChoicePopup) + EVT_CALL(CloseChoicePopup) + EVT_CALL(DisablePlayerInput, TRUE) + EVT_SET(LVar8, LVar0) + EVT_SWITCH(LVar8) + EVT_CASE_LE(-1) + EVT_CASE_LE(ITEM_NONE) + EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_Well, 160, 40) + EVT_CASE_EQ(ITEM_BLUE_BERRY) + EVT_EXEC_WAIT(N(EVS_TossItemIntoWell)) + EVT_CALL(RemoveItemAt, LVar1) + EVT_IF_EQ(GF_FLO22_ThrewBlueBerryDownWell, FALSE) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00DD, 35, 35, 0) + EVT_SET(GF_FLO22_ThrewBlueBerryDownWell, TRUE) + EVT_CALL(MakeItemEntity, ITEM_FLOWER_SAVER_B, -35, 0, 0, ITEM_SPAWN_MODE_KEY, GF_FLO22_Item_FlowerSaverB) + EVT_SET(LVar7, LVar0) + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_2, TRUE) + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, FALSE) + EVT_CALL(SetNpcPos, NPC_Dummy, 35, 0, 0) + EVT_CALL(SetNpcJumpscale, NPC_Dummy, EVT_FLOAT(1.0)) + EVT_THREAD + EVT_CALL(NpcJump0, NPC_Dummy, -53, 0, 0, 25) + EVT_CALL(NpcJump0, NPC_Dummy, -73, 0, 0, 15) + EVT_CALL(NpcJump0, NPC_Dummy, -83, 0, 0, 8) + EVT_END_THREAD + EVT_LOOP(53) + EVT_CALL(GetNpcPos, NPC_Dummy, LVar1, LVar2, LVar3) + EVT_CALL(SetItemPos, LVar7, LVar1, LVar2, LVar3) + EVT_WAIT(1) + EVT_END_LOOP + EVT_CALL(SetNpcPos, NPC_Dummy, NPC_DISPOSE_LOCATION) + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_2, FALSE) + EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, TRUE) + EVT_ELSE + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00DE, 35, 35, 0) + EVT_END_IF + EVT_CASE_DEFAULT + EVT_EXEC_WAIT(N(EVS_TossItemIntoWell)) + EVT_CALL(RemoveItemAt, LVar1) + EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00DC, 35, 35, 0) + EVT_CALL(RandInt, 1, LVar1) + EVT_IF_EQ(LVar1, 0) + EVT_CALL(SetNpcJumpscale, NPC_Bzzap, EVT_FLOAT(0.0)) + EVT_CALL(NpcFacePlayer, NPC_Bzzap, 0) + EVT_WAIT(1) + EVT_CALL(SetNpcPos, NPC_Bzzap, 30, 0, 0) + EVT_CALL(SetNpcAnimation, NPC_Bzzap, ANIM_Bzzap_Anim01) + EVT_CALL(NpcJump0, NPC_Bzzap, 30, 60, 0, 20) + EVT_WAIT(10) + EVT_CALL(SetNpcAnimation, NPC_Bzzap, ANIM_Bzzap_Anim04) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, 20) + EVT_CALL(NpcJump0, NPC_Bzzap, LVar0, LVar1, LVar2, 5) + EVT_SET(MV_Bzzap_State, 1) + EVT_ELSE + EVT_CALL(SetNpcPos, NPC_Dayzee, 30, 0, 0) + EVT_CALL(SetNpcAnimation, NPC_Dayzee, ANIM_Dayzee_Anim0E) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, 20) + EVT_CALL(SetNpcJumpscale, NPC_Dayzee, EVT_FLOAT(2.0)) + EVT_CALL(NpcJump0, NPC_Dayzee, LVar0, LVar1, LVar2, 20) + EVT_SET(MV_Dayzee_State, 1) + EVT_END_IF + EVT_END_SWITCH + EVT_CALL(DisablePlayerInput, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupWell) = { + EVT_BIND_PADLOCK(EVT_PTR(N(EVS_OnInteract_Well)), TRIGGER_WALL_PRESS_A, COLLIDER_o5, EVT_PTR(N(BerryList)), 0, 1) + EVT_IF_EQ(GF_FLO22_ThrewBlueBerryDownWell, TRUE) + EVT_CALL(MakeItemEntity, ITEM_FLOWER_SAVER_B, -83, 0, 0, ITEM_SPAWN_MODE_KEY, GF_FLO22_Item_FlowerSaverB) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_22/flo_22_5_foliage.c b/src/world/area_flo/flo_22/flo_22_5_foliage.c new file mode 100644 index 0000000000..8cbc4db91a --- /dev/null +++ b/src/world/area_flo/flo_22/flo_22_5_foliage.c @@ -0,0 +1,50 @@ +#include "flo_22.h" + +#include "common/foliage.inc.c" + +FoliageModelList N(Tree1_TrunkModels) = { + .count = 3, + .models = { + MODEL_o45, + MODEL_o46, + MODEL_o48, + } +}; + +ShakeTreeConfig N(ShakeTree_Tree1) = { + .trunk = &N(Tree1_TrunkModels), +}; + +BombTrigger N(BombPos_Tree1) = { + .pos = { 93.0f, 0.0f, -89.0f }, + .radius = 0.0f +}; + +FoliageModelList N(Tree2_TrunkModels) = { + .count = 3, + .models = { + MODEL_o52, + MODEL_o53, + MODEL_o55, + } +}; + +ShakeTreeConfig N(ShakeTree_Tree2) = { + .trunk = &N(Tree2_TrunkModels), +}; + +BombTrigger N(BombPos_Tree2) = { + .pos = { 150.0f, 0.0f, 135.0f }, + .radius = 0.0f +}; + +EvtScript N(EVS_SetupFoliage) = { + EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o27, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) + EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o30, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_23/CEE260.c b/src/world/area_flo/flo_23/CEE260.c deleted file mode 100644 index 20603283c1..0000000000 --- a/src/world/area_flo/flo_23/CEE260.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "flo_23.h" -#include "effects.h" - -ApiStatus N(func_80240000_CEE260)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_23/CEE2A0.c b/src/world/area_flo/flo_23/CEE2A0.c deleted file mode 100644 index 51b0672001..0000000000 --- a/src/world/area_flo/flo_23/CEE2A0.c +++ /dev/null @@ -1,480 +0,0 @@ -#include "flo_23.h" -#include "message_ids.h" -#include "sprite/npc/GateFlower.h" -#include "sprite/npc/Spiny.h" -#include "effects.h" -#include "entity.h" - -enum { - NPC_SPINY0, - NPC_SPINY1, - NPC_GATE_FLOWER, -}; - -static s32 N(ItemChoiceList)[91]; -static s8 N(D_8024284C_pad)[4]; -static s32 N(FlowerGuard_ItemChoiceList)[91]; - -EntryList N(entryList) = { - { 470.0f, 0.0f, 0.0f, 270.0f }, - { -470.0f, 0.0f, 0.0f, 90.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_23 }, -}; - -EvtScript N(80240D30) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(80240DA0) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_8024104C) = EVT_EXIT_WALK(60, 0, "flo_00", 2); - -EvtScript N(exitWalk_802410A8) = EVT_EXIT_WALK(60, 1, "flo_11", 0); - -EvtScript N(80241104) = { - EVT_BIND_TRIGGER(N(exitWalk_802410A8), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_8024104C), TRIGGER_FLOOR_ABOVE, 4, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80242568))) - EVT_EXEC_WAIT(N(makeEntities)) - EVT_SET(LVar0, -290) - EVT_SET(LVar1, -190) - EVT_SET(LVar2, 480) - EVT_SET(LVar3, -90) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80240DA0)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80241104))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(80240D30)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240000_CEE260)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_12D8)[] = { - 0x00000000, 0x00000000, -}; - -NpcSettings N(npcSettings_802412E0) = { - .height = 56, - .radius = 40, - .level = 99, -}; - -s32 N(ItemChoice_HasSelectedItem) = { - 0x00000000, -}; - -s32 N(ItemChoice_SelectedItemID) = { - 0x00000000, -}; - -EvtScript N(80241314) = { - EVT_SET(LVar9, LVar1) - EVT_CALL(ShowConsumableChoicePopup) - EVT_SET(LVarA, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_CALL(RemoveItemAt, LVar1) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) - EVT_CALL(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, 1, 0) - EVT_CALL(SetPlayerAnimation, 393221) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_END_SWITCH - EVT_CALL(N(ItemChoice_SaveSelected), LVarA) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END -}; - -EvtScript N(80241448) = { - EVT_CALL(N(BuildItemChoiceList), LVar0) - EVT_BIND_PADLOCK(N(80241314), 0x10, 0, EVT_PTR(N(ItemChoiceList)), 0, 1) - EVT_CALL(N(ItemChoice_WaitForSelection), LVar0) - EVT_RETURN - EVT_END -}; - -MobileAISettings N(npcAISettings_80241498) = { - .moveSpeed = 1.5f, - .moveTime = 30, - .waitTime = 50, - .alertRadius = 60.0f, - .alertOffsetDist = 30.0f, - .playerSearchInterval = 3, - .chaseSpeed = 6.0f, - .chaseRadius = 100.0f, - .chaseOffsetDist = 30.0f, - .unk_AI_2C = 3, -}; - -EvtScript N(npcAI_802414C8) = { - EVT_CALL(SetSelfVar, 2, 3) - EVT_CALL(SetSelfVar, 3, 18) - EVT_CALL(SetSelfVar, 5, 3) - EVT_CALL(SetSelfVar, 7, 4) - EVT_CALL(N(TackleAI_Main), EVT_PTR(N(npcAISettings_80241498))) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_80241538) = { - .height = 21, - .radius = 22, - .ai = &N(npcAI_802414C8), - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 19, -}; - -EvtScript N(interact_80241564) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(GF_FLO23_GaveBlueBerry, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 350) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_0049) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_Thinking) - EVT_CALL(N(FlowerGuard_MakeItemList)) - EVT_SET(LVar0, EVT_PTR(N(FlowerGuard_ItemChoiceList))) - EVT_SET(LVar1, 2) - EVT_EXEC_WAIT(N(80241448)) - EVT_SWITCH(LVar0) - EVT_CASE_LE(0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004A) - EVT_CASE_DEFAULT - EVT_SET(LVar8, LVar0) - EVT_CALL(N(FlowerGuard_JudgeItemTastiness), LVar0) - EVT_CALL(MakeItemEntity, LVar8, 385, 20, -34, 1, 0) - EVT_SET(LVar7, LVar0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2095, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Eat) - EVT_WAIT(20) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_SWITCH(LVar8) - EVT_CASE_EQ(158) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004D) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x21C, 0) - EVT_CALL(EndSpeech, -1, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_OpenGate) - EVT_CALL(PlaySoundAtCollider, 13, 457, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 13, 0x7FFFFE00) - EVT_CALL(MakeLerp, 0, 100, 30, 1) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar8, LVar0) - EVT_SETF(LVar9, LVar0) - EVT_MULF(LVar8, EVT_FLOAT(0.5)) - EVT_MULF(LVar9, EVT_FLOAT(1.2)) - EVT_CALL(RotateModel, 59, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, 60, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, 61, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, 55, LVar9, 0, 1, 0) - EVT_CALL(RotateModel, 56, LVar9, 0, 1, 0) - EVT_CALL(RotateModel, 57, LVar9, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_HappyDance) - EVT_SET(GF_FLO23_GaveBlueBerry, 1) - EVT_CASE_EQ(159) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004C) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) - EVT_CASE_EQ(160) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004C) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004B) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Disgust) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x2096, 0) - EVT_CALL(MakeItemEntity, LVar8, 375, 20, 0, 1, 0) - EVT_SET(LVar7, LVar0) - EVT_WAIT(5) - EVT_CALL(GetAngleToPlayer, -1, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_CALL(MakeLerp, 0, 100, 7, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(-0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(380.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-30.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_CALL(MakeLerp, 0, 100, 7, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(390.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-30.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) - EVT_CALL(EndSpeech, -1, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(ResetCam, 0, EVT_FLOAT(6.0)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_ELSE - EVT_IF_LT(GB_StoryProgress, 57) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0, MSG_CH6_004E) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0, MSG_CH6_004F) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80241E70) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80241564))) - EVT_IF_EQ(GF_FLO23_GaveBlueBerry, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_HappyDance) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 13, 0x7FFFFE00) - EVT_CALL(RotateModel, 59, 50, 0, -1, 0) - EVT_CALL(RotateModel, 60, 50, 0, -1, 0) - EVT_CALL(RotateModel, 61, 50, 0, -1, 0) - EVT_CALL(RotateModel, 55, 120, 0, 1, 0) - EVT_CALL(RotateModel, 56, 120, 0, 1, 0) - EVT_CALL(RotateModel, 57, 120, 0, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_80241F98) = { - .id = NPC_GATE_FLOWER, - .settings = &N(npcSettings_802412E0), - .pos = { 385.0f, 0.0f, -35.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, - .init = &N(init_80241E70), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - ANIM_GateFlower_Blue_Idle, - }, - .tattle = MSG_NpcTattle_BlueGateFlower, -}; - -StaticNpc N(npcGroup_80242188) = { - .id = NPC_SPINY0, - .settings = &N(npcSettings_80241538), - .pos = { 80.0f, 0.0f, 0.0f }, - .flags = NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { 80, 0, 0, 30, 0, -32767, 0, 80, 0, 0, 200, 0, 0, 1 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, -}; - -StaticNpc N(npcGroup_80242378) = { - .id = NPC_SPINY1, - .settings = &N(npcSettings_80241538), - .pos = { -320.0f, 0.0f, 0.0f }, - .flags = NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, - .yaw = 270, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 1, - }, - .territory = { .temp = { -320, 0, 0, 30, 0, -32767, 0, -320, 0, 0, 200, 0, 0, 1 }}, - .animations = { - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim03, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim04, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim09, - ANIM_Spiny_Anim06, - ANIM_Spiny_Anim08, - ANIM_Spiny_Anim07, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - ANIM_Spiny_Anim01, - }, -}; - -NpcGroupList N(npcGroupList_80242568) = { - NPC_GROUP(N(npcGroup_80242188), 0x180C, 0x02), - NPC_GROUP(N(npcGroup_80242378), 0x180D, 0x02), - NPC_GROUP(N(npcGroup_80241F98)), - {}, -}; - -static s32 N(pad_2598)[] = { - 0x00000000, 0x00000000, -}; - -EvtScript N(makeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 100, 60, 5, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 100, 145, 0, 0, 131, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO23_HiddenItem_ShootingStar) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 25, 60, 0, 0, 343, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO23_HiddenItem_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), -50, 0, 0, 90, 60, MAKE_ENTITY_END) - EVT_RETURN - EVT_END -}; - -#include "world/common/atomic/ItemChoice_PartA.inc.c" - -#include "world/common/atomic/MakeConsumableChoice.inc.c" - -#include "world/common/enemy/ai/TackleAI.inc.c" - -#include "world/common/atomic/ItemChoice_FlowerGuard.inc.c" diff --git a/src/world/area_flo/flo_23/flo_23.h b/src/world/area_flo/flo_23/flo_23.h index 89c46e63f6..2547d7895a 100644 --- a/src/world/area_flo/flo_23/flo_23.h +++ b/src/world/area_flo/flo_23/flo_23.h @@ -2,22 +2,22 @@ /// @brief Flower Fields - (West) Path to Maze #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_23_shape.h" +#include "mapfs/flo_23_hit.h" + +enum { + NPC_Spiny_01 = 0, + NPC_Spiny_02 = 1, + NPC_GateFlower = 2, +}; + #define NAMESPACE flo_23 -ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240000_CEE260)(Evt* script, s32 isInitialCall); -ApiStatus N(ItemChoice_WaitForSelection)(Evt* script, s32 isInitialCall); -ApiStatus N(ItemChoice_SaveSelected)(Evt* script, s32 isInitialCall); -ApiStatus N(BuildItemChoiceList)(Evt* script, s32 isInitialCall); -ApiStatus N(TackleAI_Main)(Evt* script, s32 isInitialCall); -ApiStatus N(FlowerGuard_SetItemEntityPosition)(Evt* script, s32 isInitialCall); -ApiStatus N(FlowerGuard_JudgeItemTastiness)(Evt* script, s32 isInitialCall); -ApiStatus N(FlowerGuard_MakeItemList)(Evt* script, s32 isInitialCall); - -extern NpcGroupList N(npcGroupList_80242568); -extern EvtScript N(main); -extern EvtScript N(makeEntities); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_MakeEntities); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_23/flo_23_0_header.c b/src/world/area_flo/flo_23/flo_23_0_header.c new file mode 100644 index 0000000000..ea05b90653 --- /dev/null +++ b/src/world/area_flo/flo_23/flo_23_0_header.c @@ -0,0 +1,14 @@ +#include "flo_23.h" + +EntryList N(Entrances) = { + [flo_23_ENTRY_0] { 470.0, 0.0, 0.0, 270.0 }, + [flo_23_ENTRY_1] { -470.0, 0.0, 0.0, 90.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_23 }, +}; diff --git a/src/world/area_flo/flo_23/flo_23_1_music.c b/src/world/area_flo/flo_23/flo_23_1_music.c new file mode 100644 index 0000000000..a05c85f393 --- /dev/null +++ b/src/world/area_flo/flo_23/flo_23_1_music.c @@ -0,0 +1,12 @@ +#include "flo_23.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_23/flo_23_2_main.c b/src/world/area_flo/flo_23/flo_23_2_main.c new file mode 100644 index 0000000000..25badced21 --- /dev/null +++ b/src/world/area_flo/flo_23/flo_23_2_main.c @@ -0,0 +1,39 @@ +#include "flo_23.h" +#include "effects.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_00_2) = EVT_EXIT_WALK(60, flo_23_ENTRY_0, "flo_00", flo_00_ENTRY_2); +EvtScript N(EVS_ExitWalk_flo_11_0) = EVT_EXIT_WALK(60, flo_23_ENTRY_1, "flo_11", flo_11_ENTRY_0); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_FLOWER_SPAWN_REGION( -290, -190, 480, -90, 0) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_23/flo_23_3_npc.c b/src/world/area_flo/flo_23/flo_23_3_npc.c new file mode 100644 index 0000000000..527c1a5197 --- /dev/null +++ b/src/world/area_flo/flo_23/flo_23_3_npc.c @@ -0,0 +1,221 @@ +#include "flo_23.h" + +#include "world/common/npc/GateFlower.inc.c" + +#include "world/common/complete/NormalItemChoice.inc.c" + +#include "world/common/enemy/complete/Spiny.inc.c" + +static s32 N(FlowerGuard_ItemChoiceList)[ITEM_NUM_CONSUMABLES + 1]; +#include "world/common/atomic/ItemChoice_FlowerGuard.inc.c" + +EvtScript N(EVS_NpcInteract_GateFlower) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_IF_EQ(GF_FLO23_GaveBlueBerry, FALSE) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_0049) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_Thinking) + EVT_CALL(N(FlowerGuard_MakeItemList)) + EVT_CHOOSE_CONSUMABLE_FROM(N(FlowerGuard_ItemChoiceList), 2) + EVT_SWITCH(LVar0) + EVT_CASE_LE(0) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004A) + EVT_CASE_DEFAULT + EVT_SET(LVar8, LVar0) + EVT_CALL(N(FlowerGuard_JudgeItemTastiness), LVar0) + EVT_CALL(MakeItemEntity, LVar8, 385, 20, -34, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_SET(LVar7, LVar0) + EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2095, 0) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Eat) + EVT_WAIT(20) + EVT_CALL(RemoveItemEntity, LVar7) + EVT_SWITCH(LVar8) + EVT_CASE_EQ(158) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004D) + EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_21C, 0) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_OpenGate) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o95, SOUND_METAL_GATE_OPEN, 0) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o95, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_SETF(LVar8, LVar0) + EVT_SETF(LVar9, LVar0) + EVT_MULF(LVar8, EVT_FLOAT(0.5)) + EVT_MULF(LVar9, EVT_FLOAT(1.2)) + EVT_CALL(RotateModel, MODEL_o86, LVar8, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o87, LVar8, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o88, LVar8, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o83, LVar9, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o84, LVar9, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o85, LVar9, 0, 1, 0) + EVT_WAIT(1) + EVT_IF_NE(LVar1, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_HappyDance) + EVT_SET(GF_FLO23_GaveBlueBerry, TRUE) + EVT_CASE_EQ(159) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004C) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) + EVT_CASE_EQ(160) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004C) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004B) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Disgust) + EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2096, 0) + EVT_CALL(MakeItemEntity, LVar8, 375, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_SET(LVar7, LVar0) + EVT_WAIT(5) + EVT_CALL(GetAngleToPlayer, NPC_SELF, LVar0) + EVT_IF_LT(LVar0, 180) + EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_SETF(LVar2, EVT_FLOAT(-0.5)) + EVT_SETF(LVar3, EVT_FLOAT(-0.2)) + EVT_SETF(LVar4, EVT_FLOAT(0.9)) + EVT_MULF(LVar2, LVar0) + EVT_MULF(LVar3, LVar0) + EVT_MULF(LVar4, LVar0) + EVT_ADDF(LVar2, EVT_FLOAT(380.0)) + EVT_ADDF(LVar3, EVT_FLOAT(15.0)) + EVT_ADDF(LVar4, EVT_FLOAT(-30.0)) + EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + EVT_WAIT(1) + EVT_IF_NE(LVar1, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_ELSE + EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_SETF(LVar2, EVT_FLOAT(0.5)) + EVT_SETF(LVar3, EVT_FLOAT(-0.2)) + EVT_SETF(LVar4, EVT_FLOAT(1.0)) + EVT_MULF(LVar2, LVar0) + EVT_MULF(LVar3, LVar0) + EVT_MULF(LVar4, LVar0) + EVT_ADDF(LVar2, EVT_FLOAT(390.0)) + EVT_ADDF(LVar3, EVT_FLOAT(15.0)) + EVT_ADDF(LVar4, EVT_FLOAT(-30.0)) + EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + EVT_WAIT(1) + EVT_IF_NE(LVar1, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_IF + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) + EVT_CALL(RemoveItemEntity, LVar7) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0) + EVT_END_SWITCH + EVT_END_SWITCH + EVT_THREAD + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0)) + EVT_END_THREAD + EVT_WAIT(10) + EVT_ELSE + EVT_IF_LT(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0, MSG_CH6_004E) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0, MSG_CH6_004F) + EVT_END_IF + EVT_END_IF + EVT_CALL(DisablePlayerInput, FALSE) + EVT_UNBIND + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_GateFlower) = { + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GateFlower))) + EVT_IF_EQ(GF_FLO23_GaveBlueBerry, TRUE) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_HappyDance) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o95, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(RotateModel, MODEL_o86, 50, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o87, 50, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o88, 50, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o83, 120, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o84, 120, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o85, 120, 0, 1, 0) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_GateFlower) = { + .id = NPC_GateFlower, + .settings = &N(NpcSettings_GateFlower), + .pos = { 385.0f, 0.0f, -35.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .init = &N(EVS_NpcInit_GateFlower), + .drops = GATE_FLOWER_DROPS, + .animations = GATE_FLOWER_BLUE_ANIMS, + .tattle = MSG_NpcTattle_BlueGateFlower, +}; + +StaticNpc N(NpcData_Spiny_01) = { + .id = NPC_Spiny_01, + .settings = &N(NpcSettings_Spiny), + .pos = { 80.0f, 0.0f, 0.0f }, + .yaw = 90, + .flags = NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 80, 0, 0 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 80, 0, 0 }, + .detectSize = { 200 }, + } + }, + .animations = SPINY_ANIMS, +}; + +StaticNpc N(NpcData_Spiny_02) = { + .id = NPC_Spiny_02, + .settings = &N(NpcSettings_Spiny), + .pos = { -320.0f, 0.0f, 0.0f }, + .yaw = 270, + .flags = NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW, + .drops = SPINY_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -320, 0, 0 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -320, 0, 0 }, + .detectSize = { 200 }, + } + }, + .animations = SPINY_ANIMS, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_Spiny_01), BTL_FLO_FORMATION_0C, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_Spiny_02), BTL_FLO_FORMATION_0D, BTL_FLO_STAGE_02), + NPC_GROUP(N(NpcData_GateFlower)), + {} +}; diff --git a/src/world/area_flo/flo_23/flo_23_4_entity.c b/src/world/area_flo/flo_23/flo_23_4_entity.c new file mode 100644 index 0000000000..1d74bca534 --- /dev/null +++ b/src/world/area_flo/flo_23/flo_23_4_entity.c @@ -0,0 +1,13 @@ +#include "flo_23.h" +#include "entity.h" + +EvtScript N(EVS_MakeEntities) = { + EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 100, 60, 5, 0, MAKE_ENTITY_END) + EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 100, 145, 0, 0, ITEM_SHOOTING_STAR, MAKE_ENTITY_END) + EVT_CALL(AssignBlockFlag, GF_FLO23_HiddenItem_ShootingStar) + EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 25, 60, 0, 0, ITEM_COIN, MAKE_ENTITY_END) + EVT_CALL(AssignBlockFlag, GF_FLO23_HiddenItem_Coin) + EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), -50, 0, 0, 90, 60, MAKE_ENTITY_END) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_24/CF0940.c b/src/world/area_flo/flo_24/CF0940.c deleted file mode 100644 index 09c71d7349..0000000000 --- a/src/world/area_flo/flo_24/CF0940.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "flo_24.h" -#include "effects.h" - -ApiStatus N(func_80240000_CF0940)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(1, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_24/CF0980.c b/src/world/area_flo/flo_24/CF0980.c deleted file mode 100644 index b9f954a436..0000000000 --- a/src/world/area_flo/flo_24/CF0980.c +++ /dev/null @@ -1,422 +0,0 @@ -#include "flo_24.h" -#include "message_ids.h" -#include "entity.h" - -EntryList N(entryList) = { - { -455.0f, 0.0f, 0.0f, 90.0f }, - { 455.0f, 0.0f, 0.0f, 270.0f }, - { 455.0f, 0.0f, 0.0f, 270.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_24 }, -}; - -EvtScript N(80240600) = { - EVT_IF_LT(GB_StoryProgress, 53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, 49) - EVT_CALL(PlaySound, 0x80000022) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -EvtScript N(80240690) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_8024093C) = EVT_EXIT_WALK(60, 0, "flo_08", 1); - -EvtScript N(exitWalk_80240998) = EVT_EXIT_WALK(60, 1, "flo_10", 0); - -EvtScript N(802409F4) = { - EVT_BIND_TRIGGER(N(exitWalk_8024093C), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_80240998), TRIGGER_FLOOR_ABOVE, 4, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_EXEC_WAIT(N(makeEntities)) - EVT_CALL(MakeTransformGroup, 93) - EVT_CALL(MakeTransformGroup, 100) - EVT_EXEC(N(80241728)) - EVT_EXEC(N(80241ABC)) - EVT_CALL(ModifyColliderFlags, 3, 29, 0x00000004) - EVT_CALL(ModifyColliderFlags, 3, 27, 0x00000004) - EVT_CALL(ModifyColliderFlags, 3, 28, 0x00000004) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 29, 0x00080000) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 27, 0x00080000) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 28, 0x00080000) - EVT_CALL(ModifyColliderFlags, 3, 23, 0x00000001) - EVT_SET(LVar0, -480) - EVT_SET(LVar1, -350) - EVT_SET(LVar2, -65) - EVT_SET(LVar3, -260) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80240690)) - EVT_SET(LVar0, 100) - EVT_SET(LVar1, -350) - EVT_SET(LVar2, 480) - EVT_SET(LVar3, -260) - EVT_SET(LVar4, 0) - EVT_EXEC(N(80240690)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_EXEC(N(8024183C)) - EVT_EXEC(N(802409F4)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(802409F4))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_EXEC_WAIT(N(80240600)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240000_CF0940)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -static s32 N(pad_D38)[] = { - 0x00000000, 0x00000000, -}; - -#include "common/foliage.inc.c" - -FoliageModelList N(tree1_Leaves) = { - .count = 6, - .models = { 20, 18, 21, 22, 23, 19 } -}; - -FoliageModelList N(tree1_Trunk) = { - .count = 1, - .models = { 17 } -}; - -FoliageDropList N(tree1_Drops) = { - .count = 2, - .drops = { - { - .itemID = ITEM_BUBBLE_BERRY, - .pos = { -38, 87, -156 }, - .spawnMode = 0xC, - .spawnFlag = AreaFlag(31), - }, - { - .itemID = ITEM_BUBBLE_BERRY, - .pos = { 39, 65, -208 }, - .spawnMode = 0xC, - .spawnFlag = AreaFlag(32), - }, - } -}; - -ShakeTreeConfig N(tree1) = { - .leaves = &N(tree1_Leaves), - .trunk = &N(tree1_Trunk), - .drops = &N(tree1_Drops), -}; - -Vec4f N(triggerCoord_80241718) = { 1.0f, 0.0f, -192.0f, 0.0f }; - -EvtScript N(80241728) = { - EVT_SET(AreaFlag(31), 0) - EVT_SET(AreaFlag(32), 0) - EVT_SET(LVar0, EVT_PTR(N(tree1))) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 13, 1, 0) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_80241718)), 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(updateTexturePan_802417A0) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_IF_EQ(LVar5, 1) - EVT_IF_EQ(LVar6, 1) - EVT_IF_EQ(LVar7, 1) - EVT_IF_EQ(LVar8, 1) - EVT_CALL(N(UpdateTexturePanSmooth)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(UpdateTexturePanStepped)) - EVT_RETURN - EVT_END -}; - -extern const char N(flo_10_name_hack)[]; - -// BUG: missing END_SPAWN_THREADs -#ifdef NON_EQUIVALENT -EvtScript N(8024183C) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(TranslateGroup, 100, 0, 45, 0) - EVT_CALL(UseSettingsFrom, 0, 170, 0, 160) - EVT_CALL(SetPanTarget, 0, 170, -90, 160) - EVT_CALL(SetCamDistance, 0, 800) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamPosA, 0, EVT_FLOAT(-300.0), EVT_FLOAT(200.0)) - EVT_CALL(SetCamPosB, 0, EVT_FLOAT(300.0), EVT_FLOAT(-150.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(PlaySound, 0x80000050) - EVT_THREAD - EVT_CALL(MakeLerp, 80, 90, 10, 0) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, 101, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, 103, LVar0, 1, 0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_THREAD - EVT_CALL(MakeLerp, 45, 100, 150, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, 100, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30) - EVT_SET(GB_StoryProgress, 49) - EVT_CALL(GotoMap, EVT_PTR(UNK_STR_80242280), 2) - EVT_WAIT(100) - EVT_RETURN - EVT_END -}; -#else -EvtScript N(8024183C) = { - EVT_CMD(EVT_OP_CALL, EVT_PTR(DisablePlayerInput), 1), - EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateGroup), 100, 0, 45, 0), - EVT_CMD(EVT_OP_CALL, EVT_PTR(UseSettingsFrom), 0, 170, 0, 160), - EVT_CMD(EVT_OP_CALL, EVT_PTR(SetPanTarget), 0, 170, -90, 160), - EVT_CMD(EVT_OP_CALL, EVT_PTR(SetCamDistance), 0, 800), - EVT_CMD(EVT_OP_CALL, EVT_PTR(SetCamPitch), 0, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)), - EVT_CMD(EVT_OP_CALL, EVT_PTR(SetCamPosA), 0, EVT_FLOAT(-300.0), EVT_FLOAT(200.0)), - EVT_CMD(EVT_OP_CALL, EVT_PTR(SetCamPosB), 0, EVT_FLOAT(300.0), EVT_FLOAT(-150.0)), - EVT_CMD(EVT_OP_CALL, EVT_PTR(SetCamSpeed), 0, EVT_FLOAT(90.0)), - EVT_CMD(EVT_OP_CALL, EVT_PTR(PanToTarget), 0, 0, 1), - EVT_CMD(EVT_OP_CALL, EVT_PTR(PlaySound), 0x80000050), - EVT_CMD(EVT_OP_THREAD), - EVT_CMD(EVT_OP_CALL, EVT_PTR(MakeLerp), 80, 90, 10, 0), - EVT_CMD(EVT_OP_LABEL, 0), - EVT_CMD(EVT_OP_CALL, EVT_PTR(UpdateLerp)), - EVT_CMD(EVT_OP_CALL, EVT_PTR(RotateModel), 101, LVar0, 1, 0, 0), - EVT_CMD(EVT_OP_CALL, EVT_PTR(RotateModel), 103, LVar0, 1, 0, 0), - EVT_CMD(EVT_OP_IF_EQ, LVar1, 1), - EVT_CMD(EVT_OP_WAIT_FRAMES, 1), - EVT_CMD(EVT_OP_GOTO, 0), - EVT_CMD(EVT_OP_END_IF), - EVT_CMD(EVT_OP_THREAD), - EVT_CMD(EVT_OP_CALL, EVT_PTR(MakeLerp), 45, 100, 150, 0), - EVT_CMD(EVT_OP_LOOP, 0), - EVT_CMD(EVT_OP_CALL, EVT_PTR(UpdateLerp)), - EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateGroup), 100, 0, LVar0, 0), - EVT_CMD(EVT_OP_WAIT_FRAMES, 1), - EVT_CMD(EVT_OP_IF_EQ, LVar1, 0), - EVT_CMD(EVT_OP_BREAK_LOOP), - EVT_CMD(EVT_OP_END_IF), - EVT_CMD(EVT_OP_END_LOOP), - EVT_CMD(EVT_OP_WAIT_FRAMES, 30), - EVT_CMD(EVT_OP_SET, GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER), - EVT_CMD(EVT_OP_CALL, EVT_PTR(GotoMap), EVT_PTR(N(flo_10_name_hack)), 2), - EVT_CMD(EVT_OP_WAIT_FRAMES, 100), - EVT_CMD(EVT_OP_RETURN), - EVT_CMD(EVT_OP_END) - }; -#endif - -EvtScript N(80241ABC) = { - EVT_IF_LT(GB_StoryProgress, 49) - EVT_CALL(EnableGroup, 94, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 30, 0x7FFFFE00) - EVT_ELSE - EVT_CALL(EnableGroup, 65, 0) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, 2) - EVT_CALL(EnableGroup, 105, 0) - EVT_END_IF - EVT_CALL(EnableTexPanning, 89, 1) - EVT_CALL(EnableTexPanning, 97, 1) - EVT_CALL(EnableTexPanning, 90, 1) - EVT_CALL(EnableTexPanning, 98, 1) - EVT_CALL(EnableTexPanning, 91, 1) - EVT_CALL(EnableTexPanning, 92, 1) - EVT_CALL(EnableTexPanning, 101, 1) - EVT_CALL(EnableTexPanning, 103, 1) - EVT_CALL(EnableTexPanning, 99, 1) - EVT_THREAD - EVT_SET(LVar0, 1) - EVT_SET(LVar1, 140) - EVT_SET(LVar2, -80) - EVT_SET(LVar3, -70) - EVT_SET(LVar4, 100) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 1) - EVT_SET(LVar8, 1) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_802417A0)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 2) - EVT_SET(LVar1, -70) - EVT_SET(LVar2, 100) - EVT_SET(LVar3, 100) - EVT_SET(LVar4, -40) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 1) - EVT_SET(LVar8, 1) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_802417A0)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 3) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -800) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_802417A0)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 4) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -800) - EVT_SET(LVar3, -200) - EVT_SET(LVar4, 100) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 1) - EVT_SET(LVar8, 1) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_802417A0)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 5) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -2500) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_802417A0)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 6) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -2500) - EVT_SET(LVar3, -200) - EVT_SET(LVar4, 100) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 1) - EVT_SET(LVar8, 1) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_EXEC(N(updateTexturePan_802417A0)) - EVT_END_THREAD - EVT_RETURN - EVT_END -}; - -static s32 N(pad_21A4)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(makeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -325, 60, -140, 0, 154, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO24_ItemBlock_DizzyDial) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 325, 60, -140, 0, 163, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO24_HiddenItem_MapleSyrup) - EVT_CALL(MakeEntity, &Entity_HiddenPanel, 335, 0, -160, 0, 8, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_FLO24_HiddenPanel) - EVT_RETURN - EVT_END -}; - -const char N(flo_10_name_hack)[] = "flo_10"; diff --git a/src/world/area_flo/flo_24/CF0BC0.c b/src/world/area_flo/flo_24/CF0BC0.c deleted file mode 100644 index e5c9dc686c..0000000000 --- a/src/world/area_flo/flo_24/CF0BC0.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "flo_24.h" - -#include "world/common/atomic/TexturePan.inc.c" - diff --git a/src/world/area_flo/flo_24/flo_24.h b/src/world/area_flo/flo_24/flo_24.h index 80f1fedaff..dc09cf31ae 100644 --- a/src/world/area_flo/flo_24/flo_24.h +++ b/src/world/area_flo/flo_24/flo_24.h @@ -2,19 +2,19 @@ /// @brief Flower Fields - (SE) Water Level Room #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_24_shape.h" +#include "mapfs/flo_24_hit.h" + #define NAMESPACE flo_24 -ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanSmooth)(Evt* script, s32 isInitialCall); -ApiStatus N(UpdateTexturePanStepped)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240000_CF0940)(Evt* script, s32 isInitialCall); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_MakeEntities); -extern EvtScript N(80241728); -extern EvtScript N(8024183C); -extern EvtScript N(80241ABC); -extern EvtScript N(main); -extern EvtScript N(makeEntities); +extern EvtScript N(EVS_SetupFoliage); +extern EvtScript N(EVS_SetupWater); +extern EvtScript N(EVS_Scene_FillWithWater); diff --git a/src/world/area_flo/flo_24/flo_24_0_header.c b/src/world/area_flo/flo_24/flo_24_0_header.c new file mode 100644 index 0000000000..36ea8f31be --- /dev/null +++ b/src/world/area_flo/flo_24/flo_24_0_header.c @@ -0,0 +1,15 @@ +#include "flo_24.h" + +EntryList N(Entrances) = { + [flo_24_ENTRY_0] { -455.0, 0.0, 0.0, 90.0 }, + [flo_24_ENTRY_1] { 455.0, 0.0, 0.0, 270.0 }, + [flo_24_ENTRY_2] { 455.0, 0.0, 0.0, 270.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_24 }, +}; diff --git a/src/world/area_flo/flo_24/flo_24_1_music.c b/src/world/area_flo/flo_24/flo_24_1_music.c new file mode 100644 index 0000000000..50d9486846 --- /dev/null +++ b/src/world/area_flo/flo_24/flo_24_1_music.c @@ -0,0 +1,14 @@ +#include "flo_24.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_ELSE + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_IF + EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(PlaySound, SOUND_80000022) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_24/flo_24_2_main.c b/src/world/area_flo/flo_24/flo_24_2_main.c new file mode 100644 index 0000000000..da7a95814b --- /dev/null +++ b/src/world/area_flo/flo_24/flo_24_2_main.c @@ -0,0 +1,56 @@ +#include "flo_24.h" +#include "effects.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_08_1) = EVT_EXIT_WALK(60, flo_24_ENTRY_0, "flo_08", flo_08_ENTRY_1); +EvtScript N(EVS_ExitWalk_flo_10_0) = EVT_EXIT_WALK(60, flo_24_ENTRY_1, "flo_10", flo_10_ENTRY_0); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_CALL(MakeTransformGroup, MODEL_g58) + EVT_CALL(MakeTransformGroup, MODEL_g73) + EVT_EXEC(N(EVS_SetupFoliage)) + EVT_EXEC(N(EVS_SetupWater)) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o177, SURFACE_TYPE_DOCK_WALL) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o178, SURFACE_TYPE_DOCK_WALL) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o179, SURFACE_TYPE_DOCK_WALL) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o177, COLLIDER_FLAGS_80000) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o178, COLLIDER_FLAGS_80000) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o179, COLLIDER_FLAGS_80000) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o176, SURFACE_TYPE_WATER) + EVT_FLOWER_SPAWN_REGION( -480, -350, -65, -260, 0) + EVT_FLOWER_SPAWN_REGION( 100, -350, 480, -260, 0) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(GetEntryID, LVar0) + EVT_IF_EQ(LVar0, flo_24_ENTRY_2) + EVT_EXEC(N(EVS_Scene_FillWithWater)) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_ELSE + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_END_IF + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_24/flo_24_3_foliage.c b/src/world/area_flo/flo_24/flo_24_3_foliage.c new file mode 100644 index 0000000000..a78bd2957a --- /dev/null +++ b/src/world/area_flo/flo_24/flo_24_3_foliage.c @@ -0,0 +1,61 @@ +#include "flo_24.h" + +#include "common/foliage.inc.c" + +FoliageModelList N(Tree1_LeafModels) = { + .count = 6, + .models = { + MODEL_o125, + MODEL_o126, + MODEL_o127, + MODEL_o128, + MODEL_o129, + MODEL_o130, + } +}; + +FoliageModelList N(Tree1_TrunkModels) = { + .count = 1, + .models = { + MODEL_o124, + } +}; + +FoliageDropList N(Tree1_Drops) = { + .count = 2, + .drops = { + { + .itemID = ITEM_BUBBLE_BERRY, + .pos = { -38, 87, -156 }, + .spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, + .spawnFlag = AF_FLO_TreeDrop_BubbleBerry1, + }, + { + .itemID = ITEM_BUBBLE_BERRY, + .pos = { 39, 65, -208 }, + .spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, + .spawnFlag = AF_FLO_TreeDrop_BubbleBerry2, + }, + } +}; + +ShakeTreeConfig N(ShakeTree_Tree1) = { + .leaves = &N(Tree1_LeafModels), + .trunk = &N(Tree1_TrunkModels), + .drops = &N(Tree1_Drops), +}; + +BombTrigger N(BombPos_Tree1) = { + .pos = { 1.0f, 0.0f, -192.0f }, + .radius = 0.0f +}; + +EvtScript N(EVS_SetupFoliage) = { + EVT_SET(AF_FLO_TreeDrop_BubbleBerry1, FALSE) + EVT_SET(AF_FLO_TreeDrop_BubbleBerry2, FALSE) + EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o124, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_24/flo_24_4_water.c b/src/world/area_flo/flo_24/flo_24_4_water.c new file mode 100644 index 0000000000..3fa44d01e7 --- /dev/null +++ b/src/world/area_flo/flo_24/flo_24_4_water.c @@ -0,0 +1,114 @@ +#include "flo_24.h" + +#include "world/common/atomic/TexturePan.inc.c" +#include "world/common/atomic/TexturePan.data.inc.c" + +EvtScript N(EVS_Scene_FillWithWater) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_CALL(TranslateGroup, MODEL_g73, 0, 45, 0) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 170, 0, 160) + EVT_CALL(SetPanTarget, CAM_DEFAULT, 170, -90, 160) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) + EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-300.0), EVT_FLOAT(200.0)) + EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(300.0), EVT_FLOAT(-150.0)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(PlaySound, SOUND_80000050) + //@bug thread is never terminated + EVT_THREAD + EVT_CALL(MakeLerp, 80, 90, 10, EASING_LINEAR) + EVT_LABEL(0) + EVT_CALL(UpdateLerp) + EVT_CALL(RotateModel, MODEL_o219, LVar0, 1, 0, 0) + EVT_CALL(RotateModel, MODEL_o220, LVar0, 1, 0, 0) + EVT_IF_EQ(LVar1, 1) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_END_IF + // should end thread here + //@bug thread is never terminated + EVT_THREAD + EVT_CALL(MakeLerp, 45, 100, 150, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_CALL(TranslateGroup, MODEL_g73, 0, LVar0, 0) + EVT_WAIT(1) + EVT_IF_EQ(LVar1, 0) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + // should end thread here + EVT_WAIT(30) + EVT_SET(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(GotoMap, EVT_PTR("flo_10"), flo_10_ENTRY_2) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_SetupWater) = { + EVT_IF_LT(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + EVT_CALL(EnableGroup, MODEL_water1, FALSE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) + EVT_ELSE + EVT_CALL(EnableGroup, MODEL_g60, FALSE) + EVT_END_IF + EVT_CALL(GetEntryID, LVar0) + EVT_IF_NE(LVar0, flo_24_ENTRY_2) + EVT_CALL(EnableGroup, MODEL_g67, FALSE) + EVT_END_IF + EVT_CALL(EnableTexPanning, MODEL_o165, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o215, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o166, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o216, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o189, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o192, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o219, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o220, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o218, TRUE) + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_1) + TEX_PAN_PARAMS_STEP( 140, -80, -70, 100) + TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_2) + TEX_PAN_PARAMS_STEP( -70, 100, 100, -40) + TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_3) + TEX_PAN_PARAMS_STEP( 0, -800, 0, 0) + TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_4) + TEX_PAN_PARAMS_STEP( 0, -800, -200, 100) + TEX_PAN_PARAMS_FREQ( 0, 1, 1, 1) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_5) + TEX_PAN_PARAMS_STEP( 0,-2500, 0, 0) + TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_6) + TEX_PAN_PARAMS_STEP( 0,-2500, -200, 100) + TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_24/flo_24_5_entity.c b/src/world/area_flo/flo_24/flo_24_5_entity.c new file mode 100644 index 0000000000..99e66a5ecb --- /dev/null +++ b/src/world/area_flo/flo_24/flo_24_5_entity.c @@ -0,0 +1,13 @@ +#include "flo_24.h" +#include "entity.h" + +EvtScript N(EVS_MakeEntities) = { + EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -325, 60, -140, 0, ITEM_DIZZY_DIAL, MAKE_ENTITY_END) + EVT_CALL(AssignBlockFlag, GF_FLO24_ItemBlock_DizzyDial) + EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 325, 60, -140, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + EVT_CALL(AssignBlockFlag, GF_FLO24_HiddenItem_MapleSyrup) + EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 335, 0, -160, 0, MODEL_o136, MAKE_ENTITY_END) + EVT_CALL(AssignPanelFlag, GF_FLO24_HiddenPanel) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_25/CF2BD0.c b/src/world/area_flo/flo_25/CF2BD0.c deleted file mode 100644 index 7c2d333709..0000000000 --- a/src/world/area_flo/flo_25/CF2BD0.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "flo_25.h" -#include "effects.h" - -ApiStatus N(func_80240000_CF2BD0)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); - return ApiStatus_DONE2; -} diff --git a/src/world/area_flo/flo_25/CF2C10.c b/src/world/area_flo/flo_25/CF2C10.c deleted file mode 100644 index 1d38ebc24e..0000000000 --- a/src/world/area_flo/flo_25/CF2C10.c +++ /dev/null @@ -1,531 +0,0 @@ -#include "flo_25.h" -#include "message_ids.h" -#include "entity.h" -#include "sprite/npc/Bzzap.h" -#include "sprite/npc/GateFlower.h" -#include "sprite/npc/TuffPuff.h" - -enum { - NPC_GATE_FLOWER, - NPC_TUFF_PUFF, - NPC_BZZAP, -}; - -static s32 N(ItemChoiceList)[91]; -static s8 N(D_8024510C_pad)[4]; -static s32 N(FlowerGuard_ItemChoiceList)[91]; - -EntryList N(entryList) = { - { 620.0f, 0.0f, 0.0f, 270.0f }, - { -620.0f, 0.0f, 0.0f, 90.0f }, -}; - -MapSettings N(settings) = { - .main = &N(main), - .entryList = &N(entryList), - .entryCount = ENTRY_COUNT(N(entryList)), - .background = &gBackgroundImage, - .tattle = { MSG_MapTattle_flo_25 }, -}; - -EvtScript N(80242330) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(53) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; - -EvtScript N(802423A0) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(exitWalk_8024264C) = EVT_EXIT_WALK(60, 0, "flo_00", 3); - -EvtScript N(exitWalk_802426A8) = EVT_EXIT_WALK(60, 1, "flo_07", 0); - -EvtScript N(80242704) = { - EVT_BIND_TRIGGER(N(exitWalk_802426A8), TRIGGER_FLOOR_ABOVE, 0, 1, 0) - EVT_BIND_TRIGGER(N(exitWalk_8024264C), TRIGGER_FLOOR_ABOVE, 4, 1, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(main) = { - EVT_SET(GB_WorldLocation, 38) - EVT_CALL(SetSpriteShading, -1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096) - EVT_CALL(SetCamBGColor, 0, 0, 0, 0) - EVT_CALL(SetCamEnabled, 0, 1) - EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80243C5C))) - EVT_EXEC_WAIT(N(makeEntities)) - EVT_EXEC(N(80244D0C)) - EVT_EXEC(N(802446BC)) - EVT_SET(LVar0, -270) - EVT_SET(LVar1, -190) - EVT_SET(LVar2, 640) - EVT_SET(LVar3, -60) - EVT_SET(LVar4, 60) - EVT_EXEC(N(802423A0)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 1, 0x7FFFFE00) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 5, 0x7FFFFE00) - EVT_SET(LVar0, EVT_PTR(N(80242704))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(80242330)) - EVT_IF_GE(GB_StoryProgress, 53) - EVT_CALL(N(func_80240000_CF2BD0)) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_802428F0) = { - .height = 56, - .radius = 40, - .level = 99, -}; - -f32 N(FlyingAI_JumpVels)[] = { - 4.5f, 3.5f, 2.6f, 2.0f, - 1.5f, 20.0f, -}; - -MobileAISettings N(npcAISettings_80242934) = { - .moveSpeed = 1.0f, - .moveTime = 45, - .waitTime = 60, - .alertRadius = 100.0f, - .playerSearchInterval = 3, - .chaseSpeed = 3.6f, - .chaseTurnRate= 10, - .chaseUpdateInterval = 1, - .chaseRadius = 120.0f, - .unk_AI_2C = 1, -}; - -EvtScript N(npcAI_80242964) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetSelfVar, 5, 0) - EVT_CALL(SetSelfVar, 6, 0) - EVT_CALL(SetSelfVar, 1, 600) - EVT_CALL(N(FlyingNoAttackAI_Main), EVT_PTR(N(npcAISettings_80242934))) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_802429D4) = { - .height = 24, - .radius = 28, - .ai = &N(npcAI_80242964), - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 19, -}; - -MobileAISettings N(npcAISettings_80242A00) = { - .moveSpeed = 1.0f, - .moveTime = 30, - .waitTime = 5, - .alertRadius = 80.0f, - .alertOffsetDist = 30.0f, - .playerSearchInterval = 2, - .chaseSpeed = 4.5f, - .chaseTurnRate= 6, - .chaseUpdateInterval = 1, - .chaseRadius = 90.0f, - .chaseOffsetDist = 30.0f, - .unk_AI_2C = 1, -}; - -EvtScript N(npcAI_80242A30) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, -630) - EVT_CALL(SetSelfVar, 6, 50) - EVT_CALL(SetSelfVar, 1, 200) - EVT_CALL(N(FlyingAI_Main), EVT_PTR(N(npcAISettings_80242A00))) - EVT_RETURN - EVT_END -}; - -NpcSettings N(npcSettings_80242AA0) = { - .height = 26, - .radius = 24, - .ai = &N(npcAI_80242A30), - .onHit = &EnemyNpcHit, - .onDefeat = &EnemyNpcDefeat, - .level = 19, -}; - -s32 N(ItemChoice_HasSelectedItem) = { - 0x00000000, -}; - -s32 N(ItemChoice_SelectedItemID) = { - 0x00000000, -}; - -EvtScript N(80242AD4) = { - EVT_SET(LVar9, LVar1) - EVT_CALL(ShowConsumableChoicePopup) - EVT_SET(LVarA, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_CALL(RemoveItemAt, LVar1) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) - EVT_CALL(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, 1, 0) - EVT_CALL(SetPlayerAnimation, 393221) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_END_SWITCH - EVT_CALL(N(ItemChoice_SaveSelected), LVarA) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END -}; - -EvtScript N(80242C08) = { - EVT_CALL(N(BuildItemChoiceList), LVar0) - EVT_BIND_PADLOCK(N(80242AD4), 0x10, 0, EVT_PTR(N(ItemChoiceList)), 0, 1) - EVT_CALL(N(ItemChoice_WaitForSelection), LVar0) - EVT_RETURN - EVT_END -}; - -EvtScript N(interact_80242C58) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(GF_FLO25_GaveRedBerry, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 350) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003B) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_Thinking) - EVT_CALL(N(FlowerGuard_MakeItemList)) - EVT_SET(LVar0, EVT_PTR(N(FlowerGuard_ItemChoiceList))) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(N(80242C08)) - EVT_SWITCH(LVar0) - EVT_CASE_LE(0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003C) - EVT_CASE_DEFAULT - EVT_SET(LVar8, LVar0) - EVT_CALL(N(FlowerGuard_JudgeItemTastiness), LVar0) - EVT_CALL(MakeItemEntity, LVar8, 505, 20, -24, 1, 0) - EVT_SET(LVar7, LVar0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2095, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Eat) - EVT_WAIT(20) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_SWITCH(LVar8) - EVT_CASE_EQ(159) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003F) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x21C, 0) - EVT_CALL(EndSpeech, -1, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_OpenGate) - EVT_CALL(PlaySoundAtCollider, 14, 457, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 14, 0x7FFFFE00) - EVT_CALL(MakeLerp, 0, 100, 30, 1) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar8, LVar0) - EVT_SETF(LVar9, LVar0) - EVT_MULF(LVar8, EVT_FLOAT(0.5)) - EVT_MULF(LVar9, EVT_FLOAT(1.2)) - EVT_CALL(RotateModel, 86, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, 87, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, 88, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, 82, LVar9, 0, 1, 0) - EVT_CALL(RotateModel, 83, LVar9, 0, 1, 0) - EVT_CALL(RotateModel, 84, LVar9, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_HappyDance) - EVT_SET(GF_FLO25_GaveRedBerry, 1) - EVT_CASE_EQ(160) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003E) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) - EVT_CASE_EQ(158) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003E) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003D) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Disgust) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x2096, 0) - EVT_CALL(MakeItemEntity, LVar8, -125, 20, 0, 1, 0) - EVT_SET(LVar7, LVar0) - EVT_WAIT(5) - EVT_CALL(GetAngleToPlayer, -1, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_CALL(MakeLerp, 0, 100, 7, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(-0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(500.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-20.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_CALL(MakeLerp, 0, 100, 7, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(510.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-20.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) - EVT_CALL(EndSpeech, -1, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(ResetCam, 0, EVT_FLOAT(6.0)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_ELSE - EVT_IF_LT(GB_StoryProgress, 57) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0, MSG_CH6_0040) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0, MSG_CH6_0041) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END -}; - -EvtScript N(init_80243564) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80242C58))) - EVT_IF_EQ(GF_FLO25_GaveRedBerry, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_HappyDance) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 14, 0x7FFFFE00) - EVT_CALL(RotateModel, 86, 50, 0, -1, 0) - EVT_CALL(RotateModel, 87, 50, 0, -1, 0) - EVT_CALL(RotateModel, 88, 50, 0, -1, 0) - EVT_CALL(RotateModel, 82, 120, 0, 1, 0) - EVT_CALL(RotateModel, 83, 120, 0, 1, 0) - EVT_CALL(RotateModel, 84, 120, 0, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END -}; - -StaticNpc N(npcGroup_8024368C) = { - .id = NPC_GATE_FLOWER, - .settings = &N(npcSettings_802428F0), - .pos = { 505.0f, 0.0f, -25.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, - .init = &N(init_80243564), - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .heartDrops = NO_DROPS, - .flowerDrops = NO_DROPS, - }, - .animations = { - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - ANIM_GateFlower_Red_Idle, - }, - .tattle = MSG_NpcTattle_RedGateFlower, -}; - -StaticNpc N(npcGroup_8024387C) = { - .id = NPC_TUFF_PUFF, - .settings = &N(npcSettings_802429D4), - .pos = { -200.0f, 45.0f, 0.0f }, - .flags = NPC_FLAG_LOCK_ANIMS, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 10, - .itemDrops = { - { ITEM_THUNDER_RAGE, 10, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(2), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .maxCoinBonus = 2, - }, - .territory = { .temp = { -200, 45, 0, 30, 0, -32767, 0, -200, 45, 0, 200 }}, - .animations = { - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Still, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Hurt, - ANIM_TuffPuff_Grin, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - ANIM_TuffPuff_Idle, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -StaticNpc N(npcGroup_80243A6C) = { - .id = NPC_BZZAP, - .settings = &N(npcSettings_80242AA0), - .pos = { 150.0f, 55.0f, 0.0f }, - .flags = NPC_FLAG_LOCK_ANIMS, - .yaw = 90, - .drops = { - .dropFlags = NPC_DROP_FLAGS_80, - .itemDropChance = 15, - .itemDrops = { - { ITEM_MAPLE_SYRUP, 6, 0 }, - { ITEM_HONEY_SYRUP, 4, 0 }, - }, - .heartDrops = STANDARD_HEART_DROPS(3), - .flowerDrops = STANDARD_FLOWER_DROPS(2), - .minCoinBonus = 1, - .maxCoinBonus = 4, - }, - .territory = { .temp = { 150, 50, 0, 30, 0, -32767, 0, 150, 50, 0, 200, 0, 0, 1 }}, - .animations = { - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim03, - ANIM_Bzzap_Anim03, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim06, - ANIM_Bzzap_Anim06, - ANIM_Bzzap_Anim04, - ANIM_Bzzap_Anim02, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - ANIM_Bzzap_Anim01, - }, - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, -}; - -NpcGroupList N(npcGroupList_80243C5C) = { - NPC_GROUP(N(npcGroup_8024387C), 0x1822, 0x05), - NPC_GROUP(N(npcGroup_80243A6C), 0x181A, 0x01), - NPC_GROUP(N(npcGroup_8024368C)), - {}, -}; - -static s32 N(pad_3C8C) = { - 0x00000000, -}; - -EvtScript N(makeEntities) = { - EVT_CALL(MakeEntity, &Entity_HiddenPanel, -390, 0, 0, 0, 8, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_FLO25_HiddenPanel) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_3CD8)[] = { - 0x00000000, 0x00000000, -}; - -#include "world/common/enemy/ai/FlyingAI.inc.c" - -#include "world/common/enemy/ai/FlyingNoAttackAI.inc.c" - -#include "world/common/atomic/ItemChoice_PartA.inc.c" - -#include "world/common/atomic/MakeConsumableChoice.inc.c" - -#include "world/common/atomic/ItemChoice_FlowerGuard.inc.c" diff --git a/src/world/area_flo/flo_25/CF4BC0.c b/src/world/area_flo/flo_25/CF4BC0.c deleted file mode 100644 index fd6e150667..0000000000 --- a/src/world/area_flo/flo_25/CF4BC0.c +++ /dev/null @@ -1,179 +0,0 @@ -#include "flo_25.h" - -#include "common/foliage.inc.c" - -FoliageModelList N(tree1_Leaves) = { - .count = 3, - .models = { 22, 23, 24 } -}; - -FoliageModelList N(tree1_Trunk) = { - .count = 1, - .models = { 21 } -}; - -FoliageDropList N(tree1_Drops) = { - .count = 2, - .drops = { - { - .itemID = ITEM_YELLOW_BERRY, - .pos = { -432, 84, -44 }, - .spawnMode = 0xC, - .spawnFlag = AreaFlag(33), - }, - { - .itemID = ITEM_YELLOW_BERRY, - .pos = { -346, 72, -114 }, - .spawnMode = 0xC, - .spawnFlag = AreaFlag(34), - }, - } -}; - -ShakeTreeConfig N(tree1) = { - .leaves = &N(tree1_Leaves), - .trunk = &N(tree1_Trunk), - .drops = &N(tree1_Drops), -}; - -Vec4f N(triggerCoord_802446AC) = { -388.0f, 0.0f, -92.0f, 0.0f }; - -EvtScript N(802446BC) = { - EVT_SET(AreaFlag(33), 0) - EVT_SET(AreaFlag(34), 0) - EVT_SET(LVar0, EVT_PTR(N(tree1))) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 12, 1, 0) - EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_802446AC)), 1, 0) - EVT_RETURN - EVT_END -}; - -static s32 N(pad_4734)[] = { - 0x00000000, 0x00000000, 0x00000000, -}; - -EvtScript N(80244740) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_CALL(PlayEffect, 0xD, LVar0, LVar2, LVar1, LVar3, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_CALL(PlayEffect, 0xD, LVar0, LVarE, LVar1, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END -}; - -EvtScript N(802449EC) = { - EVT_SET(LVar9, LVar6) - EVT_SET(LVar8, LVar5) - EVT_SET(LVar7, LVar4) - EVT_SET(LVar6, LVar3) - EVT_SET(LVar5, LVar2) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar3, LVar0) - EVT_CALL(EnableModel, LVar6, 0) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkFunc43)) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnableModel, LVar6, 1) - EVT_END_THREAD - EVT_IF_NE(LVarA, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 8) - EVT_CALL(PlayEffect, 0x11, 4, LVar0, LVar1, LVar2, 15, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_SUB(LVar1, 10) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 14, 0) - EVT_END_THREAD - EVT_END_IF - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAt, 0xF8, 0, LVar3, LVar4, LVar5) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 180, 20, 2) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar8, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, LVar9, LVar0, 1, 0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(EnableModel, LVar7, 0) - EVT_RETURN - EVT_END -}; - -EvtScript N(80244D0C) = { - EVT_CALL(GetModelCenter, 57) - EVT_SET(LVar3, 57) - EVT_SET(LVar4, 58) - EVT_SET(LVar5, 59) - EVT_SET(LVar6, 60) - EVT_SET(LVarA, 0) - EVT_EXEC(N(802449EC)) - EVT_CALL(GetModelCenter, 63) - EVT_SET(LVar3, 63) - EVT_SET(LVar4, 64) - EVT_SET(LVar5, 65) - EVT_SET(LVar6, 66) - EVT_SET(LVarA, 0) - EVT_EXEC(N(802449EC)) - EVT_CALL(GetModelCenter, 69) - EVT_SET(LVar3, 69) - EVT_SET(LVar4, 70) - EVT_SET(LVar5, 71) - EVT_SET(LVar6, 72) - EVT_SET(LVarA, 174) - EVT_EXEC(N(802449EC)) - EVT_CALL(GetModelCenter, 75) - EVT_SET(LVar3, 75) - EVT_SET(LVar4, 76) - EVT_SET(LVar5, 77) - EVT_SET(LVar6, 78) - EVT_SET(LVarA, 0) - EVT_EXEC(N(802449EC)) - EVT_RETURN - EVT_END -}; diff --git a/src/world/area_flo/flo_25/CF4E00.c b/src/world/area_flo/flo_25/CF4E00.c deleted file mode 100644 index 7f93ba5ba3..0000000000 --- a/src/world/area_flo/flo_25/CF4E00.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "flo_25.h" - -#include "world/common/todo/UnkFunc43.inc.c" diff --git a/src/world/area_flo/flo_25/flo_25.h b/src/world/area_flo/flo_25/flo_25.h index 38c6cc0601..b587970337 100644 --- a/src/world/area_flo/flo_25/flo_25.h +++ b/src/world/area_flo/flo_25/flo_25.h @@ -2,27 +2,25 @@ /// @brief Flower Fields - (SW) Path to Crystal Tree #include "common.h" -#include "../flo.h" #include "message_ids.h" #include "map.h" +#include "../flo.h" +#include "mapfs/flo_25_shape.h" +#include "mapfs/flo_25_hit.h" + +enum { + NPC_GateFlower = 0, + NPC_TuffPuff = 1, + NPC_Bzzap = 2, +}; + #define NAMESPACE flo_25 -ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall); -ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); -ApiStatus N(UnkFunc43)(Evt* script, s32 isInitialCall); -ApiStatus N(func_80240000_CF2BD0)(Evt* script, s32 isInitialCall); -ApiStatus N(FlyingAI_Main)(Evt* script, s32 isInitialCall); -ApiStatus N(FlyingNoAttackAI_Main)(Evt* script, s32 isInitialCall); -ApiStatus N(ItemChoice_WaitForSelection)(Evt* script, s32 isInitialCall); -ApiStatus N(ItemChoice_SaveSelected)(Evt* script, s32 isInitialCall); -ApiStatus N(BuildItemChoiceList)(Evt* script, s32 isInitialCall); -ApiStatus N(FlowerGuard_SetItemEntityPosition)(Evt* script, s32 isInitialCall); -ApiStatus N(FlowerGuard_JudgeItemTastiness)(Evt* script, s32 isInitialCall); -ApiStatus N(FlowerGuard_MakeItemList)(Evt* script, s32 isInitialCall); +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_MakeEntities); +extern EvtScript N(EVS_SetupFoliage); +extern EvtScript N(EVS_SetupVines); -extern NpcGroupList N(npcGroupList_80243C5C); -extern EvtScript N(802446BC); -extern EvtScript N(80244D0C); -extern EvtScript N(main); -extern EvtScript N(makeEntities); +extern NpcGroupList N(DefaultNPCs); diff --git a/src/world/area_flo/flo_25/flo_25_0_header.c b/src/world/area_flo/flo_25/flo_25_0_header.c new file mode 100644 index 0000000000..cb0b27136e --- /dev/null +++ b/src/world/area_flo/flo_25/flo_25_0_header.c @@ -0,0 +1,14 @@ +#include "flo_25.h" + +EntryList N(Entrances) = { + [flo_25_ENTRY_0] { 620.0, 0.0, 0.0, 270.0 }, + [flo_25_ENTRY_1] { -620.0, 0.0, 0.0, 90.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .background = &gBackgroundImage, + .tattle = { MSG_MapTattle_flo_25 }, +}; diff --git a/src/world/area_flo/flo_25/flo_25_1_music.c b/src/world/area_flo/flo_25/flo_25_1_music.c new file mode 100644 index 0000000000..f17d9a94fd --- /dev/null +++ b/src/world/area_flo/flo_25/flo_25_1_music.c @@ -0,0 +1,12 @@ +#include "flo_25.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_SWITCH(GB_StoryProgress) + EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EVT_CASE_DEFAULT + EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_25/flo_25_2_main.c b/src/world/area_flo/flo_25/flo_25_2_main.c new file mode 100644 index 0000000000..8930ca15d6 --- /dev/null +++ b/src/world/area_flo/flo_25/flo_25_2_main.c @@ -0,0 +1,41 @@ +#include "flo_25.h" +#include "effects.h" + +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" + +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_ExitWalk_flo_00_3) = EVT_EXIT_WALK(60, flo_25_ENTRY_0, "flo_00", flo_00_ENTRY_3); +EvtScript N(EVS_ExitWalk_flo_07_0) = EVT_EXIT_WALK(60, flo_25_ENTRY_1, "flo_07", flo_07_ENTRY_0); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + EVT_CALL(SetSpriteShading, SHADING_NONE) + EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + EVT_SETUP_CAMERA_DEFAULT() + EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_EXEC(N(EVS_SetupVines)) + EVT_EXEC(N(EVS_SetupFoliage)) + EVT_FLOWER_SPAWN_REGION( -270, -190, 640, -60, 60) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_EXEC_WAIT(N(EVS_SetupMusic)) + EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + EVT_CALL(N(SpawnSunEffect)) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_25/flo_25_3_npc.c b/src/world/area_flo/flo_25/flo_25_3_npc.c new file mode 100644 index 0000000000..bfbfad596f --- /dev/null +++ b/src/world/area_flo/flo_25/flo_25_3_npc.c @@ -0,0 +1,223 @@ +#include "flo_25.h" + +#include "world/common/npc/GateFlower.inc.c" +#include "world/common/enemy/complete/TuffPuff.inc.c" +#include "world/common/enemy/complete/Bzzap.inc.c" + +#include "world/common/complete/NormalItemChoice.inc.c" + +static s32 N(FlowerGuard_ItemChoiceList)[ITEM_NUM_CONSUMABLES + 1]; +#include "world/common/atomic/ItemChoice_FlowerGuard.inc.c" + +EvtScript N(EVS_NpcInteract_GateFlower) = { + EVT_CALL(DisablePlayerInput, TRUE) + EVT_IF_EQ(GF_FLO25_GaveRedBerry, FALSE) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) + EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) + EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) + EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003B) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_Thinking) + EVT_CALL(N(FlowerGuard_MakeItemList)) + EVT_CHOOSE_CONSUMABLE_FROM(N(FlowerGuard_ItemChoiceList), 0) + EVT_SWITCH(LVar0) + EVT_CASE_LE(0) + EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003C) + EVT_CASE_DEFAULT + EVT_SET(LVar8, LVar0) + EVT_CALL(N(FlowerGuard_JudgeItemTastiness), LVar0) + EVT_CALL(MakeItemEntity, LVar8, 505, 20, -24, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_SET(LVar7, LVar0) + EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2095, 0) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Eat) + EVT_WAIT(20) + EVT_CALL(RemoveItemEntity, LVar7) + EVT_SWITCH(LVar8) + EVT_CASE_EQ(159) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003F) + EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_21C, 0) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_OpenGate) + EVT_CALL(PlaySoundAtCollider, COLLIDER_o94, SOUND_METAL_GATE_OPEN, 0) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o94, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_SETF(LVar8, LVar0) + EVT_SETF(LVar9, LVar0) + EVT_MULF(LVar8, EVT_FLOAT(0.5)) + EVT_MULF(LVar9, EVT_FLOAT(1.2)) + EVT_CALL(RotateModel, MODEL_o137, LVar8, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o138, LVar8, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o139, LVar8, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o134, LVar9, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o135, LVar9, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o136, LVar9, 0, 1, 0) + EVT_WAIT(1) + EVT_IF_NE(LVar1, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_HappyDance) + EVT_SET(GF_FLO25_GaveRedBerry, TRUE) + EVT_CASE_EQ(160) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003E) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) + EVT_CASE_EQ(158) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003E) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) + EVT_CASE_DEFAULT + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003D) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Disgust) + EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2096, 0) + EVT_CALL(MakeItemEntity, LVar8, -125, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0) + EVT_SET(LVar7, LVar0) + EVT_WAIT(5) + EVT_CALL(GetAngleToPlayer, NPC_SELF, LVar0) + EVT_IF_LT(LVar0, 180) + EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_SETF(LVar2, EVT_FLOAT(-0.5)) + EVT_SETF(LVar3, EVT_FLOAT(-0.2)) + EVT_SETF(LVar4, EVT_FLOAT(0.9)) + EVT_MULF(LVar2, LVar0) + EVT_MULF(LVar3, LVar0) + EVT_MULF(LVar4, LVar0) + EVT_ADDF(LVar2, EVT_FLOAT(500.0)) + EVT_ADDF(LVar3, EVT_FLOAT(15.0)) + EVT_ADDF(LVar4, EVT_FLOAT(-20.0)) + EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + EVT_WAIT(1) + EVT_IF_NE(LVar1, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_ELSE + EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) + EVT_LOOP(0) + EVT_CALL(UpdateLerp) + EVT_SETF(LVar2, EVT_FLOAT(0.5)) + EVT_SETF(LVar3, EVT_FLOAT(-0.2)) + EVT_SETF(LVar4, EVT_FLOAT(0.9)) + EVT_MULF(LVar2, LVar0) + EVT_MULF(LVar3, LVar0) + EVT_MULF(LVar4, LVar0) + EVT_ADDF(LVar2, EVT_FLOAT(510.0)) + EVT_ADDF(LVar3, EVT_FLOAT(15.0)) + EVT_ADDF(LVar4, EVT_FLOAT(-20.0)) + EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + EVT_WAIT(1) + EVT_IF_NE(LVar1, 1) + EVT_BREAK_LOOP + EVT_END_IF + EVT_END_LOOP + EVT_END_IF + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) + EVT_CALL(RemoveItemEntity, LVar7) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) + EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0) + EVT_END_SWITCH + EVT_END_SWITCH + EVT_THREAD + EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0)) + EVT_END_THREAD + EVT_WAIT(10) + EVT_ELSE + EVT_IF_LT(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0, MSG_CH6_0040) + EVT_ELSE + EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0, MSG_CH6_0041) + EVT_END_IF + EVT_END_IF + EVT_CALL(DisablePlayerInput, FALSE) + EVT_UNBIND + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcInit_GateFlower) = { + EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GateFlower))) + EVT_IF_EQ(GF_FLO25_GaveRedBerry, TRUE) + EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_HappyDance) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o94, COLLIDER_FLAGS_UPPER_MASK) + EVT_CALL(RotateModel, MODEL_o137, 50, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o138, 50, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o139, 50, 0, -1, 0) + EVT_CALL(RotateModel, MODEL_o134, 120, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o135, 120, 0, 1, 0) + EVT_CALL(RotateModel, MODEL_o136, 120, 0, 1, 0) + EVT_END_IF + EVT_RETURN + EVT_END +}; + +StaticNpc N(NpcData_GateFlower) = { + .id = NPC_GateFlower, + .settings = &N(NpcSettings_GateFlower), + .pos = { 505.0f, 0.0f, -25.0f }, + .yaw = 90, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .init = &N(EVS_NpcInit_GateFlower), + .drops = GATE_FLOWER_DROPS, + .animations = GATE_FLOWER_RED_ANIMS, + .tattle = MSG_NpcTattle_RedGateFlower, +}; + +StaticNpc N(NpcData_TuffPuff) = { + .id = NPC_TuffPuff, + .settings = &N(NpcSettings_TuffPuff), + .pos = { -200.0f, 45.0f, 0.0f }, + .yaw = 90, + .flags = NPC_FLAG_LOCK_ANIMS, + .drops = TUFF_PUFF_DROPS, + .territory = { + .wander = { + .isFlying = FALSE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -200, 45, 0 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { -200, 45, 0 }, + .detectSize = { 200 }, + } + }, + .animations = TUFF_PUFF_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +StaticNpc N(NpcData_Bzzap) = { + .id = NPC_Bzzap, + .settings = &N(NpcSettings_Bzzap), + .pos = { 150.0f, 55.0f, 0.0f }, + .yaw = 90, + .flags = NPC_FLAG_LOCK_ANIMS, + .drops = BZZAP_DROPS, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { 150, 50, 0 }, + .wanderSize = { 30 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 150, 50, 0 }, + .detectSize = { 200 }, + } + }, + .animations = BZZAP_ANIMS, + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, +}; + +NpcGroupList N(DefaultNPCs) = { + NPC_GROUP(N(NpcData_TuffPuff), BTL_FLO_FORMATION_22, BTL_FLO_STAGE_05), + NPC_GROUP(N(NpcData_Bzzap), BTL_FLO_FORMATION_1A, BTL_FLO_STAGE_01), + NPC_GROUP(N(NpcData_GateFlower)), + {} +}; diff --git a/src/world/area_flo/flo_25/flo_25_4_entity.c b/src/world/area_flo/flo_25/flo_25_4_entity.c new file mode 100644 index 0000000000..05da88f30a --- /dev/null +++ b/src/world/area_flo/flo_25/flo_25_4_entity.c @@ -0,0 +1,9 @@ +#include "flo_25.h" +#include "entity.h" + +EvtScript N(EVS_MakeEntities) = { + EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -390, 0, 0, 0, MODEL_o3, MAKE_ENTITY_END) + EVT_CALL(AssignPanelFlag, GF_FLO25_HiddenPanel) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_25/flo_25_5_foliage.c b/src/world/area_flo/flo_25/flo_25_5_foliage.c new file mode 100644 index 0000000000..fc9c7b0ea4 --- /dev/null +++ b/src/world/area_flo/flo_25/flo_25_5_foliage.c @@ -0,0 +1,58 @@ +#include "flo_25.h" + +#include "common/foliage.inc.c" + +FoliageModelList N(Tree1_LeafModels) = { + .count = 3, + .models = { + MODEL_o43, + MODEL_o44, + MODEL_o45, + } +}; + +FoliageModelList N(Tree1_TrunkModels) = { + .count = 1, + .models = { + MODEL_o42, + } +}; + +FoliageDropList N(Tree1_Drops) = { + .count = 2, + .drops = { + { + .itemID = ITEM_YELLOW_BERRY, + .pos = { -432, 84, -44 }, + .spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, + .spawnFlag = AF_FLO_TreeDrop_YellowBerry1, + }, + { + .itemID = ITEM_YELLOW_BERRY, + .pos = { -346, 72, -114 }, + .spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, + .spawnFlag = AF_FLO_TreeDrop_YellowBerry2, + }, + } +}; + +ShakeTreeConfig N(ShakeTree_Tree1) = { + .leaves = &N(Tree1_LeafModels), + .trunk = &N(Tree1_TrunkModels), + .drops = &N(Tree1_Drops), +}; + +BombTrigger N(BombPos_Tree1) = { + .pos = { -388.0f, 0.0f, -92.0f }, + .radius = 0.0f +}; + +EvtScript N(EVS_SetupFoliage) = { + EVT_SET(AF_FLO_TreeDrop_YellowBerry1, FALSE) + EVT_SET(AF_FLO_TreeDrop_YellowBerry2, FALSE) + EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o42, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_flo/flo_25/flo_25_6_vine.c b/src/world/area_flo/flo_25/flo_25_6_vine.c new file mode 100644 index 0000000000..ebed1f933d --- /dev/null +++ b/src/world/area_flo/flo_25/flo_25_6_vine.c @@ -0,0 +1,17 @@ +#include "flo_25.h" + +// unused extra import for flower-spawning regions +#define NAMESPACE flo_25_vines +#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c" +#define NAMESPACE flo_25 + +#include "world/common/atomic/flo_DroppingVine.inc.c" + +EvtScript N(EVS_SetupVines) = { + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o111, MODEL_o112, MODEL_o113, MODEL_o114) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o101, MODEL_o102, MODEL_o103, MODEL_o104) + EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o105, MODEL_o106, MODEL_o107, MODEL_o108) + EVT_DROPPING_VINE(ITEM_NONE, MODEL_o130, MODEL_o131, MODEL_o132, MODEL_o133) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_iwa/iwa_02/iwa_02_3_npc.c b/src/world/area_iwa/iwa_02/iwa_02_3_npc.c index d0c98dcbfc..4831fc6941 100644 --- a/src/world/area_iwa/iwa_02/iwa_02_3_npc.c +++ b/src/world/area_iwa/iwa_02/iwa_02_3_npc.c @@ -191,8 +191,8 @@ StaticNpc N(NpcData_Bubulb) = { .yaw = 270, .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING, .init = &N(EVS_NpcInit_Bubulb), - .drops = BULBULB_DROPS, - .animations = BULBULB_PURPLE_ANIMS, + .drops = BUBULB_DROPS, + .animations = BUBULB_PURPLE_ANIMS, .tattle = MSG_NpcTattle_IWA_Bubulb_Revealed, }; diff --git a/src/world/area_iwa/iwa_10/iwa_10_1_music.c b/src/world/area_iwa/iwa_10/iwa_10_1_music.c index b8cc0361be..3467445372 100644 --- a/src/world/area_iwa/iwa_10/iwa_10_1_music.c +++ b/src/world/area_iwa/iwa_10/iwa_10_1_music.c @@ -8,7 +8,7 @@ EvtScript N(EVS_SetupMusic) = { EvtScript N(EVS_PushSong) = { EVT_CALL(StopSound, SOUND_80000009) - EVT_CALL(PushSong, 130, 0) + EVT_CALL(PushSong, SONG_NEW_PARTNER, 0) EVT_RETURN EVT_END }; diff --git a/src/world/area_jan/jan_00/jan_00_1_main.c b/src/world/area_jan/jan_00/jan_00_1_main.c index cad115314f..38f4b5c87f 100644 --- a/src/world/area_jan/jan_00/jan_00_1_main.c +++ b/src/world/area_jan/jan_00/jan_00_1_main.c @@ -14,7 +14,7 @@ extern EvtScript N(EVS_80247A2C); #include "world/common/atomic/TexturePan.data.inc.c" API_CALLABLE(func_8024030C_B2084C) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/area_jan/jan_01/B28030.c b/src/world/area_jan/jan_01/B28030.c index a3e4778f38..33ef9e5bb0 100644 --- a/src/world/area_jan/jan_01/B28030.c +++ b/src/world/area_jan/jan_01/B28030.c @@ -7,7 +7,7 @@ static char* N(exit_str_1) = "jan_02"; #include "world/common/atomic/TexturePan.inc.c" ApiStatus func_8024030C_B2833C(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/area_jan/jan_02/B2C4A0.c b/src/world/area_jan/jan_02/B2C4A0.c index 3f1e76e954..333a270d6e 100644 --- a/src/world/area_jan/jan_02/B2C4A0.c +++ b/src/world/area_jan/jan_02/B2C4A0.c @@ -29,6 +29,6 @@ ApiStatus func_80240360_B2C7D0(Evt* script, s32 isInitialCall) { } ApiStatus func_802403F8_B2C868(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index 022982297a..301e73ca15 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -13,7 +13,7 @@ static char* N(exit_str_3) = ""; #include "world/common/atomic/TexturePan.inc.c" ApiStatus func_802405EC_B351BC(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/area_jan/jan_11/B70860.c b/src/world/area_jan/jan_11/B70860.c index fc27d45389..fc5b8620e7 100644 --- a/src/world/area_jan/jan_11/B70860.c +++ b/src/world/area_jan/jan_11/B70860.c @@ -7,4 +7,4 @@ static char* N(exit_str_1) = ""; #include "world/common/entity/Pipe.inc.c" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" diff --git a/src/world/area_kmr/kmr_04/kmr_04_1_music.c b/src/world/area_kmr/kmr_04/kmr_04_1_music.c index 369ea8ae11..e3c9351118 100644 --- a/src/world/area_kmr/kmr_04/kmr_04_1_music.c +++ b/src/world/area_kmr/kmr_04/kmr_04_1_music.c @@ -13,7 +13,7 @@ EvtScript N(EVS_SetJrTroopaMusic) = { }; EvtScript N(EVS_PushPopMusic) = { - EVT_CALL(PushSong, 66, 0) + EVT_CALL(PushSong, SONG_ITEM_UPGRADE, 0) EVT_WAIT(130) EVT_CALL(PopSong) EVT_RETURN diff --git a/src/world/area_kmr/kmr_23/kmr_23_2_npc.c b/src/world/area_kmr/kmr_23/kmr_23_2_npc.c index 819616ce20..3554596db0 100644 --- a/src/world/area_kmr/kmr_23/kmr_23_2_npc.c +++ b/src/world/area_kmr/kmr_23/kmr_23_2_npc.c @@ -401,8 +401,81 @@ API_CALLABLE(N(ShowMessagesBehindCurtains)) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "world/area_kmr/kmr_23/907A40", func_80240DA4_9087D4); +#ifdef NON_MATCHING +void func_80240DA4_9087D4(void) { + s32 fullWidth = 226; + s32 fullHeight = 70; + s32 baseX = 47; + s32 baseY = 100; + EndChapter* data = evt_get_variable(NULL, MapVar(0)); + + switch (D_802417C8_9091F8) { + case 0: + if (data->unk1E != 0) { + D_802417C8_9091F8 = 1; + } + break; + case 1: + D_802417CC_9091FC += 20; + D_802417D0_909200 += 5; + if (D_802417CC_9091FC >= fullWidth) { + D_802417CC_9091FC = fullWidth; + } + if (D_802417D0_909200 >= fullHeight) { + D_802417D0_909200 = fullHeight; + } + if (D_802417CC_9091FC == fullWidth) { + if (D_802417D0_909200 == fullHeight) { + D_802417C8_9091F8 = 2; + } + } + break; + case 2: + if (data->unk1E == 0) { + D_802417C8_9091F8 = 3; + } + break; + case 3: + D_802417CC_9091FC -= 20; + D_802417D0_909200 -= 5; + if (D_802417CC_9091FC < 0) { + D_802417CC_9091FC = 0; + } + if (D_802417D0_909200 < 0) { + D_802417D0_909200 = 0; + } + if (D_802417CC_9091FC == 0) { + if (D_802417D0_909200 == 0) { + D_802417C8_9091F8 = 4; + } + break; + } + break; + case 4: + break; + } + + if (D_802417CC_9091FC != 0 && D_802417D0_909200 != 0) { + f32 ulx = baseX + (fullWidth * 0.5) - (D_802417CC_9091FC * 0.5); + f32 uly = baseY + (fullHeight * 0.5) - (D_802417D0_909200 * 0.5); + f32 lrx = baseX + (fullWidth * 0.5) + (D_802417CC_9091FC * 0.5); + f32 lry = baseY + (fullHeight * 0.5) + (D_802417D0_909200 * 0.5); + gDPSetScissorFrac(gMasterGfxPos++, G_SC_NON_INTERLACE, + ulx * 4.0f, + uly * 4.0f, // casting this to s8 is wrong, but fixes v0/v1 regalloc + lrx * 4.0f, + lry * 4.0f); + draw_box(4, &D_802417D8_909208, + baseX + (fullWidth * 0.5) - (D_802417CC_9091FC * 0.5), + baseY + (fullHeight * 0.5) - (D_802417D0_909200 * 0.5), + 0, D_802417CC_9091FC, D_802417D0_909200, + 180, 0, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL); + } +} +#else +INCLUDE_ASM(s32, "world/area_kmr/kmr_23/kmr_23_2_npc", func_80240DA4_9087D4); MAP_DATA_SECTION_START +#endif EvtScript N(EVS_Scene_EndOfChapter) = { EVT_THREAD diff --git a/src/world/area_kzn/kzn_19/kzn_19.h b/src/world/area_kzn/kzn_19/kzn_19.h index 9ca8525a43..e99892f7e9 100644 --- a/src/world/area_kzn/kzn_19/kzn_19.h +++ b/src/world/area_kzn/kzn_19/kzn_19.h @@ -32,7 +32,7 @@ extern EvtScript N(EVS_MakeEntities); extern NpcGroupList N(BossNPCs); extern NpcGroupList N(EscapeNPCs); -extern EvtScript N(EVS_TryingSpawningStarCard); +extern EvtScript N(EVS_TrySpawningStarCard); extern StaticAnimatorNode* N(AnimModel_MainHeadVine)[]; extern StaticAnimatorNode* N(AnimModel_SideHeadVine)[]; extern StaticAnimatorNode* N(AnimModel_ExtraVine)[]; diff --git a/src/world/area_kzn/kzn_19/kzn_19_2_main.c b/src/world/area_kzn/kzn_19/kzn_19_2_main.c index 3bc24c6f3a..8adac649e6 100644 --- a/src/world/area_kzn/kzn_19/kzn_19_2_main.c +++ b/src/world/area_kzn/kzn_19/kzn_19_2_main.c @@ -4,7 +4,7 @@ #include "world/common/todo/StarSpiritEffectFunc.inc.c" -EvtScript N(EVS_TryingSpawningStarCard) = { +EvtScript N(EVS_TrySpawningStarCard) = { // determine if card should be spawned EVT_SWITCH(GB_StoryProgress) EVT_CASE_EQ(STORY_CH5_KOLORADO_IN_TREASURE_ROOM) @@ -28,13 +28,7 @@ EvtScript N(EVS_TryingSpawningStarCard) = { EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 185, 110, -30) EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.44)) EVT_CALL(SetPanTarget, CAM_DEFAULT, 185, 55, -30) - EVT_CALL(GetCamDistance, CAM_DEFAULT, LVar1) - EVT_SUB(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_IF_NE(10000, 10000) - EVT_CALL(GetCamPitch, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar2, 10000) - EVT_END_IF + EVT_SPIRIT_ADJUST_CAM(10000) EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) EVT_CALL(N(StarSpiritEffectFunc2), 4, 180, 304, 15, -54, 185, 110, -30, 55, 25) EVT_THREAD @@ -219,7 +213,7 @@ EvtScript N(EVS_Main) = { EVT_EXEC(N(EVS_SetupMusic)) EVT_EXEC(N(EVS_UpdateLavaWaves)) EVT_EXEC(N(EVS_UpdateEruption)) - EVT_EXEC(N(EVS_TryingSpawningStarCard)) + EVT_EXEC(N(EVS_TrySpawningStarCard)) EVT_RETURN EVT_END }; diff --git a/src/world/area_kzn/kzn_19/kzn_19_4_npc.c b/src/world/area_kzn/kzn_19/kzn_19_4_npc.c index cc877c9aea..9433c45429 100644 --- a/src/world/area_kzn/kzn_19/kzn_19_4_npc.c +++ b/src/world/area_kzn/kzn_19/kzn_19_4_npc.c @@ -401,7 +401,7 @@ EvtScript N(EVS_Kolorado_Escape) = { EVT_CALL(SetNpcAux, NPC_LavaPiranhaHead, 0) EVT_WAIT(10) EVT_CALL(FadeOutMusic, 0, 1500) - EVT_EXEC(N(EVS_TryingSpawningStarCard)) + EVT_EXEC(N(EVS_TrySpawningStarCard)) EVT_WAIT(30) EVT_CALL(DisablePlayerInput, FALSE) EVT_RETURN diff --git a/src/world/area_mgm/mgm_00/mgm_00_1_main.c b/src/world/area_mgm/mgm_00/mgm_00_1_main.c index 0d1f279d78..b523b7dee4 100644 --- a/src/world/area_mgm/mgm_00/mgm_00_1_main.c +++ b/src/world/area_mgm/mgm_00/mgm_00_1_main.c @@ -33,15 +33,8 @@ EvtScript N(EVS_GotoMap_JumpAttack) = { EVT_END }; -EvtScript N(EVS_OnEnterPipe_JumpAttack) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_SET(LVarA, mgm_00_ENTRY_1) - EVT_SET(LVarB, COLLIDER_deili2) - EVT_SET(LVarC, EVT_PTR(N(EVS_GotoMap_JumpAttack))) - EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical)) - EVT_RETURN - EVT_END -}; +EvtScript N(EVS_OnEnterPipe_JumpAttack) = EVT_EXIT_PIPE_VERTICAL( + mgm_00_ENTRY_1, COLLIDER_deili2, N(EVS_GotoMap_JumpAttack)); EvtScript N(EVS_GotoMap_SmashAttack) = { EVT_CALL(GotoMap, EVT_PTR("mgm_02"), mgm_02_ENTRY_0) diff --git a/src/world/area_mgm/mgm_01/mgm_01_2_npc.c b/src/world/area_mgm/mgm_01/mgm_01_2_npc.c index 6f4f5ce964..abd4259272 100644 --- a/src/world/area_mgm/mgm_01/mgm_01_2_npc.c +++ b/src/world/area_mgm/mgm_01/mgm_01_2_npc.c @@ -987,7 +987,7 @@ EvtScript N(EVS_NpcInteract_Toad) = { EVT_CALL(N(CreateBlockEntities)) EVT_WAIT(10) EVT_CALL(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) - EVT_CALL(PushSong, 133, 0) + EVT_CALL(PushSong, SONG_PLAYROOM, 0) EVT_WAIT(10) EVT_CALL(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) EVT_CALL(N(DisableMenus)) diff --git a/src/world/area_mgm/mgm_02/mgm_02_2_npc.c b/src/world/area_mgm/mgm_02/mgm_02_2_npc.c index bc953b114f..93d915d8a6 100644 --- a/src/world/area_mgm/mgm_02/mgm_02_2_npc.c +++ b/src/world/area_mgm/mgm_02/mgm_02_2_npc.c @@ -1764,7 +1764,7 @@ EvtScript N(EVS_NpcInteract_Toad) = { EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, 355, 30, -180) EVT_END_THREAD EVT_CALL(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) - EVT_CALL(PushSong, 133, 0) + EVT_CALL(PushSong, SONG_PLAYROOM, 0) EVT_WAIT(8) EVT_CALL(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) EVT_CALL(EnablePartnerAI) diff --git a/src/world/area_mim/mim_04/mim_04_6_npc.c b/src/world/area_mim/mim_04/mim_04_6_npc.c index 8118f388c2..59d2c3afdf 100644 --- a/src/world/area_mim/mim_04/mim_04_6_npc.c +++ b/src/world/area_mim/mim_04/mim_04_6_npc.c @@ -84,8 +84,8 @@ StaticNpc N(NpcData_Bubulb) = { .yaw = 270, .flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING, .init = &N(EVS_NpcInit_Bubulb), - .drops = BULBULB_DROPS, - .animations = BULBULB_GREEN_ANIMS, + .drops = BUBULB_DROPS, + .animations = BUBULB_GREEN_ANIMS, .tattle = MSG_NpcTattle_MIM_Bubulb_Revealed, }; diff --git a/src/world/area_mim/mim_07/mim_07_6_npc.c b/src/world/area_mim/mim_07/mim_07_6_npc.c index d73dde146f..afde27e6f6 100644 --- a/src/world/area_mim/mim_07/mim_07_6_npc.c +++ b/src/world/area_mim/mim_07/mim_07_6_npc.c @@ -67,7 +67,7 @@ EvtScript N(EVS_NpcIdle_JrTroopa) = { EVT_END_IF EVT_CALL(DisablePlayerInput, TRUE) EVT_CALL(GetCurrentPartner, LVar0) - EVT_IF_NE(LVar0, 0) + EVT_IF_NE(LVar0, PARTNER_NONE) EVT_CALL(InterruptUsePartner) EVT_WAIT(20) EVT_END_IF diff --git a/src/world/area_omo/omo_13/DE2710.c b/src/world/area_omo/omo_13/DE2710.c index 870ad31565..a267590762 100644 --- a/src/world/area_omo/omo_13/DE2710.c +++ b/src/world/area_omo/omo_13/DE2710.c @@ -31,7 +31,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240F00_DE3390); INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240F54_DE33E4); -extern s32 flo_10_npcSettings_80243220[]; +extern s32 omo_13_80243220[]; ApiStatus func_80240F8C_DE341C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -40,13 +40,13 @@ ApiStatus func_80240F8C_DE341C(Evt* script, s32 isInitialCall) { if (ptr != NULL) { for (i = 0; ptr[i] != 0; i++) { - flo_10_npcSettings_80243220[i] = ptr[i]; + omo_13_80243220[i] = ptr[i]; } - flo_10_npcSettings_80243220[i] = 0; + omo_13_80243220[i] = 0; } else { for (i = 0; i < 91; i++) { - flo_10_npcSettings_80243220[i] = i + 128; - flo_10_npcSettings_80243220[91] = 0; + omo_13_80243220[i] = i + 128; + omo_13_80243220[91] = 0; } } return ApiStatus_DONE2; diff --git a/src/world/area_osr/osr_00/AAC830.c b/src/world/area_osr/osr_00/AAC830.c index 45c69f2866..4e471539d7 100644 --- a/src/world/area_osr/osr_00/AAC830.c +++ b/src/world/area_osr/osr_00/AAC830.c @@ -9,7 +9,7 @@ static char* N(exit_str_3) = "kkj_00\0"; #include "world/common/atomic/TexturePan.inc.c" ApiStatus func_8024030C_AACB3C(Evt* script, s32 isInitialCall) { - fx_sun(1, 0.0f, 0.0f, 0.0f, 0.0f, 0); + fx_sun(FX_SUN_FROM_RIGHT, 0.0f, 0.0f, 0.0f, 0.0f, 0); return ApiStatus_DONE2; } diff --git a/src/world/area_sbk/sbk_02/sbk_02_4_npc.c b/src/world/area_sbk/sbk_02/sbk_02_4_npc.c index 690f3bf2e9..2b23a9b19f 100644 --- a/src/world/area_sbk/sbk_02/sbk_02_4_npc.c +++ b/src/world/area_sbk/sbk_02/sbk_02_4_npc.c @@ -28,11 +28,9 @@ EvtScript N(EVS_NpcIdle_Mamar) = { }; API_CALLABLE(N(UpgradeStarPower)) { - PlayerData* playerData = &gPlayerData; - set_max_SP(2); - playerData->curHP = playerData->curMaxHP; - playerData->curFP = playerData->curMaxFP; + gPlayerData.curHP = gPlayerData.curMaxHP; + gPlayerData.curFP = gPlayerData.curMaxFP; sync_status_menu(); return ApiStatus_DONE2; } diff --git a/src/world/area_tik/tik.h b/src/world/area_tik/tik.h index ff07d14987..3cbb29527e 100644 --- a/src/world/area_tik/tik.h +++ b/src/world/area_tik/tik.h @@ -22,4 +22,27 @@ enum { #define AF_TIK(index) AreaFlag(index) +extern MapSettings tik_01_settings; +extern MapSettings tik_02_settings; +extern MapSettings tik_03_settings; +extern MapSettings tik_04_settings; +extern MapSettings tik_05_settings; +extern MapSettings tik_06_settings; +extern MapSettings tik_07_settings; +extern MapSettings tik_08_settings; +extern MapSettings tik_09_settings; +extern MapSettings tik_10_settings; +extern MapSettings tik_12_settings; +extern MapSettings tik_14_settings; +extern MapSettings tik_15_settings; +extern MapSettings tik_17_settings; +extern MapSettings tik_18_settings; +extern MapSettings tik_19_settings; +extern MapSettings tik_20_settings; +extern MapSettings tik_21_settings; +extern MapSettings tik_22_settings; +extern MapSettings tik_23_settings; +extern MapSettings tik_24_settings; +extern MapSettings tik_25_settings; + #endif diff --git a/src/world/area_tik/tik_01/869AA0.c b/src/world/area_tik/tik_01/869AA0.c index 8af880fb5c..b4d02eeec6 100644 --- a/src/world/area_tik/tik_01/869AA0.c +++ b/src/world/area_tik/tik_01/869AA0.c @@ -1,5 +1,5 @@ #include "tik_01.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" #include "world/common/todo/SetEntityPosition.inc.c" diff --git a/src/world/area_tik/tik_02/86CD10.c b/src/world/area_tik/tik_02/86CD10.c index 94c8929b62..af91f70dca 100644 --- a/src/world/area_tik/tik_02/86CD10.c +++ b/src/world/area_tik/tik_02/86CD10.c @@ -1,6 +1,6 @@ #include "tik_02.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" extern s16 D_80241BAE_86E2EE[0][2]; // length unk diff --git a/src/world/area_tik/tik_03/86F0F0.c b/src/world/area_tik/tik_03/86F0F0.c index 89a3ea6950..e954910c73 100644 --- a/src/world/area_tik/tik_03/86F0F0.c +++ b/src/world/area_tik/tik_03/86F0F0.c @@ -1,7 +1,7 @@ #include "tik_03.h" #include "world/partners.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" extern s32 D_80242EBC_8719BC; extern s32 D_80242930_871430[4]; diff --git a/src/world/area_tik/tik_04/872020.c b/src/world/area_tik/tik_04/872020.c index d17b2b6cd8..cca2f7b378 100644 --- a/src/world/area_tik/tik_04/872020.c +++ b/src/world/area_tik/tik_04/872020.c @@ -1,7 +1,7 @@ #include "tik_04.h" #include "mapfs/tik_04_hit.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" ApiStatus func_80240960_872390(Evt* script, s32 isInitialCall) { Model* model1; diff --git a/src/world/area_tik/tik_05/8750D0.c b/src/world/area_tik/tik_05/8750D0.c index 58b317cfc3..42efa42653 100644 --- a/src/world/area_tik/tik_05/8750D0.c +++ b/src/world/area_tik/tik_05/8750D0.c @@ -3,7 +3,7 @@ #include "effects.h" #include "functions.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" #include "world/common/todo/StashVars.inc.c" diff --git a/src/world/area_tik/tik_06/876EE0.c b/src/world/area_tik/tik_06/876EE0.c deleted file mode 100644 index 82d6e4731c..0000000000 --- a/src/world/area_tik/tik_06/876EE0.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "tik_06.h" - -static char* N(exit_str_0) = "tik_01"; -static char* N(exit_str_1) = "tik_18"; -static char* N(exit_str_2) = "mac_02"; -static char* N(exit_str_3) = "tik_08"; -static char* N(exit_str_4) = "tik_08\0"; -static char* N(exit_str_5) = ""; - -#include "world/common/entity/Pipe.inc.c" - -#include "world/common/atomic/TexturePan.inc.c" - diff --git a/src/world/area_tik/tik_06/8774D0.c b/src/world/area_tik/tik_06/8774D0.c deleted file mode 100644 index c709026436..0000000000 --- a/src/world/area_tik/tik_06/8774D0.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "tik_06.h" - -#include "world/common/todo/UnkPosFunc2.inc.c" diff --git a/src/world/area_tik/tik_06/tik_06.h b/src/world/area_tik/tik_06/tik_06.h index bb735ce4c4..220c5f39a6 100644 --- a/src/world/area_tik/tik_06/tik_06.h +++ b/src/world/area_tik/tik_06/tik_06.h @@ -2,8 +2,16 @@ /// @brief Toad Town Tunnels - Sewer Entrance (B1) #include "common.h" -#include "../tik.h" #include "message_ids.h" #include "map.h" +#include "../tik.h" +#include "mapfs/tik_06_shape.h" +#include "mapfs/tik_06_hit.h" + #define NAMESPACE tik_06 + +extern EvtScript N(EVS_Main); +extern EvtScript N(EVS_SetupMusic); +extern EvtScript N(EVS_SetupDrips); +extern EvtScript N(EVS_MakeEntities); diff --git a/src/world/area_tik/tik_06/tik_06_0_header.c b/src/world/area_tik/tik_06/tik_06_0_header.c new file mode 100644 index 0000000000..7aedde253b --- /dev/null +++ b/src/world/area_tik/tik_06/tik_06_0_header.c @@ -0,0 +1,15 @@ +#include "tik_06.h" + +EntryList N(Entrances) = { + [tik_06_ENTRY_0] { -520.0, -10.0, 0.0, 90.0 }, + [tik_06_ENTRY_1] { 170.0, -10.0, 0.0, 270.0 }, + [tik_06_ENTRY_2] { -500.0, 90.0, -90.0, 90.0 }, + [tik_06_ENTRY_3] { -244.0, -10.0, -110.0, 90.0 }, +}; + +MapSettings N(settings) = { + .main = &N(EVS_Main), + .entryList = &N(Entrances), + .entryCount = ENTRY_COUNT(N(Entrances)), + .tattle = { MSG_MapTattle_tik_06 }, +}; diff --git a/src/world/area_tik/tik_06/tik_06_1_music.c b/src/world/area_tik/tik_06/tik_06_1_music.c new file mode 100644 index 0000000000..fe33bf8087 --- /dev/null +++ b/src/world/area_tik/tik_06/tik_06_1_music.c @@ -0,0 +1,7 @@ +#include "tik_06.h" + +EvtScript N(EVS_SetupMusic) = { + EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_tik/tik_06/tik_06_2_main.c b/src/world/area_tik/tik_06/tik_06_2_main.c new file mode 100644 index 0000000000..2d354025a0 --- /dev/null +++ b/src/world/area_tik/tik_06/tik_06_2_main.c @@ -0,0 +1,116 @@ +#include "tik_06.h" + +#include "world/common/entity/Pipe.inc.c" +#include "world/common/entity/Pipe.data.inc.c" + +#include "world/common/atomic/TexturePan.inc.c" +#include "world/common/atomic/TexturePan.data.inc.c" + +EvtScript N(EVS_ExitWalk_tik_01_0) = EVT_EXIT_WALK(60, tik_06_ENTRY_0, "tik_01", tik_01_ENTRY_0); +EvtScript N(EVS_ExitWalk_tik_18_0) = EVT_EXIT_WALK(60, tik_06_ENTRY_1, "tik_18", tik_18_ENTRY_0); + +EvtScript N(EVS_GotoMap_mac_02_4) = { + EVT_CALL(GotoMap, EVT_PTR("mac_02"), mac_02_ENTRY_4) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_OnEnterPipe_Upward) = EVT_EXIT_PIPE_HORIZONTAL(tik_06_ENTRY_3, + COLLIDER_o89, N(EVS_GotoMap_mac_02_4)); + +EvtScript N(EVS_GotoMap_tik_08_3) = { + EVT_CALL(GotoMap, EVT_PTR("tik_08"), tik_08_ENTRY_3) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_OnEnterPipe_Downward) = EVT_EXIT_PIPE_VERTICAL(tik_06_ENTRY_2, + COLLIDER_o57, N(EVS_GotoMap_tik_08_3)); + +EvtScript N(EVS_BindExitTriggers) = { + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe_Upward)), TRIGGER_WALL_PUSH, COLLIDER_o89, 1, 0) + EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe_Downward)), TRIGGER_FLOOR_TOUCH, COLLIDER_o57, 1, 0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_EnterMap) = { + EVT_CALL(GetLoadType, LVar1) + EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) + EVT_EXEC(EnterSavePoint) + EVT_EXEC(N(EVS_BindExitTriggers)) + EVT_RETURN + EVT_END_IF + EVT_CALL(GetEntryID, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(tik_06_ENTRY_2) + EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(N(EVS_Pipe_EnterVertical)) + EVT_CASE_EQ(tik_06_ENTRY_3) + EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_SET(LVarB, COLLIDER_o89) + EVT_EXEC(N(EVS_Pipe_EnterHorizontal)) + EVT_CASE_DEFAULT + EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) + EVT_EXEC(EnterWalk) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_Main) = { + EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + EVT_CALL(SetSpriteShading, SHADING_TIK_06) + EVT_SETUP_CAMERA_NO_LEAD() + EVT_SET(GF_MAP_ToadTownTunnels, TRUE) + EVT_EXEC_WAIT(N(EVS_MakeEntities)) + EVT_EXEC(N(EVS_SetupMusic)) + EVT_CALL(PlaySound, SOUND_8000002F) + EVT_CALL(PlaySoundAtF, SOUND_80000030, 1, -85, -180, 120) + EVT_CALL(PlaySoundAtF, SOUND_80000031, 1, -25, -140, -130) + EVT_CALL(PlaySoundAtF, SOUND_80000032, 1, -35, -180, 130) + EVT_EXEC(N(EVS_SetupDrips)) + EVT_CALL(EnableTexPanning, MODEL_nagare1, TRUE) + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_1) + TEX_PAN_PARAMS_STEP( 50, 200, 110, 500) + TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_CALL(EnableTexPanning, MODEL_mizu, TRUE) + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_2) + TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) + TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_CALL(EnableTexPanning, MODEL_mizu2, TRUE) + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_3) + TEX_PAN_PARAMS_STEP( 0, -250, -100, -500) + TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_CALL(EnableTexPanning, MODEL_taki, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o72, TRUE) + EVT_CALL(EnableTexPanning, MODEL_o73, TRUE) + EVT_THREAD + TEX_PAN_PARAMS_ID(TEX_PANNER_4) + TEX_PAN_PARAMS_STEP( -50, -900, -70,-1200) + TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) + TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) + EVT_EXEC(N(EVS_UpdateTexturePan)) + EVT_END_THREAD + EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE) + EVT_EXEC(N(EVS_EnterMap)) + EVT_WAIT(1) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_tik/tik_06/tik_06_3_drips.c b/src/world/area_tik/tik_06/tik_06_3_drips.c new file mode 100644 index 0000000000..f638d5bfda --- /dev/null +++ b/src/world/area_tik/tik_06/tik_06_3_drips.c @@ -0,0 +1,32 @@ +#include "tik_06.h" + +#include "world/common/atomic/tik_DripVolumes.inc.c" + +DripVolumeList N(DripVolumes) = { + .count = 2, + .volumes = { + { + .minPos = { -512, -14 }, + .maxPos = { 173, 84 }, + .startY = 200, + .endY = -10, + .duration = 60, + .density = 2, + }, + { + .minPos = { 63, -105 }, + .maxPos = { 103, 182 }, + .startY = 200, + .endY = -10, + .duration = 60, + .density = 1, + }, + } +}; + +EvtScript N(EVS_SetupDrips) = { + EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) + EVT_EXEC(N(EVS_CreateDripVolumes)) + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_tik/tik_06/tik_06_4_entity.c b/src/world/area_tik/tik_06/tik_06_4_entity.c new file mode 100644 index 0000000000..68c085bfc1 --- /dev/null +++ b/src/world/area_tik/tik_06/tik_06_4_entity.c @@ -0,0 +1,72 @@ +#include "tik_06.h" +#include "entity.h" + +EvtScript N(EVS_MonitorPlayerFallDown) = { + EVT_LABEL(0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_WAIT(1) + EVT_IF_GT(LVar0, -230) + EVT_GOTO(0) + EVT_END_IF + EVT_IF_GE(LVar1, -10) + EVT_GOTO(0) + EVT_END_IF + EVT_CALL(func_802CA988, 0, LVar2, LVar3, LVar4, LVar5) + EVT_LABEL(1) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_WAIT(1) + EVT_IF_GT(LVar1, -70) + EVT_GOTO(1) + EVT_END_IF + EVT_CALL(GotoMap, EVT_PTR("tik_08"), tik_08_ENTRY_2) + EVT_WAIT(100) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_OnPound_BoardedFloor) = { + EVT_SET(GF_TIK02_BoardedFloor, TRUE) + EVT_EXEC(N(EVS_MonitorPlayerFallDown)) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_OnSmash_Block1) = { + EVT_SET(GF_TIK02_Hammer1Block, TRUE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o93, COLLIDER_FLAGS_UPPER_MASK) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_OnSmash_Block2) = { + EVT_SET(GF_TIK02_Hammer2Block, TRUE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o90, COLLIDER_FLAGS_UPPER_MASK) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_MakeEntities) = { + EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 120, 50, -75, 0, MAKE_ENTITY_END) + EVT_CALL(EnableModel, MODEL_o49, FALSE) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o49, COLLIDER_FLAGS_UPPER_MASK) + EVT_IF_EQ(GF_TIK02_BoardedFloor, FALSE) + EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), -359, -10, -9, 0, MAKE_ENTITY_END) + EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnPound_BoardedFloor))) + EVT_ELSE + EVT_EXEC(N(EVS_MonitorPlayerFallDown)) + EVT_END_IF + EVT_IF_EQ(GF_TIK02_Hammer1Block, FALSE) + EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1Block), 190, -10, 0, 0, MAKE_ENTITY_END) + EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmash_Block1))) + EVT_ELSE + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o93, COLLIDER_FLAGS_UPPER_MASK) + EVT_END_IF + EVT_IF_EQ(GF_TIK02_Hammer2Block, FALSE) + EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block), -540, -10, 0, 0, MAKE_ENTITY_END) + EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmash_Block2))) + EVT_ELSE + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o90, COLLIDER_FLAGS_UPPER_MASK) + EVT_END_IF + EVT_RETURN + EVT_END +}; diff --git a/src/world/area_tik/tik_07/87AC00.c b/src/world/area_tik/tik_07/87AC00.c index 5fda5b719c..6541e1af44 100644 --- a/src/world/area_tik/tik_07/87AC00.c +++ b/src/world/area_tik/tik_07/87AC00.c @@ -1,6 +1,6 @@ #include "tik_07.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" extern s32 D_802449B0_87E590[4]; diff --git a/src/world/area_tik/tik_08/87F3E0.c b/src/world/area_tik/tik_08/87F3E0.c index aba097ce47..de1db4bd10 100644 --- a/src/world/area_tik/tik_08/87F3E0.c +++ b/src/world/area_tik/tik_08/87F3E0.c @@ -1,5 +1,5 @@ #include "tik_08.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" #include "world/common/todo/SetEntityPosition.inc.c" diff --git a/src/world/area_tik/tik_09/8827B0.c b/src/world/area_tik/tik_09/8827B0.c index 1ba4300780..3bbe192bbf 100644 --- a/src/world/area_tik/tik_09/8827B0.c +++ b/src/world/area_tik/tik_09/8827B0.c @@ -1,5 +1,5 @@ #include "tik_09.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" #include "world/common/todo/SetEntityPosition.inc.c" diff --git a/src/world/area_tik/tik_10/8866D0.c b/src/world/area_tik/tik_10/8866D0.c index b6fa876ed5..5aa265632c 100644 --- a/src/world/area_tik/tik_10/8866D0.c +++ b/src/world/area_tik/tik_10/8866D0.c @@ -1,5 +1,5 @@ #include "tik_10.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" #include "world/common/entity/SuperBlock.inc.c" diff --git a/src/world/area_tik/tik_12/8891C0.c b/src/world/area_tik/tik_12/8891C0.c index 530825bbd4..712be18304 100644 --- a/src/world/area_tik/tik_12/8891C0.c +++ b/src/world/area_tik/tik_12/8891C0.c @@ -1,6 +1,6 @@ #include "tik_12.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" #include "world/common/todo/StashVars.inc.c" diff --git a/src/world/area_tik/tik_14/88DBF0.c b/src/world/area_tik/tik_14/88DBF0.c index 86e53d79d1..22904fe7fb 100644 --- a/src/world/area_tik/tik_14/88DBF0.c +++ b/src/world/area_tik/tik_14/88DBF0.c @@ -1,3 +1,3 @@ #include "tik_14.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" diff --git a/src/world/area_tik/tik_15/890190.c b/src/world/area_tik/tik_15/890190.c index 0414ad994d..d3f6efee60 100644 --- a/src/world/area_tik/tik_15/890190.c +++ b/src/world/area_tik/tik_15/890190.c @@ -1,6 +1,6 @@ #include "tik_15.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" #include "world/common/todo/StashVars.inc.c" diff --git a/src/world/area_tik/tik_18/8959F0.c b/src/world/area_tik/tik_18/8959F0.c index 0e6432c1f2..0c57431a8d 100644 --- a/src/world/area_tik/tik_18/8959F0.c +++ b/src/world/area_tik/tik_18/8959F0.c @@ -1,6 +1,6 @@ #include "tik_18.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" ApiStatus func_80240680_895D60(Evt* script, s32 isInitialCall) { Enemy* enemy = get_enemy_safe(1); diff --git a/src/world/area_tik/tik_20/89A350.c b/src/world/area_tik/tik_20/89A350.c index 6c9b6f1e5c..cb1d01ee84 100644 --- a/src/world/area_tik/tik_20/89A350.c +++ b/src/world/area_tik/tik_20/89A350.c @@ -9,4 +9,4 @@ static char* N(exit_str_3) = ""; #include "world/common/entity/Pipe.inc.c" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" diff --git a/src/world/area_tik/tik_21/89D7A0.c b/src/world/area_tik/tik_21/89D7A0.c index a242fe260b..11c9a0f1bf 100644 --- a/src/world/area_tik/tik_21/89D7A0.c +++ b/src/world/area_tik/tik_21/89D7A0.c @@ -9,4 +9,4 @@ static char* N(exit_str_3) = ""; #include "world/common/entity/Pipe.inc.c" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" diff --git a/src/world/area_tik/tik_22/89FEF0.c b/src/world/area_tik/tik_22/89FEF0.c index 9986122129..884771059b 100644 --- a/src/world/area_tik/tik_22/89FEF0.c +++ b/src/world/area_tik/tik_22/89FEF0.c @@ -9,4 +9,4 @@ ApiStatus func_8024061C_8A04DC(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" diff --git a/src/world/area_tik/tik_23/8A23D0.c b/src/world/area_tik/tik_23/8A23D0.c index b2c3f3bd64..fe407e4410 100644 --- a/src/world/area_tik/tik_23/8A23D0.c +++ b/src/world/area_tik/tik_23/8A23D0.c @@ -7,4 +7,4 @@ static char* N(exit_str_1) = "tik_20"; #include "world/common/atomic/TexturePan.inc.c" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" diff --git a/src/world/area_tik/tik_24/8A5DE0.c b/src/world/area_tik/tik_24/8A5DE0.c index c58e4d648b..e9c01270ce 100644 --- a/src/world/area_tik/tik_24/8A5DE0.c +++ b/src/world/area_tik/tik_24/8A5DE0.c @@ -1,5 +1,5 @@ #include "tik_24.h" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" #include "world/common/enemy/ai/TackleAI.inc.c" diff --git a/src/world/area_tik/tik_25/8A7F80.c b/src/world/area_tik/tik_25/8A7F80.c index cd42e3a55e..282579abf7 100644 --- a/src/world/area_tik/tik_25/8A7F80.c +++ b/src/world/area_tik/tik_25/8A7F80.c @@ -5,4 +5,4 @@ static char* N(exit_str_1) = ""; #include "world/common/atomic/TexturePan.inc.c" -#include "world/common/todo/UnkPosFunc2.inc.c" +#include "world/common/todo/CheckDripCollisionWithNPC.inc.c" diff --git a/src/world/area_trd/trd_00/trd_00_3_npc.c b/src/world/area_trd/trd_00/trd_00_3_npc.c index 70ec57e5ae..c7430df20e 100644 --- a/src/world/area_trd/trd_00/trd_00_3_npc.c +++ b/src/world/area_trd/trd_00/trd_00_3_npc.c @@ -4,11 +4,9 @@ extern EvtScript N(EVS_SetupMusic); API_CALLABLE(N(UpgradeStarPower)) { - PlayerData* playerData = &gPlayerData; - set_max_SP(1); - playerData->curHP = playerData->curMaxHP; - playerData->curFP = playerData->curMaxFP; + gPlayerData.curHP = gPlayerData.curMaxHP; + gPlayerData.curFP = gPlayerData.curMaxFP; sync_status_menu(); return ApiStatus_DONE2; } diff --git a/src/world/area_trd/trd_06/trd_06_0_header.c b/src/world/area_trd/trd_06/trd_06_0_header.c index 1d5d22acd1..b58974e071 100644 --- a/src/world/area_trd/trd_06/trd_06_0_header.c +++ b/src/world/area_trd/trd_06/trd_06_0_header.c @@ -29,7 +29,7 @@ EvtScript N(EVS_SetupMusic) = { }; EvtScript N(EVS_PushSong) = { - EVT_CALL(PushSong, 130, 0) + EVT_CALL(PushSong, SONG_NEW_PARTNER, 0) EVT_RETURN EVT_END }; diff --git a/src/world/area_trd/trd_10/trd_10_1_main.c b/src/world/area_trd/trd_10/trd_10_1_main.c index 7bca6ee8e0..aa172510c9 100644 --- a/src/world/area_trd/trd_10/trd_10_1_main.c +++ b/src/world/area_trd/trd_10/trd_10_1_main.c @@ -33,13 +33,7 @@ EvtScript N(EVS_BossDefeated) = { EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -135, 85, 0) EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) EVT_CALL(SetPanTarget, CAM_DEFAULT, -135, 30, 0) - EVT_CALL(GetCamDistance, CAM_DEFAULT, LVar1) - EVT_SUB(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_IF_NE(10000, 10000) - EVT_CALL(GetCamPitch, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar2, 10000) - EVT_END_IF + EVT_SPIRIT_ADJUST_CAM(10000) EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) EVT_CALL(N(StarSpiritEffectFunc2), 0, 180, -135, 10, 0, -135, 85, 0, 30, 0) EVT_THREAD diff --git a/src/world/common/atomic/flo_DroppingVine.inc.c b/src/world/common/atomic/flo_DroppingVine.inc.c new file mode 100644 index 0000000000..97e4e6f4ea --- /dev/null +++ b/src/world/common/atomic/flo_DroppingVine.inc.c @@ -0,0 +1,73 @@ +#include "common.h" +#include "effects.h" + +API_CALLABLE(N(CheckVineTriggerDist)) { + f32 var1 = script->varTable[0] - script->varTable[3]; + f32 var2 = script->varTable[1] - script->varTable[4]; + f32 var3 = script->varTable[2] - script->varTable[5]; + + script->varTable[0] = SQ(var1) + SQ(var2) + SQ(var3) < SQ(60.0f); + + return ApiStatus_DONE2; +} + +EvtScript N(EVS_DroppingVine) = { + EVT_SET(LVar9, LVar6) + EVT_SET(LVar8, LVar5) + EVT_SET(LVar7, LVar4) + EVT_SET(LVar6, LVar3) + EVT_SET(LVar5, LVar2) + EVT_SET(LVar4, LVar1) + EVT_SET(LVar3, LVar0) + EVT_CALL(EnableModel, LVar6, FALSE) + EVT_LABEL(0) + EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + EVT_CALL(N(CheckVineTriggerDist)) + EVT_IF_EQ(LVar0, 0) + EVT_WAIT(1) + EVT_GOTO(0) + EVT_END_IF + EVT_THREAD + EVT_WAIT(5) + EVT_CALL(EnableModel, LVar6, TRUE) + EVT_END_THREAD + EVT_IF_NE(LVarA, 0) + EVT_THREAD + EVT_WAIT(5) + EVT_SET(LVar0, LVar3) + EVT_SET(LVar1, LVar4) + EVT_SET(LVar2, LVar5) + EVT_ADD(LVar1, 10) + EVT_ADD(LVar2, 8) + EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 15) + EVT_WAIT(15) + EVT_SUB(LVar1, 10) + EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_FALL, 0) + EVT_END_THREAD + EVT_END_IF + EVT_THREAD + EVT_WAIT(10) + EVT_CALL(PlaySoundAt, SOUND_F8, 0, LVar3, LVar4, LVar5) + EVT_END_THREAD + EVT_CALL(MakeLerp, 0, 180, 20, EASING_CUBIC_IN) + EVT_LABEL(1) + EVT_CALL(UpdateLerp) + EVT_CALL(RotateModel, LVar8, LVar0, 1, 0, 0) + EVT_CALL(RotateModel, LVar9, LVar0, 1, 0, 0) + EVT_IF_EQ(LVar1, 1) + EVT_WAIT(1) + EVT_GOTO(1) + EVT_END_IF + EVT_CALL(EnableModel, LVar7, FALSE) + EVT_RETURN + EVT_END +}; + +#define EVT_DROPPING_VINE(itemID, modelUpperAfter, modelLowerBefore, modelLowerAfter, modelUpperBefore) \ + EVT_CALL(GetModelCenter, modelUpperAfter) \ + EVT_SET(LVar3, modelUpperAfter) \ + EVT_SET(LVar4, modelLowerBefore) \ + EVT_SET(LVar5, modelLowerAfter) \ + EVT_SET(LVar6, modelUpperBefore) \ + EVT_SET(LVarA, itemID) \ + EVT_EXEC(N(EVS_DroppingVine)) diff --git a/src/world/common/atomic/flo_FlowerSpawnRegion.inc.c b/src/world/common/atomic/flo_FlowerSpawnRegion.inc.c new file mode 100644 index 0000000000..796a32afcd --- /dev/null +++ b/src/world/common/atomic/flo_FlowerSpawnRegion.inc.c @@ -0,0 +1,57 @@ +#include "common.h" +#include "effects.h" + +EvtScript N(EVS_FlowerSpawnRegion) = { + EVT_SET_GROUP(EVT_GROUP_0B) + // save input args + EVT_SET(LVarA, LVar0) // minX + EVT_SET(LVarB, LVar1) // minZ + EVT_SET(LVarC, LVar2) // maxX + EVT_SET(LVarD, LVar3) // maxZ + EVT_SET(LVarE, LVar4) // posY + // calculate spawn region size + EVT_SUB(LVarC, LVar0) // sizeX + EVT_SUB(LVarD, LVar1) // sizeZ + // spawnDelay = 11 + (100.0 / (sizeX / 100.0)) + EVT_SETF(LVar0, LVarC) + EVT_DIVF(LVar0, EVT_FLOAT(100.0)) + EVT_SETF(LVarF, EVT_FLOAT(100.0)) + EVT_DIVF(LVarF, LVar0) + EVT_ADD(LVarF, 11) + // initial spawn count = 1 + (200 / spawnDelay) + EVT_SET(LVar5, 200) + EVT_DIV(LVar5, LVarF) + EVT_ADD(LVar5, 1) + // spawn intial flowers + EVT_LOOP(LVar5) + EVT_CALL(RandInt, LVarC, LVar0) + EVT_CALL(RandInt, LVarD, LVar1) + EVT_CALL(RandInt, 199, LVar2) + EVT_SET(LVar3, 210) + EVT_SUB(LVar3, LVar2) + EVT_ADD(LVar0, LVarA) + EVT_ADD(LVar1, LVarB) + EVT_ADD(LVar2, LVarE) + EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, LVar0, LVar2, LVar1, LVar3, 0) + EVT_END_LOOP + EVT_WAIT(LVarF) + // spawn flowers over time + EVT_LABEL(0) + EVT_CALL(RandInt, LVarC, LVar0) + EVT_CALL(RandInt, LVarD, LVar1) + EVT_ADD(LVar0, LVarA) + EVT_ADD(LVar1, LVarB) + EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, LVar0, LVarE, LVar1, 200, 0) + EVT_WAIT(LVarF) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +#define EVT_FLOWER_SPAWN_REGION(minX, minZ, maxX, maxZ, posY) \ + EVT_SET(LVar0, minX) \ + EVT_SET(LVar1, minZ) \ + EVT_SET(LVar2, maxX) \ + EVT_SET(LVar3, maxZ) \ + EVT_SET(LVar4, posY) \ + EVT_EXEC(N(EVS_FlowerSpawnRegion)) diff --git a/src/world/common/atomic/flo_LogBridge.inc.c b/src/world/common/atomic/flo_LogBridge.inc.c new file mode 100644 index 0000000000..7f80a8fca0 --- /dev/null +++ b/src/world/common/atomic/flo_LogBridge.inc.c @@ -0,0 +1,65 @@ +#include "common.h" + +API_CALLABLE(N(GetFloorBelowLog)) { + evt_set_variable(script, *script->ptrReadPos, gCollisionStatus.floorBelow); + return ApiStatus_DONE2; +} + +EvtScript N(EVS_LogBridge) = { + EVT_LOOP(0) + EVT_CALL(N(GetFloorBelowLog), LVar0) + EVT_IF_EQ(LVar0, LVar4) + EVT_CALL(GetPlayerActionState, LVar0) + EVT_IF_NE(LVar0, ACTION_STATE_HIT_LAVA) + EVT_IF_EQ(LVar8, 0) + EVT_THREAD + EVT_CALL(GetModelCenter, LVar5) + EVT_CALL(PlaySoundAt, SOUND_1DB, 0x400000, LVar0, LVar1, LVar2) + EVT_END_THREAD + EVT_END_IF + EVT_IF_LT(LVar7, 90) + EVT_IF_EQ(LVar7, 0) + EVT_WAIT(5) + EVT_SET(LVar8, 6) + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar9, COLLIDER_FLAGS_UPPER_MASK) + EVT_END_IF + EVT_ADD(LVar8, 1) + EVT_ADD(LVar7, LVar8) + EVT_END_IF + EVT_GOTO(50) + EVT_END_IF + EVT_END_IF + EVT_IF_NE(LVar7, 0) + EVT_SUB(LVar8, 1) + EVT_ADD(LVar7, LVar8) + EVT_IF_LE(LVar7, 0) + EVT_SET(LVar8, 0) + EVT_SET(LVar7, 0) + EVT_THREAD + EVT_CALL(GetModelCenter, LVar5) + EVT_CALL(PlaySoundAt, SOUND_1DC, 0, LVar0, LVar1, LVar2) + EVT_END_THREAD + EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, LVar9, COLLIDER_FLAGS_UPPER_MASK) + EVT_END_IF + EVT_END_IF + EVT_LABEL(50) + EVT_IF_GE(LVar7, 90) + EVT_SET(LVar8, -1) + EVT_SET(LVar7, 90) + EVT_END_IF + EVT_CALL(RotateModel, LVar5, LVar7, -1, 0, 0) + EVT_CALL(RotateModel, LVar6, LVar7, -1, 0, 0) + EVT_WAIT(1) + EVT_END_LOOP + EVT_RETURN + EVT_END +}; + +#define EVT_MAKE_LOG_BRIDGE(collider, roofCollider, outsideModel, insideModel, rotAngleVar, rotVelocityVar) \ + EVT_SET(LVar4, collider) \ + EVT_SET(LVar5, outsideModel) \ + EVT_SET(LVar6, insideModel) \ + EVT_SET(LVar7, rotAngleVar) \ + EVT_SET(LVar8, rotVelocityVar) \ + EVT_SET(LVar9, roofCollider) \ + EVT_EXEC(N(EVS_LogBridge)) diff --git a/src/world/common/atomic/tik_DripVolumes.inc.c b/src/world/common/atomic/tik_DripVolumes.inc.c new file mode 100644 index 0000000000..0f9669df45 --- /dev/null +++ b/src/world/common/atomic/tik_DripVolumes.inc.c @@ -0,0 +1,200 @@ +#include "common.h" +#include "npc.h" +#include "model.h" + +API_CALLABLE(N(CheckDripCollisionWithNPC)) { + PlayerStatus* playerStatus = &gPlayerStatus; + Bytecode* args = script->ptrReadPos; + s32 treeIndex = evt_get_variable(script, *args++); + Npc* partner = get_npc_unsafe(NPC_PARTNER); + Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex)); + f32 xDiff, zDiff, yVal; + f32 sqrtTemp; + s32 i; + + script->varTable[2] = 0; + xDiff = playerStatus->position.x - model->center.x; + zDiff = playerStatus->position.z - model->center.z; + yVal = playerStatus->position.y + playerStatus->colliderHeight - 1.5f - model->center.y; + sqrtTemp = sqrtf(SQ(xDiff) + SQ(zDiff)); + + if (yVal > 0.0f && yVal < playerStatus->colliderHeight && sqrtTemp < playerStatus->colliderDiameter * 0.5f) { + script->varTable[2] = 1; + } + + xDiff = partner->pos.x - model->center.x; + zDiff = partner->pos.z - model->center.z; + yVal = partner->pos.y + partner->collisionHeight - 1.5f - model->center.y; + sqrtTemp = sqrtf(SQ(xDiff) + SQ(zDiff)); + + if (yVal > 0.0f && yVal < partner->collisionHeight && sqrtTemp < partner->collisionRadius * 0.5f) { + script->varTable[2] = 1; + } + + for (i = 0; i < MAX_NPCS; i++) { + Npc* npc = get_npc_safe(i); + + if (npc != NULL) { + xDiff = npc->pos.x - model->center.x; + zDiff = npc->pos.z - model->center.z; + yVal = npc->pos.y + npc->collisionHeight - 1.5f - model->center.y; + sqrtTemp = sqrtf(SQ(xDiff) + SQ(zDiff)); + + if (yVal > 0.0f && yVal < npc->collisionHeight && sqrtTemp < npc->collisionRadius * 0.5f) { + script->varTable[2] = 1; + break; + } + } + } + return ApiStatus_DONE2; +} + +EvtScript N(EVS_UpdateDripSplash) = { + EVT_SET(LVar1, ArrayVar(5)) + EVT_ADD(LVar1, 1) + EVT_SET(LVar2, ArrayVar(0)) + EVT_SET(LVar3, ArrayVar(1)) + EVT_SET(LVar4, ArrayVar(5)) + EVT_ADD(LVar4, 2) + EVT_SET(LVar5, ArrayVar(0)) + EVT_SET(LVar6, ArrayVar(1)) + EVT_SET(LVar7, ArrayVar(5)) + EVT_ADD(LVar7, 3) + EVT_SET(LVar8, ArrayVar(0)) + EVT_SET(LVar9, ArrayVar(1)) + EVT_SET(LVarA, ArrayVar(5)) + EVT_ADD(LVarA, 4) + EVT_SET(LVarB, ArrayVar(0)) + EVT_SET(LVarC, ArrayVar(1)) + EVT_CALL(EnableModel, LVar1, TRUE) + EVT_CALL(EnableModel, LVar4, TRUE) + EVT_CALL(EnableModel, LVar7, TRUE) + EVT_CALL(EnableModel, LVarA, TRUE) + EVT_LOOP(5) + EVT_ADD(LVar0, 1) + EVT_ADD(LVar2, 1) + EVT_ADD(LVar3, 1) + EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3) + EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) + EVT_ADD(LVar5, -1) + EVT_ADD(LVar6, 1) + EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6) + EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) + EVT_ADD(LVar8, 1) + EVT_ADD(LVar9, -1) + EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9) + EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) + EVT_ADD(LVarB, -1) + EVT_ADD(LVarC, -1) + EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC) + EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) + EVT_WAIT(1) + EVT_END_LOOP + EVT_LOOP(5) + EVT_ADD(LVar0, -1) + EVT_ADD(LVar2, 1) + EVT_ADD(LVar3, 1) + EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3) + EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) + EVT_ADD(LVar5, -1) + EVT_ADD(LVar6, 1) + EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6) + EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) + EVT_ADD(LVar8, 1) + EVT_ADD(LVar9, -1) + EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9) + EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) + EVT_ADD(LVarB, -1) + EVT_ADD(LVarC, -1) + EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC) + EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) + EVT_WAIT(1) + EVT_END_LOOP + EVT_CALL(EnableModel, LVar1, FALSE) + EVT_CALL(EnableModel, LVar4, FALSE) + EVT_CALL(EnableModel, LVar7, FALSE) + EVT_CALL(EnableModel, LVarA, FALSE) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_UpdateDripVolume) = { + EVT_SET_GROUP(EVT_GROUP_00) + EVT_USE_ARRAY(LVarA) + EVT_SET(LVar5, ArrayVar(5)) + EVT_LOOP(5) + EVT_CALL(CloneModel, MODEL_sizuku, LVar5) + EVT_CALL(TranslateModel, LVar5, ArrayVar(0), ArrayVar(2), ArrayVar(1)) + EVT_ADD(LVar5, 1) + EVT_END_LOOP + EVT_LABEL(0) + EVT_CALL(RandInt, 200, LVar0) + EVT_ADD(LVar0, 50) + EVT_WAIT(LVar0) + EVT_CALL(EnableModel, ArrayVar(5), TRUE) + EVT_CALL(MakeLerp, ArrayVar(2), ArrayVar(3), ArrayVar(4), EASING_QUADRATIC_IN) + EVT_LABEL(1) + EVT_CALL(UpdateLerp) + EVT_CALL(TranslateModel, ArrayVar(5), ArrayVar(0), LVar0, ArrayVar(1)) + EVT_WAIT(1) + EVT_CALL(N(CheckDripCollisionWithNPC), ArrayVar(5)) + EVT_IF_EQ(LVar2, 1) + EVT_GOTO(10) + EVT_END_IF + EVT_IF_EQ(LVar1, 1) + EVT_GOTO(1) + EVT_END_IF + EVT_LABEL(10) + EVT_CALL(EnableModel, ArrayVar(5), FALSE) + EVT_CALL(PlaySound, SOUND_3F6) + EVT_EXEC_WAIT(N(EVS_UpdateDripSplash)) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_CreateDripVolumes) = { + EVT_SET(LVarF, CLONED_MODEL(0)) + EVT_USE_BUF(LVar0) + EVT_BUF_READ1(LVar1) + EVT_LOOP(LVar1) + EVT_BUF_READ4(LVar2, LVar3, LVar4, LVar5) + EVT_BUF_READ3(LVar6, LVar7, LVar8) + EVT_BUF_READ1(LVar9) + EVT_LOOP(LVar9) + EVT_MALLOC_ARRAY(6, LVarA) + EVT_USE_ARRAY(LVarA) + EVT_CALL(RandInt, LVar4, LVarB) + EVT_CALL(RandInt, LVar5, LVarC) + EVT_SET(LVarD, LVar2) + EVT_SET(LVarE, LVar3) + EVT_ADD(LVarD, LVarB) + EVT_ADD(LVarE, LVarC) + EVT_SET(ArrayVar(0), LVarD) + EVT_SET(ArrayVar(1), LVarE) + EVT_SET(ArrayVar(2), LVar6) + EVT_SET(ArrayVar(3), LVar7) + EVT_SET(ArrayVar(4), LVar8) + EVT_SET(ArrayVar(5), LVarF) + EVT_EXEC(N(EVS_UpdateDripVolume)) + EVT_ADD(LVarF, 5) + EVT_END_LOOP + EVT_END_LOOP + EVT_CALL(EnableModel, MODEL_sizuku, FALSE) + EVT_RETURN + EVT_END +}; + +typedef struct DripVolume { + /* 0x00 */ Vec2i minPos; + /* 0x08 */ Vec2i maxPos; + /* 0x10 */ s32 startY; + /* 0x14 */ s32 endY; + /* 0x18 */ s32 duration; + /* 0x1C */ s32 density; +} DripVolume; + +typedef struct DripVolumeList { + /* 0x00 */ s32 count; + /* 0x04 */ DripVolume volumes[0]; +} DripVolumeList; // size = variable diff --git a/src/world/common/complete/KeyItemChoice.inc.c b/src/world/common/complete/KeyItemChoice.inc.c index bf68a7f113..b7eeab0913 100644 --- a/src/world/common/complete/KeyItemChoice.inc.c +++ b/src/world/common/complete/KeyItemChoice.inc.c @@ -53,7 +53,7 @@ EvtScript N(EVS_KeyItemChoicePopup) = { EVT_CALL(RemoveKeyItemAt, LVar1) EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) EVT_CALL(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) - EVT_BITWISE_OR_CONST(LVar0, 0x00050000) + EVT_BITWISE_OR_CONST(LVar0, ITEM_VIS_GROUP(ITEM_NONE, 5)) EVT_CALL(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, ITEM_SPAWN_MODE_DECORATION, 0) EVT_CALL(SetPlayerAnimation, ANIM_Mario_60005) EVT_WAIT(30) diff --git a/src/world/common/complete/NormalItemChoice.inc.c b/src/world/common/complete/NormalItemChoice.inc.c index 2ab7068c8e..1606be48d4 100644 --- a/src/world/common/complete/NormalItemChoice.inc.c +++ b/src/world/common/complete/NormalItemChoice.inc.c @@ -96,9 +96,9 @@ EvtScript N(EVS_ChooseItem) = { EVT_SET(LVar1, 2) \ EVT_EXEC_WAIT(N(EVS_ChooseItem)) -#define EVT_CHOOSE_CONSUMABLE_FROM(itemList) \ +#define EVT_CHOOSE_CONSUMABLE_FROM(itemList, unkMode) \ EVT_SET(LVar0, EVT_PTR(itemList)) \ - EVT_SET(LVar1, 2) \ + EVT_SET(LVar1, unkMode) \ EVT_EXEC_WAIT(N(EVS_ChooseItem)) #endif diff --git a/src/world/common/enemy/ai/FlyingAI.data.inc.c b/src/world/common/enemy/ai/FlyingAI.data.inc.c new file mode 100644 index 0000000000..c8c6955b0f --- /dev/null +++ b/src/world/common/enemy/ai/FlyingAI.data.inc.c @@ -0,0 +1,9 @@ +#ifndef _AI_FLYING_DATA_INC_ +#define _AI_FLYING_DATA_INC_ +#include "common.h" + +f32 N(FlyingAI_JumpVels)[] = { + 4.5, 3.5, 2.6, 2.0, 1.5, 20.0, +}; + +#endif diff --git a/src/world/common/enemy/complete/AmazyDayzee.h b/src/world/common/enemy/complete/AmazyDayzee.h new file mode 100644 index 0000000000..98505be1b5 --- /dev/null +++ b/src/world/common/enemy/complete/AmazyDayzee.h @@ -0,0 +1,37 @@ +#include "common.h" +#include "sprite/npc/Dayzee.h" + +#define AMAZY_DAYZEE_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .itemDropChance = 20, \ + .itemDrops = { \ + { ITEM_HONEY_SYRUP, 24, 0 }, \ + { ITEM_MAPLE_SYRUP, 25, 0 }, \ + { ITEM_JAMMIN_JELLY, 1, 0 }, \ + }, \ + .heartDrops = STANDARD_HEART_DROPS(3), \ + .flowerDrops = STANDARD_FLOWER_DROPS(6), \ + .minCoinBonus = 5, \ + .maxCoinBonus = 8, \ +} + +#define AMAZY_DAYZEE_ANIMS \ +{ \ + .idle = ANIM_Dayzee_Amazy_Anim01, \ + .walk = ANIM_Dayzee_Amazy_Anim02, \ + .run = ANIM_Dayzee_Amazy_Anim03, \ + .chase = ANIM_Dayzee_Amazy_Anim03, \ + .anim_4 = ANIM_Dayzee_Amazy_Anim01, \ + .anim_5 = ANIM_Dayzee_Amazy_Anim01, \ + .death = ANIM_Dayzee_Amazy_Anim08, \ + .hit = ANIM_Dayzee_Amazy_Anim08, \ + .anim_8 = ANIM_Dayzee_Amazy_Anim06, \ + .anim_9 = ANIM_Dayzee_Amazy_Anim07, \ + .anim_A = ANIM_Dayzee_Amazy_Anim01, \ + .anim_B = ANIM_Dayzee_Amazy_Anim01, \ + .anim_C = ANIM_Dayzee_Amazy_Anim01, \ + .anim_D = ANIM_Dayzee_Amazy_Anim01, \ + .anim_E = ANIM_Dayzee_Amazy_Anim01, \ + .anim_F = ANIM_Dayzee_Amazy_Anim01, \ +} diff --git a/src/world/common/enemy/complete/AmazyDayzee.inc.c b/src/world/common/enemy/complete/AmazyDayzee.inc.c new file mode 100644 index 0000000000..8099f34d0a --- /dev/null +++ b/src/world/common/enemy/complete/AmazyDayzee.inc.c @@ -0,0 +1,46 @@ +#include "AmazyDayzee.h" + +#include "world/common/enemy/ai/UnkFloAI.inc.c" + +MobileAISettings N(AISettings_AmazyDayzee) = { + .moveSpeed = 1.5f, + .moveTime = 30, + .waitTime = 30, + .alertRadius = 100.0f, + .alertOffsetDist = 30.0f, + .playerSearchInterval = 3, + .chaseSpeed = 2.4f, + .chaseTurnRate = 15, + .chaseUpdateInterval = 1, + .chaseRadius = 140.0f, + .chaseOffsetDist = 30.0f, + .unk_AI_2C = 1, +}; + +EvtScript N(EVS_NpcAI_AmazyDayzee) = { + EVT_CALL(N(UnkFloAI_Main), EVT_PTR(N(AISettings_AmazyDayzee))) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcAux_AmazyDayzee) = { + EVT_LABEL(0) + EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + EVT_ADD(LVar1, 30) + EVT_SUB(LVar2, 2) + EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 30) + EVT_WAIT(15) + EVT_GOTO(0) + EVT_RETURN + EVT_END +}; + +NpcSettings N(NpcSettings_AmazyDayzee) = { + .height = 30, + .radius = 24, + .level = 100, + .ai = &N(EVS_NpcAI_AmazyDayzee), + .onHit = &EnemyNpcHit, + .aux = &N(EVS_NpcAux_AmazyDayzee), + .onDefeat = &EnemyNpcDefeat, +}; diff --git a/src/world/common/enemy/complete/Bzzap.h b/src/world/common/enemy/complete/Bzzap.h index b1ef10a9cf..5a34391dbf 100644 --- a/src/world/common/enemy/complete/Bzzap.h +++ b/src/world/common/enemy/complete/Bzzap.h @@ -8,6 +8,20 @@ .flowerDrops = NO_DROPS, \ } +#define BZZAP_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .itemDropChance = 15, \ + .itemDrops = { \ + { ITEM_MAPLE_SYRUP, 6, 0 }, \ + { ITEM_HONEY_SYRUP, 4, 0 }, \ + }, \ + .heartDrops = STANDARD_HEART_DROPS(3), \ + .flowerDrops = STANDARD_FLOWER_DROPS(2), \ + .minCoinBonus = 1, \ + .maxCoinBonus = 4, \ +} + #define BZZAP_ANIMS \ { \ .idle = ANIM_Bzzap_Anim02, \ diff --git a/src/world/common/enemy/complete/Bzzap.inc.c b/src/world/common/enemy/complete/Bzzap.inc.c index d63fad6ee4..b4da79e662 100644 --- a/src/world/common/enemy/complete/Bzzap.inc.c +++ b/src/world/common/enemy/complete/Bzzap.inc.c @@ -1,10 +1,7 @@ #include "Bzzap.h" #include "world/common/enemy/ai/FlyingAI.inc.c" - -f32 N(FlyingAI_JumpVels)[] = { - 4.5, 3.5, 2.6, 2.0, 1.5, 20.0, -}; +#include "world/common/enemy/ai/FlyingAI.data.inc.c" MobileAISettings N(AISettings_Bzzap) = { .moveSpeed = 1.0f, diff --git a/src/world/common/enemy/complete/CrazyDayzee.h b/src/world/common/enemy/complete/CrazyDayzee.h new file mode 100644 index 0000000000..fc2117f3f3 --- /dev/null +++ b/src/world/common/enemy/complete/CrazyDayzee.h @@ -0,0 +1,36 @@ +#include "common.h" +#include "sprite/npc/Dayzee.h" + +#define CRAZY_DAYZEE_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .itemDropChance = 15, \ + .itemDrops = { \ + { ITEM_MAPLE_SYRUP, 6, 0 }, \ + { ITEM_HONEY_SYRUP, 4, 0 }, \ + }, \ + .heartDrops = STANDARD_HEART_DROPS(2), \ + .flowerDrops = STANDARD_FLOWER_DROPS(4), \ + .minCoinBonus = 0, \ + .maxCoinBonus = 3, \ +} + +#define CRAZY_DAYZEE_ANIMS \ +{ \ + .idle = ANIM_Dayzee_Anim01, \ + .walk = ANIM_Dayzee_Anim02, \ + .run = ANIM_Dayzee_Anim03, \ + .chase = ANIM_Dayzee_Anim03, \ + .anim_4 = ANIM_Dayzee_Anim01, \ + .anim_5 = ANIM_Dayzee_Anim01, \ + .death = ANIM_Dayzee_Anim08, \ + .hit = ANIM_Dayzee_Anim08, \ + .anim_8 = ANIM_Dayzee_Anim06, \ + .anim_9 = ANIM_Dayzee_Anim07, \ + .anim_A = ANIM_Dayzee_Anim01, \ + .anim_B = ANIM_Dayzee_Anim01, \ + .anim_C = ANIM_Dayzee_Anim01, \ + .anim_D = ANIM_Dayzee_Anim01, \ + .anim_E = ANIM_Dayzee_Anim01, \ + .anim_F = ANIM_Dayzee_Anim01, \ +} diff --git a/src/world/common/enemy/complete/CrazyDayzee.inc.c b/src/world/common/enemy/complete/CrazyDayzee.inc.c new file mode 100644 index 0000000000..ef2bd10df3 --- /dev/null +++ b/src/world/common/enemy/complete/CrazyDayzee.inc.c @@ -0,0 +1,31 @@ +#include "CrazyDayzee.h" + +MobileAISettings N(AISettings_CrazyDayzee) = { + .moveSpeed = 1.0f, + .moveTime = 500, + .waitTime = 10, + .alertRadius = 50.0f, + .alertOffsetDist = 30.0f, + .playerSearchInterval = 3, + .chaseSpeed = 3.5f, + .chaseTurnRate = 40, + .chaseUpdateInterval = 3, + .chaseRadius = 100.0f, + .chaseOffsetDist = 30.0f, + .unk_AI_2C = 1, +}; + +EvtScript N(EVS_NpcAI_CrazyDayzee) = { + EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_CrazyDayzee))) + EVT_RETURN + EVT_END +}; + +NpcSettings N(NpcSettings_CrazyDayzee) = { + .height = 30, + .radius = 24, + .level = 19, + .ai = &N(EVS_NpcAI_CrazyDayzee), + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, +}; diff --git a/src/world/common/enemy/complete/HuffNPuff.h b/src/world/common/enemy/complete/HuffNPuff.h new file mode 100644 index 0000000000..eb469e42b5 --- /dev/null +++ b/src/world/common/enemy/complete/HuffNPuff.h @@ -0,0 +1,29 @@ +#include "common.h" +#include "sprite/npc/HuffNPuff.h" + +#define HUFF_N_PUFF_NO_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .heartDrops = NO_DROPS, \ + .flowerDrops = NO_DROPS, \ +} + +#define HUFF_N_PUFF_ANIMS \ +{ \ + .idle = ANIM_HuffNPuff_Anim01, \ + .walk = ANIM_HuffNPuff_Anim01, \ + .run = ANIM_HuffNPuff_Anim01, \ + .chase = ANIM_HuffNPuff_Anim01, \ + .anim_4 = ANIM_HuffNPuff_Anim01, \ + .anim_5 = ANIM_HuffNPuff_Anim01, \ + .death = ANIM_HuffNPuff_Anim01, \ + .hit = ANIM_HuffNPuff_Anim01, \ + .anim_8 = ANIM_HuffNPuff_Anim01, \ + .anim_9 = ANIM_HuffNPuff_Anim01, \ + .anim_A = ANIM_HuffNPuff_Anim01, \ + .anim_B = ANIM_HuffNPuff_Anim01, \ + .anim_C = ANIM_HuffNPuff_Anim01, \ + .anim_D = ANIM_HuffNPuff_Anim01, \ + .anim_E = ANIM_HuffNPuff_Anim01, \ + .anim_F = ANIM_HuffNPuff_Anim01, \ +} diff --git a/src/world/common/enemy/complete/Lakitu.h b/src/world/common/enemy/complete/Lakitu.h new file mode 100644 index 0000000000..f1c3ad3e30 --- /dev/null +++ b/src/world/common/enemy/complete/Lakitu.h @@ -0,0 +1,38 @@ +#include "common.h" +#include "sprite/npc/Lakitu.h" + +#define LAKITU_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .itemDropChance = 25, \ + .itemDrops = { \ + { ITEM_SUPER_SHROOM, 2, 0 }, \ + { ITEM_MAPLE_SYRUP, 2, 0 }, \ + { ITEM_THUNDER_RAGE, 2, 0 }, \ + { ITEM_STOP_WATCH, 2, 0 }, \ + }, \ + .heartDrops = STANDARD_HEART_DROPS(2), \ + .flowerDrops = STANDARD_FLOWER_DROPS(3), \ + .minCoinBonus = 0, \ + .maxCoinBonus = 2, \ +} + +#define LAKITU_ANIMS \ +{ \ + .idle = ANIM_Lakitu_Anim01, \ + .walk = ANIM_Lakitu_Anim02, \ + .run = ANIM_Lakitu_Anim03, \ + .chase = ANIM_Lakitu_Anim03, \ + .anim_4 = ANIM_Lakitu_Anim01, \ + .anim_5 = ANIM_Lakitu_Anim01, \ + .death = ANIM_Lakitu_Anim04, \ + .hit = ANIM_Lakitu_Anim04, \ + .anim_8 = ANIM_Lakitu_Anim03, \ + .anim_9 = ANIM_Lakitu_Anim01, \ + .anim_A = ANIM_Lakitu_Anim01, \ + .anim_B = ANIM_Lakitu_Anim01, \ + .anim_C = ANIM_Lakitu_Anim01, \ + .anim_D = ANIM_Lakitu_Anim01, \ + .anim_E = ANIM_Lakitu_Anim01, \ + .anim_F = ANIM_Lakitu_Anim01, \ +} diff --git a/src/world/common/enemy/complete/Lakitu_SpinySpawner.inc.c b/src/world/common/enemy/complete/Lakitu_SpinySpawner.inc.c new file mode 100644 index 0000000000..180e10cfd1 --- /dev/null +++ b/src/world/common/enemy/complete/Lakitu_SpinySpawner.inc.c @@ -0,0 +1,93 @@ +#include "Lakitu.h" +#include "Spiny.h" + +#include "world/common/enemy/ai/LakituAI.inc.c" + +f32 N(FlyingAI_JumpVels)[] = { + 4.5, 3.5, 2.6, 2.0, 1.5, 20.0, +}; + +MobileAISettings N(AISettings_Lakitu_SpinySpawner) = { + .moveSpeed = 1.5f, + .moveTime = 60, + .waitTime = 30, + .alertRadius = 60.0f, + .alertOffsetDist = 50.0f, + .playerSearchInterval = 3, + .chaseSpeed = 3.5f, + .chaseTurnRate = 60, + .chaseUpdateInterval = 10, + .chaseRadius = 80.0f, + .chaseOffsetDist = 70.0f, + .unk_AI_2C = 1, +}; + +EvtScript N(EVS_NpcAI_Lakitu_SpinySpawner) = { + EVT_CALL(SetSelfVar, 0, 0) + EVT_CALL(SetSelfVar, 5, -650) + EVT_CALL(SetSelfVar, 6, 30) + EVT_CALL(SetSelfVar, 1, 400) + EVT_CALL(N(LakituAI_Main), EVT_PTR(N(AISettings_Lakitu_SpinySpawner))) + EVT_RETURN + EVT_END +}; + +NpcSettings N(NpcSettings_Lakitu_SpinySpawner) = { + .height = 28, + .radius = 24, + .level = 20, + .ai = &N(EVS_NpcAI_Lakitu_SpinySpawner), + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, +}; + +#include "world/common/enemy/ai/SpinyAI.inc.c" + +MobileAISettings N(AISettings_SpawnedSpiny) = { + .moveSpeed = 1.5f, + .moveTime = 30, + .waitTime = 50, + .alertRadius = 60.0f, + .alertOffsetDist = 30.0f, + .playerSearchInterval = 3, + .chaseSpeed = 6.0f, + .chaseRadius = 100.0f, + .chaseOffsetDist = 30.0f, + .unk_AI_2C = 3, +}; + +EvtScript N(EVS_NpcAI_SpawnedSpiny) = { + EVT_CALL(SetSelfVar, 2, 3) + EVT_CALL(SetSelfVar, 3, 18) + EVT_CALL(SetSelfVar, 5, 3) + EVT_CALL(SetSelfVar, 7, 4) + EVT_CALL(N(SpinyAI_Main), EVT_PTR(N(AISettings_SpawnedSpiny))) + EVT_RETURN + EVT_END +}; + +EvtScript N(EVS_NpcDefeat_SpawnedSpiny) = { + EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) + EVT_CALL(GetBattleOutcome, LVar0) + EVT_SWITCH(LVar0) + EVT_CASE_EQ(OUTCOME_PLAYER_WON) + EVT_CALL(SetSelfVar, 10, 100) + EVT_CALL(DoNpcDefeat) + EVT_CASE_EQ(OUTCOME_PLAYER_FLED) + EVT_CALL(OnPlayerFled, 0) + EVT_CASE_EQ(OUTCOME_ENEMY_FLED) + EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAGS_10, 1) + EVT_CALL(RemoveNpc, NPC_SELF) + EVT_END_SWITCH + EVT_RETURN + EVT_END +}; + +NpcSettings N(NpcSettings_SpawnedSpiny) = { + .height = 21, + .radius = 22, + .level = 19, + .ai = &N(EVS_NpcAI_SpawnedSpiny), + .onHit = &EnemyNpcHit, + .onDefeat = &N(EVS_NpcDefeat_SpawnedSpiny), +}; diff --git a/src/world/common/enemy/complete/Lakitu_Stationary.inc.c b/src/world/common/enemy/complete/Lakitu_Stationary.inc.c new file mode 100644 index 0000000000..4f664c8b67 --- /dev/null +++ b/src/world/common/enemy/complete/Lakitu_Stationary.inc.c @@ -0,0 +1,9 @@ +#include "Lakitu.h" + +NpcSettings N(NpcSettings_Lakitu) = { + .height = 32, + .radius = 24, + .level = 20, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, +}; diff --git a/src/world/common/enemy/complete/Magikoopa.h b/src/world/common/enemy/complete/Magikoopa.h new file mode 100644 index 0000000000..0b455480fa --- /dev/null +++ b/src/world/common/enemy/complete/Magikoopa.h @@ -0,0 +1,59 @@ +#include "common.h" +#include "sprite/npc/Magikoopa.h" +#include "sprite/npc/FlyingMagikoopa.h" + +#define MAGIKOOPA_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .itemDropChance = 25, \ + .itemDrops = { \ + { ITEM_SUPER_SHROOM, 2, 0 }, \ + { ITEM_MAPLE_SYRUP, 2, 0 }, \ + { ITEM_THUNDER_RAGE, 2, 0 }, \ + { ITEM_STOP_WATCH, 2, 0 }, \ + }, \ + .heartDrops = STANDARD_HEART_DROPS(2), \ + .flowerDrops = STANDARD_FLOWER_DROPS(3), \ + .minCoinBonus = 0, \ + .maxCoinBonus = 2, \ +} + +#define MAGIKOOPA_YELLOW_ANIMS \ +{ \ + .idle = ANIM_Magikoopa_Yellow_Anim01, \ + .walk = ANIM_Magikoopa_Yellow_Anim01, \ + .run = ANIM_Magikoopa_Yellow_Anim01, \ + .chase = ANIM_Magikoopa_Yellow_Anim01, \ + .anim_4 = ANIM_Magikoopa_Yellow_Anim01, \ + .anim_5 = ANIM_Magikoopa_Yellow_Anim01, \ + .death = ANIM_Magikoopa_Yellow_Anim04, \ + .hit = ANIM_Magikoopa_Yellow_Anim04, \ + .anim_8 = ANIM_Magikoopa_Yellow_Anim01, \ + .anim_9 = ANIM_Magikoopa_Yellow_Anim01, \ + .anim_A = ANIM_Magikoopa_Yellow_Anim01, \ + .anim_B = ANIM_Magikoopa_Yellow_Anim01, \ + .anim_C = ANIM_Magikoopa_Yellow_Anim01, \ + .anim_D = ANIM_Magikoopa_Yellow_Anim01, \ + .anim_E = ANIM_Magikoopa_Yellow_Anim01, \ + .anim_F = ANIM_Magikoopa_Yellow_Anim01, \ +} + +#define FLYING_MAGIKOOPA_YELLOW_ANIMS \ +{ \ + .idle = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .walk = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .run = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .chase = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .anim_4 = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .anim_5 = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .death = ANIM_FlyingMagikoopa_Yellow_Anim04, \ + .hit = ANIM_FlyingMagikoopa_Yellow_Anim04, \ + .anim_8 = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .anim_9 = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .anim_A = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .anim_B = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .anim_C = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .anim_D = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .anim_E = ANIM_FlyingMagikoopa_Yellow_Anim01, \ + .anim_F = ANIM_FlyingMagikoopa_Yellow_Anim01, \ +} diff --git a/src/world/common/enemy/complete/Spiny.h b/src/world/common/enemy/complete/Spiny.h new file mode 100644 index 0000000000..7c3bd64378 --- /dev/null +++ b/src/world/common/enemy/complete/Spiny.h @@ -0,0 +1,31 @@ +#include "common.h" +#include "sprite/npc/Spiny.h" + +#define SPINY_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .heartDrops = STANDARD_HEART_DROPS(3), \ + .flowerDrops = STANDARD_FLOWER_DROPS(2), \ + .minCoinBonus = 0, \ + .maxCoinBonus = 1, \ +} + +#define SPINY_ANIMS \ +{ \ + .idle = ANIM_Spiny_Anim01, \ + .walk = ANIM_Spiny_Anim03, \ + .run = ANIM_Spiny_Anim04, \ + .chase = ANIM_Spiny_Anim04, \ + .anim_4 = ANIM_Spiny_Anim01, \ + .anim_5 = ANIM_Spiny_Anim01, \ + .death = ANIM_Spiny_Anim09, \ + .hit = ANIM_Spiny_Anim09, \ + .anim_8 = ANIM_Spiny_Anim06, \ + .anim_9 = ANIM_Spiny_Anim08, \ + .anim_A = ANIM_Spiny_Anim07, \ + .anim_B = ANIM_Spiny_Anim01, \ + .anim_C = ANIM_Spiny_Anim01, \ + .anim_D = ANIM_Spiny_Anim01, \ + .anim_E = ANIM_Spiny_Anim01, \ + .anim_F = ANIM_Spiny_Anim01, \ +} diff --git a/src/world/common/enemy/complete/Spiny.inc.c b/src/world/common/enemy/complete/Spiny.inc.c new file mode 100644 index 0000000000..545f125725 --- /dev/null +++ b/src/world/common/enemy/complete/Spiny.inc.c @@ -0,0 +1,35 @@ +#include "Spiny.h" + +#include "world/common/enemy/ai/TackleAI.inc.c" + +MobileAISettings N(AISettings_Spiny) = { + .moveSpeed = 1.5f, + .moveTime = 30, + .waitTime = 50, + .alertRadius = 60.0f, + .alertOffsetDist = 30.0f, + .playerSearchInterval = 3, + .chaseSpeed = 6.0f, + .chaseRadius = 100.0f, + .chaseOffsetDist = 30.0f, + .unk_AI_2C = 3, +}; + +EvtScript N(EVS_NpcAI_Spiny) = { + EVT_CALL(SetSelfVar, 2, 3) + EVT_CALL(SetSelfVar, 3, 18) + EVT_CALL(SetSelfVar, 5, 3) + EVT_CALL(SetSelfVar, 7, 4) + EVT_CALL(N(TackleAI_Main), EVT_PTR(N(AISettings_Spiny))) + EVT_RETURN + EVT_END +}; + +NpcSettings N(NpcSettings_Spiny) = { + .height = 21, + .radius = 22, + .level = 19, + .ai = &N(EVS_NpcAI_Spiny), + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, +}; diff --git a/src/world/common/enemy/complete/TuffPuff.h b/src/world/common/enemy/complete/TuffPuff.h new file mode 100644 index 0000000000..41ecedb010 --- /dev/null +++ b/src/world/common/enemy/complete/TuffPuff.h @@ -0,0 +1,42 @@ +#include "common.h" +#include "sprite/npc/TuffPuff.h" + +#define TUFF_PUFF_NO_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .heartDrops = NO_DROPS, \ + .flowerDrops = NO_DROPS, \ +} + +#define TUFF_PUFF_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .itemDropChance = 10, \ + .itemDrops = { \ + { ITEM_THUNDER_RAGE, 10, 0 }, \ + }, \ + .heartDrops = STANDARD_HEART_DROPS(2), \ + .flowerDrops = STANDARD_FLOWER_DROPS(2), \ + .minCoinBonus = 0, \ + .maxCoinBonus = 2, \ +} + +#define TUFF_PUFF_ANIMS \ +{ \ + .idle = ANIM_TuffPuff_Still, \ + .walk = ANIM_TuffPuff_Still, \ + .run = ANIM_TuffPuff_Grin, \ + .chase = ANIM_TuffPuff_Grin, \ + .anim_4 = ANIM_TuffPuff_Still, \ + .anim_5 = ANIM_TuffPuff_Still, \ + .death = ANIM_TuffPuff_Hurt, \ + .hit = ANIM_TuffPuff_Hurt, \ + .anim_8 = ANIM_TuffPuff_Grin, \ + .anim_9 = ANIM_TuffPuff_Idle, \ + .anim_A = ANIM_TuffPuff_Idle, \ + .anim_B = ANIM_TuffPuff_Idle, \ + .anim_C = ANIM_TuffPuff_Idle, \ + .anim_D = ANIM_TuffPuff_Idle, \ + .anim_E = ANIM_TuffPuff_Idle, \ + .anim_F = ANIM_TuffPuff_Idle, \ +} diff --git a/src/world/common/enemy/complete/TuffPuff.inc.c b/src/world/common/enemy/complete/TuffPuff.inc.c new file mode 100644 index 0000000000..f9376c62e0 --- /dev/null +++ b/src/world/common/enemy/complete/TuffPuff.inc.c @@ -0,0 +1,37 @@ +#include "TuffPuff.h" + +#include "world/common/enemy/ai/FlyingAI.inc.c" +#include "world/common/enemy/ai/FlyingNoAttackAI.inc.c" +#include "world/common/enemy/ai/FlyingAI.data.inc.c" + +MobileAISettings N(AISettings_TuffPuff) = { + .moveSpeed = 1.0f, + .moveTime = 45, + .waitTime = 60, + .alertRadius = 100.0f, + .playerSearchInterval = 3, + .chaseSpeed = 3.6f, + .chaseTurnRate = 10, + .chaseUpdateInterval = 1, + .chaseRadius = 120.0f, + .unk_AI_2C = 1, +}; + +EvtScript N(EVS_NpcAI_TuffPuff) = { + EVT_CALL(SetSelfVar, 0, 1) + EVT_CALL(SetSelfVar, 5, 0) + EVT_CALL(SetSelfVar, 6, 0) + EVT_CALL(SetSelfVar, 1, 600) + EVT_CALL(N(FlyingNoAttackAI_Main), EVT_PTR(N(AISettings_TuffPuff))) + EVT_RETURN + EVT_END +}; + +NpcSettings N(NpcSettings_TuffPuff) = { + .height = 24, + .radius = 28, + .level = 19, + .ai = &N(EVS_NpcAI_TuffPuff), + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, +}; diff --git a/src/world/common/entity/Pipe.data.inc.c b/src/world/common/entity/Pipe.data.inc.c index 843700d129..c4f9aa5309 100644 --- a/src/world/common/entity/Pipe.data.inc.c +++ b/src/world/common/entity/Pipe.data.inc.c @@ -238,3 +238,26 @@ EvtScript N(EVS_Pipe_ExitHorizontal) = { EVT_RETURN EVT_END }; + +#define EVT_EXIT_PIPE_HORIZONTAL(entry, collider, script) \ +{ \ + EVT_SET_GROUP(EVT_GROUP_1B) \ + EVT_SET(LVarA, entry) \ + EVT_SET(LVarB, collider) \ + EVT_SET(LVarC, EVT_PTR(script)) \ + EVT_EXEC_WAIT(N(EVS_Pipe_ExitHorizontal)) \ + EVT_RETURN \ + EVT_END \ +} + + +#define EVT_EXIT_PIPE_VERTICAL(entry, collider, script) \ +{ \ + EVT_SET_GROUP(EVT_GROUP_1B) \ + EVT_SET(LVarA, entry) \ + EVT_SET(LVarB, collider) \ + EVT_SET(LVarC, EVT_PTR(script)) \ + EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical)) \ + EVT_RETURN \ + EVT_END \ +} diff --git a/src/world/common/npc/Bubulb.h b/src/world/common/npc/Bubulb.h index 2e005ffc5c..23eba94e9b 100644 --- a/src/world/common/npc/Bubulb.h +++ b/src/world/common/npc/Bubulb.h @@ -1,14 +1,54 @@ #include "common.h" #include "sprite/npc/Bubulb.h" -#define BULBULB_DROPS \ +#define BUBULB_DROPS \ { \ .dropFlags = NPC_DROP_FLAGS_80, \ .heartDrops = NO_DROPS, \ .flowerDrops = NO_DROPS, \ } -#define BULBULB_GREEN_ANIMS \ +#define BUBULB_PINK_ANIMS \ +{ \ + .idle = ANIM_Bubulb_Pink_Idle, \ + .walk = ANIM_Bubulb_Pink_Walk, \ + .run = ANIM_Bubulb_Pink_Walk, \ + .chase = ANIM_Bubulb_Pink_Idle, \ + .anim_4 = ANIM_Bubulb_Pink_Idle, \ + .anim_5 = ANIM_Bubulb_Pink_Idle, \ + .death = ANIM_Bubulb_Pink_Idle, \ + .hit = ANIM_Bubulb_Pink_Idle, \ + .anim_8 = ANIM_Bubulb_Pink_Idle, \ + .anim_9 = ANIM_Bubulb_Pink_Idle, \ + .anim_A = ANIM_Bubulb_Pink_Idle, \ + .anim_B = ANIM_Bubulb_Pink_Idle, \ + .anim_C = ANIM_Bubulb_Pink_Idle, \ + .anim_D = ANIM_Bubulb_Pink_Idle, \ + .anim_E = ANIM_Bubulb_Pink_Idle, \ + .anim_F = ANIM_Bubulb_Pink_Idle, \ +} + +#define BUBULB_PURPLE_ANIMS \ +{ \ + .idle = ANIM_Bubulb_Purple_Idle, \ + .walk = ANIM_Bubulb_Purple_Walk, \ + .run = ANIM_Bubulb_Purple_Walk, \ + .chase = ANIM_Bubulb_Purple_Idle, \ + .anim_4 = ANIM_Bubulb_Purple_Idle, \ + .anim_5 = ANIM_Bubulb_Purple_Idle, \ + .death = ANIM_Bubulb_Purple_Idle, \ + .hit = ANIM_Bubulb_Purple_Idle, \ + .anim_8 = ANIM_Bubulb_Purple_Idle, \ + .anim_9 = ANIM_Bubulb_Purple_Idle, \ + .anim_A = ANIM_Bubulb_Purple_Idle, \ + .anim_B = ANIM_Bubulb_Purple_Idle, \ + .anim_C = ANIM_Bubulb_Purple_Idle, \ + .anim_D = ANIM_Bubulb_Purple_Idle, \ + .anim_E = ANIM_Bubulb_Purple_Idle, \ + .anim_F = ANIM_Bubulb_Purple_Idle, \ +} + +#define BUBULB_GREEN_ANIMS \ { \ .idle = ANIM_Bubulb_Green_Idle, \ .walk = ANIM_Bubulb_Green_Walk, \ @@ -28,22 +68,22 @@ .anim_F = ANIM_Bubulb_Green_Idle, \ } -#define BULBULB_PURPLE_ANIMS \ +#define BUBULB_YELLOW_ANIMS \ { \ - .idle = ANIM_Bubulb_Purple_Idle, \ - .walk = ANIM_Bubulb_Purple_Walk, \ - .run = ANIM_Bubulb_Purple_Walk, \ - .chase = ANIM_Bubulb_Purple_Idle, \ - .anim_4 = ANIM_Bubulb_Purple_Idle, \ - .anim_5 = ANIM_Bubulb_Purple_Idle, \ - .death = ANIM_Bubulb_Purple_Idle, \ - .hit = ANIM_Bubulb_Purple_Idle, \ - .anim_8 = ANIM_Bubulb_Purple_Idle, \ - .anim_9 = ANIM_Bubulb_Purple_Idle, \ - .anim_A = ANIM_Bubulb_Purple_Idle, \ - .anim_B = ANIM_Bubulb_Purple_Idle, \ - .anim_C = ANIM_Bubulb_Purple_Idle, \ - .anim_D = ANIM_Bubulb_Purple_Idle, \ - .anim_E = ANIM_Bubulb_Purple_Idle, \ - .anim_F = ANIM_Bubulb_Purple_Idle, \ + .idle = ANIM_Bubulb_Yellow_Idle, \ + .walk = ANIM_Bubulb_Yellow_Walk, \ + .run = ANIM_Bubulb_Yellow_Walk, \ + .chase = ANIM_Bubulb_Yellow_Idle, \ + .anim_4 = ANIM_Bubulb_Yellow_Idle, \ + .anim_5 = ANIM_Bubulb_Yellow_Idle, \ + .death = ANIM_Bubulb_Yellow_Idle, \ + .hit = ANIM_Bubulb_Yellow_Idle, \ + .anim_8 = ANIM_Bubulb_Yellow_Idle, \ + .anim_9 = ANIM_Bubulb_Yellow_Idle, \ + .anim_A = ANIM_Bubulb_Yellow_Idle, \ + .anim_B = ANIM_Bubulb_Yellow_Idle, \ + .anim_C = ANIM_Bubulb_Yellow_Idle, \ + .anim_D = ANIM_Bubulb_Yellow_Idle, \ + .anim_E = ANIM_Bubulb_Yellow_Idle, \ + .anim_F = ANIM_Bubulb_Yellow_Idle, \ } diff --git a/src/world/common/npc/Bubulb_Patrol.inc.c b/src/world/common/npc/Bubulb_Patrol.inc.c new file mode 100644 index 0000000000..098ddf66f7 --- /dev/null +++ b/src/world/common/npc/Bubulb_Patrol.inc.c @@ -0,0 +1,25 @@ +#include "common.h" +#include "Bubulb.h" + +#include "world/common/enemy/ai/PatrolNoAttackAI.inc.c" + +MobileAISettings N(AISettings_Bubulb_Patrol) = { + .moveSpeed = 1.5f, + .moveTime = 30, + .waitTime = 30, + .playerSearchInterval = -1, + .unk_AI_2C = 1, +}; + +EvtScript N(EVS_NpcAI_Bubulb_Patrol) = { + EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Bubulb_Patrol))) + EVT_RETURN + EVT_END +}; + +NpcSettings N(NpcSettings_Bubulb_Patrol) = { + .height = 42, + .radius = 28, + .level = 99, + .ai = &N(EVS_NpcAI_Bubulb_Patrol), +}; diff --git a/src/world/common/npc/Dummy.inc.c b/src/world/common/npc/Dummy.inc.c new file mode 100644 index 0000000000..d53c3967a8 --- /dev/null +++ b/src/world/common/npc/Dummy.inc.c @@ -0,0 +1,7 @@ +#include "common.h" + +NpcSettings N(NpcSettings_Dummy) = { + .height = 24, + .radius = 24, + .level = 99, +}; diff --git a/src/world/common/npc/GateFlower.h b/src/world/common/npc/GateFlower.h new file mode 100644 index 0000000000..1715bec764 --- /dev/null +++ b/src/world/common/npc/GateFlower.h @@ -0,0 +1,69 @@ +#include "common.h" +#include "sprite/npc/GateFlower.h" + +#define GATE_FLOWER_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .heartDrops = NO_DROPS, \ + .flowerDrops = NO_DROPS, \ +} + +#define GATE_FLOWER_BLUE_ANIMS \ +{ \ + .idle = ANIM_GateFlower_Blue_Idle, \ + .walk = ANIM_GateFlower_Blue_Idle, \ + .run = ANIM_GateFlower_Blue_Idle, \ + .chase = ANIM_GateFlower_Blue_Idle, \ + .anim_4 = ANIM_GateFlower_Blue_Idle, \ + .anim_5 = ANIM_GateFlower_Blue_Idle, \ + .death = ANIM_GateFlower_Blue_Idle, \ + .hit = ANIM_GateFlower_Blue_Idle, \ + .anim_8 = ANIM_GateFlower_Blue_Idle, \ + .anim_9 = ANIM_GateFlower_Blue_Idle, \ + .anim_A = ANIM_GateFlower_Blue_Idle, \ + .anim_B = ANIM_GateFlower_Blue_Idle, \ + .anim_C = ANIM_GateFlower_Blue_Idle, \ + .anim_D = ANIM_GateFlower_Blue_Idle, \ + .anim_E = ANIM_GateFlower_Blue_Idle, \ + .anim_F = ANIM_GateFlower_Blue_Idle, \ +} + +#define GATE_FLOWER_RED_ANIMS \ +{ \ + .idle = ANIM_GateFlower_Red_Idle, \ + .walk = ANIM_GateFlower_Red_Idle, \ + .run = ANIM_GateFlower_Red_Idle, \ + .chase = ANIM_GateFlower_Red_Idle, \ + .anim_4 = ANIM_GateFlower_Red_Idle, \ + .anim_5 = ANIM_GateFlower_Red_Idle, \ + .death = ANIM_GateFlower_Red_Idle, \ + .hit = ANIM_GateFlower_Red_Idle, \ + .anim_8 = ANIM_GateFlower_Red_Idle, \ + .anim_9 = ANIM_GateFlower_Red_Idle, \ + .anim_A = ANIM_GateFlower_Red_Idle, \ + .anim_B = ANIM_GateFlower_Red_Idle, \ + .anim_C = ANIM_GateFlower_Red_Idle, \ + .anim_D = ANIM_GateFlower_Red_Idle, \ + .anim_E = ANIM_GateFlower_Red_Idle, \ + .anim_F = ANIM_GateFlower_Red_Idle, \ +} + +#define GATE_FLOWER_YELLOW_ANIMS \ +{ \ + .idle = ANIM_GateFlower_Yellow_Idle, \ + .walk = ANIM_GateFlower_Yellow_Idle, \ + .run = ANIM_GateFlower_Yellow_Idle, \ + .chase = ANIM_GateFlower_Yellow_Idle, \ + .anim_4 = ANIM_GateFlower_Yellow_Idle, \ + .anim_5 = ANIM_GateFlower_Yellow_Idle, \ + .death = ANIM_GateFlower_Yellow_Idle, \ + .hit = ANIM_GateFlower_Yellow_Idle, \ + .anim_8 = ANIM_GateFlower_Yellow_Idle, \ + .anim_9 = ANIM_GateFlower_Yellow_Idle, \ + .anim_A = ANIM_GateFlower_Yellow_Idle, \ + .anim_B = ANIM_GateFlower_Yellow_Idle, \ + .anim_C = ANIM_GateFlower_Yellow_Idle, \ + .anim_D = ANIM_GateFlower_Yellow_Idle, \ + .anim_E = ANIM_GateFlower_Yellow_Idle, \ + .anim_F = ANIM_GateFlower_Yellow_Idle, \ +} diff --git a/src/world/common/npc/GateFlower.inc.c b/src/world/common/npc/GateFlower.inc.c new file mode 100644 index 0000000000..5d8170adac --- /dev/null +++ b/src/world/common/npc/GateFlower.inc.c @@ -0,0 +1,7 @@ +#include "GateFlower.h" + +NpcSettings N(NpcSettings_GateFlower) = { + .height = 56, + .radius = 40, + .level = 99, +}; diff --git a/src/world/common/npc/Lily.h b/src/world/common/npc/Lily.h new file mode 100644 index 0000000000..7d6f4a812e --- /dev/null +++ b/src/world/common/npc/Lily.h @@ -0,0 +1,29 @@ +#include "common.h" +#include "sprite/npc/Lily.h" + +#define LILY_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .heartDrops = NO_DROPS, \ + .flowerDrops = NO_DROPS, \ +} + +#define LILY_ANIMS \ +{ \ + .idle = ANIM_Lily_Idle, \ + .walk = ANIM_Lily_Idle, \ + .run = ANIM_Lily_Idle, \ + .chase = ANIM_Lily_Idle, \ + .anim_4 = ANIM_Lily_Idle, \ + .anim_5 = ANIM_Lily_Idle, \ + .death = ANIM_Lily_Idle, \ + .hit = ANIM_Lily_Idle, \ + .anim_8 = ANIM_Lily_Idle, \ + .anim_9 = ANIM_Lily_Idle, \ + .anim_A = ANIM_Lily_Idle, \ + .anim_B = ANIM_Lily_Idle, \ + .anim_C = ANIM_Lily_Idle, \ + .anim_D = ANIM_Lily_Idle, \ + .anim_E = ANIM_Lily_Idle, \ + .anim_F = ANIM_Lily_Idle, \ +} diff --git a/src/world/common/npc/Lily.inc.c b/src/world/common/npc/Lily.inc.c new file mode 100644 index 0000000000..3f61ce6458 --- /dev/null +++ b/src/world/common/npc/Lily.inc.c @@ -0,0 +1,7 @@ +#include "Lily.h" + +NpcSettings N(NpcSettings_Lily) = { + .height = 45, + .radius = 65, + .level = 99, +}; diff --git a/src/world/common/npc/Posie.h b/src/world/common/npc/Posie.h new file mode 100644 index 0000000000..f246fa105d --- /dev/null +++ b/src/world/common/npc/Posie.h @@ -0,0 +1,29 @@ +#include "common.h" +#include "sprite/npc/Posie.h" + +#define POSIE_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .heartDrops = NO_DROPS, \ + .flowerDrops = NO_DROPS, \ +} + +#define POSIE_ANIMS \ +{ \ + .idle = ANIM_Posie_Idle, \ + .walk = ANIM_Posie_Idle, \ + .run = ANIM_Posie_Idle, \ + .chase = ANIM_Posie_Idle, \ + .anim_4 = ANIM_Posie_Idle, \ + .anim_5 = ANIM_Posie_Idle, \ + .death = ANIM_Posie_Idle, \ + .hit = ANIM_Posie_Idle, \ + .anim_8 = ANIM_Posie_Idle, \ + .anim_9 = ANIM_Posie_Idle, \ + .anim_A = ANIM_Posie_Idle, \ + .anim_B = ANIM_Posie_Idle, \ + .anim_C = ANIM_Posie_Idle, \ + .anim_D = ANIM_Posie_Idle, \ + .anim_E = ANIM_Posie_Idle, \ + .anim_F = ANIM_Posie_Idle, \ +} diff --git a/src/world/common/npc/Posie.inc.c b/src/world/common/npc/Posie.inc.c new file mode 100644 index 0000000000..cf1501244d --- /dev/null +++ b/src/world/common/npc/Posie.inc.c @@ -0,0 +1,7 @@ +#include "Posie.h" + +NpcSettings N(NpcSettings_Posie) = { + .height = 56, + .radius = 40, + .level = 99, +}; diff --git a/src/world/common/npc/Rosie.h b/src/world/common/npc/Rosie.h new file mode 100644 index 0000000000..204665b57d --- /dev/null +++ b/src/world/common/npc/Rosie.h @@ -0,0 +1,29 @@ +#include "common.h" +#include "sprite/npc/Rosie.h" + +#define ROSIE_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .heartDrops = NO_DROPS, \ + .flowerDrops = NO_DROPS, \ +} + +#define ROSIE_ANIMS \ +{ \ + .idle = ANIM_Rosie_Idle, \ + .walk = ANIM_Rosie_Idle, \ + .run = ANIM_Rosie_Idle, \ + .chase = ANIM_Rosie_Idle, \ + .anim_4 = ANIM_Rosie_Idle, \ + .anim_5 = ANIM_Rosie_Idle, \ + .death = ANIM_Rosie_Idle, \ + .hit = ANIM_Rosie_Idle, \ + .anim_8 = ANIM_Rosie_Idle, \ + .anim_9 = ANIM_Rosie_Idle, \ + .anim_A = ANIM_Rosie_Idle, \ + .anim_B = ANIM_Rosie_Idle, \ + .anim_C = ANIM_Rosie_Idle, \ + .anim_D = ANIM_Rosie_Idle, \ + .anim_E = ANIM_Rosie_Idle, \ + .anim_F = ANIM_Rosie_Idle, \ +} diff --git a/src/world/common/npc/Rosie.inc.c b/src/world/common/npc/Rosie.inc.c new file mode 100644 index 0000000000..75aba2a03b --- /dev/null +++ b/src/world/common/npc/Rosie.inc.c @@ -0,0 +1,7 @@ +#include "Rosie.h" + +NpcSettings N(NpcSettings_Rosie) = { + .height = 56, + .radius = 40, + .level = 99, +}; diff --git a/src/world/common/npc/Sun.h b/src/world/common/npc/Sun.h new file mode 100644 index 0000000000..98500eefab --- /dev/null +++ b/src/world/common/npc/Sun.h @@ -0,0 +1,29 @@ +#include "common.h" +#include "sprite/npc/Sun.h" + +#define SUN_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .heartDrops = NO_DROPS, \ + .flowerDrops = NO_DROPS, \ +} + +#define SUN_ANIMS \ +{ \ + .idle = ANIM_Sun_Idle, \ + .walk = ANIM_Sun_Idle, \ + .run = ANIM_Sun_Idle, \ + .chase = ANIM_Sun_Idle, \ + .anim_4 = ANIM_Sun_Idle, \ + .anim_5 = ANIM_Sun_Idle, \ + .death = ANIM_Sun_Idle, \ + .hit = ANIM_Sun_Idle, \ + .anim_8 = ANIM_Sun_Idle, \ + .anim_9 = ANIM_Sun_Idle, \ + .anim_A = ANIM_Sun_Idle, \ + .anim_B = ANIM_Sun_Idle, \ + .anim_C = ANIM_Sun_Idle, \ + .anim_D = ANIM_Sun_Idle, \ + .anim_E = ANIM_Sun_Idle, \ + .anim_F = ANIM_Sun_Idle, \ +} diff --git a/src/world/common/npc/Sun.inc.c b/src/world/common/npc/Sun.inc.c new file mode 100644 index 0000000000..6969f4e0db --- /dev/null +++ b/src/world/common/npc/Sun.inc.c @@ -0,0 +1,7 @@ +#include "Sun.h" + +NpcSettings N(NpcSettings_Sun) = { + .height = 24, + .radius = 24, + .level = 99, +}; diff --git a/src/world/common/npc/Tolielup.h b/src/world/common/npc/Tolielup.h new file mode 100644 index 0000000000..bb6641f00a --- /dev/null +++ b/src/world/common/npc/Tolielup.h @@ -0,0 +1,29 @@ +#include "common.h" +#include "sprite/npc/Tolielup.h" + +#define TOLIELUP_DROPS \ +{ \ + .dropFlags = NPC_DROP_FLAGS_80, \ + .heartDrops = NO_DROPS, \ + .flowerDrops = NO_DROPS, \ +} + +#define TOLIELUP_ANIMS \ +{ \ + .idle = ANIM_Tolielup_Idle, \ + .walk = ANIM_Tolielup_Idle, \ + .run = ANIM_Tolielup_Idle, \ + .chase = ANIM_Tolielup_Idle, \ + .anim_4 = ANIM_Tolielup_Idle, \ + .anim_5 = ANIM_Tolielup_Idle, \ + .death = ANIM_Tolielup_Idle, \ + .hit = ANIM_Tolielup_Idle, \ + .anim_8 = ANIM_Tolielup_Idle, \ + .anim_9 = ANIM_Tolielup_Idle, \ + .anim_A = ANIM_Tolielup_Idle, \ + .anim_B = ANIM_Tolielup_Idle, \ + .anim_C = ANIM_Tolielup_Idle, \ + .anim_D = ANIM_Tolielup_Idle, \ + .anim_E = ANIM_Tolielup_Idle, \ + .anim_F = ANIM_Tolielup_Idle, \ +} diff --git a/src/world/common/npc/Tolielup.inc.c b/src/world/common/npc/Tolielup.inc.c new file mode 100644 index 0000000000..773d5c213f --- /dev/null +++ b/src/world/common/npc/Tolielup.inc.c @@ -0,0 +1,7 @@ +#include "Tolielup.h" + +NpcSettings N(NpcSettings_Tolielup) = { + .height = 56, + .radius = 40, + .level = 99, +}; diff --git a/src/world/common/todo/UnkPosFunc2.inc.c b/src/world/common/todo/CheckDripCollisionWithNPC.inc.c similarity index 93% rename from src/world/common/todo/UnkPosFunc2.inc.c rename to src/world/common/todo/CheckDripCollisionWithNPC.inc.c index b13e99867c..22c42fb831 100644 --- a/src/world/common/todo/UnkPosFunc2.inc.c +++ b/src/world/common/todo/CheckDripCollisionWithNPC.inc.c @@ -2,7 +2,7 @@ #include "npc.h" #include "model.h" -ApiStatus N(UnkPosFunc2)(Evt* script, s32 isInitialCall) { +ApiStatus N(CheckDripCollisionWithNPC)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; s32 treeIndex = evt_get_variable(script, *args++); @@ -31,7 +31,7 @@ ApiStatus N(UnkPosFunc2)(Evt* script, s32 isInitialCall) { script->varTable[2] = 1; } - for (i = 0; i < 0x40; i++) { + for (i = 0; i < MAX_NPCS; i++) { Npc* npc = get_npc_safe(i); if (npc != NULL) { diff --git a/src/world/common/todo/UnkFunc43.inc.c b/src/world/common/todo/CheckVineTriggerDist.inc.c similarity index 84% rename from src/world/common/todo/UnkFunc43.inc.c rename to src/world/common/todo/CheckVineTriggerDist.inc.c index 12073e7626..aaa40307a7 100644 --- a/src/world/common/todo/UnkFunc43.inc.c +++ b/src/world/common/todo/CheckVineTriggerDist.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "npc.h" -ApiStatus N(UnkFunc43)(Evt* script, s32 isInitialCall) { +API_CALLABLE(N(CheckVineTriggerDist)) { f32 var1 = script->varTable[0] - script->varTable[3]; f32 var2 = script->varTable[1] - script->varTable[4]; f32 var3 = script->varTable[2] - script->varTable[5]; diff --git a/src/world/common/todo/DeadUnkFunc1.inc.c b/src/world/common/todo/DeadUnkFunc1.inc.c index 171c974857..bdf0b0a9d2 100644 --- a/src/world/common/todo/DeadUnkFunc1.inc.c +++ b/src/world/common/todo/DeadUnkFunc1.inc.c @@ -2,6 +2,6 @@ #include "effects.h" ApiStatus N(DeadUnkFunc1)(Evt* script, s32 isInitialCall) { - fx_sun_undeclared(1, 0, 0, 0, 0, 0); + fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/common/todo/LoadPartyImage.inc.c b/src/world/common/todo/LoadPartyImage.inc.c index b8ac4b9b0a..98b0cfd9cc 100644 --- a/src/world/common/todo/LoadPartyImage.inc.c +++ b/src/world/common/todo/LoadPartyImage.inc.c @@ -5,7 +5,7 @@ #error "Define PARTY_IMAGE to the asset name to use LoadPartyImage." #endif -ApiStatus N(LoadPartyImage)(Evt* script, s32 isInitialCall) { +API_CALLABLE(N(LoadPartyImage)) { static PAL_BIN palette[256]; static IMG_BIN raster[0x3D90]; // 10 bytes added for padding: 150 * 105 = 3D86 static MessageImageData image; diff --git a/src/world/common/todo/SpawnSunEffect.inc.c b/src/world/common/todo/SpawnSunEffect.inc.c index cabb09900c..127e1d0555 100644 --- a/src/world/common/todo/SpawnSunEffect.inc.c +++ b/src/world/common/todo/SpawnSunEffect.inc.c @@ -2,7 +2,7 @@ #include "npc.h" #include "effects.h" -ApiStatus N(SpawnSunEffect)(Evt* script, s32 isInitialCall) { - fx_sun(0, 0.0f, 0.0f, 0.0f, 0.0f, 0); +API_CALLABLE(N(SpawnSunEffect)) { + fx_sun(FX_SUN_FROM_LEFT, 0.0f, 0.0f, 0.0f, 0.0f, 0); return ApiStatus_DONE2; } diff --git a/src/world/common/todo/StarSpiritEffectFunc.inc.c b/src/world/common/todo/StarSpiritEffectFunc.inc.c index 60de3e0636..ff102803e4 100644 --- a/src/world/common/todo/StarSpiritEffectFunc.inc.c +++ b/src/world/common/todo/StarSpiritEffectFunc.inc.c @@ -2,6 +2,16 @@ #include "npc.h" #include "effects.h" +// seems to be a macro in the original based on usage +#define EVT_SPIRIT_ADJUST_CAM(pitch) \ + EVT_CALL(GetCamDistance, CAM_DEFAULT, LVar1) \ + EVT_SUB(LVar1, 100) \ + EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) \ + EVT_IF_NE(pitch, 10000) \ + EVT_CALL(GetCamPitch, CAM_DEFAULT, LVar2, LVar3) \ + EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar2, pitch) \ + EVT_END_IF + ApiStatus N(StarSpiritEffectFunc1)(Evt* script, s32 isInitialCall) { StarSpiritData* ptr = script->varTablePtr[0]; diff --git a/src/world/common/todo/UnkFunc44.inc.c b/src/world/common/todo/UnkFunc44.inc.c index 7068f748d1..bf6a45b684 100644 --- a/src/world/common/todo/UnkFunc44.inc.c +++ b/src/world/common/todo/UnkFunc44.inc.c @@ -1,13 +1,10 @@ #include "common.h" #include "npc.h" -ApiStatus N(UnkFunc44)(Evt* script, s32 isInitialCall) { - script->varTable[0] = 0; - do {} while (0); - if (gPlayerStatus.actionState == ACTION_STATE_SPIN_POUND) { - script->varTable[0] = 1; - } else if (gPlayerStatus.actionState == ACTION_STATE_TORNADO_POUND) { - script->varTable[0] = 1; +API_CALLABLE(N(UnkFunc44)) { + script->varTable[0] = FALSE; + if (gPlayerStatus.actionState == ACTION_STATE_SPIN_POUND || gPlayerStatus.actionState == ACTION_STATE_TORNADO_POUND) { + script->varTable[0] = TRUE; } return ApiStatus_DONE2; } diff --git a/src/world/dead/flo_00/EB8E50.c b/src/world/dead/flo_00/EB8E50.c index 618f6ef1d2..eedd5fdc8a 100644 --- a/src/world/dead/flo_00/EB8E50.c +++ b/src/world/dead/flo_00/EB8E50.c @@ -11,6 +11,6 @@ const char ascii_EC2030[] = "flo_08"; static const f64 rodata_alignment = 0.0; ApiStatus func_80240000_EB8E50(void) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/dead/flo_00/EB8E90.c b/src/world/dead/flo_00/EB8E90.c index 4dd5d2a62f..a020b25bf4 100644 --- a/src/world/dead/flo_00/EB8E90.c +++ b/src/world/dead/flo_00/EB8E90.c @@ -2,7 +2,7 @@ #include "world/common/enemy/ai/PatrolNoAttackAI.inc.c" -ApiStatus N(PostChapter6StatUpdate)(Evt* script, s32 isInitialCall) { +ApiStatus N(UpgradeStarPower)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; set_max_SP(6); diff --git a/src/world/dead/flo_07/EC71B0.c b/src/world/dead/flo_07/EC71B0.c index 91bdb11d9a..1dab3f38ee 100644 --- a/src/world/dead/flo_07/EC71B0.c +++ b/src/world/dead/flo_07/EC71B0.c @@ -7,11 +7,11 @@ ApiStatus func_80240344_EC74F4(Evt* script, s32 isInitialCall) { EffectInstance* effect = fx_misc_particles(3, -272.0f, 80.0f, 20.0f, 200.0f, 120.0f, 4.0f, 8, 0); - effect->data.miscParticles->unk_38 = 240; - effect->data.miscParticles->unk_3C = 240; - effect->data.miscParticles->unk_40 = 240; - effect->data.miscParticles->unk_48 = 230; - effect->data.miscParticles->unk_4C = 230; - effect->data.miscParticles->unk_50 = 240; + effect->data.miscParticles->innerColor.r = 240; + effect->data.miscParticles->innerColor.g = 240; + effect->data.miscParticles->innerColor.b = 240; + effect->data.miscParticles->glowColor.r = 230; + effect->data.miscParticles->glowColor.g = 230; + effect->data.miscParticles->glowColor.b = 240; return ApiStatus_DONE2; } diff --git a/src/world/dead/flo_08/ECBB70.c b/src/world/dead/flo_08/ECBB70.c index 578e9049a2..d8bb61bc30 100644 --- a/src/world/dead/flo_08/ECBB70.c +++ b/src/world/dead/flo_08/ECBB70.c @@ -1,3 +1,3 @@ #include "flo_08.h" -#include "world/common/todo/UnkFunc43.inc.c" +#include "world/common/todo/CheckVineTriggerDist.inc.c" diff --git a/src/world/dead/flo_09/ED0030.c b/src/world/dead/flo_09/ED0030.c index 9a8d3bbad3..66f937f2b6 100644 --- a/src/world/dead/flo_09/ED0030.c +++ b/src/world/dead/flo_09/ED0030.c @@ -1,3 +1,3 @@ #include "flo_09.h" -#include "world/common/todo/UnkFunc43.inc.c" +#include "world/common/todo/CheckVineTriggerDist.inc.c" diff --git a/src/world/dead/flo_11/ED8E20.c b/src/world/dead/flo_11/ED8E20.c index e9e4ad208e..69058b1948 100644 --- a/src/world/dead/flo_11/ED8E20.c +++ b/src/world/dead/flo_11/ED8E20.c @@ -1,11 +1,10 @@ #include "flo_11.h" +#include "effects.h" #include "world/common/entity/Pipe.inc.c" -void fx_sun(s32, s32, s32, s32, s32, s32); - ApiStatus func_80240318_ED9138(Evt* script, s32 isInitialCall) { - fx_sun(0, 0, 0, 0, 0, 0); + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/dead/flo_12/EDBFE0.c b/src/world/dead/flo_12/EDBFE0.c index e931b6f936..820703a507 100644 --- a/src/world/dead/flo_12/EDBFE0.c +++ b/src/world/dead/flo_12/EDBFE0.c @@ -2,6 +2,6 @@ #include "effects.h" ApiStatus N(func_80240000_EDBFE0)(Evt *script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/dead/flo_13/EDE9C0.c b/src/world/dead/flo_13/EDE9C0.c index 5ff91433d9..3d7e4f722d 100644 --- a/src/world/dead/flo_13/EDE9C0.c +++ b/src/world/dead/flo_13/EDE9C0.c @@ -2,6 +2,6 @@ #include "effects.h" ApiStatus N(func_80240000_EDE9C0)(Evt *script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/dead/flo_14/EE65B0.c b/src/world/dead/flo_14/EE65B0.c index 065ff405aa..4e504df466 100644 --- a/src/world/dead/flo_14/EE65B0.c +++ b/src/world/dead/flo_14/EE65B0.c @@ -6,11 +6,11 @@ extern f32 D_80243B44_EEA0F4; #include "world/common/atomic/TexturePan.inc.c" ApiStatus func_8024030C_EE68BC(Evt *script, s32 isInitialCall) { - fx_sun_undeclared(0, 0, 0, 0, 0, 0); + fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } -#include "world/common/todo/UnkFunc43.inc.c" +#include "world/common/todo/CheckVineTriggerDist.inc.c" ApiStatus func_802403D4_EE6984(Evt* script, s32 isInitialCall) { if (gPlayerData.currentPartner == PARTNER_NONE) { diff --git a/src/world/dead/flo_16/EED140.c b/src/world/dead/flo_16/EED140.c index f489fe7825..5a94d62579 100644 --- a/src/world/dead/flo_16/EED140.c +++ b/src/world/dead/flo_16/EED140.c @@ -1,3 +1,3 @@ #include "flo_16.h" -#include "world/common/todo/UnkFunc43.inc.c" +#include "world/common/todo/CheckVineTriggerDist.inc.c" diff --git a/src/world/entrances.h b/src/world/entrances.h index 152dc336aa..c72a9328bf 100644 --- a/src/world/entrances.h +++ b/src/world/entrances.h @@ -966,6 +966,7 @@ enum { flo_00_ENTRY_8 = 8, flo_00_ENTRY_9 = 9, flo_00_ENTRY_A = 10, + flo_00_ENTRY_B = 11, flo_03_ENTRY_0 = 0, flo_03_ENTRY_1 = 1, flo_03_ENTRY_2 = 2, diff --git a/src/world/world.c b/src/world/world.c index 970119d07f..a1289db49c 100644 --- a/src/world/world.c +++ b/src/world/world.c @@ -295,13 +295,14 @@ MapConfig mac_maps[] = { }; /// Toad Town Tunnels +#include "area_tik/tik.h" MapConfig tik_maps[] = { { MAP_UNSPLIT(tik_01, 0x80240AE0), .unk_1C = { .bytes = { .songVariation = 1, .flags = 2 } } }, { MAP_UNSPLIT(tik_02, 0x802409B0), .unk_1C = { .bytes = { .songVariation = 1, .flags = 2 } } }, { MAP_UNSPLIT(tik_03, 0x80240B00), .unk_1C = { .bytes = { .songVariation = 1, .flags = 2 } } }, { MAP_UNSPLIT(tik_04, 0x80240CB0), .unk_1C = { .bytes = { .songVariation = 1, .flags = 2 } } }, { MAP_UNSPLIT(tik_05, 0x80240A90), .unk_1C = { .bytes = { .songVariation = 1, .flags = 2 } } }, - { MAP_UNSPLIT(tik_06, 0x802409A0), .unk_1C = { .bytes = { .songVariation = 1, .flags = 2 } } }, + { MAP(tik_06), .unk_1C = { .bytes = { .songVariation = 1, .flags = 2 } } }, { MAP_UNSPLIT(tik_07, 0x80242920), .unk_1C = { .bytes = { .songVariation = 1, .flags = 2 } } }, { MAP_UNSPLIT(tik_08, 0x80240B10), .unk_1C = { .bytes = { .songVariation = 1, .flags = 2 } } }, { MAP_UNSPLIT(tik_09, 0x802412D0), .unk_1C = { .bytes = { .songVariation = 1, .flags = 2 } } }, @@ -697,27 +698,28 @@ MapConfig kzn_maps[] = { }; /// Flower Fields +#include "area_flo/flo.h" MapConfig flo_maps[] = { - { MAP_UNSPLIT(flo_00, 0x80241490), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_03, 0x80240660), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_07, 0x80240760), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_08, 0x80241F00), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_09, 0x80241840), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_10, 0x802414A0), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_11, 0x802403A0), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_12, 0x80240710), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_13, 0x80243690), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_14, 0x802423B0), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_15, 0x80240020), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_16, 0x80242990), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_17, 0x80243240), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_18, 0x802407F0), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_19, 0x80240980), .bgName = "sra_bg" }, - { MAP_UNSPLIT(flo_21, 0x80240D00), .bgName = "sra_bg" }, - { MAP_UNSPLIT(flo_22, 0x802402A0), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_23, 0x80240CF0), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_24, 0x802405C0), .bgName = "fla_bg" }, - { MAP_UNSPLIT(flo_25, 0x802422F0), .bgName = "fla_bg" }, + { MAP(flo_00), .bgName = "fla_bg" }, + { MAP(flo_03), .bgName = "fla_bg" }, + { MAP(flo_07), .bgName = "fla_bg" }, + { MAP(flo_08), .bgName = "fla_bg" }, + { MAP(flo_09), .bgName = "fla_bg" }, + { MAP(flo_10), .bgName = "fla_bg" }, + { MAP(flo_11), .bgName = "fla_bg" }, + { MAP(flo_12), .bgName = "fla_bg" }, + { MAP(flo_13), .bgName = "fla_bg" }, + { MAP(flo_14), .bgName = "fla_bg" }, + { MAP(flo_15), .bgName = "fla_bg" }, + { MAP(flo_16), .bgName = "fla_bg" }, + { MAP(flo_17), .bgName = "fla_bg" }, + { MAP(flo_18), .bgName = "fla_bg" }, + { MAP(flo_19), .bgName = "sra_bg" }, + { MAP(flo_21), .bgName = "sra_bg" }, + { MAP(flo_22), .bgName = "fla_bg" }, + { MAP(flo_23), .bgName = "fla_bg" }, + { MAP(flo_24), .bgName = "fla_bg" }, + { MAP(flo_25), .bgName = "fla_bg" }, }; /// Shiver Region diff --git a/tools/saved_flag_renames.txt b/tools/saved_flag_renames.txt index 5b84cfaf3f..aee98b9156 100644 --- a/tools/saved_flag_renames.txt +++ b/tools/saved_flag_renames.txt @@ -1378,7 +1378,7 @@ GameFlag(1376) GF_FLO10_ShowedLilyTheWaterStone GameFlag(1377) GF_FLO11_Defeated_Lakitus GameFlag(1378) GF_FLO12_Met_Rosie GameFlag(1379) GF_FLO12_RosieRequestedSomethingBeautiful -GameFlag(1380) GF_Unused_FLO_12 +GameFlag(1380) GF_FLO12_HeldItemPickup GameFlag(1381) GF_FLO08_Item_StarPiece GameFlag(1382) GF_FLO09_Item_HappyFlowerB GameFlag(1383) GF_FLO10_Tree1_JamminJelly diff --git a/ver/us/asm/data/world/area_jan/jan_11/B710F0.data.s b/ver/us/asm/data/world/area_jan/jan_11/B710F0.data.s index 5cd8509633..7d6684488f 100644 --- a/ver/us/asm/data/world/area_jan/jan_11/B710F0.data.s +++ b/ver/us/asm/data/world/area_jan/jan_11/B710F0.data.s @@ -15,7 +15,7 @@ dlabel D_802415EC_B71E4C .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241ABC_B7231C -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000023, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, jan_11_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802415EC_B71E4C, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000023, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, jan_11_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802415EC_B71E4C, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241C94_B724F4 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80241ABC_B7231C, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_obk/obk_01/BC11A0.data.s b/ver/us/asm/data/world/area_obk/obk_01/BC11A0.data.s index cbc7a07c30..c18666790b 100644 --- a/ver/us/asm/data/world/area_obk/obk_01/BC11A0.data.s +++ b/ver/us/asm/data/world/area_obk/obk_01/BC11A0.data.s @@ -30,7 +30,7 @@ dlabel D_80244158_BC12F8 .word 0x00000000 dlabel D_8024415C_BC12FC -.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C81, 0x00000043, 0x00000001, ShowKeyChoicePopup, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000000, 0x00000016, 0x00000001, 0xFFFFFFFF, 0x0000001C, 0x00000000, 0x00000043, 0x00000002, RemoveKeyItemAt, 0xFE363C81, 0x00000043, 0x00000004, GetPlayerPos, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000004, obk_01_AddPlayerHandsOffset, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000042, 0x00000002, 0xFE363C80, 0x00050000, 0x00000043, 0x00000007, MakeItemEntity, 0xFE363C80, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000001, 0x00000000, 0x00000043, 0x00000002, SetPlayerAnimation, 0x00060005, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000002, SetPlayerAnimation, 0x00010002, 0x00000043, 0x00000002, RemoveItemEntity, 0xFE363C80, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80240B78_BBDD18, 0xFE363C8A, 0x00000043, 0x00000001, CloseChoicePopup, 0x00000048, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, func_80240BB0_BBDD50, 0xFE363C80, 0x0000004E, 0x00000006, D_8024415C_BC12FC, 0x00000010, 0x00000000, flo_08_tree1, 0x00000000, 0x00000001, 0x00000043, 0x00000002, func_80240B24_BBDCC4, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C81, 0x00000043, 0x00000001, ShowKeyChoicePopup, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000000, 0x00000016, 0x00000001, 0xFFFFFFFF, 0x0000001C, 0x00000000, 0x00000043, 0x00000002, RemoveKeyItemAt, 0xFE363C81, 0x00000043, 0x00000004, GetPlayerPos, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000004, obk_01_AddPlayerHandsOffset, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000042, 0x00000002, 0xFE363C80, 0x00050000, 0x00000043, 0x00000007, MakeItemEntity, 0xFE363C80, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000001, 0x00000000, 0x00000043, 0x00000002, SetPlayerAnimation, 0x00060005, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000002, SetPlayerAnimation, 0x00010002, 0x00000043, 0x00000002, RemoveItemEntity, 0xFE363C80, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80240B78_BBDD18, 0xFE363C8A, 0x00000043, 0x00000001, CloseChoicePopup, 0x00000048, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, func_80240BB0_BBDD50, 0xFE363C80, 0x0000004E, 0x00000006, D_8024415C_BC12FC, 0x00000010, 0x00000000, obk_01_802458F0, 0x00000000, 0x00000001, 0x00000043, 0x00000002, func_80240B24_BBDCC4, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802442F0_BC1490 .word 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000005, GetNpcPos, 0xFFFFFFFC, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000004, obk_01_LetterDelivery_CalcLetterPos, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000005, SetItemPos, 0xFE363C80, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 @@ -39,7 +39,7 @@ dlabel D_80244370_BC1510 .word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C81, 0x00000043, 0x00000001, ShowKeyChoicePopup, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000000, 0x00000016, 0x00000001, 0xFFFFFFFF, 0x0000001C, 0x00000000, 0x00000043, 0x00000002, RemoveKeyItemAt, 0xFE363C81, 0x00000043, 0x00000002, DisablePartnerAI, 0x00000000, 0x00000043, 0x00000005, GetNpcPos, 0xFFFFFFFC, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000004, obk_01_LetterDelivery_CalcLetterPos, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000042, 0x00000002, 0xFE363C80, 0x00050000, 0x00000043, 0x00000007, MakeItemEntity, 0xFE363C80, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000001, 0x00000000, 0x00000045, 0x00000002, D_802442F0_BC1490, 0xFE363C8A, 0x00000043, 0x00000003, SetNpcAnimation, 0xFFFFFFFC, 0x00040002, 0x00000043, 0x00000004, GetAngleBetweenNPCs, 0xFE363C89, 0xFFFFFFFC, 0xFE363C8B, 0x00000043, 0x00000005, GetNpcPos, 0xFFFFFFFC, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000005, GetNpcPos, 0xFE363C89, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000043, 0x00000004, SetNpcFlagBits, 0xFFFFFFFC, 0x00000100, 0x00000001, 0x0000000E, 0x00000002, 0xFE363C8B, 0x000000B4, 0x00000027, 0x00000002, 0xFE363C86, 0x00000014, 0x00000012, 0x00000000, 0x00000027, 0x00000002, 0xFE363C86, 0xFFFFFFEC, 0x00000013, 0x00000000, 0x00000027, 0x00000002, 0xFE363C87, 0x0000000A, 0x00000043, 0x00000003, SetNpcJumpscale, 0xFFFFFFFC, 0xF24A7A80, 0x00000043, 0x00000006, NpcJump1, 0xFFFFFFFC, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000014, 0x00000049, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000002, RemoveItemEntity, 0xFE363C80, 0x00000008, 0x00000001, 0x00000014, 0x00000043, 0x00000003, GetNpcYaw, 0xFFFFFFFC, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C8A, 0x000000B4, 0x00000043, 0x00000004, InterpNpcYaw, 0xFFFFFFFC, 0xFE363C8A, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000006, NpcJump1, 0xFFFFFFFC, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000014, 0x00000043, 0x00000003, SetNpcAnimation, 0xFFFFFFFC, 0x00040001, 0x00000043, 0x00000004, NpcFaceNpc, 0xFFFFFFFC, 0xFE363C89, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000004, SetNpcFlagBits, 0xFFFFFFFC, 0x00000100, 0x00000000, 0x00000043, 0x00000001, EnablePartnerAI, 0x00000008, 0x00000001, 0x00000005, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80240B78_BBDD18, 0xFE363C8A, 0x00000043, 0x00000001, CloseChoicePopup, 0x00000048, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80244694_BC1834 -.word 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C8B, 0x00000024, 0x00000002, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000002, func_80240BB0_BBDD50, 0xFE363C80, 0x0000004E, 0x00000006, D_80244370_BC1510, 0x00000010, 0x00000000, flo_08_tree1, 0x00000000, 0x00000001, 0x00000043, 0x00000002, func_80240B24_BBDCC4, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C8B, 0x00000024, 0x00000002, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000002, func_80240BB0_BBDD50, 0xFE363C80, 0x0000004E, 0x00000006, D_80244370_BC1510, 0x00000010, 0x00000000, obk_01_802458F0, 0x00000000, 0x00000001, 0x00000043, 0x00000002, func_80240B24_BBDCC4, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80244704_BC18A4 .word 0x00000024, 0x00000002, 0xFE363C8C, 0x00000000, 0x0000000C, 0x00000002, 0xF5DE0180, 0xFFFFFFBA, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000001, obk_01_LetterDelivery_SaveNpcAnim, 0x00000043, 0x00000002, GetCurrentPartnerID, 0xFE363C80, 0x00000043, 0x00000003, FindKeyItem, 0xFE363C85, 0xFE363C81, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000004, 0x0000000B, 0x00000002, 0xFE363C81, 0xFFFFFFFF, 0x00000043, 0x00000002, DisablePartnerAI, 0x00000000, 0x00000043, 0x00000003, PlayerFaceNpc, 0xFE363C82, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, GetNpcPos, 0xFE363C82, 0xFE363C8D, 0xFE363C80, 0xFE363C8E, 0x00000043, 0x00000005, GetNpcPos, 0xFFFFFFFC, 0xFE363C8D, 0xFE363C8E, 0xFE363C8F, 0x00000043, 0x00000003, SetNpcJumpscale, 0xFFFFFFFC, 0xF24A7A80, 0x00000027, 0x00000002, 0xFE363C80, 0x0000000A, 0x00000043, 0x00000006, NpcJump1, 0xFFFFFFFC, 0xFE363C8D, 0xFE363C80, 0xFE363C8F, 0x0000000A, 0x00000043, 0x00000007, SpeakToNpc, 0xFFFFFFFC, 0x00040006, 0x00040001, 0x00000000, 0xFE363C82, 0xFE363C87, 0x00000043, 0x00000001, EnablePartnerAI, 0x00000046, 0x00000001, D_80244694_BC1834, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0xFFFFFFFF, 0x00000043, 0x00000002, DisablePartnerAI, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000006, SpeakToPlayer, 0xFFFFFFFC, 0x00040006, 0x00040001, 0x00000005, 0xFE363C88, 0x00000043, 0x00000001, EnablePartnerAI, 0x00000024, 0x00000002, 0xFE363C8C, 0x00000001, 0x0000001C, 0x00000000, 0x00000043, 0x00000002, DisablePartnerAI, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000006, SpeakToPlayer, 0xFFFFFFFC, 0x00040006, 0x00040001, 0x00000005, 0xFE363C89, 0x0000000B, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000043, 0x00000006, SpeakToPlayer, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0x00000000, 0xFE363C8A, 0x00000013, 0x00000000, 0x00000043, 0x00000001, EnablePartnerAI, 0x0000000B, 0x00000002, 0xFE363C86, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C86, 0x00000024, 0x00000002, 0xFE363C81, 0x00000001, 0x00000046, 0x00000001, D_802440F4_BC1294, 0x00000043, 0x00000002, AddKeyItem, 0xFE363C86, 0x00000013, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8C, 0x00000002, 0x00000023, 0x00000000, 0x00000013, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000001, obk_01_LetterDelivery_RestoreNpcAnim, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_omo/omo_13/DE3F70.data.s b/ver/us/asm/data/world/area_omo/omo_13/DE3F70.data.s index bda99b64d6..0b650c14e9 100644 --- a/ver/us/asm/data/world/area_omo/omo_13/DE3F70.data.s +++ b/ver/us/asm/data/world/area_omo/omo_13/DE3F70.data.s @@ -33,7 +33,7 @@ dlabel D_80241C0C_DE409C .word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C81, 0x00000043, 0x00000001, ShowConsumableChoicePopup, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000000, 0x00000016, 0x00000001, 0xFFFFFFFF, 0x0000001C, 0x00000000, 0x00000043, 0x00000002, RemoveItemAt, 0xFE363C81, 0x00000043, 0x00000004, GetPlayerPos, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000004, omo_13_AddPlayerHandsOffset, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000007, MakeItemEntity, 0xFE363C80, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000001, 0x00000000, 0x00000043, 0x00000002, SetPlayerAnimation, 0x00060005, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000002, SetPlayerAnimation, 0x00010002, 0x00000043, 0x00000002, RemoveItemEntity, 0xFE363C80, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80240F54_DE33E4, 0xFE363C8A, 0x00000043, 0x00000001, CloseChoicePopup, 0x00000048, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241D40_DE41D0 -.word 0x00000043, 0x00000002, func_80240F8C_DE341C, 0xFE363C80, 0x0000004E, 0x00000006, D_80241C0C_DE409C, 0x00000010, 0x00000000, flo_10_npcSettings_80243220, 0x00000000, 0x00000001, 0x00000043, 0x00000002, func_80240F00_DE3390, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x00000043, 0x00000002, func_80240F8C_DE341C, 0xFE363C80, 0x0000004E, 0x00000006, D_80241C0C_DE409C, 0x00000010, 0x00000000, omo_13_80243220, 0x00000000, 0x00000001, 0x00000043, 0x00000002, func_80240F00_DE3390, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241D90_DE4220 .word 0x000000D0, 0xFFFFFFFF diff --git a/ver/us/asm/data/world/area_tik/tik_01/86B350.data.s b/ver/us/asm/data/world/area_tik/tik_01/86B350.data.s index a33b185504..91175ac8e6 100644 --- a/ver/us/asm/data/world/area_tik/tik_01/86B350.data.s +++ b/ver/us/asm/data/world/area_tik/tik_01/86B350.data.s @@ -6,7 +6,7 @@ dlabel D_80241EA0_86B350 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242370_86B820 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000012, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_01_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241EA0_86B350, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000012, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_01_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241EA0_86B350, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242548_86B9F8 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80242370_86B820, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000012, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_02/86D800.data.s b/ver/us/asm/data/world/area_tik/tik_02/86D800.data.s index b689ff57c7..bbff88add5 100644 --- a/ver/us/asm/data/world/area_tik/tik_02/86D800.data.s +++ b/ver/us/asm/data/world/area_tik/tik_02/86D800.data.s @@ -18,7 +18,7 @@ dlabel D_802412B0_86D9F0 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241780_86DEC0 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000011, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_02_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802412B0_86D9F0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000011, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_02_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802412B0_86D9F0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241958_86E098 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80241780_86DEC0, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000011, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_03/870B60.data.s b/ver/us/asm/data/world/area_tik/tik_03/870B60.data.s index 2a5b81f9f0..0476ac9064 100644 --- a/ver/us/asm/data/world/area_tik/tik_03/870B60.data.s +++ b/ver/us/asm/data/world/area_tik/tik_03/870B60.data.s @@ -6,7 +6,7 @@ dlabel D_80242060_870B60 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242530_871030 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000014, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_03_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80242060_870B60, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000014, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_03_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80242060_870B60, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242708_871208 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80242530_871030, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000014, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_04/8739F0.data.s b/ver/us/asm/data/world/area_tik/tik_04/8739F0.data.s index c153d04657..a24897c6a3 100644 --- a/ver/us/asm/data/world/area_tik/tik_04/8739F0.data.s +++ b/ver/us/asm/data/world/area_tik/tik_04/8739F0.data.s @@ -6,7 +6,7 @@ dlabel D_80241FC0_8739F0 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242490_873EC0 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000010, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_04_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241FC0_8739F0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000010, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_04_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241FC0_8739F0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242668_874098 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80242490_873EC0, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000010, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_05/875D10.data.s b/ver/us/asm/data/world/area_tik/tik_05/875D10.data.s index 09f2d131f5..9fe64bd829 100644 --- a/ver/us/asm/data/world/area_tik/tik_05/875D10.data.s +++ b/ver/us/asm/data/world/area_tik/tik_05/875D10.data.s @@ -6,7 +6,7 @@ dlabel D_80240F50_875D10 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241420_8761E0 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x0000000F, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_05_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80240F50_875D10, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x0000000F, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_05_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80240F50_875D10, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802415F8_8763B8 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80241420_8761E0, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x0000000F, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_06/877840.data.s b/ver/us/asm/data/world/area_tik/tik_06/877840.data.s deleted file mode 100644 index 763ca8325d..0000000000 --- a/ver/us/asm/data/world/area_tik/tik_06/877840.data.s +++ /dev/null @@ -1,6 +0,0 @@ -.include "macro.inc" - -.section .data - -dlabel D_80240960_877840 -.word 0xC4020000, 0xC1200000, 0x00000000, 0x42B40000, 0x432A0000, 0xC1200000, 0x00000000, 0x43870000, 0xC3FA0000, 0x42B40000, 0xC2B40000, 0x42B40000, 0xC3740000, 0xC1200000, 0xC2DC0000, 0x42B40000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80241B24, D_80240960_877840, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00190028, 0x00000043, 0x00000005, SetMusicTrack, 0x00000000, 0x0000004B, 0x00000000, 0x00000008, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_06/8778F0.data.s b/ver/us/asm/data/world/area_tik/tik_06/8778F0.data.s deleted file mode 100644 index ff05bc4401..0000000000 --- a/ver/us/asm/data/world/area_tik/tik_06/8778F0.data.s +++ /dev/null @@ -1,45 +0,0 @@ -.include "macro.inc" - -.section .data - -dlabel D_80240A10_8778F0 -.word 0x00000043, 0x00000002, DisablePlayerInput, 0x00000001, 0x00000043, 0x00000002, DisablePlayerPhysics, 0x00000001, 0x00000043, 0x00000002, DisablePartnerAI, 0x00000000, 0x00000043, 0x00000002, HidePlayerShadow, 0x00000001, 0x00000043, 0x00000002, SetPlayerAnimation, 0x00010000, 0x00000043, 0x00000002, GetCurrentPartnerID, 0xFE363C80, 0x0000000B, 0x00000002, 0xFE363C80, 0x00000000, 0x00000043, 0x00000003, EnableNpcShadow, 0xFFFFFFFC, 0x00000000, 0x00000043, 0x00000005, SetNpcPos, 0xFFFFFFFC, 0x00000000, 0xFFFFFC18, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000002, GetEntryID, 0xFE363C80, 0x00000043, 0x00000001, tik_06_Pipe_GetEntryPos, 0x00000028, 0x00000002, 0xFE363C82, 0x00000028, 0x00000043, 0x00000004, SetPlayerPos, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000043, 0x00000003, InterpPlayerYaw, 0xFE363C84, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x00000163, 0x00000043, 0x00000002, func_802D286C, 0x00000100, 0x00000043, 0x00000007, func_802D2520, 0x00010000, 0x00000005, 0x00000002, 0x00000001, 0x00000001, 0x00000000, 0x00000043, 0x00000004, GetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000005, 0x00000001, 0x00000028, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000043, 0x00000004, SetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0x00000003, 0x00000043, 0x00000002, GetCurrentPartnerID, 0xFE363C80, 0x0000000B, 0x00000002, 0xFE363C80, 0x00000000, 0x00000056, 0x00000000, 0x00000043, 0x00000002, DisablePartnerAI, 0x00000000, 0x00000043, 0x00000004, GetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000028, 0x00000002, 0xFE363C82, 0x00000003, 0x00000043, 0x00000005, SetNpcPos, 0xFFFFFFFC, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, SetNpcFlagBits, 0xFFFFFFFC, 0x00000002, 0x00000000, 0x00000043, 0x00000001, EnablePartnerAI, 0x00000043, 0x00000003, EnableNpcShadow, 0xFFFFFFFC, 0x00000001, 0x00000057, 0x00000000, 0x00000013, 0x00000000, 0x00000008, 0x00000001, 0x00000002, 0x00000043, 0x00000007, func_802D2520, 0x00010000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, SetPlayerAnimation, 0x00010002, 0x00000043, 0x00000002, DisablePlayerPhysics, 0x00000000, 0x00000043, 0x00000002, DisablePlayerInput, 0x00000000, 0x00000043, 0x00000002, HidePlayerShadow, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000001, tik_06_Pipe_GetCurrentFloor, 0x00000008, 0x00000001, 0x00000001, 0x0000000B, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000004, 0x00000001, 0x00000000, 0x00000013, 0x00000000, 0x00000044, 0x00000001, 0xFE363C8A, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80240D64_877C44 -.word 0x00000043, 0x00000002, DisablePlayerInput, 0x00000001, 0x00000043, 0x00000002, DisablePlayerPhysics, 0x00000001, 0x00000043, 0x00000002, HidePlayerShadow, 0x00000001, 0x00000043, 0x00000004, ModifyColliderFlags, 0x00000000, 0xFE363C8B, 0x7FFFFE00, 0x00000043, 0x00000002, GetEntryID, 0xFE363C80, 0x00000043, 0x00000001, tik_06_Pipe_GetEntryPos, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C86, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C87, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C82, 0x00000002, 0x00000043, 0x00000004, SetPlayerPos, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000043, 0x00000003, InterpPlayerYaw, 0xFE363C84, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C84, 0x0000005A, 0x00000027, 0x00000002, 0xFE363C85, 0x00000028, 0x00000012, 0x00000000, 0x00000028, 0x00000002, 0xFE363C85, 0x00000028, 0x00000013, 0x00000000, 0x00000043, 0x00000005, UseSettingsFrom, 0x00000000, 0xFE363C85, 0xFE363C86, 0xFE363C87, 0x00000043, 0x00000005, SetPanTarget, 0x00000000, 0xFE363C85, 0xFE363C86, 0xFE363C87, 0x00000043, 0x00000003, SetCamSpeed, 0x00000000, 0xF24BE280, 0x00000043, 0x00000004, PanToTarget, 0x00000000, 0x00000000, 0x00000001, 0x00000043, 0x00000002, GetCurrentPartnerID, 0xFE363C80, 0x0000000B, 0x00000002, 0xFE363C80, 0x00000000, 0x00000043, 0x00000002, DisablePartnerAI, 0x00000000, 0x00000043, 0x00000003, EnableNpcShadow, 0xFFFFFFFC, 0x00000000, 0x00000043, 0x00000005, SetNpcPos, 0xFFFFFFFC, 0x00000000, 0xFFFFFC18, 0x00000000, 0x00000043, 0x00000004, InterpNpcYaw, 0xFFFFFFFC, 0xFE363C80, 0x00000000, 0x00000013, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, PlaySound, 0x00000163, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000019, 0x00000043, 0x00000002, HidePlayerShadow, 0x00000000, 0x00000057, 0x00000000, 0x00000043, 0x00000002, func_802D286C, 0x00000900, 0x00000043, 0x00000007, func_802D2520, 0x00010002, 0x00000005, 0x00000003, 0x00000001, 0x00000001, 0x00000000, 0x00000005, 0x00000001, 0x00000028, 0x00000043, 0x00000002, tik_06_Pipe_GetPointAheadOfPlayer, 0xF24A7E80, 0x00000043, 0x00000004, SetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000002, GetCurrentPartnerID, 0xFE363C80, 0x0000000B, 0x00000002, 0xFE363C80, 0x00000000, 0x00000056, 0x00000000, 0x00000043, 0x00000004, GetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000028, 0x00000002, 0xFE363C82, 0x00000003, 0x00000043, 0x00000005, SetNpcPos, 0xFFFFFFFC, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, EnableNpcShadow, 0xFFFFFFFC, 0x00000001, 0x00000043, 0x00000001, EnablePartnerAI, 0x00000057, 0x00000000, 0x00000013, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000007, func_802D2520, 0x00010002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000004, ModifyColliderFlags, 0x00000001, 0xFE363C8B, 0x7FFFFE00, 0x00000043, 0x00000002, DisablePlayerInput, 0x00000000, 0x00000043, 0x00000002, DisablePlayerPhysics, 0x00000000, 0x00000043, 0x00000004, PanToTarget, 0x00000000, 0x00000000, 0x00000000, 0x00000044, 0x00000001, 0xFE363C8A, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80241154_878034 -.word 0x00000043, 0x00000001, tik_06_Pipe_AwaitDownInput, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000000, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000002, GetCurrentPartner, 0xFE363C80, 0x0000000B, 0x00000002, 0xFE363C80, 0x00000000, 0x00000043, 0x00000002, GetCurrentPartnerID, 0xFE363C81, 0x0000000B, 0x00000002, 0xFE363C81, 0x00000006, 0x00000002, 0x00000000, 0x00000012, 0x00000000, 0x00000043, 0x00000001, InterruptUsePartner, 0x00000043, 0x00000002, DisablePlayerInput, 0x00000001, 0x00000013, 0x00000000, 0x00000012, 0x00000000, 0x00000043, 0x00000002, DisablePlayerInput, 0x00000001, 0x00000013, 0x00000000, 0x00000046, 0x00000001, D_80241230_878110, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80241230_878110 -.word 0x00000043, 0x00000001, tik_06_Pipe_SetAnimFlag, 0x0000004D, 0x00000001, 0x0000001B, 0x00000043, 0x00000002, DisablePlayerPhysics, 0x00000001, 0x00000043, 0x00000002, HidePlayerShadow, 0x00000001, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x00000043, 0x00000001, tik_06_Pipe_GetEntryPos, 0x00000043, 0x00000004, PlayerMoveTo, 0xFE363C81, 0xFE363C83, 0x00000003, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x00000043, 0x00000001, tik_06_Pipe_GetEntryPos, 0x00000043, 0x00000004, SetPlayerPos, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000043, 0x00000003, SetPlayerFlagBits, 0x00200000, 0x00000001, 0x00000043, 0x00000001, tik_06_Pipe_GetCameraYaw, 0x00000043, 0x00000003, InterpPlayerYaw, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000002, 0x00000043, 0x00000003, SetPlayerFlagBits, 0x00200000, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x00000163, 0x00000043, 0x00000004, GetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000004, 0x00000005, 0x00000001, 0x00000028, 0x00000028, 0x00000002, 0xFE363C81, 0x00000001, 0x00000043, 0x00000004, SetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000057, 0x00000000, 0x00000043, 0x00000002, func_802D286C, 0x00000800, 0x00000043, 0x00000007, func_802D2520, 0x00010002, 0x00000005, 0x00000002, 0x00000001, 0x00000001, 0x00000000, 0x00000008, 0x00000001, 0x00000019, 0x00000046, 0x00000001, 0xFE363C8C, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_8024140C_8782EC -.word 0x00000043, 0x00000002, IsPlayerOnValidFloor, 0xFE363C80, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000000, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000002, GetPlayerActionState, 0xFE363C80, 0x0000000A, 0x00000002, 0xFE363C80, 0x0000001A, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000002, GetCurrentPartner, 0xFE363C80, 0x0000000B, 0x00000002, 0xFE363C80, 0x00000000, 0x00000043, 0x00000002, GetCurrentPartnerID, 0xFE363C81, 0x0000000B, 0x00000002, 0xFE363C81, 0x00000006, 0x00000002, 0x00000000, 0x00000012, 0x00000000, 0x00000043, 0x00000001, InterruptUsePartner, 0x00000043, 0x00000002, DisablePlayerInput, 0x00000001, 0x00000013, 0x00000000, 0x00000012, 0x00000000, 0x00000043, 0x00000002, DisablePlayerInput, 0x00000001, 0x00000013, 0x00000000, 0x0000004D, 0x00000001, 0x0000001B, 0x00000043, 0x00000001, tik_06_Pipe_SetAnimFlag, 0x00000043, 0x00000002, DisablePlayerPhysics, 0x00000001, 0x00000043, 0x00000004, ModifyColliderFlags, 0x00000000, 0xFE363C8B, 0x7FFFFE00, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x00000043, 0x00000001, tik_06_Pipe_GetEntryPos, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C86, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C86, 0x00000002, 0x00000024, 0x00000002, 0xFE363C87, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C88, 0xFE363C84, 0x00000027, 0x00000002, 0xFE363C88, 0x000000B4, 0x0000000F, 0x00000002, 0xFE363C84, 0x00000168, 0x00000028, 0x00000002, 0xFE363C84, 0x00000168, 0x00000013, 0x00000000, 0x00000043, 0x00000003, InterpPlayerYaw, 0xFE363C88, 0x00000001, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, PlaySound, 0x00000163, 0x00000043, 0x00000004, GetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, SetPlayerPos, 0xFE363C80, 0xFE363C86, 0xFE363C87, 0x00000043, 0x00000002, SetPlayerAnimation, 0x00010000, 0x00000043, 0x00000002, func_802D286C, 0x00000800, 0x00000043, 0x00000007, func_802D2520, 0x00010000, 0x00000005, 0x00000003, 0x00000001, 0x00000001, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000008, 0x00000043, 0x00000002, HidePlayerShadow, 0x00000001, 0x00000057, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000003, 0x00000005, 0x00000001, 0x00000028, 0x00000043, 0x00000002, tik_06_Pipe_GetPointAheadOfPlayer, 0xF24A7E80, 0x00000043, 0x00000004, SetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000057, 0x00000000, 0x00000008, 0x00000001, 0x00000019, 0x00000046, 0x00000001, 0xFE363C8C, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80241740_878620 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C85, 0x00000001, 0x0000000A, 0x00000002, 0xFE363C86, 0x00000001, 0x0000000A, 0x00000002, 0xFE363C87, 0x00000001, 0x0000000A, 0x00000002, 0xFE363C88, 0x00000001, 0x00000043, 0x00000001, tik_06_UpdateTexturePanSmooth, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000013, 0x00000000, 0x00000013, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000001, tik_06_UpdateTexturePanStepped, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_802417DC_8786BC -.word 0x0000004D, 0x00000001, 0x0000001B, 0x00000043, 0x00000003, UseExitHeading, 0x0000003C, 0x00000000, 0x00000044, 0x00000001, ExitWalk, 0x00000043, 0x00000003, GotoMap, 0x80242CD0, 0x00000000, 0x00000008, 0x00000001, 0x00000064, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80241838_878718 -.word 0x0000004D, 0x00000001, 0x0000001B, 0x00000043, 0x00000003, UseExitHeading, 0x0000003C, 0x00000001, 0x00000044, 0x00000001, ExitWalk, 0x00000043, 0x00000003, GotoMap, 0x80242CD8, 0x00000000, 0x00000008, 0x00000001, 0x00000064, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80241894_878774 -.word 0x00000043, 0x00000003, GotoMap, 0x80242CE0, 0x00000004, 0x00000008, 0x00000001, 0x00000064, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_802418C4_8787A4 -.word 0x0000004D, 0x00000001, 0x0000001B, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000003, 0x00000024, 0x00000002, 0xFE363C8B, 0x00000019, 0x00000024, 0x00000002, 0xFE363C8C, D_80241894_878774, 0x00000046, 0x00000001, D_8024140C_8782EC, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_8024191C_8787FC -.word 0x00000043, 0x00000003, GotoMap, 0x80242CE8, 0x00000003, 0x00000008, 0x00000001, 0x00000064, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_8024194C_87882C -.word 0x0000004D, 0x00000001, 0x0000001B, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000002, 0x00000024, 0x00000002, 0xFE363C8B, 0x00000016, 0x00000024, 0x00000002, 0xFE363C8C, D_8024191C_8787FC, 0x00000046, 0x00000001, D_80241154_878034, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_802419A4_878884 -.word 0x00000047, 0x00000005, D_802417DC_8786BC, 0x00080000, 0x0000000B, 0x00000001, 0x00000000, 0x00000047, 0x00000005, D_80241838_878718, 0x00080000, 0x00000011, 0x00000001, 0x00000000, 0x00000047, 0x00000005, D_802418C4_8787A4, 0x00000040, 0x00000019, 0x00000001, 0x00000000, 0x00000047, 0x00000005, D_8024194C_87882C, 0x00000080, 0x00000016, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80241A24_878904 -.word 0x00000043, 0x00000002, GetLoadType, 0xFE363C81, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000044, 0x00000001, EnterSavePoint, 0x00000044, 0x00000001, D_802419A4_878884, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000002, GetEntryID, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000002, 0x00000024, 0x00000002, 0xFE363C8A, D_802419A4_878884, 0x00000044, 0x00000001, D_80240A10_8778F0, 0x00000016, 0x00000001, 0x00000003, 0x00000024, 0x00000002, 0xFE363C8A, D_802419A4_878884, 0x00000024, 0x00000002, 0xFE363C8B, 0x00000019, 0x00000044, 0x00000001, D_80240D64_877C44, 0x0000001C, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, D_802419A4_878884, 0x00000044, 0x00000001, EnterWalk, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000024, 0x00000002, 0xF5DE0329, 0x00000002, 0x00000043, 0x00000002, SetSpriteShading, 0x00000005, 0x00000043, 0x00000006, SetCamPerspective, 0x00000000, 0x00000003, 0x00000019, 0x00000010, 0x00001000, 0x00000043, 0x00000005, SetCamBGColor, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, SetCamEnabled, 0x00000000, 0x00000001, 0x00000043, 0x00000003, SetCamLeadPlayer, 0x00000000, 0x00000000, 0x00000024, 0x00000002, 0xF840632D, 0x00000001, 0x00000046, 0x00000001, 0x80242B38, 0x00000044, 0x00000001, 0x802409E0, 0x00000043, 0x00000002, PlaySound, 0x8000002F, 0x00000043, 0x00000006, PlaySoundAtF, 0x80000030, 0x00000001, 0xFFFFFFAB, 0xFFFFFF4C, 0x00000078, 0x00000043, 0x00000006, PlaySoundAtF, 0x80000031, 0x00000001, 0xFFFFFFE7, 0xFFFFFF74, 0xFFFFFF7E, 0x00000043, 0x00000006, PlaySoundAtF, 0x80000032, 0x00000001, 0xFFFFFFDD, 0xFFFFFF4C, 0x00000082, 0x00000044, 0x00000001, 0x80242948, 0x00000043, 0x00000003, EnableTexPanning, 0x0000000D, 0x00000001, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0x00000001, 0x00000024, 0x00000002, 0xFE363C81, 0x00000032, 0x00000024, 0x00000002, 0xFE363C82, 0x000000C8, 0x00000024, 0x00000002, 0xFE363C83, 0x0000006E, 0x00000024, 0x00000002, 0xFE363C84, 0x000001F4, 0x00000024, 0x00000002, 0xFE363C85, 0x00000001, 0x00000024, 0x00000002, 0xFE363C86, 0x00000001, 0x00000024, 0x00000002, 0xFE363C87, 0x00000001, 0x00000024, 0x00000002, 0xFE363C88, 0x00000001, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8B, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8C, 0x00000000, 0x00000044, 0x00000001, D_80241740_878620, 0x00000057, 0x00000000, 0x00000043, 0x00000003, EnableTexPanning, 0x0000000F, 0x00000001, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0x00000002, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFF38, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFF9C, 0x00000024, 0x00000002, 0xFE363C84, 0xFFFFFE0C, 0x00000024, 0x00000002, 0xFE363C85, 0x00000001, 0x00000024, 0x00000002, 0xFE363C86, 0x00000001, 0x00000024, 0x00000002, 0xFE363C87, 0x00000001, 0x00000024, 0x00000002, 0xFE363C88, 0x00000001, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8B, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8C, 0x00000000, 0x00000044, 0x00000001, D_80241740_878620, 0x00000057, 0x00000000, 0x00000043, 0x00000003, EnableTexPanning, 0x00000010, 0x00000001, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0x00000003, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFF06, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFF9C, 0x00000024, 0x00000002, 0xFE363C84, 0xFFFFFE0C, 0x00000024, 0x00000002, 0xFE363C85, 0x00000001, 0x00000024, 0x00000002, 0xFE363C86, 0x00000001, 0x00000024, 0x00000002, 0xFE363C87, 0x00000001, 0x00000024, 0x00000002, 0xFE363C88, 0x00000001, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8B, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8C, 0x00000000, 0x00000044, 0x00000001, D_80241740_878620, 0x00000057, 0x00000000, 0x00000043, 0x00000003, EnableTexPanning, 0x00000011, 0x00000001, 0x00000043, 0x00000003, EnableTexPanning, 0x00000013, 0x00000001, 0x00000043, 0x00000003, EnableTexPanning, 0x00000015, 0x00000001, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0x00000004, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFFCE, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFC7C, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFFBA, 0x00000024, 0x00000002, 0xFE363C84, 0xFFFFFB50, 0x00000024, 0x00000002, 0xFE363C85, 0x00000001, 0x00000024, 0x00000002, 0xFE363C86, 0x00000001, 0x00000024, 0x00000002, 0xFE363C87, 0x00000001, 0x00000024, 0x00000002, 0xFE363C88, 0x00000001, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8B, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8C, 0x00000000, 0x00000044, 0x00000001, D_80241740_878620, 0x00000057, 0x00000000, 0x00000024, 0x00000002, 0xF8405C87, 0x00000000, 0x00000044, 0x00000001, D_80241A24_878904, 0x00000008, 0x00000001, 0x00000001, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_06/878F90.data.s b/ver/us/asm/data/world/area_tik/tik_06/878F90.data.s deleted file mode 100644 index 3a3e22c3da..0000000000 --- a/ver/us/asm/data/world/area_tik/tik_06/878F90.data.s +++ /dev/null @@ -1,15 +0,0 @@ -.include "macro.inc" - -.section .data - -dlabel D_802420B0_878F90 -.word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80242580_879460 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000020, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_06_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802420B0_878F90, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80242758_879638 -.word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80242580_879460, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000020, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80242904_8797E4 -.word 0x00000002, 0xFFFFFE00, 0xFFFFFFF2, 0x000000AD, 0x00000054, 0x000000C8, 0xFFFFFFF6, 0x0000003C, 0x00000002, 0x0000003F, 0xFFFFFF97, 0x00000067, 0x000000B6, 0x000000C8, 0xFFFFFFF6, 0x0000003C, 0x00000001, 0x00000024, 0x00000002, 0xFE363C80, D_80242904_8797E4, 0x00000044, 0x00000001, D_80242758_879638, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_06/879860.data.s b/ver/us/asm/data/world/area_tik/tik_06/879860.data.s deleted file mode 100644 index 93c661981d..0000000000 --- a/ver/us/asm/data/world/area_tik/tik_06/879860.data.s +++ /dev/null @@ -1,15 +0,0 @@ -.include "macro.inc" - -.section .data - -dlabel D_80242980_879860 -.word 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000004, GetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x00000001, 0x0000000D, 0x00000002, 0xFE363C80, 0xFFFFFF1A, 0x00000004, 0x00000001, 0x00000000, 0x00000013, 0x00000000, 0x0000000F, 0x00000002, 0xFE363C81, 0xFFFFFFF6, 0x00000004, 0x00000001, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000006, func_802CA988, 0x00000000, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000004, GetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x00000001, 0x0000000D, 0x00000002, 0xFE363C81, 0xFFFFFFBA, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000043, 0x00000003, GotoMap, 0x80242CF0, 0x00000002, 0x00000008, 0x00000001, 0x00000064, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80242A9C_87997C -.word 0x00000024, 0x00000002, 0xF8405D06, 0x00000001, 0x00000044, 0x00000001, D_80242980_879860, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80242AC8_8799A8 -.word 0x00000024, 0x00000002, 0xF8405D07, 0x00000001, 0x00000043, 0x00000004, ModifyColliderFlags, 0x00000000, 0x00000014, 0x7FFFFE00, 0x00000002, 0x00000000, 0x00000001, 0x00000000 - -dlabel D_80242B00_8799E0 -.word 0x00000024, 0x00000002, 0xF8405D08, 0x00000001, 0x00000043, 0x00000004, ModifyColliderFlags, 0x00000000, 0x0000000E, 0x7FFFFE00, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000007, MakeEntity, Entity_SavePoint, 0x00000078, 0x00000032, 0xFFFFFFB5, 0x00000000, 0x80000000, 0x00000043, 0x00000003, EnableModel, 0x00000023, 0x00000000, 0x00000043, 0x00000004, ModifyColliderFlags, 0x00000000, 0x00000008, 0x7FFFFE00, 0x0000000A, 0x00000002, 0xF8405D06, 0x00000000, 0x00000043, 0x00000007, MakeEntity, Entity_BoardedFloor, 0xFFFFFE99, 0xFFFFFFF6, 0xFFFFFFF7, 0x00000000, 0x80000000, 0x00000043, 0x00000002, AssignScript, D_80242A9C_87997C, 0x00000012, 0x00000000, 0x00000044, 0x00000001, D_80242980_879860, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xF8405D07, 0x00000000, 0x00000043, 0x00000007, MakeEntity, Entity_Hammer1Block, 0x000000BE, 0xFFFFFFF6, 0x00000000, 0x00000000, 0x80000000, 0x00000043, 0x00000002, AssignScript, D_80242AC8_8799A8, 0x00000012, 0x00000000, 0x00000043, 0x00000004, ModifyColliderFlags, 0x00000000, 0x00000014, 0x7FFFFE00, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xF8405D08, 0x00000000, 0x00000043, 0x00000007, MakeEntity, Entity_Hammer2Block, 0xFFFFFDE4, 0xFFFFFFF6, 0x00000000, 0x00000000, 0x80000000, 0x00000043, 0x00000002, AssignScript, D_80242B00_8799E0, 0x00000012, 0x00000000, 0x00000043, 0x00000004, ModifyColliderFlags, 0x00000000, 0x0000000E, 0x7FFFFE00, 0x00000013, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_07/87D5D0.data.s b/ver/us/asm/data/world/area_tik/tik_07/87D5D0.data.s index 5850b7a497..97d7db7bc2 100644 --- a/ver/us/asm/data/world/area_tik/tik_07/87D5D0.data.s +++ b/ver/us/asm/data/world/area_tik/tik_07/87D5D0.data.s @@ -24,7 +24,7 @@ dlabel D_802440C0_87DCA0 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80244590_87E170 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000010, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_07_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802440C0_87DCA0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000010, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_07_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802440C0_87DCA0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80244768_87E348 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80244590_87E170, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000010, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_08/87F9A0.data.s b/ver/us/asm/data/world/area_tik/tik_08/87F9A0.data.s index 7d71b4a91a..5833508318 100644 --- a/ver/us/asm/data/world/area_tik/tik_08/87F9A0.data.s +++ b/ver/us/asm/data/world/area_tik/tik_08/87F9A0.data.s @@ -36,7 +36,7 @@ dlabel D_802420B0_880EA0 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242580_881370 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x0000000D, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_08_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802420B0_880EA0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x0000000D, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_08_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802420B0_880EA0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242758_881548 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80242580_881370, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x0000000D, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_09/883500.data.s b/ver/us/asm/data/world/area_tik/tik_09/883500.data.s index a911c58fc6..109e421e78 100644 --- a/ver/us/asm/data/world/area_tik/tik_09/883500.data.s +++ b/ver/us/asm/data/world/area_tik/tik_09/883500.data.s @@ -33,7 +33,7 @@ dlabel D_80242C70_884E30 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80243140_885300 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000023, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_09_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80242C70_884E30, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000023, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_09_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80242C70_884E30, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80243318_8854D8 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80243140_885300, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_10/887B20.data.s b/ver/us/asm/data/world/area_tik/tik_10/887B20.data.s index 752a779a0f..1deafe4b2b 100644 --- a/ver/us/asm/data/world/area_tik/tik_10/887B20.data.s +++ b/ver/us/asm/data/world/area_tik/tik_10/887B20.data.s @@ -6,7 +6,7 @@ dlabel D_80241760_887B20 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241C30_887FF0 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x0000000E, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_10_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241760_887B20, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x0000000E, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_10_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241760_887B20, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241E08_8881C8 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80241C30_887FF0, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x0000000E, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_12/88BF60.data.s b/ver/us/asm/data/world/area_tik/tik_12/88BF60.data.s index 962e897af9..28ee2a5692 100644 --- a/ver/us/asm/data/world/area_tik/tik_12/88BF60.data.s +++ b/ver/us/asm/data/world/area_tik/tik_12/88BF60.data.s @@ -6,7 +6,7 @@ dlabel D_80243390_88BF60 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80243860_88C430 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000009, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_12_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80243390_88BF60, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000009, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_12_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80243390_88BF60, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80243A38_88C608 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80243860_88C430, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000009, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_14/88F180.data.s b/ver/us/asm/data/world/area_tik/tik_14/88F180.data.s index 5e42fc92a3..90f950ad16 100644 --- a/ver/us/asm/data/world/area_tik/tik_14/88F180.data.s +++ b/ver/us/asm/data/world/area_tik/tik_14/88F180.data.s @@ -6,7 +6,7 @@ dlabel D_80241B80_88F180 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242050_88F650 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x0000000D, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_14_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241B80_88F180, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x0000000D, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_14_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241B80_88F180, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242228_88F828 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80242050_88F650, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x0000000D, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_15/891890.data.s b/ver/us/asm/data/world/area_tik/tik_15/891890.data.s index 45f3e05e5c..fc8aabe922 100644 --- a/ver/us/asm/data/world/area_tik/tik_15/891890.data.s +++ b/ver/us/asm/data/world/area_tik/tik_15/891890.data.s @@ -12,7 +12,7 @@ dlabel D_80241E50_8919F0 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242320_891EC0 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000016, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_15_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241E50_8919F0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000016, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_15_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241E50_8919F0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802424F8_892098 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80242320_891EC0, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000016, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_18/895E20.data.s b/ver/us/asm/data/world/area_tik/tik_18/895E20.data.s index 0be2457484..1ad0ecb861 100644 --- a/ver/us/asm/data/world/area_tik/tik_18/895E20.data.s +++ b/ver/us/asm/data/world/area_tik/tik_18/895E20.data.s @@ -18,7 +18,7 @@ dlabel D_80240D10_8963F0 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802411E0_8968C0 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000012, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_18_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80240D10_8963F0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000012, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_18_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80240D10_8963F0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802413B8_896A98 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_802411E0_8968C0, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000012, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_20/89B530.data.s b/ver/us/asm/data/world/area_tik/tik_20/89B530.data.s index d064f2d318..f7f9056d2b 100644 --- a/ver/us/asm/data/world/area_tik/tik_20/89B530.data.s +++ b/ver/us/asm/data/world/area_tik/tik_20/89B530.data.s @@ -36,7 +36,7 @@ dlabel D_80242180_89C4D0 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242650_89C9A0 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000013, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_20_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80242180_89C4D0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000013, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_20_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80242180_89C4D0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242828_89CB78 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80242650_89C9A0, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000013, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_21/89E1A0.data.s b/ver/us/asm/data/world/area_tik/tik_21/89E1A0.data.s index d841db89eb..e7f578fb3d 100644 --- a/ver/us/asm/data/world/area_tik/tik_21/89E1A0.data.s +++ b/ver/us/asm/data/world/area_tik/tik_21/89E1A0.data.s @@ -39,7 +39,7 @@ dlabel D_80241B20_89F2C0 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241FF0_89F790 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000013, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_21_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241B20_89F2C0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000013, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_21_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241B20_89F2C0, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802421C8_89F968 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80241FF0_89F790, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000013, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_22/8A0930.data.s b/ver/us/asm/data/world/area_tik/tik_22/8A0930.data.s index bebb128158..9a857c2ce6 100644 --- a/ver/us/asm/data/world/area_tik/tik_22/8A0930.data.s +++ b/ver/us/asm/data/world/area_tik/tik_22/8A0930.data.s @@ -33,7 +33,7 @@ dlabel D_80241A68_8A1928 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241F38_8A1DF8 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000012, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_22_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241A68_8A1928, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000012, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_22_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_80241A68_8A1928, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242110_8A1FD0 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80241F38_8A1DF8, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000012, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_23/8A35A0.data.s b/ver/us/asm/data/world/area_tik/tik_23/8A35A0.data.s index 5361769211..a2c56883c9 100644 --- a/ver/us/asm/data/world/area_tik/tik_23/8A35A0.data.s +++ b/ver/us/asm/data/world/area_tik/tik_23/8A35A0.data.s @@ -33,7 +33,7 @@ dlabel D_802420C8_8A4498 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242598_8A4968 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000016, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_23_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802420C8_8A4498, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000016, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_23_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802420C8_8A4498, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242770_8A4B40 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80242598_8A4968, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000016, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_24/8A69C0.data.s b/ver/us/asm/data/world/area_tik/tik_24/8A69C0.data.s index 4f494cf8e1..f68e55aa0a 100644 --- a/ver/us/asm/data/world/area_tik/tik_24/8A69C0.data.s +++ b/ver/us/asm/data/world/area_tik/tik_24/8A69C0.data.s @@ -18,7 +18,7 @@ dlabel D_802414E0_8A6F60 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802419B0_8A7430 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000012, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_24_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802414E0_8A6F60, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x00000012, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_24_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802414E0_8A6F60, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80241B88_8A7608 .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_802419B0_8A7430, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x00000012, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/area_tik/tik_25/8A8800.data.s b/ver/us/asm/data/world/area_tik/tik_25/8A8800.data.s index e38be453d9..b9a9aed8de 100644 --- a/ver/us/asm/data/world/area_tik/tik_25/8A8800.data.s +++ b/ver/us/asm/data/world/area_tik/tik_25/8A8800.data.s @@ -15,7 +15,7 @@ dlabel D_802409A4_8A8924 .word 0x00000024, 0x00000002, 0xFE363C81, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000024, 0x00000002, 0xFE363C82, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C83, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C84, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C84, 0x00000002, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C86, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C87, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C87, 0x00000003, 0x00000024, 0x00000002, 0xFE363C88, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C89, 0xF4ACD481, 0x00000024, 0x00000002, 0xFE363C8A, 0xF4ACD485, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000004, 0x00000024, 0x00000002, 0xFE363C8B, 0xF4ACD480, 0x00000024, 0x00000002, 0xFE363C8C, 0xF4ACD481, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000001, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000001, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0x00000001, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C82, 0x00000001, 0x00000027, 0x00000002, 0xFE363C83, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C81, 0xFE363C82, 0xFE363C80, 0xFE363C83, 0x00000043, 0x00000005, ScaleModel, 0xFE363C81, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C85, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C86, 0x00000001, 0x00000043, 0x00000005, TranslateModel, 0xFE363C84, 0xFE363C85, 0xFE363C80, 0xFE363C86, 0x00000043, 0x00000005, ScaleModel, 0xFE363C84, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C88, 0x00000001, 0x00000027, 0x00000002, 0xFE363C89, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C87, 0xFE363C88, 0xFE363C80, 0xFE363C89, 0x00000043, 0x00000005, ScaleModel, 0xFE363C87, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFF, 0x00000027, 0x00000002, 0xFE363C8C, 0xFFFFFFFF, 0x00000043, 0x00000005, TranslateModel, 0xFE363C8A, 0xFE363C8B, 0xFE363C80, 0xFE363C8C, 0x00000043, 0x00000005, ScaleModel, 0xFE363C8A, 0xF24A7C80, 0xF24A7C80, 0xF24A7C80, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C81, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C84, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C87, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80240E74_8A8DF4 -.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x0000000E, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_25_UnkPosFunc2, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802409A4_8A8924, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x0000004D, 0x00000001, 0x00000000, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000024, 0x00000002, 0xFE363C85, 0xF4ACD485, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x00000003, CloneModel, 0x0000000E, 0xFE363C85, 0x00000043, 0x00000005, TranslateModel, 0xFE363C85, 0xF4ACD480, 0xF4ACD482, 0xF4ACD481, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000006, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, RandInt, 0x000000C8, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C80, 0x00000032, 0x00000008, 0x00000001, 0xFE363C80, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000001, 0x00000043, 0x00000005, MakeLerp, 0xF4ACD482, 0xF4ACD483, 0xF4ACD484, 0x00000001, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, UpdateLerp, 0x00000043, 0x00000005, TranslateModel, 0xF4ACD485, 0xF4ACD480, 0xFE363C80, 0xF4ACD481, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, tik_25_CheckDripCollisionWithNPC, 0xF4ACD485, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableModel, 0xF4ACD485, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x000003F6, 0x00000046, 0x00000001, D_802409A4_8A8924, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_8024104C_8A8FCC .word 0x00000024, 0x00000002, 0xFE363C8F, 0x00002710, 0x00000030, 0x00000001, 0xFE363C80, 0x00000031, 0x00000001, 0xFE363C81, 0x00000005, 0x00000001, 0xFE363C81, 0x00000034, 0x00000004, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000033, 0x00000003, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0x00000031, 0x00000001, 0xFE363C89, 0x00000005, 0x00000001, 0xFE363C89, 0x0000003E, 0x00000002, 0x00000006, 0xFE363C8A, 0x0000003C, 0x00000001, 0xFE363C8A, 0x00000043, 0x00000003, RandInt, 0xFE363C84, 0xFE363C8B, 0x00000043, 0x00000003, RandInt, 0xFE363C85, 0xFE363C8C, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C8D, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C8E, 0xFE363C8C, 0x00000024, 0x00000002, 0xF4ACD480, 0xFE363C8D, 0x00000024, 0x00000002, 0xF4ACD481, 0xFE363C8E, 0x00000024, 0x00000002, 0xF4ACD482, 0xFE363C86, 0x00000024, 0x00000002, 0xF4ACD483, 0xFE363C87, 0x00000024, 0x00000002, 0xF4ACD484, 0xFE363C88, 0x00000024, 0x00000002, 0xF4ACD485, 0xFE363C8F, 0x00000044, 0x00000001, D_80240E74_8A8DF4, 0x00000027, 0x00000002, 0xFE363C8F, 0x00000005, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, EnableModel, 0x0000000E, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/dead/flo_00/EBA260.data.s b/ver/us/asm/data/world/dead/flo_00/EBA260.data.s index daaf7da6eb..a62b3b4b7e 100644 --- a/ver/us/asm/data/world/dead/flo_00/EBA260.data.s +++ b/ver/us/asm/data/world/dead/flo_00/EBA260.data.s @@ -111,7 +111,7 @@ dlabel D_802441B8_EBD008 .word 0x00000005, 0x00000001, 0x00000000, 0x00000005, 0x00000001, 0x0000000A, 0x00000043, 0x00000005, 0x802DC654, 0xFFFFFFFF, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000028, 0x00000002, 0xFE363C81, 0x00000001, 0x00000043, 0x00000005, 0x802DB210, 0xFFFFFFFF, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x0000000A, 0x00000043, 0x00000005, 0x802DC654, 0xFFFFFFFF, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C81, 0x00000001, 0x00000043, 0x00000005, 0x802DB210, 0xFFFFFFFF, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000006, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802442AC_EBD0FC -.word 0x00000043, 0x00000002, 0x802DCA48, 0x00000000, 0x00000043, 0x00000002, 0x802DCACC, 0x00000002, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C83, 0xFFFFFFCE, 0x00000024, 0x00000002, 0xFE363C84, 0xFE363C81, 0x00000027, 0x00000002, 0xFE363C84, 0x0000001A, 0x00000043, 0x00000005, 0x802DB210, 0x00000006, 0xFE363C83, 0xFE363C84, 0xFE363C82, 0x00000043, 0x00000003, 0x802DF124, 0x00000006, 0x00000000, 0x00000043, 0x00000004, 0x802DC3E0, 0xFFFFFFFC, 0x00000006, 0x00000000, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFE7, 0x00000043, 0x00000005, 0x802D8D40, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000005, 0x802D9320, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, 0x802D90D8, 0x00000000, 0xF251E680, 0x00000043, 0x00000004, 0x802D903C, 0x00000000, 0x00000012, 0xFFFFFFF8, 0x00000043, 0x00000003, 0x802D93E4, 0x00000000, 0xF24BE280, 0x00000043, 0x00000004, 0x802D8C7C, 0x00000000, 0x00000000, 0x00000001, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000001, 0x802DFB28, 0x00000043, 0x00000002, 0x802DE448, 0x00000001, 0x00000008, 0x00000001, 0x00000028, 0x00000043, 0x00000006, 0x802DD810, 0x00000006, 0x00170003, 0x00170001, 0x00000200, 0x001100D8, 0x00000043, 0x00000003, 0x802D90D8, 0x00000000, 0xF24F2A80, 0x00000043, 0x00000004, 0x802D903C, 0x00000000, 0x00000012, 0xFFFFFFF7, 0x00000043, 0x00000003, 0x802D93E4, 0x00000000, 0xF24A8A80, 0x00000043, 0x00000004, 0x802D8C7C, 0x00000000, 0x00000000, 0x00000001, 0x00000043, 0x00000003, 0x802D9848, 0x00000000, 0xF24A7E80, 0x00000043, 0x00000005, 0x802E1C00, 0x00000000, 0x00000168, 0x0000000A, 0x00000000, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000005, 0x802DB310, 0x00000006, 0x00000000, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000000, 0x00000007, 0x00000000, 0x00000013, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, 0x80048DA0, 0x00000006, 0x00000000, 0x00000043, 0x00000003, 0x802DB654, 0x00000006, 0x00170004, 0x00000008, 0x00000001, 0x00000014, 0x00000043, 0x00000002, 0x802DE6A4, 0x0001001F, 0x00000043, 0x00000003, 0x802E0324, 0x00000139, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C81, 0x00000027, 0x00000002, 0xFE363C81, 0x00000032, 0x00000027, 0x00000002, 0xFE363C82, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C83, 0x0000001E, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000003, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000014, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000006, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000001, 0xFE363C80, 0xFE363C83, 0xFE363C82, 0x00000014, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000006, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0x00000014, 0x00000043, 0x00000003, 0x802E0324, 0x00000188, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C81, 0x00000014, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000052, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000001, 0x0000001E, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000002, 0x802DE6A4, 0x00010002, 0x00000043, 0x00000003, 0x802DB654, 0x00000006, 0x00170001, 0x00000043, 0x00000003, 0x80048DA0, 0x00000006, 0x00000001, 0x00000043, 0x00000001, dead_flo_00_PostChapter6StatUpdate, 0x00000043, 0x00000004, 0x802DDE0C, 0x001D0196, 0x000000A0, 0x00000028, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000005, 0x802DC654, 0x00000006, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000005, 0x802D9320, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, 0x802D90D8, 0x00000000, 0xF24E6280, 0x00000043, 0x00000004, 0x802D8C7C, 0x00000000, 0x00000000, 0x00000001, 0x00000043, 0x00000003, 0x802D9848, 0x00000000, 0xF24A7E80, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802DD810, 0x00000006, 0x00170003, 0x00170001, 0x00000200, 0x001100D9, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFE7, 0x00000043, 0x00000005, 0x802D9320, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, 0x802D90D8, 0x00000000, 0xF24F2A80, 0x00000043, 0x00000003, 0x802D93E4, 0x00000000, 0xF24A8A80, 0x00000043, 0x00000004, 0x802D8C7C, 0x00000000, 0x00000000, 0x00000001, 0x00000043, 0x00000003, 0x802D9848, 0x00000000, 0xF24A7E80, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802DD810, 0x00000006, 0x00170003, 0x00170001, 0x00000200, 0x001100DA, 0x00000043, 0x00000004, 0x802DC5C0, 0x00000006, 0x00040000, 0x00000001, 0x00000056, 0x00000000, 0x00000005, 0x00000001, 0x00000019, 0x00000043, 0x00000005, 0x802DC654, 0x00000006, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000014, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000004, 0x00000006, 0x00000000, 0x00000057, 0x00000000, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFE363C82, 0x00000000, 0x00000024, 0x00000002, 0xFE363C83, 0x00000708, 0x00000043, 0x00000005, 0x802E1C00, 0xFE363C82, 0xFE363C83, 0x00000064, 0x00000002, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000005, 0x802DB310, 0x00000006, 0x00000000, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000000, 0x00000007, 0x00000000, 0x00000013, 0x00000000, 0x00000006, 0x00000000, 0x00000057, 0x00000000, 0x00000056, 0x00000000, 0x00000043, 0x00000005, 0x802DC654, 0x00000006, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C85, 0x000000B4, 0x00000043, 0x00000005, 0x802E1C00, 0xFE363C83, 0xFE363C85, 0x00000064, 0x00000002, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000005, 0x802DB210, 0x00000006, 0xFE363C82, 0xFE363C80, 0xFE363C84, 0x00000008, 0x00000001, 0x00000001, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000000, 0x00000007, 0x00000000, 0x00000013, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000005, 0x802DB210, 0x00000006, 0x00000000, 0xFFFFFC18, 0x00000000, 0x00000057, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000004, 0x802DD70C, 0x00000006, 0x00002045, 0x00000000, 0x00000057, 0x00000000, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000002, 0x802DE6A4, 0x0001002A, 0x00000008, 0x00000001, 0x0000006E, 0x00000043, 0x00000002, 0x802DE6A4, 0x00010002, 0x00000024, 0x00000002, 0xF5DE0180, 0x0000003B, 0x00000046, 0x00000001, D_80243398_EBC1E8, 0x00000043, 0x00000001, 0x802DCA8C, 0x00000043, 0x00000002, 0x802DE448, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x00000043, 0x00000002, 0x802DCA48, 0x00000000, 0x00000043, 0x00000002, 0x802DCACC, 0x00000002, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C83, 0xFFFFFFCE, 0x00000024, 0x00000002, 0xFE363C84, 0xFE363C81, 0x00000027, 0x00000002, 0xFE363C84, 0x0000001A, 0x00000043, 0x00000005, 0x802DB210, 0x00000006, 0xFE363C83, 0xFE363C84, 0xFE363C82, 0x00000043, 0x00000003, 0x802DF124, 0x00000006, 0x00000000, 0x00000043, 0x00000004, 0x802DC3E0, 0xFFFFFFFC, 0x00000006, 0x00000000, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFE7, 0x00000043, 0x00000005, 0x802D8D40, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000005, 0x802D9320, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, 0x802D90D8, 0x00000000, 0xF251E680, 0x00000043, 0x00000004, 0x802D903C, 0x00000000, 0x00000012, 0xFFFFFFF8, 0x00000043, 0x00000003, 0x802D93E4, 0x00000000, 0xF24BE280, 0x00000043, 0x00000004, 0x802D8C7C, 0x00000000, 0x00000000, 0x00000001, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000001, 0x802DFB28, 0x00000043, 0x00000002, 0x802DE448, 0x00000001, 0x00000008, 0x00000001, 0x00000028, 0x00000043, 0x00000006, 0x802DD810, 0x00000006, 0x00170003, 0x00170001, 0x00000200, 0x001100D8, 0x00000043, 0x00000003, 0x802D90D8, 0x00000000, 0xF24F2A80, 0x00000043, 0x00000004, 0x802D903C, 0x00000000, 0x00000012, 0xFFFFFFF7, 0x00000043, 0x00000003, 0x802D93E4, 0x00000000, 0xF24A8A80, 0x00000043, 0x00000004, 0x802D8C7C, 0x00000000, 0x00000000, 0x00000001, 0x00000043, 0x00000003, 0x802D9848, 0x00000000, 0xF24A7E80, 0x00000043, 0x00000005, 0x802E1C00, 0x00000000, 0x00000168, 0x0000000A, 0x00000000, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000005, 0x802DB310, 0x00000006, 0x00000000, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000000, 0x00000007, 0x00000000, 0x00000013, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000003, 0x80048DA0, 0x00000006, 0x00000000, 0x00000043, 0x00000003, 0x802DB654, 0x00000006, 0x00170004, 0x00000008, 0x00000001, 0x00000014, 0x00000043, 0x00000002, 0x802DE6A4, 0x0001001F, 0x00000043, 0x00000003, 0x802E0324, 0x00000139, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C81, 0x00000027, 0x00000002, 0xFE363C81, 0x00000032, 0x00000027, 0x00000002, 0xFE363C82, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C83, 0x0000001E, 0x00000005, 0x00000001, 0x00000005, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000003, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000014, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000006, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000001, 0xFE363C80, 0xFE363C83, 0xFE363C82, 0x00000014, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000006, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0x00000014, 0x00000043, 0x00000003, 0x802E0324, 0x00000188, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C81, 0x00000014, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000052, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000001, 0x0000001E, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000002, 0x802DE6A4, 0x00010002, 0x00000043, 0x00000003, 0x802DB654, 0x00000006, 0x00170001, 0x00000043, 0x00000003, 0x80048DA0, 0x00000006, 0x00000001, 0x00000043, 0x00000001, dead_flo_00_UpgradeStarPower, 0x00000043, 0x00000004, 0x802DDE0C, 0x001D0196, 0x000000A0, 0x00000028, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000005, 0x802DC654, 0x00000006, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000005, 0x802D9320, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, 0x802D90D8, 0x00000000, 0xF24E6280, 0x00000043, 0x00000004, 0x802D8C7C, 0x00000000, 0x00000000, 0x00000001, 0x00000043, 0x00000003, 0x802D9848, 0x00000000, 0xF24A7E80, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802DD810, 0x00000006, 0x00170003, 0x00170001, 0x00000200, 0x001100D9, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C80, 0xFFFFFFE7, 0x00000043, 0x00000005, 0x802D9320, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, 0x802D90D8, 0x00000000, 0xF24F2A80, 0x00000043, 0x00000003, 0x802D93E4, 0x00000000, 0xF24A8A80, 0x00000043, 0x00000004, 0x802D8C7C, 0x00000000, 0x00000000, 0x00000001, 0x00000043, 0x00000003, 0x802D9848, 0x00000000, 0xF24A7E80, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802DD810, 0x00000006, 0x00170003, 0x00170001, 0x00000200, 0x001100DA, 0x00000043, 0x00000004, 0x802DC5C0, 0x00000006, 0x00040000, 0x00000001, 0x00000056, 0x00000000, 0x00000005, 0x00000001, 0x00000019, 0x00000043, 0x00000005, 0x802DC654, 0x00000006, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000014, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000004, 0x00000006, 0x00000000, 0x00000057, 0x00000000, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFE363C82, 0x00000000, 0x00000024, 0x00000002, 0xFE363C83, 0x00000708, 0x00000043, 0x00000005, 0x802E1C00, 0xFE363C82, 0xFE363C83, 0x00000064, 0x00000002, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000005, 0x802DB310, 0x00000006, 0x00000000, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000000, 0x00000007, 0x00000000, 0x00000013, 0x00000000, 0x00000006, 0x00000000, 0x00000057, 0x00000000, 0x00000056, 0x00000000, 0x00000043, 0x00000005, 0x802DC654, 0x00000006, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C83, 0x00000027, 0x00000002, 0xFE363C85, 0x000000B4, 0x00000043, 0x00000005, 0x802E1C00, 0xFE363C83, 0xFE363C85, 0x00000064, 0x00000002, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000005, 0x802DB210, 0x00000006, 0xFE363C82, 0xFE363C80, 0xFE363C84, 0x00000008, 0x00000001, 0x00000001, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000000, 0x00000007, 0x00000000, 0x00000013, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000005, 0x802DB210, 0x00000006, 0x00000000, 0xFFFFFC18, 0x00000000, 0x00000057, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000004, 0x802DD70C, 0x00000006, 0x00002045, 0x00000000, 0x00000057, 0x00000000, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000002, 0x802DE6A4, 0x0001002A, 0x00000008, 0x00000001, 0x0000006E, 0x00000043, 0x00000002, 0x802DE6A4, 0x00010002, 0x00000024, 0x00000002, 0xF5DE0180, 0x0000003B, 0x00000046, 0x00000001, D_80243398_EBC1E8, 0x00000043, 0x00000001, 0x802DCA8C, 0x00000043, 0x00000002, 0x802DE448, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80244C24_EBDA74 .word 0x00000043, 0x00000002, 0x802D796C, 0xFE363C81, 0x0000000B, 0x00000002, 0xFE363C81, 0x00000001, 0x00000043, 0x00000002, 0x802D790C, 0xFE363C80, 0x0000000A, 0x00000002, 0xFE363C80, 0x0000000A, 0x00000043, 0x00000003, 0x80048C5C, 0xFFFFFFFF, D_802441B8_EBD008, 0x00000044, 0x00000001, D_802442AC_EBD0FC, 0x00000012, 0x00000000, 0x00000043, 0x00000005, 0x802DB210, 0xFFFFFFFF, 0x00000000, 0xFFFFFC18, 0x00000000, 0x00000013, 0x00000000, 0x00000013, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/dead/flo_07/EC78F0.data.s b/ver/us/asm/data/world/dead/flo_07/EC78F0.data.s index 076595e3f9..f0fb0df884 100644 --- a/ver/us/asm/data/world/dead/flo_07/EC78F0.data.s +++ b/ver/us/asm/data/world/dead/flo_07/EC78F0.data.s @@ -5,13 +5,13 @@ dlabel D_80240740_EC78F0 .word 0x43BB8000, 0x00000000, 0x00000000, 0x43870000, 0x43A28000, 0x00000000, 0x00000000, 0x43870000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, D_80240CA0_EC7E50, D_80240740_EC78F0, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, func_80200000, 0x00190116 -dlabel D_802407A0_EC7950 +dlabel D_EVS_SetupMusic_EC7950 .word 0x00000043, 0x00000002, 0x802D790C, 0xFE363C80, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000001, 0x00000043, 0x00000005, 0x802E339C, 0x00000000, 0x0000007F, 0x00000000, 0x00000008, 0x00000012, 0x00000000, 0x00000014, 0x00000001, 0xF5DE0180, 0x00000018, 0x00000001, 0x00000035, 0x00000043, 0x00000005, 0x802E339C, 0x00000000, 0x00000030, 0x00000000, 0x00000008, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, 0x802E339C, 0x00000000, 0x00000031, 0x00000000, 0x00000008, 0x00000023, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000002, 0x802E37A0, 0x80000021, 0x00000002, 0x00000000, 0x00000001, 0x00000000 -dlabel D_8024086C_EC7A1C +dlabel D_EVS_PushFlowerSong_EC7A1C .word 0x00000043, 0x00000003, 0x802E3648, 0x00000089, 0x00000001, 0x00000002, 0x00000000, 0x00000001, 0x00000000 -dlabel D_80240890_EC7A40 +dlabel D_EVS_PopSong_EC7A40 .word 0x00000043, 0x00000003, 0x802E3330, 0x00000000, 0x000000FA, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000001, 0x802E3628, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000 dlabel D_802408D0_EC7A80 @@ -27,7 +27,7 @@ dlabel D_80240C74_EC7E24 .word 0x00000047, 0x00000005, D_80240C18_EC7DC8, 0x00080000, 0x00000000, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80240CA0_EC7E50 -.word 0x00000024, 0x00000002, 0xF5DE0329, 0x00000026, 0x00000043, 0x00000002, 0x802E6F50, 0xFFFFFFFF, 0x00000043, 0x00000003, 0x802D8B60, 0x00000000, 0x00000000, 0x00000043, 0x00000006, 0x802D7CD8, 0x00000000, 0x00000003, 0x00000019, 0x00000010, 0x00001000, 0x00000043, 0x00000005, SetSleepBubbleTimeLeft, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, 0x802D7B70, 0x00000000, 0x00000001, 0x00000024, 0x00000002, 0xF9718886, 0x00000000, 0x00000043, 0x00000003, 0x80048338, 0x00000000, D_80242B0C_EC9CBC, 0x00000046, 0x00000001, D_802428C4_EC9A74, 0x00000043, 0x00000004, AddCoin, 0x00000003, 0x00000006, 0x00000006, 0x00000024, 0x00000002, 0xFE363C80, 0x00000129, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFFA1, 0x00000024, 0x00000002, 0xFE363C82, 0x0000017F, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFFBF, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_8024096C_EC7B1C, 0x00000024, 0x00000002, 0xFE363C80, 0x00000125, 0x00000024, 0x00000002, 0xFE363C81, 0x00000047, 0x00000024, 0x00000002, 0xFE363C82, 0x0000017A, 0x00000024, 0x00000002, 0xFE363C83, 0x00000071, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_8024096C_EC7B1C, 0x00000024, 0x00000002, 0xFE363C80, 0x00000015, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFEA6, 0x00000024, 0x00000002, 0xFE363C82, 0x00000093, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFF0E, 0x00000024, 0x00000002, 0xFE363C84, 0x00000014, 0x00000044, 0x00000001, D_8024096C_EC7B1C, 0x00000024, 0x00000002, 0xFE363C80, 0xFFFFFEA2, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFF42, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFFAF, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFF96, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_8024096C_EC7B1C, 0x00000024, 0x00000002, 0xFE363C80, 0xFFFFFE84, 0x00000024, 0x00000002, 0xFE363C81, 0x00000055, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFFA1, 0x00000024, 0x00000002, 0xFE363C83, 0x00000096, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_8024096C_EC7B1C, 0x00000043, 0x00000003, 0x802D6688, 0x00000033, 0x00000001, 0x00000043, 0x00000003, 0x802D6688, 0x00000031, 0x00000001, 0x00000043, 0x00000003, 0x802D6688, 0x00000032, 0x00000001, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0x00000002, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFF9C, 0x00000024, 0x00000002, 0xFE363C82, 0x00000064, 0x00000024, 0x00000002, 0xFE363C83, 0x00000000, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000024, 0x00000002, 0xFE363C85, 0x00000001, 0x00000024, 0x00000002, 0xFE363C86, 0x00000001, 0x00000024, 0x00000002, 0xFE363C87, 0x00000000, 0x00000024, 0x00000002, 0xFE363C88, 0x00000000, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8B, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8C, 0x00000000, 0x00000044, 0x00000001, D_802408D0_EC7A80, 0x00000057, 0x00000000, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0x00000003, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFB50, 0x00000024, 0x00000002, 0xFE363C83, 0x00000000, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000024, 0x00000002, 0xFE363C85, 0x00000000, 0x00000024, 0x00000002, 0xFE363C86, 0x00000001, 0x00000024, 0x00000002, 0xFE363C87, 0x00000000, 0x00000024, 0x00000002, 0xFE363C88, 0x00000000, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8B, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8C, 0x00000000, 0x00000044, 0x00000001, D_802408D0_EC7A80, 0x00000057, 0x00000000, 0x00000043, 0x00000002, 0x802D790C, 0xFE363C80, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000001, 0x00000044, 0x00000001, D_80241C14_EC8DC4, 0x00000012, 0x00000000, 0x00000043, 0x00000004, AddCoin, 0x00000000, 0x00000001, 0x7FFFFE00, 0x00000024, 0x00000002, 0xFE363C80, D_80240C74_EC7E24, 0x00000044, 0x00000001, 0x80285C70, 0x00000044, 0x00000001, D_802424F4_EC96A4, 0x00000013, 0x00000000, 0x00000046, 0x00000001, D_802407A0_EC7950, 0x0000000F, 0x00000002, 0xF5DE0180, 0x00000035, 0x00000043, 0x00000001, dead_flo_07_SpawnSunEffect, 0x00000013, 0x00000000, 0x00000043, 0x00000001, func_80240344_EC74F4, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000 +.word 0x00000024, 0x00000002, 0xF5DE0329, 0x00000026, 0x00000043, 0x00000002, 0x802E6F50, 0xFFFFFFFF, 0x00000043, 0x00000003, 0x802D8B60, 0x00000000, 0x00000000, 0x00000043, 0x00000006, 0x802D7CD8, 0x00000000, 0x00000003, 0x00000019, 0x00000010, 0x00001000, 0x00000043, 0x00000005, SetSleepBubbleTimeLeft, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, 0x802D7B70, 0x00000000, 0x00000001, 0x00000024, 0x00000002, 0xF9718886, 0x00000000, 0x00000043, 0x00000003, 0x80048338, 0x00000000, D_80242B0C_EC9CBC, 0x00000046, 0x00000001, D_802428C4_EC9A74, 0x00000043, 0x00000004, AddCoin, 0x00000003, 0x00000006, 0x00000006, 0x00000024, 0x00000002, 0xFE363C80, 0x00000129, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFFA1, 0x00000024, 0x00000002, 0xFE363C82, 0x0000017F, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFFBF, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_8024096C_EC7B1C, 0x00000024, 0x00000002, 0xFE363C80, 0x00000125, 0x00000024, 0x00000002, 0xFE363C81, 0x00000047, 0x00000024, 0x00000002, 0xFE363C82, 0x0000017A, 0x00000024, 0x00000002, 0xFE363C83, 0x00000071, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_8024096C_EC7B1C, 0x00000024, 0x00000002, 0xFE363C80, 0x00000015, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFEA6, 0x00000024, 0x00000002, 0xFE363C82, 0x00000093, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFF0E, 0x00000024, 0x00000002, 0xFE363C84, 0x00000014, 0x00000044, 0x00000001, D_8024096C_EC7B1C, 0x00000024, 0x00000002, 0xFE363C80, 0xFFFFFEA2, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFF42, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFFAF, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFF96, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_8024096C_EC7B1C, 0x00000024, 0x00000002, 0xFE363C80, 0xFFFFFE84, 0x00000024, 0x00000002, 0xFE363C81, 0x00000055, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFFA1, 0x00000024, 0x00000002, 0xFE363C83, 0x00000096, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_8024096C_EC7B1C, 0x00000043, 0x00000003, 0x802D6688, 0x00000033, 0x00000001, 0x00000043, 0x00000003, 0x802D6688, 0x00000031, 0x00000001, 0x00000043, 0x00000003, 0x802D6688, 0x00000032, 0x00000001, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0x00000002, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFF9C, 0x00000024, 0x00000002, 0xFE363C82, 0x00000064, 0x00000024, 0x00000002, 0xFE363C83, 0x00000000, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000024, 0x00000002, 0xFE363C85, 0x00000001, 0x00000024, 0x00000002, 0xFE363C86, 0x00000001, 0x00000024, 0x00000002, 0xFE363C87, 0x00000000, 0x00000024, 0x00000002, 0xFE363C88, 0x00000000, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8B, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8C, 0x00000000, 0x00000044, 0x00000001, D_802408D0_EC7A80, 0x00000057, 0x00000000, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0x00000003, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFB50, 0x00000024, 0x00000002, 0xFE363C83, 0x00000000, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000024, 0x00000002, 0xFE363C85, 0x00000000, 0x00000024, 0x00000002, 0xFE363C86, 0x00000001, 0x00000024, 0x00000002, 0xFE363C87, 0x00000000, 0x00000024, 0x00000002, 0xFE363C88, 0x00000000, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8B, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8C, 0x00000000, 0x00000044, 0x00000001, D_802408D0_EC7A80, 0x00000057, 0x00000000, 0x00000043, 0x00000002, 0x802D790C, 0xFE363C80, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000001, 0x00000044, 0x00000001, D_80241C14_EC8DC4, 0x00000012, 0x00000000, 0x00000043, 0x00000004, AddCoin, 0x00000000, 0x00000001, 0x7FFFFE00, 0x00000024, 0x00000002, 0xFE363C80, D_80240C74_EC7E24, 0x00000044, 0x00000001, 0x80285C70, 0x00000044, 0x00000001, D_802424F4_EC96A4, 0x00000013, 0x00000000, 0x00000046, 0x00000001, D_EVS_SetupMusic_EC7950, 0x0000000F, 0x00000002, 0xF5DE0180, 0x00000035, 0x00000043, 0x00000001, dead_flo_07_SpawnSunEffect, 0x00000013, 0x00000000, 0x00000043, 0x00000001, func_80240344_EC74F4, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000 dlabel D_80241220_EC83D0 .word 0x00000000, 0x00380028, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00630000, 0x00000030, 0x00000001, 0xFE363C80, 0x00000034, 0x00000004, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C85, 0xFE363C8F, 0xFE363C87, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFBD3E280, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C81, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000030, 0x00000001, 0xFE363C81, 0x00000031, 0x00000001, 0xFE363C82, 0x00000005, 0x00000001, 0xFE363C82, 0x00000031, 0x00000001, 0xFE363C83, 0x00000043, 0x00000006, dead_flo_07_TransformFoliage, 0xFE363C83, 0xF24A7AE7, 0x00000001, 0xFE363C8F, 0x00000000, 0x0000000A, 0x00000002, 0xFBD3E280, 0x00000000, 0x00000024, 0x00000002, 0xFBD3E280, 0x00000001, 0x00000043, 0x00000004, 0x802D7A04, 0xFE363C83, 0x00000153, 0x00000000, 0x00000013, 0x00000000, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000030, 0x00000001, 0xFE363C81, 0x00000031, 0x00000001, 0xFE363C82, 0x00000005, 0x00000001, 0xFE363C82, 0x00000031, 0x00000001, 0xFE363C83, 0x00000043, 0x00000006, dead_flo_07_TransformFoliage, 0xFE363C83, 0xF24A7AE7, 0xFFFFFFFF, 0xFE363C8F, 0x00000000, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000030, 0x00000001, 0xFE363C81, 0x00000031, 0x00000001, 0xFE363C82, 0x00000005, 0x00000001, 0xFE363C82, 0x00000031, 0x00000001, 0xFE363C83, 0x00000043, 0x00000005, 0x802D5FE0, 0xFE363C83, 0x00000000, 0x00000000, 0x00000000, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000057, 0x00000000, 0x00000056, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C82, 0x00000000, 0x00000030, 0x00000001, 0xFE363C82, 0x00000031, 0x00000001, 0xFE363C83, 0x00000005, 0x00000001, 0xFE363C83, 0x00000031, 0x00000001, 0xFE363C84, 0x00000033, 0x00000003, 0xFE363C85, 0xFE363C86, 0xFE363C87, 0x00000033, 0x00000003, 0xFE363C88, 0xFE363C89, 0xFE363C8A, 0x0000000A, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000043, 0x00000007, 0x802E4410, 0xFE363C84, 0xFE363C85, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0xFE363C89, 0x00000012, 0x00000000, 0x00000043, 0x00000003, 0x802E2F8C, 0xFE363C8A, 0xFE363C8B, 0x0000000A, 0x00000002, 0xFE363C8B, 0x00000000, 0x00000043, 0x00000003, 0x802E2F30, 0xFE363C8A, 0x00000001, 0x00000043, 0x00000007, 0x802E4410, 0xFE363C84, 0xFE363C85, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0xFE363C89, 0x00000013, 0x00000000, 0x00000013, 0x00000000, 0x00000006, 0x00000000, 0x00000013, 0x00000000, 0x00000057, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x0000000B, 0x00000002, 0xFE363C84, 0x00000000, 0x00000046, 0x00000001, 0xFE363C84, 0x00000013, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 @@ -51,7 +51,7 @@ dlabel D_80241DBC_EC8F6C .word 0x0000000A, 0x00000002, 0xF9718886, 0x00000001, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0x00000000, 0x00C80002, 0x00C80001, 0x00000000, 0x00110068, 0x00000056, 0x00000000, 0x00000043, 0x00000003, 0x802D90D8, 0x00000000, 0x0000012C, 0x00000043, 0x00000004, 0x802D903C, 0x00000000, 0xF24AC280, 0xF24A5C80, 0x00000043, 0x00000003, 0x802D93E4, 0x00000000, 0xF24A7C80, 0x00000043, 0x00000004, 0x802D8C7C, 0x00000000, 0x00000000, 0x00000001, 0x00000057, 0x00000000, 0x00000043, 0x00000002, 0x802E37A0, 0x8000006B, 0x00000045, 0x00000002, D_80241D6C_EC8F1C, 0xFD050F80, 0x00000043, 0x00000006, 0x802DD810, 0x00000000, 0x00C80006, 0x00C80006, 0x00000000, 0x00110069, 0x00000049, 0x00000001, 0xFD050F80, 0x00000043, 0x00000003, 0x802D90D8, 0x00000000, 0x0000015E, 0x00000043, 0x00000004, 0x802D903C, 0x00000000, 0xF24AC280, 0xF24A5C80, 0x00000043, 0x00000003, 0x802D93E4, 0x00000000, 0xF24A9A80, 0x00000043, 0x00000004, 0x802D8C7C, 0x00000000, 0x00000000, 0x00000001, 0x00000043, 0x00000003, 0x802D9848, 0x00000000, 0xF24A7E80, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000028, 0x00000002, 0xFE363C80, 0xFE363C82, 0x0000000C, 0x00000002, 0xFE363C80, 0xFFFFFF06, 0x00000043, 0x00000007, 0x802E4310, 0x0000001E, 0xFFFFFF1F, 0x00000064, 0xFFFFFFE7, 0x0000000D, 0xF84060DE, 0x00000012, 0x00000000, 0x00000043, 0x00000007, 0x802E4310, 0x0000001E, 0xFFFFFEF7, 0x00000064, 0x00000036, 0x0000000D, 0xF84060DE, 0x00000024, 0x00000002, 0xF84060F4, 0x00000001, 0x00000013, 0x00000000, 0x00000043, 0x00000002, 0x802E37A0, 0x000007BC, 0x00000043, 0x00000002, 0x802E3934, 0x000003BC, 0x00000024, 0x00000002, 0xF9718886, 0x00000001, 0x00000008, 0x00000001, 0x00000014, 0x00000043, 0x00000006, 0x802DD810, 0x00000000, 0x00C80002, 0x00C80001, 0x00000000, 0x0011006A, 0x00000024, 0x00000002, 0xF5DE0180, 0x0000002F, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242044_EC91F4 -.word 0x00000046, 0x00000001, D_8024086C_EC7A1C, 0x00000043, 0x00000003, 0x802DC228, 0xFFFFFFFF, 0x00000001, 0x00000014, 0x00000001, 0xF5DE0180, 0x00000018, 0x00000001, 0x0000002D, 0x0000000A, 0x00000002, 0xF9718885, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110070, 0x00000024, 0x00000002, 0xF9718885, 0x00000001, 0x00000012, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110071, 0x00000013, 0x00000000, 0x00000018, 0x00000001, 0x0000002E, 0x00000043, 0x00000007, 0x802D9B68, 0x00000000, 0xF24A8A80, 0x00000000, 0xF24FF280, 0xF24AC280, 0xF24A5C80, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110065, 0x00000043, 0x00000003, 0x802DB654, 0xFFFFFFFF, 0x00C80005, 0x00000008, 0x00000001, 0x00000014, 0x00000043, 0x00000003, 0x802DB654, 0xFFFFFFFF, 0x00C80000, 0x00000024, 0x00000002, 0xFE363C80, 0x00000059, 0x00000024, 0x00000002, 0xFE363C81, 0x00000001, 0x00000046, 0x00000001, D_80241BB4_EC8D64, 0x00000043, 0x00000002, 0x802E3F18, 0x00000059, 0x00000024, 0x00000002, 0xF5DE0180, 0x0000002E, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110066, 0x0000000A, 0x00000002, 0xF84060E3, 0x00000001, 0x00000046, 0x00000001, D_80241DBC_EC8F6C, 0x00000013, 0x00000000, 0x00000043, 0x00000003, 0x802D9DE4, 0x00000000, 0xF24A8A80, 0x00000018, 0x00000001, 0x0000002F, 0x0000000A, 0x00000002, 0xF84060E3, 0x00000001, 0x0000000A, 0x00000002, 0xF9718886, 0x00000000, 0x00000043, 0x00000007, 0x802D9B68, 0x00000000, 0xF24A8A80, 0x00000000, 0xF24FF280, 0xF24AC280, 0xF24A5C80, 0x00000046, 0x00000001, D_80241DBC_EC8F6C, 0x00000043, 0x00000003, 0x802D9DE4, 0x00000000, 0xF24A8A80, 0x00000012, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110072, 0x00000013, 0x00000000, 0x00000012, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110072, 0x00000013, 0x00000000, 0x00000018, 0x00000001, 0x00000035, 0x0000000A, 0x00000002, 0xF84060DE, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110072, 0x00000012, 0x00000000, 0x0000000C, 0x00000002, 0xF5DE0180, 0x00000030, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110073, 0x00000012, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110074, 0x00000013, 0x00000000, 0x00000043, 0x00000006, 0x802DD848, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110075, 0x00000013, 0x00000000, 0x00000018, 0x00000001, 0x0000003C, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110076, 0x0000001C, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110077, 0x00000023, 0x00000000, 0x00000046, 0x00000001, D_80240890_EC7A40, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x00000046, 0x00000001, D_EVS_PushFlowerSong_EC7A1C, 0x00000043, 0x00000003, 0x802DC228, 0xFFFFFFFF, 0x00000001, 0x00000014, 0x00000001, 0xF5DE0180, 0x00000018, 0x00000001, 0x0000002D, 0x0000000A, 0x00000002, 0xF9718885, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110070, 0x00000024, 0x00000002, 0xF9718885, 0x00000001, 0x00000012, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110071, 0x00000013, 0x00000000, 0x00000018, 0x00000001, 0x0000002E, 0x00000043, 0x00000007, 0x802D9B68, 0x00000000, 0xF24A8A80, 0x00000000, 0xF24FF280, 0xF24AC280, 0xF24A5C80, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110065, 0x00000043, 0x00000003, 0x802DB654, 0xFFFFFFFF, 0x00C80005, 0x00000008, 0x00000001, 0x00000014, 0x00000043, 0x00000003, 0x802DB654, 0xFFFFFFFF, 0x00C80000, 0x00000024, 0x00000002, 0xFE363C80, 0x00000059, 0x00000024, 0x00000002, 0xFE363C81, 0x00000001, 0x00000046, 0x00000001, D_80241BB4_EC8D64, 0x00000043, 0x00000002, 0x802E3F18, 0x00000059, 0x00000024, 0x00000002, 0xF5DE0180, 0x0000002E, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110066, 0x0000000A, 0x00000002, 0xF84060E3, 0x00000001, 0x00000046, 0x00000001, D_80241DBC_EC8F6C, 0x00000013, 0x00000000, 0x00000043, 0x00000003, 0x802D9DE4, 0x00000000, 0xF24A8A80, 0x00000018, 0x00000001, 0x0000002F, 0x0000000A, 0x00000002, 0xF84060E3, 0x00000001, 0x0000000A, 0x00000002, 0xF9718886, 0x00000000, 0x00000043, 0x00000007, 0x802D9B68, 0x00000000, 0xF24A8A80, 0x00000000, 0xF24FF280, 0xF24AC280, 0xF24A5C80, 0x00000046, 0x00000001, D_80241DBC_EC8F6C, 0x00000043, 0x00000003, 0x802D9DE4, 0x00000000, 0xF24A8A80, 0x00000012, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110072, 0x00000013, 0x00000000, 0x00000012, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110072, 0x00000013, 0x00000000, 0x00000018, 0x00000001, 0x00000035, 0x0000000A, 0x00000002, 0xF84060DE, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110072, 0x00000012, 0x00000000, 0x0000000C, 0x00000002, 0xF5DE0180, 0x00000030, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110073, 0x00000012, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110074, 0x00000013, 0x00000000, 0x00000043, 0x00000006, 0x802DD848, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110075, 0x00000013, 0x00000000, 0x00000018, 0x00000001, 0x0000003C, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110076, 0x0000001C, 0x00000000, 0x00000043, 0x00000006, 0x802DD810, 0xFFFFFFFF, 0x00C80002, 0x00C80001, 0x00000000, 0x00110077, 0x00000023, 0x00000000, 0x00000046, 0x00000001, D_EVS_PopSong_EC7A40, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242428_EC95D8 .word 0x0000000A, 0x00000002, 0xF5DE0180, 0x0000002F, 0x0000000A, 0x00000002, 0xF84060DE, 0x00000000, 0x0000000A, 0x00000002, 0xF84060F4, 0x00000000, 0x00000043, 0x00000007, 0x802E4310, 0x0000001E, 0xFFFFFF1F, 0x00000000, 0xFFFFFFE7, 0x00000011, 0xF84060DE, 0x00000012, 0x00000000, 0x00000043, 0x00000007, 0x802E4310, 0x0000001E, 0xFFFFFEF7, 0x00000000, 0x00000036, 0x00000011, 0xF84060DE, 0x00000013, 0x00000000, 0x00000013, 0x00000000, 0x00000013, 0x00000000, 0x00000024, 0x00000002, 0xF9718885, 0x00000000, 0x00000043, 0x00000003, 0x80049154, 0xFFFFFFFF, D_80242044_EC91F4, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/dead/flo_08/ECBC10.data.s b/ver/us/asm/data/world/dead/flo_08/ECBC10.data.s index 5c84724326..42aab90bc6 100644 --- a/ver/us/asm/data/world/dead/flo_08/ECBC10.data.s +++ b/ver/us/asm/data/world/dead/flo_08/ECBC10.data.s @@ -144,7 +144,7 @@ dlabel D_80245944_ECF644 .word 0x00000024, 0x00000002, 0xF971889D, 0x00000000, 0x00000024, 0x00000002, 0xF971889E, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, D_80245920_ECF620, 0x00000047, 0x00000005, D_802452D0_ECEFD0, 0x00001000, 0x00000016, 0x00000001, 0x00000000, 0x00000047, 0x00000005, D_802452D0_ECEFD0, 0x00100000, D_80245934_ECF634, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x0000004D, 0x00000001, 0x0000000B, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C8C, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C84, 0x00000028, 0x00000002, 0xFE363C8C, 0xFE363C80, 0x00000028, 0x00000002, 0xFE363C8D, 0xFE363C81, 0x00000026, 0x00000002, 0xFE363C80, 0xFE363C8C, 0x0000002F, 0x00000002, 0xFE363C80, 0xF24C0A80, 0x00000026, 0x00000002, 0xFE363C8F, 0xF24C0A80, 0x0000002F, 0x00000002, 0xFE363C8F, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C8F, 0x0000000B, 0x00000024, 0x00000002, 0xFE363C85, 0x000000C8, 0x0000002A, 0x00000002, 0xFE363C85, 0xFE363C8F, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000005, 0x00000001, 0xFE363C85, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8C, 0xFE363C80, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8D, 0xFE363C81, 0x00000043, 0x00000003, 0x802E1D00, 0x000000C7, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C83, 0x000000D2, 0x00000028, 0x00000002, 0xFE363C83, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C81, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C82, 0xFE363C8E, 0x00000043, 0x0000000F, 0x802E58EC, 0x0000000D, 0xFE363C80, 0xFE363C82, 0xFE363C81, 0xFE363C83, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0xFE363C8F, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8C, 0xFE363C80, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8D, 0xFE363C81, 0x00000027, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C81, 0xFE363C8B, 0x00000043, 0x0000000F, 0x802E58EC, 0x0000000D, 0xFE363C80, 0xFE363C8E, 0xFE363C81, 0x000000C8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0xFE363C8F, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80245C6C_ECF96C -.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C86, 0x00000024, 0x00000002, 0xFE363C88, 0xFE363C85, 0x00000024, 0x00000002, 0xFE363C87, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C86, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C84, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C80, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000001, dead_flo_08_UnkFunc43, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000001, 0x00000057, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C81, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C82, 0xFE363C85, 0x00000027, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C82, 0x00000008, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000028, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000E, 0x00000000, 0x00000057, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802E382C, 0x000000F8, 0x00000000, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000057, 0x00000000, 0x00000043, 0x00000005, 0x802E1C00, 0x00000000, 0x000000B4, 0x00000014, 0x00000002, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C88, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C89, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C87, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C86, 0x00000024, 0x00000002, 0xFE363C88, 0xFE363C85, 0x00000024, 0x00000002, 0xFE363C87, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C86, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C84, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C80, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000001, dead_flo_08_CheckVineTriggerDist, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000001, 0x00000057, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C81, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C82, 0xFE363C85, 0x00000027, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C82, 0x00000008, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000028, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000E, 0x00000000, 0x00000057, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802E382C, 0x000000F8, 0x00000000, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000057, 0x00000000, 0x00000043, 0x00000005, 0x802E1C00, 0x00000000, 0x000000B4, 0x00000014, 0x00000002, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C88, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C89, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C87, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80245F8C_ECFC8C .word 0x00000043, 0x00000002, 0x802D6400, 0x0000003C, 0x00000024, 0x00000002, 0xFE363C83, 0x0000003C, 0x00000024, 0x00000002, 0xFE363C84, 0x0000003D, 0x00000024, 0x00000002, 0xFE363C85, 0x0000003E, 0x00000024, 0x00000002, 0xFE363C86, 0x0000003F, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000044, 0x00000001, D_80245C6C_ECF96C, 0x00000043, 0x00000002, 0x802D6400, 0x00000036, 0x00000024, 0x00000002, 0xFE363C83, 0x00000036, 0x00000024, 0x00000002, 0xFE363C84, 0x00000037, 0x00000024, 0x00000002, 0xFE363C85, 0x00000038, 0x00000024, 0x00000002, 0xFE363C86, 0x00000039, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000044, 0x00000001, D_80245C6C_ECF96C, 0x00000043, 0x00000002, 0x802D6400, 0x00000030, 0x00000024, 0x00000002, 0xFE363C83, 0x00000030, 0x00000024, 0x00000002, 0xFE363C84, 0x00000031, 0x00000024, 0x00000002, 0xFE363C85, 0x00000032, 0x00000024, 0x00000002, 0xFE363C86, 0x00000033, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000044, 0x00000001, D_80245C6C_ECF96C, 0x00000043, 0x00000002, 0x802D6400, 0x00000043, 0x00000024, 0x00000002, 0xFE363C83, 0x00000043, 0x00000024, 0x00000002, 0xFE363C84, 0x00000042, 0x00000024, 0x00000002, 0xFE363C85, 0x00000044, 0x00000024, 0x00000002, 0xFE363C86, 0x00000045, 0x00000024, 0x00000002, 0xFE363C8A, 0x000000AE, 0x00000044, 0x00000001, D_80245C6C_ECF96C, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000 diff --git a/ver/us/asm/data/world/dead/flo_09/ED1840.data.s b/ver/us/asm/data/world/dead/flo_09/ED1840.data.s index b34a4ae2c4..480e7ad9cb 100644 --- a/ver/us/asm/data/world/dead/flo_09/ED1840.data.s +++ b/ver/us/asm/data/world/dead/flo_09/ED1840.data.s @@ -24,7 +24,7 @@ dlabel D_80241CCC_ED1CBC .word 0x00000024, 0x00000002, 0xF5DE0329, 0x00000026, 0x00000043, 0x00000002, 0x802E6F50, 0xFFFFFFFF, 0x00000043, 0x00000006, 0x802D7CD8, 0x00000000, 0x00000003, 0x00000019, 0x00000010, 0x00001000, 0x00000043, 0x00000005, SetSleepBubbleTimeLeft, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, 0x802D7B70, 0x00000000, 0x00000001, 0x00000043, 0x00000003, 0x80048338, 0x00000000, D_8024417C_ED416C, 0x00000044, 0x00000001, D_8024260C_ED25FC, 0x00000044, 0x00000001, D_802434D8_ED34C8, 0x00000043, 0x00000004, AddCoin, 0x00000003, 0x00000009, 0x00000006, 0x00000024, 0x00000002, 0xFE363C80, 0xFFFFFE01, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFFFC, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFEC1, 0x00000024, 0x00000002, 0xFE363C83, 0x0000000A, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_80241920_ED1910, 0x00000024, 0x00000002, 0xFE363C80, 0xFFFFFED2, 0x00000024, 0x00000002, 0xFE363C81, 0x0000004D, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFFE0, 0x00000024, 0x00000002, 0xFE363C83, 0x00000074, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_80241920_ED1910, 0x00000024, 0x00000002, 0xFE363C80, 0x00000033, 0x00000024, 0x00000002, 0xFE363C81, 0x00000012, 0x00000024, 0x00000002, 0xFE363C82, 0x0000008D, 0x00000024, 0x00000002, 0xFE363C83, 0x0000007F, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_80241920_ED1910, 0x00000024, 0x00000002, 0xFE363C80, 0x000000EA, 0x00000024, 0x00000002, 0xFE363C81, 0x00000026, 0x00000024, 0x00000002, 0xFE363C82, 0x000001F6, 0x00000024, 0x00000002, 0xFE363C83, 0x00000062, 0x00000024, 0x00000002, 0xFE363C84, 0x00000000, 0x00000044, 0x00000001, D_80241920_ED1910, 0x00000024, 0x00000002, 0xFE363C80, 0xFFFFFDF3, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFF5D, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFE70, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFFB0, 0x00000024, 0x00000002, 0xFE363C84, 0x0000003C, 0x00000044, 0x00000001, D_80241920_ED1910, 0x00000024, 0x00000002, 0xFE363C80, 0xFFFFFEA6, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFF6C, 0x00000024, 0x00000002, 0xFE363C82, 0x00000205, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFFA5, 0x00000024, 0x00000002, 0xFE363C84, 0x0000003C, 0x00000044, 0x00000001, D_80241920_ED1910, 0x00000043, 0x00000004, AddCoin, 0x00000000, 0x00000001, 0x7FFFFE00, 0x00000043, 0x00000004, AddCoin, 0x00000000, 0x00000005, 0x7FFFFE00, 0x00000024, 0x00000002, 0xFE363C80, D_80241C84_ED1C74, 0x00000044, 0x00000001, 0x80285C70, 0x00000046, 0x00000001, D_802418B0_ED18A0, 0x0000000F, 0x00000002, 0xF5DE0180, 0x00000035, 0x00000043, 0x00000001, dead_flo_09_DeadUnkFunc1, 0x00000013, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000004D, 0x00000001, 0x0000000B, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C8C, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C84, 0x00000028, 0x00000002, 0xFE363C8C, 0xFE363C80, 0x00000028, 0x00000002, 0xFE363C8D, 0xFE363C81, 0x00000026, 0x00000002, 0xFE363C80, 0xFE363C8C, 0x0000002F, 0x00000002, 0xFE363C80, 0xF24C0A80, 0x00000026, 0x00000002, 0xFE363C8F, 0xF24C0A80, 0x0000002F, 0x00000002, 0xFE363C8F, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C8F, 0x0000000B, 0x00000024, 0x00000002, 0xFE363C85, 0x000000C8, 0x0000002A, 0x00000002, 0xFE363C85, 0xFE363C8F, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000005, 0x00000001, 0xFE363C85, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8C, 0xFE363C80, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8D, 0xFE363C81, 0x00000043, 0x00000003, 0x802E1D00, 0x000000C7, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C83, 0x000000D2, 0x00000028, 0x00000002, 0xFE363C83, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C81, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C82, 0xFE363C8E, 0x00000043, 0x0000000F, 0x802E58EC, 0x0000000D, 0xFE363C80, 0xFE363C82, 0xFE363C81, 0xFE363C83, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0xFE363C8F, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8C, 0xFE363C80, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8D, 0xFE363C81, 0x00000027, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C81, 0xFE363C8B, 0x00000043, 0x0000000F, 0x802E58EC, 0x0000000D, 0xFE363C80, 0xFE363C8E, 0xFE363C81, 0x000000C8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0xFE363C8F, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802422EC_ED22DC -.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C86, 0x00000024, 0x00000002, 0xFE363C88, 0xFE363C85, 0x00000024, 0x00000002, 0xFE363C87, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C86, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C84, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C80, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000001, dead_flo_09_UnkFunc43, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000001, 0x00000057, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C81, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C82, 0xFE363C85, 0x00000027, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C82, 0x00000008, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000028, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000E, 0x00000000, 0x00000057, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802E382C, 0x000000F8, 0x00000000, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000057, 0x00000000, 0x00000043, 0x00000005, 0x802E1C00, 0x00000000, 0x000000B4, 0x00000014, 0x00000002, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C88, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C89, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C87, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C86, 0x00000024, 0x00000002, 0xFE363C88, 0xFE363C85, 0x00000024, 0x00000002, 0xFE363C87, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C86, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C84, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C80, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000001, dead_flo_09_CheckVineTriggerDist, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000001, 0x00000057, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C81, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C82, 0xFE363C85, 0x00000027, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C82, 0x00000008, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000028, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000E, 0x00000000, 0x00000057, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802E382C, 0x000000F8, 0x00000000, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000057, 0x00000000, 0x00000043, 0x00000005, 0x802E1C00, 0x00000000, 0x000000B4, 0x00000014, 0x00000002, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C88, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C89, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C87, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_8024260C_ED25FC .word 0x00000043, 0x00000002, 0x802D6400, 0x00000045, 0x00000024, 0x00000002, 0xFE363C83, 0x00000045, 0x00000024, 0x00000002, 0xFE363C84, 0x00000046, 0x00000024, 0x00000002, 0xFE363C85, 0x00000047, 0x00000024, 0x00000002, 0xFE363C86, 0x00000048, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000044, 0x00000001, D_802422EC_ED22DC, 0x00000043, 0x00000002, 0x802D6400, 0x0000004B, 0x00000024, 0x00000002, 0xFE363C83, 0x0000004B, 0x00000024, 0x00000002, 0xFE363C84, 0x0000004C, 0x00000024, 0x00000002, 0xFE363C85, 0x0000004D, 0x00000024, 0x00000002, 0xFE363C86, 0x0000004E, 0x00000024, 0x00000002, 0xFE363C8A, 0x000000AE, 0x00000044, 0x00000001, D_802422EC_ED22DC, 0x00000043, 0x00000002, 0x802D6400, 0x00000053, 0x00000024, 0x00000002, 0xFE363C83, 0x00000053, 0x00000024, 0x00000002, 0xFE363C84, 0x00000054, 0x00000024, 0x00000002, 0xFE363C85, 0x00000055, 0x00000024, 0x00000002, 0xFE363C86, 0x00000056, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000044, 0x00000001, D_802422EC_ED22DC, 0x00000043, 0x00000002, 0x802D6400, 0x00000059, 0x00000024, 0x00000002, 0xFE363C83, 0x00000059, 0x00000024, 0x00000002, 0xFE363C84, 0x0000005A, 0x00000024, 0x00000002, 0xFE363C85, 0x0000005B, 0x00000024, 0x00000002, 0xFE363C86, 0x0000005C, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000044, 0x00000001, D_802422EC_ED22DC, 0x00000043, 0x00000002, 0x802D6400, 0x00000061, 0x00000024, 0x00000002, 0xFE363C83, 0x00000061, 0x00000024, 0x00000002, 0xFE363C84, 0x00000062, 0x00000024, 0x00000002, 0xFE363C85, 0x00000063, 0x00000024, 0x00000002, 0xFE363C86, 0x00000064, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000044, 0x00000001, D_802422EC_ED22DC, 0x00000043, 0x00000002, 0x802D6400, 0x00000067, 0x00000024, 0x00000002, 0xFE363C83, 0x00000067, 0x00000024, 0x00000002, 0xFE363C84, 0x00000068, 0x00000024, 0x00000002, 0xFE363C85, 0x00000069, 0x00000024, 0x00000002, 0xFE363C86, 0x0000006A, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000044, 0x00000001, D_802422EC_ED22DC, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000030, 0x00000001, 0xFE363C80, 0x00000034, 0x00000004, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0xFE363C84, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C85, 0xFE363C8F, 0xFE363C87, 0x00000056, 0x00000000, 0x00000024, 0x00000002, 0xFBD3E280, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C81, 0x00000000, 0x00000005, 0x00000001, 0x00000005, 0x00000030, 0x00000001, 0xFE363C81, 0x00000031, 0x00000001, 0xFE363C82, 0x00000005, 0x00000001, 0xFE363C82, 0x00000031, 0x00000001, 0xFE363C83, 0x00000043, 0x00000006, dead_flo_09_TransformFoliage, 0xFE363C83, 0xF24A7AE7, 0x00000001, 0xFE363C8F, 0x00000000, 0x0000000A, 0x00000002, 0xFBD3E280, 0x00000000, 0x00000024, 0x00000002, 0xFBD3E280, 0x00000001, 0x00000043, 0x00000004, 0x802D7A04, 0xFE363C83, 0x00000153, 0x00000000, 0x00000013, 0x00000000, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000030, 0x00000001, 0xFE363C81, 0x00000031, 0x00000001, 0xFE363C82, 0x00000005, 0x00000001, 0xFE363C82, 0x00000031, 0x00000001, 0xFE363C83, 0x00000043, 0x00000006, dead_flo_09_TransformFoliage, 0xFE363C83, 0xF24A7AE7, 0xFFFFFFFF, 0xFE363C8F, 0x00000000, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000030, 0x00000001, 0xFE363C81, 0x00000031, 0x00000001, 0xFE363C82, 0x00000005, 0x00000001, 0xFE363C82, 0x00000031, 0x00000001, 0xFE363C83, 0x00000043, 0x00000005, 0x802D5FE0, 0xFE363C83, 0x00000000, 0x00000000, 0x00000000, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000057, 0x00000000, 0x00000056, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C82, 0x00000000, 0x00000030, 0x00000001, 0xFE363C82, 0x00000031, 0x00000001, 0xFE363C83, 0x00000005, 0x00000001, 0xFE363C83, 0x00000031, 0x00000001, 0xFE363C84, 0x00000033, 0x00000003, 0xFE363C85, 0xFE363C86, 0xFE363C87, 0x00000033, 0x00000003, 0xFE363C88, 0xFE363C89, 0xFE363C8A, 0x0000000A, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000043, 0x00000007, 0x802E4410, 0xFE363C84, 0xFE363C85, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0xFE363C89, 0x00000012, 0x00000000, 0x00000043, 0x00000003, 0x802E2F8C, 0xFE363C8A, 0xFE363C8B, 0x0000000A, 0x00000002, 0xFE363C8B, 0x00000000, 0x00000043, 0x00000003, 0x802E2F30, 0xFE363C8A, 0x00000001, 0x00000043, 0x00000007, 0x802E4410, 0xFE363C84, 0xFE363C85, 0xFE363C86, 0xFE363C87, 0xFE363C88, 0xFE363C89, 0x00000013, 0x00000000, 0x00000013, 0x00000000, 0x00000006, 0x00000000, 0x00000013, 0x00000000, 0x00000057, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x0000000B, 0x00000002, 0xFE363C84, 0x00000000, 0x00000046, 0x00000001, 0xFE363C84, 0x00000013, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 diff --git a/ver/us/asm/data/world/dead/flo_14/EE8970.data.s b/ver/us/asm/data/world/dead/flo_14/EE8970.data.s index 1ecc4aeef2..8ef4d925a8 100644 --- a/ver/us/asm/data/world/dead/flo_14/EE8970.data.s +++ b/ver/us/asm/data/world/dead/flo_14/EE8970.data.s @@ -30,7 +30,7 @@ dlabel D_80242C30_EE91E0 .word 0x0000004D, 0x00000001, 0x0000000B, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C8C, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C84, 0x00000028, 0x00000002, 0xFE363C8C, 0xFE363C80, 0x00000028, 0x00000002, 0xFE363C8D, 0xFE363C81, 0x00000026, 0x00000002, 0xFE363C80, 0xFE363C8C, 0x0000002F, 0x00000002, 0xFE363C80, 0xF24C0A80, 0x00000026, 0x00000002, 0xFE363C8F, 0xF24C0A80, 0x0000002F, 0x00000002, 0xFE363C8F, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C8F, 0x0000000B, 0x00000024, 0x00000002, 0xFE363C85, 0x000000C8, 0x0000002A, 0x00000002, 0xFE363C85, 0xFE363C8F, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000005, 0x00000001, 0xFE363C85, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8C, 0xFE363C80, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8D, 0xFE363C81, 0x00000043, 0x00000003, 0x802E1D00, 0x000000C7, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C83, 0x000000D2, 0x00000028, 0x00000002, 0xFE363C83, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C81, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C82, 0xFE363C8E, 0x00000043, 0x0000000F, 0x802E58EC, 0x0000000D, 0xFE363C80, 0xFE363C82, 0xFE363C81, 0xFE363C83, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0xFE363C8F, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8C, 0xFE363C80, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8D, 0xFE363C81, 0x00000027, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C81, 0xFE363C8B, 0x00000043, 0x0000000F, 0x802E58EC, 0x0000000D, 0xFE363C80, 0xFE363C8E, 0xFE363C81, 0x000000C8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0xFE363C8F, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_80242EDC_EE948C -.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C86, 0x00000024, 0x00000002, 0xFE363C88, 0xFE363C85, 0x00000024, 0x00000002, 0xFE363C87, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C86, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C84, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C80, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000001, dead_flo_14_UnkFunc43, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000001, 0x00000057, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C81, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C82, 0xFE363C85, 0x00000027, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C82, 0x00000008, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000028, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000E, 0x00000000, 0x00000057, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802E382C, 0x000000F8, 0x00000000, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000057, 0x00000000, 0x00000043, 0x00000005, 0x802E1C00, 0x00000000, 0x000000B4, 0x00000014, 0x00000002, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C88, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C89, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C87, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C86, 0x00000024, 0x00000002, 0xFE363C88, 0xFE363C85, 0x00000024, 0x00000002, 0xFE363C87, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C86, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C84, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C80, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000001, dead_flo_14_CheckVineTriggerDist, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000001, 0x00000057, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C81, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C82, 0xFE363C85, 0x00000027, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C82, 0x00000008, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000028, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000E, 0x00000000, 0x00000057, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802E382C, 0x000000F8, 0x00000000, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000057, 0x00000000, 0x00000043, 0x00000005, 0x802E1C00, 0x00000000, 0x000000B4, 0x00000014, 0x00000002, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C88, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C89, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C87, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802431FC_EE97AC .word 0x00000000 diff --git a/ver/us/asm/data/world/dead/flo_16/EEFAD0.data.s b/ver/us/asm/data/world/dead/flo_16/EEFAD0.data.s index 5a0790bb4d..d13bceece2 100644 --- a/ver/us/asm/data/world/dead/flo_16/EEFAD0.data.s +++ b/ver/us/asm/data/world/dead/flo_16/EEFAD0.data.s @@ -27,7 +27,7 @@ dlabel D_80242F00_EF0000 .word 0x0000004D, 0x00000001, 0x0000000B, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C8C, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C8D, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C84, 0x00000028, 0x00000002, 0xFE363C8C, 0xFE363C80, 0x00000028, 0x00000002, 0xFE363C8D, 0xFE363C81, 0x00000026, 0x00000002, 0xFE363C80, 0xFE363C8C, 0x0000002F, 0x00000002, 0xFE363C80, 0xF24C0A80, 0x00000026, 0x00000002, 0xFE363C8F, 0xF24C0A80, 0x0000002F, 0x00000002, 0xFE363C8F, 0xFE363C80, 0x00000027, 0x00000002, 0xFE363C8F, 0x0000000B, 0x00000024, 0x00000002, 0xFE363C85, 0x000000C8, 0x0000002A, 0x00000002, 0xFE363C85, 0xFE363C8F, 0x00000027, 0x00000002, 0xFE363C85, 0x00000001, 0x00000005, 0x00000001, 0xFE363C85, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8C, 0xFE363C80, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8D, 0xFE363C81, 0x00000043, 0x00000003, 0x802E1D00, 0x000000C7, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C83, 0x000000D2, 0x00000028, 0x00000002, 0xFE363C83, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C81, 0xFE363C8B, 0x00000027, 0x00000002, 0xFE363C82, 0xFE363C8E, 0x00000043, 0x0000000F, 0x802E58EC, 0x0000000D, 0xFE363C80, 0xFE363C82, 0xFE363C81, 0xFE363C83, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000006, 0x00000000, 0x00000008, 0x00000001, 0xFE363C8F, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8C, 0xFE363C80, 0x00000043, 0x00000003, 0x802E1D00, 0xFE363C8D, 0xFE363C81, 0x00000027, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C81, 0xFE363C8B, 0x00000043, 0x0000000F, 0x802E58EC, 0x0000000D, 0xFE363C80, 0xFE363C8E, 0xFE363C81, 0x000000C8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0xFE363C8F, 0x00000004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802431AC_EF02AC -.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C86, 0x00000024, 0x00000002, 0xFE363C88, 0xFE363C85, 0x00000024, 0x00000002, 0xFE363C87, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C86, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C84, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C80, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000001, dead_flo_16_UnkFunc43, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000001, 0x00000057, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C81, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C82, 0xFE363C85, 0x00000027, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C82, 0x00000008, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000028, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000E, 0x00000000, 0x00000057, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802E382C, 0x000000F8, 0x00000000, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000057, 0x00000000, 0x00000043, 0x00000005, 0x802E1C00, 0x00000000, 0x000000B4, 0x00000014, 0x00000002, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C88, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C89, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C87, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 +.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C86, 0x00000024, 0x00000002, 0xFE363C88, 0xFE363C85, 0x00000024, 0x00000002, 0xFE363C87, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C86, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C85, 0xFE363C82, 0x00000024, 0x00000002, 0xFE363C84, 0xFE363C81, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C80, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000001, dead_flo_16_CheckVineTriggerDist, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C86, 0x00000001, 0x00000057, 0x00000000, 0x0000000B, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C83, 0x00000024, 0x00000002, 0xFE363C81, 0xFE363C84, 0x00000024, 0x00000002, 0xFE363C82, 0xFE363C85, 0x00000027, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000027, 0x00000002, 0xFE363C82, 0x00000008, 0x00000043, 0x0000000F, 0x802E58EC, 0x00000011, 0x00000004, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000028, 0x00000002, 0xFE363C81, 0x0000000A, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C8A, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x0000000E, 0x00000000, 0x00000057, 0x00000000, 0x00000013, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000006, 0x802E382C, 0x000000F8, 0x00000000, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000057, 0x00000000, 0x00000043, 0x00000005, 0x802E1C00, 0x00000000, 0x000000B4, 0x00000014, 0x00000002, 0x00000003, 0x00000001, 0x00000001, 0x00000043, 0x00000001, 0x802E1C7C, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C88, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x00000043, 0x00000006, 0x802D60E4, 0xFE363C89, 0xFE363C80, 0x00000001, 0x00000000, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000001, 0x00000008, 0x00000001, 0x00000001, 0x00000004, 0x00000001, 0x00000001, 0x00000013, 0x00000000, 0x00000043, 0x00000003, 0x802D6708, 0xFE363C87, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000 dlabel D_802434CC_EF05CC .word 0x00000043, 0x00000004, AddCoin, 0x00000003, 0x00000014, 0x00000006, 0x00000024, 0x00000002, 0xFE363C80, 0xFFFFFD1C, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFF74, 0x00000024, 0x00000002, 0xFE363C82, 0xFFFFFEFC, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFFC9, 0x00000024, 0x00000002, 0xFE363C84, 0x00000064, 0x00000044, 0x00000001, D_80242F00_EF0000, 0x00000024, 0x00000002, 0xFE363C80, 0x000000FA, 0x00000024, 0x00000002, 0xFE363C81, 0xFFFFFF74, 0x00000024, 0x00000002, 0xFE363C82, 0x000002D5, 0x00000024, 0x00000002, 0xFE363C83, 0xFFFFFFC9, 0x00000024, 0x00000002, 0xFE363C84, 0x000000B4, 0x00000044, 0x00000001, D_80242F00_EF0000, 0x00000043, 0x00000002, 0x802D6400, 0x00000041, 0x00000024, 0x00000002, 0xFE363C83, 0x00000041, 0x00000024, 0x00000002, 0xFE363C84, 0x00000042, 0x00000024, 0x00000002, 0xFE363C85, 0x00000043, 0x00000024, 0x00000002, 0xFE363C86, 0x00000044, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000044, 0x00000001, D_802431AC_EF02AC, 0x00000043, 0x00000002, 0x802D6400, 0x00000047, 0x00000024, 0x00000002, 0xFE363C83, 0x00000047, 0x00000024, 0x00000002, 0xFE363C84, 0x00000048, 0x00000024, 0x00000002, 0xFE363C85, 0x00000049, 0x00000024, 0x00000002, 0xFE363C86, 0x0000004A, 0x00000024, 0x00000002, 0xFE363C8A, 0x000000AE, 0x00000044, 0x00000001, D_802431AC_EF02AC, 0x00000043, 0x00000002, 0x802D6400, 0x0000004F, 0x00000024, 0x00000002, 0xFE363C83, 0x0000004F, 0x00000024, 0x00000002, 0xFE363C84, 0x00000050, 0x00000024, 0x00000002, 0xFE363C85, 0x00000051, 0x00000024, 0x00000002, 0xFE363C86, 0x00000052, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000044, 0x00000001, D_802431AC_EF02AC, 0x00000043, 0x00000002, 0x802D6400, 0x00000055, 0x00000024, 0x00000002, 0xFE363C83, 0x00000055, 0x00000024, 0x00000002, 0xFE363C84, 0x00000056, 0x00000024, 0x00000002, 0xFE363C85, 0x00000057, 0x00000024, 0x00000002, 0xFE363C86, 0x00000058, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000044, 0x00000001, D_802431AC_EF02AC, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000 diff --git a/ver/us/asm/nonmatchings/world/area_kmr/kmr_23/907A40/func_80240DA4_9087D4.s b/ver/us/asm/nonmatchings/world/area_kmr/kmr_23/kmr_23_2_npc/func_80240DA4_9087D4.s similarity index 100% rename from ver/us/asm/nonmatchings/world/area_kmr/kmr_23/907A40/func_80240DA4_9087D4.s rename to ver/us/asm/nonmatchings/world/area_kmr/kmr_23/kmr_23_2_npc/func_80240DA4_9087D4.s diff --git a/ver/us/asm/nonmatchings/world/area_obk/obk_01/BBD980/func_80240BB0_BBDD50.s b/ver/us/asm/nonmatchings/world/area_obk/obk_01/BBD980/func_80240BB0_BBDD50.s index cc185b82d7..a2b904bdb9 100644 --- a/ver/us/asm/nonmatchings/world/area_obk/obk_01/BBD980/func_80240BB0_BBDD50.s +++ b/ver/us/asm/nonmatchings/world/area_obk/obk_01/BBD980/func_80240BB0_BBDD50.s @@ -13,8 +13,8 @@ glabel func_80240BB0_BBDD50 /* BBDD70 80240BD0 8C620000 */ lw $v0, ($v1) /* BBDD74 80240BD4 5040000A */ beql $v0, $zero, .L80240C00 /* BBDD78 80240BD8 00041080 */ sll $v0, $a0, 2 -/* BBDD7C 80240BDC 3C058024 */ lui $a1, %hi(flo_08_tree1) -/* BBDD80 80240BE0 24A558F0 */ addiu $a1, $a1, %lo(flo_08_tree1) +/* BBDD7C 80240BDC 3C058024 */ lui $a1, %hi(obk_01_802458F0) +/* BBDD80 80240BE0 24A558F0 */ addiu $a1, $a1, %lo(obk_01_802458F0) .L80240BE4: /* BBDD84 80240BE4 24630004 */ addiu $v1, $v1, 4 /* BBDD88 80240BE8 24840001 */ addiu $a0, $a0, 1 @@ -24,14 +24,14 @@ glabel func_80240BB0_BBDD50 /* BBDD98 80240BF8 24A50004 */ addiu $a1, $a1, 4 /* BBDD9C 80240BFC 00041080 */ sll $v0, $a0, 2 .L80240C00: -/* BBDDA0 80240C00 3C018024 */ lui $at, %hi(flo_08_tree1) +/* BBDDA0 80240C00 3C018024 */ lui $at, %hi(obk_01_802458F0) /* BBDDA4 80240C04 00220821 */ addu $at, $at, $v0 -/* BBDDA8 80240C08 AC2058F0 */ sw $zero, %lo(flo_08_tree1)($at) +/* BBDDA8 80240C08 AC2058F0 */ sw $zero, %lo(obk_01_802458F0)($at) /* BBDDAC 80240C0C 0809030F */ j .L80240C3C /* BBDDB0 80240C10 00000000 */ nop .L80240C14: -/* BBDDB4 80240C14 3C038024 */ lui $v1, %hi(flo_08_tree1) -/* BBDDB8 80240C18 246358F0 */ addiu $v1, $v1, %lo(flo_08_tree1) +/* BBDDB4 80240C14 3C038024 */ lui $v1, %hi(obk_01_802458F0) +/* BBDDB8 80240C18 246358F0 */ addiu $v1, $v1, %lo(obk_01_802458F0) /* BBDDBC 80240C1C 0060282D */ daddu $a1, $v1, $zero .L80240C20: /* BBDDC0 80240C20 24820010 */ addiu $v0, $a0, 0x10 diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 1805617640..3ad56c8a43 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -8342,13 +8342,12 @@ segments: start: 0x876EE0 vram: 0x80240000 subsegments: - - [0x876EE0, c] - - [0x8774D0, c] - - [0x877840, data] - - [0x8778F0, data] - - [0x878F90, data] - - [0x879860, data] - - [0x879BB0] + - [0x876EE0, c, tik_06_0_header] + - [0x876EE0, c, tik_06_1_music] + - [0x876EE0, c, tik_06_2_main] + - [0x8774D0, c, tik_06_3_drips] + - [0x877840, c, tik_06_4_entity] + - [0x877840] - name: tik_07 dir: world/area_tik/tik_07 type: code @@ -12542,9 +12541,13 @@ segments: start: 0xC9DF20 vram: 0x80240000 subsegments: - - [0xC9DF20, c, C9DF20] - - [0xC9DF60, c, C9DF60] - - [0xC9EE30, c, C9EE30] + - [0xC9DF20, c, flo_00_0_header] + - [0xC9DF20, c, flo_00_1_music] + - [0xC9DF20, c, flo_00_2_main] + - [0xC9DF60, c, flo_00_3_npc] + - [0xC9EE30, c, flo_00_4_epilogue] + - [0xC9EE30, c, flo_00_5_beanstalk] + - [0xC9F300, c, flo_00_6_entity] - [0xC9F300] - name: flo_03 dir: world/area_flo/flo_03 @@ -12552,8 +12555,12 @@ segments: start: 0xCA72A0 vram: 0x80240000 subsegments: - - [0xCA72A0, c, CA72A0] - - [0xCA72E0, c, CA72E0] + - [0xCA72A0, c, flo_03_0_header] + - [0xCA72A0, c, flo_03_1_music] + - [0xCA72A0, c, flo_03_2_main] + - [0xCA72E0, c, flo_03_3_npc] + - [0xCA7690, c, flo_03_4_foliage] + - [0xCA78D0, c, flo_03_5_entity] - [0xCA78D0] - name: flo_07 dir: world/area_flo/flo_07 @@ -12561,19 +12568,24 @@ segments: start: 0xCAC1F0 vram: 0x80240000 subsegments: - - [0xCAC1F0, c, CAC1F0] - - [0xCAC5D0, c, CAC5D0] - - [0xCAC930] + - [0xCAC1F0, c, flo_07_0_header] + - [0xCAC1F0, c, flo_07_1_music] + - [0xCAC1F0, c, flo_07_2_main] + - [0xCAC5D0, c, flo_07_3_npc] + - [0xCAC5D0] - name: flo_08 dir: world/area_flo/flo_08 type: code start: 0xCAED40 vram: 0x80240000 subsegments: - - [0xCAED40, c, CAED40] - - [0xCAFA80, c, CAFA80] - - [0xCAFAC0, c, CAFAC0] - - [0xCB0B80, c, CB0B80] + - [0xCAED40, c, flo_08_0_header] + - [0xCAED40, c, flo_08_1_music] + - [0xCAED40, c, flo_08_2_entity] + - [0xCAFA80, c, flo_08_3_main] + - [0xCAFAC0, c, flo_08_4_npc] + - [0xCB0940, c, flo_08_5_foliage] + - [0xCB0B80, c, flo_08_6_vines] - [0xCB0C20] - name: flo_09 dir: world/area_flo/flo_09 @@ -12581,10 +12593,12 @@ segments: start: 0xCB5000 vram: 0x80240000 subsegments: - - [0xCB5000, c, CB5000] - - [0xCB5040, c, CB5040] - - [0xCB50E0, c, CB50E0] - - [0xCB5320, c, CB5320] + - [0xCB5000, c, flo_09_0_header] + - [0xCB5000, c, flo_09_1_music] + - [0xCB5000, c, flo_09_2_main] + - [0xCB5040, c, flo_09_3_vines] + - [0xCB50E0, c, flo_09_4_foliage] + - [0xCB5320, c, flo_09_5_npc] - [0xCB6820] - name: flo_10 dir: world/area_flo/flo_10 @@ -12592,11 +12606,14 @@ segments: start: 0xCB9200 vram: 0x80240000 subsegments: - - [0xCB9200, c, CB9200] - - [0xCB9240, c, CB9240] - - [0xCB9280, c, CB9280] - - [0xCB96B0, c, CB96B0] - - [0xCBA430, c, CBA430] + - [0xCB9200, c, flo_10_0_header] + - [0xCB9240, c, flo_10_1_music] + - [0xCB9240, c, flo_10_2_entity] + - [0xCB9240, c, flo_10_3_main] + - [0xCB9280, c, flo_10_4_fountain] + - [0xCB96B0, c, flo_10_5_npc] + - [0xCB96B0, c, flo_10_6_waterfx] + - [0xCBA430, c, flo_10_7_foliage] - [0xCBA670] - name: flo_11 dir: world/area_flo/flo_11 @@ -12604,7 +12621,11 @@ segments: start: 0xCBDCD0 vram: 0x80240000 subsegments: - - [0xCBDCD0, c, CBDCD0] + - [0xCBDCD0, c, flo_11_0_header] + - [0xCBDCD0, c, flo_11_1_music] + - [0xCBDCD0, c, flo_11_2_main] + - [0xCBDFF0, c, flo_11_3_npc] + - [0xCBDFF0, c, flo_11_4_entity] - [0xCBDFF0] - name: flo_12 dir: world/area_flo/flo_12 @@ -12612,8 +12633,10 @@ segments: start: 0xCC0E30 vram: 0x80240000 subsegments: - - [0xCC0E30, c, CC0E30] - - [0xCC0E70, c, CC0E70] + - [0xCC0E30, c, flo_12_0_header] + - [0xCC0E30, c, flo_12_1_music] + - [0xCC0E30, c, flo_12_2_main] + - [0xCC0E70, c, flo_12_3_npc] - [0xCC1520] - name: flo_13 dir: world/area_flo/flo_13 @@ -12621,9 +12644,12 @@ segments: start: 0xCC3810 vram: 0x80240000 subsegments: - - [0xCC3810, c, CC3810] - - [0xCC3850, c, CC3850] - - [0xCC6DE0, c, CC6DE0] + - [0xCC3810, c, flo_13_0_header] + - [0xCC3810, c, flo_13_1_music] + - [0xCC3810, c, flo_13_2_entity] + - [0xCC3810, c, flo_13_3_main] + - [0xCC3850, c, flo_13_4_npc] + - [0xCC6DE0, c, flo_13_5_new_party] - [0xCC6E80] - name: flo_14 dir: world/area_flo/flo_14 @@ -12631,9 +12657,13 @@ segments: start: 0xCCB310 vram: 0x80240000 subsegments: - - [0xCCB310, c, CCB310] - - [0xCCBE20, c, CCBE20] - - [0xCCD670, c, CCD670] + - [0xCCB310, c, flo_14_0_header] + - [0xCCB310, c, flo_14_1_music] + - [0xCCB310, c, flo_14_2_main] + - [0xCCB650, c, flo_14_3_bubbles] + - [0xCCBE20, c, flo_14_4_npc] + - [0xCCD670, c, flo_14_5_entity] + - [0xCCD670, c, flo_14_6_logs] - [0xCCD6A0] - name: flo_15 dir: world/area_flo/flo_15 @@ -12641,7 +12671,12 @@ segments: start: 0xCD06C0 vram: 0x80240000 subsegments: - - [0xCD06C0, c, CD06C0] + - [0xCD06C0, c, flo_15_0_header] + - [0xCD06C0, c, flo_15_1_music] + - [0xCD06C0, c, flo_15_2_main] + - [0xCD06C0, c, flo_15_3_npc] + - [0xCD06C0, c, flo_15_4_entity] + - [0xCD06C0, c, flo_15_5_stairs] - [0xCD06C0] - name: flo_16 dir: world/area_flo/flo_16 @@ -12649,11 +12684,13 @@ segments: start: 0xCD1E30 vram: 0x80240000 subsegments: - - [0xCD1E30, c, CD1E30] - - [0xCD1E70, c, CD1E70] - - [0xCD1F10, c, CD1F10] - - [0xCD2C80, c, CD2C80] - - [0xCD4770, c, CD4770] + - [0xCD1E30, c, flo_16_0_header] + - [0xCD1E30, c, flo_16_1_music] + - [0xCD1E30, c, flo_16_2_main] + - [0xCD1E70, c, flo_16_3_vines] + - [0xCD1F10, c, flo_16_4_entity] + - [0xCD2C80, c, flo_16_5_npc] + - [0xCD4770, c, flo_16_6_puzzle] - [0xCD47A0] - name: flo_17 dir: world/area_flo/flo_17 @@ -12661,9 +12698,12 @@ segments: start: 0xCD72E0 vram: 0x80240000 subsegments: - - [0xCD72E0, c, CD72E0] - - [0xCD7320, c, CD7320] - - [0xCD7350, c, CD7350] + - [0xCD72E0, c, flo_17_0_header] + - [0xCD72E0, c, flo_17_1_music] + - [0xCD72E0, c, flo_17_2_main] + - [0xCD7320, c, flo_17_3_logs] + - [0xCD7350, c, flo_17_4_npc] + - [0xCDA500, c, flo_17_5_entity] - [0xCDA500] - name: flo_18 dir: world/area_flo/flo_18 @@ -12671,9 +12711,12 @@ segments: start: 0xCDC6A0 vram: 0x80240000 subsegments: - - [0xCDC6A0, c, CDC6A0] - - [0xCDCBD0, c, CDCBD0] - - [0xCDCC30, c, CDCC30] + - [0xCDC6A0, c, flo_18_0_header] + - [0xCDC6A0, c, flo_18_1_music] + - [0xCDC6A0, c, flo_18_2_main] + - [0xCDC9E0, c, flo_18_3_machine] + - [0xCDCBD0, c, flo_18_4_npc] + - [0xCDCC30, c, flo_18_5_foliage] - [0xCDCE70] - name: flo_19 dir: world/area_flo/flo_19 @@ -12681,7 +12724,12 @@ segments: start: 0xCE36F0 vram: 0x80240000 subsegments: - - [0xCE36F0, c, CE36F0] + - [0xCE36F0, c, flo_19_0_header] + - [0xCE36F0, c, flo_19_1_music] + - [0xCE36F0, c, flo_19_2_entity] + - [0xCE36F0, c, flo_19_3_main] + - [0xCE3A30, c, flo_19_4_clouds] + - [0xCE3BC0, c, flo_19_5_beanstalk] - [0xCE4030] - name: flo_21 dir: world/area_flo/flo_21 @@ -12689,8 +12737,11 @@ segments: start: 0xCE6700 vram: 0x80240000 subsegments: - - [0xCE6700, c, CE6700] - - [0xCE7240, c, CE7240] + - [0xCE6700, c, flo_21_0_header] + - [0xCE6700, c, flo_21_1_music] + - [0xCE6700, c, flo_21_2_main] + - [0xCE7240, c, flo_21_3_clouds] + - [0xCE73D0, c, flo_21_4_npc] - [0xCE73F0] - name: flo_22 dir: world/area_flo/flo_22 @@ -12698,9 +12749,12 @@ segments: start: 0xCEC240 vram: 0x80240000 subsegments: - - [0xCEC240, c, CEC240] - - [0xCEC280, c, CEC280] - - [0xCEC290, c, CEC290] + - [0xCEC240, c, flo_22_0_header] + - [0xCEC240, c, flo_22_1_music] + - [0xCEC240, c, flo_22_2_main] + - [0xCEC280, c, flo_22_3_npc] + - [0xCEC280, c, flo_22_4_well] + - [0xCEC290, c, flo_22_5_foliage] - [0xCEC4D0] - name: flo_23 dir: world/area_flo/flo_23 @@ -12708,8 +12762,11 @@ segments: start: 0xCEE260 vram: 0x80240000 subsegments: - - [0xCEE260, c, CEE260] - - [0xCEE2A0, c, CEE2A0] + - [0xCEE260, c, flo_23_0_header] + - [0xCEE260, c, flo_23_1_music] + - [0xCEE260, c, flo_23_2_main] + - [0xCEE2A0, c, flo_23_3_npc] + - [0xCEEF30, c, flo_23_4_entity] - [0xCEEF30] - name: flo_24 dir: world/area_flo/flo_24 @@ -12717,9 +12774,12 @@ segments: start: 0xCF0940 vram: 0x80240000 subsegments: - - [0xCF0940, c, CF0940] - - [0xCF0980, c, CF0980] - - [0xCF0BC0, c, CF0BC0] + - [0xCF0940, c, flo_24_0_header] + - [0xCF0940, c, flo_24_1_music] + - [0xCF0940, c, flo_24_2_main] + - [0xCF0980, c, flo_24_3_foliage] + - [0xCF0BC0, c, flo_24_4_water] + - [0xCF0ED0, c, flo_24_5_entity] - [0xCF0ED0] - name: flo_25 dir: world/area_flo/flo_25 @@ -12727,10 +12787,13 @@ segments: start: 0xCF2BD0 vram: 0x80240000 subsegments: - - [0xCF2BD0, c, CF2BD0] - - [0xCF2C10, c, CF2C10] - - [0xCF4BC0, c, CF4BC0] - - [0xCF4E00, c, CF4E00] + - [0xCF2BD0, c, flo_25_0_header] + - [0xCF2BD0, c, flo_25_1_music] + - [0xCF2BD0, c, flo_25_2_main] + - [0xCF2C10, c, flo_25_3_npc] + - [0xCF4BC0, c, flo_25_4_entity] + - [0xCF4BC0, c, flo_25_5_foliage] + - [0xCF4E00, c, flo_25_6_vine] - [0xCF4EA0] - name: sam_01 dir: world/area_sam/sam_01 diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 9156082f77..dee0132b35 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -4455,7 +4455,7 @@ sprite_shading_set_light_source = 0x80148154; // type:func rom:0xDE854 create_shading_palette = 0x801481C4; // type:func rom:0xDE8C4 appendGfx_shading_palette = 0x801489B8; // type:func rom:0xDF0B8 func_801491E4 = 0x801491E4; // type:func rom:0xDF8E4 -sfx_compute_spatialized_sound_params_2 = 0x80149250; // type:func rom:0xDF950 +sfx_compute_spatialized_sound_params_full = 0x80149250; // type:func rom:0xDF950 sfx_reset_door_sounds = 0x80149600; // type:func rom:0xDFD00 sfx_clear_sounds = 0x80149618; // type:func rom:0xDFD18 sfx_clear_env_sounds = 0x80149670; // type:func rom:0xDFD70 @@ -8784,7 +8784,7 @@ D_E00BAE88 = 0xE00BAE88; // type:data rom:0x3B9A58 D_E00BAE90 = 0xE00BAE90; // type:data rom:0x3B9A60 lightning_bolt_main = 0xE00BC000; // type:func rom:0x3BA030 lightning_bolt_init = 0xE00BC1D0; // type:func rom:0x3BA200 -func_E00BC1D8 = 0xE00BC1D8; // type:func rom:0x3BA208 +lightning_bolt_get_rand_symmetric = 0xE00BC1D8; // type:func rom:0x3BA208 lightning_bolt_update = 0xE00BC238; // type:func rom:0x3BA268 lightning_bolt_render = 0xE00BC2E8; // type:func rom:0x3BA318 func_E00BC36C = 0xE00BC36C; // type:func rom:0x3BA39C @@ -15500,7 +15500,7 @@ tik_01_Pipe_AwaitDownInput = 0x80240340; // type:func rom:0x8697F0 tik_01_Pipe_GetEntryPos = 0x802403FC; // type:func rom:0x8698AC tik_01_Pipe_GetCameraYaw = 0x802404DC; // type:func rom:0x86998C tik_01_Pipe_GetPointAheadOfPlayer = 0x80240548; // type:func rom:0x8699F8 -tik_01_UnkPosFunc2 = 0x802405F0; // type:func rom:0x869AA0 +tik_01_CheckDripCollisionWithNPC = 0x802405F0; // type:func rom:0x869AA0 tik_01_SetEntityPosition = 0x80240960; // type:func rom:0x869E10 func_80240A30_869EE0 = 0x80240A30; // type:func rom:0x869EE0 D_80242B7E_86C02E = 0x80242B7E; // type:data rom:0x86C02E @@ -15510,7 +15510,7 @@ tik_02_StashVars = 0x80240310; // type:func rom:0x86CA50 tik_02_GetItemName = 0x802403C4; // type:func rom:0x86CB04 tik_02_SomeItemEntityFunc = 0x80240428; // type:func rom:0x86CB68 tik_02_IsItemBadge = 0x80240578; // type:func rom:0x86CCB8 -tik_02_UnkPosFunc2 = 0x802405D0; // type:func rom:0x86CD10 +tik_02_CheckDripCollisionWithNPC = 0x802405D0; // type:func rom:0x86CD10 func_80240940_86D080 = 0x80240940; // type:func rom:0x86D080 tik_02_varStash = 0x802410C0; // type:data rom:0x86D800 D_80241BAE_86E2EE = 0x80241BAE; // type:data rom:0x86E2EE @@ -15522,7 +15522,7 @@ tik_03_Pipe_GetCameraYaw = 0x802401D0; // type:func rom:0x86ECD0 tik_03_Pipe_GetPointAheadOfPlayer = 0x8024023C; // type:func rom:0x86ED3C tik_03_UpdateTexturePanSmooth = 0x802402E0; // type:func rom:0x86EDE0 tik_03_UpdateTexturePanStepped = 0x80240404; // type:func rom:0x86EF04 -tik_03_UnkPosFunc2 = 0x802405F0; // type:func rom:0x86F0F0 +tik_03_CheckDripCollisionWithNPC = 0x802405F0; // type:func rom:0x86F0F0 func_80240960_86F460 = 0x80240960; // type:func rom:0x86F460 func_802409C0_86F4C0 = 0x802409C0; // type:func rom:0x86F4C0 func_802409E0_86F4E0 = 0x802409E0; // type:func rom:0x86F4E0 @@ -15536,14 +15536,14 @@ tik_04_Pipe_AwaitDownInput = 0x80240340; // type:func rom:0x871D70 tik_04_Pipe_GetEntryPos = 0x802403FC; // type:func rom:0x871E2C tik_04_Pipe_GetCameraYaw = 0x802404DC; // type:func rom:0x871F0C tik_04_Pipe_GetPointAheadOfPlayer = 0x80240548; // type:func rom:0x871F78 -tik_04_UnkPosFunc2 = 0x802405F0; // type:func rom:0x872020 +tik_04_CheckDripCollisionWithNPC = 0x802405F0; // type:func rom:0x872020 func_80240960_872390 = 0x80240960; // type:func rom:0x872390 func_80240A00_872430 = 0x80240A00; // type:func rom:0x872430 tik_04_GetFloorCollider = 0x80240BF4; // type:func rom:0x872624 func_80240C20_872650 = 0x80240C20; // type:func rom:0x872650 tik_05_UpdateTexturePanSmooth = 0x80240000; // type:func rom:0x874DC0 tik_05_UpdateTexturePanStepped = 0x80240124; // type:func rom:0x874EE4 -tik_05_UnkPosFunc2 = 0x80240310; // type:func rom:0x8750D0 +tik_05_CheckDripCollisionWithNPC = 0x80240310; // type:func rom:0x8750D0 tik_05_StashVars = 0x80240680; // type:func rom:0x875440 tik_05_GetItemName = 0x80240734; // type:func rom:0x8754F4 tik_05_SomeItemEntityFunc = 0x80240798; // type:func rom:0x875558 @@ -15559,7 +15559,7 @@ tik_06_Pipe_GetCameraYaw = 0x802401D0; // type:func rom:0x8770B0 tik_06_Pipe_GetPointAheadOfPlayer = 0x8024023C; // type:func rom:0x87711C tik_06_UpdateTexturePanSmooth = 0x802402E0; // type:func rom:0x8771C0 tik_06_UpdateTexturePanStepped = 0x80240404; // type:func rom:0x8772E4 -tik_06_UnkPosFunc2 = 0x802405F0; // type:func rom:0x8774D0 +tik_06_CheckDripCollisionWithNPC = 0x802405F0; // type:func rom:0x8774D0 tik_07_Pipe_SetAnimFlag = 0x80240000; // type:func rom:0x879BE0 tik_07_Pipe_GetCurrentFloor = 0x80240020; // type:func rom:0x879C00 tik_07_Pipe_AwaitDownInput = 0x80240034; // type:func rom:0x879C14 @@ -15584,7 +15584,7 @@ tik_07_SuperBlock_WhiteScreenFlash = 0x80240E18; // type:func rom:0x87A9F8 tik_07_SuperBlock_PartnerSparkles2 = 0x80240F58; // type:func rom:0x87AB38 tik_07_SuperBlock_PartnerSparkles4 = 0x80240FA0; // type:func rom:0x87AB80 tik_07_SuperBlock_WaitForPlayerToLand = 0x80240FE8; // type:func rom:0x87ABC8 -tik_07_UnkPosFunc2 = 0x80241020; // type:func rom:0x87AC00 +tik_07_CheckDripCollisionWithNPC = 0x80241020; // type:func rom:0x87AC00 func_80241390_87AF70 = 0x80241390; // type:func rom:0x87AF70 tik_07_FlyingAI_WanderInit = 0x802413F0; // type:func rom:0x87AFD0 tik_07_FlyingAI_Wander = 0x802415A0; // type:func rom:0x87B180 @@ -15614,7 +15614,7 @@ tik_08_Pipe_GetCameraYaw = 0x802401D0; // type:func rom:0x87EFC0 tik_08_Pipe_GetPointAheadOfPlayer = 0x8024023C; // type:func rom:0x87F02C tik_08_UpdateTexturePanSmooth = 0x802402E0; // type:func rom:0x87F0D0 tik_08_UpdateTexturePanStepped = 0x80240404; // type:func rom:0x87F1F4 -tik_08_UnkPosFunc2 = 0x802405F0; // type:func rom:0x87F3E0 +tik_08_CheckDripCollisionWithNPC = 0x802405F0; // type:func rom:0x87F3E0 tik_08_SetEntityPosition = 0x80240960; // type:func rom:0x87F750 tik_08_GetFloorCollider = 0x80240A30; // type:func rom:0x87F820 func_80240A5C_87F84C = 0x80240A5C; // type:func rom:0x87F84C @@ -15627,7 +15627,7 @@ tik_09_Pipe_GetCameraYaw = 0x802401D0; // type:func rom:0x882390 tik_09_Pipe_GetPointAheadOfPlayer = 0x8024023C; // type:func rom:0x8823FC tik_09_UpdateTexturePanSmooth = 0x802402E0; // type:func rom:0x8824A0 tik_09_UpdateTexturePanStepped = 0x80240404; // type:func rom:0x8825C4 -tik_09_UnkPosFunc2 = 0x802405F0; // type:func rom:0x8827B0 +tik_09_CheckDripCollisionWithNPC = 0x802405F0; // type:func rom:0x8827B0 tik_09_SetEntityPosition = 0x80240960; // type:func rom:0x882B20 tik_09_set_script_owner_npc_anim = 0x80240A30; // type:func rom:0x882BF0 tik_09_UnkDistFunc = 0x80240AAC; // type:func rom:0x882C6C @@ -15638,7 +15638,7 @@ tik_09_GetDefeatedEnemyCount = 0x80241204; // type:func rom:0x8833C4 D_802441A0_886360 = 0x802441A0; // type:data rom:0x886360 tik_10_UpdateTexturePanSmooth = 0x80240000; // type:func rom:0x8863C0 tik_10_UpdateTexturePanStepped = 0x80240124; // type:func rom:0x8864E4 -tik_10_UnkPosFunc2 = 0x80240310; // type:func rom:0x8866D0 +tik_10_CheckDripCollisionWithNPC = 0x80240310; // type:func rom:0x8866D0 tik_10_SuperBlock_SetOverride40 = 0x80240680; // type:func rom:0x886A40 tik_10_SuperBlock_ClearOverride40 = 0x8024069C; // type:func rom:0x886A5C tik_10_SuperBlock_HideBlockContent = 0x802406BC; // type:func rom:0x886A7C @@ -15669,7 +15669,7 @@ tik_12_Pipe_GetCameraYaw = 0x802401D0; // type:func rom:0x888DA0 tik_12_Pipe_GetPointAheadOfPlayer = 0x8024023C; // type:func rom:0x888E0C tik_12_UpdateTexturePanSmooth = 0x802402E0; // type:func rom:0x888EB0 tik_12_UpdateTexturePanStepped = 0x80240404; // type:func rom:0x888FD4 -tik_12_UnkPosFunc2 = 0x802405F0; // type:func rom:0x8891C0 +tik_12_CheckDripCollisionWithNPC = 0x802405F0; // type:func rom:0x8891C0 tik_12_StashVars = 0x80240960; // type:func rom:0x889530 tik_12_GetItemName = 0x80240A14; // type:func rom:0x8895E4 tik_12_SomeItemEntityFunc = 0x80240A78; // type:func rom:0x889648 @@ -15714,7 +15714,7 @@ tik_14_Pipe_GetCameraYaw = 0x802401D0; // type:func rom:0x88D7D0 tik_14_Pipe_GetPointAheadOfPlayer = 0x8024023C; // type:func rom:0x88D83C tik_14_UpdateTexturePanSmooth = 0x802402E0; // type:func rom:0x88D8E0 tik_14_UpdateTexturePanStepped = 0x80240404; // type:func rom:0x88DA04 -tik_14_UnkPosFunc2 = 0x802405F0; // type:func rom:0x88DBF0 +tik_14_CheckDripCollisionWithNPC = 0x802405F0; // type:func rom:0x88DBF0 tik_15_Pipe_SetAnimFlag = 0x80240000; // type:func rom:0x88FBA0 tik_15_Pipe_GetCurrentFloor = 0x80240020; // type:func rom:0x88FBC0 tik_15_Pipe_AwaitDownInput = 0x80240034; // type:func rom:0x88FBD4 @@ -15723,7 +15723,7 @@ tik_15_Pipe_GetCameraYaw = 0x802401D0; // type:func rom:0x88FD70 tik_15_Pipe_GetPointAheadOfPlayer = 0x8024023C; // type:func rom:0x88FDDC tik_15_UpdateTexturePanSmooth = 0x802402E0; // type:func rom:0x88FE80 tik_15_UpdateTexturePanStepped = 0x80240404; // type:func rom:0x88FFA4 -tik_15_UnkPosFunc2 = 0x802405F0; // type:func rom:0x890190 +tik_15_CheckDripCollisionWithNPC = 0x802405F0; // type:func rom:0x890190 tik_15_StashVars = 0x80240960; // type:func rom:0x890500 tik_15_GetItemName = 0x80240A14; // type:func rom:0x8905B4 func_80240A78_890618 = 0x80240A78; // type:func rom:0x890618 @@ -15764,7 +15764,7 @@ tik_17_SuperBlock_UpgradeDescMessages = 0x80241438; // type:data rom:0x893E58 tik_17_SuperBlock_UpgradeOrbAngles = 0x80241478; // type:data rom:0x893E98 tik_18_UpdateTexturePanSmooth = 0x80240000; // type:func rom:0x8956E0 tik_18_UpdateTexturePanStepped = 0x80240124; // type:func rom:0x895804 -tik_18_UnkPosFunc2 = 0x80240310; // type:func rom:0x8959F0 +tik_18_CheckDripCollisionWithNPC = 0x80240310; // type:func rom:0x8959F0 func_80240680_895D60 = 0x80240680; // type:func rom:0x895D60 tik_19_Pipe_SetAnimFlag = 0x80240000; // type:func rom:0x8975E0 tik_19_Pipe_GetCurrentFloor = 0x80240020; // type:func rom:0x897600 @@ -15804,7 +15804,7 @@ tik_20_Pipe_AwaitDownInput = 0x80240340; // type:func rom:0x89A690 tik_20_Pipe_GetEntryPos = 0x802403FC; // type:func rom:0x89A74C tik_20_Pipe_GetCameraYaw = 0x802404DC; // type:func rom:0x89A82C tik_20_Pipe_GetPointAheadOfPlayer = 0x80240548; // type:func rom:0x89A898 -tik_20_UnkPosFunc2 = 0x802405EC; // type:func rom:0x89A93C +tik_20_CheckDripCollisionWithNPC = 0x802405EC; // type:func rom:0x89A93C tik_20_set_script_owner_npc_anim = 0x80240960; // type:func rom:0x89ACB0 tik_20_UnkDistFunc = 0x802409DC; // type:func rom:0x89AD2C tik_20_UnkNpcAIFunc12 = 0x80240B10; // type:func rom:0x89AE60 @@ -15819,7 +15819,7 @@ tik_21_Pipe_AwaitDownInput = 0x80240340; // type:func rom:0x89DAE0 tik_21_Pipe_GetEntryPos = 0x802403FC; // type:func rom:0x89DB9C tik_21_Pipe_GetCameraYaw = 0x802404DC; // type:func rom:0x89DC7C tik_21_Pipe_GetPointAheadOfPlayer = 0x80240548; // type:func rom:0x89DCE8 -tik_21_UnkPosFunc2 = 0x802405EC; // type:func rom:0x89DD8C +tik_21_CheckDripCollisionWithNPC = 0x802405EC; // type:func rom:0x89DD8C func_80240000_89FEC0 = 0x80240000; // type:func rom:0x89FEC0 tik_22_UpdateTexturePanSmooth = 0x80240030; // type:func rom:0x89FEF0 tik_22_UpdateTexturePanStepped = 0x80240154; // type:func rom:0x8A0014 @@ -15830,7 +15830,7 @@ tik_22_Pipe_GetEntryPos = 0x8024042C; // type:func rom:0x8A02EC tik_22_Pipe_GetCameraYaw = 0x8024050C; // type:func rom:0x8A03CC tik_22_Pipe_GetPointAheadOfPlayer = 0x80240578; // type:func rom:0x8A0438 func_8024061C_8A04DC = 0x8024061C; // type:func rom:0x8A04DC -tik_22_UnkPosFunc2 = 0x80240640; // type:func rom:0x8A0500 +tik_22_CheckDripCollisionWithNPC = 0x80240640; // type:func rom:0x8A0500 tik_23_Pipe_SetAnimFlag = 0x80240000; // type:func rom:0x8A23D0 tik_23_Pipe_GetCurrentFloor = 0x80240020; // type:func rom:0x8A23F0 tik_23_Pipe_AwaitDownInput = 0x80240034; // type:func rom:0x8A2404 @@ -15839,7 +15839,7 @@ tik_23_Pipe_GetCameraYaw = 0x802401D0; // type:func rom:0x8A25A0 tik_23_Pipe_GetPointAheadOfPlayer = 0x8024023C; // type:func rom:0x8A260C tik_23_UpdateTexturePanSmooth = 0x802402E0; // type:func rom:0x8A26B0 tik_23_UpdateTexturePanStepped = 0x80240404; // type:func rom:0x8A27D4 -tik_23_UnkPosFunc2 = 0x802405EC; // type:func rom:0x8A29BC +tik_23_CheckDripCollisionWithNPC = 0x802405EC; // type:func rom:0x8A29BC tik_23_set_script_owner_npc_anim = 0x80240960; // type:func rom:0x8A2D30 tik_23_UnkDistFunc = 0x802409DC; // type:func rom:0x8A2DAC tik_23_UnkNpcAIFunc12 = 0x80240B10; // type:func rom:0x8A2EE0 @@ -15849,7 +15849,7 @@ D_80243650_8A5A20 = 0x80243650; // type:data rom:0x8A5A20 func_80240000_8A5A80 = 0x80240000; // type:func rom:0x8A5A80 tik_24_UpdateTexturePanSmooth = 0x80240050; // type:func rom:0x8A5AD0 tik_24_UpdateTexturePanStepped = 0x80240174; // type:func rom:0x8A5BF4 -tik_24_UnkPosFunc2 = 0x80240360; // type:func rom:0x8A5DE0 +tik_24_CheckDripCollisionWithNPC = 0x80240360; // type:func rom:0x8A5DE0 tik_24_set_script_owner_npc_anim = 0x802406D0; // type:func rom:0x8A6150 tik_24_UnkDistFunc = 0x8024074C; // type:func rom:0x8A61CC tik_24_UnkNpcAIFunc12 = 0x80240880; // type:func rom:0x8A6300 @@ -15860,7 +15860,7 @@ D_80242480_8A7F00 = 0x80242480; // type:data rom:0x8A7F00 D_802424A0_8A7F20 = 0x802424A0; // type:data rom:0x8A7F20 tik_25_UpdateTexturePanSmooth = 0x80240000; // type:func rom:0x8A7F80 tik_25_UpdateTexturePanStepped = 0x80240124; // type:func rom:0x8A80A4 -tik_25_UnkPosFunc2 = 0x8024030C; // type:func rom:0x8A828C +tik_25_CheckDripCollisionWithNPC = 0x8024030C; // type:func rom:0x8A828C tik_25_func_80240680_8A8600 = 0x80240680; // type:func rom:0x8A8600 tik_25_SetEntityPosition = 0x802406AC; // type:func rom:0x8A862C tik_25_PlaySpringReboundAnimation = 0x80240770; // type:func rom:0x8A86F0 @@ -19465,7 +19465,7 @@ jan_11_Pipe_AwaitDownInput = 0x8024018C; // type:func rom:0xB709EC jan_11_Pipe_GetEntryPos = 0x80240248; // type:func rom:0xB70AA8 jan_11_Pipe_GetCameraYaw = 0x80240328; // type:func rom:0xB70B88 jan_11_Pipe_GetPointAheadOfPlayer = 0x80240394; // type:func rom:0xB70BF4 -jan_11_UnkPosFunc2 = 0x80240438; // type:func rom:0xB70C98 +jan_11_CheckDripCollisionWithNPC = 0x80240438; // type:func rom:0xB70C98 jan_11_GetFloorCollider = 0x802407B0; // type:func rom:0xB71010 func_802407DC_B7103C = 0x802407DC; // type:func rom:0xB7103C jan_12_PullVine_WaitForPlayerGrab = 0x80240000; // type:func rom:0xB730B0 @@ -22344,14 +22344,14 @@ flo_00_PatrolAI_Chase = 0x8024098C; // type:func rom:0xC9E8AC flo_00_PatrolAI_LosePlayer = 0x80240AAC; // type:func rom:0xC9E9CC flo_00_PatrolNoAttackAI_15 = 0x80240B14; // type:func rom:0xC9EA34 flo_00_PatrolNoAttackAI_Main = 0x80240BD4; // type:func rom:0xC9EAF4 -flo_00_PostChapter6StatUpdate = 0x80240ED0; // type:func rom:0xC9EDF0 -flo_00_func_80240F10_C9EE30 = 0x80240F10; // type:func rom:0xC9EE30 -flo_00_func_80240F80_C9EEA0 = 0x80240F80; // type:func rom:0xC9EEA0 -flo_00_func_802410B4_C9EFD4 = 0x802410B4; // type:func rom:0xC9EFD4 +flo_00_UpgradeStarPower = 0x80240ED0; // type:func rom:0xC9EDF0 +flo_00_GetPlayerAngles = 0x80240F10; // type:func rom:0xC9EE30 +flo_00_PlayerRideBeanstalk = 0x80240F80; // type:func rom:0xC9EEA0 +flo_00_PartnerRideBeanstalk = 0x802410B4; // type:func rom:0xC9EFD4 flo_00_CosInterpMinMax = 0x802411EC; // type:func rom:0xC9F10C flo_00_SyncStatusMenu = 0x8024137C; // type:func rom:0xC9F29C -flo_00_func_8024139C_C9F2BC = 0x8024139C; // type:func rom:0xC9F2BC -flo_00_func_802413BC_C9F2DC = 0x802413BC; // type:func rom:0xC9F2DC +flo_00_DisableStatusMenu = 0x8024139C; // type:func rom:0xC9F2BC +flo_00_EnableStatusMenu = 0x802413BC; // type:func rom:0xC9F2DC flo_00_entryList = 0x802413E0; // type:data rom:0xC9F300 flo_00_settings = 0x80241490; // type:data rom:0xC9F3B0 flo_00_802414D0 = 0x802414D0; // type:data rom:0xC9F3F0 @@ -22435,7 +22435,7 @@ flo_00_flo_19_name_hack = 0x80249378; // type:data rom:0xCA7298 flo_03_func_80240000_CA72A0 = 0x80240000; // type:func rom:0xCA72A0 flo_03_StashVars = 0x80240040; // type:func rom:0xCA72E0 flo_03_GetItemName = 0x802400F4; // type:func rom:0xCA7394 -flo_03_func_80240158_CA73F8 = 0x80240158; // type:func rom:0xCA73F8 +flo_03_HideBehindTree = 0x80240158; // type:func rom:0xCA73F8 flo_03_foliage_setup_shear_mtx = 0x802403F0; // type:func rom:0xCA7690 flo_03_TransformFoliage = 0x80240460; // type:func rom:0xCA7700 flo_03_entryList = 0x80240630; // type:data rom:0xCA78D0 @@ -22496,7 +22496,7 @@ D_80244F48_CAC1E8 = 0x80244F48; // type:data rom:0xCAC1E8 flo_07_UpdateTexturePanSmooth = 0x80240000; // type:func rom:0xCAC1F0 flo_07_UpdateTexturePanStepped = 0x80240124; // type:func rom:0xCAC314 flo_07_SpawnSunEffect = 0x8024030C; // type:func rom:0xCAC4FC -flo_07_func_80240344_CAC534 = 0x80240344; // type:func rom:0xCAC534 +flo_07_CreateCrystalTreeSparkles = 0x80240344; // type:func rom:0xCAC534 flo_07_foliage_setup_shear_mtx = 0x802403E0; // type:func rom:0xCAC5D0 flo_07_TransformFoliage = 0x80240450; // type:func rom:0xCAC640 flo_07_StashVars = 0x8024061C; // type:func rom:0xCAC80C @@ -22550,7 +22550,7 @@ flo_08_SuperBlock_WhiteScreenFlash = 0x80240B38; // type:func rom:0xCAF878 flo_08_SuperBlock_PartnerSparkles2 = 0x80240C78; // type:func rom:0xCAF9B8 flo_08_SuperBlock_PartnerSparkles4 = 0x80240CC0; // type:func rom:0xCAFA00 flo_08_SuperBlock_WaitForPlayerToLand = 0x80240D08; // type:func rom:0xCAFA48 -flo_08_func_80240D40_CAFA80 = 0x80240D40; // type:func rom:0xCAFA80 +flo_08_SpawnSunEffect = 0x80240D40; // type:func rom:0xCAFA80 flo_08_UnkFloAI_ChaseInit = 0x80240D80; // type:func rom:0xCAFAC0 flo_08_UnkFloAI_Chase = 0x80241364; // type:func rom:0xCB00A4 flo_08_UnkFloAI_LosePlayer = 0x802414C8; // type:func rom:0xCB0208 @@ -22565,7 +22565,7 @@ flo_08_FlowerGuard_JudgeItemTastiness = 0x80241B5C; // type:func rom:0xCB089C flo_08_FlowerGuard_MakeItemList = 0x80241BCC; // type:func rom:0xCB090C flo_08_foliage_setup_shear_mtx = 0x80241C00; // type:func rom:0xCB0940 flo_08_TransformFoliage = 0x80241C70; // type:func rom:0xCB09B0 -flo_08_UnkFunc43 = 0x80241E40; // type:func rom:0xCB0B80 +flo_08_CheckVineTriggerDist = 0x80241E40; // type:func rom:0xCB0B80 flo_08_entryList = 0x80241EE0; // type:data rom:0xCB0C20 flo_08_settings = 0x80241F00; // type:data rom:0xCB0C40 flo_08_80241F40 = 0x80241F40; // type:data rom:0xCB0C80 @@ -22619,7 +22619,7 @@ flo_08_80245990 = 0x80245990; // type:data rom:0xCB46D0 flo_08_80245C3C = 0x80245C3C; // type:data rom:0xCB497C flo_08_80245F5C = 0x80245F5C; // type:data rom:0xCB4C9C flo_09_func_80240000_CB5000 = 0x80240000; // type:func rom:0xCB5000 -flo_09_UnkFunc43 = 0x80240040; // type:func rom:0xCB5040 +flo_09_CheckVineTriggerDist = 0x80240040; // type:func rom:0xCB5040 flo_09_foliage_setup_shear_mtx = 0x802400E0; // type:func rom:0xCB50E0 flo_09_TransformFoliage = 0x80240150; // type:func rom:0xCB5150 flo_09_FlyingAI_WanderInit = 0x80240320; // type:func rom:0xCB5320 @@ -22683,7 +22683,7 @@ D_802441A0_CB91A0 = 0x802441A0; // type:data rom:0xCB91A0 D_802441A8_CB91A8 = 0x802441A8; // type:data rom:0xCB91A8 D_802441B0_CB91B0 = 0x802441B0; // type:data rom:0xCB91B0 flo_10_get_tattle = 0x80240000; // type:func rom:0xCB9200 -flo_10_func_80240040_CB9240 = 0x80240040; // type:func rom:0xCB9240 +flo_10_SpawnSunEffect = 0x80240040; // type:func rom:0xCB9240 flo_10_StashVars = 0x80240080; // type:func rom:0xCB9280 flo_10_GetItemName = 0x80240134; // type:func rom:0xCB9334 flo_10_UpdateTexturePanSmooth = 0x80240198; // type:func rom:0xCB9398 @@ -22720,7 +22720,6 @@ flo_10_802425BC = 0x802425BC; // type:data rom:0xCBB7BC flo_10_802425E4 = 0x802425E4; // type:data rom:0xCBB7E4 flo_10_802427EC = 0x802427EC; // type:data rom:0xCBB9EC flo_10_80242AE8 = 0x80242AE8; // type:data rom:0xCBBCE8 -flo_10_npcSettings_80243220 = 0x80243220; // type:data rom:0xCBC420 flo_10_8024324C = 0x8024324C; // type:data rom:0xCBC44C flo_10_itemList_80243394 = 0x80243394; // type:data rom:0xCBC594 flo_10_8024339C = 0x8024339C; // type:data rom:0xCBC59C @@ -22747,7 +22746,7 @@ flo_11_Pipe_AwaitDownInput = 0x80240034; // type:func rom:0xCBDD04 flo_11_Pipe_GetEntryPos = 0x802400F0; // type:func rom:0xCBDDC0 flo_11_Pipe_GetCameraYaw = 0x802401D0; // type:func rom:0xCBDEA0 flo_11_Pipe_GetPointAheadOfPlayer = 0x8024023C; // type:func rom:0xCBDF0C -flo_11_func_802402E0_CBDFB0 = 0x802402E0; // type:func rom:0xCBDFB0 +flo_11_SpawnSunEffect = 0x802402E0; // type:func rom:0xCBDFB0 flo_11_entryList = 0x80240320; // type:data rom:0xCBDFF0 flo_11_settings = 0x802403A0; // type:data rom:0xCBE070 flo_11_802403E0 = 0x802403E0; // type:data rom:0xCBE0B0 @@ -22829,7 +22828,7 @@ flo_12_interact_80241C8C = 0x80241C8C; // type:data rom:0xCC2ABC flo_12_init_802423D0 = 0x802423D0; // type:data rom:0xCC3200 flo_12_npcGroup_802425D8 = 0x802425D8; // type:data rom:0xCC3408 flo_12_npcGroupList_802429B8 = 0x802429B8; // type:data rom:0xCC37E8 -flo_13_func_80240000_CC3810 = 0x80240000; // type:func rom:0xCC3810 +flo_13_SpawnSunEffect = 0x80240000; // type:func rom:0xCC3810 flo_13_ChangeNpcToPartner = 0x80240040; // type:func rom:0xCC3850 flo_13_FlyingAI_WanderInit = 0x802401C4; // type:func rom:0xCC39D4 flo_13_FlyingAI_Wander = 0x80240374; // type:func rom:0xCC3B84 @@ -22853,8 +22852,8 @@ flo_13_set_script_owner_npc_col_height = 0x802425AC; // type:func rom:0xCC5DBC flo_13_TackleAI_Main = 0x8024262C; // type:func rom:0xCC5E3C flo_13_SpinyAI_Main = 0x80242A6C; // type:func rom:0xCC627C flo_13_UnkFunc42 = 0x80243368; // type:func rom:0xCC6B78 -flo_13_func_802433C0_CC6BD0 = 0x802433C0; // type:func rom:0xCC6BD0 -flo_13_func_802434D4_CC6CE4 = 0x802434D4; // type:func rom:0xCC6CE4 +flo_13_PlayLakiluluFlightSounds = 0x802433C0; // type:func rom:0xCC6BD0 +flo_13_PlayLakilesterFlightSounds = 0x802434D4; // type:func rom:0xCC6CE4 flo_13_LoadPartyImage = 0x802435D0; // type:func rom:0xCC6DE0 flo_13_entryList = 0x80243670; // type:data rom:0xCC6E80 flo_13_settings = 0x80243690; // type:data rom:0xCC6EA0 @@ -22915,13 +22914,13 @@ D_80247AE8_CCB2F8 = 0x80247AE8; // type:data rom:0xCCB2F8 D_80247AF0_CCB300 = 0x80247AF0; // type:data rom:0xCCB300 flo_14_UpdateTexturePanSmooth = 0x80240000; // type:func rom:0xCCB310 flo_14_UpdateTexturePanStepped = 0x80240124; // type:func rom:0xCCB434 -flo_14_func_8024030C_CCB61C = 0x8024030C; // type:func rom:0xCCB61C -flo_14_UnkFunc43 = 0x80240340; // type:func rom:0xCCB650 -flo_14_func_802403D4_CCB6E4 = 0x802403D4; // type:func rom:0xCCB6E4 -flo_14_func_8024042C_CCB73C = 0x8024042C; // type:func rom:0xCCB73C -flo_14_func_8024046C_CCB77C = 0x8024046C; // type:func rom:0xCCB77C -func_80240504_CCB814 = 0x80240504; // type:func rom:0xCCB814 -flo_14_func_802407D4_CCBAE4 = 0x802407D4; // type:func rom:0xCCBAE4 +flo_14_SpawnSunEffect = 0x8024030C; // type:func rom:0xCCB61C +flo_14_CheckVineTriggerDist = 0x80240340; // type:func rom:0xCCB650 +flo_14_SavePartnerFlags = 0x802403D4; // type:func rom:0xCCB6E4 +flo_14_RestorePartnerFlags = 0x8024042C; // type:func rom:0xCCB73C +flo_14_UpdateBubbleSoundPos = 0x8024046C; // type:func rom:0xCCB77C +gfx_build_big_bubble = 0x80240504; // type:func rom:0xCCB814 +flo_14_gfx_build_bubble_flower = 0x802407D4; // type:func rom:0xCCBAE4 flo_14_FlyingAI_WanderInit = 0x80240B10; // type:func rom:0xCCBE20 flo_14_FlyingAI_Wander = 0x80240CC0; // type:func rom:0xCCBFD0 flo_14_FlyingAI_LoiterInit = 0x802412E8; // type:func rom:0xCCC5F8 @@ -22938,7 +22937,7 @@ flo_14_AddPlayerHandsOffset = 0x80242064; // type:func rom:0xCCD374 flo_14_ItemChoice_WaitForSelection = 0x80242234; // type:func rom:0xCCD544 flo_14_ItemChoice_SaveSelected = 0x80242288; // type:func rom:0xCCD598 flo_14_BuildItemChoiceList = 0x802422C0; // type:func rom:0xCCD5D0 -flo_14_func_80242360_CCD670 = 0x80242360; // type:func rom:0xCCD670 +flo_14_GetFloorBelowLog = 0x80242360; // type:func rom:0xCCD670 flo_14_entryList = 0x80242390; // type:data rom:0xCCD6A0 flo_14_settings = 0x802423B0; // type:data rom:0xCCD6C0 flo_14_802423F0 = 0x802423F0; // type:data rom:0xCCD700 @@ -23010,7 +23009,7 @@ flo_15_makeEntities = 0x80241300; // type:data rom:0xCD19C0 flo_15_intTable_80241360 = 0x80241360; // type:data rom:0xCD1A20 flo_15_802413B0 = 0x802413B0; // type:data rom:0xCD1A70 flo_16_func_80240000_CD1E30 = 0x80240000; // type:func rom:0xCD1E30 -flo_16_UnkFunc43 = 0x80240040; // type:func rom:0xCD1E70 +flo_16_CheckVineTriggerDist = 0x80240040; // type:func rom:0xCD1E70 flo_16_SuperBlock_SetOverride40 = 0x802400E0; // type:func rom:0xCD1F10 flo_16_SuperBlock_ClearOverride40 = 0x802400FC; // type:func rom:0xCD1F2C flo_16_SuperBlock_HideBlockContent = 0x8024011C; // type:func rom:0xCD1F4C @@ -23045,7 +23044,7 @@ flo_16_FlyingNoAttackAI_12 = 0x80242348; // type:func rom:0xCD4178 flo_16_FlyingNoAttackAI_13 = 0x80242478; // type:func rom:0xCD42A8 flo_16_FlyingNoAttackAI_20 = 0x802426F8; // type:func rom:0xCD4528 flo_16_FlyingNoAttackAI_Main = 0x80242754; // type:func rom:0xCD4584 -flo_16_func_80242940_CD4770 = 0x80242940; // type:func rom:0xCD4770 +flo_16_CheckForPoundInput = 0x80242940; // type:func rom:0xCD4770 flo_16_entryList = 0x80242970; // type:data rom:0xCD47A0 flo_16_settings = 0x80242990; // type:data rom:0xCD47C0 flo_16_802429D0 = 0x802429D0; // type:data rom:0xCD4800 @@ -23082,8 +23081,8 @@ D_802453F0_CD7220 = 0x802453F0; // type:data rom:0xCD7220 D_802453F8_CD7228 = 0x802453F8; // type:data rom:0xCD7228 D_80245400_CD7230 = 0x80245400; // type:data rom:0xCD7230 D_80245448_CD7278 = 0x80245448; // type:data rom:0xCD7278 -flo_17_func_80240000_CD72E0 = 0x80240000; // type:func rom:0xCD72E0 -flo_17_func_80240040_CD7320 = 0x80240040; // type:func rom:0xCD7320 +flo_17_SpawnSunEffect = 0x80240000; // type:func rom:0xCD72E0 +flo_17_GetFloorBelowLog = 0x80240040; // type:func rom:0xCD7320 flo_17_FlyingAI_WanderInit = 0x80240070; // type:func rom:0xCD7350 flo_17_FlyingAI_Wander = 0x80240220; // type:func rom:0xCD7500 flo_17_FlyingAI_LoiterInit = 0x80240848; // type:func rom:0xCD7B28 @@ -23140,8 +23139,8 @@ D_80245358_CDC638 = 0x80245358; // type:data rom:0xCDC638 D_802453B8_CDC698 = 0x802453B8; // type:data rom:0xCDC698 flo_18_UpdateTexturePanSmooth = 0x80240000; // type:func rom:0xCDC6A0 flo_18_UpdateTexturePanStepped = 0x80240124; // type:func rom:0xCDC7C4 -flo_18_func_8024030C_CDC9AC = 0x8024030C; // type:func rom:0xCDC9AC -flo_18_func_80240340_CDC9E0 = 0x80240340; // type:func rom:0xCDC9E0 +flo_18_SpawnSunEffect = 0x8024030C; // type:func rom:0xCDC9AC +flo_18_SetMachineLightningColor = 0x80240340; // type:func rom:0xCDC9E0 flo_18_CosInterpMinMax = 0x80240394; // type:func rom:0xCDCA34 flo_18_UnkFunc42 = 0x80240530; // type:func rom:0xCDCBD0 flo_18_foliage_setup_shear_mtx = 0x80240590; // type:func rom:0xCDCC30 @@ -23214,12 +23213,12 @@ flo_18_shakeTree = 0x80246A20; // type:data rom:0xCE30C0 flo_18_80247024 = 0x80247024; // type:data rom:0xCE36C4 flo_19_UpdateTexturePanSmooth = 0x80240000; // type:func rom:0xCE36F0 flo_19_UpdateTexturePanStepped = 0x80240124; // type:func rom:0xCE3814 -flo_19_func_8024030C_CE39FC = 0x8024030C; // type:func rom:0xCE39FC -flo_19_func_80240340_CE3A30 = 0x80240340; // type:func rom:0xCE3A30 -flo_19_func_802404D0_CE3BC0 = 0x802404D0; // type:func rom:0xCE3BC0 -flo_19_func_80240540_CE3C30 = 0x80240540; // type:func rom:0xCE3C30 -flo_19_func_80240660_CE3D50 = 0x80240660; // type:func rom:0xCE3D50 -flo_19_func_80240784_CE3E74 = 0x80240784; // type:func rom:0xCE3E74 +flo_19_SpawnSunEffect = 0x8024030C; // type:func rom:0xCE39FC +flo_19_CosInterpAbsMinMax = 0x80240340; // type:func rom:0xCE3A30 +flo_19_GetPlayerAngles = 0x802404D0; // type:func rom:0xCE3BC0 +flo_19_PlayerRideBeanstalk = 0x80240540; // type:func rom:0xCE3C30 +flo_19_PartnerRideBeanstalk = 0x80240660; // type:func rom:0xCE3D50 +flo_19_SetScreenFadeAmount = 0x80240784; // type:func rom:0xCE3E74 flo_19_CosInterpMinMax = 0x802407B0; // type:func rom:0xCE3EA0 flo_19_entryList = 0x80240940; // type:data rom:0xCE4030 flo_19_settings = 0x80240980; // type:data rom:0xCE4070 @@ -23251,7 +23250,7 @@ flo_21_StarSpiritEffectFunc5 = 0x802405FC; // type:func rom:0xCE6CFC flo_21_StarSpiritEffectFunc6 = 0x80240708; // type:func rom:0xCE6E08 flo_21_UpdateTexturePanSmooth = 0x802407F4; // type:func rom:0xCE6EF4 flo_21_UpdateTexturePanStepped = 0x80240918; // type:func rom:0xCE7018 -flo_21_func_80240B00_CE7200 = 0x80240B00; // type:func rom:0xCE7200 +flo_21_SpawnSunEffect = 0x80240B00; // type:func rom:0xCE7200 flo_21_CosInterpMinMax = 0x80240B40; // type:func rom:0xCE7240 flo_21_UnsetCamera0MoveFlag1 = 0x80240CD0; // type:func rom:0xCE73D0 flo_21_entryList = 0x80240CF0; // type:data rom:0xCE73F0 @@ -23300,8 +23299,8 @@ flo_21_npcGroup_80243804 = 0x80243804; // type:data rom:0xCE9F04 flo_21_extraAnimationList_80243DD4 = 0x80243DD4; // type:data rom:0xCEA4D4 flo_21_npcGroup_80243DDC = 0x80243DDC; // type:data rom:0xCEA4DC flo_21_npcGroupList_80245AEC = 0x80245AEC; // type:data rom:0xCEC1EC -flo_22_func_80240000_CEC240 = 0x80240000; // type:func rom:0xCEC240 -flo_22_80240040_CEC280 = 0x80240040; // type:func rom:0xCEC280 +flo_22_SpawnSunEffect = 0x80240000; // type:func rom:0xCEC240 +flo_22_UnusedCallback = 0x80240040; // type:func rom:0xCEC280 flo_22_foliage_setup_shear_mtx = 0x80240050; // type:func rom:0xCEC290 flo_22_TransformFoliage = 0x802400C0; // type:func rom:0xCEC300 flo_22_entryList = 0x80240290; // type:data rom:0xCEC4D0 @@ -23334,7 +23333,7 @@ flo_22_tree2_Trunk = 0x80241F38; // type:data rom:0xCEE178 flo_22_tree2 = 0x80241F48; // type:data rom:0xCEE188 flo_22_triggerCoord_80241F5C = 0x80241F5C; // type:data rom:0xCEE19C flo_22_80241F6C = 0x80241F6C; // type:data rom:0xCEE1AC -flo_23_func_80240000_CEE260 = 0x80240000; // type:func rom:0xCEE260 +flo_23_SpawnSunEffect = 0x80240000; // type:func rom:0xCEE260 flo_23_GetNpcCollisionHeight = 0x80240040; // type:func rom:0xCEE2A0 flo_23_AddPlayerHandsOffset = 0x8024009C; // type:func rom:0xCEE2FC flo_23_ItemChoice_WaitForSelection = 0x8024026C; // type:func rom:0xCEE4CC @@ -23424,7 +23423,7 @@ flo_25_FlowerGuard_JudgeItemTastiness = 0x80241F44; // type:func rom:0xCF4B14 flo_25_FlowerGuard_MakeItemList = 0x80241FB4; // type:func rom:0xCF4B84 flo_25_foliage_setup_shear_mtx = 0x80241FF0; // type:func rom:0xCF4BC0 flo_25_TransformFoliage = 0x80242060; // type:func rom:0xCF4C30 -flo_25_UnkFunc43 = 0x80242230; // type:func rom:0xCF4E00 +flo_25_CheckVineTriggerDist = 0x80242230; // type:func rom:0xCF4E00 flo_25_entryList = 0x802422D0; // type:data rom:0xCF4EA0 flo_25_settings = 0x802422F0; // type:data rom:0xCF4EC0 flo_25_80242330 = 0x80242330; // type:data rom:0xCF4F00 @@ -25381,7 +25380,7 @@ dead_flo_00_PatrolAI_Chase = 0x8024098C; // type:func rom:0xEB97DC dead_flo_00_PatrolAI_LosePlayer = 0x80240AAC; // type:func rom:0xEB98FC dead_flo_00_PatrolNoAttackAI_15 = 0x80240B14; // type:func rom:0xEB9964 dead_flo_00_PatrolNoAttackAI_Main = 0x80240BD4; // type:func rom:0xEB9A24 -dead_flo_00_PostChapter6StatUpdate = 0x80240EFC; // type:func rom:0xEB9D4C +dead_flo_00_UpgradeStarPower = 0x80240EFC; // type:func rom:0xEB9D4C func_80240F40_EB9D90 = 0x80240F40; // type:func rom:0xEB9D90 func_80240FB0_EB9E00 = 0x80240FB0; // type:func rom:0xEB9E00 func_802410E4_EB9F34 = 0x802410E4; // type:func rom:0xEB9F34 @@ -25450,7 +25449,7 @@ dead_flo_08_FlowerGuard_JudgeItemTastiness = 0x80241B88; // type:func rom:0xECB8 dead_flo_08_FlowerGuard_MakeItemList = 0x80241BF8; // type:func rom:0xECB8F8 dead_flo_08_foliage_setup_shear_mtx = 0x80241C30; // type:func rom:0xECB930 dead_flo_08_TransformFoliage = 0x80241CA0; // type:func rom:0xECB9A0 -dead_flo_08_UnkFunc43 = 0x80241E70; // type:func rom:0xECBB70 +dead_flo_08_CheckVineTriggerDist = 0x80241E70; // type:func rom:0xECBB70 dead_flo_08_SuperBlock_CantUpgradeMessages = 0x80241FE0; // type:data rom:0xECBCE0 dead_flo_08_SuperBlock_PartnerIDs = 0x80241FE8; // type:data rom:0xECBCE8 dead_flo_08_SuperBlock_UpgradeDescMessages = 0x80241FF8; // type:data rom:0xECBCF8 @@ -25458,7 +25457,7 @@ dead_flo_08_SuperBlock_UpgradeOrbAngles = 0x80242038; // type:data rom:0xECBD38 dead_flo_08_ItemChoice_HasSelectedItem = 0x802430B8; // type:data rom:0xECCDB8 dead_flo_08_ItemChoice_SelectedItemID = 0x802430BC; // type:data rom:0xECCDBC dead_flo_09_DeadUnkFunc1 = 0x80240000; // type:func rom:0xECFFF0 -dead_flo_09_UnkFunc43 = 0x80240040; // type:func rom:0xED0030 +dead_flo_09_CheckVineTriggerDist = 0x80240040; // type:func rom:0xED0030 dead_flo_09_foliage_setup_shear_mtx = 0x802400E0; // type:func rom:0xED00D0 dead_flo_09_TransformFoliage = 0x80240150; // type:func rom:0xED0140 dead_flo_09_FlyingAI_WanderInit = 0x80240320; // type:func rom:0xED0310 @@ -25550,7 +25549,7 @@ D_80247BE0_EE65A0 = 0x80247BE0; // type:data rom:0xEE65A0 dead_flo_14_UpdateTexturePanSmooth = 0x80240000; // type:func rom:0xEE65B0 dead_flo_14_UpdateTexturePanStepped = 0x80240124; // type:func rom:0xEE66D4 func_8024030C_EE68BC = 0x8024030C; // type:func rom:0xEE68BC -dead_flo_14_UnkFunc43 = 0x80240340; // type:func rom:0xEE68F0 +dead_flo_14_CheckVineTriggerDist = 0x80240340; // type:func rom:0xEE68F0 func_802403D4_EE6984 = 0x802403D4; // type:func rom:0xEE6984 func_8024042C_EE69DC = 0x8024042C; // type:func rom:0xEE69DC func_8024046C_EE6A1C = 0x8024046C; // type:func rom:0xEE6A1C @@ -25590,7 +25589,7 @@ D_80245390_EEB940 = 0x80245390; // type:data rom:0xEEB940 padding = 0x80240948; // type:data rom:0xEEB984 D_802453E0_EEB990 = 0x802453E0; // type:data rom:0xEEB990 dead_flo_16_DeadUnkFunc1 = 0x80240000; // type:func rom:0xEED100 -dead_flo_16_UnkFunc43 = 0x80240040; // type:func rom:0xEED140 +dead_flo_16_CheckVineTriggerDist = 0x80240040; // type:func rom:0xEED140 dead_flo_16_SuperBlock_SetOverride40 = 0x802400E0; // type:func rom:0xEED1E0 dead_flo_16_SuperBlock_ClearOverride40 = 0x802400FC; // type:func rom:0xEED1FC dead_flo_16_SuperBlock_HideBlockContent = 0x8024011C; // type:func rom:0xEED21C diff --git a/ver/us/undefined_syms.txt b/ver/us/undefined_syms.txt index bb223243b5..b5122111dd 100644 --- a/ver/us/undefined_syms.txt +++ b/ver/us/undefined_syms.txt @@ -766,6 +766,8 @@ D_8024F580_hos_05 = 0x8024F580; osr_00_802437C0 = 0x802437C0; mim_03_802424E0 = 0x802424E0; sam_04_80245210 = 0x80245210; +obk_01_802458F0 = 0x802458F0; +omo_13_80243220 = 0x80243220; // incorrectly-identified vtx addresses for tst_13 D_802423D0 = 0x802423D0;