From de800e9c9f088084e66a4ef48b17718854a56535 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 22 Aug 2021 22:50:10 +0100 Subject: [PATCH] mass script to evt type rename (#377) * add process_scripts.py * mass evt rename --- .vscode/c_cpp_properties.json | 1 + include/common_structs.h | 62 +- include/functions.h | 34 +- include/macros.h | 2 +- include/map.h | 54 +- include/script_api/battle.h | 708 +++++++++--------- include/script_api/common.h | 594 +++++++-------- include/script_api/map.h | 42 +- include/si.h | 197 ++--- include/variables.h | 6 +- src/16F740.c | 6 +- src/16c8e0.c | 34 +- src/1776B0.c | 42 +- src/17D6A0.c | 4 +- src/17FEB0.c | 8 +- src/181810.c | 42 +- src/18F340.c | 68 +- src/1967B0.c | 2 +- src/196AA0.c | 32 +- src/197F40.c | 222 +++--- src/19FAF0.c | 66 +- src/1A5830.c | 128 ++-- src/1AC760.c | 26 +- src/1AF120.c | 4 +- src/1AF230.c | 2 +- src/1a1f0_len_5390.c | 28 +- src/23680.c | 12 +- src/25AF0.c | 4 +- src/3251D0.c | 18 +- src/362a0_len_2f70.c | 2 +- src/80850_len_3060.c | 2 +- src/EA7320.c | 2 +- src/EF2650.c | 2 +- src/a5dd0_len_114e0.c | 16 +- src/battle/action_cmd/air_lift.c | 2 +- src/battle/action_cmd/body_slam.c | 4 +- src/battle/action_cmd/break_free.c | 4 +- src/battle/action_cmd/flee.c | 18 +- src/battle/action_cmd/hammer.c | 4 +- src/battle/action_cmd/jump.c | 14 +- src/battle/action_cmd/stop_leech.c | 2 +- src/battle/action_cmd/tidal_wave.c | 4 +- src/battle/action_cmd/water_block.c | 2 +- src/battle/action_cmd/whirlwind.c | 2 +- src/battle/area_arn/4FF010.c | 2 +- src/battle/area_dig/6DE3F0.c | 2 +- src/battle/area_dig/6DE4A0.c | 6 +- src/battle/area_flo/5B14B0.c | 2 +- src/battle/area_flo/5B28D0.c | 20 +- src/battle/area_flo2/5CF2D0.c | 20 +- src/battle/area_hos/47F0B0.c | 2 +- src/battle/area_iwa/4D01F0.c | 2 +- .../area_kmr_part_1/actor/anglestuff.inc.c | 2 +- src/battle/area_kmr_part_1/actor/goomba.c | 16 +- src/battle/area_kmr_part_1/actor/paragoomba.c | 40 +- .../area_kmr_part_1/actor/spiked_goomba.c | 16 +- src/battle/area_kmr_part_1/stage/clouds.inc.c | 6 +- src/battle/area_kmr_part_1/stage/kmr_02.c | 4 +- src/battle/area_kmr_part_1/stage/kmr_03.c | 4 +- src/battle/area_kmr_part_1/stage/kmr_04.c | 4 +- src/battle/area_kmr_part_1/stage/kmr_05.c | 4 +- src/battle/area_kmr_part_1/stage/kmr_06.c | 4 +- src/battle/area_kmr_part_2/439A90.c | 2 +- src/battle/area_kmr_part_3/447D50.c | 2 +- src/battle/area_omo/512E50.c | 6 +- src/battle/area_omo3/5573E0.c | 4 +- src/battle/area_trd_part_3/4CF1B0.c | 18 +- src/battle/item/coconut.c | 16 +- src/battle/item/coconut.h | 8 +- src/battle/item/dizzy_dial.c | 18 +- src/battle/item/dizzy_dial.h | 10 +- src/battle/item/dried_shroom.c | 20 +- src/battle/item/dried_shroom.h | 14 +- src/battle/item/dusty_hammer.c | 16 +- src/battle/item/dusty_hammer.h | 4 +- src/battle/item/egg_missile.c | 18 +- src/battle/item/egg_missile.h | 6 +- src/battle/item/electro_pop.c | 28 +- src/battle/item/electro_pop.h | 18 +- src/battle/item/fire_flower.c | 20 +- src/battle/item/fire_flower.h | 10 +- src/battle/item/food.c | 28 +- src/battle/item/food.h | 32 +- src/battle/item/fright_jar.c | 18 +- src/battle/item/fright_jar.h | 10 +- src/battle/item/hustle_drink.c | 20 +- src/battle/item/hustle_drink.h | 12 +- src/battle/item/insecticide_herb.c | 22 +- src/battle/item/insecticide_herb.h | 10 +- src/battle/item/life_shroom.c | 28 +- src/battle/item/life_shroom.h | 26 +- src/battle/item/mushroom.c | 28 +- src/battle/item/mushroom.h | 30 +- src/battle/item/mystery.c | 24 +- src/battle/item/mystery.h | 6 +- src/battle/item/pebble.c | 16 +- src/battle/item/pebble.h | 4 +- src/battle/item/please_come_back.c | 16 +- src/battle/item/please_come_back.h | 4 +- src/battle/item/pow_block.c | 22 +- src/battle/item/pow_block.h | 14 +- src/battle/item/repel_gel.c | 18 +- src/battle/item/repel_gel.h | 6 +- src/battle/item/shooting_star.c | 26 +- src/battle/item/shooting_star.h | 12 +- src/battle/item/sleepy_sheep.c | 24 +- src/battle/item/sleepy_sheep.h | 22 +- src/battle/item/snowman_doll.c | 20 +- src/battle/item/snowman_doll.h | 14 +- src/battle/item/stone_cap.c | 18 +- src/battle/item/stone_cap.h | 10 +- src/battle/item/stop_watch.c | 18 +- src/battle/item/stop_watch.h | 14 +- src/battle/item/strange_cake.c | 42 +- src/battle/item/strange_cake.h | 36 +- src/battle/item/super_soda.c | 26 +- src/battle/item/super_soda.h | 24 +- src/battle/item/tasty_tonic.c | 18 +- src/battle/item/tasty_tonic.h | 12 +- src/battle/item/thunder_bolt.c | 20 +- src/battle/item/thunder_bolt.h | 10 +- src/battle/item/thunder_rage.c | 20 +- src/battle/item/thunder_rage.h | 10 +- src/battle/item/ultra_shroom.c | 20 +- src/battle/item/ultra_shroom.h | 14 +- src/battle/item/unknown_item.c | 20 +- src/battle/item/unknown_item.h | 14 +- src/battle/item/volt_shroom.c | 18 +- src/battle/item/volt_shroom.h | 8 +- src/battle/move/d_down_jump/781920.c | 2 +- src/battle/move/d_down_pound/74AD90.c | 2 +- src/battle/move/earthquake_jump/785B20.c | 2 +- src/battle/move/hammer_charge_0/74F130.c | 4 +- src/battle/move/hammer_charge_1/7595B0.c | 4 +- src/battle/move/hammer_charge_2/75E5D0.c | 4 +- src/battle/move/jump/73D860.c | 2 +- src/battle/move/jump_charge_0/74D570.c | 4 +- src/battle/move/jump_charge_1/75C980.c | 4 +- src/battle/move/jump_charge_2/761920.c | 4 +- src/battle/move/mega_quake/756780.c | 2 +- src/battle/move/power_bounce/743DF0.c | 8 +- src/battle/move/spin_smash/737890.c | 4 +- src/battle/partner/bombette.c | 10 +- src/battle/partner/bow.c | 16 +- src/battle/partner/goombario.c | 98 +-- src/battle/partner/kooper.c | 6 +- src/battle/partner/lakilester.c | 12 +- src/battle/partner/parakarry.c | 6 +- src/battle/partner/sushie.c | 14 +- src/battle/partner/twink.c | 4 +- src/battle/partner/watt.c | 26 +- src/battle/star/chill_out/7900D0.c | 8 +- src/battle/star/focus/789E60.c | 4 +- src/battle/star/lullaby/78D150.c | 2 +- src/battle/star/peach_beam/7997B0.c | 4 +- src/battle/star/peach_dash/79D8A0.c | 2 +- src/battle/star/peach_focus/79BFA0.c | 2 +- src/battle/star/refresh/78B600.c | 6 +- src/battle/star/smooch/791D90.c | 2 +- src/battle/star/star_beam/796FC0.c | 4 +- src/battle/star/star_storm/78E7D0.c | 4 +- src/battle/star/up_and_away/7952E0.c | 6 +- src/common/AddFP.inc.c | 2 +- src/common/AddHP.inc.c | 2 +- src/common/BattleAreaAngleStuff.inc.c | 2 +- src/common/DeadUnk1.inc.c | 2 +- src/common/DeadUnkFloatFunc.inc.c | 2 +- src/common/DeadUnkFloatFuncAbs.inc.c | 2 +- src/common/Dist3D.inc.c | 2 +- src/common/DivActorLevel4.inc.c | 2 +- src/common/FadeBackgroundToBlack.inc.c | 2 +- src/common/FreeIcon.inc.c | 2 +- src/common/GetBootsHammerLevel.inc.c | 2 +- src/common/GetItemEntityPosition.inc.c | 2 +- src/common/GetJumpHammerCharge.inc.c | 2 +- src/common/GetLastEventType.inc.c | 2 +- src/common/GetModelPos.inc.c | 2 +- src/common/GetSelectedMoveID.inc.c | 2 +- src/common/IsGameStatusUnkAA_1.inc.c | 4 +- src/common/IsSaveVar123.inc.c | 2 +- src/common/MashActionCommandInit.inc.c | 2 +- src/common/MediGuySpriteRotationFunc.inc.c | 4 +- src/common/Set80071270_0_16.inc.c | 2 +- src/common/Set80218630_Var0.inc.c | 2 +- src/common/SetBackgroundAlpha.inc.c | 2 +- src/common/SetNpcCollision32.inc.c | 2 +- src/common/ShrinkActor.inc.c | 2 +- src/common/StarPower.inc.c | 8 +- src/common/StartRumbleWithParams.inc.c | 2 +- src/common/UnkAngleFunc2.inc.c | 2 +- src/common/UnkBackgroundFunc.inc.c | 2 +- src/common/UnkBackgroundFunc2.inc.c | 2 +- src/common/UnkBackgroundFunc3.inc.c | 2 +- src/common/UnkBattleFunc1.inc.c | 2 +- src/common/UnkBattleFunc2.inc.c | 4 +- src/common/UnkBattleFunc5.inc.c | 2 +- src/common/UnkFloatFunc.inc.c | 2 +- src/common/UnkFloatFunc2.inc.c | 2 +- src/common/UnkFogFunc.inc.c | 2 +- src/common/UnkFogFunc2.inc.c | 2 +- src/common/UnkStarFunc.inc.c | 2 +- src/encounter_api.c | 104 +-- src/evt/cam_api.c | 110 +-- src/evt/demo_api.c | 16 +- src/evt/f8f60_len_1560.c | 54 +- src/evt/fa4c0_len_3bf0.c | 100 +-- src/evt/fx_api.c | 30 +- src/evt/map_api.c | 84 +-- src/evt/msg_api.c | 34 +- src/evt/npc_api.c | 100 +-- src/evt/player_api.c | 132 ++-- src/evt/script_list.c | 104 +-- src/evt/si.c | 512 ++++++------- src/npc.c | 18 +- src/npc.h | 12 +- src/world/area_arn/arn_02/arn_02.h | 8 +- src/world/area_arn/arn_02/events.c | 24 +- src/world/area_arn/arn_02/header.c | 2 +- src/world/area_arn/arn_03/arn_03.h | 16 +- src/world/area_arn/arn_03/events.c | 76 +- src/world/area_arn/arn_03/header.c | 2 +- src/world/area_arn/arn_04/arn_04.h | 12 +- src/world/area_arn/arn_04/events.c | 38 +- src/world/area_arn/arn_04/header.c | 2 +- src/world/area_arn/arn_05/arn_05.h | 14 +- src/world/area_arn/arn_05/events.c | 70 +- src/world/area_arn/arn_05/header.c | 2 +- src/world/area_arn/arn_07/BECDF0.c | 30 +- src/world/area_arn/arn_07/BED5F0.c | 2 +- src/world/area_arn/arn_07/arn_07.h | 38 +- src/world/area_arn/arn_07/events.c | 56 +- src/world/area_arn/arn_07/header.c | 2 +- src/world/area_arn/arn_08/BF47A0.c | 4 +- src/world/area_arn/arn_08/arn_08.h | 24 +- src/world/area_arn/arn_08/events.c | 44 +- src/world/area_arn/arn_08/header.c | 2 +- src/world/area_arn/arn_09/arn_09.h | 12 +- src/world/area_arn/arn_09/events.c | 24 +- src/world/area_arn/arn_09/header.c | 2 +- src/world/area_arn/arn_10/arn_10.h | 6 +- src/world/area_arn/arn_10/events.c | 28 +- src/world/area_arn/arn_10/header.c | 2 +- src/world/area_arn/arn_11/arn_11.h | 4 +- src/world/area_arn/arn_11/events.c | 26 +- src/world/area_arn/arn_11/header.c | 2 +- src/world/area_arn/arn_12/arn_12.h | 6 +- src/world/area_arn/arn_12/events.c | 28 +- src/world/area_arn/arn_12/header.c | 2 +- src/world/area_arn/arn_13/arn_13.h | 6 +- src/world/area_arn/arn_13/events.c | 28 +- src/world/area_arn/arn_13/header.c | 2 +- src/world/area_dgb/dgb_00/BFA0A0.c | 14 +- src/world/area_dgb/dgb_00/BFA100.c | 64 +- src/world/area_dgb/dgb_00/dgb_00.h | 16 +- src/world/area_dgb/dgb_01/BFD9A0.c | 94 +-- src/world/area_dgb/dgb_01/dgb_01.h | 28 +- src/world/area_dgb/dgb_02/C2EBA0.c | 42 +- src/world/area_dgb/dgb_02/dgb_02.h | 8 +- src/world/area_dgb/dgb_03/C31730.c | 70 +- src/world/area_dgb/dgb_03/dgb_03.h | 24 +- src/world/area_dgb/dgb_04/C36530.c | 64 +- src/world/area_dgb/dgb_04/dgb_04.h | 40 +- src/world/area_dgb/dgb_05/C3AA10.c | 42 +- src/world/area_dgb/dgb_05/dgb_05.h | 14 +- src/world/area_dgb/dgb_06/C3D080.c | 20 +- src/world/area_dgb/dgb_06/dgb_06.h | 4 +- src/world/area_dgb/dgb_07/C3DBF0.c | 36 +- src/world/area_dgb/dgb_07/dgb_07.h | 8 +- src/world/area_dgb/dgb_08/C3FDB0.c | 88 +-- src/world/area_dgb/dgb_08/dgb_08.h | 24 +- src/world/area_dgb/dgb_09/C46BE0.c | 88 +-- src/world/area_dgb/dgb_09/dgb_09.h | 12 +- src/world/area_dgb/dgb_10/C4C390.c | 38 +- src/world/area_dgb/dgb_10/dgb_10.h | 20 +- src/world/area_dgb/dgb_11/C4D3E0.c | 18 +- src/world/area_dgb/dgb_11/dgb_11.h | 6 +- src/world/area_dgb/dgb_12/C4DEF0.c | 18 +- src/world/area_dgb/dgb_12/dgb_12.h | 6 +- src/world/area_dgb/dgb_13/C4E960.c | 22 +- src/world/area_dgb/dgb_13/dgb_13.h | 6 +- src/world/area_dgb/dgb_14/C4F030.c | 12 +- src/world/area_dgb/dgb_14/dgb_14.h | 4 +- src/world/area_dgb/dgb_15/C4F510.c | 42 +- src/world/area_dgb/dgb_15/dgb_15.h | 22 +- src/world/area_dgb/dgb_16/C52540.c | 36 +- src/world/area_dgb/dgb_16/dgb_16.h | 8 +- src/world/area_dgb/dgb_17/C55A60.c | 14 +- src/world/area_dgb/dgb_17/dgb_17.h | 4 +- src/world/area_dgb/dgb_18/C55F40.c | 38 +- src/world/area_dgb/dgb_18/C56EF0.c | 2 +- src/world/area_dgb/dgb_18/dgb_18.h | 10 +- src/world/area_dro/dro_01/95B7E0.c | 294 ++++---- src/world/area_dro/dro_01/95E660.c | 4 +- src/world/area_dro/dro_01/95E7A0.c | 2 +- src/world/area_dro/dro_01/dro_01.h | 134 ++-- src/world/area_dro/dro_02/9694C0.c | 260 +++---- src/world/area_dro/dro_02/dro_02.h | 112 +-- src/world/area_end/end_00/DF6A00.c | 2 +- src/world/area_end/end_00/DF6A20.c | 12 +- src/world/area_end/end_01/E05360.c | 2 +- src/world/area_flo/flo_00/C9DF20.c | 2 +- src/world/area_flo/flo_00/C9DF60.c | 108 +-- src/world/area_flo/flo_00/C9EE30.c | 10 +- src/world/area_flo/flo_00/flo_00.h | 44 +- src/world/area_flo/flo_03/CA72A0.c | 2 +- src/world/area_flo/flo_03/CA72E0.c | 66 +- src/world/area_flo/flo_03/flo_03.h | 20 +- src/world/area_flo/flo_07/CAC1F0.c | 2 +- src/world/area_flo/flo_07/CAC5D0.c | 38 +- src/world/area_flo/flo_07/flo_07.h | 18 +- src/world/area_flo/flo_08/CAED40.c | 8 +- src/world/area_flo/flo_08/CAFA80.c | 2 +- src/world/area_flo/flo_08/CAFAC0.c | 62 +- src/world/area_flo/flo_08/flo_08.h | 62 +- src/world/area_flo/flo_09/CB5000.c | 2 +- src/world/area_flo/flo_09/CB50E0.c | 38 +- src/world/area_flo/flo_09/CB5320.c | 8 +- src/world/area_flo/flo_09/flo_09.h | 14 +- src/world/area_flo/flo_10/CB9240.c | 2 +- src/world/area_flo/flo_10/CB9280.c | 66 +- src/world/area_flo/flo_10/CBA430.c | 2 +- src/world/area_flo/flo_10/flo_10.h | 22 +- src/world/area_flo/flo_11/CBDCD0.c | 62 +- src/world/area_flo/flo_11/flo_11.h | 22 +- src/world/area_flo/flo_12/CC0E30.c | 2 +- src/world/area_flo/flo_12/CC0E70.c | 40 +- src/world/area_flo/flo_12/flo_12.h | 16 +- src/world/area_flo/flo_13/CC3810.c | 2 +- src/world/area_flo/flo_13/CC3850.c | 80 +- src/world/area_flo/flo_13/flo_13.h | 18 +- src/world/area_flo/flo_14/CCB310.c | 38 +- src/world/area_flo/flo_14/CCBE20.c | 30 +- src/world/area_flo/flo_14/CCD670.c | 2 +- src/world/area_flo/flo_14/flo_14.h | 40 +- src/world/area_flo/flo_15/CD06C0.c | 28 +- src/world/area_flo/flo_15/flo_15.h | 8 +- src/world/area_flo/flo_16/CD1E30.c | 2 +- src/world/area_flo/flo_16/CD1F10.c | 36 +- src/world/area_flo/flo_16/CD2C80.c | 22 +- src/world/area_flo/flo_16/CD4770.c | 2 +- src/world/area_flo/flo_16/flo_16.h | 54 +- src/world/area_flo/flo_17/CD72E0.c | 2 +- src/world/area_flo/flo_17/CD7320.c | 2 +- src/world/area_flo/flo_17/CD7350.c | 44 +- src/world/area_flo/flo_17/flo_17.h | 14 +- src/world/area_flo/flo_18/CDC6A0.c | 242 +++--- src/world/area_flo/flo_18/CDCC30.c | 2 +- src/world/area_flo/flo_18/flo_18.h | 24 +- src/world/area_flo/flo_19/CE36F0.c | 92 +-- src/world/area_flo/flo_19/flo_19.h | 28 +- src/world/area_flo/flo_21/CE6700.c | 68 +- src/world/area_flo/flo_21/flo_21.h | 26 +- src/world/area_flo/flo_22/CEC240.c | 30 +- src/world/area_flo/flo_22/CEC290.c | 2 +- src/world/area_flo/flo_22/flo_22.h | 12 +- src/world/area_flo/flo_23/CEE260.c | 2 +- src/world/area_flo/flo_23/CEE2A0.c | 38 +- src/world/area_flo/flo_23/flo_23.h | 24 +- src/world/area_flo/flo_24/CF0940.c | 2 +- src/world/area_flo/flo_24/CF0980.c | 98 +-- src/world/area_flo/flo_24/flo_24.h | 18 +- src/world/area_flo/flo_25/CF2BD0.c | 2 +- src/world/area_flo/flo_25/CF2C10.c | 50 +- src/world/area_flo/flo_25/CF4BC0.c | 8 +- src/world/area_flo/flo_25/flo_25.h | 32 +- src/world/area_gv/gv_01/E1E460.c | 2 +- src/world/area_hos/hos_00/A0C4E0.c | 2 +- src/world/area_hos/hos_02/A17210.c | 6 +- src/world/area_hos/hos_03/A1BDB0.c | 26 +- src/world/area_hos/hos_04/A27AA0.c | 2 +- src/world/area_hos/hos_05/A2EC30.c | 2 +- src/world/area_hos/hos_06/A397F0.c | 12 +- src/world/area_hos/hos_06/A3A230.c | 8 +- src/world/area_hos/hos_06/A3B4B0.c | 2 +- src/world/area_isk/isk_09/9864E0.c | 2 +- src/world/area_isk/isk_10/988B60.c | 4 +- src/world/area_isk/isk_16/9951F0.c | 8 +- src/world/area_iwa/iwa_00/90CC40.c | 2 +- src/world/area_iwa/iwa_01/90FBD0.c | 6 +- src/world/area_iwa/iwa_02/915D70.c | 8 +- src/world/area_iwa/iwa_03/918BB0.c | 2 +- src/world/area_iwa/iwa_03/918EF0.c | 6 +- src/world/area_iwa/iwa_04/91B8E0.c | 6 +- src/world/area_iwa/iwa_10/91E5B0.c | 2 +- src/world/area_iwa/iwa_10/91E6D0.c | 4 +- src/world/area_iwa/iwa_10/91F5A0.c | 6 +- src/world/area_jan/jan_00/B20540.c | 12 +- src/world/area_jan/jan_02/B2C8A0.c | 30 +- src/world/area_jan/jan_03/B34BD0.c | 36 +- src/world/area_jan/jan_04/B44AC0.c | 2 +- src/world/area_jan/jan_05/B4B260.c | 2 +- src/world/area_jan/jan_06/B52B40.c | 2 +- src/world/area_jan/jan_08/B5E910.c | 4 +- src/world/area_jan/jan_22/B84180.c | 6 +- src/world/area_kkj/kkj_00/ABB340.c | 2 +- src/world/area_kkj/kkj_01/AC5170.c | 2 +- src/world/area_kkj/kkj_17/AF1C60.c | 2 +- src/world/area_kkj/kkj_18/AF2FE0.c | 8 +- src/world/area_kkj/kkj_19/AF7C00.c | 8 +- src/world/area_kkj/kkj_20/AFDB40.c | 2 +- src/world/area_kmr/kmr_00/8ABF90.c | 14 +- src/world/area_kmr/kmr_02/8B0070.c | 32 +- src/world/area_kmr/kmr_02/8B3A10.c | 2 +- src/world/area_kmr/kmr_03/8C7F90.c | 2 +- src/world/area_kmr/kmr_03/8C8140.c | 26 +- src/world/area_kmr/kmr_03/8C82B0.c | 2 +- src/world/area_kmr/kmr_03/8C83A0.c | 4 +- src/world/area_kmr/kmr_03/8C85E0.c | 2 +- src/world/area_kmr/kmr_03/kmr_03.h | 16 +- src/world/area_kmr/kmr_04/8CA900.c | 2 +- src/world/area_kmr/kmr_04/8CA960.c | 6 +- src/world/area_kmr/kmr_05/8CE070.c | 2 +- src/world/area_kmr/kmr_05/8CF570.c | 2 +- src/world/area_kmr/kmr_06/8D1510.c | 2 +- src/world/area_kmr/kmr_06/8D2A10.c | 2 +- src/world/area_kmr/kmr_07/8D3DC0.c | 2 +- src/world/area_kmr/kmr_09/8D5E00.c | 6 +- src/world/area_kmr/kmr_10/8D84D0.c | 4 +- src/world/area_kmr/kmr_11/8DAFC0.c | 2 +- src/world/area_kmr/kmr_12/events.c | 20 +- src/world/area_kmr/kmr_12/header.c | 4 +- src/world/area_kmr/kmr_12/kmr_12.h | 10 +- src/world/area_kmr/kmr_20/8ED440.c | 2 +- src/world/area_kpa/kpa_12/A54CA0.c | 2 +- src/world/area_kpa/kpa_13/A56270.c | 2 +- src/world/area_kpa/kpa_14/A57830.c | 4 +- src/world/area_kpa/kpa_15/A596A0.c | 2 +- src/world/area_kpa/kpa_81/A78510.c | 8 +- src/world/area_kpa/kpa_82/A7A550.c | 8 +- src/world/area_kpa/kpa_91/A86A50.c | 2 +- src/world/area_kpa/kpa_95/A8CB60.c | 2 +- src/world/area_kzn/kzn_02/C5AC20.c | 20 +- src/world/area_kzn/kzn_03/C61020.c | 12 +- src/world/area_kzn/kzn_04/C68440.c | 4 +- src/world/area_kzn/kzn_07/C6EA50.c | 6 +- src/world/area_kzn/kzn_08/C71C10.c | 2 +- src/world/area_kzn/kzn_08/C71ED0.c | 8 +- src/world/area_kzn/kzn_09/C76CE0.c | 4 +- src/world/area_kzn/kzn_09/C77D00.c | 12 +- src/world/area_kzn/kzn_10/C7E4B0.c | 2 +- src/world/area_kzn/kzn_11/C80600.c | 8 +- src/world/area_kzn/kzn_17/C85DC0.c | 12 +- src/world/area_kzn/kzn_17/C887B0.c | 2 +- src/world/area_kzn/kzn_19/C8DBB0.c | 22 +- src/world/area_kzn/kzn_20/C96240.c | 12 +- src/world/area_mac/mac_00/7EAD10.c | 4 +- src/world/area_mac/mac_00/7EB340.c | 36 +- src/world/area_mac/mac_00/7ED280.c | 14 +- src/world/area_mac/mac_01/800880.c | 4 +- src/world/area_mac/mac_01/8017D0.c | 42 +- src/world/area_mac/mac_01/805DD0.c | 2 +- src/world/area_mac/mac_02/823BF0.c | 38 +- src/world/area_mac/mac_03/831B20.c | 32 +- src/world/area_mac/mac_04/843030.c | 30 +- src/world/area_mac/mac_05/852170.c | 36 +- src/world/area_mac/machi/7E73A0.c | 2 +- src/world/area_mgm/mgm_00/E0E7A0.c | 2 +- src/world/area_mim/mim_02/B97C70.c | 6 +- src/world/area_mim/mim_04/B9DB60.c | 2 +- src/world/area_mim/mim_08/BAD940.c | 4 +- src/world/area_mim/mim_10/BB59E0.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 34 +- src/world/area_nok/nok_02/9D7020.c | 8 +- src/world/area_nok/nok_02/9D7AA0.c | 34 +- src/world/area_nok/nok_02/9DA8F0.c | 10 +- src/world/area_nok/nok_11/9F4A40.c | 4 +- src/world/area_nok/nok_12/9FAD60.c | 2 +- src/world/area_nok/nok_14/A02A00.c | 4 +- src/world/area_nok/nok_15/A06F00.c | 4 +- src/world/area_obk/obk_01/BBD980.c | 12 +- src/world/area_obk/obk_03/BC43F0.c | 12 +- src/world/area_obk/obk_04/BC7EB0.c | 2 +- src/world/area_obk/obk_07/BCEBF0.c | 2 +- src/world/area_obk/obk_09/BDAB00.c | 2 +- src/world/area_omo/omo_01/D9B150.c | 6 +- src/world/area_omo/omo_04/DAD400.c | 6 +- src/world/area_omo/omo_05/DB22C0.c | 12 +- src/world/area_omo/omo_06/DB8180.c | 2 +- src/world/area_omo/omo_07/DBD2B0.c | 6 +- src/world/area_omo/omo_07/DC01D0.c | 2 +- src/world/area_omo/omo_09/DCD3F0.c | 2 +- src/world/area_omo/omo_09/DCD6B0.c | 2 +- src/world/area_omo/omo_11/DDCFC0.c | 4 +- src/world/area_omo/omo_13/DE2710.c | 6 +- src/world/area_omo/omo_13/DE36C0.c | 2 +- src/world/area_omo/omo_15/DE8770.c | 8 +- src/world/area_omo/omo_17/DEF400.c | 4 +- src/world/area_osr/osr_01/AB0350.c | 12 +- src/world/area_pra/pra_01/D4D060.c | 12 +- src/world/area_pra/pra_02/D50010.c | 8 +- src/world/area_pra/pra_05/D55BD0.c | 2 +- src/world/area_pra/pra_09/D588B0.c | 8 +- src/world/area_pra/pra_11/D61520.c | 2 +- src/world/area_pra/pra_12/D62D10.c | 2 +- src/world/area_pra/pra_13/D64600.c | 10 +- src/world/area_pra/pra_14/D67D20.c | 2 +- src/world/area_pra/pra_19/D6E9D0.c | 8 +- src/world/area_pra/pra_27/D799F0.c | 2 +- src/world/area_pra/pra_28/D7B2A0.c | 2 +- src/world/area_pra/pra_31/D7ED80.c | 8 +- src/world/area_pra/pra_32/D86A20.c | 10 +- src/world/area_pra/pra_35/D8D270.c | 4 +- src/world/area_pra/pra_35/D8FBA0.c | 2 +- src/world/area_sam/sam_01/CF7E80.c | 36 +- src/world/area_sam/sam_02/D05F60.c | 22 +- src/world/area_sam/sam_04/D138E0.c | 8 +- src/world/area_sam/sam_06/D203E0.c | 18 +- src/world/area_sam/sam_08/D2FC80.c | 4 +- src/world/area_sam/sam_09/D362F0.c | 2 +- src/world/area_sam/sam_10/D37800.c | 2 +- src/world/area_sam/sam_11/D3A930.c | 2 +- src/world/area_sam/sam_11/D3ADA0.c | 22 +- src/world/area_sbk/sbk_00/929270.c | 8 +- src/world/area_sbk/sbk_00/9292B0.c | 4 +- src/world/area_sbk/sbk_00/sbk_00.h | 4 +- src/world/area_sbk/sbk_01/929A90.c | 12 +- src/world/area_sbk/sbk_01/929AD0.c | 2 +- src/world/area_sbk/sbk_01/sbk_01.h | 2 +- src/world/area_sbk/sbk_02/92A9A0.c | 12 +- src/world/area_sbk/sbk_30/93F5B0.c | 14 +- src/world/area_sbk/sbk_34/945F10.c | 12 +- src/world/area_sbk/sbk_56/953FC0.c | 4 +- src/world/area_tik/tik_02/86CA50.c | 2 +- src/world/area_tik/tik_05/8750D0.c | 2 +- src/world/area_tik/tik_07/879BE0.c | 4 +- src/world/area_tik/tik_07/87AC00.c | 2 +- src/world/area_tik/tik_10/8866D0.c | 4 +- src/world/area_tik/tik_12/8891C0.c | 6 +- src/world/area_tik/tik_15/890190.c | 2 +- src/world/area_tik/tik_17/892A50.c | 4 +- src/world/area_tik/tik_19/897BD0.c | 4 +- src/world/area_trd/trd_00/999F80.c | 2 +- src/world/area_trd/trd_00/99A240.c | 2 +- src/world/area_trd/trd_02/9A10C0.c | 2 +- src/world/area_trd/trd_03/9A4650.c | 4 +- src/world/area_trd/trd_04/9A88A0.c | 6 +- src/world/area_trd/trd_05/9AE700.c | 2 +- src/world/area_trd/trd_05/9AEE20.c | 2 +- src/world/area_trd/trd_06/9B1AA0.c | 2 +- src/world/area_trd/trd_07/9B6C90.c | 4 +- src/world/area_trd/trd_10/9C2910.c | 10 +- src/world/area_tst/tst_04/B1B570.c | 10 +- src/world/area_tst/tst_04/B1BBD0.c | 2 +- src/world/area_tst/tst_11/B1CA50.c | 6 +- src/world/area_tst/tst_13/B1D760.c | 4 +- src/world/common/AddPlayerHandsOffset.inc.c | 2 +- src/world/common/AwaitPlayerNearNpc.inc.c | 6 +- src/world/common/AwaitScriptComplete.inc.c | 2 +- src/world/common/Bandit_DropCoin.inc.c | 2 +- src/world/common/Call800E9894.inc.c | 2 +- .../common/Call800E98C4SyncStatusMenu.inc.c | 2 +- src/world/common/CamSetFOV.inc.c | 2 +- src/world/common/CheckItemFlags40.inc.c | 2 +- src/world/common/CheckPartnerFlags1000.inc.c | 2 +- src/world/common/DeadFoliage.inc.c | 2 +- src/world/common/DeadGetItemName.inc.c | 2 +- src/world/common/DeadUnkNpcAIFunc1.inc.c | 2 +- src/world/common/DeadUnkNpcAIFunc14.inc.c | 2 +- src/world/common/DeadUnkPartnerPosFuncs.inc.c | 4 +- src/world/common/DeadUnkTexturePanFunc.inc.c | 2 +- src/world/common/DeadUnkTexturePanFunc2.inc.c | 2 +- src/world/common/DoesPlayerNeedSleep.inc.c | 2 +- src/world/common/GetCamVfov.inc.c | 2 +- .../GetCurrentCameraYawClamped180.inc.c | 2 +- src/world/common/GetCurrentFloor.inc.c | 2 +- .../common/GetEncounterEnemyIsOwner.inc.c | 2 +- src/world/common/GetEntityPosition.inc.c | 2 +- src/world/common/GetEntryPos.inc.c | 2 +- src/world/common/GetFloorCollider.inc.c | 2 +- src/world/common/GetGameStatus75.inc.c | 2 +- src/world/common/GetItemName.inc.c | 2 +- src/world/common/GetNpcCollisionHeight.inc.c | 2 +- src/world/common/GetPartnerCall800EB168.inc.c | 4 +- src/world/common/GetPlayerCoins.inc.c | 2 +- src/world/common/IsBerserkerEquipped.inc.c | 2 +- src/world/common/IsHammerMaxCharged.inc.c | 2 +- src/world/common/IsJumpMaxCharged.inc.c | 2 +- src/world/common/IsRightOnEquipped.inc.c | 2 +- src/world/common/LoadPartyImage.inc.c | 2 +- src/world/common/NpcJumpFunc.inc.c | 2 +- src/world/common/NpcJumpFunc2.inc.c | 2 +- src/world/common/NpcJumpFunc3.inc.c | 2 +- .../common/PartnerToggleAbilityScript.inc.c | 4 +- src/world/common/PlayFX3D.inc.c | 2 +- src/world/common/Set80151310.inc.c | 2 +- src/world/common/Set80151310_0.inc.c | 2 +- src/world/common/SetCamVfov.inc.c | 2 +- src/world/common/SetCamera0Flag1000.inc.c | 2 +- src/world/common/SetCamera0MoveFlag1.inc.c | 2 +- src/world/common/SetEntityFlags100000.inc.c | 2 +- src/world/common/SetEntityPosition.inc.c | 2 +- src/world/common/SetForeverForestFog.inc.c | 2 +- src/world/common/SetGameStatusUnk84_1.inc.c | 2 +- src/world/common/SetManyVars.inc.c | 2 +- src/world/common/SetNpcB5_3.inc.c | 2 +- src/world/common/SetOverrideFlags_40.inc.c | 2 +- src/world/common/SetPlayerSpriteSet2.inc.c | 2 +- .../SetPlayerStatusAnimFlags100000.inc.c | 2 +- src/world/common/SomeItemEntityFunc.inc.c | 2 +- src/world/common/SomeXYZFunc2.inc.c | 2 +- src/world/common/SpawnSunEffect.inc.c | 2 +- src/world/common/StashVars.inc.c | 2 +- src/world/common/SwitchToPartner.inc.c | 2 +- src/world/common/SyncStatusMenu.inc.c | 2 +- src/world/common/UnkCameraFunc.inc.c | 2 +- src/world/common/UnkDistFunc.inc.c | 2 +- src/world/common/UnkDurationCheck.inc.c | 2 +- src/world/common/UnkFunc1.inc.c | 2 +- src/world/common/UnkFunc10.inc.c | 2 +- src/world/common/UnkFunc11.inc.c | 2 +- src/world/common/UnkFunc12.inc.c | 2 +- src/world/common/UnkFunc13.inc.c | 2 +- src/world/common/UnkFunc13_copy.inc.c | 2 +- src/world/common/UnkFunc14.inc.c | 2 +- src/world/common/UnkFunc14_copy.inc.c | 2 +- src/world/common/UnkFunc15.inc.c | 2 +- src/world/common/UnkFunc15_copy.inc.c | 2 +- src/world/common/UnkFunc16.inc.c | 2 +- src/world/common/UnkFunc16_copy.inc.c | 2 +- src/world/common/UnkFunc17.inc.c | 2 +- src/world/common/UnkFunc18.inc.c | 4 +- src/world/common/UnkFunc19.inc.c | 2 +- src/world/common/UnkFunc20.inc.c | 2 +- src/world/common/UnkFunc21.inc.c | 2 +- src/world/common/UnkFunc22.inc.c | 2 +- src/world/common/UnkFunc23.inc.c | 2 +- src/world/common/UnkFunc24.inc.c | 2 +- src/world/common/UnkFunc25.inc.c | 2 +- src/world/common/UnkFunc26.inc.c | 2 +- src/world/common/UnkFunc27.inc.c | 2 +- src/world/common/UnkFunc31.inc.c | 8 +- src/world/common/UnkFunc32.inc.c | 2 +- src/world/common/UnkFunc35.inc.c | 2 +- src/world/common/UnkFunc36.inc.c | 2 +- src/world/common/UnkFunc39.inc.c | 2 +- src/world/common/UnkFunc4.inc.c | 2 +- src/world/common/UnkFunc40.inc.c | 2 +- src/world/common/UnkFunc41.inc.c | 2 +- src/world/common/UnkFunc42.inc.c | 2 +- src/world/common/UnkFunc43.inc.c | 2 +- src/world/common/UnkFunc44.inc.c | 2 +- src/world/common/UnkFunc45.inc.c | 2 +- src/world/common/UnkFunc5.inc.c | 2 +- src/world/common/UnkFunc6.inc.c | 2 +- src/world/common/UnkFunc7.inc.c | 2 +- src/world/common/UnkFunc8.inc.c | 2 +- src/world/common/UnkFunc9.inc.c | 2 +- src/world/common/UnkMoveFunc1.inc.c | 2 +- src/world/common/UnkMoveFunc2.inc.c | 2 +- src/world/common/UnkMoveFunc3.inc.c | 2 +- src/world/common/UnkMusicFunc.inc.c | 2 +- src/world/common/UnkNpcAIFunc1.inc.c | 2 +- src/world/common/UnkNpcAIFunc10.inc.c | 2 +- src/world/common/UnkNpcAIFunc11.inc.c | 2 +- src/world/common/UnkNpcAIFunc12.inc.c | 2 +- src/world/common/UnkNpcAIFunc13.inc.c | 2 +- src/world/common/UnkNpcAIFunc13_2.inc.c | 2 +- src/world/common/UnkNpcAIFunc14.inc.c | 2 +- src/world/common/UnkNpcAIFunc15.inc.c | 2 +- src/world/common/UnkNpcAIFunc16.inc.c | 2 +- src/world/common/UnkNpcAIFunc17.inc.c | 2 +- src/world/common/UnkNpcAIFunc18.inc.c | 2 +- src/world/common/UnkNpcAIFunc19.inc.c | 2 +- src/world/common/UnkNpcAIFunc1_copy.inc.c | 2 +- src/world/common/UnkNpcAIFunc2.inc.c | 2 +- src/world/common/UnkNpcAIFunc20.inc.c | 2 +- src/world/common/UnkNpcAIFunc21.inc.c | 2 +- src/world/common/UnkNpcAIFunc22.inc.c | 2 +- src/world/common/UnkNpcAIFunc23.inc.c | 2 +- src/world/common/UnkNpcAIFunc24.inc.c | 2 +- src/world/common/UnkNpcAIFunc25.inc.c | 2 +- src/world/common/UnkNpcAIFunc26.inc.c | 2 +- src/world/common/UnkNpcAIFunc27.inc.c | 2 +- src/world/common/UnkNpcAIFunc28.inc.c | 2 +- src/world/common/UnkNpcAIFunc29.inc.c | 2 +- src/world/common/UnkNpcAIFunc3.inc.c | 2 +- src/world/common/UnkNpcAIFunc30.inc.c | 2 +- src/world/common/UnkNpcAIFunc4.inc.c | 2 +- src/world/common/UnkNpcAIFunc5.inc.c | 2 +- src/world/common/UnkNpcAIFunc6.inc.c | 2 +- src/world/common/UnkNpcAIFunc7.inc.c | 2 +- src/world/common/UnkNpcAIFunc8.inc.c | 2 +- src/world/common/UnkNpcAIFunc9.inc.c | 2 +- .../common/UnkNpcDurationAnimationFunc.inc.c | 2 +- src/world/common/UnkNpcDurationFlagFunc.inc.c | 2 +- .../common/UnkNpcDurationFlagFunc2.inc.c | 2 +- .../common/UnkNpcDurationFlagFunc3.inc.c | 2 +- src/world/common/UnkPartnerFuncs.inc.c | 4 +- src/world/common/UnkPartnerPosFuncs.inc.c | 4 +- src/world/common/UnkPositionFunc.inc.c | 2 +- src/world/common/UnkRotatePlayer.inc.c | 2 +- src/world/common/UnkSetDurationFunc.inc.c | 2 +- src/world/common/UnkTexturePanFunc.inc.c | 2 +- src/world/common/UnkTexturePanFunc2.inc.c | 2 +- src/world/common/UnkYawFunc.inc.c | 2 +- src/world/common/UnsetCamera0Flag1000.inc.c | 2 +- src/world/common/UnsetCamera0MoveFlag1.inc.c | 2 +- src/world/common/foliage.inc.c | 10 +- src/world/common/reflection.inc.c | 8 +- .../common/set_script_owner_npc_anim.inc.c | 2 +- .../set_script_owner_npc_col_height.inc.c | 2 +- src/world/partner/bombette.c | 4 +- src/world/partner/goombaria.c | 16 +- src/world/partner/goombaria.h | 8 +- src/world/partner/goombario.c | 18 +- src/world/partner/goombario.h | 10 +- src/world/partner/goompa.c | 14 +- src/world/partner/goompa.h | 8 +- src/world/partner/parakarry.c | 4 +- src/world/partner/twink.c | 16 +- src/world/partner/twink.h | 8 +- src/world/partners.c | 10 +- src/world/partners.h | 4 +- src/world/script_api/7E0E80.c | 36 +- src/world/script_api/7E2AA0.c | 28 +- src/world/script_api/7E3700.c | 14 +- src/world/script_api/7E4690.c | 12 +- tools/build/cc_dsl/compile_script.py | 172 ++--- tools/build/cc_dsl/process_scripts.py | 69 ++ tools/disasm_script.py | 196 ++--- tools/make_npc_structs.py | 16 +- tools/star_rod_idx_to_c.py | 8 +- 722 files changed, 6307 insertions(+), 6236 deletions(-) create mode 100755 tools/build/cc_dsl/process_scripts.py diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 36f9585923..5a33db7958 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -19,6 +19,7 @@ "defines": [ "F3DEX_GBI_2", "_LANGUAGE_C", + "_MIPS_SZLONG=32", "SCRIPT(...)={}", "VERSION=us" ], diff --git a/include/common_structs.h b/include/common_structs.h index 25982ca40b..d8adefb14c 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -7,11 +7,11 @@ #include "si.h" #include "enums.h" -struct ScriptInstance; +struct Evt; -typedef ApiStatus(*ApiFunc)(struct ScriptInstance*, s32); +typedef ApiStatus(*ApiFunc)(struct Evt*, s32); -typedef Bytecode Script[0]; +typedef Bytecode EvtSource[0]; typedef struct { u8 r, g, b, a; @@ -276,15 +276,15 @@ typedef struct Trigger { /* 0x04 */ s32 params1; /* 0x08 */ s32 params2; /* 0x0C */ UNK_FUN_PTR(functionHandler); - /* 0x10 */ Script* scriptSource; - /* 0x14 */ struct ScriptInstance* runningScript; + /* 0x10 */ EvtSource* scriptSource; + /* 0x14 */ struct Evt* runningScript; /* 0x18 */ s32 priority; /* 0x1C */ s32 scriptVars[3]; /* 0x28 */ char unk_28[4]; /* 0x2C */ s32 unk_2C; /* 0x30 */ u8 unk_30; /* 0x31 */ char unk_31[3]; - /* 0x34 */ ScriptID runningScriptID; + /* 0x34 */ s32 runningScriptID; } Trigger; // size = 0x38 typedef Trigger* TriggerList[MAX_TRIGGERS]; @@ -294,7 +294,7 @@ typedef union X32 { f32 f; } X32; -typedef struct ScriptInstance { +typedef struct Evt { /* 0x000 */ u8 state; /* 0x001 */ u8 currentArgc; /* 0x002 */ u8 currentOpcode; @@ -308,9 +308,9 @@ typedef struct ScriptInstance { /* 0x010 */ s8 labelIndices[16]; /* 0x020 */ UNK_PTR labelPositions[16]; /* 0x060 */ UNK_PTR userData; /* unknown pointer; allocated on the heap, free'd in kill_script() */ - /* 0x064 */ struct ScriptInstance* blockingParent; /* parent? */ - /* 0x068 */ struct ScriptInstance* childScript; - /* 0x06C */ struct ScriptInstance* parentScript; /* brother? */ + /* 0x064 */ struct Evt* blockingParent; /* parent? */ + /* 0x068 */ struct Evt* childScript; + /* 0x06C */ struct Evt* parentScript; /* brother? */ /* 0x070 */ s32 functionTemp[4]; /* 0x080 */ ApiFunc callFunction; /* 0x084 */ s32 varTable[16]; @@ -322,7 +322,7 @@ typedef struct ScriptInstance { /* 0x138 */ s32* buffer; /* 0x13C */ s32* array; /* 0x140 */ s32* flagArray; - /* 0x144 */ ScriptID id; + /* 0x144 */ s32 id; /* 0x148 */ union { s32 enemyID; ActorID actorID; @@ -341,9 +341,9 @@ typedef struct ScriptInstance { /* 0x15C */ Bytecode* ptrFirstLine; /* 0x160 */ Bytecode* ptrSavedPosition; /* 0x164 */ Bytecode* ptrCurrentLine; -} ScriptInstance; // size = 0x168 +} Evt; // size = 0x168 -typedef ScriptInstance* ScriptList[MAX_SCRIPTS]; +typedef Evt* ScriptList[MAX_SCRIPTS]; struct Entity; @@ -366,7 +366,7 @@ typedef struct Entity { /* 0x18 */ s32* scriptReadPos; /* 0x1C */ EntityCallback updateScriptCallback; /* 0x20 */ EntityCallback updateMatrixOverride; - /* 0x24 */ ScriptInstance* boundScript; + /* 0x24 */ Evt* boundScript; /* 0x28 */ Bytecode* boundScriptBytecode; /* 0x2C */ s32* savedReadPos; /* 0x30 */ char unk_30[0x8]; @@ -703,10 +703,10 @@ typedef struct BattleStatus { /* 0x0B1 */ char unk_B1[3]; /* 0x0B4 */ UNK_FUN_PTR(preUpdateCallback); /* 0x0B8 */ UNK_FUN_PTR(unk_B8); - /* 0x0BC */ struct ScriptInstance* controlScript; /* control handed over to this when changing partners */ - /* 0x0C0 */ ScriptID controlScriptID; - /* 0x0C4 */ struct ScriptInstance* camMovementScript; - /* 0x0C8 */ ScriptID camMovementScriptID; + /* 0x0BC */ struct Evt* controlScript; /* control handed over to this when changing partners */ + /* 0x0C0 */ s32 controlScriptID; + /* 0x0C4 */ struct Evt* camMovementScript; + /* 0x0C8 */ s32 camMovementScriptID; /* 0x0CC */ Vec3f unk_CC; /* 0x0D8 */ struct Actor* playerActor; /* 0x0DC */ struct Actor* partnerActor; @@ -1250,7 +1250,7 @@ typedef struct GameStatus { /* 0x068 */ s16 demoButtonInput; /* 0x06A */ s8 demoStickX; /* 0x06B */ s8 demoStickY; - /* 0x06C */ ScriptID mainScriptID; + /* 0x06C */ s32 mainScriptID; /* 0x070 */ s8 isBattle; /* 0x071 */ s8 demoState; /* (0 = not demo, 1 = map demo, 2 = demo map changing) */ /* 0x072 */ s8 nextDemoScene; /* which part of the demo to play next */ @@ -1749,18 +1749,18 @@ typedef struct Actor { /* 0x1BA */ char unk_1BA[2]; /* 0x1BC */ u8 hpFraction; /* used to render HP bar */ /* 0x1BD */ char unk_1BD[3]; - /* 0x1C0 */ Script* idleScriptSource; - /* 0x1C4 */ Script* takeTurnScriptSource; - /* 0x1C8 */ Script* onHitScriptSource; - /* 0x1CC */ Script* onTurnChanceScriptSource; - /* 0x1D0 */ struct ScriptInstance* idleScript; - /* 0x1D4 */ struct ScriptInstance* takeTurnScript; - /* 0x1D8 */ struct ScriptInstance* onHitScript; - /* 0x1DC */ struct ScriptInstance* onTurnChangeScript; - /* 0x1E0 */ ScriptID idleScriptID; - /* 0x1E4 */ ScriptID takeTurnID; - /* 0x1E8 */ ScriptID onHitID; - /* 0x1EC */ ScriptID onTurnChangeID; + /* 0x1C0 */ EvtSource* idleScriptSource; + /* 0x1C4 */ EvtSource* takeTurnScriptSource; + /* 0x1C8 */ EvtSource* onHitScriptSource; + /* 0x1CC */ EvtSource* onTurnChanceScriptSource; + /* 0x1D0 */ struct Evt* idleScript; + /* 0x1D4 */ struct Evt* takeTurnScript; + /* 0x1D8 */ struct Evt* onHitScript; + /* 0x1DC */ struct Evt* onTurnChangeScript; + /* 0x1E0 */ s32 idleScriptID; + /* 0x1E4 */ s32 takeTurnID; + /* 0x1E8 */ s32 onHitID; + /* 0x1EC */ s32 onTurnChangeID; /* 0x1F0 */ s8 lastEventType; /* 0x1F1 */ u8 turnPriority; /* 0x1F2 */ u8 enemyIndex; /* actorID = this | 200 */ diff --git a/include/functions.h b/include/functions.h index d818802610..d9848124bc 100644 --- a/include/functions.h +++ b/include/functions.h @@ -174,11 +174,11 @@ void ai_enemy_play_sound(Npc* npc, s32 arg1, s32 arg2); s32 player_test_move_without_slipping(PlayerStatus*, f32*, f32*, f32*, s32, f32, s32*); -s32 get_variable(ScriptInstance* script, Bytecode var); -s32 set_variable(ScriptInstance* script, Bytecode var, s32 value); -f32 get_float_variable(ScriptInstance* script, Bytecode var); -f32 set_float_variable(ScriptInstance* script, Bytecode var, f32 value); -void set_script_timescale(ScriptInstance* script, f32 timescale); +s32 get_variable(Evt* script, Bytecode var); +s32 set_variable(Evt* script, Bytecode var, s32 value); +f32 get_float_variable(Evt* script, Bytecode var); +f32 set_float_variable(Evt* script, Bytecode var, f32 value); +void set_script_timescale(Evt* script, f32 timescale); f32 sin_deg(f32 x); f32 cos_deg(f32 x); f32 sin_rad(f32 x); @@ -249,9 +249,9 @@ void set_background_color_blend(u8 r, u8 g, u8 b, u8 a); void partner_set_tether_distance(f32); s32 does_script_exist(s32 id); -s32 does_script_exist_by_ref(ScriptInstance* script); -ScriptInstance* start_script(Script* source, s32 priority, s32 initialState); -ScriptInstance* start_script_in_group(Script* source, u8 priority, u8 initialState, u8 groupFlags); +s32 does_script_exist_by_ref(Evt* script); +Evt* start_script(EvtSource* source, s32 priority, s32 initialState); +Evt* start_script_in_group(EvtSource* source, u8 priority, u8 initialState, u8 groupFlags); f32 get_player_normal_yaw(void); void set_standard_shadow_scale(Shadow* shadow, f32 scale); void set_peach_shadow_scale(Shadow* shadow, f32 scale); @@ -297,7 +297,7 @@ s32 check_input_hammer(); Npc* get_npc_safe(NpcID npcId); Npc* get_npc_unsafe(NpcID npcId); -Npc* resolve_npc(ScriptInstance* script, NpcID npcIdOrPtr); +Npc* resolve_npc(Evt* script, NpcID npcIdOrPtr); void set_npc_yaw(Npc* npcPtr, f32 angle); void npc_move_heading(Npc* npc, f32 speed, f32 yaw); void disable_npc_blur(Npc* npc); @@ -336,7 +336,7 @@ void create_part_shadow(ActorID actorID, s32 partIndex); void remove_part_shadow(ActorID actorID, s32 partIndex); void create_part_shadow_by_ref(UNK_TYPE arg0, ActorPart* part); // arg0 unused -ScriptInstance* get_script_by_index(s32 index); +Evt* get_script_by_index(s32 index); void set_action_state(s32 actionState); s32 get_collider_type_by_id(s32 colliderID); @@ -346,7 +346,7 @@ void subtract_hp(s32 amt); void open_status_menu_long(void); void suspend_all_group(s32 groupFlags); -void kill_script(ScriptInstance* instanceToKill); +void kill_script(Evt* instanceToKill); void exec_entity_commandlist(Entity* entity); void sfx_reset_door_sounds(void); @@ -439,10 +439,10 @@ Npc* func_8003E534(NpcID npcId); // get_npc_safe void func_80077BD0(s32, s32, s32, s32, s32, s32); void dead_playFX_11(s32, f32, f32, f32, f32); -s32 dead_get_variable(ScriptInstance* script, Bytecode var); -f32 dead_get_float_variable(ScriptInstance* script, Bytecode var); -s32 dead_set_variable(ScriptInstance* script, Bytecode var, s32 value); -f32 dead_set_float_variable(ScriptInstance* script, Bytecode var, f32 value); +s32 dead_get_variable(Evt* script, Bytecode var); +f32 dead_get_float_variable(Evt* script, Bytecode var); +s32 dead_set_variable(Evt* script, Bytecode var, s32 value); +f32 dead_set_float_variable(Evt* script, Bytecode var, f32 value); f32 dead_clamp_angle(f32 theta); s32 dead_rand_int(s32); void func_8006CAC0(float mf[4][4], float x, float y, float z); @@ -457,8 +457,8 @@ f32 phys_get_spin_history(s32 lag, s32* x, s32* y, s32* z); void sfx_get_spatialized_sound_params(f32 arg0, f32 arg1, f32 arg2, s16* arg3, s16* arg4, s32 arg5); void sfx_play_sound_with_params(s32 arg0, u8 arg1, u8 arg2, s16 arg3); s32 func_8004A784(Npc* npc, f32 arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5); -void base_UnkNpcAIFunc1(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); -void DeadUnkNpcAIFunc1(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); +void base_UnkNpcAIFunc1(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); +void DeadUnkNpcAIFunc1(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); s32* spr_get_npc_palettes(u16 arg0); void spr_draw_player_sprite(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4); diff --git a/include/macros.h b/include/macros.h index 3222003d5a..a59bc60241 100644 --- a/include/macros.h +++ b/include/macros.h @@ -65,7 +65,7 @@ //NOTE: SCRIPT_ALLOC is probably not quite correct, but this is the closest thing to matching for the functions its used in. Needs more work. #define SCRIPT_ALLOC(new, index) \ { \ - (*gCurrentScriptListPtr)[index] = new = heap_malloc(sizeof(ScriptInstance)); \ + (*gCurrentScriptListPtr)[index] = new = heap_malloc(sizeof(Evt)); \ gNumScripts++; \ ASSERT(new != NULL); \ } diff --git a/include/map.h b/include/map.h index c3c15e94d8..28167b46eb 100644 --- a/include/map.h +++ b/include/map.h @@ -17,7 +17,7 @@ typedef struct MapConfig { /* 0x04 */ UNK_PTR collision; /* 0x08 */ UNK_PTR unk_08; /* 0x0C */ char unk_0C[4]; - /* 0x10 */ Script* main; + /* 0x10 */ EvtSource* main; /* 0x14 */ EntryList* entryList; /* 0x18 */ s32 entryCount; /* 0x1C */ char unk_1C[12]; @@ -87,11 +87,11 @@ typedef struct NpcSettings { /* 0x04 */ s16 height; /* 0x06 */ s16 radius; /* 0x08 */ UNK_PTR otherAI; - /* 0x0C */ Script* onInteract; - /* 0x10 */ Script* ai; - /* 0x14 */ Script* onHit; - /* 0x18 */ Script* aux; - /* 0x1C */ Script* onDefeat; + /* 0x0C */ EvtSource* onInteract; + /* 0x10 */ EvtSource* ai; + /* 0x14 */ EvtSource* onHit; + /* 0x18 */ EvtSource* aux; + /* 0x1C */ EvtSource* onDefeat; /* 0x20 */ s32 flags; /* 0x24 */ char unk_24[4]; /* 0x28 */ s16 level; @@ -194,7 +194,7 @@ typedef struct StaticNpc { /* 0x004 */ NpcSettings* settings; /* 0x008 */ Vec3f pos; /* 0x014 */ s32 flags; - /* 0x018 */ Script* init; + /* 0x018 */ EvtSource* init; /* 0x01C */ char unk_1C[8]; /* 0x024 */ s32 yaw; /* 0x028 */ s8 dropFlags; // TODO: use EnemyDrops (requires tons of map edits) @@ -265,24 +265,24 @@ typedef struct Enemy { /* 0x10 */ Vec3s unk_10; /* 0x16 */ char unk_16[2]; /* 0x18 */ struct NpcSettings* npcSettings; - /* 0x1C */ Script* initBytecode; - /* 0x20 */ Script* interactBytecode; - /* 0x24 */ Script* aiBytecode; - /* 0x28 */ Script* hitBytecode; - /* 0x2C */ Script* auxBytecode; - /* 0x30 */ Script* defeatBytecode; - /* 0x34 */ struct ScriptInstance* initScript; - /* 0x38 */ struct ScriptInstance* interactScript; - /* 0x3C */ struct ScriptInstance* aiScript; - /* 0x40 */ struct ScriptInstance* hitScript; - /* 0x44 */ struct ScriptInstance* auxScript; - /* 0x48 */ struct ScriptInstance* defeatScript; - /* 0x4C */ ScriptID initScriptID; - /* 0x50 */ ScriptID interactScriptID; - /* 0x54 */ ScriptID aiScriptID; - /* 0x58 */ ScriptID hitScriptID; - /* 0x5C */ ScriptID auxScriptID; - /* 0x60 */ ScriptID defeatScriptID; + /* 0x1C */ EvtSource* initBytecode; + /* 0x20 */ EvtSource* interactBytecode; + /* 0x24 */ EvtSource* aiBytecode; + /* 0x28 */ EvtSource* hitBytecode; + /* 0x2C */ EvtSource* auxBytecode; + /* 0x30 */ EvtSource* defeatBytecode; + /* 0x34 */ struct Evt* initScript; + /* 0x38 */ struct Evt* interactScript; + /* 0x3C */ struct Evt* aiScript; + /* 0x40 */ struct Evt* hitScript; + /* 0x44 */ struct Evt* auxScript; + /* 0x48 */ struct Evt* defeatScript; + /* 0x4C */ s32 initScriptID; + /* 0x50 */ s32 interactScriptID; + /* 0x54 */ s32 aiScriptID; + /* 0x58 */ s32 hitScriptID; + /* 0x5C */ s32 auxScriptID; + /* 0x60 */ s32 defeatScriptID; /* 0x64 */ UNK_PTR unk_64; /* 0x68 */ char unk_68[4]; /* 0x6C */ s32 varTable[16]; @@ -291,8 +291,8 @@ typedef struct Enemy { /* 0xB4 */ s8 unk_B4; /* 0xB5 */ s8 unk_B5; /* 0xB6 */ char unk_B6[2]; - /* 0xB8 */ Script* unk_B8; // some bytecode - /* 0xBC */ struct ScriptInstance* unk_BC; // some script + /* 0xB8 */ EvtSource* unk_B8; // some bytecode + /* 0xBC */ struct Evt* unk_BC; // some script /* 0xC0 */ s32 unk_C0; // some script ID /* 0xC4 */ s32 unk_C4; /* 0xC8 */ s32 unk_C8; diff --git a/include/script_api/battle.h b/include/script_api/battle.h index 366e230ed1..d06c50115e 100644 --- a/include/script_api/battle.h +++ b/include/script_api/battle.h @@ -6,360 +6,360 @@ #include "script_api/common.h" -ApiStatus EnablePartnerBlur(ScriptInstance* script, s32 isInitialCall); -ApiStatus DisablePartnerBlur(ScriptInstance* script, s32 isInitialCall); -ApiStatus UseBattleCamPreset(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetBattleCamTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetBattleCamOffsetZ(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddBattleCamOffsetZ(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetBattleCamYaw(ScriptInstance* script, s32 isInitialCall); -ApiStatus BattleCamTargetActor(ScriptInstance* script, s32 isInitialCall); -ApiStatus MoveBattleCamOver(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetBattleCamZoom(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddBattleCamZoom(ScriptInstance* script, s32 isInitialCall); -ApiStatus FreezeBattleCam(ScriptInstance* script, s32 isInitialCall); -ApiStatus close_action_command_instruction_popup(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowMessageBox(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowVariableMessageBox(ScriptInstance* script, s32 isInitialCall); -ApiStatus IsMessageBoxDisplayed(ScriptInstance* script, s32 isInitialCall); -ApiStatus WaitForMessageBoxDone(ScriptInstance* script, s32 isInitialCall); -ApiStatus ForceCloseMessageBox(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetMessageBoxDuration(ScriptInstance* script, s32 isInitialCall); -ApiStatus ItemDamageEnemy(ScriptInstance* script, s32 isInitialCall); -ApiStatus ItemAfflictEnemy(ScriptInstance* script, s32 isInitialCall); -ApiStatus ItemCheckHit(ScriptInstance* script, s32 isInitialCall); -ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall); -ApiStatus EndActorSpeech(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowBattleChoice(ScriptInstance* script, s32 isInitialCall); -ApiStatus OverrideBattleDmaDest(ScriptInstance* script, s32 isInitialCall); -ApiStatus LoadBattleDmaData(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlaySoundAtActor(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlaySoundAtPart(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetForegroundModelsVisibleUnchecked(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetForegroundModelsVisible(ScriptInstance* script, s32 isInitialCall); -ApiStatus MakeStatusField(ScriptInstance* script, s32 isInitialCall); -ApiStatus MultiplyByActorScale(ScriptInstance* script, s32 isInitialCall); -ApiStatus MultiplyVec2ByActorScale(ScriptInstance* script, s32 isInitialCall); -ApiStatus MultiplyVec3ByActorScale(ScriptInstance* script, s32 isInitialCall); -ApiStatus ApplyShrinkFromOwner(ScriptInstance* script, s32 isInitialCall); -ApiStatus StartRumble(ScriptInstance* script, s32 isInitialCall); -ApiStatus HasMerleeCastsLeft(ScriptInstance* script, s32 isInitialCall); -ApiStatus FXRecoverHP(ScriptInstance* script, s32 isInitialCall); -ApiStatus FXRecoverFP(ScriptInstance* script, s32 isInitialCall); -ApiStatus IncrementPlayerHP(ScriptInstance* script, s32 isInitialCall); -ApiStatus IncrementPlayerFP(ScriptInstance* script, s32 isInitialCall); -ApiStatus create_actor(ScriptInstance* script, s32 isInitialCall); -ApiStatus StartRumbleWithParams(ScriptInstance* script, s32 isInitialCall); -ApiStatus LoadItemScript(ScriptInstance* script, s32 isInitialCall); -ApiStatus LoadFreeItemScript(ScriptInstance* script, s32 isInitialCall); -ApiStatus LoadMoveScript(ScriptInstance* script, s32 isInitialCall); -ApiStatus LoadActionCommand(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActionSuccess(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActionSuccess(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActionSuccessCopy(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetBlockResult(ScriptInstance* script, s32 isInitialCall); -ApiStatus CloseActionCommandInfo(ScriptInstance* script, s32 isInitialCall); -ApiStatus LoadBattleSection(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetBattlePhase(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetLastElement(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetGoalToHome(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetIdleGoalToHome(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetGoalToIndex(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetIndexFromPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetIndexFromHome(ScriptInstance* script, s32 isInitialCall); -ApiStatus CountPlayerTargets(ScriptInstance* script, s32 isInitialCall); -ApiStatus ForceHomePos(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetHomePos(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetGoalToTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartGoalToTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetGoalToFirstTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetGoalPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetIdleGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddGoalPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetGoalPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetIdleGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActorPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartOffset(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetHomePos(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetEnemyTargetOffset(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetAnimation(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetAnimation(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetAnimationRate(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorYaw(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActorYaw(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartYaw(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartYaw(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorJumpGravity(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorIdleJumpGravity(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorSpeed(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorIdleSpeed(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartJumpGravity(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartMoveSpeed(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetJumpAnimations(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddActorPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorDispOffset(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartDispOffset(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartDispOffset(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddPartDispOffset(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActorVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddActorVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartMovementVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartMovementVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddPartMovementVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorRotation(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorRotationOffset(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActorRotation(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartRotation(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartRotationOffset(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartRotation(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorScale(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorScaleModifier(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActorScale(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartScale(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartScale(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetBattleFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetBattleFlagBits(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetBattleFlags2(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetBattleFlagBits2(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorFlagBits(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActorFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartFlagBits(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartTargetFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartTargetFlagBits(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartTargetFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartEventFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartEventBits(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartEventFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus HPBarToHome(ScriptInstance* script, s32 isInitialCall); -ApiStatus HPBarToCurrent(ScriptInstance* script, s32 isInitialCall); -ApiStatus SummonEnemy(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetOwnerID(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetOwnerID(ScriptInstance* script, s32 isInitialCall); -ApiStatus ActorExists(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetBattleInputMask(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetBattleInputButtons(ScriptInstance* script, s32 isInitialCall); -ApiStatus CheckButtonPress(ScriptInstance* script, s32 isInitialCall); -ApiStatus CheckButtonHeld(ScriptInstance* script, s32 isInitialCall); -ApiStatus CheckButtonDown(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetBattleState(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerCreateTargetList(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnemyCreateTargetList(ScriptInstance* script, s32 isInitialCall); -ApiStatus InitTargetIterator(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetOwnerTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus ChooseNextTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetTargetListLength(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetOwnerTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPlayerActorID(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetDistanceToGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddActorDecoration(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemoveActorDecoration(ScriptInstance* script, s32 isInitialCall); -ApiStatus ModifyActorDecoration(ScriptInstance* script, s32 isInitialCall); -ApiStatus UseIdleAnimation(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetStatusFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemovePlayerBuffs(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartAlpha(ScriptInstance* script, s32 isInitialCall); -ApiStatus CreatePartShadow(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemovePartShadow(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetBattleVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetBattleVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus ResetAllActorSounds(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorSounds(ScriptInstance* script, s32 isInitialCall); -ApiStatus ResetActorSounds(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartSounds(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorType(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowShockEffect(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActorAttackBoost(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActorDefenseBoost(ScriptInstance* script, s32 isInitialCall); -ApiStatus BoostAttack(ScriptInstance* script, s32 isInitialCall); -ApiStatus BoostDefense(ScriptInstance* script, s32 isInitialCall); -ApiStatus VanishActor(ScriptInstance* script, s32 isInitialCall); -ApiStatus ElectrifyActor(ScriptInstance* script, s32 isInitialCall); -ApiStatus HealActor(ScriptInstance* script, s32 isInitialCall); -ApiStatus WaitForBuffDone(ScriptInstance* script, s32 isInitialCall); -ApiStatus CopyBuffs(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetMenuSelection(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerFallToGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerLandJump(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerRunToGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus CancelablePlayerRunToGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPlayerHP(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerDamageEnemy(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerPowerBounceEnemy(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerTestEnemy(ScriptInstance* script, s32 isInitialCall); -ApiStatus DispatchDamagePlayerEvent(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnablePlayerBlur(ScriptInstance* script, s32 isInitialCall); -ApiStatus DidActionSucceed(ScriptInstance* script, s32 isInitialCall); -ApiStatus BindTakeTurn(ScriptInstance* script, s32 isInitialCall); -ApiStatus PauseTakeTurn(ScriptInstance* script, s32 isInitialCall); -ApiStatus ResumeTakeTurn(ScriptInstance* script, s32 isInitialCall); -ApiStatus BindIdle(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableIdleScript(ScriptInstance* script, s32 isInitialCall); -ApiStatus BindHandleEvent(ScriptInstance* script, s32 isInitialCall); -ApiStatus BindNextTurn(ScriptInstance* script, s32 isInitialCall); -ApiStatus JumpToGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus IdleJumpToGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus JumpWithBounce(ScriptInstance* script, s32 isInitialCall); -ApiStatus LandJump(ScriptInstance* script, s32 isInitialCall); -ApiStatus FallToGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus RunToGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus IdleRunToGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus JumpPartTo(ScriptInstance* script, s32 isInitialCall); -ApiStatus FallPartTo(ScriptInstance* script, s32 isInitialCall); -ApiStatus LandJumpPart(ScriptInstance* script, s32 isInitialCall); -ApiStatus RunPartTo(ScriptInstance* script, s32 isInitialCall); -ApiStatus FlyToGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus IdleFlyToGoal(ScriptInstance* script, s32 isInitialCall); -ApiStatus FlyPartTo(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetLastEvent(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetTargetActor(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetEnemyHP(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActorHP(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetEnemyMaxHP(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemoveActor(ScriptInstance* script, s32 isInitialCall); -ApiStatus DropStarPoints(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetDefenseTable(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetStatusTable(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetIdleAnimations(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnemyDamageTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnemyFollowupAfflictTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnemyTestTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus DispatchDamageEvent(ScriptInstance* script, s32 isInitialCall); -ApiStatus DispatchEvent(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetTargetOffset(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableActorBlur(ScriptInstance* script, s32 isInitialCall); -ApiStatus AfflictActor(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetEncounterState(ScriptInstance* script, s32 isInitialCall); -ApiStatus YieldTurn(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetActorSize(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActorSize(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPartSize(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetOriginalActorType(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetCurrentActorType(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetLastDamage(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableActorGlow(ScriptInstance* script, s32 isInitialCall); -ApiStatus WasStatusInflicted(ScriptInstance* script, s32 isInitialCall); -ApiStatus CopyStatusEffects(ScriptInstance* script, s32 isInitialCall); -ApiStatus ClearStatusEffects(ScriptInstance* script, s32 isInitialCall); -ApiStatus MakeOwnerTargetIndex(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActorLevel(ScriptInstance* script, s32 isInitialCall); -ApiStatus PartnerDamageEnemy(ScriptInstance* script, s32 isInitialCall); -ApiStatus PartnerAfflictEnemy(ScriptInstance* script, s32 isInitialCall); -ApiStatus PartnerPowerBounceEnemy(ScriptInstance* script, s32 isInitialCall); -ApiStatus PartnerTestEnemy(ScriptInstance* script, s32 isInitialCall); -ApiStatus DeletePartner(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetDamageIntensity(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddEffectOffset(ScriptInstance* script, s32 isInitialCall); -ApiStatus LoadStarPowerScript(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80248DD0(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80248DE4(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80249804(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024A214(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024A990(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024AFE4(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024B5FC(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024B9A0(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024BDA4(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024C180(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024C570(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024C944(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024CB68(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024E9B0(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024E748(ScriptInstance* script, s32 isInitialCall); -ApiStatus InitVirtualEntityList(ScriptInstance* script, s32 isInitialCall); -ApiStatus InitAnimatedModels(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8024CE9C(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802CABE8(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802CAE50(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802A9000_430020(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802A9120_421B10(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802807D0(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802694A4(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80269524(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80269550(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8026919C(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80280818(ScriptInstance* script, s32 isInitialCall); ///< YieldTurn copy -ApiStatus func_8024ECF8(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_8027D32C(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetActionCommandResult(ScriptInstance* script, s32 isInitialCall); +ApiStatus EnablePartnerBlur(Evt* script, s32 isInitialCall); +ApiStatus DisablePartnerBlur(Evt* script, s32 isInitialCall); +ApiStatus UseBattleCamPreset(Evt* script, s32 isInitialCall); +ApiStatus SetBattleCamTarget(Evt* script, s32 isInitialCall); +ApiStatus SetBattleCamOffsetZ(Evt* script, s32 isInitialCall); +ApiStatus AddBattleCamOffsetZ(Evt* script, s32 isInitialCall); +ApiStatus SetBattleCamYaw(Evt* script, s32 isInitialCall); +ApiStatus BattleCamTargetActor(Evt* script, s32 isInitialCall); +ApiStatus MoveBattleCamOver(Evt* script, s32 isInitialCall); +ApiStatus SetBattleCamZoom(Evt* script, s32 isInitialCall); +ApiStatus AddBattleCamZoom(Evt* script, s32 isInitialCall); +ApiStatus FreezeBattleCam(Evt* script, s32 isInitialCall); +ApiStatus close_action_command_instruction_popup(Evt* script, s32 isInitialCall); +ApiStatus ShowMessageBox(Evt* script, s32 isInitialCall); +ApiStatus ShowVariableMessageBox(Evt* script, s32 isInitialCall); +ApiStatus IsMessageBoxDisplayed(Evt* script, s32 isInitialCall); +ApiStatus WaitForMessageBoxDone(Evt* script, s32 isInitialCall); +ApiStatus ForceCloseMessageBox(Evt* script, s32 isInitialCall); +ApiStatus SetMessageBoxDuration(Evt* script, s32 isInitialCall); +ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall); +ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall); +ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall); +ApiStatus ActorSpeak(Evt* script, s32 isInitialCall); +ApiStatus EndActorSpeech(Evt* script, s32 isInitialCall); +ApiStatus ShowBattleChoice(Evt* script, s32 isInitialCall); +ApiStatus OverrideBattleDmaDest(Evt* script, s32 isInitialCall); +ApiStatus LoadBattleDmaData(Evt* script, s32 isInitialCall); +ApiStatus PlaySoundAtActor(Evt* script, s32 isInitialCall); +ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall); +ApiStatus SetForegroundModelsVisibleUnchecked(Evt* script, s32 isInitialCall); +ApiStatus SetForegroundModelsVisible(Evt* script, s32 isInitialCall); +ApiStatus MakeStatusField(Evt* script, s32 isInitialCall); +ApiStatus MultiplyByActorScale(Evt* script, s32 isInitialCall); +ApiStatus MultiplyVec2ByActorScale(Evt* script, s32 isInitialCall); +ApiStatus MultiplyVec3ByActorScale(Evt* script, s32 isInitialCall); +ApiStatus ApplyShrinkFromOwner(Evt* script, s32 isInitialCall); +ApiStatus StartRumble(Evt* script, s32 isInitialCall); +ApiStatus HasMerleeCastsLeft(Evt* script, s32 isInitialCall); +ApiStatus FXRecoverHP(Evt* script, s32 isInitialCall); +ApiStatus FXRecoverFP(Evt* script, s32 isInitialCall); +ApiStatus IncrementPlayerHP(Evt* script, s32 isInitialCall); +ApiStatus IncrementPlayerFP(Evt* script, s32 isInitialCall); +ApiStatus create_actor(Evt* script, s32 isInitialCall); +ApiStatus StartRumbleWithParams(Evt* script, s32 isInitialCall); +ApiStatus LoadItemScript(Evt* script, s32 isInitialCall); +ApiStatus LoadFreeItemScript(Evt* script, s32 isInitialCall); +ApiStatus LoadMoveScript(Evt* script, s32 isInitialCall); +ApiStatus LoadActionCommand(Evt* script, s32 isInitialCall); +ApiStatus GetActionSuccess(Evt* script, s32 isInitialCall); +ApiStatus SetActionSuccess(Evt* script, s32 isInitialCall); +ApiStatus GetActionSuccessCopy(Evt* script, s32 isInitialCall); +ApiStatus GetBlockResult(Evt* script, s32 isInitialCall); +ApiStatus CloseActionCommandInfo(Evt* script, s32 isInitialCall); +ApiStatus LoadBattleSection(Evt* script, s32 isInitialCall); +ApiStatus GetBattlePhase(Evt* script, s32 isInitialCall); +ApiStatus GetLastElement(Evt* script, s32 isInitialCall); +ApiStatus SetGoalToHome(Evt* script, s32 isInitialCall); +ApiStatus SetIdleGoalToHome(Evt* script, s32 isInitialCall); +ApiStatus SetGoalToIndex(Evt* script, s32 isInitialCall); +ApiStatus GetIndexFromPos(Evt* script, s32 isInitialCall); +ApiStatus GetIndexFromHome(Evt* script, s32 isInitialCall); +ApiStatus CountPlayerTargets(Evt* script, s32 isInitialCall); +ApiStatus ForceHomePos(Evt* script, s32 isInitialCall); +ApiStatus SetHomePos(Evt* script, s32 isInitialCall); +ApiStatus SetGoalToTarget(Evt* script, s32 isInitialCall); +ApiStatus SetPartGoalToTarget(Evt* script, s32 isInitialCall); +ApiStatus SetGoalToFirstTarget(Evt* script, s32 isInitialCall); +ApiStatus SetGoalPos(Evt* script, s32 isInitialCall); +ApiStatus SetIdleGoal(Evt* script, s32 isInitialCall); +ApiStatus AddGoalPos(Evt* script, s32 isInitialCall); +ApiStatus GetGoalPos(Evt* script, s32 isInitialCall); +ApiStatus GetIdleGoal(Evt* script, s32 isInitialCall); +ApiStatus GetPartTarget(Evt* script, s32 isInitialCall); +ApiStatus GetActorPos(Evt* script, s32 isInitialCall); +ApiStatus GetPartOffset(Evt* script, s32 isInitialCall); +ApiStatus GetPartPos(Evt* script, s32 isInitialCall); +ApiStatus GetHomePos(Evt* script, s32 isInitialCall); +ApiStatus SetActorPos(Evt* script, s32 isInitialCall); +ApiStatus SetPartPos(Evt* script, s32 isInitialCall); +ApiStatus SetEnemyTargetOffset(Evt* script, s32 isInitialCall); +ApiStatus SetAnimation(Evt* script, s32 isInitialCall); +ApiStatus GetAnimation(Evt* script, s32 isInitialCall); +ApiStatus SetAnimationRate(Evt* script, s32 isInitialCall); +ApiStatus SetActorYaw(Evt* script, s32 isInitialCall); +ApiStatus GetActorYaw(Evt* script, s32 isInitialCall); +ApiStatus SetPartYaw(Evt* script, s32 isInitialCall); +ApiStatus GetPartYaw(Evt* script, s32 isInitialCall); +ApiStatus SetActorJumpGravity(Evt* script, s32 isInitialCall); +ApiStatus SetActorIdleJumpGravity(Evt* script, s32 isInitialCall); +ApiStatus SetActorSpeed(Evt* script, s32 isInitialCall); +ApiStatus SetActorIdleSpeed(Evt* script, s32 isInitialCall); +ApiStatus SetPartJumpGravity(Evt* script, s32 isInitialCall); +ApiStatus SetPartMoveSpeed(Evt* script, s32 isInitialCall); +ApiStatus SetJumpAnimations(Evt* script, s32 isInitialCall); +ApiStatus AddActorPos(Evt* script, s32 isInitialCall); +ApiStatus SetActorDispOffset(Evt* script, s32 isInitialCall); +ApiStatus GetPartDispOffset(Evt* script, s32 isInitialCall); +ApiStatus SetPartDispOffset(Evt* script, s32 isInitialCall); +ApiStatus AddPartDispOffset(Evt* script, s32 isInitialCall); +ApiStatus GetActorVar(Evt* script, s32 isInitialCall); +ApiStatus SetActorVar(Evt* script, s32 isInitialCall); +ApiStatus AddActorVar(Evt* script, s32 isInitialCall); +ApiStatus GetPartMovementVar(Evt* script, s32 isInitialCall); +ApiStatus SetPartMovementVar(Evt* script, s32 isInitialCall); +ApiStatus AddPartMovementVar(Evt* script, s32 isInitialCall); +ApiStatus SetActorRotation(Evt* script, s32 isInitialCall); +ApiStatus SetActorRotationOffset(Evt* script, s32 isInitialCall); +ApiStatus GetActorRotation(Evt* script, s32 isInitialCall); +ApiStatus SetPartRotation(Evt* script, s32 isInitialCall); +ApiStatus SetPartRotationOffset(Evt* script, s32 isInitialCall); +ApiStatus GetPartRotation(Evt* script, s32 isInitialCall); +ApiStatus SetActorScale(Evt* script, s32 isInitialCall); +ApiStatus SetActorScaleModifier(Evt* script, s32 isInitialCall); +ApiStatus GetActorScale(Evt* script, s32 isInitialCall); +ApiStatus SetPartScale(Evt* script, s32 isInitialCall); +ApiStatus GetPartScale(Evt* script, s32 isInitialCall); +ApiStatus GetBattleFlags(Evt* script, s32 isInitialCall); +ApiStatus SetBattleFlagBits(Evt* script, s32 isInitialCall); +ApiStatus GetBattleFlags2(Evt* script, s32 isInitialCall); +ApiStatus SetBattleFlagBits2(Evt* script, s32 isInitialCall); +ApiStatus SetActorFlags(Evt* script, s32 isInitialCall); +ApiStatus SetActorFlagBits(Evt* script, s32 isInitialCall); +ApiStatus GetActorFlags(Evt* script, s32 isInitialCall); +ApiStatus SetPartFlags(Evt* script, s32 isInitialCall); +ApiStatus SetPartFlagBits(Evt* script, s32 isInitialCall); +ApiStatus SetPartTargetFlags(Evt* script, s32 isInitialCall); +ApiStatus SetPartTargetFlagBits(Evt* script, s32 isInitialCall); +ApiStatus GetPartFlags(Evt* script, s32 isInitialCall); +ApiStatus GetPartTargetFlags(Evt* script, s32 isInitialCall); +ApiStatus SetPartEventFlags(Evt* script, s32 isInitialCall); +ApiStatus SetPartEventBits(Evt* script, s32 isInitialCall); +ApiStatus GetPartEventFlags(Evt* script, s32 isInitialCall); +ApiStatus HPBarToHome(Evt* script, s32 isInitialCall); +ApiStatus HPBarToCurrent(Evt* script, s32 isInitialCall); +ApiStatus SummonEnemy(Evt* script, s32 isInitialCall); +ApiStatus GetOwnerID(Evt* script, s32 isInitialCall); +ApiStatus SetOwnerID(Evt* script, s32 isInitialCall); +ApiStatus ActorExists(Evt* script, s32 isInitialCall); +ApiStatus SetBattleInputMask(Evt* script, s32 isInitialCall); +ApiStatus SetBattleInputButtons(Evt* script, s32 isInitialCall); +ApiStatus CheckButtonPress(Evt* script, s32 isInitialCall); +ApiStatus CheckButtonHeld(Evt* script, s32 isInitialCall); +ApiStatus CheckButtonDown(Evt* script, s32 isInitialCall); +ApiStatus GetBattleState(Evt* script, s32 isInitialCall); +ApiStatus PlayerCreateTargetList(Evt* script, s32 isInitialCall); +ApiStatus EnemyCreateTargetList(Evt* script, s32 isInitialCall); +ApiStatus InitTargetIterator(Evt* script, s32 isInitialCall); +ApiStatus SetOwnerTarget(Evt* script, s32 isInitialCall); +ApiStatus ChooseNextTarget(Evt* script, s32 isInitialCall); +ApiStatus GetTargetListLength(Evt* script, s32 isInitialCall); +ApiStatus GetOwnerTarget(Evt* script, s32 isInitialCall); +ApiStatus GetPlayerActorID(Evt* script, s32 isInitialCall); +ApiStatus GetDistanceToGoal(Evt* script, s32 isInitialCall); +ApiStatus AddActorDecoration(Evt* script, s32 isInitialCall); +ApiStatus RemoveActorDecoration(Evt* script, s32 isInitialCall); +ApiStatus ModifyActorDecoration(Evt* script, s32 isInitialCall); +ApiStatus UseIdleAnimation(Evt* script, s32 isInitialCall); +ApiStatus GetStatusFlags(Evt* script, s32 isInitialCall); +ApiStatus RemovePlayerBuffs(Evt* script, s32 isInitialCall); +ApiStatus SetPartAlpha(Evt* script, s32 isInitialCall); +ApiStatus CreatePartShadow(Evt* script, s32 isInitialCall); +ApiStatus RemovePartShadow(Evt* script, s32 isInitialCall); +ApiStatus SetBattleVar(Evt* script, s32 isInitialCall); +ApiStatus GetBattleVar(Evt* script, s32 isInitialCall); +ApiStatus ResetAllActorSounds(Evt* script, s32 isInitialCall); +ApiStatus SetActorSounds(Evt* script, s32 isInitialCall); +ApiStatus ResetActorSounds(Evt* script, s32 isInitialCall); +ApiStatus SetPartSounds(Evt* script, s32 isInitialCall); +ApiStatus SetActorType(Evt* script, s32 isInitialCall); +ApiStatus ShowShockEffect(Evt* script, s32 isInitialCall); +ApiStatus GetActorAttackBoost(Evt* script, s32 isInitialCall); +ApiStatus GetActorDefenseBoost(Evt* script, s32 isInitialCall); +ApiStatus BoostAttack(Evt* script, s32 isInitialCall); +ApiStatus BoostDefense(Evt* script, s32 isInitialCall); +ApiStatus VanishActor(Evt* script, s32 isInitialCall); +ApiStatus ElectrifyActor(Evt* script, s32 isInitialCall); +ApiStatus HealActor(Evt* script, s32 isInitialCall); +ApiStatus WaitForBuffDone(Evt* script, s32 isInitialCall); +ApiStatus CopyBuffs(Evt* script, s32 isInitialCall); +ApiStatus GetMenuSelection(Evt* script, s32 isInitialCall); +ApiStatus PlayerFallToGoal(Evt* script, s32 isInitialCall); +ApiStatus PlayerLandJump(Evt* script, s32 isInitialCall); +ApiStatus PlayerRunToGoal(Evt* script, s32 isInitialCall); +ApiStatus CancelablePlayerRunToGoal(Evt* script, s32 isInitialCall); +ApiStatus GetPlayerHP(Evt* script, s32 isInitialCall); +ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall); +ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall); +ApiStatus PlayerTestEnemy(Evt* script, s32 isInitialCall); +ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall); +ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall); +ApiStatus DidActionSucceed(Evt* script, s32 isInitialCall); +ApiStatus BindTakeTurn(Evt* script, s32 isInitialCall); +ApiStatus PauseTakeTurn(Evt* script, s32 isInitialCall); +ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall); +ApiStatus BindIdle(Evt* script, s32 isInitialCall); +ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall); +ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall); +ApiStatus BindNextTurn(Evt* script, s32 isInitialCall); +ApiStatus JumpToGoal(Evt* script, s32 isInitialCall); +ApiStatus IdleJumpToGoal(Evt* script, s32 isInitialCall); +ApiStatus JumpWithBounce(Evt* script, s32 isInitialCall); +ApiStatus LandJump(Evt* script, s32 isInitialCall); +ApiStatus FallToGoal(Evt* script, s32 isInitialCall); +ApiStatus RunToGoal(Evt* script, s32 isInitialCall); +ApiStatus IdleRunToGoal(Evt* script, s32 isInitialCall); +ApiStatus JumpPartTo(Evt* script, s32 isInitialCall); +ApiStatus FallPartTo(Evt* script, s32 isInitialCall); +ApiStatus LandJumpPart(Evt* script, s32 isInitialCall); +ApiStatus RunPartTo(Evt* script, s32 isInitialCall); +ApiStatus FlyToGoal(Evt* script, s32 isInitialCall); +ApiStatus IdleFlyToGoal(Evt* script, s32 isInitialCall); +ApiStatus FlyPartTo(Evt* script, s32 isInitialCall); +ApiStatus GetLastEvent(Evt* script, s32 isInitialCall); +ApiStatus SetTargetActor(Evt* script, s32 isInitialCall); +ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall); +ApiStatus GetActorHP(Evt* script, s32 isInitialCall); +ApiStatus GetEnemyMaxHP(Evt* script, s32 isInitialCall); +ApiStatus RemoveActor(Evt* script, s32 isInitialCall); +ApiStatus DropStarPoints(Evt* script, s32 isInitialCall); +ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall); +ApiStatus SetStatusTable(Evt* script, s32 isInitialCall); +ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall); +ApiStatus EnemyDamageTarget(Evt* script, s32 isInitialCall); +ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall); +ApiStatus EnemyTestTarget(Evt* script, s32 isInitialCall); +ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall); +ApiStatus DispatchEvent(Evt* script, s32 isInitialCall); +ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall); +ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall); +ApiStatus AfflictActor(Evt* script, s32 isInitialCall); +ApiStatus GetEncounterState(Evt* script, s32 isInitialCall); +ApiStatus YieldTurn(Evt* script, s32 isInitialCall); +ApiStatus SetActorSize(Evt* script, s32 isInitialCall); +ApiStatus GetActorSize(Evt* script, s32 isInitialCall); +ApiStatus SetPartSize(Evt* script, s32 isInitialCall); +ApiStatus GetOriginalActorType(Evt* script, s32 isInitialCall); +ApiStatus GetCurrentActorType(Evt* script, s32 isInitialCall); +ApiStatus GetLastDamage(Evt* script, s32 isInitialCall); +ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall); +ApiStatus WasStatusInflicted(Evt* script, s32 isInitialCall); +ApiStatus CopyStatusEffects(Evt* script, s32 isInitialCall); +ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall); +ApiStatus MakeOwnerTargetIndex(Evt* script, s32 isInitialCall); +ApiStatus GetActorLevel(Evt* script, s32 isInitialCall); +ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall); +ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall); +ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall); +ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall); +ApiStatus DeletePartner(Evt* script, s32 isInitialCall); +ApiStatus GetDamageIntensity(Evt* script, s32 isInitialCall); +ApiStatus AddEffectOffset(Evt* script, s32 isInitialCall); +ApiStatus LoadStarPowerScript(Evt* script, s32 isInitialCall); +ApiStatus func_80248DD0(Evt* script, s32 isInitialCall); +ApiStatus func_80248DE4(Evt* script, s32 isInitialCall); +ApiStatus func_80249804(Evt* script, s32 isInitialCall); +ApiStatus func_8024A214(Evt* script, s32 isInitialCall); +ApiStatus func_8024A990(Evt* script, s32 isInitialCall); +ApiStatus func_8024AFE4(Evt* script, s32 isInitialCall); +ApiStatus func_8024B5FC(Evt* script, s32 isInitialCall); +ApiStatus func_8024B9A0(Evt* script, s32 isInitialCall); +ApiStatus func_8024BDA4(Evt* script, s32 isInitialCall); +ApiStatus func_8024C180(Evt* script, s32 isInitialCall); +ApiStatus func_8024C570(Evt* script, s32 isInitialCall); +ApiStatus func_8024C944(Evt* script, s32 isInitialCall); +ApiStatus func_8024CB68(Evt* script, s32 isInitialCall); +ApiStatus func_8024E9B0(Evt* script, s32 isInitialCall); +ApiStatus func_8024E748(Evt* script, s32 isInitialCall); +ApiStatus InitVirtualEntityList(Evt* script, s32 isInitialCall); +ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall); +ApiStatus func_8024CE9C(Evt* script, s32 isInitialCall); +ApiStatus func_802CABE8(Evt* script, s32 isInitialCall); +ApiStatus func_802CAE50(Evt* script, s32 isInitialCall); +ApiStatus func_802A9000_430020(Evt* script, s32 isInitialCall); +ApiStatus func_802A9120_421B10(Evt* script, s32 isInitialCall); +ApiStatus func_802807D0(Evt* script, s32 isInitialCall); +ApiStatus func_802694A4(Evt* script, s32 isInitialCall); +ApiStatus func_80269524(Evt* script, s32 isInitialCall); +ApiStatus func_80269550(Evt* script, s32 isInitialCall); +ApiStatus func_8026919C(Evt* script, s32 isInitialCall); +ApiStatus func_80280818(Evt* script, s32 isInitialCall); ///< YieldTurn copy +ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall); +ApiStatus func_8027D32C(Evt* script, s32 isInitialCall); +ApiStatus GetActionCommandResult(Evt* script, s32 isInitialCall); -extern Script PlayerScriptDispatcher; -extern Script PeachScriptDispatcher; -extern Script ExecutePlayerAction; -extern Script ExecutePeachAction; -extern Script HandleEvent_Player; -extern Script BtlPutPartnerAway; -extern Script BtlBringPartnerOut; -extern Script MarioEnterStage; -extern Script PeachEnterStage; -extern Script PlayerFirstStrike; -extern Script StartDefend; -extern Script RunAwayStart; -extern Script RunAwayFail; -extern Script RunAwayReset; -extern Script PlayEatFX; -extern Script PlayDrinkFX; -extern Script UseLifeShroom; -extern Script MerleeRunOut; -extern Script MerleeAttackBonus; -extern Script MerleeDefenseBonus; -extern Script MerleeExpBonus; -extern Script PlayerHappy; -extern Script DoDizzyAttack; -extern Script RegainAbility; -extern Script UseMystery; -extern Script DoSleepHit; -extern Script DoDizzyHit; -extern Script DoParalyzeHit; -extern Script DoPoisonHit; -extern Script DoStopHit; -extern Script DoFreezeHit; -extern Script DoShrinkHit; -extern Script ForceNextTarget; -extern Script DoNormalHit; -extern Script DoBurnHit; -extern Script DoShockHit; -extern Script DoImmune; -extern Script DoDeath; -extern Script Collapse; -extern Script DoScareAway; -extern Script DoSpinSmashHit; -extern Script DoJumpBack; -extern Script DoReturnHome; -extern Script DoRecover; -extern Script DoAirLift; -extern Script DoBlowAway; -extern Script Rumble_1; -extern Script Rumble_2; -extern Script Rumble_3; -extern Script Rumble_4; -extern Script Rumble_5; -extern Script Rumble_6; -extern Script Rumble_7; -extern Script Rumble_Unused_1; -extern Script Rumble_Unused_2; -extern Script Rumble_Unused_3; -extern Script Rumble_Unused_4; -extern Script CamPreset_A; -extern Script CamPreset_B; -extern Script CamPreset_C; -extern Script CamPreset_D; -extern Script CamPreset_E; -extern Script CamPreset_F; -extern Script CamPreset_G; -extern Script CamPreset_H; -extern Script CamPreset_I; -extern Script CamPreset_J; -extern Script CamPreset_K; -extern Script CamPreset_L; -extern Script CamPreset_M; -extern Script CamPreset_N; +extern EvtSource PlayerScriptDispatcher; +extern EvtSource PeachScriptDispatcher; +extern EvtSource ExecutePlayerAction; +extern EvtSource ExecutePeachAction; +extern EvtSource HandleEvent_Player; +extern EvtSource BtlPutPartnerAway; +extern EvtSource BtlBringPartnerOut; +extern EvtSource MarioEnterStage; +extern EvtSource PeachEnterStage; +extern EvtSource PlayerFirstStrike; +extern EvtSource StartDefend; +extern EvtSource RunAwayStart; +extern EvtSource RunAwayFail; +extern EvtSource RunAwayReset; +extern EvtSource PlayEatFX; +extern EvtSource PlayDrinkFX; +extern EvtSource UseLifeShroom; +extern EvtSource MerleeRunOut; +extern EvtSource MerleeAttackBonus; +extern EvtSource MerleeDefenseBonus; +extern EvtSource MerleeExpBonus; +extern EvtSource PlayerHappy; +extern EvtSource DoDizzyAttack; +extern EvtSource RegainAbility; +extern EvtSource UseMystery; +extern EvtSource DoSleepHit; +extern EvtSource DoDizzyHit; +extern EvtSource DoParalyzeHit; +extern EvtSource DoPoisonHit; +extern EvtSource DoStopHit; +extern EvtSource DoFreezeHit; +extern EvtSource DoShrinkHit; +extern EvtSource ForceNextTarget; +extern EvtSource DoNormalHit; +extern EvtSource DoBurnHit; +extern EvtSource DoShockHit; +extern EvtSource DoImmune; +extern EvtSource DoDeath; +extern EvtSource Collapse; +extern EvtSource DoScareAway; +extern EvtSource DoSpinSmashHit; +extern EvtSource DoJumpBack; +extern EvtSource DoReturnHome; +extern EvtSource DoRecover; +extern EvtSource DoAirLift; +extern EvtSource DoBlowAway; +extern EvtSource Rumble_1; +extern EvtSource Rumble_2; +extern EvtSource Rumble_3; +extern EvtSource Rumble_4; +extern EvtSource Rumble_5; +extern EvtSource Rumble_6; +extern EvtSource Rumble_7; +extern EvtSource Rumble_Unused_1; +extern EvtSource Rumble_Unused_2; +extern EvtSource Rumble_Unused_3; +extern EvtSource Rumble_Unused_4; +extern EvtSource CamPreset_A; +extern EvtSource CamPreset_B; +extern EvtSource CamPreset_C; +extern EvtSource CamPreset_D; +extern EvtSource CamPreset_E; +extern EvtSource CamPreset_F; +extern EvtSource CamPreset_G; +extern EvtSource CamPreset_H; +extern EvtSource CamPreset_I; +extern EvtSource CamPreset_J; +extern EvtSource CamPreset_K; +extern EvtSource CamPreset_L; +extern EvtSource CamPreset_M; +extern EvtSource CamPreset_N; #endif diff --git a/include/script_api/common.h b/include/script_api/common.h index 11171b32dd..b2de50935c 100644 --- a/include/script_api/common.h +++ b/include/script_api/common.h @@ -4,305 +4,305 @@ #include "common_structs.h" #include "si.h" -ApiStatus FadeBackgroundToBlack(ScriptInstance* script, s32 isInitialCall); -ApiStatus UnfadeBackgroundFromBlack(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetCamLookAtObjVector(ScriptInstance* script, s32 isInitialCall); -ApiStatus HasMerleeCasts(ScriptInstance* script, s32 isInitialCall); -ApiStatus OnDefeatEnemy(ScriptInstance* script, s32 isInitialCall); -ApiStatus OnFleeBattleDrops(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetEncounterStatusFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus LoadDemoBattle(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemoveNpc(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemoveEncounter(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetBattleOutcome(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetOwnerEncounterTrigger(ScriptInstance* script, s32 isInitialCall); -ApiStatus DoNpcDefeat(ScriptInstance* script, s32 isInitialCall); -ApiStatus StartBattle(ScriptInstance* script, s32 isInitialCall); -ApiStatus StartBattleWith(ScriptInstance* script, s32 isInitialCall); -ApiStatus StartBossBattle(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetBattleMusic(ScriptInstance* script, s32 isInitialCall); -ApiStatus BindNpcAI(ScriptInstance* script, s32 isInitialCall); -ApiStatus BindNpcIdle(ScriptInstance* script, s32 isInitialCall); -ApiStatus RestartNpcAI(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableNpcAI(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcAux(ScriptInstance* script, s32 isInitialCall); -ApiStatus BindNpcAux(ScriptInstance* script, s32 isInitialCall); -ApiStatus RestartNpcAux(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableNpcAux(ScriptInstance* script, s32 isInitialCall); -ApiStatus BindNpcInteract(ScriptInstance* script, s32 isInitialCall); -ApiStatus BindNpcHit(ScriptInstance* script, s32 isInitialCall); -ApiStatus BindNpcDefeat(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetSelfVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetSelfVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetNpcVar(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetSelfRotation(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetSelfEnemyFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetSelfEnemyFlagBits(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetSelfNpcID(ScriptInstance* script, s32 isInitialCall); -ApiStatus ClearDefeatedEnemies(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetEnemyFlagBits(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetSelfAnimationFromTable(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowCoinCounter(ScriptInstance* script, s32 isInitialCall); -ApiStatus MakeEntity(ScriptInstance* script, s32 isInitialCall); -ApiStatus AssignScript(ScriptInstance* script, s32 isInitialCall); -ApiStatus AssignAreaFlag(ScriptInstance* script, s32 isInitialCall); -ApiStatus AssignFlag(ScriptInstance* script, s32 isInitialCall); -ApiStatus AssignBlockFlag(ScriptInstance* script, s32 isInitialCall); -ApiStatus AssignPanelFlag(ScriptInstance* script, s32 isInitialCall); -ApiStatus AssignCrateFlag(ScriptInstance* script, s32 isInitialCall); -ApiStatus DeleteTrigger(ScriptInstance* script, s32 isInitialCall); -ApiStatus TranslateModel(ScriptInstance* script, s32 isInitialCall); -ApiStatus RotateModel(ScriptInstance* script, s32 isInitialCall); -ApiStatus ScaleModel(ScriptInstance* script, s32 isInitialCall); -ApiStatus CloneModel(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetModelIndex(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetModelCenter(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetTexPanner(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCustomGfxEnabled(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableTexPanning(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableModel(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetGroupEnabled(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetTexPanOffset(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetModelFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus TranslateGroup(ScriptInstance* script, s32 isInitialCall); -ApiStatus RotateGroup(ScriptInstance* script, s32 isInitialCall); -ApiStatus ScaleGroup(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableGroup(ScriptInstance* script, s32 isInitialCall); -ApiStatus ModifyColliderFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetColliderCenter(ScriptInstance* script, s32 isInitialCall); -ApiStatus ParentColliderToModel(ScriptInstance* script, s32 isInitialCall); -ApiStatus UpdateColliderTransform(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetZoneEnabled(ScriptInstance* script, s32 isInitialCall); -ApiStatus GotoMap(ScriptInstance* script, s32 isInitialCall); -ApiStatus GotoMapSpecial(ScriptInstance* script, s32 isInitialCall); -ApiStatus GotoMapByID(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetEntryID(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetMapID(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetLoadType(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetRenderMode(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlaySoundAtModel(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlaySoundAtCollider(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamEnabled(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamFlag80(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamPerspective(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamViewport(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamBGColor(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShakeCam(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamLeadPlayer(ScriptInstance* script, s32 isInitialCall); -ApiStatus PanToTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus UseSettingsFrom(ScriptInstance* script, s32 isInitialCall); -ApiStatus LoadSettings(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamType(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamPitch(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamDistance(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamPosA(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamPosB(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamPosC(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPanTarget(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamSpeed(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetCamType(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetCamPitch(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetCamDistance(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetCamPosA(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetCamPosB(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetCamPosC(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetCamPosition(ScriptInstance* script, s32 isInitialCall); -ApiStatus WaitForCam(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCamProperties(ScriptInstance* script, s32 isInitialCall); -ApiStatus AdjustCam(ScriptInstance* script, s32 isInitialCall); -ApiStatus ResetCam(ScriptInstance* script, s32 isInitialCall); -ApiStatus LoadAnimatedModel(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayModelAnimation(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetAnimatedModelRootPosition(ScriptInstance* script, s32 isInitialCall); -ApiStatus ChangeModelAnimation(ScriptInstance* script, s32 isInitialCall); -ApiStatus DeleteNpc(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcRotation(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcScale(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcCollisionSize(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcSpeed(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcJumpscale(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcAnimation(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetNpcAnimation(ScriptInstance* script, s32 isInitialCall); -ApiStatus NpcMoveTo(ScriptInstance* script, s32 isInitialCall); -ApiStatus NpcJump0(ScriptInstance* script, s32 isInitialCall); -ApiStatus NpcJump1(ScriptInstance* script, s32 isInitialCall); -ApiStatus NpcFlyTo(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetNpcYaw(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcYaw(ScriptInstance* script, s32 isInitialCall); -ApiStatus InterpNpcYaw(ScriptInstance* script, s32 isInitialCall); -ApiStatus NpcFacePlayer(ScriptInstance* script, s32 isInitialCall); -ApiStatus NpcFaceNpc(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcFlagBits(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetNpcPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableNpcShadow(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableNpcBlur(ScriptInstance* script, s32 isInitialCall); -ApiStatus ClearPartnerMoveHistory(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPartnerPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus DisablePartnerAI(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnablePartnerAI(ScriptInstance* script, s32 isInitialCall); -ApiStatus BringPartnerOut(ScriptInstance* script, s32 isInitialCall); -ApiStatus PutPartnerAway(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetCurrentPartnerID(ScriptInstance* script, s32 isInitialCall); -ApiStatus IsCurrentPartnerFlying(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcDecoration(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall); -ApiStatus SpeakToPlayer(ScriptInstance* script, s32 isInitialCall); -ApiStatus EndSpeech(ScriptInstance* script, s32 isInitialCall); -ApiStatus ContinueSpeech(ScriptInstance* script, s32 isInitialCall); -ApiStatus SpeakToNpc(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowMessageAtScreenPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowMessageAtWorldPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus CloseMessage(ScriptInstance* script, s32 isInitialCall); -ApiStatus SwitchMessage(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowChoice(ScriptInstance* script, s32 isInitialCall); -ApiStatus CloseChoice(ScriptInstance* script, s32 isInitialCall); -ApiStatus CancelMessage(ScriptInstance* script, s32 isInitialCall); +ApiStatus FadeBackgroundToBlack(Evt* script, s32 isInitialCall); +ApiStatus UnfadeBackgroundFromBlack(Evt* script, s32 isInitialCall); +ApiStatus GetCamLookAtObjVector(Evt* script, s32 isInitialCall); +ApiStatus HasMerleeCasts(Evt* script, s32 isInitialCall); +ApiStatus OnDefeatEnemy(Evt* script, s32 isInitialCall); +ApiStatus OnFleeBattleDrops(Evt* script, s32 isInitialCall); +ApiStatus SetEncounterStatusFlags(Evt* script, s32 isInitialCall); +ApiStatus LoadDemoBattle(Evt* script, s32 isInitialCall); +ApiStatus RemoveNpc(Evt* script, s32 isInitialCall); +ApiStatus RemoveEncounter(Evt* script, s32 isInitialCall); +ApiStatus GetBattleOutcome(Evt* script, s32 isInitialCall); +ApiStatus GetOwnerEncounterTrigger(Evt* script, s32 isInitialCall); +ApiStatus DoNpcDefeat(Evt* script, s32 isInitialCall); +ApiStatus StartBattle(Evt* script, s32 isInitialCall); +ApiStatus StartBattleWith(Evt* script, s32 isInitialCall); +ApiStatus StartBossBattle(Evt* script, s32 isInitialCall); +ApiStatus SetBattleMusic(Evt* script, s32 isInitialCall); +ApiStatus BindNpcAI(Evt* script, s32 isInitialCall); +ApiStatus BindNpcIdle(Evt* script, s32 isInitialCall); +ApiStatus RestartNpcAI(Evt* script, s32 isInitialCall); +ApiStatus EnableNpcAI(Evt* script, s32 isInitialCall); +ApiStatus SetNpcAux(Evt* script, s32 isInitialCall); +ApiStatus BindNpcAux(Evt* script, s32 isInitialCall); +ApiStatus RestartNpcAux(Evt* script, s32 isInitialCall); +ApiStatus EnableNpcAux(Evt* script, s32 isInitialCall); +ApiStatus BindNpcInteract(Evt* script, s32 isInitialCall); +ApiStatus BindNpcHit(Evt* script, s32 isInitialCall); +ApiStatus BindNpcDefeat(Evt* script, s32 isInitialCall); +ApiStatus SetSelfVar(Evt* script, s32 isInitialCall); +ApiStatus GetSelfVar(Evt* script, s32 isInitialCall); +ApiStatus SetNpcVar(Evt* script, s32 isInitialCall); +ApiStatus GetNpcVar(Evt* script, s32 isInitialCall); +ApiStatus SetSelfRotation(Evt* script, s32 isInitialCall); +ApiStatus SetSelfEnemyFlags(Evt* script, s32 isInitialCall); +ApiStatus SetSelfEnemyFlagBits(Evt* script, s32 isInitialCall); +ApiStatus GetSelfNpcID(Evt* script, s32 isInitialCall); +ApiStatus ClearDefeatedEnemies(Evt* script, s32 isInitialCall); +ApiStatus SetEnemyFlagBits(Evt* script, s32 isInitialCall); +ApiStatus GetSelfAnimationFromTable(Evt* script, s32 isInitialCall); +ApiStatus ShowCoinCounter(Evt* script, s32 isInitialCall); +ApiStatus MakeEntity(Evt* script, s32 isInitialCall); +ApiStatus AssignScript(Evt* script, s32 isInitialCall); +ApiStatus AssignAreaFlag(Evt* script, s32 isInitialCall); +ApiStatus AssignFlag(Evt* script, s32 isInitialCall); +ApiStatus AssignBlockFlag(Evt* script, s32 isInitialCall); +ApiStatus AssignPanelFlag(Evt* script, s32 isInitialCall); +ApiStatus AssignCrateFlag(Evt* script, s32 isInitialCall); +ApiStatus DeleteTrigger(Evt* script, s32 isInitialCall); +ApiStatus TranslateModel(Evt* script, s32 isInitialCall); +ApiStatus RotateModel(Evt* script, s32 isInitialCall); +ApiStatus ScaleModel(Evt* script, s32 isInitialCall); +ApiStatus CloneModel(Evt* script, s32 isInitialCall); +ApiStatus GetModelIndex(Evt* script, s32 isInitialCall); +ApiStatus GetModelCenter(Evt* script, s32 isInitialCall); +ApiStatus SetTexPanner(Evt* script, s32 isInitialCall); +ApiStatus SetCustomGfxEnabled(Evt* script, s32 isInitialCall); +ApiStatus EnableTexPanning(Evt* script, s32 isInitialCall); +ApiStatus EnableModel(Evt* script, s32 isInitialCall); +ApiStatus SetGroupEnabled(Evt* script, s32 isInitialCall); +ApiStatus SetTexPanOffset(Evt* script, s32 isInitialCall); +ApiStatus SetModelFlags(Evt* script, s32 isInitialCall); +ApiStatus TranslateGroup(Evt* script, s32 isInitialCall); +ApiStatus RotateGroup(Evt* script, s32 isInitialCall); +ApiStatus ScaleGroup(Evt* script, s32 isInitialCall); +ApiStatus EnableGroup(Evt* script, s32 isInitialCall); +ApiStatus ModifyColliderFlags(Evt* script, s32 isInitialCall); +ApiStatus GetColliderCenter(Evt* script, s32 isInitialCall); +ApiStatus ParentColliderToModel(Evt* script, s32 isInitialCall); +ApiStatus UpdateColliderTransform(Evt* script, s32 isInitialCall); +ApiStatus SetZoneEnabled(Evt* script, s32 isInitialCall); +ApiStatus GotoMap(Evt* script, s32 isInitialCall); +ApiStatus GotoMapSpecial(Evt* script, s32 isInitialCall); +ApiStatus GotoMapByID(Evt* script, s32 isInitialCall); +ApiStatus GetEntryID(Evt* script, s32 isInitialCall); +ApiStatus GetMapID(Evt* script, s32 isInitialCall); +ApiStatus GetLoadType(Evt* script, s32 isInitialCall); +ApiStatus SetRenderMode(Evt* script, s32 isInitialCall); +ApiStatus PlaySoundAtModel(Evt* script, s32 isInitialCall); +ApiStatus PlaySoundAtCollider(Evt* script, s32 isInitialCall); +ApiStatus SetCamEnabled(Evt* script, s32 isInitialCall); +ApiStatus SetCamFlag80(Evt* script, s32 isInitialCall); +ApiStatus SetCamPerspective(Evt* script, s32 isInitialCall); +ApiStatus SetCamViewport(Evt* script, s32 isInitialCall); +ApiStatus SetCamBGColor(Evt* script, s32 isInitialCall); +ApiStatus SetCamTarget(Evt* script, s32 isInitialCall); +ApiStatus ShakeCam(Evt* script, s32 isInitialCall); +ApiStatus SetCamLeadPlayer(Evt* script, s32 isInitialCall); +ApiStatus PanToTarget(Evt* script, s32 isInitialCall); +ApiStatus UseSettingsFrom(Evt* script, s32 isInitialCall); +ApiStatus LoadSettings(Evt* script, s32 isInitialCall); +ApiStatus SetCamType(Evt* script, s32 isInitialCall); +ApiStatus SetCamPitch(Evt* script, s32 isInitialCall); +ApiStatus SetCamDistance(Evt* script, s32 isInitialCall); +ApiStatus SetCamPosA(Evt* script, s32 isInitialCall); +ApiStatus SetCamPosB(Evt* script, s32 isInitialCall); +ApiStatus SetCamPosC(Evt* script, s32 isInitialCall); +ApiStatus SetPanTarget(Evt* script, s32 isInitialCall); +ApiStatus SetCamSpeed(Evt* script, s32 isInitialCall); +ApiStatus GetCamType(Evt* script, s32 isInitialCall); +ApiStatus GetCamPitch(Evt* script, s32 isInitialCall); +ApiStatus GetCamDistance(Evt* script, s32 isInitialCall); +ApiStatus GetCamPosA(Evt* script, s32 isInitialCall); +ApiStatus GetCamPosB(Evt* script, s32 isInitialCall); +ApiStatus GetCamPosC(Evt* script, s32 isInitialCall); +ApiStatus GetCamPosition(Evt* script, s32 isInitialCall); +ApiStatus WaitForCam(Evt* script, s32 isInitialCall); +ApiStatus SetCamProperties(Evt* script, s32 isInitialCall); +ApiStatus AdjustCam(Evt* script, s32 isInitialCall); +ApiStatus ResetCam(Evt* script, s32 isInitialCall); +ApiStatus LoadAnimatedModel(Evt* script, s32 isInitialCall); +ApiStatus PlayModelAnimation(Evt* script, s32 isInitialCall); +ApiStatus SetAnimatedModelRootPosition(Evt* script, s32 isInitialCall); +ApiStatus ChangeModelAnimation(Evt* script, s32 isInitialCall); +ApiStatus DeleteNpc(Evt* script, s32 isInitialCall); +ApiStatus GetNpcPointer(Evt* script, s32 isInitialCall); +ApiStatus SetNpcPos(Evt* script, s32 isInitialCall); +ApiStatus SetNpcRotation(Evt* script, s32 isInitialCall); +ApiStatus SetNpcScale(Evt* script, s32 isInitialCall); +ApiStatus SetNpcCollisionSize(Evt* script, s32 isInitialCall); +ApiStatus SetNpcSpeed(Evt* script, s32 isInitialCall); +ApiStatus SetNpcJumpscale(Evt* script, s32 isInitialCall); +ApiStatus SetNpcAnimation(Evt* script, s32 isInitialCall); +ApiStatus GetNpcAnimation(Evt* script, s32 isInitialCall); +ApiStatus NpcMoveTo(Evt* script, s32 isInitialCall); +ApiStatus NpcJump0(Evt* script, s32 isInitialCall); +ApiStatus NpcJump1(Evt* script, s32 isInitialCall); +ApiStatus NpcFlyTo(Evt* script, s32 isInitialCall); +ApiStatus GetNpcYaw(Evt* script, s32 isInitialCall); +ApiStatus SetNpcYaw(Evt* script, s32 isInitialCall); +ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall); +ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall); +ApiStatus NpcFaceNpc(Evt* script, s32 isInitialCall); +ApiStatus SetNpcFlagBits(Evt* script, s32 isInitialCall); +ApiStatus GetNpcPos(Evt* script, s32 isInitialCall); +ApiStatus EnableNpcShadow(Evt* script, s32 isInitialCall); +ApiStatus EnableNpcBlur(Evt* script, s32 isInitialCall); +ApiStatus ClearPartnerMoveHistory(Evt* script, s32 isInitialCall); +ApiStatus GetPartnerPos(Evt* script, s32 isInitialCall); +ApiStatus DisablePartnerAI(Evt* script, s32 isInitialCall); +ApiStatus EnablePartnerAI(Evt* script, s32 isInitialCall); +ApiStatus BringPartnerOut(Evt* script, s32 isInitialCall); +ApiStatus PutPartnerAway(Evt* script, s32 isInitialCall); +ApiStatus GetCurrentPartnerID(Evt* script, s32 isInitialCall); +ApiStatus IsCurrentPartnerFlying(Evt* script, s32 isInitialCall); +ApiStatus SetNpcDecoration(Evt* script, s32 isInitialCall); +ApiStatus PlaySoundAtNpc(Evt* script, s32 isInitialCall); +ApiStatus SpeakToPlayer(Evt* script, s32 isInitialCall); +ApiStatus EndSpeech(Evt* script, s32 isInitialCall); +ApiStatus ContinueSpeech(Evt* script, s32 isInitialCall); +ApiStatus SpeakToNpc(Evt* script, s32 isInitialCall); +ApiStatus ShowMessageAtScreenPos(Evt* script, s32 isInitialCall); +ApiStatus ShowMessageAtWorldPos(Evt* script, s32 isInitialCall); +ApiStatus CloseMessage(Evt* script, s32 isInitialCall); +ApiStatus SwitchMessage(Evt* script, s32 isInitialCall); +ApiStatus ShowChoice(Evt* script, s32 isInitialCall); +ApiStatus CloseChoice(Evt* script, s32 isInitialCall); +ApiStatus CancelMessage(Evt* script, s32 isInitialCall); ApiStatus CancelMessageAndBlock(); // ??? -ApiStatus SetMessageImages(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetMessageString(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetMessageValue(ScriptInstance* script, s32 isInitialCall); -ApiStatus HidePlayerShadow(ScriptInstance* script, s32 isInitialCall); -ApiStatus DisablePlayerPhysics(ScriptInstance* script, s32 isInitialCall); -ApiStatus DisablePlayerInput(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPlayerPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPlayerCollisionSize(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPlayerSpeed(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPlayerJumpscale(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPlayerAnimation(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPlayerActionState(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerMoveTo(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerJump(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerJump1(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerJump2(ScriptInstance* script, s32 isInitialCall); -ApiStatus InterpPlayerYaw(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayerFaceNpc(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPlayerTargetYaw(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPlayerFlagBits(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPlayerActionState(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPlayerPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPlayerAnimation(ScriptInstance* script, s32 isInitialCall); -ApiStatus FullyRestoreHPandFP(ScriptInstance* script, s32 isInitialCall); -ApiStatus FullyRestoreSP(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnablePartner(ScriptInstance* script, s32 isInitialCall); -ApiStatus DisablePartner(ScriptInstance* script, s32 isInitialCall); -ApiStatus UseEntryHeading(ScriptInstance* script, s32 isInitialCall); -ApiStatus UseExitHeading(ScriptInstance* script, s32 isInitialCall); -ApiStatus DisablePulseStone(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetCurrentPartner(ScriptInstance* script, s32 isInitialCall); -ApiStatus Disable8bitMario(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlaySoundAtPlayer(ScriptInstance* script, s32 isInitialCall); -ApiStatus MakeLerp(ScriptInstance* script, s32 isInitialCall); -ApiStatus UpdateLerp(ScriptInstance* script, s32 isInitialCall); -ApiStatus RandInt(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetAngleBetweenNPCs(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetAngleToNPC(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetAngleToPlayer(ScriptInstance* script, s32 isInitialCall); -ApiStatus AwaitPlayerApproach(ScriptInstance* script, s32 isInitialCall); -ApiStatus IsPlayerWithin(ScriptInstance* script, s32 isInitialCall); -ApiStatus AwaitPlayerLeave(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddVectorPolar(ScriptInstance* script, s32 isInitialCall); -ApiStatus LoadPath(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetNextPathPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetDist2D(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetValueByRef(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetValueByRef(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableStatusMenu(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowStatusMenu(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetGameMode(ScriptInstance* script, s32 isInitialCall); -ApiStatus ClampAngleInt(ScriptInstance* script, s32 isInitialCall); -ApiStatus ClampAngleFloat(ScriptInstance* script, s32 isInitialCall); -ApiStatus FadeOutMusic(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetMusicTrack(ScriptInstance* script, s32 isInitialCall); -ApiStatus FadeInMusic(ScriptInstance* script, s32 isInitialCall); -ApiStatus ClearAmbientSounds(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayAmbientSounds(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlaySound(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlaySoundAt(ScriptInstance* script, s32 isInitialCall); -ApiStatus StopSound(ScriptInstance* script, s32 isInitialCall); -ApiStatus UseDoorSounds(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlaySoundAtF(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemoveKeyItemAt(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemoveItemAt(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddKeyItem(ScriptInstance* script, s32 isInitialCall); -ApiStatus HasKeyItem(ScriptInstance* script, s32 isInitialCall); -ApiStatus FindKeyItem(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddItem(ScriptInstance* script, s32 isInitialCall); -ApiStatus FindItem(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemoveItem(ScriptInstance* script, s32 isInitialCall); -ApiStatus CountFortessKeys(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemoveFortressKeys(ScriptInstance* script, s32 isInitialCall); -ApiStatus MakeItemEntity(ScriptInstance* script, s32 isInitialCall); -ApiStatus DropItemEntity(ScriptInstance* script, s32 isInitialCall); -ApiStatus DropItemEntityB(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemoveItemEntity(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddBadge(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemoveBadge(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetItemPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetItemFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddCoin(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddStarPoints(ScriptInstance* script, s32 isInitialCall); -ApiStatus AddStarPieces(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetItemPower(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowGotItem(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowEmote(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowSleepBubble(ScriptInstance* script, s32 isInitialCall); -ApiStatus RemoveEffect(ScriptInstance* script, s32 isInitialCall); -ApiStatus PlayEffect(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetSpriteShading(ScriptInstance* script, s32 isInitialCall); -ApiStatus EnableSpriteShading(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetDemoState(ScriptInstance* script, s32 isInitialCall); -ApiStatus DemoPressButton(ScriptInstance* script, s32 isInitialCall); -ApiStatus DemoReleaseButton(ScriptInstance* script, s32 isInitialCall); -ApiStatus DemoSetButtons(ScriptInstance* script, s32 isInitialCall); -ApiStatus DemoJoystickRadial(ScriptInstance* script, s32 isInitialCall); -ApiStatus DemoJoystickXY(ScriptInstance* script, s32 isInitialCall); -ApiStatus WaitForPlayerInputEnabled(ScriptInstance* script, s32 isInitialCall); -ApiStatus IsPlayerOnValidFloor(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802CFE2C(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802CFD30(ScriptInstance* script, s32 isInitialCall); -ApiStatus IsStartingConversation(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetTimeFreezeMode(ScriptInstance* script, s32 isInitialCall); -ApiStatus CreateVirtualEntity(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcSprite(ScriptInstance* script, s32 isInitialCall); +ApiStatus SetMessageImages(Evt* script, s32 isInitialCall); +ApiStatus SetMessageString(Evt* script, s32 isInitialCall); +ApiStatus SetMessageValue(Evt* script, s32 isInitialCall); +ApiStatus HidePlayerShadow(Evt* script, s32 isInitialCall); +ApiStatus DisablePlayerPhysics(Evt* script, s32 isInitialCall); +ApiStatus DisablePlayerInput(Evt* script, s32 isInitialCall); +ApiStatus SetPlayerPos(Evt* script, s32 isInitialCall); +ApiStatus SetPlayerCollisionSize(Evt* script, s32 isInitialCall); +ApiStatus SetPlayerSpeed(Evt* script, s32 isInitialCall); +ApiStatus SetPlayerJumpscale(Evt* script, s32 isInitialCall); +ApiStatus SetPlayerAnimation(Evt* script, s32 isInitialCall); +ApiStatus SetPlayerActionState(Evt* script, s32 isInitialCall); +ApiStatus PlayerMoveTo(Evt* script, s32 isInitialCall); +ApiStatus PlayerJump(Evt* script, s32 isInitialCall); +ApiStatus PlayerJump1(Evt* script, s32 isInitialCall); +ApiStatus PlayerJump2(Evt* script, s32 isInitialCall); +ApiStatus InterpPlayerYaw(Evt* script, s32 isInitialCall); +ApiStatus PlayerFaceNpc(Evt* script, s32 isInitialCall); +ApiStatus GetPlayerTargetYaw(Evt* script, s32 isInitialCall); +ApiStatus SetPlayerFlagBits(Evt* script, s32 isInitialCall); +ApiStatus GetPlayerActionState(Evt* script, s32 isInitialCall); +ApiStatus GetPlayerPos(Evt* script, s32 isInitialCall); +ApiStatus GetPlayerAnimation(Evt* script, s32 isInitialCall); +ApiStatus FullyRestoreHPandFP(Evt* script, s32 isInitialCall); +ApiStatus FullyRestoreSP(Evt* script, s32 isInitialCall); +ApiStatus EnablePartner(Evt* script, s32 isInitialCall); +ApiStatus DisablePartner(Evt* script, s32 isInitialCall); +ApiStatus UseEntryHeading(Evt* script, s32 isInitialCall); +ApiStatus UseExitHeading(Evt* script, s32 isInitialCall); +ApiStatus DisablePulseStone(Evt* script, s32 isInitialCall); +ApiStatus GetCurrentPartner(Evt* script, s32 isInitialCall); +ApiStatus Disable8bitMario(Evt* script, s32 isInitialCall); +ApiStatus PlaySoundAtPlayer(Evt* script, s32 isInitialCall); +ApiStatus MakeLerp(Evt* script, s32 isInitialCall); +ApiStatus UpdateLerp(Evt* script, s32 isInitialCall); +ApiStatus RandInt(Evt* script, s32 isInitialCall); +ApiStatus GetAngleBetweenNPCs(Evt* script, s32 isInitialCall); +ApiStatus GetAngleToNPC(Evt* script, s32 isInitialCall); +ApiStatus GetAngleToPlayer(Evt* script, s32 isInitialCall); +ApiStatus AwaitPlayerApproach(Evt* script, s32 isInitialCall); +ApiStatus IsPlayerWithin(Evt* script, s32 isInitialCall); +ApiStatus AwaitPlayerLeave(Evt* script, s32 isInitialCall); +ApiStatus AddVectorPolar(Evt* script, s32 isInitialCall); +ApiStatus LoadPath(Evt* script, s32 isInitialCall); +ApiStatus GetNextPathPos(Evt* script, s32 isInitialCall); +ApiStatus GetDist2D(Evt* script, s32 isInitialCall); +ApiStatus SetValueByRef(Evt* script, s32 isInitialCall); +ApiStatus GetValueByRef(Evt* script, s32 isInitialCall); +ApiStatus EnableStatusMenu(Evt* script, s32 isInitialCall); +ApiStatus ShowStatusMenu(Evt* script, s32 isInitialCall); +ApiStatus SetGameMode(Evt* script, s32 isInitialCall); +ApiStatus ClampAngleInt(Evt* script, s32 isInitialCall); +ApiStatus ClampAngleFloat(Evt* script, s32 isInitialCall); +ApiStatus FadeOutMusic(Evt* script, s32 isInitialCall); +ApiStatus SetMusicTrack(Evt* script, s32 isInitialCall); +ApiStatus FadeInMusic(Evt* script, s32 isInitialCall); +ApiStatus ClearAmbientSounds(Evt* script, s32 isInitialCall); +ApiStatus PlayAmbientSounds(Evt* script, s32 isInitialCall); +ApiStatus PlaySound(Evt* script, s32 isInitialCall); +ApiStatus PlaySoundAt(Evt* script, s32 isInitialCall); +ApiStatus StopSound(Evt* script, s32 isInitialCall); +ApiStatus UseDoorSounds(Evt* script, s32 isInitialCall); +ApiStatus PlaySoundAtF(Evt* script, s32 isInitialCall); +ApiStatus RemoveKeyItemAt(Evt* script, s32 isInitialCall); +ApiStatus RemoveItemAt(Evt* script, s32 isInitialCall); +ApiStatus AddKeyItem(Evt* script, s32 isInitialCall); +ApiStatus HasKeyItem(Evt* script, s32 isInitialCall); +ApiStatus FindKeyItem(Evt* script, s32 isInitialCall); +ApiStatus AddItem(Evt* script, s32 isInitialCall); +ApiStatus FindItem(Evt* script, s32 isInitialCall); +ApiStatus RemoveItem(Evt* script, s32 isInitialCall); +ApiStatus CountFortessKeys(Evt* script, s32 isInitialCall); +ApiStatus RemoveFortressKeys(Evt* script, s32 isInitialCall); +ApiStatus MakeItemEntity(Evt* script, s32 isInitialCall); +ApiStatus DropItemEntity(Evt* script, s32 isInitialCall); +ApiStatus DropItemEntityB(Evt* script, s32 isInitialCall); +ApiStatus RemoveItemEntity(Evt* script, s32 isInitialCall); +ApiStatus AddBadge(Evt* script, s32 isInitialCall); +ApiStatus RemoveBadge(Evt* script, s32 isInitialCall); +ApiStatus SetItemPos(Evt* script, s32 isInitialCall); +ApiStatus SetItemFlags(Evt* script, s32 isInitialCall); +ApiStatus AddCoin(Evt* script, s32 isInitialCall); +ApiStatus AddStarPoints(Evt* script, s32 isInitialCall); +ApiStatus AddStarPieces(Evt* script, s32 isInitialCall); +ApiStatus GetItemPower(Evt* script, s32 isInitialCall); +ApiStatus ShowGotItem(Evt* script, s32 isInitialCall); +ApiStatus ShowEmote(Evt* script, s32 isInitialCall); +ApiStatus ShowSleepBubble(Evt* script, s32 isInitialCall); +ApiStatus RemoveEffect(Evt* script, s32 isInitialCall); +ApiStatus PlayEffect(Evt* script, s32 isInitialCall); +ApiStatus SetSpriteShading(Evt* script, s32 isInitialCall); +ApiStatus EnableSpriteShading(Evt* script, s32 isInitialCall); +ApiStatus GetDemoState(Evt* script, s32 isInitialCall); +ApiStatus DemoPressButton(Evt* script, s32 isInitialCall); +ApiStatus DemoReleaseButton(Evt* script, s32 isInitialCall); +ApiStatus DemoSetButtons(Evt* script, s32 isInitialCall); +ApiStatus DemoJoystickRadial(Evt* script, s32 isInitialCall); +ApiStatus DemoJoystickXY(Evt* script, s32 isInitialCall); +ApiStatus WaitForPlayerInputEnabled(Evt* script, s32 isInitialCall); +ApiStatus IsPlayerOnValidFloor(Evt* script, s32 isInitialCall); +ApiStatus func_802CFE2C(Evt* script, s32 isInitialCall); +ApiStatus func_802CFD30(Evt* script, s32 isInitialCall); +ApiStatus IsStartingConversation(Evt* script, s32 isInitialCall); +ApiStatus SetTimeFreezeMode(Evt* script, s32 isInitialCall); +ApiStatus CreateVirtualEntity(Evt* script, s32 isInitialCall); +ApiStatus SetNpcSprite(Evt* script, s32 isInitialCall); -ApiStatus DeleteVirtualEntity(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetVirtualEntityPosition(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetVirtualEntityScale(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetVirtualEntityRotation(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetVirtualEntityJumpGravity(ScriptInstance* script, s32 isInitialCall); -ApiStatus VirtualEntityJumpTo(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D2884(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D2C14(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowConsumableChoicePopup(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80045900(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowKeyChoicePopup(ScriptInstance* script, s32 isInitialCall); -ApiStatus CloseChoicePopup(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D2B6C(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80045838(ScriptInstance* script, s32 isInitialCall); -ApiStatus ModifyGlobalOverrideFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802CF56C(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802CA988(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802CDE68(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D8248(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D286C(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D2520(ScriptInstance* script, s32 isInitialCall); -ApiStatus PushSong(ScriptInstance* script, s32 isInitialCall); -ApiStatus PopSong(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D62E4(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80044238(ScriptInstance* script, s32 isInitialCall); -ApiStatus MakeLocalVertexCopy(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetCustomGfxBuilders(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetModelCustomGfx(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcPaletteSwapMode(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetNpcPaletteSwapping(ScriptInstance* script, s32 isInitialCall); -ApiStatus MakeTransformGroup(ScriptInstance* script, s32 isInitialCall); +ApiStatus DeleteVirtualEntity(Evt* script, s32 isInitialCall); +ApiStatus SetVirtualEntityPosition(Evt* script, s32 isInitialCall); +ApiStatus SetVirtualEntityScale(Evt* script, s32 isInitialCall); +ApiStatus SetVirtualEntityRotation(Evt* script, s32 isInitialCall); +ApiStatus SetVirtualEntityJumpGravity(Evt* script, s32 isInitialCall); +ApiStatus VirtualEntityJumpTo(Evt* script, s32 isInitialCall); +ApiStatus func_802D2884(Evt* script, s32 isInitialCall); +ApiStatus func_802D2C14(Evt* script, s32 isInitialCall); +ApiStatus func_802D7B10(Evt* script, s32 isInitialCall); +ApiStatus ShowConsumableChoicePopup(Evt* script, s32 isInitialCall); +ApiStatus func_80045900(Evt* script, s32 isInitialCall); +ApiStatus ShowKeyChoicePopup(Evt* script, s32 isInitialCall); +ApiStatus CloseChoicePopup(Evt* script, s32 isInitialCall); +ApiStatus func_802D2B6C(Evt* script, s32 isInitialCall); +ApiStatus func_80045838(Evt* script, s32 isInitialCall); +ApiStatus ModifyGlobalOverrideFlags(Evt* script, s32 isInitialCall); +ApiStatus func_802CF56C(Evt* script, s32 isInitialCall); +ApiStatus func_802CA988(Evt* script, s32 isInitialCall); +ApiStatus func_802CDE68(Evt* script, s32 isInitialCall); +ApiStatus func_802D8248(Evt* script, s32 isInitialCall); +ApiStatus func_802D286C(Evt* script, s32 isInitialCall); +ApiStatus func_802D2520(Evt* script, s32 isInitialCall); +ApiStatus PushSong(Evt* script, s32 isInitialCall); +ApiStatus PopSong(Evt* script, s32 isInitialCall); +ApiStatus func_802D62E4(Evt* script, s32 isInitialCall); +ApiStatus func_80044238(Evt* script, s32 isInitialCall); +ApiStatus MakeLocalVertexCopy(Evt* script, s32 isInitialCall); +ApiStatus SetCustomGfxBuilders(Evt* script, s32 isInitialCall); +ApiStatus SetModelCustomGfx(Evt* script, s32 isInitialCall); +ApiStatus SetNpcPaletteSwapMode(Evt* script, s32 isInitialCall); +ApiStatus SetNpcPaletteSwapping(Evt* script, s32 isInitialCall); +ApiStatus MakeTransformGroup(Evt* script, s32 isInitialCall); -extern Script EnemyNpcHit; -extern Script EnemyNpcDefeat; +extern EvtSource EnemyNpcHit; +extern EvtSource EnemyNpcDefeat; #endif diff --git a/include/script_api/map.h b/include/script_api/map.h index 7dbb3e74d8..3f53f47745 100644 --- a/include/script_api/map.h +++ b/include/script_api/map.h @@ -6,28 +6,28 @@ #include "script_api/common.h" -ApiStatus MakeNpcs(ScriptInstance* script, s32 isInitialCall); -ApiStatus DoBasicAI(ScriptInstance* script, s32 isInitialCall); -ApiStatus ResetFromLava(ScriptInstance* script, s32 isInitialCall); -ApiStatus MakeShop(ScriptInstance* script, s32 isInitialCall); -ApiStatus MakeShopOwner(ScriptInstance* script, s32 isInitialCall); -ApiStatus MakeDoorAdvanced(ScriptInstance* script, s32 isInitialCall); -ApiStatus CheckActionState(ScriptInstance* script, s32 isInitialCall); -ApiStatus CreatePushBlockGrid(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPushBlock(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetPushBlock(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetGridIndexFromPos(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetPushBlockFallEffect(ScriptInstance* script, s32 isInitialCall); -ApiStatus TeleportPartnerToPlayer(ScriptInstance* script, s32 isInitialCall); +ApiStatus MakeNpcs(Evt* script, s32 isInitialCall); +ApiStatus DoBasicAI(Evt* script, s32 isInitialCall); +ApiStatus ResetFromLava(Evt* script, s32 isInitialCall); +ApiStatus MakeShop(Evt* script, s32 isInitialCall); +ApiStatus MakeShopOwner(Evt* script, s32 isInitialCall); +ApiStatus MakeDoorAdvanced(Evt* script, s32 isInitialCall); +ApiStatus CheckActionState(Evt* script, s32 isInitialCall); +ApiStatus CreatePushBlockGrid(Evt* script, s32 isInitialCall); +ApiStatus SetPushBlock(Evt* script, s32 isInitialCall); +ApiStatus GetPushBlock(Evt* script, s32 isInitialCall); +ApiStatus GetGridIndexFromPos(Evt* script, s32 isInitialCall); +ApiStatus SetPushBlockFallEffect(Evt* script, s32 isInitialCall); +ApiStatus TeleportPartnerToPlayer(Evt* script, s32 isInitialCall); -extern Script EnterWalk; -extern Script EnterWalkShort; -extern Script EnterSavePoint; -extern Script ExitWalk; -extern Script ExitSingleDoor; -extern Script EnterSingleDoor; -extern Script ExitDoubleDoor; -extern Script EnterDoubleDoor; +extern EvtSource EnterWalk; +extern EvtSource EnterWalkShort; +extern EvtSource EnterSavePoint; +extern EvtSource ExitWalk; +extern EvtSource ExitSingleDoor; +extern EvtSource EnterSingleDoor; +extern EvtSource ExitDoubleDoor; +extern EvtSource EnterDoubleDoor; #endif diff --git a/include/si.h b/include/si.h index a0bdb7bb97..82e5fffb26 100644 --- a/include/si.h +++ b/include/si.h @@ -3,105 +3,106 @@ #include "ultra64.h" +// Should be at least the width of a pointer i.e. intptr_t typedef s32 Bytecode; -typedef s32 ScriptID; -typedef enum ScriptOpcode { - ScriptOpcode_END = 0x01, - ScriptOpcode_RETURN, - ScriptOpcode_LABEL, ///< Args: index - ScriptOpcode_GOTO, ///< Args: index - ScriptOpcode_LOOP, ///< Args: number of repeats (0 = infinite) - ScriptOpcode_END_LOOP, - ScriptOpcode_BREAK_LOOP, - ScriptOpcode_SLEEP_FRAMES, - ScriptOpcode_SLEEP_SECS, - ScriptOpcode_IF_EQ, ///< Args: a, b - ScriptOpcode_IF_NE, ///< Args: a, b - ScriptOpcode_IF_LT, ///< Args: a, b - ScriptOpcode_IF_GT, ///< Args: a, b - ScriptOpcode_IF_LE, ///< Args: a, b - ScriptOpcode_IF_GE, ///< Args: a, b - ScriptOpcode_IF_FLAG, ///< Args: a, b - ScriptOpcode_IF_NOT_FLAG, ///< Args: a, b - ScriptOpcode_ELSE, - ScriptOpcode_END_IF, - ScriptOpcode_MATCH, ///< Args: expression to test against - ScriptOpcode_MATCH_CONST, ///< Args: value to test against - ScriptOpcode_CASE_EQ, ///< Args: expression to test for - ScriptOpcode_CASE_NE, ///< Args: expression to test for - ScriptOpcode_CASE_LT, ///< Args: expression to test for - ScriptOpcode_CASE_GT, ///< Args: expression to test for - ScriptOpcode_CASE_LE, ///< Args: expression to test for - ScriptOpcode_CASE_GE, ///< Args: expression to test for - ScriptOpcode_CASE_ELSE, - ScriptOpcode_CASE_MULTI_OR_EQ, ///< Args: expression to test for - ScriptOpcode_CASE_MULTI_AND_EQ, ///< Args: expression to test for - ScriptOpcode_CASE_FLAG, ///< Args: expression to test for - ScriptOpcode_END_CASE_MULTI, ///< Ends the case block of ScriptOpcode_CASE_MULTI_OR_EQ condition(s). - ScriptOpcode_CASE_RANGE, ///< Args: from, to - ScriptOpcode_BREAK_MATCH, - ScriptOpcode_END_MATCH, - ScriptOpcode_SET, ///< Args: container, expression - ScriptOpcode_SET_CONST, ///< Args: container, value - ScriptOpcode_SET_F, ///< Args: container, expression - ScriptOpcode_ADD, ///< Args: container, expression to increment by - ScriptOpcode_SUB, ///< Args: container, expression to decrement by - ScriptOpcode_MUL, ///< Args: container, expression to multiply by - ScriptOpcode_DIV, ///< Integer division. Args: container, expression to divide by - ScriptOpcode_MOD, ///< Args: container, expression to divide by - ScriptOpcode_ADD_F, ///< Args: container, expression to increment by - ScriptOpcode_SUB_F, ///< Args: container, expression to decrement by - ScriptOpcode_MUL_F, ///< Args: container, expression to multiply by - ScriptOpcode_DIV_F, ///< Args: container, expression to divide by - ScriptOpcode_USE_BUFFER, ///< Args: s32* - ScriptOpcode_BUFFER_READ_1, /// Args: container - ScriptOpcode_BUFFER_READ_2, /// Args: container, container - ScriptOpcode_BUFFER_READ_3, /// Args: container, container, container - ScriptOpcode_BUFFER_READ_4, /// Args: container, container, container, container - ScriptOpcode_BUFFER_PEEK, ///< Args: index, container - ScriptOpcode_USE_BUFFER_F, ///< Identical to USE_BUFFER. Args: f32* - ScriptOpcode_BUFFER_READ_1_F, /// Args: container - ScriptOpcode_BUFFER_READ_2_F, /// Args: container, container - ScriptOpcode_BUFFER_READ_3_F, /// Args: container, container, container - ScriptOpcode_BUFFER_READ_4_F, /// Args: container, container, container, container - ScriptOpcode_BUFFER_PEEK_F, ///< Args: index, container - ScriptOpcode_USE_ARRAY, ///< Args: *s32 - ScriptOpcode_USE_FLAGS, ///< Args: *s32 - ScriptOpcode_NEW_ARRAY, ///< Allocates a new array. Args: length, s32* - ScriptOpcode_AND, ///< Args: container, expression to bitwise AND with - ScriptOpcode_AND_CONST, ///< Args: container, value to bitwise AND with - ScriptOpcode_OR, ///< Args: container, expression to bitwise OR with - ScriptOpcode_OR_CONST, ///< Args: container, value to bitwise OR with - ScriptOpcode_CALL, ///< Args: *function, ... - ScriptOpcode_SPAWN_SCRIPT, ///< Args: Script* - ScriptOpcode_SPAWN_GET_ID, ///< Args: Script*, container - ScriptOpcode_AWAIT_SCRIPT, ///< Spawns a script and waits for it to return before continuing. Args: Script* - ScriptOpcode_BIND_TRIGGER, ///< Args: Script*, trigger flags, s32 target, 1, Trigger* - ScriptOpcode_UNBIND, ///< Unbinds any triggers bound to this script. - ScriptOpcode_KILL_SCRIPT, ///< Args: ScriptID - ScriptOpcode_JUMP, ///< Args: Script* - ScriptOpcode_SET_PRIORITY, ///< Args: priority - ScriptOpcode_SET_TIMESCALE, ///< Args: timescale - ScriptOpcode_SET_GROUP, ///< Args: group - ScriptOpcode_BIND_PADLOCK, ///< Args: Script*, trigger flags, s32 target, ItemList*, 0, 1 - ScriptOpcode_SUSPEND_GROUP, ///< Args: group - ScriptOpcode_RESUME_GROUP, ///< Args: group - ScriptOpcode_SUSPEND_OTHERS, ///< Args: group - ScriptOpcode_RESUME_OTHERS, ///< Args: group - ScriptOpcode_SUSPEND_SCRIPT, ///< Args: ScriptID - ScriptOpcode_RESUME_SCRIPT, ///< Args: ScriptID - ScriptOpcode_DOES_SCRIPT_EXIST, ///< Args: ScriptID, container - ScriptOpcode_SPAWN_THREAD, - ScriptOpcode_END_SPAWN_THREAD, - ScriptOpcode_PARALLEL_THREAD, ///< Parallel threads are killed as soon as the parent script returns. - ScriptOpcode_END_PARALLEL_THREAD, - ScriptOpcode_90, - ScriptOpcode_DEBUG_PRINT, ///< Args: expression - ScriptOpcode_92, - ScriptOpcode_93, - ScriptOpcode_94, -} ScriptOpcode; +enum { + EVT_OP_INTERNAL_FETCH, + EVT_OP_END, + EVT_OP_RETURN, + EVT_OP_LABEL, ///< Args: index + EVT_OP_GOTO, ///< Args: index + EVT_OP_LOOP, ///< Args: number of repeats (0 = infinite) + EVT_OP_END_LOOP, + EVT_OP_BREAK_LOOP, + EVT_OP_SLEEP_FRAMES, + EVT_OP_SLEEP_SECS, + EVT_OP_IF_EQ, ///< Args: a, b + EVT_OP_IF_NE, ///< Args: a, b + EVT_OP_IF_LT, ///< Args: a, b + EVT_OP_IF_GT, ///< Args: a, b + EVT_OP_IF_LE, ///< Args: a, b + EVT_OP_IF_GE, ///< Args: a, b + EVT_OP_IF_FLAG, ///< Args: a, b + EVT_OP_IF_NOT_FLAG, ///< Args: a, b + EVT_OP_ELSE, + EVT_OP_END_IF, + EVT_OP_MATCH, ///< Args: expression to test against + EVT_OP_MATCH_CONST, ///< Args: value to test against + EVT_OP_CASE_EQ, ///< Args: expression to test for + EVT_OP_CASE_NE, ///< Args: expression to test for + EVT_OP_CASE_LT, ///< Args: expression to test for + EVT_OP_CASE_GT, ///< Args: expression to test for + EVT_OP_CASE_LE, ///< Args: expression to test for + EVT_OP_CASE_GE, ///< Args: expression to test for + EVT_OP_CASE_ELSE, + EVT_OP_CASE_MULTI_OR_EQ, ///< Args: expression to test for + EVT_OP_CASE_MULTI_AND_EQ, ///< Args: expression to test for + EVT_OP_CASE_FLAG, ///< Args: expression to test for + EVT_OP_END_CASE_MULTI, ///< Ends the case block of EVT_OP_CASE_MULTI_OR_EQ condition(s). + EVT_OP_CASE_RANGE, ///< Args: from, to + EVT_OP_BREAK_MATCH, + EVT_OP_END_MATCH, + EVT_OP_SET, ///< Args: container, expression + EVT_OP_SET_CONST, ///< Args: container, value + EVT_OP_SET_F, ///< Args: container, expression + EVT_OP_ADD, ///< Args: container, expression to increment by + EVT_OP_SUB, ///< Args: container, expression to decrement by + EVT_OP_MUL, ///< Args: container, expression to multiply by + EVT_OP_DIV, ///< Integer division. Args: container, expression to divide by + EVT_OP_MOD, ///< Args: container, expression to divide by + EVT_OP_ADD_F, ///< Args: container, expression to increment by + EVT_OP_SUB_F, ///< Args: container, expression to decrement by + EVT_OP_MUL_F, ///< Args: container, expression to multiply by + EVT_OP_DIV_F, ///< Args: container, expression to divide by + EVT_OP_USE_BUFFER, ///< Args: s32* + EVT_OP_BUFFER_READ_1, /// Args: container + EVT_OP_BUFFER_READ_2, /// Args: container, container + EVT_OP_BUFFER_READ_3, /// Args: container, container, container + EVT_OP_BUFFER_READ_4, /// Args: container, container, container, container + EVT_OP_BUFFER_PEEK, ///< Args: index, container + EVT_OP_USE_BUFFER_F, ///< Identical to USE_BUFFER. Args: f32* + EVT_OP_BUFFER_READ_1_F, /// Args: container + EVT_OP_BUFFER_READ_2_F, /// Args: container, container + EVT_OP_BUFFER_READ_3_F, /// Args: container, container, container + EVT_OP_BUFFER_READ_4_F, /// Args: container, container, container, container + EVT_OP_BUFFER_PEEK_F, ///< Args: index, container + EVT_OP_USE_ARRAY, ///< Args: *s32 + EVT_OP_USE_FLAGS, ///< Args: *s32 + EVT_OP_NEW_ARRAY, ///< Allocates a new array. Args: length, s32* + EVT_OP_AND, ///< Args: container, expression to bitwise AND with + EVT_OP_AND_CONST, ///< Args: container, value to bitwise AND with + EVT_OP_OR, ///< Args: container, expression to bitwise OR with + EVT_OP_OR_CONST, ///< Args: container, value to bitwise OR with + EVT_OP_CALL, ///< Args: *function, ... + EVT_OP_SPAWN_SCRIPT, ///< Args: EvtSource* + EVT_OP_SPAWN_GET_ID, ///< Args: EvtSource*, container + EVT_OP_AWAIT_SCRIPT, ///< Spawns a script and waits for it to return before continuing. Args: EvtSource* + EVT_OP_BIND_TRIGGER, ///< Args: EvtSource*, trigger flags, s32 target, 1, Trigger* + EVT_OP_UNBIND, ///< Unbinds any triggers bound to this script. + EVT_OP_KILL_SCRIPT, ///< Args: ScriptID + EVT_OP_JUMP, ///< Args: EvtSource* + EVT_OP_SET_PRIORITY, ///< Args: priority + EVT_OP_SET_TIMESCALE, ///< Args: timescale + EVT_OP_SET_GROUP, ///< Args: group + EVT_OP_BIND_PADLOCK, ///< Args: EvtSource*, trigger flags, s32 target, ItemList*, 0, 1 + EVT_OP_SUSPEND_GROUP, ///< Args: group + EVT_OP_RESUME_GROUP, ///< Args: group + EVT_OP_SUSPEND_OTHERS, ///< Args: group + EVT_OP_RESUME_OTHERS, ///< Args: group + EVT_OP_SUSPEND_SCRIPT, ///< Args: ScriptID + EVT_OP_RESUME_SCRIPT, ///< Args: ScriptID + EVT_OP_DOES_SCRIPT_EXIST, ///< Args: ScriptID, container + EVT_OP_SPAWN_THREAD, + EVT_OP_END_SPAWN_THREAD, + EVT_OP_PARALLEL_THREAD, ///< Parallel threads are killed as soon as the parent script returns. + EVT_OP_END_PARALLEL_THREAD, + EVT_OP_90, + EVT_OP_DEBUG_PRINT, ///< Args: expression + EVT_OP_92, + EVT_OP_93, + EVT_OP_94, +}; #define SI_VAR(v) ((v - 30000000)) #define SI_MAP_VAR(v) ((v - 50000000)) @@ -129,7 +130,7 @@ typedef enum ScriptOpcode { typedef s32 ApiStatus; #define ApiStatus_BLOCK 0 /* Call again next frame */ #define ApiStatus_DONE1 1 /* Unconditional. Probably only exists to return a bool from functions */ -#define ApiStatus_DONE2 2 /* Conditional on ScriptInstance->disableScripts */ +#define ApiStatus_DONE2 2 /* Conditional on Evt->disableScripts */ #define ApiStatus_REPEAT 3 /* Call again immediately */ #define ApiStatus_FINISH 255 /* Corresponds to SI_FINISH */ diff --git a/include/variables.h b/include/variables.h index 00e2ce0848..f951b7627d 100644 --- a/include/variables.h +++ b/include/variables.h @@ -340,9 +340,9 @@ extern UNK_TYPE D_0A000800; extern UNK_TYPE D_0A000808; // Scripts -extern Script* SCRIPT_NpcDefeat; -extern Script ShakeCam1; -extern Script ShakeCamX; +extern EvtSource* SCRIPT_NpcDefeat; +extern EvtSource ShakeCam1; +extern EvtSource ShakeCamX; extern s16 gMusicUnkVolume; extern s16 gMusicUnkVolume2; diff --git a/src/16F740.c b/src/16F740.c index faadec46da..1c4ff01cee 100644 --- a/src/16F740.c +++ b/src/16F740.c @@ -240,7 +240,7 @@ INCLUDE_ASM(s32, "16F740", btl_state_draw_end_battle); void btl_state_update_defend(void) { Actor* player = gBattleStatus.playerActor; - ScriptInstance* script; + Evt* script; switch (gBattleState2) { case 0: @@ -272,12 +272,12 @@ INCLUDE_ASM(s32, "16F740", btl_state_update_defeat); void btl_state_draw_defeat(void) { } -ApiStatus EnablePartnerBlur(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnablePartnerBlur(Evt* script, s32 isInitialCall) { enable_partner_blur(); return ApiStatus_DONE2; } -ApiStatus DisablePartnerBlur(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DisablePartnerBlur(Evt* script, s32 isInitialCall) { disable_partner_blur(); return ApiStatus_DONE2; } diff --git a/src/16c8e0.c b/src/16c8e0.c index 9c5748d8c1..9c283313ed 100644 --- a/src/16c8e0.c +++ b/src/16c8e0.c @@ -22,7 +22,7 @@ extern f32 D_8029EFB0; extern f32 D_8029EFB4; extern f32 D_8029EFB8; -Script BtlPutPartnerAway = SCRIPT({ +EvtSource BtlPutPartnerAway = SCRIPT({ DispatchEvent(ACTOR_PARTNER, 62); parallel { SI_VAR(0) = 1.0; @@ -42,7 +42,7 @@ Script BtlPutPartnerAway = SCRIPT({ DisablePartnerBlur(); }); -Script BtlBringPartnerOut = SCRIPT({ +EvtSource BtlBringPartnerOut = SCRIPT({ parallel { SI_VAR(0) = 0.1005859375; loop 20 { @@ -67,66 +67,66 @@ Script BtlBringPartnerOut = SCRIPT({ s8 D_80280CE0[] = { 0, 0, 0, 0 }; s32 D_80280CE4 = -1; -Script CamPreset_B = SCRIPT({ +EvtSource CamPreset_B = SCRIPT({ func_80248DD0(); }); -Script CamPreset_F = SCRIPT({ +EvtSource CamPreset_F = SCRIPT({ func_80248DE4(); }); -Script CamPreset_M = SCRIPT({ +EvtSource CamPreset_M = SCRIPT({ func_80249804(); }); -Script CamPreset_G = SCRIPT({ +EvtSource CamPreset_G = SCRIPT({ func_8024A214(); }); -Script CamPreset_I = SCRIPT({ +EvtSource CamPreset_I = SCRIPT({ func_8024A990(); }); -Script CamPreset_H = SCRIPT({ +EvtSource CamPreset_H = SCRIPT({ func_8024AFE4(); }); -Script CamPreset_N = SCRIPT({ +EvtSource CamPreset_N = SCRIPT({ func_8024B5FC(); }); -Script CamPreset_C = SCRIPT({ +EvtSource CamPreset_C = SCRIPT({ func_8024B9A0(); }); -Script CamPreset_D = SCRIPT({ +EvtSource CamPreset_D = SCRIPT({ func_8024BDA4(); }); -Script CamPreset_E = SCRIPT({ +EvtSource CamPreset_E = SCRIPT({ func_8024C180(); }); -Script CamPreset_J = SCRIPT({ +EvtSource CamPreset_J = SCRIPT({ func_8024C570(); }); -Script CamPreset_K = SCRIPT({ +EvtSource CamPreset_K = SCRIPT({ func_8024C944(); }); -Script CamPreset_L = SCRIPT({ +EvtSource CamPreset_L = SCRIPT({ func_8024CB68(); }); -Script CamPreset_A = SCRIPT({ +EvtSource CamPreset_A = SCRIPT({ func_8024E9B0(0, 15, 0); func_8024E748(2, 550); func_8024E748(3, 100); func_8024E748(4, 8); }); -Script D_80280EB8 = SCRIPT({ +EvtSource D_80280EB8 = SCRIPT({ SetCamPerspective(CAM_BATTLE, 6, 25, 16, 1024); SetCamViewport(CAM_BATTLE, 12, 20, 296, 200); SetCamBGColor(CAM_BATTLE, 0, 0, 0); diff --git a/src/1776B0.c b/src/1776B0.c index 6d51efbeac..e42a1379ac 100644 --- a/src/1776B0.c +++ b/src/1776B0.c @@ -26,7 +26,7 @@ extern s8 D_8029F2A4; extern s8 D_8029F2A5; extern s8 D_8029F2A6; -ApiStatus func_80248DD0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80248DD0(Evt* script, s32 isInitialCall) { D_8029F29C = 1; return ApiStatus_BLOCK; } @@ -51,7 +51,7 @@ INCLUDE_ASM(s32, "1776B0", func_8024C180); INCLUDE_ASM(s32, "1776B0", func_8024C570); -ApiStatus func_8024C944(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024C944(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[1]; BattleStatus* battleStatus = &gBattleStatus; PlayerStatus* playerStatus = &gPlayerStatus; @@ -119,7 +119,7 @@ ApiStatus func_8024C944(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "1776B0", func_8024CB68); -ApiStatus func_8024CE9C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024CE9C(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[1]; D_8029F284 = 8; @@ -241,7 +241,7 @@ void func_8024E60C(void) { D_8029F2A6 = 0; } -ApiStatus UseBattleCamPreset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus UseBattleCamPreset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 preset; @@ -256,7 +256,7 @@ ApiStatus UseBattleCamPreset(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8024E664(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024E664(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 preset; @@ -271,7 +271,7 @@ ApiStatus func_8024E664(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8024E6B4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024E6B4(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (D_80280CE0 != 0) { @@ -296,7 +296,7 @@ ApiStatus func_8024E6B4(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus func_8024E748(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024E748(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[1]; Bytecode* args = script->ptrReadPos; s32 mode; @@ -338,7 +338,7 @@ ApiStatus func_8024E748(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8024E820(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024E820(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Camera* camera = &gCameras[1]; @@ -358,7 +358,7 @@ ApiStatus func_8024E820(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetBattleCamTarget(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetBattleCamTarget(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (D_80280CE0 != 0) { @@ -371,7 +371,7 @@ ApiStatus SetBattleCamTarget(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8024E9B0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024E9B0(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Camera* camera = &gCameras[1]; @@ -386,7 +386,7 @@ ApiStatus func_8024E9B0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetBattleCamOffsetZ(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetBattleCamOffsetZ(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (D_80280CE0 != 0) { @@ -397,7 +397,7 @@ ApiStatus SetBattleCamOffsetZ(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AddBattleCamOffsetZ(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddBattleCamOffsetZ(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (D_80280CE0 != 0) { @@ -408,7 +408,7 @@ ApiStatus AddBattleCamOffsetZ(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetBattleCamYaw(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetBattleCamYaw(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (D_80280CE0 != 0) { @@ -419,7 +419,7 @@ ApiStatus SetBattleCamYaw(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus BattleCamTargetActor(ScriptInstance* script, s32 isInitialCall) { +ApiStatus BattleCamTargetActor(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID; @@ -438,7 +438,7 @@ ApiStatus BattleCamTargetActor(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8024EB84(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024EB84(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID; @@ -457,7 +457,7 @@ ApiStatus func_8024EB84(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus MoveBattleCamOver(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MoveBattleCamOver(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; @@ -475,7 +475,7 @@ ApiStatus MoveBattleCamOver(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetBattleCamZoom(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetBattleCamZoom(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (D_80280CE0 != 0) { @@ -486,7 +486,7 @@ ApiStatus SetBattleCamZoom(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AddBattleCamZoom(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddBattleCamZoom(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (D_80280CE0 != 0) { @@ -497,7 +497,7 @@ ApiStatus AddBattleCamZoom(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8024ECF8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (D_80280CE0 != 0) { @@ -510,12 +510,12 @@ ApiStatus func_8024ECF8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus FreezeBattleCam(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FreezeBattleCam(Evt* script, s32 isInitialCall) { D_80280CE0 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus func_8024EDA4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024EDA4(Evt* script, s32 isInitialCall) { D_8029F2A6 = 0; return ApiStatus_DONE2; } diff --git a/src/17D6A0.c b/src/17D6A0.c index 21482c9713..f69137230c 100644 --- a/src/17D6A0.c +++ b/src/17D6A0.c @@ -56,7 +56,7 @@ INCLUDE_ASM(s32, "17D6A0", ShowMessageBox); INCLUDE_ASM(s32, "17D6A0", ShowVariableMessageBox); -ApiStatus IsMessageBoxDisplayed(ScriptInstance* script, s32 isInitialCall) { +ApiStatus IsMessageBoxDisplayed(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 outVar = *args++; @@ -64,7 +64,7 @@ ApiStatus IsMessageBoxDisplayed(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus WaitForMessageBoxDone(ScriptInstance* script, s32 isInitialCall) { +ApiStatus WaitForMessageBoxDone(Evt* script, s32 isInitialCall) { return !btl_is_popup_displayed() * ApiStatus_DONE2; } diff --git a/src/17FEB0.c b/src/17FEB0.c index f779abfbda..2448af9a89 100644 --- a/src/17FEB0.c +++ b/src/17FEB0.c @@ -39,7 +39,7 @@ HitResult calc_item_check_hit(void) { INCLUDE_ASM(s32, "17FEB0", calc_item_damage_enemy); -ApiStatus ItemDamageEnemy(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; s32 itemDamageOut = *args++; @@ -106,7 +106,7 @@ ApiStatus ItemDamageEnemy(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ItemAfflictEnemy(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; s32 itemDamageOut = *args++; @@ -174,7 +174,7 @@ ApiStatus ItemAfflictEnemy(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80252B3C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80252B3C(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; s32 itemDamageOut = *args++; @@ -241,7 +241,7 @@ ApiStatus func_80252B3C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ItemCheckHit(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; s32 itemDamageOut = *args++; diff --git a/src/181810.c b/src/181810.c index f19d475aa6..81fde0fb6b 100644 --- a/src/181810.c +++ b/src/181810.c @@ -10,7 +10,7 @@ extern ActorPart* gSpeakingActorPart; void msg_printer_set_origin_pos(MessagePrintState* printer, s32 x, s32 y); -ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; ActorPart* part; @@ -110,7 +110,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "181810", EndActorSpeech); -ApiStatus ShowBattleChoice(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShowBattleChoice(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -132,7 +132,7 @@ ApiStatus ShowBattleChoice(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus func_802535B4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802535B4(Evt* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos)) { decrement_status_menu_disabled(); } else { @@ -141,14 +141,14 @@ ApiStatus func_802535B4(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus OverrideBattleDmaDest(ScriptInstance* script, s32 isInitialCall) { +ApiStatus OverrideBattleDmaDest(Evt* script, s32 isInitialCall) { gBattleDmaDest = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } INCLUDE_ASM(s32, "181810", LoadBattleDmaData); -ApiStatus func_802536A8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802536A8(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; if (get_variable(script, *script->ptrReadPos) != 0) { @@ -163,7 +163,7 @@ ApiStatus func_802536A8(ScriptInstance* script, s32 isInitialCall) { } -ApiStatus func_80253734(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80253734(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; s32 val = get_variable(script, *script->ptrReadPos); @@ -185,7 +185,7 @@ ApiStatus func_80253734(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802537C0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802537C0(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a0 = *args++; s32 a1 = *args++; @@ -208,7 +208,7 @@ ApiStatus func_802537C0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlaySoundAtActor(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlaySoundAtActor(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Bytecode soundID = *args++; @@ -224,7 +224,7 @@ ApiStatus PlaySoundAtActor(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlaySoundAtPart(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++); @@ -241,7 +241,7 @@ ApiStatus PlaySoundAtPart(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlayLoopingSoundAtActor(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayLoopingSoundAtActor(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 idx = get_variable(script, *args++); @@ -259,7 +259,7 @@ ApiStatus PlayLoopingSoundAtActor(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus StopLoopingSoundAtActor(ScriptInstance* script, s32 isInitialCall) { +ApiStatus StopLoopingSoundAtActor(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 idx = get_variable(script, *args++); @@ -280,7 +280,7 @@ ApiStatus StopLoopingSoundAtActor(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetForegroundModelsVisibleUnchecked(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetForegroundModelsVisibleUnchecked(Evt* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos)) { show_foreground_models_unchecked(); } else { @@ -289,7 +289,7 @@ ApiStatus SetForegroundModelsVisibleUnchecked(ScriptInstance* script, s32 isInit return ApiStatus_DONE2; } -ApiStatus SetForegroundModelsVisible(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetForegroundModelsVisible(Evt* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos)) { show_foreground_models(); } else { @@ -298,7 +298,7 @@ ApiStatus SetForegroundModelsVisible(ScriptInstance* script, s32 isInitialCall) return ApiStatus_DONE2; } -ApiStatus func_80253B30(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80253B30(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode a0 = *args++; Bytecode a1 = *args++; @@ -308,7 +308,7 @@ ApiStatus func_80253B30(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus MakeStatusField(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MakeStatusField(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 outVar = *args++; s32 a = *args++; @@ -350,14 +350,14 @@ INCLUDE_ASM(s32, "181810", save_tattle_flags); INCLUDE_ASM(s32, "181810", load_tattle_flags); -ApiStatus func_80253FB0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80253FB0(Evt* script, s32 isInitialCall) { gCurrentEncounter.battleOutcome = 3; btl_set_state(0x20); return ApiStatus_DONE2; } -ApiStatus MultiplyByActorScale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MultiplyByActorScale(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.actorID); @@ -365,7 +365,7 @@ ApiStatus MultiplyByActorScale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus MultiplyVec2ByActorScale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MultiplyVec2ByActorScale(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.actorID); @@ -375,7 +375,7 @@ ApiStatus MultiplyVec2ByActorScale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus MultiplyVec3ByActorScale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MultiplyVec3ByActorScale(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.actorID); @@ -386,7 +386,7 @@ ApiStatus MultiplyVec3ByActorScale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ApplyShrinkFromOwner(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ApplyShrinkFromOwner(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.actorID); s32 amt = get_variable(script, *args); @@ -399,7 +399,7 @@ ApiStatus ApplyShrinkFromOwner(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus StartRumble(ScriptInstance* script, s32 isInitialCall) { +ApiStatus StartRumble(Evt* script, s32 isInitialCall) { start_rumble_type(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } diff --git a/src/18F340.c b/src/18F340.c index e88deadf65..13fcf85bab 100644 --- a/src/18F340.c +++ b/src/18F340.c @@ -27,7 +27,7 @@ void func_80260A60(void) { } } -ApiStatus IsPartnerImmobile(ScriptInstance* script, s32 isInitialCall) { +ApiStatus IsPartnerImmobile(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* playerActor = battleStatus->playerActor; s32 isImmobile = playerActor->debuff == STATUS_FEAR @@ -45,7 +45,7 @@ ApiStatus IsPartnerImmobile(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus activate_defend_command(ScriptInstance* script, s32 isInitialCall) { +ApiStatus activate_defend_command(Evt* script, s32 isInitialCall) { ActorPart* actorPart = &gBattleStatus.playerActor->partsTable[0]; deduct_current_move_fp(); @@ -55,7 +55,7 @@ ApiStatus activate_defend_command(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80260B70(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80260B70(Evt* script, s32 isInitialCall) { Actor* player = gBattleStatus.playerActor; func_802667F0(2, player, player->currentPos.x, player->currentPos.y + 20.0f, player->currentPos.z); @@ -70,12 +70,12 @@ ApiStatus func_80260B70(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "18F340", func_80260BF4); -ApiStatus func_80260DB8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80260DB8(Evt* script, s32 isInitialCall) { gBattleStatus.flags1 |= 0x40000; return ApiStatus_DONE2; } -ApiStatus func_80260DD8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80260DD8(Evt* script, s32 isInitialCall) { Actor* player = gBattleStatus.playerActor; s32 var; @@ -92,12 +92,12 @@ ApiStatus func_80260DD8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80260E38(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80260E38(Evt* script, s32 isInitialCall) { btl_show_battle_message(0x31, 60); return ApiStatus_DONE2; } -ApiStatus func_80260E5C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80260E5C(Evt* script, s32 isInitialCall) { gBattleStatus.flags1 &= ~0x8000; gBattleStatus.flags1 &= ~0x2000; gBattleStatus.flags1 &= ~0x4000; @@ -105,7 +105,7 @@ ApiStatus func_80260E5C(ScriptInstance* script, s32 isInitialCall) { } #define NAMESPACE base -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -144,7 +144,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { s32 sellValue = gItemTable[gBattleStatus.selectedItemID].sellValue; if (player_team_is_ability_active(gBattleStatus.playerActor, ABILITY_REFUND) && sellValue > 0) { @@ -154,7 +154,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802610CC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802610CC(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); *D_801512F0 = 1; @@ -169,7 +169,7 @@ ApiStatus func_802610CC(ScriptInstance* script, s32 isInitialCall) { return (script->functionTemp[0] == 0) * ApiStatus_DONE2; } -ApiStatus func_80261164(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80261164(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 20; btl_cam_unfreeze(); @@ -186,7 +186,7 @@ ApiStatus func_80261164(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus ConsumeLifeShroom(ScriptInstance *script, s32 isInitialCall) { +ApiStatus ConsumeLifeShroom(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; StaticItem* item = &gItemTable[0x95]; @@ -203,7 +203,7 @@ ApiStatus ConsumeLifeShroom(ScriptInstance *script, s32 isInitialCall) { // TODO something wrong with the struct breakdown for BattleStatus #ifdef NON_MATCHING -ApiStatus RestorePreDefeatState(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RestorePreDefeatState(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; BattleStatus* battleStatus = &gBattleStatus; @@ -229,7 +229,7 @@ ApiStatus RestorePreDefeatState(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "18F340", RestorePreDefeatState); #endif -ApiStatus func_80261388(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80261388(Evt* script, s32 isInitialCall) { s32 partnerActorExists = gBattleStatus.partnerActor != NULL; script->varTable[0] = FALSE; @@ -239,12 +239,12 @@ ApiStatus func_80261388(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802613A8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802613A8(Evt* script, s32 isInitialCall) { gBattleStatus.selectedItemID = ITEM_LIFE_SHROOM; return ApiStatus_DONE2; } -ApiStatus func_802613BC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802613BC(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -254,7 +254,7 @@ ApiStatus func_802613BC(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80261478(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80261478(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -264,7 +264,7 @@ ApiStatus func_80261478(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80261530(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80261530(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); *D_801512F0 = 1; @@ -279,7 +279,7 @@ ApiStatus func_80261530(ScriptInstance* script, s32 isInitialCall) { return (script->functionTemp[0] == 0) * ApiStatus_DONE2; } -ApiStatus func_802615C8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802615C8(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 25; } @@ -295,7 +295,7 @@ ApiStatus func_802615C8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus func_80261648(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80261648(Evt* script, s32 isInitialCall) { Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE); if (isInitialCall) { @@ -312,7 +312,7 @@ ApiStatus func_80261648(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus func_802616B4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802616B4(Evt* script, s32 isInitialCall) { Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE); merlee->alpha -= 17; @@ -324,7 +324,7 @@ ApiStatus func_802616B4(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus func_802616F4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802616F4(Evt* script, s32 isInitialCall) { Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE); EffectInstanceData* effectInstanceData; @@ -380,12 +380,12 @@ ApiStatus func_802616F4(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus func_802619B4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802619B4(Evt* script, s32 isInitialCall) { D_8029FBA4 = 1; return ApiStatus_DONE2; } -ApiStatus HasMerleeCastsLeft(ScriptInstance* script, s32 isInitialCall) { +ApiStatus HasMerleeCastsLeft(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; script->varTable[0] = FALSE; @@ -395,7 +395,7 @@ ApiStatus HasMerleeCastsLeft(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802619E8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802619E8(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 x = get_variable(script, *args++); s32 y = get_variable(script, *args++); @@ -422,7 +422,7 @@ ApiStatus func_802619E8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80261B40(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80261B40(Evt* script, s32 isInitialCall) { if (script->varTable[10] > 0) { free_hud_element(D_8029FBAC); } @@ -432,7 +432,7 @@ ApiStatus func_80261B40(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus FXRecoverHP(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FXRecoverHP(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -443,7 +443,7 @@ ApiStatus FXRecoverHP(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus FXRecoverFP(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FXRecoverFP(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -454,7 +454,7 @@ ApiStatus FXRecoverFP(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus IncrementPlayerHP(ScriptInstance* script, s32 isInitialCall) { +ApiStatus IncrementPlayerHP(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; playerData->curHP++; @@ -464,7 +464,7 @@ ApiStatus IncrementPlayerHP(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus IncrementPlayerFP(ScriptInstance* script, s32 isInitialCall) { +ApiStatus IncrementPlayerFP(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; playerData->curFP++; @@ -474,13 +474,13 @@ ApiStatus IncrementPlayerFP(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80261D98(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80261D98(Evt* script, s32 isInitialCall) { inflict_status_set_duration(get_actor(script->owner1.actorID), 4, 0, 1); btl_update_ko_status(); return ApiStatus_DONE2; } -ApiStatus func_80261DD4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80261DD4(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; script->varTable[11] = playerData->bootsLevel; @@ -490,7 +490,7 @@ ApiStatus func_80261DD4(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "18F340", func_80261DF4); -ApiStatus func_80261FB4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80261FB4(Evt* script, s32 isInitialCall) { ItemEntity* item = get_item_entity(script->varTable[10]); Actor* player = gBattleStatus.playerActor; s32 ft1; @@ -529,7 +529,7 @@ ApiStatus func_80261FB4(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus func_802620F8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802620F8(Evt* script, s32 isInitialCall) { // TODO get type correct s32* temp_v1 = &D_8029FBB0[script->varTable[14]]; diff --git a/src/1967B0.c b/src/1967B0.c index 218e857f5f..b0f5109e76 100644 --- a/src/1967B0.c +++ b/src/1967B0.c @@ -15,7 +15,7 @@ extern BattleItemTableEntry gBattleItemTable[]; INCLUDE_ASM(s32, "1967B0", LoadFreeItemScript); -ApiStatus LoadMoveScript(ScriptInstance* script, s32 isInitialCall) { +ApiStatus LoadMoveScript(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; s32* moveScript = gMoveScriptTable[battleStatus->selectedMoveID]; diff --git a/src/196AA0.c b/src/196AA0.c index b7f2e5e987..5a1cb21fbb 100644 --- a/src/196AA0.c +++ b/src/196AA0.c @@ -5,7 +5,7 @@ extern void* actionCommandDmaTable[23]; extern s32 D_8029FBC0; -ApiStatus LoadActionCommand(ScriptInstance* script, s32 isInitialCall) { +ApiStatus LoadActionCommand(Evt* script, s32 isInitialCall) { s32 cmd = get_variable(script, *script->ptrReadPos); dma_copy(actionCommandDmaTable[cmd * 3], actionCommandDmaTable[cmd * 3 + 1], actionCommandDmaTable[cmd * 3 + 2]); @@ -291,12 +291,12 @@ INCLUDE_ASM(s32, "196AA0", func_80269118); INCLUDE_ASM(s32, "196AA0", func_80269160); -ApiStatus func_8026919C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026919C(Evt* script, s32 isInitialCall) { gBattleStatus.unk_434 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus SetupMashMeter(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetupMashMeter(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; gActionCommandStatus.mashMeterIntervals = get_variable(script, *args++); gActionCommandStatus.mashMeterCutoffs[1] = get_variable(script, *args++); @@ -308,22 +308,22 @@ ApiStatus SetupMashMeter(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetActionSuccess(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActionSuccess(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess); return ApiStatus_DONE2; } -ApiStatus SetActionSuccess(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActionSuccess(Evt* script, s32 isInitialCall) { gBattleStatus.actionSuccess = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus SetActionCommandMode(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActionCommandMode(Evt* script, s32 isInitialCall) { gBattleStatus.unk_83 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus GetActionCommandMode(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActionCommandMode(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.unk_83); return ApiStatus_DONE2; } @@ -334,7 +334,7 @@ INCLUDE_ASM(s32, "196AA0", SetCommandAutoSuccess); INCLUDE_ASM(s32, "196AA0", GetCommandAutoSuccess); -ApiStatus func_802693F0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802693F0(Evt* script, s32 isInitialCall) { gBattleStatus.flags1 &= ~0x4000; return ApiStatus_DONE2; } @@ -345,42 +345,42 @@ INCLUDE_ASM(s32, "196AA0", func_80269470); INCLUDE_ASM(s32, "196AA0", func_802694A4); -ApiStatus GetActionSuccessCopy(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActionSuccessCopy(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess); return ApiStatus_DONE2; } -ApiStatus func_80269524(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80269524(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.unk_86); return ApiStatus_DONE2; } -ApiStatus func_80269550(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80269550(Evt* script, s32 isInitialCall) { gBattleStatus.unk_86 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus GetBlockResult(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetBlockResult(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.blockResult); return ApiStatus_DONE2; } -ApiStatus GetActionResult(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActionResult(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.unk_84); return ApiStatus_DONE2; } -ApiStatus SetActionResult(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActionResult(Evt* script, s32 isInitialCall) { gBattleStatus.unk_84 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus func_80269600(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80269600(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.unk_85); return ApiStatus_DONE2; } -ApiStatus func_8026962C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026962C(Evt* script, s32 isInitialCall) { gBattleStatus.unk_85 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } diff --git a/src/197F40.c b/src/197F40.c index eeb1442270..38655d6c01 100644 --- a/src/197F40.c +++ b/src/197F40.c @@ -101,29 +101,29 @@ Actor* get_actor(ActorID actorID) { INCLUDE_ASM(s32, "197F40", LoadBattleSection); -ApiStatus GetBattlePhase(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetBattlePhase(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.battlePhase); return ApiStatus_DONE2; } -ApiStatus GetLastElement(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetLastElement(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.currentAttackElement); return ApiStatus_DONE2; } -ApiStatus func_80269E80(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80269E80(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.unk_19A); return ApiStatus_DONE2; } -ApiStatus func_80269EAC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80269EAC(Evt* script, s32 isInitialCall) { s32 a0 = *script->ptrReadPos; gBattleStatus.unk_19A = a0; return ApiStatus_DONE2; } -ApiStatus SetGoalToHome(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetGoalToHome(Evt* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); Actor* actor; @@ -139,7 +139,7 @@ ApiStatus SetGoalToHome(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetIdleGoalToHome(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetIdleGoalToHome(Evt* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); Actor* actor; @@ -157,7 +157,7 @@ ApiStatus SetIdleGoalToHome(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "197F40", SetGoalToIndex); -ApiStatus GetIndexFromPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetIndexFromPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 a1 = *args++; @@ -173,7 +173,7 @@ ApiStatus GetIndexFromPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetIndexFromHome(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetIndexFromHome(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 a1 = *args++; @@ -189,7 +189,7 @@ ApiStatus GetIndexFromHome(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus CountPlayerTargets(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CountPlayerTargets(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 targetSelectionFlags = *args++; @@ -207,7 +207,7 @@ ApiStatus CountPlayerTargets(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ForceHomePos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ForceHomePos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); f32 x, y, z; @@ -232,7 +232,7 @@ ApiStatus ForceHomePos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetHomePos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetHomePos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); f32 x, y, z; @@ -254,7 +254,7 @@ ApiStatus SetHomePos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetGoalToTarget(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetGoalToTarget(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -269,7 +269,7 @@ ApiStatus SetGoalToTarget(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartGoalToTarget(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartGoalToTarget(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++); @@ -285,7 +285,7 @@ ApiStatus SetPartGoalToTarget(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetGoalToFirstTarget(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetGoalToFirstTarget(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -302,7 +302,7 @@ ApiStatus SetGoalToFirstTarget(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetGoalPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetGoalPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -342,7 +342,7 @@ ApiStatus SetGoalPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetIdleGoal(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetIdleGoal(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -381,7 +381,7 @@ ApiStatus SetIdleGoal(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AddGoalPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddGoalPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -403,7 +403,7 @@ ApiStatus AddGoalPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetGoalPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetGoalPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -432,7 +432,7 @@ ApiStatus GetGoalPos(ScriptInstance* script, s32 isInitialCall) { } // should this be renamed to GetFlyGoal ? -ApiStatus GetIdleGoal(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetIdleGoal(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -460,7 +460,7 @@ ApiStatus GetIdleGoal(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPartTarget(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartTarget(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++); @@ -491,7 +491,7 @@ ApiStatus GetPartTarget(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetActorPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActorPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -519,7 +519,7 @@ ApiStatus GetActorPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPartOffset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -555,7 +555,7 @@ ApiStatus GetPartOffset(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPartPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -585,7 +585,7 @@ ApiStatus GetPartPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetHomePos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetHomePos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -613,7 +613,7 @@ ApiStatus GetHomePos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -635,7 +635,7 @@ ApiStatus SetActorPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -679,7 +679,7 @@ ApiStatus SetPartPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetEnemyTargetOffset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetEnemyTargetOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -711,7 +711,7 @@ ApiStatus SetEnemyTargetOffset(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetAnimation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetAnimation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -725,7 +725,7 @@ ApiStatus SetAnimation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetAnimation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetAnimation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 var1; @@ -746,7 +746,7 @@ ApiStatus GetAnimation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetAnimationRate(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetAnimationRate(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -760,7 +760,7 @@ ApiStatus SetAnimationRate(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorYaw(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorYaw(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); @@ -772,7 +772,7 @@ ApiStatus SetActorYaw(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetActorYaw(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActorYaw(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 a1; @@ -787,7 +787,7 @@ ApiStatus GetActorYaw(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartYaw(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartYaw(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); @@ -799,7 +799,7 @@ ApiStatus SetPartYaw(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPartYaw(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartYaw(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -816,7 +816,7 @@ ApiStatus GetPartYaw(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorJumpGravity(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorJumpGravity(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); f32 jumpAccel; @@ -830,7 +830,7 @@ ApiStatus SetActorJumpGravity(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorIdleJumpGravity(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorIdleJumpGravity(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); f32 flyJumpAccel; @@ -844,7 +844,7 @@ ApiStatus SetActorIdleJumpGravity(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorSpeed(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorSpeed(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); f32 moveSpeed; @@ -859,7 +859,7 @@ ApiStatus SetActorSpeed(ScriptInstance* script, s32 isInitialCall) { } // SetActorFlySpeed? -ApiStatus SetActorIdleSpeed(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorIdleSpeed(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); f32 flySpeed; @@ -873,7 +873,7 @@ ApiStatus SetActorIdleSpeed(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartJumpGravity(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartJumpGravity(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -890,7 +890,7 @@ ApiStatus SetPartJumpGravity(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartMoveSpeed(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartMoveSpeed(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -907,7 +907,7 @@ ApiStatus SetPartMoveSpeed(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetJumpAnimations(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetJumpAnimations(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -934,7 +934,7 @@ ApiStatus SetJumpAnimations(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AddActorPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddActorPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -956,7 +956,7 @@ ApiStatus AddActorPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorDispOffset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorDispOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -978,7 +978,7 @@ ApiStatus SetActorDispOffset(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPartDispOffset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartDispOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); ActorPart* actorPart; @@ -1014,7 +1014,7 @@ ApiStatus GetPartDispOffset(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartDispOffset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartDispOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); ActorPart* actorPart; @@ -1045,7 +1045,7 @@ ApiStatus SetPartDispOffset(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AddPartDispOffset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddPartDispOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); ActorPart* actorPart; @@ -1076,7 +1076,7 @@ ApiStatus AddPartDispOffset(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8026BF48(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026BF48(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus2 = &gBattleStatus; Bytecode* args = script->ptrReadPos; @@ -1090,7 +1090,7 @@ ApiStatus func_8026BF48(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetActorVar(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActorVar(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 var1; @@ -1108,7 +1108,7 @@ ApiStatus GetActorVar(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorVar(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorVar(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 index; @@ -1127,7 +1127,7 @@ ApiStatus SetActorVar(ScriptInstance* script, s32 isInitialCall) { } #ifdef NON_MATCHING -ApiStatus AddActorVar(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddActorVar(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 index; @@ -1148,7 +1148,7 @@ ApiStatus AddActorVar(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "197F40", AddActorVar); #endif -ApiStatus GetPartMovementVar(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartMovementVar(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1168,7 +1168,7 @@ ApiStatus GetPartMovementVar(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartMovementVar(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartMovementVar(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1188,7 +1188,7 @@ ApiStatus SetPartMovementVar(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AddPartMovementVar(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddPartMovementVar(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1208,7 +1208,7 @@ ApiStatus AddPartMovementVar(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorRotation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorRotation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1239,7 +1239,7 @@ ApiStatus SetActorRotation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorRotationOffset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorRotationOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1262,7 +1262,7 @@ ApiStatus SetActorRotationOffset(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetActorRotation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActorRotation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1285,7 +1285,7 @@ ApiStatus GetActorRotation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartRotation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartRotation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++); @@ -1309,7 +1309,7 @@ ApiStatus SetPartRotation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartRotationOffset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartRotationOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++); @@ -1333,7 +1333,7 @@ ApiStatus SetPartRotationOffset(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPartRotation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartRotation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++); @@ -1357,7 +1357,7 @@ ApiStatus GetPartRotation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorScale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorScale(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1380,7 +1380,7 @@ ApiStatus SetActorScale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorScaleModifier(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorScaleModifier(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1403,7 +1403,7 @@ ApiStatus SetActorScaleModifier(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetActorScale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActorScale(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1426,7 +1426,7 @@ ApiStatus GetActorScale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartScale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartScale(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++); @@ -1450,7 +1450,7 @@ ApiStatus SetPartScale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPartScale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartScale(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++); @@ -1474,12 +1474,12 @@ ApiStatus GetPartScale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetBattleFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetBattleFlags(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.flags1); return ApiStatus_DONE2; } -ApiStatus SetBattleFlagBits(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetBattleFlagBits(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode a0 = *args++; @@ -1492,12 +1492,12 @@ ApiStatus SetBattleFlagBits(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetBattleFlags2(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetBattleFlags2(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.flags2); return ApiStatus_DONE2; } -ApiStatus SetBattleFlagBits2(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetBattleFlagBits2(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode a0 = *args++; @@ -1512,7 +1512,7 @@ ApiStatus SetBattleFlagBits2(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 a1; @@ -1527,7 +1527,7 @@ ApiStatus SetActorFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetActorFlagBits(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorFlagBits(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 a1; @@ -1551,7 +1551,7 @@ ApiStatus SetActorFlagBits(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetActorFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActorFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 a1; @@ -1567,7 +1567,7 @@ ApiStatus GetActorFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 a1; @@ -1585,7 +1585,7 @@ ApiStatus SetPartFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartFlagBits(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartFlagBits(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); ActorPart* actorPart; @@ -1612,7 +1612,7 @@ ApiStatus SetPartFlagBits(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartTargetFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartTargetFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); ActorPart* actorPart; @@ -1632,7 +1632,7 @@ ApiStatus SetPartTargetFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartTargetFlagBits(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartTargetFlagBits(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); ActorPart* actorPart; @@ -1659,7 +1659,7 @@ ApiStatus SetPartTargetFlagBits(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPartFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1678,7 +1678,7 @@ ApiStatus GetPartFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPartTargetFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartTargetFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1697,7 +1697,7 @@ ApiStatus GetPartTargetFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartEventFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartEventFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); ActorPart* actorPart; @@ -1717,7 +1717,7 @@ ApiStatus SetPartEventFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartEventBits(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartEventBits(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); ActorPart* actorPart; @@ -1744,7 +1744,7 @@ ApiStatus SetPartEventBits(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPartEventFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartEventFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1763,7 +1763,7 @@ ApiStatus GetPartEventFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8026D51C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026D51C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); ActorPart* actorPart; @@ -1783,7 +1783,7 @@ ApiStatus func_8026D51C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8026D5A4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026D5A4(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); ActorPart* actorPart; @@ -1810,7 +1810,7 @@ ApiStatus func_8026D5A4(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus HPBarToHome(ScriptInstance* script, s32 isInitialCall) { +ApiStatus HPBarToHome(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1833,7 +1833,7 @@ ApiStatus HPBarToHome(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus HPBarToCurrent(ScriptInstance* script, s32 isInitialCall) { +ApiStatus HPBarToCurrent(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1856,7 +1856,7 @@ ApiStatus HPBarToCurrent(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8026D8EC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026D8EC(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); @@ -1869,7 +1869,7 @@ ApiStatus func_8026D8EC(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8026D940(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026D940(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1897,7 +1897,7 @@ ApiStatus func_8026D940(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8026DA94(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026DA94(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1923,17 +1923,17 @@ ApiStatus func_8026DA94(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "197F40", SummonEnemy); -ApiStatus GetOwnerID(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetOwnerID(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, script->owner1.actorID); return ApiStatus_DONE2; } -ApiStatus SetOwnerID(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetOwnerID(Evt* script, s32 isInitialCall) { script->owner1.actorID = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus ActorExists(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ActorExists(Evt* script, s32 isInitialCall) { Bytecode isExist; Actor* partner = gBattleStatus.partnerActor; Bytecode* args = script->ptrReadPos; @@ -1952,7 +1952,7 @@ ApiStatus ActorExists(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8026DEF0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026DEF0(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++); @@ -1967,7 +1967,7 @@ ApiStatus func_8026DEF0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8026DF88(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026DF88(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++); @@ -1982,24 +1982,24 @@ ApiStatus func_8026DF88(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8026E020(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026E020(Evt* script, s32 isInitialCall) { s32 a0 = *script->ptrReadPos; gBattleStatus.unk_70 = a0; return ApiStatus_DONE2; } -ApiStatus func_8026E038(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026E038(Evt* script, s32 isInitialCall) { gBattleStatus.unk_74 = *script->ptrReadPos; return ApiStatus_DONE2; } -ApiStatus SetBattleInputMask(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetBattleInputMask(Evt* script, s32 isInitialCall) { gBattleStatus.inputBitmask = *script->ptrReadPos; return ApiStatus_DONE2; } -ApiStatus SetBattleInputButtons(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetBattleInputButtons(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; s32 currentButtonsDown = *args++; @@ -2013,7 +2013,7 @@ ApiStatus SetBattleInputButtons(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus CheckButtonPress(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CheckButtonPress(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode buttons = *args++; Bytecode out = *args; @@ -2023,7 +2023,7 @@ ApiStatus CheckButtonPress(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus CheckButtonHeld(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CheckButtonHeld(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode buttons = *args++; Bytecode out = *args; @@ -2033,7 +2033,7 @@ ApiStatus CheckButtonHeld(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus CheckButtonDown(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CheckButtonDown(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode buttons = *args++; Bytecode out = *args; @@ -2043,12 +2043,12 @@ ApiStatus CheckButtonDown(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetBattleState(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetBattleState(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleState); return ApiStatus_DONE2; } -ApiStatus SetBattleState(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetBattleState(Evt* script, s32 isInitialCall) { btl_set_state(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -2059,7 +2059,7 @@ INCLUDE_ASM(s32, "197F40", CancelEnemyTurn); INCLUDE_ASM(s32, "197F40", func_8026E260); -ApiStatus PlayerCreateTargetList(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayerCreateTargetList(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.actorID); @@ -2069,7 +2069,7 @@ ApiStatus PlayerCreateTargetList(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnemyCreateTargetList(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnemyCreateTargetList(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.actorID); @@ -2079,7 +2079,7 @@ ApiStatus EnemyCreateTargetList(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus InitTargetIterator(ScriptInstance* script, s32 isInitialCall) { +ApiStatus InitTargetIterator(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.actorID); SelectableTarget* selectableTarget = &actor->targetData[actor->targetIndexList[actor->selectedTargetIndex]]; @@ -2096,7 +2096,7 @@ INCLUDE_ASM(s32, "197F40", ChooseNextTarget); INCLUDE_ASM(s32, "197F40", func_8026E558); -ApiStatus GetTargetListLength(ScriptInstance* script) { +ApiStatus GetTargetListLength(Evt* script) { Bytecode* args = script->ptrReadPos; set_variable(script, *args, get_actor(script->owner1.actorID)->targetListLength); @@ -2107,7 +2107,7 @@ INCLUDE_ASM(s32, "197F40", GetOwnerTarget); INCLUDE_ASM(s32, "197F40", func_8026E914); -ApiStatus GetPlayerActorID(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPlayerActorID(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.attackerActorID); return ApiStatus_DONE2; } @@ -2138,7 +2138,7 @@ INCLUDE_ASM(s32, "197F40", func_8026F1A0); INCLUDE_ASM(s32, "197F40", GetStatusFlags); -ApiStatus RemovePlayerBuffs(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RemovePlayerBuffs(Evt* script, s32 isInitialCall) { remove_player_buffs(*script->ptrReadPos); return ApiStatus_DONE2; } @@ -2149,7 +2149,7 @@ INCLUDE_ASM(s32, "197F40", CreatePartShadow); INCLUDE_ASM(s32, "197F40", RemovePartShadow); -ApiStatus func_8026F60C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8026F60C(Evt* script, s32 isInitialCall) { gBattleStatus.unk_8D = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -2158,7 +2158,7 @@ INCLUDE_ASM(s32, "197F40", SetBattleVar); INCLUDE_ASM(s32, "197F40", GetBattleVar); -ApiStatus ResetAllActorSounds(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ResetAllActorSounds(Evt* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); if (actorID == ACTOR_SELF) { @@ -2177,7 +2177,7 @@ INCLUDE_ASM(s32, "197F40", SetPartSounds); INCLUDE_ASM(s32, "197F40", SetActorType); -ApiStatus ShowShockEffect(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShowShockEffect(Evt* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); if (actorID == ACTOR_SELF) { @@ -2202,7 +2202,7 @@ INCLUDE_ASM(s32, "197F40", ElectrifyActor); INCLUDE_ASM(s32, "197F40", HealActor); -ApiStatus WaitForBuffDone(ScriptInstance* script, s32 isInitialCall) { +ApiStatus WaitForBuffDone(Evt* script, s32 isInitialCall) { return (D_8029FBD4 == 0) * ApiStatus_DONE2; } diff --git a/src/19FAF0.c b/src/19FAF0.c index dbc4986335..68d81015d6 100644 --- a/src/19FAF0.c +++ b/src/19FAF0.c @@ -3,41 +3,41 @@ #include "battle/battle.h" #include "script_api/battle.h" -ApiStatus func_80271210(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80271210(Evt* script, s32 isInitialCall) { playFX_31(0, script->varTable[0], script->varTable[1], script->varTable[2]); return ApiStatus_DONE2; } -ApiStatus func_80271258(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80271258(Evt* script, s32 isInitialCall) { playFX_31(1, script->varTable[0], script->varTable[1], script->varTable[2]); return ApiStatus_DONE2; } -ApiStatus func_802712A0(ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "19FAF0", func_802712A0, ScriptInstance* script, s32 isInitialCall); +ApiStatus func_802712A0(Evt* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "19FAF0", func_802712A0, Evt* script, s32 isInitialCall); -ApiStatus func_80271328(ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "19FAF0", func_80271328, ScriptInstance* script, s32 isInitialCall); +ApiStatus func_80271328(Evt* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "19FAF0", func_80271328, Evt* script, s32 isInitialCall); -ApiStatus func_802713B0(ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "19FAF0", func_802713B0, ScriptInstance* script, s32 isInitialCall); +ApiStatus func_802713B0(Evt* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "19FAF0", func_802713B0, Evt* script, s32 isInitialCall); -ApiStatus func_8027143C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8027143C(Evt* script, s32 isInitialCall) { playFX_30(0, script->varTable[0], script->varTable[1], script->varTable[2]); return ApiStatus_DONE2; } -ApiStatus func_80271484(ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "19FAF0", func_80271484, ScriptInstance* script, s32 isInitialCall); +ApiStatus func_80271484(Evt* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "19FAF0", func_80271484, Evt* script, s32 isInitialCall); -ApiStatus func_80271588(ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "19FAF0", func_80271588, ScriptInstance* script, s32 isInitialCall); +ApiStatus func_80271588(Evt* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "19FAF0", func_80271588, Evt* script, s32 isInitialCall); void dispatch_event_player(s32 eventType) { Actor* player = gBattleStatus.playerActor; - ScriptInstance* oldOnHitScript; + Evt* oldOnHitScript; s32 oldOnHitID; - ScriptInstance* eventScript; + Evt* eventScript; player->lastEventType = eventType; @@ -61,9 +61,9 @@ void dispatch_event_player(s32 eventType) { void dispatch_event_player_continue_turn(s32 eventType) { Actor* player = gBattleStatus.playerActor; - ScriptInstance* oldOnHitScript; + Evt* oldOnHitScript; s32 oldOnHitID; - ScriptInstance* eventScript; + Evt* eventScript; player->lastEventType = eventType; @@ -98,7 +98,7 @@ void dispatch_damage_event_player_1(s32 damageAmount, Event event) { dispatch_damage_event_player(damageAmount, event, TRUE); } -ApiStatus GetMenuSelection(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetMenuSelection(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; s32 outVar1 = *args++; @@ -114,9 +114,9 @@ ApiStatus GetMenuSelection(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "19FAF0", func_80273444); -INCLUDE_ASM(s32, "19FAF0", PlayerFallToGoal, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "19FAF0", PlayerFallToGoal, Evt* script, s32 isInitialCall); -ApiStatus PlayerLandJump(ScriptInstance *script, s32 isInitialCall) { +ApiStatus PlayerLandJump(Evt *script, s32 isInitialCall) { Actor* player = gBattleStatus.playerActor; ActorMovementWalk* walkMovement = &player->walk; @@ -164,22 +164,22 @@ ApiStatus PlayerLandJump(ScriptInstance *script, s32 isInitialCall) { return ApiStatus_BLOCK; } -INCLUDE_ASM(s32, "19FAF0", PlayerRunToGoal, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "19FAF0", PlayerRunToGoal, Evt* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", CancelablePlayerRunToGoal, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "19FAF0", CancelablePlayerRunToGoal, Evt* script, s32 isInitialCall); -ApiStatus GetPlayerHP(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPlayerHP(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gPlayerData.curHP); return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "19FAF0", PlayerDamageEnemy, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "19FAF0", PlayerDamageEnemy, Evt* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", PlayerPowerBounceEnemy, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "19FAF0", PlayerPowerBounceEnemy, Evt* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", PlayerTestEnemy, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "19FAF0", PlayerTestEnemy, Evt* script, s32 isInitialCall); -ApiStatus DispatchDamagePlayerEvent(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (dispatch_damage_event_player_0(get_variable(script, *args++), *args++) < 0) { @@ -193,7 +193,7 @@ ApiStatus DispatchDamagePlayerEvent(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus EnablePlayerBlur(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall) { s32 setting = get_variable(script, *script->ptrReadPos); if (setting == 0) { @@ -207,12 +207,12 @@ ApiStatus EnablePlayerBlur(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802749D8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802749D8(Evt* script, s32 isInitialCall) { func_802549A0(); return ApiStatus_DONE2; } -ApiStatus func_802749F8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802749F8(Evt* script, s32 isInitialCall) { func_802549C0(); return ApiStatus_DONE2; } @@ -223,7 +223,7 @@ INCLUDE_ASM(s32, "19FAF0", func_802752AC); INCLUDE_ASM(s32, "19FAF0", func_80275F00); -ApiStatus DidActionSucceed(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DidActionSucceed(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 outVar = *args++; s32 actionSuccess = gBattleStatus.actionSuccess; @@ -241,12 +241,12 @@ ApiStatus DidActionSucceed(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80276EFC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80276EFC(Evt* script, s32 isInitialCall) { gBattleStatus.flags1 |= 0x200000; return ApiStatus_DONE2; } -ApiStatus DispatchEventPlayer(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DispatchEventPlayer(Evt* script, s32 isInitialCall) { dispatch_event_player(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } diff --git a/src/1A5830.c b/src/1A5830.c index dd351b70e0..148a1c5255 100644 --- a/src/1A5830.c +++ b/src/1A5830.c @@ -108,11 +108,11 @@ void play_hit_sound(Actor* actor, f32 x, f32 y, f32 z, u32 hitSound) { } void dispatch_event_actor(Actor* actor, Event event) { - ScriptInstance* onHitScript = actor->onHitScript; - ScriptID onHitID = actor->onHitID; + Evt* onHitScript = actor->onHitScript; + s32 onHitID = actor->onHitID; if (actor->onHitScriptSource != NULL) { - ScriptInstance* newScript; + Evt* newScript; actor->lastEventType = event; newScript = start_script(actor->onHitScriptSource, 0xA, 0x20); @@ -630,42 +630,42 @@ s32 calc_enemy_damage_target(Actor* attacker) { // possibly vars stored as floats if ((battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP) && phi_s5) { - ScriptInstance* script = start_script(&DoSleepHit, 10, 0); + Evt* script = start_script(&DoSleepHit, 10, 0); script->varTable[0] = walk->goalPos.x; script->varTable[1] = walk->goalPos.y; script->varTable[2] = walk->goalPos.z; sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); } if ((battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY) && phi_s5) { - ScriptInstance* script = start_script(&DoDizzyHit, 10, 0); + Evt* script = start_script(&DoDizzyHit, 10, 0); script->varTable[0] = walk->goalPos.x; script->varTable[1] = walk->goalPos.y; script->varTable[2] = walk->goalPos.z; sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); } if ((battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE) && phi_s5) { - ScriptInstance* script = start_script(&DoParalyzeHit, 10, 0); + Evt* script = start_script(&DoParalyzeHit, 10, 0); script->varTable[0] = walk->goalPos.x; script->varTable[1] = walk->goalPos.y; script->varTable[2] = walk->goalPos.z; sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); } if ((battleStatus->currentAttackStatus & STATUS_FLAG_POISON) && phi_s5) { - ScriptInstance* script = start_script(&DoPoisonHit, 10, 0); + Evt* script = start_script(&DoPoisonHit, 10, 0); script->varTable[0] = walk->goalPos.x; script->varTable[1] = walk->goalPos.y; script->varTable[2] = walk->goalPos.z; sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); } if ((battleStatus->currentAttackStatus & STATUS_FLAG_STOP) && phi_s5) { - ScriptInstance* script = start_script(&DoStopHit, 10, 0); + Evt* script = start_script(&DoStopHit, 10, 0); script->varTable[0] = walk->goalPos.x; script->varTable[1] = walk->goalPos.y; script->varTable[2] = walk->goalPos.z; sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); } if ((battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN) && phi_s5) { - ScriptInstance* script = start_script(&DoFreezeHit, 10, 0); + Evt* script = start_script(&DoFreezeHit, 10, 0); script->varTable[0] = walk->goalPos.x; script->varTable[1] = walk->goalPos.y; script->varTable[2] = walk->goalPos.z; @@ -673,7 +673,7 @@ s32 calc_enemy_damage_target(Actor* attacker) { sfx_play_sound_at_position(SOUND_FREEZE, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); } if ((battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK) && phi_s5) { - ScriptInstance* script = start_script(&DoShrinkHit, 10, 0); + Evt* script = start_script(&DoShrinkHit, 10, 0); script->varTable[0] = walk->goalPos.x; script->varTable[1] = walk->goalPos.y; script->varTable[2] = walk->goalPos.z; @@ -795,21 +795,21 @@ s32 dispatch_damage_event_actor_1(Actor* actor, s32 damageAmount, s32 event) { return dispatch_damage_event_actor(actor, damageAmount, event, TRUE); } -ApiStatus BindTakeTurn(ScriptInstance* script, s32 isInitialCall) { +ApiStatus BindTakeTurn(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); - Script* takeTurnScript; + EvtSource* takeTurnScript; if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } - takeTurnScript = (Script*) get_variable(script, *args++); + takeTurnScript = (EvtSource*) get_variable(script, *args++); get_actor(actorID)->takeTurnScriptSource = takeTurnScript; return ApiStatus_DONE2; } -ApiStatus PauseTakeTurn(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PauseTakeTurn(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); @@ -822,7 +822,7 @@ ApiStatus PauseTakeTurn(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ResumeTakeTurn(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); @@ -835,18 +835,18 @@ ApiStatus ResumeTakeTurn(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus BindIdle(ScriptInstance* script, s32 isInitialCall) { +ApiStatus BindIdle(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); - Script* idleCode; + EvtSource* idleCode; Actor* actor; - ScriptInstance* newScriptContext; + Evt* newScriptContext; if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } - idleCode = (Script*) get_variable(script, *args++); + idleCode = (EvtSource*) get_variable(script, *args++); actor = get_actor(actorID); if (actor->idleScript != 0) { @@ -862,7 +862,7 @@ ApiStatus BindIdle(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnableIdleScript(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 var1; @@ -893,30 +893,30 @@ ApiStatus EnableIdleScript(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus BindHandleEvent(ScriptInstance* script, s32 isInitialCall) { +ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); - Script* var1; + EvtSource* var1; if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } - var1 = (Script*) get_variable(script, *args++); + var1 = (EvtSource*) get_variable(script, *args++); get_actor(actorID)->onHitScriptSource = var1; return ApiStatus_DONE2; } -ApiStatus BindNextTurn(ScriptInstance* script, s32 isInitialCall) { +ApiStatus BindNextTurn(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); - Script* var1; + EvtSource* var1; if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } - var1 = (Script*) get_variable(script, *args++); + var1 = (EvtSource*) get_variable(script, *args++); get_actor(actorID)->onTurnChanceScriptSource = var1; return ApiStatus_DONE2; } @@ -929,7 +929,7 @@ INCLUDE_ASM(s32, "1A5830", JumpToGoalSimple2); INCLUDE_ASM(s32, "1A5830", JumpWithBounce); -ApiStatus LandJump(ScriptInstance* script, s32 isInitialCall) { +ApiStatus LandJump(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; @@ -992,7 +992,7 @@ INCLUDE_ASM(s32, "1A5830", IdleFlyToGoal); INCLUDE_ASM(s32, "1A5830", FlyPartTo); -ApiStatus GetLastEvent(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetLastEvent(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 outVar; @@ -1006,7 +1006,7 @@ ApiStatus GetLastEvent(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetTargetActor(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetTargetActor(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 targetActorID; @@ -1023,7 +1023,7 @@ ApiStatus SetTargetActor(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetEnemyHP(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s8 newHP; @@ -1046,7 +1046,7 @@ ApiStatus SetEnemyHP(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetActorHP(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActorHP(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); @@ -1077,7 +1077,7 @@ ApiStatus GetActorHP(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetEnemyMaxHP(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetEnemyMaxHP(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 outVar; @@ -1093,7 +1093,7 @@ ApiStatus GetEnemyMaxHP(ScriptInstance* script, s32 isInitialCall) { // battlestatus shtuff #ifdef NON_MATCHING -ApiStatus RemoveActor(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RemoveActor(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; EncounterStatus* currentEncounter = &gCurrentEncounter; Bytecode* args = script->ptrReadPos; @@ -1124,7 +1124,7 @@ ApiStatus RemoveActor(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "1A5830", RemoveActor); #endif -ApiStatus DropStarPoints(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DropStarPoints(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; Bytecode* args = script->ptrReadPos; @@ -1181,7 +1181,7 @@ ApiStatus DropStarPoints(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetDefenseTable(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1197,7 +1197,7 @@ ApiStatus SetDefenseTable(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetStatusTable(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetStatusTable(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); u32* var1; @@ -1211,7 +1211,7 @@ ApiStatus SetStatusTable(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetIdleAnimations(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1227,7 +1227,7 @@ ApiStatus SetIdleAnimations(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8027CC10(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8027CC10(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1246,7 +1246,7 @@ ApiStatus func_8027CC10(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnemyDamageTarget(ScriptInstance *script, s32 isInitialCall) { +ApiStatus EnemyDamageTarget(Evt *script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; ActorID actorID = get_variable(script, *args++); @@ -1321,7 +1321,7 @@ ApiStatus EnemyDamageTarget(ScriptInstance *script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnemyFollowupAfflictTarget(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; BattleStatus* anotherBattleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; @@ -1359,7 +1359,7 @@ ApiStatus EnemyFollowupAfflictTarget(ScriptInstance* script, s32 isInitialCall) return ApiStatus_DONE2; } -ApiStatus EnemyTestTarget(ScriptInstance *script, s32 isInitialCall) { +ApiStatus EnemyTestTarget(Evt *script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; ActorID actorID = get_variable(script, *args++); @@ -1431,7 +1431,7 @@ ApiStatus EnemyTestTarget(ScriptInstance *script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus DispatchDamageEvent(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1453,7 +1453,7 @@ ApiStatus DispatchDamageEvent(ScriptInstance* script, s32 isInitialCall) { return scriptExists * ApiStatus_DONE2; } -ApiStatus DispatchEvent(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DispatchEvent(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); @@ -1465,7 +1465,7 @@ ApiStatus DispatchEvent(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8027D2D8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8027D2D8(Evt* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); if (actorID == ACTOR_SELF) { @@ -1476,7 +1476,7 @@ ApiStatus func_8027D2D8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8027D32C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8027D32C(Evt* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); if (actorID == ACTOR_SELF) { @@ -1487,7 +1487,7 @@ ApiStatus func_8027D32C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetTargetOffset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1511,7 +1511,7 @@ ApiStatus SetTargetOffset(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8027D434(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8027D434(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1527,7 +1527,7 @@ ApiStatus func_8027D434(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8027D4C8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8027D4C8(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex; @@ -1551,7 +1551,7 @@ ApiStatus func_8027D4C8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnableActorBlur(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 enable = get_variable(script, *args++); @@ -1573,7 +1573,7 @@ ApiStatus EnableActorBlur(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8027D628(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8027D628(Evt* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); if (actorID == ACTOR_SELF) { @@ -1584,7 +1584,7 @@ ApiStatus func_8027D628(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AfflictActor(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AfflictActor(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Actor* actor; @@ -1623,7 +1623,7 @@ ApiStatus AfflictActor(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8027D75C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8027D75C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 outVar = *args++; @@ -1636,17 +1636,17 @@ ApiStatus func_8027D75C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetEncounterState(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetEncounterState(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gCurrentEncounter.hitType); return ApiStatus_DONE2; } -ApiStatus YieldTurn(ScriptInstance* script, s32 isInitialCall) { +ApiStatus YieldTurn(Evt* script, s32 isInitialCall) { gBattleStatus.flags1 |= 0x200000; return ApiStatus_DONE2; } -ApiStatus SetActorSize(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetActorSize(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 y = get_variable(script, *args++); @@ -1670,7 +1670,7 @@ ApiStatus SetActorSize(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetActorSize(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActorSize(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 outY = *args++; @@ -1687,7 +1687,7 @@ ApiStatus GetActorSize(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPartSize(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPartSize(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 partIndex = get_variable(script, *args++); @@ -1714,7 +1714,7 @@ ApiStatus SetPartSize(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetOriginalActorType(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetOriginalActorType(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 outVar = *args++; @@ -1727,7 +1727,7 @@ ApiStatus GetOriginalActorType(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetCurrentActorType(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetCurrentActorType(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 outVar = *args++; @@ -1740,7 +1740,7 @@ ApiStatus GetCurrentActorType(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetLastDamage(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetLastDamage(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 outVar; @@ -1754,7 +1754,7 @@ ApiStatus GetLastDamage(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnableActorGlow(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 flag; @@ -1783,7 +1783,7 @@ ApiStatus EnableActorGlow(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus WasStatusInflicted(ScriptInstance* script, s32 isInitialCall) { +ApiStatus WasStatusInflicted(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; s32 outVal; @@ -1800,7 +1800,7 @@ ApiStatus WasStatusInflicted(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus CopyStatusEffects(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CopyStatusEffects(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorIDTo; ActorID actorIDFrom; @@ -1831,7 +1831,7 @@ ApiStatus CopyStatusEffects(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ClearStatusEffects(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); s32 flag; diff --git a/src/1AC760.c b/src/1AC760.c index 88f7b101d8..135915df45 100644 --- a/src/1AC760.c +++ b/src/1AC760.c @@ -4,9 +4,9 @@ void dispatch_event_partner(s32 lastEventType) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; - ScriptInstance* onHitScript = partnerActor->onHitScript; - ScriptID onHitID = partnerActor->onHitID; - ScriptInstance* script; + Evt* onHitScript = partnerActor->onHitScript; + s32 onHitID = partnerActor->onHitID; + Evt* script; partnerActor->lastEventType = lastEventType; script = start_script(partnerActor->onHitScriptSource, 10, 0x20); @@ -27,9 +27,9 @@ void dispatch_event_partner(s32 lastEventType) { void dispatch_event_partner_continue_turn(s8 lastEventType) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; - ScriptInstance* onHitScript = partnerActor->onHitScript; - ScriptID onHitID = partnerActor->onHitID; - ScriptInstance* script; + Evt* onHitScript = partnerActor->onHitScript; + s32 onHitID = partnerActor->onHitID; + Evt* script; partnerActor->lastEventType = lastEventType; script = start_script(partnerActor->onHitScriptSource, 10, 0x20); @@ -122,7 +122,7 @@ s32 dispatch_damage_event_partner_1(s32 damageAmount, s32 event, s32 stopMotion) return dispatch_damage_event_partner(damageAmount, event, TRUE); } -ApiStatus MakeOwnerTargetIndex(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MakeOwnerTargetIndex(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.actorID); s32 numTargets = actor->targetListLength; @@ -154,7 +154,7 @@ ApiStatus MakeOwnerTargetIndex(ScriptInstance* script, s32 isInitialCall) { s32 calc_partner_damage_enemy(void); -ApiStatus func_8027FC90(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8027FC90(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; s32 hitResult; @@ -178,7 +178,7 @@ ApiStatus func_8027FC90(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetActorLevel(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActorLevel(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); Bytecode* outVar; @@ -201,7 +201,7 @@ INCLUDE_ASM(s32, "1AC760", PartnerPowerBounceEnemy); INCLUDE_ASM(s32, "1AC760", PartnerTestEnemy); -ApiStatus func_8028070C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8028070C(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.actorID); @@ -218,14 +218,14 @@ ApiStatus func_8028070C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus DeletePartner(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DeletePartner(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; btl_delete_actor(battleStatus->partnerActor); return ApiStatus_DONE2; } -ApiStatus GetActionCommandResult(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetActionCommandResult(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; s32 var = *script->ptrReadPos; s32 actionSuccess = battleStatus->actionSuccess; @@ -244,7 +244,7 @@ ApiStatus GetActionCommandResult(ScriptInstance* script, s32 isInitialCall) { } /// Seems to be the same functionality as YieldTurn in 1A5830.c -ApiStatus func_80280818(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80280818(Evt* script, s32 isInitialCall) { gBattleStatus.flags1 |= 0x200000; return ApiStatus_DONE2; } diff --git a/src/1AF120.c b/src/1AF120.c index 4d92a10dc4..578e5a0302 100644 --- a/src/1AF120.c +++ b/src/1AF120.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus GetDamageIntensity(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetDamageIntensity(Evt* script, s32 isInitialCall) { if (gBattleStatus.lastAttackDamage < 4) { script->varTable[0] = 0; } else if (gBattleStatus.lastAttackDamage < 7) { @@ -14,7 +14,7 @@ ApiStatus GetDamageIntensity(ScriptInstance* script, s32 isInitialCall) { } // TODO: Rename to AddEffectOffset -ApiStatus AddEffectOffset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddEffectOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; EffectInstance* effect = get_variable(script, *args++); diff --git a/src/1AF230.c b/src/1AF230.c index 8995f99050..f148c228df 100644 --- a/src/1AF230.c +++ b/src/1AF230.c @@ -22,7 +22,7 @@ typedef struct StarPowerDesc { extern StarPowerDesc D_8008F071[]; -ApiStatus LoadStarPowerScript(ScriptInstance* script, s32 isInitialCall) { +ApiStatus LoadStarPowerScript(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; s16 selectedItemID; diff --git a/src/1a1f0_len_5390.c b/src/1a1f0_len_5390.c index df2cbae2d5..8df5fe1615 100644 --- a/src/1a1f0_len_5390.c +++ b/src/1a1f0_len_5390.c @@ -35,21 +35,21 @@ void set_defeated(s32 mapID, s32 encounterID) { currentEncounter->defeatFlags[mapID][encounterIdx] |= (1 << encounterShift);*/ } -ApiStatus ShowMerleeCoinMessage(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShowMerleeCoinMessage(Evt* script, s32 isInitialCall) { if (isInitialCall) { show_merlee_message(0, 60); } return (is_merlee_message_done() == 0) * ApiStatus_DONE2; } -ApiStatus ShowMerleeRanOutMessage(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShowMerleeRanOutMessage(Evt* script, s32 isInitialCall) { if (isInitialCall) { show_merlee_message(1, 60); } return (is_merlee_message_done() == 0) * ApiStatus_DONE2; } -ApiStatus FadeBackgroundToBlack(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FadeBackgroundToBlack(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); *D_801512F0 = 1; @@ -67,7 +67,7 @@ ApiStatus FadeBackgroundToBlack(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus UnfadeBackgroundFromBlack(ScriptInstance* script, s32 isInitialCall) { +ApiStatus UnfadeBackgroundFromBlack(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 25; } @@ -83,7 +83,7 @@ ApiStatus UnfadeBackgroundFromBlack(ScriptInstance* script, s32 isInitialCall) { } } -ApiStatus FadeInMerlee(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FadeInMerlee(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(NPC_BTL_MERLEE); if (isInitialCall) { @@ -100,7 +100,7 @@ ApiStatus FadeInMerlee(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus FadeOutMerlee(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FadeOutMerlee(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(NPC_BTL_MERLEE); npc->alpha -= 17; @@ -113,7 +113,7 @@ ApiStatus FadeOutMerlee(ScriptInstance* script, s32 isInitialCall) { } // same as func_802616F4 aside from syms -ApiStatus MerleeUpdateFX(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall) { Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE); EffectInstanceData* effectInstanceData; @@ -170,12 +170,12 @@ ApiStatus MerleeUpdateFX(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus MerleeStopFX(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MerleeStopFX(Evt* script, s32 isInitialCall) { D_800A0BB8 = 1; return ApiStatus_DONE2; } -ApiStatus GetCamLookAtObjVector(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetCamLookAtObjVector(Evt* script, s32 isInitialCall) { script->varTable[0] = gCameras[gCurrentCameraID].lookAt_obj.x; script->varTable[1] = gCameras[gCurrentCameraID].lookAt_obj.y; script->varTable[2] = gCameras[gCurrentCameraID].lookAt_obj.z; @@ -183,7 +183,7 @@ ApiStatus GetCamLookAtObjVector(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus HasMerleeCasts(ScriptInstance* script, s32 isInitialCall) { +ApiStatus HasMerleeCasts(Evt* script, s32 isInitialCall) { script->varTable[0] = FALSE; if (gPlayerData.merleeCastsLeft > 0) { script->varTable[0] = TRUE; @@ -192,7 +192,7 @@ ApiStatus HasMerleeCasts(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlayMerleeGatherFX(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayMerleeGatherFX(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); @@ -202,7 +202,7 @@ ApiStatus PlayMerleeGatherFX(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlayMerleeOrbFX(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayMerleeOrbFX(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); @@ -212,7 +212,7 @@ ApiStatus PlayMerleeOrbFX(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus OnDefeatEnemy(ScriptInstance* script, s32 isInitialCall) { +ApiStatus OnDefeatEnemy(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 temp1; @@ -251,7 +251,7 @@ ApiStatus OnDefeatEnemy(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus OnFleeBattleDrops(ScriptInstance* script, s32 isInitialCall) { +ApiStatus OnFleeBattleDrops(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; PlayerData* playerData = &gPlayerData; diff --git a/src/23680.c b/src/23680.c index 3a32f4a6c3..091482e253 100644 --- a/src/23680.c +++ b/src/23680.c @@ -58,7 +58,7 @@ INCLUDE_ASM(s32, "23680", get_coin_drop_amount); #endif void func_80048E34(Enemy* enemy, s32 arg1, s32 arg2) { - ScriptInstance* newScript; + Evt* newScript; if (enemy->aiScript != NULL) { kill_script_by_ID(enemy->aiScriptID); @@ -173,7 +173,7 @@ void ai_enemy_play_sound(Npc* npc, s32 arg1, s32 arg2) { sfx_play_sound_at_position(arg1, value2, npc->pos.x, npc->pos.y, npc->pos.z); } -void func_80049550(ScriptInstance* script, s32 arg1) { +void func_80049550(Evt* script, s32 arg1) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); npc->duration--; @@ -191,7 +191,7 @@ INCLUDE_ASM(s32, "23680", func_800496B8); INCLUDE_ASM(s32, "23680", func_80049C04); -void func_80049E3C(ScriptInstance* script) { +void func_80049E3C(Evt* script) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -204,7 +204,7 @@ void func_80049E3C(ScriptInstance* script) { script->functionTemp[0] = 11; } -void func_80049ECC(ScriptInstance* script) { +void func_80049ECC(Evt* script) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); s32 flag = FALSE; @@ -229,7 +229,7 @@ INCLUDE_ASM(s32, "23680", func_80049F7C); INCLUDE_ASM(s32, "23680", func_8004A124); -void func_8004A3E8(ScriptInstance* script, s32 arg1) { +void func_8004A3E8(Evt* script, s32 arg1) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -241,4 +241,4 @@ void func_8004A3E8(ScriptInstance* script, s32 arg1) { } } -INCLUDE_ASM(s32, "23680", DoBasicAI, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "23680", DoBasicAI, Evt* script, s32 isInitialCall); diff --git a/src/25AF0.c b/src/25AF0.c index c53853ce80..7c51fd65ea 100644 --- a/src/25AF0.c +++ b/src/25AF0.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void func_8004A6F0(ScriptInstance* script) { +void func_8004A6F0(Evt* script) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); npc->duration--; @@ -10,7 +10,7 @@ void func_8004A6F0(ScriptInstance* script) { } } -void func_8004A73C(ScriptInstance* script) { +void func_8004A73C(Evt* script) { Enemy* enemy = script->owner1.enemy; get_npc_unsafe(enemy->npcID); diff --git a/src/3251D0.c b/src/3251D0.c index 736385982e..5e6ba0cf1e 100644 --- a/src/3251D0.c +++ b/src/3251D0.c @@ -1,7 +1,7 @@ #include "common.h" #include "effects.h" -ApiStatus func_802BD100_3251D0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BD100_3251D0(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -11,7 +11,7 @@ ApiStatus func_802BD100_3251D0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802BD1AC_32527C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BD1AC_32527C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -22,7 +22,7 @@ ApiStatus func_802BD1AC_32527C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802BD26C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BD26C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -33,7 +33,7 @@ ApiStatus func_802BD26C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802BD32C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BD32C(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; s32 newHP = playerData->curHP + get_variable(script, *script->ptrReadPos); @@ -50,7 +50,7 @@ ApiStatus func_802BD32C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802BD388(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BD388(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; s32 newFP = playerData->curFP + get_variable(script, *script->ptrReadPos); @@ -67,19 +67,19 @@ ApiStatus func_802BD388(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802BD3E4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BD3E4(Evt* script, s32 isInitialCall) { set_time_freeze_mode(TIME_FREEZE_FULL); gOverrideFlags |= 0x200000; return ApiStatus_DONE2; } -ApiStatus func_802BD41C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BD41C(Evt* script, s32 isInitialCall) { set_time_freeze_mode(TIME_FREEZE_NORMAL); gOverrideFlags &= ~0x200000; return ApiStatus_DONE2; } -ApiStatus func_802BD458(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BD458(Evt* script, s32 isInitialCall) { s32 itemIdx = get_variable(script, *script->ptrReadPos); s32 var15; @@ -100,7 +100,7 @@ ApiStatus func_802BD458(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802BD4E8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BD4E8(Evt* script, s32 isInitialCall) { remove_consumable(); return ApiStatus_DONE2; } diff --git a/src/362a0_len_2f70.c b/src/362a0_len_2f70.c index 180737120d..45c38afee0 100644 --- a/src/362a0_len_2f70.c +++ b/src/362a0_len_2f70.c @@ -189,7 +189,7 @@ INCLUDE_ASM(s32, "362a0_len_2f70", test_ray_entities, f32 startX, f32 startY, f3 INCLUDE_ASM(s32, "362a0_len_2f70", func_8005DB00); -ApiStatus func_8005DD54(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8005DD54(Evt* script, s32 isInitialCall) { f32 angle = clamp_angle(script->varTable[0]); script->varTable[0] = angle; diff --git a/src/80850_len_3060.c b/src/80850_len_3060.c index 0bd15b02ea..5e3be770cf 100644 --- a/src/80850_len_3060.c +++ b/src/80850_len_3060.c @@ -553,7 +553,7 @@ void func_800E96C8(void) { } } -ApiStatus ShowCoinCounter(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShowCoinCounter(Evt* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos)) { show_coin_counter(); } else { diff --git a/src/EA7320.c b/src/EA7320.c index f82f3b88bc..936545f293 100644 --- a/src/EA7320.c +++ b/src/EA7320.c @@ -2,7 +2,7 @@ #define NAMESPACE EA7320 -ApiStatus func_80240350_EA7320(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240350_EA7320(Evt* script, s32 isInitialCall) { Camera* camera = &dead_gCameras[0]; camera->flags |= 0x1000; diff --git a/src/EF2650.c b/src/EF2650.c index dce4d1bc54..b5edd95b6e 100644 --- a/src/EF2650.c +++ b/src/EF2650.c @@ -2,7 +2,7 @@ extern s16 D_80169B16; -ApiStatus func_80240040_EF2650(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240040_EF2650(Evt* script, s32 isInitialCall) { dead_set_variable(script, *script->ptrReadPos, D_80169B16); return ApiStatus_DONE2; } diff --git a/src/a5dd0_len_114e0.c b/src/a5dd0_len_114e0.c index de6f0f608a..dec5bdfb2e 100644 --- a/src/a5dd0_len_114e0.c +++ b/src/a5dd0_len_114e0.c @@ -854,11 +854,11 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", create_entity, StaticEntityData* data, s32 x INCLUDE_ASM(s32, "a5dd0_len_114e0", create_shadow_from_data); -INCLUDE_ASM(s32, "a5dd0_len_114e0", MakeEntity, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "a5dd0_len_114e0", MakeEntity, Evt* script, s32 isInitialCall); INCLUDE_ASM(s32, "a5dd0_len_114e0", SetEntityCullMode); -ApiStatus UseDynamicShadow(ScriptInstance* script, s32 isInitialCall) { +ApiStatus UseDynamicShadow(Evt* script, s32 isInitialCall) { Entity* entity = get_entity_by_index(gLastCreatedEntityIndex); if (get_variable(script, *script->ptrReadPos)) { @@ -874,7 +874,7 @@ ApiStatus UseDynamicShadow(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AssignScript(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AssignScript(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall == TRUE) { @@ -887,11 +887,11 @@ ApiStatus AssignScript(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE1; } -INCLUDE_ASM(s32, "a5dd0_len_114e0", AssignAreaFlag, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "a5dd0_len_114e0", AssignAreaFlag, Evt* script, s32 isInitialCall); -INCLUDE_ASM(s32, "a5dd0_len_114e0", AssignBlockFlag, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "a5dd0_len_114e0", AssignBlockFlag, Evt* script, s32 isInitialCall); -ApiStatus AssignFlag(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AssignFlag(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall == TRUE) { @@ -904,9 +904,9 @@ ApiStatus AssignFlag(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE1; } -INCLUDE_ASM(s32, "a5dd0_len_114e0", AssignPanelFlag, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "a5dd0_len_114e0", AssignPanelFlag, Evt* script, s32 isInitialCall); -INCLUDE_ASM(s32, "a5dd0_len_114e0", AssignCrateFlag, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "a5dd0_len_114e0", AssignCrateFlag, Evt* script, s32 isInitialCall); INCLUDE_ASM(s32, "a5dd0_len_114e0", create_entity_shadow); diff --git a/src/battle/action_cmd/air_lift.c b/src/battle/action_cmd/air_lift.c index da2fc7f2cf..a1a63c84fd 100644 --- a/src/battle/action_cmd/air_lift.c +++ b/src/battle/action_cmd/air_lift.c @@ -8,7 +8,7 @@ extern s32 D_80292974; extern s32 D_80294340; extern s32 func_802A98B0_42EC50; -ApiStatus func_802A9000_428A70(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A9000_428A70(Evt* script, s32 isInitialCall) { s32 *args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; diff --git a/src/battle/action_cmd/body_slam.c b/src/battle/action_cmd/body_slam.c index e222dc1dfe..e079b14ea9 100644 --- a/src/battle/action_cmd/body_slam.c +++ b/src/battle/action_cmd/body_slam.c @@ -8,7 +8,7 @@ extern s32 D_8029275C; extern s32 D_80292BAC; extern s32 D_80294320; -ApiStatus N(CreateHudElements)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; BattleStatus* battleStatus = &gBattleStatus; HudElement* hudElement; @@ -20,7 +20,7 @@ ApiStatus N(CreateHudElements)(ScriptInstance* script, s32 isInitialCall) { battleStatus->actionSuccess = 0; return ApiStatus_DONE2; } - + func_80268858(); actionCommandStatus->actionCommandID = ACTION_COMMAND_BODY_SLAM; actionCommandStatus->unk_61 = 1; diff --git a/src/battle/action_cmd/break_free.c b/src/battle/action_cmd/break_free.c index 6f2f1c72f6..1a213f50c5 100644 --- a/src/battle/action_cmd/break_free.c +++ b/src/battle/action_cmd/break_free.c @@ -8,7 +8,7 @@ extern s32 D_80108AFC; extern s32 D_802928F8; extern s32 D_80109244; -ApiStatus func_802A9000_4233F0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; BattleStatus* battleStatus = &gBattleStatus; HudElement* hudElement; @@ -16,7 +16,7 @@ ApiStatus func_802A9000_4233F0(ScriptInstance* script, s32 isInitialCall) { battleStatus->unk_82 = 0; battleStatus->unk_434 = &D_80294220; battleStatus->unk_86 = 127; - + if (battleStatus->unk_83 == 0) { battleStatus->actionSuccess = 0; return ApiStatus_DONE2; diff --git a/src/battle/action_cmd/flee.c b/src/battle/action_cmd/flee.c index 63f4db30b9..b092e41c97 100644 --- a/src/battle/action_cmd/flee.c +++ b/src/battle/action_cmd/flee.c @@ -13,7 +13,7 @@ extern s32 D_80108B80; extern s32 D_802A9920; extern s32 D_802A9920; -ApiStatus func_802A9000_422AD0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; @@ -76,7 +76,7 @@ ApiStatus func_802A9000_422AD0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802A92A0_422D70(ScriptInstance* script) { +ApiStatus func_802A92A0_422D70(Evt* script) { Bytecode* args = script->ptrReadPos; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; BattleStatus* battleStatus = &gBattleStatus; @@ -100,7 +100,7 @@ void func_802A9378_422E48(void) { HudElement* hudElement; BattleStatus* battleStatus = &gBattleStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; - + switch (actionCommandStatus->state) { case 0: hudElement = actionCommandStatus->hudElements[0]; @@ -108,25 +108,25 @@ void func_802A9378_422E48(void) { if (actionCommandStatus->unk_61 != 0) { clear_hud_element_flags(hudElement, 2); } - + hudElement = actionCommandStatus->hudElements[1]; set_hud_element_alpha(hudElement, 0xFF); if (actionCommandStatus->unk_61 != 0) { clear_hud_element_flags(hudElement, 2); } - + hudElement = actionCommandStatus->hudElements[2]; set_hud_element_alpha(hudElement, 0xFF); if (actionCommandStatus->unk_61 != 0) { clear_hud_element_flags(hudElement, 2); } - + hudElement = actionCommandStatus->hudElements[3]; set_hud_element_alpha(hudElement, 0xFF); if (actionCommandStatus->unk_61 != 0) { clear_hud_element_flags(hudElement, 2); } - + actionCommandStatus->state = 1; break; case 1: @@ -158,7 +158,7 @@ void func_802A9378_422E48(void) { set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28); clear_hud_element_flags(hudElement, 2); } - + battleStatus->actionSuccess = actionCommandStatus->unk_44 / 100; if (actionCommandStatus->unk_54 == 0) { if (battleStatus->actionSuccess >= (100 - actionCommandStatus->unk_46)) { @@ -182,7 +182,7 @@ void func_802A9378_422E48(void) { func_80268C9C(); break; } - + switch (actionCommandStatus->state) { case 1: case 10: diff --git a/src/battle/action_cmd/hammer.c b/src/battle/action_cmd/hammer.c index b766b9d14f..824e6469fe 100644 --- a/src/battle/action_cmd/hammer.c +++ b/src/battle/action_cmd/hammer.c @@ -14,7 +14,7 @@ extern s32 D_80292A2C; extern s32 D_802941E0; -ApiStatus N(CreateHudElements)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; BattleStatus* battleStatus = &gBattleStatus; HudElement* hudElement; @@ -82,7 +82,7 @@ ApiStatus N(CreateHudElements)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802A9258_422258(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A9258_422258(Evt* script, s32 isInitialCall) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; diff --git a/src/battle/action_cmd/jump.c b/src/battle/action_cmd/jump.c index 7dd94bdbfa..4b0c46165c 100644 --- a/src/battle/action_cmd/jump.c +++ b/src/battle/action_cmd/jump.c @@ -9,7 +9,7 @@ extern s32 D_80108B28; extern s32 D_80292A2C; extern s32 D_80108B54; -ApiStatus N(CreateHudElements)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { HudElement* hudElement; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; @@ -21,7 +21,7 @@ ApiStatus N(CreateHudElements)(ScriptInstance* script, s32 isInitialCall) { gBattleStatus.actionSuccess = 0; return ApiStatus_DONE2; } - + func_80268858(); actionCommandStatus->actionCommandID = ACTION_COMMAND_JUMP; actionCommandStatus->hudElementX = -48; @@ -46,7 +46,7 @@ ApiStatus N(CreateHudElements)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802A9120_421B10(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A9120_421B10(Evt* script, s32 isInitialCall) { HudElement* hudElement; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; @@ -97,7 +97,7 @@ void N(update)(void) { if (battleStatus->unk_83 == 2) { btl_set_popup_duration(99); } - + actionCommandStatus->hudElementX += 20; if (actionCommandStatus->hudElementX > 50) { actionCommandStatus->hudElementX = 50; @@ -135,7 +135,7 @@ void N(update)(void) { actionCommandStatus->unk_4E -= 1; break; } - + actionCommandStatus->unk_54 = battleStatus->unk_434[actionCommandStatus->unk_50]; battleStatus->actionSuccess = -1; actionCommandStatus->state = 11; @@ -153,12 +153,12 @@ void N(update)(void) { if (actionCommandStatus->unk_61 != 0) { set_hud_element_flags(hudElement, 2); } - } + } } if (battleStatus->actionSuccess < 0) { if ((((battleStatus->currentButtonsPressed & 0x8000) != 0) && - (actionCommandStatus->unk_60 == 0)) || + (actionCommandStatus->unk_60 == 0)) || (actionCommandStatus->autoSucceed != 0)) { battleStatus->actionSuccess = 1; battleStatus->unk_86 = 1; diff --git a/src/battle/action_cmd/stop_leech.c b/src/battle/action_cmd/stop_leech.c index 92259cacd0..246f5f9dba 100644 --- a/src/battle/action_cmd/stop_leech.c +++ b/src/battle/action_cmd/stop_leech.c @@ -41,7 +41,7 @@ ApiStatus func_802A9000_425590(void) { return ApiStatus_DONE2; } -ApiStatus func_802A9110_4256A0(ScriptInstance* script) { +ApiStatus func_802A9110_4256A0(Evt* script) { Bytecode* args = script->ptrReadPos; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; BattleStatus* battleStatus = &gBattleStatus; diff --git a/src/battle/action_cmd/tidal_wave.c b/src/battle/action_cmd/tidal_wave.c index a8a1108af4..cb4f0c2c06 100644 --- a/src/battle/action_cmd/tidal_wave.c +++ b/src/battle/action_cmd/tidal_wave.c @@ -6,7 +6,7 @@ extern s32 D_80108AFC; extern s32 D_80108B28; extern s32 D_802944A0; -ApiStatus N(CreateHudElements)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; BattleStatus* battleStatus = &gBattleStatus; s32 hudElement; @@ -47,7 +47,7 @@ ApiStatus N(CreateHudElements)(ScriptInstance* script, s32 isInitialCall) { } } -ApiStatus func_802A9138_42C828(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A9138_42C828(Evt* script, s32 isInitialCall) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; diff --git a/src/battle/action_cmd/water_block.c b/src/battle/action_cmd/water_block.c index 95f5ac296c..878c8ab7df 100644 --- a/src/battle/action_cmd/water_block.c +++ b/src/battle/action_cmd/water_block.c @@ -5,7 +5,7 @@ // requires .data migration INCLUDE_ASM(s32, "battle/action_cmd/water_block", func_802A9000_42A4F0); -ApiStatus func_802A9398_42A888(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A9398_42A888(Evt* script, s32 isInitialCall) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; diff --git a/src/battle/action_cmd/whirlwind.c b/src/battle/action_cmd/whirlwind.c index 967588c4d0..e9acd7056b 100644 --- a/src/battle/action_cmd/whirlwind.c +++ b/src/battle/action_cmd/whirlwind.c @@ -4,7 +4,7 @@ // requires .data migration #ifdef NON_MATCHING -ApiStatus func_802A9000_423C70(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; diff --git a/src/battle/area_arn/4FF010.c b/src/battle/area_arn/4FF010.c index 656a16afb3..ba0ac59464 100644 --- a/src/battle/area_arn/4FF010.c +++ b/src/battle/area_arn/4FF010.c @@ -6,7 +6,7 @@ #include "common/StartRumbleWithParams.inc.c" #define NAMESPACE b_area_arn -ApiStatus func_80218618_4FF068(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218618_4FF068(Evt* script, s32 isInitialCall) { s32 temp_s0 = get_variable(script, *script->ptrReadPos); Actor* actor = get_actor(script->owner1.actorID); diff --git a/src/battle/area_dig/6DE3F0.c b/src/battle/area_dig/6DE3F0.c index 784dedace2..9a7466b288 100644 --- a/src/battle/area_dig/6DE3F0.c +++ b/src/battle/area_dig/6DE3F0.c @@ -6,7 +6,7 @@ extern s32 D_8008F0A0; -ApiStatus func_80218644_6DE404(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218644_6DE404(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; SelectableTarget* selectableTarget; diff --git a/src/battle/area_dig/6DE4A0.c b/src/battle/area_dig/6DE4A0.c index 89a0e0d3f7..9ed64f84f0 100644 --- a/src/battle/area_dig/6DE4A0.c +++ b/src/battle/area_dig/6DE4A0.c @@ -5,7 +5,7 @@ extern s32 D_8008F2E4; extern s32 D_8008FC44; -ApiStatus func_802186E0_6DE4A0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802186E0_6DE4A0(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; SelectableTarget* selectableTarget; @@ -24,7 +24,7 @@ ApiStatus func_802186E0_6DE4A0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80218770_6DE530(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218770_6DE530(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partner = battleStatus->partnerActor; SelectableTarget* selectableTarget; @@ -44,7 +44,7 @@ ApiStatus func_80218770_6DE530(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802187F0_6DE5B0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802187F0_6DE5B0(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; s32 selectedItemID; diff --git a/src/battle/area_flo/5B14B0.c b/src/battle/area_flo/5B14B0.c index 42708fca0f..0fbb7378bf 100644 --- a/src/battle/area_flo/5B14B0.c +++ b/src/battle/area_flo/5B14B0.c @@ -4,7 +4,7 @@ #include "common/UnkBattleFunc1.inc.c" -ApiStatus func_802180CC_5B157C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802180CC_5B157C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 prevX = get_variable(script, *args++); s32 prevZ = get_variable(script, *args++); diff --git a/src/battle/area_flo/5B28D0.c b/src/battle/area_flo/5B28D0.c index c36346c937..a8411252c0 100644 --- a/src/battle/area_flo/5B28D0.c +++ b/src/battle/area_flo/5B28D0.c @@ -15,7 +15,7 @@ extern char* D_80233870_5CCD20[11]; extern char* D_80233950_5CCE00[11]; -ApiStatus func_80219420_5B28D0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80219420_5B28D0(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -31,7 +31,7 @@ ApiStatus func_80219420_5B28D0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802194E0_5B2990(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802194E0_5B2990(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -47,7 +47,7 @@ ApiStatus func_802194E0_5B2990(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802195A0_5B2A50(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802195A0_5B2A50(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -63,7 +63,7 @@ ApiStatus func_802195A0_5B2A50(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80219660_5B2B10(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80219660_5B2B10(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -79,7 +79,7 @@ ApiStatus func_80219660_5B2B10(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80219720_5B2BD0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80219720_5B2BD0(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -95,7 +95,7 @@ ApiStatus func_80219720_5B2BD0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802197E0_5B2C90(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802197E0_5B2C90(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -111,7 +111,7 @@ ApiStatus func_802197E0_5B2C90(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802198A0_5B2D50(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802198A0_5B2D50(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -135,7 +135,7 @@ ApiStatus func_802198A0_5B2D50(ScriptInstance* script, s32 isInitialCall) { #include "common/UnkFloatFunc.inc.c" #define NAMESPACE b_area_flo -ApiStatus func_80219C80_5B3130(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80219C80_5B3130(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -151,7 +151,7 @@ ApiStatus func_80219C80_5B3130(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80219D40_5B31F0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80219D40_5B31F0(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -167,7 +167,7 @@ ApiStatus func_80219D40_5B31F0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80219E00_5B32B0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80219E00_5B32B0(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; diff --git a/src/battle/area_flo2/5CF2D0.c b/src/battle/area_flo2/5CF2D0.c index 10cce3550d..eb49c9521c 100644 --- a/src/battle/area_flo2/5CF2D0.c +++ b/src/battle/area_flo2/5CF2D0.c @@ -18,7 +18,7 @@ extern char* D_802350D4_5EB764[11]; #include "common/UnkFloatFunc.inc.c" #define NAMESPACE b_area_flo2 -ApiStatus func_80218DD0_5CF460(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218DD0_5CF460(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -34,7 +34,7 @@ ApiStatus func_80218DD0_5CF460(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80218E90_5CF520(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218E90_5CF520(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -50,7 +50,7 @@ ApiStatus func_80218E90_5CF520(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80218F50_5CF5E0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218F50_5CF5E0(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -66,7 +66,7 @@ ApiStatus func_80218F50_5CF5E0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80219010_5CF6A0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80219010_5CF6A0(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -82,7 +82,7 @@ ApiStatus func_80219010_5CF6A0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802190D0_5CF760(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802190D0_5CF760(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -98,7 +98,7 @@ ApiStatus func_802190D0_5CF760(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80219190_5CF820(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80219190_5CF820(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -114,7 +114,7 @@ ApiStatus func_80219190_5CF820(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80219250_5CF8E0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80219250_5CF8E0(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -138,7 +138,7 @@ ApiStatus func_80219250_5CF8E0(ScriptInstance* script, s32 isInitialCall) { #include "common/UnkFloatFunc.inc.c" #define NAMESPACE b_area_flo2 -ApiStatus func_80219630_5CFCC0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80219630_5CFCC0(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -154,7 +154,7 @@ ApiStatus func_80219630_5CFCC0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802196F0_5CFD80(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802196F0_5CFD80(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; @@ -170,7 +170,7 @@ ApiStatus func_802196F0_5CFD80(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802197B0_5CFE40(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802197B0_5CFE40(Evt* script, s32 isInitialCall) { s32 var1 = 0; u32 i; diff --git a/src/battle/area_hos/47F0B0.c b/src/battle/area_hos/47F0B0.c index 0ff4e7c078..b13342ff16 100644 --- a/src/battle/area_hos/47F0B0.c +++ b/src/battle/area_hos/47F0B0.c @@ -2,7 +2,7 @@ #define NAMESPACE b_area_hos -ApiStatus func_80218000_47F0B0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218000_47F0B0(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; playerData->currentPartner = PARTNER_GOOMBARIO; diff --git a/src/battle/area_iwa/4D01F0.c b/src/battle/area_iwa/4D01F0.c index 28ef9ed73a..f9a3e74875 100644 --- a/src/battle/area_iwa/4D01F0.c +++ b/src/battle/area_iwa/4D01F0.c @@ -3,7 +3,7 @@ #define NAMESPACE b_area_iwa -ApiStatus N(SetSpinSmashable)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetSpinSmashable)(Evt* script, s32 isInitialCall) { s32 canSpinSmash = get_variable(script, *script->ptrReadPos); Actor* actor = get_actor(script->owner1.actorID); diff --git a/src/battle/area_kmr_part_1/actor/anglestuff.inc.c b/src/battle/area_kmr_part_1/actor/anglestuff.inc.c index fedd678198..9638d468e5 100644 --- a/src/battle/area_kmr_part_1/actor/anglestuff.inc.c +++ b/src/battle/area_kmr_part_1/actor/anglestuff.inc.c @@ -55,7 +55,7 @@ u32 N(angle_calculate)(f32 x, f32 y) { return ret; } -ApiStatus N(AngleCalculate)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(AngleCalculate)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/battle/area_kmr_part_1/actor/goomba.c b/src/battle/area_kmr_part_1/actor/goomba.c index 22e052c22b..418b6c6e22 100644 --- a/src/battle/area_kmr_part_1/actor/goomba.c +++ b/src/battle/area_kmr_part_1/actor/goomba.c @@ -36,7 +36,7 @@ s32 N(statusTable_8021961C)[] = { }; s32 N(idleAnimations_80219714)[]; -Script N(init_802197AC); +EvtSource N(init_802197AC); ActorPartDesc N(partsTable_802196C8)[] = { { @@ -102,17 +102,17 @@ s32 N(idleAnimations_80219760)[] = { STATUS_END, }; -Script N(takeTurn_8021A300); -Script N(idle_802197F8); -Script N(handleEvent_80219AD4); +EvtSource N(takeTurn_8021A300); +EvtSource N(idle_802197F8); +EvtSource N(handleEvent_80219AD4); -Script N(init_802197AC) = SCRIPT({ +EvtSource N(init_802197AC) = SCRIPT({ BindTakeTurn(ACTOR_SELF, N(takeTurn_8021A300)); BindIdle(ACTOR_SELF, N(idle_802197F8)); BindHandleEvent(ACTOR_SELF, N(handleEvent_80219AD4)); }); -Script N(idle_802197F8) = SCRIPT({ +EvtSource N(idle_802197F8) = SCRIPT({ 10: RandInt(80, SI_VAR(0)); SI_VAR(0) += 80; @@ -160,7 +160,7 @@ Script N(idle_802197F8) = SCRIPT({ goto 10; }); -Script N(handleEvent_80219AD4) = SCRIPT({ +EvtSource N(handleEvent_80219AD4) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, FALSE); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); @@ -286,7 +286,7 @@ Script N(handleEvent_80219AD4) = SCRIPT({ #include "anglestuff.inc.c" -Script N(takeTurn_8021A300) = SCRIPT({ +EvtSource N(takeTurn_8021A300) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, FALSE); SetTargetActor(ACTOR_SELF, ACTOR_PLAYER); diff --git a/src/battle/area_kmr_part_1/actor/paragoomba.c b/src/battle/area_kmr_part_1/actor/paragoomba.c index e78db761c9..b58dc60754 100644 --- a/src/battle/area_kmr_part_1/actor/paragoomba.c +++ b/src/battle/area_kmr_part_1/actor/paragoomba.c @@ -6,7 +6,7 @@ #define NAMESPACE b_area_kmr_part_1_paragoomba -ApiStatus N(AngleCalculate)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(AngleCalculate)(Evt* script, s32 isInitialCall); s32 N(defenseTable_8021CB00)[] = { ELEMENT_NORMAL, 0, @@ -72,7 +72,7 @@ s32 N(idleAnimations_8021E4EC)[]; s32 N(idleAnimations_8021CD28)[]; s32 N(idleAnimations_8021CDC0)[]; s32 N(idleAnimations_8021CDCC)[]; -Script N(init_8021CDD8); +EvtSource N(init_8021CDD8); ActorPartDesc N(partsTable_8021CC70)[] = { { @@ -184,17 +184,17 @@ s32 N(idleAnimations_8021CDCC)[] = { STATUS_END, }; -Script N(takeTurn_8021D74C); -Script N(idle_8021CE24); -Script N(handleEvent_8021D158); +EvtSource N(takeTurn_8021D74C); +EvtSource N(idle_8021CE24); +EvtSource N(handleEvent_8021D158); -Script N(init_8021CDD8) = SCRIPT({ +EvtSource N(init_8021CDD8) = SCRIPT({ BindTakeTurn(ACTOR_SELF, N(takeTurn_8021D74C)); BindIdle(ACTOR_SELF, N(idle_8021CE24)); BindHandleEvent(ACTOR_SELF, N(handleEvent_8021D158)); }); -Script N(idle_8021CE24) = SCRIPT({ +EvtSource N(idle_8021CE24) = SCRIPT({ 10: RandInt(80, SI_VAR(0)); SI_VAR(0) += 80; @@ -240,7 +240,7 @@ Script N(idle_8021CE24) = SCRIPT({ goto 10; }); -Script N(8021D0E0) = SCRIPT({ +EvtSource N(8021D0E0) = SCRIPT({ ResetAllActorSounds(ACTOR_SELF); SetGoalToHome(ACTOR_SELF); SetActorSpeed(ACTOR_SELF, 7.0); @@ -248,9 +248,9 @@ Script N(8021D0E0) = SCRIPT({ SetAnimation(ACTOR_SELF, 2, NPC_ANIM(paragoomba, default, idle)); }); -Script N(8021DF64); +EvtSource N(8021DF64); -Script N(handleEvent_8021D158) = SCRIPT({ +EvtSource N(handleEvent_8021D158) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, 0); GetLastEvent(ACTOR_SELF, SI_VAR(0)); @@ -370,7 +370,7 @@ Script N(handleEvent_8021D158) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, TRUE); }); -Script N(takeTurn_8021D74C) = SCRIPT({ +EvtSource N(takeTurn_8021D74C) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, 0); SetTargetActor(ACTOR_SELF, ACTOR_PLAYER); @@ -479,11 +479,11 @@ Script N(takeTurn_8021D74C) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, TRUE); }); -Script N(8021E584); +EvtSource N(8021E584); #include "common/StartRumbleWithParams.inc.c" -Script N(8021DF64) = SCRIPT({ +EvtSource N(8021DF64) = SCRIPT({ func_8027D32C(-127); SetPartFlags(ACTOR_SELF, 2, 131077); SetPartFlags(ACTOR_SELF, 3, 1179652); @@ -577,17 +577,17 @@ s32 N(idleAnimations_8021E538)[] = { STATUS_END, }; -Script N(takeTurn_8021F0D8); -Script N(idle_8021E5D0); -Script N(handleEvent_8021E8AC); +EvtSource N(takeTurn_8021F0D8); +EvtSource N(idle_8021E5D0); +EvtSource N(handleEvent_8021E8AC); -Script N(8021E584) = SCRIPT({ +EvtSource N(8021E584) = SCRIPT({ BindTakeTurn(ACTOR_SELF, N(takeTurn_8021F0D8)); BindIdle(ACTOR_SELF, N(idle_8021E5D0)); BindHandleEvent(ACTOR_SELF, N(handleEvent_8021E8AC)); }); -Script N(idle_8021E5D0) = SCRIPT({ +EvtSource N(idle_8021E5D0) = SCRIPT({ 10: RandInt(80, SI_VAR(0)); SI_VAR(0) += 80; @@ -635,7 +635,7 @@ Script N(idle_8021E5D0) = SCRIPT({ goto 10; }); -Script N(handleEvent_8021E8AC) = SCRIPT({ +EvtSource N(handleEvent_8021E8AC) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, FALSE); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); @@ -761,7 +761,7 @@ Script N(handleEvent_8021E8AC) = SCRIPT({ #include "anglestuff.inc.c" -Script N(takeTurn_8021F0D8) = SCRIPT({ +EvtSource N(takeTurn_8021F0D8) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, FALSE); SetTargetActor(ACTOR_SELF, ACTOR_PLAYER); diff --git a/src/battle/area_kmr_part_1/actor/spiked_goomba.c b/src/battle/area_kmr_part_1/actor/spiked_goomba.c index b1ae3f3a65..b100bdea8e 100644 --- a/src/battle/area_kmr_part_1/actor/spiked_goomba.c +++ b/src/battle/area_kmr_part_1/actor/spiked_goomba.c @@ -36,7 +36,7 @@ s32 N(statusTable_8021AFDC)[] = { }; s32 N(idleAnimations_8021B0D4)[]; -Script N(init_8021B16C); +EvtSource N(init_8021B16C); ActorPartDesc N(partsTable_8021B088)[] = { { @@ -102,17 +102,17 @@ s32 N(idleAnimations_8021B120)[] = { STATUS_END, }; -Script N(takeTurn_8021BDDC); -Script N(idle_8021B1B8); -Script N(handleEvent_8021B494); +EvtSource N(takeTurn_8021BDDC); +EvtSource N(idle_8021B1B8); +EvtSource N(handleEvent_8021B494); -Script N(init_8021B16C) = SCRIPT({ +EvtSource N(init_8021B16C) = SCRIPT({ BindTakeTurn(ACTOR_SELF, N(takeTurn_8021BDDC)); BindIdle(ACTOR_SELF, N(idle_8021B1B8)); BindHandleEvent(ACTOR_SELF, N(handleEvent_8021B494)); }); -Script N(idle_8021B1B8) = SCRIPT({ +EvtSource N(idle_8021B1B8) = SCRIPT({ 10: RandInt(80, SI_VAR(0)); SI_VAR(0) += 80; @@ -160,7 +160,7 @@ Script N(idle_8021B1B8) = SCRIPT({ goto 10; }); -Script N(handleEvent_8021B494) = SCRIPT({ +EvtSource N(handleEvent_8021B494) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, FALSE); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); @@ -302,7 +302,7 @@ Script N(handleEvent_8021B494) = SCRIPT({ #include "anglestuff.inc.c" -Script N(takeTurn_8021BDDC) = SCRIPT({ +EvtSource N(takeTurn_8021BDDC) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, FALSE); SetTargetActor(ACTOR_SELF, ACTOR_PLAYER); diff --git a/src/battle/area_kmr_part_1/stage/clouds.inc.c b/src/battle/area_kmr_part_1/stage/clouds.inc.c index 36c7055a8f..f5b10ab95a 100644 --- a/src/battle/area_kmr_part_1/stage/clouds.inc.c +++ b/src/battle/area_kmr_part_1/stage/clouds.inc.c @@ -1,6 +1,6 @@ #include "common/UnkAngleFunc2.inc.c" -Script N(clouds1) = SCRIPT({ +EvtSource N(clouds1) = SCRIPT({ SI_VAR(10) = SI_VAR(0); SI_VAR(7) = SI_VAR(2); SI_VAR(7) *= 10; @@ -16,7 +16,7 @@ Script N(clouds1) = SCRIPT({ goto 0; }); -Script N(clouds2) = SCRIPT({ +EvtSource N(clouds2) = SCRIPT({ SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(3); SI_VAR(12) = SI_VAR(4); @@ -36,7 +36,7 @@ Script N(clouds2) = SCRIPT({ goto 0; }); -Script N(clouds3) = SCRIPT({ +EvtSource N(clouds3) = SCRIPT({ SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(3); SI_VAR(12) = SI_VAR(4); diff --git a/src/battle/area_kmr_part_1/stage/kmr_02.c b/src/battle/area_kmr_part_1/stage/kmr_02.c index 749bd3ca63..44f973a649 100644 --- a/src/battle/area_kmr_part_1/stage/kmr_02.c +++ b/src/battle/area_kmr_part_1/stage/kmr_02.c @@ -3,11 +3,11 @@ #define NAMESPACE b_area_kmr_part_1_kmr_02 -Script N(beforeBattle_8021FDA0) = SCRIPT({ +EvtSource N(beforeBattle_8021FDA0) = SCRIPT({ SetSpriteShading(-1); }); -Script N(afterBattle_8021FDC0) = SCRIPT({ +EvtSource N(afterBattle_8021FDC0) = SCRIPT({ }); Stage NAMESPACE = { diff --git a/src/battle/area_kmr_part_1/stage/kmr_03.c b/src/battle/area_kmr_part_1/stage/kmr_03.c index 882195190a..c5b0075596 100644 --- a/src/battle/area_kmr_part_1/stage/kmr_03.c +++ b/src/battle/area_kmr_part_1/stage/kmr_03.c @@ -5,7 +5,7 @@ #include "clouds.inc.c" -Script N(beforeBattle_80220188) = SCRIPT({ +EvtSource N(beforeBattle_80220188) = SCRIPT({ SetSpriteShading(-1); SI_VAR(0) = 1; // model @@ -17,7 +17,7 @@ Script N(beforeBattle_80220188) = SCRIPT({ spawn N(clouds1); }); -Script N(afterBattle_80220200) = SCRIPT({ +EvtSource N(afterBattle_80220200) = SCRIPT({ }); s32 N(foregroundModelList_80220210)[] = { diff --git a/src/battle/area_kmr_part_1/stage/kmr_04.c b/src/battle/area_kmr_part_1/stage/kmr_04.c index 89be244f6c..a51f198f18 100644 --- a/src/battle/area_kmr_part_1/stage/kmr_04.c +++ b/src/battle/area_kmr_part_1/stage/kmr_04.c @@ -5,7 +5,7 @@ #include "clouds.inc.c" -Script N(beforeBattle_802205D8) = SCRIPT({ +EvtSource N(beforeBattle_802205D8) = SCRIPT({ SetSpriteShading(-1); SI_VAR(0) = 1; @@ -17,7 +17,7 @@ Script N(beforeBattle_802205D8) = SCRIPT({ spawn N(clouds1); }); -Script N(afterBattle_80220650) = SCRIPT({ +EvtSource N(afterBattle_80220650) = SCRIPT({ }); diff --git a/src/battle/area_kmr_part_1/stage/kmr_05.c b/src/battle/area_kmr_part_1/stage/kmr_05.c index 0ba7e5466b..b359c897b6 100644 --- a/src/battle/area_kmr_part_1/stage/kmr_05.c +++ b/src/battle/area_kmr_part_1/stage/kmr_05.c @@ -5,12 +5,12 @@ #include "clouds.inc.c" -Script N(beforeBattle_80220A28) = SCRIPT({ +EvtSource N(beforeBattle_80220A28) = SCRIPT({ SetSpriteShading(-1); EnableModel(27, 0); }); -Script N(afterBattle_80220A5C) = SCRIPT({ +EvtSource N(afterBattle_80220A5C) = SCRIPT({ }); diff --git a/src/battle/area_kmr_part_1/stage/kmr_06.c b/src/battle/area_kmr_part_1/stage/kmr_06.c index ebeeaba784..9bbc7ca809 100644 --- a/src/battle/area_kmr_part_1/stage/kmr_06.c +++ b/src/battle/area_kmr_part_1/stage/kmr_06.c @@ -6,7 +6,7 @@ #include "clouds.inc.c" #include "common/UnkFogFunc.inc.c" -Script N(beforeBattle_80220E28) = SCRIPT({ +EvtSource N(beforeBattle_80220E28) = SCRIPT({ SetSpriteShading(-1); N(UnkFogFunc)(); @@ -20,7 +20,7 @@ Script N(beforeBattle_80220E28) = SCRIPT({ spawn N(clouds1); }); -Script N(afterBattle_80220EAC) = SCRIPT({ +EvtSource N(afterBattle_80220EAC) = SCRIPT({ }); diff --git a/src/battle/area_kmr_part_2/439A90.c b/src/battle/area_kmr_part_2/439A90.c index 673add4334..303851902c 100644 --- a/src/battle/area_kmr_part_2/439A90.c +++ b/src/battle/area_kmr_part_2/439A90.c @@ -23,7 +23,7 @@ #include "common/DivActorLevel4.inc.c" #define NAMESPACE b_area_kmr_part_2 -ApiStatus func_80218A60_43A4F0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218A60_43A4F0(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/battle/area_kmr_part_3/447D50.c b/src/battle/area_kmr_part_3/447D50.c index 273e70bac2..6060bd1879 100644 --- a/src/battle/area_kmr_part_3/447D50.c +++ b/src/battle/area_kmr_part_3/447D50.c @@ -8,7 +8,7 @@ extern s32 D_80104A28; #include "common/UnkBattleFunc1.inc.c" #define NAMESPACE b_area_kmr_part_3 -ApiStatus func_802189DC_447E1C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802189DC_447E1C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; f32 posX = get_float_variable(script, *args++); f32 posY = get_float_variable(script, *args++); diff --git a/src/battle/area_omo/512E50.c b/src/battle/area_omo/512E50.c index 750c5cbce8..485b686635 100644 --- a/src/battle/area_omo/512E50.c +++ b/src/battle/area_omo/512E50.c @@ -10,12 +10,12 @@ INCLUDE_ASM(s32, "battle/area_omo/512E50", func_80218B38_513108); /// checks if all actions are available. /// used by Spy Guys. -ApiStatus func_80218CF4_5132C4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218CF4_5132C4(Evt* script, s32 isInitialCall) { BattleStatus* status = &gBattleStatus; Bytecode* args = script->ptrReadPos; - if (status->hammerLossTurns == -1 || - status->jumpLossTurns == -1 || + if (status->hammerLossTurns == -1 || + status->jumpLossTurns == -1 || status->itemLossTurns == -1 ) { set_variable(script, *args++, 0); diff --git a/src/battle/area_omo3/5573E0.c b/src/battle/area_omo3/5573E0.c index c57ca44e76..33cf18cbea 100644 --- a/src/battle/area_omo3/5573E0.c +++ b/src/battle/area_omo3/5573E0.c @@ -2,9 +2,9 @@ #define NAMESPACE b_area_omo3 -ApiStatus func_80218000_5573E0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218000_5573E0(Evt* script, s32 isInitialCall) { get_actor(script->owner1.actorID); - + set_screen_overlay_params_back(13, 220.0f); set_screen_overlay_alpha(1, 200.0f); return ApiStatus_DONE2; diff --git a/src/battle/area_trd_part_3/4CF1B0.c b/src/battle/area_trd_part_3/4CF1B0.c index 357f61f2fe..c60f43108e 100644 --- a/src/battle/area_trd_part_3/4CF1B0.c +++ b/src/battle/area_trd_part_3/4CF1B0.c @@ -4,7 +4,7 @@ extern s32 D_80219040; -ApiStatus func_80218000_4CF1B0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218000_4CF1B0(Evt* script, s32 isInitialCall) { Actor* actor = get_actor(script->owner1.actorID); s32* sym; @@ -20,29 +20,29 @@ ApiStatus func_80218000_4CF1B0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus func_802180C8_4CF278(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802180C8_4CF278(Evt* script, s32 isInitialCall) { status_menu_start_blinking_sp(); return ApiStatus_DONE2; } -ApiStatus func_802180E8_4CF298(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802180E8_4CF298(Evt* script, s32 isInitialCall) { status_menu_stop_blinking_sp(); return ApiStatus_DONE2; } -ApiStatus func_80218108_4CF2B8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218108_4CF2B8(Evt* script, s32 isInitialCall) { status_menu_start_blinking_hp(); status_menu_start_blinking_fp(); return ApiStatus_DONE2; } -ApiStatus func_80218130_4CF2E0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218130_4CF2E0(Evt* script, s32 isInitialCall) { status_menu_stop_blinking_hp(); status_menu_stop_blinking_fp(); return ApiStatus_DONE2; } -ApiStatus func_80218158_4CF308(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218158_4CF308(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; battleStatus->unk_4C = 0; @@ -51,7 +51,7 @@ ApiStatus func_80218158_4CF308(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80218170_4CF320(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80218170_4CF320(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; if (isInitialCall) { @@ -68,7 +68,7 @@ ApiStatus func_80218170_4CF320(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802181B4_4CF364(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802181B4_4CF364(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; if (isInitialCall) { @@ -85,7 +85,7 @@ ApiStatus func_802181B4_4CF364(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802181F8_4CF3A8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802181F8_4CF3A8(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; playerData->specialBarsFilled += 32; diff --git a/src/battle/item/coconut.c b/src/battle/item/coconut.c index caf3a2b97c..572226824c 100644 --- a/src/battle/item/coconut.c +++ b/src/battle/item/coconut.c @@ -5,7 +5,7 @@ static HudElement* D_802A1E80; // Returns time to sleep for on $x. -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = gBattleStatus.playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -50,7 +50,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -62,7 +62,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { } /// Provide arg `TRUE` on `SI_VAR(1)` to disable refunding. -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); // Nice sleep 10; @@ -111,7 +111,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -134,7 +134,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -145,7 +145,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -156,7 +156,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -206,7 +206,7 @@ s32 N(modelCommandList)[] = { 0x00000004, 0x0000000D, 0x00000001, sizeof(N(displayList)) / sizeof(s32), &N(displayList), 0x00000002, 0x00000000, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_COCONUT; await N(UseItemWithEffect); diff --git a/src/battle/item/coconut.h b/src/battle/item/coconut.h index e8e14a02de..995ff0cb30 100644 --- a/src/battle/item/coconut.h +++ b/src/battle/item/coconut.h @@ -7,10 +7,10 @@ #undef NAMESPACE #define NAMESPACE battle_item_coconut -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); -ApiStatus func_802A1000_72F720(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802A11D4_72F8F4(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_802A1000_72F720(Evt* script, s32 isInitialCall); +ApiStatus func_802A11D4_72F8F4(Evt* script, s32 isInitialCall); #endif diff --git a/src/battle/item/dizzy_dial.c b/src/battle/item/dizzy_dial.c index f047076819..f1560a82ca 100644 --- a/src/battle/item/dizzy_dial.c +++ b/src/battle/item/dizzy_dial.c @@ -4,7 +4,7 @@ static s32* D_802A1CD0; static HudElement* D_802A1CD4; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -43,7 +43,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -59,7 +59,7 @@ void func_802A123C_727B4C(void) { func_80138D88(0, 0, 0x140, 0xF0, 160.0f); } -ApiStatus N(func_802A1270_727B80)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1270_727B80)(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[1]; f32 a; @@ -93,7 +93,7 @@ ApiStatus N(func_802A1270_727B80)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -140,7 +140,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -163,7 +163,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -174,7 +174,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -185,7 +185,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -196,7 +196,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_DIZZY_DIAL; await N(UseItemWithEffect); UseBattleCamPreset(2); diff --git a/src/battle/item/dizzy_dial.h b/src/battle/item/dizzy_dial.h index d6f11269b2..b0260cf411 100644 --- a/src/battle/item/dizzy_dial.h +++ b/src/battle/item/dizzy_dial.h @@ -7,11 +7,11 @@ #undef NAMESPACE #define NAMESPACE battle_item_dizzy_dial -ApiStatus func_8024ECF8(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80252B3C(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1270_727B80)(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall); +ApiStatus func_80252B3C(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1270_727B80)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/dried_shroom.c b/src/battle/item/dried_shroom.c index aeb39293c5..40e107d349 100644 --- a/src/battle/item/dried_shroom.c +++ b/src/battle/item/dried_shroom.c @@ -3,7 +3,7 @@ static HudElement* D_802A1A90; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_71CF1C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_71CF1C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -66,7 +66,7 @@ ApiStatus N(func_802A123C_71CF1C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A12FC_71CFDC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12FC_71CFDC)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; playerData->curHP++; @@ -76,7 +76,7 @@ ApiStatus N(func_802A12FC_71CFDC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -123,7 +123,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -146,7 +146,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -157,7 +157,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -168,7 +168,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -179,7 +179,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_DRIED_SHROOM; await N(UseItemWithEffect); await N(EatItem); diff --git a/src/battle/item/dried_shroom.h b/src/battle/item/dried_shroom.h index 30efd22daf..69b62d605a 100644 --- a/src/battle/item/dried_shroom.h +++ b/src/battle/item/dried_shroom.h @@ -7,13 +7,13 @@ #undef NAMESPACE #define NAMESPACE battle_item_dried_shroom -ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A123C_71CF1C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12FC_71CFDC)(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_802D7520(Evt* script, s32 isInitialCall); +ApiStatus func_802D75D8(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A123C_71CF1C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12FC_71CFDC)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(EatItem); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(EatItem); #endif diff --git a/src/battle/item/dusty_hammer.c b/src/battle/item/dusty_hammer.c index 69584958a2..2cef23ce0b 100644 --- a/src/battle/item/dusty_hammer.c +++ b/src/battle/item/dusty_hammer.c @@ -4,7 +4,7 @@ static HudElement* D_802A1E80; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -43,7 +43,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -55,7 +55,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -102,7 +102,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -125,7 +125,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -136,7 +136,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -147,7 +147,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -196,7 +196,7 @@ s32 N(modelCommandList)[] = { 0x00000004, 0x0000000D, 0x00000001, sizeof(N(displayList)) / sizeof(s32), &N(displayList), 0x00000002, 0x00000000, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) 0x86; await N(UseItemWithEffect); UseBattleCamPreset(3); diff --git a/src/battle/item/dusty_hammer.h b/src/battle/item/dusty_hammer.h index ea2ad4893c..41b94d3741 100644 --- a/src/battle/item/dusty_hammer.h +++ b/src/battle/item/dusty_hammer.h @@ -7,7 +7,7 @@ #undef NAMESPACE #define NAMESPACE battle_item_dusty_hammer -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/egg_missile.c b/src/battle/item/egg_missile.c index 3f01851d26..4ee0a30105 100644 --- a/src/battle/item/egg_missile.c +++ b/src/battle/item/egg_missile.c @@ -8,7 +8,7 @@ static HudElement* D_802A2890; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -47,7 +47,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -59,7 +59,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_71CF1C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_71CF1C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -71,7 +71,7 @@ ApiStatus N(func_802A123C_71CF1C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -118,7 +118,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -141,7 +141,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -152,7 +152,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -163,7 +163,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -291,7 +291,7 @@ s32 N(modelCommandList)[] = { 0x00000002, 0x00000000, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_EGG_MISSILE; await N(UseItemWithEffect); UseBattleCamPreset(3); diff --git a/src/battle/item/egg_missile.h b/src/battle/item/egg_missile.h index 909c909a6d..d21de8a32a 100644 --- a/src/battle/item/egg_missile.h +++ b/src/battle/item/egg_missile.h @@ -7,9 +7,9 @@ #undef NAMESPACE #define NAMESPACE battle_item_egg_missile -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); -ApiStatus N(func_802A123C_71CF1C)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_71CF1C)(Evt* script, s32 isInitialCall); #endif diff --git a/src/battle/item/electro_pop.c b/src/battle/item/electro_pop.c index c8ac5cd0f4..d676dbaefe 100644 --- a/src/battle/item/electro_pop.c +++ b/src/battle/item/electro_pop.c @@ -3,7 +3,7 @@ static HudElement* D_802A1D60; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_7307DC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_7307DC)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; @@ -63,7 +63,7 @@ ApiStatus N(func_802A123C_7307DC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A127C_73081C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A127C_73081C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -75,7 +75,7 @@ ApiStatus N(func_802A127C_73081C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A133C_7308DC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A133C_7308DC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -89,7 +89,7 @@ ApiStatus N(func_802A133C_7308DC)(ScriptInstance* script, s32 isInitialCall) { #include "common/AddHP.inc.c" -ApiStatus N(func_802A1450_7309F0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1450_7309F0)(Evt* script, s32 isInitialCall) { StaticItem* item = &gItemTable[ITEM_ELECTRO_POP]; PlayerData* playerData = &gPlayerData; @@ -103,7 +103,7 @@ ApiStatus N(func_802A1450_7309F0)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(AddFP)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(AddFP)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; s32 amt = get_variable(script, *script->ptrReadPos); @@ -119,7 +119,7 @@ ApiStatus N(AddFP)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A14F0_730A90)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A14F0_730A90)(Evt* script, s32 isInitialCall) { StaticItem* item = &gItemTable[ITEM_ELECTRO_POP]; PlayerData* playerData = &gPlayerData; @@ -133,7 +133,7 @@ ApiStatus N(func_802A14F0_730A90)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -180,7 +180,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -203,7 +203,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -214,7 +214,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -225,7 +225,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -236,7 +236,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_ELECTRO_POP; await N(UseItemWithEffect); await N(EatItem); diff --git a/src/battle/item/electro_pop.h b/src/battle/item/electro_pop.h index 0123fe9315..7e86f5d20f 100644 --- a/src/battle/item/electro_pop.h +++ b/src/battle/item/electro_pop.h @@ -7,16 +7,16 @@ #undef NAMESPACE #define NAMESPACE battle_item_electro_pop -ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_802D7520(Evt* script, s32 isInitialCall); +ApiStatus func_802D75D8(Evt* script, s32 isInitialCall); -ApiStatus N(func_802A123C_7307DC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A14F0_730A90)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A133C_7308DC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(AddFP)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_7307DC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A14F0_730A90)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A133C_7308DC)(Evt* script, s32 isInitialCall); +ApiStatus N(AddFP)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(EatItem); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(EatItem); #endif diff --git a/src/battle/item/fire_flower.c b/src/battle/item/fire_flower.c index f0d0d918bf..07024ce77b 100644 --- a/src/battle/item/fire_flower.c +++ b/src/battle/item/fire_flower.c @@ -3,7 +3,7 @@ static HudElement* D_802A1D70; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_716E9C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_716E9C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -67,7 +67,7 @@ ApiStatus N(func_802A123C_716E9C)(ScriptInstance* script, s32 isInitialCall) { #include "common/FadeBackgroundToBlack.inc.c" -ApiStatus N(func_802A1378_716FD8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1378_716FD8)(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 20; } @@ -83,7 +83,7 @@ ApiStatus N(func_802A1378_716FD8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -130,7 +130,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -153,7 +153,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -164,7 +164,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -175,7 +175,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -186,7 +186,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_FIRE_FLOWER; await N(UseItemWithEffect); N(FadeBackgroundToBlack)(); diff --git a/src/battle/item/fire_flower.h b/src/battle/item/fire_flower.h index b280e88ec5..7dddb3b901 100644 --- a/src/battle/item/fire_flower.h +++ b/src/battle/item/fire_flower.h @@ -7,11 +7,11 @@ #undef NAMESPACE #define NAMESPACE battle_item_fire_flower -ApiStatus N(FadeBackgroundToBlack)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A123C_716E9C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1378_716FD8)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A123C_716E9C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1378_716FD8)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/food.c b/src/battle/item/food.c index 5e9a9494a2..063dca7374 100644 --- a/src/battle/item/food.c +++ b/src/battle/item/food.c @@ -3,7 +3,7 @@ static HudElement* D_802A24D0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_73330C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_73330C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -68,7 +68,7 @@ ApiStatus N(func_802A123C_73330C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A12EC_7333BC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12EC_7333BC)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partner = battleStatus->partnerActor; Bytecode* args = script->ptrReadPos; @@ -92,7 +92,7 @@ ApiStatus N(func_802A12EC_7333BC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1378_733448)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1378_733448)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -104,7 +104,7 @@ ApiStatus N(func_802A1378_733448)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1438_733508)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1438_733508)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -120,7 +120,7 @@ ApiStatus N(func_802A1438_733508)(ScriptInstance* script, s32 isInitialCall) { #include "common/AddFP.inc.c" -ApiStatus N(func_802A15A0_733670)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A15A0_733670)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemIdx = get_variable(script, *args++); StaticItem* item = &gItemTable[itemIdx]; @@ -144,7 +144,7 @@ ApiStatus N(func_802A15A0_733670)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -191,7 +191,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -214,7 +214,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -225,7 +225,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -236,7 +236,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -247,7 +247,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(script6) = SCRIPT({ +EvtSource N(script6) = SCRIPT({ SetActorYaw(ACTOR_PLAYER, 30); sleep 1; SetActorYaw(ACTOR_PLAYER, 60); @@ -323,7 +323,7 @@ Script N(script6) = SCRIPT({ sleep 10; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(14) = SI_VAR(1); GetMenuSelection(SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(10) = SI_VAR(1); diff --git a/src/battle/item/food.h b/src/battle/item/food.h index 9a5e021578..0cce7fe43b 100644 --- a/src/battle/item/food.h +++ b/src/battle/item/food.h @@ -7,23 +7,23 @@ #undef NAMESPACE #define NAMESPACE battle_item_food -ApiStatus SetVirtualEntityFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetVirtualEntityPosition(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall); +ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall); +ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall); +ApiStatus func_802D7520(Evt* script, s32 isInitialCall); +ApiStatus func_802D75D8(Evt* script, s32 isInitialCall); -ApiStatus N(func_802A123C_73330C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12EC_7333BC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A15A0_733670)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1378_733448)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1438_733508)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(AddHP)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(AddFP)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_73330C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12EC_7333BC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A15A0_733670)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1378_733448)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1438_733508)(Evt* script, s32 isInitialCall); +ApiStatus N(AddHP)(Evt* script, s32 isInitialCall); +ApiStatus N(AddFP)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(UseItem); -Script N(EatItem); -Script N(DrinkItem); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(UseItem); +EvtSource N(EatItem); +EvtSource N(DrinkItem); #endif diff --git a/src/battle/item/fright_jar.c b/src/battle/item/fright_jar.c index d5c4996c9d..fd8afb1dd2 100644 --- a/src/battle/item/fright_jar.c +++ b/src/battle/item/fright_jar.c @@ -2,7 +2,7 @@ static HudElement* D_802A1CA0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -41,7 +41,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -55,7 +55,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { #include "common/FadeBackgroundToBlack.inc.c" -ApiStatus N(func_802A12D4_72BBE4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12D4_72BBE4)(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 20; } @@ -71,7 +71,7 @@ ApiStatus N(func_802A12D4_72BBE4)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -118,7 +118,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -141,7 +141,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -152,7 +152,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -163,7 +163,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -174,7 +174,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_FRIGHT_JAR; await N(UseItemWithEffect); N(FadeBackgroundToBlack)(); diff --git a/src/battle/item/fright_jar.h b/src/battle/item/fright_jar.h index 4c92404626..fe194b4c0b 100644 --- a/src/battle/item/fright_jar.h +++ b/src/battle/item/fright_jar.h @@ -7,11 +7,11 @@ #undef NAMESPACE #define NAMESPACE battle_item_fright_jar -ApiStatus func_80269EAC(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(FadeBackgroundToBlack)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12D4_72BBE4)(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_80269EAC(Evt* script, s32 isInitialCall); +ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12D4_72BBE4)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/hustle_drink.c b/src/battle/item/hustle_drink.c index 248e0eaf44..51d2e1d617 100644 --- a/src/battle/item/hustle_drink.c +++ b/src/battle/item/hustle_drink.c @@ -2,7 +2,7 @@ static HudElement* D_802A1E70; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -41,7 +41,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -53,7 +53,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_72619C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_72619C)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; @@ -79,13 +79,13 @@ ApiStatus N(func_802A123C_72619C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A12C4_726224)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12C4_726224)(Evt* script, s32 isInitialCall) { gBattleStatus.hustleTurns = 2; return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -132,7 +132,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -155,7 +155,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -166,7 +166,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -177,7 +177,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -188,7 +188,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_HUSTLE_DRINK; await N(UseItemWithEffect); await N(DrinkItem); diff --git a/src/battle/item/hustle_drink.h b/src/battle/item/hustle_drink.h index 3e921dfd5a..4305e178c8 100644 --- a/src/battle/item/hustle_drink.h +++ b/src/battle/item/hustle_drink.h @@ -7,12 +7,12 @@ #undef NAMESPACE #define NAMESPACE battle_item_hustle_drink -ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12C4_726224)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A123C_72619C)(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_802D7520(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12C4_726224)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A123C_72619C)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(DrinkItem); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(DrinkItem); #endif diff --git a/src/battle/item/insecticide_herb.c b/src/battle/item/insecticide_herb.c index 34a7886801..1cbeee2d55 100644 --- a/src/battle/item/insecticide_herb.c +++ b/src/battle/item/insecticide_herb.c @@ -5,7 +5,7 @@ static HudElement* D_802A21C0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -44,7 +44,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -56,7 +56,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_72A98C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_72A98C)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* enemy = get_actor(script->owner1.enemyID); Actor* target = get_actor(enemy->targetActorID); @@ -66,7 +66,7 @@ ApiStatus N(func_802A123C_72A98C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1280_72A9D0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1280_72A9D0)(Evt* script, s32 isInitialCall) { Actor* enemy = get_actor(script->owner1.enemyID); Actor* target; @@ -82,7 +82,7 @@ typedef struct N(temp) { EffectInstanceDataThing* unk_0C; } N(temp); -ApiStatus N(func_802A12E0_72AA30)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12E0_72AA30)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; f32 a = get_variable(script, *args++); f32 b = get_variable(script, *args++); @@ -104,7 +104,7 @@ ApiStatus N(func_802A12E0_72AA30)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -151,7 +151,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -174,7 +174,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -185,7 +185,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -196,7 +196,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -245,7 +245,7 @@ s32 N(modelCommandList)[] = { 0x00000004, 0x0000000D, 0x00000001, sizeof(N(displayList)) / sizeof(s32), &N(displayList), 0x00000002, 0x00000000, }; -Script script = SCRIPT({ +EvtSource script = SCRIPT({ SI_VAR(10) = (const) ITEM_INSECTICIDE_HERB; await N(UseItemWithEffect); UseBattleCamPreset(3); diff --git a/src/battle/item/insecticide_herb.h b/src/battle/item/insecticide_herb.h index e48945764d..ae9d01a893 100644 --- a/src/battle/item/insecticide_herb.h +++ b/src/battle/item/insecticide_herb.h @@ -7,10 +7,10 @@ #undef NAMESPACE #define NAMESPACE battle_item_insecticide_herb -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -ApiStatus N(func_802A12E0_72AA30)(ScriptInstance *script, s32 isInitialCall); -ApiStatus N(func_802A123C_72A98C)(ScriptInstance *script, s32 isInitialCall); -ApiStatus N(func_802A1280_72A9D0)(ScriptInstance *script, s32 isInitialCall); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +ApiStatus N(func_802A12E0_72AA30)(Evt *script, s32 isInitialCall); +ApiStatus N(func_802A123C_72A98C)(Evt *script, s32 isInitialCall); +ApiStatus N(func_802A1280_72A9D0)(Evt *script, s32 isInitialCall); #endif diff --git a/src/battle/item/life_shroom.c b/src/battle/item/life_shroom.c index 5fa1efbdda..d0585a8636 100644 --- a/src/battle/item/life_shroom.c +++ b/src/battle/item/life_shroom.c @@ -3,7 +3,7 @@ static HudElement* D_802A21F0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_72E76C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_72E76C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -68,7 +68,7 @@ ApiStatus N(func_802A123C_72E76C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A12EC_72E81C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12EC_72E81C)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partner = battleStatus->partnerActor; Bytecode* args = script->ptrReadPos; @@ -92,7 +92,7 @@ ApiStatus N(func_802A12EC_72E81C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1378_72E8A8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1378_72E8A8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -104,7 +104,7 @@ ApiStatus N(func_802A1378_72E8A8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1438_72E968)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1438_72E968)(Evt* script, s32 isInitialCall) { StaticItem* item = &gItemTable[ITEM_LIFE_SHROOM]; PlayerData* playerData = &gPlayerData; @@ -118,7 +118,7 @@ ApiStatus N(func_802A1438_72E968)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1484_72E9B4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1484_72E9B4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemIdx = get_variable(script, *args++); StaticItem* itemTable = gItemTable; @@ -133,7 +133,7 @@ ApiStatus N(func_802A1484_72E9B4)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -180,7 +180,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -203,7 +203,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -214,7 +214,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -225,7 +225,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -236,7 +236,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(script6) = SCRIPT({ +EvtSource N(script6) = SCRIPT({ SetActorYaw(ACTOR_PLAYER, 30); sleep 1; SetActorYaw(ACTOR_PLAYER, 60); @@ -312,7 +312,7 @@ Script N(script6) = SCRIPT({ sleep 10; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(15) = SI_VAR(1); GetMenuSelection(SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(10) = SI_VAR(1); diff --git a/src/battle/item/life_shroom.h b/src/battle/item/life_shroom.h index 74fc452bc3..4b2c953e8e 100644 --- a/src/battle/item/life_shroom.h +++ b/src/battle/item/life_shroom.h @@ -7,20 +7,20 @@ #undef NAMESPACE #define NAMESPACE battle_item_life_shroom -ApiStatus SetVirtualEntityFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetVirtualEntityPosition(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall); +ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall); +ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall); +ApiStatus func_802D7520(Evt* script, s32 isInitialCall); +ApiStatus func_802D75D8(Evt* script, s32 isInitialCall); -ApiStatus N(func_802A123C_72E76C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12EC_72E81C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1484_72E9B4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1438_72E968)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1378_72E8A8)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_72E76C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12EC_72E81C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1484_72E9B4)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1438_72E968)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1378_72E8A8)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(UseItem); -Script N(EatItem); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(UseItem); +EvtSource N(EatItem); #endif diff --git a/src/battle/item/mushroom.c b/src/battle/item/mushroom.c index a64256f7c3..6184f512ea 100644 --- a/src/battle/item/mushroom.c +++ b/src/battle/item/mushroom.c @@ -3,7 +3,7 @@ static HudElement* D_802A2410; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_715A8C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_715A8C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -68,7 +68,7 @@ ApiStatus N(func_802A123C_715A8C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A12EC_715B3C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12EC_715B3C)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partner = battleStatus->partnerActor; Bytecode* args = script->ptrReadPos; @@ -92,7 +92,7 @@ ApiStatus N(func_802A12EC_715B3C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1378_715BC8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1378_715BC8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -104,7 +104,7 @@ ApiStatus N(func_802A1378_715BC8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1438_715C88)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1438_715C88)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -120,7 +120,7 @@ ApiStatus N(func_802A1438_715C88)(ScriptInstance* script, s32 isInitialCall) { #include "common/AddFP.inc.c" -ApiStatus N(func_802A15A0_715DF0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A15A0_715DF0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; StaticItem* itemTable = gItemTable; StaticItem* item = &itemTable[get_variable(script, *args++)]; @@ -132,7 +132,7 @@ ApiStatus N(func_802A15A0_715DF0)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -179,7 +179,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -202,7 +202,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -213,7 +213,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -224,7 +224,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -235,7 +235,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(script6) = SCRIPT({ +EvtSource N(script6) = SCRIPT({ SetActorYaw(ACTOR_PLAYER, 30); sleep 1; SetActorYaw(ACTOR_PLAYER, 60); @@ -311,7 +311,7 @@ Script N(script6) = SCRIPT({ sleep 10; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(14) = SI_VAR(1); GetMenuSelection(SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(10) = SI_VAR(1); diff --git a/src/battle/item/mushroom.h b/src/battle/item/mushroom.h index db8ae736d3..d5eedd23ce 100644 --- a/src/battle/item/mushroom.h +++ b/src/battle/item/mushroom.h @@ -7,22 +7,22 @@ #undef NAMESPACE #define NAMESPACE battle_item_mushroom -ApiStatus SetVirtualEntityFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetVirtualEntityPosition(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall); +ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall); +ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall); +ApiStatus func_802D7520(Evt* script, s32 isInitialCall); +ApiStatus func_802D75D8(Evt* script, s32 isInitialCall); -ApiStatus N(func_802A123C_715A8C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12EC_715B3C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A15A0_715DF0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1378_715BC8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1438_715C88)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(AddHP)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(AddFP)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_715A8C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12EC_715B3C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A15A0_715DF0)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1378_715BC8)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1438_715C88)(Evt* script, s32 isInitialCall); +ApiStatus N(AddHP)(Evt* script, s32 isInitialCall); +ApiStatus N(AddFP)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(UseItem); -Script N(EatItem); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(UseItem); +EvtSource N(EatItem); #endif diff --git a/src/battle/item/mystery.c b/src/battle/item/mystery.c index 80cbe91a17..1a987b9c73 100644 --- a/src/battle/item/mystery.c +++ b/src/battle/item/mystery.c @@ -5,7 +5,7 @@ static HudElement* D_802A25C0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -44,7 +44,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -91,7 +91,7 @@ void N(func_802A123C_72C7EC)(void) { } } #else -INCLUDE_ASM(ApiStatus, "battle/item/mystery", battle_item_mystery_func_802A123C_72C7EC, ScriptInstance* script, +INCLUDE_ASM(ApiStatus, "battle/item/mystery", battle_item_mystery_func_802A123C_72C7EC, Evt* script, s32 isInitialCall); #endif @@ -107,7 +107,7 @@ extern s16** D_802A25FC; extern HudElement** D_802A25C8; extern struct N(tempStc) D_8008A680[100]; -ApiStatus N(func_802A13E4_72C994)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A13E4_72C994)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; if (isInitialCall) { @@ -259,11 +259,11 @@ ApiStatus N(func_802A13E4_72C994)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } #else -INCLUDE_ASM(ApiStatus, "battle/item/mystery", battle_item_mystery_func_802A13E4_72C994, ScriptInstance* script, +INCLUDE_ASM(ApiStatus, "battle/item/mystery", battle_item_mystery_func_802A13E4_72C994, Evt* script, s32 isInitialCall); #endif -ApiStatus N(func_802A188C_72CE3C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A188C_72CE3C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -274,7 +274,7 @@ ApiStatus N(func_802A188C_72CE3C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -321,7 +321,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -344,7 +344,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -355,7 +355,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -366,7 +366,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -425,7 +425,7 @@ s32 N(D_802A229C_72D84C)[8] = { 0x0000008A, 0x0000008C, 0x00000085, 0x0000008A }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_MYSTERY; await N(UseItemWithEffect); spawn { diff --git a/src/battle/item/mystery.h b/src/battle/item/mystery.h index 0af64a8743..64acc748e8 100644 --- a/src/battle/item/mystery.h +++ b/src/battle/item/mystery.h @@ -7,8 +7,8 @@ #undef NAMESPACE #define NAMESPACE battle_item_mystery -ApiStatus N(func_802A13E4_72C994)(ScriptInstance *script, s32 isInitialCall); -ApiStatus N(func_802A188C_72CE3C)(ScriptInstance *script, s32 isInitialCall); +ApiStatus N(func_802A13E4_72C994)(Evt *script, s32 isInitialCall); +ApiStatus N(func_802A188C_72CE3C)(Evt *script, s32 isInitialCall); typedef struct N(tempStc) { s32 iconId; @@ -17,6 +17,6 @@ typedef struct N(tempStc) { extern s32 N(D_802A227C_72D82C)[8]; extern s32 N(D_802A229C_72D84C)[8]; -extern Script N(UseItemWithEffect); +extern EvtSource N(UseItemWithEffect); #endif diff --git a/src/battle/item/pebble.c b/src/battle/item/pebble.c index eb0d26bbaa..eb1ef46680 100644 --- a/src/battle/item/pebble.c +++ b/src/battle/item/pebble.c @@ -4,7 +4,7 @@ static HudElement* D_802A1E80; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -43,7 +43,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -55,7 +55,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -102,7 +102,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -125,7 +125,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -136,7 +136,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -147,7 +147,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -196,7 +196,7 @@ s32 N(modelCommandList)[] = { 0x00000004, 0x0000000D, 0x00000001, sizeof(N(displayList)) / sizeof(s32), &N(displayList), 0x00000002, 0x00000000, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_PEBBLE; await N(UseItemWithEffect); UseBattleCamPreset(3); diff --git a/src/battle/item/pebble.h b/src/battle/item/pebble.h index bfcb559cf8..b622660934 100644 --- a/src/battle/item/pebble.h +++ b/src/battle/item/pebble.h @@ -7,7 +7,7 @@ #undef NAMESPACE #define NAMESPACE battle_item_pebble -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/please_come_back.c b/src/battle/item/please_come_back.c index 80215d8cf0..a51162cd4c 100644 --- a/src/battle/item/please_come_back.c +++ b/src/battle/item/please_come_back.c @@ -2,7 +2,7 @@ static HudElement* D_802A18E0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -41,7 +41,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -53,7 +53,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -100,7 +100,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -123,7 +123,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -134,7 +134,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -145,7 +145,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -156,7 +156,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_DIZZY_DIAL; await N(UseItemWithEffect); SetGoalToHome(ACTOR_PLAYER); diff --git a/src/battle/item/please_come_back.h b/src/battle/item/please_come_back.h index dddd52b21b..b11c6ac4cd 100644 --- a/src/battle/item/please_come_back.h +++ b/src/battle/item/please_come_back.h @@ -7,8 +7,8 @@ #undef NAMESPACE #define NAMESPACE battle_item_please_come_back -ApiStatus func_80273444(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_80273444(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); +EvtSource N(UseItemWithEffect); #endif diff --git a/src/battle/item/pow_block.c b/src/battle/item/pow_block.c index fd40de2df6..7dae8edf5d 100644 --- a/src/battle/item/pow_block.c +++ b/src/battle/item/pow_block.c @@ -2,7 +2,7 @@ static HudElement* D_802A2120; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -41,7 +41,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -53,7 +53,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_718A8C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_718A8C)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; CollisionStatus* collisionStatus = &gCollisionStatus; @@ -73,7 +73,7 @@ ApiStatus N(func_802A123C_718A8C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A12E4_718B34)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12E4_718B34)(Evt* script, s32 isInitialCall) { Entity* entity = get_entity_by_index(script->varTable[10]); entity->flags |= 0x20000000; @@ -81,7 +81,7 @@ ApiStatus N(func_802A12E4_718B34)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1318_718B68)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1318_718B68)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; Entity* entity = get_entity_by_index(script->varTable[10]); @@ -96,7 +96,7 @@ ApiStatus N(func_802A1318_718B68)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -143,7 +143,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -166,7 +166,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -177,7 +177,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -188,7 +188,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -199,7 +199,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_P_O_W_BLOCK; await N(UseItemWithEffect); sleep 10; diff --git a/src/battle/item/pow_block.h b/src/battle/item/pow_block.h index b2723adc14..3793200bce 100644 --- a/src/battle/item/pow_block.h +++ b/src/battle/item/pow_block.h @@ -7,14 +7,14 @@ #undef NAMESPACE #define NAMESPACE battle_item_pow_block -ApiStatus func_80273444(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80269EAC(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_80273444(Evt* script, s32 isInitialCall); +ApiStatus func_80269EAC(Evt* script, s32 isInitialCall); -ApiStatus N(func_802A1318_718B68)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A123C_718A8C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12E4_718B34)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A1318_718B68)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A123C_718A8C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12E4_718B34)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/repel_gel.c b/src/battle/item/repel_gel.c index fa46f70a26..34a760a536 100644 --- a/src/battle/item/repel_gel.c +++ b/src/battle/item/repel_gel.c @@ -2,7 +2,7 @@ static HudElement* D_802A19C0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -41,7 +41,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -53,7 +53,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_72DDAC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_72DDAC)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; ActorPart* part = player->partsTable; @@ -65,7 +65,7 @@ ApiStatus N(func_802A123C_72DDAC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -112,7 +112,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -135,7 +135,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -146,7 +146,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -157,7 +157,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -168,7 +168,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_REPEL_GEL; await N(UseItemWithEffect); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_375); diff --git a/src/battle/item/repel_gel.h b/src/battle/item/repel_gel.h index be3deade6b..c7d3459aa6 100644 --- a/src/battle/item/repel_gel.h +++ b/src/battle/item/repel_gel.h @@ -7,9 +7,9 @@ #undef NAMESPACE #define NAMESPACE battle_item_repel_gel -ApiStatus N(func_802A123C_72DDAC)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_72DDAC)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/shooting_star.c b/src/battle/item/shooting_star.c index 38fddb3fc1..d3adfd0856 100644 --- a/src/battle/item/shooting_star.c +++ b/src/battle/item/shooting_star.c @@ -3,7 +3,7 @@ static HudElement* D_802A1EE0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -55,7 +55,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { } #ifdef NON_MATCHING -ApiStatus N(func_802A123C_71D9AC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_71D9AC)(Evt* script, s32 isInitialCall) { s32 c8 = 200; s32 temp_s1 = 100 + rand_int(c8); s32 temp_s0 = rand_int(40); @@ -97,10 +97,10 @@ ApiStatus N(func_802A123C_71D9AC)(ScriptInstance* script, s32 isInitialCall) { } #else INCLUDE_ASM(ApiStatus, "battle/item/shooting_star", battle_item_shooting_star_func_802A123C_71D9AC, - ScriptInstance* script, s32 isInitialCall); + Evt* script, s32 isInitialCall); #endif -ApiStatus N(func_802A1388_71DAF8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1388_71DAF8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -111,7 +111,7 @@ ApiStatus N(func_802A1388_71DAF8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1444_71DBB4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1444_71DBB4)(Evt* script, s32 isInitialCall) { s32 ret; if (isInitialCall) { @@ -127,7 +127,7 @@ ApiStatus N(func_802A1444_71DBB4)(ScriptInstance* script, s32 isInitialCall) { return (script->functionTemp[0] == 0) * ApiStatus_DONE2; } -ApiStatus N(func_802A14D4_71DC44)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A14D4_71DC44)(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 10; } @@ -142,7 +142,7 @@ ApiStatus N(func_802A14D4_71DC44)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -189,7 +189,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -212,7 +212,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -223,7 +223,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -234,7 +234,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -245,7 +245,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_SHOOTING_STAR; await N(UseItemWithEffect); spawn { diff --git a/src/battle/item/shooting_star.h b/src/battle/item/shooting_star.h index bf032a6f35..c6be88cd78 100644 --- a/src/battle/item/shooting_star.h +++ b/src/battle/item/shooting_star.h @@ -7,12 +7,12 @@ #undef NAMESPACE #define NAMESPACE battle_item_shooting_star -ApiStatus N(func_802A1444_71DBB4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A123C_71D9AC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1388_71DAF8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A14D4_71DC44)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A1444_71DBB4)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A123C_71D9AC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1388_71DAF8)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A14D4_71DC44)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/sleepy_sheep.c b/src/battle/item/sleepy_sheep.c index 28f7fe0f03..6432ed6059 100644 --- a/src/battle/item/sleepy_sheep.c +++ b/src/battle/item/sleepy_sheep.c @@ -6,7 +6,7 @@ static HudElement* D_802A3F50; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -45,7 +45,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -95,7 +95,7 @@ void virtual_entity_set_pos(s32, s32, s32, s32); void virtual_entity_set_scale(s32, f32, f32, f32); void virtual_entity_delete_by_index(s32); -ApiStatus func_802A123C_71E88C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A123C_71E88C(Evt* script, s32 isInitialCall) { s32 i; Vec3f vecf; s32 flag; @@ -212,10 +212,10 @@ ApiStatus func_802A123C_71E88C(ScriptInstance* script, s32 isInitialCall) { } #else INCLUDE_ASM(ApiStatus, "battle/item/sleepy_sheep", battle_item_sleepy_sheep_func_802A123C_71E88C, - ScriptInstance* script, s32 isInitialCall); + Evt* script, s32 isInitialCall); #endif -ApiStatus N(func_802A1740_71ED90)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1740_71ED90)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 i; @@ -245,7 +245,7 @@ ApiStatus N(func_802A1740_71ED90)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1848_71EE98)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1848_71EE98)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 i; @@ -279,7 +279,7 @@ ApiStatus N(func_802A1848_71EE98)(ScriptInstance* script, s32 isInitialCall) { return (ret == 0) * ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -326,7 +326,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -349,7 +349,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -360,7 +360,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -371,7 +371,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -487,7 +487,7 @@ s32 N(modelCommandList)[] = { 0x00000002, 0x00000000, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_SLEEPY_SHEEP; await N(UseItemWithEffect); UseBattleCamPreset(19); diff --git a/src/battle/item/sleepy_sheep.h b/src/battle/item/sleepy_sheep.h index 6c543b50ae..0d283115fb 100644 --- a/src/battle/item/sleepy_sheep.h +++ b/src/battle/item/sleepy_sheep.h @@ -7,18 +7,18 @@ #undef NAMESPACE #define NAMESPACE battle_item_sleepy_sheep -ApiStatus func_80273444(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetVirtualEntityMoveSpeed(ScriptInstance* script, s32 isInitialCall); -ApiStatus VirtualEntityMoveTo(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80252B3C(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_80273444(Evt* script, s32 isInitialCall); +ApiStatus SetVirtualEntityMoveSpeed(Evt* script, s32 isInitialCall); +ApiStatus VirtualEntityMoveTo(Evt* script, s32 isInitialCall); +ApiStatus func_80252B3C(Evt* script, s32 isInitialCall); -ApiStatus N(func_802A123C_71E88C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1740_71ED90)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1848_71EE98)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_71E88C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1740_71ED90)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1848_71EE98)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif - - + + diff --git a/src/battle/item/snowman_doll.c b/src/battle/item/snowman_doll.c index 9740f5314e..d4fa5ea04b 100644 --- a/src/battle/item/snowman_doll.c +++ b/src/battle/item/snowman_doll.c @@ -3,7 +3,7 @@ static HudElement* D_802A1EB0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_71C06C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_71C06C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -68,7 +68,7 @@ ApiStatus N(func_802A123C_71C06C)(ScriptInstance* script, s32 isInitialCall) { #include "common/FadeBackgroundToBlack.inc.c" -ApiStatus N(func_802A13B8_71C1E8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A13B8_71C1E8)(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 20; } @@ -84,7 +84,7 @@ ApiStatus N(func_802A13B8_71C1E8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -131,7 +131,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -154,7 +154,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -165,7 +165,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -176,7 +176,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -187,7 +187,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_SNOWMAN_DOLL; await N(UseItemWithEffect); N(FadeBackgroundToBlack)(); diff --git a/src/battle/item/snowman_doll.h b/src/battle/item/snowman_doll.h index 156a722595..417df0e2af 100644 --- a/src/battle/item/snowman_doll.h +++ b/src/battle/item/snowman_doll.h @@ -7,13 +7,13 @@ #undef NAMESPACE #define NAMESPACE battle_item_snowman_doll -ApiStatus N(FadeBackgroundToBlack)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A123C_71C06C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A13B8_71C1E8)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A123C_71C06C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A13B8_71C1E8)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif - - + + diff --git a/src/battle/item/stone_cap.c b/src/battle/item/stone_cap.c index 10cdc410c1..863e452743 100644 --- a/src/battle/item/stone_cap.c +++ b/src/battle/item/stone_cap.c @@ -3,7 +3,7 @@ static HudElement* D_802A1A60; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_7217DC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_7217DC)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 i; @@ -96,7 +96,7 @@ ApiStatus N(func_802A123C_7217DC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -143,7 +143,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -166,7 +166,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -177,7 +177,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -188,7 +188,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -199,7 +199,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_STONE_CAP; await N(UseItemWithEffect); PlaySound(SOUND_UNKNOWN_361); diff --git a/src/battle/item/stone_cap.h b/src/battle/item/stone_cap.h index cf8d55ef8b..36d3878da4 100644 --- a/src/battle/item/stone_cap.h +++ b/src/battle/item/stone_cap.h @@ -7,11 +7,11 @@ #undef NAMESPACE #define NAMESPACE battle_item_stone_cap -ApiStatus N(func_802A123C_7217DC)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_7217DC)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif - - + + diff --git a/src/battle/item/stop_watch.c b/src/battle/item/stop_watch.c index 98c64b7978..f6761ef2df 100644 --- a/src/battle/item/stop_watch.c +++ b/src/battle/item/stop_watch.c @@ -2,7 +2,7 @@ static HudElement* D_802A1B40; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -41,7 +41,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -55,7 +55,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { #include "common/FadeBackgroundToBlack.inc.c" -ApiStatus N(func_802A12D4_7270A4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12D4_7270A4)(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 20; } @@ -71,7 +71,7 @@ ApiStatus N(func_802A12D4_7270A4)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -118,7 +118,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -141,7 +141,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -152,7 +152,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -163,7 +163,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -174,7 +174,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_STOP_WATCH; await N(UseItemWithEffect); spawn { diff --git a/src/battle/item/stop_watch.h b/src/battle/item/stop_watch.h index c39f049cf3..78d0053b39 100644 --- a/src/battle/item/stop_watch.h +++ b/src/battle/item/stop_watch.h @@ -7,14 +7,14 @@ #undef NAMESPACE #define NAMESPACE battle_item_stop_watch -ApiStatus func_80252B3C(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_80252B3C(Evt* script, s32 isInitialCall); -ApiStatus N(FadeBackgroundToBlack)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12D4_7270A4)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12D4_7270A4)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif - - + + diff --git a/src/battle/item/strange_cake.c b/src/battle/item/strange_cake.c index 9ad58ee68e..39654f1978 100644 --- a/src/battle/item/strange_cake.c +++ b/src/battle/item/strange_cake.c @@ -6,7 +6,7 @@ static HudElement* D_802A2DD0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -45,7 +45,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -63,7 +63,7 @@ extern s32 D_802A25E4; extern HudElement* D_802A2DF4; extern s32 D_802A2DD8; -ApiStatus N(func_802A123C_73153C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_73153C)(Evt* script, s32 isInitialCall) { s32 i; HudElement** ptr; s32 var; @@ -114,7 +114,7 @@ s32 N(D_802A2858_732B58)[] = { 0x00000000, 0x00000001, 0x00000002, 0x00000000, 0x00000001 }; -ApiStatus N(func_802A13E4_7316E4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A13E4_7316E4)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; if (isInitialCall) { @@ -253,10 +253,10 @@ ApiStatus N(func_802A13E4_7316E4)(ScriptInstance* script, s32 isInitialCall) { } #else INCLUDE_ASM(ApiStatus, "battle/item/strange_cake", battle_item_strange_cake_func_802A13E4_7316E4, - ScriptInstance* script, s32 isInitialCall); + Evt* script, s32 isInitialCall); #endif -ApiStatus N(func_802A1818_731B18)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1818_731B18)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -267,7 +267,7 @@ ApiStatus N(func_802A1818_731B18)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A18D8_731BD8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A18D8_731BD8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -282,7 +282,7 @@ ApiStatus N(func_802A18D8_731BD8)(ScriptInstance* script, s32 isInitialCall) { #include "common/AddFP.inc.c" -ApiStatus N(func_802A1A40_731D40)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1A40_731D40)(Evt* script, s32 isInitialCall) { StaticItem* item = &gItemTable[ITEM_KOOKY_COOKIE]; PlayerData* playerData = &gPlayerData; @@ -296,7 +296,7 @@ ApiStatus N(func_802A1A40_731D40)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1A8C_731D8C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1A8C_731D8C)(Evt* script, s32 isInitialCall) { StaticItem* item = &gItemTable[ITEM_KOOKY_COOKIE]; PlayerData* playerData = &gPlayerData; @@ -310,7 +310,7 @@ ApiStatus N(func_802A1A8C_731D8C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1AD8_731DD8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1AD8_731DD8)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; @@ -320,7 +320,7 @@ ApiStatus N(func_802A1AD8_731DD8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1B14_731E14)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1B14_731E14)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; ActorPart* part = player->partsTable; @@ -332,7 +332,7 @@ ApiStatus N(func_802A1B14_731E14)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1B68_731E68)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1B68_731E68)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; @@ -342,7 +342,7 @@ ApiStatus N(func_802A1B68_731E68)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -389,7 +389,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -412,7 +412,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -423,7 +423,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -434,7 +434,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -473,7 +473,7 @@ s32 N(D_802A2858_732B58)[] = { 0x00000000, 0x00000001, 0x00000002, 0x00000000, 0x00000001, 0x000000000 }; -Script N(script6) = SCRIPT({ +EvtSource N(script6) = SCRIPT({ GetMenuSelection(SI_VAR(0), SI_VAR(1), SI_VAR(2)); if (SI_VAR(1) == 211) { SI_VAR(10) = (const) ITEM_KOOKY_COOKIE; @@ -526,7 +526,7 @@ Script N(script6) = SCRIPT({ await N(PlayerGoHome); }); -Script N(script7) = SCRIPT({ +EvtSource N(script7) = SCRIPT({ SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 20; @@ -537,7 +537,7 @@ Script N(script7) = SCRIPT({ WaitForMessageBoxDone(); }); -Script N(script8) = SCRIPT({ +EvtSource N(script8) = SCRIPT({ SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 20; @@ -548,7 +548,7 @@ Script N(script8) = SCRIPT({ WaitForMessageBoxDone(); }); -Script N(script9) = SCRIPT({ +EvtSource N(script9) = SCRIPT({ SetAnimation(ACTOR_PLAYER, 0, ANIM_30004); SetGoalToTarget(ACTOR_PLAYER); GetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); diff --git a/src/battle/item/strange_cake.h b/src/battle/item/strange_cake.h index 4e10916280..af9696e63b 100644 --- a/src/battle/item/strange_cake.h +++ b/src/battle/item/strange_cake.h @@ -4,27 +4,27 @@ #include "common.h" #include "script_api/battle.h" -#undef NAMESPACE +#undef NAMESPACE #define NAMESPACE battle_item_strange_cake -ApiStatus func_802D75D8(ScriptInstance *script, s32 isInitialCall); -ApiStatus func_802D7520(ScriptInstance *script, s32 isInitialCall); +ApiStatus func_802D75D8(Evt *script, s32 isInitialCall); +ApiStatus func_802D7520(Evt *script, s32 isInitialCall); -ApiStatus N(func_802A1A8C_731D8C)(ScriptInstance *script, s32 isInitialCall); -ApiStatus N(func_802A18D8_731BD8)(ScriptInstance *script, s32 isInitialCall); -ApiStatus N(AddFP)(ScriptInstance *script, s32 isInitialCall); -ApiStatus N(func_802A13E4_7316E4)(ScriptInstance *script, s32 isInitialCall); -ApiStatus N(func_802A1AD8_731DD8)(ScriptInstance *script, s32 isInitialCall); -ApiStatus N(func_802A1B14_731E14)(ScriptInstance *script, s32 isInitialCall); -ApiStatus N(func_802A1B68_731E68)(ScriptInstance *script, s32 isInitialCall); +ApiStatus N(func_802A1A8C_731D8C)(Evt *script, s32 isInitialCall); +ApiStatus N(func_802A18D8_731BD8)(Evt *script, s32 isInitialCall); +ApiStatus N(AddFP)(Evt *script, s32 isInitialCall); +ApiStatus N(func_802A13E4_7316E4)(Evt *script, s32 isInitialCall); +ApiStatus N(func_802A1AD8_731DD8)(Evt *script, s32 isInitialCall); +ApiStatus N(func_802A1B14_731E14)(Evt *script, s32 isInitialCall); +ApiStatus N(func_802A1B68_731E68)(Evt *script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(EatItem); -Script N(script7); -Script N(script8); -Script N(script9); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(EatItem); +EvtSource N(script7); +EvtSource N(script8); +EvtSource N(script9); #endif - - + + diff --git a/src/battle/item/super_soda.c b/src/battle/item/super_soda.c index 8130128c47..ef5c7cc781 100644 --- a/src/battle/item/super_soda.c +++ b/src/battle/item/super_soda.c @@ -3,7 +3,7 @@ static HudElement* D_802A2280; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_724F1C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_724F1C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -68,7 +68,7 @@ ApiStatus N(func_802A123C_724F1C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A12EC_724FCC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12EC_724FCC)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partner = battleStatus->partnerActor; Bytecode* args = script->ptrReadPos; @@ -92,7 +92,7 @@ ApiStatus N(func_802A12EC_724FCC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1378_725058)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall) { s32 actorId = get_variable(script, *script->ptrReadPos); Actor* actor = get_actor(actorId); s32 id = actor->actorID & 0x700; @@ -119,7 +119,7 @@ ApiStatus N(func_802A1378_725058)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A1418_7250F8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1418_7250F8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -132,7 +132,7 @@ ApiStatus N(func_802A1418_7250F8)(ScriptInstance* script, s32 isInitialCall) { #include "common/AddFP.inc.c" -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -179,7 +179,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -202,7 +202,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -213,7 +213,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -224,7 +224,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -235,7 +235,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(script6) = SCRIPT({ +EvtSource N(script6) = SCRIPT({ SetActorYaw(ACTOR_PLAYER, 30); sleep 1; SetActorYaw(ACTOR_PLAYER, 60); @@ -311,7 +311,7 @@ Script N(script6) = SCRIPT({ sleep 10; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_SUPER_SODA; await N(UseItemWithEffect); InitTargetIterator(); diff --git a/src/battle/item/super_soda.h b/src/battle/item/super_soda.h index 6ddab323d4..05ab0b40ae 100644 --- a/src/battle/item/super_soda.h +++ b/src/battle/item/super_soda.h @@ -7,19 +7,19 @@ #undef NAMESPACE #define NAMESPACE battle_item_super_soda -ApiStatus SetVirtualEntityFlags(ScriptInstance* script, s32 isInitialCall); -ApiStatus GetVirtualEntityPosition(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall); +ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall); +ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall); +ApiStatus func_802D75D8(Evt* script, s32 isInitialCall); +ApiStatus func_802D7520(Evt* script, s32 isInitialCall); -ApiStatus N(func_802A123C_724F1C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12EC_724FCC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1418_7250F8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(AddFP)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1378_725058)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_724F1C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12EC_724FCC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1418_7250F8)(Evt* script, s32 isInitialCall); +ApiStatus N(AddFP)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(UseItem); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(UseItem); #endif diff --git a/src/battle/item/tasty_tonic.c b/src/battle/item/tasty_tonic.c index 702428e66d..385de4df19 100644 --- a/src/battle/item/tasty_tonic.c +++ b/src/battle/item/tasty_tonic.c @@ -2,7 +2,7 @@ static HudElement* D_802A1B40; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -41,7 +41,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -53,7 +53,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_72223C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall) { s32 actorId = get_variable(script, *script->ptrReadPos); Actor* actor = get_actor(actorId); s32 id = actor->actorID & 0x700; @@ -78,7 +78,7 @@ ApiStatus N(func_802A123C_72223C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -125,7 +125,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -148,7 +148,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -159,7 +159,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -170,7 +170,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -181,7 +181,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_TASTY_TONIC; await N(UseItemWithEffect); InitTargetIterator(); diff --git a/src/battle/item/tasty_tonic.h b/src/battle/item/tasty_tonic.h index 66f378e3fc..5cbaf6989b 100644 --- a/src/battle/item/tasty_tonic.h +++ b/src/battle/item/tasty_tonic.h @@ -7,13 +7,13 @@ #undef NAMESPACE #define NAMESPACE battle_item_tasty_tonic -ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_802D7520(Evt* script, s32 isInitialCall); +ApiStatus func_802D75D8(Evt* script, s32 isInitialCall); -ApiStatus N(func_802A123C_72223C)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(DrinkItem); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(DrinkItem); #endif diff --git a/src/battle/item/thunder_bolt.c b/src/battle/item/thunder_bolt.c index 229431cf13..3c18aebef7 100644 --- a/src/battle/item/thunder_bolt.c +++ b/src/battle/item/thunder_bolt.c @@ -3,7 +3,7 @@ static HudElement* D_802A1C40; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_722D7C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_722D7C)(Evt* script, s32 isInitialCall) { Actor* enemyTarget = get_actor(script->owner1.enemyID); Actor* actor = get_actor(enemyTarget->targetActorID); f32 posY, posX, posZ; @@ -84,7 +84,7 @@ ApiStatus N(func_802A123C_722D7C)(ScriptInstance* script, s32 isInitialCall) { #include "common/FadeBackgroundToBlack.inc.c" -ApiStatus N(func_802A1420_722F60)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1420_722F60)(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 20; } @@ -100,7 +100,7 @@ ApiStatus N(func_802A1420_722F60)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -147,7 +147,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -170,7 +170,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -181,7 +181,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -192,7 +192,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -203,7 +203,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_THUNDER_BOLT; await N(UseItemWithEffect); spawn { diff --git a/src/battle/item/thunder_bolt.h b/src/battle/item/thunder_bolt.h index 7fbef369a7..1695d9cfa8 100644 --- a/src/battle/item/thunder_bolt.h +++ b/src/battle/item/thunder_bolt.h @@ -7,11 +7,11 @@ #undef NAMESPACE #define NAMESPACE battle_item_thunder_bolt -ApiStatus N(FadeBackgroundToBlack)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A123C_722D7C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1420_722F60)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A123C_722D7C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1420_722F60)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/thunder_rage.c b/src/battle/item/thunder_rage.c index 7c6bffa671..90249a26a5 100644 --- a/src/battle/item/thunder_rage.c +++ b/src/battle/item/thunder_rage.c @@ -3,7 +3,7 @@ static HudElement* D_802A1C90; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -56,7 +56,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { #include "common/FadeBackgroundToBlack.inc.c" -ApiStatus N(func_802A12D4_71B474)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12D4_71B474)(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 20; } @@ -72,7 +72,7 @@ ApiStatus N(func_802A12D4_71B474)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_802A1354_71B4F4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A1354_71B4F4)(Evt* script, s32 isInitialCall) { Actor* enemyTarget = get_actor(script->owner1.enemyID); Actor* actor = get_actor(enemyTarget->targetActorID); f32 posY, posX, posZ; @@ -100,7 +100,7 @@ ApiStatus N(func_802A1354_71B4F4)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -147,7 +147,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -170,7 +170,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -181,7 +181,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -192,7 +192,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -203,7 +203,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_THUNDER_RAGE; await N(UseItemWithEffect); parallel { diff --git a/src/battle/item/thunder_rage.h b/src/battle/item/thunder_rage.h index 2af16f6ea6..5b3462a031 100644 --- a/src/battle/item/thunder_rage.h +++ b/src/battle/item/thunder_rage.h @@ -7,11 +7,11 @@ #undef NAMESPACE #define NAMESPACE battle_item_thunder_rage -ApiStatus N(FadeBackgroundToBlack)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A1354_71B4F4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12D4_71B474)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A1354_71B4F4)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12D4_71B474)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/ultra_shroom.c b/src/battle/item/ultra_shroom.c index e1da225f82..dd5164b6a5 100644 --- a/src/battle/item/ultra_shroom.c +++ b/src/battle/item/ultra_shroom.c @@ -3,7 +3,7 @@ static HudElement* D_802A1AC0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_7239BC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_7239BC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -65,7 +65,7 @@ ApiStatus N(func_802A123C_7239BC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A12FC_723A7C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12FC_723A7C)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; playerData->curHP += 10; @@ -75,7 +75,7 @@ ApiStatus N(func_802A12FC_723A7C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -122,7 +122,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -145,7 +145,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -156,7 +156,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -167,7 +167,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -178,7 +178,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_SUPER_SHROOM; await N(UseItemWithEffect); AddBattleCamZoom(50); diff --git a/src/battle/item/ultra_shroom.h b/src/battle/item/ultra_shroom.h index 287ff59c6a..2f38cff110 100644 --- a/src/battle/item/ultra_shroom.h +++ b/src/battle/item/ultra_shroom.h @@ -7,14 +7,14 @@ #undef NAMESPACE #define NAMESPACE battle_item_ultra_shroom -ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_802D7520(Evt* script, s32 isInitialCall); +ApiStatus func_802D75D8(Evt* script, s32 isInitialCall); -ApiStatus N(func_802A123C_7239BC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12FC_723A7C)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_7239BC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12FC_723A7C)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(EatItem); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(EatItem); #endif diff --git a/src/battle/item/unknown_item.c b/src/battle/item/unknown_item.c index da5b68833e..05c551f32e 100644 --- a/src/battle/item/unknown_item.c +++ b/src/battle/item/unknown_item.c @@ -3,7 +3,7 @@ static HudElement* D_802A1AA0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -42,7 +42,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_72447C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_72447C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -65,7 +65,7 @@ ApiStatus N(func_802A123C_72447C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A12FC_72453C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A12FC_72453C)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; playerData->curHP += 20; @@ -75,7 +75,7 @@ ApiStatus N(func_802A12FC_72453C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -122,7 +122,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -145,7 +145,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -156,7 +156,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -167,7 +167,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -178,7 +178,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_ULTRA_SHROOM; await N(UseItemWithEffect); await N(EatItem); diff --git a/src/battle/item/unknown_item.h b/src/battle/item/unknown_item.h index 2140511b1b..452931e445 100644 --- a/src/battle/item/unknown_item.h +++ b/src/battle/item/unknown_item.h @@ -7,14 +7,14 @@ #undef NAMESPACE #define NAMESPACE battle_item_unknown_item -ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_802D7520(Evt* script, s32 isInitialCall); +ApiStatus func_802D75D8(Evt* script, s32 isInitialCall); -ApiStatus N(func_802A123C_72447C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802A12FC_72453C)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_72447C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802A12FC_72453C)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(EatItem); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(EatItem); #endif diff --git a/src/battle/item/volt_shroom.c b/src/battle/item/volt_shroom.c index 7993cc5635..52e71291cc 100644 --- a/src/battle/item/volt_shroom.c +++ b/src/battle/item/volt_shroom.c @@ -2,7 +2,7 @@ static HudElement* D_802A19B0; -ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -41,7 +41,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; @@ -53,7 +53,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802A123C_71AA2C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802A123C_71AA2C)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; @@ -62,7 +62,7 @@ ApiStatus N(func_802A123C_71AA2C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(UseItemWithEffect) = SCRIPT({ +EvtSource N(UseItemWithEffect) = SCRIPT({ if (SI_VAR(1) == 0) { UseBattleCamPreset(69); sleep 10; @@ -109,7 +109,7 @@ Script N(UseItemWithEffect) = SCRIPT({ } }); -Script N(UseItem) = SCRIPT({ +EvtSource N(UseItem) = SCRIPT({ UseBattleCamPreset(19); SetBattleCamTarget(-85, 1, 0); SetBattleCamOffsetZ(41); @@ -132,7 +132,7 @@ Script N(UseItem) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); }); -Script N(PlayerGoHome) = SCRIPT({ +EvtSource N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 0); SetGoalToHome(ACTOR_PLAYER); SetActorSpeed(ACTOR_PLAYER, 8.0); @@ -143,7 +143,7 @@ Script N(PlayerGoHome) = SCRIPT({ UseIdleAnimation(ACTOR_PLAYER, 1); }); -Script N(EatItem) = SCRIPT({ +EvtSource N(EatItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -154,7 +154,7 @@ Script N(EatItem) = SCRIPT({ sleep 45; }); -Script N(DrinkItem) = SCRIPT({ +EvtSource N(DrinkItem) = SCRIPT({ spawn { loop 4 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); @@ -165,7 +165,7 @@ Script N(DrinkItem) = SCRIPT({ sleep 45; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_VAR(10) = (const) ITEM_VOLT_SHROOM; await N(UseItemWithEffect); await N(EatItem); diff --git a/src/battle/item/volt_shroom.h b/src/battle/item/volt_shroom.h index 5293e4eb8b..2261479080 100644 --- a/src/battle/item/volt_shroom.h +++ b/src/battle/item/volt_shroom.h @@ -7,10 +7,10 @@ #undef NAMESPACE #define NAMESPACE battle_item_volt_shroom -ApiStatus N(func_802A123C_71AA2C)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_802A123C_71AA2C)(Evt* script, s32 isInitialCall); -Script N(UseItemWithEffect); -Script N(PlayerGoHome); -Script N(EatItem); +EvtSource N(UseItemWithEffect); +EvtSource N(PlayerGoHome); +EvtSource N(EatItem); #endif diff --git a/src/battle/move/d_down_jump/781920.c b/src/battle/move/d_down_jump/781920.c index 72f07895b5..708ebb6c70 100644 --- a/src/battle/move/d_down_jump/781920.c +++ b/src/battle/move/d_down_jump/781920.c @@ -5,7 +5,7 @@ #include "world/common/UnkMoveFunc1.inc.c" -ApiStatus func_802A10E4_781A04(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A10E4_781A04(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); diff --git a/src/battle/move/d_down_pound/74AD90.c b/src/battle/move/d_down_pound/74AD90.c index 795731df5b..ad23ff04f7 100644 --- a/src/battle/move/d_down_pound/74AD90.c +++ b/src/battle/move/d_down_pound/74AD90.c @@ -7,7 +7,7 @@ #include "world/common/IsRightOnEquipped.inc.c" -ApiStatus func_802A10A4_74AE34(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A10A4_74AE34(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); diff --git a/src/battle/move/earthquake_jump/785B20.c b/src/battle/move/earthquake_jump/785B20.c index e2828af752..d4bbc8d371 100644 --- a/src/battle/move/earthquake_jump/785B20.c +++ b/src/battle/move/earthquake_jump/785B20.c @@ -4,7 +4,7 @@ #include "world/common/UnkMoveFunc1.inc.c" -ApiStatus func_802A10E4_785C04(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A10E4_785C04(Evt* script, s32 isInitialCall) { script->varTable[0] = 3; return ApiStatus_DONE2; } diff --git a/src/battle/move/hammer_charge_0/74F130.c b/src/battle/move/hammer_charge_0/74F130.c index 58670f6611..74d41d421d 100644 --- a/src/battle/move/hammer_charge_0/74F130.c +++ b/src/battle/move/hammer_charge_0/74F130.c @@ -9,7 +9,7 @@ #include "world/common/IsHammerMaxCharged.inc.c" -ApiStatus func_802A10C8_74F1F8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A10C8_74F1F8(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; s32 var1 = get_variable(script, *args++); @@ -30,7 +30,7 @@ ApiStatus func_802A10C8_74F1F8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802A11CC_74F2FC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A11CC_74F2FC(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); diff --git a/src/battle/move/hammer_charge_1/7595B0.c b/src/battle/move/hammer_charge_1/7595B0.c index 3327adcf30..05b0b1d862 100644 --- a/src/battle/move/hammer_charge_1/7595B0.c +++ b/src/battle/move/hammer_charge_1/7595B0.c @@ -11,7 +11,7 @@ extern s32 D_802A43D0; #include "world/common/IsHammerMaxCharged.inc.c" -ApiStatus func_802A10C8_759678(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A10C8_759678(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus2 = battleStatus; // TODO: macro? @@ -42,7 +42,7 @@ ApiStatus func_802A10C8_759678(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkMoveFunc2.inc.c" -ApiStatus func_802A12FC_7598AC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A12FC_7598AC(Evt* script, s32 isInitialCall) { if (D_802A43D0 == 0) { script->varTable[0] = 4; } else { diff --git a/src/battle/move/hammer_charge_2/75E5D0.c b/src/battle/move/hammer_charge_2/75E5D0.c index 5dc7b8af33..8bffe97159 100644 --- a/src/battle/move/hammer_charge_2/75E5D0.c +++ b/src/battle/move/hammer_charge_2/75E5D0.c @@ -11,7 +11,7 @@ extern s32 D_802A4350; #include "world/common/IsHammerMaxCharged.inc.c" -ApiStatus func_802A10C8_75E698(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A10C8_75E698(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus2 = battleStatus; // TODO: macro? @@ -42,7 +42,7 @@ ApiStatus func_802A10C8_75E698(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkMoveFunc3.inc.c" -ApiStatus func_802A12FC_75E8CC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A12FC_75E8CC(Evt* script, s32 isInitialCall) { if (D_802A4350 == 0) { script->varTable[0] = 4; } else { diff --git a/src/battle/move/jump/73D860.c b/src/battle/move/jump/73D860.c index 1a6a7111ef..7dee89ad1a 100644 --- a/src/battle/move/jump/73D860.c +++ b/src/battle/move/jump/73D860.c @@ -4,7 +4,7 @@ #include "world/common/UnkMoveFunc1.inc.c" -ApiStatus func_802A10E4_73D944(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A10E4_73D944(Evt* script, s32 isInitialCall) { script->varTable[15] = 1; switch (gPlayerData.bootsLevel) { diff --git a/src/battle/move/jump_charge_0/74D570.c b/src/battle/move/jump_charge_0/74D570.c index 7e04418b6c..826a410710 100644 --- a/src/battle/move/jump_charge_0/74D570.c +++ b/src/battle/move/jump_charge_0/74D570.c @@ -7,7 +7,7 @@ #include "world/common/IsJumpMaxCharged.inc.c" -ApiStatus func_802A1108_74D678(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1108_74D678(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; s32 var1 = get_variable(script, *args++); @@ -28,7 +28,7 @@ ApiStatus func_802A1108_74D678(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802A120C_74D77C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A120C_74D77C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); diff --git a/src/battle/move/jump_charge_1/75C980.c b/src/battle/move/jump_charge_1/75C980.c index 8245937e09..a20a3efe41 100644 --- a/src/battle/move/jump_charge_1/75C980.c +++ b/src/battle/move/jump_charge_1/75C980.c @@ -9,7 +9,7 @@ extern s32 D_802A2C50; #include "world/common/IsJumpMaxCharged.inc.c" -ApiStatus func_802A1108_75CA88(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1108_75CA88(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus2 = battleStatus; @@ -40,7 +40,7 @@ ApiStatus func_802A1108_75CA88(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkMoveFunc2.inc.c" -ApiStatus func_802A133C_75CCBC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A133C_75CCBC(Evt* script, s32 isInitialCall) { if (D_802A2C50 == 0) { script->varTable[0] = 6; } else { diff --git a/src/battle/move/jump_charge_2/761920.c b/src/battle/move/jump_charge_2/761920.c index 850c8ba2ad..13b541c43a 100644 --- a/src/battle/move/jump_charge_2/761920.c +++ b/src/battle/move/jump_charge_2/761920.c @@ -9,7 +9,7 @@ extern s32 D_802A2C20; #include "world/common/IsJumpMaxCharged.inc.c" -ApiStatus func_802A1108_761A28(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1108_761A28(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus2 = battleStatus; // TODO: macro? @@ -40,7 +40,7 @@ ApiStatus func_802A1108_761A28(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkMoveFunc3.inc.c" -ApiStatus func_802A133C_761C5C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A133C_761C5C(Evt* script, s32 isInitialCall) { if (D_802A2C20 == 0) { script->varTable[0] = 6; } else { diff --git a/src/battle/move/mega_quake/756780.c b/src/battle/move/mega_quake/756780.c index 3643d5d1e3..5fd9dc5a97 100644 --- a/src/battle/move/mega_quake/756780.c +++ b/src/battle/move/mega_quake/756780.c @@ -6,7 +6,7 @@ #include "world/common/IsRightOnEquipped.inc.c" -ApiStatus func_802A10A4_756824(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A10A4_756824(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 0; } diff --git a/src/battle/move/power_bounce/743DF0.c b/src/battle/move/power_bounce/743DF0.c index e90ca2981c..94fbf72a21 100644 --- a/src/battle/move/power_bounce/743DF0.c +++ b/src/battle/move/power_bounce/743DF0.c @@ -9,7 +9,7 @@ extern s32 D_802A4020; #include "world/common/UnkMoveFunc1.inc.c" #ifdef NON_MATCHING -ApiStatus func_802A10E4_743ED4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A10E4_743ED4(Evt* script, s32 isInitialCall) { Actor* targetActor = get_actor(get_actor(script->owner1.actorID)->targetActorID); s32 powerBounceChance; @@ -29,17 +29,17 @@ ApiStatus func_802A10E4_743ED4(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "battle/move/power_bounce/743DF0", func_802A10E4_743ED4); #endif -ApiStatus func_802A1194_743F84(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1194_743F84(Evt* script, s32 isInitialCall) { D_802A4020 = 0; return ApiStatus_DONE2; } -ApiStatus func_802A11A4_743F94(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A11A4_743F94(Evt* script, s32 isInitialCall) { D_802A4020 += 1; return ApiStatus_DONE2; } -ApiStatus func_802A11C0_743FB0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A11C0_743FB0(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; if (playerData->powerBounces < D_802A4020) { diff --git a/src/battle/move/spin_smash/737890.c b/src/battle/move/spin_smash/737890.c index 6138783bf7..5501c891ce 100644 --- a/src/battle/move/spin_smash/737890.c +++ b/src/battle/move/spin_smash/737890.c @@ -3,7 +3,7 @@ #define NAMESPACE battle_move_spin_smash -ApiStatus func_802A1000_737890(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1000_737890(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* playerActor = battleStatus->playerActor; f32 xPos = playerActor->currentPos.x + 20.0f; @@ -15,7 +15,7 @@ ApiStatus func_802A1000_737890(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802A1074_737904(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1074_737904(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* playerActor = battleStatus->playerActor; f32 xPos = playerActor->currentPos.x + 20.0f; diff --git a/src/battle/partner/bombette.c b/src/battle/partner/bombette.c index 82378b379a..b849c700d5 100644 --- a/src/battle/partner/bombette.c +++ b/src/battle/partner/bombette.c @@ -2,7 +2,7 @@ #include "effects.h" #include "battle/battle.h" -ApiStatus func_80238000_6FAD10(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238000_6FAD10(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; s32 x = get_variable(script, *args++); @@ -48,7 +48,7 @@ ApiStatus func_80238000_6FAD10(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80238244_6FAF54(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238244_6FAF54(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; ActorMovement* partnerActorMovement = &partnerActor->walk; @@ -82,7 +82,7 @@ ApiStatus func_80238244_6FAF54(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus func_80238358_6FB068(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238358_6FB068(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; @@ -143,7 +143,7 @@ ApiStatus func_80238358_6FB068(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8023849C_6FB1AC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8023849C_6FB1AC(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; @@ -190,7 +190,7 @@ ApiStatus func_8023849C_6FB1AC(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80238590_6FB2A0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238590_6FB2A0(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; diff --git a/src/battle/partner/bow.c b/src/battle/partner/bow.c index 4fe07f3599..0ef802c9a2 100644 --- a/src/battle/partner/bow.c +++ b/src/battle/partner/bow.c @@ -6,14 +6,14 @@ extern s32 bMarioIdleAnims[]; extern s32 bMarioHideAnims[]; -ApiStatus func_80238000_710EF0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238000_710EF0(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; script->varTable[0] = battleStatus->outtaSightActive; return ApiStatus_DONE2; } -ApiStatus func_80238014_710F04(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238014_710F04(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; Actor* partnerTargetActor = get_actor(partnerActor->targetActorID); @@ -25,13 +25,13 @@ ApiStatus func_80238014_710F04(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8023808C_710F7C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8023808C_710F7C(Evt* script, s32 isInitialCall) { ActorPart* playerActorPartTable = gBattleStatus.playerActor->partsTable; gBattleStatus.outtaSightActive = 1; if (!(gBattleStatus.flags2 & 2)) { gBattleStatus.outtaSightActive = -1; - } + } playerActorPartTable->idleAnimations = &bMarioHideAnims; gBattleStatus.hustleTurns = 0; @@ -40,7 +40,7 @@ ApiStatus func_8023808C_710F7C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802380E4_710FD4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802380E4_710FD4(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; Actor* playerActor = battleStatus->playerActor; @@ -58,7 +58,7 @@ ApiStatus func_802380E4_710FD4(ScriptInstance* script, s32 isInitialCall) { } /// Duplicate of IsPartnerImmobile -ApiStatus N(IsPartnerImmobile)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(IsPartnerImmobile)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* playerActor = battleStatus->playerActor; s32 isImmobile = playerActor->debuff == STATUS_FEAR @@ -76,7 +76,7 @@ ApiStatus N(IsPartnerImmobile)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802381C8_7110B8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802381C8_7110B8(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* playerActor = battleStatus->playerActor; ActorPart* playerActorPartTable = battleStatus->playerActor->partsTable; @@ -86,7 +86,7 @@ ApiStatus func_802381C8_7110B8(ScriptInstance* script, s32 isInitialCall) { } /// Averages the baseStatusChance of the hittable actors this partner is targeting. -ApiStatus N(AverageTargetStatusChance)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(AverageTargetStatusChance)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; Actor* targetActor; diff --git a/src/battle/partner/goombario.c b/src/battle/partner/goombario.c index dae9fe6d5b..3f6063759f 100644 --- a/src/battle/partner/goombario.c +++ b/src/battle/partner/goombario.c @@ -12,24 +12,24 @@ extern s32 D_8023CDA4; extern s32 D_8023BB98_6ECC78; extern MessageID bActorTattles[ACTOR_TYPE_COUNT]; -extern Script N(init); -extern Script N(80239784); -extern Script N(802397E0); -extern Script N(8023993C); -extern Script N(8023994C); -extern Script N(80239988); -extern Script N(8023A754); -extern Script N(8023ADC4); -extern Script N(8023B45C); -extern Script N(8023BB9C); -extern Script N(8023C5B8); -extern Script N(8023C90C); -extern Script N(handleEvent_80239360); -extern Script N(idle_80239350); -extern Script N(nextTurn_80239A3C); -extern Script N(takeTurn_802396D8); +extern EvtSource N(init); +extern EvtSource N(80239784); +extern EvtSource N(802397E0); +extern EvtSource N(8023993C); +extern EvtSource N(8023994C); +extern EvtSource N(80239988); +extern EvtSource N(8023A754); +extern EvtSource N(8023ADC4); +extern EvtSource N(8023B45C); +extern EvtSource N(8023BB9C); +extern EvtSource N(8023C5B8); +extern EvtSource N(8023C90C); +extern EvtSource N(handleEvent_80239360); +extern EvtSource N(idle_80239350); +extern EvtSource N(nextTurn_80239A3C); +extern EvtSource N(takeTurn_802396D8); -ApiStatus N(func_80238000_6F10E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80238000_6F10E0)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; f32 posX = partnerActor->currentPos.x; @@ -57,7 +57,7 @@ ApiStatus N(func_80238000_6F10E0)(ScriptInstance* script, s32 isInitialCall) { } #ifdef NON_MATCHING -ApiStatus func_802380E4_6F11C4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802380E4_6F11C4(Evt* script, s32 isInitialCall) { Actor* targetActor = get_actor(get_actor(script->owner1.actorID)->targetActorID); script->varTable[0] = 99; @@ -74,7 +74,7 @@ INCLUDE_ASM(s32, "battle/partner/goombario", func_802380E4_6F11C4); INCLUDE_ASM(s32, "battle/partner/goombario", func_8023817C_6F125C); -ApiStatus N(func_80238A20_6F1B00)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80238A20_6F1B00)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = gBattleStatus.partnerActor; Vec3f* pos = &partnerActor->walk.currentPos; @@ -118,7 +118,7 @@ ApiStatus N(func_80238A20_6F1B00)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus func_80238B60_6F1C40(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238B60_6F1C40(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; Actor* targetActor = get_actor(partnerActor->targetActorID); @@ -138,13 +138,13 @@ ApiStatus func_80238B60_6F1C40(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "battle/partner/goombario", func_80238BCC_6F1CAC); -ApiStatus func_80238E04_6F1EE4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238E04_6F1EE4(Evt* script, s32 isInitialCall) { D_8023CDA0 = playFX_6C(0, 206, 144, 0, 1.0f, 0); return ApiStatus_DONE2; } -ApiStatus func_80238E48_6F1F28(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238E48_6F1F28(Evt* script, s32 isInitialCall) { EffectInstance* effect = D_8023CDA0; effect->data->pos.y = 144.0f; @@ -153,7 +153,7 @@ ApiStatus func_80238E48_6F1F28(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80238E74_6F1F54(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238E74_6F1F54(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; @@ -182,7 +182,7 @@ ApiStatus func_80238E74_6F1F54(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "battle/partner/goombario", func_80238EDC_6F1FBC); -ApiStatus N(StopGlowing)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(StopGlowing)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; battleStatus->partnerActor->isGlowing = FALSE; @@ -191,7 +191,7 @@ ApiStatus N(StopGlowing)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(StopGlowingAndGet)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(StopGlowingAndGet)(Evt* script, s32 isInitialCall) { Actor* partnerActor = gBattleStatus.partnerActor; if (!(gBattleStatus.flags1 & 0x40000000)) { @@ -205,7 +205,7 @@ ApiStatus N(StopGlowingAndGet)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(IsGlowing)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(IsGlowing)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; script->varTable[0] = battleStatus->partnerActor->isGlowing; @@ -213,7 +213,7 @@ ApiStatus N(IsGlowing)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802390C8_6F21A8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802390C8_6F21A8(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -225,7 +225,7 @@ ApiStatus func_802390C8_6F21A8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80239190_6F2270)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80239190_6F2270)(Evt* script, s32 isInitialCall) { if (D_8023CDA4 == 0) { script->varTable[0] = 36; } else { @@ -290,7 +290,7 @@ ActorPartDesc N(partsTable_802392A4)[] = { }, }; -Script N(init_802392F0); +EvtSource N(init_802392F0); ActorDesc N(goombario) = { .flags = 0, @@ -315,18 +315,18 @@ ActorDesc N(goombario) = { .statusMessageOffset = { 10, 20 }, }; -Script N(init_802392F0) = SCRIPT({ +EvtSource N(init_802392F0) = SCRIPT({ BindTakeTurn(ACTOR_PARTNER, N(takeTurn_802396D8)); BindIdle(ACTOR_PARTNER, N(idle_80239350)); BindHandleEvent(ACTOR_PARTNER, N(handleEvent_80239360)); BindNextTurn(256, N(nextTurn_80239A3C)); }); -Script N(idle_80239350) = SCRIPT({ +EvtSource N(idle_80239350) = SCRIPT({ }); -Script N(handleEvent_80239360) = SCRIPT({ +EvtSource N(handleEvent_80239360) = SCRIPT({ UseIdleAnimation(ACTOR_PARTNER, FALSE); CloseActionCommandInfo(); GetLastEvent(ACTOR_PARTNER, SI_VAR(0)); @@ -396,7 +396,7 @@ Script N(handleEvent_80239360) = SCRIPT({ UseIdleAnimation(ACTOR_PARTNER, TRUE); }); -Script N(takeTurn_802396D8) = SCRIPT({ +EvtSource N(takeTurn_802396D8) = SCRIPT({ GetBattlePhase(SI_VAR(0)); match SI_VAR(0) { == 1 { @@ -417,7 +417,7 @@ Script N(takeTurn_802396D8) = SCRIPT({ } }); -Script N(80239784) = SCRIPT({ +EvtSource N(80239784) = SCRIPT({ SI_VAR(0) = (const) 1; SI_VAR(1) = (const) NPC_ANIM(battle_goombario, default, celebrate); SI_VAR(2) = (const) NPC_ANIM(battle_goombario, default, celebrate_still); @@ -425,7 +425,7 @@ Script N(80239784) = SCRIPT({ await 0x80294720; }); -Script N(802397E0) = SCRIPT({ +EvtSource N(802397E0) = SCRIPT({ GetMenuSelection(SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802694A4(1); SetBattleFlagBits(16384, 0); @@ -463,17 +463,17 @@ Script N(802397E0) = SCRIPT({ } }); -Script N(8023993C) = SCRIPT({ +EvtSource N(8023993C) = SCRIPT({ }); -Script N(8023994C) = SCRIPT({ +EvtSource N(8023994C) = SCRIPT({ SI_VAR(0) = (const) 1; SI_VAR(1) = (const) NPC_ANIM(battle_goombario, default, run); await 0x80294AFC; }); -Script N(80239988) = SCRIPT({ +EvtSource N(80239988) = SCRIPT({ UseIdleAnimation(ACTOR_PARTNER, FALSE); SetGoalToHome(ACTOR_PARTNER); SetActorSpeed(ACTOR_PARTNER, 6.0); @@ -484,7 +484,7 @@ Script N(80239988) = SCRIPT({ UseIdleAnimation(ACTOR_PARTNER, 1); }); -Script N(nextTurn_80239A3C) = SCRIPT({ +EvtSource N(nextTurn_80239A3C) = SCRIPT({ GetBattlePhase(SI_VAR(0)); match SI_VAR(0) { == 10 { @@ -526,7 +526,7 @@ Script N(nextTurn_80239A3C) = SCRIPT({ } }); -Script N(80239CA8) = SCRIPT({ +EvtSource N(80239CA8) = SCRIPT({ func_80280818(); UseBattleCamPreset(51); SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM(battle_goombario, default, idle)); @@ -575,7 +575,7 @@ Script N(80239CA8) = SCRIPT({ SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM(battle_goombario, default, idle)); }); -Script N(8023A06C) = SCRIPT({ +EvtSource N(8023A06C) = SCRIPT({ func_80280818(); UseBattleCamPreset(3); SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM(battle_goombario, default, idle)); @@ -639,7 +639,7 @@ Script N(8023A06C) = SCRIPT({ SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM(battle_goombario, default, idle)); }); -Script N(8023A52C) = SCRIPT({ +EvtSource N(8023A52C) = SCRIPT({ SetGoalToFirstTarget(-127); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) -= 40; @@ -658,7 +658,7 @@ Script N(8023A52C) = SCRIPT({ SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM(battle_goombario, default, idle)); }); -Script N(8023A66C) = SCRIPT({ +EvtSource N(8023A66C) = SCRIPT({ SetGoalToTarget(ACTOR_PARTNER); GetGoalPos(ACTOR_PARTNER, SI_VAR(11), SI_VAR(7), SI_VAR(13)); GetActorPos(ACTOR_PARTNER, SI_VAR(7), SI_VAR(13), SI_VAR(14)); @@ -674,7 +674,7 @@ Script N(8023A66C) = SCRIPT({ SI_VAR(10) = SI_VAR(11); }); -Script N(8023A754) = SCRIPT({ +EvtSource N(8023A754) = SCRIPT({ LoadActionCommand(1); func_802A9000_430020(); await N(8023A52C); @@ -776,7 +776,7 @@ Script N(8023A754) = SCRIPT({ await N(8023A06C); }); -Script N(8023ADC4) = SCRIPT({ +EvtSource N(8023ADC4) = SCRIPT({ LoadActionCommand(1); func_802A9000_430020(); await N(8023A52C); @@ -880,7 +880,7 @@ Script N(8023ADC4) = SCRIPT({ await N(8023A06C); }); -Script N(8023B45C) = SCRIPT({ +EvtSource N(8023B45C) = SCRIPT({ LoadActionCommand(1); func_802A9000_430020(); await N(8023A52C); @@ -999,7 +999,7 @@ s32 N(D_8023BB78_6ECC58)[] = { s32 D_8023BB98_6ECC78 = 0x000000C8; -Script N(8023BB9C) = SCRIPT({ +EvtSource N(8023BB9C) = SCRIPT({ LoadActionCommand(1); func_802A9000_430020(); await N(8023A52C); @@ -1173,7 +1173,7 @@ Script N(8023BB9C) = SCRIPT({ goto 10; }); -Script N(8023C5B8) = SCRIPT({ +EvtSource N(8023C5B8) = SCRIPT({ GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 30; SetActorSpeed(ACTOR_PARTNER, 6.0); @@ -1218,7 +1218,7 @@ Script N(8023C5B8) = SCRIPT({ SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM(battle_goombario, default, idle)); }); -Script N(8023C90C) = SCRIPT({ +EvtSource N(8023C90C) = SCRIPT({ UseBattleCamPreset(55); sleep 10; SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM(battle_goombario, default, charge)); diff --git a/src/battle/partner/kooper.c b/src/battle/partner/kooper.c index 261af3049c..cf8178d661 100644 --- a/src/battle/partner/kooper.c +++ b/src/battle/partner/kooper.c @@ -3,7 +3,7 @@ #include "common.h" #include "battle/battle.h" -ApiStatus func_80238000_6F5E80(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238000_6F5E80(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; ActorMovement* partnerActorMovement = &partnerActor->walk; @@ -39,7 +39,7 @@ ApiStatus func_80238000_6F5E80(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "battle/partner/kooper", func_80238114_6F5F94); -ApiStatus N(AverageTargetDizzyChance)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(AverageTargetDizzyChance)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; Actor* targetActor; @@ -77,7 +77,7 @@ ApiStatus N(AverageTargetDizzyChance)(ScriptInstance* script, s32 isInitialCall) return ApiStatus_DONE2; } -ApiStatus func_802383C0_6F6240(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802383C0_6F6240(Evt* script, s32 isInitialCall) { s32 var0 = script->varTable[0]; s32 var1; s32 var2; diff --git a/src/battle/partner/lakilester.c b/src/battle/partner/lakilester.c index bb91354889..51032ecfe2 100644 --- a/src/battle/partner/lakilester.c +++ b/src/battle/partner/lakilester.c @@ -5,7 +5,7 @@ extern s32 D_8023D2C8; extern s32 D_8023D330; extern s32 D_8023D334; -ApiStatus func_80238000_70BD10(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238000_70BD10(Evt* script, s32 isInitialCall) { if (isInitialCall) { D_8023D2C8 = 0; } @@ -20,7 +20,7 @@ ApiStatus func_80238000_70BD10(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "battle/partner/lakilester", func_8023803C_70BD4C); -ApiStatus func_80238A6C_70C77C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238A6C_70C77C(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; f32 xPos = partnerActor->currentPos.x + 5; @@ -36,7 +36,7 @@ ApiStatus func_80238A6C_70C77C(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "battle/partner/lakilester", func_80238B50_70C860); -ApiStatus func_80238C14_70C924(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238C14_70C924(Evt* script, s32 isInitialCall) { s32 effect = gBattleStatus.cloudNineEffect; if (effect != NULL) { @@ -51,7 +51,7 @@ ApiStatus func_80238C14_70C924(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "battle/partner/lakilester", func_80238C58_70C968); -ApiStatus func_80238D48_70CA58(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238D48_70CA58(Evt* script, s32 isInitialCall) { if (gBattleStatus.cloudNineTurnsLeft < script->varTable[10]) { gBattleStatus.cloudNineTurnsLeft = script->varTable[10]; gBattleStatus.cloudNineDodgeChance = 50; @@ -69,11 +69,11 @@ INCLUDE_ASM(s32, "battle/partner/lakilester", func_80239140_70CE50); INCLUDE_ASM(s32, "battle/partner/lakilester", func_80239F84_70DC94); -ApiStatus func_8023A19C_70DEAC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8023A19C_70DEAC(Evt* script, s32 isInitialCall) { return (D_8023D330 == 0) * 2; } -ApiStatus func_8023A1B0_70DEC0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8023A1B0_70DEC0(Evt* script, s32 isInitialCall) { script->varTable[0] = D_8023D334; return ApiStatus_DONE2; } diff --git a/src/battle/partner/parakarry.c b/src/battle/partner/parakarry.c index c7a2ae50a8..ba3896b519 100644 --- a/src/battle/partner/parakarry.c +++ b/src/battle/partner/parakarry.c @@ -3,7 +3,7 @@ INCLUDE_ASM(s32, "battle/partner/parakarry", func_80238000_6FFD80); -ApiStatus func_80238C88_700A08(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238C88_700A08(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; s32 var0 = 0; @@ -23,7 +23,7 @@ ApiStatus func_80238C88_700A08(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80238CE0_700A60(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238CE0_700A60(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; Actor* targetActor = get_actor(partnerActor->targetActorID); @@ -64,7 +64,7 @@ INCLUDE_ASM(s32, "battle/partner/parakarry", func_80238E24_700BA4); INCLUDE_ASM(s32, "battle/partner/parakarry", func_802390B4_700E34); -ApiStatus func_802397C8_701548(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802397C8_701548(Evt* script, s32 isInitialCall) { script->varTable[15] = ((script->varTable[0] * 100) / 2499) + 2; return ApiStatus_DONE2; diff --git a/src/battle/partner/sushie.c b/src/battle/partner/sushie.c index 0eab167488..ec69199e68 100644 --- a/src/battle/partner/sushie.c +++ b/src/battle/partner/sushie.c @@ -5,7 +5,7 @@ extern f64 D_8023C060_70BD00; extern s32 D_8023C070; #ifdef NON_MATCHING -ApiStatus func_80238000_707CA0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238000_707CA0(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; ActorPart* partsTable; @@ -42,7 +42,7 @@ INCLUDE_ASM(s32, "battle/partner/sushie", func_80238000_707CA0); INCLUDE_ASM(s32, "battle/partner/sushie", func_80238114_707DB4); -ApiStatus func_802381EC_707E8C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802381EC_707E8C(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; f32 xScale; @@ -76,7 +76,7 @@ ApiStatus func_802381EC_707E8C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802382A4_707F44(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802382A4_707F44(Evt* script, s32 isInitialCall) { f32 var1 = script->varTable[0]; f32 var2 = script->varTable[1]; @@ -88,7 +88,7 @@ ApiStatus func_802382A4_707F44(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80238328_707FC8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238328_707FC8(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; s32 var = script->varTable[0]; @@ -109,7 +109,7 @@ ApiStatus func_80238328_707FC8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80238388_708028(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238388_708028(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; Actor* playerActor = battleStatus->playerActor; @@ -119,7 +119,7 @@ ApiStatus func_80238388_708028(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80238480_708120(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238480_708120(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; f32 var1 = get_float_variable(script, *args++); @@ -138,7 +138,7 @@ ApiStatus func_80238480_708120(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "battle/partner/sushie", func_80238540_7081E0); -ApiStatus func_80238E30_708AD0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238E30_708AD0(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; f32 var = (((f64) script->varTable[0] * 3) / 100) + 1; diff --git a/src/battle/partner/twink.c b/src/battle/partner/twink.c index c3c1051aa1..99a7aadcbb 100644 --- a/src/battle/partner/twink.c +++ b/src/battle/partner/twink.c @@ -2,7 +2,7 @@ extern s32* D_802382F8_714FE8[]; -ApiStatus func_80238000_714CF0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238000_714CF0(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; if (battleStatus->flags2 & 0x40) { @@ -15,7 +15,7 @@ ApiStatus func_80238000_714CF0(ScriptInstance* script, s32 isInitialCall) { } #ifdef NON_MATCHING -ApiStatus func_80238028_714D18(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238028_714D18(Evt* script, s32 isInitialCall) { Actor* actor = get_actor(script->owner1.actorID); s32* var0 = &D_802382F8_714FE8[0]; s32 var4 = *D_802382F8_714FE8[1]; diff --git a/src/battle/partner/watt.c b/src/battle/partner/watt.c index 0a4938feb6..0d1594e8c3 100644 --- a/src/battle/partner/watt.c +++ b/src/battle/partner/watt.c @@ -14,7 +14,7 @@ extern EffectInstance* D_80239A0C_7054FC; INCLUDE_ASM(s32, "battle/partner/watt", func_80238000_703AF0); -ApiStatus func_80238370_703E60(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238370_703E60(Evt* script, s32 isInitialCall) { D_8023C1B8 = 0; if (D_8023C1CC != NULL) { remove_effect(D_8023C1CC); @@ -26,27 +26,27 @@ ApiStatus func_80238370_703E60(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802383C0_703EB0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802383C0_703EB0(Evt* script, s32 isInitialCall) { D_8023C1BC = 1; return ApiStatus_DONE2; } -ApiStatus func_802383D4_703EC4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802383D4_703EC4(Evt* script, s32 isInitialCall) { D_8023C1BC = 0; return ApiStatus_DONE2; } -ApiStatus func_802383E4_703ED4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802383E4_703ED4(Evt* script, s32 isInitialCall) { D_8023C1C4 = 1; return ApiStatus_DONE2; } -ApiStatus func_802383F8_703EE8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802383F8_703EE8(Evt* script, s32 isInitialCall) { D_8023C1C4 = 0; return ApiStatus_DONE2; } -ApiStatus func_80238408_703EF8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238408_703EF8(Evt* script, s32 isInitialCall) { D_8023C1C8 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -55,7 +55,7 @@ ApiStatus func_80238408_703EF8(ScriptInstance* script, s32 isInitialCall) { #include "common/SetBackgroundAlpha.inc.c" -ApiStatus func_802384B0_703FA0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802384B0_703FA0(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -66,7 +66,7 @@ ApiStatus func_802384B0_703FA0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80238570_704060(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238570_704060(Evt* script, s32 isInitialCall) { s32* var = D_80239A0C_7054FC; if (var != NULL) { @@ -79,7 +79,7 @@ ApiStatus func_80238570_704060(ScriptInstance* script, s32 isInitialCall) { // Beware this demon because "EffectInstanceDataThing" is one hell of a // janky solution, but this does match. -ApiStatus func_8023859C_70408C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8023859C_70408C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -95,7 +95,7 @@ ApiStatus func_8023859C_70408C(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "battle/partner/watt", func_80238668_704158); -ApiStatus func_80238784_704274(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238784_704274(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; Actor* targetActor = get_actor(partnerActor->targetActorID); @@ -118,7 +118,7 @@ INCLUDE_ASM(s32, "battle/partner/watt", func_80238810_704300); // Beware this demon because "EffectInstanceDataThing" is one hell of a // janky solution, but this does match. -ApiStatus func_80238B3C_70462C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238B3C_70462C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -132,7 +132,7 @@ ApiStatus func_80238B3C_70462C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80238C08_7046F8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80238C08_7046F8(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; s32 var1 = script->varTable[0]; @@ -159,7 +159,7 @@ ApiStatus func_80238C08_7046F8(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "battle/partner/watt", func_80238C84_704774); -ApiStatus N(AverageTargetParalyzeChance)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(AverageTargetParalyzeChance)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; Actor* targetActor; diff --git a/src/battle/star/chill_out/7900D0.c b/src/battle/star/chill_out/7900D0.c index ad4a474f0c..7fb6c78fd2 100644 --- a/src/battle/star/chill_out/7900D0.c +++ b/src/battle/star/chill_out/7900D0.c @@ -6,17 +6,17 @@ extern s32 D_802A2CC0; #include "common/StarPower.inc.c" -ApiStatus func_802A1518_7905E8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1518_7905E8(Evt* script, s32 isInitialCall) { D_802A2CC0 = 0; return ApiStatus_DONE2; } -ApiStatus func_802A1528_7905F8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1528_7905F8(Evt* script, s32 isInitialCall) { script->varTable[0] = D_802A2CC0; return ApiStatus_DONE2; } -ApiStatus func_802A153C_79060C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A153C_79060C(Evt* script, s32 isInitialCall) { f32 a = rand_int(200) - 25; f32 b = rand_int(120) + 7; f32 c = rand_int(50) - 25; @@ -31,7 +31,7 @@ ApiStatus func_802A153C_79060C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802A163C_79070C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A163C_79070C(Evt* script, s32 isInitialCall) { Actor* actor = get_actor(script->owner1.actorID); Actor* target = get_actor(actor->targetActorID); ActorPart* part = get_actor_part(target, actor->targetPartIndex); diff --git a/src/battle/star/focus/789E60.c b/src/battle/star/focus/789E60.c index 03e4ebf9eb..eae957b5b2 100644 --- a/src/battle/star/focus/789E60.c +++ b/src/battle/star/focus/789E60.c @@ -4,7 +4,7 @@ #include "common/StarPower.inc.c" -ApiStatus func_802A1518_78A378(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1518_78A378(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; s32 deepFocusSP; s32 superFocusSP; @@ -28,7 +28,7 @@ ApiStatus func_802A1518_78A378(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802A15B0_78A410(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A15B0_78A410(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; script->varTable[0] = 0; diff --git a/src/battle/star/lullaby/78D150.c b/src/battle/star/lullaby/78D150.c index d9c6c63a25..f644637789 100644 --- a/src/battle/star/lullaby/78D150.c +++ b/src/battle/star/lullaby/78D150.c @@ -4,7 +4,7 @@ #include "common/StarPower.inc.c" -ApiStatus func_802A1518_78D668(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1518_78D668(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 0; } diff --git a/src/battle/star/peach_beam/7997B0.c b/src/battle/star/peach_beam/7997B0.c index d89407fb1a..158e3cd34f 100644 --- a/src/battle/star/peach_beam/7997B0.c +++ b/src/battle/star/peach_beam/7997B0.c @@ -6,12 +6,12 @@ INCLUDE_ASM(s32, "battle/star/peach_beam/7997B0", func_802A1518_799CC8); -ApiStatus func_802A2468_79AC18(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A2468_79AC18(Evt* script, s32 isInitialCall) { script->varTable[0] = D_802A3838; return ApiStatus_DONE2; } -ApiStatus func_802A247C_79AC2C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A247C_79AC2C(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 230; } diff --git a/src/battle/star/peach_dash/79D8A0.c b/src/battle/star/peach_dash/79D8A0.c index aebf718f22..83d30ddbf5 100644 --- a/src/battle/star/peach_dash/79D8A0.c +++ b/src/battle/star/peach_dash/79D8A0.c @@ -4,7 +4,7 @@ #include "common/StarPower.inc.c" -ApiStatus func_802A1518_79DDB8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1518_79DDB8(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; PlayerData* playerData2 = &gPlayerData; diff --git a/src/battle/star/peach_focus/79BFA0.c b/src/battle/star/peach_focus/79BFA0.c index 08634dc89c..c683e2c635 100644 --- a/src/battle/star/peach_focus/79BFA0.c +++ b/src/battle/star/peach_focus/79BFA0.c @@ -4,7 +4,7 @@ #include "common/StarPower.inc.c" -ApiStatus func_802A1518_79C4B8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1518_79C4B8(Evt* script, s32 isInitialCall) { ((s32*)script->varTable[0])[1]++; // TODO replace with actual struct when we know what this is return ApiStatus_DONE2; } diff --git a/src/battle/star/refresh/78B600.c b/src/battle/star/refresh/78B600.c index 718ca5754e..c629561dfa 100644 --- a/src/battle/star/refresh/78B600.c +++ b/src/battle/star/refresh/78B600.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "battle/star/refresh/78B600", func_802A1518_78BB18); -ApiStatus func_802A17D4_78BDD4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A17D4_78BDD4(Evt* script, s32 isInitialCall) { Actor* actor = gBattleStatus.playerActor; if (actor->debuff != STATUS_END) { @@ -29,7 +29,7 @@ ApiStatus func_802A17D4_78BDD4(ScriptInstance* script, s32 isInitialCall) { #include "common/AddFP.inc.c" -ApiStatus func_802A18E8_78BEE8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A18E8_78BEE8(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -41,7 +41,7 @@ ApiStatus func_802A18E8_78BEE8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802A19A8_78BFA8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A19A8_78BFA8(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/battle/star/smooch/791D90.c b/src/battle/star/smooch/791D90.c index 831fdcee3f..4e86f30f1a 100644 --- a/src/battle/star/smooch/791D90.c +++ b/src/battle/star/smooch/791D90.c @@ -6,7 +6,7 @@ #include "common/AddHP.inc.c" -ApiStatus func_802A156C_7922FC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A156C_7922FC(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/battle/star/star_beam/796FC0.c b/src/battle/star/star_beam/796FC0.c index f5de011f92..16c6cb4b6f 100644 --- a/src/battle/star/star_beam/796FC0.c +++ b/src/battle/star/star_beam/796FC0.c @@ -6,12 +6,12 @@ INCLUDE_ASM(s32, "battle/star/star_beam/796FC0", func_802A1518_7974D8); -ApiStatus func_802A2468_798428(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A2468_798428(Evt* script, s32 isInitialCall) { script->varTable[0] = D_802A3838; return ApiStatus_DONE2; } -ApiStatus func_802A247C_79843C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A247C_79843C(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 230; } diff --git a/src/battle/star/star_storm/78E7D0.c b/src/battle/star/star_storm/78E7D0.c index f6428bd672..454124a661 100644 --- a/src/battle/star/star_storm/78E7D0.c +++ b/src/battle/star/star_storm/78E7D0.c @@ -4,7 +4,7 @@ #include "common/StarPower.inc.c" -ApiStatus func_802A1518_78ECE8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1518_78ECE8(Evt* script, s32 isInitialCall) { s32 var1 = -50 - rand_int(200); s32 var2 = 200; s32 var3 = rand_int(40); @@ -21,7 +21,7 @@ ApiStatus func_802A1518_78ECE8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802A1628_78EDF8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1628_78EDF8(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/battle/star/up_and_away/7952E0.c b/src/battle/star/up_and_away/7952E0.c index f37b0332b8..a01d0a4cf6 100644 --- a/src/battle/star/up_and_away/7952E0.c +++ b/src/battle/star/up_and_away/7952E0.c @@ -5,7 +5,7 @@ #include "common/StarPower.inc.c" -ApiStatus func_802A1518_7957F8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1518_7957F8(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); *D_801512F0 = 1; @@ -24,7 +24,7 @@ ApiStatus func_802A1518_7957F8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus func_802A15B4_795894(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A15B4_795894(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 254; } @@ -42,7 +42,7 @@ ApiStatus func_802A15B4_795894(ScriptInstance* script, s32 isInitialCall) { } #ifdef NON_MATCHING -ApiStatus func_802A1628_795908(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802A1628_795908(Evt* script, s32 isInitialCall) { Actor* targetActor = get_actor(get_actor(script->owner1.actorID)->targetActorID); s32 flags = targetActor->flags; diff --git a/src/common/AddFP.inc.c b/src/common/AddFP.inc.c index bf414fbc50..e784fbd556 100644 --- a/src/common/AddFP.inc.c +++ b/src/common/AddFP.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(AddFP)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(AddFP)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; s32 amt = get_variable(script, *script->ptrReadPos); diff --git a/src/common/AddHP.inc.c b/src/common/AddHP.inc.c index ed83d0af75..b8195b97b4 100644 --- a/src/common/AddHP.inc.c +++ b/src/common/AddHP.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(AddHP)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(AddHP)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; s32 amt = get_variable(script, *script->ptrReadPos); diff --git a/src/common/BattleAreaAngleStuff.inc.c b/src/common/BattleAreaAngleStuff.inc.c index 4dd515c249..a011babaac 100644 --- a/src/common/BattleAreaAngleStuff.inc.c +++ b/src/common/BattleAreaAngleStuff.inc.c @@ -40,7 +40,7 @@ u32 N(BattleAreaAngleStuff1)(f32 x, f32 y) { return ret; } -ApiStatus N(BattleAreaAngleStuff2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(BattleAreaAngleStuff2)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/common/DeadUnk1.inc.c b/src/common/DeadUnk1.inc.c index 205a0a80f9..615006be78 100644 --- a/src/common/DeadUnk1.inc.c +++ b/src/common/DeadUnk1.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(DeadUnk1)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(DeadUnk1)(Evt* script, s32 isInitialCall) { func_80077BD0(1, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/common/DeadUnkFloatFunc.inc.c b/src/common/DeadUnkFloatFunc.inc.c index 83519f636f..9e83ad90f6 100644 --- a/src/common/DeadUnkFloatFunc.inc.c +++ b/src/common/DeadUnkFloatFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(DeadUnkFloatFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(DeadUnkFloatFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a1 = *args++; s32 var0 = dead_get_variable(script, a1); diff --git a/src/common/DeadUnkFloatFuncAbs.inc.c b/src/common/DeadUnkFloatFuncAbs.inc.c index eda46d5ebc..497aa70117 100644 --- a/src/common/DeadUnkFloatFuncAbs.inc.c +++ b/src/common/DeadUnkFloatFuncAbs.inc.c @@ -2,7 +2,7 @@ #include "map.h" // Same as (Dead)UnkFloatFunc with an extra abs on diff -ApiStatus N(DeadUnkFloatFuncAbs)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(DeadUnkFloatFuncAbs)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a1 = *args++; s32 var0 = dead_get_variable(script, a1); diff --git a/src/common/Dist3D.inc.c b/src/common/Dist3D.inc.c index 8b7d0b5cd0..f20db22e4c 100644 --- a/src/common/Dist3D.inc.c +++ b/src/common/Dist3D.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(Dist3D)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(Dist3D)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/common/DivActorLevel4.inc.c b/src/common/DivActorLevel4.inc.c index a2a3a67a47..4a3e0c2a65 100644 --- a/src/common/DivActorLevel4.inc.c +++ b/src/common/DivActorLevel4.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "battle/battle.h" -ApiStatus N(DivActorLevel4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(DivActorLevel4)(Evt* script, s32 isInitialCall) { ActorDesc* actorData = get_actor(script->owner1.actorID)->staticActorData; actorData->level /= 4; diff --git a/src/common/FadeBackgroundToBlack.inc.c b/src/common/FadeBackgroundToBlack.inc.c index 4b48f3dcb0..2a548889a9 100644 --- a/src/common/FadeBackgroundToBlack.inc.c +++ b/src/common/FadeBackgroundToBlack.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(FadeBackgroundToBlack)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); *D_801512F0 = 1; diff --git a/src/common/FreeIcon.inc.c b/src/common/FreeIcon.inc.c index 546c945c69..2956780d95 100644 --- a/src/common/FreeIcon.inc.c +++ b/src/common/FreeIcon.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(FreeIcon)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(FreeIcon)(Evt* script, s32 isInitialCall) { free_hud_element(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } diff --git a/src/common/GetBootsHammerLevel.inc.c b/src/common/GetBootsHammerLevel.inc.c index d79062ceef..1d082510e1 100644 --- a/src/common/GetBootsHammerLevel.inc.c +++ b/src/common/GetBootsHammerLevel.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(GetBootsHammerLevel)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetBootsHammerLevel)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; set_variable(script, *args++, gPlayerData.bootsLevel); diff --git a/src/common/GetItemEntityPosition.inc.c b/src/common/GetItemEntityPosition.inc.c index 78d0b42d25..5bbb289301 100644 --- a/src/common/GetItemEntityPosition.inc.c +++ b/src/common/GetItemEntityPosition.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetItemEntityPosition)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetItemEntityPosition)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ItemEntity* entity = get_item_entity(get_variable(script, *args++)); diff --git a/src/common/GetJumpHammerCharge.inc.c b/src/common/GetJumpHammerCharge.inc.c index bc97e635e1..fca6795832 100644 --- a/src/common/GetJumpHammerCharge.inc.c +++ b/src/common/GetJumpHammerCharge.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(GetJumpHammerCharge)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetJumpHammerCharge)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; set_variable(script, *args++, gBattleStatus.jumpCharge); diff --git a/src/common/GetLastEventType.inc.c b/src/common/GetLastEventType.inc.c index f405e12f4e..d1dbf3418f 100644 --- a/src/common/GetLastEventType.inc.c +++ b/src/common/GetLastEventType.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(GetLastEventType)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetLastEventType)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.actorID); diff --git a/src/common/GetModelPos.inc.c b/src/common/GetModelPos.inc.c index fa84d160b3..5bee2b4e29 100644 --- a/src/common/GetModelPos.inc.c +++ b/src/common/GetModelPos.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(GetModelPos)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetModelPos)(Evt* script, s32 isInitialCall) { Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(script->varTable[10])); script->varTable[11] = (s32) model->center.x; diff --git a/src/common/GetSelectedMoveID.inc.c b/src/common/GetSelectedMoveID.inc.c index 5d698a1e5a..6adbafb7f5 100644 --- a/src/common/GetSelectedMoveID.inc.c +++ b/src/common/GetSelectedMoveID.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetSelectedMoveID)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetSelectedMoveID)(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gBattleStatus.selectedMoveID); return ApiStatus_DONE2; } diff --git a/src/common/IsGameStatusUnkAA_1.inc.c b/src/common/IsGameStatusUnkAA_1.inc.c index 39777a91e9..8d6d15fa35 100644 --- a/src/common/IsGameStatusUnkAA_1.inc.c +++ b/src/common/IsGameStatusUnkAA_1.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(IsGameStatusUnkAA_1)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(IsGameStatusUnkAA_1)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; if (gGameStatusPtr->demoFlags & 1) { script->varTable[0] = 1; @@ -10,7 +10,7 @@ ApiStatus N(IsGameStatusUnkAA_1)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(Add1Coin)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(Add1Coin)(Evt* script, s32 isInitialCall) { add_coins(1); return ApiStatus_DONE2; } diff --git a/src/common/IsSaveVar123.inc.c b/src/common/IsSaveVar123.inc.c index d119c7072a..dbe86939e8 100644 --- a/src/common/IsSaveVar123.inc.c +++ b/src/common/IsSaveVar123.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(IsSaveVar123)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(IsSaveVar123)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; if (get_variable(NULL, SI_SAVE_VAR(123)) >= 8) { script->varTable[0] = 1; diff --git a/src/common/MashActionCommandInit.inc.c b/src/common/MashActionCommandInit.inc.c index 0746563901..091961803c 100644 --- a/src/common/MashActionCommandInit.inc.c +++ b/src/common/MashActionCommandInit.inc.c @@ -1,4 +1,4 @@ -ApiStatus N(MashActionCommandInit)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(MashActionCommandInit)(Evt* script, s32 isInitialCall) { u8 mashMeterCutoff; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; diff --git a/src/common/MediGuySpriteRotationFunc.inc.c b/src/common/MediGuySpriteRotationFunc.inc.c index a3e90c8151..87122a9046 100644 --- a/src/common/MediGuySpriteRotationFunc.inc.c +++ b/src/common/MediGuySpriteRotationFunc.inc.c @@ -1,7 +1,7 @@ // outputs z sprite rotation -ApiStatus N(MediGuySpriteRotationFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(MediGuySpriteRotationFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + s32 angle = get_variable(script, *args++); s32 outPos = *(args++); s32 temp_s3 = get_variable(script, *args++); diff --git a/src/common/Set80071270_0_16.inc.c b/src/common/Set80071270_0_16.inc.c index 7e6a6bdbfa..a689087346 100644 --- a/src/common/Set80071270_0_16.inc.c +++ b/src/common/Set80071270_0_16.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(Set80071270_0_16)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(Set80071270_0_16)(Evt* script, s32 isInitialCall) { playFX_45(0, 0x10); return ApiStatus_DONE2; } diff --git a/src/common/Set80218630_Var0.inc.c b/src/common/Set80218630_Var0.inc.c index c985c17e75..97a132c094 100644 --- a/src/common/Set80218630_Var0.inc.c +++ b/src/common/Set80218630_Var0.inc.c @@ -3,7 +3,7 @@ extern s16 D_802809F8; -ApiStatus N(Set80218630_Var0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(Set80218630_Var0)(Evt* script, s32 isInitialCall) { D_802809F8 = script->varTable[0]; return ApiStatus_DONE2; } diff --git a/src/common/SetBackgroundAlpha.inc.c b/src/common/SetBackgroundAlpha.inc.c index 791e5e1e7c..0c613b4fb6 100644 --- a/src/common/SetBackgroundAlpha.inc.c +++ b/src/common/SetBackgroundAlpha.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SetBackgroundAlpha)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetBackgroundAlpha)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; set_background_color_blend(0, 0, 0, get_variable(script, *args++)); diff --git a/src/common/SetNpcCollision32.inc.c b/src/common/SetNpcCollision32.inc.c index d795c9cbf0..9a340ec650 100644 --- a/src/common/SetNpcCollision32.inc.c +++ b/src/common/SetNpcCollision32.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(SetNpcCollision32)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetNpcCollision32)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(100); npc->collisionHeight = 32; diff --git a/src/common/ShrinkActor.inc.c b/src/common/ShrinkActor.inc.c index 904f0a7d8a..378df4b8a0 100644 --- a/src/common/ShrinkActor.inc.c +++ b/src/common/ShrinkActor.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "effects.h" -ApiStatus N(ShrinkActor)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(ShrinkActor)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; f32 var1 = get_float_variable(script, *args++); f32 var2 = get_float_variable(script, *args++); diff --git a/src/common/StarPower.inc.c b/src/common/StarPower.inc.c index c1f979b6b6..2dc9028aa4 100644 --- a/src/common/StarPower.inc.c +++ b/src/common/StarPower.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "effects.h" -ApiStatus N(UnkStarFunc1)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkStarFunc1)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -11,7 +11,7 @@ ApiStatus N(UnkStarFunc1)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(UnkStarFunc2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkStarFunc2)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -21,7 +21,7 @@ ApiStatus N(UnkStarFunc2)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(UnkStarFunc3)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkStarFunc3)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a = get_variable(script, *args++); s32 b = get_variable(script, *args++); @@ -31,7 +31,7 @@ ApiStatus N(UnkStarFunc3)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(UnkStarFunc4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkStarFunc4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/common/StartRumbleWithParams.inc.c b/src/common/StartRumbleWithParams.inc.c index c42d5f59fb..1fa3f5c7e5 100644 --- a/src/common/StartRumbleWithParams.inc.c +++ b/src/common/StartRumbleWithParams.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(StartRumbleWithParams)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(StartRumbleWithParams)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; start_rumble(get_variable(script, *args++), get_variable(script, *args++)); diff --git a/src/common/UnkAngleFunc2.inc.c b/src/common/UnkAngleFunc2.inc.c index f545a4e915..6d378fa767 100644 --- a/src/common/UnkAngleFunc2.inc.c +++ b/src/common/UnkAngleFunc2.inc.c @@ -2,7 +2,7 @@ // TODO: this include should have some scripts; see area_kmr_part_1/stage/kmr_03.c -ApiStatus N(UnkAngleFunc2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkAngleFunc2)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; f32 var0 = get_variable(script, *args++) / 10.0; s32 a3 = *args++; diff --git a/src/common/UnkBackgroundFunc.inc.c b/src/common/UnkBackgroundFunc.inc.c index d1a046be1a..1fc7171773 100644 --- a/src/common/UnkBackgroundFunc.inc.c +++ b/src/common/UnkBackgroundFunc.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(UnkBackgroundFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkBackgroundFunc)(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 20; } diff --git a/src/common/UnkBackgroundFunc2.inc.c b/src/common/UnkBackgroundFunc2.inc.c index eee284d728..ff7030c142 100644 --- a/src/common/UnkBackgroundFunc2.inc.c +++ b/src/common/UnkBackgroundFunc2.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(UnkBackgroundFunc2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkBackgroundFunc2)(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); *D_801512F0 = 1; diff --git a/src/common/UnkBackgroundFunc3.inc.c b/src/common/UnkBackgroundFunc3.inc.c index 411d673596..c3c6ababfc 100644 --- a/src/common/UnkBackgroundFunc3.inc.c +++ b/src/common/UnkBackgroundFunc3.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(UnkBackgroundFunc3)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkBackgroundFunc3)(Evt* script, s32 isInitialCall) { mdl_set_all_fog_mode(1); *D_801512F0 = 1; set_background_color_blend(0, 0, 0, 0); diff --git a/src/common/UnkBattleFunc1.inc.c b/src/common/UnkBattleFunc1.inc.c index 2f71ff3cb8..93d3e94f6f 100644 --- a/src/common/UnkBattleFunc1.inc.c +++ b/src/common/UnkBattleFunc1.inc.c @@ -1,6 +1,6 @@ #include "battle/battle.h" -ApiStatus N(UnkBattleFunc1)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkBattleFunc1)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); diff --git a/src/common/UnkBattleFunc2.inc.c b/src/common/UnkBattleFunc2.inc.c index 8b614e817b..c248780534 100644 --- a/src/common/UnkBattleFunc2.inc.c +++ b/src/common/UnkBattleFunc2.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkBattleFunc2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkBattleFunc2)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 x = get_variable(script, *args++); s32 y = get_variable(script, *args++); @@ -12,7 +12,7 @@ ApiStatus N(UnkBattleFunc2)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(UnkBattleFunc2_2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkBattleFunc2_2)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 x = get_variable(script, *args++); s32 y = get_variable(script, *args++); diff --git a/src/common/UnkBattleFunc5.inc.c b/src/common/UnkBattleFunc5.inc.c index f157d8e131..4dae3a1781 100644 --- a/src/common/UnkBattleFunc5.inc.c +++ b/src/common/UnkBattleFunc5.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(UnkBattleFunc5)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkBattleFunc5)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 actorID = get_variable(script, *args++); s32 partID = get_variable(script, *args++); diff --git a/src/common/UnkFloatFunc.inc.c b/src/common/UnkFloatFunc.inc.c index 471ba2f6d7..cf948d948a 100644 --- a/src/common/UnkFloatFunc.inc.c +++ b/src/common/UnkFloatFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFloatFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFloatFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a1 = *args++; s32 var0 = get_variable(script, a1); diff --git a/src/common/UnkFloatFunc2.inc.c b/src/common/UnkFloatFunc2.inc.c index 9885a271df..1f062f7942 100644 --- a/src/common/UnkFloatFunc2.inc.c +++ b/src/common/UnkFloatFunc2.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFloatFunc2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFloatFunc2)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 a1 = *args++; diff --git a/src/common/UnkFogFunc.inc.c b/src/common/UnkFogFunc.inc.c index 84d21523a0..cadbb68c7d 100644 --- a/src/common/UnkFogFunc.inc.c +++ b/src/common/UnkFogFunc.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(UnkFogFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFogFunc)(Evt* script, s32 isInitialCall) { set_world_fog_dist(980, 1000); set_world_fog_color(15, 5, 55, 255); enable_world_fog(); diff --git a/src/common/UnkFogFunc2.inc.c b/src/common/UnkFogFunc2.inc.c index 1099c569cc..0875120911 100644 --- a/src/common/UnkFogFunc2.inc.c +++ b/src/common/UnkFogFunc2.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(UnkFogFunc2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFogFunc2)(Evt* script, s32 isInitialCall) { enable_world_fog(); set_world_fog_dist(950, 1000); set_world_fog_color(16, 16, 16, 255); diff --git a/src/common/UnkStarFunc.inc.c b/src/common/UnkStarFunc.inc.c index f993bcf84d..e020023079 100644 --- a/src/common/UnkStarFunc.inc.c +++ b/src/common/UnkStarFunc.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(UnkStarFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkStarFunc)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; Bytecode* args = script->ptrReadPos; diff --git a/src/encounter_api.c b/src/encounter_api.c index 02e0056e2d..1848ef6882 100644 --- a/src/encounter_api.c +++ b/src/encounter_api.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus SetEncounterStatusFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetEncounterStatusFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; EncounterStatus* currentEncounter = &gCurrentEncounter; s32 a0 = *args++; @@ -15,28 +15,28 @@ ApiStatus SetEncounterStatusFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus IsStartingConversation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus IsStartingConversation(Evt* script, s32 isInitialCall) { Bytecode arg1 = *script->ptrReadPos; set_variable(script, arg1, is_starting_conversation()); return ApiStatus_DONE2; } -ApiStatus func_80044238(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80044238(Evt* script, s32 isInitialCall) { func_80072BCC(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus LoadDemoBattle(ScriptInstance* script, s32 isInitialCall) { +ApiStatus LoadDemoBattle(Evt* script, s32 isInitialCall) { load_demo_battle(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus func_80044290(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80044290(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus MakeNpcs(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MakeNpcs(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -57,34 +57,34 @@ ApiStatus MakeNpcs(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -INCLUDE_ASM(s32, "encounter_api", RemoveNpc, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "encounter_api", RemoveNpc, Evt* script, s32 isInitialCall); -INCLUDE_ASM(s32, "encounter_api", RemoveEncounter, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "encounter_api", RemoveEncounter, Evt* script, s32 isInitialCall); -ApiStatus GetBattleOutcome(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetBattleOutcome(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gCurrentEncounter.battleOutcome); return ApiStatus_DONE2; } -ApiStatus func_800445A8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_800445A8(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, script->owner1.enemy->unk_C4); return ApiStatus_DONE2; } -ApiStatus func_800445D4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_800445D4(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, script->owner1.enemy->unk_C8); return ApiStatus_DONE2; } -ApiStatus GetOwnerEncounterTrigger(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetOwnerEncounterTrigger(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, script->owner1.enemy->encountered); return ApiStatus_DONE2; } -ApiStatus DoNpcDefeat(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DoNpcDefeat(Evt* script, s32 isInitialCall) { Enemy* owner = script->owner1.enemy; Npc* npc = get_npc_unsafe(owner->npcID); - ScriptInstance* newScript; + Evt* newScript; kill_script(script); npc->currentAnim.w = owner->animList[6]; @@ -100,19 +100,19 @@ ApiStatus DoNpcDefeat(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "encounter_api", start_battle); -ApiStatus StartBattle(ScriptInstance* script, s32 isInitialCall) { +ApiStatus StartBattle(Evt* script, s32 isInitialCall) { start_battle(script, -1); return ApiStatus_DONE1; } -ApiStatus StartBattleWith(ScriptInstance* script, s32 isInitialCall) { +ApiStatus StartBattleWith(Evt* script, s32 isInitialCall) { start_battle(script, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE1; } -INCLUDE_ASM(s32, "encounter_api", StartBossBattle, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "encounter_api", StartBossBattle, Evt* script, s32 isInitialCall); -ApiStatus SetBattleMusic(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetBattleMusic(Evt* script, s32 isInitialCall) { Bytecode songID = get_variable(script, *script->ptrReadPos); EncounterStatus* currentEncounter = &gCurrentEncounter; @@ -122,9 +122,9 @@ ApiStatus SetBattleMusic(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "encounter_api", BindNpcAI, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "encounter_api", BindNpcAI, Evt* script, s32 isInitialCall); -ApiStatus BindNpcIdle(ScriptInstance* script, s32 isInitialCall) { +ApiStatus BindNpcIdle(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* owner = script->owner1.enemy; NpcID npcID = get_variable(script, *args++); @@ -140,11 +140,11 @@ ApiStatus BindNpcIdle(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus RestartNpcAI(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RestartNpcAI(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; NpcID npcId = get_variable(script, *args++); - ScriptInstance* newScript; + Evt* newScript; s32 groupFlags; if (npcId == NPC_SELF) { @@ -174,7 +174,7 @@ ApiStatus RestartNpcAI(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnableNpcAI(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableNpcAI(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; NpcID npcId = get_variable(script, *args++); @@ -197,9 +197,9 @@ ApiStatus EnableNpcAI(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "encounter_api", SetNpcAux, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "encounter_api", SetNpcAux, Evt* script, s32 isInitialCall); -ApiStatus BindNpcAux(ScriptInstance* script, s32 isInitialCall) { +ApiStatus BindNpcAux(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; NpcID npcId = get_variable(script, *args++); @@ -215,11 +215,11 @@ ApiStatus BindNpcAux(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus RestartNpcAux(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RestartNpcAux(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; NpcID npcID = get_variable(script, *args++); - ScriptInstance* newScript; + Evt* newScript; s32 groupFlags; if (npcID == NPC_SELF) { @@ -248,7 +248,7 @@ ApiStatus RestartNpcAux(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnableNpcAux(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableNpcAux(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; NpcID npcId = get_variable(script, *args++); @@ -271,7 +271,7 @@ ApiStatus EnableNpcAux(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus BindNpcInteract(ScriptInstance* script, s32 isInitialCall) { +ApiStatus BindNpcInteract(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; NpcID npcId = get_variable(script, *args++); @@ -291,7 +291,7 @@ ApiStatus BindNpcInteract(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus BindNpcHit(ScriptInstance* script, s32 isInitialCall) { +ApiStatus BindNpcHit(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; NpcID npcId = get_variable(script, *args++); @@ -311,7 +311,7 @@ ApiStatus BindNpcHit(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus BindNpcDefeat(ScriptInstance* script, s32 isInitialCall) { +ApiStatus BindNpcDefeat(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; s32 npcId = get_variable(script, *args++); @@ -327,7 +327,7 @@ ApiStatus BindNpcDefeat(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetSelfVar(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetSelfVar(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* owner = script->owner1.enemy; s32 var1 = get_variable(script, *args++); @@ -337,14 +337,14 @@ ApiStatus SetSelfVar(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetSelfVar(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetSelfVar(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; set_variable(script, *args, script->owner1.enemy->varTable[get_variable(script, *args++)]); return ApiStatus_DONE2; } -ApiStatus SetNpcVar(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcVar(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; NpcID npcId = get_variable(script, *args++); @@ -361,7 +361,7 @@ ApiStatus SetNpcVar(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetNpcVar(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetNpcVar(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; NpcID npcID = get_variable(script, *args++); @@ -378,7 +378,7 @@ ApiStatus GetNpcVar(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetSelfRotation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetSelfRotation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Npc* self = get_npc_unsafe(script->owner2.npcID); s32 rotX = get_variable(script, *args++); @@ -392,12 +392,12 @@ ApiStatus SetSelfRotation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetSelfEnemyFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetSelfEnemyFlags(Evt* script, s32 isInitialCall) { script->owner1.enemy->flags = *script->ptrReadPos; return ApiStatus_DONE2; } -ApiStatus SetSelfEnemyFlagBits(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetSelfEnemyFlagBits(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* owner = script->owner1.enemy; s32 bits = *args++; @@ -410,7 +410,7 @@ ApiStatus SetSelfEnemyFlagBits(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SyncOverrideEnemyPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SyncOverrideEnemyPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* owner = script->owner1.enemy; Npc* npc = get_npc_unsafe(script->owner2.npcID); @@ -423,12 +423,12 @@ ApiStatus SyncOverrideEnemyPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetSelfNpcID(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetSelfNpcID(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, script->owner1.enemy->npcID); return ApiStatus_DONE2; } -ApiStatus ClearDefeatedEnemies(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ClearDefeatedEnemies(Evt* script, s32 isInitialCall) { EncounterStatus* currentEncounter = &gCurrentEncounter; s32 i; s32 j; @@ -441,7 +441,7 @@ ApiStatus ClearDefeatedEnemies(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetEnemyFlagBits(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetEnemyFlagBits(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; NpcID npcId = get_variable(script, *args++); @@ -463,11 +463,11 @@ ApiStatus SetEnemyFlagBits(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_8004572C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8004572C(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetSelfAnimationFromTable(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetSelfAnimationFromTable(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* owner = script->owner1.enemy; @@ -475,29 +475,29 @@ ApiStatus GetSelfAnimationFromTable(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80045798(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80045798(Evt* script, s32 isInitialCall) { gPartnerActionStatus.unk_358 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus func_800457C4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_800457C4(Evt* script, s32 isInitialCall) { Enemy* ownerActor = script->owner1.enemy; ownerActor->unk_B5 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus func_800457F8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_800457F8(Evt* script, s32 isInitialCall) { gCurrentEncounter.unk_12 = 1; return ApiStatus_DONE2; } -ApiStatus GetEncounterTriggerHitTier(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetEncounterTriggerHitTier(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gCurrentEncounter.hitTier); return ApiStatus_DONE2; } -ApiStatus func_80045838(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80045838(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -512,12 +512,12 @@ ApiStatus func_80045838(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_800458CC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_800458CC(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, script->owner1.enemy->npcSettings->unk_2A & 8); return ApiStatus_DONE2; } -ApiStatus func_80045900(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80045900(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var0 = get_variable(script, *script->ptrReadPos); @@ -551,7 +551,7 @@ ApiStatus func_80045900(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetTattleString(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetTattleString(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID enemyId = get_variable(script, *args++); u32 tattleString = get_variable(script, *args); diff --git a/src/evt/cam_api.c b/src/evt/cam_api.c index 278e9d6e9e..737028dd63 100644 --- a/src/evt/cam_api.c +++ b/src/evt/cam_api.c @@ -1,17 +1,17 @@ #include "common.h" #include "camera.h" -Script ShakeCam1 = SCRIPT({ +EvtSource ShakeCam1 = SCRIPT({ group 0; ShakeCam(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0); }); -Script ShakeCamX = SCRIPT({ +EvtSource ShakeCamX = SCRIPT({ group 0; ShakeCam(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); }); -ApiStatus SetCamEnabled(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamEnabled(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); s32 enabled = get_variable(script, *args++); @@ -24,7 +24,7 @@ ApiStatus SetCamEnabled(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCamFlag80(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamFlag80(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); s32 enabled = get_variable(script, *args++); @@ -37,7 +37,7 @@ ApiStatus SetCamFlag80(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCamPerspective(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamPerspective(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); s16 mode = get_variable(script, *args++); @@ -56,7 +56,7 @@ ApiStatus SetCamPerspective(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802CA90C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CA90C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); s16 mode = get_variable(script, *args++); @@ -68,7 +68,7 @@ ApiStatus func_802CA90C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802CA988(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CA988(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode id = get_variable(script, *args++); Bytecode outVar1 = *args++; @@ -99,7 +99,7 @@ ApiStatus func_802CA988(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCamViewport(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamViewport(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); s32 x = get_variable(script, *args++); @@ -111,7 +111,7 @@ ApiStatus SetCamViewport(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802CABE8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CABE8(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); s16 value1 = get_variable(script, *args++); @@ -128,7 +128,7 @@ ApiStatus func_802CABE8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802CACC0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CACC0(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); s16 value1 = get_variable(script, *args++); @@ -145,7 +145,7 @@ ApiStatus func_802CACC0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCamBGColor(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamBGColor(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); s16 r = get_variable(script, *args++); @@ -160,7 +160,7 @@ ApiStatus SetCamBGColor(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802CAE50(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CAE50(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); s32 value1 = get_variable(script, *args++); @@ -175,7 +175,7 @@ ApiStatus func_802CAE50(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCamTarget(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamTarget(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); s32 x = get_variable(script, *args++); @@ -190,12 +190,12 @@ ApiStatus SetCamTarget(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/cam_api", func_802CB008, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "evt/cam_api", func_802CB008, Evt* script, s32 isInitialCall); -INCLUDE_ASM(s32, "evt/cam_api", ShakeCam, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "evt/cam_api", ShakeCam, Evt* script, s32 isInitialCall); void exec_ShakeCam1(s32 arg0, s32 arg1, s32 arg2) { - ScriptInstance* script; + Evt* script; script = start_script_in_group(&ShakeCam1, 1, 0, 4); script->varTable[0] = arg0; @@ -204,7 +204,7 @@ void exec_ShakeCam1(s32 arg0, s32 arg1, s32 arg2) { } void exec_ShakeCamX(s32 arg0, s32 arg1, s32 arg2, f32 arg3) { - ScriptInstance* script; + Evt* script; script = start_script_in_group(&ShakeCamX, 1, 0, 4); set_variable(script, SI_VAR(0), arg0); @@ -213,7 +213,7 @@ void exec_ShakeCamX(s32 arg0, s32 arg1, s32 arg2, f32 arg3) { set_float_variable(script, SI_VAR(3), arg3); } -ApiStatus SetCamLeadPlayer(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamLeadPlayer(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); s32 enabled = get_variable(script, *args++); @@ -228,7 +228,7 @@ ApiStatus SetCamLeadPlayer(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802CB710(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CB710(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); f32 value = get_variable(script, *args++); @@ -239,7 +239,7 @@ ApiStatus func_802CB710(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PanToTarget(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PanToTarget(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); f32 panPhase = get_float_variable(script, *args++); @@ -259,11 +259,11 @@ ApiStatus PanToTarget(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/cam_api", UseSettingsFrom, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "evt/cam_api", UseSettingsFrom, Evt* script, s32 isInitialCall); -INCLUDE_ASM(s32, "evt/cam_api", LoadSettings, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "evt/cam_api", LoadSettings, Evt* script, s32 isInitialCall); -ApiStatus SetCamType(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamType(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Camera* cameras = gCameras; @@ -276,7 +276,7 @@ ApiStatus SetCamType(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCamPitch(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamPitch(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Camera* cameras = gCameras; @@ -289,7 +289,7 @@ ApiStatus SetCamPitch(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCamDistance(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamDistance(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Camera* cameras = gCameras; @@ -300,7 +300,7 @@ ApiStatus SetCamDistance(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCamPosA(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamPosA(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Camera* cameras = gCameras; @@ -313,7 +313,7 @@ ApiStatus SetCamPosA(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCamPosB(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamPosB(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Camera* cameras = gCameras; @@ -326,7 +326,7 @@ ApiStatus SetCamPosB(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCamPosC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamPosC(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Camera* cameras = gCameras; @@ -339,7 +339,7 @@ ApiStatus SetCamPosC(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPanTarget(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPanTarget(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Camera* cameras = gCameras; @@ -355,7 +355,7 @@ ApiStatus SetPanTarget(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCamSpeed(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCamSpeed(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); f32 speed = get_float_variable(script, *args++); @@ -366,7 +366,7 @@ ApiStatus SetCamSpeed(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetCamType(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetCamType(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Bytecode outVar1 = *args++; @@ -379,7 +379,7 @@ ApiStatus GetCamType(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetCamPitch(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetCamPitch(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Bytecode outVar1 = *args++; @@ -392,7 +392,7 @@ ApiStatus GetCamPitch(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetCamDistance(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetCamDistance(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Bytecode outVar1 = *args++; @@ -403,7 +403,7 @@ ApiStatus GetCamDistance(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetCamPosA(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetCamPosA(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Bytecode outVar1 = *args++; @@ -416,7 +416,7 @@ ApiStatus GetCamPosA(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetCamPosB(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetCamPosB(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Bytecode outVar1 = *args++; @@ -429,7 +429,7 @@ ApiStatus GetCamPosB(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetCamPosC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetCamPosC(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Bytecode outVar1 = *args++; @@ -442,7 +442,7 @@ ApiStatus GetCamPosC(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetCamPosition(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetCamPosition(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, *args++); Bytecode outVar1 = *args++; @@ -457,7 +457,7 @@ ApiStatus GetCamPosition(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus WaitForCam(ScriptInstance* script, s32 isInitialCall) { +ApiStatus WaitForCam(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = get_variable(script, args[0]); f32 endInterpValue = get_float_variable(script, args[1]); @@ -470,11 +470,11 @@ ApiStatus WaitForCam(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/cam_api", SetCamProperties, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "evt/cam_api", SetCamProperties, Evt* script, s32 isInitialCall); -INCLUDE_ASM(s32, "evt/cam_api", AdjustCam, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "evt/cam_api", AdjustCam, Evt* script, s32 isInitialCall); -INCLUDE_ASM(s32, "evt/cam_api", ResetCam, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "evt/cam_api", ResetCam, Evt* script, s32 isInitialCall); void update_animated_models(void) { s32 i; @@ -490,7 +490,7 @@ void update_animated_models(void) { INCLUDE_ASM(s32, "evt/cam_api", render_animated_models); -ApiStatus InitAnimatedModels(ScriptInstance* script, s32 isInitialCall) { +ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall) { if (!gGameStatusPtr->isBattle) { gCurrentMeshAnimationListPtr = &gWorldMeshAnimationList; } else { @@ -500,7 +500,7 @@ ApiStatus InitAnimatedModels(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus LoadAnimatedModel(ScriptInstance* script, s32 isInitialCall) { +ApiStatus LoadAnimatedModel(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); @@ -524,7 +524,7 @@ ApiStatus LoadAnimatedModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus LoadAnimatedMesh(ScriptInstance* script, s32 isInitialCall) { +ApiStatus LoadAnimatedMesh(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); @@ -548,7 +548,7 @@ ApiStatus LoadAnimatedMesh(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlayModelAnimation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayModelAnimation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -560,7 +560,7 @@ ApiStatus PlayModelAnimation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlayModelAnimationStartingFrom(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayModelAnimationStartingFrom(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -573,7 +573,7 @@ ApiStatus PlayModelAnimationStartingFrom(ScriptInstance* script, s32 isInitialCa return ApiStatus_DONE2; } -ApiStatus ChangeModelAnimation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ChangeModelAnimation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -588,7 +588,7 @@ ApiStatus ChangeModelAnimation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetAnimatedModelRootPosition(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); f32 x = get_float_variable(script, *args++); @@ -603,7 +603,7 @@ ApiStatus SetAnimatedModelRootPosition(ScriptInstance* script, s32 isInitialCall return ApiStatus_DONE2; } -ApiStatus GetAnimatedModelRootPosition(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 outX = *args++; @@ -618,7 +618,7 @@ ApiStatus GetAnimatedModelRootPosition(ScriptInstance* script, s32 isInitialCall return ApiStatus_DONE2; } -ApiStatus AddAnimatedModelRootPosition(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); f32 x = get_float_variable(script, *args++); @@ -633,7 +633,7 @@ ApiStatus AddAnimatedModelRootPosition(ScriptInstance* script, s32 isInitialCall return ApiStatus_DONE2; } -ApiStatus SetAnimatedModelRootRotation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetAnimatedModelRootRotation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); f32 x = get_float_variable(script, *args++); @@ -648,7 +648,7 @@ ApiStatus SetAnimatedModelRootRotation(ScriptInstance* script, s32 isInitialCall return ApiStatus_DONE2; } -ApiStatus SetAnimatedModelRootScale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetAnimatedModelRootScale(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); f32 x = get_float_variable(script, *args++); @@ -663,7 +663,7 @@ ApiStatus SetAnimatedModelRootScale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetAnimatedModelRenderMode(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetAnimatedModelRenderMode(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 renderMode = get_float_variable(script, *args++); @@ -672,7 +672,7 @@ ApiStatus SetAnimatedModelRenderMode(ScriptInstance* script, s32 isInitialCall) return ApiStatus_DONE2; } -ApiStatus DeleteAnimatedModel(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DeleteAnimatedModel(Evt* script, s32 isInitialCall) { AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[get_variable(script, *script->ptrReadPos)]; delete_model_animator(get_animator_by_index(model->animModelID)); @@ -680,7 +680,7 @@ ApiStatus DeleteAnimatedModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetAnimatorFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetAnimatorFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 a1 = *args++; diff --git a/src/evt/demo_api.c b/src/evt/demo_api.c index 574c150ce1..590b395bfa 100644 --- a/src/evt/demo_api.c +++ b/src/evt/demo_api.c @@ -1,8 +1,8 @@ #include "common.h" -INCLUDE_ASM(ApiStatus, "evt/demo_api", SetSpriteShading, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "evt/demo_api", SetSpriteShading, Evt* script, s32 isInitialCall); -ApiStatus EnableSpriteShading(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableSpriteShading(Evt* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos) != 0) { *D_80151328 |= 1; } else { @@ -11,27 +11,27 @@ ApiStatus EnableSpriteShading(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetDemoState(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetDemoState(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gGameStatusPtr->demoState); return ApiStatus_DONE2; } -ApiStatus DemoPressButton(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DemoPressButton(Evt* script, s32 isInitialCall) { gGameStatusPtr->demoButtonInput |= get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus DemoReleaseButton(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DemoReleaseButton(Evt* script, s32 isInitialCall) { gGameStatusPtr->demoButtonInput &= ~get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus DemoSetButtons(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DemoSetButtons(Evt* script, s32 isInitialCall) { gGameStatusPtr->demoButtonInput = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus DemoJoystickRadial(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DemoJoystickRadial(Evt* script, s32 isInitialCall) { GameStatus** gameStatus = &gGameStatusPtr; f32 a; f32 b; @@ -46,7 +46,7 @@ ApiStatus DemoJoystickRadial(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus DemoJoystickXY(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DemoJoystickXY(Evt* script, s32 isInitialCall) { GameStatus** gameStatus = &gGameStatusPtr; f32 x; f32 y; diff --git a/src/evt/f8f60_len_1560.c b/src/evt/f8f60_len_1560.c index c5f98de36d..a3af1b4025 100644 --- a/src/evt/f8f60_len_1560.c +++ b/src/evt/f8f60_len_1560.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus MakeLerp(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MakeLerp(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; script->varTable[0xC] = get_variable(script, *ptrReadPos++); // start @@ -12,7 +12,7 @@ ApiStatus MakeLerp(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus UpdateLerp(ScriptInstance* script, s32 isInitialCall) { +ApiStatus UpdateLerp(Evt* script, s32 isInitialCall) { script->varTable[0x0] = (s32) update_lerp( script->varTable[0xB], script->varTable[0xC], @@ -31,7 +31,7 @@ ApiStatus UpdateLerp(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus RandInt(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RandInt(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; s32 max = get_variable(script, *ptrReadPos++); @@ -42,7 +42,7 @@ ApiStatus RandInt(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetAngleBetweenNPCs(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetAngleBetweenNPCs(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID aID = get_variable(script, *ptrReadPos++); @@ -56,7 +56,7 @@ ApiStatus GetAngleBetweenNPCs(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetAngleToNPC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetAngleToNPC(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* ptrReadPos = script->ptrReadPos; @@ -69,7 +69,7 @@ ApiStatus GetAngleToNPC(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetAngleToPlayer(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetAngleToPlayer(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* ptrReadPos = script->ptrReadPos; @@ -82,7 +82,7 @@ ApiStatus GetAngleToPlayer(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AwaitPlayerApproach(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AwaitPlayerApproach(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; @@ -110,7 +110,7 @@ ApiStatus AwaitPlayerApproach(ScriptInstance* script, s32 isInitialCall) { } } -ApiStatus IsPlayerWithin(ScriptInstance* script, s32 isInitialCall) { +ApiStatus IsPlayerWithin(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; @@ -141,7 +141,7 @@ ApiStatus IsPlayerWithin(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AwaitPlayerLeave(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AwaitPlayerLeave(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; @@ -169,7 +169,7 @@ ApiStatus AwaitPlayerLeave(ScriptInstance* script, s32 isInitialCall) { } } -ApiStatus AddVectorPolar(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddVectorPolar(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; Bytecode xVar = *ptrReadPos++; @@ -188,7 +188,7 @@ ApiStatus AddVectorPolar(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802D4BDC(ScriptInstance* script, s32 initialCall) { +ApiStatus func_802D4BDC(Evt* script, s32 initialCall) { s32* t0 = &script->functionTemp[0]; s32* t1 = &script->functionTemp[1]; s32 t1v; @@ -216,7 +216,7 @@ ApiStatus func_802D4BDC(ScriptInstance* script, s32 initialCall) { return ApiStatus_BLOCK; } -ApiStatus func_802D4C4C(ScriptInstance* script, s32 initialCall) { +ApiStatus func_802D4C4C(Evt* script, s32 initialCall) { s32* t0 = &script->functionTemp[0]; s32* t1 = &script->functionTemp[1]; s32 t1v; @@ -243,7 +243,7 @@ ApiStatus func_802D4C4C(ScriptInstance* script, s32 initialCall) { return ApiStatus_BLOCK; } -ApiStatus func_802D4CC4(ScriptInstance* script, s32 initialCall) { +ApiStatus func_802D4CC4(Evt* script, s32 initialCall) { s32 value = get_variable(script, *script->ptrReadPos); if (value < 0) { set_screen_overlay_params_back(255, -1.0f); @@ -254,7 +254,7 @@ ApiStatus func_802D4CC4(ScriptInstance* script, s32 initialCall) { return ApiStatus_DONE2; } -ApiStatus func_802D4D14(ScriptInstance* script, s32 initialCall) { +ApiStatus func_802D4D14(Evt* script, s32 initialCall) { s32 value = get_float_variable(script, *script->ptrReadPos); set_screen_overlay_center(0, 0, 0xC, 0x14); @@ -264,7 +264,7 @@ ApiStatus func_802D4D14(ScriptInstance* script, s32 initialCall) { return ApiStatus_DONE2; } -ApiStatus func_802D4D88(ScriptInstance* script, s32 initialCall) { +ApiStatus func_802D4D88(Evt* script, s32 initialCall) { set_screen_overlay_params_front(0xC, 0); return ApiStatus_DONE2; } @@ -351,7 +351,7 @@ INCLUDE_ASM(s32, "evt/f8f60_len_1560", load_path_data); INCLUDE_ASM(s32, "evt/f8f60_len_1560", get_path_position); -s32 LoadPath(ScriptInstance* script, s32 isInitialCall) { +s32 LoadPath(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 time = get_variable(script, *args++); s32 vectorList = get_variable(script, *args++); @@ -373,9 +373,9 @@ s32 LoadPath(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/f8f60_len_1560", GetNextPathPos, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "evt/f8f60_len_1560", GetNextPathPos, Evt* script, s32 isInitialCall); -ApiStatus GetDist2D(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetDist2D(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; Bytecode outVar = *ptrReadPos++; @@ -389,12 +389,12 @@ ApiStatus GetDist2D(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetTimeFreezeMode(ScriptInstance* script, s32 initialCall) { +ApiStatus SetTimeFreezeMode(Evt* script, s32 initialCall) { set_time_freeze_mode(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus ModifyGlobalOverrideFlags(ScriptInstance* script, s32 initialCall) { +ApiStatus ModifyGlobalOverrideFlags(Evt* script, s32 initialCall) { Bytecode* ptrReadPos = script->ptrReadPos; s32 setMode = get_variable(script, *ptrReadPos++); s32 flags = get_variable(script, *ptrReadPos++); @@ -408,7 +408,7 @@ ApiStatus ModifyGlobalOverrideFlags(ScriptInstance* script, s32 initialCall) { return ApiStatus_DONE2; } -ApiStatus SetValueByRef(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetValueByRef(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; s32 dest = get_variable(script, *ptrReadPos++); /* Reference */ @@ -418,7 +418,7 @@ ApiStatus SetValueByRef(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetValueByRef(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetValueByRef(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; s32 src = get_variable(script, *ptrReadPos++); /* Reference */ @@ -429,7 +429,7 @@ ApiStatus GetValueByRef(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnableStatusMenu(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableStatusMenu(Evt* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos) != 0) { decrement_status_menu_disabled(); } else { @@ -439,7 +439,7 @@ ApiStatus EnableStatusMenu(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ShowStatusMenu(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShowStatusMenu(Evt* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos) != 0) { func_800E9894(); close_status_menu(); @@ -450,7 +450,7 @@ ApiStatus ShowStatusMenu(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetGameMode(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetGameMode(Evt* script, s32 isInitialCall) { s16 mode = get_variable(script, *script->ptrReadPos); set_game_mode(mode); @@ -458,7 +458,7 @@ ApiStatus SetGameMode(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ClampAngleInt(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ClampAngleInt(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; set_variable(script, *ptrReadPos, clamp_angle(get_variable(script, *ptrReadPos))); @@ -466,7 +466,7 @@ ApiStatus ClampAngleInt(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ClampAngleFloat(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ClampAngleFloat(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; set_float_variable(script, *ptrReadPos, clamp_angle(get_float_variable(script, *ptrReadPos))); diff --git a/src/evt/fa4c0_len_3bf0.c b/src/evt/fa4c0_len_3bf0.c index 44dc782900..04aa655828 100644 --- a/src/evt/fa4c0_len_3bf0.c +++ b/src/evt/fa4c0_len_3bf0.c @@ -4,7 +4,7 @@ s32 func_802D5B10(); s32 D_802D9D30 = 0; -Script D_802D9D34 = SCRIPT({ +EvtSource D_802D9D34 = SCRIPT({ func_802D5B10(); }); @@ -12,7 +12,7 @@ INCLUDE_ASM(s32, "evt/fa4c0_len_3bf0", func_802D5B10); INCLUDE_ASM(s32, "evt/fa4c0_len_3bf0", func_802D5C70); -ApiStatus FadeOutMusic(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FadeOutMusic(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemID = get_variable(script, *args++); s32* ptrNextPos = args++; @@ -20,7 +20,7 @@ ApiStatus FadeOutMusic(ScriptInstance* script, s32 isInitialCall) { return (bgm_set_song(itemID, -1, 0, get_variable(script, *ptrNextPos++), 8) != 0) * ApiStatus_DONE2; } -ApiStatus SetMusicTrack(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetMusicTrack(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 musicPlayer = get_variable(script, *args++); s32 songID = get_variable(script, *args++); @@ -30,7 +30,7 @@ ApiStatus SetMusicTrack(ScriptInstance* script, s32 isInitialCall) { return (bgm_set_song(musicPlayer, songID, variation, 0x1F4, volume) != 0) * ApiStatus_DONE2; } -ApiStatus FadeInMusic(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FadeInMusic(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); @@ -42,7 +42,7 @@ ApiStatus FadeInMusic(ScriptInstance* script, s32 isInitialCall) { return (func_8014A964(var0, var1, var2, var3, var4, var5) != 0) * ApiStatus_DONE2; } -ApiStatus func_802D5EE0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D5EE0(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; MusicSettings* musicSettings = gMusicSettings; @@ -50,62 +50,62 @@ ApiStatus func_802D5EE0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802D5F28(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D5F28(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; func_8014AA54(get_variable(script, *args++), get_variable(script, *args++), (s16)get_variable(script, *args++)); return ApiStatus_DONE2; } -ApiStatus func_802D5FA4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D5FA4(Evt* script, s32 isInitialCall) { func_8014AB0C(0, (s16)get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus PopSong(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PopSong(Evt* script, s32 isInitialCall) { bgm_pop_song(); return ApiStatus_DONE2; } -ApiStatus PushSong(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PushSong(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; bgm_push_song(get_variable(script, *args++), get_variable(script, *args++)); return ApiStatus_DONE2; } -ApiStatus PopBattleSong(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PopBattleSong(Evt* script, s32 isInitialCall) { bgm_pop_battle_song(); return ApiStatus_DONE2; } -ApiStatus PushBattleSong(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PushBattleSong(Evt* script, s32 isInitialCall) { bgm_push_battle_song(); return ApiStatus_DONE2; } -ApiStatus SetBattleSong(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetBattleSong(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; bgm_set_battle_song(get_variable(script, *args++), get_variable(script, *args++)); return ApiStatus_DONE2; } -ApiStatus ClearAmbientSounds(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ClearAmbientSounds(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 flags = get_variable(script, *args++); return (play_ambient_sounds(-1, flags) != 0) * ApiStatus_DONE2; } -ApiStatus PlayAmbientSounds(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayAmbientSounds(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 soundID = get_variable(script, *args++); return (play_ambient_sounds(soundID, 0xFA) != 0) * ApiStatus_DONE2; } -ApiStatus PlaySound(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlaySound(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 soundID = get_variable(script, *args++); @@ -113,7 +113,7 @@ ApiStatus PlaySound(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlaySoundWithVolume(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlaySoundWithVolume(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 soundID = get_variable(script, *args++); s32 value2 = get_variable(script, *args++); @@ -122,7 +122,7 @@ ApiStatus PlaySoundWithVolume(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlaySoundAt(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlaySoundAt(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 soundID = get_variable(script, *args++); s32 value2 = get_variable(script, *args++); @@ -134,35 +134,35 @@ ApiStatus PlaySoundAt(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus StopSound(ScriptInstance* script, s32 isInitialCall) { +ApiStatus StopSound(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; sfx_stop_sound(get_variable(script, *args++)); return ApiStatus_DONE2; } -ApiStatus func_802D62E4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D62E4(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; func_80149A6C(get_variable(script, *args++), 1); return ApiStatus_DONE2; } -ApiStatus UseDoorSounds(ScriptInstance* script, s32 isInitialCall) { +ApiStatus UseDoorSounds(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; gCurrentDoorSoundsSet = get_variable(script, *args++); return ApiStatus_DONE2; } -ApiStatus UseAdvancedDoorSounds(ScriptInstance* script, s32 isInitialCall) { +ApiStatus UseAdvancedDoorSounds(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; D_80151308 = get_variable(script, *args++); return ApiStatus_DONE2; } -ApiStatus PlaySoundAtF(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlaySoundAtF(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode soundID = *args++; u16 value2 = get_variable(script, *args++); @@ -174,13 +174,13 @@ ApiStatus PlaySoundAtF(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(ApiStatus, "evt/fa4c0_len_3bf0", ShowKeyChoicePopup, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "evt/fa4c0_len_3bf0", ShowKeyChoicePopup, Evt* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "evt/fa4c0_len_3bf0", ShowConsumableChoicePopup, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "evt/fa4c0_len_3bf0", ShowConsumableChoicePopup, Evt* script, s32 isInitialCall); // TODO: probably a split here (sound_api, item_api) -ApiStatus RemoveKeyItemAt(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RemoveKeyItemAt(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s16* ptrKeyItems = &gPlayerData.keyItems; @@ -189,7 +189,7 @@ ApiStatus RemoveKeyItemAt(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus RemoveItemAt(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RemoveItemAt(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s16* ptrInvItems = &gPlayerData.invItems; @@ -199,7 +199,7 @@ ApiStatus RemoveItemAt(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AddKeyItem(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddKeyItem(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 value = *args++; PlayerData* playerData = &gPlayerData; @@ -223,7 +223,7 @@ ApiStatus AddKeyItem(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus CloseChoicePopup(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CloseChoicePopup(Evt* script, s32 isInitialCall) { enable_player_input(); enable_player_static_collisions(); partner_enable_input(); @@ -231,7 +231,7 @@ ApiStatus CloseChoicePopup(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus HasKeyItem(ScriptInstance* script, s32 isInitialCall) { +ApiStatus HasKeyItem(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemID = get_variable(script, *args++); s32 value = *args++; @@ -247,7 +247,7 @@ ApiStatus HasKeyItem(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus FindKeyItem(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FindKeyItem(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemID = get_variable(script, *args++); s32 value = *args++; @@ -270,7 +270,7 @@ ApiStatus FindKeyItem(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AddItem(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddItem(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemID = get_variable(script, *args++); Bytecode outItemIdx = *args++; @@ -279,12 +279,12 @@ ApiStatus AddItem(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ClearVariable(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ClearVariable(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, 0); return ApiStatus_DONE2; } -ApiStatus FindItem(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FindItem(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemID = get_variable(script, *args++); s32 value = *args++; @@ -307,7 +307,7 @@ ApiStatus FindItem(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus RemoveItem(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RemoveItem(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemID = get_variable(script, *args++); s32 value = *args++; @@ -337,21 +337,21 @@ ApiStatus RemoveItem(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus CountFortessKeys(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CountFortessKeys(Evt* script, s32 isInitialCall) { s32 outVar = *script->ptrReadPos; set_variable(script, outVar, get_fortress_key_count()); return ApiStatus_DONE2; } -ApiStatus RemoveFortressKeys(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RemoveFortressKeys(Evt* script, s32 isInitialCall) { s32 num = get_variable(script, *script->ptrReadPos); subtract_fortress_keys(num); return ApiStatus_DONE2; } -ApiStatus MakeItemEntity(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MakeItemEntity(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemID = get_variable(script, *args++); s32 x = get_variable(script, *args++); @@ -364,7 +364,7 @@ ApiStatus MakeItemEntity(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus DropItemEntity(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DropItemEntity(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemID = get_variable(script, *args++); s32 x = get_variable(script, *args++); @@ -377,7 +377,7 @@ ApiStatus DropItemEntity(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus DropItemEntityB(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DropItemEntityB(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemID = get_variable(script, *args++); s32 x = get_variable(script, *args++); @@ -391,7 +391,7 @@ ApiStatus DropItemEntityB(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus RemoveItemEntity(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RemoveItemEntity(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemEntityIndex = get_variable(script, *args++); @@ -399,7 +399,7 @@ ApiStatus RemoveItemEntity(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AddBadge(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddBadge(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 badgeID = get_variable(script, *args++); Bytecode outBadgeIdx = *args++; @@ -408,7 +408,7 @@ ApiStatus AddBadge(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus RemoveBadge(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RemoveBadge(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerData* playerData = &gPlayerData; s32 badge = get_variable(script, *args++); @@ -428,7 +428,7 @@ ApiStatus RemoveBadge(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetItemPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetItemPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ItemEntity* ptrItemEntity; s32 itemEntityIndex; @@ -446,7 +446,7 @@ ApiStatus SetItemPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetItemFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetItemFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemEntityIndex = get_variable(script, *args++); s32 flagBits = *args++; @@ -461,7 +461,7 @@ ApiStatus SetItemFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } ; -ApiStatus SetItemAlpha(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetItemAlpha(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemEntityIndex = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -471,22 +471,22 @@ ApiStatus SetItemAlpha(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus AddCoin(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddCoin(Evt* script, s32 isInitialCall) { script->varTable[0] = add_coins(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus AddStarPoints(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddStarPoints(Evt* script, s32 isInitialCall) { script->varTable[0] = add_star_points(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus AddStarPieces(ScriptInstance* script, s32 isInitialCall) { +ApiStatus AddStarPieces(Evt* script, s32 isInitialCall) { script->varTable[0] = add_star_pieces(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus GetItemPower(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetItemPower(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemIdx = get_variable(script, *args++); Bytecode out1 = *args++; @@ -497,7 +497,7 @@ ApiStatus GetItemPower(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ShowGotItem(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShowGotItem(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { diff --git a/src/evt/fx_api.c b/src/evt/fx_api.c index 66ee12b787..0b0c25e51c 100644 --- a/src/evt/fx_api.c +++ b/src/evt/fx_api.c @@ -5,7 +5,7 @@ INCLUDE_ASM(void, "evt/fx_api", func_802D7460, f32 x, f32 y, f32 z, s32 arg3); INCLUDE_ASM(void, "evt/fx_api", func_802D74C0, f32 x, f32 y, f32 z, s32 arg3); -ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D7520(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; f32 x = get_float_variable(script, *args++); f32 y = get_float_variable(script, *args++); @@ -16,7 +16,7 @@ ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D75D8(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; f32 x = get_float_variable(script, *args++); f32 y = get_float_variable(script, *args++); @@ -29,16 +29,16 @@ ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "evt/fx_api", func_802D7690); -INCLUDE_ASM(s32, "evt/fx_api", ShowEmote, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(s32, "evt/fx_api", ShowEmote, Evt* script, s32 isInitialCall); -ApiStatus RemoveEffect(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RemoveEffect(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; remove_effect(get_variable(script, *args++)); return ApiStatus_DONE2; } -ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D7B10(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptrValue = (s32*) get_variable(script, *args++); @@ -46,7 +46,7 @@ ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802D7B44(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D7B44(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32** ptrValue = (s32**) get_variable(script, *args++); s32* ptrTemp = ptrValue[3]; @@ -55,7 +55,7 @@ ApiStatus func_802D7B44(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802D7B74(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D7B74(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32** ptrValue = (s32**) get_variable(script, *args++); s32* ptrTemp = ptrValue[3]; @@ -64,7 +64,7 @@ ApiStatus func_802D7B74(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802D7BA4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D7BA4(Evt* script, s32 isInitialCall) { s32 var1 = script->varTable[1]; s32 var2 = script->varTable[2]; s32 var3 = script->varTable[3]; @@ -95,11 +95,11 @@ ApiStatus func_802D7BA4(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -Script D_802D9D50 = SCRIPT({ +EvtSource D_802D9D50 = SCRIPT({ func_802D7BA4(); }); -ApiStatus Spawn802D9D50(ScriptInstance* script, s32 isInitialCall) { +ApiStatus Spawn802D9D50(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); @@ -109,7 +109,7 @@ ApiStatus Spawn802D9D50(ScriptInstance* script, s32 isInitialCall) { s32 var5 = get_variable(script, *args++); s32 var6 = get_variable(script, *args++); - ScriptInstance* newScript = start_script(D_802D9D50, 1, 0); + Evt* newScript = start_script(D_802D9D50, 1, 0); newScript->varTable[0] = var0; newScript->varTable[1] = var1; newScript->varTable[2] = var2; @@ -123,13 +123,13 @@ ApiStatus Spawn802D9D50(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "evt/fx_api", func_802D7E08); -INCLUDE_ASM(ApiStatus, "evt/fx_api", ShowSleepBubble, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "evt/fx_api", ShowSleepBubble, Evt* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "evt/fx_api", func_802D8248, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "evt/fx_api", func_802D8248, Evt* script, s32 isInitialCall); // So close aside from regalloc at the beginning #ifdef NON_MATCHING -ApiStatus PlayEffect(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayEffect(Evt* script, s32 isInitialCall) { Bytecode* args; Bytecode* intArgs; Bytecode* floatArgs; @@ -622,5 +622,5 @@ ApiStatus PlayEffect(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } #else -INCLUDE_ASM(ApiStatus, "evt/fx_api", PlayEffect, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "evt/fx_api", PlayEffect, Evt* script, s32 isInitialCall); #endif diff --git a/src/evt/map_api.c b/src/evt/map_api.c index 5051b774d2..e3c01450fb 100644 --- a/src/evt/map_api.c +++ b/src/evt/map_api.c @@ -8,7 +8,7 @@ typedef struct LavaReset { extern LavaReset* gLavaResetList; extern s32 D_802DADA4; -ApiStatus TranslateModel(ScriptInstance* script, s32 isInitialCall) { +ApiStatus TranslateModel(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 modelIndex = get_variable(script, *args++); f32 x; @@ -35,7 +35,7 @@ ApiStatus TranslateModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus RotateModel(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RotateModel(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 modelListIndex = get_model_list_index_from_tree_index(var1); @@ -58,7 +58,7 @@ ApiStatus RotateModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ScaleModel(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ScaleModel(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 modelIndex = get_variable(script, *args++); f32 x; @@ -85,7 +85,7 @@ ApiStatus ScaleModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetModelIndex(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetModelIndex(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode modelID = get_variable(script, *args++); Bytecode index = *args++; @@ -94,7 +94,7 @@ ApiStatus GetModelIndex(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus InvalidateModelTransform(ScriptInstance* script, s32 isInitialCall) { +ApiStatus InvalidateModelTransform(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode modelID = get_variable(script, *args++); Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(modelID)); @@ -103,7 +103,7 @@ ApiStatus InvalidateModelTransform(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus CloneModel(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CloneModel(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode srcModelID = get_variable(script, *args++); Bytecode newModelID = get_variable(script, *args++); @@ -112,7 +112,7 @@ ApiStatus CloneModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetModelCenter(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetModelCenter(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; f32 centerX; f32 centerY; @@ -129,7 +129,7 @@ ApiStatus GetModelCenter(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetTexPanner(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetTexPanner(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 treeIndex = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -140,7 +140,7 @@ ApiStatus SetTexPanner(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCustomGfxEnabled(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCustomGfxEnabled(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode treeIndex = get_variable(script, *args++); Bytecode enable = get_variable(script, *args++); @@ -154,7 +154,7 @@ ApiStatus SetCustomGfxEnabled(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetModelCustomGfx(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetModelCustomGfx(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 treeIndex = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -171,7 +171,7 @@ ApiStatus SetModelCustomGfx(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetModelTexVariant(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetModelTexVariant(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode treeIndex = get_variable(script, *args++); Bytecode var2 = get_variable(script, *args++); @@ -180,7 +180,7 @@ ApiStatus SetModelTexVariant(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnableTexPanning(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableTexPanning(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 treeIndex = get_variable(script, *args++); s32 flag = get_variable(script, *args++); @@ -194,7 +194,7 @@ ApiStatus EnableTexPanning(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnableModel(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableModel(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 listIndex = get_model_list_index_from_tree_index(get_variable(script, *args++)); Bytecode flag = get_variable(script, *args++); @@ -208,7 +208,7 @@ ApiStatus EnableModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetGroupEnabled(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetGroupEnabled(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode var1 = get_variable(script, *args++); Bytecode var2 = get_variable(script, *args++); @@ -217,7 +217,7 @@ ApiStatus SetGroupEnabled(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetTexPanOffset(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetTexPanOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode var1 = get_variable(script, *args++); Bytecode var2 = get_variable(script, *args++); @@ -235,7 +235,7 @@ ApiStatus SetTexPanOffset(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCustomGfx(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCustomGfx(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -245,7 +245,7 @@ ApiStatus SetCustomGfx(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetCustomGfxBuilders(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetCustomGfxBuilders(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -255,7 +255,7 @@ ApiStatus SetCustomGfxBuilders(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetModelFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetModelFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 modelIndex; s32 a1; @@ -279,12 +279,12 @@ ApiStatus SetModelFlags(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "evt/map_api", apply_transform_to_children); -ApiStatus MakeTransformGroup(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MakeTransformGroup(Evt* script, s32 isInitialCall) { make_transform_group((u16)get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus SetTransformGroupEnabled(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetTransformGroupEnabled(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; u16 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -297,7 +297,7 @@ ApiStatus SetTransformGroupEnabled(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus TranslateGroup(ScriptInstance* script, s32 isInitialCall) { +ApiStatus TranslateGroup(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args); s32 index = get_transform_group_index(var1); @@ -331,7 +331,7 @@ ApiStatus TranslateGroup(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus RotateGroup(ScriptInstance* script, s32 isInitialCall) { +ApiStatus RotateGroup(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_transform_group_index(get_variable(script, *args)); ModelTransformGroup* transformGroup; @@ -364,7 +364,7 @@ ApiStatus RotateGroup(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ScaleGroup(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ScaleGroup(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args); s32 index = get_transform_group_index(var1); @@ -398,7 +398,7 @@ ApiStatus ScaleGroup(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetTransformGroup(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetTransformGroup(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); Bytecode var2 = *args++; @@ -407,7 +407,7 @@ ApiStatus GetTransformGroup(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnableGroup(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableGroup(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_transform_group_index(get_variable(script, *args)); s32 flagUnset; @@ -435,7 +435,7 @@ ApiStatus EnableGroup(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus MakeLocalVertexCopy(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MakeLocalVertexCopy(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); u16 var2 = get_variable(script, *args++); @@ -474,7 +474,7 @@ void modify_collider_family_flags(s32 index, s32 flags, s32 mode) { } } -ApiStatus ModifyColliderFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ModifyColliderFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 mode = get_variable(script, *args++); s32 index = get_variable(script, *args++); @@ -504,7 +504,7 @@ ApiStatus ModifyColliderFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ResetFromLava(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ResetFromLava(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; CollisionStatus* collisionStatus = &gCollisionStatus; Collider* collider; @@ -568,7 +568,7 @@ s32 get_lava_reset_pos(f32* outX, f32* outY, f32* outZ) { return 0; } -ApiStatus GetColliderCenter(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetColliderCenter(Evt* script, s32 isInitialCall) { f32 x, y, z; get_collider_center(get_variable(script, *script->ptrReadPos), &x, &y, &z); @@ -580,7 +580,7 @@ ApiStatus GetColliderCenter(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ParentColliderToModel(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ParentColliderToModel(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s16 colliderID = get_variable(script, *args++); s32 treeIndex = get_variable(script, *args++); @@ -590,7 +590,7 @@ ApiStatus ParentColliderToModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus UpdateColliderTransform(ScriptInstance* script, s32 isInitialCall) { +ApiStatus UpdateColliderTransform(Evt* script, s32 isInitialCall) { update_collider_transform(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -615,7 +615,7 @@ void set_zone_enabled(s32 zoneID, s32 enabled) { } } -ApiStatus SetZoneEnabled(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetZoneEnabled(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 idx = get_variable(script, *args++); s32 enabled = get_variable(script, *args++); @@ -637,7 +637,7 @@ ApiStatus SetZoneEnabled(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -void goto_map(ScriptInstance* script, s32 mode) { +void goto_map(Evt* script, s32 mode) { Bytecode* args = script->ptrReadPos; s16 mapID; s16 areaID; @@ -662,37 +662,37 @@ void goto_map(ScriptInstance* script, s32 mode) { set_game_mode(5); } -ApiStatus GotoMap(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GotoMap(Evt* script, s32 isInitialCall) { goto_map(script, 0); return ApiStatus_DONE1; } -ApiStatus GotoMapSpecial(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GotoMapSpecial(Evt* script, s32 isInitialCall) { goto_map(script, 1); return ApiStatus_DONE1; } -ApiStatus GotoMapByID(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GotoMapByID(Evt* script, s32 isInitialCall) { goto_map(script, 2); return ApiStatus_DONE1; } -ApiStatus GetEntryID(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetEntryID(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gGameStatusPtr->entryID); return ApiStatus_DONE2; } -ApiStatus GetMapID(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetMapID(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gGameStatusPtr->mapID); return ApiStatus_DONE2; } -ApiStatus GetLoadType(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetLoadType(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gGameStatusPtr->loadType != 0); return ApiStatus_DONE2; } -ApiStatus SetRenderMode(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetRenderMode(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 treeIndex = get_variable(script, *args++); s8 renderMode = get_variable(script, *args++); @@ -702,7 +702,7 @@ ApiStatus SetRenderMode(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlaySoundAtModel(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlaySoundAtModel(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 modelID = get_variable(script, *args++); SoundID soundID = get_variable(script, *args++); @@ -716,7 +716,7 @@ ApiStatus PlaySoundAtModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlaySoundAtCollider(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlaySoundAtCollider(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 colliderID = get_variable(script, *args++); SoundID soundID = get_variable(script, *args++); diff --git a/src/evt/msg_api.c b/src/evt/msg_api.c index 869d1bb8c5..9677863baa 100644 --- a/src/evt/msg_api.c +++ b/src/evt/msg_api.c @@ -1,26 +1,26 @@ #include "common.h" -ApiStatus _show_message(ScriptInstance* script, s32 isInitialCall, s32 arg2); +ApiStatus _show_message(Evt* script, s32 isInitialCall, s32 arg2); -ApiStatus SpeakToPlayer(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SpeakToPlayer(Evt* script, s32 isInitialCall) { return _show_message(script, isInitialCall, 0); } -ApiStatus EndSpeech(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EndSpeech(Evt* script, s32 isInitialCall) { return _show_message(script, isInitialCall, 1); } -ApiStatus ContinueSpeech(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ContinueSpeech(Evt* script, s32 isInitialCall) { return _show_message(script, isInitialCall, 2); } -ApiStatus SpeakToNpc(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SpeakToNpc(Evt* script, s32 isInitialCall) { return _show_message(script, isInitialCall, 3); } -INCLUDE_ASM(ApiStatus, "evt/msg_api", _show_message, ScriptInstance* script, s32 isInitialCall, s32 arg2); +INCLUDE_ASM(ApiStatus, "evt/msg_api", _show_message, Evt* script, s32 isInitialCall, s32 arg2); -ApiStatus ShowMessageAtScreenPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShowMessageAtScreenPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -46,7 +46,7 @@ ApiStatus ShowMessageAtScreenPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE1; } -ApiStatus ShowMessageAtWorldPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShowMessageAtWorldPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; MessagePrintState** currentPrintContext; s32* currentCameraID = &gCurrentCameraID; @@ -80,7 +80,7 @@ ApiStatus ShowMessageAtWorldPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE1; } -ApiStatus CloseMessage(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CloseMessage(Evt* script, s32 isInitialCall) { if (isInitialCall) { close_message(gCurrentPrintContext); } @@ -95,7 +95,7 @@ ApiStatus CloseMessage(ScriptInstance* script, s32 isInitialCall) { } } -ApiStatus SwitchMessage(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SwitchMessage(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -112,7 +112,7 @@ ApiStatus SwitchMessage(ScriptInstance* script, s32 isInitialCall) { } } -ApiStatus ShowChoice(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShowChoice(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; MessagePrintState** temp802DB268; @@ -133,12 +133,12 @@ ApiStatus ShowChoice(ScriptInstance* script, s32 isInitialCall) { return script->functionTemp[1] == 1; } -ApiStatus CloseChoice(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CloseChoice(Evt* script, s32 isInitialCall) { close_message(D_802DB268); return ApiStatus_DONE1; } -ApiStatus CancelMessage(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CancelMessage(Evt* script, s32 isInitialCall) { cancel_message(gCurrentPrintContext); return ApiStatus_DONE2; } @@ -148,12 +148,12 @@ ApiStatus CancelMessageAndBlock(void) { return ApiStatus_BLOCK; } -ApiStatus SetMessageImages(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetMessageImages(Evt* script, s32 isInitialCall) { set_message_images(*script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus func_802D0C94(ScriptInstance* script, s32 initialCall) { +ApiStatus func_802D0C94(Evt* script, s32 initialCall) { if (get_variable(script, *script->ptrReadPos) == 0) { gOverrideFlags |= 0x10; } else { @@ -162,7 +162,7 @@ ApiStatus func_802D0C94(ScriptInstance* script, s32 initialCall) { return ApiStatus_DONE2; } -ApiStatus SetMessageString(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetMessageString(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 string = get_variable(script, *args++); s32 index = get_variable(script, *args++); @@ -171,7 +171,7 @@ ApiStatus SetMessageString(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetMessageValue(ScriptInstance* script, s32 initialCall) { +ApiStatus SetMessageValue(Evt* script, s32 initialCall) { Bytecode* ptrReadPos = script->ptrReadPos; s32 value = get_variable(script, *ptrReadPos++); s32 index = get_variable(script, *ptrReadPos); diff --git a/src/evt/npc_api.c b/src/evt/npc_api.c index b147494884..1082c2eaa3 100644 --- a/src/evt/npc_api.c +++ b/src/evt/npc_api.c @@ -5,7 +5,7 @@ extern s32 D_802DAE40; extern s32 D_802DAE44; -Npc* resolve_npc(ScriptInstance* script, NpcID npcIdOrPtr) { +Npc* resolve_npc(Evt* script, NpcID npcIdOrPtr) { if (npcIdOrPtr == NPC_SELF) { return get_npc_safe(script->owner2.npcID); } else if (npcIdOrPtr >= -270000000) { @@ -27,7 +27,7 @@ void set_npc_animation(Npc* npc, u32 arg1) { } } -ApiStatus CreateNpc(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CreateNpc(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcID = get_variable(script, *args++); s32 initialAnim = get_variable(script, *args++); @@ -45,7 +45,7 @@ ApiStatus CreateNpc(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus DeleteNpc(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DeleteNpc(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(get_variable(script, *args++)); @@ -57,7 +57,7 @@ ApiStatus DeleteNpc(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetNpcPointer(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcID = get_variable(script, *args++); Bytecode varNPC = *args++; @@ -66,7 +66,7 @@ ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcID = get_variable(script, *args++); f32 x = get_variable(script, *args++); @@ -89,7 +89,7 @@ ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcRotation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcRotation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcID = get_variable(script, *args++); f32 rotX = get_float_variable(script, *args++); @@ -107,7 +107,7 @@ ApiStatus SetNpcRotation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802CDE68(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CDE68(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcId = get_variable(script, *args++); f32 var1 = get_float_variable(script, *args++); @@ -122,7 +122,7 @@ ApiStatus func_802CDE68(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcScale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcScale(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); f32 sizeX = get_float_variable(script, *ptrReadPos++); @@ -140,7 +140,7 @@ ApiStatus SetNpcScale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcCollisionSize(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcCollisionSize(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); s32 height = get_variable(script, *ptrReadPos++); @@ -156,7 +156,7 @@ ApiStatus SetNpcCollisionSize(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcSpeed(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcSpeed(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); f32 speed = get_float_variable(script, *ptrReadPos); @@ -170,7 +170,7 @@ ApiStatus SetNpcSpeed(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcJumpscale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcJumpscale(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); f32 jumpScale = get_float_variable(script, *ptrReadPos); @@ -184,7 +184,7 @@ ApiStatus SetNpcJumpscale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcAnimation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcAnimation(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); s32 animation = get_variable(script, *ptrReadPos); @@ -198,7 +198,7 @@ ApiStatus SetNpcAnimation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetNpcAnimation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetNpcAnimation(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); Bytecode outVar = *ptrReadPos++; @@ -212,7 +212,7 @@ ApiStatus GetNpcAnimation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcAnimationSpeed(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcAnimationSpeed(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); f32 animationSpeed = get_float_variable(script, *ptrReadPos++); @@ -226,7 +226,7 @@ ApiStatus SetNpcAnimationSpeed(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus NpcMoveTo(ScriptInstance* script, s32 isInitialCall) { +ApiStatus NpcMoveTo(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Npc* npc; f32 dist; @@ -287,7 +287,7 @@ ApiStatus NpcMoveTo(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus _npc_jump_to(ScriptInstance* script, s32 isInitialCall, s32 snapYaw) { +ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) { Bytecode* args = script->ptrReadPos; f32* yaw = (f32*) &script->functionTemp[2]; Npc* npc; @@ -357,15 +357,15 @@ ApiStatus _npc_jump_to(ScriptInstance* script, s32 isInitialCall, s32 snapYaw) { return ApiStatus_BLOCK; } -ApiStatus NpcJump0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus NpcJump0(Evt* script, s32 isInitialCall) { return _npc_jump_to(script, isInitialCall, 0); } -ApiStatus NpcJump1(ScriptInstance* script, s32 isInitialCall) { +ApiStatus NpcJump1(Evt* script, s32 isInitialCall) { return _npc_jump_to(script, isInitialCall, 1); } -ApiStatus NpcFlyTo(ScriptInstance* script, s32 isInitialCall) { +ApiStatus NpcFlyTo(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; f32* outX = (f32*)&script->varTable[3]; f32* outY = (f32*)&script->varTable[4]; @@ -437,7 +437,7 @@ ApiStatus NpcFlyTo(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus GetNpcYaw(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetNpcYaw(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); Bytecode outVar = *ptrReadPos++; @@ -451,7 +451,7 @@ ApiStatus GetNpcYaw(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcYaw(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcYaw(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); Npc* npc = resolve_npc(script, npcID); @@ -464,7 +464,7 @@ ApiStatus SetNpcYaw(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus InterpNpcYaw(ScriptInstance* script, s32 isInitialCall) { +ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; f32* t1 = (f32*) &script->functionTemp[1]; @@ -512,7 +512,7 @@ ApiStatus InterpNpcYaw(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus NpcFacePlayer(ScriptInstance* script, s32 isInitialCall) { +ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; f32* t1 = (f32*) &script->functionTemp[1]; @@ -554,7 +554,7 @@ ApiStatus NpcFacePlayer(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus NpcFaceNpc(ScriptInstance* script, s32 isInitialCall) { +ApiStatus NpcFaceNpc(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; f32* t1 = (f32*) &script->functionTemp[1]; f32* t2 = (f32*) &script->functionTemp[2]; @@ -602,7 +602,7 @@ ApiStatus NpcFaceNpc(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcFlagBits(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcFlagBits(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcID = get_variable(script, *args++); s32 flagBits = *args++; @@ -622,7 +622,7 @@ ApiStatus SetNpcFlagBits(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetNpcPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetNpcPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcID = get_variable(script, *args++); s32 a1 = *args++; @@ -640,7 +640,7 @@ ApiStatus GetNpcPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802CF1B4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CF1B4(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcId = get_variable(script, *args++); Bytecode arg1 = *args; @@ -654,7 +654,7 @@ ApiStatus func_802CF1B4(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcSprite(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcSprite(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcId = get_variable(script, *args++); Bytecode arg1 = *args; @@ -668,7 +668,7 @@ ApiStatus SetNpcSprite(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnableNpcShadow(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableNpcShadow(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); s32 enableShadow = get_variable(script, *ptrReadPos++); @@ -686,7 +686,7 @@ ApiStatus EnableNpcShadow(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnableNpcBlur(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnableNpcBlur(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); s32 enableBlur = get_variable(script, *ptrReadPos++); @@ -704,7 +704,7 @@ ApiStatus EnableNpcBlur(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus ClearPartnerMoveHistory(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ClearPartnerMoveHistory(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); Npc* npc = resolve_npc(script, npcID); @@ -717,7 +717,7 @@ ApiStatus ClearPartnerMoveHistory(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus NpcSetHomePosToCurrent(ScriptInstance* script, s32 isInitialCall) { +ApiStatus NpcSetHomePosToCurrent(Evt* script, s32 isInitialCall) { Npc* npc = resolve_npc(script, get_variable(script, *script->ptrReadPos)); if (npc == NULL) { @@ -730,7 +730,7 @@ ApiStatus NpcSetHomePosToCurrent(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPartnerPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPartnerPos(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; Bytecode posX = *ptrReadPos++; Bytecode posY = *ptrReadPos++; @@ -747,7 +747,7 @@ ApiStatus GetPartnerPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus DisablePartnerAI(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DisablePartnerAI(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; if (get_variable(script, *ptrReadPos++) == 0) { @@ -758,17 +758,17 @@ ApiStatus DisablePartnerAI(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus EnablePartnerAI(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnablePartnerAI(Evt* script, s32 isInitialCall) { enable_partner_ai(); return ApiStatus_DONE2; } -ApiStatus func_802CF54C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CF54C(Evt* script, s32 isInitialCall) { func_800EF43C(); return ApiStatus_DONE2; } -ApiStatus func_802CF56C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CF56C(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; s32 value = get_variable(script, *ptrReadPos++); @@ -780,7 +780,7 @@ ApiStatus func_802CF56C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -s32 BringPartnerOut(ScriptInstance *script, s32 isInitialCall) { +s32 BringPartnerOut(Evt *script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcBlueprint bp; NpcBlueprint* bpPointer = &bp; @@ -874,7 +874,7 @@ s32 BringPartnerOut(ScriptInstance *script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus PutPartnerAway(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PutPartnerAway(Evt* script, s32 isInitialCall) { Npc* partner = get_npc_unsafe(NPC_PARTNER); PlayerStatus* playerStatus = &gPlayerStatus; f32 scale; @@ -946,26 +946,26 @@ ApiStatus PutPartnerAway(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus GetCurrentPartnerID(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetCurrentPartnerID(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gPlayerData.currentPartner); return ApiStatus_DONE2; } -ApiStatus PartnerCanUseAbility(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PartnerCanUseAbility(Evt* script, s32 isInitialCall) { Bytecode arg0 = *script->ptrReadPos; set_variable(script, arg0, partner_can_use_ability()); return ApiStatus_DONE2; } -ApiStatus PartnerIsFlying(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PartnerIsFlying(Evt* script, s32 isInitialCall) { Bytecode arg0 = *script->ptrReadPos; set_variable(script, arg0, partner_is_flying()); return ApiStatus_DONE2; } -ApiStatus func_802CFD30(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CFD30(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcId = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++); @@ -983,7 +983,7 @@ ApiStatus func_802CFD30(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802CFE2C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802CFE2C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcId = get_variable(script, *args++); Bytecode arg1 = *args; @@ -997,7 +997,7 @@ ApiStatus func_802CFE2C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcPaletteSwapMode(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcPaletteSwapMode(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcId = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++); @@ -1011,7 +1011,7 @@ ApiStatus SetNpcPaletteSwapMode(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcPaletteSwapLower(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcPaletteSwapLower(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcId = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++); @@ -1028,7 +1028,7 @@ ApiStatus SetNpcPaletteSwapLower(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcPaletteSwapping(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcPaletteSwapping(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcId = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++); @@ -1050,7 +1050,7 @@ ApiStatus SetNpcPaletteSwapping(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetNpcDecoration(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetNpcDecoration(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); s32 value1 = get_variable(script, *ptrReadPos++); @@ -1065,7 +1065,7 @@ ApiStatus SetNpcDecoration(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlaySoundAtNpc(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); SoundID soundID = get_variable(script, *ptrReadPos++); @@ -1080,7 +1080,7 @@ ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802D0244(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D0244(Evt* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; NpcID npcID = get_variable(script, *ptrReadPos++); u8 renderMode = get_variable(script, *ptrReadPos++); diff --git a/src/evt/player_api.c b/src/evt/player_api.c index 3d8789cef2..694bc71cdd 100644 --- a/src/evt/player_api.c +++ b/src/evt/player_api.c @@ -7,7 +7,7 @@ extern VirtualEntityList D_802DB5C0; extern VirtualEntityList D_802DB6C0; extern VirtualEntityList* D_802DB7C0; -ApiStatus HidePlayerShadow(ScriptInstance* script, s32 isInitialCall) { +ApiStatus HidePlayerShadow(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 hideShadow = get_variable(script, *args++); @@ -19,7 +19,7 @@ ApiStatus HidePlayerShadow(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus DisablePlayerPhysics(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DisablePlayerPhysics(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 disable = get_variable(script, *args++); @@ -31,7 +31,7 @@ ApiStatus DisablePlayerPhysics(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus DisablePlayerInput(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DisablePlayerInput(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; s32 enable = get_variable(script, *args++); @@ -55,7 +55,7 @@ ApiStatus DisablePlayerInput(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPlayerPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPlayerPos(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; f32 x = get_variable(script, *args++); @@ -73,7 +73,7 @@ ApiStatus SetPlayerPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPlayerCollisionSize(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPlayerCollisionSize(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; s32 height = get_variable(script, *args++); @@ -88,17 +88,17 @@ ApiStatus SetPlayerCollisionSize(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPlayerSpeed(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPlayerSpeed(Evt* script, s32 isInitialCall) { playerNpc->moveSpeed = get_float_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus SetPlayerJumpscale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPlayerJumpscale(Evt* script, s32 isInitialCall) { playerNpc->jumpScale = get_float_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus SetPlayerAnimation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPlayerAnimation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerAnim currentAnim = get_variable(script, *args++); s32 shakeAnim = 0x80003; @@ -116,17 +116,17 @@ ApiStatus SetPlayerAnimation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPlayerActionState(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPlayerActionState(Evt* script, s32 isInitialCall) { set_action_state(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus SetPlayerAnimationSpeed(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPlayerAnimationSpeed(Evt* script, s32 isInitialCall) { playerNpc->animationSpeed = get_float_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus PlayerMoveTo(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayerMoveTo(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; @@ -153,7 +153,7 @@ ApiStatus PlayerMoveTo(ScriptInstance* script, s32 isInitialCall) { return script->functionTemp[0] < 0; } -ApiStatus func_802D1270(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D1270(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; @@ -177,7 +177,7 @@ ApiStatus func_802D1270(ScriptInstance* script, s32 isInitialCall) { return (script->functionTemp[0] < 0) * ApiStatus_DONE2; } -ApiStatus func_802D1380(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D1380(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; @@ -203,7 +203,7 @@ ApiStatus func_802D1380(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE1; } -s32 player_jump(ScriptInstance* script, s32 isInitialCall, s32 mode) { +s32 player_jump(Evt* script, s32 isInitialCall, s32 mode) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; f32 xTemp; @@ -327,19 +327,19 @@ s32 player_jump(ScriptInstance* script, s32 isInitialCall, s32 mode) { return FALSE; } -ApiStatus PlayerJump(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayerJump(Evt* script, s32 isInitialCall) { return player_jump(script, isInitialCall, 0); } -ApiStatus PlayerJump1(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayerJump1(Evt* script, s32 isInitialCall) { return player_jump(script, isInitialCall, 1); } -ApiStatus PlayerJump2(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayerJump2(Evt* script, s32 isInitialCall) { return player_jump(script, isInitialCall, 2); } -ApiStatus InterpPlayerYaw(ScriptInstance* script, s32 isInitialCall) { +ApiStatus InterpPlayerYaw(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; f32* initialYaw = (f32*) &script->functionTemp[1]; @@ -377,7 +377,7 @@ ApiStatus InterpPlayerYaw(ScriptInstance* script, s32 isInitialCall) { } } -ApiStatus PlayerFaceNpc(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayerFaceNpc(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; s32* args = script->ptrReadPos; f32* playerTargetYaw = (f32*) &script->functionTemp[1]; @@ -426,12 +426,12 @@ ApiStatus PlayerFaceNpc(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPlayerTargetYaw(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPlayerTargetYaw(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gPlayerStatus.targetYaw); return ApiStatus_DONE2; } -ApiStatus SetPlayerFlagBits(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPlayerFlagBits(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; Bytecode bits = *args++; @@ -446,13 +446,13 @@ ApiStatus SetPlayerFlagBits(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPlayerActionState(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPlayerActionState(Evt* script, s32 isInitialCall) { Bytecode outVar = *script->ptrReadPos; set_variable(script, outVar, gPlayerActionState); return ApiStatus_DONE2; } -ApiStatus GetPlayerPos(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPlayerPos(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; Bytecode outVar1 = *args++; @@ -465,14 +465,14 @@ ApiStatus GetPlayerPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetPlayerAnimation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetPlayerAnimation(Evt* script, s32 isInitialCall) { Bytecode outVar = *script->ptrReadPos; set_variable(script, outVar, gPlayerAnimation); return ApiStatus_DONE2; } -ApiStatus FullyRestoreHPandFP(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FullyRestoreHPandFP(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; playerData->curHP = playerData->curMaxHP; @@ -480,14 +480,14 @@ ApiStatus FullyRestoreHPandFP(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus FullyRestoreSP(ScriptInstance* script, s32 isInitialCall) { +ApiStatus FullyRestoreSP(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; playerData->specialBarsFilled = playerData->maxStarPower * 256; return ApiStatus_DONE2; } -ApiStatus EnablePartner(ScriptInstance* script, s32 isInitialCall) { +ApiStatus EnablePartner(Evt* script, s32 isInitialCall) { s32 partnerIdx = get_variable(script, *script->ptrReadPos) - 1; PartnerData* partner = &gPlayerData.partners[partnerIdx]; @@ -495,7 +495,7 @@ ApiStatus EnablePartner(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus DisablePartner(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DisablePartner(Evt* script, s32 isInitialCall) { s32 partnerIdx = get_variable(script, *script->ptrReadPos) - 1; PartnerData* partner = &gPlayerData.partners[partnerIdx]; @@ -503,7 +503,7 @@ ApiStatus DisablePartner(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus UseEntryHeading(ScriptInstance *script, s32 isInitialCall) { +ApiStatus UseEntryHeading(Evt *script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; MapConfig* mapConfig = get_current_map_header(); s32 var1 = get_variable(script, *args++); @@ -529,12 +529,12 @@ ApiStatus UseEntryHeading(ScriptInstance *script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802D2148(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D2148(Evt* script, s32 isInitialCall) { gPlayerStatus.flags &= ~0x4000000; return ApiStatus_DONE2; } -ApiStatus UseExitHeading(ScriptInstance* script, s32 isInitialCall) { +ApiStatus UseExitHeading(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; MapConfig* mapConfig = get_current_map_header(); @@ -583,7 +583,7 @@ s32 func_802D23F8(void) { return FALSE; } -ApiStatus WaitForPlayerTouchingFloor(ScriptInstance* script, s32 isInitialCall) { +ApiStatus WaitForPlayerTouchingFloor(Evt* script, s32 isInitialCall) { if ((gCollisionStatus.currentFloor >= 0) && func_802D23F8()) { return ApiStatus_DONE2; } @@ -591,11 +591,11 @@ ApiStatus WaitForPlayerTouchingFloor(ScriptInstance* script, s32 isInitialCall) return ApiStatus_BLOCK; } -ApiStatus func_802D2484(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D2484(Evt* script, s32 isInitialCall) { return (gCollisionStatus.currentFloor >= 0) * ApiStatus_DONE2; } -ApiStatus IsPlayerOnValidFloor(ScriptInstance* script, s32 isInitialCall) { +ApiStatus IsPlayerOnValidFloor(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 val = 0; @@ -607,17 +607,17 @@ ApiStatus IsPlayerOnValidFloor(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus WaitForPlayerMoveToComplete(ScriptInstance* script, s32 isInitialCall) { +ApiStatus WaitForPlayerMoveToComplete(Evt* script, s32 isInitialCall) { return (gPlayerStatus.moveFrames == 0) * ApiStatus_DONE2; } -ApiStatus WaitForPlayerInputEnabled(ScriptInstance* script, s32 isInitialCall) { +ApiStatus WaitForPlayerInputEnabled(Evt* script, s32 isInitialCall) { return !(gPlayerStatus.flags & 0x2000) * ApiStatus_DONE2; } //regs, the global at the end #ifdef NON_MATCHING -ApiStatus func_802D2520(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D2520(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; s32 a0 = *args++; @@ -686,17 +686,17 @@ ApiStatus func_802D2520(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } #else -INCLUDE_ASM(ApiStatus, "evt/player_api", func_802D2520, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "evt/player_api", func_802D2520, Evt* script, s32 isInitialCall); #endif -ApiStatus func_802D286C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D286C(Evt* script, s32 isInitialCall) { s32 temp = *script->ptrReadPos; D_802DB5B0 = temp; return ApiStatus_DONE2; } -ApiStatus func_802D2884(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D2884(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; f32* ft1 = (f32*) &script->functionTemp[1]; @@ -740,7 +740,7 @@ ApiStatus func_802D2884(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus DisablePulseStone(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DisablePulseStone(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; if (get_variable(script, *script->ptrReadPos)) { @@ -752,7 +752,7 @@ ApiStatus DisablePulseStone(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetCurrentPartner(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetCurrentPartner(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode a0 = *args; PlayerData* playerData = &gPlayerData; @@ -773,14 +773,14 @@ ApiStatus func_802D2B50(void) { return ApiStatus_DONE2; } -ApiStatus func_802D2B6C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D2B6C(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; playerStatus->animFlags |= 4; return ApiStatus_DONE2; } -ApiStatus Disable8bitMario(ScriptInstance* script, s32 isInitialCall) { +ApiStatus Disable8bitMario(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; @@ -797,12 +797,12 @@ ApiStatus Disable8bitMario(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802D2C14(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802D2C14(Evt* script, s32 isInitialCall) { func_800EF3D4(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus func_802D2C40(ScriptInstance* script) { +ApiStatus func_802D2C40(Evt* script) { Bytecode* args = script->ptrReadPos; f32 x = get_variable(script, *args++); PlayerStatus* playerStatus = &gPlayerStatus; @@ -816,7 +816,7 @@ ApiStatus func_802D2C40(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus PlaySoundAtPlayer(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlaySoundAtPlayer(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); @@ -874,7 +874,7 @@ INCLUDE_ASM(void, "evt/player_api", virtual_entity_list_render_world, void); INCLUDE_ASM(s32, "evt/player_api", virtual_entity_list_render_UI); -ApiStatus InitVirtualEntityList(ScriptInstance* script, s32 isInitialCall) { +ApiStatus InitVirtualEntityList(Evt* script, s32 isInitialCall) { if (!gGameStatusPtr->isBattle) { D_802DB7C0 = &D_802DB6C0; } else { @@ -883,7 +883,7 @@ ApiStatus InitVirtualEntityList(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus CreateVirtualEntityAt(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CreateVirtualEntityAt(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); u32* cmdList = (u32*)get_variable(script, *args++); @@ -904,7 +904,7 @@ ApiStatus CreateVirtualEntityAt(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus CreateVirtualEntity(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CreateVirtualEntity(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 outVar = *args++; s32* unkStructPtr = (s32*)get_variable(script, *args++); @@ -939,7 +939,7 @@ ApiStatus CreateVirtualEntity(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus CreateVirtualEntity_ALT(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CreateVirtualEntity_ALT(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 outVar = *args++; s32* unkStructPtr = (s32*)get_variable(script, *args++); @@ -974,7 +974,7 @@ ApiStatus CreateVirtualEntity_ALT(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus DeleteVirtualEntity(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DeleteVirtualEntity(Evt* script, s32 isInitialCall) { VirtualEntity* virtualEntity = (*D_802DB7C0)[get_variable(script, *script->ptrReadPos)]; free_entity_model_by_index(virtualEntity->entityModelIndex); @@ -982,7 +982,7 @@ ApiStatus DeleteVirtualEntity(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetVirtualEntityRenderCommands(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetVirtualEntityRenderCommands(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); u32* commandList = (u32*)get_variable(script, *args++); @@ -991,7 +991,7 @@ ApiStatus SetVirtualEntityRenderCommands(ScriptInstance* script, s32 isInitialCa return ApiStatus_DONE2; } -ApiStatus SetVirtualEntityPosition(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetVirtualEntityPosition(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); f32 x = get_float_variable(script, *args++); @@ -1005,7 +1005,7 @@ ApiStatus SetVirtualEntityPosition(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetVirtualEntityPosition(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); VirtualEntity* virtualEntity = (*D_802DB7C0)[index]; @@ -1019,7 +1019,7 @@ ApiStatus GetVirtualEntityPosition(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetVirtualEntityRotation(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetVirtualEntityRotation(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); f32 x = get_float_variable(script, *args++); @@ -1033,7 +1033,7 @@ ApiStatus SetVirtualEntityRotation(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetVirtualEntityScale(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetVirtualEntityScale(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); f32 x = get_float_variable(script, *args++); @@ -1047,7 +1047,7 @@ ApiStatus SetVirtualEntityScale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetVirtualEntityMoveSpeed(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetVirtualEntityMoveSpeed(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); @@ -1055,7 +1055,7 @@ ApiStatus SetVirtualEntityMoveSpeed(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetVirtualEntityJumpGravity(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetVirtualEntityJumpGravity(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); @@ -1063,7 +1063,7 @@ ApiStatus SetVirtualEntityJumpGravity(ScriptInstance* script, s32 isInitialCall) return ApiStatus_DONE2; } -ApiStatus VirtualEntityMoveTo(ScriptInstance* script, s32 isInitialCall) { +ApiStatus VirtualEntityMoveTo(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; VirtualEntity* virtualEntity; @@ -1121,7 +1121,7 @@ ApiStatus VirtualEntityMoveTo(ScriptInstance* script, s32 isInitialCall) { // float bs #ifdef NON_MATCHING -ApiStatus VirtualEntityJumpTo(ScriptInstance* script, s32 isInitialCall) { +ApiStatus VirtualEntityJumpTo(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; VirtualEntity* virtualEntity; s32 index; @@ -1193,10 +1193,10 @@ ApiStatus VirtualEntityJumpTo(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } #else -INCLUDE_ASM(ApiStatus, "evt/player_api", VirtualEntityJumpTo, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "evt/player_api", VirtualEntityJumpTo, Evt* script, s32 isInitialCall); #endif -ApiStatus VirtualEntityLandJump(ScriptInstance* script, s32 isInitialCall) { +ApiStatus VirtualEntityLandJump(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; VirtualEntity* virtualEntity; @@ -1223,7 +1223,7 @@ ApiStatus VirtualEntityLandJump(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus SetVirtualEntityFlags(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 flags = *args++; @@ -1232,7 +1232,7 @@ ApiStatus SetVirtualEntityFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetVirtualEntityFlagBits(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetVirtualEntityFlagBits(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 flags = *args++; @@ -1248,7 +1248,7 @@ ApiStatus SetVirtualEntityFlagBits(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetVirtualEntityRenderMode(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetVirtualEntityRenderMode(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 index = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/evt/script_list.c b/src/evt/script_list.c index 7b37c562e2..f52dd0d290 100644 --- a/src/evt/script_list.c +++ b/src/evt/script_list.c @@ -8,7 +8,7 @@ void sort_scripts(void) { s32 temp_a0; s32 temp_a1; s32 tempID; - ScriptInstance* curScript; + Evt* curScript; ScriptList** currentScriptListPtr; s32 i; s32 j; @@ -48,7 +48,7 @@ void sort_scripts(void) { } } -void find_script_labels(ScriptInstance* script) { +void find_script_labels(Evt* script) { Bytecode* curLine; s32 type; s32 label; @@ -133,7 +133,7 @@ void init_script_list(void) { init_model_animators(); } -void suspend_frozen_scripts(ScriptInstance* script) { +void suspend_frozen_scripts(Evt* script) { s32 arg; switch (timeFreezeMode) { @@ -152,8 +152,8 @@ void suspend_frozen_scripts(ScriptInstance* script) { suspend_all_group(arg); } -ScriptInstance* start_script(Script* source, s32 priority, s32 initialState) { - ScriptInstance* newScript; +Evt* start_script(EvtSource* source, s32 priority, s32 initialState) { + Evt* newScript; s32 curScriptIndex; s32 scriptListCount; s32 i; @@ -217,8 +217,8 @@ ScriptInstance* start_script(Script* source, s32 priority, s32 initialState) { return newScript; } -ScriptInstance* start_script_in_group(Script* source, u8 priority, u8 initialState, u8 groupFlags) { - ScriptInstance* newScript; +Evt* start_script_in_group(EvtSource* source, u8 priority, u8 initialState, u8 groupFlags) { + Evt* newScript; s32 scriptListCount; s32 i; s32 curScriptIndex; @@ -234,7 +234,7 @@ ScriptInstance* start_script_in_group(Script* source, u8 priority, u8 initialSta ASSERT(i < MAX_SCRIPTS); curScriptIndex = i; - (*gCurrentScriptListPtr)[curScriptIndex] = newScript = heap_malloc(sizeof(ScriptInstance)); + (*gCurrentScriptListPtr)[curScriptIndex] = newScript = heap_malloc(sizeof(Evt)); numScripts = &gNumScripts; (*numScripts)++; ASSERT(newScript != NULL); @@ -289,12 +289,12 @@ ScriptInstance* start_script_in_group(Script* source, u8 priority, u8 initialSta return newScript; } -ScriptInstance* start_child_script(ScriptInstance* parentScript, Script* source, s32 initialState) { +Evt* start_child_script(Evt* parentScript, EvtSource* source, s32 initialState) { s32 i; s32 curScriptIndex; s32 scriptListCount; s32* tempCounter; - ScriptInstance* child; + Evt* child; for (i = 0; i < MAX_SCRIPTS; i++) { if ((*gCurrentScriptListPtr)[i] == NULL) { @@ -360,8 +360,8 @@ ScriptInstance* start_child_script(ScriptInstance* parentScript, Script* source, return child; } -ScriptInstance* func_802C39F8(ScriptInstance* parentScript, Bytecode* nextLine, s32 newState) { - ScriptInstance* child; +Evt* func_802C39F8(Evt* parentScript, Bytecode* nextLine, s32 newState) { + Evt* child; s32 curScriptIndex; s32 i; s32 scriptListCount; @@ -424,8 +424,8 @@ ScriptInstance* func_802C39F8(ScriptInstance* parentScript, Bytecode* nextLine, return child; } -ScriptInstance* func_802C3C10(ScriptInstance* script, Bytecode* line, s32 arg2) { - ScriptInstance* curScript; +Evt* func_802C3C10(Evt* script, Bytecode* line, s32 arg2) { + Evt* curScript; s32 i; script->ptrNextLine = line; @@ -465,7 +465,7 @@ ScriptInstance* func_802C3C10(ScriptInstance* script, Bytecode* line, s32 arg2) return script; } -ScriptInstance* restart_script(ScriptInstance* script) { +Evt* restart_script(Evt* script) { Bytecode* ptrFirstLine = script->ptrFirstLine; // frameCounter gets set to 0 twice which makes me think a macro is being used here @@ -496,7 +496,7 @@ void update_scripts(void) { sort_scripts(); for (i = 0; i < gScriptListCount; i++) { - ScriptInstance* script = (*gCurrentScriptListPtr)[gScriptIndexList[i]]; + Evt* script = (*gCurrentScriptListPtr)[gScriptIndexList[i]]; if (script != NULL && script->id == gScriptIdList[i] && script->state != 0 && !(script->state & 0x92)) { s32 stop = FALSE; @@ -530,9 +530,9 @@ void update_scripts(void) { // this function is evil. INCLUDE_ASM(s32, "evt/script_list", func_802C3EE4); -void kill_script(ScriptInstance* instanceToKill) { - ScriptInstance* childScript; - ScriptInstance* blockingParent; +void kill_script(Evt* instanceToKill) { + Evt* childScript; + Evt* blockingParent; s32 j; s32 i; @@ -552,7 +552,7 @@ void kill_script(ScriptInstance* instanceToKill) { } for (j = 0; j < MAX_SCRIPTS; j++) { - ScriptInstance* tempScriptInstance = (*gCurrentScriptListPtr)[j]; + Evt* tempScriptInstance = (*gCurrentScriptListPtr)[j]; if (tempScriptInstance != NULL) { if (tempScriptInstance->parentScript == instanceToKill) { kill_script(tempScriptInstance); @@ -584,7 +584,7 @@ void kill_script(ScriptInstance* instanceToKill) { void kill_script_by_ID(s32 id) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -596,7 +596,7 @@ void kill_script_by_ID(s32 id) { void kill_all_scripts(void) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -608,7 +608,7 @@ void kill_all_scripts(void) { s32 does_script_exist(s32 id) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -619,7 +619,7 @@ s32 does_script_exist(s32 id) { return FALSE; } -s32 does_script_exist_by_ref(ScriptInstance* script) { +s32 does_script_exist_by_ref(Evt* script) { s32 i; for (i = 0; i < MAX_SCRIPTS; i++) { @@ -630,11 +630,11 @@ s32 does_script_exist_by_ref(ScriptInstance* script) { return FALSE; } -void set_script_priority(ScriptInstance* script, s8 priority) { +void set_script_priority(Evt* script, s8 priority) { script->priority = priority; } -void set_script_timescale(ScriptInstance* script, f32 timescale) { +void set_script_timescale(Evt* script, f32 timescale) { script->timeScale = timescale * gGlobalTimeSpace; } @@ -646,7 +646,7 @@ f32 get_global_timespace(void) { return gGlobalTimeSpace; } -void set_script_group(ScriptInstance* script, s8 groupFlags) { +void set_script_group(Evt* script, s8 groupFlags) { script->groupFlags = groupFlags; } @@ -675,10 +675,10 @@ Trigger* bind_trigger_1(Bytecode* script, s32 flags, s32 triggerFlagIndex, s32 t return bind_trigger(script, flags, triggerFlagIndex, triggerVar0, triggerVar1, priority, 1); } -void suspend_group_script(ScriptInstance* script, s32 groupFlags) { +void suspend_group_script(Evt* script, s32 groupFlags) { int i; - ScriptInstance* scriptContextPtr; - ScriptInstance* childScript = script->childScript; + Evt* scriptContextPtr; + Evt* childScript = script->childScript; if (childScript != NULL) { suspend_group_script(childScript, groupFlags); @@ -696,10 +696,10 @@ void suspend_group_script(ScriptInstance* script, s32 groupFlags) { } } -void resume_group_script(ScriptInstance* script, s32 groupFlags) { +void resume_group_script(Evt* script, s32 groupFlags) { int i; - ScriptInstance* scriptContextPtr; - ScriptInstance* childScript = script->childScript; + Evt* scriptContextPtr; + Evt* childScript = script->childScript; if (childScript != NULL) { resume_group_script(childScript, groupFlags); @@ -719,7 +719,7 @@ void resume_group_script(ScriptInstance* script, s32 groupFlags) { s32 suspend_all_script(s32 id) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -731,7 +731,7 @@ s32 suspend_all_script(s32 id) { s32 resume_all_script(s32 id) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -743,7 +743,7 @@ s32 resume_all_script(s32 id) { void suspend_group_script_index(s32 id, s32 groupFlags) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -755,7 +755,7 @@ void suspend_group_script_index(s32 id, s32 groupFlags) { void resume_group_script_index(s32 id, s32 groupFlags) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -767,7 +767,7 @@ void resume_group_script_index(s32 id, s32 groupFlags) { void suspend_all_group(s32 groupFlags) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -779,7 +779,7 @@ void suspend_all_group(s32 groupFlags) { s32 resume_all_group(s32 groupFlags) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -789,9 +789,9 @@ s32 resume_all_group(s32 groupFlags) { } } -void suspend_group_others(ScriptInstance* script, s32 groupFlags) { +void suspend_group_others(Evt* script, s32 groupFlags) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -801,9 +801,9 @@ void suspend_group_others(ScriptInstance* script, s32 groupFlags) { } } -void resume_group_others(ScriptInstance* script, s32 groupFlags) { +void resume_group_others(Evt* script, s32 groupFlags) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -813,13 +813,13 @@ void resume_group_others(ScriptInstance* script, s32 groupFlags) { } } -ScriptInstance* get_script_by_index(s32 index) { +Evt* get_script_by_index(s32 index) { return (*gCurrentScriptListPtr)[index]; } -ScriptInstance* get_script_by_id(s32 id) { +Evt* get_script_by_id(s32 id) { s32 i; - ScriptInstance* scriptContextPtr; + Evt* scriptContextPtr; for (i = 0; i < MAX_SCRIPTS; i++) { if ((*gCurrentScriptListPtr)[i] != NULL) { @@ -832,10 +832,10 @@ ScriptInstance* get_script_by_id(s32 id) { return 0; } -void set_script_flags(ScriptInstance* script, s32 flags) { +void set_script_flags(Evt* script, s32 flags) { int i; - ScriptInstance* scriptContextPtr; - ScriptInstance* childScript = script->childScript; + Evt* scriptContextPtr; + Evt* childScript = script->childScript; script->state |= flags; if (childScript != NULL) { @@ -850,10 +850,10 @@ void set_script_flags(ScriptInstance* script, s32 flags) { } } -void clear_script_flags(ScriptInstance* script, s32 flags) { +void clear_script_flags(Evt* script, s32 flags) { int i; - ScriptInstance* scriptContextPtr; - ScriptInstance* childScript = script->childScript; + Evt* scriptContextPtr; + Evt* childScript = script->childScript; script->state &= ~flags; if (childScript != NULL) { diff --git a/src/evt/si.c b/src/evt/si.c index c9132f4e8e..788e14cb43 100644 --- a/src/evt/si.c +++ b/src/evt/si.c @@ -1,12 +1,12 @@ #include "common.h" -Bytecode* si_find_label(ScriptInstance* script, s32 arg1); -Bytecode* si_skip_if(ScriptInstance* script); -Bytecode* si_skip_else(ScriptInstance* script); -Bytecode* si_goto_end_case(ScriptInstance* script); -Bytecode* si_goto_next_case(ScriptInstance* script); -Bytecode* si_goto_end_loop(ScriptInstance* script); -s32 get_variable_index(ScriptInstance* script, s32 var); +Bytecode* si_find_label(Evt* script, s32 arg1); +Bytecode* si_skip_if(Evt* script); +Bytecode* si_skip_else(Evt* script); +Bytecode* si_goto_end_case(Evt* script); +Bytecode* si_goto_next_case(Evt* script); +Bytecode* si_goto_end_loop(Evt* script); +s32 get_variable_index(Evt* script, s32 var); u8 D_802D9D70 = 0xFE; u8 D_802D9D71 = 0xFE; @@ -25,21 +25,21 @@ Bytecode float_to_fixed_var(f32 value) { return (s32)(value * 1024.0f) + -230000000; } -ApiStatus si_handle_return(ScriptInstance* script) { +ApiStatus si_handle_return(Evt* script) { kill_script(script); return ApiStatus_FINISH; } -ApiStatus si_handle_label(ScriptInstance* script) { +ApiStatus si_handle_label(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_goto(ScriptInstance* script) { +ApiStatus si_handle_goto(Evt* script) { script->ptrNextLine = si_find_label(script, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_loop(ScriptInstance* script) { +ApiStatus si_handle_loop(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 loopDepth = ++script->loopDepth; @@ -52,7 +52,7 @@ ApiStatus si_handle_loop(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_end_loop(ScriptInstance* script) { +ApiStatus si_handle_end_loop(Evt* script) { s32 loopDepth = script->loopDepth; s32 loopCounter; @@ -82,14 +82,14 @@ ApiStatus si_handle_end_loop(ScriptInstance* script) { } } -ApiStatus si_handle_break_loop(ScriptInstance* script) { +ApiStatus si_handle_break_loop(Evt* script) { ASSERT(script->loopDepth >= 0); script->ptrNextLine = si_goto_end_loop(script); script->loopDepth -= 1; return ApiStatus_DONE2; } -ApiStatus si_handle_wait(ScriptInstance* script) { +ApiStatus si_handle_wait(Evt* script) { Bytecode* ptrReadPos = script->ptrReadPos; if (!script->blocked) { @@ -105,7 +105,7 @@ ApiStatus si_handle_wait(ScriptInstance* script) { return !script->functionTemp[0]; } -ApiStatus si_handle_wait_seconds(ScriptInstance* script) { +ApiStatus si_handle_wait_seconds(Evt* script) { Bytecode* ptrReadPos = script->ptrReadPos; if (!script->blocked) { @@ -121,7 +121,7 @@ ApiStatus si_handle_wait_seconds(ScriptInstance* script) { return !script->functionTemp[0]; } -ApiStatus si_handle_if_equal(ScriptInstance* script) { +ApiStatus si_handle_if_equal(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) != get_variable(script, *args++)) { @@ -131,7 +131,7 @@ ApiStatus si_handle_if_equal(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_if_not_equal(ScriptInstance* script) { +ApiStatus si_handle_if_not_equal(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) == get_variable(script, *args++)) { @@ -141,7 +141,7 @@ ApiStatus si_handle_if_not_equal(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_if_less(ScriptInstance* script) { +ApiStatus si_handle_if_less(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) >= get_variable(script, *args++)) { @@ -151,7 +151,7 @@ ApiStatus si_handle_if_less(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_if_greater(ScriptInstance* script) { +ApiStatus si_handle_if_greater(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) <= get_variable(script, *args++)) { @@ -161,7 +161,7 @@ ApiStatus si_handle_if_greater(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_if_less_equal(ScriptInstance* script) { +ApiStatus si_handle_if_less_equal(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) > get_variable(script, *args++)) { @@ -171,7 +171,7 @@ ApiStatus si_handle_if_less_equal(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_if_greater_equal(ScriptInstance* script) { +ApiStatus si_handle_if_greater_equal(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) < get_variable(script, *args++)) { @@ -181,7 +181,7 @@ ApiStatus si_handle_if_greater_equal(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_if_AND(ScriptInstance* script) { +ApiStatus si_handle_if_AND(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; @@ -192,7 +192,7 @@ ApiStatus si_handle_if_AND(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_if_not_AND(ScriptInstance* script) { +ApiStatus si_handle_if_not_AND(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; @@ -203,16 +203,16 @@ ApiStatus si_handle_if_not_AND(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_else(ScriptInstance* script) { +ApiStatus si_handle_else(Evt* script) { script->ptrNextLine = si_skip_else(script); return ApiStatus_DONE2; } -ApiStatus si_handle_end_if(ScriptInstance* script) { +ApiStatus si_handle_end_if(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_switch(ScriptInstance* script) { +ApiStatus si_handle_switch(Evt* script) { Bytecode value = get_variable(script, *script->ptrReadPos); s32 switchDepth = ++script->switchDepth; @@ -224,7 +224,7 @@ ApiStatus si_handle_switch(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_switch_const(ScriptInstance* script) { +ApiStatus si_handle_switch_const(Evt* script) { Bytecode* args = *script->ptrReadPos; s32 switchDepth = ++script->switchDepth; @@ -236,7 +236,7 @@ ApiStatus si_handle_switch_const(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_equal(ScriptInstance* script) { +ApiStatus si_handle_case_equal(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -259,7 +259,7 @@ ApiStatus si_handle_case_equal(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_not_equal(ScriptInstance* script) { +ApiStatus si_handle_case_not_equal(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -282,7 +282,7 @@ ApiStatus si_handle_case_not_equal(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_less(ScriptInstance* script) { +ApiStatus si_handle_case_less(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -305,7 +305,7 @@ ApiStatus si_handle_case_less(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_less_equal(ScriptInstance* script) { +ApiStatus si_handle_case_less_equal(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -328,7 +328,7 @@ ApiStatus si_handle_case_less_equal(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_greater(ScriptInstance* script) { +ApiStatus si_handle_case_greater(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -351,7 +351,7 @@ ApiStatus si_handle_case_greater(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_greater_equal(ScriptInstance* script) { +ApiStatus si_handle_case_greater_equal(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -374,7 +374,7 @@ ApiStatus si_handle_case_greater_equal(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_range(ScriptInstance* script) { +ApiStatus si_handle_case_range(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -400,7 +400,7 @@ ApiStatus si_handle_case_range(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_default(ScriptInstance* script) { +ApiStatus si_handle_case_default(Evt* script) { s32 switchDepth = script->switchDepth; ASSERT(switchDepth >= 0); @@ -415,7 +415,7 @@ ApiStatus si_handle_case_default(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_AND(ScriptInstance* script) { +ApiStatus si_handle_case_AND(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -440,7 +440,7 @@ ApiStatus si_handle_case_AND(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_equal_OR(ScriptInstance* script) { +ApiStatus si_handle_case_equal_OR(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -465,7 +465,7 @@ ApiStatus si_handle_case_equal_OR(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_equal_AND(ScriptInstance* script) { +ApiStatus si_handle_case_equal_AND(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -493,7 +493,7 @@ ApiStatus si_handle_case_equal_AND(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_end_case_group(ScriptInstance* script) { +ApiStatus si_handle_end_case_group(Evt* script) { ASSERT(script->switchDepth >= 0); if (script->switchBlockState[script->switchDepth] == 0) { @@ -510,13 +510,13 @@ ApiStatus si_handle_end_case_group(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_break_case(ScriptInstance* script) { +ApiStatus si_handle_break_case(Evt* script) { ASSERT(script->switchDepth >= 0); script->ptrNextLine = si_goto_end_case(script); return ApiStatus_DONE2; } -ApiStatus si_handle_end_switch(ScriptInstance* script) { +ApiStatus si_handle_end_switch(Evt* script) { s32 switchDepth = script->switchDepth; ASSERT(switchDepth >= 0); @@ -527,7 +527,7 @@ ApiStatus si_handle_end_switch(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_set_var(ScriptInstance* script) { +ApiStatus si_handle_set_var(Evt* script) { Bytecode* args = script->ptrReadPos; s32 curPtrReadPos = args[0]; @@ -535,12 +535,12 @@ ApiStatus si_handle_set_var(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_set_const(ScriptInstance* script) { +ApiStatus si_handle_set_const(Evt* script) { set_variable(script, *script->ptrReadPos, script->ptrReadPos[1]); return ApiStatus_DONE2; } -ApiStatus si_handle_set_float(ScriptInstance* script) { +ApiStatus si_handle_set_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; @@ -548,7 +548,7 @@ ApiStatus si_handle_set_float(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_add(ScriptInstance* script) { +ApiStatus si_handle_add(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 result = get_variable(script, *args++); @@ -560,7 +560,7 @@ ApiStatus si_handle_add(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_subtract(ScriptInstance* script) { +ApiStatus si_handle_subtract(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 result = get_variable(script, *args++); @@ -572,7 +572,7 @@ ApiStatus si_handle_subtract(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_multiply(ScriptInstance* script) { +ApiStatus si_handle_multiply(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 result = get_variable(script, *args++); @@ -584,7 +584,7 @@ ApiStatus si_handle_multiply(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_divide(ScriptInstance* script) { +ApiStatus si_handle_divide(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 result = get_variable(script, *args++); @@ -596,7 +596,7 @@ ApiStatus si_handle_divide(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_mod(ScriptInstance* script) { +ApiStatus si_handle_mod(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 result = get_variable(script, *args++) + 0.5; @@ -608,7 +608,7 @@ ApiStatus si_handle_mod(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_addF(ScriptInstance* script) { +ApiStatus si_handle_addF(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; f32 result = get_float_variable(script, *args++); @@ -620,7 +620,7 @@ ApiStatus si_handle_addF(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_subtractF(ScriptInstance* script) { +ApiStatus si_handle_subtractF(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; f32 result = get_float_variable(script, *args++); @@ -632,7 +632,7 @@ ApiStatus si_handle_subtractF(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_multiplyF(ScriptInstance* script) { +ApiStatus si_handle_multiplyF(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; f32 result = get_float_variable(script, *args++); @@ -644,7 +644,7 @@ ApiStatus si_handle_multiplyF(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_divideF(ScriptInstance* script) { +ApiStatus si_handle_divideF(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; f32 result = get_float_variable(script, *args++); @@ -656,17 +656,17 @@ ApiStatus si_handle_divideF(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_set_int_buffer_ptr(ScriptInstance* script) { +ApiStatus si_handle_set_int_buffer_ptr(Evt* script) { script->buffer = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus si_handle_set_float_buffer_ptr(ScriptInstance* script) { +ApiStatus si_handle_set_float_buffer_ptr(Evt* script) { script->buffer = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus si_handle_get_1_word(ScriptInstance* script) { +ApiStatus si_handle_get_1_word(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; @@ -676,7 +676,7 @@ ApiStatus si_handle_get_1_word(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_2_word(ScriptInstance* script) { +ApiStatus si_handle_get_2_word(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -690,7 +690,7 @@ ApiStatus si_handle_get_2_word(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_3_word(ScriptInstance* script) { +ApiStatus si_handle_get_3_word(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -708,7 +708,7 @@ ApiStatus si_handle_get_3_word(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_4_word(ScriptInstance* script) { +ApiStatus si_handle_get_4_word(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -730,7 +730,7 @@ ApiStatus si_handle_get_4_word(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_Nth_word(ScriptInstance* script) { +ApiStatus si_handle_get_Nth_word(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; @@ -740,7 +740,7 @@ ApiStatus si_handle_get_Nth_word(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_1_float(ScriptInstance* script) { +ApiStatus si_handle_get_1_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; @@ -750,7 +750,7 @@ ApiStatus si_handle_get_1_float(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_2_float(ScriptInstance* script) { +ApiStatus si_handle_get_2_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -764,7 +764,7 @@ ApiStatus si_handle_get_2_float(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_3_float(ScriptInstance* script) { +ApiStatus si_handle_get_3_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -782,7 +782,7 @@ ApiStatus si_handle_get_3_float(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_4_float(ScriptInstance* script) { +ApiStatus si_handle_get_4_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -804,7 +804,7 @@ ApiStatus si_handle_get_4_float(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_Nth_float(ScriptInstance* script) { +ApiStatus si_handle_get_Nth_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; @@ -814,17 +814,17 @@ ApiStatus si_handle_get_Nth_float(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_set_array(ScriptInstance* script) { +ApiStatus si_handle_set_array(Evt* script) { script->array = (s32*)get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus si_handle_set_flag_array(ScriptInstance* script) { +ApiStatus si_handle_set_flag_array(Evt* script) { script->flagArray = (s32*)get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus si_handle_allocate_array(ScriptInstance* script) { +ApiStatus si_handle_allocate_array(Evt* script) { Bytecode* args = script->ptrReadPos; s32 size = get_variable(script, *args++); Bytecode var = *args++; @@ -834,7 +834,7 @@ ApiStatus si_handle_allocate_array(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_AND(ScriptInstance* script) { +ApiStatus si_handle_AND(Evt* script) { Bytecode var = script->ptrReadPos[0]; s32 val = get_variable(script, script->ptrReadPos[1]); @@ -843,7 +843,7 @@ ApiStatus si_handle_AND(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_AND_const(ScriptInstance* script) { +ApiStatus si_handle_AND_const(Evt* script) { Bytecode* ptrReadPos = script->ptrReadPos; // todo improve s32 constant = ptrReadPos[0]; // NOLINT @@ -855,7 +855,7 @@ ApiStatus si_handle_AND_const(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_OR(ScriptInstance* script) { +ApiStatus si_handle_OR(Evt* script) { Bytecode var = script->ptrReadPos[0]; s32 val = get_variable(script, script->ptrReadPos[1]); @@ -864,7 +864,7 @@ ApiStatus si_handle_OR(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_OR_const(ScriptInstance* script) { +ApiStatus si_handle_OR_const(Evt* script) { Bytecode* ptrReadPos = script->ptrReadPos; // todo improve s32 constant = ptrReadPos[0]; // NOLINT @@ -876,11 +876,11 @@ ApiStatus si_handle_OR_const(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_call(ScriptInstance* script) { +ApiStatus si_handle_call(Evt* script) { Bytecode* args = script->ptrReadPos; s32 isInitialCall; ApiFunc func; - ScriptInstance* newScript; // todo fake match + Evt* newScript; // todo fake match if (script->blocked) { isInitialCall = FALSE; @@ -899,11 +899,11 @@ ApiStatus si_handle_call(ScriptInstance* script) { return func(newScript, isInitialCall); // todo fake match } -ApiStatus si_handle_exec1(ScriptInstance* script) { - ScriptInstance* newScript; +ApiStatus si_handle_exec1(Evt* script) { + Evt* newScript; s32 i; - newScript = start_script_in_group((ScriptInstance*)get_variable(script, *script->ptrReadPos), script->priority, 0, + newScript = start_script_in_group((Evt*)get_variable(script, *script->ptrReadPos), script->priority, 0, script->groupFlags); newScript->owner1 = script->owner1; @@ -925,11 +925,11 @@ ApiStatus si_handle_exec1(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_exec1_get_id(ScriptInstance* script) { +ApiStatus si_handle_exec1_get_id(Evt* script) { Bytecode* args = script->ptrReadPos; - ScriptInstance* var = (ScriptInstance*)get_variable(script, *args++); + Evt* var = (Evt*)get_variable(script, *args++); Bytecode arg2 = *args++; - ScriptInstance* newScript; + Evt* newScript; s32 i; newScript = start_script_in_group(var, script->priority, 0, script->groupFlags); @@ -953,13 +953,13 @@ ApiStatus si_handle_exec1_get_id(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_exec_wait(ScriptInstance* script) { +ApiStatus si_handle_exec_wait(Evt* script) { start_child_script(script, get_variable(script, *script->ptrReadPos), 0); script->currentOpcode = 0; return ApiStatus_FINISH; } -ApiStatus si_handle_jump(ScriptInstance* script) { +ApiStatus si_handle_jump(Evt* script) { script->ptrFirstLine = (Bytecode*)get_variable(script, *script->ptrReadPos); restart_script(script); return ApiStatus_DONE2; @@ -967,7 +967,7 @@ ApiStatus si_handle_jump(ScriptInstance* script) { s32 _bound_script_trigger_handler(Trigger* trigger) { Bytecode* scriptStart; - ScriptInstance* script; + Evt* script; if (trigger->runningScript == NULL) { scriptStart = trigger->scriptSource; @@ -992,7 +992,7 @@ s32 _bound_script_trigger_handler(Trigger* trigger) { return 1; } -ApiStatus si_handle_bind(ScriptInstance* script) { +ApiStatus si_handle_bind(Evt* script) { Bytecode* args = script->ptrReadPos; Trigger* trigger; Bytecode* triggerScript = get_variable(script, *args++); @@ -1024,69 +1024,69 @@ ApiStatus si_handle_bind(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus DeleteTrigger(ScriptInstance* script, s32 isInitialCall) { +ApiStatus DeleteTrigger(Evt* script, s32 isInitialCall) { delete_trigger(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_unbind(ScriptInstance* script) { +ApiStatus si_handle_unbind(Evt* script) { delete_trigger(script->owner2.trigger); return ApiStatus_DONE2; } -ApiStatus si_handle_kill(ScriptInstance* script) { +ApiStatus si_handle_kill(Evt* script) { kill_script_by_ID(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_set_priority(ScriptInstance* script) { +ApiStatus si_handle_set_priority(Evt* script) { set_script_priority(script, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_set_timescale(ScriptInstance* script) { +ApiStatus si_handle_set_timescale(Evt* script) { set_script_timescale(script, get_float_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_set_group(ScriptInstance* script) { +ApiStatus si_handle_set_group(Evt* script) { set_script_group(script, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_suspend_all(ScriptInstance* script) { +ApiStatus si_handle_suspend_all(Evt* script) { suspend_all_group(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_resume_all(ScriptInstance* script) { +ApiStatus si_handle_resume_all(Evt* script) { resume_all_group(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_suspend_others(ScriptInstance* script) { +ApiStatus si_handle_suspend_others(Evt* script) { suspend_group_others(script, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_resume_others(ScriptInstance* script) { +ApiStatus si_handle_resume_others(Evt* script) { resume_group_others(script, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_suspend(ScriptInstance* script) { +ApiStatus si_handle_suspend(Evt* script) { suspend_all_script(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_resume(ScriptInstance* script) { +ApiStatus si_handle_resume(Evt* script) { resume_all_script(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_does_script_exist(ScriptInstance* script) { +ApiStatus si_handle_does_script_exist(Evt* script) { Bytecode* args = script->ptrReadPos; - ScriptID scriptID = get_variable(script, *args++); + s32 scriptID = get_variable(script, *args++); Bytecode var2 = *args++; set_variable(script, var2, does_script_exist(scriptID)); @@ -1095,7 +1095,7 @@ ApiStatus si_handle_does_script_exist(ScriptInstance* script) { void si_standard_trigger_executor(Trigger* trigger) { if (trigger->runningScript == NULL) { - ScriptInstance* newScript = start_script(trigger->scriptSource, trigger->priority, 0x20); + Evt* newScript = start_script(trigger->scriptSource, trigger->priority, 0x20); trigger->runningScript = newScript; trigger->runningScriptID = newScript->id; newScript->varTable[0] = trigger->scriptVars[0]; @@ -1110,7 +1110,7 @@ void si_standard_trigger_executor(Trigger* trigger) { } } -ApiStatus si_handle_bind_lock(ScriptInstance* script) { +ApiStatus si_handle_bind_lock(Evt* script) { Bytecode* args = script->ptrReadPos; Trigger* trigger; Bytecode* triggerScript = get_variable(script, *args++); @@ -1140,39 +1140,39 @@ ApiStatus si_handle_bind_lock(ScriptInstance* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_thread(ScriptInstance* script); -INCLUDE_ASM(s32, "evt/si", si_handle_thread, ScriptInstance* script); +ApiStatus si_handle_thread(Evt* script); +INCLUDE_ASM(s32, "evt/si", si_handle_thread, Evt* script); -ApiStatus si_handle_end_thread(ScriptInstance* script) { +ApiStatus si_handle_end_thread(Evt* script) { kill_script(script); return ApiStatus_FINISH; } -ApiStatus si_handle_child_thread(ScriptInstance* script); -INCLUDE_ASM(ApiStatus, "evt/si", si_handle_child_thread, ScriptInstance* script); +ApiStatus si_handle_child_thread(Evt* script); +INCLUDE_ASM(ApiStatus, "evt/si", si_handle_child_thread, Evt* script); -ApiStatus si_handle_end_child_thread(ScriptInstance* script) { +ApiStatus si_handle_end_child_thread(Evt* script) { kill_script(script); return ApiStatus_BLOCK; } -ApiStatus func_802C6E14(ScriptInstance* script) { +ApiStatus func_802C6E14(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_print_debug_var(ScriptInstance* script); -INCLUDE_ASM(ApiStatus, "evt/si", si_handle_print_debug_var, ScriptInstance* script); +ApiStatus si_handle_print_debug_var(Evt* script); +INCLUDE_ASM(ApiStatus, "evt/si", si_handle_print_debug_var, Evt* script); -ApiStatus func_802C739C(ScriptInstance* script) { +ApiStatus func_802C739C(Evt* script) { script->ptrSavedPosition = (Bytecode*)*script->ptrReadPos; return ApiStatus_DONE2; } -ApiStatus func_802C73B0(ScriptInstance* script) { +ApiStatus func_802C73B0(Evt* script) { return ApiStatus_DONE2; } -s32 func_802C73B8(ScriptInstance* script) { +s32 func_802C73B8(Evt* script) { s32 i; for (i = 0; i < MAX_SCRIPTS; i++) { @@ -1183,14 +1183,14 @@ s32 func_802C73B8(ScriptInstance* script) { return 1; } -s32 si_execute_next_command(ScriptInstance *script) { +s32 si_execute_next_command(Evt *script) { while (TRUE) { s32 status = ApiStatus_DONE2; s32* lines; s32 nargs; switch (script->currentOpcode) { - case 0: + case EVT_OP_INTERNAL_FETCH: script->ptrCurrentLine = script->ptrNextLine; lines = script->ptrNextLine; script->currentOpcode = *lines++; @@ -1202,285 +1202,285 @@ s32 si_execute_next_command(ScriptInstance *script) { script->ptrNextLine = lines; status = ApiStatus_REPEAT; break; - case ScriptOpcode_RETURN: + case EVT_OP_RETURN: status = si_handle_return(script); break; - case ScriptOpcode_LABEL: + case EVT_OP_LABEL: status = si_handle_label(script); break; - case ScriptOpcode_GOTO: + case EVT_OP_GOTO: status = si_handle_goto(script); break; - case ScriptOpcode_LOOP: + case EVT_OP_LOOP: status = si_handle_loop(script); break; - case ScriptOpcode_END_LOOP: + case EVT_OP_END_LOOP: status = si_handle_end_loop(script); break; - case ScriptOpcode_BREAK_LOOP: + case EVT_OP_BREAK_LOOP: status = si_handle_break_loop(script); break; - case ScriptOpcode_SLEEP_FRAMES: + case EVT_OP_SLEEP_FRAMES: status = si_handle_wait(script); break; - case ScriptOpcode_SLEEP_SECS: + case EVT_OP_SLEEP_SECS: status = si_handle_wait_seconds(script); break; - case ScriptOpcode_IF_EQ: + case EVT_OP_IF_EQ: status = si_handle_if_equal(script); break; - case ScriptOpcode_IF_NE: + case EVT_OP_IF_NE: status = si_handle_if_not_equal(script); break; - case ScriptOpcode_IF_LT: + case EVT_OP_IF_LT: status = si_handle_if_less(script); break; - case ScriptOpcode_IF_GT: + case EVT_OP_IF_GT: status = si_handle_if_greater(script); break; - case ScriptOpcode_IF_LE: + case EVT_OP_IF_LE: status = si_handle_if_less_equal(script); break; - case ScriptOpcode_IF_GE: + case EVT_OP_IF_GE: status = si_handle_if_greater_equal(script); break; - case ScriptOpcode_IF_FLAG: + case EVT_OP_IF_FLAG: status = si_handle_if_AND(script); break; - case ScriptOpcode_IF_NOT_FLAG: + case EVT_OP_IF_NOT_FLAG: status = si_handle_if_not_AND(script); break; - case ScriptOpcode_ELSE: + case EVT_OP_ELSE: status = si_handle_else(script); break; - case ScriptOpcode_END_IF: + case EVT_OP_END_IF: status = si_handle_end_if(script); break; - case ScriptOpcode_MATCH: + case EVT_OP_MATCH: status = si_handle_switch(script); break; - case ScriptOpcode_MATCH_CONST: + case EVT_OP_MATCH_CONST: status = si_handle_switch_const(script); break; - case ScriptOpcode_CASE_EQ: + case EVT_OP_CASE_EQ: status = si_handle_case_equal(script); break; - case ScriptOpcode_CASE_NE: + case EVT_OP_CASE_NE: status = si_handle_case_not_equal(script); break; - case ScriptOpcode_CASE_LT: + case EVT_OP_CASE_LT: status = si_handle_case_less(script); break; - case ScriptOpcode_CASE_LE: + case EVT_OP_CASE_LE: status = si_handle_case_less_equal(script); break; - case ScriptOpcode_CASE_GT: + case EVT_OP_CASE_GT: status = si_handle_case_greater(script); break; - case ScriptOpcode_CASE_GE: + case EVT_OP_CASE_GE: status = si_handle_case_greater_equal(script); break; - case ScriptOpcode_CASE_ELSE: + case EVT_OP_CASE_ELSE: status = si_handle_case_default(script); break; - case ScriptOpcode_BREAK_MATCH: + case EVT_OP_BREAK_MATCH: status = si_handle_break_case(script); break; - case ScriptOpcode_CASE_MULTI_OR_EQ: + case EVT_OP_CASE_MULTI_OR_EQ: status = si_handle_case_equal_OR(script); break; - case ScriptOpcode_END_CASE_MULTI: + case EVT_OP_END_CASE_MULTI: status = si_handle_end_case_group(script); break; - case ScriptOpcode_CASE_MULTI_AND_EQ: + case EVT_OP_CASE_MULTI_AND_EQ: status = si_handle_case_equal_AND(script); break; - case ScriptOpcode_CASE_FLAG: + case EVT_OP_CASE_FLAG: status = si_handle_case_AND(script); break; - case ScriptOpcode_CASE_RANGE: + case EVT_OP_CASE_RANGE: status = si_handle_case_range(script); break; - case ScriptOpcode_END_MATCH: + case EVT_OP_END_MATCH: status = si_handle_end_switch(script); break; - case ScriptOpcode_SET: + case EVT_OP_SET: status = si_handle_set_var(script); break; - case ScriptOpcode_SET_CONST: + case EVT_OP_SET_CONST: status = si_handle_set_const(script); break; - case ScriptOpcode_SET_F: + case EVT_OP_SET_F: status = si_handle_set_float(script); break; - case ScriptOpcode_ADD: + case EVT_OP_ADD: status = si_handle_add(script); break; - case ScriptOpcode_SUB: + case EVT_OP_SUB: status = si_handle_subtract(script); break; - case ScriptOpcode_MUL: + case EVT_OP_MUL: status = si_handle_multiply(script); break; - case ScriptOpcode_DIV: + case EVT_OP_DIV: status = si_handle_divide(script); break; - case ScriptOpcode_MOD: + case EVT_OP_MOD: status = si_handle_mod(script); break; - case ScriptOpcode_ADD_F: + case EVT_OP_ADD_F: status = si_handle_addF(script); break; - case ScriptOpcode_SUB_F: + case EVT_OP_SUB_F: status = si_handle_subtractF(script); break; - case ScriptOpcode_MUL_F: + case EVT_OP_MUL_F: status = si_handle_multiplyF(script); break; - case ScriptOpcode_DIV_F: + case EVT_OP_DIV_F: status = si_handle_divideF(script); break; - case ScriptOpcode_USE_BUFFER: + case EVT_OP_USE_BUFFER: status = si_handle_set_int_buffer_ptr(script); break; - case ScriptOpcode_BUFFER_READ_1: + case EVT_OP_BUFFER_READ_1: status = si_handle_get_1_word(script); break; - case ScriptOpcode_BUFFER_READ_2: + case EVT_OP_BUFFER_READ_2: status = si_handle_get_2_word(script); break; - case ScriptOpcode_BUFFER_READ_3: + case EVT_OP_BUFFER_READ_3: status = si_handle_get_3_word(script); break; - case ScriptOpcode_BUFFER_READ_4: + case EVT_OP_BUFFER_READ_4: status = si_handle_get_4_word(script); break; - case ScriptOpcode_BUFFER_PEEK: + case EVT_OP_BUFFER_PEEK: status = si_handle_get_Nth_word(script); break; - case ScriptOpcode_USE_BUFFER_F: + case EVT_OP_USE_BUFFER_F: status = si_handle_set_float_buffer_ptr(script); break; - case ScriptOpcode_BUFFER_READ_1_F: + case EVT_OP_BUFFER_READ_1_F: status = si_handle_get_1_float(script); break; - case ScriptOpcode_BUFFER_READ_2_F: + case EVT_OP_BUFFER_READ_2_F: status = si_handle_get_2_float(script); break; - case ScriptOpcode_BUFFER_READ_3_F: + case EVT_OP_BUFFER_READ_3_F: status = si_handle_get_3_float(script); break; - case ScriptOpcode_BUFFER_READ_4_F: + case EVT_OP_BUFFER_READ_4_F: status = si_handle_get_4_float(script); break; - case ScriptOpcode_BUFFER_PEEK_F: + case EVT_OP_BUFFER_PEEK_F: status = si_handle_get_Nth_float(script); break; - case ScriptOpcode_USE_ARRAY: + case EVT_OP_USE_ARRAY: status = si_handle_set_array(script); break; - case ScriptOpcode_USE_FLAGS: + case EVT_OP_USE_FLAGS: status = si_handle_set_flag_array(script); break; - case ScriptOpcode_NEW_ARRAY: + case EVT_OP_NEW_ARRAY: status = si_handle_allocate_array(script); break; - case ScriptOpcode_KILL_SCRIPT: + case EVT_OP_KILL_SCRIPT: status = si_handle_kill(script); break; - case ScriptOpcode_AND: + case EVT_OP_AND: status = si_handle_AND(script); break; - case ScriptOpcode_AND_CONST: + case EVT_OP_AND_CONST: status = si_handle_AND_const(script); break; - case ScriptOpcode_OR: + case EVT_OP_OR: status = si_handle_OR(script); break; - case ScriptOpcode_OR_CONST: + case EVT_OP_OR_CONST: status = si_handle_OR_const(script); break; - case ScriptOpcode_CALL: + case EVT_OP_CALL: status = si_handle_call(script); break; - case ScriptOpcode_SPAWN_SCRIPT: + case EVT_OP_SPAWN_SCRIPT: status = si_handle_exec1(script); break; - case ScriptOpcode_SPAWN_GET_ID: + case EVT_OP_SPAWN_GET_ID: status = si_handle_exec1_get_id(script); break; - case ScriptOpcode_AWAIT_SCRIPT: + case EVT_OP_AWAIT_SCRIPT: status = si_handle_exec_wait(script); break; - case ScriptOpcode_BIND_TRIGGER: + case EVT_OP_BIND_TRIGGER: status = si_handle_bind(script); break; - case ScriptOpcode_UNBIND: + case EVT_OP_UNBIND: status = si_handle_unbind(script); break; - case ScriptOpcode_SET_PRIORITY: + case EVT_OP_SET_PRIORITY: status = si_handle_set_priority(script); break; - case ScriptOpcode_SET_TIMESCALE: + case EVT_OP_SET_TIMESCALE: status = si_handle_set_timescale(script); break; - case ScriptOpcode_SET_GROUP: + case EVT_OP_SET_GROUP: status = si_handle_set_group(script); break; - case ScriptOpcode_JUMP: + case EVT_OP_JUMP: status = si_handle_jump(script); break; - case ScriptOpcode_BIND_PADLOCK: + case EVT_OP_BIND_PADLOCK: status = si_handle_bind_lock(script); break; - case ScriptOpcode_SUSPEND_GROUP: + case EVT_OP_SUSPEND_GROUP: status = si_handle_suspend_all(script); break; - case ScriptOpcode_RESUME_GROUP: + case EVT_OP_RESUME_GROUP: status = si_handle_resume_all(script); break; - case ScriptOpcode_SUSPEND_OTHERS: + case EVT_OP_SUSPEND_OTHERS: status = si_handle_suspend_others(script); break; - case ScriptOpcode_RESUME_OTHERS: + case EVT_OP_RESUME_OTHERS: status = si_handle_resume_others(script); break; - case ScriptOpcode_SUSPEND_SCRIPT: + case EVT_OP_SUSPEND_SCRIPT: status = si_handle_suspend(script); break; - case ScriptOpcode_RESUME_SCRIPT: + case EVT_OP_RESUME_SCRIPT: status = si_handle_resume(script); break; - case ScriptOpcode_DOES_SCRIPT_EXIST: + case EVT_OP_DOES_SCRIPT_EXIST: status = si_handle_does_script_exist(script); break; - case ScriptOpcode_SPAWN_THREAD: + case EVT_OP_SPAWN_THREAD: status = si_handle_thread(script); break; - case ScriptOpcode_END_SPAWN_THREAD: + case EVT_OP_END_SPAWN_THREAD: status = si_handle_end_thread(script); break; - case ScriptOpcode_PARALLEL_THREAD: + case EVT_OP_PARALLEL_THREAD: status = si_handle_child_thread(script); break; - case ScriptOpcode_END_PARALLEL_THREAD: + case EVT_OP_END_PARALLEL_THREAD: status = si_handle_end_child_thread(script); break; - case ScriptOpcode_90: + case EVT_OP_90: status = func_802C6E14(script); break; - case ScriptOpcode_DEBUG_PRINT: + case EVT_OP_DEBUG_PRINT: status = si_handle_print_debug_var(script); break; - case ScriptOpcode_92: + case EVT_OP_92: status = func_802C739C(script); break; - case ScriptOpcode_93: + case EVT_OP_93: status = func_802C73B0(script); break; - case ScriptOpcode_94: + case EVT_OP_94: status = func_802C73B8(script); - case ScriptOpcode_END: + case EVT_OP_END: break; default: PANIC(); @@ -1519,7 +1519,7 @@ s32 si_execute_next_command(ScriptInstance *script) { // TODO: consider renaming to si_get_variable #ifdef NON_MATCHING -s32 get_variable(ScriptInstance* script, Bytecode var) { +s32 get_variable(Evt* script, Bytecode var) { s32 wordIdx; s32 bitIdx; @@ -1573,10 +1573,10 @@ s32 get_variable(ScriptInstance* script, Bytecode var) { } } #else -INCLUDE_ASM(s32, "evt/si", get_variable, ScriptInstance* script, Bytecode var); +INCLUDE_ASM(s32, "evt/si", get_variable, Evt* script, Bytecode var); #endif -s32 get_variable_index(ScriptInstance* script, s32 var) { +s32 get_variable_index(Evt* script, s32 var) { if (-270000000 >= var) { return var; } @@ -1662,11 +1662,11 @@ s32 get_variable_index_alt(s32 var) { return var; } -INCLUDE_ASM(s32, "evt/si", set_variable, ScriptInstance* script, Bytecode var, s32 value); +INCLUDE_ASM(s32, "evt/si", set_variable, Evt* script, Bytecode var, s32 value); // Tiny regalloc issue with the var <= -80000000 / -60000000 blocks #ifdef NON_MATCHING -f32 get_float_variable(ScriptInstance* script, Bytecode var) { +f32 get_float_variable(Evt* script, Bytecode var) { s32 temp; if (var <= -270000000) { @@ -1711,12 +1711,12 @@ f32 get_float_variable(ScriptInstance* script, Bytecode var) { } } #else -INCLUDE_ASM(f32, "evt/si", get_float_variable, ScriptInstance* script, Bytecode var); +INCLUDE_ASM(f32, "evt/si", get_float_variable, Evt* script, Bytecode var); #endif -INCLUDE_ASM(f32, "evt/si", set_float_variable, ScriptInstance* script, Bytecode var, f32 value); +INCLUDE_ASM(f32, "evt/si", set_float_variable, Evt* script, Bytecode var, f32 value); -Bytecode* si_find_label(ScriptInstance* script, s32 arg1) { +Bytecode* si_find_label(Evt* script, s32 arg1) { Bytecode* ret = script->ptrReadPos; s32 i; @@ -1735,7 +1735,7 @@ Bytecode* si_find_label(ScriptInstance* script, s32 arg1) { return ret; } -Bytecode* si_skip_if(ScriptInstance* script) { +Bytecode* si_skip_if(Evt* script) { s32 nestedIfDepth = 0; Bytecode* pos = script->ptrNextLine; Bytecode opcode; @@ -1747,25 +1747,25 @@ Bytecode* si_skip_if(ScriptInstance* script) { pos += nargs; switch (opcode) { - case ScriptOpcode_END: + case EVT_OP_END: PANIC(); - case ScriptOpcode_END_IF: + case EVT_OP_END_IF: nestedIfDepth--; if (nestedIfDepth < 0) { return pos; } break; - case ScriptOpcode_IF_EQ: - case ScriptOpcode_IF_NE: - case ScriptOpcode_IF_LT: - case ScriptOpcode_IF_GT: - case ScriptOpcode_IF_LE: - case ScriptOpcode_IF_GE: - case ScriptOpcode_IF_FLAG: - case ScriptOpcode_IF_NOT_FLAG: + case EVT_OP_IF_EQ: + case EVT_OP_IF_NE: + case EVT_OP_IF_LT: + case EVT_OP_IF_GT: + case EVT_OP_IF_LE: + case EVT_OP_IF_GE: + case EVT_OP_IF_FLAG: + case EVT_OP_IF_NOT_FLAG: nestedIfDepth++; break; - case ScriptOpcode_ELSE: + case EVT_OP_ELSE: if (nestedIfDepth == 0) { return pos; } @@ -1774,7 +1774,7 @@ Bytecode* si_skip_if(ScriptInstance* script) { } while(1); } -Bytecode* si_skip_else(ScriptInstance* script) { +Bytecode* si_skip_else(Evt* script) { s32 nestedIfDepth = 0; Bytecode* pos = script->ptrNextLine; Bytecode opcode; @@ -1786,9 +1786,9 @@ Bytecode* si_skip_else(ScriptInstance* script) { pos += nargs; switch (opcode) { - case ScriptOpcode_END: + case EVT_OP_END: PANIC(); - case ScriptOpcode_END_IF: + case EVT_OP_END_IF: nestedIfDepth--; if (nestedIfDepth < 0) { return pos; @@ -1796,37 +1796,37 @@ Bytecode* si_skip_else(ScriptInstance* script) { break; // If this isn't copy-pasted at least once, the function breaks, so // might as well be consistent - case ScriptOpcode_IF_EQ: + case EVT_OP_IF_EQ: nestedIfDepth++; break; - case ScriptOpcode_IF_NE: + case EVT_OP_IF_NE: nestedIfDepth++; break; - case ScriptOpcode_IF_LT: + case EVT_OP_IF_LT: nestedIfDepth++; break; - case ScriptOpcode_IF_GT: + case EVT_OP_IF_GT: nestedIfDepth++; break; - case ScriptOpcode_IF_LE: + case EVT_OP_IF_LE: nestedIfDepth++; break; - case ScriptOpcode_IF_GE: + case EVT_OP_IF_GE: nestedIfDepth++; break; - case ScriptOpcode_IF_FLAG: + case EVT_OP_IF_FLAG: nestedIfDepth++; break; - case ScriptOpcode_IF_NOT_FLAG: + case EVT_OP_IF_NOT_FLAG: nestedIfDepth++; break; } } while(1); } -INCLUDE_ASM(Bytecode*, "evt/si", si_goto_end_case, ScriptInstance* script); +INCLUDE_ASM(Bytecode*, "evt/si", si_goto_end_case, Evt* script); -Bytecode* si_goto_next_case(ScriptInstance* script) { +Bytecode* si_goto_next_case(Evt* script) { s32 switchDepth = 1; Bytecode* pos = script->ptrNextLine; s32* opcode; @@ -1838,28 +1838,28 @@ Bytecode* si_goto_next_case(ScriptInstance* script) { pos += *nargs; switch (*opcode) { - case ScriptOpcode_END: + case EVT_OP_END: PANIC(); - case ScriptOpcode_MATCH: + case EVT_OP_MATCH: switchDepth++; break; - case ScriptOpcode_END_MATCH: + case EVT_OP_END_MATCH: switchDepth--; if (switchDepth == 0) { return opcode; } break; - case ScriptOpcode_CASE_EQ: - case ScriptOpcode_CASE_NE: - case ScriptOpcode_CASE_LT: - case ScriptOpcode_CASE_GT: - case ScriptOpcode_CASE_LE: - case ScriptOpcode_CASE_GE: - case ScriptOpcode_CASE_ELSE: - case ScriptOpcode_CASE_MULTI_OR_EQ: - case ScriptOpcode_CASE_MULTI_AND_EQ: - case ScriptOpcode_END_CASE_MULTI: - case ScriptOpcode_CASE_RANGE: + case EVT_OP_CASE_EQ: + case EVT_OP_CASE_NE: + case EVT_OP_CASE_LT: + case EVT_OP_CASE_GT: + case EVT_OP_CASE_LE: + case EVT_OP_CASE_GE: + case EVT_OP_CASE_ELSE: + case EVT_OP_CASE_MULTI_OR_EQ: + case EVT_OP_CASE_MULTI_AND_EQ: + case EVT_OP_END_CASE_MULTI: + case EVT_OP_CASE_RANGE: if (switchDepth == 1) { return opcode; } @@ -1868,4 +1868,4 @@ Bytecode* si_goto_next_case(ScriptInstance* script) { } while(1); } -INCLUDE_ASM(Bytecode*, "evt/si", si_goto_end_loop, ScriptInstance* script); +INCLUDE_ASM(Bytecode*, "evt/si", si_goto_end_loop, Evt* script); diff --git a/src/npc.c b/src/npc.c index fe6bad36a0..3b855168f7 100644 --- a/src/npc.c +++ b/src/npc.c @@ -1733,8 +1733,8 @@ void kill_enemy(Enemy* enemy) { INCLUDE_ASM(void, "npc", kill_enemy); #endif -s32 bind_enemy_ai(Enemy* enemy, Script* aiScriptBytecode) { - ScriptInstance* aiScript; +s32 bind_enemy_ai(Enemy* enemy, EvtSource* aiScriptBytecode) { + Evt* aiScript; s32 id; if (enemy->aiScript != NULL) { @@ -1747,8 +1747,8 @@ s32 bind_enemy_ai(Enemy* enemy, Script* aiScriptBytecode) { return id; } -s32 bind_enemy_aux(Enemy* enemy, Script* auxScriptBytecode) { - ScriptInstance* auxScript; +s32 bind_enemy_aux(Enemy* enemy, EvtSource* auxScriptBytecode) { + Evt* auxScript; s32 id; if (enemy->auxScript != NULL) { @@ -1761,8 +1761,8 @@ s32 bind_enemy_aux(Enemy* enemy, Script* auxScriptBytecode) { return id; } -s32 bind_enemy_interact(Enemy* enemy, Script* interactScriptBytecode) { - ScriptInstance* interactScript; +s32 bind_enemy_interact(Enemy* enemy, EvtSource* interactScriptBytecode) { + Evt* interactScript; s32 id; if (enemy->interactScript != NULL) { @@ -1775,7 +1775,7 @@ s32 bind_enemy_interact(Enemy* enemy, Script* interactScriptBytecode) { return id; } -void bind_npc_ai(s32 npcID, Script* npcAiBytecode) { +void bind_npc_ai(s32 npcID, EvtSource* npcAiBytecode) { EncounterStatus* currentEncounterStatus = &gCurrentEncounter; s32 i; s32 j; @@ -1794,7 +1794,7 @@ void bind_npc_ai(s32 npcID, Script* npcAiBytecode) { } } -void bind_npc_aux(s32 npcID, Script* npcAuxBytecode) { +void bind_npc_aux(s32 npcID, EvtSource* npcAuxBytecode) { EncounterStatus* currentEncounterStatus = &gCurrentEncounter; s32 i; s32 j; @@ -1813,7 +1813,7 @@ void bind_npc_aux(s32 npcID, Script* npcAuxBytecode) { } } -void bind_npc_interact(s32 npcID, Script* npcInteractBytecode) { +void bind_npc_interact(s32 npcID, EvtSource* npcInteractBytecode) { EncounterStatus* currentEncounterStatus = &gCurrentEncounter; s32 i; s32 j; diff --git a/src/npc.h b/src/npc.h index b83fe55725..90fe086654 100644 --- a/src/npc.h +++ b/src/npc.h @@ -219,37 +219,37 @@ void kill_enemy(Enemy* enemy); /// /// @param enemy pointer to the enemy to bind the script to /// @param aiScriptBytecode pointer to the script to be bound. -s32 bind_enemy_ai(Enemy* enemy, Script* aiScriptBytecode); +s32 bind_enemy_ai(Enemy* enemy, EvtSource* aiScriptBytecode); /// Binds the specified auxillary script to the specified enemy /// /// @param enemy pointer to the enemy to bind the script to /// @param auxScriptBytecode pointer to the script to be bound. -s32 bind_enemy_aux(Enemy* enemy, Script* auxScriptBytecode); +s32 bind_enemy_aux(Enemy* enemy, EvtSource* auxScriptBytecode); /// Binds the specified interact script to the specified enemy /// /// @param enemy pointer to the enemy to bind the script to /// @param interactScriptBytecode pointer to the script to be bound. -s32 bind_enemy_interact(Enemy* enemy, Script* interactScriptBytecode); +s32 bind_enemy_interact(Enemy* enemy, EvtSource* interactScriptBytecode); /// Binds the specified ai script to the npc matching the specified npcId /// /// @param npcID ID of the desired npc /// @param npcAiBytecode pointer to the script to be bound. -void bind_npc_ai(s32 npcID, Script* npcAiBytecode); +void bind_npc_ai(s32 npcID, EvtSource* npcAiBytecode); /// Binds the specified auxillary script to the npc matching the specified npcId /// /// @param npcID ID of the desired npc /// @param npcAuxBytecode pointer to the script to be bound. -void bind_npc_aux(s32 npcID, Script* npcAuxBytecode); +void bind_npc_aux(s32 npcID, EvtSource* npcAuxBytecode); /// Binds the specified interact script to the npc matching the specified npcId /// /// @param npcID ID of the desired npc /// @param npcInteractBytecode pointer to the script to be bound. -void bind_npc_interact(s32 npcID, Script* npcInteractBytecode); +void bind_npc_interact(s32 npcID, EvtSource* npcInteractBytecode); /// Looks for an enemy matching the specified npcID. /// diff --git a/src/world/area_arn/arn_02/arn_02.h b/src/world/area_arn/arn_02/arn_02.h index dde5a4f482..53594e75f1 100644 --- a/src/world/area_arn/arn_02/arn_02.h +++ b/src/world/area_arn/arn_02/arn_02.h @@ -5,9 +5,9 @@ #define NAMESPACE arn_02 s32 func_800493EC(Enemy* enemy, s32 arg1, f32 arg2, f32 arg3); -ApiStatus N(func_80240C90_BDDE40)(ScriptInstance *script, s32 isInitialCall); +ApiStatus N(func_80240C90_BDDE40)(Evt *script, s32 isInitialCall); -extern Script N(main); -extern Script N(80241040); +extern EvtSource N(main); +extern EvtSource N(80241040); extern NpcGroupList N(npcGroupList_80241A9C); -extern Script N(makeEntities); +extern EvtSource N(makeEntities); diff --git a/src/world/area_arn/arn_02/events.c b/src/world/area_arn/arn_02/events.c index 9de39f676f..fccea5af9d 100644 --- a/src/world/area_arn/arn_02/events.c +++ b/src/world/area_arn/arn_02/events.c @@ -2,16 +2,16 @@ #include "sprite/npc/cleft.h" #include "sprite/npc/goomba.h" -Script N(exitWalk_802410F0) = EXIT_WALK_SCRIPT(60, 0, "arn_05", 1); +EvtSource N(exitWalk_802410F0) = EXIT_WALK_SCRIPT(60, 0, "arn_05", 1); -Script N(exitWalk_8024114C) = EXIT_WALK_SCRIPT(60, 1, "arn_04", 0); +EvtSource N(exitWalk_8024114C) = EXIT_WALK_SCRIPT(60, 1, "arn_04", 0); -Script N(802411A8) = SCRIPT({ +EvtSource N(802411A8) = SCRIPT({ bind N(exitWalk_802410F0) TRIGGER_FLOOR_ABOVE 1; bind N(exitWalk_8024114C) TRIGGER_FLOOR_ABOVE 6; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -29,7 +29,7 @@ static s32 N(pad_12C4)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeItemEntity(ITEM_DIZZY_DIAL, -248, 193, 45, 17, SI_SAVE_FLAG(1005)); MakeItemEntity(ITEM_LETTER07, 536, 260, 227, 17, SI_SAVE_FLAG(1006)); MakeEntity(0x802EA564, -350, 172, 170, 0, ITEM_COIN, MAKE_ENTITY_END); @@ -53,7 +53,7 @@ NpcAISettings N(npcAISettings_802413D0) = { .unk_2C = 1, }; -Script N(npcAI_80241400) = SCRIPT({ +EvtSource N(npcAI_80241400) = SCRIPT({ DoBasicAI(N(npcAISettings_802413D0)); }); @@ -80,7 +80,7 @@ NpcAISettings N(npcAISettings_8024144C) = { .unk_2C = 1, }; -Script N(npcAI_8024147C) = SCRIPT({ +EvtSource N(npcAI_8024147C) = SCRIPT({ N(func_80240C90_BDDE40)(N(npcAISettings_8024144C), 8); }); @@ -200,7 +200,7 @@ NpcGroupList N(npcGroupList_80241A9C) = { {}, }; -s32 N(func_80240000_BDD1B0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +s32 N(func_80240000_BDD1B0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Camera* camera = &gCameras[gCurrentCamID]; @@ -232,7 +232,7 @@ s32 N(func_80240000_BDD1B0)(ScriptInstance* script, NpcAISettings* aiSettings, E #include "world/common/UnkNpcAIFunc18.inc.c" -void N(func_802401D4_BDD384)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802401D4_BDD384)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -261,7 +261,7 @@ void N(func_802401D4_BDD384)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkNpcAIFunc16.inc.c" -void N(func_80240694_BDD844)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240694_BDD844)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -288,7 +288,7 @@ void N(func_80240694_BDD844)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc10.inc.c" -void N(func_80240984_BDDB34)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240984_BDDB34)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -312,7 +312,7 @@ void N(func_80240984_BDDB34)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkDurationCheck.inc.c" -s32 N(func_80240C90_BDDE40)(ScriptInstance* script, s32 isInitialCall) { +s32 N(func_80240C90_BDDE40)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_arn/arn_02/header.c b/src/world/area_arn/arn_02/header.c index fd073d2f08..3e6a052ab0 100644 --- a/src/world/area_arn/arn_02/header.c +++ b/src/world/area_arn/arn_02/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { .tattle = { MSG_arn_02_tattle }, }; -Script N(80241040) = SCRIPT({ +EvtSource N(80241040) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); diff --git a/src/world/area_arn/arn_03/arn_03.h b/src/world/area_arn/arn_03/arn_03.h index cf45489f43..9efc04afe7 100644 --- a/src/world/area_arn/arn_03/arn_03.h +++ b/src/world/area_arn/arn_03/arn_03.h @@ -5,14 +5,14 @@ #define NAMESPACE arn_03 -ApiStatus N(AddPlayerHandsOffset)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241648_BE03D8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241680_BE0410)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802415F4_BE0384)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024113C_BDFECC)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241648_BE03D8)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241680_BE0410)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802415F4_BE0384)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024113C_BDFECC)(Evt* script, s32 isInitialCall); -extern Script N(main); -extern Script N(80241780); +extern EvtSource N(main); +extern EvtSource N(80241780); extern NpcGroupList N(npcGroupList_80244740); extern NpcGroupList N(npcGroupList_80244788); -extern Script N(makeEntities); +extern EvtSource N(makeEntities); diff --git a/src/world/area_arn/arn_03/events.c b/src/world/area_arn/arn_03/events.c index 99963731c8..4bd4db14da 100644 --- a/src/world/area_arn/arn_03/events.c +++ b/src/world/area_arn/arn_03/events.c @@ -4,16 +4,16 @@ static s32 N(D_80244A20)[112]; -Script N(exitWalk_80241830) = EXIT_WALK_SCRIPT(60, 0, "arn_07", 1); +EvtSource N(exitWalk_80241830) = EXIT_WALK_SCRIPT(60, 0, "arn_07", 1); -Script N(exitWalk_8024188C) = EXIT_WALK_SCRIPT(60, 1, "arn_05", 0); +EvtSource N(exitWalk_8024188C) = EXIT_WALK_SCRIPT(60, 1, "arn_05", 0); -Script N(802418E8) = SCRIPT({ +EvtSource N(802418E8) = SCRIPT({ bind N(exitWalk_80241830) TRIGGER_FLOOR_ABOVE 1; bind N(exitWalk_8024188C) TRIGGER_FLOOR_ABOVE 5; }); -Script N(enterWalk_80241930) = SCRIPT({ +EvtSource N(enterWalk_80241930) = SCRIPT({ GetLoadType(SI_VAR(1)); if (SI_VAR(1) == 1) { spawn EnterSavePoint; @@ -34,7 +34,7 @@ Script N(enterWalk_80241930) = SCRIPT({ spawn EnterWalk; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -74,7 +74,7 @@ NpcAISettings N(npcAISettings_80241BC0) = { .unk_2C = 1, }; -Script N(npcAI_80241BF0) = SCRIPT({ +EvtSource N(npcAI_80241BF0) = SCRIPT({ N(func_8024113C_BDFECC)(N(npcAISettings_80241BC0)); }); @@ -113,7 +113,7 @@ NpcSettings N(npcSettings_80241C3C) = { #include "world/common/UnkFunc16.inc.c" -ApiStatus N(func_80240B94_BDF924)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B94_BDF924)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -197,7 +197,7 @@ ApiStatus N(func_80240B94_BDF924)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -void N(func_80240E90_BDFC20)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240E90_BDFC20)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; @@ -233,7 +233,7 @@ void N(func_80240E90_BDFC20)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241068_BDFDF8)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241068_BDFDF8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -250,7 +250,7 @@ void N(func_80241068_BDFDF8)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_8024113C_BDFECC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024113C_BDFECC)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -295,12 +295,12 @@ ApiStatus N(func_8024113C_BDFECC)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/StashVars.inc.c" -Script N(80241C6C) = SCRIPT({ +EvtSource N(80241C6C) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 0); return; }); -Script N(80241C9C) = SCRIPT({ +EvtSource N(80241C9C) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 16); return; }); @@ -313,7 +313,7 @@ s32 N(D_80241CD0_BE0A60) = { 0x00000000, }; -Script N(80241CD4) = SCRIPT({ +EvtSource N(80241CD4) = SCRIPT({ SI_VAR(9) = SI_VAR(1); ShowKeyChoicePopup(); SI_VAR(10) = SI_VAR(0); @@ -337,20 +337,20 @@ Script N(80241CD4) = SCRIPT({ unbind; }); -Script N(80241E18) = SCRIPT({ +EvtSource N(80241E18) = SCRIPT({ N(func_80241680_BE0410)(SI_VAR(0)); bind_padlock N(80241CD4) 0x10 0 N(D_80244A20); N(func_802415F4_BE0384)(SI_VAR(0)); }); -Script N(80241E68) = SCRIPT({ +EvtSource N(80241E68) = SCRIPT({ SetPlayerAnimation(ANIM_10002); sleep 1; SetPlayerAnimation(0x80007); sleep 20; }); -Script N(interact_80241EB0) = SCRIPT({ +EvtSource N(interact_80241EB0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(2) == 0) { @@ -383,7 +383,7 @@ Script N(interact_80241EB0) = SCRIPT({ } }); -Script N(idle_80242064) = SCRIPT({ +EvtSource N(idle_80242064) = SCRIPT({ DisablePlayerInput(TRUE); sleep 25; spawn { @@ -447,7 +447,7 @@ Script N(idle_80242064) = SCRIPT({ PanToTarget(0, 0, 0); }); -Script N(init_802424E0) = SCRIPT({ +EvtSource N(init_802424E0) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH3_ARRIVED_AT_GHOST_TOWN) { SetNpcPos(NPC_SELF, 175, 240, 145); BindNpcIdle(NPC_SELF, N(idle_80242064)); @@ -455,7 +455,7 @@ Script N(init_802424E0) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241EB0)); }); -Script N(interact_8024254C) = SCRIPT({ +EvtSource N(interact_8024254C) = SCRIPT({ if (SI_MAP_VAR(0) != 0) { if (SI_MAP_VAR(0) >= SI_MAP_VAR(1)) { SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, @@ -521,11 +521,11 @@ Script N(interact_8024254C) = SCRIPT({ } }); -Script N(init_802428A8) = SCRIPT({ +EvtSource N(init_802428A8) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024254C)); }); -Script N(802428CC) = SCRIPT({ +EvtSource N(802428CC) = SCRIPT({ GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetNpcPos(NPC_SELF, SI_VAR(3), SI_VAR(4), SI_VAR(5)); if (SI_VAR(0) > SI_VAR(3)) { @@ -541,7 +541,7 @@ Script N(802428CC) = SCRIPT({ sleep 1; }); -Script N(802429D4) = SCRIPT({ +EvtSource N(802429D4) = SCRIPT({ GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetNpcPos(NPC_SELF, SI_VAR(3), SI_VAR(4), SI_VAR(5)); if (SI_VAR(0) > SI_VAR(3)) { @@ -562,7 +562,7 @@ Script N(802429D4) = SCRIPT({ NpcMoveTo(0x4, SI_VAR(0), SI_VAR(2), 40); }); -Script N(80242B0C) = SCRIPT({ +EvtSource N(80242B0C) = SCRIPT({ GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetNpcPos(NPC_SELF, SI_VAR(3), SI_VAR(4), SI_VAR(5)); if (SI_VAR(0) > SI_VAR(3)) { @@ -584,7 +584,7 @@ Script N(80242B0C) = SCRIPT({ SetNpcPos(0x4, 0, -1000, 0); }); -Script N(80242C60) = SCRIPT({ +EvtSource N(80242C60) = SCRIPT({ await N(802429D4); SI_MAP_VAR(2) = 0; SI_MAP_VAR(3) = 0; @@ -611,7 +611,7 @@ Script N(80242C60) = SCRIPT({ sleep 15; }); -Script N(interact_80242DC4) = SCRIPT({ +EvtSource N(interact_80242DC4) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(4) == 0) { @@ -673,11 +673,11 @@ Script N(interact_80242DC4) = SCRIPT({ } }); -Script N(init_802431A4) = SCRIPT({ +EvtSource N(init_802431A4) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80242DC4)); }); -Script N(interact_802431C8) = SCRIPT({ +EvtSource N(interact_802431C8) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(5) == 0) { @@ -705,11 +705,11 @@ Script N(interact_802431C8) = SCRIPT({ } }); -Script N(init_80243328) = SCRIPT({ +EvtSource N(init_80243328) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_802431C8)); }); -Script N(init_8024334C) = SCRIPT({ +EvtSource N(init_8024334C) = SCRIPT({ SetNpcPos(NPC_SELF, 0, -1000, 0); }); @@ -869,7 +869,7 @@ StaticNpc N(npcGroup_80243B38) = { }, }; -Script N(idle_80243D28) = SCRIPT({ +EvtSource N(idle_80243D28) = SCRIPT({ GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(3) = SI_VAR(0); SI_VAR(3) += -60; @@ -891,22 +891,22 @@ Script N(idle_80243D28) = SCRIPT({ } }); -Script N(init_80243E90) = SCRIPT({ +EvtSource N(init_80243E90) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_80243D28)); SetNpcFlagBits(NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE); }); -Script N(init_80243ECC) = SCRIPT({ +EvtSource N(init_80243ECC) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_80243D28)); SetNpcFlagBits(NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE); }); -Script N(init_80243F08) = SCRIPT({ +EvtSource N(init_80243F08) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_80243D28)); SetNpcFlagBits(NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE); }); -Script N(init_80243F44) = SCRIPT({ +EvtSource N(init_80243F44) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_80243D28)); SetNpcFlagBits(NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE); }); @@ -1053,7 +1053,7 @@ static s32 N(pad_47DC) = { 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA564, 300, 237, 60, 0, ITEM_COIN, MAKE_ENTITY_END); AssignBlockFlag(SI_SAVE_FLAG(1007)); MakeEntity(0x802E9A18, 250, 237, 125, 0, MAKE_ENTITY_END); @@ -1065,7 +1065,7 @@ Script N(makeEntities) = SCRIPT({ #include "world/common/AddPlayerHandsOffset.inc.c" -ApiStatus N(func_802415F4_BE0384)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802415F4_BE0384)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr; @@ -1085,7 +1085,7 @@ ApiStatus N(func_802415F4_BE0384)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80241648_BE03D8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241648_BE03D8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80241CD0_BE0A60) = get_variable(script, *args); @@ -1093,7 +1093,7 @@ ApiStatus N(func_80241648_BE03D8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80241680_BE0410)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241680_BE0410)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_arn/arn_03/header.c b/src/world/area_arn/arn_03/header.c index da165c8e6e..58aba48366 100644 --- a/src/world/area_arn/arn_03/header.c +++ b/src/world/area_arn/arn_03/header.c @@ -13,7 +13,7 @@ MapConfig N(config) = { .tattle = { MSG_arn_03_tattle }, }; -Script N(80241780) = SCRIPT({ +EvtSource N(80241780) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); diff --git a/src/world/area_arn/arn_04/arn_04.h b/src/world/area_arn/arn_04/arn_04.h index 8a7730c480..eb315cb05f 100644 --- a/src/world/area_arn/arn_04/arn_04.h +++ b/src/world/area_arn/arn_04/arn_04.h @@ -5,13 +5,13 @@ #define NAMESPACE arn_04 s32 func_800493EC(Enemy* enemy, s32 arg1, f32 arg2, f32 arg3); -ApiStatus N(func_80240B94_BE4344)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024219C_BE594C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243018_BE67C8)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80240B94_BE4344)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024219C_BE594C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243018_BE67C8)(Evt* script, s32 isInitialCall); -extern Script N(main); -extern Script N(802433D0); +extern EvtSource N(main); +extern EvtSource N(802433D0); extern NpcGroupList N(npcGroupList_80244000); -extern Script N(makeEntities); +extern EvtSource N(makeEntities); extern s16 gCurrentCamID; diff --git a/src/world/area_arn/arn_04/events.c b/src/world/area_arn/arn_04/events.c index 9b5aae0fe3..f36e20629d 100644 --- a/src/world/area_arn/arn_04/events.c +++ b/src/world/area_arn/arn_04/events.c @@ -3,16 +3,16 @@ #include "sprite/npc/goomba.h" #include "sprite/npc/cleft.h" -Script N(exitWalk_80243480) = EXIT_WALK_SCRIPT(60, 0, "arn_02", 1); +EvtSource N(exitWalk_80243480) = EXIT_WALK_SCRIPT(60, 0, "arn_02", 1); -Script N(exitWalk_802434DC) = EXIT_WALK_SCRIPT(60, 1, "dgb_00", 0); +EvtSource N(exitWalk_802434DC) = EXIT_WALK_SCRIPT(60, 1, "dgb_00", 0); -Script N(80243538) = SCRIPT({ +EvtSource N(80243538) = SCRIPT({ bind N(exitWalk_80243480) TRIGGER_FLOOR_ABOVE 1; bind N(exitWalk_802434DC) TRIGGER_FLOOR_ABOVE 6; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -43,7 +43,7 @@ NpcAISettings N(npcAISettings_80243660) = { .unk_2C = 1, }; -Script N(npcAI_80243690) = SCRIPT({ +EvtSource N(npcAI_80243690) = SCRIPT({ N(func_80240B94_BE4344)(N(npcAISettings_80243660)); }); @@ -74,7 +74,7 @@ NpcAISettings N(npcAISettings_802436F4) = { .unk_2C = 1, }; -Script N(npcAI_80243724) = SCRIPT({ +EvtSource N(npcAI_80243724) = SCRIPT({ SetSelfVar(0, 1); SetSelfVar(5, -850); SetSelfVar(6, 60); @@ -106,7 +106,7 @@ NpcAISettings N(npcAISettings_802437C0) = { .unk_2C = 1, }; -Script N(npcAI_802437F0) = SCRIPT({ +EvtSource N(npcAI_802437F0) = SCRIPT({ N(func_80243018_BE67C8)(N(npcAISettings_802437C0), 8); }); @@ -265,7 +265,7 @@ static s32 N(pad_403C)[] = { 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA564, 450, 285, 120, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END); AssignBlockFlag(SI_SAVE_FLAG(1008)); MakeEntity(0x802EA564, 720, 333, 75, 0, ITEM_COIN, MAKE_ENTITY_END); @@ -277,7 +277,7 @@ Script N(makeEntities) = SCRIPT({ #include "world/common/UnkNpcAIFunc24.inc.c" -void N(func_80240158_BE3908)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240158_BE3908)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, z; @@ -343,7 +343,7 @@ void N(func_80240158_BE3908)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc16.inc.c" -ApiStatus N(func_80240B94_BE4344)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B94_BE4344)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -431,7 +431,7 @@ ApiStatus N(func_80240B94_BE4344)(ScriptInstance* script, s32 isInitialCall) { #ifdef NON_MATCHING //second npc_raycast_down_sides call -void N(func_80241040_BE47F0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241040_BE47F0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -559,7 +559,7 @@ void N(func_80241040_BE47F0)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(void, "world/area_arn/arn_04/events", arn_04_func_80241040_BE47F0, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_arn/arn_04/events", arn_04_func_80241040_BE47F0, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -569,7 +569,7 @@ INCLUDE_ASM(void, "world/area_arn/arn_04/events", arn_04_func_80241040_BE47F0, S #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_80241AE4_BE5294)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241AE4_BE5294)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -587,7 +587,7 @@ void N(func_80241AE4_BE5294)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_8024219C_BE594C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024219C_BE594C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -647,7 +647,7 @@ ApiStatus N(func_8024219C_BE594C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -s32 N(func_80242388_BE5B38)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +s32 N(func_80242388_BE5B38)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Camera* camera = &gCameras[gCurrentCamID]; @@ -679,7 +679,7 @@ s32 N(func_80242388_BE5B38)(ScriptInstance* script, NpcAISettings* aiSettings, E #include "world/common/UnkNpcAIFunc18.inc.c" -void N(func_8024255C_BE5D0C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_8024255C_BE5D0C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -708,7 +708,7 @@ void N(func_8024255C_BE5D0C)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkNpcAIFunc16.inc.c" -void N(func_80242A1C_BE61CC)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242A1C_BE61CC)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -735,7 +735,7 @@ void N(func_80242A1C_BE61CC)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc10.inc.c" -void N(func_80242D0C_BE64BC)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242D0C_BE64BC)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -759,7 +759,7 @@ void N(func_80242D0C_BE64BC)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkDurationCheck.inc.c" -ApiStatus N(func_80243018_BE67C8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243018_BE67C8)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_arn/arn_04/header.c b/src/world/area_arn/arn_04/header.c index 9a7b2f5ce8..49537e177f 100644 --- a/src/world/area_arn/arn_04/header.c +++ b/src/world/area_arn/arn_04/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { .tattle = { MSG_arn_04_tattle }, }; -Script N(802433D0) = SCRIPT({ +EvtSource N(802433D0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); diff --git a/src/world/area_arn/arn_05/arn_05.h b/src/world/area_arn/arn_05/arn_05.h index 2d27f80d79..4855a96800 100644 --- a/src/world/area_arn/arn_05/arn_05.h +++ b/src/world/area_arn/arn_05/arn_05.h @@ -6,13 +6,13 @@ ApiStatus func_802D2B50(void); -ApiStatus N(SwitchToPartner)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802412B0_BE8E90)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024113C_BE8D1C)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(SwitchToPartner)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802412B0_BE8E90)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024113C_BE8D1C)(Evt* script, s32 isInitialCall); -extern Script N(makeEntities); -extern Script N(main); -extern Script N(80241360); -extern Script N(802441FC); +extern EvtSource N(makeEntities); +extern EvtSource N(main); +extern EvtSource N(80241360); +extern EvtSource N(802441FC); extern NpcGroupList N(npcGroupList_80244FC8); extern NpcGroupList N(npcGroupList_80244FA4); diff --git a/src/world/area_arn/arn_05/events.c b/src/world/area_arn/arn_05/events.c index 92ddd32f68..a1b25b3a23 100644 --- a/src/world/area_arn/arn_05/events.c +++ b/src/world/area_arn/arn_05/events.c @@ -16,16 +16,16 @@ enum { NPC_BOO8, }; -Script N(exitWalk_80241430) = EXIT_WALK_SCRIPT(60, 0, "arn_03", 1); +EvtSource N(exitWalk_80241430) = EXIT_WALK_SCRIPT(60, 0, "arn_03", 1); -Script N(exitWalk_8024148C) = EXIT_WALK_SCRIPT(60, 1, "arn_02", 0); +EvtSource N(exitWalk_8024148C) = EXIT_WALK_SCRIPT(60, 1, "arn_02", 0); -Script N(802414E8) = SCRIPT({ +EvtSource N(802414E8) = SCRIPT({ bind N(exitWalk_80241430) TRIGGER_FLOOR_ABOVE 1; bind N(exitWalk_8024148C) TRIGGER_FLOOR_ABOVE 5; }); -Script N(enterWalk_80241530) = SCRIPT({ +EvtSource N(enterWalk_80241530) = SCRIPT({ GetLoadType(SI_VAR(1)); if (SI_VAR(1) == 1) { spawn EnterSavePoint; @@ -37,7 +37,7 @@ Script N(enterWalk_80241530) = SCRIPT({ sleep 1; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -78,7 +78,7 @@ NpcAISettings N(npcAISettings_802416DC) = { .unk_2C = 1, }; -Script N(npcAI_8024170C) = SCRIPT({ +EvtSource N(npcAI_8024170C) = SCRIPT({ N(func_8024113C_BE8D1C)(N(npcAISettings_802416DC)); }); @@ -95,11 +95,11 @@ NpcSettings N(npcSettings_80241758) = { .level = 99, }; -Script N(idle_80241784) = SCRIPT({ +EvtSource N(idle_80241784) = SCRIPT({ }); -Script N(interact_80241794) = SCRIPT({ +EvtSource N(interact_80241794) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(6) == 0) { @@ -127,11 +127,11 @@ Script N(interact_80241794) = SCRIPT({ } }); -Script N(interact_802418F4) = SCRIPT({ +EvtSource N(interact_802418F4) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, 0x0094)); }); -Script N(interact_80241924) = SCRIPT({ +EvtSource N(interact_80241924) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(7) == 0) { @@ -159,11 +159,11 @@ Script N(interact_80241924) = SCRIPT({ } }); -Script N(interact_80241A84) = SCRIPT({ +EvtSource N(interact_80241A84) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, 0x009B)); }); -Script N(interact_80241AB4) = SCRIPT({ +EvtSource N(interact_80241AB4) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER {} < STORY_CH3_DEFEATED_TUBBA_BLUBBA {} @@ -213,7 +213,7 @@ Script N(interact_80241AB4) = SCRIPT({ } }); -Script N(interact_80241D88) = SCRIPT({ +EvtSource N(interact_80241D88) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER {} < STORY_CH3_DEFEATED_TUBBA_BLUBBA {} @@ -227,7 +227,7 @@ Script N(interact_80241D88) = SCRIPT({ } }); -Script N(interact_80241E28) = SCRIPT({ +EvtSource N(interact_80241E28) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(8) == 0) { @@ -255,22 +255,22 @@ Script N(interact_80241E28) = SCRIPT({ } }); -Script N(interact_80241F88) = SCRIPT({ +EvtSource N(interact_80241F88) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, 0x00B5)); }); -Script N(init_80241FB8) = SCRIPT({ +EvtSource N(init_80241FB8) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { BindNpcIdle(NPC_SELF, N(idle_80241784)); } BindNpcInteract(NPC_SELF, N(interact_80241794)); }); -Script N(init_80242008) = SCRIPT({ +EvtSource N(init_80242008) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241924)); }); -Script N(init_8024202C) = SCRIPT({ +EvtSource N(init_8024202C) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241AB4)); match SI_STORY_PROGRESS { < STORY_CH3_SAW_TUBBA_EAT_BOO { @@ -293,7 +293,7 @@ Script N(init_8024202C) = SCRIPT({ } }); -Script N(init_8024212C) = SCRIPT({ +EvtSource N(init_8024212C) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241D88)); match SI_STORY_PROGRESS { < STORY_CH3_SAW_TUBBA_EAT_BOO { @@ -314,7 +314,7 @@ Script N(init_8024212C) = SCRIPT({ } }); -Script N(init_802421EC) = SCRIPT({ +EvtSource N(init_802421EC) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { BindNpcIdle(NPC_SELF, N(idle_80241784)); } @@ -476,7 +476,7 @@ StaticNpc N(npcGroup_8024223C)[] = { }, }; -Script N(80242BEC) = SCRIPT({ +EvtSource N(80242BEC) = SCRIPT({ loop SI_VAR(0) { PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0); ShakeCam(0, 0, 10, 0.5); @@ -484,7 +484,7 @@ Script N(80242BEC) = SCRIPT({ } }); -Script N(80242C50) = SCRIPT({ +EvtSource N(80242C50) = SCRIPT({ DisablePlayerInput(TRUE); NpcFacePlayer(NPC_BOO2, 1); PlaySoundAtNpc(NPC_BOO2, SOUND_UNKNOWN_262, 0); @@ -746,7 +746,7 @@ Script N(80242C50) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(802441FC) = SCRIPT({ +EvtSource N(802441FC) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { SetNpcPos(NPC_BOO2, 330, 184, 240); loop { @@ -772,7 +772,7 @@ Script N(802441FC) = SCRIPT({ } }); -Script N(init_80244358) = SCRIPT({ +EvtSource N(init_80244358) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH3_SAW_TUBBA_EAT_BOO) { RemoveNpc(NPC_SELF); } @@ -819,7 +819,7 @@ StaticNpc N(npcGroup_802443AC) = { .extraAnimations = N(extraAnimationList_80244390), }; -Script N(idle_8024459C) = SCRIPT({ +EvtSource N(idle_8024459C) = SCRIPT({ GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(3) = SI_VAR(0); SI_VAR(3) += -60; @@ -841,22 +841,22 @@ Script N(idle_8024459C) = SCRIPT({ } }); -Script N(init_80244704) = SCRIPT({ +EvtSource N(init_80244704) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_8024459C)); EnableNpcShadow(NPC_SELF, FALSE); }); -Script N(init_8024473C) = SCRIPT({ +EvtSource N(init_8024473C) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_8024459C)); EnableNpcShadow(NPC_SELF, FALSE); }); -Script N(init_80244774) = SCRIPT({ +EvtSource N(init_80244774) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_8024459C)); EnableNpcShadow(NPC_SELF, FALSE); }); -Script N(init_802447AC) = SCRIPT({ +EvtSource N(init_802447AC) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_8024459C)); EnableNpcShadow(NPC_SELF, FALSE); }); @@ -997,7 +997,7 @@ static s32 N(pad_4FF8)[] = { 0x00000000, 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA7E0, 17, 238, 80, 0, MAKE_ENTITY_END); }); @@ -1023,7 +1023,7 @@ Script N(makeEntities) = SCRIPT({ #include "world/common/UnkFunc16.inc.c" -ApiStatus N(func_80240B94_BE8774)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B94_BE8774)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -1108,7 +1108,7 @@ ApiStatus N(func_80240B94_BE8774)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -void N(func_80240E90_BE8A70)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240E90_BE8A70)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; @@ -1144,7 +1144,7 @@ void N(func_80240E90_BE8A70)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241068_BE8C48)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241068_BE8C48)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1161,7 +1161,7 @@ void N(func_80241068_BE8C48)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_8024113C_BE8D1C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024113C_BE8D1C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1203,7 +1203,7 @@ ApiStatus N(func_8024113C_BE8D1C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_802412B0_BE8E90)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802412B0_BE8E90)(Evt* script, s32 isInitialCall) { return (gGameStatusPtr->pressedButtons >> 1) & ApiStatus_DONE2; } diff --git a/src/world/area_arn/arn_05/header.c b/src/world/area_arn/arn_05/header.c index 37398b823d..a9165d1d79 100644 --- a/src/world/area_arn/arn_05/header.c +++ b/src/world/area_arn/arn_05/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { .tattle = { MSG_arn_05_tattle }, }; -Script N(80241360) = SCRIPT({ +EvtSource N(80241360) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_SAW_TUBBA_EAT_BOO { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); diff --git a/src/world/area_arn/arn_07/BECDF0.c b/src/world/area_arn/arn_07/BECDF0.c index 2210f9205e..32e852de11 100644 --- a/src/world/area_arn/arn_07/BECDF0.c +++ b/src/world/area_arn/arn_07/BECDF0.c @@ -36,14 +36,14 @@ typedef struct { /* 0x54 */ struct N(temp)* unk_54; } arn_07_struct; // size = 0x58 -ApiStatus N(func_80240000_BECDF0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_BECDF0)(Evt* script, s32 isInitialCall) { arn_07_struct* ptr = script->varTable[0]; sfx_adjust_env_sound_pos(0xA2, 0, ptr->unk_00, ptr->unk_04, ptr->unk_08); return ((ptr->unk_44 < 2) == 0) * ApiStatus_DONE2; } -ApiStatus N(func_8024004C_BECE3C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024004C_BECE3C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -71,7 +71,7 @@ ApiStatus N(func_8024004C_BECE3C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802401AC_BECF9C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802401AC_BECF9C)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; arn_07_struct* ptr = script->varTable[0]; @@ -170,14 +170,14 @@ ApiStatus N(func_802401AC_BECF9C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_802405BC_BED3AC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405BC_BED3AC)(Evt* script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); arn_07_struct* ptr = script->varTable[0]; return (ptr->unk_4E == var) * ApiStatus_DONE2; } -ApiStatus N(func_802405FC_BED3EC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405FC_BED3EC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -198,7 +198,7 @@ ApiStatus N(func_802405FC_BED3EC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80240708_BED4F8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240708_BED4F8)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; arn_07_struct* ptr = script->varTable[0]; @@ -220,7 +220,7 @@ s32 N(itemList_80242040)[] = { ITEM_NONE, }; -Script N(80242048) = SCRIPT({ +EvtSource N(80242048) = SCRIPT({ FadeOutMusic(0, 1000); SI_VAR(0) = 0; if (SI_VAR(0) == 0) { @@ -287,7 +287,7 @@ Script N(80242048) = SCRIPT({ sleep 100; }); -Script N(80242498) = SCRIPT({ +EvtSource N(80242498) = SCRIPT({ SI_VAR(0) = 1; if (SI_VAR(0) == 0) { DisablePlayerInput(TRUE); @@ -353,7 +353,7 @@ Script N(80242498) = SCRIPT({ sleep 100; }); -Script N(exitSingleDoor_802428D4) = SCRIPT({ +EvtSource N(exitSingleDoor_802428D4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); SI_VAR(0) = 0; @@ -366,13 +366,13 @@ Script N(exitSingleDoor_802428D4) = SCRIPT({ sleep 100; }); -Script N(exitWalk_80242978) = EXIT_WALK_SCRIPT(60, 1, "arn_03", 0); +EvtSource N(exitWalk_80242978) = EXIT_WALK_SCRIPT(60, 1, "arn_03", 0); -Script N(exitWalk_802429D4) = EXIT_WALK_SCRIPT(60, 2, "mim_12", 1); +EvtSource N(exitWalk_802429D4) = EXIT_WALK_SCRIPT(60, 2, "mim_12", 1); static const f64 rodata_alignment = 0.0; -Script N(80242A30) = SCRIPT({ +EvtSource N(80242A30) = SCRIPT({ DisablePlayerInput(TRUE); DisablePartnerAI(0); SetPlayerPos(-28, 0, -333); @@ -507,7 +507,7 @@ Script N(80242A30) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(802433C8) = SCRIPT({ +EvtSource N(802433C8) = SCRIPT({ bind N(exitWalk_80242978) TRIGGER_FLOOR_ABOVE 5; bind N(exitWalk_802429D4) TRIGGER_FLOOR_ABOVE 1; if (SI_STORY_PROGRESS < STORY_CH3_UNLOCKED_WINDY_MILL) { @@ -517,7 +517,7 @@ Script N(802433C8) = SCRIPT({ } }); -Script N(enterWalk_8024346C) = SCRIPT({ +EvtSource N(enterWalk_8024346C) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -548,7 +548,7 @@ Script N(enterWalk_8024346C) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); diff --git a/src/world/area_arn/arn_07/BED5F0.c b/src/world/area_arn/arn_07/BED5F0.c index 10a4e2aeb3..e333837d20 100644 --- a/src/world/area_arn/arn_07/BED5F0.c +++ b/src/world/area_arn/arn_07/BED5F0.c @@ -1,6 +1,6 @@ #include "arn_07.h" -ApiStatus N(func_80240800_BED5F0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240800_BED5F0)(Evt* script, s32 isInitialCall) { f32 temp_f0 = get_float_variable(script, SI_VAR(0)); if (temp_f0 >= 360.0) { diff --git a/src/world/area_arn/arn_07/arn_07.h b/src/world/area_arn/arn_07/arn_07.h index cd8fcd1d49..c7d58e3df1 100644 --- a/src/world/area_arn/arn_07/arn_07.h +++ b/src/world/area_arn/arn_07/arn_07.h @@ -21,26 +21,26 @@ enum { NPC_WORLD_SKOLAR, }; -ApiStatus N(func_80240000_BECDF0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024004C_BECE3C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802401AC_BECF9C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802405BC_BED3AC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802405FC_BED3EC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240708_BED4F8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240800_BED5F0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241C5C_BEEA4C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SetEntityFlags100000)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetEntityPosition)(ScriptInstance* script, s32 isInitialCall); -ApiStatus PostChapter3StatUpdate(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80240000_BECDF0)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024004C_BECE3C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802401AC_BECF9C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802405BC_BED3AC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802405FC_BED3EC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240708_BED4F8)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240800_BED5F0)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241C5C_BEEA4C)(Evt* script, s32 isInitialCall); +ApiStatus N(SetEntityFlags100000)(Evt* script, s32 isInitialCall); +ApiStatus N(GetEntityPosition)(Evt* script, s32 isInitialCall); +ApiStatus PostChapter3StatUpdate(Evt* script, s32 isInitialCall); -extern Script N(exitSingleDoor_802428D4); +extern EvtSource N(exitSingleDoor_802428D4); extern NpcGroupList N(npcGroupList_8024787C); extern NpcGroupList N(npcGroupList_802478B8); extern NpcGroupList N(npcGroupList_802478E8); -extern Script N(80243790); -extern Script N(802437AC); -extern Script N(802439B0); -extern Script N(80242048); -extern Script N(80241F10); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(80243790); +extern EvtSource N(802437AC); +extern EvtSource N(802439B0); +extern EvtSource N(80242048); +extern EvtSource N(80241F10); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_arn/arn_07/events.c b/src/world/area_arn/arn_07/events.c index 3824209fca..b55b8799ca 100644 --- a/src/world/area_arn/arn_07/events.c +++ b/src/world/area_arn/arn_07/events.c @@ -7,11 +7,11 @@ #include "sprite/npc/boo.h" #include "sprite/npc/bootler.h" -Script N(80243790) = SCRIPT({ +EvtSource N(80243790) = SCRIPT({ spawn N(802437AC); }); -Script N(802437AC) = SCRIPT({ +EvtSource N(802437AC) = SCRIPT({ SI_VAR(0) = 0.0; SI_VAR(1) = 30; PlaySoundAtModel(23, 0x8000004A, 0); @@ -46,7 +46,7 @@ Script N(802437AC) = SCRIPT({ goto 0; }); -Script N(802439B0) = SCRIPT({ +EvtSource N(802439B0) = SCRIPT({ group 0; SetTimeFreezeMode(1); ShowKeyChoicePopup(); @@ -73,11 +73,11 @@ Script N(802439B0) = SCRIPT({ unbind; }); -Script N(80243B28) = SCRIPT({ +EvtSource N(80243B28) = SCRIPT({ bind N(exitSingleDoor_802428D4) TRIGGER_WALL_PRESS_A 10; }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH3_UNLOCKED_WINDY_MILL) { MakeEntity(0x802BCD68, 10, 30, -155, 0, MAKE_ENTITY_END); AssignScript(N(80243B28)); @@ -103,7 +103,7 @@ NpcAISettings N(npcAISettings_80243BD8) = { .unk_2C = 1, }; -Script N(npcAI_80243C08) = SCRIPT({ +EvtSource N(npcAI_80243C08) = SCRIPT({ SetSelfVar(0, 1); SetSelfVar(5, -850); SetSelfVar(6, 60); @@ -121,11 +121,11 @@ NpcSettings N(npcSettings_80243C78) = { .unk_2A = 1, }; -Script N(80243CA4) = SCRIPT({ +EvtSource N(80243CA4) = SCRIPT({ }); -Script N(80243CB4) = SCRIPT({ +EvtSource N(80243CB4) = SCRIPT({ }); @@ -169,14 +169,14 @@ NpcSettings N(npcSettings_80243DA0) = { .level = 99, }; -Script N(80243DCC) = SCRIPT({ +EvtSource N(80243DCC) = SCRIPT({ loop { PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0); ShakeCam(0, 0, 3, 0.80078125); } }); -Script N(80243E24) = SCRIPT({ +EvtSource N(80243E24) = SCRIPT({ DisablePlayerInput(TRUE); UseSettingsFrom(0, 236, 0, -46); SetCamSpeed(0, 90.0); @@ -199,7 +199,7 @@ Script N(80243E24) = SCRIPT({ WaitForCam(0, 1.0); }); -Script N(80243FE8) = SCRIPT({ +EvtSource N(80243FE8) = SCRIPT({ sleep 10; SetNpcAnimation(NPC_SELF, NPC_ANIM(world_tubba, Palette_00, Anim_22)); sleep 15; @@ -389,7 +389,7 @@ Script N(80243FE8) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(idle_80244C54) = SCRIPT({ +EvtSource N(idle_80244C54) = SCRIPT({ loop { GetSelfVar(0, SI_VAR(0)); if (SI_VAR(0) == 1) { @@ -400,7 +400,7 @@ Script N(idle_80244C54) = SCRIPT({ StartBossBattle(11); }); -Script N(idle_80244CC8) = SCRIPT({ +EvtSource N(idle_80244CC8) = SCRIPT({ 10: loop { GetSelfVar(0, SI_VAR(0)); @@ -450,7 +450,7 @@ Script N(idle_80244CC8) = SCRIPT({ goto 10; }); -Script N(defeat_80244FB8) = SCRIPT({ +EvtSource N(defeat_80244FB8) = SCRIPT({ SetEncounterStatusFlags(2, 1); GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { @@ -465,13 +465,13 @@ Script N(defeat_80244FB8) = SCRIPT({ } }); -Script N(init_80245058) = SCRIPT({ +EvtSource N(init_80245058) = SCRIPT({ if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); -Script N(init_80245090) = SCRIPT({ +EvtSource N(init_80245090) = SCRIPT({ SetSelfVar(0, 0); BindNpcIdle(NPC_SELF, N(idle_80244C54)); BindNpcDefeat(NPC_SELF, N(defeat_80244FB8)); @@ -480,7 +480,7 @@ Script N(init_80245090) = SCRIPT({ } }); -Script N(init_80245104) = SCRIPT({ +EvtSource N(init_80245104) = SCRIPT({ SetSelfVar(0, 0); BindNpcIdle(NPC_SELF, N(idle_80244CC8)); if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { @@ -488,13 +488,13 @@ Script N(init_80245104) = SCRIPT({ } }); -Script N(init_80245164) = SCRIPT({ +EvtSource N(init_80245164) = SCRIPT({ if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); -Script N(init_8024519C) = SCRIPT({ +EvtSource N(init_8024519C) = SCRIPT({ if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } @@ -527,7 +527,7 @@ NpcAnimID N(extraAnimationList_80245208)[] = { ANIM_END, }; -Script N(idle_80245210) = SCRIPT({ +EvtSource N(idle_80245210) = SCRIPT({ loop { loop 10 { GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -544,7 +544,7 @@ Script N(idle_80245210) = SCRIPT({ } }); -Script N(80245304) = SCRIPT({ +EvtSource N(80245304) = SCRIPT({ DisablePartnerAI(0); func_802CF56C(2); GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -678,7 +678,7 @@ Script N(80245304) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(init_80245C9C) = SCRIPT({ +EvtSource N(init_80245C9C) = SCRIPT({ GetEntryID(SI_VAR(0)); if (SI_VAR(0) == 3) { BindNpcIdle(NPC_SELF, N(idle_80245210)); @@ -994,7 +994,7 @@ StaticNpc N(npcGroup_80246E7C) = { .extraAnimations = N(extraAnimationList_80245208), }; -Script N(init_8024706C) = SCRIPT({ +EvtSource N(init_8024706C) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { RemoveNpc(NPC_SELF); @@ -1166,7 +1166,7 @@ NpcGroupList N(npcGroupList_802478E8) = { #include "world/common/UnkNpcAIFunc23.inc.c" #ifdef NON_MATCHING -void N(func_80240B00_BED8F0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240B00_BED8F0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -1305,7 +1305,7 @@ void N(func_80240B00_BED8F0)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(void, "world/area_arn/arn_07/events", arn_07_func_80240B00_BED8F0, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_arn/arn_07/events", arn_07_func_80240B00_BED8F0, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -1315,7 +1315,7 @@ INCLUDE_ASM(void, "world/area_arn/arn_07/events", arn_07_func_80240B00_BED8F0, S #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_802415A4_BEE394)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802415A4_BEE394)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1333,7 +1333,7 @@ void N(func_802415A4_BEE394)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_80241C5C_BEEA4C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241C5C_BEEA4C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1393,7 +1393,7 @@ ApiStatus N(func_80241C5C_BEEA4C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus PostChapter3StatUpdate(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PostChapter3StatUpdate(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; set_max_SP(3); diff --git a/src/world/area_arn/arn_07/header.c b/src/world/area_arn/arn_07/header.c index edee6d76ec..0dde94d0ea 100644 --- a/src/world/area_arn/arn_07/header.c +++ b/src/world/area_arn/arn_07/header.c @@ -16,7 +16,7 @@ MapConfig N(config) = { .tattle = { MSG_arn_07_tattle }, }; -Script N(80241F10) = SCRIPT({ +EvtSource N(80241F10) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); diff --git a/src/world/area_arn/arn_08/BF47A0.c b/src/world/area_arn/arn_08/BF47A0.c index aed5217cc4..f5c6c4a2cc 100644 --- a/src/world/area_arn/arn_08/BF47A0.c +++ b/src/world/area_arn/arn_08/BF47A0.c @@ -1,6 +1,6 @@ #include "arn_08.h" -ApiStatus N(func_80240000_BF47A0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_BF47A0)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; f32 temp_f20; s32 colliderID; @@ -17,7 +17,7 @@ ApiStatus N(func_80240000_BF47A0)(ScriptInstance* script, s32 isInitialCall) { return (script->functionTemp[0] > 50) * ApiStatus_DONE2; } -ApiStatus N(func_8024008C_BF482C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024008C_BF482C)(Evt* script, s32 isInitialCall) { if (gPlayerStatus.position.y < -10.0f) { return ApiStatus_DONE2; } diff --git a/src/world/area_arn/arn_08/arn_08.h b/src/world/area_arn/arn_08/arn_08.h index a66726f156..c69b74a569 100644 --- a/src/world/area_arn/arn_08/arn_08.h +++ b/src/world/area_arn/arn_08/arn_08.h @@ -7,17 +7,17 @@ f32 player_check_collision_below(f32, s32*); f32 func_800E34D8(void); -ApiStatus N(func_80240000_BF47A0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024008C_BF482C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802400C0_BF4860)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802400D4_BF4874)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802400F4_BF4894)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024019C_BF493C)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80240000_BF47A0)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024008C_BF482C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802400C0_BF4860)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802400D4_BF4874)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802400F4_BF4894)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024019C_BF493C)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80241828); -extern Script N(80240B50); -extern Script N(80240BA0); -extern Script N(8024118C); -extern Script N(80240300); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(80240B50); +extern EvtSource N(80240BA0); +extern EvtSource N(8024118C); +extern EvtSource N(80240300); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_arn/arn_08/events.c b/src/world/area_arn/arn_08/events.c index c5431e8905..4381418fd9 100644 --- a/src/world/area_arn/arn_08/events.c +++ b/src/world/area_arn/arn_08/events.c @@ -11,7 +11,7 @@ enum { NPC_YAKKEY, }; -Script N(802403B0) = SCRIPT({ +EvtSource N(802403B0) = SCRIPT({ group 27; DisablePlayerInput(TRUE); ClearDefeatedEnemies(); @@ -26,11 +26,11 @@ Script N(802403B0) = SCRIPT({ sleep 100; }); -Script N(80240470) = SCRIPT({ +EvtSource N(80240470) = SCRIPT({ bind N(802403B0) TRIGGER_WALL_PRESS_A 6; }); -Script N(8024049C) = SCRIPT({ +EvtSource N(8024049C) = SCRIPT({ GetLoadType(SI_VAR(1)); if (SI_VAR(1) == 1) { spawn EnterSavePoint; @@ -96,7 +96,7 @@ Script N(8024049C) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -126,7 +126,7 @@ static s32 N(pad_A6C) = { 0x00000000, }; -Script N(80240A70) = SCRIPT({ +EvtSource N(80240A70) = SCRIPT({ loop { if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WELL) { break loop; @@ -145,7 +145,7 @@ Script N(80240A70) = SCRIPT({ sleep 100; }); -Script N(80240B50) = SCRIPT({ +EvtSource N(80240B50) = SCRIPT({ SetCamProperties(0, 90.0, 0, 0, 0, 470.0, 17.0, -7.0); spawn N(80240A70); }); @@ -154,7 +154,7 @@ static s32 N(pad_B98)[] = { 0x00000000, 0x00000000, }; -Script N(80240BA0) = SCRIPT({ +EvtSource N(80240BA0) = SCRIPT({ PlaySound(0x8000004B); spawn { SI_VAR(0) = 0; @@ -174,7 +174,7 @@ static s32 N(pad_CB4)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80240CC0) = SCRIPT({ +EvtSource N(80240CC0) = SCRIPT({ N(func_802400C0_BF4860)(); DemoJoystickXY(2, 0); sleep 1; @@ -241,7 +241,7 @@ Script N(80240CC0) = SCRIPT({ sleep 100; }); -Script N(802410AC) = SCRIPT({ +EvtSource N(802410AC) = SCRIPT({ sleep 10; loop { GetDemoState(SI_VAR(0)); @@ -258,7 +258,7 @@ Script N(802410AC) = SCRIPT({ sleep 35; }); -Script N(8024116C) = SCRIPT({ +EvtSource N(8024116C) = SCRIPT({ N(func_802400F4_BF4894)(); }); @@ -266,7 +266,7 @@ s32 N(D_80241188_BF5928) = { 0x00000000, }; -Script N(8024118C) = SCRIPT({ +EvtSource N(8024118C) = SCRIPT({ SetCamProperties(0, 90.0, 0, 0, 0, 470.0, 17.0, -7.0); N(func_8024019C_BF493C)(); SI_SAVE_FLAG(9) = 0; @@ -278,11 +278,11 @@ static s32 N(pad_11FC) = { 0x00000000, }; -Script N(80241200) = SCRIPT({ +EvtSource N(80241200) = SCRIPT({ }); -Script N(80241210) = SCRIPT({ +EvtSource N(80241210) = SCRIPT({ }); @@ -300,11 +300,11 @@ NpcSettings N(npcSettings_8024124C) = { .level = 13, }; -Script N(idle_80241278) = SCRIPT({ +EvtSource N(idle_80241278) = SCRIPT({ }); -Script N(init_80241288) = SCRIPT({ +EvtSource N(init_80241288) = SCRIPT({ if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WELL) { SetNpcPos(NPC_SELF, 0, -1000, 0); } else { @@ -312,7 +312,7 @@ Script N(init_80241288) = SCRIPT({ } }); -Script N(interact_802412E8) = SCRIPT({ +EvtSource N(interact_802412E8) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH5_WHALE_MOUTH_OPEN { SpeakToPlayer(NPC_SELF, NPC_ANIM(yakkey, Palette_00, Anim_2), NPC_ANIM(yakkey, Palette_00, Anim_1), 0, MESSAGE_ID(0x0E, 0x00BA)); @@ -332,7 +332,7 @@ Script N(interact_802412E8) = SCRIPT({ } }); -Script N(init_802413E8) = SCRIPT({ +EvtSource N(init_802413E8) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { SetNpcPos(NPC_SELF, 0, -1000, 0); } else { @@ -411,23 +411,23 @@ static s32 N(pad_184C) = { 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH3_WENT_DOWN_THE_WELL) { MakeEntity(0x802BCE84, 0, 30, 0, 0, MAKE_ENTITY_END); } }); -ApiStatus N(func_802400C0_BF4860)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802400C0_BF4860)(Evt* script, s32 isInitialCall) { gPlayerData.bootsLevel = 1; return ApiStatus_DONE2; } -ApiStatus N(func_802400D4_BF4874)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802400D4_BF4874)(Evt* script, s32 isInitialCall) { func_800EF300(); return ApiStatus_DONE2; } -ApiStatus N(func_802400F4_BF4894)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802400F4_BF4894)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; if (isInitialCall) { @@ -447,7 +447,7 @@ ApiStatus N(func_802400F4_BF4894)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_8024019C_BF493C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024019C_BF493C)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; s32* dataPtr = &N(D_80241188_BF5928); diff --git a/src/world/area_arn/arn_08/header.c b/src/world/area_arn/arn_08/header.c index be1ce59af7..ac73194674 100644 --- a/src/world/area_arn/arn_08/header.c +++ b/src/world/area_arn/arn_08/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { .tattle = { MSG_arn_08_tattle }, }; -Script N(80240300) = SCRIPT({ +EvtSource N(80240300) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); diff --git a/src/world/area_arn/arn_09/arn_09.h b/src/world/area_arn/arn_09/arn_09.h index eb2f85e546..c83537e49f 100644 --- a/src/world/area_arn/arn_09/arn_09.h +++ b/src/world/area_arn/arn_09/arn_09.h @@ -4,12 +4,12 @@ #define NAMESPACE arn_09 -ApiStatus func_802D2484(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_BF6060)(ScriptInstance *script, s32 isInitialCall); +ApiStatus func_802D2484(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240000_BF6060)(Evt *script, s32 isInitialCall); -extern Script N(main); -extern Script N(802400A0); +extern EvtSource N(main); +extern EvtSource N(802400A0); extern NpcGroupList N(npcGroupList_80240974); -extern Script N(makeEntities); -extern Script N(802404D0); +extern EvtSource N(makeEntities); +extern EvtSource N(802404D0); diff --git a/src/world/area_arn/arn_09/events.c b/src/world/area_arn/arn_09/events.c index 43fe44a135..5650026fbf 100644 --- a/src/world/area_arn/arn_09/events.c +++ b/src/world/area_arn/arn_09/events.c @@ -3,7 +3,7 @@ extern s32 D_000001E4; -Script N(80240140) = SCRIPT({ +EvtSource N(80240140) = SCRIPT({ group 27; DisablePlayerInput(TRUE); SI_VAR(0) = 0; @@ -17,11 +17,11 @@ Script N(80240140) = SCRIPT({ sleep 100; }); -Script N(802401F4) = SCRIPT({ +EvtSource N(802401F4) = SCRIPT({ bind N(80240140) TRIGGER_WALL_PRESS_A 5; }); -Script N(80240220) = SCRIPT({ +EvtSource N(80240220) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -37,7 +37,7 @@ Script N(80240220) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524288); SetCamPerspective(0, 3, 25, 16, 4096); @@ -55,7 +55,7 @@ static s32 N(pad_398)[] = { 0x00000000, 0x00000000, }; -Script N(802403A0) = SCRIPT({ +EvtSource N(802403A0) = SCRIPT({ if (SI_AREA_FLAG(1) == 1) { return; } @@ -72,7 +72,7 @@ Script N(802403A0) = SCRIPT({ DisablePlayerPhysics(FALSE); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAA30, 0, 0, 0, 0, MAKE_ENTITY_END); AssignScript(N(802403A0)); }); @@ -81,7 +81,7 @@ static s32 N(pad_4CC)[] = { 0x00000000, }; -Script N(802404D0) = SCRIPT({ +EvtSource N(802404D0) = SCRIPT({ if (SI_AREA_FLAG(1) == 0) { return; } @@ -101,11 +101,11 @@ static s32 N(pad_5A8)[] = { 0x00000000, 0x00000000, }; -Script N(802405B0) = SCRIPT({ +EvtSource N(802405B0) = SCRIPT({ }); -Script N(802405C0) = SCRIPT({ +EvtSource N(802405C0) = SCRIPT({ }); @@ -117,7 +117,7 @@ NpcSettings N(npcSettings_802405D0) = { .level = 13, }; -Script N(idle_802405FC) = SCRIPT({ +EvtSource N(idle_802405FC) = SCRIPT({ EnableNpcShadow(NPC_SELF, FALSE); SetNpcAnimation(NPC_SELF, NPC_ANIM(tubbas_heart, Palette_00, Anim_13)); SetNpcJumpscale(NPC_SELF, 2.5); @@ -133,7 +133,7 @@ Script N(idle_802405FC) = SCRIPT({ SI_STORY_PROGRESS = STORY_CH3_HEART_ESCAPED_WELL; }); -Script N(init_80240730) = SCRIPT({ +EvtSource N(init_80240730) = SCRIPT({ if (SI_STORY_PROGRESS != STORY_CH3_HEART_FLED_SECOND_TUNNEL) { RemoveNpc(NPC_SELF); } else { @@ -176,7 +176,7 @@ NpcGroupList N(npcGroupList_80240974) = { {}, }; -ApiStatus N(func_80240000_BF6060)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_BF6060)(Evt* script, s32 isInitialCall) { Entity* entity = get_entity_by_index(0); if (entity == NULL) { diff --git a/src/world/area_arn/arn_09/header.c b/src/world/area_arn/arn_09/header.c index fda6312302..4e23673bb5 100644 --- a/src/world/area_arn/arn_09/header.c +++ b/src/world/area_arn/arn_09/header.c @@ -13,7 +13,7 @@ MapConfig N(config) = { .tattle = { MSG_arn_09_tattle }, }; -Script N(802400A0) = SCRIPT({ +EvtSource N(802400A0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); diff --git a/src/world/area_arn/arn_10/arn_10.h b/src/world/area_arn/arn_10/arn_10.h index ac4928a10a..72da1952cc 100644 --- a/src/world/area_arn/arn_10/arn_10.h +++ b/src/world/area_arn/arn_10/arn_10.h @@ -4,7 +4,7 @@ #define NAMESPACE arn_10 -extern Script N(main); -extern Script N(80240060); +extern EvtSource N(main); +extern EvtSource N(80240060); extern NpcGroupList N(npcGroupList_80240BB8); -extern Script N(makeEntities); +extern EvtSource N(makeEntities); diff --git a/src/world/area_arn/arn_10/events.c b/src/world/area_arn/arn_10/events.c index 5fc17ee392..214d74b4ea 100644 --- a/src/world/area_arn/arn_10/events.c +++ b/src/world/area_arn/arn_10/events.c @@ -2,7 +2,7 @@ #include "sprite/npc/tubbas_heart.h" #include "sprite/npc/goomba.h" -Script N(exitSingleDoor_80240100) = SCRIPT({ +EvtSource N(exitSingleDoor_80240100) = SCRIPT({ group 27; DisablePlayerInput(TRUE); SI_VAR(0) = 0; @@ -15,7 +15,7 @@ Script N(exitSingleDoor_80240100) = SCRIPT({ sleep 100; }); -Script N(exitSingleDoor_802401A4) = SCRIPT({ +EvtSource N(exitSingleDoor_802401A4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); SI_VAR(0) = 1; @@ -28,12 +28,12 @@ Script N(exitSingleDoor_802401A4) = SCRIPT({ sleep 100; }); -Script N(80240248) = SCRIPT({ +EvtSource N(80240248) = SCRIPT({ bind N(exitSingleDoor_80240100) TRIGGER_WALL_PRESS_A 6; bind N(exitSingleDoor_802401A4) TRIGGER_WALL_PRESS_A 11; }); -Script N(enterSingleDoor_80240290) = SCRIPT({ +EvtSource N(enterSingleDoor_80240290) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -51,7 +51,7 @@ Script N(enterSingleDoor_80240290) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524289); SetCamPerspective(0, 3, 25, 16, 4096); @@ -69,11 +69,11 @@ static s32 N(pad_424)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80240430) = SCRIPT({ +EvtSource N(80240430) = SCRIPT({ }); -Script N(80240440) = SCRIPT({ +EvtSource N(80240440) = SCRIPT({ }); @@ -98,7 +98,7 @@ NpcAISettings N(npcAISettings_8024047C) = { .unk_2C = 1, }; -Script N(npcAI_802404AC) = SCRIPT({ +EvtSource N(npcAI_802404AC) = SCRIPT({ DoBasicAI(N(npcAISettings_8024047C)); }); @@ -111,7 +111,7 @@ NpcSettings N(npcSettings_802404CC) = { .level = 12, }; -Script N(idle_802404F8) = SCRIPT({ +EvtSource N(idle_802404F8) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM(tubbas_heart, Palette_00, Anim_13)); SetNpcJumpscale(NPC_SELF, 3.0); GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -137,19 +137,19 @@ Script N(idle_802404F8) = SCRIPT({ SI_STORY_PROGRESS = STORY_CH3_HEART_FLED_SECOND_TUNNEL; }); -Script N(defeat_802406F4) = SCRIPT({ +EvtSource N(defeat_802406F4) = SCRIPT({ SI_SAVE_FLAG(1016) = 1; DoNpcDefeat(); }); -Script N(init_80240720) = SCRIPT({ +EvtSource N(init_80240720) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_802404F8)); if (SI_STORY_PROGRESS != STORY_UNUSED_FFFFFFEC) { RemoveNpc(NPC_SELF); } }); -Script N(init_8024076C) = SCRIPT({ +EvtSource N(init_8024076C) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { if (SI_SAVE_FLAG(1016) == 1) { RemoveNpc(NPC_SELF); @@ -233,13 +233,13 @@ static s32 N(pad_BDC)[] = { 0x00000000, }; -Script N(80240BE0) = SCRIPT({ +EvtSource N(80240BE0) = SCRIPT({ DisablePlayerInput(TRUE); ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x0182), 160, 40); DisablePlayerInput(FALSE); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAFDC, 200, 0, -40, 0, MAKE_ENTITY_END); AssignScript(N(80240BE0)); }); diff --git a/src/world/area_arn/arn_10/header.c b/src/world/area_arn/arn_10/header.c index d8e564a85d..c6e9b8534c 100644 --- a/src/world/area_arn/arn_10/header.c +++ b/src/world/area_arn/arn_10/header.c @@ -13,7 +13,7 @@ MapConfig N(config) = { .tattle = { MSG_arn_10_tattle }, }; -Script N(80240060) = SCRIPT({ +EvtSource N(80240060) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); diff --git a/src/world/area_arn/arn_11/arn_11.h b/src/world/area_arn/arn_11/arn_11.h index f6e6e966db..af7d28ead3 100644 --- a/src/world/area_arn/arn_11/arn_11.h +++ b/src/world/area_arn/arn_11/arn_11.h @@ -4,6 +4,6 @@ #define NAMESPACE arn_11 -extern Script N(main); -extern Script N(80240050); +extern EvtSource N(main); +extern EvtSource N(80240050); extern NpcGroupList N(npcGroupList_802410DC); diff --git a/src/world/area_arn/arn_11/events.c b/src/world/area_arn/arn_11/events.c index b3e1a482cd..14e058eb3a 100644 --- a/src/world/area_arn/arn_11/events.c +++ b/src/world/area_arn/arn_11/events.c @@ -5,7 +5,7 @@ enum { NPC_TUBBAS_HEART, }; -Script N(802400F0) = SCRIPT({ +EvtSource N(802400F0) = SCRIPT({ SetCamType(0, 6, 1); SetCamSpeed(0, 3.0); UseSettingsFrom(0, 60, 30, 0); @@ -16,7 +16,7 @@ Script N(802400F0) = SCRIPT({ WaitForCam(0, 1.0); }); -Script N(802401BC) = SCRIPT({ +EvtSource N(802401BC) = SCRIPT({ DisablePlayerInput(TRUE); sleep 30; SetPlayerSpeed(3.0); @@ -51,7 +51,7 @@ Script N(802401BC) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(exitSingleDoor_80240428) = SCRIPT({ +EvtSource N(exitSingleDoor_80240428) = SCRIPT({ group 27; DisablePlayerInput(TRUE); SI_VAR(0) = 0; @@ -64,11 +64,11 @@ Script N(exitSingleDoor_80240428) = SCRIPT({ sleep 100; }); -Script N(802404CC) = SCRIPT({ +EvtSource N(802404CC) = SCRIPT({ bind N(exitSingleDoor_80240428) TRIGGER_WALL_PRESS_A 2; }); -Script N(enterSingleDoor_802404F8) = SCRIPT({ +EvtSource N(enterSingleDoor_802404F8) = SCRIPT({ DisablePlayerInput(TRUE); SI_VAR(2) = 0; SI_VAR(3) = -1; @@ -83,7 +83,7 @@ Script N(enterSingleDoor_802404F8) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524290); SetCamPerspective(0, 3, 25, 16, 4096); @@ -100,11 +100,11 @@ static s32 N(pad_674)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80240680) = SCRIPT({ +EvtSource N(80240680) = SCRIPT({ }); -Script N(80240690) = SCRIPT({ +EvtSource N(80240690) = SCRIPT({ }); @@ -116,7 +116,7 @@ NpcSettings N(npcSettings_802406A0) = { .level = 13, }; -Script N(idle_802406CC) = SCRIPT({ +EvtSource N(idle_802406CC) = SCRIPT({ loop { GetSelfVar(0, SI_VAR(0)); if (SI_VAR(0) != 0) { @@ -138,7 +138,7 @@ Script N(idle_802406CC) = SCRIPT({ StartBossBattle(11); }); -Script N(8024081C) = SCRIPT({ +EvtSource N(8024081C) = SCRIPT({ sleep 15; PlaySoundAtCollider(2, 449, 0); MakeLerp(0, 80, 10, 0); @@ -152,7 +152,7 @@ Script N(8024081C) = SCRIPT({ } }); -Script N(802408D8) = SCRIPT({ +EvtSource N(802408D8) = SCRIPT({ MakeLerp(80, 0, 10, 0); loop { UpdateLerp(); @@ -171,7 +171,7 @@ s32 N(intTable_80240988)[] = { 0x00000000, 0x00000000, 0xFFFFD8F0, 0x00000000, 0x00000000, }; -Script N(defeat_802409DC) = SCRIPT({ +EvtSource N(defeat_802409DC) = SCRIPT({ spawn { SetCamType(0, 6, 1); SetCamSpeed(0, 90.0); @@ -237,7 +237,7 @@ Script N(defeat_802409DC) = SCRIPT({ SI_STORY_PROGRESS = STORY_CH3_HEART_FLED_FIRST_TUNNEL; }); -Script N(init_80240E70) = SCRIPT({ +EvtSource N(init_80240E70) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH3_HEART_FLED_FIRST_TUNNEL) { RemoveNpc(NPC_SELF); } else { diff --git a/src/world/area_arn/arn_11/header.c b/src/world/area_arn/arn_11/header.c index cd339d4c3b..c1e4feffaa 100644 --- a/src/world/area_arn/arn_11/header.c +++ b/src/world/area_arn/arn_11/header.c @@ -12,7 +12,7 @@ MapConfig N(config) = { .tattle = { MSG_arn_11_tattle }, }; -Script N(80240050) = SCRIPT({ +EvtSource N(80240050) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_WENT_DOWN_THE_WELL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); diff --git a/src/world/area_arn/arn_12/arn_12.h b/src/world/area_arn/arn_12/arn_12.h index 2b35b3ca49..38877c45ee 100644 --- a/src/world/area_arn/arn_12/arn_12.h +++ b/src/world/area_arn/arn_12/arn_12.h @@ -4,7 +4,7 @@ #define NAMESPACE arn_12 -extern Script N(main); -extern Script N(80240060); +extern EvtSource N(main); +extern EvtSource N(80240060); extern NpcGroupList N(npcGroupList_80240BBC); -extern Script N(makeEntities); +extern EvtSource N(makeEntities); diff --git a/src/world/area_arn/arn_12/events.c b/src/world/area_arn/arn_12/events.c index 99e3568f2f..49ca9791d5 100644 --- a/src/world/area_arn/arn_12/events.c +++ b/src/world/area_arn/arn_12/events.c @@ -2,7 +2,7 @@ #include "sprite/npc/tubbas_heart.h" #include "sprite/npc/goomba.h" -Script N(exitSingleDoor_80240100) = SCRIPT({ +EvtSource N(exitSingleDoor_80240100) = SCRIPT({ group 27; DisablePlayerInput(TRUE); SI_VAR(0) = 0; @@ -15,7 +15,7 @@ Script N(exitSingleDoor_80240100) = SCRIPT({ sleep 100; }); -Script N(exitSingleDoor_802401A4) = SCRIPT({ +EvtSource N(exitSingleDoor_802401A4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); SI_VAR(0) = 1; @@ -28,12 +28,12 @@ Script N(exitSingleDoor_802401A4) = SCRIPT({ sleep 100; }); -Script N(80240248) = SCRIPT({ +EvtSource N(80240248) = SCRIPT({ bind N(exitSingleDoor_80240100) TRIGGER_WALL_PRESS_A 2; bind N(exitSingleDoor_802401A4) TRIGGER_WALL_PRESS_A 7; }); -Script N(enterSingleDoor_80240290) = SCRIPT({ +EvtSource N(enterSingleDoor_80240290) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -51,7 +51,7 @@ Script N(enterSingleDoor_80240290) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524291); SetCamPerspective(0, 3, 25, 16, 4096); @@ -68,11 +68,11 @@ static s32 N(pad_418)[] = { 0x00000000, 0x00000000, }; -Script N(80240420) = SCRIPT({ +EvtSource N(80240420) = SCRIPT({ }); -Script N(80240430) = SCRIPT({ +EvtSource N(80240430) = SCRIPT({ }); @@ -97,7 +97,7 @@ NpcAISettings N(npcAISettings_8024046C) = { .unk_2C = 1, }; -Script N(npcAI_8024049C) = SCRIPT({ +EvtSource N(npcAI_8024049C) = SCRIPT({ DoBasicAI(N(npcAISettings_8024046C)); }); @@ -110,7 +110,7 @@ NpcSettings N(npcSettings_802404BC) = { .level = 12, }; -Script N(idle_802404E8) = SCRIPT({ +EvtSource N(idle_802404E8) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM(tubbas_heart, Palette_00, Anim_13)); SetNpcJumpscale(NPC_SELF, 3.0); GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -136,19 +136,19 @@ Script N(idle_802404E8) = SCRIPT({ SI_STORY_PROGRESS = STORY_UNUSED_FFFFFFEC; }); -Script N(defeat_802406E4) = SCRIPT({ +EvtSource N(defeat_802406E4) = SCRIPT({ SI_SAVE_FLAG(1017) = 1; DoNpcDefeat(); }); -Script N(init_80240710) = SCRIPT({ +EvtSource N(init_80240710) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_802404E8)); if (SI_STORY_PROGRESS != STORY_UNUSED_FFFFFFEB) { RemoveNpc(NPC_SELF); } }); -Script N(init_8024075C) = SCRIPT({ +EvtSource N(init_8024075C) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { if (SI_SAVE_FLAG(1017) == 1) { RemoveNpc(NPC_SELF); @@ -229,13 +229,13 @@ NpcGroupList N(npcGroupList_80240BBC) = { {}, }; -Script N(80240BE0) = SCRIPT({ +EvtSource N(80240BE0) = SCRIPT({ DisablePlayerInput(TRUE); ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x0183), 160, 40); DisablePlayerInput(FALSE); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAFDC, 200, 0, -40, 0, MAKE_ENTITY_END); AssignScript(N(80240BE0)); }); diff --git a/src/world/area_arn/arn_12/header.c b/src/world/area_arn/arn_12/header.c index a26bbfd663..318dee4233 100644 --- a/src/world/area_arn/arn_12/header.c +++ b/src/world/area_arn/arn_12/header.c @@ -13,7 +13,7 @@ MapConfig N(config) = { .tattle = { MSG_arn_12_tattle }, }; -Script N(80240060) = SCRIPT({ +EvtSource N(80240060) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); diff --git a/src/world/area_arn/arn_13/arn_13.h b/src/world/area_arn/arn_13/arn_13.h index e7a29f6329..9c33d4c4e2 100644 --- a/src/world/area_arn/arn_13/arn_13.h +++ b/src/world/area_arn/arn_13/arn_13.h @@ -4,7 +4,7 @@ #define NAMESPACE arn_13 -extern Script N(main); -extern Script N(80240060); +extern EvtSource N(main); +extern EvtSource N(80240060); extern NpcGroupList N(npcGroupList_80240BCC); -extern Script N(makeEntities); +extern EvtSource N(makeEntities); diff --git a/src/world/area_arn/arn_13/events.c b/src/world/area_arn/arn_13/events.c index b087e4ffb0..4f016c7feb 100644 --- a/src/world/area_arn/arn_13/events.c +++ b/src/world/area_arn/arn_13/events.c @@ -2,7 +2,7 @@ #include "sprite/npc/goomba.h" #include "sprite/npc/tubbas_heart.h" -Script N(exitSingleDoor_80240100) = SCRIPT({ +EvtSource N(exitSingleDoor_80240100) = SCRIPT({ group 27; DisablePlayerInput(TRUE); SI_VAR(0) = 0; @@ -15,7 +15,7 @@ Script N(exitSingleDoor_80240100) = SCRIPT({ sleep 100; }); -Script N(exitSingleDoor_802401A4) = SCRIPT({ +EvtSource N(exitSingleDoor_802401A4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); SI_VAR(0) = 1; @@ -28,12 +28,12 @@ Script N(exitSingleDoor_802401A4) = SCRIPT({ sleep 100; }); -Script N(80240248) = SCRIPT({ +EvtSource N(80240248) = SCRIPT({ bind N(exitSingleDoor_80240100) TRIGGER_WALL_PRESS_A 2; bind N(exitSingleDoor_802401A4) TRIGGER_WALL_PRESS_A 7; }); -Script N(enterSingleDoor_80240290) = SCRIPT({ +EvtSource N(enterSingleDoor_80240290) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -51,7 +51,7 @@ Script N(enterSingleDoor_80240290) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524292); SetCamPerspective(0, 3, 25, 16, 4096); @@ -69,11 +69,11 @@ static s32 N(pad_424)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80240430) = SCRIPT({ +EvtSource N(80240430) = SCRIPT({ }); -Script N(80240440) = SCRIPT({ +EvtSource N(80240440) = SCRIPT({ }); @@ -98,7 +98,7 @@ NpcAISettings N(npcAISettings_8024047C) = { .unk_2C = 1, }; -Script N(npcAI_802404AC) = SCRIPT({ +EvtSource N(npcAI_802404AC) = SCRIPT({ DoBasicAI(N(npcAISettings_8024047C)); }); @@ -111,7 +111,7 @@ NpcSettings N(npcSettings_802404CC) = { .level = 12, }; -Script N(idle_802404F8) = SCRIPT({ +EvtSource N(idle_802404F8) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM(tubbas_heart, Palette_00, Anim_13)); SetNpcJumpscale(NPC_SELF, 3.0); GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -137,19 +137,19 @@ Script N(idle_802404F8) = SCRIPT({ SI_STORY_PROGRESS = STORY_CH3_HEART_FLED_SECOND_TUNNEL; }); -Script N(defeat_802406F4) = SCRIPT({ +EvtSource N(defeat_802406F4) = SCRIPT({ SI_SAVE_FLAG(1018) = 1; DoNpcDefeat(); }); -Script N(init_80240720) = SCRIPT({ +EvtSource N(init_80240720) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_802404F8)); if (SI_STORY_PROGRESS != STORY_CH3_HEART_FLED_FIRST_TUNNEL) { RemoveNpc(NPC_SELF); } }); -Script N(init_8024076C) = SCRIPT({ +EvtSource N(init_8024076C) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { if (SI_SAVE_FLAG(1018) == 1) { RemoveNpc(NPC_SELF); @@ -230,13 +230,13 @@ NpcGroupList N(npcGroupList_80240BCC) = { {}, }; -Script N(80240BF0) = SCRIPT({ +EvtSource N(80240BF0) = SCRIPT({ DisablePlayerInput(TRUE); ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x0184), 160, 40); DisablePlayerInput(FALSE); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAFDC, 200, 0, -40, 0, MAKE_ENTITY_END); AssignScript(N(80240BF0)); }); diff --git a/src/world/area_arn/arn_13/header.c b/src/world/area_arn/arn_13/header.c index 7e29fc2a01..c238cbfdb5 100644 --- a/src/world/area_arn/arn_13/header.c +++ b/src/world/area_arn/arn_13/header.c @@ -13,7 +13,7 @@ MapConfig N(config) = { .tattle = { MSG_arn_13_tattle }, }; -Script N(80240060) = SCRIPT({ +EvtSource N(80240060) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); diff --git a/src/world/area_dgb/dgb_00/BFA0A0.c b/src/world/area_dgb/dgb_00/BFA0A0.c index 4d9cd65084..6ddcc8c035 100644 --- a/src/world/area_dgb/dgb_00/BFA0A0.c +++ b/src/world/area_dgb/dgb_00/BFA0A0.c @@ -1,7 +1,7 @@ #include "dgb_00.h" #include "message_ids.h" -ApiStatus N(func_80240000_BFA0A0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_BFA0A0)(Evt* script, s32 isInitialCall) { sprintf(&wMapShapeName, "arn_20_shape"); sprintf(&wMapHitName, "arn_20_hit"); sprintf(&wMapTexName, "arn_tex"); @@ -21,7 +21,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_00_tattle }, }; -Script N(80240110) = SCRIPT({ +EvtSource N(80240110) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); @@ -39,9 +39,9 @@ static s32 N(pad_1B8)[] = { 0x00000000, 0x00000000, }; -Script N(exitWalk_802401C0) = EXIT_WALK_SCRIPT(60, 0, "arn_04", 1); +EvtSource N(exitWalk_802401C0) = EXIT_WALK_SCRIPT(60, 0, "arn_04", 1); -Script N(exitDoubleDoor_8024021C) = SCRIPT({ +EvtSource N(exitDoubleDoor_8024021C) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -55,7 +55,7 @@ Script N(exitDoubleDoor_8024021C) = SCRIPT({ sleep 100; }); -Script N(802402D0) = SCRIPT({ +EvtSource N(802402D0) = SCRIPT({ bind N(exitWalk_802401C0) TRIGGER_FLOOR_ABOVE 15; match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_SMASHED_THE_BRIDGES { @@ -71,7 +71,7 @@ Script N(802402D0) = SCRIPT({ } }); -Script N(enterDoubleDoor_8024038C) = SCRIPT({ +EvtSource N(enterDoubleDoor_8024038C) = SCRIPT({ GetLoadType(SI_VAR(1)); if (SI_VAR(1) == 1) { spawn EnterSavePoint; @@ -109,7 +109,7 @@ Script N(enterDoubleDoor_8024038C) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SI_SAVE_FLAG(1978) = 1; SetSpriteShading(-1); diff --git a/src/world/area_dgb/dgb_00/BFA100.c b/src/world/area_dgb/dgb_00/BFA100.c index 8ac3d67090..7bd6a410fd 100644 --- a/src/world/area_dgb/dgb_00/BFA100.c +++ b/src/world/area_dgb/dgb_00/BFA100.c @@ -29,7 +29,7 @@ NpcSettings N(npcSettings_8024066C) = { .level = 99, }; -Script N(80240698) = SCRIPT({ +EvtSource N(80240698) = SCRIPT({ SI_VAR(3) = 0; SI_VAR(3) -= SI_VAR(2); ModifyColliderFlags(0, 18, 0x7FFFFE00); @@ -45,7 +45,7 @@ Script N(80240698) = SCRIPT({ } }); -Script N(8024079C) = SCRIPT({ +EvtSource N(8024079C) = SCRIPT({ SI_VAR(3) = 0; SI_VAR(3) -= SI_VAR(2); MakeLerp(80, 0, 12, 0); @@ -61,43 +61,43 @@ Script N(8024079C) = SCRIPT({ PlaySoundAtCollider(18, 456, 0); }); -Script N(802408A0) = SCRIPT({ +EvtSource N(802408A0) = SCRIPT({ GetNpcPos(NPC_BOO0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 200; NpcMoveTo(NPC_BOO0, SI_VAR(0), SI_VAR(2), 46); }); -Script N(802408F8) = SCRIPT({ +EvtSource N(802408F8) = SCRIPT({ GetNpcPos(NPC_BOO1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 200; NpcMoveTo(NPC_BOO1, SI_VAR(0), SI_VAR(2), 50); }); -Script N(80240950) = SCRIPT({ +EvtSource N(80240950) = SCRIPT({ GetNpcPos(NPC_BOO2, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 200; NpcMoveTo(NPC_BOO2, SI_VAR(0), SI_VAR(2), 53); }); -Script N(802409A8) = SCRIPT({ +EvtSource N(802409A8) = SCRIPT({ GetNpcPos(NPC_BOO3, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 200; NpcMoveTo(NPC_BOO3, SI_VAR(0), SI_VAR(2), 46); }); -Script N(80240A00) = SCRIPT({ +EvtSource N(80240A00) = SCRIPT({ GetNpcPos(NPC_BOO4, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 200; NpcMoveTo(NPC_BOO4, SI_VAR(0), SI_VAR(2), 50); }); -Script N(80240A58) = SCRIPT({ +EvtSource N(80240A58) = SCRIPT({ GetNpcPos(NPC_BOO5, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 200; NpcMoveTo(NPC_BOO5, SI_VAR(0), SI_VAR(2), 53); }); -Script N(80240AB0) = SCRIPT({ +EvtSource N(80240AB0) = SCRIPT({ spawn N(802408A0); spawn N(802408F8); spawn N(80240950); @@ -106,49 +106,49 @@ Script N(80240AB0) = SCRIPT({ spawn N(80240A58); }); -Script N(80240B08) = SCRIPT({ +EvtSource N(80240B08) = SCRIPT({ SetNpcJumpscale(NPC_BOO0, -0.19921875); NpcJump0(NPC_BOO0, 257, 30, -90, 5); EnableNpcShadow(NPC_BOO0, FALSE); SetNpcAnimation(NPC_BOO0, NPC_ANIM(boo, Palette_01, Anim_6)); }); -Script N(80240B74) = SCRIPT({ +EvtSource N(80240B74) = SCRIPT({ SetNpcJumpscale(NPC_BOO1, -0.2998046875); NpcJump0(NPC_BOO1, 272, 112, -81, 12); EnableNpcShadow(NPC_BOO1, FALSE); SetNpcAnimation(NPC_BOO1, NPC_ANIM(boo, Palette_01, Anim_6)); }); -Script N(80240BE0) = SCRIPT({ +EvtSource N(80240BE0) = SCRIPT({ SetNpcJumpscale(NPC_BOO2, -0.3994140625); NpcJump0(NPC_BOO2, 237, 120, -118, 10); EnableNpcShadow(NPC_BOO2, FALSE); SetNpcAnimation(NPC_BOO2, NPC_ANIM(boo, Palette_01, Anim_6)); }); -Script N(80240C4C) = SCRIPT({ +EvtSource N(80240C4C) = SCRIPT({ SetNpcJumpscale(NPC_BOO3, -0.2998046875); NpcJump0(NPC_BOO3, 280, 60, -79, 8); EnableNpcShadow(NPC_BOO3, FALSE); SetNpcAnimation(NPC_BOO3, NPC_ANIM(boo, Palette_01, Anim_6)); }); -Script N(80240CB8) = SCRIPT({ +EvtSource N(80240CB8) = SCRIPT({ SetNpcJumpscale(NPC_BOO4, -0.3994140625); NpcJump0(NPC_BOO4, 250, 81, -97, 9); EnableNpcShadow(NPC_BOO4, FALSE); SetNpcAnimation(NPC_BOO4, NPC_ANIM(boo, Palette_01, Anim_6)); }); -Script N(80240D24) = SCRIPT({ +EvtSource N(80240D24) = SCRIPT({ SetNpcJumpscale(NPC_BOO5, -0.5); NpcJump0(NPC_BOO5, 227, 43, -123, 15); EnableNpcShadow(NPC_BOO5, FALSE); SetNpcAnimation(NPC_BOO5, NPC_ANIM(boo, Palette_01, Anim_6)); }); -Script N(80240D90) = SCRIPT({ +EvtSource N(80240D90) = SCRIPT({ spawn N(80240B74); spawn N(80240BE0); spawn N(80240C4C); @@ -156,7 +156,7 @@ Script N(80240D90) = SCRIPT({ spawn N(80240D24); }); -Script N(80240DDC) = SCRIPT({ +EvtSource N(80240DDC) = SCRIPT({ GetNpcPos(NPC_BOO0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); loop { RandInt(5, SI_VAR(10)); @@ -181,7 +181,7 @@ Script N(80240DDC) = SCRIPT({ } }); -Script N(80240F50) = SCRIPT({ +EvtSource N(80240F50) = SCRIPT({ group 239; loop { RandInt(50, SI_VAR(0)); @@ -197,7 +197,7 @@ Script N(80240F50) = SCRIPT({ } }); -Script N(8024103C) = SCRIPT({ +EvtSource N(8024103C) = SCRIPT({ DisablePlayerInput(TRUE); DisablePartnerAI(0); SetPlayerPos(350, 10, -150); @@ -241,7 +241,7 @@ Script N(8024103C) = SCRIPT({ await N(80240698); }); -Script N(802413F4) = SCRIPT({ +EvtSource N(802413F4) = SCRIPT({ SetPlayerSpeed(8.0); PlayerMoveTo(184, -44, 0); PlaySoundAtNpc(NPC_BOO0, SOUND_UNKNOWN_262, 0); @@ -323,7 +323,7 @@ Script N(802413F4) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80241AA0) = SCRIPT({ +EvtSource N(80241AA0) = SCRIPT({ SetNpcPos(NPC_BOO0, 246, 30, -110); SetNpcPos(NPC_BOO1, 276, 120, -80); SetNpcPos(NPC_BOO2, 216, 120, -140); @@ -350,7 +350,7 @@ Script N(80241AA0) = SCRIPT({ EnableNpcShadow(NPC_BOO5, FALSE); }); -Script N(interact_80241CD8) = SCRIPT({ +EvtSource N(interact_80241CD8) = SCRIPT({ SI_MAP_VAR(0) = 1; SpeakToPlayer(NPC_BOO0, NPC_ANIM(boo, Palette_01, Anim_6), NPC_ANIM(boo, Palette_01, Anim_6), 5, MESSAGE_ID(0x0E, 0x00E9)); SetNpcAnimation(NPC_BOO0, NPC_ANIM(boo, Palette_01, Anim_6)); @@ -387,27 +387,27 @@ Script N(interact_80241CD8) = SCRIPT({ SI_MAP_VAR(0) = 0; }); -Script N(init_80241F70) = SCRIPT({ +EvtSource N(init_80241F70) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241CD8)); }); -Script N(init_80241F94) = SCRIPT({ +EvtSource N(init_80241F94) = SCRIPT({ }); -Script N(init_80241FA4) = SCRIPT({ +EvtSource N(init_80241FA4) = SCRIPT({ }); -Script N(init_80241FB4) = SCRIPT({ +EvtSource N(init_80241FB4) = SCRIPT({ }); -Script N(init_80241FC4) = SCRIPT({ +EvtSource N(init_80241FC4) = SCRIPT({ }); -Script N(init_80241FD4) = SCRIPT({ +EvtSource N(init_80241FD4) = SCRIPT({ }); @@ -592,7 +592,7 @@ StaticNpc N(npcGroup_80242994) = { }, }; -Script N(80242B84) = SCRIPT({ +EvtSource N(80242B84) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); DisablePartnerAI(0); @@ -739,7 +739,7 @@ Script N(80242B84) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(init_802434EC) = SCRIPT({ +EvtSource N(init_802434EC) = SCRIPT({ }); @@ -792,11 +792,11 @@ static s32 N(pad_3758)[] = { 0x00000000, 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802E9A18, -65, 60, -240, 0, MAKE_ENTITY_END); }); -ApiStatus N(func_80240060_BFA100)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240060_BFA100)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(get_enemy(6)->npcID); sfx_adjust_env_sound_pos(0x32E, 0, npc->pos.x, npc->pos.y, npc->pos.z); diff --git a/src/world/area_dgb/dgb_00/dgb_00.h b/src/world/area_dgb/dgb_00/dgb_00.h index 5b685df960..13bb494d68 100644 --- a/src/world/area_dgb/dgb_00/dgb_00.h +++ b/src/world/area_dgb/dgb_00/dgb_00.h @@ -3,14 +3,14 @@ #define NAMESPACE dgb_00 -ApiStatus N(func_80240060_BFA100)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80240060_BFA100)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_802436EC); extern NpcGroupList N(npcGroupList_80243740); -extern Script N(80240F50); -extern Script N(8024103C); -extern Script N(802413F4); -extern Script N(80241AA0); -extern Script N(80242B84); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(80240F50); +extern EvtSource N(8024103C); +extern EvtSource N(802413F4); +extern EvtSource N(80241AA0); +extern EvtSource N(80242B84); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_01/BFD9A0.c b/src/world/area_dgb/dgb_01/BFD9A0.c index e31f818bd7..b45231f370 100644 --- a/src/world/area_dgb/dgb_01/BFD9A0.c +++ b/src/world/area_dgb/dgb_01/BFD9A0.c @@ -20,7 +20,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_01_tattle }, }; -Script N(802434A0) = SCRIPT({ +EvtSource N(802434A0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -38,7 +38,7 @@ static s32 N(pad_3548)[] = { 0x00000000, 0x00000000, }; -Script N(exitDoubleDoor_80243550) = SCRIPT({ +EvtSource N(exitDoubleDoor_80243550) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -52,7 +52,7 @@ Script N(exitDoubleDoor_80243550) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_80243604) = SCRIPT({ +EvtSource N(exitDoubleDoor_80243604) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -66,7 +66,7 @@ Script N(exitDoubleDoor_80243604) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_802436B8) = SCRIPT({ +EvtSource N(exitDoubleDoor_802436B8) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -80,7 +80,7 @@ Script N(exitDoubleDoor_802436B8) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_8024376C) = SCRIPT({ +EvtSource N(exitDoubleDoor_8024376C) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -94,7 +94,7 @@ Script N(exitDoubleDoor_8024376C) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_80243820) = SCRIPT({ +EvtSource N(exitDoubleDoor_80243820) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -108,7 +108,7 @@ Script N(exitDoubleDoor_80243820) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_802438D4) = SCRIPT({ +EvtSource N(exitDoubleDoor_802438D4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -122,7 +122,7 @@ Script N(exitDoubleDoor_802438D4) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_80243988) = SCRIPT({ +EvtSource N(exitDoubleDoor_80243988) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -136,7 +136,7 @@ Script N(exitDoubleDoor_80243988) = SCRIPT({ sleep 100; }); -Script N(enterDoubleDoor_80243A3C) = SCRIPT({ +EvtSource N(enterDoubleDoor_80243A3C) = SCRIPT({ UseDoorSounds(3); GetEntryID(SI_VAR(0)); match SI_VAR(0) { @@ -187,7 +187,7 @@ s32 N(itemList_80243C40)[] = { ITEM_NONE, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -235,7 +235,7 @@ static s32 N(pad_3EE4)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80243EF0) = SCRIPT({ +EvtSource N(80243EF0) = SCRIPT({ loop { GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); if (SI_VAR(0) < 100) { @@ -403,7 +403,7 @@ Script N(80243EF0) = SCRIPT({ spawn N(exitDoubleDoor_80243820); }); -Script N(802449C4) = SCRIPT({ +EvtSource N(802449C4) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetGroupEnabled(210, 0); @@ -424,7 +424,7 @@ Script N(802449C4) = SCRIPT({ } }); -Script N(80244AD0) = SCRIPT({ +EvtSource N(80244AD0) = SCRIPT({ group 0; suspend group 1; ShowKeyChoicePopup(); @@ -451,11 +451,11 @@ Script N(80244AD0) = SCRIPT({ unbind; }); -Script N(80244C38) = SCRIPT({ +EvtSource N(80244C38) = SCRIPT({ bind N(exitDoubleDoor_802436B8) TRIGGER_WALL_PRESS_A 20; }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ if (SI_SAVE_FLAG(1040) == 0) { MakeEntity(0x802BCD68, 490, 8, 0, -80, MAKE_ENTITY_END); AssignScript(N(80244C38)); @@ -468,7 +468,7 @@ f32 N(D_80244CD0_C02550)[] = { 1.5f, 20.0f, }; -Script N(80244CE8) = SCRIPT({ +EvtSource N(80244CE8) = SCRIPT({ SetSelfEnemyFlagBits(((0x00100000 | 0x01000000 | 0x02000000 | 0x04000000 | 0x08000000 | 0x10000000 | 0x20000000)), TRUE); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT)), TRUE); }); @@ -490,7 +490,7 @@ NpcAISettings N(npcAISettings_80244D24) = { #ifdef NON_MATCHING // second npc_raycast_down_sides call -void N(func_802402D0_BFDB50)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802402D0_BFDB50)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -629,7 +629,7 @@ void N(func_802402D0_BFDB50)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(void, "world/area_dgb/dgb_01/BFD9A0", dgb_01_func_802402D0_BFDB50, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_dgb/dgb_01/BFD9A0", dgb_01_func_802402D0_BFDB50, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -639,7 +639,7 @@ INCLUDE_ASM(void, "world/area_dgb/dgb_01/BFD9A0", dgb_01_func_802402D0_BFDB50, S #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_80240D74_BFE5F4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240D74_BFE5F4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -657,7 +657,7 @@ void N(func_80240D74_BFE5F4)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_8024142C_BFECAC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024142C_BFECAC)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -717,7 +717,7 @@ ApiStatus N(func_8024142C_BFECAC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -void N(func_80241618_BFEE98)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241618_BFEE98)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f0; @@ -744,7 +744,7 @@ void N(func_80241618_BFEE98)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241770_BFEFF0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241770_BFEFF0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -767,7 +767,7 @@ void N(func_80241770_BFEFF0)(ScriptInstance* script, NpcAISettings* aiSettings, } -void N(func_80241874_BFF0F4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241874_BFF0F4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 i; @@ -790,7 +790,7 @@ void N(func_80241874_BFF0F4)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 15; } -void N(func_80241954_BFF1D4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241954_BFF1D4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; @@ -834,7 +834,7 @@ void N(func_80241954_BFF1D4)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241BF0_BFF470)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241BF0_BFF470)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -849,7 +849,7 @@ void N(func_80241BF0_BFF470)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 17; } -void N(func_80241CA8_BFF528)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241CA8_BFF528)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; @@ -872,7 +872,7 @@ void N(func_80241CA8_BFF528)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241E28_BFF6A8)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241E28_BFF6A8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -882,7 +882,7 @@ void N(func_80241E28_BFF6A8)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241E70_BFF6F0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241E70_BFF6F0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -899,7 +899,7 @@ void N(func_80241E70_BFF6F0)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241EF0_BFF770)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241EF0_BFF770)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -911,7 +911,7 @@ void N(func_80241EF0_BFF770)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1] = 0x1E; } -void N(func_80241F98_BFF818)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241F98_BFF818)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX = npc->pos.x; @@ -955,7 +955,7 @@ void N(func_80241F98_BFF818)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_802422B0_BFFB30)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802422B0_BFFB30)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -1033,7 +1033,7 @@ ApiStatus N(func_802422B0_BFFB30)(ScriptInstance* script, s32 isInitialCall) { const char N(dgb_00_name_hack)[]; -Script N(npcAI_80244D54) = SCRIPT({ +EvtSource N(npcAI_80244D54) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(5, -650); SetSelfVar(6, 30); @@ -1092,7 +1092,7 @@ Script N(npcAI_80244D54) = SCRIPT({ sleep 100; }); -Script N(8024517C) = SCRIPT({ +EvtSource N(8024517C) = SCRIPT({ GetOwnerEncounterTrigger(SI_VAR(0)); match SI_VAR(0) { == 1, 2, 4, 6 { @@ -1102,7 +1102,7 @@ Script N(8024517C) = SCRIPT({ } }); -Script N(80245208) = SCRIPT({ +EvtSource N(80245208) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -1135,7 +1135,7 @@ NpcAISettings N(npcAISettings_80245298) = { .unk_2C = 1, }; -Script N(npcAI_802452C8) = SCRIPT({ +EvtSource N(npcAI_802452C8) = SCRIPT({ N(func_802430C0_C00940)(N(npcAISettings_80245298)); }); @@ -1162,7 +1162,7 @@ NpcSettings N(npcSettings_80245340) = { .level = 13, }; -Script N(idle_8024536C) = SCRIPT({ +EvtSource N(idle_8024536C) = SCRIPT({ loop { GetSelfVar(0, SI_VAR(0)); if (SI_VAR(0) == 1) { @@ -1224,7 +1224,7 @@ Script N(idle_8024536C) = SCRIPT({ SetSelfVar(0, 3); }); -Script N(init_80245784) = SCRIPT({ +EvtSource N(init_80245784) = SCRIPT({ SetNpcScale(NPC_SELF, 1.25, 1.25, 1.25); SetSelfVar(0, 0); BindNpcIdle(NPC_SELF, N(idle_8024536C)); @@ -1254,7 +1254,7 @@ const char N(dgb_00_name_hack)[] = "dgb_00"; #include "world/common/UnkFunc16.inc.c" -ApiStatus N(func_802430C0_C00940)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802430C0_C00940)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -1344,13 +1344,13 @@ ApiStatus N(func_802430C0_C00940)(ScriptInstance* script, s32 isInitialCall) { const char N(dgb_08_name_hack)[]; -Script N(defeat_802457D8) = SCRIPT({ +EvtSource N(defeat_802457D8) = SCRIPT({ N(UnkFunc1)(); GotoMap(N(dgb_08_name_hack), 1); sleep 100; }); -Script N(init_80245814) = SCRIPT({ +EvtSource N(init_80245814) = SCRIPT({ if (SI_SAVE_VAR(203) != 1) { SetNpcPos(NPC_SELF, 0, -1000, 0); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_4)), TRUE); @@ -1374,7 +1374,7 @@ Script N(init_80245814) = SCRIPT({ } }); -Script N(idle_8024598C) = SCRIPT({ +EvtSource N(idle_8024598C) = SCRIPT({ AwaitPlayerApproach(0, 420, 400); SI_SAVE_VAR(203) = 1; SI_STORY_PROGRESS = STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER; @@ -1422,13 +1422,13 @@ Script N(idle_8024598C) = SCRIPT({ N(func_802430C0_C00940)(N(npcAISettings_80245298)); }); -Script N(defeat_80245CB4) = SCRIPT({ +EvtSource N(defeat_80245CB4) = SCRIPT({ N(UnkFunc1)(); GotoMap(N(dgb_00_name_hack), 1); sleep 100; }); -Script N(init_80245CF0) = SCRIPT({ +EvtSource N(init_80245CF0) = SCRIPT({ if (SI_SAVE_VAR(203) != 1) { BindNpcIdle(NPC_SELF, N(idle_8024598C)); } else { @@ -1438,7 +1438,7 @@ Script N(init_80245CF0) = SCRIPT({ SetNpcScale(NPC_SELF, 1.25, 1.25, 1.25); }); -Script N(init_80245D80) = SCRIPT({ +EvtSource N(init_80245D80) = SCRIPT({ SI_VAR(0) = SI_STORY_PROGRESS; if (SI_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); @@ -1450,7 +1450,7 @@ Script N(init_80245D80) = SCRIPT({ } }); -Script N(init_80245E44) = SCRIPT({ +EvtSource N(init_80245E44) = SCRIPT({ SI_VAR(0) = SI_STORY_PROGRESS; if (SI_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); @@ -1462,7 +1462,7 @@ Script N(init_80245E44) = SCRIPT({ } }); -Script N(init_80245F08) = SCRIPT({ +EvtSource N(init_80245F08) = SCRIPT({ SI_VAR(0) = SI_STORY_PROGRESS; if (SI_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); @@ -1474,7 +1474,7 @@ Script N(init_80245F08) = SCRIPT({ } }); -Script N(init_80245FCC) = SCRIPT({ +EvtSource N(init_80245FCC) = SCRIPT({ SI_VAR(0) = SI_STORY_PROGRESS; if (SI_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); diff --git a/src/world/area_dgb/dgb_01/dgb_01.h b/src/world/area_dgb/dgb_01/dgb_01.h index c6bf72747c..76fe81d7aa 100644 --- a/src/world/area_dgb/dgb_01/dgb_01.h +++ b/src/world/area_dgb/dgb_01/dgb_01.h @@ -11,23 +11,23 @@ enum { NPC_WORLD_TUBBA, }; -ApiStatus InitAnimatedModels(ScriptInstance* script, s32 isInitialCall); -ApiStatus SetAnimatedModelRenderMode(ScriptInstance* script, s32 isInitialCall); -ApiStatus DeleteAnimatedModel(ScriptInstance* script, s32 isInitialCall); +ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall); +ApiStatus SetAnimatedModelRenderMode(Evt* script, s32 isInitialCall); +ApiStatus DeleteAnimatedModel(Evt* script, s32 isInitialCall); ApiStatus N(func_80240000_BFD880)(void); -ApiStatus N(GetEntityPosition)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SetEntityFlags100000)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc1)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802422B0_BFFB30)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802430C0_C00940)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(GetEntityPosition)(Evt* script, s32 isInitialCall); +ApiStatus N(SetEntityFlags100000)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc1)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802422B0_BFFB30)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802430C0_C00940)(Evt* script, s32 isInitialCall); -extern Script N(802449C4); -extern Script N(80244AD0); -extern Script N(main); -extern Script N(makeEntities); -extern Script N(D_80252F4C_C107CC); -extern Script N(D_802539A0_C11220); +extern EvtSource N(802449C4); +extern EvtSource N(80244AD0); +extern EvtSource N(main); +extern EvtSource N(makeEntities); +extern EvtSource N(D_80252F4C_C107CC); +extern EvtSource N(D_802539A0_C11220); extern NpcGroupList N(npcGroupList_80246E50); extern NpcGroupList N(npcGroupList_80246ED4); extern NpcGroupList N(npcGroupList_80246E8C); diff --git a/src/world/area_dgb/dgb_02/C2EBA0.c b/src/world/area_dgb/dgb_02/C2EBA0.c index 0b905ebdc2..babd39d77d 100644 --- a/src/world/area_dgb/dgb_02/C2EBA0.c +++ b/src/world/area_dgb/dgb_02/C2EBA0.c @@ -26,7 +26,7 @@ MapConfig N(config) = { .tattle = 0x1900C2, }; -Script N(802414B0) = SCRIPT({ +EvtSource N(802414B0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -43,7 +43,7 @@ static s32 N(pad_1548)[] = { 0x00000000, 0x00000000, }; -Script N(exitDoubleDoor_80241550) = SCRIPT({ +EvtSource N(exitDoubleDoor_80241550) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -57,7 +57,7 @@ Script N(exitDoubleDoor_80241550) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_80241604) = SCRIPT({ +EvtSource N(exitDoubleDoor_80241604) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -71,7 +71,7 @@ Script N(exitDoubleDoor_80241604) = SCRIPT({ sleep 100; }); -Script N(exitSingleDoor_802416B8) = SCRIPT({ +EvtSource N(exitSingleDoor_802416B8) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -85,7 +85,7 @@ Script N(exitSingleDoor_802416B8) = SCRIPT({ sleep 100; }); -Script N(exitSingleDoor_8024176C) = SCRIPT({ +EvtSource N(exitSingleDoor_8024176C) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -99,7 +99,7 @@ Script N(exitSingleDoor_8024176C) = SCRIPT({ sleep 100; }); -Script N(enterSingleDoor_80241820) = SCRIPT({ +EvtSource N(enterSingleDoor_80241820) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -129,7 +129,7 @@ Script N(enterSingleDoor_80241820) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -150,7 +150,7 @@ static s32 N(pad_1AA8)[] = { 0x00000000, 0x00000000, }; -Script N(80241AB0) = SCRIPT({ +EvtSource N(80241AB0) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -200,7 +200,7 @@ NpcAISettings N(npcAISettings_80241B9C) = { .unk_2C = 3, }; -Script N(npcAI_80241BCC) = SCRIPT({ +EvtSource N(npcAI_80241BCC) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 5); SetSelfVar(2, 8); @@ -232,7 +232,7 @@ NpcAISettings N(npcAISettings_80241C68) = { .unk_2C = 1, }; -Script N(npcAI_80241C98) = SCRIPT({ +EvtSource N(npcAI_80241C98) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 10); SetSelfVar(2, 14); @@ -249,7 +249,7 @@ NpcSettings N(npcSettings_80241D08) = { .level = 13, }; -Script N(npcAI_80241D34) = SCRIPT({ +EvtSource N(npcAI_80241D34) = SCRIPT({ EnableNpcShadow(NPC_SELF, FALSE); SetSelfVar(0, 4); SetSelfVar(1, 32); @@ -424,7 +424,7 @@ NpcGroupList N(npcGroupList_802425C8) = { #include "world/common/UnkFunc7.inc.c" -ApiStatus N(func_8024061C_C2F1BC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024061C_C2F1BC)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -509,7 +509,7 @@ ApiStatus N(func_8024061C_C2F1BC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -void N(func_802408D0_C2F470)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802408D0_C2F470)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -526,7 +526,7 @@ void N(func_802408D0_C2F470)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240958_C2F4F8)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240958_C2F4F8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); PlayerData* playerData = get_player_data(); @@ -582,7 +582,7 @@ void N(func_80240958_C2F4F8)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240C10_C2F7B0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C10_C2F7B0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -594,7 +594,7 @@ void N(func_80240C10_C2F7B0)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240C74_C2F814)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C74_C2F814)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -604,7 +604,7 @@ void N(func_80240C74_C2F814)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 4; } -void N(func_80240D1C_C2F8BC)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240D1C_C2F8BC)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -635,7 +635,7 @@ void N(func_80240D1C_C2F8BC)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240E54_C2F9F4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240E54_C2F9F4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -651,7 +651,7 @@ void N(func_80240E54_C2F9F4)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240F00_C2FAA0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240F00_C2FAA0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 var; @@ -674,7 +674,7 @@ void N(func_80240F00_C2FAA0)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241078_C2FC18)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241078_C2FC18)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -687,7 +687,7 @@ void N(func_80241078_C2FC18)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_802410D4_C2FC74)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802410D4_C2FC74)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_dgb/dgb_02/dgb_02.h b/src/world/area_dgb/dgb_02/dgb_02.h index e558e674d4..3b182bfcc5 100644 --- a/src/world/area_dgb/dgb_02/dgb_02.h +++ b/src/world/area_dgb/dgb_02/dgb_02.h @@ -3,9 +3,9 @@ #define NAMESPACE dgb_02 -ApiStatus N(func_8024061C_C2F1BC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802410D4_C2FC74)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc7)(ScriptInstance *script, s32 isInitialCall); +ApiStatus N(func_8024061C_C2F1BC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802410D4_C2FC74)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc7)(Evt *script, s32 isInitialCall); NpcGroupList N(npcGroupList_802425C8); -Script N(main); +EvtSource N(main); diff --git a/src/world/area_dgb/dgb_03/C31730.c b/src/world/area_dgb/dgb_03/C31730.c index 036a3d209c..80b6e87dea 100644 --- a/src/world/area_dgb/dgb_03/C31730.c +++ b/src/world/area_dgb/dgb_03/C31730.c @@ -30,7 +30,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_03_tattle }, }; -Script N(80242870) = SCRIPT({ +EvtSource N(80242870) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -47,7 +47,7 @@ static s32 N(pad_2908)[] = { 0x00000000, 0x00000000, }; -Script N(exitDoubleDoor_80242910) = SCRIPT({ +EvtSource N(exitDoubleDoor_80242910) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -61,7 +61,7 @@ Script N(exitDoubleDoor_80242910) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_802429C4) = SCRIPT({ +EvtSource N(exitDoubleDoor_802429C4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -75,7 +75,7 @@ Script N(exitDoubleDoor_802429C4) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_80242A78) = SCRIPT({ +EvtSource N(exitDoubleDoor_80242A78) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -89,9 +89,9 @@ Script N(exitDoubleDoor_80242A78) = SCRIPT({ sleep 100; }); -Script N(exitWalk_80242B2C) = EXIT_WALK_SCRIPT(26, 2, "dgb_13", 0); +EvtSource N(exitWalk_80242B2C) = EXIT_WALK_SCRIPT(26, 2, "dgb_13", 0); -Script N(exitSingleDoor_80242B88) = SCRIPT({ +EvtSource N(exitSingleDoor_80242B88) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -105,7 +105,7 @@ Script N(exitSingleDoor_80242B88) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_80242C3C) = SCRIPT({ +EvtSource N(exitDoubleDoor_80242C3C) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -119,11 +119,11 @@ Script N(exitDoubleDoor_80242C3C) = SCRIPT({ sleep 100; }); -Script N(80242CF0) = SCRIPT({ +EvtSource N(80242CF0) = SCRIPT({ bind N(exitWalk_80242B2C) TRIGGER_FLOOR_ABOVE 35; }); -Script N(enterDoubleDoor_80242D1C) = SCRIPT({ +EvtSource N(enterDoubleDoor_80242D1C) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -174,7 +174,7 @@ s32 N(itemList_80242F28)[] = { ITEM_NONE, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -202,7 +202,7 @@ static s32 N(pad_30D8)[] = { 0x00000000, 0x00000000, }; -Script N(802430E0) = SCRIPT({ +EvtSource N(802430E0) = SCRIPT({ group 0; loop 20 { GetCurrentPartner(SI_VAR(10)); @@ -269,7 +269,7 @@ Script N(802430E0) = SCRIPT({ StopSound(0x80000010); }); -Script N(80243470) = SCRIPT({ +EvtSource N(80243470) = SCRIPT({ if (SI_SAVE_FLAG(1044) != 0) { goto 90; } @@ -286,7 +286,7 @@ Script N(80243470) = SCRIPT({ } }); -Script N(8024353C) = SCRIPT({ +EvtSource N(8024353C) = SCRIPT({ if (SI_SAVE_FLAG(1044) != 0) { goto 90; } @@ -303,7 +303,7 @@ Script N(8024353C) = SCRIPT({ } }); -Script N(80243608) = SCRIPT({ +EvtSource N(80243608) = SCRIPT({ ParentColliderToModel(27, 51); ParentColliderToModel(28, 51); ParentColliderToModel(29, 51); @@ -327,7 +327,7 @@ static s32 N(pad_3738)[] = { 0x00000000, 0x00000000, }; -Script N(80243740) = SCRIPT({ +EvtSource N(80243740) = SCRIPT({ group 0; suspend group 1; ShowKeyChoicePopup(); @@ -354,11 +354,11 @@ Script N(80243740) = SCRIPT({ unbind; }); -Script N(802438A8) = SCRIPT({ +EvtSource N(802438A8) = SCRIPT({ bind N(exitDoubleDoor_80242C3C) TRIGGER_WALL_PRESS_A 17; }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ if (SI_SAVE_FLAG(1043) == 0) { MakeEntity(0x802BCD68, -355, 218, 75, 80, MAKE_ENTITY_END); AssignScript(N(802438A8)); @@ -371,7 +371,7 @@ static s32 N(pad_3964)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80243970) = SCRIPT({ +EvtSource N(80243970) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -413,7 +413,7 @@ NpcAISettings N(npcAISettings_80243A5C) = { .unk_2C = 3, }; -Script N(npcAI_80243A8C) = SCRIPT({ +EvtSource N(npcAI_80243A8C) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 5); SetSelfVar(2, 8); @@ -445,7 +445,7 @@ NpcAISettings N(npcAISettings_80243B28) = { .unk_2C = 3, }; -Script N(npcAI_80243B58) = SCRIPT({ +EvtSource N(npcAI_80243B58) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 5); SetSelfVar(2, 8); @@ -477,7 +477,7 @@ NpcAISettings N(npcAISettings_80243BF4) = { .unk_2C = 1, }; -Script N(npcAI_80243C24) = SCRIPT({ +EvtSource N(npcAI_80243C24) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 10); SetSelfVar(2, 14); @@ -494,7 +494,7 @@ NpcSettings N(npcSettings_80243C94) = { .level = 13, }; -Script N(npcAI_80243CC0) = SCRIPT({ +EvtSource N(npcAI_80243CC0) = SCRIPT({ EnableNpcShadow(NPC_SELF, FALSE); SetSelfVar(0, 4); SetSelfVar(1, 32); @@ -514,7 +514,7 @@ NpcSettings N(npcSettings_80243D68) = { .unk_2A = 8, }; -Script N(init_80243D94) = SCRIPT({ +EvtSource N(init_80243D94) = SCRIPT({ GetEntryID(SI_VAR(0)); if (SI_VAR(0) == 3) { SetNpcPos(NPC_SELF, -330, 210, -20); @@ -745,7 +745,7 @@ NpcGroupList N(npcGroupList_80244988) = { #include "world/common/UnkFunc7.inc.c" -ApiStatus N(func_8024086C_C31D4C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024086C_C31D4C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -852,7 +852,7 @@ ApiStatus N(func_8024086C_C31D4C)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkFunc16.inc.c" -ApiStatus N(func_802416B4_C32B94)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802416B4_C32B94)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -937,7 +937,7 @@ ApiStatus N(func_802416B4_C32B94)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_802419B0_C32E90)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802419B0_C32E90)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -1025,7 +1025,7 @@ ApiStatus N(func_802419B0_C32E90)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -void N(func_80241C7C_C3315C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241C7C_C3315C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1042,7 +1042,7 @@ void N(func_80241C7C_C3315C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241D04_C331E4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241D04_C331E4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); PlayerData* playerData = get_player_data(); @@ -1098,7 +1098,7 @@ void N(func_80241D04_C331E4)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241FBC_C3349C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241FBC_C3349C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1110,7 +1110,7 @@ void N(func_80241FBC_C3349C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80242020_C33500)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242020_C33500)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1120,7 +1120,7 @@ void N(func_80242020_C33500)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 4; } -void N(func_802420C8_C335A8)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802420C8_C335A8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -1151,7 +1151,7 @@ void N(func_802420C8_C335A8)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80242200_C336E0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242200_C336E0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1167,7 +1167,7 @@ void N(func_80242200_C336E0)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_802422AC_C3378C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802422AC_C3378C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 var; @@ -1190,7 +1190,7 @@ void N(func_802422AC_C3378C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80242424_C33904)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242424_C33904)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1203,7 +1203,7 @@ void N(func_80242424_C33904)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_80242480_C33960)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242480_C33960)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_dgb/dgb_03/dgb_03.h b/src/world/area_dgb/dgb_03/dgb_03.h index 8ef1033bfb..5ddc98f564 100644 --- a/src/world/area_dgb/dgb_03/dgb_03.h +++ b/src/world/area_dgb/dgb_03/dgb_03.h @@ -3,17 +3,17 @@ #define NAMESPACE dgb_03 -ApiStatus N(UnkFunc11)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc12)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc7)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024086C_C31D4C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802419B0_C32E90)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242480_C33960)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SetEntityFlags100000)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetEntityPosition)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(UnkFunc11)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc12)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc7)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024086C_C31D4C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802419B0_C32E90)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242480_C33960)(Evt* script, s32 isInitialCall); +ApiStatus N(SetEntityFlags100000)(Evt* script, s32 isInitialCall); +ApiStatus N(GetEntityPosition)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80244988); -extern Script N(80243608); -extern Script N(80243740); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(80243608); +extern EvtSource N(80243740); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_04/C36530.c b/src/world/area_dgb/dgb_04/C36530.c index 428df42c42..76d02c8883 100644 --- a/src/world/area_dgb/dgb_04/C36530.c +++ b/src/world/area_dgb/dgb_04/C36530.c @@ -22,7 +22,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_04_tattle }, }; -Script N(80243170) = SCRIPT({ +EvtSource N(80243170) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -39,7 +39,7 @@ static s32 N(pad_3208)[] = { 0x00000000, 0x00000000, }; -Script N(exitSingleDoor_80243210) = SCRIPT({ +EvtSource N(exitSingleDoor_80243210) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -53,7 +53,7 @@ Script N(exitSingleDoor_80243210) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_802432C4) = SCRIPT({ +EvtSource N(exitDoubleDoor_802432C4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -67,7 +67,7 @@ Script N(exitDoubleDoor_802432C4) = SCRIPT({ sleep 100; }); -Script N(enterSingleDoor_80243378) = SCRIPT({ +EvtSource N(enterSingleDoor_80243378) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -85,7 +85,7 @@ Script N(enterSingleDoor_80243378) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -111,7 +111,7 @@ f32 N(D_80243560_C39A90)[] = { 1.5f, 20.0f, }; -Script N(80243578) = SCRIPT({ +EvtSource N(80243578) = SCRIPT({ SetSelfEnemyFlagBits(((0x00100000 | 0x01000000 | 0x02000000 | 0x04000000 | 0x08000000 | 0x10000000 | 0x20000000)), TRUE); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT)), TRUE); }); @@ -131,7 +131,7 @@ NpcAISettings N(npcAISettings_802435B4) = { const char N(dgb_00_name_hack)[]; -Script N(npcAI_802435E4) = SCRIPT({ +EvtSource N(npcAI_802435E4) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(5, -650); SetSelfVar(6, 30); @@ -190,7 +190,7 @@ Script N(npcAI_802435E4) = SCRIPT({ sleep 100; }); -Script N(80243A0C) = SCRIPT({ +EvtSource N(80243A0C) = SCRIPT({ GetOwnerEncounterTrigger(SI_VAR(0)); match SI_VAR(0) { == 1, 2, 4, 6 { @@ -200,7 +200,7 @@ Script N(80243A0C) = SCRIPT({ } }); -Script N(80243A98) = SCRIPT({ +EvtSource N(80243A98) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -276,7 +276,7 @@ f32 N(D_80243D88_C3A2B8)[] = { 140.0f, 180.0f, 220.0f }; -Script N(80243D94) = SCRIPT({ +EvtSource N(80243D94) = SCRIPT({ sleep 10; PlaySound(0x212D); N(UnkFunc21)(SI_MAP_VAR(0)); @@ -306,7 +306,7 @@ Script N(80243D94) = SCRIPT({ sleep 30; }); -Script N(80243EF8) = SCRIPT({ +EvtSource N(80243EF8) = SCRIPT({ if (SI_SAVE_FLAG(1046) == 1) { return; } @@ -388,7 +388,7 @@ Script N(80243EF8) = SCRIPT({ N(UnkFunc17)(); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA910, 500, -360, 110, 0, MAKE_ENTITY_END); SI_MAP_VAR(0) = SI_VAR(0); AssignBlockFlag(SI_SAVE_FLAG(1046)); @@ -399,7 +399,7 @@ Script N(makeEntities) = SCRIPT({ #ifdef NON_MATCHING // second npc_raycast_down_sides call -void N(func_802401B0_C366E0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802401B0_C366E0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -538,7 +538,7 @@ void N(func_802401B0_C366E0)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(void, "world/area_dgb/dgb_04/C36530", dgb_04_func_802401B0_C366E0, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_dgb/dgb_04/C36530", dgb_04_func_802401B0_C366E0, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -548,7 +548,7 @@ INCLUDE_ASM(void, "world/area_dgb/dgb_04/C36530", dgb_04_func_802401B0_C366E0, S #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_80240C54_C37184)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C54_C37184)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -566,7 +566,7 @@ void N(func_80240C54_C37184)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_8024130C_C3783C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024130C_C3783C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -625,7 +625,7 @@ ApiStatus N(func_8024130C_C3783C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -void N(func_802414F8_C37A28)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802414F8_C37A28)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f0; @@ -652,7 +652,7 @@ void N(func_802414F8_C37A28)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241650_C37B80)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241650_C37B80)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -675,7 +675,7 @@ void N(func_80241650_C37B80)(ScriptInstance* script, NpcAISettings* aiSettings, } -void N(func_80241754_C37C84)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241754_C37C84)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -689,7 +689,7 @@ void N(func_80241754_C37C84)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 15; } -void N(func_802417F8_C37D28)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802417F8_C37D28)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; @@ -733,7 +733,7 @@ void N(func_802417F8_C37D28)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241A94_C37FC4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241A94_C37FC4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -748,7 +748,7 @@ void N(func_80241A94_C37FC4)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 17; } -void N(func_80241B4C_C3807C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241B4C_C3807C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; @@ -771,7 +771,7 @@ void N(func_80241B4C_C3807C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241CCC_C381FC)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241CCC_C381FC)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -781,7 +781,7 @@ void N(func_80241CCC_C381FC)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241D14_C38244)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241D14_C38244)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -798,7 +798,7 @@ void N(func_80241D14_C38244)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241D94_C382C4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241D94_C382C4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -810,7 +810,7 @@ void N(func_80241D94_C382C4)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1] = 0x1E; } -void N(func_80241E3C_C3836C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241E3C_C3836C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX = npc->pos.x; @@ -854,7 +854,7 @@ void N(func_80241E3C_C3836C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_80242154_C38684)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242154_C38684)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -934,7 +934,7 @@ ApiStatus N(func_80242154_C38684)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkFunc17.inc.c" -ApiStatus N(func_8024240C_C3893C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024240C_C3893C)(Evt* script, s32 isInitialCall) { entity_upgrade_block_hide_content(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -964,7 +964,7 @@ typedef struct { } N(UnkStruct); -ApiStatus N(func_8024259C_C38ACC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024259C_C38ACC)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; N(UnkStruct)* ptr; s32 i; @@ -1036,7 +1036,7 @@ ApiStatus N(func_8024259C_C38ACC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } #else -INCLUDE_ASM(ApiStatus, "world/area_dgb/dgb_04/C36530", dgb_04_func_8024259C_C38ACC, ScriptInstance* script, +INCLUDE_ASM(ApiStatus, "world/area_dgb/dgb_04/C36530", dgb_04_func_8024259C_C38ACC, Evt* script, s32 isInitialCall) #endif @@ -1067,7 +1067,7 @@ typedef struct { s32 unk_64; } N(UserData); -ApiStatus N(func_802429D0_C38F00)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802429D0_C38F00)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; @@ -1195,7 +1195,7 @@ ApiStatus N(func_802429D0_C38F00)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -s32 N(func_80242F08_C39438)(ScriptInstance* script, s32 isInitialCall) { +s32 N(func_80242F08_C39438)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 ret = 0; diff --git a/src/world/area_dgb/dgb_04/dgb_04.h b/src/world/area_dgb/dgb_04/dgb_04.h index c0d5114479..6f027d583a 100644 --- a/src/world/area_dgb/dgb_04/dgb_04.h +++ b/src/world/area_dgb/dgb_04/dgb_04.h @@ -3,25 +3,25 @@ #define NAMESPACE dgb_04 -ApiStatus N(SetOverrideFlags_40)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkPartnerPosFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkPartnerPosFunc2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242154_C38684)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc17)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024240C_C3893C)(ScriptInstance *script, s32 isInitialCall); -ApiStatus N(UnkFunc18)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc38)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024259C_C38ACC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SwitchToPartner)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc19)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc20)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc39)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc21)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc22)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802429D0_C38F00)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242F08_C39438)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc24)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(SetOverrideFlags_40)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkPartnerPosFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkPartnerPosFunc2)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242154_C38684)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc17)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024240C_C3893C)(Evt *script, s32 isInitialCall); +ApiStatus N(UnkFunc18)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc38)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024259C_C38ACC)(Evt* script, s32 isInitialCall); +ApiStatus N(SwitchToPartner)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc19)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc20)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc39)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc21)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc22)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802429D0_C38F00)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242F08_C39438)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc24)(Evt* script, s32 isInitialCall); NpcGroupList N(npcGroupList_80243D18); -Script N(main); -Script N(makeEntities); +EvtSource N(main); +EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_05/C3AA10.c b/src/world/area_dgb/dgb_05/C3AA10.c index a14c329659..ffca978057 100644 --- a/src/world/area_dgb/dgb_05/C3AA10.c +++ b/src/world/area_dgb/dgb_05/C3AA10.c @@ -23,7 +23,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_05_tattle }, }; -Script N(802414E0) = SCRIPT({ +EvtSource N(802414E0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -40,7 +40,7 @@ static s32 N(pad_1578)[] = { 0x00000000, 0x00000000, }; -Script N(exitSingleDoor_80241580) = SCRIPT({ +EvtSource N(exitSingleDoor_80241580) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -54,7 +54,7 @@ Script N(exitSingleDoor_80241580) = SCRIPT({ sleep 100; }); -Script N(enterSingleDoor_80241634) = SCRIPT({ +EvtSource N(enterSingleDoor_80241634) = SCRIPT({ UseDoorSounds(0); GetEntryID(SI_VAR(0)); match SI_VAR(0) { @@ -66,7 +66,7 @@ Script N(enterSingleDoor_80241634) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -89,7 +89,7 @@ static s32 N(pad_17E8)[] = { 0x00000000, 0x00000000, }; -Script N(802417F0) = SCRIPT({ +EvtSource N(802417F0) = SCRIPT({ N(func_80240000_C3AA10)(); func_802CA988(0, SI_VAR(2), SI_VAR(3), SI_VAR(4), SI_VAR(5)); N(func_80240030_C3AA40)(); @@ -102,7 +102,7 @@ static s32 N(pad_1868)[] = { 0x00000000, 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ if (SI_SAVE_FLAG(1047) == 0) { MakeEntity(0x802BCE84, 510, -210, 100, 0, MAKE_ENTITY_END); } @@ -112,7 +112,7 @@ static s32 N(pad_18BC) = { 0x00000000, }; -Script N(802418C0) = SCRIPT({ +EvtSource N(802418C0) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -154,7 +154,7 @@ NpcAISettings N(npcAISettings_802419AC) = { .unk_2C = 1, }; -Script N(npcAI_802419DC) = SCRIPT({ +EvtSource N(npcAI_802419DC) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 10); SetSelfVar(2, 14); @@ -171,7 +171,7 @@ NpcSettings N(npcSettings_80241A4C) = { .level = 13, }; -Script N(npcAI_80241A78) = SCRIPT({ +EvtSource N(npcAI_80241A78) = SCRIPT({ EnableNpcShadow(NPC_SELF, FALSE); SetSelfVar(0, 4); SetSelfVar(1, 32); @@ -333,14 +333,14 @@ NpcGroupList N(npcGroupList_8024230C) = { {}, }; -ApiStatus N(func_80240000_C3AA10)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_C3AA10)(Evt* script, s32 isInitialCall) { if (gPlayerStatus.position.y >= -210.0f) { return ApiStatus_BLOCK; } return ApiStatus_DONE2; } -ApiStatus N(func_80240030_C3AA40)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240030_C3AA40)(Evt* script, s32 isInitialCall) { if (gPlayerStatus.position.y > -270.0f) { return ApiStatus_BLOCK; } @@ -359,7 +359,7 @@ ApiStatus N(func_80240030_C3AA40)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkFunc7.inc.c" -void N(func_8024067C_C3B08C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_8024067C_C3B08C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -376,7 +376,7 @@ void N(func_8024067C_C3B08C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240704_C3B114)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240704_C3B114)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); PlayerData* playerData = get_player_data(); @@ -432,7 +432,7 @@ void N(func_80240704_C3B114)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_802409BC_C3B3CC)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802409BC_C3B3CC)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -444,7 +444,7 @@ void N(func_802409BC_C3B3CC)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240A20_C3B430)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240A20_C3B430)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -454,7 +454,7 @@ void N(func_80240A20_C3B430)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 4; } -void N(func_80240AC8_C3B4D8)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240AC8_C3B4D8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -485,7 +485,7 @@ void N(func_80240AC8_C3B4D8)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240C00_C3B610)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C00_C3B610)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -501,7 +501,7 @@ void N(func_80240C00_C3B610)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240CAC_C3B6BC)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240CAC_C3B6BC)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 var; @@ -524,7 +524,7 @@ void N(func_80240CAC_C3B6BC)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240E24_C3B834)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240E24_C3B834)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -537,7 +537,7 @@ void N(func_80240E24_C3B834)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_80240E80_C3B890)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240E80_C3B890)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -641,7 +641,7 @@ ApiStatus N(func_80240E80_C3B890)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_802411D0_C3BBE0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411D0_C3BBE0)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_dgb/dgb_05/dgb_05.h b/src/world/area_dgb/dgb_05/dgb_05.h index b156a6cc64..68d2faa3ba 100644 --- a/src/world/area_dgb/dgb_05/dgb_05.h +++ b/src/world/area_dgb/dgb_05/dgb_05.h @@ -3,12 +3,12 @@ #define NAMESPACE dgb_05 -ApiStatus N(func_80240000_C3AA10)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240030_C3AA40)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc7)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240E80_C3B890)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80240000_C3AA10)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240030_C3AA40)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc7)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240E80_C3B890)(Evt* script, s32 isInitialCall); NpcGroupList N(npcGroupList_8024230C); -Script N(802417F0); -Script N(main); -Script N(makeEntities); +EvtSource N(802417F0); +EvtSource N(main); +EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_06/C3D080.c b/src/world/area_dgb/dgb_06/C3D080.c index 437d0d7c6a..5258f1a2be 100644 --- a/src/world/area_dgb/dgb_06/C3D080.c +++ b/src/world/area_dgb/dgb_06/C3D080.c @@ -18,7 +18,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_06_tattle }, }; -Script N(80240320) = SCRIPT({ +EvtSource N(80240320) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -35,7 +35,7 @@ static s32 N(pad_3B8)[] = { 0x00000000, 0x00000000, }; -Script N(exitSingleDoor_802403C0) = SCRIPT({ +EvtSource N(exitSingleDoor_802403C0) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -49,7 +49,7 @@ Script N(exitSingleDoor_802403C0) = SCRIPT({ sleep 100; }); -Script N(enterSingleDoor_80240474) = SCRIPT({ +EvtSource N(enterSingleDoor_80240474) = SCRIPT({ UseDoorSounds(0); GetEntryID(SI_VAR(0)); match SI_VAR(0) { @@ -61,7 +61,7 @@ Script N(enterSingleDoor_80240474) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(589824); SetCamPerspective(0, 3, 25, 16, 4096); @@ -82,7 +82,7 @@ Script N(main) = SCRIPT({ #include "world/common/StashVars.inc.c" -Script N(80240624) = SCRIPT({ +EvtSource N(80240624) = SCRIPT({ group 0; SetTimeFreezeMode(2); sleep 40; @@ -91,7 +91,7 @@ Script N(80240624) = SCRIPT({ return; }); -Script N(8024068C) = SCRIPT({ +EvtSource N(8024068C) = SCRIPT({ DisablePlayerInput(TRUE); SI_VAR(0) = SI_VAR(10); if (SI_VAR(10) != 0) { @@ -112,14 +112,14 @@ Script N(8024068C) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(8024076C) = SCRIPT({ +EvtSource N(8024076C) = SCRIPT({ SI_VAR(10) = 19; SI_VAR(11) = 1; SI_SAVE_FLAG(1048) = 1; await N(8024068C); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAE30, -300, 50, -200, 0, ITEM_NONE, MAKE_ENTITY_END); AssignFlag(SI_SAVE_FLAG(1048)); AssignScript(N(8024076C)); @@ -136,7 +136,7 @@ NpcSettings N(npcSettings_80240840) = { .level = 99, }; -Script N(interact_8024086C) = SCRIPT({ +EvtSource N(interact_8024086C) = SCRIPT({ if (SI_AREA_FLAG(4) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, 0x00F0)); @@ -148,7 +148,7 @@ Script N(interact_8024086C) = SCRIPT({ } }); -Script N(init_802408FC) = SCRIPT({ +EvtSource N(init_802408FC) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { SetNpcPos(NPC_SELF, 0, -1000, 0); } diff --git a/src/world/area_dgb/dgb_06/dgb_06.h b/src/world/area_dgb/dgb_06/dgb_06.h index 1938527b44..7e63ead8f1 100644 --- a/src/world/area_dgb/dgb_06/dgb_06.h +++ b/src/world/area_dgb/dgb_06/dgb_06.h @@ -4,5 +4,5 @@ #define NAMESPACE dgb_06 NpcGroupList N(npcGroupList_80240B44); -Script N(main); -Script N(makeEntities); +EvtSource N(main); +EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_07/C3DBF0.c b/src/world/area_dgb/dgb_07/C3DBF0.c index 0bdf403de1..a2031379c0 100644 --- a/src/world/area_dgb/dgb_07/C3DBF0.c +++ b/src/world/area_dgb/dgb_07/C3DBF0.c @@ -22,7 +22,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_07_tattle }, }; -Script N(80241490) = SCRIPT({ +EvtSource N(80241490) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -39,7 +39,7 @@ static s32 N(pad_1528)[] = { 0x00000000, 0x00000000, }; -Script N(exitSingleDoor_80241530) = SCRIPT({ +EvtSource N(exitSingleDoor_80241530) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -53,7 +53,7 @@ Script N(exitSingleDoor_80241530) = SCRIPT({ sleep 100; }); -Script N(enterSingleDoor_802415E4) = SCRIPT({ +EvtSource N(enterSingleDoor_802415E4) = SCRIPT({ UseDoorSounds(0); GetEntryID(SI_VAR(0)); match SI_VAR(0) { @@ -65,7 +65,7 @@ Script N(enterSingleDoor_802415E4) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -81,7 +81,7 @@ Script N(main) = SCRIPT({ spawn N(enterSingleDoor_802415E4); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeItemEntity(ITEM_STAR_PIECE, -220, 75, -210, 17, SI_SAVE_FLAG(1050)); MakeEntity(0x802EAED4, -370, 0, -200, 0, -1, MAKE_ENTITY_END); MakeEntity(0x802EAED4, -410, 0, -200, 0, -1, MAKE_ENTITY_END); @@ -91,7 +91,7 @@ static s32 N(pad_17E4)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(802417F0) = SCRIPT({ +EvtSource N(802417F0) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -141,7 +141,7 @@ NpcAISettings N(npcAISettings_802418DC) = { .unk_2C = 1, }; -Script N(npcAI_8024190C) = SCRIPT({ +EvtSource N(npcAI_8024190C) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 10); SetSelfVar(2, 14); @@ -158,7 +158,7 @@ NpcSettings N(npcSettings_8024197C) = { .level = 13, }; -Script N(npcAI_802419A8) = SCRIPT({ +EvtSource N(npcAI_802419A8) = SCRIPT({ EnableNpcShadow(NPC_SELF, FALSE); SetSelfVar(0, 4); SetSelfVar(1, 32); @@ -268,7 +268,7 @@ static const s32 N(pad_1E74)[] = { #include "world/common/UnkFunc7.inc.c" -void N(func_8024061C_C3E20C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_8024061C_C3E20C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -285,7 +285,7 @@ void N(func_8024061C_C3E20C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_802406A4_C3E294)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802406A4_C3E294)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); PlayerData* playerData = get_player_data(); @@ -341,7 +341,7 @@ void N(func_802406A4_C3E294)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_8024095C_C3E54C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_8024095C_C3E54C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -353,7 +353,7 @@ void N(func_8024095C_C3E54C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_802409C0_C3E5B0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802409C0_C3E5B0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -363,7 +363,7 @@ void N(func_802409C0_C3E5B0)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 4; } -void N(func_80240A68_C3E658)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240A68_C3E658)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -394,7 +394,7 @@ void N(func_80240A68_C3E658)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240BA0_C3E790)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240BA0_C3E790)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -410,7 +410,7 @@ void N(func_80240BA0_C3E790)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240C4C_C3E83C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C4C_C3E83C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 var; @@ -433,7 +433,7 @@ void N(func_80240C4C_C3E83C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240DC4_C3E9B4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240DC4_C3E9B4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -446,7 +446,7 @@ void N(func_80240DC4_C3E9B4)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_80240E20_C3EA10)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240E20_C3EA10)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -550,7 +550,7 @@ ApiStatus N(func_80240E20_C3EA10)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80241170_C3ED60)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241170_C3ED60)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_dgb/dgb_07/dgb_07.h b/src/world/area_dgb/dgb_07/dgb_07.h index befc24032d..c949f99b6c 100644 --- a/src/world/area_dgb/dgb_07/dgb_07.h +++ b/src/world/area_dgb/dgb_07/dgb_07.h @@ -3,9 +3,9 @@ #define NAMESPACE dgb_07 -ApiStatus N(func_80240E20_C3EA10)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc7)(ScriptInstance *script, s32 isInitialCall); +ApiStatus N(func_80240E20_C3EA10)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc7)(Evt *script, s32 isInitialCall); NpcGroupList N(npcGroupList_80241E5C); -Script N(main); -Script N(makeEntities); +EvtSource N(main); +EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_08/C3FDB0.c b/src/world/area_dgb/dgb_08/C3FDB0.c index 3afce62784..bbd07094ff 100644 --- a/src/world/area_dgb/dgb_08/C3FDB0.c +++ b/src/world/area_dgb/dgb_08/C3FDB0.c @@ -32,7 +32,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_08_tattle }, }; -Script N(80243CF0) = SCRIPT({ +EvtSource N(80243CF0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -49,7 +49,7 @@ static s32 N(pad_3D88)[] = { 0x00000000, 0x00000000, }; -Script N(exitDoubleDoor_80243D90) = SCRIPT({ +EvtSource N(exitDoubleDoor_80243D90) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -63,7 +63,7 @@ Script N(exitDoubleDoor_80243D90) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_80243E44) = SCRIPT({ +EvtSource N(exitDoubleDoor_80243E44) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -81,7 +81,7 @@ const s32 N(pad_XXXX)[] = { 0x00000000, 0x00000000, }; -Script N(enterDoubleDoor_80243EF8) = SCRIPT({ +EvtSource N(enterDoubleDoor_80243EF8) = SCRIPT({ UseDoorSounds(3); GetEntryID(SI_VAR(0)); match SI_VAR(0) { @@ -98,7 +98,7 @@ Script N(enterDoubleDoor_80243EF8) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -139,7 +139,7 @@ NpcAISettings N(npcAI_80244100) = { .unk_2C = 1, }; -Script N(80244130) = SCRIPT({ +EvtSource N(80244130) = SCRIPT({ N(func_80240B94_C40944)(N(npcAI_80244100)); }); @@ -166,7 +166,7 @@ NpcSettings N(npcSettings_802441A8) = { .level = 13, }; -Script N(802441D4) = SCRIPT({ +EvtSource N(802441D4) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -216,7 +216,7 @@ NpcAISettings N(npcAISettings_802442C0) = { .unk_2C = 3, }; -Script N(npcAI_802442F0) = SCRIPT({ +EvtSource N(npcAI_802442F0) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 5); SetSelfVar(2, 8); @@ -233,7 +233,7 @@ NpcSettings N(npcSettings_80244360) = { .level = 13, }; -Script N(npcAI_8024438C) = SCRIPT({ +EvtSource N(npcAI_8024438C) = SCRIPT({ EnableNpcShadow(NPC_SELF, FALSE); SetSelfVar(0, 4); SetSelfVar(1, 32); @@ -258,7 +258,7 @@ f32 N(D_80244460_C44210)[] = { 1.5f, 20.0f, }; -Script N(80244478) = SCRIPT({ +EvtSource N(80244478) = SCRIPT({ SetSelfEnemyFlagBits(((0x00100000 | 0x01000000 | 0x02000000 | 0x04000000 | 0x08000000 | 0x10000000 | 0x20000000)), TRUE); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT)), TRUE); }); @@ -278,7 +278,7 @@ NpcAISettings N(npcAISettings_802444B4) = { const char N(dgb_00_name_hack)[]; -Script N(npcAI_802444E4) = SCRIPT({ +EvtSource N(npcAI_802444E4) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(5, -650); SetSelfVar(6, 30); @@ -337,7 +337,7 @@ Script N(npcAI_802444E4) = SCRIPT({ sleep 100; }); -Script N(8024490C) = SCRIPT({ +EvtSource N(8024490C) = SCRIPT({ GetOwnerEncounterTrigger(SI_VAR(0)); match SI_VAR(0) { == 1, 2, 4, 6 { @@ -347,7 +347,7 @@ Script N(8024490C) = SCRIPT({ } }); -Script N(80244998) = SCRIPT({ +EvtSource N(80244998) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -373,7 +373,7 @@ NpcSettings N(npcSettings_80244A28) = { .level = 99, }; -Script N(idle_80244A54) = SCRIPT({ +EvtSource N(idle_80244A54) = SCRIPT({ loop { GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); if (SI_VAR(0) >= -350) { @@ -416,7 +416,7 @@ Script N(idle_80244A54) = SCRIPT({ BindNpcAI(NPC_SELF, N(npcAI_80244D7C)); }); -Script N(80244D08) = SCRIPT({ +EvtSource N(80244D08) = SCRIPT({ 10: GetNpcPos(NPC_WORLD_TUBBA, SI_VAR(0), SI_VAR(1), SI_VAR(2)); if (SI_VAR(1) > 0) { @@ -426,7 +426,7 @@ Script N(80244D08) = SCRIPT({ N(func_80243B98_C43948)(); }); -Script N(npcAI_80244D7C) = SCRIPT({ +EvtSource N(npcAI_80244D7C) = SCRIPT({ N(func_80243C10_C439C0)(); spawn N(80244D08); spawn { @@ -444,13 +444,13 @@ Script N(npcAI_80244D7C) = SCRIPT({ const char N(dgb_01_name_hack)[]; -Script N(defeat_80244E58) = SCRIPT({ +EvtSource N(defeat_80244E58) = SCRIPT({ N(UnkFunc1)(); GotoMap(N(dgb_01_name_hack), 2); sleep 100; }); -Script N(init_80244E94) = SCRIPT({ +EvtSource N(init_80244E94) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) { SetNpcPos(NPC_SELF, 0, -1000, 0); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_4)), TRUE); @@ -790,7 +790,7 @@ StaticNpc N(npcGroup_80246020) = { }, }; -Script N(idle_80246210) = SCRIPT({ +EvtSource N(idle_80246210) = SCRIPT({ 0: SetNpcAnimation(NPC_SELF, NPC_ANIM(world_clubba, Palette_00, Anim_7)); sleep 30; @@ -811,7 +811,7 @@ Script N(idle_80246210) = SCRIPT({ goto 0; }); -Script N(interact_80246310) = SCRIPT({ +EvtSource N(interact_80246310) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM(world_clubba, Palette_00, Anim_8)); PlaySoundAtNpc(NPC_SELF, 0x2F1, 0); sleep 10; @@ -837,7 +837,7 @@ Script N(interact_80246310) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM(world_clubba, Palette_00, Anim_7)); }); -Script N(init_802464C4) = SCRIPT({ +EvtSource N(init_802464C4) = SCRIPT({ SetNpcCollisionSize(-1, 36, 30); SetNpcAnimation(NPC_SELF, NPC_ANIM(world_clubba, Palette_00, Anim_7)); BindNpcInteract(NPC_SELF, N(interact_80246310)); @@ -877,11 +877,11 @@ StaticNpc N(npcGroup_80246528) = { .tattle = MESSAGE_ID(0x1A, 0x00B6), }; -Script N(idle_80246718) = SCRIPT({ +EvtSource N(idle_80246718) = SCRIPT({ }); -Script N(init_80246728) = SCRIPT({ +EvtSource N(init_80246728) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_80246718)); SetNpcPos(NPC_SELF, 0, -1000, 0); }); @@ -949,7 +949,7 @@ static s32 N(pad_69DC) = { 0x00000000, }; -Script N(802469E0) = SCRIPT({ +EvtSource N(802469E0) = SCRIPT({ }); @@ -975,7 +975,7 @@ Script N(802469E0) = SCRIPT({ #include "world/common/UnkFunc16.inc.c" -ApiStatus N(func_80240B94_C40944)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B94_C40944)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -1072,7 +1072,7 @@ ApiStatus N(func_80240B94_C40944)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkFunc7.inc.c" -ApiStatus N(func_802414AC_C4125C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802414AC_C4125C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -1161,7 +1161,7 @@ ApiStatus N(func_802414AC_C4125C)(ScriptInstance* script, s32 isInitialCall) { #ifdef NON_MATCHING // second npc_raycast_down_sides call -void N(func_80241910_C416C0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241910_C416C0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -1300,7 +1300,7 @@ void N(func_80241910_C416C0)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(void, "world/area_dgb/dgb_08/C3FDB0", dgb_08_func_80241910_C416C0, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_dgb/dgb_08/C3FDB0", dgb_08_func_80241910_C416C0, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -1310,7 +1310,7 @@ INCLUDE_ASM(void, "world/area_dgb/dgb_08/C3FDB0", dgb_08_func_80241910_C416C0, S #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_802423B4_C42164)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802423B4_C42164)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1328,7 +1328,7 @@ void N(func_802423B4_C42164)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_80242A6C_C4281C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242A6C_C4281C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1388,7 +1388,7 @@ ApiStatus N(func_80242A6C_C4281C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -void N(func_80242C58_C42A08)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242C58_C42A08)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f0; @@ -1415,7 +1415,7 @@ void N(func_80242C58_C42A08)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80242DB0_C42B60)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242DB0_C42B60)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1438,7 +1438,7 @@ void N(func_80242DB0_C42B60)(ScriptInstance* script, NpcAISettings* aiSettings, } -void N(func_80242EB4_C42C64)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242EB4_C42C64)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 i; @@ -1460,7 +1460,7 @@ void N(func_80242EB4_C42C64)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 15; } -void N(func_80242F94_C42D44)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242F94_C42D44)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; @@ -1506,7 +1506,7 @@ void N(func_80242F94_C42D44)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80243230_C42FE0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80243230_C42FE0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1521,7 +1521,7 @@ void N(func_80243230_C42FE0)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 17; } -void N(func_802432E8_C43098)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802432E8_C43098)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; @@ -1544,7 +1544,7 @@ void N(func_802432E8_C43098)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(filemenu_update_show_options_right_C43218)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(filemenu_update_show_options_right_C43218)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1554,7 +1554,7 @@ void N(filemenu_update_show_options_right_C43218)(ScriptInstance* script, NpcAIS } } -void N(func_802434B0_C43260)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802434B0_C43260)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1571,7 +1571,7 @@ void N(func_802434B0_C43260)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80243530_C432E0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80243530_C432E0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1583,7 +1583,7 @@ void N(func_80243530_C432E0)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1] = 0x1E; } -void N(func_802435D8_C43388)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802435D8_C43388)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX = npc->pos.x; @@ -1627,7 +1627,7 @@ void N(func_802435D8_C43388)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_802438F0_C436A0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802438F0_C436A0)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -1705,7 +1705,7 @@ ApiStatus N(func_802438F0_C436A0)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkFunc1.inc.c" -ApiStatus N(func_80243B98_C43948)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243B98_C43948)(Evt* script, s32 isInitialCall) { if (get_enemy_safe(9) != 0) { Enemy* enemy = get_enemy(9); enemy->territory->wander.point.x = 2; @@ -1721,7 +1721,7 @@ ApiStatus N(func_80243B98_C43948)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80243C10_C439C0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243C10_C439C0)(Evt* script, s32 isInitialCall) { if (get_enemy_safe(9)) { Enemy* enemy = get_enemy(9); enemy->unk_B0 |= 0x80; @@ -1731,7 +1731,7 @@ ApiStatus N(func_80243C10_C439C0)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80243C50_C43A00)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243C50_C43A00)(Evt* script, s32 isInitialCall) { ai_enemy_play_sound(get_npc_unsafe(script->owner1.enemy->npcID), 0x32F, 0); return ApiStatus_DONE2; } diff --git a/src/world/area_dgb/dgb_08/dgb_08.h b/src/world/area_dgb/dgb_08/dgb_08.h index 6b966e27f1..e1ab6b6cec 100644 --- a/src/world/area_dgb/dgb_08/dgb_08.h +++ b/src/world/area_dgb/dgb_08/dgb_08.h @@ -3,19 +3,19 @@ #define NAMESPACE dgb_08 -ApiStatus N(UnkFunc1)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240B94_C40944)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc7)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802414AC_C4125C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802438F0_C436A0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243B98_C43948)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243C10_C439C0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243C50_C43A00)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(UnkFunc1)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240B94_C40944)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc7)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802414AC_C4125C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802438F0_C436A0)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243B98_C43948)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243C10_C439C0)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243C50_C43A00)(Evt* script, s32 isInitialCall); NpcGroupList N(npcGroupList_80246958); NpcGroupList N(npcGroupList_802469AC); NpcGroupList N(npcGroupList_802469C4); -Script N(802469E0); -Script N(main); -Script N(npcAI_80244D7C); -Script N(unk_80244100); +EvtSource N(802469E0); +EvtSource N(main); +EvtSource N(npcAI_80244D7C); +EvtSource N(unk_80244100); diff --git a/src/world/area_dgb/dgb_09/C46BE0.c b/src/world/area_dgb/dgb_09/C46BE0.c index ab970c8281..2854102d1b 100644 --- a/src/world/area_dgb/dgb_09/C46BE0.c +++ b/src/world/area_dgb/dgb_09/C46BE0.c @@ -28,7 +28,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_09_tattle }, }; -Script N(80243880) = SCRIPT({ +EvtSource N(80243880) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -45,7 +45,7 @@ static s32 N(pad_3918)[] = { 0x00000000, 0x00000000, }; -Script N(exitDoubleDoor_80243920) = SCRIPT({ +EvtSource N(exitDoubleDoor_80243920) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -59,7 +59,7 @@ Script N(exitDoubleDoor_80243920) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_802439D4) = SCRIPT({ +EvtSource N(exitDoubleDoor_802439D4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -73,7 +73,7 @@ Script N(exitDoubleDoor_802439D4) = SCRIPT({ sleep 100; }); -Script N(exitSingleDoor_80243A88) = SCRIPT({ +EvtSource N(exitSingleDoor_80243A88) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -87,13 +87,13 @@ Script N(exitSingleDoor_80243A88) = SCRIPT({ sleep 100; }); -Script N(exitWalk_80243B3C) = EXIT_WALK_SCRIPT(40, 3, "dgb_10", 0); +EvtSource N(exitWalk_80243B3C) = EXIT_WALK_SCRIPT(40, 3, "dgb_10", 0); -Script N(80243B98) = SCRIPT({ +EvtSource N(80243B98) = SCRIPT({ bind N(exitWalk_80243B3C) TRIGGER_FLOOR_ABOVE 11; }); -Script N(enterWalk_80243BC4) = SCRIPT({ +EvtSource N(enterWalk_80243BC4) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -125,7 +125,7 @@ Script N(enterWalk_80243BC4) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -148,7 +148,7 @@ static s32 N(pad_3E4C) = { Vec4f N(triggerCoord_80243E50) = { 300.0f, 0.0f, 88.0f, 0.0f }; -Script N(80243E60) = SCRIPT({ +EvtSource N(80243E60) = SCRIPT({ sleep 2; PlayEffect(0x42, 1, 25, 3, 1, 10, 30, 0, 0, 0, 0, 0, 0, 0); loop 10 { @@ -164,7 +164,7 @@ Script N(80243E60) = SCRIPT({ unbind; }); -Script N(80243F6C) = SCRIPT({ +EvtSource N(80243F6C) = SCRIPT({ if (SI_SAVE_FLAG(1051) == 0) { bind N(80243E60) TRIGGER_POINT_BOMB N(triggerCoord_80243E50); EnableModel(29, 0); @@ -178,7 +178,7 @@ static s32 N(pad_3FF8)[] = { 0x00000000, 0x00000000, }; -Script N(80244000) = SCRIPT({ +EvtSource N(80244000) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -228,7 +228,7 @@ NpcAISettings N(npcAISettings_802440EC) = { .unk_2C = 3, }; -Script N(npcAI_8024411C) = SCRIPT({ +EvtSource N(npcAI_8024411C) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 5); SetSelfVar(2, 8); @@ -260,7 +260,7 @@ NpcAISettings N(npcAISettings_802441B8) = { .unk_2C = 1, }; -Script N(npcAI_802441E8) = SCRIPT({ +EvtSource N(npcAI_802441E8) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 10); SetSelfVar(2, 14); @@ -277,7 +277,7 @@ NpcSettings N(npcSettings_80244258) = { .level = 13, }; -Script N(npcAI_80244284) = SCRIPT({ +EvtSource N(npcAI_80244284) = SCRIPT({ EnableNpcShadow(NPC_SELF, FALSE); SetSelfVar(0, 4); SetSelfVar(1, 32); @@ -302,7 +302,7 @@ f32 N(D_80244358_C4AF38)[] = { 1.5f, 20.0f, }; -Script N(80244370) = SCRIPT({ +EvtSource N(80244370) = SCRIPT({ SetSelfEnemyFlagBits(((0x00100000 | 0x01000000 | 0x02000000 | 0x04000000 | 0x08000000 | 0x10000000 | 0x20000000)), TRUE); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT)), TRUE); }); @@ -322,7 +322,7 @@ NpcAISettings N(npcAISettings_802443AC) = { const char N(dgb_00_name_hack)[]; -Script N(npcAI_802443DC) = SCRIPT({ +EvtSource N(npcAI_802443DC) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(5, -650); SetSelfVar(6, 30); @@ -381,7 +381,7 @@ Script N(npcAI_802443DC) = SCRIPT({ sleep 100; }); -Script N(80244804) = SCRIPT({ +EvtSource N(80244804) = SCRIPT({ GetOwnerEncounterTrigger(SI_VAR(0)); match SI_VAR(0) { == 1, 2, 4, 6 { @@ -391,7 +391,7 @@ Script N(80244804) = SCRIPT({ } }); -Script N(80244890) = SCRIPT({ +EvtSource N(80244890) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -480,7 +480,7 @@ StaticNpc N(npcGroup_80244920)[] = { }, }; -Script N(init_80244D00) = SCRIPT({ +EvtSource N(init_80244D00) = SCRIPT({ GetEntryID(SI_VAR(0)); if (SI_VAR(0) == 3) { SetNpcPos(NPC_SELF, 240, 0, 88); @@ -607,7 +607,7 @@ NpcGroupList N(npcGroupList_8024533C) = { #include "world/common/UnkFunc7.inc.c" -ApiStatus N(func_8024061C_C471FC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024061C_C471FC)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -692,7 +692,7 @@ ApiStatus N(func_8024061C_C471FC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -void N(func_802408D0_C474B0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802408D0_C474B0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -709,7 +709,7 @@ void N(func_802408D0_C474B0)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240958_C47538)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240958_C47538)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); PlayerData* playerData = get_player_data(); @@ -765,7 +765,7 @@ void N(func_80240958_C47538)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240C10_C477F0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C10_C477F0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -777,7 +777,7 @@ void N(func_80240C10_C477F0)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240C74_C47854)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C74_C47854)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -787,7 +787,7 @@ void N(func_80240C74_C47854)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 4; } -void N(func_80240D1C_C478FC)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240D1C_C478FC)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -818,7 +818,7 @@ void N(func_80240D1C_C478FC)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240E54_C47A34)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240E54_C47A34)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -834,7 +834,7 @@ void N(func_80240E54_C47A34)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240F00_C47AE0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240F00_C47AE0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 var; @@ -857,7 +857,7 @@ void N(func_80240F00_C47AE0)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241078_C47C58)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241078_C47C58)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -870,7 +870,7 @@ void N(func_80241078_C47C58)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_802410D4_C47CB4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802410D4_C47CB4)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -978,7 +978,7 @@ ApiStatus N(func_802410D4_C47CB4)(ScriptInstance* script, s32 isInitialCall) { #ifdef NON_MATCHING // second npc_raycast_down_sides call -void N(func_802415D4_C481B4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802415D4_C481B4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -1117,7 +1117,7 @@ void N(func_802415D4_C481B4)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(void, "world/area_dgb/dgb_09/C46BE0", dgb_09_func_802415D4_C481B4, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_dgb/dgb_09/C46BE0", dgb_09_func_802415D4_C481B4, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -1127,7 +1127,7 @@ INCLUDE_ASM(void, "world/area_dgb/dgb_09/C46BE0", dgb_09_func_802415D4_C481B4, S #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_80242078_C48C58)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242078_C48C58)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1145,7 +1145,7 @@ void N(func_80242078_C48C58)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_80242730_C49310)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242730_C49310)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1205,7 +1205,7 @@ ApiStatus N(func_80242730_C49310)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -void N(func_8024291C_C494FC)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_8024291C_C494FC)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f0; @@ -1232,7 +1232,7 @@ void N(func_8024291C_C494FC)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80242A74_C49654)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242A74_C49654)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1255,7 +1255,7 @@ void N(func_80242A74_C49654)(ScriptInstance* script, NpcAISettings* aiSettings, } -void N(func_80242B78_C49758)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242B78_C49758)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1269,7 +1269,7 @@ void N(func_80242B78_C49758)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 15; } -void N(func_80242C1C_C497FC)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242C1C_C497FC)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; @@ -1315,7 +1315,7 @@ void N(func_80242C1C_C497FC)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80242EB8_C49A98)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242EB8_C49A98)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1330,7 +1330,7 @@ void N(func_80242EB8_C49A98)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 17; } -void N(func_80242F70_C49B50)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242F70_C49B50)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; @@ -1353,7 +1353,7 @@ void N(func_80242F70_C49B50)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_802430F0_C49CD0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802430F0_C49CD0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1363,7 +1363,7 @@ void N(func_802430F0_C49CD0)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80243138_C49D18)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80243138_C49D18)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1380,7 +1380,7 @@ void N(func_80243138_C49D18)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_802431B8_C49D98)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802431B8_C49D98)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1392,7 +1392,7 @@ void N(func_802431B8_C49D98)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1] = 0x1E; } -void N(func_80243260_C49E40)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80243260_C49E40)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX = npc->pos.x; @@ -1436,7 +1436,7 @@ void N(func_80243260_C49E40)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_80243578_C4A158)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243578_C4A158)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_dgb/dgb_09/dgb_09.h b/src/world/area_dgb/dgb_09/dgb_09.h index a608d44e95..9150323315 100644 --- a/src/world/area_dgb/dgb_09/dgb_09.h +++ b/src/world/area_dgb/dgb_09/dgb_09.h @@ -3,11 +3,11 @@ #define NAMESPACE dgb_09 -ApiStatus N(func_8024061C_C471FC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802410D4_C47CB4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243578_C4A158)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc7)(ScriptInstance *script, s32 isInitialCall); +ApiStatus N(func_8024061C_C471FC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802410D4_C47CB4)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243578_C4A158)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc7)(Evt *script, s32 isInitialCall); NpcGroupList N(npcGroupList_8024533C); -Script N(80243F6C); -Script N(main); +EvtSource N(80243F6C); +EvtSource N(main); diff --git a/src/world/area_dgb/dgb_10/C4C390.c b/src/world/area_dgb/dgb_10/C4C390.c index bd558d8548..abbfa92a31 100644 --- a/src/world/area_dgb/dgb_10/C4C390.c +++ b/src/world/area_dgb/dgb_10/C4C390.c @@ -13,7 +13,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_10_tattle }, }; -Script N(80240250) = SCRIPT({ +EvtSource N(80240250) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -30,13 +30,13 @@ static s32 N(pad_2E8)[] = { 0x00000000, 0x00000000, }; -Script N(exitWalk_802402F0) = EXIT_WALK_SCRIPT(40, 0, "dgb_09", 3); +EvtSource N(exitWalk_802402F0) = EXIT_WALK_SCRIPT(40, 0, "dgb_09", 3); -Script N(8024034C) = SCRIPT({ +EvtSource N(8024034C) = SCRIPT({ bind N(exitWalk_802402F0) TRIGGER_FLOOR_ABOVE 8; }); -Script N(enterWalk_80240378) = SCRIPT({ +EvtSource N(enterWalk_80240378) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -64,7 +64,7 @@ Script N(enterWalk_80240378) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -88,7 +88,7 @@ static s32 N(pad_66C) = { 0x00000000, }; -Script N(80240670) = SCRIPT({ +EvtSource N(80240670) = SCRIPT({ buf_use SI_VAR(0); arr_new 6 SI_VAR(10); buf_read SI_VAR(0); @@ -107,7 +107,7 @@ Script N(80240670) = SCRIPT({ bind N(80240770) TRIGGER_FLOOR_TOUCH 0xF4ACD480; // TODO: what is this id? see also below TODO }); -Script N(80240770) = SCRIPT({ +EvtSource N(80240770) = SCRIPT({ arr_use SI_VAR(0); N(func_80240000_C4C390)(); if (SI_VAR(0) == 0) { @@ -126,7 +126,7 @@ Script N(80240770) = SCRIPT({ } }); -Script N(80240860) = SCRIPT({ +EvtSource N(80240860) = SCRIPT({ buf_use SI_VAR(0); arr_new 6 SI_VAR(9); buf_read SI_VAR(1); @@ -178,7 +178,7 @@ Script N(80240860) = SCRIPT({ goto 0; }); -Script N(80240AF4) = SCRIPT({ +EvtSource N(80240AF4) = SCRIPT({ arr_use SI_VAR(9); GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4)); MakeLerp(0, 5, 3, 1); @@ -207,7 +207,7 @@ Script N(80240AF4) = SCRIPT({ } }); -Script N(80240CB8) = SCRIPT({ +EvtSource N(80240CB8) = SCRIPT({ arr_use SI_VAR(9); MakeItemEntity(SI_ARRAY(5), SI_ARRAY(2), SI_ARRAY(3), SI_ARRAY(4), 3, 0); SI_VAR(2) = 0; @@ -233,7 +233,7 @@ Script N(80240CB8) = SCRIPT({ } }); -Script N(80240E68) = SCRIPT({ +EvtSource N(80240E68) = SCRIPT({ N(func_8024013C_C4C4CC)(); func_802CA988(0, SI_VAR(2), SI_VAR(3), SI_VAR(4), SI_VAR(5)); N(func_802401C0_C4C550)(); @@ -246,19 +246,19 @@ static s32 N(pad_EDC) = { 0x00000000, }; -Script N(80240EE0) = SCRIPT({ +EvtSource N(80240EE0) = SCRIPT({ SI_SAVE_FLAG(1052) = 1; }); -Script N(80240F00) = SCRIPT({ +EvtSource N(80240F00) = SCRIPT({ SI_SAVE_FLAG(1053) = 1; }); -Script N(80240F20) = SCRIPT({ +EvtSource N(80240F20) = SCRIPT({ SI_SAVE_FLAG(1054) = 1; }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ if (SI_SAVE_FLAG(1052) == 0) { MakeEntity(0x802BCE84, 500, 0, -100, 0, MAKE_ENTITY_END); AssignScript(N(80240EE0)); @@ -273,7 +273,7 @@ Script N(makeEntities) = SCRIPT({ } }); -ApiStatus N(func_80240000_C4C390)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_C4C390)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; s32* array = script->array; f32 distance = dist2D(playerStatus->position.x, playerStatus->position.z, array[2], array[3]); @@ -289,7 +289,7 @@ ApiStatus N(func_80240000_C4C390)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802400A0_C4C430)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802400A0_C4C430)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; f32 distance; s32* array = script->array; @@ -306,7 +306,7 @@ ApiStatus N(func_802400A0_C4C430)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_8024013C_C4C4CC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024013C_C4C4CC)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; s32 var; @@ -326,7 +326,7 @@ ApiStatus N(func_8024013C_C4C4CC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802401C0_C4C550)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802401C0_C4C550)(Evt* script, s32 isInitialCall) { if (gPlayerStatus.position.y > -60.0f) { return ApiStatus_BLOCK; } diff --git a/src/world/area_dgb/dgb_10/dgb_10.h b/src/world/area_dgb/dgb_10/dgb_10.h index 589b935463..bb257f3117 100644 --- a/src/world/area_dgb/dgb_10/dgb_10.h +++ b/src/world/area_dgb/dgb_10/dgb_10.h @@ -3,14 +3,14 @@ #define NAMESPACE dgb_10 -ApiStatus N(func_80240000_C4C390)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802400A0_C4C430)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024013C_C4C4CC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802401C0_C4C550)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80240000_C4C390)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802400A0_C4C430)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024013C_C4C4CC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802401C0_C4C550)(Evt* script, s32 isInitialCall); -Script N(80240770); -Script N(80240AF4); -Script N(80240CB8); -Script N(80240E68); -Script N(main); -Script N(makeEntities); +EvtSource N(80240770); +EvtSource N(80240AF4); +EvtSource N(80240CB8); +EvtSource N(80240E68); +EvtSource N(main); +EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_11/C4D3E0.c b/src/world/area_dgb/dgb_11/C4D3E0.c index ff1f339c1d..057856430c 100644 --- a/src/world/area_dgb/dgb_11/C4D3E0.c +++ b/src/world/area_dgb/dgb_11/C4D3E0.c @@ -17,7 +17,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_11_tattle }, }; -Script N(802400D0) = SCRIPT({ +EvtSource N(802400D0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -34,7 +34,7 @@ static s32 N(pad_168)[] = { 0x00000000, 0x00000000, }; -Script N(exitSingleDoor_80240170) = SCRIPT({ +EvtSource N(exitSingleDoor_80240170) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -48,7 +48,7 @@ Script N(exitSingleDoor_80240170) = SCRIPT({ sleep 100; }); -Script N(enterSingleDoor_80240224) = SCRIPT({ +EvtSource N(enterSingleDoor_80240224) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -91,7 +91,7 @@ Script N(enterSingleDoor_80240224) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -108,7 +108,7 @@ static s32 N(pad_56C) = { 0x00000000, }; -Script N(80240570) = SCRIPT({ +EvtSource N(80240570) = SCRIPT({ 0: GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); if (SI_VAR(1) >= SI_VAR(3)) { @@ -119,11 +119,11 @@ Script N(80240570) = SCRIPT({ goto 0; }); -Script N(80240600) = SCRIPT({ +EvtSource N(80240600) = SCRIPT({ PlayerJump(375, 270, -250, 20); }); -Script N(8024062C) = SCRIPT({ +EvtSource N(8024062C) = SCRIPT({ if (SI_AREA_FLAG(3) == 1) { return; } @@ -197,14 +197,14 @@ Script N(8024062C) = SCRIPT({ } }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeItemEntity(ITEM_D_DOWN_JUMP, 250, 75, -100, 17, SI_SAVE_FLAG(1055)); MakeEntity(0x802EAA30, 375, 0, -250, 0, MAKE_ENTITY_END); AssignScript(N(8024062C)); SI_MAP_VAR(0) = SI_VAR(0); }); -ApiStatus N(func_80240000_C4D3E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_C4D3E0)(Evt* script, s32 isInitialCall) { Entity* entity = get_entity_by_index(get_variable(NULL, 0xFD050F80)); if (entity == NULL) { diff --git a/src/world/area_dgb/dgb_11/dgb_11.h b/src/world/area_dgb/dgb_11/dgb_11.h index 50c401fee4..6de3fa245d 100644 --- a/src/world/area_dgb/dgb_11/dgb_11.h +++ b/src/world/area_dgb/dgb_11/dgb_11.h @@ -3,7 +3,7 @@ #define NAMESPACE dgb_11 -ApiStatus N(func_80240000_C4D3E0)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80240000_C4D3E0)(Evt* script, s32 isInitialCall); -Script N(main); -Script N(makeEntities); +EvtSource N(main); +EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_12/C4DEF0.c b/src/world/area_dgb/dgb_12/C4DEF0.c index d32a820231..0d2417b9c7 100644 --- a/src/world/area_dgb/dgb_12/C4DEF0.c +++ b/src/world/area_dgb/dgb_12/C4DEF0.c @@ -13,7 +13,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_12_tattle }, }; -Script N(80240310) = SCRIPT({ +EvtSource N(80240310) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -30,7 +30,7 @@ static s32 N(pad_3A8)[] = { 0x00000000, 0x00000000, }; -Script N(exitSingleDoor_802403B0) = SCRIPT({ +EvtSource N(exitSingleDoor_802403B0) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -44,7 +44,7 @@ Script N(exitSingleDoor_802403B0) = SCRIPT({ sleep 100; }); -Script N(enterSingleDoor_80240464) = SCRIPT({ +EvtSource N(enterSingleDoor_80240464) = SCRIPT({ UseDoorSounds(0); GetEntryID(SI_VAR(0)); match SI_VAR(0) { @@ -56,7 +56,7 @@ Script N(enterSingleDoor_80240464) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -74,7 +74,7 @@ s32 N(lavaResetList_802405C0)[] = { 0x00000005, 0xC3FB8000, 0x00000000, 0xC27C0000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, }; -Script N(802405E0) = SCRIPT({ +EvtSource N(802405E0) = SCRIPT({ group 239; ModifyColliderFlags(3, 12, 0x00000002); ModifyColliderFlags(3, 0, 0x00000002); @@ -125,7 +125,7 @@ static s32 N(pad_868)[] = { #include "world/common/StashVars.inc.c" -Script N(80240874) = SCRIPT({ +EvtSource N(80240874) = SCRIPT({ group 0; SetTimeFreezeMode(TIME_FREEZE_FULL); sleep 40; @@ -134,7 +134,7 @@ Script N(80240874) = SCRIPT({ return; }); -Script N(802408DC) = SCRIPT({ +EvtSource N(802408DC) = SCRIPT({ DisablePlayerInput(TRUE); SI_VAR(0) = SI_VAR(10); if (SI_VAR(10) != 0) { @@ -155,14 +155,14 @@ Script N(802408DC) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(802409BC) = SCRIPT({ +EvtSource N(802409BC) = SCRIPT({ SI_VAR(10) = 19; SI_VAR(11) = 1; SI_SAVE_FLAG(1057) = 1; await N(802408DC); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAE30, -225, 0, -245, 0, ITEM_NONE, MAKE_ENTITY_END); AssignFlag(SI_SAVE_FLAG(1057)); AssignScript(N(802409BC)); diff --git a/src/world/area_dgb/dgb_12/dgb_12.h b/src/world/area_dgb/dgb_12/dgb_12.h index bf7087d715..371dc2e1bd 100644 --- a/src/world/area_dgb/dgb_12/dgb_12.h +++ b/src/world/area_dgb/dgb_12/dgb_12.h @@ -3,6 +3,6 @@ #define NAMESPACE dgb_12 -Script N(802405E0); -Script N(main); -Script N(makeEntities); +EvtSource N(802405E0); +EvtSource N(main); +EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_13/C4E960.c b/src/world/area_dgb/dgb_13/C4E960.c index 0f59ce565c..4b98ee9e0d 100644 --- a/src/world/area_dgb/dgb_13/C4E960.c +++ b/src/world/area_dgb/dgb_13/C4E960.c @@ -12,7 +12,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_13_tattle }, }; -Script N(80240050) = SCRIPT({ +EvtSource N(80240050) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -29,13 +29,13 @@ static s32 N(pad_E8)[] = { 0x00000000, 0x00000000, }; -Script N(exitWalk_802400F0) = EXIT_WALK_SCRIPT(26, 0, "dgb_03", 5); +EvtSource N(exitWalk_802400F0) = EXIT_WALK_SCRIPT(26, 0, "dgb_03", 5); -Script N(8024014C) = SCRIPT({ +EvtSource N(8024014C) = SCRIPT({ bind N(exitWalk_802400F0) TRIGGER_FLOOR_ABOVE 5; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -51,7 +51,7 @@ Script N(main) = SCRIPT({ sleep 1; }); -Script N(80240270) = SCRIPT({ +EvtSource N(80240270) = SCRIPT({ MakeItemEntity(ITEM_MEGA_RUSH, -910, 50, -206, 17, SI_SAVE_FLAG(1058)); MakeItemEntity(ITEM_COIN, -530, 55, -190, 17, SI_SAVE_FLAG(1059)); MakeItemEntity(ITEM_COIN, -510, 55, -175, 17, SI_SAVE_FLAG(1060)); @@ -65,7 +65,7 @@ static s32 N(pad_37C) = { 0x00000000, }; -Script N(80240380) = SCRIPT({ +EvtSource N(80240380) = SCRIPT({ MakeLerp(0, 30, 15, 0); loop { UpdateLerp(); @@ -78,7 +78,7 @@ Script N(80240380) = SCRIPT({ } }); -Script N(80240424) = SCRIPT({ +EvtSource N(80240424) = SCRIPT({ MakeLerp(30, 0, 15, 0); loop { UpdateLerp(); @@ -91,7 +91,7 @@ Script N(80240424) = SCRIPT({ } }); -Script N(802404C8) = SCRIPT({ +EvtSource N(802404C8) = SCRIPT({ MakeLerp(0, 30, 15, 0); loop { UpdateLerp(); @@ -104,7 +104,7 @@ Script N(802404C8) = SCRIPT({ } }); -Script N(8024056C) = SCRIPT({ +EvtSource N(8024056C) = SCRIPT({ MakeLerp(30, 0, 15, 0); loop { UpdateLerp(); @@ -117,7 +117,7 @@ Script N(8024056C) = SCRIPT({ } }); -Script N(80240610) = SCRIPT({ +EvtSource N(80240610) = SCRIPT({ if (SI_MAP_VAR(0) == 0) { await N(80240380); SI_MAP_VAR(0) = 1; @@ -128,7 +128,7 @@ Script N(80240610) = SCRIPT({ unbind; }); -Script N(80240680) = SCRIPT({ +EvtSource N(80240680) = SCRIPT({ ParentColliderToModel(13, 44); bind N(80240610) TRIGGER_WALL_PRESS_A 13; }); diff --git a/src/world/area_dgb/dgb_13/dgb_13.h b/src/world/area_dgb/dgb_13/dgb_13.h index fa3762d650..17ee24905f 100644 --- a/src/world/area_dgb/dgb_13/dgb_13.h +++ b/src/world/area_dgb/dgb_13/dgb_13.h @@ -3,6 +3,6 @@ #define NAMESPACE dgb_13 -Script N(80240270); -Script N(80240680); -Script N(main); +EvtSource N(80240270); +EvtSource N(80240680); +EvtSource N(main); diff --git a/src/world/area_dgb/dgb_14/C4F030.c b/src/world/area_dgb/dgb_14/C4F030.c index 93d6c7a182..80eafbec25 100644 --- a/src/world/area_dgb/dgb_14/C4F030.c +++ b/src/world/area_dgb/dgb_14/C4F030.c @@ -13,7 +13,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_14_tattle }, }; -Script N(80240060) = SCRIPT({ +EvtSource N(80240060) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -30,7 +30,7 @@ static s32 N(pad_F8)[] = { 0x00000000, 0x00000000, }; -Script N(exitDoubleDoor_80240100) = SCRIPT({ +EvtSource N(exitDoubleDoor_80240100) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -44,7 +44,7 @@ Script N(exitDoubleDoor_80240100) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_802401B4) = SCRIPT({ +EvtSource N(exitDoubleDoor_802401B4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -58,7 +58,7 @@ Script N(exitDoubleDoor_802401B4) = SCRIPT({ sleep 100; }); -Script N(enterDoubleDoor_80240268) = SCRIPT({ +EvtSource N(enterDoubleDoor_80240268) = SCRIPT({ UseDoorSounds(3); GetEntryID(SI_VAR(0)); match SI_VAR(0) { @@ -83,7 +83,7 @@ Script N(enterDoubleDoor_80240268) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -101,7 +101,7 @@ static s32 N(pad_47C) = { 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA564, 500, 60, 75, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END); AssignBlockFlag(SI_SAVE_FLAG(1065)); }); diff --git a/src/world/area_dgb/dgb_14/dgb_14.h b/src/world/area_dgb/dgb_14/dgb_14.h index 17b659d124..7fa48db57d 100644 --- a/src/world/area_dgb/dgb_14/dgb_14.h +++ b/src/world/area_dgb/dgb_14/dgb_14.h @@ -3,5 +3,5 @@ #define NAMESPACE dgb_14 -Script N(main); -Script N(makeEntities); +EvtSource N(main); +EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_15/C4F510.c b/src/world/area_dgb/dgb_15/C4F510.c index 536d69645e..4efceba0cf 100644 --- a/src/world/area_dgb/dgb_15/C4F510.c +++ b/src/world/area_dgb/dgb_15/C4F510.c @@ -21,7 +21,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_15_tattle }, }; -Script N(802418E0) = SCRIPT({ +EvtSource N(802418E0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { if (SI_SAVE_VAR(203) == 15) { @@ -47,7 +47,7 @@ s32 N(itemList_802419C0)[] = { ITEM_NONE, }; -Script N(exitDoubleDoor_802419C8) = SCRIPT({ +EvtSource N(exitDoubleDoor_802419C8) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -61,7 +61,7 @@ Script N(exitDoubleDoor_802419C8) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_80241A7C) = SCRIPT({ +EvtSource N(exitDoubleDoor_80241A7C) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -75,7 +75,7 @@ Script N(exitDoubleDoor_80241A7C) = SCRIPT({ sleep 100; }); -Script N(exitSingleDoor_80241B30) = SCRIPT({ +EvtSource N(exitSingleDoor_80241B30) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -91,7 +91,7 @@ Script N(exitSingleDoor_80241B30) = SCRIPT({ const N(pad_XXXX)[] = { 0, 0 }; -Script N(80241BE4) = SCRIPT({ +EvtSource N(80241BE4) = SCRIPT({ bind N(exitDoubleDoor_802419C8) TRIGGER_WALL_PRESS_A 19; bind N(exitSingleDoor_80241B30) TRIGGER_WALL_PRESS_A 6; if (SI_SAVE_FLAG(1066) == 0) { @@ -101,7 +101,7 @@ Script N(80241BE4) = SCRIPT({ } }); -Script N(enterSingleDoor_80241C88) = SCRIPT({ +EvtSource N(enterSingleDoor_80241C88) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -126,7 +126,7 @@ Script N(enterSingleDoor_80241C88) = SCRIPT({ spawn N(80241BE4); }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SI_AREA_FLAG(1) = 0; @@ -146,7 +146,7 @@ static s32 N(pad_1E94)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80241EA0) = SCRIPT({ +EvtSource N(80241EA0) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -173,7 +173,7 @@ s32 N(D_80241F8C_C5149C)[] = { 0x0000000C, 0x42DC0000, 0x42B40000, 0x00000003, }; -Script N(80241FBC) = SCRIPT({ +EvtSource N(80241FBC) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 5); SetSelfVar(2, 8); @@ -186,7 +186,7 @@ s32 N(unk_missing_8024202C)[] = { 0x00000000, 0x00000000, 0x000D0000, }; -Script N(80242058) = SCRIPT({ +EvtSource N(80242058) = SCRIPT({ EnableNpcShadow(NPC_SELF, FALSE); SetSelfVar(0, 4); SetSelfVar(1, 32); @@ -215,7 +215,7 @@ s32 N(unk_missing_80242158)[] = { 0x00000000, 0x00000000, 0x000D0000, }; -Script N(80242184) = SCRIPT({ +EvtSource N(80242184) = SCRIPT({ loop { GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetNpcPos(NPC_WORLD_TUBBA, SI_VAR(1), SI_VAR(2), SI_VAR(3)); @@ -229,7 +229,7 @@ Script N(80242184) = SCRIPT({ SI_AREA_FLAG(1) = 1; }); -Script N(idle_80242238) = SCRIPT({ +EvtSource N(idle_80242238) = SCRIPT({ loop { GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); if (SI_VAR(0) >= -1150) { @@ -268,7 +268,7 @@ Script N(idle_80242238) = SCRIPT({ BindNpcAI(NPC_SELF, N(npcAI_8024274C)); }); -Script N(802424E8) = SCRIPT({ +EvtSource N(802424E8) = SCRIPT({ GetNpcPos(NPC_SELF, SI_VAR(6), SI_VAR(7), SI_VAR(8)); loop { sleep 1; @@ -322,7 +322,7 @@ NpcAISettings N(npcAISettings_8024271C) = { .unk_2C = 1, }; -Script N(npcAI_8024274C) = SCRIPT({ +EvtSource N(npcAI_8024274C) = SCRIPT({ spawn N(80242184); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_GRAVITY)), TRUE); SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM(world_tubba, Palette_00, Anim_C)); @@ -332,13 +332,13 @@ Script N(npcAI_8024274C) = SCRIPT({ const char N(dgb_14_name_hack)[]; -Script N(defeat_802427B0) = SCRIPT({ +EvtSource N(defeat_802427B0) = SCRIPT({ N(UnkFunc1)(); GotoMap(N(dgb_14_name_hack), 1); sleep 100; }); -Script N(init_802427EC) = SCRIPT({ +EvtSource N(init_802427EC) = SCRIPT({ if (SI_STORY_PROGRESS != STORY_CH3_ARRIVED_AT_TUBBAS_MANOR) { RemoveNpc(NPC_SELF); return; @@ -400,7 +400,7 @@ static s32 N(pad_2AC8)[] = { 0x00000000, 0x00000000, }; -Script N(80242AD0) = SCRIPT({ +EvtSource N(80242AD0) = SCRIPT({ group 0; suspend group 1; ShowKeyChoicePopup(); @@ -427,11 +427,11 @@ Script N(80242AD0) = SCRIPT({ unbind; }); -Script N(80242C38) = SCRIPT({ +EvtSource N(80242C38) = SCRIPT({ bind N(exitDoubleDoor_80241A7C) TRIGGER_WALL_PRESS_A 10; }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ if (SI_SAVE_FLAG(1066) == 0) { MakeEntity(0x802BCD68, 130, 8, 175, -80, MAKE_ENTITY_END); AssignScript(N(80242C38)); @@ -451,7 +451,7 @@ Script N(makeEntities) = SCRIPT({ #include "world/common/UnkFunc7.inc.c" -ApiStatus N(func_8024061C_C4FB2C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024061C_C4FB2C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -558,7 +558,7 @@ ApiStatus N(func_8024061C_C4FB2C)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkFunc16.inc.c" -ApiStatus N(func_80241464_C50974)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241464_C50974)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_dgb/dgb_15/dgb_15.h b/src/world/area_dgb/dgb_15/dgb_15.h index 0ad63cce6f..c57c56d4c7 100644 --- a/src/world/area_dgb/dgb_15/dgb_15.h +++ b/src/world/area_dgb/dgb_15/dgb_15.h @@ -3,16 +3,16 @@ #define NAMESPACE dgb_15 -ApiStatus N(GetEntityPosition)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SetEntityFlags100000)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc1)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024061C_C4FB2C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241464_C50974)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc7)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(GetEntityPosition)(Evt* script, s32 isInitialCall); +ApiStatus N(SetEntityFlags100000)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc1)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024061C_C4FB2C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241464_C50974)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc7)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80242AB0); -extern Script N(80242AD0); -extern Script N(main); -extern Script N(makeEntities); -extern Script N(npcAI_8024274C); -extern Script N(unk_80241F8C); +extern EvtSource N(80242AD0); +extern EvtSource N(main); +extern EvtSource N(makeEntities); +extern EvtSource N(npcAI_8024274C); +extern EvtSource N(unk_80241F8C); diff --git a/src/world/area_dgb/dgb_16/C52540.c b/src/world/area_dgb/dgb_16/C52540.c index ad6366c6be..1f1f32d1f5 100644 --- a/src/world/area_dgb/dgb_16/C52540.c +++ b/src/world/area_dgb/dgb_16/C52540.c @@ -31,7 +31,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_16_tattle }, }; -Script N(80241480) = SCRIPT({ +EvtSource N(80241480) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -48,7 +48,7 @@ static s32 N(pad_1518)[] = { 0x00000000, 0x00000000, }; -Script N(exitSingleDoor_80241520) = SCRIPT({ +EvtSource N(exitSingleDoor_80241520) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); @@ -64,7 +64,7 @@ Script N(exitSingleDoor_80241520) = SCRIPT({ const char N(pad_XXX)[] = { 0, 0 }; -Script N(enterSingleDoor_802415D4) = SCRIPT({ +EvtSource N(enterSingleDoor_802415D4) = SCRIPT({ UseDoorSounds(0); GetEntryID(SI_VAR(0)); match SI_VAR(0) { @@ -80,7 +80,7 @@ Script N(enterSingleDoor_802415D4) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -99,7 +99,7 @@ static s32 N(pad_1774)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80241780) = SCRIPT({ +EvtSource N(80241780) = SCRIPT({ MakeItemEntity(ITEM_CASTLE_KEY1, -235, 25, -165, 17, SI_SAVE_FLAG(1069)); }); @@ -107,7 +107,7 @@ static s32 N(pad_17B4)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(802417C0) = SCRIPT({ +EvtSource N(802417C0) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -157,7 +157,7 @@ NpcAISettings N(npcAISettings_802418AC) = { .unk_2C = 1, }; -Script N(npcAI_802418DC) = SCRIPT({ +EvtSource N(npcAI_802418DC) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(1, 10); SetSelfVar(2, 14); @@ -174,7 +174,7 @@ NpcSettings N(npcSettings_8024194C) = { .level = 13, }; -Script N(npcAI_80241978) = SCRIPT({ +EvtSource N(npcAI_80241978) = SCRIPT({ EnableNpcShadow(NPC_SELF, FALSE); SetSelfVar(0, 4); SetSelfVar(1, 32); @@ -625,7 +625,7 @@ NpcGroupList N(npcGroupList_8024318C) = { #include "world/common/UnkFunc7.inc.c" -void N(func_8024061C_C52B5C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_8024061C_C52B5C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -642,7 +642,7 @@ void N(func_8024061C_C52B5C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_802406A4_C52BE4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802406A4_C52BE4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); PlayerData* playerData = get_player_data(); @@ -698,7 +698,7 @@ void N(func_802406A4_C52BE4)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_8024095C_C52E9C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_8024095C_C52E9C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -710,7 +710,7 @@ void N(func_8024095C_C52E9C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_802409C0_C52F00)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802409C0_C52F00)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -720,7 +720,7 @@ void N(func_802409C0_C52F00)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[0] = 4; } -void N(func_80240A68_C52FA8)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240A68_C52FA8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -751,7 +751,7 @@ void N(func_80240A68_C52FA8)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240BA0_C530E0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240BA0_C530E0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -767,7 +767,7 @@ void N(func_80240BA0_C530E0)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240C4C_C5318C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C4C_C5318C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 var; @@ -790,7 +790,7 @@ void N(func_80240C4C_C5318C)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80240DC4_C53304)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240DC4_C53304)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -803,7 +803,7 @@ void N(func_80240DC4_C53304)(ScriptInstance* script, NpcAISettings* aiSettings, } } -ApiStatus N(func_80240E20_C53360)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240E20_C53360)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -907,7 +907,7 @@ ApiStatus N(func_80240E20_C53360)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80241170_C536B0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241170_C536B0)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_dgb/dgb_16/dgb_16.h b/src/world/area_dgb/dgb_16/dgb_16.h index c20e70bdb3..73b4336758 100644 --- a/src/world/area_dgb/dgb_16/dgb_16.h +++ b/src/world/area_dgb/dgb_16/dgb_16.h @@ -3,9 +3,9 @@ #define NAMESPACE dgb_16 -ApiStatus N(func_80240E20_C53360)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc7)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80240E20_C53360)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc7)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_8024318C); -extern Script N(80241780); -extern Script N(main); +extern EvtSource N(80241780); +extern EvtSource N(main); diff --git a/src/world/area_dgb/dgb_17/C55A60.c b/src/world/area_dgb/dgb_17/C55A60.c index 91ccbf47e6..68ff74eb80 100644 --- a/src/world/area_dgb/dgb_17/C55A60.c +++ b/src/world/area_dgb/dgb_17/C55A60.c @@ -13,7 +13,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_17_tattle }, }; -Script N(80240060) = SCRIPT({ +EvtSource N(80240060) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -30,7 +30,7 @@ static s32 N(pad_F8)[] = { 0x00000000, 0x00000000, }; -Script N(exitDoubleDoor_80240100) = SCRIPT({ +EvtSource N(exitDoubleDoor_80240100) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -44,7 +44,7 @@ Script N(exitDoubleDoor_80240100) = SCRIPT({ sleep 100; }); -Script N(exitDoubleDoor_802401B4) = SCRIPT({ +EvtSource N(exitDoubleDoor_802401B4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -58,12 +58,12 @@ Script N(exitDoubleDoor_802401B4) = SCRIPT({ sleep 100; }); -Script N(80240268) = SCRIPT({ +EvtSource N(80240268) = SCRIPT({ bind N(exitDoubleDoor_80240100) TRIGGER_WALL_PRESS_A 7; bind N(exitDoubleDoor_802401B4) TRIGGER_WALL_PRESS_A 11; }); -Script N(enterDoubleDoor_802402B0) = SCRIPT({ +EvtSource N(enterDoubleDoor_802402B0) = SCRIPT({ GetLoadType(SI_VAR(1)); if (SI_VAR(1) == 1) { spawn EnterSavePoint; @@ -87,7 +87,7 @@ Script N(enterDoubleDoor_802402B0) = SCRIPT({ spawn N(80240268); }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -99,7 +99,7 @@ Script N(main) = SCRIPT({ spawn N(enterDoubleDoor_802402B0); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802E9A18, -300, 60, 75, 0, MAKE_ENTITY_END); MakeEntity(0x802EA7E0, -450, 60, 75, 0, MAKE_ENTITY_END); }); diff --git a/src/world/area_dgb/dgb_17/dgb_17.h b/src/world/area_dgb/dgb_17/dgb_17.h index 342f168549..97861ec1ef 100644 --- a/src/world/area_dgb/dgb_17/dgb_17.h +++ b/src/world/area_dgb/dgb_17/dgb_17.h @@ -3,5 +3,5 @@ #define NAMESPACE dgb_17 -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_18/C55F40.c b/src/world/area_dgb/dgb_18/C55F40.c index 0ea7a383c7..128ad5b51c 100644 --- a/src/world/area_dgb/dgb_18/C55F40.c +++ b/src/world/area_dgb/dgb_18/C55F40.c @@ -24,7 +24,7 @@ MapConfig N(config) = { .tattle = { MSG_dgb_18_tattle }, }; -Script N(802412C0) = SCRIPT({ +EvtSource N(802412C0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -41,7 +41,7 @@ static s32 N(pad_1358)[] = { 0x00000000, 0x00000000, }; -Script N(exitDoubleDoor_80241360) = SCRIPT({ +EvtSource N(exitDoubleDoor_80241360) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); @@ -55,7 +55,7 @@ Script N(exitDoubleDoor_80241360) = SCRIPT({ sleep 100; }); -Script N(enterDoubleDoor_80241414) = SCRIPT({ +EvtSource N(enterDoubleDoor_80241414) = SCRIPT({ UseDoorSounds(3); GetEntryID(SI_VAR(0)); match SI_VAR(0) { @@ -67,7 +67,7 @@ Script N(enterDoubleDoor_80241414) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -98,7 +98,7 @@ NpcAISettings N(npcAISettings_80241580) = { .unk_2C = 1, }; -Script N(802415B0) = SCRIPT({ +EvtSource N(802415B0) = SCRIPT({ N(func_80240B94_C56AD4)(N(npcAISettings_80241580)); }); @@ -125,7 +125,7 @@ NpcSettings N(npcSettings_80241628) = { .level = 13, }; -Script N(idle_80241654) = SCRIPT({ +EvtSource N(idle_80241654) = SCRIPT({ 10: GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); sleep 1; @@ -342,7 +342,7 @@ Script N(idle_80241654) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(idle_80242494) = SCRIPT({ +EvtSource N(idle_80242494) = SCRIPT({ SetNpcScale(NPC_SELF, 1.25, 1.25, 1.25); SetNpcPos(NPC_SELF, 600, 50, 115); func_802CDE68(-1, 0); @@ -374,7 +374,7 @@ Script N(idle_80242494) = SCRIPT({ } }); -Script N(npcAI_802426B0) = SCRIPT({ +EvtSource N(npcAI_802426B0) = SCRIPT({ group 11; PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2039, 0); ShowSleepBubble(0, 0, 50, 2, 552, 111, 128, 30, SI_VAR(0)); @@ -397,7 +397,7 @@ Script N(npcAI_802426B0) = SCRIPT({ BindNpcAI(NPC_WORLD_TUBBA, N(npcAI_80242834)); }); -Script N(npcAI_80242834) = SCRIPT({ +EvtSource N(npcAI_80242834) = SCRIPT({ group 11; SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM(world_tubba, Palette_00, Anim_D)); spawn { @@ -413,7 +413,7 @@ Script N(npcAI_80242834) = SCRIPT({ const char N(dgb_01_name_hack)[]; -Script N(defeat_802428E8) = SCRIPT({ +EvtSource N(defeat_802428E8) = SCRIPT({ N(UnkFunc1)(); GotoMap(N(dgb_01_name_hack), 6); sleep 100; @@ -421,7 +421,7 @@ Script N(defeat_802428E8) = SCRIPT({ const char N(pad_XXX)[] = { 0, 0 }; -Script N(init_80242924) = SCRIPT({ +EvtSource N(init_80242924) = SCRIPT({ SetNpcScale(NPC_SELF, 1.25, 1.25, 1.25); BindNpcDefeat(NPC_SELF, N(defeat_802428E8)); match SI_STORY_PROGRESS { @@ -442,7 +442,7 @@ Script N(init_80242924) = SCRIPT({ } }); -Script N(idle_80242A24) = SCRIPT({ +EvtSource N(idle_80242A24) = SCRIPT({ loop { GetSelfVar(0, SI_VAR(0)); if (SI_VAR(0) == 1) { @@ -563,7 +563,7 @@ Script N(idle_80242A24) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(init_8024329C) = SCRIPT({ +EvtSource N(init_8024329C) = SCRIPT({ SetSelfVar(0, 0); BindNpcIdle(NPC_SELF, N(idle_80242A24)); }); @@ -641,7 +641,7 @@ static s32 N(pad_36D8)[] = { s32** N(D_802436E0_C59620) = NULL; // StashVars.inc.c data -Script N(802436E4) = SCRIPT({ +EvtSource N(802436E4) = SCRIPT({ group 0; SetTimeFreezeMode(2); sleep 40; @@ -650,7 +650,7 @@ Script N(802436E4) = SCRIPT({ return; }); -Script N(8024374C) = SCRIPT({ +EvtSource N(8024374C) = SCRIPT({ DisablePlayerInput(TRUE); SI_VAR(0) = SI_VAR(10); if (SI_VAR(10) != 0) { @@ -671,13 +671,13 @@ Script N(8024374C) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(8024382C) = SCRIPT({ +EvtSource N(8024382C) = SCRIPT({ SI_SAVE_FLAG(1071) = 1; AddKeyItem(ITEM_MYSTICAL_KEY); SetNpcVar(1, 0, 1); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAE30, 845, 0, 145, -35, ITEM_NONE, MAKE_ENTITY_END); AssignFlag(SI_SAVE_FLAG(1071)); AssignScript(N(8024382C)); @@ -705,7 +705,7 @@ Script N(makeEntities) = SCRIPT({ #include "world/common/UnkFunc16.inc.c" -ApiStatus N(func_80240B94_C56AD4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B94_C56AD4)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -791,7 +791,7 @@ ApiStatus N(func_80240B94_C56AD4)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkFunc1.inc.c" -ApiStatus N(func_80240EBC_C56DFC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240EBC_C56DFC)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Npc* npc = get_npc_unsafe(0); f32 posX, posZ; diff --git a/src/world/area_dgb/dgb_18/C56EF0.c b/src/world/area_dgb/dgb_18/C56EF0.c index 9d6bb98a36..8b888e42ea 100644 --- a/src/world/area_dgb/dgb_18/C56EF0.c +++ b/src/world/area_dgb/dgb_18/C56EF0.c @@ -1,7 +1,7 @@ #include "dgb_18.h" // TODO: StashVars.inc.c -ApiStatus N(func_80240FB0_C56EF0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240FB0_C56EF0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802436E0_C59620) == NULL) { diff --git a/src/world/area_dgb/dgb_18/dgb_18.h b/src/world/area_dgb/dgb_18/dgb_18.h index caceb467d4..27b1d9addc 100644 --- a/src/world/area_dgb/dgb_18/dgb_18.h +++ b/src/world/area_dgb/dgb_18/dgb_18.h @@ -3,12 +3,12 @@ #define NAMESPACE dgb_18 -ApiStatus N(UnkFunc1)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240B94_C56AD4)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(UnkFunc1)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240B94_C56AD4)(Evt* script, s32 isInitialCall); extern s32** N(D_802436E0_C59620); extern NpcGroupList N(npcGroupList_802436B4); -extern Script N(main); -extern Script N(makeEntities); -extern Script N(npcAI_80242834); +extern EvtSource N(main); +extern EvtSource N(makeEntities); +extern EvtSource N(npcAI_80242834); diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index 4b27703b58..8c57f2be3e 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -60,7 +60,7 @@ typedef struct { void N(func_802430C8_95E2C8)(Unk_Struct_1* ptr, s32 arg1); -Script N(80248504); +EvtSource N(80248504); typedef struct { /* 0x00 */ s32 flags; @@ -110,7 +110,7 @@ MapConfig N(config) = { // Extraneous END_CASE_MULTI #ifdef NON_MATCHING -Script N(80243BB0) = SCRIPT({ +EvtSource N(80243BB0) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { 3, 4 {} @@ -120,22 +120,22 @@ Script N(80243BB0) = SCRIPT({ } }); #else -Script N(80243BB0) = { - SI_CMD(ScriptOpcode_CALL, GetEntryID, SI_VAR(0)), - SI_CMD(ScriptOpcode_MATCH, SI_VAR(0)), - SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 3), - SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 4), - SI_CMD(ScriptOpcode_END_CASE_MULTI), - SI_CMD(ScriptOpcode_CASE_ELSE), - SI_CMD(ScriptOpcode_CALL, SetMusicTrack, 0, SONG_DRY_DRY_OUTPOST, 0, 8), - SI_CMD(ScriptOpcode_END_CASE_MULTI), - SI_CMD(ScriptOpcode_END_MATCH), - SI_CMD(ScriptOpcode_RETURN), - SI_CMD(ScriptOpcode_END) +EvtSource N(80243BB0) = { + SI_CMD(EVT_OP_CALL, GetEntryID, SI_VAR(0)), + SI_CMD(EVT_OP_MATCH, SI_VAR(0)), + SI_CMD(EVT_OP_CASE_MULTI_OR_EQ, 3), + SI_CMD(EVT_OP_CASE_MULTI_OR_EQ, 4), + SI_CMD(EVT_OP_END_CASE_MULTI), + SI_CMD(EVT_OP_CASE_ELSE), + SI_CMD(EVT_OP_CALL, SetMusicTrack, 0, SONG_DRY_DRY_OUTPOST, 0, 8), + SI_CMD(EVT_OP_END_CASE_MULTI), + SI_CMD(EVT_OP_END_MATCH), + SI_CMD(EVT_OP_RETURN), + SI_CMD(EVT_OP_END) }; #endif -Script N(80243C30) = SCRIPT({ +EvtSource N(80243C30) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); DisablePartnerAI(0); @@ -189,7 +189,7 @@ Script N(80243C30) = SCRIPT({ spawn 0xFE363C8A; }); -Script N(80243F84) = SCRIPT({ +EvtSource N(80243F84) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); HidePlayerShadow(TRUE); @@ -250,7 +250,7 @@ Script N(80243F84) = SCRIPT({ spawn 0xFE363C8A; }); -Script N(80244374) = SCRIPT({ +EvtSource N(80244374) = SCRIPT({ N(UnkFunc25)(); if (SI_VAR(0) == 0) { return; @@ -270,7 +270,7 @@ Script N(80244374) = SCRIPT({ await N(80244450); }); -Script N(80244450) = SCRIPT({ +EvtSource N(80244450) = SCRIPT({ N(SetPlayerStatusAnimFlags100000)(); group 27; DisablePlayerPhysics(TRUE); @@ -302,7 +302,7 @@ Script N(80244450) = SCRIPT({ await 0xFE363C8C; }); -Script N(8024462C) = SCRIPT({ +EvtSource N(8024462C) = SCRIPT({ IsPlayerOnValidFloor(SI_VAR(0)); if (SI_VAR(0) == 0) { return; @@ -362,7 +362,7 @@ Script N(8024462C) = SCRIPT({ await 0xFE363C8C; }); -Script N(exitWalk_80244960) = SCRIPT({ +EvtSource N(exitWalk_80244960) = SCRIPT({ group 27; SI_SAVE_FLAG(761) = 0; UseExitHeading(60, 0); @@ -371,14 +371,14 @@ Script N(exitWalk_80244960) = SCRIPT({ sleep 100; }); -Script N(exitWalk_802449CC) = EXIT_WALK_SCRIPT(60, 1, "dro_02", 0); +EvtSource N(exitWalk_802449CC) = EXIT_WALK_SCRIPT(60, 1, "dro_02", 0); -Script N(80244A28) = SCRIPT({ +EvtSource N(80244A28) = SCRIPT({ bind N(exitWalk_80244960) TRIGGER_FLOOR_ABOVE 1; bind N(exitWalk_802449CC) TRIGGER_FLOOR_ABOVE 5; }); -Script N(80244A70) = SCRIPT({ +EvtSource N(80244A70) = SCRIPT({ PlaySound(0x80000060); UseSettingsFrom(0, 175, 0, -201); SetPanTarget(0, 175, 0, -201); @@ -403,7 +403,7 @@ Script N(80244A70) = SCRIPT({ } }); -Script N(enterWalk_80244C14) = SCRIPT({ +EvtSource N(enterWalk_80244C14) = SCRIPT({ GetLoadType(SI_VAR(1)); if (SI_VAR(1) == 1) { spawn EnterSavePoint; @@ -446,7 +446,7 @@ Script N(enterWalk_80244C14) = SCRIPT({ sleep 1; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_DRY_DRY_OUTPOST; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -488,7 +488,7 @@ NpcAISettings N(npcAISettings_80245010) = { .unk_2C = 1, }; -Script N(npcAI_80245040) = SCRIPT({ +EvtSource N(npcAI_80245040) = SCRIPT({ DoBasicAI(N(npcAISettings_80245010)); }); @@ -508,7 +508,7 @@ NpcAISettings N(npcAISettings_8024508C) = { .unk_2C = 1, }; -Script N(npcAI_802450BC) = SCRIPT({ +EvtSource N(npcAI_802450BC) = SCRIPT({ N(func_80241174_95C374)(N(npcAISettings_8024508C)); }); @@ -546,12 +546,12 @@ NpcSettings N(npcSettings_8024518C) = { s32** N(D_802451B8_9603B8) = NULL; -Script N(802451BC) = SCRIPT({ +EvtSource N(802451BC) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 0); return; }); -Script N(802451EC) = SCRIPT({ +EvtSource N(802451EC) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 16); return; }); @@ -580,7 +580,7 @@ N(quizReqStruct) N(quizRequirements)[] = { { 96, 64 }, { 0, 64 }, }; -Script N(802452AC) = SCRIPT({ +EvtSource N(802452AC) = SCRIPT({ N(GetGameStatus75)(); if (SI_VAR(0) <= 1) { GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -592,7 +592,7 @@ Script N(802452AC) = SCRIPT({ } }); -Script N(8024535C) = SCRIPT({ +EvtSource N(8024535C) = SCRIPT({ N(GetCamVfov)(0, SI_ARRAY(0)); N(SetCamVfov)(0, 25); GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -615,7 +615,7 @@ Script N(8024535C) = SCRIPT({ SetCamLeadPlayer(0, 0); }); -Script N(802454F8) = SCRIPT({ +EvtSource N(802454F8) = SCRIPT({ GetNpcPos(NPC_CHUCK_QUIZMO, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 30; SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -631,12 +631,12 @@ Script N(802454F8) = SCRIPT({ SetCamSpeed(0, 1); }); -Script N(802455F4) = SCRIPT({ +EvtSource N(802455F4) = SCRIPT({ N(SetCamVfov)(0, SI_ARRAY(0)); PanToTarget(0, 0, 0); }); -Script N(80245630) = SCRIPT({ +EvtSource N(80245630) = SCRIPT({ sleep 20; N(UnkCameraFunc)(SI_ARRAY(1), SI_ARRAY(3), 83, SI_VAR(0), SI_VAR(1)); spawn { @@ -665,7 +665,7 @@ Script N(80245630) = SCRIPT({ SetPlayerAnimation(ANIM_10002); }); -Script N(802457E0) = SCRIPT({ +EvtSource N(802457E0) = SCRIPT({ GetNpcPos(NPC_PARTNER, SI_VAR(10), SI_VAR(11), SI_VAR(12)); N(UnkCameraFunc)(SI_VAR(10), SI_VAR(12), 108, SI_VAR(0), SI_VAR(1)); SI_VAR(5) = (float) SI_ARRAY(2); @@ -685,7 +685,7 @@ Script N(802457E0) = SCRIPT({ SetNpcAnimation(NPC_PARTNER, 0x106); }); -Script N(80245918) = SCRIPT({ +EvtSource N(80245918) = SCRIPT({ GetNpcPos(NPC_CHUCK_QUIZMO, SI_VAR(10), SI_VAR(11), SI_VAR(12)); N(UnkCameraFunc)(SI_VAR(10), SI_VAR(12), -70, SI_VAR(0), SI_VAR(1)); spawn { @@ -709,26 +709,26 @@ Script N(80245918) = SCRIPT({ SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM(chuck_quizmo, Palette_00, Anim_1)); }); -Script N(80245A84) = SCRIPT({ +EvtSource N(80245A84) = SCRIPT({ spawn N(80245630); spawn N(802457E0); await N(80245918); }); -Script N(80245AB8) = SCRIPT({ +EvtSource N(80245AB8) = SCRIPT({ loop { SetPlayerAnimation(ANIM_QUESTION); sleep 20; } }); -Script N(80245AF8) = SCRIPT({ +EvtSource N(80245AF8) = SCRIPT({ SetPlayerAnimation(ANIM_THROW); sleep 15; SetPlayerAnimation(ANIM_10002); }); -Script N(80245B34) = SCRIPT({ +EvtSource N(80245B34) = SCRIPT({ loop { SetPlayerAnimation(ANIM_10002); sleep 1; @@ -899,14 +899,14 @@ Script N(80245B34) = SCRIPT({ sleep 1; }); -Script N(8024667C) = SCRIPT({ +EvtSource N(8024667C) = SCRIPT({ SetPlayerAnimation(ANIM_SHOCK_STILL); loop { sleep 1; } }); -Script N(802466BC) = SCRIPT({ +EvtSource N(802466BC) = SCRIPT({ spawn { N(UnkCameraFunc)(SI_ARRAY(1), SI_ARRAY(3), 25, SI_VAR(0), SI_VAR(1)); SI_VAR(2) = (float) SI_ARRAY(1); @@ -920,7 +920,7 @@ Script N(802466BC) = SCRIPT({ PlayerMoveTo(SI_ARRAY(1), SI_ARRAY(3), 40); }); -Script N(80246798) = SCRIPT({ +EvtSource N(80246798) = SCRIPT({ SI_VAR(1) = spawn N(80245B34); sleep 60; kill SI_VAR(1); @@ -934,7 +934,7 @@ Script N(80246798) = SCRIPT({ await N(802466BC); }); -Script N(80246848) = SCRIPT({ +EvtSource N(80246848) = SCRIPT({ SI_VAR(1) = spawn N(8024667C); sleep 60; loop 5 { @@ -948,7 +948,7 @@ Script N(80246848) = SCRIPT({ await N(802466BC); }); -Script N(802468F8) = SCRIPT({ +EvtSource N(802468F8) = SCRIPT({ if (SI_SAVE_VAR(352) > 63) { SI_VAR(0) = 0; return; @@ -1148,7 +1148,7 @@ Script N(802468F8) = SCRIPT({ SI_SAVE_FLAG(1793) = 0; }); -Script N(80247628) = SCRIPT({ +EvtSource N(80247628) = SCRIPT({ N(func_802415AC_95C7AC)(); if (SI_VAR(0) == 0) { return; @@ -1158,7 +1158,7 @@ Script N(80247628) = SCRIPT({ N(UnkFunc31)(); }); -Script N(8024769C) = SCRIPT({ +EvtSource N(8024769C) = SCRIPT({ arr_use 0x8024DFC8; // TODO rawptr SI_SAVE_FLAG(1769) = 1; DisablePlayerPhysics(TRUE); @@ -1168,7 +1168,7 @@ Script N(8024769C) = SCRIPT({ SetPlayerFlagBits(4194304, 0); }); -Script N(8024771C) = SCRIPT({ +EvtSource N(8024771C) = SCRIPT({ N(GetNpcUnsafeOwner2)(); }); @@ -1180,7 +1180,7 @@ NpcAISettings N(npcAISettings_80247738) = { .unk_2C = 1, }; -Script N(80247768) = SCRIPT({ +EvtSource N(80247768) = SCRIPT({ DoBasicAI(N(npcAISettings_80247738)); }); @@ -1216,7 +1216,7 @@ s32 N(D_802477E4_9629E4) = { 0x00000000, }; -Script N(802477E8) = SCRIPT({ +EvtSource N(802477E8) = SCRIPT({ SI_VAR(9) = SI_VAR(1); ShowKeyChoicePopup(); SI_VAR(10) = SI_VAR(0); @@ -1240,13 +1240,13 @@ Script N(802477E8) = SCRIPT({ unbind; }); -Script N(8024792C) = SCRIPT({ +EvtSource N(8024792C) = SCRIPT({ N(func_802427BC_95D9BC)(SI_VAR(0)); bind_padlock N(802477E8) 0x10 0 N(D_8024DFF0); N(func_80242730_95D930)(SI_VAR(0)); }); -Script N(8024797C) = SCRIPT({ +EvtSource N(8024797C) = SCRIPT({ loop { GetNpcPos(NPC_PARTNER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); N(UnkYawFunc)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); @@ -1255,7 +1255,7 @@ Script N(8024797C) = SCRIPT({ } }); -Script N(802479FC) = SCRIPT({ +EvtSource N(802479FC) = SCRIPT({ SI_VAR(9) = SI_VAR(1); ShowKeyChoicePopup(); SI_VAR(10) = SI_VAR(0); @@ -1304,7 +1304,7 @@ Script N(802479FC) = SCRIPT({ unbind; }); -Script N(80247D20) = SCRIPT({ +EvtSource N(80247D20) = SCRIPT({ SI_VAR(0) = SI_VAR(11); SI_VAR(1) = SI_VAR(2); N(func_802427BC_95D9BC)(SI_VAR(0)); @@ -1312,7 +1312,7 @@ Script N(80247D20) = SCRIPT({ N(func_80242730_95D930)(SI_VAR(0)); }); -Script N(80247D90) = SCRIPT({ +EvtSource N(80247D90) = SCRIPT({ SI_VAR(12) = 0; if (SI_STORY_PROGRESS < STORY_CH2_PARAKARRY_JOINED_PARTY) { return; @@ -1367,12 +1367,12 @@ s32 N(D_80248088_963288)[] = { 0x0000004C, 0x00000000, }; -Script N(80248090) = SCRIPT({ +EvtSource N(80248090) = SCRIPT({ N(SetManyVars)(6, 9699589, 9699585, 76, 69, 852105, 852106, 852107, 852108, N(D_80248088_963288)); await N(80247D90); }); -Script N(interact_802480E0) = SCRIPT({ +EvtSource N(interact_802480E0) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH2_STAR_SPRIT_DEPARTED) { SpeakToPlayer(NPC_SELF, NPC_ANIM(mouser, Palette_00, Anim_5), NPC_ANIM(mouser, Palette_00, Anim_1), 0, MESSAGE_ID(0x0D, 0x0062)); @@ -1394,11 +1394,11 @@ Script N(interact_802480E0) = SCRIPT({ } }); -Script N(init_802481F8) = SCRIPT({ +EvtSource N(init_802481F8) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_802480E0)); }); -Script N(interact_8024821C) = SCRIPT({ +EvtSource N(interact_8024821C) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { @@ -1430,11 +1430,11 @@ Script N(interact_8024821C) = SCRIPT({ } }); -Script N(init_802483A8) = SCRIPT({ +EvtSource N(init_802483A8) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024821C)); }); -Script N(interact_802483CC) = SCRIPT({ +EvtSource N(interact_802483CC) = SCRIPT({ match SI_AREA_VAR(2) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM(dryite, Palette_02, Anim_4), NPC_ANIM(dryite, Palette_02, Anim_1), 0, MESSAGE_ID(0x0D, 0x0068)); @@ -1455,11 +1455,11 @@ Script N(interact_802483CC) = SCRIPT({ } }); -Script N(init_802484E0) = SCRIPT({ +EvtSource N(init_802484E0) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_802483CC)); }); -Script N(80248504) = SCRIPT({ +EvtSource N(80248504) = SCRIPT({ loop { N(GetFloorCollider)(SI_VAR(0)); if (SI_VAR(0) == 8) { @@ -1511,7 +1511,7 @@ s32 N(D_8024884C_963A4C)[] = { 0x0000007D, 0x00000000, 0xFFFFFFD6, 0x0000004B, 0x0000004B, N(func_802430C8_95E2C8), }; -Script N(interact_80248864) = SCRIPT({ +EvtSource N(interact_80248864) = SCRIPT({ if (SI_SAVE_FLAG(253) == 1) { if (SI_SAVE_FLAG(761) == 1) { N(func_802431B4_95E3B4)(); @@ -1557,7 +1557,7 @@ Script N(interact_80248864) = SCRIPT({ } }); -Script N(init_80248AE4) = SCRIPT({ +EvtSource N(init_80248AE4) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { 3, 4 { @@ -1573,7 +1573,7 @@ Script N(init_80248AE4) = SCRIPT({ } }); -Script N(interact_80248BA0) = SCRIPT({ +EvtSource N(interact_80248BA0) = SCRIPT({ parallel { loop { NpcFaceNpc(NPC_DRYITE2, NPC_DRYITE3, 1); @@ -1592,7 +1592,7 @@ Script N(interact_80248BA0) = SCRIPT({ InterpNpcYaw(NPC_SELF, SI_VAR(0), 0); }); -Script N(init_80248CC8) = SCRIPT({ +EvtSource N(init_80248CC8) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { 3, 4 { @@ -1607,7 +1607,7 @@ s32 N(D_80248D4C_963F4C)[] = { 0x00000067, 0x00000000, }; -Script N(interact_80248D54) = SCRIPT({ +EvtSource N(interact_80248D54) = SCRIPT({ if (SI_SAVE_FLAG(754) == 1) { FindKeyItem(ITEM_MELODY, SI_VAR(0)); if (SI_VAR(0) != -1) { @@ -1688,11 +1688,11 @@ Script N(interact_80248D54) = SCRIPT({ } }); -Script N(init_80249168) = SCRIPT({ +EvtSource N(init_80249168) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80248D54)); }); -Script N(idle_8024918C) = SCRIPT({ +EvtSource N(idle_8024918C) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH2_SHADY_MOUSE_LEFT_SHOP { N(func_80243350_95E550)(16, 190, -134, -131); @@ -1766,7 +1766,7 @@ Script N(idle_8024918C) = SCRIPT({ } }); -Script N(interact_80249750) = SCRIPT({ +EvtSource N(interact_80249750) = SCRIPT({ if (SI_AREA_VAR(4) == 4) { if (SI_AREA_VAR(5) == 1) { SpeakToPlayer(NPC_SELF, NPC_ANIM(mouser, Palette_01, Anim_5), NPC_ANIM(mouser, Palette_01, Anim_1), 0, MESSAGE_ID(0x0D, @@ -1785,22 +1785,22 @@ Script N(interact_80249750) = SCRIPT({ } }); -Script N(init_8024981C) = SCRIPT({ +EvtSource N(init_8024981C) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_8024918C)); BindNpcInteract(NPC_SELF, N(interact_80249750)); }); -Script N(interact_80249854) = SCRIPT({ +EvtSource N(interact_80249854) = SCRIPT({ SpeakToPlayer(NPC_THREE_SISTERS0, NPC_ANIM(three_sisters, Palette_01, Anim_4), NPC_ANIM(three_sisters, Palette_01, Anim_1), 0, MESSAGE_ID(0x0D, 0x008E)); SpeakToPlayer(NPC_THREE_SISTERS1, NPC_ANIM(three_sisters, Palette_01, Anim_4), NPC_ANIM(three_sisters, Palette_01, Anim_1), 0, MESSAGE_ID(0x0D, 0x008F)); SpeakToPlayer(NPC_THREE_SISTERS2, NPC_ANIM(three_sisters, Palette_01, Anim_4), NPC_ANIM(three_sisters, Palette_01, Anim_1), 0, MESSAGE_ID(0x0D, 0x0090)); }); -Script N(init_802498C4) = SCRIPT({ +EvtSource N(init_802498C4) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80249854)); }); -Script N(interact_802498E8) = SCRIPT({ +EvtSource N(interact_802498E8) = SCRIPT({ FindKeyItem(ITEM_FIRST_DEGREE_CARD, SI_VAR(1)); FindKeyItem(ITEM_SECOND_DEGREE_CARD, SI_VAR(2)); FindKeyItem(ITEM_THIRD_DEGREE_CARD, SI_VAR(3)); @@ -1834,15 +1834,15 @@ Script N(interact_802498E8) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM(dryite, Palette_01, Anim_4), NPC_ANIM(dryite, Palette_01, Anim_1), 0, MESSAGE_ID(0x0D, 0x0099)); }); -Script N(init_80249ABC) = SCRIPT({ +EvtSource N(init_80249ABC) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_802498E8)); }); -Script N(interact_80249AE0) = SCRIPT({ +EvtSource N(interact_80249AE0) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM(dryite, Palette_01, Anim_4), NPC_ANIM(dryite, Palette_01, Anim_1), 0, MESSAGE_ID(0x0D, 0x009F)); }); -Script N(init_80249B10) = SCRIPT({ +EvtSource N(init_80249B10) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80249AE0)); }); @@ -2288,29 +2288,29 @@ N(shopPrice) N(shopPriceList_8024B550)[] = { s32** N(D_8024B5B0_9667B0) = NULL; -Script N(8024B5B4) = SCRIPT({ +EvtSource N(8024B5B4) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 0); return; }); -Script N(8024B5E4) = SCRIPT({ +EvtSource N(8024B5E4) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 16); return; }); -Script N(8024B614) = SCRIPT({ +EvtSource N(8024B614) = SCRIPT({ NpcJump0(NPC_MOUSER1, -31, 0, -283, 10); NpcJump0(NPC_MOUSER1, -30, 0, -283, 8); }); -Script N(8024B664) = SCRIPT({ +EvtSource N(8024B664) = SCRIPT({ NpcJump0(NPC_MOUSER1, 20, 0, -259, 10); NpcJump0(NPC_MOUSER1, 20, 0, -259, 4); }); // Extraneous END_IF #ifdef NON_MATCHING -Script N(8024B6B4) = SCRIPT({ +EvtSource N(8024B6B4) = SCRIPT({ N(func_80243578_95E778)(); func_802D2C14(1); await N(8024B614); @@ -2327,28 +2327,28 @@ Script N(8024B6B4) = SCRIPT({ await N(8024B664); }); #else -Script N(8024B6B4) = { - SI_CMD(ScriptOpcode_CALL, N(func_80243578_95E778)), - SI_CMD(ScriptOpcode_CALL, func_802D2C14, 1), - SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(8024B614)), - SI_CMD(ScriptOpcode_IF_LT, SI_STORY_PROGRESS, -64), - SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, 6, 9699589, 9699585, 0, 852103), - SI_CMD(ScriptOpcode_CALL, SetPlayerAnimation, 65538), - SI_CMD(ScriptOpcode_SLEEP_FRAMES, 10), - SI_CMD(ScriptOpcode_CALL, SetPlayerAnimation, 524295), - SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30), - SI_CMD(ScriptOpcode_END_IF), - SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, 6, 9699589, 9699585, 0, 852104), - SI_CMD(ScriptOpcode_SET, SI_STORY_PROGRESS, -64), - SI_CMD(ScriptOpcode_CALL, func_802D2C14, 0), - SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(8024B664)), -SI_CMD(ScriptOpcode_END_IF), -SI_CMD(ScriptOpcode_RETURN), -SI_CMD(ScriptOpcode_END) +EvtSource N(8024B6B4) = { + SI_CMD(EVT_OP_CALL, N(func_80243578_95E778)), + SI_CMD(EVT_OP_CALL, func_802D2C14, 1), + SI_CMD(EVT_OP_AWAIT_SCRIPT, N(8024B614)), + SI_CMD(EVT_OP_IF_LT, SI_STORY_PROGRESS, -64), + SI_CMD(EVT_OP_CALL, SpeakToPlayer, 6, 9699589, 9699585, 0, 852103), + SI_CMD(EVT_OP_CALL, SetPlayerAnimation, 65538), + SI_CMD(EVT_OP_SLEEP_FRAMES, 10), + SI_CMD(EVT_OP_CALL, SetPlayerAnimation, 524295), + SI_CMD(EVT_OP_SLEEP_FRAMES, 30), + SI_CMD(EVT_OP_END_IF), + SI_CMD(EVT_OP_CALL, SpeakToPlayer, 6, 9699589, 9699585, 0, 852104), + SI_CMD(EVT_OP_SET, SI_STORY_PROGRESS, -64), + SI_CMD(EVT_OP_CALL, func_802D2C14, 0), + SI_CMD(EVT_OP_AWAIT_SCRIPT, N(8024B664)), +SI_CMD(EVT_OP_END_IF), +SI_CMD(EVT_OP_RETURN), +SI_CMD(EVT_OP_END) }; #endif -Script N(8024B7B0) = SCRIPT({ +EvtSource N(8024B7B0) = SCRIPT({ if (SI_SAVE_FLAG(758) == 0) { N(func_80243578_95E778)(); func_802D2C14(1); @@ -2366,7 +2366,7 @@ Script N(8024B7B0) = SCRIPT({ } }); -Script N(8024B894) = SCRIPT({ +EvtSource N(8024B894) = SCRIPT({ match SI_VAR(0) { == 3 {} == 4 {} @@ -2421,11 +2421,11 @@ s32 N(pad_BA9C) = { 0x00000000, }; -Script N(openDoor_8024BAA0) = SCRIPT({ +EvtSource N(openDoor_8024BAA0) = SCRIPT({ RotateModel(103, SI_VAR(0), 0, 1, 0); }); -Script N(moveWalls_8024BAD0) = SCRIPT({ +EvtSource N(moveWalls_8024BAD0) = SCRIPT({ SI_VAR(1) = SI_VAR(0); SI_VAR(1) /= (float) 50; TranslateModel(98, 0, SI_VAR(1), 0); @@ -2436,18 +2436,18 @@ Script N(moveWalls_8024BAD0) = SCRIPT({ RotateModel(101, SI_VAR(0), -1, 0, 0); }); -Script N(dropDoor_8024BBB8) = SCRIPT({ +EvtSource N(dropDoor_8024BBB8) = SCRIPT({ SI_VAR(1) = SI_VAR(0); SI_VAR(1) /= (float) 50; TranslateModel(103, 0, SI_VAR(1), 0); RotateModel(103, SI_VAR(0), 1, 0, 0); }); -Script N(openDoor_8024BC24) = SCRIPT({ +EvtSource N(openDoor_8024BC24) = SCRIPT({ RotateModel(83, SI_VAR(0), 0, 1, 0); }); -Script N(moveWalls_8024BC54) = SCRIPT({ +EvtSource N(moveWalls_8024BC54) = SCRIPT({ SI_VAR(1) = SI_VAR(0); SI_VAR(1) /= (float) 50; TranslateModel(47, 0, SI_VAR(1), 0); @@ -2461,18 +2461,18 @@ Script N(moveWalls_8024BC54) = SCRIPT({ RotateModel(45, SI_VAR(0), -1, 0, 0); }); -Script N(openDoor_8024BD9C) = SCRIPT({ +EvtSource N(openDoor_8024BD9C) = SCRIPT({ RotateModel(157, SI_VAR(0), 0, 1, 0); }); -Script N(dropDoor_8024BDCC) = SCRIPT({ +EvtSource N(dropDoor_8024BDCC) = SCRIPT({ SI_VAR(1) = SI_VAR(0); SI_VAR(1) /= 45; TranslateModel(157, 0, SI_VAR(1), 0); RotateModel(157, SI_VAR(0), 1, 0, 0); }); -Script N(moveWalls_8024BE38) = SCRIPT({ +EvtSource N(moveWalls_8024BE38) = SCRIPT({ if (SI_VAR(0) == 90) { EnableModel(142, 0); } else { @@ -2493,7 +2493,7 @@ Script N(moveWalls_8024BE38) = SCRIPT({ RotateModel(142, SI_VAR(0), 1, 0, 0); }); -Script N(toggleVis_8024BFDC) = SCRIPT({ +EvtSource N(toggleVis_8024BFDC) = SCRIPT({ match SI_VAR(0) { == 0 { SetGroupEnabled(127, 1); @@ -2504,7 +2504,7 @@ Script N(toggleVis_8024BFDC) = SCRIPT({ } }); -Script N(toggleVis_8024C040) = SCRIPT({ +EvtSource N(toggleVis_8024C040) = SCRIPT({ match SI_VAR(0) { == 0 { match SI_STORY_PROGRESS { @@ -2535,7 +2535,7 @@ Script N(toggleVis_8024C040) = SCRIPT({ } }); -Script N(toggleVis_8024C190) = SCRIPT({ +EvtSource N(toggleVis_8024C190) = SCRIPT({ match SI_VAR(0) { == 0 { SetGroupEnabled(156, 1); @@ -2559,7 +2559,7 @@ s32 N(npcList_8024C210)[] = { 0x00000005, 0xFFFFFFFF, }; -Script N(8024C218) = SCRIPT({ +EvtSource N(8024C218) = SCRIPT({ MakeDoorAdvanced(5, N(openDoor_8024BAA0), N(moveWalls_8024BAD0), N(dropDoor_8024BBB8), N(toggleVis_8024BFDC), 15, 16, 128, N(npcList_8024C200)); MakeDoorAdvanced(5, N(openDoor_8024BC24), N(moveWalls_8024BC54), 0, N(toggleVis_8024C040), 23, 24, 91, N(npcList_8024C208)); MakeDoorAdvanced(5, N(openDoor_8024BD9C), N(moveWalls_8024BE38), N(dropDoor_8024BDCC), N(toggleVis_8024C190), 29, 30, 159, N(npcList_8024C210)); @@ -2569,7 +2569,7 @@ Script N(8024C218) = SCRIPT({ spawn N(toggleVis_8024C190); }); -Script N(8024C2EC) = SCRIPT({ +EvtSource N(8024C2EC) = SCRIPT({ 9: MakeLerp(10, -10, 30, 10); 10: @@ -2590,7 +2590,7 @@ Script N(8024C2EC) = SCRIPT({ goto 9; }); -Script N(8024C41C) = SCRIPT({ +EvtSource N(8024C41C) = SCRIPT({ SetGroupEnabled(82, 1); PlaySoundAtCollider(23, 449, 0); MakeLerp(0, 100, 15, 4); @@ -2603,7 +2603,7 @@ Script N(8024C41C) = SCRIPT({ } }); -Script N(8024C4C8) = SCRIPT({ +EvtSource N(8024C4C8) = SCRIPT({ MakeLerp(100, 0, 15, 4); 10: UpdateLerp(); @@ -2620,7 +2620,7 @@ s32 N(pad_C574)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(8024C580) = SCRIPT({ +EvtSource N(8024C580) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); DisablePartnerAI(0); @@ -2674,7 +2674,7 @@ Script N(8024C580) = SCRIPT({ spawn 0xFE363C8A; }); -Script N(8024C8D4) = SCRIPT({ +EvtSource N(8024C8D4) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); HidePlayerShadow(TRUE); @@ -2735,7 +2735,7 @@ Script N(8024C8D4) = SCRIPT({ spawn 0xFE363C8A; }); -Script N(8024CCC4) = SCRIPT({ +EvtSource N(8024CCC4) = SCRIPT({ N(dup_UnkFunc25)(); if (SI_VAR(0) == 0) { return; @@ -2755,7 +2755,7 @@ Script N(8024CCC4) = SCRIPT({ await N(8024CDA0); }); -Script N(8024CDA0) = SCRIPT({ +EvtSource N(8024CDA0) = SCRIPT({ N(dup_SetPlayerStatusAnimFlags100000)(); group 27; DisablePlayerPhysics(TRUE); @@ -2787,7 +2787,7 @@ Script N(8024CDA0) = SCRIPT({ await 0xFE363C8C; }); -Script N(8024CF7C) = SCRIPT({ +EvtSource N(8024CF7C) = SCRIPT({ IsPlayerOnValidFloor(SI_VAR(0)); if (SI_VAR(0) == 0) { return; @@ -2849,13 +2849,13 @@ Script N(8024CF7C) = SCRIPT({ const char N(dro_01_name_hack)[]; -Script N(8024D2B0) = SCRIPT({ +EvtSource N(8024D2B0) = SCRIPT({ SI_SAVE_FLAG(761) = 0; GotoMap(N(dro_01_name_hack), 4); sleep 100; }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802E9A18, -211, 60, -50, 30, MAKE_ENTITY_END); if (SI_SAVE_FLAG(1939) == 0) { if (SI_SAVE_FLAG(1933) == 1) { @@ -2890,7 +2890,7 @@ Script N(makeEntities) = SCRIPT({ #include "world/common/UnkFunc16.inc.c" -ApiStatus N(func_80241174_95C374)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241174_95C374)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -2974,7 +2974,7 @@ ApiStatus N(func_80241174_95C374)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80241470_95C670)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241470_95C670)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802451B8_9603B8) == NULL) { @@ -2997,7 +2997,7 @@ ApiStatus N(func_80241470_95C670)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/Set80151310.inc.c" // Ok good luck. -ApiStatus N(func_802415AC_95C7AC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802415AC_95C7AC)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -3056,7 +3056,7 @@ ApiStatus N(func_802415AC_95C7AC)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkFunc31.inc.c" -ApiStatus N(func_80241B5C_95CD5C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241B5C_95CD5C)(Evt* script, s32 isInitialCall) { u16 quizzesAnswered = gPlayerData.quizzesAnswered; if (quizzesAnswered < 999) { @@ -3073,7 +3073,7 @@ ApiStatus N(func_80241B5C_95CD5C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80241BE0_95CDE0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241BE0_95CDE0)(Evt* script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -3107,7 +3107,7 @@ ApiStatus N(func_80241BE0_95CDE0)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80241DF8_95CFF8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241DF8_95CFF8)(Evt* script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -3132,12 +3132,12 @@ ApiStatus N(func_80241DF8_95CFF8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80241EAC_95D0AC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241EAC_95D0AC)(Evt* script, s32 isInitialCall) { N(D_8024DFE0)->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus N(func_80241EE0_95D0E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241EE0_95D0E0)(Evt* script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = N(D_8024DFE0)->unk_0C; @@ -3159,17 +3159,17 @@ ApiStatus N(func_80241EE0_95D0E0)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80241F60_95D160)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241F60_95D160)(Evt* script, s32 isInitialCall) { N(D_8024DFE8)->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } -ApiStatus N(func_80241F78_95D178)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241F78_95D178)(Evt* script, s32 isInitialCall) { N(D_8024DFE8)->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } -ApiStatus N(func_80241F94_95D194)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241F94_95D194)(Evt* script, s32 isInitialCall) { N(D_8024DFE8)->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -3196,7 +3196,7 @@ void N(func_80242468_95D668)(void) { } } -ApiStatus N(func_802424D4_95D6D4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802424D4_95D6D4)(Evt* script, s32 isInitialCall) { N(D_8024DFC0) = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -3205,7 +3205,7 @@ ApiStatus N(func_802424D4_95D6D4)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/AddPlayerHandsOffset.inc.c" -ApiStatus N(func_80242730_95D930)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242730_95D930)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr; @@ -3225,7 +3225,7 @@ ApiStatus N(func_80242730_95D930)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80242784_95D984)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242784_95D984)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802477E4_9629E4) = get_variable(script, *args); @@ -3233,7 +3233,7 @@ ApiStatus N(func_80242784_95D984)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802427BC_95D9BC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802427BC_95D9BC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -3252,7 +3252,7 @@ ApiStatus N(func_802427BC_95D9BC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80242858_95DA58)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242858_95DA58)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Unk_Struct_2* temp_s1 = get_variable(script, *script->ptrReadPos); Unk_Struct_1* ptr; @@ -3377,7 +3377,7 @@ ApiStatus N(func_80242858_95DA58)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkYawFunc.inc.c" -ApiStatus N(func_80243014_95E214)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243014_95E214)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(script->varTable[2]); N(D_8024E1B4) = npc->currentAnim.w; @@ -3385,12 +3385,12 @@ ApiStatus N(func_80243014_95E214)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80243058_95E258)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243058_95E258)(Evt* script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim.w = N(D_8024E1B4); return ApiStatus_DONE2; } -ApiStatus N(func_80243084_95E284)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243084_95E284)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; playerData->unk_328 = playerData->frameCounter; @@ -3421,7 +3421,7 @@ void N(func_802430C8_95E2C8)(Unk_Struct_1* ptr, s32 arg1) { } } -ApiStatus N(func_802431B4_95E3B4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802431B4_95E3B4)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; s32 val = (playerData->frameCounter - playerData->unk_328) / 3600; @@ -3434,7 +3434,7 @@ ApiStatus N(func_802431B4_95E3B4)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802431FC_95E3FC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802431FC_95E3FC)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Npc* npc = get_npc_safe(script->owner2.npcID); s32 rand; @@ -3457,7 +3457,7 @@ ApiStatus N(func_802431FC_95E3FC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80243350_95E550)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243350_95E550)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; f32 var1 = get_variable(script, *args++); diff --git a/src/world/area_dro/dro_01/95E660.c b/src/world/area_dro/dro_01/95E660.c index 972ec7b70f..1be52498f8 100644 --- a/src/world/area_dro/dro_01/95E660.c +++ b/src/world/area_dro/dro_01/95E660.c @@ -1,6 +1,6 @@ #include "dro_01.h" -ApiStatus N(func_80243460_95E660)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243460_95E660)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_8024B5B0_9667B0) == NULL) { @@ -22,7 +22,7 @@ ApiStatus N(func_80243460_95E660)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/GetItemName.inc.c" #define NAMESPACE dro_01 -ApiStatus N(func_80243578_95E778)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243578_95E778)(Evt* script, s32 isInitialCall) { func_800E96C8(); return ApiStatus_DONE2; } diff --git a/src/world/area_dro/dro_01/95E7A0.c b/src/world/area_dro/dro_01/95E7A0.c index 10eb6ca6d4..ac1a0610a1 100644 --- a/src/world/area_dro/dro_01/95E7A0.c +++ b/src/world/area_dro/dro_01/95E7A0.c @@ -56,7 +56,7 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_8024DD68) = { 120.0f, 0.0f, -43.0f, 0.0f }; -Script N(8024DD78) = SCRIPT({ +EvtSource N(8024DD78) = SCRIPT({ SI_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 11; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_8024DD68); diff --git a/src/world/area_dro/dro_01/dro_01.h b/src/world/area_dro/dro_01/dro_01.h index 65ba3efc85..4e22391f55 100644 --- a/src/world/area_dro/dro_01/dro_01.h +++ b/src/world/area_dro/dro_01/dro_01.h @@ -15,60 +15,60 @@ typedef struct { u32 unk_08; } N(shopPrice); -ApiStatus N(GetCamVfov)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetCurrentCameraYawClamped180)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetCurrentFloor)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetEntryPos)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetGameStatus75)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetNpcUnsafeOwner2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(Set80151310_0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(Set80151310_1)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SetCamVfov)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SetManyVars)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SetPlayerStatusAnimFlags100000)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SomeXYZFunc2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(AddPlayerHandsOffset)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkAlphaFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkCameraFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkMovePartner)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkRotatePartner)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkRotatePlayer)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkYawFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc25)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc27)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc26)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241174_95C374)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802415AC_95C7AC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc31)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc29)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241B5C_95CD5C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241BE0_95CDE0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241DF8_95CFF8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241EAC_95D0AC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241EE0_95D0E0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241F60_95D160)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241F78_95D178)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241F94_95D194)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802424D4_95D6D4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242730_95D930)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242784_95D984)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802427BC_95D9BC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242858_95DA58)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243014_95E214)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243058_95E258)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243084_95E284)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetFloorCollider)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802431B4_95E3B4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802431FC_95E3FC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243350_95E550)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243578_95E778)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(dup_UnkFunc25)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(dup_GetCurrentCameraYawClamped180)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(dup_GetCurrentFloor)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(dup_GetEntryPos)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(dup_SetPlayerStatusAnimFlags100000)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(dup_SomeXYZFunc2)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(GetCamVfov)(Evt* script, s32 isInitialCall); +ApiStatus N(GetCurrentCameraYawClamped180)(Evt* script, s32 isInitialCall); +ApiStatus N(GetCurrentFloor)(Evt* script, s32 isInitialCall); +ApiStatus N(GetEntryPos)(Evt* script, s32 isInitialCall); +ApiStatus N(GetGameStatus75)(Evt* script, s32 isInitialCall); +ApiStatus N(GetNpcUnsafeOwner2)(Evt* script, s32 isInitialCall); +ApiStatus N(Set80151310_0)(Evt* script, s32 isInitialCall); +ApiStatus N(Set80151310_1)(Evt* script, s32 isInitialCall); +ApiStatus N(SetCamVfov)(Evt* script, s32 isInitialCall); +ApiStatus N(SetManyVars)(Evt* script, s32 isInitialCall); +ApiStatus N(SetPlayerStatusAnimFlags100000)(Evt* script, s32 isInitialCall); +ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); +ApiStatus N(SomeXYZFunc2)(Evt* script, s32 isInitialCall); +ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkAlphaFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkCameraFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkMovePartner)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkRotatePartner)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkRotatePlayer)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkYawFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc25)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc27)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc26)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241174_95C374)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802415AC_95C7AC)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc31)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc29)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241B5C_95CD5C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241BE0_95CDE0)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241DF8_95CFF8)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241EAC_95D0AC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241EE0_95D0E0)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241F60_95D160)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241F78_95D178)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241F94_95D194)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802424D4_95D6D4)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242730_95D930)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242784_95D984)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802427BC_95D9BC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242858_95DA58)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243014_95E214)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243058_95E258)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243084_95E284)(Evt* script, s32 isInitialCall); +ApiStatus N(GetFloorCollider)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802431B4_95E3B4)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802431FC_95E3FC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243350_95E550)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243578_95E778)(Evt* script, s32 isInitialCall); +ApiStatus N(dup_UnkFunc25)(Evt* script, s32 isInitialCall); +ApiStatus N(dup_GetCurrentCameraYawClamped180)(Evt* script, s32 isInitialCall); +ApiStatus N(dup_GetCurrentFloor)(Evt* script, s32 isInitialCall); +ApiStatus N(dup_GetEntryPos)(Evt* script, s32 isInitialCall); +ApiStatus N(dup_SetPlayerStatusAnimFlags100000)(Evt* script, s32 isInitialCall); +ApiStatus N(dup_SomeXYZFunc2)(Evt* script, s32 isInitialCall); extern s32** N(D_8024B5B0_9667B0); extern N(shopInventory) N(shopInventory_8024B4FC)[]; @@ -76,16 +76,16 @@ extern N(shopPrice) N(shopPriceList_8024B550)[]; extern NpcGroupList N(npcGroupList_8024B464); extern NpcGroupList N(npcGroupList_8024B47C); -extern Script N(80244450); -extern Script N(8024C218); -extern Script N(8024C2EC); -extern Script N(8024C41C); -extern Script N(8024C4C8); -extern Script N(8024CDA0); -extern Script N(8024DD78); -extern Script N(main); -extern Script N(makeEntities); -extern Script N(shopItemPositions_8024BA68); -extern Script N(shopOwnerNPC_8024BA80); -extern Script N(unk_80248088); -extern Script N(unk_8024884C); +extern EvtSource N(80244450); +extern EvtSource N(8024C218); +extern EvtSource N(8024C2EC); +extern EvtSource N(8024C41C); +extern EvtSource N(8024C4C8); +extern EvtSource N(8024CDA0); +extern EvtSource N(8024DD78); +extern EvtSource N(main); +extern EvtSource N(makeEntities); +extern EvtSource N(shopItemPositions_8024BA68); +extern EvtSource N(shopOwnerNPC_8024BA80); +extern EvtSource N(unk_80248088); +extern EvtSource N(unk_8024884C); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 5246b1eb95..17e9533ee0 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -63,7 +63,7 @@ static s8 N(pad_D_8024EFBC)[0x4]; static EffectGraphics* N(D_8024EFC0); static EffectGraphics* N(D_8024EFC4); static EffectGraphics* N(D_8024EFC8); -static ScriptInstance* N(D_8024EFCC); +static Evt* N(D_8024EFCC); static s32 N(D_8024EFD0)[16]; static D_8024F010_Struct N(D_8024F010)[3]; static s8 N(pad_D_8024F07C)[0x4]; @@ -92,7 +92,7 @@ MapConfig N(config) = { // Extraneous END_CASE_MULTI #ifdef NON_MATCHING -Script N(80243AF0) = SCRIPT({ +EvtSource N(80243AF0) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { 2, 3 {} @@ -102,26 +102,26 @@ Script N(80243AF0) = SCRIPT({ } }); #else -Script N(80243AF0) = { - SI_CMD(ScriptOpcode_CALL, GetEntryID, SI_VAR(0)), - SI_CMD(ScriptOpcode_MATCH, SI_VAR(0)), - SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 2), - SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 3), - SI_CMD(ScriptOpcode_END_CASE_MULTI), - SI_CMD(ScriptOpcode_CASE_ELSE), - SI_CMD(ScriptOpcode_CALL, SetMusicTrack, 0, 21, 0, 8), - SI_CMD(ScriptOpcode_END_CASE_MULTI), - SI_CMD(ScriptOpcode_END_MATCH), - SI_CMD(ScriptOpcode_RETURN), - SI_CMD(ScriptOpcode_END) +EvtSource N(80243AF0) = { + SI_CMD(EVT_OP_CALL, GetEntryID, SI_VAR(0)), + SI_CMD(EVT_OP_MATCH, SI_VAR(0)), + SI_CMD(EVT_OP_CASE_MULTI_OR_EQ, 2), + SI_CMD(EVT_OP_CASE_MULTI_OR_EQ, 3), + SI_CMD(EVT_OP_END_CASE_MULTI), + SI_CMD(EVT_OP_CASE_ELSE), + SI_CMD(EVT_OP_CALL, SetMusicTrack, 0, 21, 0, 8), + SI_CMD(EVT_OP_END_CASE_MULTI), + SI_CMD(EVT_OP_END_MATCH), + SI_CMD(EVT_OP_RETURN), + SI_CMD(EVT_OP_END) }; #endif -Script N(80243B70) = SCRIPT({ +EvtSource N(80243B70) = SCRIPT({ SetMusicTrack(0, SONG_TAKING_REST, 0, 8); }); -Script N(80243B9C) = SCRIPT({ +EvtSource N(80243B9C) = SCRIPT({ SetMusicTrack(0, SONG_MOUSTAFA_THEME, 0, 8); }); @@ -129,7 +129,7 @@ static s32 N(pad_3BC8)[] = { 0x00000000, 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeItemEntity(ITEM_LETTER08, -135, 160, -245, 17, SI_SAVE_FLAG(757)); MakeEntity(0x802EAB04, 180, 173, -200, 0, ITEM_STOREROOM_KEY, MAKE_ENTITY_END); AssignPanelFlag(SI_SAVE_FLAG(756)); @@ -139,19 +139,19 @@ static s32 N(pad_3C3C) = { 0x00000000, }; -Script N(exitWalk_80243C40) = EXIT_WALK_SCRIPT(60, 0, "dro_01", 1); +EvtSource N(exitWalk_80243C40) = EXIT_WALK_SCRIPT(60, 0, "dro_01", 1); -Script N(80243C9C) = SCRIPT({ +EvtSource N(80243C9C) = SCRIPT({ bind N(exitWalk_80243C40) TRIGGER_FLOOR_ABOVE 4; }); -Script N(80243CC8) = SCRIPT({ +EvtSource N(80243CC8) = SCRIPT({ DisablePlayerInput(TRUE); ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x017C), 160, 40); DisablePlayerInput(FALSE); }); -Script N(80243D10) = SCRIPT({ +EvtSource N(80243D10) = SCRIPT({ PlaySound(0x80000060); UseSettingsFrom(0, 190, 0, -37); SetPanTarget(0, 190, 0, -37); @@ -178,7 +178,7 @@ Script N(80243D10) = SCRIPT({ } }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_DRY_DRY_OUTPOST; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -232,7 +232,7 @@ static s32 N(pad_41B4)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(802441C0) = SCRIPT({ +EvtSource N(802441C0) = SCRIPT({ 9: MakeLerp(10, -10, 30, 10); 10: @@ -253,18 +253,18 @@ Script N(802441C0) = SCRIPT({ goto 9; }); -Script N(802442F0) = SCRIPT({ +EvtSource N(802442F0) = SCRIPT({ SI_VAR(0) /= 2; SI_VAR(0) += 18; RotateModel(21, SI_VAR(0), 0, 1, 0); }); -Script N(openDoor_80244340) = SCRIPT({ +EvtSource N(openDoor_80244340) = SCRIPT({ RotateModel(108, SI_VAR(0), 0, -1, 0); RotateModel(110, SI_VAR(0), 0, 1, 0); }); -Script N(moveWalls_80244390) = SCRIPT({ +EvtSource N(moveWalls_80244390) = SCRIPT({ SI_VAR(1) = SI_VAR(0); SI_VAR(1) /= (float) 50; TranslateModel(104, 0, SI_VAR(1), 0); @@ -275,7 +275,7 @@ Script N(moveWalls_80244390) = SCRIPT({ RotateModel(106, SI_VAR(0), 1, 0, 0); }); -Script N(dropDoor_80244474) = SCRIPT({ +EvtSource N(dropDoor_80244474) = SCRIPT({ SI_VAR(1) = SI_VAR(0); SI_VAR(1) /= (float) 50; TranslateModel(108, 0, SI_VAR(1), 0); @@ -284,17 +284,17 @@ Script N(dropDoor_80244474) = SCRIPT({ RotateModel(110, SI_VAR(0), 1, 0, 0); }); -Script N(openDoor_8024451C) = SCRIPT({ +EvtSource N(openDoor_8024451C) = SCRIPT({ RotateModel(62, SI_VAR(0), 0, 1, 0); }); -Script N(moveWalls_8024454C) = SCRIPT({ +EvtSource N(moveWalls_8024454C) = SCRIPT({ SI_VAR(1) = SI_VAR(0); SI_VAR(1) /= (float) 50; RotateGroup(61, SI_VAR(0), 0, 0, -1); }); -Script N(8024459C) = SCRIPT({ +EvtSource N(8024459C) = SCRIPT({ match SI_VAR(0) { == 0 { SetCamSpeed(0, 3.0); @@ -305,7 +305,7 @@ Script N(8024459C) = SCRIPT({ } }); -Script N(toggleVis_80244600) = SCRIPT({ +EvtSource N(toggleVis_80244600) = SCRIPT({ match SI_VAR(0) { == 0 { SetGroupEnabled(87, 1); @@ -318,7 +318,7 @@ Script N(toggleVis_80244600) = SCRIPT({ } }); -Script N(toggleVis_8024468C) = SCRIPT({ +EvtSource N(toggleVis_8024468C) = SCRIPT({ match SI_VAR(0) { == 0 { SetGroupEnabled(132, 1); @@ -347,7 +347,7 @@ Script N(toggleVis_8024468C) = SCRIPT({ } }); -Script N(8024486C) = SCRIPT({ +EvtSource N(8024486C) = SCRIPT({ group 0; DisablePlayerInput(TRUE); func_802D2C14(1); @@ -379,7 +379,7 @@ Script N(8024486C) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80244A68) = SCRIPT({ +EvtSource N(80244A68) = SCRIPT({ group 0; DisablePlayerInput(TRUE); func_802D2C14(1); @@ -419,7 +419,7 @@ s32 N(npcList_80244C70)[] = { 0x00000003, 0xFFFFFFFF, }; -Script N(80244C78) = SCRIPT({ +EvtSource N(80244C78) = SCRIPT({ spawn N(802441C0); ParentColliderToModel(8, 21); if (SI_STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { @@ -444,12 +444,12 @@ static s32 N(pad_4DD4)[] = { s32** N(D_80244DE0_96DFA0) = NULL; -Script N(80244DE4) = SCRIPT({ +EvtSource N(80244DE4) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 0); return; }); -Script N(80244E14) = SCRIPT({ +EvtSource N(80244E14) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 16); return; }); @@ -478,7 +478,7 @@ N(quizReqStruct) N(quizRequirements)[] = { { 96, 64 }, { 0, 64 }, }; -Script N(80244ED4) = SCRIPT({ +EvtSource N(80244ED4) = SCRIPT({ N(GetGameStatus75)(); if (SI_VAR(0) <= 1) { GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -490,7 +490,7 @@ Script N(80244ED4) = SCRIPT({ } }); -Script N(80244F84) = SCRIPT({ +EvtSource N(80244F84) = SCRIPT({ N(GetCamVfov)(0, SI_ARRAY(0)); N(SetCamVfov)(0, 25); GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -513,7 +513,7 @@ Script N(80244F84) = SCRIPT({ SetCamLeadPlayer(0, 0); }); -Script N(80245120) = SCRIPT({ +EvtSource N(80245120) = SCRIPT({ GetNpcPos(NPC_CHUCK_QUIZMO, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 30; SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -529,12 +529,12 @@ Script N(80245120) = SCRIPT({ SetCamSpeed(0, 1); }); -Script N(8024521C) = SCRIPT({ +EvtSource N(8024521C) = SCRIPT({ N(SetCamVfov)(0, SI_ARRAY(0)); PanToTarget(0, 0, 0); }); -Script N(80245258) = SCRIPT({ +EvtSource N(80245258) = SCRIPT({ sleep 20; N(UnkCameraFunc)(SI_ARRAY(1), SI_ARRAY(3), 83, SI_VAR(0), SI_VAR(1)); spawn { @@ -563,7 +563,7 @@ Script N(80245258) = SCRIPT({ SetPlayerAnimation(ANIM_10002); }); -Script N(80245408) = SCRIPT({ +EvtSource N(80245408) = SCRIPT({ GetNpcPos(NPC_PARTNER, SI_VAR(10), SI_VAR(11), SI_VAR(12)); N(UnkCameraFunc)(SI_VAR(10), SI_VAR(12), 108, SI_VAR(0), SI_VAR(1)); SI_VAR(5) = (float) SI_ARRAY(2); @@ -583,7 +583,7 @@ Script N(80245408) = SCRIPT({ SetNpcAnimation(NPC_PARTNER, 0x106); }); -Script N(80245540) = SCRIPT({ +EvtSource N(80245540) = SCRIPT({ GetNpcPos(NPC_CHUCK_QUIZMO, SI_VAR(10), SI_VAR(11), SI_VAR(12)); N(UnkCameraFunc)(SI_VAR(10), SI_VAR(12), -70, SI_VAR(0), SI_VAR(1)); spawn { @@ -607,26 +607,26 @@ Script N(80245540) = SCRIPT({ SetNpcAnimation(NPC_CHUCK_QUIZMO, 0xAF0001); }); -Script N(802456AC) = SCRIPT({ +EvtSource N(802456AC) = SCRIPT({ spawn N(80245258); spawn N(80245408); await N(80245540); }); -Script N(802456E0) = SCRIPT({ +EvtSource N(802456E0) = SCRIPT({ loop { SetPlayerAnimation(ANIM_QUESTION); sleep 20; } }); -Script N(80245720) = SCRIPT({ +EvtSource N(80245720) = SCRIPT({ SetPlayerAnimation(ANIM_THROW); sleep 15; SetPlayerAnimation(ANIM_10002); }); -Script N(8024575C) = SCRIPT({ +EvtSource N(8024575C) = SCRIPT({ loop { SetPlayerAnimation(ANIM_10002); sleep 1; @@ -797,14 +797,14 @@ Script N(8024575C) = SCRIPT({ sleep 1; }); -Script N(802462A4) = SCRIPT({ +EvtSource N(802462A4) = SCRIPT({ SetPlayerAnimation(ANIM_SHOCK_STILL); loop { sleep 1; } }); -Script N(802462E4) = SCRIPT({ +EvtSource N(802462E4) = SCRIPT({ spawn { N(UnkCameraFunc)(SI_ARRAY(1), SI_ARRAY(3), 25, SI_VAR(0), SI_VAR(1)); SI_VAR(2) = (float) SI_ARRAY(1); @@ -818,7 +818,7 @@ Script N(802462E4) = SCRIPT({ PlayerMoveTo(SI_ARRAY(1), SI_ARRAY(3), 40); }); -Script N(802463C0) = SCRIPT({ +EvtSource N(802463C0) = SCRIPT({ SI_VAR(1) = spawn N(8024575C); sleep 60; kill SI_VAR(1); @@ -832,7 +832,7 @@ Script N(802463C0) = SCRIPT({ await N(802462E4); }); -Script N(80246470) = SCRIPT({ +EvtSource N(80246470) = SCRIPT({ SI_VAR(1) = spawn N(802462A4); sleep 60; loop 5 { @@ -846,7 +846,7 @@ Script N(80246470) = SCRIPT({ await N(802462E4); }); -Script N(80246520) = SCRIPT({ +EvtSource N(80246520) = SCRIPT({ if (SI_SAVE_VAR(352) > 63) { SI_VAR(0) = 0; return; @@ -1046,7 +1046,7 @@ Script N(80246520) = SCRIPT({ SI_SAVE_FLAG(1793) = 0; }); -Script N(80247250) = SCRIPT({ +EvtSource N(80247250) = SCRIPT({ N(func_8024043C_9695FC)(); if (SI_VAR(0) == 0) { return; @@ -1056,7 +1056,7 @@ Script N(80247250) = SCRIPT({ N(UnkFunc31)(); }); -Script N(802472C4) = SCRIPT({ +EvtSource N(802472C4) = SCRIPT({ arr_use gPauseMenuTargetPosX; SI_SAVE_FLAG(1769) = 1; DisablePlayerPhysics(TRUE); @@ -1066,7 +1066,7 @@ Script N(802472C4) = SCRIPT({ SetPlayerFlagBits(4194304, 0); }); -Script N(80247344) = SCRIPT({ +EvtSource N(80247344) = SCRIPT({ N(GetNpcUnsafeOwner2)(); }); @@ -1078,7 +1078,7 @@ NpcAISettings N(npcAISettings_80247360) = { .unk_2C = 1, }; -Script N(80247390) = SCRIPT({ +EvtSource N(80247390) = SCRIPT({ DoBasicAI(N(npcAISettings_80247360)); }); @@ -1114,7 +1114,7 @@ NpcAISettings N(npcAISettings_80247408) = { .unk_2C = 1, }; -Script N(npcAI_80247438) = SCRIPT({ +EvtSource N(npcAI_80247438) = SCRIPT({ DoBasicAI(N(npcAISettings_80247408)); }); @@ -1141,7 +1141,7 @@ NpcAISettings N(npcAISettings_802474B0) = { .unk_2C = 1, }; -Script N(npcAI_802474E0) = SCRIPT({ +EvtSource N(npcAI_802474E0) = SCRIPT({ DoBasicAI(N(npcAISettings_802474B0)); }); @@ -1284,15 +1284,15 @@ Gfx N(D_80247A38_970BF8)[] = { gsSPEndDisplayList(), }; -Script N(init_80247A80) = SCRIPT({ +EvtSource N(init_80247A80) = SCRIPT({ }); -Script N(npcAI_80247A90) = SCRIPT({ +EvtSource N(npcAI_80247A90) = SCRIPT({ }); -Script N(80247AA0) = SCRIPT({ +EvtSource N(80247AA0) = SCRIPT({ arr_use N(D_8024EFD0); SI_ARRAY(9) = 0; GetNpcPos(NPC_WORLD_MERLEE, SI_ARRAY(4), SI_ARRAY(5), SI_ARRAY(6)); @@ -1429,7 +1429,7 @@ Script N(80247AA0) = SCRIPT({ } }); -Script N(802481D8) = SCRIPT({ +EvtSource N(802481D8) = SCRIPT({ GetNpcPos(NPC_WORLD_MERLEE, SI_VAR(0), SI_VAR(1), SI_VAR(2)); UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetCamDistance(0, 200); @@ -1440,13 +1440,13 @@ Script N(802481D8) = SCRIPT({ WaitForCam(0, 1.0); }); -Script N(802482A8) = SCRIPT({ +EvtSource N(802482A8) = SCRIPT({ PanToTarget(0, 0, 0); SetCamSpeed(0, 3.0); WaitForCam(0, 1.0); }); -Script N(802482F8) = SCRIPT({ +EvtSource N(802482F8) = SCRIPT({ func_802D2C14(1); await N(802481D8); SI_VAR(0) = 0; @@ -1535,7 +1535,7 @@ s32 N(D_80248784_971944) = { 0x00000000, }; -Script N(80248788) = SCRIPT({ +EvtSource N(80248788) = SCRIPT({ SI_VAR(9) = SI_VAR(1); ShowKeyChoicePopup(); SI_VAR(10) = SI_VAR(0); @@ -1559,13 +1559,13 @@ Script N(80248788) = SCRIPT({ unbind; }); -Script N(802488CC) = SCRIPT({ +EvtSource N(802488CC) = SCRIPT({ N(func_8024334C_96C50C)(SI_VAR(0)); bind_padlock N(80248788) 0x10 0 N(D_8024F080); N(func_802432C0_96C480)(SI_VAR(0)); }); -Script N(8024891C) = SCRIPT({ +EvtSource N(8024891C) = SCRIPT({ SI_VAR(9) = SI_VAR(1); ShowConsumableChoicePopup(); SI_VAR(10) = SI_VAR(0); @@ -1588,7 +1588,7 @@ Script N(8024891C) = SCRIPT({ unbind; }); -Script N(80248A50) = SCRIPT({ +EvtSource N(80248A50) = SCRIPT({ N(func_802433E8_96C5A8)(SI_VAR(0)); bind_padlock N(8024891C) 0x10 0 N(D_8024F248); N(func_802432C0_96C480)(SI_VAR(0)); @@ -1975,14 +1975,14 @@ s32 N(image2)[] = { 0x00010001, 0x00010001, 0x00010001, 0x00010001, 0x00030000, }; -Script N(8024AC14) = SCRIPT({ +EvtSource N(8024AC14) = SCRIPT({ EnableModel(SI_VAR(4), 0); EnableModel(SI_VAR(5), 1); RotateModel(SI_VAR(6), 0, 0, 0, 1); RotateModel(SI_VAR(7), 0, 0, 0, 1); }); -Script N(8024AC8C) = SCRIPT({ +EvtSource N(8024AC8C) = SCRIPT({ SI_VAR(9) = SI_VAR(7); SI_VAR(8) = SI_VAR(6); SI_VAR(7) = SI_VAR(5); @@ -2005,7 +2005,7 @@ Script N(8024AC8C) = SCRIPT({ EnableModel(SI_VAR(7), 0); }); -Script N(interact_8024ADE4) = SCRIPT({ +EvtSource N(interact_8024ADE4) = SCRIPT({ N(UnkFunc35)(0, 0, 0); await N(8024D434); if (SI_VAR(0) == 0) { @@ -2069,7 +2069,7 @@ Script N(interact_8024ADE4) = SCRIPT({ N(Call800E98C4SyncStatusMenu)(); }); -Script N(8024B18C) = SCRIPT({ +EvtSource N(8024B18C) = SCRIPT({ loop { GetNpcPos(NPC_PARTNER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); N(UnkYawFunc)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); @@ -2078,7 +2078,7 @@ Script N(8024B18C) = SCRIPT({ } }); -Script N(8024B20C) = SCRIPT({ +EvtSource N(8024B20C) = SCRIPT({ SI_VAR(9) = SI_VAR(1); ShowKeyChoicePopup(); SI_VAR(10) = SI_VAR(0); @@ -2127,7 +2127,7 @@ Script N(8024B20C) = SCRIPT({ unbind; }); -Script N(8024B530) = SCRIPT({ +EvtSource N(8024B530) = SCRIPT({ SI_VAR(0) = SI_VAR(11); SI_VAR(1) = SI_VAR(2); N(func_8024334C_96C50C)(SI_VAR(0)); @@ -2135,7 +2135,7 @@ Script N(8024B530) = SCRIPT({ N(func_802432C0_96C480)(SI_VAR(0)); }); -Script N(8024B5A0) = SCRIPT({ +EvtSource N(8024B5A0) = SCRIPT({ SI_VAR(12) = 0; if (SI_STORY_PROGRESS < STORY_CH2_PARAKARRY_JOINED_PARTY) { return; @@ -2189,12 +2189,12 @@ s32 N(D_8024B898_974A58)[] = { 0x0000004A, 0x00000000, }; -Script N(8024B8A0) = SCRIPT({ +EvtSource N(8024B8A0) = SCRIPT({ N(SetManyVars)(1, 9634308, 9634305, 74, 75, 852117, 852118, 852119, 852120, N(D_8024B898_974A58)); await N(8024B5A0); }); -Script N(interact_8024B8F0) = SCRIPT({ +EvtSource N(interact_8024B8F0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_SAVE_FLAG(787) == 1) { @@ -2221,14 +2221,14 @@ Script N(interact_8024B8F0) = SCRIPT({ } }); -Script N(init_8024BA50) = SCRIPT({ +EvtSource N(init_8024BA50) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024B8F0)); if (SI_STORY_PROGRESS >= STORY_UNUSED_FFFFFFCC) { RemoveNpc(NPC_SELF); } }); -Script N(interact_8024BA9C) = SCRIPT({ +EvtSource N(interact_8024BA9C) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_SAVE_FLAG(747) == 0) { @@ -2249,11 +2249,11 @@ Script N(interact_8024BA9C) = SCRIPT({ } }); -Script N(init_8024BBAC) = SCRIPT({ +EvtSource N(init_8024BBAC) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024BA9C)); }); -Script N(interact_8024BBD0) = SCRIPT({ +EvtSource N(interact_8024BBD0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_AREA_FLAG(3) == 0) { @@ -2272,19 +2272,19 @@ Script N(interact_8024BBD0) = SCRIPT({ } }); -Script N(init_8024BCD4) = SCRIPT({ +EvtSource N(init_8024BCD4) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024BBD0)); }); -Script N(interact_8024BCF8) = SCRIPT({ +EvtSource N(interact_8024BCF8) = SCRIPT({ SpeakToPlayer(NPC_SELF, 0x930004, 0x930001, 0, MESSAGE_ID(0x0D, 0x00A0)); }); -Script N(init_8024BD28) = SCRIPT({ +EvtSource N(init_8024BD28) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024BCF8)); }); -Script N(interact_8024BD4C) = SCRIPT({ +EvtSource N(interact_8024BD4C) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_AREA_FLAG(4) == 0) { @@ -2315,11 +2315,11 @@ Script N(interact_8024BD4C) = SCRIPT({ } }); -Script N(init_8024BF10) = SCRIPT({ +EvtSource N(init_8024BF10) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024BD4C)); }); -Script N(interact_8024BF34) = SCRIPT({ +EvtSource N(interact_8024BF34) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_AREA_FLAG(5) == 0) { @@ -2338,11 +2338,11 @@ Script N(interact_8024BF34) = SCRIPT({ } }); -Script N(init_8024C038) = SCRIPT({ +EvtSource N(init_8024C038) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024BF34)); }); -Script N(8024C05C) = SCRIPT({ +EvtSource N(8024C05C) = SCRIPT({ loop { PlayerFaceNpc(5, 0); NpcFaceNpc(NPC_PARTNER, NPC_MOUSTAFA, 0); @@ -2350,7 +2350,7 @@ Script N(8024C05C) = SCRIPT({ } }); -Script N(8024C0B8) = SCRIPT({ +EvtSource N(8024C0B8) = SCRIPT({ GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetCamDistance(0, 275); @@ -2368,13 +2368,13 @@ Script N(8024C0B8) = SCRIPT({ WaitForCam(0, 1.0); }); -Script N(8024C1F8) = SCRIPT({ +EvtSource N(8024C1F8) = SCRIPT({ PanToTarget(0, 0, 0); SetCamSpeed(0, 3.0); WaitForCam(0, 1.0); }); -Script N(8024C248) = SCRIPT({ +EvtSource N(8024C248) = SCRIPT({ SetNpcYaw(NPC_MOUSTAFA, 270); SetNpcFlagBits(NPC_DISGUISED_MOUSTAFA, ((NPC_FLAG_100)), TRUE); SetNpcFlagBits(NPC_MOUSTAFA, ((NPC_FLAG_100)), TRUE); @@ -2404,7 +2404,7 @@ Script N(8024C248) = SCRIPT({ sleep 30; }); -Script N(idle_8024C450) = SCRIPT({ +EvtSource N(idle_8024C450) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH2_BOUGHT_SECRET_ITEMS {} < STORY_CH2_GOT_PULSE_STONE { @@ -2417,7 +2417,7 @@ Script N(idle_8024C450) = SCRIPT({ } }); -Script N(interact_8024C4EC) = SCRIPT({ +EvtSource N(interact_8024C4EC) = SCRIPT({ if (SI_SAVE_FLAG(750) == 1) { SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00CF)); return; @@ -2597,7 +2597,7 @@ Script N(interact_8024C4EC) = SCRIPT({ } }); -Script N(init_8024D04C) = SCRIPT({ +EvtSource N(init_8024D04C) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { 2, 3 { @@ -2612,11 +2612,11 @@ Script N(init_8024D04C) = SCRIPT({ } }); -Script N(init_8024D130) = SCRIPT({ +EvtSource N(init_8024D130) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024C4EC)); }); -Script N(idle_8024D154) = SCRIPT({ +EvtSource N(idle_8024D154) = SCRIPT({ InterpNpcYaw(NPC_DISGUISED_MOUSTAFA, 270, 0); 10: SetNpcAnimation(NPC_SELF, 0x940107); @@ -2654,14 +2654,14 @@ Script N(idle_8024D154) = SCRIPT({ SI_STORY_PROGRESS = STORY_CH2_SPOKE_WITH_SHEEK; }); -Script N(init_8024D3E8) = SCRIPT({ +EvtSource N(init_8024D3E8) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_8024D154)); if (SI_STORY_PROGRESS >= STORY_CH2_SPOKE_WITH_SHEEK) { RemoveNpc(NPC_SELF); } }); -Script N(8024D434) = SCRIPT({ +EvtSource N(8024D434) = SCRIPT({ SI_VAR(0) = 852177; SI_VAR(8) = 852178; SI_VAR(1) = 852179; @@ -2669,7 +2669,7 @@ Script N(8024D434) = SCRIPT({ SI_VAR(3) = 852181; }); -Script N(8024D494) = SCRIPT({ +EvtSource N(8024D494) = SCRIPT({ spawn N(80243B70); SetPlayerSpeed(3.0); PlayerMoveTo(-179, -198, 0); @@ -2706,7 +2706,7 @@ Script N(8024D494) = SCRIPT({ } }); -Script N(8024D700) = SCRIPT({ +EvtSource N(8024D700) = SCRIPT({ HidePlayerShadow(FALSE); func_802D2520(ANIM_10002, 0, 0, 0, 0, 0); SetPlayerPos(-187, 0, -240); @@ -2715,7 +2715,7 @@ Script N(8024D700) = SCRIPT({ spawn N(80243AF0); }); -Script N(init_8024D790) = SCRIPT({ +EvtSource N(init_8024D790) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024ADE4)); }); @@ -3088,7 +3088,7 @@ NpcGroupList N(npcGroupList_8024EEF4) = { {}, }; -ApiStatus N(func_80240300_9694C0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240300_9694C0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80244DE0_96DFA0) == NULL) { @@ -3110,7 +3110,7 @@ ApiStatus N(func_80240300_9694C0)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/Set80151310.inc.c" -ApiStatus N(func_8024043C_9695FC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024043C_9695FC)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -3169,7 +3169,7 @@ ApiStatus N(func_8024043C_9695FC)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkFunc31.inc.c" -ApiStatus N(func_802409EC_969BAC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802409EC_969BAC)(Evt* script, s32 isInitialCall) { u16 quizzesAnswered = gPlayerData.quizzesAnswered; if (quizzesAnswered < 999) { @@ -3186,7 +3186,7 @@ ApiStatus N(func_802409EC_969BAC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80240A70_969C30)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240A70_969C30)(Evt* script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -3220,7 +3220,7 @@ ApiStatus N(func_80240A70_969C30)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80240C88_969E48)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240C88_969E48)(Evt* script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -3245,12 +3245,12 @@ ApiStatus N(func_80240C88_969E48)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80240D3C_969EFC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240D3C_969EFC)(Evt* script, s32 isInitialCall) { ((N(temp)*)N(D_8024EFC0))->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus N(func_80240D70_969F30)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240D70_969F30)(Evt* script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = N(D_8024EFC0)->freeDelay; @@ -3272,17 +3272,17 @@ ApiStatus N(func_80240D70_969F30)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80240DF0_969FB0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240DF0_969FB0)(Evt* script, s32 isInitialCall) { ((N(temp)*)N(D_8024EFC8))->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } -ApiStatus N(func_80240E08_969FC8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240E08_969FC8)(Evt* script, s32 isInitialCall) { ((N(temp)*)N(D_8024EFC8))->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } -ApiStatus N(func_80240E24_969FE4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240E24_969FE4)(Evt* script, s32 isInitialCall) { ((N(temp)*)N(D_8024EFC8))->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -3309,12 +3309,12 @@ void N(func_802412F8_96A4B8)(void) { } } -ApiStatus N(func_80241364_96A524)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241364_96A524)(Evt* script, s32 isInitialCall) { gPauseMenuCursorPosY = create_generic_entity_frontUI(NULL, N(func_802412F8_96A4B8)); return ApiStatus_DONE2; } -ApiStatus N(func_80241394_96A554)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241394_96A554)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); @@ -3350,7 +3350,7 @@ ApiStatus N(func_80241394_96A554)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802414C0_96A680)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802414C0_96A680)(Evt* script, s32 isInitialCall) { s32 i; if (isInitialCall) { @@ -3376,7 +3376,7 @@ ApiStatus N(func_802414C0_96A680)(ScriptInstance* script, s32 isInitialCall) { return (script->functionTemp[0] == 255) * ApiStatus_DONE2; } -ApiStatus N(func_802415CC_96A78C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802415CC_96A78C)(Evt* script, s32 isInitialCall) { s32 i; if (isInitialCall) { @@ -3407,7 +3407,7 @@ ApiStatus N(func_802415CC_96A78C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_802416FC_96A8BC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802416FC_96A8BC)(Evt* script, s32 isInitialCall) { s32 ret; N(D_8024EFCC) = script; @@ -3429,7 +3429,7 @@ ApiStatus N(func_802416FC_96A8BC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80241874_96AA34)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241874_96AA34)(Evt* script, s32 isInitialCall) { func_8013A854(get_variable(script, SI_ARRAY(0))); func_8013A854(get_variable(script, SI_ARRAY(1))); func_8013A854(get_variable(script, SI_ARRAY(2))); @@ -3581,7 +3581,7 @@ void N(func_80242214_96B3D4)(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg // Too much work, maybe try again later #ifdef NON_MATCHING -void func_8024240C_96B5CC(ScriptInstance* script, s32 isInitialCall) { +void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { N(temp)** effect; N(temp)** effect2; N(temp)** effect3; @@ -3891,11 +3891,11 @@ void func_8024240C_96B5CC(ScriptInstance* script, s32 isInitialCall) { } } #else -INCLUDE_ASM(void, "world/area_dro/dro_02/9694C0", dro_02_func_8024240C_96B5CC, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_dro/dro_02/9694C0", dro_02_func_8024240C_96B5CC, Evt* script, s32 isInitialCall); #endif -void N(func_80242EAC_96C06C)(ScriptInstance* script, s32 isInitialCall) { +void N(func_80242EAC_96C06C)(Evt* script, s32 isInitialCall) { Matrix4f sp20; u32 temp_s1; @@ -3914,12 +3914,12 @@ void N(func_80242EAC_96C06C)(ScriptInstance* script, s32 isInitialCall) { } } -ApiStatus N(func_8024303C_96C1FC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024303C_96C1FC)(Evt* script, s32 isInitialCall) { sfx_play_sound_with_params(0x202A, 0, 0x18, 0); return ApiStatus_DONE2; } -ApiStatus N(func_80243068_96C228)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243068_96C228)(Evt* script, s32 isInitialCall) { sfx_play_sound_with_params(0x202B, 0, 0x68, 0); return ApiStatus_DONE2; } @@ -3928,7 +3928,7 @@ ApiStatus N(func_80243068_96C228)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/AddPlayerHandsOffset.inc.c" -ApiStatus N(func_802432C0_96C480)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802432C0_96C480)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -3944,7 +3944,7 @@ ApiStatus N(func_802432C0_96C480)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80243314_96C4D4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243314_96C4D4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80248784_971944) = get_variable(script, *args); @@ -3952,7 +3952,7 @@ ApiStatus N(func_80243314_96C4D4)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_8024334C_96C50C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024334C_96C50C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -3971,7 +3971,7 @@ ApiStatus N(func_8024334C_96C50C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802433E8_96C5A8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802433E8_96C5A8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -4014,7 +4014,7 @@ ApiStatus N(func_802433E8_96C5A8)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkYawFunc.inc.c" -ApiStatus N(func_802439FC_96CBBC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802439FC_96CBBC)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(script->varTable[2]); N(D_8024F3B8) = npc->currentAnim.w; @@ -4022,7 +4022,7 @@ ApiStatus N(func_802439FC_96CBBC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80243A40_96CC00)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243A40_96CC00)(Evt* script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim.w = N(D_8024F3B8); return ApiStatus_DONE2; } diff --git a/src/world/area_dro/dro_02/dro_02.h b/src/world/area_dro/dro_02/dro_02.h index 0c11521015..d4558da3f2 100644 --- a/src/world/area_dro/dro_02/dro_02.h +++ b/src/world/area_dro/dro_02/dro_02.h @@ -3,61 +3,61 @@ #define NAMESPACE dro_02 -ApiStatus N(Call800E9894)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(Call800E98C4SyncStatusMenu)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(Call800EB168)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetCamVfov)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetGameStatus75)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetNpcUnsafeOwner2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetPartnerCall800EB168)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(Set80151310_0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(Set80151310_1)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SetCamVfov)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SetManyVars)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(AddPlayerHandsOffset)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkAlphaFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkCameraFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc26)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc27)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc29)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkMovePartner)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkRotatePartner)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkRotatePlayer)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkYawFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024043C_9695FC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc31)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802409EC_969BAC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240A70_969C30)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240C88_969E48)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240D3C_969EFC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240D70_969F30)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240DF0_969FB0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240E08_969FC8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240E24_969FE4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241364_96A524)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241394_96A554)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802414C0_96A680)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802415CC_96A78C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802416FC_96A8BC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241874_96AA34)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024303C_96C1FC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243068_96C228)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802432C0_96C480)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243314_96C4D4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024334C_96C50C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802433E8_96C5A8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc32)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(CamSetFOV)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(DoesPlayerNeedSleep)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc35)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802439FC_96CBBC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80243A40_96CC00)(ScriptInstance* script, s32 isInitialCall); -void N(func_8024240C_96B5CC)(ScriptInstance *script, s32 isInitialCall); -void N(func_80242EAC_96C06C)(ScriptInstance *script, s32 isInitialCall); +ApiStatus N(Call800E9894)(Evt* script, s32 isInitialCall); +ApiStatus N(Call800E98C4SyncStatusMenu)(Evt* script, s32 isInitialCall); +ApiStatus N(Call800EB168)(Evt* script, s32 isInitialCall); +ApiStatus N(GetCamVfov)(Evt* script, s32 isInitialCall); +ApiStatus N(GetGameStatus75)(Evt* script, s32 isInitialCall); +ApiStatus N(GetNpcUnsafeOwner2)(Evt* script, s32 isInitialCall); +ApiStatus N(GetPartnerCall800EB168)(Evt* script, s32 isInitialCall); +ApiStatus N(Set80151310_0)(Evt* script, s32 isInitialCall); +ApiStatus N(Set80151310_1)(Evt* script, s32 isInitialCall); +ApiStatus N(SetCamVfov)(Evt* script, s32 isInitialCall); +ApiStatus N(SetManyVars)(Evt* script, s32 isInitialCall); +ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkAlphaFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkCameraFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc26)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc27)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc29)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkMovePartner)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkRotatePartner)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkRotatePlayer)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkYawFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024043C_9695FC)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc31)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802409EC_969BAC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240A70_969C30)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240C88_969E48)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240D3C_969EFC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240D70_969F30)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240DF0_969FB0)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240E08_969FC8)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240E24_969FE4)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241364_96A524)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241394_96A554)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802414C0_96A680)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802415CC_96A78C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802416FC_96A8BC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241874_96AA34)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024303C_96C1FC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243068_96C228)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802432C0_96C480)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243314_96C4D4)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024334C_96C50C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802433E8_96C5A8)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc32)(Evt* script, s32 isInitialCall); +ApiStatus N(CamSetFOV)(Evt* script, s32 isInitialCall); +ApiStatus N(DoesPlayerNeedSleep)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc35)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802439FC_96CBBC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80243A40_96CC00)(Evt* script, s32 isInitialCall); +void N(func_8024240C_96B5CC)(Evt *script, s32 isInitialCall); +void N(func_80242EAC_96C06C)(Evt *script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_8024EEF4); -extern Script N(80244C78); -extern Script N(8024D434); -extern Script N(8024D494); -extern Script N(8024D700); -extern Script N(main); +extern EvtSource N(80244C78); +extern EvtSource N(8024D434); +extern EvtSource N(8024D494); +extern EvtSource N(8024D700); +extern EvtSource N(main); diff --git a/src/world/area_end/end_00/DF6A00.c b/src/world/area_end/end_00/DF6A00.c index c8b1e36664..53ec63af6f 100644 --- a/src/world/area_end/end_00/DF6A00.c +++ b/src/world/area_end/end_00/DF6A00.c @@ -1,6 +1,6 @@ #include "end_00.h" -ApiStatus func_80240000_DF6A00(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240000_DF6A00(Evt* script, s32 isInitialCall) { gGameStatusPtr->playerSpriteSet = 3; return ApiStatus_BLOCK; } diff --git a/src/world/area_end/end_00/DF6A20.c b/src/world/area_end/end_00/DF6A20.c index cbac0357c1..a460e9fd67 100644 --- a/src/world/area_end/end_00/DF6A20.c +++ b/src/world/area_end/end_00/DF6A20.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_end/end_00/DF6A20", func_80242358_DF8D58); INCLUDE_ASM(s32, "world/area_end/end_00/DF6A20", func_80242500_DF8F00); -ApiStatus func_80242558_DF8F58(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80242558_DF8F58(Evt* script, s32 isInitialCall) { func_80242500_DF8F00(); load_font(1); return ApiStatus_DONE2; @@ -44,7 +44,7 @@ INCLUDE_ASM(s32, "world/area_end/end_00/DF6A20", func_80242580_DF8F80); INCLUDE_ASM(s32, "world/area_end/end_00/DF6A20", func_80242680_DF9080); -ApiStatus func_80242744_DF9144(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80242744_DF9144(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 a1 = *args++; @@ -53,12 +53,12 @@ ApiStatus func_80242744_DF9144(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802427A4_DF91A4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802427A4_DF91A4(Evt* script, s32 isInitialCall) { _heap_free(&gSpriteHeapPtr, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus func_802427D8_DF91D8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802427D8_DF91D8(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[gCurrentCameraID]; camera->unk_506 = 1; @@ -66,7 +66,7 @@ ApiStatus func_802427D8_DF91D8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(SetNpcShadowScale)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetNpcShadowScale)(Evt* script, s32 isInitialCall) { s32 npcID; f32 newShadowScale; @@ -78,7 +78,7 @@ ApiStatus N(SetNpcShadowScale)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80242898_DF9298(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80242898_DF9298(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Npc** npc = &script->functionTemp[1]; diff --git a/src/world/area_end/end_01/E05360.c b/src/world/area_end/end_01/E05360.c index d3f9c9bcf9..7e9cb74b34 100644 --- a/src/world/area_end/end_01/E05360.c +++ b/src/world/area_end/end_01/E05360.c @@ -1,5 +1,5 @@ #include "end_01.h" -ApiStatus func_80240000_E05360(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240000_E05360(Evt* script, s32 isInitialCall) { return ApiStatus_BLOCK; } diff --git a/src/world/area_flo/flo_00/C9DF20.c b/src/world/area_flo/flo_00/C9DF20.c index df02fb99a8..aa59a630d3 100644 --- a/src/world/area_flo/flo_00/C9DF20.c +++ b/src/world/area_flo/flo_00/C9DF20.c @@ -3,7 +3,7 @@ // Same as SpawnSunEffect, but doesn't touch float regs like SpawnSunEffect does void playFX_82(); -ApiStatus N(func_80240000_C9DF20)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_C9DF20)(Evt* script, s32 isInitialCall) { playFX_82(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 index da593a3caa..429fa67533 100644 --- a/src/world/area_flo/flo_00/C9DF60.c +++ b/src/world/area_flo/flo_00/C9DF60.c @@ -41,7 +41,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_00_tattle }, }; -Script N(802414D0) = SCRIPT({ +EvtSource N(802414D0) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 8 { @@ -84,7 +84,7 @@ static s32 N(pad_16BC) = { 0x00000000, }; -Script N(802416C0) = SCRIPT({ +EvtSource N(802416C0) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -123,7 +123,7 @@ Script N(802416C0) = SCRIPT({ goto 0; }); -Script N(8024196C) = SCRIPT({ +EvtSource N(8024196C) = SCRIPT({ DisablePlayerInput(TRUE); ModifyColliderFlags(0, 2, 0x7FFFFE00); PlayerMoveTo(30, -170, 10); @@ -158,7 +158,7 @@ Script N(8024196C) = SCRIPT({ sleep 100; }); -Script N(80241B90) = SCRIPT({ +EvtSource N(80241B90) = SCRIPT({ DisablePlayerInput(TRUE); ModifyColliderFlags(0, 2, 0x7FFFFE00); InterpPlayerYaw(180, 0); @@ -189,21 +189,21 @@ Script N(80241B90) = SCRIPT({ ModifyColliderFlags(1, 2, 0x7FFFFE00); }); -Script N(exitWalk_80241D7C) = EXIT_WALK_SCRIPT(60, 1, "flo_14", 0); +EvtSource N(exitWalk_80241D7C) = EXIT_WALK_SCRIPT(60, 1, "flo_14", 0); -Script N(exitWalk_80241DD8) = EXIT_WALK_SCRIPT(60, 2, "flo_23", 0); +EvtSource N(exitWalk_80241DD8) = EXIT_WALK_SCRIPT(60, 2, "flo_23", 0); -Script N(exitWalk_80241E34) = EXIT_WALK_SCRIPT(60, 3, "flo_25", 0); +EvtSource N(exitWalk_80241E34) = EXIT_WALK_SCRIPT(60, 3, "flo_25", 0); -Script N(exitWalk_80241E90) = EXIT_WALK_SCRIPT(60, 4, "flo_16", 0); +EvtSource N(exitWalk_80241E90) = EXIT_WALK_SCRIPT(60, 4, "flo_16", 0); -Script N(exitWalk_80241EEC) = EXIT_WALK_SCRIPT(60, 5, "flo_09", 0); +EvtSource N(exitWalk_80241EEC) = EXIT_WALK_SCRIPT(60, 5, "flo_09", 0); -Script N(exitWalk_80241F48) = EXIT_WALK_SCRIPT(60, 6, "flo_08", 0); +EvtSource N(exitWalk_80241F48) = EXIT_WALK_SCRIPT(60, 6, "flo_08", 0); const s32 N(pad_XXXX)[] = { 0, 0}; -Script N(80241FA4) = SCRIPT({ +EvtSource N(80241FA4) = SCRIPT({ bind N(exitWalk_80241D7C) TRIGGER_FLOOR_ABOVE 5; bind N(exitWalk_80241DD8) TRIGGER_FLOOR_ABOVE 9; bind N(exitWalk_80241E34) TRIGGER_FLOOR_ABOVE 13; @@ -212,7 +212,7 @@ Script N(80241FA4) = SCRIPT({ bind N(exitWalk_80241F48) TRIGGER_FLOOR_ABOVE 25; }); -Script N(enterWalk_8024205C) = SCRIPT({ +EvtSource N(enterWalk_8024205C) = SCRIPT({ GetLoadType(SI_VAR(1)); if (SI_VAR(1) == 1) { spawn EnterSavePoint; @@ -261,7 +261,7 @@ Script N(enterWalk_8024205C) = SCRIPT({ bind N(80242FCC) TRIGGER_WALL_PRESS_A 2; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -370,7 +370,7 @@ NpcAISettings N(npcAISettings_8024286C) = { .unk_2C = 1, }; -Script N(npcAI_8024289C) = SCRIPT({ +EvtSource N(npcAI_8024289C) = SCRIPT({ N(func_80240BD4_C9EAF4)(N(npcAISettings_8024286C)); }); @@ -407,7 +407,7 @@ NpcSettings N(npcSettings_8024296C) = { const char N(flo_07_name_hack)[]; -Script N(80242998) = SCRIPT({ +EvtSource N(80242998) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); UseSettingsFrom(0, 50, 0, -200); @@ -426,7 +426,7 @@ Script N(80242998) = SCRIPT({ sleep 100; }); -Script N(80242AF0) = SCRIPT({ +EvtSource N(80242AF0) = SCRIPT({ DisablePlayerInput(TRUE); UseSettingsFrom(0, 0, 0, -170); SetPanTarget(0, 0, 0, -170); @@ -490,7 +490,7 @@ Script N(80242AF0) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80242FCC) = SCRIPT({ +EvtSource N(80242FCC) = SCRIPT({ DisablePlayerInput(TRUE); sleep 2; GetPlayerActionState(SI_VAR(3)); @@ -573,7 +573,7 @@ Script N(80242FCC) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80243368) = SCRIPT({ +EvtSource N(80243368) = SCRIPT({ AdjustCam(0, 90.0, 0, 600, 21.0, -12.0); sleep 20; ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x000B), 0, 50, -200); @@ -587,7 +587,7 @@ Script N(80243368) = SCRIPT({ ResetCam(0, 90.0); }); -Script N(init_80243474) = SCRIPT({ +EvtSource N(init_80243474) = SCRIPT({ EnableGroup(121, 0); EnableGroup(80, 0); EnableGroup(132, 0); @@ -599,7 +599,7 @@ Script N(init_80243474) = SCRIPT({ } }); -Script N(interact_8024352C) = SCRIPT({ +EvtSource N(interact_8024352C) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { SpeakToPlayer(NPC_SELF, NPC_ANIM(bubulb, Palette_00, Anim_3), NPC_ANIM(bubulb, Palette_00, Anim_2), 0, MESSAGE_ID(0x11, 0x0016)); @@ -631,7 +631,7 @@ Script N(interact_8024352C) = SCRIPT({ } }); -Script N(interact_802436C0) = SCRIPT({ +EvtSource N(interact_802436C0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { SpeakToPlayer(NPC_SELF, NPC_ANIM(bubulb, Palette_01, Anim_3), NPC_ANIM(bubulb, Palette_01, Anim_2), 0, MESSAGE_ID(0x11, 0x001D)); @@ -663,7 +663,7 @@ Script N(interact_802436C0) = SCRIPT({ } }); -Script N(interact_80243854) = SCRIPT({ +EvtSource N(interact_80243854) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { SpeakToPlayer(NPC_SELF, NPC_ANIM(bubulb, Palette_02, Anim_3), NPC_ANIM(bubulb, Palette_02, Anim_2), 0, MESSAGE_ID(0x11, 0x0024)); @@ -695,7 +695,7 @@ Script N(interact_80243854) = SCRIPT({ } }); -Script N(interact_802439E8) = SCRIPT({ +EvtSource N(interact_802439E8) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { SpeakToPlayer(NPC_SELF, NPC_ANIM(bubulb, Palette_03, Anim_3), NPC_ANIM(bubulb, Palette_03, Anim_2), 0, MESSAGE_ID(0x11, 0x002B)); @@ -727,27 +727,27 @@ Script N(interact_802439E8) = SCRIPT({ } }); -Script N(init_80243B7C) = SCRIPT({ +EvtSource N(init_80243B7C) = SCRIPT({ SI_AREA_FLAG(18) = 0; BindNpcInteract(NPC_SELF, N(interact_8024352C)); }); -Script N(init_80243BB0) = SCRIPT({ +EvtSource N(init_80243BB0) = SCRIPT({ SI_AREA_FLAG(19) = 0; BindNpcInteract(NPC_SELF, N(interact_802436C0)); }); -Script N(init_80243BE4) = SCRIPT({ +EvtSource N(init_80243BE4) = SCRIPT({ SI_AREA_FLAG(20) = 0; BindNpcInteract(NPC_SELF, N(interact_80243854)); }); -Script N(init_80243C18) = SCRIPT({ +EvtSource N(init_80243C18) = SCRIPT({ SI_AREA_FLAG(21) = 0; BindNpcInteract(NPC_SELF, N(interact_802439E8)); }); -Script N(interact_80243C4C) = SCRIPT({ +EvtSource N(interact_80243C4C) = SCRIPT({ if (SI_SAVE_FLAG(1373) == 0) { AdjustCam(0, 4.0, -30, 300, 20.0, -9.5); SI_SAVE_FLAG(1373) = 1; @@ -831,12 +831,12 @@ Script N(interact_80243C4C) = SCRIPT({ ResetCam(0, 4.0); }); -Script N(init_8024414C) = SCRIPT({ +EvtSource N(init_8024414C) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80243C4C)); SetNpcCollisionSize(-1, 65, 50); }); -Script N(idle_80244188) = SCRIPT({ +EvtSource N(idle_80244188) = SCRIPT({ loop { loop 10 { GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -853,7 +853,7 @@ Script N(idle_80244188) = SCRIPT({ } }); -Script N(8024427C) = SCRIPT({ +EvtSource N(8024427C) = SCRIPT({ DisablePartnerAI(0); func_802CF56C(2); GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -985,7 +985,7 @@ Script N(8024427C) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(init_80244BF4) = SCRIPT({ +EvtSource N(init_80244BF4) = SCRIPT({ GetLoadType(SI_VAR(1)); if (SI_VAR(1) != 1) { GetEntryID(SI_VAR(0)); @@ -998,7 +998,7 @@ Script N(init_80244BF4) = SCRIPT({ } }); -Script N(interact_80244C98) = SCRIPT({ +EvtSource N(interact_80244C98) = SCRIPT({ if (SI_STORY_PROGRESS <= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SpeakToPlayer(NPC_LAKILULU, NPC_ANIM(lakilulu, Palette_00, Anim_4), NPC_ANIM(lakilulu, Palette_00, Anim_1), 0, MESSAGE_ID(0x11, 0x0032)); @@ -1021,7 +1021,7 @@ Script N(interact_80244C98) = SCRIPT({ } }); -Script N(init_80244DD0) = SCRIPT({ +EvtSource N(init_80244DD0) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH6_BEGAN_PEACH_MISSION) { BindNpcInteract(NPC_SELF, N(interact_80244C98)); SetNpcCollisionSize(-1, 36, 28); @@ -1314,7 +1314,7 @@ f32 N(D_80245E88_CA3DA8)[] = { const char N(sam_11_name_hack)[]; -Script N(80245EB8) = SCRIPT({ +EvtSource N(80245EB8) = SCRIPT({ SetPlayerPos(-400, 0, 200); SetNpcPos(NPC_PARTNER, -380, 0, 200); func_802CF56C(2); @@ -1351,19 +1351,19 @@ Script N(80245EB8) = SCRIPT({ sleep 100; }); -Script N(init_80246170) = SCRIPT({ +EvtSource N(init_80246170) = SCRIPT({ SetPlayerPos(-400, 0, 200); SetNpcPos(NPC_PARTNER, -380, 0, 200); SetNpcPos(NPC_BUBULB0, 196, 20, 354); SetNpcYaw(NPC_BUBULB0, 270); }); -Script N(init_802461E4) = SCRIPT({ +EvtSource N(init_802461E4) = SCRIPT({ SetNpcPos(NPC_BUBULB1, 163, 20, 370); SetNpcYaw(NPC_BUBULB1, 90); }); -Script N(init_80246224) = SCRIPT({ +EvtSource N(init_80246224) = SCRIPT({ SetNpcPos(NPC_BUBULB2, 266, 20, 322); SetNpcYaw(NPC_BUBULB2, 270); }); @@ -1467,7 +1467,7 @@ static s32 N(pad_684C) = { 0x00000000, }; -Script N(80246850) = SCRIPT({ +EvtSource N(80246850) = SCRIPT({ SI_VAR(1) = (float) SI_VAR(0); SI_VAR(1) -= -700.0; SI_VAR(1) /= 100.0; @@ -1587,7 +1587,7 @@ Script N(80246850) = SCRIPT({ TranslateModel(119, 13.0029296875, -631.15234375, -0.9462890625); }); -Script N(80247488) = SCRIPT({ +EvtSource N(80247488) = SCRIPT({ SI_VAR(1) = (float) SI_VAR(0); SI_VAR(1) -= -700.0; SI_VAR(1) /= 100.0; @@ -1603,7 +1603,7 @@ Script N(80247488) = SCRIPT({ RotateGroup(79, SI_VAR(1), 0, 1, 0); }); -Script N(80247588) = SCRIPT({ +EvtSource N(80247588) = SCRIPT({ TranslateModel(83, 9.5, 12.0, 15.0); TranslateModel(85, -9.5, 12.0, 15.0); TranslateModel(87, 0.0, 0.0, 17.0); @@ -1619,7 +1619,7 @@ Script N(80247588) = SCRIPT({ ScaleModel(87, SI_VAR(0), SI_VAR(0), SI_VAR(0)); }); -Script N(802476F4) = SCRIPT({ +EvtSource N(802476F4) = SCRIPT({ ScaleModel(81, SI_VAR(0), SI_VAR(0), SI_VAR(0)); SI_VAR(1) = (float) SI_VAR(0); SI_VAR(1) *= 90.0; @@ -1627,7 +1627,7 @@ Script N(802476F4) = SCRIPT({ RotateModel(81, SI_VAR(1), 1, 0, 0); }); -Script N(80247770) = SCRIPT({ +EvtSource N(80247770) = SCRIPT({ SI_VAR(1) = (float) SI_VAR(0); SI_VAR(1) *= -3.0; TranslateModel(81, -0.259765625, SI_VAR(0), 1.4775390625); @@ -1637,7 +1637,7 @@ Script N(80247770) = SCRIPT({ const char N(flo_19_name_hack)[]; -Script N(802477EC) = SCRIPT({ +EvtSource N(802477EC) = SCRIPT({ if (SI_AREA_FLAG(44) == 0) { DisablePlayerInput(TRUE); func_802D2B6C(); @@ -1702,7 +1702,7 @@ Script N(802477EC) = SCRIPT({ } }); -Script N(80247BCC) = SCRIPT({ +EvtSource N(80247BCC) = SCRIPT({ DisablePlayerInput(TRUE); SetPlayerActionState(10); ModifyColliderFlags(0, 47, 0x7FFFFE00); @@ -1763,7 +1763,7 @@ Script N(80247BCC) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80247FAC) = SCRIPT({ +EvtSource N(80247FAC) = SCRIPT({ PlaySoundAtCollider(47, 411, 0); SI_VAR(15) = 0; loop 100 { @@ -1823,7 +1823,7 @@ Script N(80247FAC) = SCRIPT({ sleep 100; }); -Script N(8024834C) = SCRIPT({ +EvtSource N(8024834C) = SCRIPT({ DisablePlayerInput(TRUE); InterpPlayerYaw(200, 0); SetPlayerPos(-60, 0, 30); @@ -1861,7 +1861,7 @@ s32 N(itemList_80248598)[] = { ITEM_NONE, }; -Script N(802485A8) = SCRIPT({ +EvtSource N(802485A8) = SCRIPT({ DisablePlayerInput(TRUE); func_802D2884(-85, 85, 0); func_802CF56C(2); @@ -1995,7 +1995,7 @@ Script N(802485A8) = SCRIPT({ } }); -Script N(80248D3C) = SCRIPT({ +EvtSource N(80248D3C) = SCRIPT({ 0: IsPlayerWithin(-85, 85, 20, SI_VAR(0)); if (SI_VAR(0) == 0) { @@ -2016,7 +2016,7 @@ Script N(80248D3C) = SCRIPT({ N(func_802413BC_C9F2DC)(); }); -Script N(80248E30) = SCRIPT({ +EvtSource N(80248E30) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_GREW_MAGIC_BEANSTALK) { loop { sleep 1; @@ -2036,7 +2036,7 @@ Script N(80248E30) = SCRIPT({ } }); -Script N(80248F48) = SCRIPT({ +EvtSource N(80248F48) = SCRIPT({ bind N(802477EC) TRIGGER_FLOOR_TOUCH 46; EnableGroup(121, 1); EnableGroup(80, 1); @@ -2075,7 +2075,7 @@ static s32 N(pad_9128)[] = { 0x00000000, 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_EPILOGUE) { MakeEntity(0x802E9A18, 110, 60, -100, 0, MAKE_ENTITY_END); } @@ -2103,7 +2103,7 @@ Script N(makeEntities) = SCRIPT({ #include "world/common/UnkFunc16.inc.c" -ApiStatus N(func_80240BD4_C9EAF4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240BD4_C9EAF4)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -2187,7 +2187,7 @@ ApiStatus N(func_80240BD4_C9EAF4)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(PostChapter6StatUpdate)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(PostChapter6StatUpdate)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; set_max_SP(6); diff --git a/src/world/area_flo/flo_00/C9EE30.c b/src/world/area_flo/flo_00/C9EE30.c index 1c94a1f788..b527359a11 100644 --- a/src/world/area_flo/flo_00/C9EE30.c +++ b/src/world/area_flo/flo_00/C9EE30.c @@ -1,6 +1,6 @@ #include "flo_00.h" -ApiStatus N(func_80240F10_C9EE30)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F10_C9EE30)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = *args++; s32 var2 = *args++; @@ -11,7 +11,7 @@ ApiStatus N(func_80240F10_C9EE30)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80240F80_C9EEA0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F80_C9EEA0)(Evt* script, s32 isInitialCall) { f32 var1 = 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); @@ -25,7 +25,7 @@ ApiStatus N(func_80240F80_C9EEA0)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802410B4_C9EFD4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802410B4_C9EFD4)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_by_index(0); f32 temp_f20 = get_variable(NULL, script->varTable[2]); f32 dist = dist2D(-83.0f, 87.0f, script->varTable[12], script->varTable[14]); @@ -44,12 +44,12 @@ ApiStatus N(func_802410B4_C9EFD4)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/SyncStatusMenu.inc.c" -ApiStatus N(func_8024139C_C9F2BC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024139C_C9F2BC)(Evt* script, s32 isInitialCall) { increment_status_menu_disabled(); return ApiStatus_DONE2; } -ApiStatus N(func_802413BC_C9F2DC)(ScriptInstance* script, s32 isInitialCall) { +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 e9d902839e..8335c4656c 100644 --- a/src/world/area_flo/flo_00/flo_00.h +++ b/src/world/area_flo/flo_00/flo_00.h @@ -3,28 +3,28 @@ #define NAMESPACE flo_00 -ApiStatus N(SyncStatusMenu)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(PostChapter6StatUpdate)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFloatFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_C9DF20)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240BD4_C9EAF4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240ED0_C9EDF0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240F10_C9EE30)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240F80_C9EEA0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802410B4_C9EFD4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802411EC_C9F10C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024137C_C9F29C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024139C_C9F2BC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802413BC_C9F2DC)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(SyncStatusMenu)(Evt* script, s32 isInitialCall); +ApiStatus N(PostChapter6StatUpdate)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFloatFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240000_C9DF20)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240BD4_C9EAF4)(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 NpcGroupList N(npcGroupList_80245DE4); extern NpcGroupList N(npcGroupList_80246834); -extern Script N(80242998); -extern Script N(80242FCC); -extern Script N(80245EB8); -extern Script N(80247BCC); -extern Script N(8024834C); -extern Script N(80248E30); -extern Script N(80248F48); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(80242998); +extern EvtSource N(80242FCC); +extern EvtSource N(80245EB8); +extern EvtSource N(80247BCC); +extern EvtSource N(8024834C); +extern EvtSource N(80248E30); +extern EvtSource N(80248F48); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_flo/flo_03/CA72A0.c b/src/world/area_flo/flo_03/CA72A0.c index c94e7d494d..896ba2bc90 100644 --- a/src/world/area_flo/flo_03/CA72A0.c +++ b/src/world/area_flo/flo_03/CA72A0.c @@ -2,7 +2,7 @@ void playFX_82(); -ApiStatus N(func_80240000_CA72A0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_CA72A0)(Evt* script, s32 isInitialCall) { playFX_82(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 index eb85f7619f..1402d685b1 100644 --- a/src/world/area_flo/flo_03/CA72E0.c +++ b/src/world/area_flo/flo_03/CA72E0.c @@ -27,7 +27,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_03_tattle }, }; -Script N(802406A0) = SCRIPT({ +EvtSource N(802406A0) = SCRIPT({ GetEntryID(SI_VAR(0)); if (SI_VAR(0) == 2) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); @@ -49,7 +49,7 @@ Script N(802406A0) = SCRIPT({ } }); -Script N(802407C0) = SCRIPT({ +EvtSource N(802407C0) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { if (SI_SAVE_FLAG(1411) == 1) { PushSong(137, 0); @@ -57,7 +57,7 @@ Script N(802407C0) = SCRIPT({ } }); -Script N(80240814) = SCRIPT({ +EvtSource N(80240814) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { if (SI_SAVE_FLAG(1411) == 1) { FadeOutMusic(0, 250); @@ -67,7 +67,7 @@ Script N(80240814) = SCRIPT({ } }); -Script N(80240880) = SCRIPT({ +EvtSource N(80240880) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -106,16 +106,16 @@ Script N(80240880) = SCRIPT({ goto 0; }); -Script N(exitWalk_80240B2C) = EXIT_WALK_SCRIPT(60, 0, "flo_09", 1); +EvtSource N(exitWalk_80240B2C) = EXIT_WALK_SCRIPT(60, 0, "flo_09", 1); -Script N(exitWalk_80240B88) = EXIT_WALK_SCRIPT(60, 1, "flo_22", 0); +EvtSource N(exitWalk_80240B88) = EXIT_WALK_SCRIPT(60, 1, "flo_22", 0); -Script N(80240BE4) = SCRIPT({ +EvtSource N(80240BE4) = SCRIPT({ bind N(exitWalk_80240B2C) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_80240B88) TRIGGER_FLOOR_ABOVE 4; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -175,12 +175,12 @@ NpcSettings N(npcSettings_80240EDC) = { s32** N(D_80240F08_CA81A8) = NULL; -Script N(80240F0C) = SCRIPT({ +EvtSource N(80240F0C) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 0); return; }); -Script N(80240F3C) = SCRIPT({ +EvtSource N(80240F3C) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 16); return; }); @@ -205,7 +205,7 @@ s32 N(intTable_80240FD8)[] = { 0x0000008C, }; -Script N(80240FFC) = SCRIPT({ +EvtSource N(80240FFC) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); SetNpcYaw(NPC_PETUNIA, 90); @@ -227,11 +227,11 @@ Script N(80240FFC) = SCRIPT({ sleep 100; }); -Script N(npcAI_8024119C) = SCRIPT({ +EvtSource N(npcAI_8024119C) = SCRIPT({ N(func_80240158_CA73F8)(); }); -Script N(defeat_802411B8) = SCRIPT({ +EvtSource N(defeat_802411B8) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -244,7 +244,7 @@ Script N(defeat_802411B8) = SCRIPT({ } }); -Script N(8024122C) = SCRIPT({ +EvtSource N(8024122C) = SCRIPT({ GetPlayerPos(SI_VAR(3), SI_VAR(1), SI_VAR(2)); GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += SI_VAR(3); @@ -252,7 +252,7 @@ Script N(8024122C) = SCRIPT({ SetCamProperties(0, SI_VAR(4), SI_VAR(0), SI_VAR(1), SI_VAR(2), 300, 20.0, -9.5); }); -Script N(interact_802412BC) = SCRIPT({ +EvtSource N(interact_802412BC) = SCRIPT({ await N(802407C0); match SI_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { @@ -395,7 +395,7 @@ Script N(interact_802412BC) = SCRIPT({ await N(80240814); }); -Script N(init_80241DA4) = SCRIPT({ +EvtSource N(init_80241DA4) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_802412BC)); if (SI_SAVE_FLAG(1411) == 0) { SetNpcAnimation(NPC_PETUNIA, NPC_ANIM(petunia, Palette_00, Anim_6)); @@ -404,7 +404,7 @@ Script N(init_80241DA4) = SCRIPT({ } }); -Script N(init_80241E10) = SCRIPT({ +EvtSource N(init_80241E10) = SCRIPT({ BindNpcDefeat(NPC_SELF, N(defeat_802411B8)); EnableNpcShadow(NPC_DAYZEE, FALSE); match SI_STORY_PROGRESS { @@ -421,7 +421,7 @@ Script N(init_80241E10) = SCRIPT({ } }); -Script N(80241EF4) = SCRIPT({ +EvtSource N(80241EF4) = SCRIPT({ SI_MAP_VAR(14) = 0; SI_MAP_VAR(10) = 0; SI_MAP_VAR(11) = 0; @@ -430,7 +430,7 @@ Script N(80241EF4) = SCRIPT({ SI_MAP_VAR(15) = 100; }); -Script N(defeat_80241F64) = SCRIPT({ +EvtSource N(defeat_80241F64) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -472,7 +472,7 @@ Script N(defeat_80241F64) = SCRIPT({ } }); -Script N(hit_80242138) = SCRIPT({ +EvtSource N(hit_80242138) = SCRIPT({ if (SI_STORY_PROGRESS == STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { GetOwnerEncounterTrigger(SI_VAR(0)); if (SI_VAR(0) != 1) { @@ -481,7 +481,7 @@ Script N(hit_80242138) = SCRIPT({ } }); -Script N(idle_8024219C) = SCRIPT({ +EvtSource N(idle_8024219C) = SCRIPT({ loop { if (SI_MAP_VAR(10) == 0) { if (SI_AREA_FLAG(23) == 1) { @@ -557,7 +557,7 @@ Script N(idle_8024219C) = SCRIPT({ } }); -Script N(idle_80242618) = SCRIPT({ +EvtSource N(idle_80242618) = SCRIPT({ loop { if (SI_MAP_VAR(11) == 0) { if (SI_AREA_FLAG(24) == 1) { @@ -633,7 +633,7 @@ Script N(idle_80242618) = SCRIPT({ } }); -Script N(idle_80242A94) = SCRIPT({ +EvtSource N(idle_80242A94) = SCRIPT({ loop { if (SI_MAP_VAR(12) == 0) { if (SI_AREA_FLAG(25) == 1) { @@ -709,7 +709,7 @@ Script N(idle_80242A94) = SCRIPT({ } }); -Script N(idle_80242F10) = SCRIPT({ +EvtSource N(idle_80242F10) = SCRIPT({ loop { if (SI_MAP_VAR(13) == 0) { if (SI_AREA_FLAG(26) == 1) { @@ -785,7 +785,7 @@ Script N(idle_80242F10) = SCRIPT({ } }); -Script N(init_8024338C) = SCRIPT({ +EvtSource N(init_8024338C) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE0, FALSE); @@ -808,7 +808,7 @@ Script N(init_8024338C) = SCRIPT({ } }); -Script N(init_802434CC) = SCRIPT({ +EvtSource N(init_802434CC) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE1, FALSE); @@ -831,7 +831,7 @@ Script N(init_802434CC) = SCRIPT({ } }); -Script N(init_8024360C) = SCRIPT({ +EvtSource N(init_8024360C) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE2, FALSE); @@ -854,7 +854,7 @@ Script N(init_8024360C) = SCRIPT({ } }); -Script N(init_8024374C) = SCRIPT({ +EvtSource N(init_8024374C) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE3, FALSE); @@ -1068,7 +1068,7 @@ NpcGroupList N(npcGroupList_8024442C) = { {}, }; -ApiStatus N(func_80240040_CA72E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240040_CA72E0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80240F08_CA81A8) == NULL) { @@ -1088,7 +1088,7 @@ ApiStatus N(func_80240040_CA72E0)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/GetItemName.inc.c" -ApiStatus N(func_80240158_CA73F8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240158_CA73F8)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1179,7 +1179,7 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_80244E44) = { -208.0f, 0.0f, -182.0f, 0.0f }; -Script N(80244E54) = SCRIPT({ +EvtSource N(80244E54) = SCRIPT({ SI_AREA_FLAG(27) = 0; SI_AREA_FLAG(28) = 0; SI_VAR(0) = N(tree1); @@ -1191,11 +1191,11 @@ static s32 N(pad_4ECC) = { 0x00000000, }; -Script N(80244ED0) = SCRIPT({ +EvtSource N(80244ED0) = SCRIPT({ }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAB04, -175, 0, 150, 0, ITEM_MAP, MAKE_ENTITY_END); AssignPanelFlag(SI_SAVE_FLAG(1404)); }); diff --git a/src/world/area_flo/flo_03/flo_03.h b/src/world/area_flo/flo_03/flo_03.h index 22eb49eb38..0a662f9b21 100644 --- a/src/world/area_flo/flo_03/flo_03.h +++ b/src/world/area_flo/flo_03/flo_03.h @@ -3,15 +3,15 @@ #define NAMESPACE flo_03 -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_CA72A0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240158_CA73F8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240460_CA7700)(ScriptInstance* script, s32 isInitialCall); +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 NpcGroupList N(npcGroupList_8024442C); -extern Script N(80240FFC); -extern Script N(80241EF4); -extern Script N(80244E54); -extern Script N(80244ED0); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(80240FFC); +extern EvtSource N(80241EF4); +extern EvtSource N(80244E54); +extern EvtSource N(80244ED0); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_flo/flo_07/CAC1F0.c b/src/world/area_flo/flo_07/CAC1F0.c index 34283f3ca5..f9e69c42e7 100644 --- a/src/world/area_flo/flo_07/CAC1F0.c +++ b/src/world/area_flo/flo_07/CAC1F0.c @@ -23,7 +23,7 @@ typedef struct N(temp) { N(unk_effect)* unk_0C; } N(temp); -ApiStatus N(func_80240344_CAC534)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240344_CAC534)(Evt* script, s32 isInitialCall) { N(temp)* effect = playFX_72(3, -272.0f, 80.0f, 20.0f, 200.0f, 120.0f, 4.0f, 8, 0); effect->unk_0C->unk_38 = 0xF0; diff --git a/src/world/area_flo/flo_07/CAC5D0.c b/src/world/area_flo/flo_07/CAC5D0.c index 21e5890963..0ed3d111c2 100644 --- a/src/world/area_flo/flo_07/CAC5D0.c +++ b/src/world/area_flo/flo_07/CAC5D0.c @@ -19,7 +19,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_07_tattle }, }; -Script N(802407A0) = SCRIPT({ +EvtSource N(802407A0) = SCRIPT({ GetEntryID(SI_VAR(0)); if (SI_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); @@ -35,11 +35,11 @@ Script N(802407A0) = SCRIPT({ PlaySound(0x80000021); }); -Script N(8024086C) = SCRIPT({ +EvtSource N(8024086C) = SCRIPT({ PushSong(137, 1); }); -Script N(80240890) = SCRIPT({ +EvtSource N(80240890) = SCRIPT({ FadeOutMusic(0, 250); sleep 10; PopSong(); @@ -49,7 +49,7 @@ static s32 N(pad_8CC) = { 0x00000000, }; -Script N(updateTexturePan_802408D0) = SCRIPT({ +EvtSource N(updateTexturePan_802408D0) = SCRIPT({ group 0; if (SI_VAR(5) == 1) { if (SI_VAR(6) == 1) { @@ -64,7 +64,7 @@ Script N(updateTexturePan_802408D0) = SCRIPT({ N(UnkTexturePanFunc2)(); }); -Script N(8024096C) = SCRIPT({ +EvtSource N(8024096C) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -103,13 +103,13 @@ Script N(8024096C) = SCRIPT({ goto 0; }); -Script N(exitWalk_80240C18) = EXIT_WALK_SCRIPT(60, 0, "flo_25", 1); +EvtSource N(exitWalk_80240C18) = EXIT_WALK_SCRIPT(60, 0, "flo_25", 1); -Script N(80240C74) = SCRIPT({ +EvtSource N(80240C74) = SCRIPT({ bind N(exitWalk_80240C18) TRIGGER_FLOOR_ABOVE 0; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -215,17 +215,17 @@ NpcSettings N(npcSettings_80241220) = { s32** N(D_80241BB0_CADDA0) = NULL; -Script N(80241BB4) = SCRIPT({ +EvtSource N(80241BB4) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 0); return; }); -Script N(80241BE4) = SCRIPT({ +EvtSource N(80241BE4) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 16); return; }); -Script N(80241C14) = SCRIPT({ +EvtSource N(80241C14) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); GetNpcPos(NPC_POSIE, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -244,14 +244,14 @@ Script N(80241C14) = SCRIPT({ sleep 100; }); -Script N(80241D6C) = SCRIPT({ +EvtSource N(80241D6C) = SCRIPT({ 0: ShakeCam(0, 0, 1, 1.0); sleep 1; goto 0; }); -Script N(80241DBC) = SCRIPT({ +EvtSource N(80241DBC) = SCRIPT({ if (SI_AREA_FLAG(6) == 1) { return; } @@ -288,7 +288,7 @@ Script N(80241DBC) = SCRIPT({ SI_STORY_PROGRESS = STORY_CH6_GOT_CRYSTAL_BERRY; }); -Script N(interact_80242044) = SCRIPT({ +EvtSource N(interact_80242044) = SCRIPT({ await N(8024086C); NpcFacePlayer(NPC_SELF, 1); match SI_STORY_PROGRESS { @@ -360,7 +360,7 @@ Script N(interact_80242044) = SCRIPT({ await N(80240890); }); -Script N(init_80242428) = SCRIPT({ +EvtSource N(init_80242428) = SCRIPT({ if (SI_STORY_PROGRESS == STORY_CH6_GOT_CRYSTAL_BERRY) { if (SI_SAVE_FLAG(1374) == 0) { if (SI_SAVE_FLAG(1396) == 0) { @@ -374,7 +374,7 @@ Script N(init_80242428) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80242044)); }); -Script N(802424F4) = SCRIPT({ +EvtSource N(802424F4) = SCRIPT({ if (SI_AREA_VAR(3) != 0) { DisablePlayerInput(TRUE); sleep 10; @@ -395,7 +395,7 @@ Script N(802424F4) = SCRIPT({ const char N(flo_25_name_hack)[]; -Script N(tree1_Callback) = SCRIPT({ +EvtSource N(tree1_Callback) = SCRIPT({ DisablePlayerInput(TRUE); if (SI_STORY_PROGRESS < STORY_CH6_GOT_CRYSTAL_BERRY) { NpcFacePlayer(NPC_POSIE, 1); @@ -458,7 +458,7 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_802428B4) = { -309.0f, 0.0f, 31.0f, 0.0f }; -Script N(802428C4) = SCRIPT({ +EvtSource N(802428C4) = SCRIPT({ SI_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 4; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_802428B4); @@ -500,7 +500,7 @@ NpcGroupList N(npcGroupList_80242B0C) = { {}, }; -ApiStatus N(func_8024061C_CAC80C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024061C_CAC80C)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241BB0_CADDA0) == NULL) { diff --git a/src/world/area_flo/flo_07/flo_07.h b/src/world/area_flo/flo_07/flo_07.h index d18351524f..002d321ac9 100644 --- a/src/world/area_flo/flo_07/flo_07.h +++ b/src/world/area_flo/flo_07/flo_07.h @@ -3,14 +3,14 @@ #define NAMESPACE flo_07 -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SpawnSunEffect)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240344_CAC534)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); +ApiStatus N(SpawnSunEffect)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc2)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240344_CAC534)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80242B0C); -extern Script N(80241C14); -extern Script N(802424F4); -extern Script N(802428C4); -extern Script N(main); +extern EvtSource N(80241C14); +extern EvtSource N(802424F4); +extern EvtSource N(802428C4); +extern EvtSource N(main); diff --git a/src/world/area_flo/flo_08/CAED40.c b/src/world/area_flo/flo_08/CAED40.c index 1e77236434..6fd93a960d 100644 --- a/src/world/area_flo/flo_08/CAED40.c +++ b/src/world/area_flo/flo_08/CAED40.c @@ -8,7 +8,7 @@ extern s32 D_8008EF20[11][4]; #include "world/common/UnkFunc17.inc.c" -ApiStatus N(func_8024003C_CAED7C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024003C_CAED7C)(Evt* script, s32 isInitialCall) { entity_upgrade_block_hide_content(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -36,7 +36,7 @@ typedef struct { s16 unk_32C; } N(UnkStruct); -ApiStatus N(func_802401CC_CAEF0C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802401CC_CAEF0C)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; N(UnkStruct)* ptr; s32 i; @@ -108,7 +108,7 @@ ApiStatus N(func_802401CC_CAEF0C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } #else -INCLUDE_ASM(ApiStatus, "world/area_flo/flo_08/CAED40", flo_08_func_802401CC_CAEF0C, ScriptInstance* script, +INCLUDE_ASM(ApiStatus, "world/area_flo/flo_08/CAED40", flo_08_func_802401CC_CAEF0C, Evt* script, s32 isInitialCall); #endif @@ -139,7 +139,7 @@ typedef struct { s32 unk_64; } N(UserData); -ApiStatus N(func_80240600_CAF340)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240600_CAF340)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_flo/flo_08/CAFA80.c b/src/world/area_flo/flo_08/CAFA80.c index 78f62981c8..7c0ba3f4da 100644 --- a/src/world/area_flo/flo_08/CAFA80.c +++ b/src/world/area_flo/flo_08/CAFA80.c @@ -2,7 +2,7 @@ void playFX_82(); -ApiStatus N(func_80240D40_CAFA80)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240D40_CAFA80)(Evt* script, s32 isInitialCall) { playFX_82(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 index f950c6fd81..d6d42af491 100644 --- a/src/world/area_flo/flo_08/CAFAC0.c +++ b/src/world/area_flo/flo_08/CAFAC0.c @@ -35,7 +35,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_08_tattle }, }; -Script N(80241F40) = SCRIPT({ +EvtSource N(80241F40) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); @@ -65,7 +65,7 @@ f32 N(D_80242008_CB0D48)[3] = { 140.0f, 180.0f, 220.0f }; -Script N(80242014) = SCRIPT({ +EvtSource N(80242014) = SCRIPT({ sleep 10; PlaySound(0x212D); N(UnkFunc21)(SI_MAP_VAR(0)); @@ -95,7 +95,7 @@ Script N(80242014) = SCRIPT({ sleep 30; }); -Script N(80242178) = SCRIPT({ +EvtSource N(80242178) = SCRIPT({ if (SI_SAVE_FLAG(1402) == 1) { return; } @@ -177,7 +177,7 @@ Script N(80242178) = SCRIPT({ N(UnkFunc17)(); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA910, -780, 120, -110, 0, MAKE_ENTITY_END); SI_MAP_VAR(0) = SI_VAR(0); AssignBlockFlag(SI_SAVE_FLAG(1402)); @@ -185,7 +185,7 @@ Script N(makeEntities) = SCRIPT({ MakeItemEntity(ITEM_STAR_PIECE, 510, 0, -90, 17, SI_SAVE_FLAG(1381)); }); -Script N(80242680) = SCRIPT({ +EvtSource N(80242680) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -224,11 +224,11 @@ Script N(80242680) = SCRIPT({ goto 0; }); -Script N(exitWalk_8024292C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 6); +EvtSource N(exitWalk_8024292C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 6); -Script N(exitWalk_80242988) = EXIT_WALK_SCRIPT(60, 1, "flo_24", 0); +EvtSource N(exitWalk_80242988) = EXIT_WALK_SCRIPT(60, 1, "flo_24", 0); -Script N(802429E4) = SCRIPT({ +EvtSource N(802429E4) = SCRIPT({ bind N(exitWalk_8024292C) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_80242988) TRIGGER_FLOOR_ABOVE 4; }); @@ -238,7 +238,7 @@ s32 N(lavaResetList_80242A2C)[] = { 0x0000000F, 0x42700000, 0x00000000, 0x42480000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -324,11 +324,11 @@ NpcAISettings N(npcAISettings_80242EB0) = { .unk_2C = 1, }; -Script N(npcAI_80242EE0) = SCRIPT({ +EvtSource N(npcAI_80242EE0) = SCRIPT({ N(func_8024150C_CB024C)(N(npcAISettings_80242EB0)); }); -Script N(80242F00) = SCRIPT({ +EvtSource N(80242F00) = SCRIPT({ 0: GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 30; @@ -369,7 +369,7 @@ NpcAISettings N(npcAISettings_8024300C) = { .unk_2C = 1, }; -Script N(npcAI_8024303C) = SCRIPT({ +EvtSource N(npcAI_8024303C) = SCRIPT({ DoBasicAI(N(npcAISettings_8024300C)); }); @@ -388,7 +388,7 @@ s32 N(D_8024308C_CB1DCC) = { 0x00000000, }; -Script N(80243090) = SCRIPT({ +EvtSource N(80243090) = SCRIPT({ SI_VAR(9) = SI_VAR(1); ShowConsumableChoicePopup(); SI_VAR(10) = SI_VAR(0); @@ -411,13 +411,13 @@ Script N(80243090) = SCRIPT({ unbind; }); -Script N(802431C4) = SCRIPT({ +EvtSource N(802431C4) = SCRIPT({ N(func_802419FC_CB073C)(SI_VAR(0)); bind_padlock N(80243090) 0x10 0 N(D_802462C0_B4AA30); N(func_80241970_CB06B0)(SI_VAR(0)); }); -Script N(interact_80243214) = SCRIPT({ +EvtSource N(interact_80243214) = SCRIPT({ DisablePlayerInput(TRUE); if (SI_SAVE_FLAG(1364) == 0) { GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -557,7 +557,7 @@ Script N(interact_80243214) = SCRIPT({ unbind; }); -Script N(init_80243B20) = SCRIPT({ +EvtSource N(init_80243B20) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80243214)); if (SI_SAVE_FLAG(1364) == 1) { SetNpcAnimation(NPC_SELF, NPC_ANIM(gate_flower, Palette_02, Anim_5)); @@ -861,7 +861,7 @@ StaticNpc N(npcGroup_802449D8) = { .unk_1E0 = { 00, 00, 00, 03, 00, 00, 00, 00}, }; -Script N(init_80244BC8) = SCRIPT({ +EvtSource N(init_80244BC8) = SCRIPT({ spawn { sleep 2; GetNpcPointer(2, SI_VAR(0)); @@ -937,7 +937,7 @@ static s32 N(pad_4F3C) = { 0x00000000, }; -void N(func_80240D80_CAFAC0)(ScriptInstance* script, NpcAISettings* npcAISettings, EnemyTerritoryThing* territory) { +void N(func_80240D80_CAFAC0)(Evt* script, NpcAISettings* npcAISettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1051,7 +1051,7 @@ void N(func_80240D80_CAFAC0)(ScriptInstance* script, NpcAISettings* npcAISetting script->functionTemp[0] = 0xD; } -void N(func_80241364_CB00A4)(ScriptInstance* script, NpcAISettings* npcAISettings, EnemyTerritoryThing* territory) { +void N(func_80241364_CB00A4)(Evt* script, NpcAISettings* npcAISettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -1079,7 +1079,7 @@ void N(func_80241364_CB00A4)(ScriptInstance* script, NpcAISettings* npcAISetting } } -void N(func_802414C8_CB0208)(ScriptInstance* script, NpcAISettings* npcAISettings, EnemyTerritoryThing* territory) { +void N(func_802414C8_CB0208)(Evt* script, NpcAISettings* npcAISettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1089,7 +1089,7 @@ void N(func_802414C8_CB0208)(ScriptInstance* script, NpcAISettings* npcAISetting } } -ApiStatus N(func_8024150C_CB024C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024150C_CB024C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -1158,7 +1158,7 @@ ApiStatus N(func_8024150C_CB024C)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/AddPlayerHandsOffset.inc.c" -ApiStatus N(func_80241970_CB06B0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241970_CB06B0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -1174,7 +1174,7 @@ ApiStatus N(func_80241970_CB06B0)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_802419C4_CB0704)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802419C4_CB0704)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_8024308C_CB1DCC) = get_variable(script, *args); @@ -1182,7 +1182,7 @@ ApiStatus N(func_802419C4_CB0704)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802419FC_CB073C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802419FC_CB073C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -1201,7 +1201,7 @@ ApiStatus N(func_802419FC_CB073C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80241A98_CB07D8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241A98_CB07D8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemIdx = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); @@ -1216,7 +1216,7 @@ ApiStatus N(func_80241A98_CB07D8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80241B5C_CB089C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241B5C_CB089C)(Evt* script, s32 isInitialCall) { s32 itemId = get_variable(script, *script->ptrReadPos); StaticItem* item = &gItemTable[itemId]; @@ -1231,7 +1231,7 @@ ApiStatus N(func_80241B5C_CB089C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80241BCC_CB090C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241BCC_CB090C)(Evt* script, s32 isInitialCall) { s32 i; for (i = 0; i <= 90; i++) { @@ -1280,7 +1280,7 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_80245904) = { 391.0f, 0.0f, -102.0f, 0.0f }; -Script N(80245914) = SCRIPT({ +EvtSource N(80245914) = SCRIPT({ SI_AREA_FLAG(29) = 0; SI_AREA_FLAG(30) = 0; SI_VAR(0) = N(tree1); @@ -1292,7 +1292,7 @@ static s32 N(pad_598C) = { 0x00000000, }; -Script N(80245990) = SCRIPT({ +EvtSource N(80245990) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -1331,7 +1331,7 @@ Script N(80245990) = SCRIPT({ goto 0; }); -Script N(80245C3C) = SCRIPT({ +EvtSource N(80245C3C) = SCRIPT({ SI_VAR(9) = SI_VAR(6); SI_VAR(8) = SI_VAR(5); SI_VAR(7) = SI_VAR(4); @@ -1381,7 +1381,7 @@ Script N(80245C3C) = SCRIPT({ EnableModel(SI_VAR(7), 0); }); -Script N(80245F5C) = SCRIPT({ +EvtSource N(80245F5C) = SCRIPT({ GetModelCenter(60); SI_VAR(3) = 60; SI_VAR(4) = 61; diff --git a/src/world/area_flo/flo_08/flo_08.h b/src/world/area_flo/flo_08/flo_08.h index ba88b6e7cd..775803b87c 100644 --- a/src/world/area_flo/flo_08/flo_08.h +++ b/src/world/area_flo/flo_08/flo_08.h @@ -3,39 +3,39 @@ #define NAMESPACE flo_08 -ApiStatus N(AddPlayerHandsOffset)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SetOverrideFlags_40)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc17)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc18)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc19)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc20)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc21)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc22)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc23)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkPartnerPosFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkPartnerPosFunc2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024003C_CAED7C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc38)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802401CC_CAEF0C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SwitchToPartner)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc39)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240600_CAF340)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc40)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240D40_CAFA80)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024150C_CB024C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241970_CB06B0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802419C4_CB0704)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802419FC_CB073C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241A98_CB07D8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241B5C_CB089C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241BCC_CB090C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc43)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall); +ApiStatus N(SetOverrideFlags_40)(Evt* script, s32 isInitialCall); +ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc17)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc18)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc19)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc20)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc21)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc22)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc23)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkPartnerPosFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkPartnerPosFunc2)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024003C_CAED7C)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc38)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802401CC_CAEF0C)(Evt* script, s32 isInitialCall); +ApiStatus N(SwitchToPartner)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc39)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240600_CAF340)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc40)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240D40_CAFA80)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024150C_CB024C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241970_CB06B0)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802419C4_CB0704)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802419FC_CB073C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241A98_CB07D8)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241B5C_CB089C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241BCC_CB090C)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc43)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80244EC4); -extern Script N(80245914); -extern Script N(80245F5C); -extern Script N(main); +extern EvtSource N(80245914); +extern EvtSource N(80245F5C); +extern EvtSource N(main); extern s32 N(D_80241FB0_CB0CF0)[]; extern s16 N(D_80241FB8_CB0CF8)[]; extern s32 N(D_80241FC8_CB0D08)[8][2]; diff --git a/src/world/area_flo/flo_09/CB5000.c b/src/world/area_flo/flo_09/CB5000.c index db01aba65e..d31f37bb74 100644 --- a/src/world/area_flo/flo_09/CB5000.c +++ b/src/world/area_flo/flo_09/CB5000.c @@ -2,7 +2,7 @@ void playFX_82(); -ApiStatus N(func_80240000_CB5000)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_CB5000)(Evt* script, s32 isInitialCall) { playFX_82(1, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/area_flo/flo_09/CB50E0.c b/src/world/area_flo/flo_09/CB50E0.c index 4dbb5330f6..b8689b1396 100644 --- a/src/world/area_flo/flo_09/CB50E0.c +++ b/src/world/area_flo/flo_09/CB50E0.c @@ -23,7 +23,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_09_tattle }, }; -Script N(80241880) = SCRIPT({ +EvtSource N(80241880) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); @@ -33,7 +33,7 @@ Script N(80241880) = SCRIPT({ } }); -Script N(802418F0) = SCRIPT({ +EvtSource N(802418F0) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -72,16 +72,16 @@ Script N(802418F0) = SCRIPT({ goto 0; }); -Script N(exitWalk_80241B9C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 5); +EvtSource N(exitWalk_80241B9C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 5); -Script N(exitWalk_80241BF8) = EXIT_WALK_SCRIPT(60, 1, "flo_03", 0); +EvtSource N(exitWalk_80241BF8) = EXIT_WALK_SCRIPT(60, 1, "flo_03", 0); -Script N(80241C54) = SCRIPT({ +EvtSource N(80241C54) = SCRIPT({ bind N(exitWalk_80241B9C) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_80241BF8) TRIGGER_FLOOR_ABOVE 4; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -141,7 +141,7 @@ static s32 N(pad_2004)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80242010) = SCRIPT({ +EvtSource N(80242010) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -180,7 +180,7 @@ Script N(80242010) = SCRIPT({ goto 0; }); -Script N(802422BC) = SCRIPT({ +EvtSource N(802422BC) = SCRIPT({ SI_VAR(9) = SI_VAR(6); SI_VAR(8) = SI_VAR(5); SI_VAR(7) = SI_VAR(4); @@ -230,7 +230,7 @@ Script N(802422BC) = SCRIPT({ EnableModel(SI_VAR(7), 0); }); -Script N(802425DC) = SCRIPT({ +EvtSource N(802425DC) = SCRIPT({ GetModelCenter(69); SI_VAR(3) = 69; SI_VAR(4) = 70; @@ -281,7 +281,7 @@ static s32 N(pad_2874)[] = { #include "world/common/foliage.inc.c" -Script N(802431E4) = SCRIPT({ +EvtSource N(802431E4) = SCRIPT({ GetNpcPos(NPC_BZZAP1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); if (SI_VAR(1) < 0) { GetModelCenter(SI_VAR(9)); @@ -290,7 +290,7 @@ Script N(802431E4) = SCRIPT({ } }); -Script N(tree1_Callback) = SCRIPT({ +EvtSource N(tree1_Callback) = SCRIPT({ if (SI_SAVE_FLAG(1382) == 0) { if (SI_AREA_VAR(5) == 1) { MakeItemEntity(ITEM_HAPPY_FLOWER_B, -250, 100, 0, 13, SI_SAVE_FLAG(1382)); @@ -303,14 +303,14 @@ Script N(tree1_Callback) = SCRIPT({ } }); -Script N(tree2_Callback) = SCRIPT({ +EvtSource N(tree2_Callback) = SCRIPT({ if (SI_SAVE_FLAG(1382) == 0) { SI_AREA_VAR(4) = 1; SI_AREA_VAR(5) = 0; } }); -Script N(tree3_Callback) = SCRIPT({ +EvtSource N(tree3_Callback) = SCRIPT({ if (SI_SAVE_FLAG(1382) == 0) { if (SI_AREA_VAR(4) == 1) { if (SI_AREA_VAR(5) == 0) { @@ -379,7 +379,7 @@ ShakeTreeConfig N(tree3) = { Vec4f N(triggerCoord_80243498) = { 200.0f, 0.0f, 1.0f, 0.0f }; -Script N(802434A8) = SCRIPT({ +EvtSource N(802434A8) = SCRIPT({ SI_AREA_VAR(4) = 0; SI_AREA_VAR(5) = 0; SI_VAR(0) = N(tree1); @@ -408,7 +408,7 @@ NpcAISettings N(npcAISettings_802435B0) = { .unk_2C = 1, }; -Script N(npcAI_802435E0) = SCRIPT({ +EvtSource N(npcAI_802435E0) = SCRIPT({ DoBasicAI(N(npcAISettings_802435B0)); }); @@ -441,7 +441,7 @@ NpcAISettings N(npcAISettings_80243644) = { .unk_2C = 1, }; -Script N(npcAI_80243674) = SCRIPT({ +EvtSource N(npcAI_80243674) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(5, -630); SetSelfVar(6, 50); @@ -464,7 +464,7 @@ NpcSettings N(npcSettings_80243710) = { .level = 99, }; -Script N(npcAI_8024373C) = SCRIPT({ +EvtSource N(npcAI_8024373C) = SCRIPT({ loop { GetSelfVar(0, SI_VAR(0)); match SI_VAR(0) { @@ -491,7 +491,7 @@ Script N(npcAI_8024373C) = SCRIPT({ } }); -Script N(defeat_802438C8) = SCRIPT({ +EvtSource N(defeat_802438C8) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -505,7 +505,7 @@ Script N(defeat_802438C8) = SCRIPT({ } }); -Script N(init_80243954) = SCRIPT({ +EvtSource N(init_80243954) = SCRIPT({ BindNpcIdle(NPC_SELF, N(npcAI_8024373C)); BindNpcDefeat(NPC_SELF, N(defeat_802438C8)); }); diff --git a/src/world/area_flo/flo_09/CB5320.c b/src/world/area_flo/flo_09/CB5320.c index 20e0db1682..a5f6443035 100644 --- a/src/world/area_flo/flo_09/CB5320.c +++ b/src/world/area_flo/flo_09/CB5320.c @@ -3,7 +3,7 @@ #include "world/common/UnkNpcAIFunc23.inc.c" #ifdef NON_MATCHING -void N(func_802404D0_CB54D0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802404D0_CB54D0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -147,7 +147,7 @@ void N(func_802404D0_CB54D0)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(ApiStatus, "world/area_flo/flo_09/CB5320", flo_09_func_802404D0_CB54D0, ScriptInstance* script, +INCLUDE_ASM(ApiStatus, "world/area_flo/flo_09/CB5320", flo_09_func_802404D0_CB54D0, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -157,7 +157,7 @@ INCLUDE_ASM(ApiStatus, "world/area_flo/flo_09/CB5320", flo_09_func_802404D0_CB54 #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_80240F74_CB5F74)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240F74_CB5F74)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -175,7 +175,7 @@ void N(func_80240F74_CB5F74)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_8024162C_CB662C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024162C_CB662C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_flo/flo_09/flo_09.h b/src/world/area_flo/flo_09/flo_09.h index 012fe1c845..3bec2750aa 100644 --- a/src/world/area_flo/flo_09/flo_09.h +++ b/src/world/area_flo/flo_09/flo_09.h @@ -3,13 +3,13 @@ #define NAMESPACE flo_09 -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_CB5000)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc43)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024162C_CB662C)(ScriptInstance* script, s32 isInitialCall); +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(func_8024162C_CB662C)(Evt* script, s32 isInitialCall); extern f32 N(D_8024362C_CB862C)[]; extern NpcGroupList N(npcGroupList_8024414C); -extern Script N(802425DC); -extern Script N(802434A8); -extern Script N(main); +extern EvtSource N(802425DC); +extern EvtSource N(802434A8); +extern EvtSource N(main); diff --git a/src/world/area_flo/flo_10/CB9240.c b/src/world/area_flo/flo_10/CB9240.c index 158ae31249..0ac8af2249 100644 --- a/src/world/area_flo/flo_10/CB9240.c +++ b/src/world/area_flo/flo_10/CB9240.c @@ -2,7 +2,7 @@ void playFX_82(); -ApiStatus N(func_80240040_CB9240)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240040_CB9240)(Evt* script, s32 isInitialCall) { playFX_82(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 index b03eb00d17..b53cb53784 100644 --- a/src/world/area_flo/flo_10/CB9280.c +++ b/src/world/area_flo/flo_10/CB9280.c @@ -20,7 +20,7 @@ MapConfig N(config) = { .tattle = N(func_80240000_CB9200), }; -Script N(802414E0) = SCRIPT({ +EvtSource N(802414E0) = SCRIPT({ GetEntryID(SI_VAR(0)); if (SI_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); @@ -38,11 +38,11 @@ Script N(802414E0) = SCRIPT({ } }); -Script N(802415C4) = SCRIPT({ +EvtSource N(802415C4) = SCRIPT({ PushSong(137, 2); }); -Script N(802415E8) = SCRIPT({ +EvtSource N(802415E8) = SCRIPT({ FadeOutMusic(0, 250); sleep 10; PopSong(); @@ -52,7 +52,7 @@ static s32 N(pad_1624)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80241630) = SCRIPT({ +EvtSource N(80241630) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { MakeItemEntity(ITEM_WATER_STONE, 0, -60, 6, 1, 0); } @@ -62,7 +62,7 @@ static s32 N(pad_167C) = { 0x00000000, }; -Script N(80241680) = SCRIPT({ +EvtSource N(80241680) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -101,13 +101,13 @@ Script N(80241680) = SCRIPT({ goto 0; }); -Script N(exitWalk_8024192C) = EXIT_WALK_SCRIPT(60, 0, "flo_24", 1); +EvtSource N(exitWalk_8024192C) = EXIT_WALK_SCRIPT(60, 0, "flo_24", 1); -Script N(80241988) = SCRIPT({ +EvtSource N(80241988) = SCRIPT({ bind N(exitWalk_8024192C) TRIGGER_FLOOR_ABOVE 0; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -166,17 +166,17 @@ static s32 N(pad_1CA8)[] = { s32** N(D_80241CB0_CBAEB0) = NULL; -Script N(80241CB4) = SCRIPT({ +EvtSource N(80241CB4) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 0); return; }); -Script N(80241CE4) = SCRIPT({ +EvtSource N(80241CE4) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 16); return; }); -Script N(updateTexturePan_80241D14) = SCRIPT({ +EvtSource N(updateTexturePan_80241D14) = SCRIPT({ group 0; if (SI_VAR(5) == 1) { if (SI_VAR(6) == 1) { @@ -191,7 +191,7 @@ Script N(updateTexturePan_80241D14) = SCRIPT({ N(UnkTexturePanFunc2)(); }); -Script N(80241DB0) = SCRIPT({ +EvtSource N(80241DB0) = SCRIPT({ MakeLerp(-50, 170, 385, 0); 1: UpdateLerp(); @@ -202,7 +202,7 @@ Script N(80241DB0) = SCRIPT({ } }); -Script N(80241E40) = SCRIPT({ +EvtSource N(80241E40) = SCRIPT({ MakeLerp(0, 100, 90, 1); 1: UpdateLerp(); @@ -218,7 +218,7 @@ Script N(80241E40) = SCRIPT({ } }); -Script N(80241F20) = SCRIPT({ +EvtSource N(80241F20) = SCRIPT({ EnableTexPanning(53, 1); spawn { SI_VAR(0) = 10; @@ -238,13 +238,13 @@ Script N(80241F20) = SCRIPT({ } }); -Script N(80242030) = SCRIPT({ +EvtSource N(80242030) = SCRIPT({ sleep 60; EnableModel(53, 1); spawn N(80241F20); }); -Script N(8024206C) = SCRIPT({ +EvtSource N(8024206C) = SCRIPT({ sleep 80; EnableNpcShadow(NPC_LILY, FALSE); GetNpcPos(NPC_LILY, SI_VAR(3), SI_VAR(4), SI_VAR(5)); @@ -263,7 +263,7 @@ Script N(8024206C) = SCRIPT({ } }); -Script N(80242188) = SCRIPT({ +EvtSource N(80242188) = SCRIPT({ DisablePlayerPhysics(TRUE); sleep 40; SetPlayerAnimation(0x80024); @@ -291,7 +291,7 @@ Script N(80242188) = SCRIPT({ DisablePlayerPhysics(FALSE); }); -Script N(8024230C) = SCRIPT({ +EvtSource N(8024230C) = SCRIPT({ sleep 80; GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); UseSettingsFrom(0, SI_VAR(3), SI_VAR(4), SI_VAR(5)); @@ -303,7 +303,7 @@ Script N(8024230C) = SCRIPT({ WaitForCam(0, 1.0); }); -Script N(802423E4) = SCRIPT({ +EvtSource N(802423E4) = SCRIPT({ DisablePartnerAI(0); spawn N(80241DB0); spawn N(80241E40); @@ -313,7 +313,7 @@ Script N(802423E4) = SCRIPT({ spawn N(8024230C); }); -Script N(8024244C) = SCRIPT({ +EvtSource N(8024244C) = SCRIPT({ MakeLerp(170, 75, 150, 0); 1: UpdateLerp(); @@ -324,7 +324,7 @@ Script N(8024244C) = SCRIPT({ } }); -Script N(802424DC) = SCRIPT({ +EvtSource N(802424DC) = SCRIPT({ MakeLerp(100, 15, 150, 1); 1: UpdateLerp(); @@ -340,14 +340,14 @@ Script N(802424DC) = SCRIPT({ } }); -Script N(802425BC) = SCRIPT({ +EvtSource N(802425BC) = SCRIPT({ spawn N(8024244C); spawn N(802424DC); }); const char N(flo_24_name_hack)[]; -Script N(802425E4) = SCRIPT({ +EvtSource N(802425E4) = SCRIPT({ sleep 20; SetPlayerAnimation(ANIM_STAND_STILL); GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); @@ -376,7 +376,7 @@ Script N(802425E4) = SCRIPT({ sleep 100; }); -Script N(802427EC) = SCRIPT({ +EvtSource N(802427EC) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); SetPlayerPos(-100, -10, -172); @@ -418,7 +418,7 @@ Script N(802427EC) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80242AE8) = SCRIPT({ +EvtSource N(80242AE8) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_FILLED_SPRING_WITH_WATER) { EnableGroup(52, 0); EnableGroup(61, 0); @@ -551,7 +551,7 @@ NpcSettings N(npcSettings_80243220) = { const char N(flo_24_name_hack)[] = "flo_24"; -Script N(8024324C) = SCRIPT({ +EvtSource N(8024324C) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); SetNpcPos(NPC_LILY, 60, 0, 55); @@ -574,7 +574,7 @@ s32 N(itemList_80243394)[] = { ITEM_NONE, }; -Script N(8024339C) = SCRIPT({ +EvtSource N(8024339C) = SCRIPT({ if (SI_SAVE_FLAG(1376) == 1) { GetCurrentPartner(SI_VAR(10)); if (SI_VAR(10) != 0) { @@ -614,11 +614,11 @@ Script N(8024339C) = SCRIPT({ } }); -Script N(802435F8) = SCRIPT({ +EvtSource N(802435F8) = SCRIPT({ bind_padlock N(8024339C) TRIGGER_FLOOR_TOUCH 15 N(itemList_80243394); }); -Script N(80243628) = SCRIPT({ +EvtSource N(80243628) = SCRIPT({ sleep 10; GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); @@ -648,7 +648,7 @@ Script N(80243628) = SCRIPT({ } }); -Script N(interact_802437C8) = SCRIPT({ +EvtSource N(interact_802437C8) = SCRIPT({ await N(802415C4); match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { @@ -734,7 +734,7 @@ Script N(interact_802437C8) = SCRIPT({ await N(802415E8); }); -Script N(init_80243D78) = SCRIPT({ +EvtSource N(init_80243D78) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_802437C8)); match SI_STORY_PROGRESS { < STORY_CH6_GOT_WATER_STONE { @@ -797,7 +797,7 @@ s32 N(D_80244070_CBD270) = { 0x00000000, }; -Script N(80244074) = SCRIPT({ +EvtSource N(80244074) = SCRIPT({ }); @@ -805,7 +805,7 @@ static s32 N(pad_4084)[] = { 0x00000000, 0x00000000, 0x00000000, }; -ApiStatus N(func_80240080_CB9280)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240080_CB9280)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241CB0_CBAEB0) == NULL) { diff --git a/src/world/area_flo/flo_10/CBA430.c b/src/world/area_flo/flo_10/CBA430.c index a683dfa4f8..fe8b31bd2c 100644 --- a/src/world/area_flo/flo_10/CBA430.c +++ b/src/world/area_flo/flo_10/CBA430.c @@ -32,7 +32,7 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_80244A40) = { 137.0f, 0.0f, -283.0f, 0.0f }; -Script N(80244A50) = SCRIPT({ +EvtSource N(80244A50) = SCRIPT({ SI_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 9; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80244A40); diff --git a/src/world/area_flo/flo_10/flo_10.h b/src/world/area_flo/flo_10/flo_10.h index 976ff10f60..19dbe940fc 100644 --- a/src/world/area_flo/flo_10/flo_10.h +++ b/src/world/area_flo/flo_10/flo_10.h @@ -3,19 +3,19 @@ #define NAMESPACE flo_10 -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc2)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc2)(Evt* script, s32 isInitialCall); s32 N(func_80240000_CB9200)(void); -ApiStatus N(func_80240040_CB9240)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80240040_CB9240)(Evt* script, s32 isInitialCall); extern s32 N(D_80244070_CBD270); extern s32** N(D_80241CB0_CBAEB0); extern NpcGroupList N(npcGroupList_80244054); -extern Script N(802427EC); -extern Script N(80242AE8); -extern Script N(8024324C); -extern Script N(802435F8); -extern Script N(80244074); -extern Script N(80244A50); -extern Script N(main); +extern EvtSource N(802427EC); +extern EvtSource N(80242AE8); +extern EvtSource N(8024324C); +extern EvtSource N(802435F8); +extern EvtSource N(80244074); +extern EvtSource N(80244A50); +extern EvtSource N(main); diff --git a/src/world/area_flo/flo_11/CBDCD0.c b/src/world/area_flo/flo_11/CBDCD0.c index 9dcaaa53e9..4c2b53e564 100644 --- a/src/world/area_flo/flo_11/CBDCD0.c +++ b/src/world/area_flo/flo_11/CBDCD0.c @@ -26,7 +26,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_11_tattle }, }; -Script N(802403E0) = SCRIPT({ +EvtSource N(802403E0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); @@ -36,7 +36,7 @@ Script N(802403E0) = SCRIPT({ } }); -Script N(80240450) = SCRIPT({ +EvtSource N(80240450) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -75,7 +75,7 @@ Script N(80240450) = SCRIPT({ goto 0; }); -Script N(802406FC) = SCRIPT({ +EvtSource N(802406FC) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); DisablePartnerAI(0); @@ -129,7 +129,7 @@ Script N(802406FC) = SCRIPT({ spawn 0xFE363C8A; }); -Script N(80240A50) = SCRIPT({ +EvtSource N(80240A50) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); HidePlayerShadow(TRUE); @@ -190,7 +190,7 @@ Script N(80240A50) = SCRIPT({ spawn 0xFE363C8A; }); -Script N(80240E40) = SCRIPT({ +EvtSource N(80240E40) = SCRIPT({ N(UnkFunc25)(); if (SI_VAR(0) == 0) { return; @@ -210,7 +210,7 @@ Script N(80240E40) = SCRIPT({ await N(80240F1C); }); -Script N(80240F1C) = SCRIPT({ +EvtSource N(80240F1C) = SCRIPT({ N(SetPlayerStatusAnimFlags100000)(); group 27; DisablePlayerPhysics(TRUE); @@ -242,7 +242,7 @@ Script N(80240F1C) = SCRIPT({ await 0xFE363C8C; }); -Script N(802410F8) = SCRIPT({ +EvtSource N(802410F8) = SCRIPT({ IsPlayerOnValidFloor(SI_VAR(0)); if (SI_VAR(0) == 0) { return; @@ -302,54 +302,54 @@ Script N(802410F8) = SCRIPT({ await 0xFE363C8C; }); -Script N(exitWalk_8024142C) = EXIT_WALK_SCRIPT(60, 0, "flo_23", 1); +EvtSource N(exitWalk_8024142C) = EXIT_WALK_SCRIPT(60, 0, "flo_23", 1); -Script N(exitWalk_80241488) = EXIT_WALK_SCRIPT(60, 1, "flo_12", 0); +EvtSource N(exitWalk_80241488) = EXIT_WALK_SCRIPT(60, 1, "flo_12", 0); -Script N(802414E4) = SCRIPT({ +EvtSource N(802414E4) = SCRIPT({ group 27; GotoMap("flo_11", 5); sleep 100; }); -Script N(80241520) = SCRIPT({ +EvtSource N(80241520) = SCRIPT({ group 27; GotoMap("flo_11", 6); sleep 100; }); -Script N(8024155C) = SCRIPT({ +EvtSource N(8024155C) = SCRIPT({ group 27; GotoMap("flo_11", 7); sleep 100; }); -Script N(80241598) = SCRIPT({ +EvtSource N(80241598) = SCRIPT({ group 27; GotoMap("flo_11", 2); sleep 100; }); -Script N(802415D4) = SCRIPT({ +EvtSource N(802415D4) = SCRIPT({ group 27; GotoMap("flo_11", 3); sleep 100; }); -Script N(80241610) = SCRIPT({ +EvtSource N(80241610) = SCRIPT({ group 27; GotoMap("flo_11", 4); sleep 100; }); -Script N(8024164C) = SCRIPT({ +EvtSource N(8024164C) = SCRIPT({ SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); SI_VAR(12) = SI_VAR(2); await N(80240E40); }); -Script N(80241698) = SCRIPT({ +EvtSource N(80241698) = SCRIPT({ bind N(exitWalk_80241488) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_8024142C) TRIGGER_FLOOR_ABOVE 4; SI_VAR(0) = 2; @@ -378,7 +378,7 @@ Script N(80241698) = SCRIPT({ bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1); }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -465,14 +465,14 @@ s32 N(vectorList_80241C84)[] = { 0x42200000, 0x42C80000, 0x43AF0000, 0x42200000, }; -Script N(80241CB4) = SCRIPT({ +EvtSource N(80241CB4) = SCRIPT({ loop { PlaySound(0x295); sleep SI_VAR(0); } }); -Script N(80241CF4) = SCRIPT({ +EvtSource N(80241CF4) = SCRIPT({ SI_VAR(0) = 5; SI_MAP_VAR(11) = spawn N(80241CB4); spawn { @@ -498,7 +498,7 @@ Script N(80241CF4) = SCRIPT({ SI_MAP_VAR(10) = 1; }); -Script N(80241E4C) = SCRIPT({ +EvtSource N(80241E4C) = SCRIPT({ spawn { LoadPath(30, N(vectorList_80241BAC), 4, 0); loop { @@ -522,7 +522,7 @@ Script N(80241E4C) = SCRIPT({ kill SI_MAP_VAR(11); }); -Script N(80241F80) = SCRIPT({ +EvtSource N(80241F80) = SCRIPT({ SI_VAR(0) = 4; SI_MAP_VAR(11) = spawn N(80241CB4); spawn { @@ -547,7 +547,7 @@ Script N(80241F80) = SCRIPT({ } }); -Script N(802420C8) = SCRIPT({ +EvtSource N(802420C8) = SCRIPT({ spawn { LoadPath(40, N(vectorList_80241C54), 4, 0); loop { @@ -574,7 +574,7 @@ Script N(802420C8) = SCRIPT({ kill SI_MAP_VAR(11); }); -Script N(80242240) = SCRIPT({ +EvtSource N(80242240) = SCRIPT({ if (SI_SAVE_FLAG(1377) == 1) { return; } @@ -654,7 +654,7 @@ Script N(80242240) = SCRIPT({ SetNpcVar(0, 0, 1); }); -Script N(idle_80242810) = SCRIPT({ +EvtSource N(idle_80242810) = SCRIPT({ loop { GetSelfVar(0, SI_VAR(0)); if (SI_VAR(0) != 0) { @@ -668,7 +668,7 @@ Script N(idle_80242810) = SCRIPT({ StartBossBattle(3); }); -Script N(defeat_802428B8) = SCRIPT({ +EvtSource N(defeat_802428B8) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -699,7 +699,7 @@ Script N(defeat_802428B8) = SCRIPT({ } }); -Script N(defeat_80242AC4) = SCRIPT({ +EvtSource N(defeat_80242AC4) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -715,7 +715,7 @@ Script N(defeat_80242AC4) = SCRIPT({ } }); -Script N(init_80242B58) = SCRIPT({ +EvtSource N(init_80242B58) = SCRIPT({ SetNpcPos(NPC_LAKITU0, 0, -1000, 0); if (SI_SAVE_FLAG(1377) == 0) { if (SI_STORY_PROGRESS >= STORY_CH6_GOT_MAGICAL_BEAN) { @@ -730,7 +730,7 @@ Script N(init_80242B58) = SCRIPT({ } }); -Script N(init_80242C38) = SCRIPT({ +EvtSource N(init_80242C38) = SCRIPT({ SetNpcPos(NPC_LAKITU1, 0, -1000, 0); if (SI_SAVE_FLAG(1377) == 0) { if (SI_STORY_PROGRESS >= STORY_CH6_GOT_MAGICAL_BEAN) { @@ -829,7 +829,7 @@ static s32 N(pad_30EC) = { 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA0E8, -220, 60, -75, 0, MAKE_ENTITY_END); AssignBlockFlag(SI_SAVE_FLAG(1384)); }); @@ -848,7 +848,7 @@ Script N(makeEntities) = SCRIPT({ void playFX_82(); -ApiStatus N(func_802402E0_CBDFB0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802402E0_CBDFB0)(Evt* script, s32 isInitialCall) { playFX_82(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 32d29daacf..e1633e6664 100644 --- a/src/world/area_flo/flo_11/flo_11.h +++ b/src/world/area_flo/flo_11/flo_11.h @@ -3,16 +3,16 @@ #define NAMESPACE flo_11 -ApiStatus N(GetCurrentCameraYawClamped180)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetCurrentFloor)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(GetEntryPos)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SetPlayerStatusAnimFlags100000)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SomeXYZFunc2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc25)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802402E0_CBDFB0)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(GetCurrentCameraYawClamped180)(Evt* script, s32 isInitialCall); +ApiStatus N(GetCurrentFloor)(Evt* script, s32 isInitialCall); +ApiStatus N(GetEntryPos)(Evt* script, s32 isInitialCall); +ApiStatus N(SetPlayerStatusAnimFlags100000)(Evt* script, s32 isInitialCall); +ApiStatus N(SomeXYZFunc2)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc25)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802402E0_CBDFB0)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_802430D4); -extern Script N(80240F1C); -extern Script N(80242240); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(80240F1C); +extern EvtSource N(80242240); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_flo/flo_12/CC0E30.c b/src/world/area_flo/flo_12/CC0E30.c index ec0d98a40d..bd863014e2 100644 --- a/src/world/area_flo/flo_12/CC0E30.c +++ b/src/world/area_flo/flo_12/CC0E30.c @@ -2,7 +2,7 @@ void playFX_82(); -ApiStatus N(func_80240000_CC0E30)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_CC0E30)(Evt* script, s32 isInitialCall) { playFX_82(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 index fd3306bc38..9702fa1a7b 100644 --- a/src/world/area_flo/flo_12/CC0E70.c +++ b/src/world/area_flo/flo_12/CC0E70.c @@ -22,7 +22,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_12_tattle }, }; -Script N(80240750) = SCRIPT({ +EvtSource N(80240750) = SCRIPT({ GetEntryID(SI_VAR(0)); if (SI_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); @@ -37,11 +37,11 @@ Script N(80240750) = SCRIPT({ } }); -Script N(8024080C) = SCRIPT({ +EvtSource N(8024080C) = SCRIPT({ PushSong(137, 3); }); -Script N(80240830) = SCRIPT({ +EvtSource N(80240830) = SCRIPT({ FadeOutMusic(0, 250); sleep 10; PopSong(); @@ -51,7 +51,7 @@ static s32 N(pad_86C) = { 0x00000000, }; -Script N(80240870) = SCRIPT({ +EvtSource N(80240870) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -90,13 +90,13 @@ Script N(80240870) = SCRIPT({ goto 0; }); -Script N(exitWalk_80240B1C) = EXIT_WALK_SCRIPT(60, 0, "flo_11", 1); +EvtSource N(exitWalk_80240B1C) = EXIT_WALK_SCRIPT(60, 0, "flo_11", 1); -Script N(80240B78) = SCRIPT({ +EvtSource N(80240B78) = SCRIPT({ bind N(exitWalk_80240B1C) TRIGGER_FLOOR_ABOVE 0; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -158,12 +158,12 @@ NpcSettings N(npcSettings_80240E5C) = { s32** N(D_802417EC_CC261C) = NULL; -Script N(802417F0) = SCRIPT({ +EvtSource N(802417F0) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 0); return; }); -Script N(80241820) = SCRIPT({ +EvtSource N(80241820) = SCRIPT({ ShowGotItem(SI_VAR(0), 1, 16); return; }); @@ -176,7 +176,7 @@ s32 N(D_80241854_CC2684) = { 0x00000000, }; -Script N(80241858) = SCRIPT({ +EvtSource N(80241858) = SCRIPT({ SI_VAR(9) = SI_VAR(1); ShowKeyChoicePopup(); SI_VAR(10) = SI_VAR(0); @@ -200,7 +200,7 @@ Script N(80241858) = SCRIPT({ unbind; }); -Script N(8024199C) = SCRIPT({ +EvtSource N(8024199C) = SCRIPT({ N(func_8024064C_CC147C)(SI_VAR(0)); bind_padlock N(80241858) 0x10 0 N(D_802429E0); N(func_802405C0_CC13F0)(SI_VAR(0)); @@ -210,7 +210,7 @@ s32 N(D_802419EC_CC281C)[] = { 0x0000001E, 0x00000000, }; -Script N(802419F4) = SCRIPT({ +EvtSource N(802419F4) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); GetNpcPos(NPC_ROSIE0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -230,7 +230,7 @@ Script N(802419F4) = SCRIPT({ sleep 100; }); -Script N(80241B6C) = SCRIPT({ +EvtSource N(80241B6C) = SCRIPT({ sleep 10; SetNpcFlagBits(NPC_ROSIE0, ((NPC_FLAG_100)), TRUE); PlayerMoveTo(-5, 20, 20); @@ -238,7 +238,7 @@ Script N(80241B6C) = SCRIPT({ PlayerFaceNpc(0, 1); }); -Script N(80241BE4) = SCRIPT({ +EvtSource N(80241BE4) = SCRIPT({ sleep 10; SetNpcFlagBits(NPC_ROSIE0, ((NPC_FLAG_100)), TRUE); SetNpcFlagBits(NPC_ROSIE1, ((NPC_FLAG_100)), TRUE); @@ -248,7 +248,7 @@ Script N(80241BE4) = SCRIPT({ PlayerFaceNpc(0, 1); }); -Script N(interact_80241C8C) = SCRIPT({ +EvtSource N(interact_80241C8C) = SCRIPT({ await N(8024080C); match SI_STORY_PROGRESS { < STORY_CH6_GOT_CRYSTAL_BERRY { @@ -374,7 +374,7 @@ Script N(interact_80241C8C) = SCRIPT({ await N(80240830); }); -Script N(init_802423D0) = SCRIPT({ +EvtSource N(init_802423D0) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241C8C)); GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 35; @@ -470,7 +470,7 @@ NpcGroupList N(npcGroupList_802429B8) = { {}, }; -ApiStatus N(func_8024027C_CC10AC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024027C_CC10AC)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802417EC_CC261C) == NULL) { @@ -494,7 +494,7 @@ ApiStatus N(func_8024027C_CC10AC)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/AddPlayerHandsOffset.inc.c" -ApiStatus N(func_802405C0_CC13F0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405C0_CC13F0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -510,7 +510,7 @@ ApiStatus N(func_802405C0_CC13F0)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80240614_CC1444)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240614_CC1444)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80241854_CC2684) = get_variable(script, *args); @@ -518,7 +518,7 @@ ApiStatus N(func_80240614_CC1444)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_8024064C_CC147C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024064C_CC147C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_flo/flo_12/flo_12.h b/src/world/area_flo/flo_12/flo_12.h index 5ed6124177..344714cbe2 100644 --- a/src/world/area_flo/flo_12/flo_12.h +++ b/src/world/area_flo/flo_12/flo_12.h @@ -3,13 +3,13 @@ #define NAMESPACE flo_12 -ApiStatus N(AddPlayerHandsOffset)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_CC0E30)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802405C0_CC13F0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240614_CC1444)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024064C_CC147C)(ScriptInstance* script, s32 isInitialCall); +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 Script N(802419F4); -extern Script N(main); +extern EvtSource N(802419F4); +extern EvtSource N(main); diff --git a/src/world/area_flo/flo_13/CC3810.c b/src/world/area_flo/flo_13/CC3810.c index af55d80c1e..b1ec4e55b1 100644 --- a/src/world/area_flo/flo_13/CC3810.c +++ b/src/world/area_flo/flo_13/CC3810.c @@ -2,7 +2,7 @@ void playFX_82(); -ApiStatus N(func_80240000_CC3810)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_CC3810)(Evt* script, s32 isInitialCall) { playFX_82(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 index c4f758f937..7a5031857d 100644 --- a/src/world/area_flo/flo_13/CC3850.c +++ b/src/world/area_flo/flo_13/CC3850.c @@ -32,7 +32,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_13_tattle }, }; -Script N(802436D0) = SCRIPT({ +EvtSource N(802436D0) = SCRIPT({ GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); if (SI_VAR(0) < -500) { goto 10; @@ -70,15 +70,15 @@ Script N(802436D0) = SCRIPT({ goto 0; }); -Script N(802438B0) = SCRIPT({ +EvtSource N(802438B0) = SCRIPT({ spawn N(802436D0); }); -Script N(802438CC) = SCRIPT({ +EvtSource N(802438CC) = SCRIPT({ SetMusicTrack(0, SONG_NEW_PARTNER, 0, 8); }); -Script N(802438F8) = SCRIPT({ +EvtSource N(802438F8) = SCRIPT({ FadeOutMusic(0, 500); sleep 15; SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); @@ -88,11 +88,11 @@ static s32 N(pad_3944)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80243950) = SCRIPT({ +EvtSource N(80243950) = SCRIPT({ ModifyColliderFlags(0, 14, 0x7FFFFE00); }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeItemEntity(ITEM_MEGA_SMASH, -61, 60, -85, 17, SI_SAVE_FLAG(1385)); MakeItemEntity(ITEM_SHOOTING_STAR, 128, 0, 157, 17, SI_SAVE_FLAG(1386)); if (SI_SAVE_FLAG(1385) == 0) { @@ -107,7 +107,7 @@ static s32 N(pad_3A3C) = { 0x00000000, }; -Script N(80243A40) = SCRIPT({ +EvtSource N(80243A40) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -146,16 +146,16 @@ Script N(80243A40) = SCRIPT({ goto 0; }); -Script N(exitWalk_80243CEC) = EXIT_WALK_SCRIPT(60, 0, "flo_14", 1); +EvtSource N(exitWalk_80243CEC) = EXIT_WALK_SCRIPT(60, 0, "flo_14", 1); -Script N(exitWalk_80243D48) = EXIT_WALK_SCRIPT(60, 1, "flo_15", 0); +EvtSource N(exitWalk_80243D48) = EXIT_WALK_SCRIPT(60, 1, "flo_15", 0); -Script N(80243DA4) = SCRIPT({ +EvtSource N(80243DA4) = SCRIPT({ bind N(exitWalk_80243D48) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_80243CEC) TRIGGER_FLOOR_ABOVE 4; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -233,7 +233,7 @@ NpcAISettings N(npcAISettings_80244144) = { .unk_2C = 1, }; -Script N(npcAI_80244174) = SCRIPT({ +EvtSource N(npcAI_80244174) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(5, -650); SetSelfVar(6, 30); @@ -263,7 +263,7 @@ NpcAISettings N(npcAISettings_80244210) = { .unk_2C = 3, }; -Script N(npcAI_80244240) = SCRIPT({ +EvtSource N(npcAI_80244240) = SCRIPT({ SetSelfVar(2, 3); SetSelfVar(3, 18); SetSelfVar(5, 3); @@ -271,7 +271,7 @@ Script N(npcAI_80244240) = SCRIPT({ N(func_80242A6C_CC627C)(N(npcAISettings_80244210)); }); -Script N(802442B0) = SCRIPT({ +EvtSource N(802442B0) = SCRIPT({ SetNpcRotation(NPC_SELF, 0, 0, 0); GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { @@ -316,7 +316,7 @@ Vec3f N(vectorList_80244420)[] = { { -390.0, 300.0, 45.0 }, }; -Script N(8024445C) = SCRIPT({ +EvtSource N(8024445C) = SCRIPT({ GetNpcPos(NPC_WORLD_LAKILESTER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); 0: GetNpcPos(NPC_WORLD_LAKILESTER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); @@ -332,7 +332,7 @@ Script N(8024445C) = SCRIPT({ goto 0; }); -Script N(80244560) = SCRIPT({ +EvtSource N(80244560) = SCRIPT({ GetNpcPos(NPC_LAKILULU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); 0: GetNpcPos(NPC_LAKILULU0, SI_VAR(3), SI_VAR(4), SI_VAR(5)); @@ -352,7 +352,7 @@ Script N(80244560) = SCRIPT({ goto 0; }); -Script N(802446AC) = SCRIPT({ +EvtSource N(802446AC) = SCRIPT({ SI_MAP_VAR(10) = 0; loop { loop 2 { @@ -382,7 +382,7 @@ Script N(802446AC) = SCRIPT({ } }); -Script N(80244888) = SCRIPT({ +EvtSource N(80244888) = SCRIPT({ spawn N(802446AC); SetNpcAnimation(NPC_LAKILULU0, NPC_ANIM(lakilulu, Palette_00, Anim_C)); GetNpcPos(NPC_LAKILULU0, SI_VAR(1), SI_VAR(2), SI_VAR(3)); @@ -438,7 +438,7 @@ Script N(80244888) = SCRIPT({ SetNpcAnimation(NPC_LAKILULU0, NPC_ANIM(lakilulu, Palette_00, Anim_1)); }); -Script N(idle_80244BF8) = SCRIPT({ +EvtSource N(idle_80244BF8) = SCRIPT({ if (SI_STORY_PROGRESS != STORY_CH6_SPOKE_WITH_THE_SUN) { return; } @@ -500,7 +500,7 @@ Script N(idle_80244BF8) = SCRIPT({ StartBossBattle(3); }); -Script N(80245014) = SCRIPT({ +EvtSource N(80245014) = SCRIPT({ GetNpcPos(NPC_LAKILULU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); AwaitPlayerLeave(SI_VAR(0), SI_VAR(2), 120); DisablePlayerInput(TRUE); @@ -557,7 +557,7 @@ Script N(80245014) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80245444) = SCRIPT({ +EvtSource N(80245444) = SCRIPT({ DisablePlayerInput(TRUE); sleep 30; SpeakToPlayer(NPC_WORLD_LAKILESTER, NPC_ANIM(world_lakilester, Palette_00, Anim_A), NPC_ANIM(world_lakilester, Palette_00, Anim_4), 0, MESSAGE_ID(0x11, 0x00A2)); @@ -722,7 +722,7 @@ Script N(80245444) = SCRIPT({ await N(80245014); }); -Script N(defeat_80246038) = SCRIPT({ +EvtSource N(defeat_80246038) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -747,7 +747,7 @@ Script N(defeat_80246038) = SCRIPT({ } }); -Script N(interact_802461C0) = SCRIPT({ +EvtSource N(interact_802461C0) = SCRIPT({ if (SI_STORY_PROGRESS <= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SpeakToPlayer(NPC_LAKILULU0, NPC_ANIM(lakilulu, Palette_00, Anim_4), NPC_ANIM(lakilulu, Palette_00, Anim_1), 0, MESSAGE_ID(0x11, 0x0032)); @@ -763,14 +763,14 @@ Script N(interact_802461C0) = SCRIPT({ } }); -Script N(init_80246280) = SCRIPT({ +EvtSource N(init_80246280) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_LAKILESTER_JOINED_PARTY) { BindNpcIdle(NPC_SELF, N(idle_80244BF8)); BindNpcDefeat(NPC_SELF, N(defeat_80246038)); } }); -Script N(init_802462D0) = SCRIPT({ +EvtSource N(init_802462D0) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_BEGAN_PEACH_MISSION) { BindNpcInteract(NPC_SELF, N(interact_802461C0)); SetNpcCollisionSize(-1, 36, 28); @@ -782,18 +782,18 @@ Script N(init_802462D0) = SCRIPT({ } }); -Script N(init_80246370) = SCRIPT({ +EvtSource N(init_80246370) = SCRIPT({ SetNpcPos(NPC_LAKILULU1, 0, -1000, 0); SetNpcAnimation(NPC_LAKILULU1, NPC_ANIM(lakilulu, Palette_00, Anim_B)); }); -Script N(init_802463B0) = SCRIPT({ +EvtSource N(init_802463B0) = SCRIPT({ if (SI_STORY_PROGRESS == STORY_CH6_SPOKE_WITH_THE_SUN) { RemoveNpc(NPC_SELF); } }); -Script N(init_802463E8) = SCRIPT({ +EvtSource N(init_802463E8) = SCRIPT({ if (SI_STORY_PROGRESS == STORY_CH6_SPOKE_WITH_THE_SUN) { RemoveNpc(NPC_SELF); } @@ -1189,7 +1189,7 @@ NpcGroupList N(npcGroupList_80247984) = { #include "world/common/UnkNpcAIFunc23.inc.c" #ifdef NON_MATCHING -void N(func_802404D0_CB54D0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802404D0_CB54D0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -1333,7 +1333,7 @@ void N(func_802404D0_CB54D0)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(void, "world/area_flo/flo_13/CC3850", flo_13_func_80240374_CC3B84, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_flo/flo_13/CC3850", flo_13_func_80240374_CC3B84, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -1343,7 +1343,7 @@ INCLUDE_ASM(void, "world/area_flo/flo_13/CC3850", flo_13_func_80240374_CC3B84, S #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_80240E18_CC4628)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240E18_CC4628)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1361,7 +1361,7 @@ void N(func_80240E18_CC4628)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_802414D0_CC4CE0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802414D0_CC4CE0)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1433,7 +1433,7 @@ s32 N(func_802416BC_CC4ECC)(void) { return -1; } -void N(func_80241704_CC4F14)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241704_CC4F14)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, y, z, w; @@ -1519,7 +1519,7 @@ void N(func_80241704_CC4F14)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241B68_CC5378)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241B68_CC5378)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, y, z, w; @@ -1564,7 +1564,7 @@ void N(func_80241B68_CC5378)(ScriptInstance* script, NpcAISettings* aiSettings, // enemy2 is being copied to a0 #ifdef NON_MATCHING -ApiStatus N(func_80241DB8_CC55C8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241DB8_CC55C8)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1694,7 +1694,7 @@ ApiStatus N(func_80241DB8_CC55C8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } #else -INCLUDE_ASM(ApiStatus, "world/area_flo/flo_13/CC3850", flo_13_func_80241DB8_CC55C8, ScriptInstance* script, +INCLUDE_ASM(ApiStatus, "world/area_flo/flo_13/CC3850", flo_13_func_80241DB8_CC55C8, Evt* script, s32 isInitialCall); #endif @@ -1706,7 +1706,7 @@ INCLUDE_ASM(ApiStatus, "world/area_flo/flo_13/CC3850", flo_13_func_80241DB8_CC55 #include "world/common/set_script_owner_npc_col_height.inc.c" -ApiStatus N(func_8024262C_CC5E3C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024262C_CC5E3C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -1842,7 +1842,7 @@ ApiStatus N(func_8024262C_CC5E3C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80242A6C_CC627C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242A6C_CC627C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -2064,7 +2064,7 @@ ApiStatus N(func_80242A6C_CC627C)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkFunc42.inc.c" -ApiStatus N(func_802433C0_CC6BD0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802433C0_CC6BD0)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(1); s16 param1; s16 param2; @@ -2087,7 +2087,7 @@ ApiStatus N(func_802433C0_CC6BD0)(ScriptInstance* script, s32 isInitialCall) { return (script->functionTemp[1] < script->functionTemp[0]) * ApiStatus_DONE2; } -ApiStatus N(func_802434D4_CC6CE4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802434D4_CC6CE4)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(0); s16 param1; s16 param2; diff --git a/src/world/area_flo/flo_13/flo_13.h b/src/world/area_flo/flo_13/flo_13.h index fb89568342..f309e48bfb 100644 --- a/src/world/area_flo/flo_13/flo_13.h +++ b/src/world/area_flo/flo_13/flo_13.h @@ -3,14 +3,14 @@ #define NAMESPACE flo_13 -ApiStatus N(func_80240000_CC3810)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc41)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241DB8_CC55C8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242A6C_CC627C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc42)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802433C0_CC6BD0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802434D4_CC6CE4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(LoadPartyImage)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80240000_CC3810)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc41)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241DB8_CC55C8)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242A6C_CC627C)(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 NpcGroupList N(npcGroupList_80247984); -extern Script N(main); +extern EvtSource N(main); diff --git a/src/world/area_flo/flo_14/CCB310.c b/src/world/area_flo/flo_14/CCB310.c index 49609340d3..84d0e983b1 100644 --- a/src/world/area_flo/flo_14/CCB310.c +++ b/src/world/area_flo/flo_14/CCB310.c @@ -14,7 +14,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_14_tattle }, }; -Script N(802423F0) = SCRIPT({ +EvtSource N(802423F0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); @@ -24,7 +24,7 @@ Script N(802423F0) = SCRIPT({ } }); -Script N(updateTexturePan_80242460) = SCRIPT({ +EvtSource N(updateTexturePan_80242460) = SCRIPT({ group 0; if (SI_VAR(5) == 1) { if (SI_VAR(6) == 1) { @@ -39,11 +39,11 @@ Script N(updateTexturePan_80242460) = SCRIPT({ N(UnkTexturePanFunc2)(); }); -Script N(exitWalk_802424FC) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 1); +EvtSource N(exitWalk_802424FC) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 1); -Script N(exitWalk_80242558) = EXIT_WALK_SCRIPT(60, 1, "flo_13", 0); +EvtSource N(exitWalk_80242558) = EXIT_WALK_SCRIPT(60, 1, "flo_13", 0); -Script N(802425B4) = SCRIPT({ +EvtSource N(802425B4) = SCRIPT({ bind N(exitWalk_80242558) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_802424FC) TRIGGER_FLOOR_ABOVE 4; }); @@ -57,7 +57,7 @@ s32 N(lavaResetList_802425FC)[] = { 0x00000023, 0xC2480000, 0x00000000, 0x42DC0000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -142,7 +142,7 @@ static s32 N(pad_2BF4)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80242C00) = SCRIPT({ +EvtSource N(80242C00) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -181,7 +181,7 @@ Script N(80242C00) = SCRIPT({ goto 0; }); -Script N(80242EAC) = SCRIPT({ +EvtSource N(80242EAC) = SCRIPT({ SI_VAR(9) = SI_VAR(6); SI_VAR(8) = SI_VAR(5); SI_VAR(7) = SI_VAR(4); @@ -235,7 +235,7 @@ s32 N(D_802431CC_CCE4DC) = { 0x00000000, }; -Script N(802431D0) = SCRIPT({ +EvtSource N(802431D0) = SCRIPT({ GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); MakeLerp(SI_VAR(1), 48, 15, 0); loop { @@ -254,7 +254,7 @@ Script N(802431D0) = SCRIPT({ } }); -Script N(802432E8) = SCRIPT({ +EvtSource N(802432E8) = SCRIPT({ SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_GRAVITY)), FALSE); loop { GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -275,7 +275,7 @@ Vec3f N(vectorList_80243384)[] = { { -69.0, 75.0, 81.0 }, }; -Script N(80243420) = SCRIPT({ +EvtSource N(80243420) = SCRIPT({ sleep 20; PlaySound(0x80000023); LoadPath(165, N(vectorList_80243384), 13, 10); @@ -293,7 +293,7 @@ Script N(80243420) = SCRIPT({ StopSound(0x80000023); }); -Script N(8024352C) = SCRIPT({ +EvtSource N(8024352C) = SCRIPT({ IsPlayerWithin(531, 81, 30, SI_VAR(0)); if (SI_VAR(0) == 0) { return; @@ -346,7 +346,7 @@ Script N(8024352C) = SCRIPT({ unbind; }); -Script N(80243870) = SCRIPT({ +EvtSource N(80243870) = SCRIPT({ PlaySoundAt(0x193, 0, 591, 55, 121); EnableModel(123, 1); SI_VAR(2) = 1.0; @@ -395,7 +395,7 @@ s32 N(D_80243B18_CCEE28) = { 0x0000005A, }; -Script N(80243B1C) = SCRIPT({ +EvtSource N(80243B1C) = SCRIPT({ group 0; SI_VAR(15) = SI_VAR(0); 0: @@ -453,7 +453,7 @@ Script N(80243B1C) = SCRIPT({ }); -Script N(80243E78) = SCRIPT({ +EvtSource N(80243E78) = SCRIPT({ ModifyColliderFlags(3, 31, 0x00000006); ModifyColliderFlags(3, 32, 0x00000006); ModifyColliderFlags(3, 33, 0x00000006); @@ -553,14 +553,14 @@ Script N(80243E78) = SCRIPT({ void playFX_82(); -ApiStatus N(func_8024030C_CCB61C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024030C_CCB61C)(Evt* script, s32 isInitialCall) { playFX_82(0, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } #include "world/common/UnkFunc43.inc.c" -ApiStatus N(func_802403D4_CCB6E4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802403D4_CCB6E4)(Evt* script, s32 isInitialCall) { if (gPlayerData.currentPartner == PARTNER_NONE) { script->varTable[14] = 0; return ApiStatus_DONE2; @@ -571,14 +571,14 @@ ApiStatus N(func_802403D4_CCB6E4)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_8024042C_CCB73C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024042C_CCB73C)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(-4); npc->flags = get_variable(NULL, SI_MAP_VAR(0)); return ApiStatus_DONE2; } -ApiStatus N(func_8024046C_CCB77C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024046C_CCB77C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; script->functionTemp[0] = get_variable(script, *args++); diff --git a/src/world/area_flo/flo_14/CCBE20.c b/src/world/area_flo/flo_14/CCBE20.c index b633ef83aa..fca87b5332 100644 --- a/src/world/area_flo/flo_14/CCBE20.c +++ b/src/world/area_flo/flo_14/CCBE20.c @@ -29,7 +29,7 @@ NpcAISettings N(npcAISettings_802444D8) = { .unk_2C = 1, }; -Script N(npcAI_80244508) = SCRIPT({ +EvtSource N(npcAI_80244508) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(5, -630); SetSelfVar(6, 50); @@ -66,7 +66,7 @@ s32 N(D_80244600_CCF910) = { 0x00000000, }; -Script N(80244604) = SCRIPT({ +EvtSource N(80244604) = SCRIPT({ SI_VAR(9) = SI_VAR(1); ShowConsumableChoicePopup(); SI_VAR(10) = SI_VAR(0); @@ -89,7 +89,7 @@ Script N(80244604) = SCRIPT({ unbind; }); -Script N(80244738) = SCRIPT({ +EvtSource N(80244738) = SCRIPT({ N(func_802422C0_CCD5D0)(SI_VAR(0)); bind_padlock N(80244604) 0x10 0 N(D_802453B0_EF79C0); N(func_80242234_CCD544)(SI_VAR(0)); @@ -100,7 +100,7 @@ s32 N(D_80244788_CCFA98)[] = { 0x000000A1, 0x00000000, }; -Script N(interact_80244790) = SCRIPT({ +EvtSource N(interact_80244790) = SCRIPT({ if (SI_AREA_FLAG(37) == 1) { SI_AREA_FLAG(35) = 1; SpeakToPlayer(NPC_SELF, -1, -1, 0, MESSAGE_ID(0x11, 0x0063)); @@ -150,7 +150,7 @@ Script N(interact_80244790) = SCRIPT({ SI_AREA_FLAG(35) = 0; }); -Script N(init_80244ADC) = SCRIPT({ +EvtSource N(init_80244ADC) = SCRIPT({ SI_AREA_FLAG(36) = 0; SI_AREA_FLAG(37) = 0; BindNpcInteract(NPC_SELF, N(interact_80244790)); @@ -235,7 +235,7 @@ static s32 N(pad_4F24)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80244F30) = SCRIPT({ +EvtSource N(80244F30) = SCRIPT({ MakeItemEntity(ITEM_STAR_PIECE, 675, 60, -100, 17, SI_SAVE_FLAG(1387)); }); @@ -243,7 +243,7 @@ static s32 N(pad_4F64)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80244F70) = SCRIPT({ +EvtSource N(80244F70) = SCRIPT({ loop { N(func_80242360_CCD670)(SI_VAR(0)); if (SI_VAR(0) == SI_VAR(4)) { @@ -291,7 +291,7 @@ Script N(80244F70) = SCRIPT({ } }); -Script N(80245224) = SCRIPT({ +EvtSource N(80245224) = SCRIPT({ SI_VAR(4) = 21; SI_VAR(5) = 21; SI_VAR(6) = 20; @@ -312,7 +312,7 @@ Script N(80245224) = SCRIPT({ #ifdef NON_MATCHING // second npc_raycast_down_sides call -void N(func_80240CC0_CCBFD0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240CC0_CCBFD0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -456,7 +456,7 @@ void N(func_80240CC0_CCBFD0)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(void, "world/area_flo/flo_14/CCBE20", flo_14_func_80240CC0_CCBFD0, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_flo/flo_14/CCBE20", flo_14_func_80240CC0_CCBFD0, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -466,7 +466,7 @@ INCLUDE_ASM(void, "world/area_flo/flo_14/CCBE20", flo_14_func_80240CC0_CCBFD0, S #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_80241764_CCCA74)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241764_CCCA74)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -484,7 +484,7 @@ void N(func_80241764_CCCA74)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_80241E1C_CCD12C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241E1C_CCD12C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -548,7 +548,7 @@ ApiStatus N(func_80241E1C_CCD12C)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/AddPlayerHandsOffset.inc.c" -ApiStatus N(func_80242234_CCD544)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242234_CCD544)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -564,7 +564,7 @@ ApiStatus N(func_80242234_CCD544)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80242288_CCD598)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242288_CCD598)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80244600_CCF910) = get_variable(script, *args); @@ -572,7 +572,7 @@ ApiStatus N(func_80242288_CCD598)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802422C0_CCD5D0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802422C0_CCD5D0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_flo/flo_14/CCD670.c b/src/world/area_flo/flo_14/CCD670.c index 1f587ee384..0cf417c6f1 100644 --- a/src/world/area_flo/flo_14/CCD670.c +++ b/src/world/area_flo/flo_14/CCD670.c @@ -1,6 +1,6 @@ #include "flo_14.h" -ApiStatus N(func_80242360_CCD670)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242360_CCD670)(Evt* script, s32 isInitialCall) { CollisionStatus* collisionStatus = &gCollisionStatus; set_variable(script, *script->ptrReadPos, collisionStatus->floorBelow); diff --git a/src/world/area_flo/flo_14/flo_14.h b/src/world/area_flo/flo_14/flo_14.h index 87fd833704..291aed2d8c 100644 --- a/src/world/area_flo/flo_14/flo_14.h +++ b/src/world/area_flo/flo_14/flo_14.h @@ -3,27 +3,27 @@ #define NAMESPACE flo_14 -ApiStatus N(func_80242360_CCD670)(ScriptInstance *script, s32 isInitialCall); -ApiStatus N(AddPlayerHandsOffset)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024030C_CCB61C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc43)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802403D4_CCB6E4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024042C_CCB73C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024046C_CCB77C)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80242360_CCD670)(Evt *script, s32 isInitialCall); +ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc2)(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(func_80241E1C_CCD12C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242234_CCD544)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242288_CCD598)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802422C0_CCD5D0)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(func_80241E1C_CCD12C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242234_CCD544)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242288_CCD598)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802422C0_CCD5D0)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80244F00); -extern Script N(80243E78); -extern Script N(8024352C); -extern Script N(80243870); -extern Script N(80244F30); -extern Script N(80245224); -extern Script N(d_80242360); -extern Script N(main); +extern EvtSource N(80243E78); +extern EvtSource N(8024352C); +extern EvtSource N(80243870); +extern EvtSource N(80244F30); +extern EvtSource N(80245224); +extern EvtSource N(d_80242360); +extern EvtSource N(main); diff --git a/src/world/area_flo/flo_15/CD06C0.c b/src/world/area_flo/flo_15/CD06C0.c index 35d88331f8..c495605336 100644 --- a/src/world/area_flo/flo_15/CD06C0.c +++ b/src/world/area_flo/flo_15/CD06C0.c @@ -20,7 +20,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_15_tattle }, }; -Script N(80240060) = SCRIPT({ +EvtSource N(80240060) = SCRIPT({ GetEntryID(SI_VAR(0)); if (SI_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); @@ -39,13 +39,13 @@ static s32 N(pad_11C) = { 0x00000000, }; -Script N(exitWalk_80240120) = EXIT_WALK_SCRIPT(60, 0, "flo_13", 1); +EvtSource N(exitWalk_80240120) = EXIT_WALK_SCRIPT(60, 0, "flo_13", 1); -Script N(8024017C) = SCRIPT({ +EvtSource N(8024017C) = SCRIPT({ bind N(exitWalk_80240120) TRIGGER_FLOOR_ABOVE 0; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -77,7 +77,7 @@ NpcSettings N(npcSettings_80240300) = { .level = 99, }; -Script N(8024032C) = SCRIPT({ +EvtSource N(8024032C) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SI_VAR(3) = 7; SI_VAR(4) = 5; @@ -105,7 +105,7 @@ Script N(8024032C) = SCRIPT({ } }); -Script N(802404D8) = SCRIPT({ +EvtSource N(802404D8) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); SetNpcPos(NPC_SUN0, 0, 270, 0); @@ -141,7 +141,7 @@ Script N(802404D8) = SCRIPT({ sleep 70; }); -Script N(aux_8024079C) = SCRIPT({ +EvtSource N(aux_8024079C) = SCRIPT({ func_802CDE68(11, 48); loop { MakeLerp(-30, 30, 20, 11); @@ -169,7 +169,7 @@ Script N(aux_8024079C) = SCRIPT({ } }); -Script N(8024094C) = SCRIPT({ +EvtSource N(8024094C) = SCRIPT({ loop { sleep 1; GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -202,7 +202,7 @@ Script N(8024094C) = SCRIPT({ unbind; }); -Script N(interact_80240B28) = SCRIPT({ +EvtSource N(interact_80240B28) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_SPOKE_WITH_THE_SUN { SpeakToPlayer(NPC_SUN0, NPC_ANIM(sun, Palette_00, Anim_7), NPC_ANIM(sun, Palette_00, Anim_1), 517, MESSAGE_ID(0x11, 0x009A)); @@ -234,7 +234,7 @@ Script N(interact_80240B28) = SCRIPT({ SI_AREA_FLAG(38) = 1; }); -Script N(init_80240CD0) = SCRIPT({ +EvtSource N(init_80240CD0) = SCRIPT({ SetNpcCollisionSize(10, 64, 40); EnableNpcShadow(NPC_SUN0, FALSE); if (SI_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { @@ -249,7 +249,7 @@ Script N(init_80240CD0) = SCRIPT({ } }); -Script N(init_80240DB4) = SCRIPT({ +EvtSource N(init_80240DB4) = SCRIPT({ EnableNpcShadow(NPC_SUN1, FALSE); SetNpcAnimation(NPC_SUN1, NPC_ANIM(sun, Palette_00, Anim_2)); SetNpcPaletteSwapMode(10, 3); @@ -336,11 +336,11 @@ static s32 N(pad_12D8)[] = { 0x00000000, 0x00000000, }; -Script N(802412E0) = SCRIPT({ +EvtSource N(802412E0) = SCRIPT({ SI_SAVE_FLAG(1401) = 1; }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ if (SI_SAVE_FLAG(1401) == 0) { MakeEntity(0x802BCF00, -180, 0, -18, 0, MAKE_ENTITY_END); AssignScript(N(802412E0)); @@ -357,7 +357,7 @@ s32 N(intTable_80241360)[] = { 0x00000018, 0xF24A7CE7, 0x0000000A, 0xF24A814D, }; -Script N(802413B0) = SCRIPT({ +EvtSource N(802413B0) = SCRIPT({ if (SI_SAVE_FLAG(1401) == 0) { 0: if (SI_SAVE_FLAG(1401) == 0) { diff --git a/src/world/area_flo/flo_15/flo_15.h b/src/world/area_flo/flo_15/flo_15.h index b9ba653cba..bd31ee5e88 100644 --- a/src/world/area_flo/flo_15/flo_15.h +++ b/src/world/area_flo/flo_15/flo_15.h @@ -4,7 +4,7 @@ #define NAMESPACE flo_15 extern NpcGroupList N(npcGroupList_802412C0); -extern Script N(802404D8); -extern Script N(802413B0); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(802404D8); +extern EvtSource N(802413B0); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_flo/flo_16/CD1E30.c b/src/world/area_flo/flo_16/CD1E30.c index ffd4523ba5..e15adf62ba 100644 --- a/src/world/area_flo/flo_16/CD1E30.c +++ b/src/world/area_flo/flo_16/CD1E30.c @@ -2,7 +2,7 @@ void playFX_82(); -ApiStatus N(func_80240000_CD1E30)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_CD1E30)(Evt* script, s32 isInitialCall) { playFX_82(1, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/area_flo/flo_16/CD1F10.c b/src/world/area_flo/flo_16/CD1F10.c index e0e38f33e9..199a48a8f1 100644 --- a/src/world/area_flo/flo_16/CD1F10.c +++ b/src/world/area_flo/flo_16/CD1F10.c @@ -18,7 +18,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_16_tattle }, }; -Script N(802429D0) = SCRIPT({ +EvtSource N(802429D0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); @@ -28,11 +28,11 @@ Script N(802429D0) = SCRIPT({ } }); -Script N(exitWalk_80242A40) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 4); +EvtSource N(exitWalk_80242A40) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 4); -Script N(exitWalk_80242A9C) = EXIT_WALK_SCRIPT(60, 1, "flo_17", 0); +EvtSource N(exitWalk_80242A9C) = EXIT_WALK_SCRIPT(60, 1, "flo_17", 0); -Script N(80242AF8) = SCRIPT({ +EvtSource N(80242AF8) = SCRIPT({ bind N(exitWalk_80242A40) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_80242A9C) TRIGGER_FLOOR_ABOVE 4; }); @@ -42,7 +42,7 @@ s32 N(lavaResetList_80242B40)[] = { 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -93,7 +93,7 @@ Script N(main) = SCRIPT({ } }); -Script N(80242EA0) = SCRIPT({ +EvtSource N(80242EA0) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -132,7 +132,7 @@ Script N(80242EA0) = SCRIPT({ goto 0; }); -Script N(8024314C) = SCRIPT({ +EvtSource N(8024314C) = SCRIPT({ SI_VAR(9) = SI_VAR(6); SI_VAR(8) = SI_VAR(5); SI_VAR(7) = SI_VAR(4); @@ -182,7 +182,7 @@ Script N(8024314C) = SCRIPT({ EnableModel(SI_VAR(7), 0); }); -Script N(8024346C) = SCRIPT({ +EvtSource N(8024346C) = SCRIPT({ ModifyColliderFlags(3, 20, 0x00000006); SI_VAR(0) = -740; SI_VAR(1) = -140; @@ -250,7 +250,7 @@ f32 N(D_80243758_CD5588)[] = { 140.0f, 180.0f, 220.0f, }; -Script N(80243764) = SCRIPT({ +EvtSource N(80243764) = SCRIPT({ sleep 10; PlaySound(0x212D); N(UnkFunc21)(SI_MAP_VAR(0)); @@ -280,7 +280,7 @@ Script N(80243764) = SCRIPT({ sleep 30; }); -Script N(802438C8) = SCRIPT({ +EvtSource N(802438C8) = SCRIPT({ if (SI_SAVE_FLAG(1403) == 1) { return; } @@ -362,7 +362,7 @@ Script N(802438C8) = SCRIPT({ N(UnkFunc17)(); }); -Script N(80243D48) = SCRIPT({ +EvtSource N(80243D48) = SCRIPT({ 0: GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetCamTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -370,7 +370,7 @@ Script N(80243D48) = SCRIPT({ goto 0; }); -Script N(80243DB0) = SCRIPT({ +EvtSource N(80243DB0) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); SetPlayerActionState(6); @@ -384,7 +384,7 @@ Script N(80243DB0) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80243E80) = SCRIPT({ +EvtSource N(80243E80) = SCRIPT({ if (SI_AREA_FLAG(39) == 0) { N(UnkFunc44)(); if (SI_VAR(0) == 0) { @@ -400,7 +400,7 @@ Script N(80243E80) = SCRIPT({ } }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ SI_AREA_FLAG(39) = 0; bind N(80243E80) TRIGGER_FLOOR_TOUCH 20; MakeEntity(0x802EA910, 350, 240, -100, 0, MAKE_ENTITY_END); @@ -415,7 +415,7 @@ Script N(makeEntities) = SCRIPT({ #include "world/common/UnkFunc17.inc.c" -ApiStatus N(func_8024011C_CD1F4C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024011C_CD1F4C)(Evt* script, s32 isInitialCall) { entity_upgrade_block_hide_content(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -443,7 +443,7 @@ typedef struct { s16 unk_32C; } N(UnkStruct); -ApiStatus N(func_802402AC_CD20DC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802402AC_CD20DC)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; N(UnkStruct)* ptr; s32 i; @@ -515,7 +515,7 @@ ApiStatus N(func_802402AC_CD20DC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } #else -INCLUDE_ASM(ApiStatus, "world/area_flo/flo_16/CD1F10", flo_16_func_802402AC_CD20DC, ScriptInstance* script, +INCLUDE_ASM(ApiStatus, "world/area_flo/flo_16/CD1F10", flo_16_func_802402AC_CD20DC, Evt* script, s32 isInitialCall); #endif @@ -546,7 +546,7 @@ typedef struct { s32 unk_64; } N(UserData); -ApiStatus N(func_802406E0_CD2510)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802406E0_CD2510)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_flo/flo_16/CD2C80.c b/src/world/area_flo/flo_16/CD2C80.c index 72fb3e9d4b..e5cce127f5 100644 --- a/src/world/area_flo/flo_16/CD2C80.c +++ b/src/world/area_flo/flo_16/CD2C80.c @@ -24,7 +24,7 @@ NpcAISettings N(npcAISettings_80244028) = { .unk_2C = 1, }; -Script N(npcAI_80244058) = SCRIPT({ +EvtSource N(npcAI_80244058) = SCRIPT({ SetSelfVar(0, 1); SetSelfVar(5, 0); SetSelfVar(6, 0); @@ -123,7 +123,7 @@ static s32 N(pad_44F8)[] = { 0x00000000, 0x00000000, }; -Script N(80244500) = SCRIPT({ +EvtSource N(80244500) = SCRIPT({ N(func_80242940_CD4770)(); if (SI_VAR(0) == 0) { return; @@ -184,7 +184,7 @@ Script N(80244500) = SCRIPT({ } }); -Script N(802448FC) = SCRIPT({ +EvtSource N(802448FC) = SCRIPT({ N(func_80242940_CD4770)(); if (SI_VAR(0) == 0) { return; @@ -253,7 +253,7 @@ Script N(802448FC) = SCRIPT({ } }); -Script N(80244DC8) = SCRIPT({ +EvtSource N(80244DC8) = SCRIPT({ N(func_80242940_CD4770)(); if (SI_VAR(0) == 0) { return; @@ -314,7 +314,7 @@ Script N(80244DC8) = SCRIPT({ } }); -Script N(802451C4) = SCRIPT({ +EvtSource N(802451C4) = SCRIPT({ SI_AREA_FLAG(41) = 0; SI_AREA_FLAG(42) = 0; SI_AREA_FLAG(43) = 0; @@ -345,7 +345,7 @@ Script N(802451C4) = SCRIPT({ #ifdef NON_MATCHING // second npc_raycast_down_sides call -void N(func_80241000_CD2E30)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241000_CD2E30)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -484,7 +484,7 @@ void N(func_80241000_CD2E30)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(void, "world/area_flo/flo_16/CD2C80", flo_16_func_80241000_CD2E30, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_flo/flo_16/CD2C80", flo_16_func_80241000_CD2E30, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -494,7 +494,7 @@ INCLUDE_ASM(void, "world/area_flo/flo_16/CD2C80", flo_16_func_80241000_CD2E30, S #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_80241AA4_CD38D4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241AA4_CD38D4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -512,7 +512,7 @@ void N(func_80241AA4_CD38D4)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_8024215C_CD3F8C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024215C_CD3F8C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -574,7 +574,7 @@ ApiStatus N(func_8024215C_CD3F8C)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkNpcAIFunc13.inc.c" -void N(func_80242478_CD42A8)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242478_CD42A8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, y, z, w; @@ -621,7 +621,7 @@ void N(func_80242478_CD42A8)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc45.inc.c" -ApiStatus N(func_80242754_CD4584)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242754_CD4584)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_flo/flo_16/CD4770.c b/src/world/area_flo/flo_16/CD4770.c index cc19f306ee..0f85d0c5af 100644 --- a/src/world/area_flo/flo_16/CD4770.c +++ b/src/world/area_flo/flo_16/CD4770.c @@ -1,6 +1,6 @@ #include "flo_16.h" -ApiStatus N(func_80242940_CD4770)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242940_CD4770)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; do {} while (0); if (gPlayerActionState == ACTION_STATE_GROUND_POUND || gPlayerActionState == ACTION_STATE_ULTRA_POUND) { diff --git a/src/world/area_flo/flo_16/flo_16.h b/src/world/area_flo/flo_16/flo_16.h index 9561ae88ce..931bf22945 100644 --- a/src/world/area_flo/flo_16/flo_16.h +++ b/src/world/area_flo/flo_16/flo_16.h @@ -3,32 +3,32 @@ #define NAMESPACE flo_16 -ApiStatus N(SetOverrideFlags_40)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc17)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc18)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc19)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc20)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc21)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc22)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc23)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc24)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc38)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc39)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc43)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkPartnerPosFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkPartnerPosFunc2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_CD1E30)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024011C_CD1F4C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802402AC_CD20DC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(SwitchToPartner)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802406E0_CD2510)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc44)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242754_CD4584)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242940_CD4770)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(SetOverrideFlags_40)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc17)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc18)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc19)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc20)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc21)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc22)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc23)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc24)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc38)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc39)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc43)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkPartnerPosFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkPartnerPosFunc2)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240000_CD1E30)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024011C_CD1F4C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802402AC_CD20DC)(Evt* script, s32 isInitialCall); +ApiStatus N(SwitchToPartner)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802406E0_CD2510)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc44)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242754_CD4584)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242940_CD4770)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_802444D4); -extern Script N(8024346C); -extern Script N(802451C4); -extern Script N(main); -extern Script N(makeEntities); -extern Script N(unkFunc23); +extern EvtSource N(8024346C); +extern EvtSource N(802451C4); +extern EvtSource N(main); +extern EvtSource N(makeEntities); +extern EvtSource N(unkFunc23); diff --git a/src/world/area_flo/flo_17/CD72E0.c b/src/world/area_flo/flo_17/CD72E0.c index 909ca80f25..b1c51e5f83 100644 --- a/src/world/area_flo/flo_17/CD72E0.c +++ b/src/world/area_flo/flo_17/CD72E0.c @@ -2,7 +2,7 @@ void playFX_82(); -ApiStatus N(func_80240000_CD72E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_CD72E0)(Evt* script, s32 isInitialCall) { playFX_82(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 index 34d6e48f32..70977d185b 100644 --- a/src/world/area_flo/flo_17/CD7320.c +++ b/src/world/area_flo/flo_17/CD7320.c @@ -1,6 +1,6 @@ #include "flo_17.h" -ApiStatus N(func_80240040_CD7320)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240040_CD7320)(Evt* script, s32 isInitialCall) { CollisionStatus* collisionStatus = &gCollisionStatus; set_variable(script, *script->ptrReadPos, collisionStatus->floorBelow); diff --git a/src/world/area_flo/flo_17/CD7350.c b/src/world/area_flo/flo_17/CD7350.c index dfea4d84c9..c059e4b040 100644 --- a/src/world/area_flo/flo_17/CD7350.c +++ b/src/world/area_flo/flo_17/CD7350.c @@ -25,7 +25,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_17_tattle }, }; -Script N(80243280) = SCRIPT({ +EvtSource N(80243280) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); @@ -35,7 +35,7 @@ Script N(80243280) = SCRIPT({ } }); -Script N(802432F0) = SCRIPT({ +EvtSource N(802432F0) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -74,11 +74,11 @@ Script N(802432F0) = SCRIPT({ goto 0; }); -Script N(exitWalk_8024359C) = EXIT_WALK_SCRIPT(60, 0, "flo_16", 1); +EvtSource N(exitWalk_8024359C) = EXIT_WALK_SCRIPT(60, 0, "flo_16", 1); -Script N(exitWalk_802435F8) = EXIT_WALK_SCRIPT(60, 1, "flo_18", 0); +EvtSource N(exitWalk_802435F8) = EXIT_WALK_SCRIPT(60, 1, "flo_18", 0); -Script N(80243654) = SCRIPT({ +EvtSource N(80243654) = SCRIPT({ bind N(exitWalk_8024359C) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_802435F8) TRIGGER_FLOOR_ABOVE 4; }); @@ -96,7 +96,7 @@ s32 N(lavaResetList_8024369C)[] = { 0x00000020, 0x44034000, 0x00000000, 0x42480000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -218,7 +218,7 @@ static s32 N(pad_3FCC) = { 0x00000000, }; -Script N(80243FD0) = SCRIPT({ +EvtSource N(80243FD0) = SCRIPT({ loop { N(func_80240040_CD7320)(SI_VAR(0)); if (SI_VAR(0) == SI_VAR(4)) { @@ -266,7 +266,7 @@ Script N(80243FD0) = SCRIPT({ } }); -Script N(80244284) = SCRIPT({ +EvtSource N(80244284) = SCRIPT({ SI_VAR(4) = 35; SI_VAR(5) = 14; SI_VAR(6) = 15; @@ -318,7 +318,7 @@ NpcAISettings N(npcAISettings_80244424) = { .unk_2C = 1, }; -Script N(npcAI_80244454) = SCRIPT({ +EvtSource N(npcAI_80244454) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(5, -650); SetSelfVar(6, 30); @@ -348,7 +348,7 @@ NpcAISettings N(npcAISettings_802444F0) = { .unk_2C = 3, }; -Script N(npcAI_80244520) = SCRIPT({ +EvtSource N(npcAI_80244520) = SCRIPT({ SetSelfVar(2, 3); SetSelfVar(3, 18); SetSelfVar(5, 3); @@ -356,7 +356,7 @@ Script N(npcAI_80244520) = SCRIPT({ N(func_80242918_CD9BF8)(N(npcAISettings_802444F0)); }); -Script N(80244590) = SCRIPT({ +EvtSource N(80244590) = SCRIPT({ SetNpcRotation(NPC_SELF, 0, 0, 0); GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { @@ -603,7 +603,7 @@ static s32 N(pad_527C) = { 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA588, 660, 60, -115, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END); AssignBlockFlag(SI_SAVE_FLAG(1390)); MakeItemEntity(ITEM_LETTER09, -245, 0, 105, 17, SI_SAVE_FLAG(1389)); @@ -613,7 +613,7 @@ Script N(makeEntities) = SCRIPT({ #ifdef NON_MATCHING // second npc_raycast_down_sides call -void N(func_80241040_BE47F0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241040_BE47F0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -752,7 +752,7 @@ void N(func_80241040_BE47F0)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(void, "world/area_flo/flo_17/CD7350", flo_17_func_80240220_CD7500, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_flo/flo_17/CD7350", flo_17_func_80240220_CD7500, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -762,7 +762,7 @@ INCLUDE_ASM(void, "world/area_flo/flo_17/CD7350", flo_17_func_80240220_CD7500, S #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_80240CC4_CD7FA4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240CC4_CD7FA4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -780,7 +780,7 @@ void N(func_80240CC4_CD7FA4)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_8024137C_CD865C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024137C_CD865C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -852,7 +852,7 @@ s32 N(func_80241568_CD8848)(void) { return -1; } -void N(func_802415B0_CD8890)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802415B0_CD8890)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, y, z, w; @@ -938,7 +938,7 @@ void N(func_802415B0_CD8890)(ScriptInstance* script, NpcAISettings* aiSettings, } } -void N(func_80241A14_CD8CF4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241A14_CD8CF4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, y, z, w; @@ -983,7 +983,7 @@ void N(func_80241A14_CD8CF4)(ScriptInstance* script, NpcAISettings* aiSettings, // enemy2 is being copied to a0 #ifdef NON_MATCHING -ApiStatus N(func_80241C64_CD8F44)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241C64_CD8F44)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1113,7 +1113,7 @@ ApiStatus N(func_80241C64_CD8F44)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } #else -INCLUDE_ASM(ApiStatus, "world/area_flo/flo_17/CD7350", flo_17_func_80241C64_CD8F44, ScriptInstance* script, +INCLUDE_ASM(ApiStatus, "world/area_flo/flo_17/CD7350", flo_17_func_80241C64_CD8F44, Evt* script, s32 isInitialCall); #endif @@ -1125,7 +1125,7 @@ INCLUDE_ASM(ApiStatus, "world/area_flo/flo_17/CD7350", flo_17_func_80241C64_CD8F #include "world/common/set_script_owner_npc_col_height.inc.c" -ApiStatus N(func_802424D8_CD97B8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802424D8_CD97B8)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -1261,7 +1261,7 @@ ApiStatus N(func_802424D8_CD97B8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80242918_CD9BF8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242918_CD9BF8)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_flo/flo_17/flo_17.h b/src/world/area_flo/flo_17/flo_17.h index aaa4244959..85df2ff6f6 100644 --- a/src/world/area_flo/flo_17/flo_17.h +++ b/src/world/area_flo/flo_17/flo_17.h @@ -3,12 +3,12 @@ #define NAMESPACE flo_17 -ApiStatus N(func_80240000_CD72E0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241C64_CD8F44)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80242918_CD9BF8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240040_CD7320)(ScriptInstance *script, s32 isInitialCall); +ApiStatus N(func_80240000_CD72E0)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241C64_CD8F44)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80242918_CD9BF8)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240040_CD7320)(Evt *script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80245228); -extern Script N(80244284); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(80244284); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_flo/flo_18/CDC6A0.c b/src/world/area_flo/flo_18/CDC6A0.c index 3e642259f6..65e0eb5a79 100644 --- a/src/world/area_flo/flo_18/CDC6A0.c +++ b/src/world/area_flo/flo_18/CDC6A0.c @@ -26,7 +26,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_18_tattle }, }; -Script N(80240830) = SCRIPT({ +EvtSource N(80240830) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_PUFF_PUFF_MACHINE, 0, 8); @@ -41,7 +41,7 @@ static s32 N(pad_8B8)[] = { 0x00000000, 0x00000000, }; -Script N(updateTexturePan_802408C0) = SCRIPT({ +EvtSource N(updateTexturePan_802408C0) = SCRIPT({ group 0; if (SI_VAR(5) == 1) { if (SI_VAR(6) == 1) { @@ -56,9 +56,9 @@ Script N(updateTexturePan_802408C0) = SCRIPT({ N(UnkTexturePanFunc2)(); }); -Script N(exitWalk_8024095C) = EXIT_WALK_SCRIPT(60, 0, "flo_17", 1); +EvtSource N(exitWalk_8024095C) = EXIT_WALK_SCRIPT(60, 0, "flo_17", 1); -Script N(802409B8) = SCRIPT({ +EvtSource N(802409B8) = SCRIPT({ bind N(exitWalk_8024095C) TRIGGER_FLOOR_ABOVE 0; }); @@ -67,7 +67,7 @@ s32 N(lavaResetList_802409E4)[] = { 0x0000000D, 0x432A0000, 0x00000000, 0x42F00000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, }; -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -144,7 +144,7 @@ static s32 N(pad_E88)[] = { 0x00000000, 0x00000000, }; -Script N(80240E90) = SCRIPT({ +EvtSource N(80240E90) = SCRIPT({ group 11; loop { PlayEffect(0x5E, 0, -16.0, 102.0, -4.099609375, 80.900390625, 102.0, -4.099609375, 0.5, 6, 0, 0, 0, 0); @@ -170,7 +170,7 @@ Script N(80240E90) = SCRIPT({ } }); -Script N(80241094) = SCRIPT({ +EvtSource N(80241094) = SCRIPT({ EnableModel(SI_VAR(15), 1); SI_VAR(14) = 159; loop SI_VAR(14) { @@ -198,7 +198,7 @@ Script N(80241094) = SCRIPT({ EnableModel(SI_VAR(15), 0); }); -Script N(80241284) = SCRIPT({ +EvtSource N(80241284) = SCRIPT({ SI_VAR(14) = 0; 0: if (SI_SAVE_VAR(253) >= 3) { @@ -225,7 +225,7 @@ Script N(80241284) = SCRIPT({ goto 0; }); -Script N(802413F0) = SCRIPT({ +EvtSource N(802413F0) = SCRIPT({ if (SI_MAP_FLAG(2) == 1) { return; } @@ -358,7 +358,7 @@ Script N(802413F0) = SCRIPT({ }); #ifdef NON_MATCHING -Script N(80241ED4) = SCRIPT({ +EvtSource N(80241ED4) = SCRIPT({ SI_VAR(0) = 0; SI_VAR(1) = 0; SI_VAR(2) = 0; @@ -399,51 +399,51 @@ Script N(80241ED4) = SCRIPT({ ModifyColliderFlags(0, 19, 0x7FFFFE00); }); #else -Script N(80241ED4) = { - SI_CMD(ScriptOpcode_SET_F, SI_VAR(0), 0), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(1), 0), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(2), 0), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(3), SI_FIXED(-1.0)), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(4), SI_FIXED(0.0)), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(5), SI_FIXED(3.0)), - SI_CMD(ScriptOpcode_SPAWN_THREAD), - SI_CMD(ScriptOpcode_SLEEP_FRAMES, 10), - SI_CMD(ScriptOpcode_CALL, PlaySoundAtCollider, 19, 486, 0), - SI_CMD(ScriptOpcode_END_SPAWN_THREAD), - SI_CMD(ScriptOpcode_LOOP, 300), - SI_CMD(ScriptOpcode_ADD_F, SI_VAR(4), SI_FIXED(-0.5)), - SI_CMD(ScriptOpcode_ADD_F, SI_VAR(5), SI_FIXED(0.09375)), - SI_CMD(ScriptOpcode_ADD_F, SI_VAR(0), SI_VAR(3)), - SI_CMD(ScriptOpcode_ADD_F, SI_VAR(1), SI_VAR(4)), - SI_CMD(ScriptOpcode_ADD_F, SI_VAR(2), SI_VAR(5)), - SI_CMD(ScriptOpcode_IF_LT, SI_VAR(1), -10), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(1), SI_FIXED(-10.0)), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(3), SI_FIXED(0.0)), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(4), SI_FIXED(0.0)), - SI_CMD(ScriptOpcode_IF_GE, SI_VAR(2), 80), - SI_CMD(ScriptOpcode_GOTO, 0), - SI_CMD(ScriptOpcode_END_IF), - SI_CMD(ScriptOpcode_END_IF), - SI_CMD(ScriptOpcode_END_IF), // BUG: extraneous END_IF - SI_CMD(ScriptOpcode_CALL, TranslateModel, 31, -78, 19, 2), - SI_CMD(ScriptOpcode_CALL, TranslateModel, 32, -78, 19, 2), - SI_CMD(ScriptOpcode_CALL, TranslateModel, 31, SI_VAR(0), SI_VAR(1), 0), - SI_CMD(ScriptOpcode_CALL, TranslateModel, 32, SI_VAR(0), SI_VAR(1), 0), - SI_CMD(ScriptOpcode_CALL, RotateModel, 31, SI_VAR(2), 0, 0, 1), - SI_CMD(ScriptOpcode_CALL, RotateModel, 32, SI_VAR(2), 0, 0, 1), - SI_CMD(ScriptOpcode_CALL, TranslateModel, 31, 78, -19, -2), - SI_CMD(ScriptOpcode_CALL, TranslateModel, 32, 78, -19, -2), - SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1), -SI_CMD(ScriptOpcode_END_LOOP), -SI_CMD(ScriptOpcode_LABEL, 0), -SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30), -SI_CMD(ScriptOpcode_CALL, ModifyColliderFlags, 0, 19, 0x7FFFFE00), -SI_CMD(ScriptOpcode_RETURN), -SI_CMD(ScriptOpcode_END) +EvtSource N(80241ED4) = { + SI_CMD(EVT_OP_SET_F, SI_VAR(0), 0), + SI_CMD(EVT_OP_SET_F, SI_VAR(1), 0), + SI_CMD(EVT_OP_SET_F, SI_VAR(2), 0), + SI_CMD(EVT_OP_SET_F, SI_VAR(3), SI_FIXED(-1.0)), + SI_CMD(EVT_OP_SET_F, SI_VAR(4), SI_FIXED(0.0)), + SI_CMD(EVT_OP_SET_F, SI_VAR(5), SI_FIXED(3.0)), + SI_CMD(EVT_OP_SPAWN_THREAD), + SI_CMD(EVT_OP_SLEEP_FRAMES, 10), + SI_CMD(EVT_OP_CALL, PlaySoundAtCollider, 19, 486, 0), + SI_CMD(EVT_OP_END_SPAWN_THREAD), + SI_CMD(EVT_OP_LOOP, 300), + SI_CMD(EVT_OP_ADD_F, SI_VAR(4), SI_FIXED(-0.5)), + SI_CMD(EVT_OP_ADD_F, SI_VAR(5), SI_FIXED(0.09375)), + SI_CMD(EVT_OP_ADD_F, SI_VAR(0), SI_VAR(3)), + SI_CMD(EVT_OP_ADD_F, SI_VAR(1), SI_VAR(4)), + SI_CMD(EVT_OP_ADD_F, SI_VAR(2), SI_VAR(5)), + SI_CMD(EVT_OP_IF_LT, SI_VAR(1), -10), + SI_CMD(EVT_OP_SET_F, SI_VAR(1), SI_FIXED(-10.0)), + SI_CMD(EVT_OP_SET_F, SI_VAR(3), SI_FIXED(0.0)), + SI_CMD(EVT_OP_SET_F, SI_VAR(4), SI_FIXED(0.0)), + SI_CMD(EVT_OP_IF_GE, SI_VAR(2), 80), + SI_CMD(EVT_OP_GOTO, 0), + SI_CMD(EVT_OP_END_IF), + SI_CMD(EVT_OP_END_IF), + SI_CMD(EVT_OP_END_IF), // BUG: extraneous END_IF + SI_CMD(EVT_OP_CALL, TranslateModel, 31, -78, 19, 2), + SI_CMD(EVT_OP_CALL, TranslateModel, 32, -78, 19, 2), + SI_CMD(EVT_OP_CALL, TranslateModel, 31, SI_VAR(0), SI_VAR(1), 0), + SI_CMD(EVT_OP_CALL, TranslateModel, 32, SI_VAR(0), SI_VAR(1), 0), + SI_CMD(EVT_OP_CALL, RotateModel, 31, SI_VAR(2), 0, 0, 1), + SI_CMD(EVT_OP_CALL, RotateModel, 32, SI_VAR(2), 0, 0, 1), + SI_CMD(EVT_OP_CALL, TranslateModel, 31, 78, -19, -2), + SI_CMD(EVT_OP_CALL, TranslateModel, 32, 78, -19, -2), + SI_CMD(EVT_OP_SLEEP_FRAMES, 1), +SI_CMD(EVT_OP_END_LOOP), +SI_CMD(EVT_OP_LABEL, 0), +SI_CMD(EVT_OP_SLEEP_FRAMES, 30), +SI_CMD(EVT_OP_CALL, ModifyColliderFlags, 0, 19, 0x7FFFFE00), +SI_CMD(EVT_OP_RETURN), +SI_CMD(EVT_OP_END) }; #endif -Script N(80242174) = SCRIPT({ +EvtSource N(80242174) = SCRIPT({ SI_VAR(0) = (float) 0; SI_VAR(1) = (float) 0; SI_VAR(2) = (float) 0; @@ -489,7 +489,7 @@ Script N(80242174) = SCRIPT({ sleep 30; }); -Script N(80242474) = SCRIPT({ +EvtSource N(80242474) = SCRIPT({ SI_VAR(2) = (float) 0; SI_VAR(1) = (float) 0; SI_VAR(0) = (float) 0; @@ -518,7 +518,7 @@ Script N(80242474) = SCRIPT({ sleep 30; }); -Script N(80242620) = SCRIPT({ +EvtSource N(80242620) = SCRIPT({ SI_VAR(2) = (float) 0; SI_VAR(1) = (float) 0; SI_VAR(0) = (float) 0; @@ -559,7 +559,7 @@ Script N(80242620) = SCRIPT({ }); #ifdef NON_MATCHING -Script N(80242910) = SCRIPT({ +EvtSource N(80242910) = SCRIPT({ SI_VAR(0) = 0; SI_VAR(1) = 0; SI_VAR(2) = 0; @@ -596,45 +596,45 @@ Script N(80242910) = SCRIPT({ break; }); #else -Script N(80242910) = { - SI_CMD(ScriptOpcode_SET_F, SI_VAR(0), 0), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(1), 0), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(2), 0), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(3), SI_FIXED(-1.0)), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(4), SI_FIXED(0.0)), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(5), SI_FIXED(3.0)), - SI_CMD(ScriptOpcode_SPAWN_THREAD), - SI_CMD(ScriptOpcode_SLEEP_FRAMES, 15), - SI_CMD(ScriptOpcode_CALL, PlaySoundAtCollider, 18, 486, 0), - SI_CMD(ScriptOpcode_END_SPAWN_THREAD), - SI_CMD(ScriptOpcode_LOOP, 300), - SI_CMD(ScriptOpcode_ADD_F, SI_VAR(4), SI_FIXED(-0.5)), - SI_CMD(ScriptOpcode_ADD_F, SI_VAR(5), SI_FIXED(0.09375)), - SI_CMD(ScriptOpcode_ADD_F, SI_VAR(0), SI_VAR(3)), - SI_CMD(ScriptOpcode_ADD_F, SI_VAR(1), SI_VAR(4)), - SI_CMD(ScriptOpcode_ADD_F, SI_VAR(2), SI_VAR(5)), - SI_CMD(ScriptOpcode_IF_LT, SI_VAR(1), -25), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(1), SI_FIXED(-25.0)), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(3), SI_FIXED(0.0)), - SI_CMD(ScriptOpcode_SET_F, SI_VAR(4), SI_FIXED(0.0)), - SI_CMD(ScriptOpcode_IF_GE, SI_VAR(2), 80), - SI_CMD(ScriptOpcode_GOTO, 0), - SI_CMD(ScriptOpcode_END_IF), - SI_CMD(ScriptOpcode_END_IF), - SI_CMD(ScriptOpcode_END_IF), // BUG: extraneous END_IF - SI_CMD(ScriptOpcode_CALL, TranslateModel, 29, 124, 17, 3), - SI_CMD(ScriptOpcode_CALL, TranslateModel, 29, SI_VAR(0), SI_VAR(1), 0), - SI_CMD(ScriptOpcode_CALL, RotateModel, 29, SI_VAR(2), 0, 0, -1), - SI_CMD(ScriptOpcode_CALL, TranslateModel, 29, -124, -17, -3), - SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1), -SI_CMD(ScriptOpcode_END_LOOP), -SI_CMD(ScriptOpcode_LABEL, 0), -SI_CMD(ScriptOpcode_RETURN), -SI_CMD(ScriptOpcode_END) +EvtSource N(80242910) = { + SI_CMD(EVT_OP_SET_F, SI_VAR(0), 0), + SI_CMD(EVT_OP_SET_F, SI_VAR(1), 0), + SI_CMD(EVT_OP_SET_F, SI_VAR(2), 0), + SI_CMD(EVT_OP_SET_F, SI_VAR(3), SI_FIXED(-1.0)), + SI_CMD(EVT_OP_SET_F, SI_VAR(4), SI_FIXED(0.0)), + SI_CMD(EVT_OP_SET_F, SI_VAR(5), SI_FIXED(3.0)), + SI_CMD(EVT_OP_SPAWN_THREAD), + SI_CMD(EVT_OP_SLEEP_FRAMES, 15), + SI_CMD(EVT_OP_CALL, PlaySoundAtCollider, 18, 486, 0), + SI_CMD(EVT_OP_END_SPAWN_THREAD), + SI_CMD(EVT_OP_LOOP, 300), + SI_CMD(EVT_OP_ADD_F, SI_VAR(4), SI_FIXED(-0.5)), + SI_CMD(EVT_OP_ADD_F, SI_VAR(5), SI_FIXED(0.09375)), + SI_CMD(EVT_OP_ADD_F, SI_VAR(0), SI_VAR(3)), + SI_CMD(EVT_OP_ADD_F, SI_VAR(1), SI_VAR(4)), + SI_CMD(EVT_OP_ADD_F, SI_VAR(2), SI_VAR(5)), + SI_CMD(EVT_OP_IF_LT, SI_VAR(1), -25), + SI_CMD(EVT_OP_SET_F, SI_VAR(1), SI_FIXED(-25.0)), + SI_CMD(EVT_OP_SET_F, SI_VAR(3), SI_FIXED(0.0)), + SI_CMD(EVT_OP_SET_F, SI_VAR(4), SI_FIXED(0.0)), + SI_CMD(EVT_OP_IF_GE, SI_VAR(2), 80), + SI_CMD(EVT_OP_GOTO, 0), + SI_CMD(EVT_OP_END_IF), + SI_CMD(EVT_OP_END_IF), + SI_CMD(EVT_OP_END_IF), // BUG: extraneous END_IF + SI_CMD(EVT_OP_CALL, TranslateModel, 29, 124, 17, 3), + SI_CMD(EVT_OP_CALL, TranslateModel, 29, SI_VAR(0), SI_VAR(1), 0), + SI_CMD(EVT_OP_CALL, RotateModel, 29, SI_VAR(2), 0, 0, -1), + SI_CMD(EVT_OP_CALL, TranslateModel, 29, -124, -17, -3), + SI_CMD(EVT_OP_SLEEP_FRAMES, 1), +SI_CMD(EVT_OP_END_LOOP), +SI_CMD(EVT_OP_LABEL, 0), +SI_CMD(EVT_OP_RETURN), +SI_CMD(EVT_OP_END) }; #endif -Script N(80242B18) = SCRIPT({ +EvtSource N(80242B18) = SCRIPT({ ModifyColliderFlags(0, 18, 0x7FFFFE00); SI_VAR(0) = (float) 0; SI_VAR(1) = (float) 0; @@ -682,7 +682,7 @@ s32 N(intTable_80242DC8)[] = { 0x00000000, 0x0000001B, 0x00000055, 0x00000000, 0x0000001B, 0x00000050, 0x00000023, 0x0000001B, }; -Script N(80242E28) = SCRIPT({ +EvtSource N(80242E28) = SCRIPT({ SI_VAR(10) = SI_VAR(0); GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); if (SI_VAR(0) < -210) { @@ -808,7 +808,7 @@ Vec4f N(triggerCoord_8024369C) = { 50.0f, 0.0f, -10.0, 0.0f }; Vec4f N(triggerCoord_802436AC) = { 105.0f, 0.0f, -10.0, 0.0f }; -Script N(802436BC) = SCRIPT({ +EvtSource N(802436BC) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { EnableModel(49, 0); ModifyColliderFlags(0, 19, 0x7FFFFE00); @@ -969,7 +969,7 @@ Vec3f N(vectorList_8024401C)[] = { { -280.0, 315.0, 30.0 }, }; -Script N(80244058) = SCRIPT({ +EvtSource N(80244058) = SCRIPT({ DisablePlayerInput(TRUE); DisablePartnerAI(0); SetPlayerPos(30, 0, 50); @@ -1000,7 +1000,7 @@ Script N(80244058) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80244270) = SCRIPT({ +EvtSource N(80244270) = SCRIPT({ spawn { PlaySoundAtNpc(NPC_FLYING_MAGIKOOPA, 0x19E, 0); SetNpcFlagBits(NPC_FLYING_MAGIKOOPA, ((NPC_FLAG_100)), TRUE); @@ -1057,7 +1057,7 @@ Script N(80244270) = SCRIPT({ } }); -Script N(802445D4) = SCRIPT({ +EvtSource N(802445D4) = SCRIPT({ sleep 5; IsPlayerWithin(40, 0, 200, SI_VAR(0)); if (SI_VAR(0) == 0) { @@ -1085,7 +1085,7 @@ Script N(802445D4) = SCRIPT({ } }); -Script N(80244774) = SCRIPT({ +EvtSource N(80244774) = SCRIPT({ DisablePlayerInput(TRUE); DisablePartnerAI(0); GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -1138,7 +1138,7 @@ Script N(80244774) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(idle_80244B3C) = SCRIPT({ +EvtSource N(idle_80244B3C) = SCRIPT({ loop { GetSelfVar(0, SI_VAR(0)); if (SI_VAR(0) != 0) { @@ -1159,7 +1159,7 @@ Script N(idle_80244B3C) = SCRIPT({ StartBossBattle(3); }); -Script N(defeat_80244C84) = SCRIPT({ +EvtSource N(defeat_80244C84) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -1186,7 +1186,7 @@ Script N(defeat_80244C84) = SCRIPT({ } }); -Script N(80244E2C) = SCRIPT({ +EvtSource N(80244E2C) = SCRIPT({ match SI_MAP_VAR(10) { == 0 { NpcFacePlayer(NPC_MAGIKOOPA, 1); @@ -1203,7 +1203,7 @@ Script N(80244E2C) = SCRIPT({ } }); -Script N(80244ED0) = SCRIPT({ +EvtSource N(80244ED0) = SCRIPT({ match SI_MAP_VAR(10) { == 0 { SpeakToPlayer(NPC_MAGIKOOPA, NPC_ANIM(magikoopa, Palette_02, Anim_2), NPC_ANIM(magikoopa, Palette_02, Anim_1), 16, MESSAGE_ID(0x11, 0x00B9)); @@ -1224,7 +1224,7 @@ Script N(80244ED0) = SCRIPT({ } }); -Script N(80245004) = SCRIPT({ +EvtSource N(80245004) = SCRIPT({ match SI_MAP_VAR(10) { == 0 { SpeakToPlayer(NPC_MAGIKOOPA, NPC_ANIM(magikoopa, Palette_02, Anim_2), NPC_ANIM(magikoopa, Palette_02, Anim_1), 16, MESSAGE_ID(0x11, 0x00BA)); @@ -1244,7 +1244,7 @@ Script N(80245004) = SCRIPT({ spawn N(802445D4); }); -Script N(80245108) = SCRIPT({ +EvtSource N(80245108) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { return; } @@ -1267,7 +1267,7 @@ Script N(80245108) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80245228) = SCRIPT({ +EvtSource N(80245228) = SCRIPT({ if (SI_MAP_VAR(10) == -1) { SI_MAP_VAR(10) = 0; await N(80245108); @@ -1275,7 +1275,7 @@ Script N(80245228) = SCRIPT({ } }); -Script N(8024527C) = SCRIPT({ +EvtSource N(8024527C) = SCRIPT({ if (SI_MAP_VAR(10) == -1) { SI_MAP_VAR(10) = 1; await N(80245108); @@ -1283,7 +1283,7 @@ Script N(8024527C) = SCRIPT({ } }); -Script N(802452D0) = SCRIPT({ +EvtSource N(802452D0) = SCRIPT({ if (SI_MAP_VAR(10) == -1) { SI_MAP_VAR(10) = 2; await N(80245108); @@ -1291,7 +1291,7 @@ Script N(802452D0) = SCRIPT({ } }); -Script N(80245324) = SCRIPT({ +EvtSource N(80245324) = SCRIPT({ if (SI_MAP_VAR(10) == -1) { SI_MAP_VAR(10) = 3; await N(80245108); @@ -1299,7 +1299,7 @@ Script N(80245324) = SCRIPT({ } }); -Script N(80245378) = SCRIPT({ +EvtSource N(80245378) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { return; } @@ -1322,7 +1322,7 @@ Script N(80245378) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(802454D4) = SCRIPT({ +EvtSource N(802454D4) = SCRIPT({ if (SI_MAP_VAR(10) == -1) { SI_MAP_VAR(10) = 0; GetNpcPos(NPC_MAGIKOOPA, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -1331,7 +1331,7 @@ Script N(802454D4) = SCRIPT({ } }); -Script N(80245544) = SCRIPT({ +EvtSource N(80245544) = SCRIPT({ if (SI_MAP_VAR(10) == -1) { SI_MAP_VAR(10) = 1; GetNpcPos(NPC_LAKITU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -1340,7 +1340,7 @@ Script N(80245544) = SCRIPT({ } }); -Script N(802455B4) = SCRIPT({ +EvtSource N(802455B4) = SCRIPT({ if (SI_MAP_VAR(10) == -1) { SI_MAP_VAR(10) = 2; GetNpcPos(NPC_LAKITU1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -1349,7 +1349,7 @@ Script N(802455B4) = SCRIPT({ } }); -Script N(80245624) = SCRIPT({ +EvtSource N(80245624) = SCRIPT({ if (SI_MAP_VAR(10) == -1) { SI_MAP_VAR(10) = 3; GetNpcPos(NPC_LAKITU2, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -1366,7 +1366,7 @@ Vec4f N(triggerCoord_802456B4) = { 50.0f, 0.0f, -10.0, 0.0f }; Vec4f N(triggerCoord_802456C4) = { 105.0f, 0.0f, -10.0, 0.0f }; -Script N(802456D4) = SCRIPT({ +EvtSource N(802456D4) = SCRIPT({ SI_MAP_VAR(10) = -1; bind N(80245228) TRIGGER_WALL_HAMMER 23; bind N(80245228) TRIGGER_WALL_HAMMER 19; @@ -1378,7 +1378,7 @@ Script N(802456D4) = SCRIPT({ bind N(80245624) TRIGGER_POINT_BOMB N(triggerCoord_802456C4); }); -Script N(interact_802457D4) = SCRIPT({ +EvtSource N(interact_802457D4) = SCRIPT({ match SI_AREA_VAR(6) { == 0 { GetSelfNpcID(SI_VAR(0)); @@ -1429,7 +1429,7 @@ Script N(interact_802457D4) = SCRIPT({ } }); -Script N(init_80245AA8) = SCRIPT({ +EvtSource N(init_80245AA8) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcIdle(NPC_SELF, N(idle_80244B3C)); BindNpcInteract(NPC_SELF, N(interact_802457D4)); @@ -1439,7 +1439,7 @@ Script N(init_80245AA8) = SCRIPT({ } }); -Script N(init_80245B30) = SCRIPT({ +EvtSource N(init_80245B30) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); } else { @@ -1447,7 +1447,7 @@ Script N(init_80245B30) = SCRIPT({ } }); -Script N(init_80245B90) = SCRIPT({ +EvtSource N(init_80245B90) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcInteract(NPC_SELF, N(interact_802457D4)); BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); @@ -1456,7 +1456,7 @@ Script N(init_80245B90) = SCRIPT({ } }); -Script N(init_80245C04) = SCRIPT({ +EvtSource N(init_80245C04) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcInteract(NPC_SELF, N(interact_802457D4)); BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); @@ -1465,7 +1465,7 @@ Script N(init_80245C04) = SCRIPT({ } }); -Script N(init_80245C78) = SCRIPT({ +EvtSource N(init_80245C78) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcInteract(NPC_SELF, N(interact_802457D4)); BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); @@ -1682,7 +1682,7 @@ static s32 N(pad_66B4)[] = { void playFX_82(); -ApiStatus N(func_8024030C_CDC9AC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024030C_CDC9AC)(Evt* script, s32 isInitialCall) { playFX_82(1, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } @@ -1703,7 +1703,7 @@ typedef struct N(temp) { N(unk_effect)* unk_0C; } N(temp); -ApiStatus N(func_80240340_CDC9E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240340_CDC9E0)(Evt* script, s32 isInitialCall) { N(temp)* ptr = script->varTable[15]; ptr->unk_0C->unk_30 = 69; diff --git a/src/world/area_flo/flo_18/CDCC30.c b/src/world/area_flo/flo_18/CDCC30.c index cead567a7a..92b82c3610 100644 --- a/src/world/area_flo/flo_18/CDCC30.c +++ b/src/world/area_flo/flo_18/CDCC30.c @@ -2,6 +2,6 @@ #include "world/common/foliage.inc.c" -Script N(80247024) = SCRIPT({ +EvtSource N(80247024) = SCRIPT({ }); diff --git a/src/world/area_flo/flo_18/flo_18.h b/src/world/area_flo/flo_18/flo_18.h index e508fc7f19..9f726f48fa 100644 --- a/src/world/area_flo/flo_18/flo_18.h +++ b/src/world/area_flo/flo_18/flo_18.h @@ -3,17 +3,17 @@ #define NAMESPACE flo_18 -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFloatFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024030C_CDC9AC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240340_CDC9E0)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc2)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFloatFunc)(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 Script N(802436BC); -extern Script N(80244058); -extern Script N(802456D4); -extern Script N(80247024); -extern Script N(main); -extern Script N(unkFloatFunc); +extern EvtSource N(802436BC); +extern EvtSource N(80244058); +extern EvtSource N(802456D4); +extern EvtSource N(80247024); +extern EvtSource N(main); +extern EvtSource N(unkFloatFunc); diff --git a/src/world/area_flo/flo_19/CE36F0.c b/src/world/area_flo/flo_19/CE36F0.c index 2a587582d3..eb3fc9a527 100644 --- a/src/world/area_flo/flo_19/CE36F0.c +++ b/src/world/area_flo/flo_19/CE36F0.c @@ -18,7 +18,7 @@ MapConfig N(config) = { // Extraneous END_CASE_MULTI #ifdef NON_MATCHING -Script N(802409C0) = SCRIPT({ +EvtSource N(802409C0) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { 0, 1 { @@ -35,26 +35,26 @@ Script N(802409C0) = SCRIPT({ } }); #else -Script N(802409C0) = { - SI_CMD(ScriptOpcode_CALL, GetEntryID, SI_VAR(0)), - SI_CMD(ScriptOpcode_MATCH, SI_VAR(0)), - SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 0), - SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 1), - SI_CMD(ScriptOpcode_CALL, SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8), - SI_CMD(ScriptOpcode_END_CASE_MULTI), - SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 2), - SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, 7), - SI_CMD(ScriptOpcode_END_CASE_MULTI), - SI_CMD(ScriptOpcode_CASE_EQ, 3), - SI_CMD(ScriptOpcode_IF_NE, SI_AREA_FLAG(44), 0), - SI_CMD(ScriptOpcode_ELSE), - SI_CMD(ScriptOpcode_CALL, FadeOutMusic, 1, 3000), - SI_CMD(ScriptOpcode_CALL, FadeInMusic, 0, 50, 0, 3000, 0, 127), - SI_CMD(ScriptOpcode_END_IF), - SI_CMD(ScriptOpcode_END_CASE_MULTI), - SI_CMD(ScriptOpcode_END_MATCH), - SI_CMD(ScriptOpcode_RETURN), - SI_CMD(ScriptOpcode_END) +EvtSource N(802409C0) = { + SI_CMD(EVT_OP_CALL, GetEntryID, SI_VAR(0)), + SI_CMD(EVT_OP_MATCH, SI_VAR(0)), + SI_CMD(EVT_OP_CASE_MULTI_OR_EQ, 0), + SI_CMD(EVT_OP_CASE_MULTI_OR_EQ, 1), + SI_CMD(EVT_OP_CALL, SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8), + SI_CMD(EVT_OP_END_CASE_MULTI), + SI_CMD(EVT_OP_CASE_MULTI_OR_EQ, 2), + SI_CMD(EVT_OP_CASE_MULTI_OR_EQ, 7), + SI_CMD(EVT_OP_END_CASE_MULTI), + SI_CMD(EVT_OP_CASE_EQ, 3), + SI_CMD(EVT_OP_IF_NE, SI_AREA_FLAG(44), 0), + SI_CMD(EVT_OP_ELSE), + SI_CMD(EVT_OP_CALL, FadeOutMusic, 1, 3000), + SI_CMD(EVT_OP_CALL, FadeInMusic, 0, 50, 0, 3000, 0, 127), + SI_CMD(EVT_OP_END_IF), + SI_CMD(EVT_OP_END_CASE_MULTI), + SI_CMD(EVT_OP_END_MATCH), + SI_CMD(EVT_OP_RETURN), + SI_CMD(EVT_OP_END) }; #endif @@ -62,7 +62,7 @@ static s32 N(pad_ABC) = { 0x00000000, }; -Script N(80240AC0) = SCRIPT({ +EvtSource N(80240AC0) = SCRIPT({ MakeItemEntity(ITEM_S_JUMP_CHG, -200, 160, -213, 17, SI_SAVE_FLAG(1391)); }); @@ -70,7 +70,7 @@ static s32 N(pad_AF4)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(updateTexturePan_80240B00) = SCRIPT({ +EvtSource N(updateTexturePan_80240B00) = SCRIPT({ group 0; if (SI_VAR(5) == 1) { if (SI_VAR(6) == 1) { @@ -85,13 +85,13 @@ Script N(updateTexturePan_80240B00) = SCRIPT({ N(UnkTexturePanFunc2)(); }); -Script N(exitWalk_80240B9C) = EXIT_WALK_SCRIPT(60, 1, "flo_21", 0); +EvtSource N(exitWalk_80240B9C) = EXIT_WALK_SCRIPT(60, 1, "flo_21", 0); -Script N(80240BF8) = SCRIPT({ +EvtSource N(80240BF8) = SCRIPT({ bind N(exitWalk_80240B9C) TRIGGER_FLOOR_ABOVE 0; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_CLOUDY_CLIMB; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -171,7 +171,7 @@ static s32 N(pad_1044)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80241050) = SCRIPT({ +EvtSource N(80241050) = SCRIPT({ group 239; SI_VAR(15) = 0; 0: @@ -257,7 +257,7 @@ Script N(80241050) = SCRIPT({ goto 0; }); -Script N(80241650) = SCRIPT({ +EvtSource N(80241650) = SCRIPT({ spawn { SI_MAP_VAR(12) += -1.5; sleep 1; @@ -265,7 +265,7 @@ Script N(80241650) = SCRIPT({ } }); -Script N(8024169C) = SCRIPT({ +EvtSource N(8024169C) = SCRIPT({ spawn { SI_MAP_VAR(13) += -1.5; sleep 1; @@ -273,7 +273,7 @@ Script N(8024169C) = SCRIPT({ } }); -Script N(802416E8) = SCRIPT({ +EvtSource N(802416E8) = SCRIPT({ spawn { SI_MAP_VAR(14) += -1.5; sleep 1; @@ -281,7 +281,7 @@ Script N(802416E8) = SCRIPT({ } }); -Script N(80241734) = SCRIPT({ +EvtSource N(80241734) = SCRIPT({ spawn { SI_MAP_VAR(15) += -1.5; sleep 1; @@ -289,7 +289,7 @@ Script N(80241734) = SCRIPT({ } }); -Script N(80241780) = SCRIPT({ +EvtSource N(80241780) = SCRIPT({ ParentColliderToModel(8, 28); ParentColliderToModel(9, 32); ParentColliderToModel(7, 36); @@ -329,7 +329,7 @@ static s32 N(pad_1A68)[] = { 0x00000000, 0x00000000, }; -Script N(80241A70) = SCRIPT({ +EvtSource N(80241A70) = SCRIPT({ SI_VAR(0) = 0; 10: N(func_80240784_CE3E74)(); @@ -343,7 +343,7 @@ Script N(80241A70) = SCRIPT({ sleep 1; }); -Script N(80241B10) = SCRIPT({ +EvtSource N(80241B10) = SCRIPT({ SI_VAR(0) = 255; 10: N(func_80240784_CE3E74)(); @@ -357,7 +357,7 @@ Script N(80241B10) = SCRIPT({ sleep 1; }); -Script N(80241BB0) = SCRIPT({ +EvtSource N(80241BB0) = SCRIPT({ TranslateGroup(79, 0, SI_VAR(0), 0); TranslateGroup(92, 0, SI_VAR(0), 0); SI_VAR(1) = (float) SI_VAR(0); @@ -366,14 +366,14 @@ Script N(80241BB0) = SCRIPT({ RotateGroup(92, SI_VAR(1), 0, 1, 0); }); -Script N(80241C58) = SCRIPT({ +EvtSource N(80241C58) = SCRIPT({ TranslateGroup(84, 0, SI_VAR(0), 0); SI_VAR(1) = (float) SI_VAR(0); SI_VAR(1) *= -12.0; RotateGroup(84, SI_VAR(1), 0, 1, 0); }); -Script N(80241CC4) = SCRIPT({ +EvtSource N(80241CC4) = SCRIPT({ DisablePlayerInput(TRUE); SetPlayerActionState(10); DisablePartnerAI(0); @@ -480,7 +480,7 @@ Script N(80241CC4) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(802423F8) = SCRIPT({ +EvtSource N(802423F8) = SCRIPT({ if (SI_AREA_FLAG(44) == 0) { DisablePlayerInput(TRUE); func_802D2B6C(); @@ -578,7 +578,7 @@ Script N(802423F8) = SCRIPT({ } }); -Script N(80242A2C) = SCRIPT({ +EvtSource N(80242A2C) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); SetPlayerActionState(10); @@ -654,7 +654,7 @@ Script N(80242A2C) = SCRIPT({ GotoMap("flo_00", 7); }); -Script N(80242FD0) = SCRIPT({ +EvtSource N(80242FD0) = SCRIPT({ bind N(802423F8) TRIGGER_FLOOR_TOUCH 12; }); @@ -664,13 +664,13 @@ Script N(80242FD0) = SCRIPT({ void playFX_82(); -ApiStatus N(func_8024030C_CE39FC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024030C_CE39FC)(Evt* script, s32 isInitialCall) { playFX_82(1, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } // Identical to UnkFloatFunc except for the presence of the fabsf -ApiStatus N(func_80240340_CE3A30)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240340_CE3A30)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a1 = *args++; s32 var0 = get_variable(script, a1); @@ -692,7 +692,7 @@ ApiStatus N(func_80240340_CE3A30)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802404D0_CE3BC0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802404D0_CE3BC0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = *args++; s32 var2 = *args++; @@ -703,7 +703,7 @@ ApiStatus N(func_802404D0_CE3BC0)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80240540_CE3C30)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240540_CE3C30)(Evt* script, s32 isInitialCall) { f32 temp_f20 = 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); @@ -717,7 +717,7 @@ ApiStatus N(func_80240540_CE3C30)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80240660_CE3D50)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240660_CE3D50)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_by_index(0); f32 temp_f20 = get_variable(NULL, script->varTable[2]); f32 dist = dist2D(0.0f, 0.0f, script->varTable[12], script->varTable[14]); @@ -732,7 +732,7 @@ ApiStatus N(func_80240660_CE3D50)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80240784_CE3E74)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240784_CE3E74)(Evt* script, s32 isInitialCall) { set_screen_overlay_params_back(1, script->varTable[0]); return ApiStatus_DONE2; } diff --git a/src/world/area_flo/flo_19/flo_19.h b/src/world/area_flo/flo_19/flo_19.h index 2efb7a6c74..e996292f90 100644 --- a/src/world/area_flo/flo_19/flo_19.h +++ b/src/world/area_flo/flo_19/flo_19.h @@ -3,18 +3,18 @@ #define NAMESPACE flo_19 -ApiStatus N(UnkTexturePanFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFloatFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024030C_CE39FC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240340_CE3A30)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802404D0_CE3BC0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240540_CE3C30)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240660_CE3D50)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240784_CE3E74)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc2)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFloatFunc)(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 Script N(80241780); -extern Script N(80241CC4); -extern Script N(80242A2C); -extern Script N(80242FD0); -extern Script N(main); +extern EvtSource N(80241780); +extern EvtSource N(80241CC4); +extern EvtSource N(80242A2C); +extern EvtSource N(80242FD0); +extern EvtSource N(main); diff --git a/src/world/area_flo/flo_21/CE6700.c b/src/world/area_flo/flo_21/CE6700.c index a92d9f4889..2479f5cfe8 100644 --- a/src/world/area_flo/flo_21/CE6700.c +++ b/src/world/area_flo/flo_21/CE6700.c @@ -93,7 +93,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_21_tattle }, }; -Script N(80240D40) = SCRIPT({ +EvtSource N(80240D40) = SCRIPT({ if (SI_STORY_PROGRESS == STORY_CH6_DEFEATED_HUFF_N_PUFF) { FadeOutMusic(0, 500); } else { @@ -101,14 +101,14 @@ Script N(80240D40) = SCRIPT({ } }); -ApiStatus N(func_80240000_CE6700)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_CE6700)(Evt* script, s32 isInitialCall) { N(Unk_effect_struct)* ptr = (N(Unk_effect_struct)*)script->varTable[0]; sfx_adjust_env_sound_pos(0xA2, 0, ptr->unk_00, ptr->unk_04, ptr->unk_08); return ((ptr->unk_44 < 2) == 0) * ApiStatus_DONE2; } -ApiStatus N(func_8024004C_CE674C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024004C_CE674C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -136,7 +136,7 @@ ApiStatus N(func_8024004C_CE674C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802401AC_CE68AC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802401AC_CE68AC)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; N(Unk_effect_struct)* ptr = (N(Unk_effect_struct)*)script->varTable[0]; @@ -235,14 +235,14 @@ ApiStatus N(func_802401AC_CE68AC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_802405BC_CE6CBC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405BC_CE6CBC)(Evt* script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); N(Unk_effect_struct)* ptr = (N(Unk_effect_struct)*)script->varTable[0]; return (ptr->unk_4E == var) * ApiStatus_DONE2; } -ApiStatus N(func_802405FC_CE6CFC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405FC_CE6CFC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -263,7 +263,7 @@ ApiStatus N(func_802405FC_CE6CFC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80240708_CE6E08)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240708_CE6E08)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; N(Unk_effect_struct)* ptr = (N(Unk_effect_struct)*)script->varTable[0]; @@ -280,7 +280,7 @@ ApiStatus N(func_80240708_CE6E08)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -Script N(80240DA0) = SCRIPT({ +EvtSource N(80240DA0) = SCRIPT({ group 0; if (SI_VAR(5) == 1) { if (SI_VAR(6) == 1) { @@ -295,7 +295,7 @@ Script N(80240DA0) = SCRIPT({ N(UnkTexturePanFunc2)(); }); -Script N(80240E3C) = SCRIPT({ +EvtSource N(80240E3C) = SCRIPT({ match SI_STORY_PROGRESS { == STORY_CH6_GREW_MAGIC_BEANSTALK { SI_VAR(0) = 0; @@ -374,13 +374,13 @@ Script N(80240E3C) = SCRIPT({ sleep 100; }); -Script N(exitWalk_802412F4) = EXIT_WALK_SCRIPT(60, 0, "flo_19", 1); +EvtSource N(exitWalk_802412F4) = EXIT_WALK_SCRIPT(60, 0, "flo_19", 1); -Script N(80241350) = SCRIPT({ +EvtSource N(80241350) = SCRIPT({ bind N(exitWalk_802412F4) TRIGGER_FLOOR_ABOVE 0; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_CLOUDY_CLIMB; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -416,27 +416,27 @@ s32 N(D_802414FC_CE7BFC)[] = { SI_FIXED(0.900390625), SI_FIXED(0.900390625), SI_FIXED(0.900390625), }; -Script N(80241560) = SCRIPT({ +EvtSource N(80241560) = SCRIPT({ SI_MAP_VAR(0) += -1.5; }); -Script N(80241580) = SCRIPT({ +EvtSource N(80241580) = SCRIPT({ SI_MAP_VAR(1) += -1.5; }); -Script N(802415A0) = SCRIPT({ +EvtSource N(802415A0) = SCRIPT({ SI_MAP_VAR(2) += -1.5; }); -Script N(802415C0) = SCRIPT({ +EvtSource N(802415C0) = SCRIPT({ SI_MAP_VAR(3) += -1.5; }); -Script N(802415E0) = SCRIPT({ +EvtSource N(802415E0) = SCRIPT({ SI_MAP_VAR(4) += -1.5; }); -Script N(80241600) = SCRIPT({ +EvtSource N(80241600) = SCRIPT({ spawn { SI_VAR(15) = 0; 0: @@ -500,7 +500,7 @@ Vec3f N(vectorList_8024189C)[] = { { 550.0, 104.0, 0.0 }, }; -Script N(802418C0) = SCRIPT({ +EvtSource N(802418C0) = SCRIPT({ 0: PlaySound(0x20B6); ShakeCam(0, 0, 15, 1.0); @@ -508,7 +508,7 @@ Script N(802418C0) = SCRIPT({ goto 0; }); -Script N(80241920) = SCRIPT({ +EvtSource N(80241920) = SCRIPT({ PlaySoundAtNpc(NPC_HUFF_N_PUFF0, 0x3C0, 0); PlayEffect(0x25, 3, 650, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); sleep 15; @@ -543,7 +543,7 @@ Script N(80241920) = SCRIPT({ SetPlayerAnimation(ANIM_1002B); }); -Script N(80241B98) = SCRIPT({ +EvtSource N(80241B98) = SCRIPT({ if (SI_STORY_PROGRESS >= STORY_CH6_DEFEATED_HUFF_N_PUFF) { return; } @@ -644,7 +644,7 @@ Script N(80241B98) = SCRIPT({ sleep 15; }); -Script N(80242290) = SCRIPT({ +EvtSource N(80242290) = SCRIPT({ SI_VAR(0) = 0.9501953125; SI_VAR(1) = 1.1005859375; 0: @@ -712,7 +712,7 @@ s32 N(intTable_8024262C)[] = { 0x0000000A, 0x00000006, 0x00000006, 0x0000000A, }; -Script N(8024263C) = SCRIPT({ +EvtSource N(8024263C) = SCRIPT({ SI_VAR(0) = (float) 10; SI_VAR(1) = (float) 1; parallel { @@ -757,7 +757,7 @@ Script N(8024263C) = SCRIPT({ sleep 100; }); -Script N(80242918) = SCRIPT({ +EvtSource N(80242918) = SCRIPT({ SI_MAP_VAR(11) = 1.0; SI_MAP_VAR(12) = 1.0; parallel { @@ -836,7 +836,7 @@ Script N(80242918) = SCRIPT({ } }); -Script N(80242D34) = SCRIPT({ +EvtSource N(80242D34) = SCRIPT({ parallel { SI_VAR(1) = 0; loop { @@ -879,7 +879,7 @@ Script N(80242D34) = SCRIPT({ SetNpcPos(SI_VAR(8), 0, -1000, 0); }); -Script N(80243010) = SCRIPT({ +EvtSource N(80243010) = SCRIPT({ SetNpcAnimation(NPC_HUFF_N_PUFF1, NPC_ANIM(huff_n_puff, Palette_00, Anim_4)); SetNpcAnimation(NPC_HUFF_N_PUFF0, NPC_ANIM(huff_n_puff, Palette_00, Anim_5)); SetNpcAnimation(NPC_HUFF_N_PUFF2, NPC_ANIM(huff_n_puff, Palette_00, Anim_6)); @@ -928,7 +928,7 @@ Script N(80243010) = SCRIPT({ sleep 10; }); -Script N(idle_80243428) = SCRIPT({ +EvtSource N(idle_80243428) = SCRIPT({ 0: SetSelfVar(0, 0); loop { @@ -943,7 +943,7 @@ Script N(idle_80243428) = SCRIPT({ goto 0; }); -Script N(defeat_802434D8) = SCRIPT({ +EvtSource N(defeat_802434D8) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -961,11 +961,11 @@ Script N(defeat_802434D8) = SCRIPT({ } }); -Script N(defeat_802435D4) = SCRIPT({ +EvtSource N(defeat_802435D4) = SCRIPT({ }); -Script N(init_802435E4) = SCRIPT({ +EvtSource N(init_802435E4) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { SetEnemyFlagBits(-1, 4194304, 1); BindNpcIdle(NPC_SELF, N(idle_80243428)); @@ -976,7 +976,7 @@ Script N(init_802435E4) = SCRIPT({ } }); -Script N(init_80243684) = SCRIPT({ +EvtSource N(init_80243684) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { SetEnemyFlagBits(-1, 4194304, 1); BindNpcDefeat(NPC_SELF, N(defeat_802435D4)); @@ -987,7 +987,7 @@ Script N(init_80243684) = SCRIPT({ } }); -Script N(init_8024371C) = SCRIPT({ +EvtSource N(init_8024371C) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { SetEnemyFlagBits(-1, 4194304, 1); BindNpcDefeat(NPC_SELF, N(defeat_802435D4)); @@ -997,7 +997,7 @@ Script N(init_8024371C) = SCRIPT({ } }); -Script N(init_802437A8) = SCRIPT({ +EvtSource N(init_802437A8) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM(tuff_puff, Palette_00, Anim_B)); SetNpcJumpscale(NPC_SELF, 0); }); @@ -1577,7 +1577,7 @@ NpcGroupList N(npcGroupList_80245AEC) = { EffectInstance* playFX_82(); -ApiStatus N(func_80240B00_CE7200)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B00_CE7200)(Evt* script, s32 isInitialCall) { playFX_82(1, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/area_flo/flo_21/flo_21.h b/src/world/area_flo/flo_21/flo_21.h index 18b5fb20ae..cd5170d5cf 100644 --- a/src/world/area_flo/flo_21/flo_21.h +++ b/src/world/area_flo/flo_21/flo_21.h @@ -3,18 +3,18 @@ #define NAMESPACE flo_21 -ApiStatus N(UnkTexturePanFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFloatFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_CE6700)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024004C_CE674C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802401AC_CE68AC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802405BC_CE6CBC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802405FC_CE6CFC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240708_CE6E08)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240B00_CE7200)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc2)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFloatFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240000_CE6700)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024004C_CE674C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802401AC_CE68AC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802405BC_CE6CBC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802405FC_CE6CFC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240708_CE6E08)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240B00_CE7200)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80245AEC); -extern Script N(80241600); -extern Script N(80241B98); -extern Script N(main); +extern EvtSource N(80241600); +extern EvtSource N(80241B98); +extern EvtSource N(main); diff --git a/src/world/area_flo/flo_22/CEC240.c b/src/world/area_flo/flo_22/CEC240.c index 7250b99d1c..d013dbf50f 100644 --- a/src/world/area_flo/flo_22/CEC240.c +++ b/src/world/area_flo/flo_22/CEC240.c @@ -20,7 +20,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_22_tattle }, }; -Script N(802402E0) = SCRIPT({ +EvtSource N(802402E0) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); @@ -30,13 +30,13 @@ Script N(802402E0) = SCRIPT({ } }); -Script N(exitWalk_80240350) = EXIT_WALK_SCRIPT(60, 0, "flo_03", 1); +EvtSource N(exitWalk_80240350) = EXIT_WALK_SCRIPT(60, 0, "flo_03", 1); -Script N(802403AC) = SCRIPT({ +EvtSource N(802403AC) = SCRIPT({ bind N(exitWalk_80240350) TRIGGER_FLOOR_ABOVE 0; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -67,7 +67,7 @@ NpcSettings N(npcSettings_80240520) = { .level = 99, }; -Script N(idle_8024054C) = SCRIPT({ +EvtSource N(idle_8024054C) = SCRIPT({ SI_MAP_VAR(10) = 0; loop { match SI_MAP_VAR(10) { @@ -82,7 +82,7 @@ Script N(idle_8024054C) = SCRIPT({ } }); -Script N(defeat_802405E4) = SCRIPT({ +EvtSource N(defeat_802405E4) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -107,12 +107,12 @@ Script N(defeat_802405E4) = SCRIPT({ } }); -Script N(init_80240740) = SCRIPT({ +EvtSource N(init_80240740) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_8024054C)); BindNpcDefeat(NPC_SELF, N(defeat_802405E4)); }); -Script N(idle_80240778) = SCRIPT({ +EvtSource N(idle_80240778) = SCRIPT({ SI_MAP_VAR(11) = 0; loop { match SI_MAP_VAR(11) { @@ -127,7 +127,7 @@ Script N(idle_80240778) = SCRIPT({ } }); -Script N(defeat_80240810) = SCRIPT({ +EvtSource N(defeat_80240810) = SCRIPT({ GetBattleOutcome(SI_VAR(0)); match SI_VAR(0) { == 0 { @@ -158,7 +158,7 @@ Script N(defeat_80240810) = SCRIPT({ } }); -Script N(init_802409CC) = SCRIPT({ +EvtSource N(init_802409CC) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_80240778)); BindNpcDefeat(NPC_SELF, N(defeat_80240810)); }); @@ -248,7 +248,7 @@ s32 N(itemList_80240E10)[] = { ITEM_NONE, }; -Script N(80240E24) = SCRIPT({ +EvtSource N(80240E24) = SCRIPT({ DisablePlayerInput(TRUE); sleep 20; ShowMessageAtScreenPos(MESSAGE_ID(0x11, 0x00DB), 300, 120); @@ -256,7 +256,7 @@ Script N(80240E24) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80240E84) = SCRIPT({ +EvtSource N(80240E84) = SCRIPT({ SetPlayerAnimation(0x6000E); spawn { GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4)); @@ -284,7 +284,7 @@ Script N(80240E84) = SCRIPT({ sleep 10; }); -Script N(80241028) = SCRIPT({ +EvtSource N(80241028) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerInput(FALSE); ShowConsumableChoicePopup(); @@ -356,7 +356,7 @@ Script N(80241028) = SCRIPT({ DisablePlayerInput(FALSE); }); -Script N(80241528) = SCRIPT({ +EvtSource N(80241528) = SCRIPT({ bind_padlock N(80241028) TRIGGER_WALL_PRESS_A 9 N(itemList_80240E10); if (SI_SAVE_FLAG(1395) == 1) { MakeItemEntity(ITEM_FLOWER_SAVER_B, -83, 0, 0, 0, SI_SAVE_FLAG(1392)); @@ -369,7 +369,7 @@ static s32 N(pad_1594)[] = { void playFX_82(); -ApiStatus N(func_80240000_CEC240)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_CEC240)(Evt* script, s32 isInitialCall) { playFX_82(1, 0, 0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/area_flo/flo_22/CEC290.c b/src/world/area_flo/flo_22/CEC290.c index 8792325701..cd881c1cee 100644 --- a/src/world/area_flo/flo_22/CEC290.c +++ b/src/world/area_flo/flo_22/CEC290.c @@ -24,7 +24,7 @@ ShakeTreeConfig N(tree2) = { Vec4f N(triggerCoord_80241F5C) = { 150.0f, 0.0f, 135.0f, 0.0f }; -Script N(80241F6C) = SCRIPT({ +EvtSource N(80241F6C) = SCRIPT({ SI_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 14; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80241F28); diff --git a/src/world/area_flo/flo_22/flo_22.h b/src/world/area_flo/flo_22/flo_22.h index 39ed92fef8..78c28adeff 100644 --- a/src/world/area_flo/flo_22/flo_22.h +++ b/src/world/area_flo/flo_22/flo_22.h @@ -3,11 +3,11 @@ #define NAMESPACE flo_22 -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_CEC240)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240000_CEC240)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80240DE4); -extern Script N(80240E24); -extern Script N(80241528); -extern Script N(80241F6C); -extern Script N(main); +extern EvtSource N(80240E24); +extern EvtSource N(80241528); +extern EvtSource N(80241F6C); +extern EvtSource N(main); diff --git a/src/world/area_flo/flo_23/CEE260.c b/src/world/area_flo/flo_23/CEE260.c index fcad4e55e1..0b598a2533 100644 --- a/src/world/area_flo/flo_23/CEE260.c +++ b/src/world/area_flo/flo_23/CEE260.c @@ -2,7 +2,7 @@ void playFX_82(); -ApiStatus N(func_80240000_CEE260)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_CEE260)(Evt* script, s32 isInitialCall) { playFX_82(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 index dfd4987765..3cdb2c1052 100644 --- a/src/world/area_flo/flo_23/CEE2A0.c +++ b/src/world/area_flo/flo_23/CEE2A0.c @@ -27,7 +27,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_23_tattle }, }; -Script N(80240D30) = SCRIPT({ +EvtSource N(80240D30) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); @@ -37,7 +37,7 @@ Script N(80240D30) = SCRIPT({ } }); -Script N(80240DA0) = SCRIPT({ +EvtSource N(80240DA0) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -76,16 +76,16 @@ Script N(80240DA0) = SCRIPT({ goto 0; }); -Script N(exitWalk_8024104C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 2); +EvtSource N(exitWalk_8024104C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 2); -Script N(exitWalk_802410A8) = EXIT_WALK_SCRIPT(60, 1, "flo_11", 0); +EvtSource N(exitWalk_802410A8) = EXIT_WALK_SCRIPT(60, 1, "flo_11", 0); -Script N(80241104) = SCRIPT({ +EvtSource N(80241104) = SCRIPT({ bind N(exitWalk_802410A8) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_8024104C) TRIGGER_FLOOR_ABOVE 4; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -128,7 +128,7 @@ s32 N(D_80241310_CEF570) = { 0x00000000, }; -Script N(80241314) = SCRIPT({ +EvtSource N(80241314) = SCRIPT({ SI_VAR(9) = SI_VAR(1); ShowConsumableChoicePopup(); SI_VAR(10) = SI_VAR(0); @@ -151,7 +151,7 @@ Script N(80241314) = SCRIPT({ unbind; }); -Script N(80241448) = SCRIPT({ +EvtSource N(80241448) = SCRIPT({ N(func_802402F8_CEE558)(SI_VAR(0)); bind_padlock N(80241314) 0x10 0 0x802426E0; // TODO: fix raw ptr N(func_8024026C_CEE4CC)(SI_VAR(0)); @@ -170,7 +170,7 @@ NpcAISettings N(npcAISettings_80241498) = { .unk_2C = 3, }; -Script N(npcAI_802414C8) = SCRIPT({ +EvtSource N(npcAI_802414C8) = SCRIPT({ SetSelfVar(2, 3); SetSelfVar(3, 18); SetSelfVar(5, 3); @@ -187,7 +187,7 @@ NpcSettings N(npcSettings_80241538) = { .level = 19, }; -Script N(interact_80241564) = SCRIPT({ +EvtSource N(interact_80241564) = SCRIPT({ DisablePlayerInput(TRUE); if (SI_SAVE_FLAG(1365) == 0) { GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -327,7 +327,7 @@ Script N(interact_80241564) = SCRIPT({ unbind; }); -Script N(init_80241E70) = SCRIPT({ +EvtSource N(init_80241E70) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241564)); if (SI_SAVE_FLAG(1365) == 1) { SetNpcAnimation(NPC_SELF, NPC_ANIM(gate_flower, Palette_00, Anim_5)); @@ -445,7 +445,7 @@ static s32 N(pad_2598)[] = { 0x00000000, 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA0C4, 100, 60, 5, 0, MAKE_ENTITY_END); MakeEntity(0x802EA588, 100, 145, 0, 0, ITEM_SHOOTING_STAR, MAKE_ENTITY_END); AssignBlockFlag(SI_SAVE_FLAG(1409)); @@ -458,7 +458,7 @@ Script N(makeEntities) = SCRIPT({ #include "world/common/AddPlayerHandsOffset.inc.c" -ApiStatus N(func_8024026C_CEE4CC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024026C_CEE4CC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -474,7 +474,7 @@ ApiStatus N(func_8024026C_CEE4CC)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_802402C0_CEE520)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802402C0_CEE520)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80241310_CEF570) = get_variable(script, *args); @@ -482,7 +482,7 @@ ApiStatus N(func_802402C0_CEE520)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_802402F8_CEE558)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802402F8_CEE558)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -509,7 +509,7 @@ ApiStatus N(func_802402F8_CEE558)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/set_script_owner_npc_col_height.inc.c" -ApiStatus N(func_80240728_CEE988)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240728_CEE988)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -645,7 +645,7 @@ ApiStatus N(func_80240728_CEE988)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80240B68_CEEDC8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B68_CEEDC8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemIdx = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); @@ -660,7 +660,7 @@ ApiStatus N(func_80240B68_CEEDC8)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80240C2C_CEEE8C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240C2C_CEEE8C)(Evt* script, s32 isInitialCall) { s32 itemId = get_variable(script, *script->ptrReadPos); StaticItem* item = &gItemTable[itemId]; @@ -675,7 +675,7 @@ ApiStatus N(func_80240C2C_CEEE8C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80240C9C_CEEEFC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240C9C_CEEEFC)(Evt* script, s32 isInitialCall) { s32 i; for (i = 0; i <= 90; i++) { diff --git a/src/world/area_flo/flo_23/flo_23.h b/src/world/area_flo/flo_23/flo_23.h index 8e4db7095c..df3b004be2 100644 --- a/src/world/area_flo/flo_23/flo_23.h +++ b/src/world/area_flo/flo_23/flo_23.h @@ -3,17 +3,17 @@ #define NAMESPACE flo_23 -ApiStatus N(AddPlayerHandsOffset)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_CEE260)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024026C_CEE4CC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802402C0_CEE520)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802402F8_CEE558)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240728_CEE988)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240B68_CEEDC8)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240C2C_CEEE8C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240C9C_CEEEFC)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_CEE260)(ScriptInstance *script, s32 isInitialCall); +ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240000_CEE260)(Evt* script, s32 isInitialCall); +ApiStatus N(func_8024026C_CEE4CC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802402C0_CEE520)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802402F8_CEE558)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240728_CEE988)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240B68_CEEDC8)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240C2C_CEEE8C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240C9C_CEEEFC)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240000_CEE260)(Evt *script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80242568); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_flo/flo_24/CF0940.c b/src/world/area_flo/flo_24/CF0940.c index 0127982e94..705ac81bb5 100644 --- a/src/world/area_flo/flo_24/CF0940.c +++ b/src/world/area_flo/flo_24/CF0940.c @@ -2,7 +2,7 @@ void playFX_82(); -ApiStatus N(func_80240000_CF0940)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_CF0940)(Evt* script, s32 isInitialCall) { playFX_82(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 index 7e8e38d9bb..0073f8ae5c 100644 --- a/src/world/area_flo/flo_24/CF0980.c +++ b/src/world/area_flo/flo_24/CF0980.c @@ -15,7 +15,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_24_tattle }, }; -Script N(80240600) = SCRIPT({ +EvtSource N(80240600) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -26,7 +26,7 @@ Script N(80240600) = SCRIPT({ } }); -Script N(80240690) = SCRIPT({ +EvtSource N(80240690) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -65,16 +65,16 @@ Script N(80240690) = SCRIPT({ goto 0; }); -Script N(exitWalk_8024093C) = EXIT_WALK_SCRIPT(60, 0, "flo_08", 1); +EvtSource N(exitWalk_8024093C) = EXIT_WALK_SCRIPT(60, 0, "flo_08", 1); -Script N(exitWalk_80240998) = EXIT_WALK_SCRIPT(60, 1, "flo_10", 0); +EvtSource N(exitWalk_80240998) = EXIT_WALK_SCRIPT(60, 1, "flo_10", 0); -Script N(802409F4) = SCRIPT({ +EvtSource N(802409F4) = SCRIPT({ bind N(exitWalk_8024093C) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_80240998) TRIGGER_FLOOR_ABOVE 4; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -163,7 +163,7 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_80241718) = { 1.0f, 0.0f, -192.0f, 0.0f }; -Script N(80241728) = SCRIPT({ +EvtSource N(80241728) = SCRIPT({ SI_AREA_FLAG(31) = 0; SI_AREA_FLAG(32) = 0; SI_VAR(0) = N(tree1); @@ -171,7 +171,7 @@ Script N(80241728) = SCRIPT({ bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80241718); }); -Script N(updateTexturePan_802417A0) = SCRIPT({ +EvtSource N(updateTexturePan_802417A0) = SCRIPT({ group 0; if (SI_VAR(5) == 1) { if (SI_VAR(6) == 1) { @@ -190,7 +190,7 @@ const char N(flo_10_name_hack)[]; // BUG: missing END_SPAWN_THREADs #ifdef NON_MATCHING -Script N(8024183C) = SCRIPT({ +EvtSource N(8024183C) = SCRIPT({ DisablePlayerInput(TRUE); TranslateGroup(100, 0, 45, 0); UseSettingsFrom(0, 170, 0, 160); @@ -230,48 +230,48 @@ Script N(8024183C) = SCRIPT({ } }); #else -Script N(8024183C) = { - SI_CMD(ScriptOpcode_CALL, DisablePlayerInput, 1), - SI_CMD(ScriptOpcode_CALL, TranslateGroup, 100, 0, 45, 0), - SI_CMD(ScriptOpcode_CALL, UseSettingsFrom, 0, 170, 0, 160), - SI_CMD(ScriptOpcode_CALL, SetPanTarget, 0, 170, -90, 160), - SI_CMD(ScriptOpcode_CALL, SetCamDistance, 0, 800), - SI_CMD(ScriptOpcode_CALL, SetCamPitch, 0, SI_FIXED(18.5), SI_FIXED(-7.5)), - SI_CMD(ScriptOpcode_CALL, SetCamPosA, 0, SI_FIXED(-300.0), SI_FIXED(200.0)), - SI_CMD(ScriptOpcode_CALL, SetCamPosB, 0, SI_FIXED(300.0), SI_FIXED(-150.0)), - SI_CMD(ScriptOpcode_CALL, SetCamSpeed, 0, SI_FIXED(90.0)), - SI_CMD(ScriptOpcode_CALL, PanToTarget, 0, 0, 1), - SI_CMD(ScriptOpcode_CALL, PlaySound, 0x80000050), - SI_CMD(ScriptOpcode_SPAWN_THREAD), - SI_CMD(ScriptOpcode_CALL, MakeLerp, 80, 90, 10, 0), - SI_CMD(ScriptOpcode_LABEL, 0), - SI_CMD(ScriptOpcode_CALL, UpdateLerp), - SI_CMD(ScriptOpcode_CALL, RotateModel, 101, SI_VAR(0), 1, 0, 0), - SI_CMD(ScriptOpcode_CALL, RotateModel, 103, SI_VAR(0), 1, 0, 0), - SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 1), - SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1), - SI_CMD(ScriptOpcode_GOTO, 0), - SI_CMD(ScriptOpcode_END_IF), - SI_CMD(ScriptOpcode_SPAWN_THREAD), - SI_CMD(ScriptOpcode_CALL, MakeLerp, 45, 100, 150, 0), - SI_CMD(ScriptOpcode_LOOP, 0), - SI_CMD(ScriptOpcode_CALL, UpdateLerp), - SI_CMD(ScriptOpcode_CALL, TranslateGroup, 100, 0, SI_VAR(0), 0), - SI_CMD(ScriptOpcode_SLEEP_FRAMES, 1), - SI_CMD(ScriptOpcode_IF_EQ, SI_VAR(1), 0), - SI_CMD(ScriptOpcode_BREAK_LOOP), - SI_CMD(ScriptOpcode_END_IF), - SI_CMD(ScriptOpcode_END_LOOP), - SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30), - SI_CMD(ScriptOpcode_SET, SI_STORY_PROGRESS, STORY_CH6_FILLED_SPRING_WITH_WATER), - SI_CMD(ScriptOpcode_CALL, GotoMap, N(flo_10_name_hack), 2), - SI_CMD(ScriptOpcode_SLEEP_FRAMES, 100), - SI_CMD(ScriptOpcode_RETURN), - SI_CMD(ScriptOpcode_END) +EvtSource N(8024183C) = { + SI_CMD(EVT_OP_CALL, DisablePlayerInput, 1), + SI_CMD(EVT_OP_CALL, TranslateGroup, 100, 0, 45, 0), + SI_CMD(EVT_OP_CALL, UseSettingsFrom, 0, 170, 0, 160), + SI_CMD(EVT_OP_CALL, SetPanTarget, 0, 170, -90, 160), + SI_CMD(EVT_OP_CALL, SetCamDistance, 0, 800), + SI_CMD(EVT_OP_CALL, SetCamPitch, 0, SI_FIXED(18.5), SI_FIXED(-7.5)), + SI_CMD(EVT_OP_CALL, SetCamPosA, 0, SI_FIXED(-300.0), SI_FIXED(200.0)), + SI_CMD(EVT_OP_CALL, SetCamPosB, 0, SI_FIXED(300.0), SI_FIXED(-150.0)), + SI_CMD(EVT_OP_CALL, SetCamSpeed, 0, SI_FIXED(90.0)), + SI_CMD(EVT_OP_CALL, PanToTarget, 0, 0, 1), + SI_CMD(EVT_OP_CALL, PlaySound, 0x80000050), + SI_CMD(EVT_OP_SPAWN_THREAD), + SI_CMD(EVT_OP_CALL, MakeLerp, 80, 90, 10, 0), + SI_CMD(EVT_OP_LABEL, 0), + SI_CMD(EVT_OP_CALL, UpdateLerp), + SI_CMD(EVT_OP_CALL, RotateModel, 101, SI_VAR(0), 1, 0, 0), + SI_CMD(EVT_OP_CALL, RotateModel, 103, SI_VAR(0), 1, 0, 0), + SI_CMD(EVT_OP_IF_EQ, SI_VAR(1), 1), + SI_CMD(EVT_OP_SLEEP_FRAMES, 1), + SI_CMD(EVT_OP_GOTO, 0), + SI_CMD(EVT_OP_END_IF), + SI_CMD(EVT_OP_SPAWN_THREAD), + SI_CMD(EVT_OP_CALL, MakeLerp, 45, 100, 150, 0), + SI_CMD(EVT_OP_LOOP, 0), + SI_CMD(EVT_OP_CALL, UpdateLerp), + SI_CMD(EVT_OP_CALL, TranslateGroup, 100, 0, SI_VAR(0), 0), + SI_CMD(EVT_OP_SLEEP_FRAMES, 1), + SI_CMD(EVT_OP_IF_EQ, SI_VAR(1), 0), + SI_CMD(EVT_OP_BREAK_LOOP), + SI_CMD(EVT_OP_END_IF), + SI_CMD(EVT_OP_END_LOOP), + SI_CMD(EVT_OP_SLEEP_FRAMES, 30), + SI_CMD(EVT_OP_SET, SI_STORY_PROGRESS, STORY_CH6_FILLED_SPRING_WITH_WATER), + SI_CMD(EVT_OP_CALL, GotoMap, N(flo_10_name_hack), 2), + SI_CMD(EVT_OP_SLEEP_FRAMES, 100), + SI_CMD(EVT_OP_RETURN), + SI_CMD(EVT_OP_END) }; #endif -Script N(80241ABC) = SCRIPT({ +EvtSource N(80241ABC) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH6_FILLED_SPRING_WITH_WATER) { EnableGroup(94, 0); ModifyColliderFlags(0, 30, 0x7FFFFE00); @@ -393,7 +393,7 @@ static s32 N(pad_21A4)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA564, -325, 60, -140, 0, ITEM_DIZZY_DIAL, MAKE_ENTITY_END); AssignBlockFlag(SI_SAVE_FLAG(1393)); MakeEntity(0x802EA588, 325, 60, -140, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END); diff --git a/src/world/area_flo/flo_24/flo_24.h b/src/world/area_flo/flo_24/flo_24.h index 8fa6a0f07d..28469a8374 100644 --- a/src/world/area_flo/flo_24/flo_24.h +++ b/src/world/area_flo/flo_24/flo_24.h @@ -3,13 +3,13 @@ #define NAMESPACE flo_24 -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkTexturePanFunc2)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_CF0940)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkTexturePanFunc2)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80240000_CF0940)(Evt* script, s32 isInitialCall); -extern Script N(80241728); -extern Script N(8024183C); -extern Script N(80241ABC); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(80241728); +extern EvtSource N(8024183C); +extern EvtSource N(80241ABC); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_flo/flo_25/CF2BD0.c b/src/world/area_flo/flo_25/CF2BD0.c index e947eb7093..8f5fe3f88c 100644 --- a/src/world/area_flo/flo_25/CF2BD0.c +++ b/src/world/area_flo/flo_25/CF2BD0.c @@ -2,7 +2,7 @@ void playFX_82(); -ApiStatus N(func_80240000_CF2BD0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_CF2BD0)(Evt* script, s32 isInitialCall) { playFX_82(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 index 1032f3929c..ba8a826e01 100644 --- a/src/world/area_flo/flo_25/CF2C10.c +++ b/src/world/area_flo/flo_25/CF2C10.c @@ -28,7 +28,7 @@ MapConfig N(config) = { .tattle = { MSG_flo_25_tattle }, }; -Script N(80242330) = SCRIPT({ +EvtSource N(80242330) = SCRIPT({ match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); @@ -38,7 +38,7 @@ Script N(80242330) = SCRIPT({ } }); -Script N(802423A0) = SCRIPT({ +EvtSource N(802423A0) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -77,16 +77,16 @@ Script N(802423A0) = SCRIPT({ goto 0; }); -Script N(exitWalk_8024264C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 3); +EvtSource N(exitWalk_8024264C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 3); -Script N(exitWalk_802426A8) = EXIT_WALK_SCRIPT(60, 1, "flo_07", 0); +EvtSource N(exitWalk_802426A8) = EXIT_WALK_SCRIPT(60, 1, "flo_07", 0); -Script N(80242704) = SCRIPT({ +EvtSource N(80242704) = SCRIPT({ bind N(exitWalk_802426A8) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_8024264C) TRIGGER_FLOOR_ABOVE 4; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); @@ -137,7 +137,7 @@ NpcAISettings N(npcAISettings_80242934) = { .unk_2C = 1, }; -Script N(npcAI_80242964) = SCRIPT({ +EvtSource N(npcAI_80242964) = SCRIPT({ SetSelfVar(0, 1); SetSelfVar(5, 0); SetSelfVar(6, 0); @@ -169,7 +169,7 @@ NpcAISettings N(npcAISettings_80242A00) = { .unk_2C = 1, }; -Script N(npcAI_80242A30) = SCRIPT({ +EvtSource N(npcAI_80242A30) = SCRIPT({ SetSelfVar(0, 0); SetSelfVar(5, -630); SetSelfVar(6, 50); @@ -194,7 +194,7 @@ s32 N(D_80242AD0_CF56A0) = { 0x00000000, }; -Script N(80242AD4) = SCRIPT({ +EvtSource N(80242AD4) = SCRIPT({ SI_VAR(9) = SI_VAR(1); ShowConsumableChoicePopup(); SI_VAR(10) = SI_VAR(0); @@ -217,13 +217,13 @@ Script N(80242AD4) = SCRIPT({ unbind; }); -Script N(80242C08) = SCRIPT({ +EvtSource N(80242C08) = SCRIPT({ N(func_80241DE4_CF49B4)(SI_VAR(0)); bind_padlock N(80242AD4) 0x10 0 N(D_80244A20); N(func_80241D58_CF4928)(SI_VAR(0)); }); -Script N(interact_80242C58) = SCRIPT({ +EvtSource N(interact_80242C58) = SCRIPT({ DisablePlayerInput(TRUE); if (SI_SAVE_FLAG(1363) == 0) { GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -363,7 +363,7 @@ Script N(interact_80242C58) = SCRIPT({ unbind; }); -Script N(init_80243564) = SCRIPT({ +EvtSource N(init_80243564) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80242C58)); if (SI_SAVE_FLAG(1363) == 1) { SetNpcAnimation(NPC_SELF, NPC_ANIM(gate_flower, Palette_01, Anim_5)); @@ -493,7 +493,7 @@ static s32 N(pad_3C8C) = { 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAB04, -390, 0, 0, 0, ITEM_MAP, MAKE_ENTITY_END); AssignPanelFlag(SI_SAVE_FLAG(1407)); }); @@ -506,7 +506,7 @@ static s32 N(pad_3CD8)[] = { #ifdef NON_MATCHING // second npc_raycast_down_sides call -void N(func_80241040_BE47F0)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241040_BE47F0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 temp_f24; @@ -645,7 +645,7 @@ void N(func_80241040_BE47F0)(ScriptInstance* script, NpcAISettings* aiSettings, } } #else -INCLUDE_ASM(void, "world/area_flo/flo_25/CF2C10", flo_25_func_802401F0_CF2DC0, ScriptInstance* script, +INCLUDE_ASM(void, "world/area_flo/flo_25/CF2C10", flo_25_func_802401F0_CF2DC0, Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); #endif @@ -655,7 +655,7 @@ INCLUDE_ASM(void, "world/area_flo/flo_25/CF2C10", flo_25_func_802401F0_CF2DC0, S #include "world/common/UnkNpcAIFunc2.inc.c" -void N(func_80240C94_CF3864)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C94_CF3864)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -673,7 +673,7 @@ void N(func_80240C94_CF3864)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc5.inc.c" -ApiStatus N(func_8024134C_CF3F1C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024134C_CF3F1C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -735,7 +735,7 @@ ApiStatus N(func_8024134C_CF3F1C)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkNpcAIFunc13.inc.c" -void N(func_80241668_CF4238)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241668_CF4238)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, y, z, w; @@ -782,7 +782,7 @@ void N(func_80241668_CF4238)(ScriptInstance* script, NpcAISettings* aiSettings, #include "world/common/UnkFunc45.inc.c" -ApiStatus N(func_80241944_CF4514)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241944_CF4514)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -846,7 +846,7 @@ ApiStatus N(func_80241944_CF4514)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/AddPlayerHandsOffset.inc.c" -ApiStatus N(func_80241D58_CF4928)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241D58_CF4928)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -862,7 +862,7 @@ ApiStatus N(func_80241D58_CF4928)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_80241DAC_CF497C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241DAC_CF497C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80242AD0_CF56A0) = get_variable(script, *args); @@ -870,7 +870,7 @@ ApiStatus N(func_80241DAC_CF497C)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80241DE4_CF49B4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241DE4_CF49B4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -889,7 +889,7 @@ ApiStatus N(func_80241DE4_CF49B4)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80241E80_CF4A50)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241E80_CF4A50)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemIdx = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); @@ -904,7 +904,7 @@ ApiStatus N(func_80241E80_CF4A50)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80241F44_CF4B14)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241F44_CF4B14)(Evt* script, s32 isInitialCall) { s32 itemId = get_variable(script, *script->ptrReadPos); StaticItem* item = &gItemTable[itemId]; @@ -919,7 +919,7 @@ ApiStatus N(func_80241F44_CF4B14)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(func_80241FB4_CF4B84)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241FB4_CF4B84)(Evt* script, s32 isInitialCall) { s32 i; for (i = 0; i <= 90; i++) { diff --git a/src/world/area_flo/flo_25/CF4BC0.c b/src/world/area_flo/flo_25/CF4BC0.c index 89b6b14ba1..da6118893e 100644 --- a/src/world/area_flo/flo_25/CF4BC0.c +++ b/src/world/area_flo/flo_25/CF4BC0.c @@ -38,7 +38,7 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_802446AC) = { -388.0f, 0.0f, -92.0f, 0.0f }; -Script N(802446BC) = SCRIPT({ +EvtSource N(802446BC) = SCRIPT({ SI_AREA_FLAG(33) = 0; SI_AREA_FLAG(34) = 0; SI_VAR(0) = N(tree1); @@ -50,7 +50,7 @@ static s32 N(pad_4734)[] = { 0x00000000, 0x00000000, 0x00000000, }; -Script N(80244740) = SCRIPT({ +EvtSource N(80244740) = SCRIPT({ group 11; SI_VAR(10) = SI_VAR(0); SI_VAR(11) = SI_VAR(1); @@ -89,7 +89,7 @@ Script N(80244740) = SCRIPT({ goto 0; }); -Script N(802449EC) = SCRIPT({ +EvtSource N(802449EC) = SCRIPT({ SI_VAR(9) = SI_VAR(6); SI_VAR(8) = SI_VAR(5); SI_VAR(7) = SI_VAR(4); @@ -139,7 +139,7 @@ Script N(802449EC) = SCRIPT({ EnableModel(SI_VAR(7), 0); }); -Script N(80244D0C) = SCRIPT({ +EvtSource N(80244D0C) = SCRIPT({ GetModelCenter(57); SI_VAR(3) = 57; SI_VAR(4) = 58; diff --git a/src/world/area_flo/flo_25/flo_25.h b/src/world/area_flo/flo_25/flo_25.h index 1bc0af2287..ce99804e15 100644 --- a/src/world/area_flo/flo_25/flo_25.h +++ b/src/world/area_flo/flo_25/flo_25.h @@ -3,21 +3,21 @@ #define NAMESPACE flo_25 -ApiStatus N(AddPlayerHandsOffset)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc43)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80240000_CF2BD0)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_8024134C_CF3F1C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241944_CF4514)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241D58_CF4928)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241DAC_CF497C)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241DE4_CF49B4)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241E80_CF4A50)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241F44_CF4B14)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_80241FB4_CF4B84)(ScriptInstance* script, s32 isInitialCall); +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(func_8024134C_CF3F1C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241944_CF4514)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241D58_CF4928)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241DAC_CF497C)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241DE4_CF49B4)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241E80_CF4A50)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241F44_CF4B14)(Evt* script, s32 isInitialCall); +ApiStatus N(func_80241FB4_CF4B84)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80243C5C); -extern Script N(802446BC); -extern Script N(80244D0C); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(802446BC); +extern EvtSource N(80244D0C); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_gv/gv_01/E1E460.c b/src/world/area_gv/gv_01/E1E460.c index d4589ecc62..78ba10d771 100644 --- a/src/world/area_gv/gv_01/E1E460.c +++ b/src/world/area_gv/gv_01/E1E460.c @@ -16,7 +16,7 @@ #include "world/common/UnkTexturePanFunc2.inc.c" -ApiStatus func_802405EC_E1EA4C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802405EC_E1EA4C(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 0; set_curtain_scale_goal(1.0); diff --git a/src/world/area_hos/hos_00/A0C4E0.c b/src/world/area_hos/hos_00/A0C4E0.c index db4aa649c0..d3738b82cb 100644 --- a/src/world/area_hos/hos_00/A0C4E0.c +++ b/src/world/area_hos/hos_00/A0C4E0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_00/A0C4E0", func_802407F0_A0C4E0); /* -ApiStatus N(func_802407F0_A0C4E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802407F0_A0C4E0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80242970_A0E660) == NULL) { diff --git a/src/world/area_hos/hos_02/A17210.c b/src/world/area_hos/hos_02/A17210.c index 82fd9a0e52..352eee2efc 100644 --- a/src/world/area_hos/hos_02/A17210.c +++ b/src/world/area_hos/hos_02/A17210.c @@ -12,7 +12,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_02/A17210", func_802411A0_A173C0); INCLUDE_ASM(s32, "world/area_hos/hos_02/A17210", func_80241C44_A17E64); /* -void N(func_80241C44_A17E64)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241C44_A17E64)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -33,7 +33,7 @@ void N(func_80241C44_A17E64)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_hos/hos_02/A17210", func_802422FC_A1851C); /* -ApiStatus N(func_802422FC_A1851C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802422FC_A1851C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -98,7 +98,7 @@ ApiStatus N(func_802422FC_A1851C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_02/A17210", func_80242618_A18838); /* -void N(func_80242618_A18838)(ScriptInstance *script, NpcAISettings *aiSettings, EnemyTerritoryThing *territory) { +void N(func_80242618_A18838)(Evt *script, NpcAISettings *aiSettings, EnemyTerritoryThing *territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, y, z, w; diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index ae672f16b3..78ffe25d68 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -14,7 +14,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80240E60_A1BF60); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80241904_A1CA04); /* -void N(func_80241904_A1CA04)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241904_A1CA04)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -35,7 +35,7 @@ void N(func_80241904_A1CA04)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80241FBC_A1D0BC); /* -ApiStatus N(func_80241FBC_A1D0BC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241FBC_A1D0BC)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -118,7 +118,7 @@ ApiStatus N(func_80241FBC_A1D0BC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802424A4_A1D5A4); /* -ApiStatus N(func_802424A4_A1D5A4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802424A4_A1D5A4)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_8024801C_A2311C) == NULL) { @@ -143,7 +143,7 @@ ApiStatus N(func_802424A4_A1D5A4)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802425E0_A1D6E0); /* -ApiStatus N(func_802425E0_A1D6E0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802425E0_A1D6E0)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -205,7 +205,7 @@ ApiStatus N(func_802425E0_A1D6E0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242B90_A1DC90); /* -ApiStatus N(func_80242B90_A1DC90)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242B90_A1DC90)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -226,7 +226,7 @@ ApiStatus N(func_80242B90_A1DC90)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242C14_A1DD14); /* -ApiStatus N(func_80242C14_A1DD14)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242C14_A1DD14)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -262,7 +262,7 @@ ApiStatus N(func_80242C14_A1DD14)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242E2C_A1DF2C); /* -ApiStatus N(func_80242E2C_A1DF2C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242E2C_A1DF2C)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -290,7 +290,7 @@ ApiStatus N(func_80242E2C_A1DF2C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242EE0_A1DFE0); /* -ApiStatus N(func_80242EE0_A1DFE0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242EE0_A1DFE0)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -298,7 +298,7 @@ ApiStatus N(func_80242EE0_A1DFE0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242F14_A1E014); /* -ApiStatus N(func_80242F14_A1E014)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242F14_A1E014)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -323,7 +323,7 @@ ApiStatus N(func_80242F14_A1E014)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242F94_A1E094); /* -ApiStatus N(func_80242F94_A1E094)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242F94_A1E094)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -331,7 +331,7 @@ ApiStatus N(func_80242F94_A1E094)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242FAC_A1E0AC); /* -ApiStatus N(func_80242FAC_A1E0AC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242FAC_A1E0AC)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -339,7 +339,7 @@ ApiStatus N(func_80242FAC_A1E0AC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242FC8_A1E0C8); /* -ApiStatus N(func_80242FC8_A1E0C8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242FC8_A1E0C8)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -372,7 +372,7 @@ void N(func_8024349C_A1E59C)(void) { INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80243508_A1E608); /* -ApiStatus N(func_80243508_A1E608)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80243508_A1E608)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } diff --git a/src/world/area_hos/hos_04/A27AA0.c b/src/world/area_hos/hos_04/A27AA0.c index c9da4efd27..d81e11966c 100644 --- a/src/world/area_hos/hos_04/A27AA0.c +++ b/src/world/area_hos/hos_04/A27AA0.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_04/A27AA0", func_80240BD0_A27AA0); INCLUDE_ASM(s32, "world/area_hos/hos_04/A27AA0", func_80240E40_A27D10); /* -ApiStatus N(func_80240E40_A27D10)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240E40_A27D10)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } diff --git a/src/world/area_hos/hos_05/A2EC30.c b/src/world/area_hos/hos_05/A2EC30.c index 1f8e18cef7..20be35f7e0 100644 --- a/src/world/area_hos/hos_05/A2EC30.c +++ b/src/world/area_hos/hos_05/A2EC30.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EC30", func_802449F0_A2EC30); INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EC30", func_80244C60_A2EEA0); /* -ApiStatus N(func_80244C60_A2EEA0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80244C60_A2EEA0)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } diff --git a/src/world/area_hos/hos_06/A397F0.c b/src/world/area_hos/hos_06/A397F0.c index bef51d8eb4..047995b25f 100644 --- a/src/world/area_hos/hos_06/A397F0.c +++ b/src/world/area_hos/hos_06/A397F0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240310_A397F0); /* -ApiStatus N(func_80240310_A397F0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240310_A397F0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80242C08_A3C0E8) == NULL) { @@ -33,7 +33,7 @@ ApiStatus N(func_80240310_A397F0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240654_A39B34); /* -ApiStatus N(func_80240654_A39B34)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240654_A39B34)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -52,7 +52,7 @@ ApiStatus N(func_80240654_A39B34)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_802406A8_A39B88); /* -ApiStatus N(func_802406A8_A39B88)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802406A8_A39B88)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80242C70_A3C150) = get_variable(script, *args); @@ -63,7 +63,7 @@ ApiStatus N(func_802406A8_A39B88)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_802406E0_A39BC0); /* -ApiStatus N(func_802406E0_A39BC0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802406E0_A39BC0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -89,7 +89,7 @@ ApiStatus N(func_802406E0_A39BC0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_802409F8_A39ED8); /* -ApiStatus N(func_802409F8_A39ED8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802409F8_A39ED8)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -100,7 +100,7 @@ ApiStatus N(func_802409F8_A39ED8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240A3C_A39F1C); /* -ApiStatus N(func_80240A3C_A39F1C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240A3C_A39F1C)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_hos/hos_06/A3A230.c b/src/world/area_hos/hos_06/A3A230.c index 310770fdda..f246f656a8 100644 --- a/src/world/area_hos/hos_06/A3A230.c +++ b/src/world/area_hos/hos_06/A3A230.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_80240F7C_A3A45C); /* -ApiStatus N(func_80240F7C_A3A45C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F7C_A3A45C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -25,7 +25,7 @@ ApiStatus N(func_80240F7C_A3A45C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_80240FD0_A3A4B0); /* -ApiStatus N(func_80240FD0_A3A4B0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240FD0_A3A4B0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802445D4_A3DAB4) = get_variable(script, *args); @@ -36,7 +36,7 @@ ApiStatus N(func_80240FD0_A3A4B0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_80241008_A3A4E8); /* -ApiStatus N(func_80241008_A3A4E8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241008_A3A4E8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -58,7 +58,7 @@ ApiStatus N(func_80241008_A3A4E8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_802410A4_A3A584); /* -ApiStatus N(func_802410A4_A3A584)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802410A4_A3A584)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_8024476C_A3DC4C) == NULL) { diff --git a/src/world/area_hos/hos_06/A3B4B0.c b/src/world/area_hos/hos_06/A3B4B0.c index 7b8b2f7bfe..9413c09767 100644 --- a/src/world/area_hos/hos_06/A3B4B0.c +++ b/src/world/area_hos/hos_06/A3B4B0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_06/A3B4B0", func_80241FD0_A3B4B0); /* -ApiStatus N(func_80241FD0_A3B4B0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241FD0_A3B4B0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80245E80_A3F360) == NULL) { diff --git a/src/world/area_isk/isk_09/9864E0.c b/src/world/area_isk/isk_09/9864E0.c index c19d024a60..3cf06dae28 100644 --- a/src/world/area_isk/isk_09/9864E0.c +++ b/src/world/area_isk/isk_09/9864E0.c @@ -5,7 +5,7 @@ static char* N(exit_str_1) = ""; INCLUDE_ASM(s32, "world/area_isk/isk_09/9864E0", func_80240000_9864E0); /* -ApiStatus N(func_80240000_9864E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_9864E0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802406F0_986BD0) == NULL) { diff --git a/src/world/area_isk/isk_10/988B60.c b/src/world/area_isk/isk_10/988B60.c index a9dba6f163..63a2064d1a 100644 --- a/src/world/area_isk/isk_10/988B60.c +++ b/src/world/area_isk/isk_10/988B60.c @@ -11,7 +11,7 @@ static char* N(exit_str_3) = ""; INCLUDE_ASM(s32, "world/area_isk/isk_10/988B60", func_8024003C_988B9C); /* -ApiStatus N(func_8024003C_988B9C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024003C_988B9C)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -35,7 +35,7 @@ INCLUDE_ASM(s32, "world/area_isk/isk_10/988B60", func_802401CC_988D2C); INCLUDE_ASM(s32, "world/area_isk/isk_10/988B60", func_80240600_989160); /* -ApiStatus N(func_80240600_989160)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240600_989160)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_isk/isk_16/9951F0.c b/src/world/area_isk/isk_16/9951F0.c index 75a0a4161d..d56c434817 100644 --- a/src/world/area_isk/isk_16/9951F0.c +++ b/src/world/area_isk/isk_16/9951F0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_isk/isk_16/9951F0", func_80240000_9951F0); /* -ApiStatus N(func_80240000_9951F0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_9951F0)(Evt* script, s32 isInitialCall) { arn_07_struct* ptr = script->varTable[0]; sfx_adjust_env_sound_pos(0xA2, 0, ptr->unk_00, ptr->unk_04, ptr->unk_08); @@ -12,7 +12,7 @@ ApiStatus N(func_80240000_9951F0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_isk/isk_16/9951F0", func_8024004C_99523C); /* -ApiStatus N(func_8024004C_99523C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024004C_99523C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -48,7 +48,7 @@ static char* N(exit_str_1) = "isk_19"; INCLUDE_ASM(s32, "world/area_isk/isk_16/9951F0", func_802405BC_9957AC); /* -ApiStatus N(func_802405BC_9957AC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405BC_9957AC)(Evt* script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); arn_07_struct* ptr = script->varTable[0]; @@ -58,7 +58,7 @@ ApiStatus N(func_802405BC_9957AC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_isk/isk_16/9951F0", func_802405FC_9957EC); /* -ApiStatus N(func_802405FC_9957EC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405FC_9957EC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { diff --git a/src/world/area_iwa/iwa_00/90CC40.c b/src/world/area_iwa/iwa_00/90CC40.c index 8bd471cc80..61ced1ebc1 100644 --- a/src/world/area_iwa/iwa_00/90CC40.c +++ b/src/world/area_iwa/iwa_00/90CC40.c @@ -5,7 +5,7 @@ static char* N(exit_str_1) = "iwa_01"; INCLUDE_ASM(s32, "world/area_iwa/iwa_00/90CC40", func_80240000_90CC40); /* -ApiStatus N(func_80240000_90CC40)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_90CC40)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80240FF8_90DC38) == NULL) { diff --git a/src/world/area_iwa/iwa_01/90FBD0.c b/src/world/area_iwa/iwa_01/90FBD0.c index b30eb85b71..6ea28ab522 100644 --- a/src/world/area_iwa/iwa_01/90FBD0.c +++ b/src/world/area_iwa/iwa_01/90FBD0.c @@ -46,7 +46,7 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_01/90FBD0", func_802422C4_911974); INCLUDE_ASM(s32, "world/area_iwa/iwa_01/90FBD0", func_80242498_911B48); /* -void N(func_80242498_911B48)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242498_911B48)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -78,7 +78,7 @@ void N(func_80242498_911B48)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_iwa/iwa_01/90FBD0", func_80242958_912008); /* -void N(func_80242958_912008)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242958_912008)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); PlayerStatus** playerStatus = &gPlayerStatusPtr; @@ -110,7 +110,7 @@ void N(func_80242958_912008)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_iwa/iwa_01/90FBD0", func_80242C48_9122F8); /* -void N(func_80242C48_9122F8)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242C48_9122F8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_iwa/iwa_02/915D70.c b/src/world/area_iwa/iwa_02/915D70.c index 62025e9fbe..5c59156a67 100644 --- a/src/world/area_iwa/iwa_02/915D70.c +++ b/src/world/area_iwa/iwa_02/915D70.c @@ -9,7 +9,7 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240000_915D70); INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_802401D4_915F44); /* -void N(func_802401D4_915F44)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802401D4_915F44)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -41,7 +41,7 @@ void N(func_802401D4_915F44)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240694_916404); /* -void N(func_80240694_916404)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240694_916404)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); PlayerStatus** playerStatus = &gPlayerStatusPtr; @@ -73,7 +73,7 @@ void N(func_80240694_916404)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240984_9166F4); /* -void N(func_80240984_9166F4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240984_9166F4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); @@ -102,7 +102,7 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240C90_916A00); INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240FE0_916D50); /* -ApiStatus N(func_80240FE0_916D50)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240FE0_916D50)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241DA8_917B18) == NULL) { diff --git a/src/world/area_iwa/iwa_03/918BB0.c b/src/world/area_iwa/iwa_03/918BB0.c index c15c14efb3..6ac2314905 100644 --- a/src/world/area_iwa/iwa_03/918BB0.c +++ b/src/world/area_iwa/iwa_03/918BB0.c @@ -5,7 +5,7 @@ static char* N(exit_str_1) = ""; INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918BB0", func_80240000_918BB0); /* -ApiStatus N(func_80240000_918BB0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_918BB0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241530_91A0E0) == NULL) { diff --git a/src/world/area_iwa/iwa_03/918EF0.c b/src/world/area_iwa/iwa_03/918EF0.c index 72a76ede3b..0caa316167 100644 --- a/src/world/area_iwa/iwa_03/918EF0.c +++ b/src/world/area_iwa/iwa_03/918EF0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918EF0", func_80240340_918EF0); INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918EF0", func_80240514_9190C4); /* -void N(func_80240514_9190C4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240514_9190C4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -38,7 +38,7 @@ void N(func_80240514_9190C4)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918EF0", func_802409D4_919584); /* -void N(func_802409D4_919584)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802409D4_919584)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); PlayerStatus** playerStatus = &gPlayerStatusPtr; @@ -70,7 +70,7 @@ void N(func_802409D4_919584)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918EF0", func_80240CC4_919874); /* -void N(func_80240CC4_919874)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240CC4_919874)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_iwa/iwa_04/91B8E0.c b/src/world/area_iwa/iwa_04/91B8E0.c index ad93972481..874d094abd 100644 --- a/src/world/area_iwa/iwa_04/91B8E0.c +++ b/src/world/area_iwa/iwa_04/91B8E0.c @@ -11,7 +11,7 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_04/91B8E0", func_80240080_91B960); INCLUDE_ASM(s32, "world/area_iwa/iwa_04/91B8E0", func_80240254_91BB34); /* -void N(func_80240254_91BB34)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240254_91BB34)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -43,7 +43,7 @@ void N(func_80240254_91BB34)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_iwa/iwa_04/91B8E0", func_80240714_91BFF4); /* -void N(func_80240714_91BFF4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240714_91BFF4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); PlayerStatus** playerStatus = &gPlayerStatusPtr; @@ -75,7 +75,7 @@ void N(func_80240714_91BFF4)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_iwa/iwa_04/91B8E0", func_80240A04_91C2E4); /* -void N(func_80240A04_91C2E4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240A04_91C2E4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_iwa/iwa_10/91E5B0.c b/src/world/area_iwa/iwa_10/91E5B0.c index c6db43b8c3..b091e936cf 100644 --- a/src/world/area_iwa/iwa_10/91E5B0.c +++ b/src/world/area_iwa/iwa_10/91E5B0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E5B0", func_80240040_91E5B0); /* -ApiStatus N(func_80240040_91E5B0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240040_91E5B0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241DD0_920340) == NULL) { diff --git a/src/world/area_iwa/iwa_10/91E6D0.c b/src/world/area_iwa/iwa_10/91E6D0.c index b30571af78..18d58bdbd7 100644 --- a/src/world/area_iwa/iwa_10/91E6D0.c +++ b/src/world/area_iwa/iwa_10/91E6D0.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E6D0", func_8024032C_91E89C); /* -ApiStatus N(func_8024032C_91E89C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024032C_91E89C)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -32,7 +32,7 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E6D0", func_802404BC_91EA2C); INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E6D0", func_802408F0_91EE60); /* -ApiStatus N(func_802408F0_91EE60)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802408F0_91EE60)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_iwa/iwa_10/91F5A0.c b/src/world/area_iwa/iwa_10/91F5A0.c index b094546aaa..a713e4f5a4 100644 --- a/src/world/area_iwa/iwa_10/91F5A0.c +++ b/src/world/area_iwa/iwa_10/91F5A0.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91F5A0", func_802413E0_91F950); /* -ApiStatus N(func_802413E0_91F950)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802413E0_91F950)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -27,7 +27,7 @@ ApiStatus N(func_802413E0_91F950)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91F5A0", func_80241434_91F9A4); /* -ApiStatus N(func_80241434_91F9A4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241434_91F9A4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80246270_9247E0) = get_variable(script, *args); @@ -38,7 +38,7 @@ ApiStatus N(func_80241434_91F9A4)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91F5A0", func_8024146C_91F9DC); /* -ApiStatus N(func_8024146C_91F9DC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024146C_91F9DC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_jan/jan_00/B20540.c b/src/world/area_jan/jan_00/B20540.c index 8f26cea993..d9a1a94daf 100644 --- a/src/world/area_jan/jan_00/B20540.c +++ b/src/world/area_jan/jan_00/B20540.c @@ -10,7 +10,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240340_B20880); INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_802403F4_B20934); /* -ApiStatus N(func_802403F4_B20934)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802403F4_B20934)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802423C8_B22908) == NULL) { @@ -37,7 +37,7 @@ ApiStatus N(func_802403F4_B20934)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240738_B20C78); /* -ApiStatus N(func_80240738_B20C78)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240738_B20C78)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -56,7 +56,7 @@ ApiStatus N(func_80240738_B20C78)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_8024078C_B20CCC); /* -ApiStatus N(func_8024078C_B20CCC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024078C_B20CCC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80242430_B22970) = get_variable(script, *args); @@ -67,7 +67,7 @@ ApiStatus N(func_8024078C_B20CCC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_802407C4_B20D04); /* -ApiStatus N(func_802407C4_B20D04)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802407C4_B20D04)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -93,7 +93,7 @@ ApiStatus N(func_802407C4_B20D04)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240ADC_B2101C); /* -ApiStatus N(func_80240ADC_B2101C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240ADC_B2101C)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -104,7 +104,7 @@ ApiStatus N(func_80240ADC_B2101C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240B20_B21060); /* -ApiStatus N(func_80240B20_B21060)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240B20_B21060)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index 3595c5dfc5..f98d35899d 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -26,7 +26,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80240FC4_B2D434); /* -ApiStatus N(func_80240FC4_B2D434)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240FC4_B2D434)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -117,7 +117,7 @@ ApiStatus N(func_80240FC4_B2D434)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_802414EC_B2D95C); /* -ApiStatus N(func_802414EC_B2D95C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802414EC_B2D95C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -136,7 +136,7 @@ ApiStatus N(func_802414EC_B2D95C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241540_B2D9B0); /* -ApiStatus N(func_80241540_B2D9B0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241540_B2D9B0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_8024304C_B2F4BC) = get_variable(script, *args); @@ -147,7 +147,7 @@ ApiStatus N(func_80241540_B2D9B0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241578_B2D9E8); /* -ApiStatus N(func_80241578_B2D9E8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241578_B2D9E8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -169,7 +169,7 @@ ApiStatus N(func_80241578_B2D9E8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241614_B2DA84); /* -ApiStatus N(func_80241614_B2DA84)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241614_B2DA84)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802431E4_B2F654) == NULL) { @@ -194,7 +194,7 @@ ApiStatus N(func_80241614_B2DA84)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241750_B2DBC0); /* -ApiStatus N(func_80241750_B2DBC0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241750_B2DBC0)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -256,7 +256,7 @@ ApiStatus N(func_80241750_B2DBC0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241D00_B2E170); /* -ApiStatus N(func_80241D00_B2E170)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241D00_B2E170)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -277,7 +277,7 @@ ApiStatus N(func_80241D00_B2E170)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241D84_B2E1F4); /* -ApiStatus N(func_80241D84_B2E1F4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241D84_B2E1F4)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -313,7 +313,7 @@ ApiStatus N(func_80241D84_B2E1F4)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241F9C_B2E40C); /* -ApiStatus N(func_80241F9C_B2E40C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241F9C_B2E40C)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -341,7 +341,7 @@ ApiStatus N(func_80241F9C_B2E40C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242050_B2E4C0); /* -ApiStatus N(func_80242050_B2E4C0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242050_B2E4C0)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -349,7 +349,7 @@ ApiStatus N(func_80242050_B2E4C0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242084_B2E4F4); /* -ApiStatus N(func_80242084_B2E4F4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242084_B2E4F4)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -374,7 +374,7 @@ ApiStatus N(func_80242084_B2E4F4)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242104_B2E574); /* -ApiStatus N(func_80242104_B2E574)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242104_B2E574)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -382,7 +382,7 @@ ApiStatus N(func_80242104_B2E574)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_8024211C_B2E58C); /* -ApiStatus N(func_8024211C_B2E58C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024211C_B2E58C)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -390,7 +390,7 @@ ApiStatus N(func_8024211C_B2E58C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242138_B2E5A8); /* -ApiStatus N(func_80242138_B2E5A8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242138_B2E5A8)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -423,7 +423,7 @@ void N(func_8024260C_B2EA7C)(void) { INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242678_B2EAE8); /* -ApiStatus N(func_80242678_B2EAE8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242678_B2EAE8)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index 675d55048f..b57c275e65 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -49,7 +49,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802405EC_B351BC); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802411B4_B35D84); /* -ApiStatus N(func_802411B4_B35D84)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411B4_B35D84)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -162,7 +162,7 @@ static char* N(exit_str_4) = "tik_08"; INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802419D8_B365A8); /* -ApiStatus N(func_802419D8_B365A8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802419D8_B365A8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -181,7 +181,7 @@ ApiStatus N(func_802419D8_B365A8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241A2C_B365FC); /* -ApiStatus N(func_80241A2C_B365FC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241A2C_B365FC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80247448_B3C018) = get_variable(script, *args); @@ -192,7 +192,7 @@ ApiStatus N(func_80241A2C_B365FC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241A64_B36634); /* -ApiStatus N(func_80241A64_B36634)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241A64_B36634)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -214,7 +214,7 @@ ApiStatus N(func_80241A64_B36634)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241B00_B366D0); /* -ApiStatus N(func_80241B00_B366D0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241B00_B366D0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -236,7 +236,7 @@ ApiStatus N(func_80241B00_B366D0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241B9C_B3676C); /* -ApiStatus N(func_80241B9C_B3676C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241B9C_B3676C)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80247764_B3C334) == NULL) { @@ -261,7 +261,7 @@ ApiStatus N(func_80241B9C_B3676C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241CD8_B368A8); /* -ApiStatus N(func_80241CD8_B368A8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241CD8_B368A8)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -323,7 +323,7 @@ ApiStatus N(func_80241CD8_B368A8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242288_B36E58); /* -ApiStatus N(func_80242288_B36E58)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242288_B36E58)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -344,7 +344,7 @@ ApiStatus N(func_80242288_B36E58)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_8024230C_B36EDC); /* -ApiStatus N(func_8024230C_B36EDC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024230C_B36EDC)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -380,7 +380,7 @@ ApiStatus N(func_8024230C_B36EDC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242524_B370F4); /* -ApiStatus N(func_80242524_B370F4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242524_B370F4)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -408,7 +408,7 @@ ApiStatus N(func_80242524_B370F4)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802425D8_B371A8); /* -ApiStatus N(func_802425D8_B371A8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802425D8_B371A8)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -416,7 +416,7 @@ ApiStatus N(func_802425D8_B371A8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_8024260C_B371DC); /* -ApiStatus N(func_8024260C_B371DC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024260C_B371DC)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -441,7 +441,7 @@ ApiStatus N(func_8024260C_B371DC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_8024268C_B3725C); /* -ApiStatus N(func_8024268C_B3725C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024268C_B3725C)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -449,7 +449,7 @@ ApiStatus N(func_8024268C_B3725C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802426A4_B37274); /* -ApiStatus N(func_802426A4_B37274)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802426A4_B37274)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -457,7 +457,7 @@ ApiStatus N(func_802426A4_B37274)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802426C0_B37290); /* -ApiStatus N(func_802426C0_B37290)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802426C0_B37290)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -490,7 +490,7 @@ void N(func_80242B94_B37764)(void) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242C00_B377D0); /* -ApiStatus N(func_80242C00_B377D0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242C00_B377D0)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -502,7 +502,7 @@ ApiStatus N(func_80242C00_B377D0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242EAC_B37A7C); /* -ApiStatus N(func_80242EAC_B37A7C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242EAC_B37A7C)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -513,7 +513,7 @@ ApiStatus N(func_80242EAC_B37A7C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242EF0_B37AC0); /* -ApiStatus N(func_80242EF0_B37AC0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242EF0_B37AC0)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_jan/jan_04/B44AC0.c b/src/world/area_jan/jan_04/B44AC0.c index ddc5423185..b9b866637b 100644 --- a/src/world/area_jan/jan_04/B44AC0.c +++ b/src/world/area_jan/jan_04/B44AC0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_04/B44AC0", func_80240350_B44AC0); /* -ApiStatus N(func_80240350_B44AC0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240350_B44AC0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241800_B45F70) == NULL) { diff --git a/src/world/area_jan/jan_05/B4B260.c b/src/world/area_jan/jan_05/B4B260.c index c77eea7d44..7f36349b21 100644 --- a/src/world/area_jan/jan_05/B4B260.c +++ b/src/world/area_jan/jan_05/B4B260.c @@ -42,7 +42,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_05/B4B260", func_80241494_B4BF04); #include "world/common/foliage.inc.c" #define NAMESPACE jan_05 -ApiStatus func_8024268C_B4D0FC(ScriptInstance* script) { +ApiStatus func_8024268C_B4D0FC(Evt* script) { if (get_enemy_safe(0) == NULL) { script->varTable[0] = FALSE; } else { diff --git a/src/world/area_jan/jan_06/B52B40.c b/src/world/area_jan/jan_06/B52B40.c index 8f37bafed4..6bb6004260 100644 --- a/src/world/area_jan/jan_06/B52B40.c +++ b/src/world/area_jan/jan_06/B52B40.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_06/B52B40", func_80240310_B52B40); /* -ApiStatus N(func_80240310_B52B40)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240310_B52B40)(Evt *script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; script->functionTemp[0] = get_variable(script, *args++); diff --git a/src/world/area_jan/jan_08/B5E910.c b/src/world/area_jan/jan_08/B5E910.c index 2bb306291c..864be85b24 100644 --- a/src/world/area_jan/jan_08/B5E910.c +++ b/src/world/area_jan/jan_08/B5E910.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_08/B5E910", func_8024069C_B5E94C); /* -ApiStatus N(func_8024069C_B5E94C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024069C_B5E94C)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_08/B5E910", func_8024082C_B5EADC); INCLUDE_ASM(s32, "world/area_jan/jan_08/B5E910", func_80240C60_B5EF10); /* -ApiStatus N(func_80240C60_B5EF10)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240C60_B5EF10)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_jan/jan_22/B84180.c b/src/world/area_jan/jan_22/B84180.c index a26f8c45ee..72dcf20fed 100644 --- a/src/world/area_jan/jan_22/B84180.c +++ b/src/world/area_jan/jan_22/B84180.c @@ -29,7 +29,7 @@ static char* N(exit_str_3) = ""; INCLUDE_ASM(s32, "world/area_jan/jan_22/B84180", func_80240B94_B84D14); /* -ApiStatus N(func_80240B94_B84D14)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B94_B84D14)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -116,7 +116,7 @@ ApiStatus N(func_80240B94_B84D14)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_jan/jan_22/B84180", func_80240E90_B85010); /* -ApiStatus N(func_80240E90_B85010)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240E90_B85010)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802425BC_B8673C) == NULL) { @@ -141,7 +141,7 @@ ApiStatus N(func_80240E90_B85010)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnsetCamera0Flag1000.inc.c" -ApiStatus PostChapter5StatUpdate(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PostChapter5StatUpdate(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; set_max_SP(5); diff --git a/src/world/area_kkj/kkj_00/ABB340.c b/src/world/area_kkj/kkj_00/ABB340.c index a5202e82b3..5a5debb798 100644 --- a/src/world/area_kkj/kkj_00/ABB340.c +++ b/src/world/area_kkj/kkj_00/ABB340.c @@ -24,7 +24,7 @@ INCLUDE_ASM(s32, "world/area_kkj/kkj_00/ABB340", func_80240C44_ABBED4); /* -ApiStatus N(func_80240C44_ABBED4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240C44_ABBED4)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_kkj/kkj_01/AC5170.c b/src/world/area_kkj/kkj_01/AC5170.c index 40e464e822..2e34e3e204 100644 --- a/src/world/area_kkj/kkj_01/AC5170.c +++ b/src/world/area_kkj/kkj_01/AC5170.c @@ -29,7 +29,7 @@ static char* N(exit_str_3) = ""; INCLUDE_ASM(s32, "world/area_kkj/kkj_01/AC5170", func_80240B94_AC5D04); /* -ApiStatus N(func_80240B94_AC5D04)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B94_AC5D04)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_kkj/kkj_17/AF1C60.c b/src/world/area_kkj/kkj_17/AF1C60.c index c3eab364f4..21c4be8fc7 100644 --- a/src/world/area_kkj/kkj_17/AF1C60.c +++ b/src/world/area_kkj/kkj_17/AF1C60.c @@ -5,7 +5,7 @@ static char* N(exit_str_1) = ""; INCLUDE_ASM(s32, "world/area_kkj/kkj_17/AF1C60", func_80240000_AF1C60); /* -ApiStatus N(func_80240000_AF1C60)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_AF1C60)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802408C0_AF2520) == NULL) { diff --git a/src/world/area_kkj/kkj_18/AF2FE0.c b/src/world/area_kkj/kkj_18/AF2FE0.c index a30bd3a56c..56a02483a4 100644 --- a/src/world/area_kkj/kkj_18/AF2FE0.c +++ b/src/world/area_kkj/kkj_18/AF2FE0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_8024056C_AF320C); /* -ApiStatus N(func_8024056C_AF320C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024056C_AF320C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -25,7 +25,7 @@ ApiStatus N(func_8024056C_AF320C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_802405C0_AF3260); /* -ApiStatus N(func_802405C0_AF3260)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405C0_AF3260)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80241F14_AF4BB4) = get_variable(script, *args); @@ -36,7 +36,7 @@ ApiStatus N(func_802405C0_AF3260)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_802405F8_AF3298); /* -ApiStatus N(func_802405F8_AF3298)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405F8_AF3298)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -58,7 +58,7 @@ ApiStatus N(func_802405F8_AF3298)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_80240694_AF3334); /* -ApiStatus N(func_80240694_AF3334)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240694_AF3334)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_kkj/kkj_19/AF7C00.c b/src/world/area_kkj/kkj_19/AF7C00.c index 1e377afb4a..da23445fb7 100644 --- a/src/world/area_kkj/kkj_19/AF7C00.c +++ b/src/world/area_kkj/kkj_19/AF7C00.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_802404DC_AF7E2C); /* -ApiStatus N(func_802404DC_AF7E2C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802404DC_AF7E2C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -25,7 +25,7 @@ ApiStatus N(func_802404DC_AF7E2C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_80240530_AF7E80); /* -ApiStatus N(func_80240530_AF7E80)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240530_AF7E80)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80241B14_AF9464) = get_variable(script, *args); @@ -36,7 +36,7 @@ ApiStatus N(func_80240530_AF7E80)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_80240568_AF7EB8); /* -ApiStatus N(func_80240568_AF7EB8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240568_AF7EB8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -58,7 +58,7 @@ ApiStatus N(func_80240568_AF7EB8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_80240604_AF7F54); /* -ApiStatus N(func_80240604_AF7F54)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240604_AF7F54)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_kkj/kkj_20/AFDB40.c b/src/world/area_kkj/kkj_20/AFDB40.c index 1b4955760c..d0983ee7b9 100644 --- a/src/world/area_kkj/kkj_20/AFDB40.c +++ b/src/world/area_kkj/kkj_20/AFDB40.c @@ -5,7 +5,7 @@ static char* N(exit_str_1) = ""; INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDB40", func_80240000_AFDB40); /* -ApiStatus N(func_80240000_AFDB40)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_AFDB40)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80240880_AFE3C0) == NULL) { diff --git a/src/world/area_kmr/kmr_00/8ABF90.c b/src/world/area_kmr/kmr_00/8ABF90.c index 74c4e4a201..5f3c226279 100644 --- a/src/world/area_kmr/kmr_00/8ABF90.c +++ b/src/world/area_kmr/kmr_00/8ABF90.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_00/8ABF90", func_80240000_8ABF90); INCLUDE_ASM(s32, "world/area_kmr/kmr_00/8ABF90", func_80240388_8AC318); -ApiStatus func_802403B8_8AC348(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802403B8_8AC348(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); @@ -20,38 +20,38 @@ ApiStatus func_802403B8_8AC348(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802404A0_8AC430(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802404A0_8AC430(Evt* script, s32 isInitialCall) { playFX_52(4, 0.0f, 0.0f, 0.0f, 0.3f, 30); return ApiStatus_DONE2; } INCLUDE_ASM(s32, "world/area_kmr/kmr_00/8ABF90", func_802404E8_8AC478); -ApiStatus func_80240530_8AC4C0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240530_8AC4C0(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(get_variable(script, *script->ptrReadPos)); playFX_11(3, npc->pos.x, npc->pos.y + 10.0f, npc->pos.z, 10.0f); return ApiStatus_DONE2; } -ApiStatus func_80240584_8AC514(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240584_8AC514(Evt* script, s32 isInitialCall) { func_8005553C(0, 2000); return ApiStatus_DONE2; } -ApiStatus func_802405A8_8AC538(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802405A8_8AC538(Evt* script, s32 isInitialCall) { func_80055590(0, 2000); return ApiStatus_DONE2; } -ApiStatus func_802405CC_8AC55C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802405CC_8AC55C(Evt* script, s32 isInitialCall) { func_800554E8(0, 1000); return ApiStatus_DONE2; } INCLUDE_ASM(s32, "world/area_kmr/kmr_00/8ABF90", func_802405F0_8AC580); -ApiStatus func_80240BD8_8ACB68(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240BD8_8ACB68(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Npc* npc; diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index 8cd8ba522b..021bb7b55c 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -25,7 +25,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240370_8B03E0); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240390_8B0400); /* -ApiStatus N(func_80240390_8B0400)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240390_8B0400)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802455D0_8B5640) == NULL) { @@ -50,7 +50,7 @@ ApiStatus N(func_80240390_8B0400)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802404CC_8B053C); /* -ApiStatus N(func_802404CC_8B053C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802404CC_8B053C)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -112,7 +112,7 @@ ApiStatus N(func_802404CC_8B053C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240A7C_8B0AEC); /* -ApiStatus N(func_80240A7C_8B0AEC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240A7C_8B0AEC)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -133,7 +133,7 @@ ApiStatus N(func_80240A7C_8B0AEC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240B00_8B0B70); /* -ApiStatus N(func_80240B00_8B0B70)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240B00_8B0B70)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -169,7 +169,7 @@ ApiStatus N(func_80240B00_8B0B70)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240D18_8B0D88); /* -ApiStatus N(func_80240D18_8B0D88)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240D18_8B0D88)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -197,7 +197,7 @@ ApiStatus N(func_80240D18_8B0D88)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240DCC_8B0E3C); /* -ApiStatus N(func_80240DCC_8B0E3C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240DCC_8B0E3C)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -205,7 +205,7 @@ ApiStatus N(func_80240DCC_8B0E3C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240E00_8B0E70); /* -ApiStatus N(func_80240E00_8B0E70)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240E00_8B0E70)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -230,7 +230,7 @@ ApiStatus N(func_80240E00_8B0E70)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240E80_8B0EF0); /* -ApiStatus N(func_80240E80_8B0EF0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240E80_8B0EF0)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -238,7 +238,7 @@ ApiStatus N(func_80240E80_8B0EF0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240E98_8B0F08); /* -ApiStatus N(func_80240E98_8B0F08)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240E98_8B0F08)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -246,7 +246,7 @@ ApiStatus N(func_80240E98_8B0F08)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240EB4_8B0F24); /* -ApiStatus N(func_80240EB4_8B0F24)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240EB4_8B0F24)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -279,7 +279,7 @@ void N(func_80241388_8B13F8)(void) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802413F4_8B1464); /* -ApiStatus N(func_802413F4_8B1464)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802413F4_8B1464)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -319,7 +319,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80242014_8B2084); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_8024226C_8B22DC); /* -ApiStatus N(func_8024226C_8B22DC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024226C_8B22DC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -338,7 +338,7 @@ ApiStatus N(func_8024226C_8B22DC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802422C0_8B2330); /* -ApiStatus N(func_802422C0_8B2330)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802422C0_8B2330)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80247E34_8B7EA4) = get_variable(script, *args); @@ -349,7 +349,7 @@ ApiStatus N(func_802422C0_8B2330)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802422F8_8B2368); /* -ApiStatus N(func_802422F8_8B2368)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802422F8_8B2368)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -377,7 +377,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80242394_8B2404); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802426A0_8B2710); /* -ApiStatus N(func_802426A0_8B2710)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802426A0_8B2710)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -388,7 +388,7 @@ ApiStatus N(func_802426A0_8B2710)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802426E4_8B2754); /* -ApiStatus N(func_802426E4_8B2754)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802426E4_8B2754)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_kmr/kmr_02/8B3A10.c b/src/world/area_kmr/kmr_02/8B3A10.c index 984176beb3..cb5e6c0141 100644 --- a/src/world/area_kmr/kmr_02/8B3A10.c +++ b/src/world/area_kmr/kmr_02/8B3A10.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B3A10", func_802439A0_8B3A10); /* -ApiStatus N(func_802439A0_8B3A10)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802439A0_8B3A10)(Evt *script, s32 isInitialCall) { s32 var; void* temp_s0 = load_asset_by_name("party_pokopi", &var); diff --git a/src/world/area_kmr/kmr_03/8C7F90.c b/src/world/area_kmr/kmr_03/8C7F90.c index 6ff6263718..508532225d 100644 --- a/src/world/area_kmr/kmr_03/8C7F90.c +++ b/src/world/area_kmr/kmr_03/8C7F90.c @@ -20,6 +20,6 @@ MapConfig N(config) = { .tattle = { MSG_kmr_03_tattle }, }; -Script N(802406C0) = SCRIPT({ +EvtSource N(802406C0) = SCRIPT({ SetMusicTrack(0, SONG_PLEASANT_PATH, 0, 8); }); diff --git a/src/world/area_kmr/kmr_03/8C8140.c b/src/world/area_kmr/kmr_03/8C8140.c index ecbacc0dbb..e77d42b544 100644 --- a/src/world/area_kmr/kmr_03/8C8140.c +++ b/src/world/area_kmr/kmr_03/8C8140.c @@ -5,7 +5,7 @@ enum { NPC_GOOMPA, }; -ApiStatus N(func_802401B0_8C8140)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802401B0_8C8140)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(0); script->varTable[1] = get_xz_dist_to_player(npc->pos.x, npc->pos.z) / npc->moveSpeed * 0.8f; @@ -14,16 +14,16 @@ ApiStatus N(func_802401B0_8C8140)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/UnkPositionFunc.inc.c" -Script N(exitWalk_802406F0) = EXIT_WALK_SCRIPT(60, 0, "kmr_04", 0); +EvtSource N(exitWalk_802406F0) = EXIT_WALK_SCRIPT(60, 0, "kmr_04", 0); -Script N(exitWalk_8024074C) = EXIT_WALK_SCRIPT(60, 1, "kmr_05", 0); +EvtSource N(exitWalk_8024074C) = EXIT_WALK_SCRIPT(60, 1, "kmr_05", 0); -Script N(802407A8) = SCRIPT({ +EvtSource N(802407A8) = SCRIPT({ bind N(exitWalk_802406F0) TRIGGER_FLOOR_ABOVE 3; bind N(exitWalk_8024074C) TRIGGER_FLOOR_ABOVE 5; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_GOOMBA_VILLAGE; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -58,7 +58,7 @@ NpcSettings N(npcSettings_80240950) = { .unk_2A = 16, }; -Script N(8024097C) = SCRIPT({ +EvtSource N(8024097C) = SCRIPT({ 1: if (SI_AREA_FLAG(8) == 1) { 100: @@ -87,7 +87,7 @@ Script N(8024097C) = SCRIPT({ goto 1; }); -Script N(npcAI_80240B50) = SCRIPT({ +EvtSource N(npcAI_80240B50) = SCRIPT({ 1: match SI_STORY_PROGRESS { == STORY_CH0_FELL_OFF_CLIFF { @@ -144,7 +144,7 @@ Script N(npcAI_80240B50) = SCRIPT({ } }); -Script N(hit_80240F64) = SCRIPT({ +EvtSource N(hit_80240F64) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM(goompa, Palette_00, Anim_7)); sleep 10; SetNpcAnimation(NPC_SELF, NPC_ANIM(goompa, Palette_00, Anim_1)); @@ -184,7 +184,7 @@ Script N(hit_80240F64) = SCRIPT({ } }); -Script N(init_802411A8) = SCRIPT({ +EvtSource N(init_802411A8) = SCRIPT({ BindNpcIdle(NPC_SELF, N(npcAI_80240B50)); BindNpcAux(-1, N(8024097C)); BindNpcHit(-1, N(hit_80240F64)); @@ -237,16 +237,16 @@ static s32 N(pad_1468)[] = { 0x00000000, 0x00000000, }; -Script N(80241470) = SCRIPT({ +EvtSource N(80241470) = SCRIPT({ ModifyColliderFlags(0, 9, 0x7FFFFE00); SI_STORY_PROGRESS = STORY_CH0_LEFT_THE_PLAYGROUND; }); -Script N(802414A8) = SCRIPT({ +EvtSource N(802414A8) = SCRIPT({ SI_SAVE_FLAG(54) = 1; }); -Script N(802414C8) = SCRIPT({ +EvtSource N(802414C8) = SCRIPT({ 0: GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetCamTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -254,7 +254,7 @@ Script N(802414C8) = SCRIPT({ goto 0; }); -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ if (SI_STORY_PROGRESS < STORY_CH0_LEFT_THE_PLAYGROUND) { MakeEntity(0x802EA10C, 45, 0, 70, 15, MAKE_ENTITY_END); AssignScript(N(80241470)); diff --git a/src/world/area_kmr/kmr_03/8C82B0.c b/src/world/area_kmr/kmr_03/8C82B0.c index ce304cc3f9..025e772ad5 100644 --- a/src/world/area_kmr/kmr_03/8C82B0.c +++ b/src/world/area_kmr/kmr_03/8C82B0.c @@ -4,7 +4,7 @@ #include "world/common/SetCamera0MoveFlag1.inc.c" -ApiStatus func_80240358_8C82E8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240358_8C82E8(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; f32 xDelta = playerStatus->currentSpeed * 5.0f * sin_deg(playerStatus->targetYaw); diff --git a/src/world/area_kmr/kmr_03/8C83A0.c b/src/world/area_kmr/kmr_03/8C83A0.c index fb503c776c..757f245e69 100644 --- a/src/world/area_kmr/kmr_03/8C83A0.c +++ b/src/world/area_kmr/kmr_03/8C83A0.c @@ -37,7 +37,7 @@ FoliageVectorList N(treeEffectVectors_Tree1) = { }, }; -Script N(tree1_Callback) = SCRIPT({ +EvtSource N(tree1_Callback) = SCRIPT({ if (SI_SAVE_FLAG(53) == TRUE) { return; } @@ -63,7 +63,7 @@ ShakeTreeConfig N(tree1) = { Vec4f N(tree1Point) = { -42.0f, 0.0f, -13.0f, 0.0f }; -Script N(802422B8) = SCRIPT({ +EvtSource N(802422B8) = SCRIPT({ SI_VAR(0) = N(bush1); bind N(searchBush) TRIGGER_WALL_PRESS_A 53; diff --git a/src/world/area_kmr/kmr_03/8C85E0.c b/src/world/area_kmr/kmr_03/8C85E0.c index 150d1e472d..edac445977 100644 --- a/src/world/area_kmr/kmr_03/8C85E0.c +++ b/src/world/area_kmr/kmr_03/8C85E0.c @@ -1,6 +1,6 @@ #include "kmr_03.h" -Script N(80242340) = SCRIPT({ +EvtSource N(80242340) = SCRIPT({ UseSettingsFrom(0, -270, 20, -80); SetPanTarget(0, -270, 20, -80); SetCamDistance(0, 700.0); diff --git a/src/world/area_kmr/kmr_03/kmr_03.h b/src/world/area_kmr/kmr_03/kmr_03.h index 0dfcb3513c..4607d22c8a 100644 --- a/src/world/area_kmr/kmr_03/kmr_03.h +++ b/src/world/area_kmr/kmr_03/kmr_03.h @@ -4,13 +4,13 @@ #define NAMESPACE kmr_03 -ApiStatus N(UnkPositionFunc)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(UnkFunc41)(ScriptInstance* script, s32 isInitialCall); -ApiStatus N(func_802401B0_8C8140)(ScriptInstance* script, s32 isInitialCall); +ApiStatus N(UnkPositionFunc)(Evt* script, s32 isInitialCall); +ApiStatus N(UnkFunc41)(Evt* script, s32 isInitialCall); +ApiStatus N(func_802401B0_8C8140)(Evt* script, s32 isInitialCall); extern NpcGroupList N(npcGroupList_80241450); -extern Script N(802422B8); -extern Script N(80242340); -extern Script N(802406C0); -extern Script N(main); -extern Script N(makeEntities); +extern EvtSource N(802422B8); +extern EvtSource N(80242340); +extern EvtSource N(802406C0); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_kmr/kmr_04/8CA900.c b/src/world/area_kmr/kmr_04/8CA900.c index e9ff14a80b..7319c5c954 100644 --- a/src/world/area_kmr/kmr_04/8CA900.c +++ b/src/world/area_kmr/kmr_04/8CA900.c @@ -5,7 +5,7 @@ static char* N(exit_str_1) = ""; #include "world/common/CheckPartnerFlags1000.inc.c" -ApiStatus N(func_8024002C_8CA92C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024002C_8CA92C)(Evt* script, s32 isInitialCall) { script->varTable[0] = get_player_data()->curHP; return ApiStatus_DONE2; diff --git a/src/world/area_kmr/kmr_04/8CA960.c b/src/world/area_kmr/kmr_04/8CA960.c index fa322c4f44..1c36e23391 100644 --- a/src/world/area_kmr/kmr_04/8CA960.c +++ b/src/world/area_kmr/kmr_04/8CA960.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_04/8CA960", func_802402C8_8CABC8); /* -ApiStatus N(func_802402C8_8CABC8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802402C8_8CABC8)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802429F4_8CD2F4) == NULL) { @@ -31,13 +31,13 @@ ApiStatus N(func_802402C8_8CABC8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kmr/kmr_04/8CA960", func_802403E0_8CACE0); -ApiStatus N(func_80240434_8CAD34)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240434_8CAD34)(Evt* script, s32 isInitialCall) { gPlayerData.hammerLevel = 0; return ApiStatus_DONE2; } -ApiStatus N(func_80240444_8CAD44)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240444_8CAD44)(Evt* script, s32 isInitialCall) { exec_entity_commandlist(get_entity_by_index(script->varTable[0])); return ApiStatus_DONE2; diff --git a/src/world/area_kmr/kmr_05/8CE070.c b/src/world/area_kmr/kmr_05/8CE070.c index 205735f0a1..0401b000d1 100644 --- a/src/world/area_kmr/kmr_05/8CE070.c +++ b/src/world/area_kmr/kmr_05/8CE070.c @@ -15,7 +15,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_05/8CE070", func_802401B0_8CE220); INCLUDE_ASM(s32, "world/area_kmr/kmr_05/8CE070", func_80240C54_8CECC4); /* -void N(func_80240C54_8CECC4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C54_8CECC4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_kmr/kmr_05/8CF570.c b/src/world/area_kmr/kmr_05/8CF570.c index 186c428043..7325630b3c 100644 --- a/src/world/area_kmr/kmr_05/8CF570.c +++ b/src/world/area_kmr/kmr_05/8CF570.c @@ -2,7 +2,7 @@ #include "world/common/foliage.inc.c" -ApiStatus func_8024173C_8CF7AC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024173C_8CF7AC(Evt* script, s32 isInitialCall) { if (get_enemy_safe(6) == NULL) { script->varTable[0] = FALSE; } else { diff --git a/src/world/area_kmr/kmr_06/8D1510.c b/src/world/area_kmr/kmr_06/8D1510.c index a29980e138..0b0bb83eac 100644 --- a/src/world/area_kmr/kmr_06/8D1510.c +++ b/src/world/area_kmr/kmr_06/8D1510.c @@ -15,7 +15,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_06/8D1510", func_802401B0_8D16C0); INCLUDE_ASM(s32, "world/area_kmr/kmr_06/8D1510", func_80240C54_8D2164); /* -void N(func_80240C54_8D2164)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C54_8D2164)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_kmr/kmr_06/8D2A10.c b/src/world/area_kmr/kmr_06/8D2A10.c index 3dec6d5904..e2cd20fb44 100644 --- a/src/world/area_kmr/kmr_06/8D2A10.c +++ b/src/world/area_kmr/kmr_06/8D2A10.c @@ -14,7 +14,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_06/8D2A10", func_80241A68_8D2F78); INCLUDE_ASM(s32, "world/area_kmr/kmr_06/8D2A10", func_80241C78_8D3188); -ApiStatus func_80241CC8_8D31D8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80241CC8_8D31D8(Evt* script, s32 isInitialCall) { // todo use correct types s32* mapVar10 = get_variable(script, SI_MAP_VAR(10)); s32 mapVar11 = get_variable(script, SI_MAP_VAR(11)); diff --git a/src/world/area_kmr/kmr_07/8D3DC0.c b/src/world/area_kmr/kmr_07/8D3DC0.c index 0bc833ae4e..fabc2e33ea 100644 --- a/src/world/area_kmr/kmr_07/8D3DC0.c +++ b/src/world/area_kmr/kmr_07/8D3DC0.c @@ -25,7 +25,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_07/8D3DC0", func_802407F4_8D45B4); // see func_802402BC_8D878C #ifdef NON_MATCHING -ApiStatus func_80240A6C_8D482C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240A6C_8D482C(Evt* script, s32 isInitialCall) { Entity* entity = get_entity_by_index(get_variable(NULL, SI_MAP_VAR(0))); if (entity == NULL) { diff --git a/src/world/area_kmr/kmr_09/8D5E00.c b/src/world/area_kmr/kmr_09/8D5E00.c index cb3a0c46b3..7f30a41366 100644 --- a/src/world/area_kmr/kmr_09/8D5E00.c +++ b/src/world/area_kmr/kmr_09/8D5E00.c @@ -15,7 +15,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_09/8D5E00", func_802401B0_8D5FB0); INCLUDE_ASM(s32, "world/area_kmr/kmr_09/8D5E00", func_80240C54_8D6A54); /* -void N(func_80240C54_8D6A54)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240C54_8D6A54)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -36,7 +36,7 @@ void N(func_80240C54_8D6A54)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_kmr/kmr_09/8D5E00", func_8024130C_8D710C); /* -ApiStatus N(func_8024130C_8D710C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024130C_8D710C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -97,7 +97,7 @@ ApiStatus N(func_8024130C_8D710C)(ScriptInstance* script, s32 isInitialCall) { } */ -ApiStatus func_802414F8_8D72F8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802414F8_8D72F8(Evt* script, s32 isInitialCall) { script->varTable[0] = get_enemy_safe(2); return ApiStatus_DONE2; diff --git a/src/world/area_kmr/kmr_10/8D84D0.c b/src/world/area_kmr/kmr_10/8D84D0.c index b27b46f4b6..c02c8ac83e 100644 --- a/src/world/area_kmr/kmr_10/8D84D0.c +++ b/src/world/area_kmr/kmr_10/8D84D0.c @@ -5,7 +5,7 @@ static char* N(exit_str_1) = "mac_00"; INCLUDE_ASM(s32, "world/area_kmr/kmr_10/8D84D0", func_80240000_8D84D0); /* -ApiStatus N(func_80240000_8D84D0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_8D84D0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80240C20_8D90F0) == NULL) { @@ -33,7 +33,7 @@ ApiStatus N(func_80240000_8D84D0)(ScriptInstance* script, s32 isInitialCall) { #ifdef NON_MATCHING // 0x1E4 is probably a linker constant. We need to learn more about animations, // play_model_animation, and entity->unk_14 before we can tackle this -ApiStatus func_802402BC_8D878C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802402BC_8D878C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Entity* entity = get_entity_by_index(get_variable(script, *args++)); diff --git a/src/world/area_kmr/kmr_11/8DAFC0.c b/src/world/area_kmr/kmr_11/8DAFC0.c index 0ca706c981..ba6ecb714d 100644 --- a/src/world/area_kmr/kmr_11/8DAFC0.c +++ b/src/world/area_kmr/kmr_11/8DAFC0.c @@ -1,6 +1,6 @@ #include "kmr_11.h" -ApiStatus func_80240EC0_8DAFC0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240EC0_8DAFC0(Evt* script, s32 isInitialCall) { Entity* entity = get_entity_by_index(script->varTable[10]); entity->position.x = script->varTable[0]; diff --git a/src/world/area_kmr/kmr_12/events.c b/src/world/area_kmr/kmr_12/events.c index 8de249afd0..dc05b46df3 100644 --- a/src/world/area_kmr/kmr_12/events.c +++ b/src/world/area_kmr/kmr_12/events.c @@ -2,15 +2,15 @@ #include "message_ids.h" #include "sprite/npc/goomba.h" -Script N(ExitWest) = EXIT_WALK_SCRIPT(60, 0, "kmr_07", 1); -Script N(ExitEast) = EXIT_WALK_SCRIPT(60, 1, "kmr_11", 0); +EvtSource N(ExitWest) = EXIT_WALK_SCRIPT(60, 0, "kmr_07", 1); +EvtSource N(ExitEast) = EXIT_WALK_SCRIPT(60, 1, "kmr_11", 0); -Script N(BindExits) = SCRIPT({ +EvtSource N(BindExits) = SCRIPT({ bind N(ExitWest) TRIGGER_FLOOR_ABOVE 0; // deili1 bind N(ExitEast) TRIGGER_FLOOR_ABOVE 3; // deili2 }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_GOOMBA_ROAD; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); @@ -40,7 +40,7 @@ NpcAISettings N(goombaAISettings) = { .unk_2C = TRUE, }; -Script N(GoombaAI) = SCRIPT({ +EvtSource N(GoombaAI) = SCRIPT({ DoBasicAI(N(goombaAISettings)); }); @@ -54,7 +54,7 @@ NpcSettings N(goombaNpcSettings) = { }; /// @bug Never returns -Script N(ReadWestSign) = SCRIPT({ +EvtSource N(ReadWestSign) = SCRIPT({ group 0; // "Eat a Mushroom to regain your energy!" @@ -83,7 +83,7 @@ Script N(ReadWestSign) = SCRIPT({ return; }); -Script N(GoombaIdle) = SCRIPT({ +EvtSource N(GoombaIdle) = SCRIPT({ sleep 1; SetSelfVar(0, FALSE); @@ -139,7 +139,7 @@ Script N(GoombaIdle) = SCRIPT({ BindNpcAI(NPC_SELF, N(GoombaAI)); }); -Script N(GoombaInit) = SCRIPT({ +EvtSource N(GoombaInit) = SCRIPT({ BindNpcIdle(NPC_SELF, N(GoombaIdle)); }); @@ -194,7 +194,7 @@ NpcGroupList N(npcGroupList) = { {}, }; -Script N(ReadEastSign) = SCRIPT({ +EvtSource N(ReadEastSign) = SCRIPT({ IsStartingConversation($a); if ($a == 1) { return; @@ -209,7 +209,7 @@ Script N(ReadEastSign) = SCRIPT({ SetTimeFreezeMode(0); }); -Script N(MakeEntities) = SCRIPT({ +EvtSource N(MakeEntities) = SCRIPT({ MakeEntity(0x802EAFDC, 436, 0, -42, 0, MAKE_ENTITY_END); AssignScript(N(ReadEastSign)); }); diff --git a/src/world/area_kmr/kmr_12/header.c b/src/world/area_kmr/kmr_12/header.c index 37bc89bd35..fca0e5b1cc 100644 --- a/src/world/area_kmr/kmr_12/header.c +++ b/src/world/area_kmr/kmr_12/header.c @@ -14,11 +14,11 @@ MapConfig N(config) = { .tattle = { MSG_kmr_12_tattle }, }; -Script N(PlayMusic) = SCRIPT({ +EvtSource N(PlayMusic) = SCRIPT({ SetMusicTrack(0, SONG_PLEASANT_PATH, 0, 8); }); -ApiStatus GetGoomba(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetGoomba(Evt* script, s32 isInitialCall) { script->varTable[0] = get_enemy_safe(NPC_GOOMBA); return ApiStatus_DONE2; } diff --git a/src/world/area_kmr/kmr_12/kmr_12.h b/src/world/area_kmr/kmr_12/kmr_12.h index b675cbfdf7..e18a4362c4 100644 --- a/src/world/area_kmr/kmr_12/kmr_12.h +++ b/src/world/area_kmr/kmr_12/kmr_12.h @@ -7,11 +7,11 @@ #define NPC_GOOMBA 0 #define GetGoomba N(GetGoomba) -ApiStatus GetGoomba(ScriptInstance* script, s32 isInitialCall); +ApiStatus GetGoomba(Evt* script, s32 isInitialCall); extern MapConfig N(config); -extern Script N(main); -extern Script N(PlayMusic); -extern Script N(MakeEntities); -extern Script N(ReadWestSign); +extern EvtSource N(main); +extern EvtSource N(PlayMusic); +extern EvtSource N(MakeEntities); +extern EvtSource N(ReadWestSign); extern NpcGroupList N(npcGroupList); diff --git a/src/world/area_kmr/kmr_20/8ED440.c b/src/world/area_kmr/kmr_20/8ED440.c index 5f42c9718d..9a64f8a0ed 100644 --- a/src/world/area_kmr/kmr_20/8ED440.c +++ b/src/world/area_kmr/kmr_20/8ED440.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED440", func_80241620_8ED440); /* -ApiStatus N(func_80241620_8ED440)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241620_8ED440)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_8024A908_8F6728) == NULL) { diff --git a/src/world/area_kpa/kpa_12/A54CA0.c b/src/world/area_kpa/kpa_12/A54CA0.c index 1b350197b3..a933924c98 100644 --- a/src/world/area_kpa/kpa_12/A54CA0.c +++ b/src/world/area_kpa/kpa_12/A54CA0.c @@ -1,6 +1,6 @@ #include "kpa_12.h" -ApiStatus N(func_80240350_A54CA0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240350_A54CA0)(Evt* script, s32 isInitialCall) { CollisionStatus* collisionStatus = &gCollisionStatus; set_variable(script, *script->ptrReadPos, collisionStatus->floorBelow); diff --git a/src/world/area_kpa/kpa_13/A56270.c b/src/world/area_kpa/kpa_13/A56270.c index 2c8a79fb82..8ae37b5433 100644 --- a/src/world/area_kpa/kpa_13/A56270.c +++ b/src/world/area_kpa/kpa_13/A56270.c @@ -1,6 +1,6 @@ #include "kpa_13.h" -ApiStatus N(func_80240350_A56270)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240350_A56270)(Evt* script, s32 isInitialCall) { CollisionStatus* collisionStatus = &gCollisionStatus; set_variable(script, *script->ptrReadPos, collisionStatus->floorBelow); diff --git a/src/world/area_kpa/kpa_14/A57830.c b/src/world/area_kpa/kpa_14/A57830.c index dd304a9a58..49b0d41952 100644 --- a/src/world/area_kpa/kpa_14/A57830.c +++ b/src/world/area_kpa/kpa_14/A57830.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_14/A57830", func_80240380_A57830); /* -ApiStatus N(func_80240380_A57830)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240380_A57830)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241900_A58DB0) == NULL) { @@ -31,7 +31,7 @@ ApiStatus N(func_80240380_A57830)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/GetEntityPosition.inc.c" -ApiStatus N(func_80240710_A57BC0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240710_A57BC0)(Evt* script, s32 isInitialCall) { CollisionStatus* collisionStatus = &gCollisionStatus; set_variable(script, *script->ptrReadPos, collisionStatus->floorBelow); diff --git a/src/world/area_kpa/kpa_15/A596A0.c b/src/world/area_kpa/kpa_15/A596A0.c index 18bc1f4f68..9f7caf7190 100644 --- a/src/world/area_kpa/kpa_15/A596A0.c +++ b/src/world/area_kpa/kpa_15/A596A0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_15/A596A0", func_80240310_A596A0); /* -ApiStatus N(func_80240310_A596A0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240310_A596A0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80240AA0_A59E30) == NULL) { diff --git a/src/world/area_kpa/kpa_81/A78510.c b/src/world/area_kpa/kpa_81/A78510.c index 831b2f9526..75a0b2b066 100644 --- a/src/world/area_kpa/kpa_81/A78510.c +++ b/src/world/area_kpa/kpa_81/A78510.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_8024027C_A7873C); /* -ApiStatus N(func_8024027C_A7873C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024027C_A7873C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -25,7 +25,7 @@ ApiStatus N(func_8024027C_A7873C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_802402D0_A78790); /* -ApiStatus N(func_802402D0_A78790)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802402D0_A78790)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80240D9C_A7925C) = get_variable(script, *args); @@ -36,7 +36,7 @@ ApiStatus N(func_802402D0_A78790)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_80240308_A787C8); /* -ApiStatus N(func_80240308_A787C8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240308_A787C8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -58,7 +58,7 @@ ApiStatus N(func_80240308_A787C8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_802403A4_A78864); /* -ApiStatus N(func_802403A4_A78864)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802403A4_A78864)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_kpa/kpa_82/A7A550.c b/src/world/area_kpa/kpa_82/A7A550.c index 92dda3197c..c97e2a12c0 100644 --- a/src/world/area_kpa/kpa_82/A7A550.c +++ b/src/world/area_kpa/kpa_82/A7A550.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_8024027C_A7A77C); /* -ApiStatus N(func_8024027C_A7A77C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024027C_A7A77C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -25,7 +25,7 @@ ApiStatus N(func_8024027C_A7A77C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_802402D0_A7A7D0); /* -ApiStatus N(func_802402D0_A7A7D0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802402D0_A7A7D0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80240C24_A7B124) = get_variable(script, *args); @@ -36,7 +36,7 @@ ApiStatus N(func_802402D0_A7A7D0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_80240308_A7A808); /* -ApiStatus N(func_80240308_A7A808)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240308_A7A808)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -58,7 +58,7 @@ ApiStatus N(func_80240308_A7A808)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_802403A4_A7A8A4); /* -ApiStatus N(func_802403A4_A7A8A4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802403A4_A7A8A4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_kpa/kpa_91/A86A50.c b/src/world/area_kpa/kpa_91/A86A50.c index 2653b555c5..ca14561b44 100644 --- a/src/world/area_kpa/kpa_91/A86A50.c +++ b/src/world/area_kpa/kpa_91/A86A50.c @@ -27,7 +27,7 @@ static char* N(exit_str_1) = ""; INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80240B94_A875E4); /* -ApiStatus N(func_80240B94_A875E4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B94_A875E4)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_kpa/kpa_95/A8CB60.c b/src/world/area_kpa/kpa_95/A8CB60.c index ee3781b82e..3b15560939 100644 --- a/src/world/area_kpa/kpa_95/A8CB60.c +++ b/src/world/area_kpa/kpa_95/A8CB60.c @@ -24,7 +24,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80240C74_A8D6F4); /* -ApiStatus N(func_80240C74_A8D6F4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240C74_A8D6F4)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_kzn/kzn_02/C5AC20.c b/src/world/area_kzn/kzn_02/C5AC20.c index 6b05d762df..f1e74bc6bb 100644 --- a/src/world/area_kzn/kzn_02/C5AC20.c +++ b/src/world/area_kzn/kzn_02/C5AC20.c @@ -12,7 +12,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80240690_C5ADD0); INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241134_C5B874); /* -void N(func_80241134_C5B874)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241134_C5B874)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -33,7 +33,7 @@ void N(func_80241134_C5B874)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_802417EC_C5BF2C); /* -ApiStatus N(func_802417EC_C5BF2C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802417EC_C5BF2C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -98,7 +98,7 @@ ApiStatus N(func_802417EC_C5BF2C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241B08_C5C248); /* -void N(func_80241B08_C5C248)(ScriptInstance *script, NpcAISettings *aiSettings, EnemyTerritoryThing *territory) { +void N(func_80241B08_C5C248)(Evt *script, NpcAISettings *aiSettings, EnemyTerritoryThing *territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, y, z, w; @@ -148,7 +148,7 @@ void N(func_80241B08_C5C248)(ScriptInstance *script, NpcAISettings *aiSettings, INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241DE4_C5C524); /* -ApiStatus N(func_80241DE4_C5C524)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241DE4_C5C524)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -213,7 +213,7 @@ static char* N(exit_str_0) = "kzn_02"; INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241FCC_C5C70C); /* -ApiStatus N(func_80241FCC_C5C70C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241FCC_C5C70C)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80244A10_C5F150) == NULL) { @@ -240,7 +240,7 @@ ApiStatus N(func_80241FCC_C5C70C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80242310_C5CA50); /* -ApiStatus N(func_80242310_C5CA50)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242310_C5CA50)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -259,7 +259,7 @@ ApiStatus N(func_80242310_C5CA50)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80242364_C5CAA4); /* -ApiStatus N(func_80242364_C5CAA4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242364_C5CAA4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80244A78_C5F1B8) = get_variable(script, *args); @@ -270,7 +270,7 @@ ApiStatus N(func_80242364_C5CAA4)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_8024239C_C5CADC); /* -ApiStatus N(func_8024239C_C5CADC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024239C_C5CADC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -296,7 +296,7 @@ ApiStatus N(func_8024239C_C5CADC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_802426B4_C5CDF4); /* -ApiStatus N(func_802426B4_C5CDF4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802426B4_C5CDF4)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -307,7 +307,7 @@ ApiStatus N(func_802426B4_C5CDF4)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_802426F8_C5CE38); /* -ApiStatus N(func_802426F8_C5CE38)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802426F8_C5CE38)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_kzn/kzn_03/C61020.c b/src/world/area_kzn/kzn_03/C61020.c index 09aadb2527..0a0a067c5e 100644 --- a/src/world/area_kzn/kzn_03/C61020.c +++ b/src/world/area_kzn/kzn_03/C61020.c @@ -44,7 +44,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024234C_C6305C); INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024259C_C632AC); /* -ApiStatus N(func_8024259C_C632AC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024259C_C632AC)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802441A0_C64EB0) == NULL) { @@ -71,7 +71,7 @@ ApiStatus N(func_8024259C_C632AC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_802428E0_C635F0); /* -ApiStatus N(func_802428E0_C635F0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802428E0_C635F0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -90,7 +90,7 @@ ApiStatus N(func_802428E0_C635F0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80242934_C63644); /* -ApiStatus N(func_80242934_C63644)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242934_C63644)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80244208_C64F18) = get_variable(script, *args); @@ -101,7 +101,7 @@ ApiStatus N(func_80242934_C63644)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024296C_C6367C); /* -ApiStatus N(func_8024296C_C6367C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024296C_C6367C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -127,7 +127,7 @@ ApiStatus N(func_8024296C_C6367C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80242C84_C63994); /* -ApiStatus N(func_80242C84_C63994)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242C84_C63994)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -138,7 +138,7 @@ ApiStatus N(func_80242C84_C63994)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80242CC8_C639D8); /* -ApiStatus N(func_80242CC8_C639D8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242CC8_C639D8)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_kzn/kzn_04/C68440.c b/src/world/area_kzn/kzn_04/C68440.c index c1302e7696..2829db4f8f 100644 --- a/src/world/area_kzn/kzn_04/C68440.c +++ b/src/world/area_kzn/kzn_04/C68440.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_04/C68440", func_8024034C_C6847C); /* -ApiStatus N(func_8024034C_C6847C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024034C_C6847C)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_04/C68440", func_802404DC_C6860C); INCLUDE_ASM(s32, "world/area_kzn/kzn_04/C68440", func_80240910_C68A40); /* -ApiStatus N(func_80240910_C68A40)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240910_C68A40)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_kzn/kzn_07/C6EA50.c b/src/world/area_kzn/kzn_07/C6EA50.c index 3788ae589e..2e5f3ddfca 100644 --- a/src/world/area_kzn/kzn_07/C6EA50.c +++ b/src/world/area_kzn/kzn_07/C6EA50.c @@ -16,7 +16,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_07/C6EA50", func_802409D0_C6ED00); INCLUDE_ASM(s32, "world/area_kzn/kzn_07/C6EA50", func_80241474_C6F7A4); /* -void N(func_80241474_C6F7A4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241474_C6F7A4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -37,7 +37,7 @@ void N(func_80241474_C6F7A4)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_kzn/kzn_07/C6EA50", func_80241B2C_C6FE5C); /* -ApiStatus N(func_80241B2C_C6FE5C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241B2C_C6FE5C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -102,7 +102,7 @@ ApiStatus N(func_80241B2C_C6FE5C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_07/C6EA50", func_80241E48_C70178); /* -void N(func_80241E48_C70178)(ScriptInstance *script, NpcAISettings *aiSettings, EnemyTerritoryThing *territory) { +void N(func_80241E48_C70178)(Evt *script, NpcAISettings *aiSettings, EnemyTerritoryThing *territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, y, z, w; diff --git a/src/world/area_kzn/kzn_08/C71C10.c b/src/world/area_kzn/kzn_08/C71C10.c index 857fcb19cc..95407575ad 100644 --- a/src/world/area_kzn/kzn_08/C71C10.c +++ b/src/world/area_kzn/kzn_08/C71C10.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71C10", func_80240790_C71C10); /* -ApiStatus N(func_80240790_C71C10)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240790_C71C10)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80244BB0_C76030) == NULL) { diff --git a/src/world/area_kzn/kzn_08/C71ED0.c b/src/world/area_kzn/kzn_08/C71ED0.c index 50d2ca3885..66fabb9d10 100644 --- a/src/world/area_kzn/kzn_08/C71ED0.c +++ b/src/world/area_kzn/kzn_08/C71ED0.c @@ -12,7 +12,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_80240C00_C72080); INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_802416A4_C72B24); /* -void N(func_802416A4_C72B24)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802416A4_C72B24)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -33,7 +33,7 @@ void N(func_802416A4_C72B24)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_80241D5C_C731DC); /* -ApiStatus N(func_80241D5C_C731DC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241D5C_C731DC)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -98,7 +98,7 @@ ApiStatus N(func_80241D5C_C731DC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_80242078_C734F8); /* -void N(func_80242078_C734F8)(ScriptInstance *script, NpcAISettings *aiSettings, EnemyTerritoryThing *territory) { +void N(func_80242078_C734F8)(Evt *script, NpcAISettings *aiSettings, EnemyTerritoryThing *territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, y, z, w; @@ -148,7 +148,7 @@ void N(func_80242078_C734F8)(ScriptInstance *script, NpcAISettings *aiSettings, INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_80242354_C737D4); /* -ApiStatus N(func_80242354_C737D4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242354_C737D4)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_kzn/kzn_09/C76CE0.c b/src/world/area_kzn/kzn_09/C76CE0.c index 8b4e4c9cf8..f1e3bde297 100644 --- a/src/world/area_kzn/kzn_09/C76CE0.c +++ b/src/world/area_kzn/kzn_09/C76CE0.c @@ -9,7 +9,7 @@ static char* N(exit_str_1) = "kzn_10"; INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C76CE0", func_8024003C_C76D1C); /* -ApiStatus N(func_8024003C_C76D1C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024003C_C76D1C)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -33,7 +33,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C76CE0", func_802401CC_C76EAC); INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C76CE0", func_80240600_C772E0); /* -ApiStatus N(func_80240600_C772E0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240600_C772E0)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_kzn/kzn_09/C77D00.c b/src/world/area_kzn/kzn_09/C77D00.c index e773d5bf52..a51bb91679 100644 --- a/src/world/area_kzn/kzn_09/C77D00.c +++ b/src/world/area_kzn/kzn_09/C77D00.c @@ -44,7 +44,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80242D58_C79A38); INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802432AC_C79F8C); /* -ApiStatus N(func_802432AC_C79F8C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802432AC_C79F8C)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80245250_C7BF30) == NULL) { @@ -71,7 +71,7 @@ ApiStatus N(func_802432AC_C79F8C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802435F0_C7A2D0); /* -ApiStatus N(func_802435F0_C7A2D0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802435F0_C7A2D0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -90,7 +90,7 @@ ApiStatus N(func_802435F0_C7A2D0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80243644_C7A324); /* -ApiStatus N(func_80243644_C7A324)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243644_C7A324)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802452B8_C7BF98) = get_variable(script, *args); @@ -101,7 +101,7 @@ ApiStatus N(func_80243644_C7A324)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_8024367C_C7A35C); /* -ApiStatus N(func_8024367C_C7A35C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024367C_C7A35C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -127,7 +127,7 @@ ApiStatus N(func_8024367C_C7A35C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80243994_C7A674); /* -ApiStatus N(func_80243994_C7A674)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80243994_C7A674)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -138,7 +138,7 @@ ApiStatus N(func_80243994_C7A674)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802439D8_C7A6B8); /* -ApiStatus N(func_802439D8_C7A6B8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802439D8_C7A6B8)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_kzn/kzn_10/C7E4B0.c b/src/world/area_kzn/kzn_10/C7E4B0.c index e4016ae654..6b5aadcadc 100644 --- a/src/world/area_kzn/kzn_10/C7E4B0.c +++ b/src/world/area_kzn/kzn_10/C7E4B0.c @@ -16,7 +16,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_10/C7E4B0", func_802405A4_C7E724); INCLUDE_ASM(s32, "world/area_kzn/kzn_10/C7E4B0", func_80240638_C7E7B8); /* -ApiStatus N(func_80240638_C7E7B8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240638_C7E7B8)(Evt *script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; script->functionTemp[0] = get_variable(script, *args++); diff --git a/src/world/area_kzn/kzn_11/C80600.c b/src/world/area_kzn/kzn_11/C80600.c index 7fb84f2a10..5892c88dfe 100644 --- a/src/world/area_kzn/kzn_11/C80600.c +++ b/src/world/area_kzn/kzn_11/C80600.c @@ -12,7 +12,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_80240610_C807B0); INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_802410B4_C81254); /* -void N(func_802410B4_C81254)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802410B4_C81254)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -33,7 +33,7 @@ void N(func_802410B4_C81254)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_8024176C_C8190C); /* -ApiStatus N(func_8024176C_C8190C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024176C_C8190C)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -98,7 +98,7 @@ ApiStatus N(func_8024176C_C8190C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_80241A88_C81C28); /* -void N(func_80241A88_C81C28)(ScriptInstance *script, NpcAISettings *aiSettings, EnemyTerritoryThing *territory) { +void N(func_80241A88_C81C28)(Evt *script, NpcAISettings *aiSettings, EnemyTerritoryThing *territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, y, z, w; @@ -148,7 +148,7 @@ void N(func_80241A88_C81C28)(ScriptInstance *script, NpcAISettings *aiSettings, INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_80241D64_C81F04); /* -ApiStatus N(func_80241D64_C81F04)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241D64_C81F04)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_kzn/kzn_17/C85DC0.c b/src/world/area_kzn/kzn_17/C85DC0.c index b94b333557..6ec0444048 100644 --- a/src/world/area_kzn/kzn_17/C85DC0.c +++ b/src/world/area_kzn/kzn_17/C85DC0.c @@ -44,7 +44,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242048_C87AF8); INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_8024259C_C8804C); /* -ApiStatus N(func_8024259C_C8804C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024259C_C8804C)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80244074_C89B24) == NULL) { @@ -71,7 +71,7 @@ ApiStatus N(func_8024259C_C8804C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_802428E0_C88390); /* -ApiStatus N(func_802428E0_C88390)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802428E0_C88390)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -90,7 +90,7 @@ ApiStatus N(func_802428E0_C88390)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242934_C883E4); /* -ApiStatus N(func_80242934_C883E4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242934_C883E4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802440DC_C89B8C) = get_variable(script, *args); @@ -101,7 +101,7 @@ ApiStatus N(func_80242934_C883E4)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_8024296C_C8841C); /* -ApiStatus N(func_8024296C_C8841C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024296C_C8841C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -127,7 +127,7 @@ ApiStatus N(func_8024296C_C8841C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242C84_C88734); /* -ApiStatus N(func_80242C84_C88734)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242C84_C88734)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -138,7 +138,7 @@ ApiStatus N(func_80242C84_C88734)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242CC8_C88778); /* -ApiStatus N(func_80242CC8_C88778)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242CC8_C88778)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_kzn/kzn_17/C887B0.c b/src/world/area_kzn/kzn_17/C887B0.c index 6f1975b204..f1817021b0 100644 --- a/src/world/area_kzn/kzn_17/C887B0.c +++ b/src/world/area_kzn/kzn_17/C887B0.c @@ -16,7 +16,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C887B0", func_80242F74_C88A24); INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C887B0", func_80243004_C88AB4); /* -ApiStatus N(func_80243004_C88AB4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80243004_C88AB4)(Evt *script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; script->functionTemp[0] = get_variable(script, *args++); diff --git a/src/world/area_kzn/kzn_19/C8DBB0.c b/src/world/area_kzn/kzn_19/C8DBB0.c index 46fb983ebf..59d26c5ed1 100644 --- a/src/world/area_kzn/kzn_19/C8DBB0.c +++ b/src/world/area_kzn/kzn_19/C8DBB0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_8024030C_C8DEBC); /* -ApiStatus N(func_8024030C_C8DEBC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024030C_C8DEBC)(Evt* script, s32 isInitialCall) { arn_07_struct* ptr = script->varTable[0]; sfx_adjust_env_sound_pos(0xA2, 0, ptr->unk_00, ptr->unk_04, ptr->unk_08); @@ -16,7 +16,7 @@ ApiStatus N(func_8024030C_C8DEBC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80240358_C8DF08); /* -ApiStatus N(func_80240358_C8DF08)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240358_C8DF08)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -53,7 +53,7 @@ static char* N(exit_str_2) = "kzn_20"; INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_802408C8_C8E478); /* -ApiStatus N(func_802408C8_C8E478)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802408C8_C8E478)(Evt* script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); arn_07_struct* ptr = script->varTable[0]; @@ -63,7 +63,7 @@ ApiStatus N(func_802408C8_C8E478)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80240908_C8E4B8); /* -ApiStatus N(func_80240908_C8E4B8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240908_C8E4B8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -87,7 +87,7 @@ ApiStatus N(func_80240908_C8E4B8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80240A14_C8E5C4); /* -ApiStatus N(func_80240A14_C8E5C4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240A14_C8E5C4)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; arn_07_struct* ptr = script->varTable[0]; @@ -123,7 +123,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_8024140C_C8EFBC); INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241468_C8F018); /* -ApiStatus N(func_80241468_C8F018)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241468_C8F018)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80243D74_C91924) == NULL) { @@ -150,7 +150,7 @@ ApiStatus N(func_80241468_C8F018)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_802417AC_C8F35C); /* -ApiStatus N(func_802417AC_C8F35C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802417AC_C8F35C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -169,7 +169,7 @@ ApiStatus N(func_802417AC_C8F35C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241800_C8F3B0); /* -ApiStatus N(func_80241800_C8F3B0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241800_C8F3B0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80243DDC_C9198C) = get_variable(script, *args); @@ -180,7 +180,7 @@ ApiStatus N(func_80241800_C8F3B0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241838_C8F3E8); /* -ApiStatus N(func_80241838_C8F3E8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241838_C8F3E8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -206,7 +206,7 @@ ApiStatus N(func_80241838_C8F3E8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241B50_C8F700); /* -ApiStatus N(func_80241B50_C8F700)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241B50_C8F700)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -217,7 +217,7 @@ ApiStatus N(func_80241B50_C8F700)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241B94_C8F744); /* -ApiStatus N(func_80241B94_C8F744)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241B94_C8F744)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_kzn/kzn_20/C96240.c b/src/world/area_kzn/kzn_20/C96240.c index 8e1fe33b27..69dd4c008e 100644 --- a/src/world/area_kzn/kzn_20/C96240.c +++ b/src/world/area_kzn/kzn_20/C96240.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240310_C96240); /* -ApiStatus N(func_80240310_C96240)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240310_C96240)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241780_C976B0) == NULL) { @@ -29,7 +29,7 @@ ApiStatus N(func_80240310_C96240)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240654_C96584); /* -ApiStatus N(func_80240654_C96584)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240654_C96584)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -48,7 +48,7 @@ ApiStatus N(func_80240654_C96584)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_802406A8_C965D8); /* -ApiStatus N(func_802406A8_C965D8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802406A8_C965D8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802417E8_C97718) = get_variable(script, *args); @@ -59,7 +59,7 @@ ApiStatus N(func_802406A8_C965D8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_802406E0_C96610); /* -ApiStatus N(func_802406E0_C96610)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802406E0_C96610)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -85,7 +85,7 @@ ApiStatus N(func_802406E0_C96610)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_802409F8_C96928); /* -ApiStatus N(func_802409F8_C96928)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802409F8_C96928)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -96,7 +96,7 @@ ApiStatus N(func_802409F8_C96928)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240A3C_C9696C); /* -ApiStatus N(func_80240A3C_C9696C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240A3C_C9696C)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_mac/mac_00/7EAD10.c b/src/world/area_mac/mac_00/7EAD10.c index ee316d0f24..7f2c363970 100644 --- a/src/world/area_mac/mac_00/7EAD10.c +++ b/src/world/area_mac/mac_00/7EAD10.c @@ -23,7 +23,7 @@ static char* N(exit_str_5) = "\0\0\0\0"; #include "world/common/UnkTexturePanFunc2.inc.c" -ApiStatus func_802405EC_7EB2FC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802405EC_7EB2FC(Evt* script, s32 isInitialCall) { f32 x; f32 y; f32 z; @@ -32,6 +32,6 @@ ApiStatus func_802405EC_7EB2FC(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80240624_7EB334(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240624_7EB334(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index a0aafbfd7e..96583fe005 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240630_7EB340); /* -ApiStatus N(func_80240630_7EB340)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240630_7EB340)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80245DC0_7F0AD0) == NULL) { @@ -29,7 +29,7 @@ ApiStatus N(func_80240630_7EB340)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024076C_7EB47C); /* -ApiStatus N(func_8024076C_7EB47C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024076C_7EB47C)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -91,7 +91,7 @@ ApiStatus N(func_8024076C_7EB47C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240D1C_7EBA2C); /* -ApiStatus N(func_80240D1C_7EBA2C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240D1C_7EBA2C)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -112,7 +112,7 @@ ApiStatus N(func_80240D1C_7EBA2C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240DA0_7EBAB0); /* -ApiStatus N(func_80240DA0_7EBAB0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240DA0_7EBAB0)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -148,7 +148,7 @@ ApiStatus N(func_80240DA0_7EBAB0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240FB8_7EBCC8); /* -ApiStatus N(func_80240FB8_7EBCC8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240FB8_7EBCC8)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -176,7 +176,7 @@ ApiStatus N(func_80240FB8_7EBCC8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024106C_7EBD7C); /* -ApiStatus N(func_8024106C_7EBD7C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024106C_7EBD7C)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -184,7 +184,7 @@ ApiStatus N(func_8024106C_7EBD7C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_802410A0_7EBDB0); /* -ApiStatus N(func_802410A0_7EBDB0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802410A0_7EBDB0)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -209,7 +209,7 @@ ApiStatus N(func_802410A0_7EBDB0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241120_7EBE30); /* -ApiStatus N(func_80241120_7EBE30)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241120_7EBE30)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -217,7 +217,7 @@ ApiStatus N(func_80241120_7EBE30)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241138_7EBE48); /* -ApiStatus N(func_80241138_7EBE48)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241138_7EBE48)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -225,7 +225,7 @@ ApiStatus N(func_80241138_7EBE48)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241154_7EBE64); /* -ApiStatus N(func_80241154_7EBE64)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241154_7EBE64)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -258,7 +258,7 @@ void N(func_80241628_7EC338)(void) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241694_7EC3A4); /* -ApiStatus N(func_80241694_7EC3A4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241694_7EC3A4)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -270,7 +270,7 @@ ApiStatus N(func_80241694_7EC3A4)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_802418F0_7EC600); /* -ApiStatus N(func_802418F0_7EC600)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802418F0_7EC600)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -289,7 +289,7 @@ ApiStatus N(func_802418F0_7EC600)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241944_7EC654); /* -ApiStatus N(func_80241944_7EC654)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241944_7EC654)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802483EC_7F30FC) = get_variable(script, *args); @@ -300,7 +300,7 @@ ApiStatus N(func_80241944_7EC654)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024197C_7EC68C); /* -ApiStatus N(func_8024197C_7EC68C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024197C_7EC68C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -322,7 +322,7 @@ ApiStatus N(func_8024197C_7EC68C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241A18_7EC728); /* -ApiStatus N(func_80241A18_7EC728)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241A18_7EC728)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -348,7 +348,7 @@ ApiStatus N(func_80241A18_7EC728)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241D30_7ECA40); /* -ApiStatus N(func_80241D30_7ECA40)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241D30_7ECA40)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -359,7 +359,7 @@ ApiStatus N(func_80241D30_7ECA40)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241D74_7ECA84); /* -ApiStatus N(func_80241D74_7ECA84)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241D74_7ECA84)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } @@ -379,7 +379,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80242178_7ECE88); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_802421D0_7ECEE0); -ApiStatus func_80242224_7ECF34(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80242224_7ECF34(Evt* script, s32 isInitialCall) { gPlayerData.curHP = 1; sync_status_menu(); return ApiStatus_DONE2; diff --git a/src/world/area_mac/mac_00/7ED280.c b/src/world/area_mac/mac_00/7ED280.c index dd4d82cb8a..b3a6f34670 100644 --- a/src/world/area_mac/mac_00/7ED280.c +++ b/src/world/area_mac/mac_00/7ED280.c @@ -24,7 +24,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243104_7EDE14); /* -ApiStatus N(func_80243104_7EDE14)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243104_7EDE14)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -113,7 +113,7 @@ static char* N(exit_str_0) = "mac_01"; INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243400_7EE110); /* -ApiStatus N(func_80243400_7EE110)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243400_7EE110)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_8024ECE8_7F99F8) == NULL) { @@ -146,7 +146,7 @@ ApiStatus N(func_80243400_7EE110)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243744_7EE454); /* -ApiStatus N(func_80243744_7EE454)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243744_7EE454)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -165,7 +165,7 @@ ApiStatus N(func_80243744_7EE454)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243798_7EE4A8); /* -ApiStatus N(func_80243798_7EE4A8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243798_7EE4A8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_8024ED50_7F9A60) = get_variable(script, *args); @@ -176,7 +176,7 @@ ApiStatus N(func_80243798_7EE4A8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_802437D0_7EE4E0); /* -ApiStatus N(func_802437D0_7EE4E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802437D0_7EE4E0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -206,7 +206,7 @@ ApiStatus N(func_802437D0_7EE4E0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243AE8_7EE7F8); /* -ApiStatus N(func_80243AE8_7EE7F8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80243AE8_7EE7F8)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -217,7 +217,7 @@ ApiStatus N(func_80243AE8_7EE7F8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243B2C_7EE83C); /* -ApiStatus N(func_80243B2C_7EE83C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80243B2C_7EE83C)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_mac/mac_01/800880.c b/src/world/area_mac/mac_01/800880.c index 29b53ae395..b635d72670 100644 --- a/src/world/area_mac/mac_01/800880.c +++ b/src/world/area_mac/mac_01/800880.c @@ -7,14 +7,14 @@ static char* N(exit_str_3) = "osr_00"; static char* N(exit_str_4) = "osr_01"; static char* N(exit_str_5) = "mac_02"; -ApiStatus func_80240000_800880(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240000_800880(Evt* script, s32 isInitialCall) { s32 itemIndex = get_variable(script, *script->ptrReadPos); set_item_entity_flags(gGameStatusPtr->shopItemEntities[itemIndex].index, 0x40); return ApiStatus_DONE2; } -ApiStatus func_80240044_8008C4(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240044_8008C4(Evt* script, s32 isInitialCall) { s32 itemIndex = get_variable(script, *script->ptrReadPos); s32* var1 = get_variable(NULL, SI_MAP_VAR(2)); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 72579691f3..1126a33ee9 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -44,7 +44,7 @@ extern u8 D_80258407_818C87; INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80241C14_802494); /* -ApiStatus N(func_80241C14_802494)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241C14_802494)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -134,7 +134,7 @@ static char* N(exit_str_1) = "kmr_22"; INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80241F10_802790); /* -ApiStatus N(func_80241F10_802790)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241F10_802790)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80248C30_8094B0) == NULL) { @@ -159,7 +159,7 @@ ApiStatus N(func_80241F10_802790)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024204C_8028CC); /* -ApiStatus N(func_8024204C_8028CC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024204C_8028CC)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -221,7 +221,7 @@ ApiStatus N(func_8024204C_8028CC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802425FC_802E7C); /* -ApiStatus N(func_802425FC_802E7C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802425FC_802E7C)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -242,7 +242,7 @@ ApiStatus N(func_802425FC_802E7C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242680_802F00); /* -ApiStatus N(func_80242680_802F00)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242680_802F00)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -278,7 +278,7 @@ ApiStatus N(func_80242680_802F00)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242898_803118); /* -ApiStatus N(func_80242898_803118)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242898_803118)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -306,7 +306,7 @@ ApiStatus N(func_80242898_803118)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024294C_8031CC); /* -ApiStatus N(func_8024294C_8031CC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024294C_8031CC)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -314,7 +314,7 @@ ApiStatus N(func_8024294C_8031CC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242980_803200); /* -ApiStatus N(func_80242980_803200)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242980_803200)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -339,7 +339,7 @@ ApiStatus N(func_80242980_803200)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242A00_803280); /* -ApiStatus N(func_80242A00_803280)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242A00_803280)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -347,7 +347,7 @@ ApiStatus N(func_80242A00_803280)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242A18_803298); /* -ApiStatus N(func_80242A18_803298)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242A18_803298)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -355,7 +355,7 @@ ApiStatus N(func_80242A18_803298)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242A34_8032B4); /* -ApiStatus N(func_80242A34_8032B4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242A34_8032B4)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -388,7 +388,7 @@ void N(func_80242F08_803788)(void) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242F74_8037F4); /* -ApiStatus N(func_80242F74_8037F4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242F74_8037F4)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -426,7 +426,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243740_803FC0); #include "world/common/GetPartnerCall800EB168.inc.c" -ApiStatus func_80243AA0_804320(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80243AA0_804320(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } @@ -436,7 +436,7 @@ ApiStatus func_80243AA0_804320(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243CD4_804554); /* -ApiStatus N(func_80243CD4_804554)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243CD4_804554)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -455,7 +455,7 @@ ApiStatus N(func_80243CD4_804554)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243D28_8045A8); /* -ApiStatus N(func_80243D28_8045A8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243D28_8045A8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_8024D948_80E1C8) = get_variable(script, *args); @@ -466,7 +466,7 @@ ApiStatus N(func_80243D28_8045A8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243D60_8045E0); /* -ApiStatus N(func_80243D60_8045E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243D60_8045E0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -492,7 +492,7 @@ ApiStatus N(func_80243D60_8045E0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80244078_8048F8); /* -ApiStatus N(func_80244078_8048F8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80244078_8048F8)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -503,7 +503,7 @@ ApiStatus N(func_80244078_8048F8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802440BC_80493C); /* -ApiStatus N(func_802440BC_80493C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802440BC_80493C)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } @@ -551,7 +551,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80245028_8058A8); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024522C_805AAC); -ApiStatus func_80245440_805CC0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80245440_805CC0(Evt* script, s32 isInitialCall) { if (gPlayerData.currentPartner == script->varTable[10]) { script->varTable[1] = 0; return ApiStatus_DONE2; @@ -569,12 +569,12 @@ void func_802454B4_805D34(void) { gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, D_80258407_818C87); } -ApiStatus func_80245504_805D84(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80245504_805D84(Evt* script, s32 isInitialCall) { partner_set_tether_distance(20.0f); return ApiStatus_DONE2; } -ApiStatus func_8024552C_805DAC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_8024552C_805DAC(Evt* script, s32 isInitialCall) { repartner_set_tether_distance(); return ApiStatus_DONE2; } diff --git a/src/world/area_mac/mac_01/805DD0.c b/src/world/area_mac/mac_01/805DD0.c index e3521db436..63d2e9387a 100644 --- a/src/world/area_mac/mac_01/805DD0.c +++ b/src/world/area_mac/mac_01/805DD0.c @@ -24,7 +24,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/805DD0", func_802460E4_806964); /* -ApiStatus N(func_802460E4_806964)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802460E4_806964)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index edb3503b98..f9a94c4f82 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -26,7 +26,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802414C4_824784); /* -ApiStatus N(func_802414C4_824784)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802414C4_824784)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -113,7 +113,7 @@ ApiStatus N(func_802414C4_824784)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802417C0_824A80); /* -ApiStatus N(func_802417C0_824A80)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802417C0_824A80)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80246150_829410) == NULL) { @@ -138,7 +138,7 @@ ApiStatus N(func_802417C0_824A80)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802418FC_824BBC); /* -ApiStatus N(func_802418FC_824BBC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802418FC_824BBC)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -200,7 +200,7 @@ ApiStatus N(func_802418FC_824BBC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80241EAC_82516C); /* -ApiStatus N(func_80241EAC_82516C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241EAC_82516C)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -221,7 +221,7 @@ ApiStatus N(func_80241EAC_82516C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80241F30_8251F0); /* -ApiStatus N(func_80241F30_8251F0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241F30_8251F0)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -257,7 +257,7 @@ ApiStatus N(func_80241F30_8251F0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80242148_825408); /* -ApiStatus N(func_80242148_825408)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242148_825408)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -285,7 +285,7 @@ ApiStatus N(func_80242148_825408)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802421FC_8254BC); /* -ApiStatus N(func_802421FC_8254BC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802421FC_8254BC)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -293,7 +293,7 @@ ApiStatus N(func_802421FC_8254BC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80242230_8254F0); /* -ApiStatus N(func_80242230_8254F0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242230_8254F0)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -318,7 +318,7 @@ ApiStatus N(func_80242230_8254F0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802422B0_825570); /* -ApiStatus N(func_802422B0_825570)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802422B0_825570)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -326,7 +326,7 @@ ApiStatus N(func_802422B0_825570)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802422C8_825588); /* -ApiStatus N(func_802422C8_825588)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802422C8_825588)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -334,7 +334,7 @@ ApiStatus N(func_802422C8_825588)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802422E4_8255A4); /* -ApiStatus N(func_802422E4_8255A4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802422E4_8255A4)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -367,7 +367,7 @@ void N(func_802427B8_825A78)(void) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80242824_825AE4); /* -ApiStatus N(func_80242824_825AE4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242824_825AE4)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -379,7 +379,7 @@ ApiStatus N(func_80242824_825AE4)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80242A80_825D40); /* -ApiStatus N(func_80242A80_825D40)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242A80_825D40)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -398,7 +398,7 @@ ApiStatus N(func_80242A80_825D40)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80242AD4_825D94); /* -ApiStatus N(func_80242AD4_825D94)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242AD4_825D94)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_8024877C_82BA3C) = get_variable(script, *args); @@ -409,7 +409,7 @@ ApiStatus N(func_80242AD4_825D94)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80242B0C_825DCC); /* -ApiStatus N(func_80242B0C_825DCC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242B0C_825DCC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -431,7 +431,7 @@ ApiStatus N(func_80242B0C_825DCC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80242BA8_825E68); /* -ApiStatus N(func_80242BA8_825E68)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242BA8_825E68)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -463,7 +463,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80243088_826348); INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802430D0_826390); /* -ApiStatus N(func_802430D0_826390)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802430D0_826390)(Evt *script, s32 isInitialCall) { s32 i; for (i = 0; i <= 90; i++) { @@ -481,7 +481,7 @@ ApiStatus N(func_802430D0_826390)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80243380_826640); /* -ApiStatus N(func_80243380_826640)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80243380_826640)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -492,7 +492,7 @@ ApiStatus N(func_80243380_826640)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802433C4_826684); /* -ApiStatus N(func_802433C4_826684)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802433C4_826684)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index 1779e4b4e9..217b3220d9 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802404B0_831CB0); /* -ApiStatus N(func_802404B0_831CB0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802404B0_831CB0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80246644_837E44) == NULL) { @@ -31,7 +31,7 @@ ApiStatus N(func_802404B0_831CB0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802405EC_831DEC); /* -ApiStatus N(func_802405EC_831DEC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802405EC_831DEC)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -93,7 +93,7 @@ ApiStatus N(func_802405EC_831DEC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240B9C_83239C); /* -ApiStatus N(func_80240B9C_83239C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240B9C_83239C)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -114,7 +114,7 @@ ApiStatus N(func_80240B9C_83239C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240C20_832420); /* -ApiStatus N(func_80240C20_832420)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240C20_832420)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -150,7 +150,7 @@ ApiStatus N(func_80240C20_832420)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240E38_832638); /* -ApiStatus N(func_80240E38_832638)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240E38_832638)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -178,7 +178,7 @@ ApiStatus N(func_80240E38_832638)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240EEC_8326EC); /* -ApiStatus N(func_80240EEC_8326EC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240EEC_8326EC)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -186,7 +186,7 @@ ApiStatus N(func_80240EEC_8326EC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240F20_832720); /* -ApiStatus N(func_80240F20_832720)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240F20_832720)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -211,7 +211,7 @@ ApiStatus N(func_80240F20_832720)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240FA0_8327A0); /* -ApiStatus N(func_80240FA0_8327A0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240FA0_8327A0)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -219,7 +219,7 @@ ApiStatus N(func_80240FA0_8327A0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240FB8_8327B8); /* -ApiStatus N(func_80240FB8_8327B8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240FB8_8327B8)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -227,7 +227,7 @@ ApiStatus N(func_80240FB8_8327B8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240FD4_8327D4); /* -ApiStatus N(func_80240FD4_8327D4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240FD4_8327D4)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -260,7 +260,7 @@ void N(func_802414A8_832CA8)(void) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80241514_832D14); /* -ApiStatus N(func_80241514_832D14)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241514_832D14)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -272,7 +272,7 @@ ApiStatus N(func_80241514_832D14)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80241770_832F70); /* -ApiStatus N(func_80241770_832F70)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241770_832F70)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -291,7 +291,7 @@ ApiStatus N(func_80241770_832F70)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802417C4_832FC4); /* -ApiStatus N(func_802417C4_832FC4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802417C4_832FC4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80248C70_83A470) = get_variable(script, *args); @@ -302,7 +302,7 @@ ApiStatus N(func_802417C4_832FC4)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802417FC_832FFC); /* -ApiStatus N(func_802417FC_832FFC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802417FC_832FFC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -328,7 +328,7 @@ ApiStatus N(func_802417FC_832FFC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80241B14_833314); /* -ApiStatus N(func_80241B14_833314)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241B14_833314)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -339,7 +339,7 @@ ApiStatus N(func_80241B14_833314)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80241B58_833358); /* -ApiStatus N(func_80241B58_833358)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241B58_833358)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index 7f06ad6aa5..d97dcbce69 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240460_843030); /* -ApiStatus N(func_80240460_843030)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240460_843030)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80243FE8_846BB8) == NULL) { @@ -29,7 +29,7 @@ ApiStatus N(func_80240460_843030)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024059C_84316C); /* -ApiStatus N(func_8024059C_84316C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024059C_84316C)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -91,7 +91,7 @@ ApiStatus N(func_8024059C_84316C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240B4C_84371C); /* -ApiStatus N(func_80240B4C_84371C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240B4C_84371C)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -112,7 +112,7 @@ ApiStatus N(func_80240B4C_84371C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240BD0_8437A0); /* -ApiStatus N(func_80240BD0_8437A0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240BD0_8437A0)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -148,7 +148,7 @@ ApiStatus N(func_80240BD0_8437A0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240DE8_8439B8); /* -ApiStatus N(func_80240DE8_8439B8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240DE8_8439B8)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -176,7 +176,7 @@ ApiStatus N(func_80240DE8_8439B8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240E9C_843A6C); /* -ApiStatus N(func_80240E9C_843A6C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240E9C_843A6C)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -184,7 +184,7 @@ ApiStatus N(func_80240E9C_843A6C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240ED0_843AA0); /* -ApiStatus N(func_80240ED0_843AA0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240ED0_843AA0)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -209,7 +209,7 @@ ApiStatus N(func_80240ED0_843AA0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240F50_843B20); /* -ApiStatus N(func_80240F50_843B20)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240F50_843B20)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -217,7 +217,7 @@ ApiStatus N(func_80240F50_843B20)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240F68_843B38); /* -ApiStatus N(func_80240F68_843B38)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240F68_843B38)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -225,7 +225,7 @@ ApiStatus N(func_80240F68_843B38)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240F84_843B54); /* -ApiStatus N(func_80240F84_843B54)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240F84_843B54)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -258,7 +258,7 @@ void N(func_80241458_844028)(void) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_802414C4_844094); /* -ApiStatus N(func_802414C4_844094)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802414C4_844094)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -270,7 +270,7 @@ ApiStatus N(func_802414C4_844094)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241720_8442F0); /* -ApiStatus N(func_80241720_8442F0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241720_8442F0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -289,7 +289,7 @@ ApiStatus N(func_80241720_8442F0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241774_844344); /* -ApiStatus N(func_80241774_844344)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241774_844344)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80246614_8491E4) = get_variable(script, *args); @@ -300,7 +300,7 @@ ApiStatus N(func_80241774_844344)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_802417AC_84437C); /* -ApiStatus N(func_802417AC_84437C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802417AC_84437C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -324,7 +324,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241848_844418); INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_802418AC_84447C); -ApiStatus PostChapter4StatUpdate(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PostChapter4StatUpdate(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; set_max_SP(4); diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index aaf27d68ca..726932c78e 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -37,7 +37,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024047C_8525EC); INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241024_853194); /* -ApiStatus N(func_80241024_853194)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241024_853194)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -124,7 +124,7 @@ ApiStatus N(func_80241024_853194)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241320_853490); /* -ApiStatus N(func_80241320_853490)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241320_853490)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802450B0_857220) == NULL) { @@ -149,7 +149,7 @@ ApiStatus N(func_80241320_853490)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024145C_8535CC); /* -ApiStatus N(func_8024145C_8535CC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024145C_8535CC)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -211,7 +211,7 @@ ApiStatus N(func_8024145C_8535CC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241A0C_853B7C); /* -ApiStatus N(func_80241A0C_853B7C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241A0C_853B7C)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -232,7 +232,7 @@ ApiStatus N(func_80241A0C_853B7C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241A90_853C00); /* -ApiStatus N(func_80241A90_853C00)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241A90_853C00)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -268,7 +268,7 @@ ApiStatus N(func_80241A90_853C00)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241CA8_853E18); /* -ApiStatus N(func_80241CA8_853E18)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241CA8_853E18)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -296,7 +296,7 @@ ApiStatus N(func_80241CA8_853E18)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241D5C_853ECC); /* -ApiStatus N(func_80241D5C_853ECC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241D5C_853ECC)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -304,7 +304,7 @@ ApiStatus N(func_80241D5C_853ECC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241D90_853F00); /* -ApiStatus N(func_80241D90_853F00)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241D90_853F00)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -329,7 +329,7 @@ ApiStatus N(func_80241D90_853F00)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241E10_853F80); /* -ApiStatus N(func_80241E10_853F80)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241E10_853F80)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -337,7 +337,7 @@ ApiStatus N(func_80241E10_853F80)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241E28_853F98); /* -ApiStatus N(func_80241E28_853F98)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241E28_853F98)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -345,7 +345,7 @@ ApiStatus N(func_80241E28_853F98)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241E44_853FB4); /* -ApiStatus N(func_80241E44_853FB4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241E44_853FB4)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -378,7 +378,7 @@ void N(func_80242318_854488)(void) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80242384_8544F4); /* -ApiStatus N(func_80242384_8544F4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242384_8544F4)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -390,7 +390,7 @@ ApiStatus N(func_80242384_8544F4)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_802425E0_854750); /* -ApiStatus N(func_802425E0_854750)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802425E0_854750)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -409,7 +409,7 @@ ApiStatus N(func_802425E0_854750)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80242634_8547A4); /* -ApiStatus N(func_80242634_8547A4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242634_8547A4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802476DC_85984C) = get_variable(script, *args); @@ -420,7 +420,7 @@ ApiStatus N(func_80242634_8547A4)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024266C_8547DC); /* -ApiStatus N(func_8024266C_8547DC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024266C_8547DC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -442,7 +442,7 @@ ApiStatus N(func_8024266C_8547DC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80242708_854878); /* -ApiStatus N(func_80242708_854878)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242708_854878)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -468,7 +468,7 @@ ApiStatus N(func_80242708_854878)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80242A20_854B90); /* -ApiStatus N(func_80242A20_854B90)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242A20_854B90)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -479,7 +479,7 @@ ApiStatus N(func_80242A20_854B90)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80242A64_854BD4); /* -ApiStatus N(func_80242A64_854BD4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242A64_854BD4)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_mac/machi/7E73A0.c b/src/world/area_mac/machi/7E73A0.c index 8134ef4277..5aa7189b2a 100644 --- a/src/world/area_mac/machi/7E73A0.c +++ b/src/world/area_mac/machi/7E73A0.c @@ -12,7 +12,7 @@ INCLUDE_ASM(s32, "world/area_mac/machi/7E73A0", func_80240000_7E73A0); INCLUDE_ASM(s32, "world/area_mac/machi/7E73A0", func_80240038_7E73D8); /* -ApiStatus N(func_80240038_7E73D8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240038_7E73D8)(Evt *script, s32 isInitialCall) { return ApiStatus_DONE2; } */ diff --git a/src/world/area_mgm/mgm_00/E0E7A0.c b/src/world/area_mgm/mgm_00/E0E7A0.c index e82d43773c..6f82c5a0da 100644 --- a/src/world/area_mgm/mgm_00/E0E7A0.c +++ b/src/world/area_mgm/mgm_00/E0E7A0.c @@ -41,7 +41,7 @@ static char* N(exit_str_3) = ""; INCLUDE_ASM(s32, "world/area_mgm/mgm_00/E0E7A0", func_80240E74_E0F614); /* -ApiStatus N(func_80240E74_E0F614)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240E74_E0F614)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_mim/mim_02/B97C70.c b/src/world/area_mim/mim_02/B97C70.c index 5063431ddf..fba2d02b33 100644 --- a/src/world/area_mim/mim_02/B97C70.c +++ b/src/world/area_mim/mim_02/B97C70.c @@ -22,7 +22,7 @@ INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_80240C60_B98860); INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_802410B0_B98CB0); /* -ApiStatus N(func_802410B0_B98CB0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802410B0_B98CB0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -41,7 +41,7 @@ ApiStatus N(func_802410B0_B98CB0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_80241104_B98D04); /* -ApiStatus N(func_80241104_B98D04)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241104_B98D04)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802416B0_B992B0) = get_variable(script, *args); @@ -52,7 +52,7 @@ ApiStatus N(func_80241104_B98D04)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_8024113C_B98D3C); /* -ApiStatus N(func_8024113C_B98D3C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024113C_B98D3C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_mim/mim_04/B9DB60.c b/src/world/area_mim/mim_04/B9DB60.c index efd01b4c9c..034bab0d2d 100644 --- a/src/world/area_mim/mim_04/B9DB60.c +++ b/src/world/area_mim/mim_04/B9DB60.c @@ -18,7 +18,7 @@ INCLUDE_ASM(s32, "world/area_mim/mim_04/B9DB60", func_80240DF0_B9E750); INCLUDE_ASM(s32, "world/area_mim/mim_04/B9DB60", func_80241014_B9E974); /* -ApiStatus N(func_80241014_B9E974)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241014_B9E974)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80242614_B9FF74) == NULL) { diff --git a/src/world/area_mim/mim_08/BAD940.c b/src/world/area_mim/mim_08/BAD940.c index 3b1eee25f1..afd79182ca 100644 --- a/src/world/area_mim/mim_08/BAD940.c +++ b/src/world/area_mim/mim_08/BAD940.c @@ -19,7 +19,7 @@ INCLUDE_ASM(s32, "world/area_mim/mim_08/BAD940", func_80240250_BADB90); INCLUDE_ASM(s32, "world/area_mim/mim_08/BAD940", func_80240CF4_BAE634); /* -void N(func_80240CF4_BAE634)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240CF4_BAE634)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -40,7 +40,7 @@ void N(func_80240CF4_BAE634)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_mim/mim_08/BAD940", func_802413AC_BAECEC); /* -ApiStatus N(func_802413AC_BAECEC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802413AC_BAECEC)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_mim/mim_10/BB59E0.c b/src/world/area_mim/mim_10/BB59E0.c index 0815832cff..079da0ccfa 100644 --- a/src/world/area_mim/mim_10/BB59E0.c +++ b/src/world/area_mim/mim_10/BB59E0.c @@ -7,7 +7,7 @@ static char* N(exit_str_3) = ""; INCLUDE_ASM(s32, "world/area_mim/mim_10/BB59E0", func_80240000_BB59E0); /* -ApiStatus N(func_80240000_BB59E0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240000_BB59E0)(Evt *script, s32 isInitialCall) { if (gPlayerStatus.position.y >= -210.0f) { return ApiStatus_BLOCK; } diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index f3edeb4e17..c826cf3b4b 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -47,7 +47,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802407F4_9C5BD4); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240D68_9C6148); /* -ApiStatus N(func_80240D68_9C6148)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240D68_9C6148)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80245F44_9CB324) == NULL) { @@ -72,7 +72,7 @@ ApiStatus N(func_80240D68_9C6148)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240EA4_9C6284); /* -ApiStatus N(func_80240EA4_9C6284)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240EA4_9C6284)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -134,7 +134,7 @@ ApiStatus N(func_80240EA4_9C6284)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241454_9C6834); /* -ApiStatus N(func_80241454_9C6834)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241454_9C6834)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -155,7 +155,7 @@ ApiStatus N(func_80241454_9C6834)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802414D8_9C68B8); /* -ApiStatus N(func_802414D8_9C68B8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802414D8_9C68B8)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -191,7 +191,7 @@ ApiStatus N(func_802414D8_9C68B8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802416F0_9C6AD0); /* -ApiStatus N(func_802416F0_9C6AD0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802416F0_9C6AD0)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -219,7 +219,7 @@ ApiStatus N(func_802416F0_9C6AD0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802417A4_9C6B84); /* -ApiStatus N(func_802417A4_9C6B84)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802417A4_9C6B84)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -227,7 +227,7 @@ ApiStatus N(func_802417A4_9C6B84)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802417D8_9C6BB8); /* -ApiStatus N(func_802417D8_9C6BB8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802417D8_9C6BB8)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -252,7 +252,7 @@ ApiStatus N(func_802417D8_9C6BB8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241858_9C6C38); /* -ApiStatus N(func_80241858_9C6C38)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241858_9C6C38)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -260,7 +260,7 @@ ApiStatus N(func_80241858_9C6C38)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241870_9C6C50); /* -ApiStatus N(func_80241870_9C6C50)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241870_9C6C50)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -268,7 +268,7 @@ ApiStatus N(func_80241870_9C6C50)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_8024188C_9C6C6C); /* -ApiStatus N(func_8024188C_9C6C6C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024188C_9C6C6C)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -301,7 +301,7 @@ void N(func_80241D60_9C7140)(void) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241DCC_9C71AC); /* -ApiStatus N(func_80241DCC_9C71AC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241DCC_9C71AC)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -313,7 +313,7 @@ ApiStatus N(func_80241DCC_9C71AC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80242028_9C7408); /* -ApiStatus N(func_80242028_9C7408)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242028_9C7408)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -332,7 +332,7 @@ ApiStatus N(func_80242028_9C7408)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_8024207C_9C745C); /* -ApiStatus N(func_8024207C_9C745C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024207C_9C745C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80248570_9CD950) = get_variable(script, *args); @@ -343,7 +343,7 @@ ApiStatus N(func_8024207C_9C745C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802420B4_9C7494); /* -ApiStatus N(func_802420B4_9C7494)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802420B4_9C7494)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -369,7 +369,7 @@ ApiStatus N(func_802420B4_9C7494)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802423CC_9C77AC); /* -ApiStatus N(func_802423CC_9C77AC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802423CC_9C77AC)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -380,7 +380,7 @@ ApiStatus N(func_802423CC_9C77AC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80242410_9C77F0); /* -ApiStatus N(func_80242410_9C77F0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242410_9C77F0)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } @@ -410,7 +410,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802428D8_9C7CB8); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80242910_9C7CF0); /* -ApiStatus N(func_80242910_9C7CF0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242910_9C7CF0)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; playerData->unk_328 = playerData->frameCounter; diff --git a/src/world/area_nok/nok_02/9D7020.c b/src/world/area_nok/nok_02/9D7020.c index e31a5edc0a..e72260d182 100644 --- a/src/world/area_nok/nok_02/9D7020.c +++ b/src/world/area_nok/nok_02/9D7020.c @@ -19,7 +19,7 @@ static char* N(exit_str_3) = ""; INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_802402E0_9D7300); /* -ApiStatus N(func_802402E0_9D7300)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802402E0_9D7300)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802453D0_9DC3F0) == NULL) { @@ -52,7 +52,7 @@ ApiStatus N(func_802402E0_9D7300)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_80240624_9D7644); /* -ApiStatus N(func_80240624_9D7644)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240624_9D7644)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -71,7 +71,7 @@ ApiStatus N(func_80240624_9D7644)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_80240678_9D7698); /* -ApiStatus N(func_80240678_9D7698)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240678_9D7698)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80245438_9DC458) = get_variable(script, *args); @@ -82,7 +82,7 @@ ApiStatus N(func_80240678_9D7698)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_802406B0_9D76D0); /* -ApiStatus N(func_802406B0_9D76D0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802406B0_9D76D0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index 99622861a5..926143239b 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -26,7 +26,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241614_9D8634); /* -ApiStatus N(func_80241614_9D8634)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241614_9D8634)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -116,7 +116,7 @@ static char* N(exit_str_1) = "obk_09"; INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241910_9D8930); /* -ApiStatus N(func_80241910_9D8930)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241910_9D8930)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802470C8_9DE0E8) == NULL) { @@ -141,7 +141,7 @@ ApiStatus N(func_80241910_9D8930)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241A4C_9D8A6C); /* -ApiStatus N(func_80241A4C_9D8A6C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241A4C_9D8A6C)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -203,7 +203,7 @@ ApiStatus N(func_80241A4C_9D8A6C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241FFC_9D901C); /* -ApiStatus N(func_80241FFC_9D901C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241FFC_9D901C)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -224,7 +224,7 @@ ApiStatus N(func_80241FFC_9D901C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242080_9D90A0); /* -ApiStatus N(func_80242080_9D90A0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242080_9D90A0)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -260,7 +260,7 @@ ApiStatus N(func_80242080_9D90A0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242298_9D92B8); /* -ApiStatus N(func_80242298_9D92B8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242298_9D92B8)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -288,7 +288,7 @@ ApiStatus N(func_80242298_9D92B8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_8024234C_9D936C); /* -ApiStatus N(func_8024234C_9D936C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024234C_9D936C)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -296,7 +296,7 @@ ApiStatus N(func_8024234C_9D936C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242380_9D93A0); /* -ApiStatus N(func_80242380_9D93A0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242380_9D93A0)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -321,7 +321,7 @@ ApiStatus N(func_80242380_9D93A0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242400_9D9420); /* -ApiStatus N(func_80242400_9D9420)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242400_9D9420)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -329,7 +329,7 @@ ApiStatus N(func_80242400_9D9420)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242418_9D9438); /* -ApiStatus N(func_80242418_9D9438)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242418_9D9438)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -337,7 +337,7 @@ ApiStatus N(func_80242418_9D9438)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242434_9D9454); /* -ApiStatus N(func_80242434_9D9454)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242434_9D9454)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -370,7 +370,7 @@ void N(func_80242908_9D9928)(void) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242974_9D9994); /* -ApiStatus N(func_80242974_9D9994)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242974_9D9994)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -382,7 +382,7 @@ ApiStatus N(func_80242974_9D9994)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242BD0_9D9BF0); /* -ApiStatus N(func_80242BD0_9D9BF0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242BD0_9D9BF0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -401,7 +401,7 @@ ApiStatus N(func_80242BD0_9D9BF0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242C24_9D9C44); /* -ApiStatus N(func_80242C24_9D9C44)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242C24_9D9C44)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802496F4_9E0714) = get_variable(script, *args); @@ -412,7 +412,7 @@ ApiStatus N(func_80242C24_9D9C44)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242C5C_9D9C7C); /* -ApiStatus N(func_80242C5C_9D9C7C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242C5C_9D9C7C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -438,7 +438,7 @@ ApiStatus N(func_80242C5C_9D9C7C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242F74_9D9F94); /* -ApiStatus N(func_80242F74_9D9F94)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242F74_9D9F94)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -449,7 +449,7 @@ ApiStatus N(func_80242F74_9D9F94)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242FB8_9D9FD8); /* -ApiStatus N(func_80242FB8_9D9FD8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242FB8_9D9FD8)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_nok/nok_02/9DA8F0.c b/src/world/area_nok/nok_02/9DA8F0.c index 730b2ece21..d0b11b5840 100644 --- a/src/world/area_nok/nok_02/9DA8F0.c +++ b/src/world/area_nok/nok_02/9DA8F0.c @@ -12,7 +12,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_802438D0_9DA8F0); INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243BEC_9DAC0C); /* -ApiStatus N(func_80243BEC_9DAC0C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243BEC_9DAC0C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -31,7 +31,7 @@ ApiStatus N(func_80243BEC_9DAC0C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243C40_9DAC60); /* -ApiStatus N(func_80243C40_9DAC60)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243C40_9DAC60)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80252404_9E9424) = get_variable(script, *args); @@ -42,7 +42,7 @@ ApiStatus N(func_80243C40_9DAC60)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243C78_9DAC98); /* -ApiStatus N(func_80243C78_9DAC98)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243C78_9DAC98)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -64,7 +64,7 @@ ApiStatus N(func_80243C78_9DAC98)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243D14_9DAD34); /* -ApiStatus N(func_80243D14_9DAD34)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243D14_9DAD34)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -86,7 +86,7 @@ ApiStatus N(func_80243D14_9DAD34)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243DB0_9DADD0); /* -ApiStatus N(func_80243DB0_9DADD0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243DB0_9DADD0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80252720_9E9740) == NULL) { diff --git a/src/world/area_nok/nok_11/9F4A40.c b/src/world/area_nok/nok_11/9F4A40.c index 5f962a8afc..64ec6ca2fb 100644 --- a/src/world/area_nok/nok_11/9F4A40.c +++ b/src/world/area_nok/nok_11/9F4A40.c @@ -25,7 +25,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_11/9F4A40", func_80240984_9F53C4); INCLUDE_ASM(s32, "world/area_nok/nok_11/9F4A40", func_80241428_9F5E68); /* -void N(func_80241428_9F5E68)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241428_9F5E68)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -46,7 +46,7 @@ void N(func_80241428_9F5E68)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_nok/nok_11/9F4A40", func_80241AE0_9F6520); /* -ApiStatus N(func_80241AE0_9F6520)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241AE0_9F6520)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_nok/nok_12/9FAD60.c b/src/world/area_nok/nok_12/9FAD60.c index 3b245648a9..8fc5d1e8eb 100644 --- a/src/world/area_nok/nok_12/9FAD60.c +++ b/src/world/area_nok/nok_12/9FAD60.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_12/9FAD60", func_80240904_9FB0F4); INCLUDE_ASM(s32, "world/area_nok/nok_12/9FAD60", func_802418D8_9FC0C8); /* -ApiStatus N(func_802418D8_9FC0C8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802418D8_9FC0C8)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_nok/nok_14/A02A00.c b/src/world/area_nok/nok_14/A02A00.c index 32c5e8b570..4f7b2532b5 100644 --- a/src/world/area_nok/nok_14/A02A00.c +++ b/src/world/area_nok/nok_14/A02A00.c @@ -22,7 +22,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_14/A02A00", func_80240B44_A03384); INCLUDE_ASM(s32, "world/area_nok/nok_14/A02A00", func_802415E8_A03E28); /* -void N(func_802415E8_A03E28)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802415E8_A03E28)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -43,7 +43,7 @@ void N(func_802415E8_A03E28)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_nok/nok_14/A02A00", func_80241CA0_A044E0); /* -ApiStatus N(func_80241CA0_A044E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241CA0_A044E0)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_nok/nok_15/A06F00.c b/src/world/area_nok/nok_15/A06F00.c index e9ec5a9bd9..5d784c4bf6 100644 --- a/src/world/area_nok/nok_15/A06F00.c +++ b/src/world/area_nok/nok_15/A06F00.c @@ -39,7 +39,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_15/A06F00", func_80240C64_A07B64); INCLUDE_ASM(s32, "world/area_nok/nok_15/A06F00", func_80241708_A08608); /* -void N(func_80241708_A08608)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241708_A08608)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -60,7 +60,7 @@ void N(func_80241708_A08608)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_nok/nok_15/A06F00", func_80241DC0_A08CC0); /* -ApiStatus N(func_80241DC0_A08CC0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241DC0_A08CC0)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_obk/obk_01/BBD980.c b/src/world/area_obk/obk_01/BBD980.c index f14a8b03f5..d1b11ddf8d 100644 --- a/src/world/area_obk/obk_01/BBD980.c +++ b/src/world/area_obk/obk_01/BBD980.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_802407E0_BBD980); /* -ApiStatus N(func_802407E0_BBD980)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802407E0_BBD980)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802440F0_BC1290) == NULL) { @@ -29,7 +29,7 @@ ApiStatus N(func_802407E0_BBD980)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240B24_BBDCC4); /* -ApiStatus N(func_80240B24_BBDCC4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B24_BBDCC4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -48,7 +48,7 @@ ApiStatus N(func_80240B24_BBDCC4)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240B78_BBDD18); /* -ApiStatus N(func_80240B78_BBDD18)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B78_BBDD18)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80244158_BC12F8) = get_variable(script, *args); @@ -59,7 +59,7 @@ ApiStatus N(func_80240B78_BBDD18)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240BB0_BBDD50); /* -ApiStatus N(func_80240BB0_BBDD50)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240BB0_BBDD50)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -85,7 +85,7 @@ ApiStatus N(func_80240BB0_BBDD50)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240EC8_BBE068); /* -ApiStatus N(func_80240EC8_BBE068)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240EC8_BBE068)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -96,7 +96,7 @@ ApiStatus N(func_80240EC8_BBE068)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240F0C_BBE0AC); /* -ApiStatus N(func_80240F0C_BBE0AC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240F0C_BBE0AC)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_obk/obk_03/BC43F0.c b/src/world/area_obk/obk_03/BC43F0.c index 5a6377bfe0..94a53ff149 100644 --- a/src/world/area_obk/obk_03/BC43F0.c +++ b/src/world/area_obk/obk_03/BC43F0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240170_BC43F0); /* -ApiStatus N(func_80240170_BC43F0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240170_BC43F0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80242ECC_BC714C) == NULL) { @@ -29,7 +29,7 @@ ApiStatus N(func_80240170_BC43F0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_802404B4_BC4734); /* -ApiStatus N(func_802404B4_BC4734)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802404B4_BC4734)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -48,7 +48,7 @@ ApiStatus N(func_802404B4_BC4734)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240508_BC4788); /* -ApiStatus N(func_80240508_BC4788)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240508_BC4788)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80242F34_BC71B4) = get_variable(script, *args); @@ -59,7 +59,7 @@ ApiStatus N(func_80240508_BC4788)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240540_BC47C0); /* -ApiStatus N(func_80240540_BC47C0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240540_BC47C0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -85,7 +85,7 @@ ApiStatus N(func_80240540_BC47C0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240858_BC4AD8); /* -ApiStatus N(func_80240858_BC4AD8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240858_BC4AD8)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -96,7 +96,7 @@ ApiStatus N(func_80240858_BC4AD8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_8024089C_BC4B1C); /* -ApiStatus N(func_8024089C_BC4B1C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024089C_BC4B1C)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_obk/obk_04/BC7EB0.c b/src/world/area_obk/obk_04/BC7EB0.c index dcc7239972..8ba60bad84 100644 --- a/src/world/area_obk/obk_04/BC7EB0.c +++ b/src/world/area_obk/obk_04/BC7EB0.c @@ -22,7 +22,7 @@ INCLUDE_ASM(s32, "world/area_obk/obk_04/BC7EB0", func_80240910_BC8770); INCLUDE_ASM(s32, "world/area_obk/obk_04/BC7EB0", func_80240940_BC87A0); /* -ApiStatus N(func_80240940_BC87A0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240940_BC87A0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80243A10_BCB870) == NULL) { diff --git a/src/world/area_obk/obk_07/BCEBF0.c b/src/world/area_obk/obk_07/BCEBF0.c index cb964dd436..9feb5770c1 100644 --- a/src/world/area_obk/obk_07/BCEBF0.c +++ b/src/world/area_obk/obk_07/BCEBF0.c @@ -5,7 +5,7 @@ static char* N(exit_str_1) = ""; INCLUDE_ASM(s32, "world/area_obk/obk_07/BCEBF0", func_80240000_BCEBF0); /* -ApiStatus N(func_80240000_BCEBF0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_BCEBF0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241FB0_BD0BA0) == NULL) { diff --git a/src/world/area_obk/obk_09/BDAB00.c b/src/world/area_obk/obk_09/BDAB00.c index f47cefc92d..5dbd979160 100644 --- a/src/world/area_obk/obk_09/BDAB00.c +++ b/src/world/area_obk/obk_09/BDAB00.c @@ -4,7 +4,7 @@ static char* N(exit_str_0) = "obk_01\0"; INCLUDE_ASM(s32, "world/area_obk/obk_09/BDAB00", func_80240350_BDAB00); /* -ApiStatus N(func_80240350_BDAB00)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240350_BDAB00)(Evt *script, s32 isInitialCall) { s32 var; void* temp_s0 = load_asset_by_name("party_pokopi", &var); diff --git a/src/world/area_omo/omo_01/D9B150.c b/src/world/area_omo/omo_01/D9B150.c index 60d9f71560..c087697c26 100644 --- a/src/world/area_omo/omo_01/D9B150.c +++ b/src/world/area_omo/omo_01/D9B150.c @@ -4,7 +4,7 @@ static char* N(exit_str_0) = "omo_13"; INCLUDE_ASM(s32, "world/area_omo/omo_01/D9B150", func_80240260_D9B150); /* -void N(func_80240260_D9B150)(ScriptInstance *script, NpcAISettings *npcAISettings, EnemyTerritoryThing *territory) { +void N(func_80240260_D9B150)(Evt *script, NpcAISettings *npcAISettings, EnemyTerritoryThing *territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -116,7 +116,7 @@ void N(func_80240260_D9B150)(ScriptInstance *script, NpcAISettings *npcAISetting INCLUDE_ASM(s32, "world/area_omo/omo_01/D9B150", func_80240844_D9B734); /* -void N(func_80240844_D9B734)(ScriptInstance *script, NpcAISettings *npcAISettings, EnemyTerritoryThing *territory) { +void N(func_80240844_D9B734)(Evt *script, NpcAISettings *npcAISettings, EnemyTerritoryThing *territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); s32 var; @@ -147,7 +147,7 @@ void N(func_80240844_D9B734)(ScriptInstance *script, NpcAISettings *npcAISetting INCLUDE_ASM(s32, "world/area_omo/omo_01/D9B150", func_802409A8_D9B898); /* -void N(func_802409A8_D9B898)(ScriptInstance *script, NpcAISettings *npcAISettings, EnemyTerritoryThing *territory) { +void N(func_802409A8_D9B898)(Evt *script, NpcAISettings *npcAISettings, EnemyTerritoryThing *territory) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_omo/omo_04/DAD400.c b/src/world/area_omo/omo_04/DAD400.c index 9841475c12..bf055682b3 100644 --- a/src/world/area_omo/omo_04/DAD400.c +++ b/src/world/area_omo/omo_04/DAD400.c @@ -5,7 +5,7 @@ static char* N(exit_str_1) = ""; INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240000_DAD400); /* -ApiStatus N(func_80240000_DAD400)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_DAD400)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80242630_DAFA30) == NULL) { @@ -48,7 +48,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240550_DAD950); INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240FF4_DAE3F4); /* -void N(func_80240FF4_DAE3F4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80240FF4_DAE3F4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -69,7 +69,7 @@ void N(func_80240FF4_DAE3F4)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_802416AC_DAEAAC); /* -ApiStatus N(func_802416AC_DAEAAC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802416AC_DAEAAC)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_omo/omo_05/DB22C0.c b/src/world/area_omo/omo_05/DB22C0.c index b4ed7d729b..e7335d4047 100644 --- a/src/world/area_omo/omo_05/DB22C0.c +++ b/src/world/area_omo/omo_05/DB22C0.c @@ -31,7 +31,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80240C04_DB2EC4); INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802416A8_DB3968); /* -void N(func_802416A8_DB3968)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802416A8_DB3968)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -52,7 +52,7 @@ void N(func_802416A8_DB3968)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80241D60_DB4020); /* -ApiStatus N(func_80241D60_DB4020)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241D60_DB4020)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -119,7 +119,7 @@ ApiStatus N(func_80241D60_DB4020)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80242178_DB4438); /* -ApiStatus N(func_80242178_DB4438)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242178_DB4438)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -138,7 +138,7 @@ ApiStatus N(func_80242178_DB4438)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802421CC_DB448C); /* -ApiStatus N(func_802421CC_DB448C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802421CC_DB448C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_8024309C_DB535C) = get_variable(script, *args); @@ -149,7 +149,7 @@ ApiStatus N(func_802421CC_DB448C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80242204_DB44C4); /* -ApiStatus N(func_80242204_DB44C4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242204_DB44C4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -175,7 +175,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80242328_DB45E8); INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802423C8_DB4688); /* -ApiStatus N(func_802423C8_DB4688)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802423C8_DB4688)(Evt *script, s32 isInitialCall) { s32 i; for (i = 0; i <= 90; i++) { diff --git a/src/world/area_omo/omo_06/DB8180.c b/src/world/area_omo/omo_06/DB8180.c index bf68f33b5f..ff025ed027 100644 --- a/src/world/area_omo/omo_06/DB8180.c +++ b/src/world/area_omo/omo_06/DB8180.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_06/DB8180", func_80240870_DB8180); /* -ApiStatus N(func_80240870_DB8180)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240870_DB8180)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802456C0_DBCFD0) == NULL) { diff --git a/src/world/area_omo/omo_07/DBD2B0.c b/src/world/area_omo/omo_07/DBD2B0.c index f6f2b842d5..5b230296e5 100644 --- a/src/world/area_omo/omo_07/DBD2B0.c +++ b/src/world/area_omo/omo_07/DBD2B0.c @@ -37,7 +37,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_80240238_DBD4E8); INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_80241100_DBE3B0); /* -ApiStatus N(func_80241100_DBE3B0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241100_DBE3B0)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -148,7 +148,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_80241B28_DBEDD8); INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_802425CC_DBF87C); /* -void N(func_802425CC_DBF87C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802425CC_DBF87C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -169,7 +169,7 @@ void N(func_802425CC_DBF87C)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_80242C84_DBFF34); /* -ApiStatus N(func_80242C84_DBFF34)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242C84_DBFF34)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_omo/omo_07/DC01D0.c b/src/world/area_omo/omo_07/DC01D0.c index 58d706d9b3..b14a406acb 100644 --- a/src/world/area_omo/omo_07/DC01D0.c +++ b/src/world/area_omo/omo_07/DC01D0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_07/DC01D0", func_80242F20_DC01D0); /* -ApiStatus N(func_80242F20_DC01D0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242F20_DC01D0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80245E00_DC30B0) == NULL) { diff --git a/src/world/area_omo/omo_09/DCD3F0.c b/src/world/area_omo/omo_09/DCD3F0.c index 2d563c11e7..bba5620b18 100644 --- a/src/world/area_omo/omo_09/DCD3F0.c +++ b/src/world/area_omo/omo_09/DCD3F0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_09/DCD3F0", func_80240720_DCD3F0); /* -ApiStatus N(func_80240720_DCD3F0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240720_DCD3F0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80247010_DD3CE0) == NULL) { diff --git a/src/world/area_omo/omo_09/DCD6B0.c b/src/world/area_omo/omo_09/DCD6B0.c index fbf074b315..7927375674 100644 --- a/src/world/area_omo/omo_09/DCD6B0.c +++ b/src/world/area_omo/omo_09/DCD6B0.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_09/DCD6B0", func_80240C18_DCD8E8); INCLUDE_ASM(s32, "world/area_omo/omo_09/DCD6B0", func_80241AE0_DCE7B0); /* -ApiStatus N(func_80241AE0_DCE7B0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241AE0_DCE7B0)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_omo/omo_11/DDCFC0.c b/src/world/area_omo/omo_11/DDCFC0.c index 60817ee38a..381dd1e690 100644 --- a/src/world/area_omo/omo_11/DDCFC0.c +++ b/src/world/area_omo/omo_11/DDCFC0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_11/DDCFC0", func_802407CC_DDCFFC); /* -ApiStatus N(func_802407CC_DDCFFC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802407CC_DDCFFC)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_11/DDCFC0", func_8024095C_DDD18C); INCLUDE_ASM(s32, "world/area_omo/omo_11/DDCFC0", func_80240D90_DDD5C0); /* -ApiStatus N(func_80240D90_DDD5C0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240D90_DDD5C0)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_omo/omo_13/DE2710.c b/src/world/area_omo/omo_13/DE2710.c index eed3f4338f..7e35bd452d 100644 --- a/src/world/area_omo/omo_13/DE2710.c +++ b/src/world/area_omo/omo_13/DE2710.c @@ -22,7 +22,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240A00_DE2E90); INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240F00_DE3390); /* -ApiStatus N(func_80240F00_DE3390)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F00_DE3390)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -41,7 +41,7 @@ ApiStatus N(func_80240F00_DE3390)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240F54_DE33E4); /* -ApiStatus N(func_80240F54_DE33E4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F54_DE33E4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80241C08_DE4098) = get_variable(script, *args); @@ -52,7 +52,7 @@ ApiStatus N(func_80240F54_DE33E4)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240F8C_DE341C); /* -ApiStatus N(func_80240F8C_DE341C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F8C_DE341C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_omo/omo_13/DE36C0.c b/src/world/area_omo/omo_13/DE36C0.c index 854e12c88f..e08a9c0682 100644 --- a/src/world/area_omo/omo_13/DE36C0.c +++ b/src/world/area_omo/omo_13/DE36C0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_13/DE36C0", func_80241230_DE36C0); /* -ApiStatus N(func_80241230_DE36C0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241230_DE36C0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80242C70_DE5100) == NULL) { diff --git a/src/world/area_omo/omo_15/DE8770.c b/src/world/area_omo/omo_15/DE8770.c index 6697922ca1..f8ae0ce1cf 100644 --- a/src/world/area_omo/omo_15/DE8770.c +++ b/src/world/area_omo/omo_15/DE8770.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_15/DE8770", func_80240000_DE8770); /* -ApiStatus N(func_80240000_DE8770)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_DE8770)(Evt* script, s32 isInitialCall) { arn_07_struct* ptr = script->varTable[0]; sfx_adjust_env_sound_pos(0xA2, 0, ptr->unk_00, ptr->unk_04, ptr->unk_08); @@ -12,7 +12,7 @@ ApiStatus N(func_80240000_DE8770)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_omo/omo_15/DE8770", func_8024004C_DE87BC); /* -ApiStatus N(func_8024004C_DE87BC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024004C_DE87BC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -48,7 +48,7 @@ static char* N(exit_str_1) = "omo_14"; INCLUDE_ASM(s32, "world/area_omo/omo_15/DE8770", func_802405BC_DE8D2C); /* -ApiStatus N(func_802405BC_DE8D2C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405BC_DE8D2C)(Evt* script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); arn_07_struct* ptr = script->varTable[0]; @@ -58,7 +58,7 @@ ApiStatus N(func_802405BC_DE8D2C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_omo/omo_15/DE8770", func_802405FC_DE8D6C); /* -ApiStatus N(func_802405FC_DE8D6C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405FC_DE8D6C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { diff --git a/src/world/area_omo/omo_17/DEF400.c b/src/world/area_omo/omo_17/DEF400.c index 4b29bb1683..381f82602f 100644 --- a/src/world/area_omo/omo_17/DEF400.c +++ b/src/world/area_omo/omo_17/DEF400.c @@ -28,7 +28,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_17/DEF400", func_80241164_DF0004); INCLUDE_ASM(s32, "world/area_omo/omo_17/DEF400", func_80241C08_DF0AA8); /* -void N(func_80241C08_DF0AA8)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241C08_DF0AA8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -49,7 +49,7 @@ void N(func_80241C08_DF0AA8)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_omo/omo_17/DEF400", func_802422C0_DF1160); /* -ApiStatus N(func_802422C0_DF1160)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802422C0_DF1160)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_osr/osr_01/AB0350.c b/src/world/area_osr/osr_01/AB0350.c index e78772f886..1b51070592 100644 --- a/src/world/area_osr/osr_01/AB0350.c +++ b/src/world/area_osr/osr_01/AB0350.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240360_AB0350); /* -ApiStatus N(func_80240360_AB0350)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240360_AB0350)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802411B8_AB11A8) == NULL) { @@ -29,7 +29,7 @@ ApiStatus N(func_80240360_AB0350)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_802406A4_AB0694); /* -ApiStatus N(func_802406A4_AB0694)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802406A4_AB0694)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -48,7 +48,7 @@ ApiStatus N(func_802406A4_AB0694)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_802406F8_AB06E8); /* -ApiStatus N(func_802406F8_AB06E8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802406F8_AB06E8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80241220_AB1210) = get_variable(script, *args); @@ -59,7 +59,7 @@ ApiStatus N(func_802406F8_AB06E8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240730_AB0720); /* -ApiStatus N(func_80240730_AB0720)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240730_AB0720)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -85,7 +85,7 @@ ApiStatus N(func_80240730_AB0720)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240A48_AB0A38); /* -ApiStatus N(func_80240A48_AB0A38)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240A48_AB0A38)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -96,7 +96,7 @@ ApiStatus N(func_80240A48_AB0A38)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240A8C_AB0A7C); /* -ApiStatus N(func_80240A8C_AB0A7C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240A8C_AB0A7C)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_pra/pra_01/D4D060.c b/src/world/area_pra/pra_01/D4D060.c index d99098979c..dc5a957c3e 100644 --- a/src/world/area_pra/pra_01/D4D060.c +++ b/src/world/area_pra/pra_01/D4D060.c @@ -4,7 +4,7 @@ #include "common/UnkFogFunc.inc.c" -ApiStatus func_80240F60_D4DFA0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240F60_D4DFA0(Evt* script, s32 isInitialCall) { gOverrideFlags &= ~0x80; return ApiStatus_DONE2; } @@ -15,7 +15,7 @@ ApiStatus func_80240F60_D4DFA0(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_802411AC_D4E1EC); /* -ApiStatus N(func_802411AC_D4E1EC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411AC_D4E1EC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -34,7 +34,7 @@ ApiStatus N(func_802411AC_D4E1EC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_80241200_D4E240); /* -ApiStatus N(func_80241200_D4E240)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241200_D4E240)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80241F98_D4EFD8) = get_variable(script, *args); @@ -45,7 +45,7 @@ ApiStatus N(func_80241200_D4E240)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_80241238_D4E278); /* -ApiStatus N(func_80241238_D4E278)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241238_D4E278)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -67,7 +67,7 @@ ApiStatus N(func_80241238_D4E278)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_802412D4_D4E314); /* -ApiStatus N(func_802412D4_D4E314)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802412D4_D4E314)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -87,7 +87,7 @@ ApiStatus N(func_802412D4_D4E314)(ScriptInstance* script, s32 isInitialCall) { } */ -ApiStatus PostChapter7StatUpdate(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PostChapter7StatUpdate(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; set_max_SP(7); diff --git a/src/world/area_pra/pra_02/D50010.c b/src/world/area_pra/pra_02/D50010.c index 5eb34e1c0e..747227f8dc 100644 --- a/src/world/area_pra/pra_02/D50010.c +++ b/src/world/area_pra/pra_02/D50010.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_8024114C_D5113C); /* -ApiStatus N(func_8024114C_D5113C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024114C_D5113C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -27,7 +27,7 @@ ApiStatus N(func_8024114C_D5113C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_802411A0_D51190); /* -ApiStatus N(func_802411A0_D51190)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411A0_D51190)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80242AD0_D52AC0) = get_variable(script, *args); @@ -38,7 +38,7 @@ ApiStatus N(func_802411A0_D51190)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_802411D8_D511C8); /* -ApiStatus N(func_802411D8_D511C8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411D8_D511C8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -60,7 +60,7 @@ ApiStatus N(func_802411D8_D511C8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_80241274_D51264); /* -ApiStatus N(func_80241274_D51264)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241274_D51264)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_pra/pra_05/D55BD0.c b/src/world/area_pra/pra_05/D55BD0.c index 3ffc166beb..aeaa317d07 100644 --- a/src/world/area_pra/pra_05/D55BD0.c +++ b/src/world/area_pra/pra_05/D55BD0.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_05/D55BD0", func_80240F20_D56AD0); /* -ApiStatus N(func_80240F20_D56AD0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F20_D56AD0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241680_D57230) == NULL) { diff --git a/src/world/area_pra/pra_09/D588B0.c b/src/world/area_pra/pra_09/D588B0.c index 4da4ce899b..bfa1bdb84d 100644 --- a/src/world/area_pra/pra_09/D588B0.c +++ b/src/world/area_pra/pra_09/D588B0.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_8024114C_D599DC); /* -ApiStatus N(func_8024114C_D599DC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024114C_D599DC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -27,7 +27,7 @@ ApiStatus N(func_8024114C_D599DC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_802411A0_D59A30); /* -ApiStatus N(func_802411A0_D59A30)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411A0_D59A30)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80241D9C_D5A62C) = get_variable(script, *args); @@ -38,7 +38,7 @@ ApiStatus N(func_802411A0_D59A30)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_802411D8_D59A68); /* -ApiStatus N(func_802411D8_D59A68)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411D8_D59A68)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -60,7 +60,7 @@ ApiStatus N(func_802411D8_D59A68)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_80241274_D59B04); /* -ApiStatus N(func_80241274_D59B04)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241274_D59B04)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_pra/pra_11/D61520.c b/src/world/area_pra/pra_11/D61520.c index e68d09aee7..9b75c87ce5 100644 --- a/src/world/area_pra/pra_11/D61520.c +++ b/src/world/area_pra/pra_11/D61520.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_11/D61520", func_80240F20_D62420); /* -ApiStatus N(func_80240F20_D62420)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F20_D62420)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241610_D62B10) == NULL) { diff --git a/src/world/area_pra/pra_12/D62D10.c b/src/world/area_pra/pra_12/D62D10.c index 756a7c19cb..4652dc7713 100644 --- a/src/world/area_pra/pra_12/D62D10.c +++ b/src/world/area_pra/pra_12/D62D10.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_12/D62D10", func_80240000_D62D10); INCLUDE_ASM(s32, "world/area_pra/pra_12/D62D10", func_80240F50_D63C60); /* -ApiStatus N(func_80240F50_D63C60)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F50_D63C60)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802416B0_D643C0) == NULL) { diff --git a/src/world/area_pra/pra_13/D64600.c b/src/world/area_pra/pra_13/D64600.c index 4339b2d0fd..71dcc3d360 100644 --- a/src/world/area_pra/pra_13/D64600.c +++ b/src/world/area_pra/pra_13/D64600.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_8024114C_D6572C); /* -ApiStatus N(func_8024114C_D6572C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024114C_D6572C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -27,7 +27,7 @@ ApiStatus N(func_8024114C_D6572C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_802411A0_D65780); /* -ApiStatus N(func_802411A0_D65780)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411A0_D65780)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802422D0_D668B0) = get_variable(script, *args); @@ -38,7 +38,7 @@ ApiStatus N(func_802411A0_D65780)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_802411D8_D657B8); /* -ApiStatus N(func_802411D8_D657B8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411D8_D657B8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -60,7 +60,7 @@ ApiStatus N(func_802411D8_D657B8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_80241274_D65854); /* -ApiStatus N(func_80241274_D65854)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241274_D65854)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -84,7 +84,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_80241310_D658F0); INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_802413A4_D65984); /* -ApiStatus N(func_802413A4_D65984)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802413A4_D65984)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } diff --git a/src/world/area_pra/pra_14/D67D20.c b/src/world/area_pra/pra_14/D67D20.c index 5e529b4cd6..629dd331db 100644 --- a/src/world/area_pra/pra_14/D67D20.c +++ b/src/world/area_pra/pra_14/D67D20.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_14/D67D20", func_80240F20_D68C20); /* -ApiStatus N(func_80240F20_D68C20)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F20_D68C20)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241930_D69630) == NULL) { diff --git a/src/world/area_pra/pra_19/D6E9D0.c b/src/world/area_pra/pra_19/D6E9D0.c index 87cb2551fb..458c157c32 100644 --- a/src/world/area_pra/pra_19/D6E9D0.c +++ b/src/world/area_pra/pra_19/D6E9D0.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_8024114C_D6FAFC); /* -ApiStatus N(func_8024114C_D6FAFC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024114C_D6FAFC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -27,7 +27,7 @@ ApiStatus N(func_8024114C_D6FAFC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_802411A0_D6FB50); /* -ApiStatus N(func_802411A0_D6FB50)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411A0_D6FB50)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802421A0_D70B50) = get_variable(script, *args); @@ -38,7 +38,7 @@ ApiStatus N(func_802411A0_D6FB50)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_802411D8_D6FB88); /* -ApiStatus N(func_802411D8_D6FB88)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411D8_D6FB88)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -60,7 +60,7 @@ ApiStatus N(func_802411D8_D6FB88)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_80241274_D6FC24); /* -ApiStatus N(func_80241274_D6FC24)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241274_D6FC24)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_pra/pra_27/D799F0.c b/src/world/area_pra/pra_27/D799F0.c index e7f9efa4bf..4e140779ab 100644 --- a/src/world/area_pra/pra_27/D799F0.c +++ b/src/world/area_pra/pra_27/D799F0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_27/D799F0", func_80240000_D799F0); INCLUDE_ASM(s32, "world/area_pra/pra_27/D799F0", func_80240F50_D7A940); /* -ApiStatus N(func_80240F50_D7A940)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F50_D7A940)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241690_D7B080) == NULL) { diff --git a/src/world/area_pra/pra_28/D7B2A0.c b/src/world/area_pra/pra_28/D7B2A0.c index dfa7f09896..bacc1c35c0 100644 --- a/src/world/area_pra/pra_28/D7B2A0.c +++ b/src/world/area_pra/pra_28/D7B2A0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_28/D7B2A0", func_80240000_D7B2A0); INCLUDE_ASM(s32, "world/area_pra/pra_28/D7B2A0", func_80240F50_D7C1F0); /* -ApiStatus N(func_80240F50_D7C1F0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240F50_D7C1F0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241690_D7C930) == NULL) { diff --git a/src/world/area_pra/pra_31/D7ED80.c b/src/world/area_pra/pra_31/D7ED80.c index 361e794d00..b8e0cedc13 100644 --- a/src/world/area_pra/pra_31/D7ED80.c +++ b/src/world/area_pra/pra_31/D7ED80.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_31/D7ED80", func_8024024C_D7EFAC); /* -ApiStatus N(func_8024024C_D7EFAC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024024C_D7EFAC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -25,7 +25,7 @@ ApiStatus N(func_8024024C_D7EFAC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_31/D7ED80", func_802402A0_D7F000); /* -ApiStatus N(func_802402A0_D7F000)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802402A0_D7F000)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802411A0_D7FF00) = get_variable(script, *args); @@ -36,7 +36,7 @@ ApiStatus N(func_802402A0_D7F000)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_31/D7ED80", func_802402D8_D7F038); /* -ApiStatus N(func_802402D8_D7F038)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802402D8_D7F038)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -58,7 +58,7 @@ ApiStatus N(func_802402D8_D7F038)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_31/D7ED80", func_80240374_D7F0D4); /* -ApiStatus N(func_80240374_D7F0D4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240374_D7F0D4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_pra/pra_32/D86A20.c b/src/world/area_pra/pra_32/D86A20.c index 262e1588f1..f73fe0ddc9 100644 --- a/src/world/area_pra/pra_32/D86A20.c +++ b/src/world/area_pra/pra_32/D86A20.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_32/D86A20", func_80240020_D86A20); /* -ApiStatus N(func_80240020_D86A20)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240020_D86A20)(Evt* script, s32 isInitialCall) { arn_07_struct* ptr = script->varTable[0]; sfx_adjust_env_sound_pos(0xA2, 0, ptr->unk_00, ptr->unk_04, ptr->unk_08); @@ -12,7 +12,7 @@ ApiStatus N(func_80240020_D86A20)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_32/D86A20", func_8024006C_D86A6C); /* -ApiStatus N(func_8024006C_D86A6C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024006C_D86A6C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -48,7 +48,7 @@ static char* N(exit_str_1) = "pra_40"; INCLUDE_ASM(s32, "world/area_pra/pra_32/D86A20", func_802405DC_D86FDC); /* -ApiStatus N(func_802405DC_D86FDC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405DC_D86FDC)(Evt* script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); arn_07_struct* ptr = script->varTable[0]; @@ -58,7 +58,7 @@ ApiStatus N(func_802405DC_D86FDC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_32/D86A20", func_8024061C_D8701C); /* -ApiStatus N(func_8024061C_D8701C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024061C_D8701C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -82,7 +82,7 @@ ApiStatus N(func_8024061C_D8701C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_pra/pra_32/D86A20", func_80240728_D87128); /* -ApiStatus N(func_80240728_D87128)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240728_D87128)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; arn_07_struct* ptr = script->varTable[0]; diff --git a/src/world/area_pra/pra_35/D8D270.c b/src/world/area_pra/pra_35/D8D270.c index f14ad95bcf..63a52e951c 100644 --- a/src/world/area_pra/pra_35/D8D270.c +++ b/src/world/area_pra/pra_35/D8D270.c @@ -26,7 +26,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_35/D8D270", func_80241AB4_D8ED04); /* -ApiStatus N(func_80241AB4_D8ED04)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241AB4_D8ED04)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -129,7 +129,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_35/D8D270", func_802423CC_D8F61C); INCLUDE_ASM(s32, "world/area_pra/pra_35/D8D270", func_80242698_D8F8E8); /* -ApiStatus N(func_80242698_D8F8E8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80242698_D8F8E8)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_pra/pra_35/D8FBA0.c b/src/world/area_pra/pra_35/D8FBA0.c index 701a2ab9bc..e210b9c6e8 100644 --- a/src/world/area_pra/pra_35/D8FBA0.c +++ b/src/world/area_pra/pra_35/D8FBA0.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_35/D8FBA0", func_80242950_D8FBA0); /* -ApiStatus N(func_80242950_D8FBA0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80242950_D8FBA0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80243DE0_D91030) == NULL) { diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index 2a7128045b..56351cb833 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024053C_CF80AC); /* -ApiStatus N(func_8024053C_CF80AC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024053C_CF80AC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -27,7 +27,7 @@ ApiStatus N(func_8024053C_CF80AC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240590_CF8100); /* -ApiStatus N(func_80240590_CF8100)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240590_CF8100)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_802432D4_CFAE44) = get_variable(script, *args); @@ -38,7 +38,7 @@ ApiStatus N(func_80240590_CF8100)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_802405C8_CF8138); /* -ApiStatus N(func_802405C8_CF8138)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405C8_CF8138)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -60,7 +60,7 @@ ApiStatus N(func_802405C8_CF8138)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240664_CF81D4); /* -ApiStatus N(func_80240664_CF81D4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240664_CF81D4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -82,7 +82,7 @@ ApiStatus N(func_80240664_CF81D4)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240700_CF8270); /* -ApiStatus N(func_80240700_CF8270)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240700_CF8270)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802435F0_CFB160) == NULL) { @@ -107,7 +107,7 @@ ApiStatus N(func_80240700_CF8270)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024083C_CF83AC); /* -ApiStatus N(func_8024083C_CF83AC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024083C_CF83AC)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -169,7 +169,7 @@ ApiStatus N(func_8024083C_CF83AC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240DEC_CF895C); /* -ApiStatus N(func_80240DEC_CF895C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240DEC_CF895C)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -190,7 +190,7 @@ ApiStatus N(func_80240DEC_CF895C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240E70_CF89E0); /* -ApiStatus N(func_80240E70_CF89E0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240E70_CF89E0)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -226,7 +226,7 @@ ApiStatus N(func_80240E70_CF89E0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241088_CF8BF8); /* -ApiStatus N(func_80241088_CF8BF8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241088_CF8BF8)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -254,7 +254,7 @@ ApiStatus N(func_80241088_CF8BF8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024113C_CF8CAC); /* -ApiStatus N(func_8024113C_CF8CAC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024113C_CF8CAC)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -262,7 +262,7 @@ ApiStatus N(func_8024113C_CF8CAC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241170_CF8CE0); /* -ApiStatus N(func_80241170_CF8CE0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241170_CF8CE0)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -287,7 +287,7 @@ ApiStatus N(func_80241170_CF8CE0)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_802411F0_CF8D60); /* -ApiStatus N(func_802411F0_CF8D60)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802411F0_CF8D60)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -295,7 +295,7 @@ ApiStatus N(func_802411F0_CF8D60)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241208_CF8D78); /* -ApiStatus N(func_80241208_CF8D78)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241208_CF8D78)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -303,7 +303,7 @@ ApiStatus N(func_80241208_CF8D78)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241224_CF8D94); /* -ApiStatus N(func_80241224_CF8D94)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241224_CF8D94)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -336,7 +336,7 @@ void N(func_802416F8_CF9268)(void) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241764_CF92D4); /* -ApiStatus N(func_80241764_CF92D4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241764_CF92D4)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } @@ -348,7 +348,7 @@ ApiStatus N(func_80241764_CF92D4)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241A10_CF9580); /* -ApiStatus N(func_80241A10_CF9580)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241A10_CF9580)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -359,7 +359,7 @@ ApiStatus N(func_80241A10_CF9580)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241A54_CF95C4); /* -ApiStatus N(func_80241A54_CF95C4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241A54_CF95C4)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } @@ -371,7 +371,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241B20_CF9690); INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241C90_CF9800); /* -ApiStatus N(func_80241C90_CF9800)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241C90_CF9800)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_8024D8F0_D05460) == NULL) { diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 28142a05b1..07414b962d 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -24,7 +24,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240B2C_D0625C); /* -ApiStatus N(func_80240B2C_D0625C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240B2C_D0625C)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80246B60_D0C290) == NULL) { @@ -49,7 +49,7 @@ ApiStatus N(func_80240B2C_D0625C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240C68_D06398); /* -ApiStatus N(func_80240C68_D06398)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240C68_D06398)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -111,7 +111,7 @@ ApiStatus N(func_80240C68_D06398)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", begin_battle_D06948); /* -ApiStatus N(begin_battle_D06948)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(begin_battle_D06948)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -132,7 +132,7 @@ ApiStatus N(begin_battle_D06948)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_8024129C_D069CC); /* -ApiStatus N(func_8024129C_D069CC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024129C_D069CC)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -168,7 +168,7 @@ ApiStatus N(func_8024129C_D069CC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_802414B4_D06BE4); /* -ApiStatus N(func_802414B4_D06BE4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802414B4_D06BE4)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -196,7 +196,7 @@ ApiStatus N(func_802414B4_D06BE4)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241568_D06C98); /* -ApiStatus N(func_80241568_D06C98)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241568_D06C98)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -204,7 +204,7 @@ ApiStatus N(func_80241568_D06C98)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_8024159C_D06CCC); /* -ApiStatus N(func_8024159C_D06CCC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024159C_D06CCC)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -229,7 +229,7 @@ ApiStatus N(func_8024159C_D06CCC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_8024161C_D06D4C); /* -ApiStatus N(func_8024161C_D06D4C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024161C_D06D4C)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -237,7 +237,7 @@ ApiStatus N(func_8024161C_D06D4C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241634_D06D64); /* -ApiStatus N(func_80241634_D06D64)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241634_D06D64)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -245,7 +245,7 @@ ApiStatus N(func_80241634_D06D64)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241650_D06D80); /* -ApiStatus N(func_80241650_D06D80)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241650_D06D80)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -278,7 +278,7 @@ void N(func_80241B24_D07254)(void) { INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241B90_D072C0); /* -ApiStatus N(func_80241B90_D072C0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241B90_D072C0)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } diff --git a/src/world/area_sam/sam_04/D138E0.c b/src/world/area_sam/sam_04/D138E0.c index 66fffd8f44..d813ab6f47 100644 --- a/src/world/area_sam/sam_04/D138E0.c +++ b/src/world/area_sam/sam_04/D138E0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_04/D138E0", func_8024053C_D13B0C); /* -ApiStatus N(func_8024053C_D13B0C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024053C_D13B0C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -25,7 +25,7 @@ ApiStatus N(func_8024053C_D13B0C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_04/D138E0", func_80240590_D13B60); /* -ApiStatus N(func_80240590_D13B60)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240590_D13B60)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80243880_D16E50) = get_variable(script, *args); @@ -36,7 +36,7 @@ ApiStatus N(func_80240590_D13B60)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_04/D138E0", func_802405C8_D13B98); /* -ApiStatus N(func_802405C8_D13B98)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405C8_D13B98)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -58,7 +58,7 @@ ApiStatus N(func_802405C8_D13B98)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_04/D138E0", func_80240664_D13C34); /* -ApiStatus N(func_80240664_D13C34)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240664_D13C34)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; diff --git a/src/world/area_sam/sam_06/D203E0.c b/src/world/area_sam/sam_06/D203E0.c index ba1180f1c8..b55f8ce825 100644 --- a/src/world/area_sam/sam_06/D203E0.c +++ b/src/world/area_sam/sam_06/D203E0.c @@ -12,7 +12,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80240700_D20590); INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_802411A4_D21034); /* -void N(func_802411A4_D21034)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_802411A4_D21034)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -33,7 +33,7 @@ void N(func_802411A4_D21034)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_8024185C_D216EC); /* -ApiStatus N(func_8024185C_D216EC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024185C_D216EC)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -96,7 +96,7 @@ ApiStatus N(func_8024185C_D216EC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241A48_D218D8); /* -ApiStatus N(func_80241A48_D218D8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241A48_D218D8)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802443D0_D24260) == NULL) { @@ -123,7 +123,7 @@ ApiStatus N(func_80241A48_D218D8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241D8C_D21C1C); /* -ApiStatus N(func_80241D8C_D21C1C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241D8C_D21C1C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -142,7 +142,7 @@ ApiStatus N(func_80241D8C_D21C1C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241DE0_D21C70); /* -ApiStatus N(func_80241DE0_D21C70)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241DE0_D21C70)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80244438_D242C8) = get_variable(script, *args); @@ -153,7 +153,7 @@ ApiStatus N(func_80241DE0_D21C70)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241E18_D21CA8); /* -ApiStatus N(func_80241E18_D21CA8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241E18_D21CA8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -175,7 +175,7 @@ ApiStatus N(func_80241E18_D21CA8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241EB4_D21D44); /* -ApiStatus N(func_80241EB4_D21D44)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241EB4_D21D44)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -221,7 +221,7 @@ ApiStatus N(func_80241EB4_D21D44)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_802424C8_D22358); /* -ApiStatus N(func_802424C8_D22358)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802424C8_D22358)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -232,7 +232,7 @@ ApiStatus N(func_802424C8_D22358)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_8024250C_D2239C); /* -ApiStatus N(func_8024250C_D2239C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024250C_D2239C)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_sam/sam_08/D2FC80.c b/src/world/area_sam/sam_08/D2FC80.c index 38c547f191..781459a83f 100644 --- a/src/world/area_sam/sam_08/D2FC80.c +++ b/src/world/area_sam/sam_08/D2FC80.c @@ -9,7 +9,7 @@ static char* N(exit_str_1) = "sam_09"; INCLUDE_ASM(s32, "world/area_sam/sam_08/D2FC80", func_8024003C_D2FCBC); /* -ApiStatus N(func_8024003C_D2FCBC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024003C_D2FCBC)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -33,7 +33,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_08/D2FC80", func_802401CC_D2FE4C); INCLUDE_ASM(s32, "world/area_sam/sam_08/D2FC80", func_80240600_D30280); /* -ApiStatus N(func_80240600_D30280)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240600_D30280)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_sam/sam_09/D362F0.c b/src/world/area_sam/sam_09/D362F0.c index ab040554d1..86bd1e6dab 100644 --- a/src/world/area_sam/sam_09/D362F0.c +++ b/src/world/area_sam/sam_09/D362F0.c @@ -5,7 +5,7 @@ static char* N(exit_str_1) = "sam_10"; INCLUDE_ASM(s32, "world/area_sam/sam_09/D362F0", func_80240000_D362F0); /* -ApiStatus N(func_80240000_D362F0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_D362F0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802406C0_D369B0) == NULL) { diff --git a/src/world/area_sam/sam_10/D37800.c b/src/world/area_sam/sam_10/D37800.c index 4b392b6042..824cf38ee2 100644 --- a/src/world/area_sam/sam_10/D37800.c +++ b/src/world/area_sam/sam_10/D37800.c @@ -7,7 +7,7 @@ static char* N(exit_str_3) = ""; INCLUDE_ASM(s32, "world/area_sam/sam_10/D37800", func_80240000_D37800); /* -ApiStatus N(func_80240000_D37800)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_D37800)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241040_D38840) == NULL) { diff --git a/src/world/area_sam/sam_11/D3A930.c b/src/world/area_sam/sam_11/D3A930.c index cf23f24479..079307c2db 100644 --- a/src/world/area_sam/sam_11/D3A930.c +++ b/src/world/area_sam/sam_11/D3A930.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240360_D3A930); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_8024052C_D3AAFC); -ApiStatus Set80151310_2(ScriptInstance* script, s32 isInitialCall) { +ApiStatus Set80151310_2(Evt* script, s32 isInitialCall) { D_80151310 = 2; return ApiStatus_DONE2; } diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index 2c575400c4..9d628a1af7 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802407D0_D3ADA0); /* -ApiStatus N(func_802407D0_D3ADA0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802407D0_D3ADA0)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80244F78_D3F548) == NULL) { @@ -31,7 +31,7 @@ ApiStatus N(func_802407D0_D3ADA0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_8024090C_D3AEDC); /* -ApiStatus N(func_8024090C_D3AEDC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024090C_D3AEDC)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemyID; u16 phi_s0 = get_variable(script, SI_SAVE_FLAG(1768)); u16 phi_s7 = get_variable(script, SI_SAVE_FLAG(1769)); @@ -93,7 +93,7 @@ ApiStatus N(func_8024090C_D3AEDC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_80240EBC_D3B48C); /* -ApiStatus N(func_80240EBC_D3B48C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240EBC_D3B48C)(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; u16 quizzesAnswered = gPlayerData.quizzesAnswered; @@ -114,7 +114,7 @@ ApiStatus N(func_80240EBC_D3B48C)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_80240F40_D3B510); /* -ApiStatus N(func_80240F40_D3B510)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240F40_D3B510)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -150,7 +150,7 @@ ApiStatus N(func_80240F40_D3B510)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_80241158_D3B728); /* -ApiStatus N(func_80241158_D3B728)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241158_D3B728)(Evt *script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { @@ -178,7 +178,7 @@ ApiStatus N(func_80241158_D3B728)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_8024120C_D3B7DC); /* -ApiStatus N(func_8024120C_D3B7DC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024120C_D3B7DC)(Evt *script, s32 isInitialCall) { D_8024DFE0->unk_0C->unk_34 = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -186,7 +186,7 @@ ApiStatus N(func_8024120C_D3B7DC)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_80241240_D3B810); /* -ApiStatus N(func_80241240_D3B810)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241240_D3B810)(Evt *script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); EffectInstanceDataThing* effectPtr = D_8024DFE0->unk_0C; @@ -211,7 +211,7 @@ ApiStatus N(func_80241240_D3B810)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802412C0_D3B890); /* -ApiStatus N(func_802412C0_D3B890)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802412C0_D3B890)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 0; return ApiStatus_DONE2; } @@ -219,7 +219,7 @@ ApiStatus N(func_802412C0_D3B890)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802412D8_D3B8A8); /* -ApiStatus N(func_802412D8_D3B8A8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802412D8_D3B8A8)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 1; return ApiStatus_DONE2; } @@ -227,7 +227,7 @@ ApiStatus N(func_802412D8_D3B8A8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802412F4_D3B8C4); /* -ApiStatus N(func_802412F4_D3B8C4)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802412F4_D3B8C4)(Evt *script, s32 isInitialCall) { D_8024DFE8->unk_0C->unk_1C = 2; return ApiStatus_DONE2; } @@ -260,7 +260,7 @@ void N(func_802417C8_D3BD98)(void) { INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_80241834_D3BE04); /* -ApiStatus N(func_80241834_D3BE04)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241834_D3BE04)(Evt *script, s32 isInitialCall) { D_8024DFC0 = create_generic_entity_frontUI(NULL, N(func_80242468_95D668)); return ApiStatus_DONE2; } diff --git a/src/world/area_sbk/sbk_00/929270.c b/src/world/area_sbk/sbk_00/929270.c index 9564c7e3af..9419d40826 100644 --- a/src/world/area_sbk/sbk_00/929270.c +++ b/src/world/area_sbk/sbk_00/929270.c @@ -18,16 +18,16 @@ MapConfig N(config) = { .tattle = { MSG_sbk_00_tattle }, }; -Script N(exitWalk_802400E0) = EXIT_WALK_SCRIPT(60, 1, "sbk_01", 0); +EvtSource N(exitWalk_802400E0) = EXIT_WALK_SCRIPT(60, 1, "sbk_01", 0); -Script N(exitWalk_8024013C) = EXIT_WALK_SCRIPT(60, 3, "sbk_10", 2); +EvtSource N(exitWalk_8024013C) = EXIT_WALK_SCRIPT(60, 3, "sbk_10", 2); -Script N(80240198) = SCRIPT({ +EvtSource N(80240198) = SCRIPT({ bind N(exitWalk_802400E0) TRIGGER_FLOOR_ABOVE 3; bind N(exitWalk_8024013C) TRIGGER_FLOOR_ABOVE 6; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_DRY_DRY_DESERT; SetSpriteShading(-1); if (SI_STORY_PROGRESS == STORY_CH2_GOT_PULSE_STONE) { diff --git a/src/world/area_sbk/sbk_00/9292B0.c b/src/world/area_sbk/sbk_00/9292B0.c index d8e4412d59..66d7bfe407 100644 --- a/src/world/area_sbk/sbk_00/9292B0.c +++ b/src/world/area_sbk/sbk_00/9292B0.c @@ -16,7 +16,7 @@ NpcAISettings N(npcAISettings_80240300) = { .unk_2C = 1, }; -Script N(npcAI_80240330) = SCRIPT({ +EvtSource N(npcAI_80240330) = SCRIPT({ N(SetNpcB5_3)(); DoBasicAI(N(npcAISettings_80240300)); }); @@ -114,7 +114,7 @@ static s32 N(pad_78C) = { 0x00000000, }; -Script N(makeEntities) = SCRIPT({ +EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA564, -230, 0, 155, 0, ITEM_FRIGHT_JAR, MAKE_ENTITY_END); AssignBlockFlag(SI_SAVE_FLAG(797)); MakeEntity(0x802EA564, 160, 0, 205, 0, ITEM_COIN, MAKE_ENTITY_END); diff --git a/src/world/area_sbk/sbk_00/sbk_00.h b/src/world/area_sbk/sbk_00/sbk_00.h index 16020fa269..b6ff97de73 100644 --- a/src/world/area_sbk/sbk_00/sbk_00.h +++ b/src/world/area_sbk/sbk_00/sbk_00.h @@ -3,6 +3,6 @@ #define NAMESPACE sbk_00 -extern Script N(main); +extern EvtSource N(main); extern NpcGroupList N(npcGroupList_80240768); -extern Script N(makeEntities); +extern EvtSource N(makeEntities); diff --git a/src/world/area_sbk/sbk_01/929A90.c b/src/world/area_sbk/sbk_01/929A90.c index df1c2cb1ad..7ca0612c03 100644 --- a/src/world/area_sbk/sbk_01/929A90.c +++ b/src/world/area_sbk/sbk_01/929A90.c @@ -3,7 +3,7 @@ #include "world/common/SpawnSunEffect.inc.c" -extern Script N(main); +extern EvtSource N(main); extern NpcGroupList N(npcGroupList_802407D8); EntryList N(entryList) = { @@ -21,19 +21,19 @@ MapConfig N(config) = { .tattle = { MSG_sbk_01_tattle }, }; -Script N(exitWalk_802400E0) = EXIT_WALK_SCRIPT(60, 0, "sbk_00", 1); +EvtSource N(exitWalk_802400E0) = EXIT_WALK_SCRIPT(60, 0, "sbk_00", 1); -Script N(exitWalk_8024013C) = EXIT_WALK_SCRIPT(60, 1, "sbk_02", 0); +EvtSource N(exitWalk_8024013C) = EXIT_WALK_SCRIPT(60, 1, "sbk_02", 0); -Script N(exitWalk_80240198) = EXIT_WALK_SCRIPT(60, 3, "sbk_11", 2); +EvtSource N(exitWalk_80240198) = EXIT_WALK_SCRIPT(60, 3, "sbk_11", 2); -Script N(802401F4) = SCRIPT({ +EvtSource N(802401F4) = SCRIPT({ bind N(exitWalk_802400E0) TRIGGER_FLOOR_ABOVE 7; bind N(exitWalk_8024013C) TRIGGER_FLOOR_ABOVE 3; bind N(exitWalk_80240198) TRIGGER_FLOOR_ABOVE 5; }); -Script N(main) = SCRIPT({ +EvtSource N(main) = SCRIPT({ SI_WORLD_LOCATION = LOCATION_DRY_DRY_DESERT; SetSpriteShading(-1); if (SI_STORY_PROGRESS == STORY_CH2_GOT_PULSE_STONE) { diff --git a/src/world/area_sbk/sbk_01/929AD0.c b/src/world/area_sbk/sbk_01/929AD0.c index ca71deea90..eafef586cd 100644 --- a/src/world/area_sbk/sbk_01/929AD0.c +++ b/src/world/area_sbk/sbk_01/929AD0.c @@ -16,7 +16,7 @@ NpcAISettings N(npcAISettings_80240370) = { .unk_2C = 1, }; -Script N(npcAI_802403A0) = SCRIPT({ +EvtSource N(npcAI_802403A0) = SCRIPT({ N(SetNpcB5_3)(); DoBasicAI(N(npcAISettings_80240370)); }); diff --git a/src/world/area_sbk/sbk_01/sbk_01.h b/src/world/area_sbk/sbk_01/sbk_01.h index a7226c6224..91eed08a6b 100644 --- a/src/world/area_sbk/sbk_01/sbk_01.h +++ b/src/world/area_sbk/sbk_01/sbk_01.h @@ -3,5 +3,5 @@ #define NAMESPACE sbk_01 -extern Script N(main); +extern EvtSource N(main); extern NpcGroupList N(npcGroupList_802407D8); diff --git a/src/world/area_sbk/sbk_02/92A9A0.c b/src/world/area_sbk/sbk_02/92A9A0.c index 66c88ee23a..69e9bad8b7 100644 --- a/src/world/area_sbk/sbk_02/92A9A0.c +++ b/src/world/area_sbk/sbk_02/92A9A0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_sbk/sbk_02/92A9A0", func_8024091C_92ABCC); /* -ApiStatus N(func_8024091C_92ABCC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024091C_92ABCC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -25,7 +25,7 @@ ApiStatus N(func_8024091C_92ABCC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_02/92A9A0", func_80240970_92AC20); /* -ApiStatus N(func_80240970_92AC20)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240970_92AC20)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80244050_92E300) = get_variable(script, *args); @@ -36,7 +36,7 @@ ApiStatus N(func_80240970_92AC20)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_02/92A9A0", func_802409A8_92AC58); /* -ApiStatus N(func_802409A8_92AC58)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802409A8_92AC58)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -58,7 +58,7 @@ ApiStatus N(func_802409A8_92AC58)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_02/92A9A0", func_80240A44_92ACF4); /* -ApiStatus N(func_80240A44_92ACF4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240A44_92ACF4)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802441D8_92E488) == NULL) { @@ -79,7 +79,7 @@ ApiStatus N(func_80240A44_92ACF4)(ScriptInstance* script, s32 isInitialCall) { #include "world/common/GetItemName.inc.c" -ApiStatus PostChapter2StatUpdate(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PostChapter2StatUpdate(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; set_max_SP(2); @@ -91,7 +91,7 @@ ApiStatus PostChapter2StatUpdate(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_02/92A9A0", func_80240B98_92AE48); -ApiStatus GetItemCount(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetItemCount(Evt* script, s32 isInitialCall) { script->varTable[0] = get_item_count(); return ApiStatus_DONE2; } diff --git a/src/world/area_sbk/sbk_30/93F5B0.c b/src/world/area_sbk/sbk_30/93F5B0.c index 4fa35b2ce0..e0e8cc5dc5 100644 --- a/src/world/area_sbk/sbk_30/93F5B0.c +++ b/src/world/area_sbk/sbk_30/93F5B0.c @@ -37,7 +37,7 @@ INCLUDE_ASM(s32, "world/area_sbk/sbk_30/93F5B0", func_80240B64_940114); INCLUDE_ASM(s32, "world/area_sbk/sbk_30/93F5B0", func_80240DDC_94038C); /* -ApiStatus N(func_80240DDC_94038C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240DDC_94038C)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241FF4_9415A4) == NULL) { @@ -64,7 +64,7 @@ ApiStatus N(func_80240DDC_94038C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_30/93F5B0", func_80241120_9406D0); /* -ApiStatus N(func_80241120_9406D0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241120_9406D0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -83,7 +83,7 @@ ApiStatus N(func_80241120_9406D0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_30/93F5B0", func_80241174_940724); /* -ApiStatus N(func_80241174_940724)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241174_940724)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_8024205C_94160C) = get_variable(script, *args); @@ -94,7 +94,7 @@ ApiStatus N(func_80241174_940724)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_30/93F5B0", func_802411AC_94075C); /* -ApiStatus N(func_802411AC_94075C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802411AC_94075C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -116,7 +116,7 @@ ApiStatus N(func_802411AC_94075C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_30/93F5B0", func_80241248_9407F8); /* -ApiStatus N(func_80241248_9407F8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241248_9407F8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -142,7 +142,7 @@ ApiStatus N(func_80241248_9407F8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_30/93F5B0", func_80241560_940B10); /* -ApiStatus N(func_80241560_940B10)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80241560_940B10)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -153,7 +153,7 @@ ApiStatus N(func_80241560_940B10)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_30/93F5B0", func_802415A4_940B54); /* -ApiStatus N(func_802415A4_940B54)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802415A4_940B54)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_sbk/sbk_34/945F10.c b/src/world/area_sbk/sbk_34/945F10.c index 629925da0b..f0cd696d2f 100644 --- a/src/world/area_sbk/sbk_34/945F10.c +++ b/src/world/area_sbk/sbk_34/945F10.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_sbk/sbk_34/945F10", func_80240040_945F10); /* -ApiStatus N(func_80240040_945F10)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240040_945F10)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80240D9C_946C6C) == NULL) { @@ -29,7 +29,7 @@ ApiStatus N(func_80240040_945F10)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_34/945F10", func_80240384_946254); /* -ApiStatus N(func_80240384_946254)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240384_946254)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -48,7 +48,7 @@ ApiStatus N(func_80240384_946254)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_34/945F10", func_802403D8_9462A8); /* -ApiStatus N(func_802403D8_9462A8)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802403D8_9462A8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; N(D_80240E04_946CD4) = get_variable(script, *args); @@ -59,7 +59,7 @@ ApiStatus N(func_802403D8_9462A8)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_34/945F10", func_80240410_9462E0); /* -ApiStatus N(func_80240410_9462E0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240410_9462E0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32* ptr = get_variable(script, *args); s32 i; @@ -85,7 +85,7 @@ ApiStatus N(func_80240410_9462E0)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_34/945F10", func_80240728_9465F8); /* -ApiStatus N(func_80240728_9465F8)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240728_9465F8)(Evt *script, s32 isInitialCall) { Npc *npc = get_npc_unsafe(script->varTable[2]); D_8024E1B4 = npc->currentAnim; @@ -96,7 +96,7 @@ ApiStatus N(func_80240728_9465F8)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_sbk/sbk_34/945F10", func_8024076C_94663C); /* -ApiStatus N(func_8024076C_94663C)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024076C_94663C)(Evt *script, s32 isInitialCall) { get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4; return ApiStatus_DONE2; } diff --git a/src/world/area_sbk/sbk_56/953FC0.c b/src/world/area_sbk/sbk_56/953FC0.c index 55643a87a7..7189257528 100644 --- a/src/world/area_sbk/sbk_56/953FC0.c +++ b/src/world/area_sbk/sbk_56/953FC0.c @@ -17,7 +17,7 @@ INCLUDE_ASM(s32, "world/area_sbk/sbk_56/953FC0", func_8024005C_95401C); INCLUDE_ASM(s32, "world/area_sbk/sbk_56/953FC0", func_802400BC_95407C); /* -ApiStatus N(func_802400BC_95407C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802400BC_95407C)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -41,7 +41,7 @@ INCLUDE_ASM(s32, "world/area_sbk/sbk_56/953FC0", func_8024024C_95420C); INCLUDE_ASM(s32, "world/area_sbk/sbk_56/953FC0", func_80240680_954640); /* -ApiStatus N(func_80240680_954640)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240680_954640)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_tik/tik_02/86CA50.c b/src/world/area_tik/tik_02/86CA50.c index ac52f48e54..2b621565b0 100644 --- a/src/world/area_tik/tik_02/86CA50.c +++ b/src/world/area_tik/tik_02/86CA50.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_02/86CA50", func_80240310_86CA50); /* -ApiStatus N(func_80240310_86CA50)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240310_86CA50)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_802410C0_86D800) == NULL) { diff --git a/src/world/area_tik/tik_05/8750D0.c b/src/world/area_tik/tik_05/8750D0.c index 9583b0b188..e4fd01530b 100644 --- a/src/world/area_tik/tik_05/8750D0.c +++ b/src/world/area_tik/tik_05/8750D0.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_05/8750D0", func_80240310_8750D0); INCLUDE_ASM(s32, "world/area_tik/tik_05/8750D0", func_80240680_875440); /* -ApiStatus N(func_80240680_875440)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240680_875440)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241800_8765C0) == NULL) { diff --git a/src/world/area_tik/tik_07/879BE0.c b/src/world/area_tik/tik_07/879BE0.c index 3a6a02e05b..27d4bd8f4c 100644 --- a/src/world/area_tik/tik_07/879BE0.c +++ b/src/world/area_tik/tik_07/879BE0.c @@ -21,7 +21,7 @@ static char* N(exit_str_1) = "tik_07"; INCLUDE_ASM(s32, "world/area_tik/tik_07/879BE0", func_8024031C_879EFC); /* -ApiStatus N(func_8024031C_879EFC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024031C_879EFC)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -45,7 +45,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_07/879BE0", func_802404AC_87A08C); INCLUDE_ASM(s32, "world/area_tik/tik_07/879BE0", func_802408E0_87A4C0); /* -ApiStatus N(func_802408E0_87A4C0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802408E0_87A4C0)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_tik/tik_07/87AC00.c b/src/world/area_tik/tik_07/87AC00.c index c9f379d0d3..cd6d21e01e 100644 --- a/src/world/area_tik/tik_07/87AC00.c +++ b/src/world/area_tik/tik_07/87AC00.c @@ -16,7 +16,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_07/87AC00", func_802415A0_87B180); INCLUDE_ASM(s32, "world/area_tik/tik_07/87AC00", func_80242044_87BC24); /* -void N(func_80242044_87BC24)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242044_87BC24)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_tik/tik_10/8866D0.c b/src/world/area_tik/tik_10/8866D0.c index 4309eb28ac..de9a2ca25e 100644 --- a/src/world/area_tik/tik_10/8866D0.c +++ b/src/world/area_tik/tik_10/8866D0.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_10/8866D0", func_80240310_8866D0); INCLUDE_ASM(s32, "world/area_tik/tik_10/8866D0", func_802406BC_886A7C); /* -ApiStatus N(func_802406BC_886A7C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802406BC_886A7C)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -32,7 +32,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_10/8866D0", func_8024084C_886C0C); INCLUDE_ASM(s32, "world/area_tik/tik_10/8866D0", func_80240C80_887040); /* -ApiStatus N(func_80240C80_887040)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240C80_887040)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_tik/tik_12/8891C0.c b/src/world/area_tik/tik_12/8891C0.c index b903b3a187..fd43deb43a 100644 --- a/src/world/area_tik/tik_12/8891C0.c +++ b/src/world/area_tik/tik_12/8891C0.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_12/8891C0", func_802405F0_8891C0); INCLUDE_ASM(s32, "world/area_tik/tik_12/8891C0", func_80240960_889530); /* -ApiStatus N(func_80240960_889530)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240960_889530)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80243C40_88C810) == NULL) { @@ -35,7 +35,7 @@ ApiStatus N(func_80240960_889530)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_tik/tik_12/8891C0", func_80240C58_889828); /* -ApiStatus N(func_80240C58_889828)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240C58_889828)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -59,7 +59,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_12/8891C0", func_80240DE8_8899B8); INCLUDE_ASM(s32, "world/area_tik/tik_12/8891C0", func_8024121C_889DEC); /* -ApiStatus N(func_8024121C_889DEC)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_8024121C_889DEC)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_tik/tik_15/890190.c b/src/world/area_tik/tik_15/890190.c index 7e91fd2eb7..6b9e37922b 100644 --- a/src/world/area_tik/tik_15/890190.c +++ b/src/world/area_tik/tik_15/890190.c @@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_15/890190", func_802405F0_890190); INCLUDE_ASM(s32, "world/area_tik/tik_15/890190", func_80240960_890500); /* -ApiStatus N(func_80240960_890500)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240960_890500)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80242758_8922F8) == NULL) { diff --git a/src/world/area_tik/tik_17/892A50.c b/src/world/area_tik/tik_17/892A50.c index 33e2b1f1d4..f47aa5be4f 100644 --- a/src/world/area_tik/tik_17/892A50.c +++ b/src/world/area_tik/tik_17/892A50.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_17/892A50", func_8024006C_892A8C); /* -ApiStatus N(func_8024006C_892A8C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024006C_892A8C)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_17/892A50", func_802401FC_892C1C); INCLUDE_ASM(s32, "world/area_tik/tik_17/892A50", func_80240630_893050); /* -ApiStatus N(func_80240630_893050)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240630_893050)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_tik/tik_19/897BD0.c b/src/world/area_tik/tik_19/897BD0.c index 99a2c51e17..8363335dda 100644 --- a/src/world/area_tik/tik_19/897BD0.c +++ b/src/world/area_tik/tik_19/897BD0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_19/897BD0", func_8024062C_897C0C); /* -ApiStatus N(func_8024062C_897C0C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024062C_897C0C)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_tik/tik_19/897BD0", func_802407BC_897D9C); INCLUDE_ASM(s32, "world/area_tik/tik_19/897BD0", func_80240BF0_8981D0); /* -ApiStatus N(func_80240BF0_8981D0)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240BF0_8981D0)(Evt *script, s32 isInitialCall) { Bytecode *args = script->ptrReadPos; Npc* npc = get_npc_safe(-4); f32 sinTheta, cosTheta; diff --git a/src/world/area_trd/trd_00/999F80.c b/src/world/area_trd/trd_00/999F80.c index 979c2598b8..e2c37c81f6 100644 --- a/src/world/area_trd/trd_00/999F80.c +++ b/src/world/area_trd/trd_00/999F80.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_trd/trd_00/999F80", func_80240310_999F80); /* -ApiStatus N(func_80240310_999F80)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240310_999F80)(Evt* script, s32 isInitialCall) { s32 i; if (N(D_80241340_99AFB0) == NULL) { diff --git a/src/world/area_trd/trd_00/99A240.c b/src/world/area_trd/trd_00/99A240.c index 04bd9ab686..2c2ae2730f 100644 --- a/src/world/area_trd/trd_00/99A240.c +++ b/src/world/area_trd/trd_00/99A240.c @@ -1,6 +1,6 @@ #include "trd_00.h" -ApiStatus PostChapter1StatUpdate(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PostChapter1StatUpdate(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; set_max_SP(1); diff --git a/src/world/area_trd/trd_02/9A10C0.c b/src/world/area_trd/trd_02/9A10C0.c index 5f3d9b61cf..9683437e38 100644 --- a/src/world/area_trd/trd_02/9A10C0.c +++ b/src/world/area_trd/trd_02/9A10C0.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_trd/trd_02/9A10C0", func_80240474_9A1454); INCLUDE_ASM(s32, "world/area_trd/trd_02/9A10C0", func_80241448_9A2428); /* -ApiStatus N(func_80241448_9A2428)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241448_9A2428)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_trd/trd_03/9A4650.c b/src/world/area_trd/trd_03/9A4650.c index 1100a7bed9..8c2f1db435 100644 --- a/src/world/area_trd/trd_03/9A4650.c +++ b/src/world/area_trd/trd_03/9A4650.c @@ -3,7 +3,7 @@ static char* N(exit_str_0) = "trd_02"; static char* N(exit_str_1) = "trd_04"; -ApiStatus func_80240000_9A4650(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240000_9A4650(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; u32 stickX; @@ -19,7 +19,7 @@ ApiStatus func_80240000_9A4650(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GetFrameCounter(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetFrameCounter(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gGameStatusPtr->frameCounter); return ApiStatus_DONE2; } diff --git a/src/world/area_trd/trd_04/9A88A0.c b/src/world/area_trd/trd_04/9A88A0.c index b3c0c780f6..fec5140303 100644 --- a/src/world/area_trd/trd_04/9A88A0.c +++ b/src/world/area_trd/trd_04/9A88A0.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_trd/trd_04/9A88A0", func_80240844_9A8C34); INCLUDE_ASM(s32, "world/area_trd/trd_04/9A88A0", func_80241818_9A9C08); /* -ApiStatus N(func_80241818_9A9C08)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241818_9A9C08)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; @@ -135,7 +135,7 @@ INCLUDE_ASM(s32, "world/area_trd/trd_04/9A88A0", func_80241FC8_9AA3B8); INCLUDE_ASM(s32, "world/area_trd/trd_04/9A88A0", func_80242A6C_9AAE5C); /* -void N(func_80242A6C_9AAE5C)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80242A6C_9AAE5C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -156,7 +156,7 @@ void N(func_80242A6C_9AAE5C)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_trd/trd_04/9A88A0", func_80243124_9AB514); /* -ApiStatus N(func_80243124_9AB514)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80243124_9AB514)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_trd/trd_05/9AE700.c b/src/world/area_trd/trd_05/9AE700.c index 7767cc492f..159154d2d9 100644 --- a/src/world/area_trd/trd_05/9AE700.c +++ b/src/world/area_trd/trd_05/9AE700.c @@ -3,7 +3,7 @@ static char* N(exit_str_0) = "trd_04"; static char* N(exit_str_1) = "trd_00"; -ApiStatus func_80240000_9AE700(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240000_9AE700(Evt* script, s32 isInitialCall) { func_80035DF0(5); return ApiStatus_DONE2; } diff --git a/src/world/area_trd/trd_05/9AEE20.c b/src/world/area_trd/trd_05/9AEE20.c index 0576fbd154..1a83e1898c 100644 --- a/src/world/area_trd/trd_05/9AEE20.c +++ b/src/world/area_trd/trd_05/9AEE20.c @@ -1,6 +1,6 @@ #include "trd_05.h" -ApiStatus func_80240720_9AEE20(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240720_9AEE20(Evt* script, s32 isInitialCall) { fx_walk(2, script->varTable[0], script->varTable[1], script->varTable[2], 0, 0); return ApiStatus_DONE2; } diff --git a/src/world/area_trd/trd_06/9B1AA0.c b/src/world/area_trd/trd_06/9B1AA0.c index e598ba8f07..613a6da92f 100644 --- a/src/world/area_trd/trd_06/9B1AA0.c +++ b/src/world/area_trd/trd_06/9B1AA0.c @@ -12,7 +12,7 @@ INCLUDE_ASM(s32, "world/area_trd/trd_06/9B1AA0", func_8024093C_9B20CC); INCLUDE_ASM(s32, "world/area_trd/trd_06/9B1AA0", func_80240A5C_9B21EC); -ApiStatus func_80240A70_9B2200(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240A70_9B2200(Evt* script, s32 isInitialCall) { f32 partnerCollisionHeight = get_npc_unsafe(NPC_PARTNER)->collisionHeight; script->varTable[0] = ((partnerCollisionHeight * 2) / 3.0f) + 145.0f; diff --git a/src/world/area_trd/trd_07/9B6C90.c b/src/world/area_trd/trd_07/9B6C90.c index cadc59bd11..9ed5ecf5d5 100644 --- a/src/world/area_trd/trd_07/9B6C90.c +++ b/src/world/area_trd/trd_07/9B6C90.c @@ -22,7 +22,7 @@ INCLUDE_ASM(s32, "world/area_trd/trd_07/9B6C90", func_80240C94_9B7614); INCLUDE_ASM(s32, "world/area_trd/trd_07/9B6C90", func_80241738_9B80B8); /* -void N(func_80241738_9B80B8)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(func_80241738_9B80B8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -43,7 +43,7 @@ void N(func_80241738_9B80B8)(ScriptInstance* script, NpcAISettings* aiSettings, INCLUDE_ASM(s32, "world/area_trd/trd_07/9B6C90", func_80241DF0_9B8770); /* -ApiStatus N(func_80241DF0_9B8770)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80241DF0_9B8770)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Bytecode* args = script->ptrReadPos; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/area_trd/trd_10/9C2910.c b/src/world/area_trd/trd_10/9C2910.c index 416afe0a6d..fa96454be3 100644 --- a/src/world/area_trd/trd_10/9C2910.c +++ b/src/world/area_trd/trd_10/9C2910.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_trd/trd_10/9C2910", func_80240000_9C2910); /* -ApiStatus N(func_80240000_9C2910)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240000_9C2910)(Evt* script, s32 isInitialCall) { arn_07_struct* ptr = script->varTable[0]; sfx_adjust_env_sound_pos(0xA2, 0, ptr->unk_00, ptr->unk_04, ptr->unk_08); @@ -12,7 +12,7 @@ ApiStatus N(func_80240000_9C2910)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_trd/trd_10/9C2910", func_8024004C_9C295C); /* -ApiStatus N(func_8024004C_9C295C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_8024004C_9C295C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -49,7 +49,7 @@ static char* N(exit_str_2) = "trd_09"; INCLUDE_ASM(s32, "world/area_trd/trd_10/9C2910", func_802405BC_9C2ECC); /* -ApiStatus N(func_802405BC_9C2ECC)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405BC_9C2ECC)(Evt* script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); arn_07_struct* ptr = script->varTable[0]; @@ -59,7 +59,7 @@ ApiStatus N(func_802405BC_9C2ECC)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_trd/trd_10/9C2910", func_802405FC_9C2F0C); /* -ApiStatus N(func_802405FC_9C2F0C)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802405FC_9C2F0C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall) { @@ -83,7 +83,7 @@ ApiStatus N(func_802405FC_9C2F0C)(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_trd/trd_10/9C2910", func_80240708_9C3018); /* -ApiStatus N(func_80240708_9C3018)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240708_9C3018)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; arn_07_struct* ptr = script->varTable[0]; diff --git a/src/world/area_tst/tst_04/B1B570.c b/src/world/area_tst/tst_04/B1B570.c index b2dcfbb89b..87c64b7ebf 100644 --- a/src/world/area_tst/tst_04/B1B570.c +++ b/src/world/area_tst/tst_04/B1B570.c @@ -10,7 +10,7 @@ void func_80240574_B1BAE4(void); // BSS static s32 B_80240FD0_tst_04; -ApiStatus func_80240000_B1B570(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240000_B1B570(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_safe(0); if (npc != NULL && npc->unk_84 == 5) { @@ -33,7 +33,7 @@ ApiStatus func_80240000_B1B570(ScriptInstance* script, s32 isInitialCall) { // float shenanigans #ifdef NON_MATCHING -ApiStatus func_802400FC_B1B66C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802400FC_B1B66C(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_safe(NPC_PARTNER); if (npc != NULL) { @@ -69,7 +69,7 @@ ApiStatus func_802400FC_B1B66C(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_tst/tst_04/B1B570", func_802400FC_B1B66C); #endif -ApiStatus func_80240260_B1B7D0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240260_B1B7D0(Evt* script, s32 isInitialCall) { script->array[0] = (s32) create_generic_entity_frontUI(NULL, func_8024029C_B1B80C); return ApiStatus_DONE2; } @@ -120,7 +120,7 @@ void func_80240360_B1B8D0(PlayerStatus* playerStatus) { spr_draw_player_sprite(1, 0, 0, NULL, main); } -ApiStatus func_80240510_B1BA80(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240510_B1BA80(Evt* script, s32 isInitialCall) { Npc* partner; script->array[1] = create_generic_entity_world(func_80240574_B1BAE4, NULL); @@ -163,7 +163,7 @@ void func_802405D4_B1BB44(void) { render_animated_model(B_80240FD0_tst_04, m4); } -ApiStatus func_80240628_B1BB98(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240628_B1BB98(Evt* script, s32 isInitialCall) { create_generic_entity_world(func_802405B0_B1BB20, func_802405D4_B1BB44); return ApiStatus_DONE2; } diff --git a/src/world/area_tst/tst_04/B1BBD0.c b/src/world/area_tst/tst_04/B1BBD0.c index 2cb166af85..71bd122109 100644 --- a/src/world/area_tst/tst_04/B1BBD0.c +++ b/src/world/area_tst/tst_04/B1BBD0.c @@ -1,6 +1,6 @@ #include "tst_04.h" -ApiStatus func_80240660_B1BBD0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240660_B1BBD0(Evt* script, s32 isInitialCall) { disable_npc_shadow(get_npc_unsafe(script->owner1.enemy->npcID)); return ApiStatus_DONE2; } diff --git a/src/world/area_tst/tst_11/B1CA50.c b/src/world/area_tst/tst_11/B1CA50.c index 04bb5d3043..583d2fc2e6 100644 --- a/src/world/area_tst/tst_11/B1CA50.c +++ b/src/world/area_tst/tst_11/B1CA50.c @@ -6,7 +6,7 @@ void func_802402F4_B1CD44(void); void func_802403B8_B1CE08(RenderTask*); void N(SetPartnerFlagsA0000)(void); -ApiStatus func_80240000_B1CA50(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80240000_B1CA50(Evt* script, s32 isInitialCall) { script->array[0] = (s32) create_generic_entity_frontUI(NULL, func_8024003C_B1CA8C); return ApiStatus_DONE2; } @@ -57,7 +57,7 @@ void func_80240100_B1CB50(PlayerStatus* playerStatus) { spr_draw_player_sprite(1, 0, 0, NULL, main); } -ApiStatus func_802402B8_B1CD08(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802402B8_B1CD08(Evt* script, s32 isInitialCall) { script->array[0] = (s32) create_generic_entity_frontUI(NULL, func_802402F4_B1CD44); return ApiStatus_DONE2; } @@ -88,7 +88,7 @@ void func_802402F4_B1CD44(void) { INCLUDE_ASM(void, "world/area_tst/tst_11/B1CA50", func_802403B8_B1CE08, RenderTask* arg0); -ApiStatus func_802406D4_B1D124(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802406D4_B1D124(Evt* script, s32 isInitialCall) { Npc* npc; script->array[1] = create_generic_entity_world(N(SetPartnerFlagsA0000), NULL); diff --git a/src/world/area_tst/tst_13/B1D760.c b/src/world/area_tst/tst_13/B1D760.c index ee14ec42e1..ed447065d4 100644 --- a/src/world/area_tst/tst_13/B1D760.c +++ b/src/world/area_tst/tst_13/B1D760.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_tst/tst_13/B1D760", func_80240000_B1D760); /* -ApiStatus N(func_80240000_B1D760)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_80240000_B1D760)(Evt *script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; s32 *array = script->array; f32 distance = dist2D(playerStatus->position.x, playerStatus->position.z, array[2], array[3]); @@ -21,7 +21,7 @@ ApiStatus N(func_80240000_B1D760)(ScriptInstance *script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/area_tst/tst_13/B1D760", func_802400A0_B1D800); /* -ApiStatus N(func_802400A0_B1D800)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(func_802400A0_B1D800)(Evt *script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; f32 distance; s32 *array = script->array; diff --git a/src/world/common/AddPlayerHandsOffset.inc.c b/src/world/common/AddPlayerHandsOffset.inc.c index 9e169c436d..0a1cbe7991 100644 --- a/src/world/common/AddPlayerHandsOffset.inc.c +++ b/src/world/common/AddPlayerHandsOffset.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(AddPlayerHandsOffset)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; s32 xVar = *args++; diff --git a/src/world/common/AwaitPlayerNearNpc.inc.c b/src/world/common/AwaitPlayerNearNpc.inc.c index 9d6bd78217..2d7d1df8ce 100644 --- a/src/world/common/AwaitPlayerNearNpc.inc.c +++ b/src/world/common/AwaitPlayerNearNpc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(func_80240814_97BE44)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_80240814_97BE44)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_safe(script->owner2.npcID); npc->unk_AB = npc->collisionHeight; @@ -10,7 +10,7 @@ ApiStatus N(func_80240814_97BE44)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus N(AwaitPlayerNearNpc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(AwaitPlayerNearNpc)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Npc* npc = get_npc_safe(script->owner2.npcID); @@ -21,7 +21,7 @@ ApiStatus N(AwaitPlayerNearNpc)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus N(func_802408B4_97BEE4)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(func_802408B4_97BEE4)(Evt* script, s32 isInitialCall) { EncounterStatus* currentEncounter = &gCurrentEncounter; Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_safe(script->owner2.npcID); diff --git a/src/world/common/AwaitScriptComplete.inc.c b/src/world/common/AwaitScriptComplete.inc.c index 360537b8bd..0d729bb7db 100644 --- a/src/world/common/AwaitScriptComplete.inc.c +++ b/src/world/common/AwaitScriptComplete.inc.c @@ -1,6 +1,6 @@ #include "common.h" #include "map.h" -ApiStatus N(AwaitScriptComplete)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(AwaitScriptComplete)(Evt* script, s32 isInitialCall) { return (!does_script_exist(get_variable(script, *script->ptrReadPos))) * ApiStatus_DONE2; } diff --git a/src/world/common/Bandit_DropCoin.inc.c b/src/world/common/Bandit_DropCoin.inc.c index df193fd4fd..35575e4915 100644 --- a/src/world/common/Bandit_DropCoin.inc.c +++ b/src/world/common/Bandit_DropCoin.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(Bandit_DropCoin)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(Bandit_DropCoin)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcID; Npc* npc; diff --git a/src/world/common/Call800E9894.inc.c b/src/world/common/Call800E9894.inc.c index 302c41d43f..9a948ce8af 100644 --- a/src/world/common/Call800E9894.inc.c +++ b/src/world/common/Call800E9894.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(Call800E9894)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(Call800E9894)(Evt* script, s32 isInitialCall) { func_800E9894(); return ApiStatus_DONE2; } diff --git a/src/world/common/Call800E98C4SyncStatusMenu.inc.c b/src/world/common/Call800E98C4SyncStatusMenu.inc.c index 7f108b6ef0..fe8d69ba5a 100644 --- a/src/world/common/Call800E98C4SyncStatusMenu.inc.c +++ b/src/world/common/Call800E98C4SyncStatusMenu.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(Call800E98C4SyncStatusMenu)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(Call800E98C4SyncStatusMenu)(Evt* script, s32 isInitialCall) { func_800E98C4(); sync_status_menu(); return ApiStatus_DONE2; diff --git a/src/world/common/CamSetFOV.inc.c b/src/world/common/CamSetFOV.inc.c index 829edcd3e8..745267bf84 100644 --- a/src/world/common/CamSetFOV.inc.c +++ b/src/world/common/CamSetFOV.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(CamSetFOV)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(CamSetFOV)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 camIdx = get_variable(script, *args++); diff --git a/src/world/common/CheckItemFlags40.inc.c b/src/world/common/CheckItemFlags40.inc.c index ee91e5b93a..aec9e289cc 100644 --- a/src/world/common/CheckItemFlags40.inc.c +++ b/src/world/common/CheckItemFlags40.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(CheckItemFlags40)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(CheckItemFlags40)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemIndex = get_variable(script, *args++); diff --git a/src/world/common/CheckPartnerFlags1000.inc.c b/src/world/common/CheckPartnerFlags1000.inc.c index dab6b49322..fe0704a04e 100644 --- a/src/world/common/CheckPartnerFlags1000.inc.c +++ b/src/world/common/CheckPartnerFlags1000.inc.c @@ -1,6 +1,6 @@ #include "common.h" #include "map.h" -ApiStatus N(CheckPartnerFlags1000)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(CheckPartnerFlags1000)(Evt* script, s32 isInitialCall) { return ((get_npc_unsafe(NPC_PARTNER)->flags & 0x1000) != 0) * ApiStatus_DONE2; } diff --git a/src/world/common/DeadFoliage.inc.c b/src/world/common/DeadFoliage.inc.c index 646b7320f6..47dafc8b2d 100644 --- a/src/world/common/DeadFoliage.inc.c +++ b/src/world/common/DeadFoliage.inc.c @@ -8,7 +8,7 @@ void N(dead_foliage_setup_shear_mtx)(Matrix4f mtx, f32 scale, f32 xAmount, f32 z mtx[1][2] = scale * zAmount; } -ApiStatus N(DeadTransformFoliage)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(DeadTransformFoliage)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 modelListIndex = func_80125270(dead_get_variable(script, *args++)); f32 scale = dead_get_float_variable(script, *args++); diff --git a/src/world/common/DeadGetItemName.inc.c b/src/world/common/DeadGetItemName.inc.c index 19e9e05910..2b6530fc55 100644 --- a/src/world/common/DeadGetItemName.inc.c +++ b/src/world/common/DeadGetItemName.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(DeadGetItemName)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(DeadGetItemName)(Evt* script, s32 isInitialCall) { Bytecode args = *script->ptrReadPos; s32 itemID = dead_get_variable(script, args); diff --git a/src/world/common/DeadUnkNpcAIFunc1.inc.c b/src/world/common/DeadUnkNpcAIFunc1.inc.c index e4b4e06e61..9484bbcb7f 100644 --- a/src/world/common/DeadUnkNpcAIFunc1.inc.c +++ b/src/world/common/DeadUnkNpcAIFunc1.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(DeadUnkNpcAIFunc1)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(DeadUnkNpcAIFunc1)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = dead_get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/DeadUnkNpcAIFunc14.inc.c b/src/world/common/DeadUnkNpcAIFunc14.inc.c index 834da71b5f..e4c067ba17 100644 --- a/src/world/common/DeadUnkNpcAIFunc14.inc.c +++ b/src/world/common/DeadUnkNpcAIFunc14.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(DeadUnkNpcAIFunc14)(ScriptInstance* script, NpcAISettings* aiSettings) { +void N(DeadUnkNpcAIFunc14)(Evt* script, NpcAISettings* aiSettings) { Enemy* enemy = script->owner1.enemy; Npc* npc = dead_get_npc_unsafe(enemy->npcID); f32 vt5 = enemy->varTable[5]; diff --git a/src/world/common/DeadUnkPartnerPosFuncs.inc.c b/src/world/common/DeadUnkPartnerPosFuncs.inc.c index 2d846f69d3..394eedc8ab 100644 --- a/src/world/common/DeadUnkPartnerPosFuncs.inc.c +++ b/src/world/common/DeadUnkPartnerPosFuncs.inc.c @@ -1,13 +1,13 @@ #include "common.h" -ApiStatus N(DeadUnkPartnerPosFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(DeadUnkPartnerPosFunc)(Evt* script, s32 isInitialCall) { Npc* partner = func_8003E534(NPC_PARTNER); dead_playFX_11(2, partner->pos.x, partner->pos.y + 30.0f, partner->pos.z, 30.0f); return ApiStatus_DONE2; } -ApiStatus N(DeadUnkPartnerPosFunc2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(DeadUnkPartnerPosFunc2)(Evt* script, s32 isInitialCall) { Npc* partner = func_8003E534(NPC_PARTNER); dead_playFX_11(4, partner->pos.x, partner->pos.y + 30.0f, partner->pos.z, 30.0f); diff --git a/src/world/common/DeadUnkTexturePanFunc.inc.c b/src/world/common/DeadUnkTexturePanFunc.inc.c index 3ab70fbaf5..bfe8cb4a71 100644 --- a/src/world/common/DeadUnkTexturePanFunc.inc.c +++ b/src/world/common/DeadUnkTexturePanFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(DeadUnkTexturePanFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(DeadUnkTexturePanFunc)(Evt* script, s32 isInitialCall) { script->varTable[9] += script->varTable[1]; if (script->varTable[9] < 0) { script->varTable[9] += 0x20000; diff --git a/src/world/common/DeadUnkTexturePanFunc2.inc.c b/src/world/common/DeadUnkTexturePanFunc2.inc.c index 180642115b..77d7943712 100644 --- a/src/world/common/DeadUnkTexturePanFunc2.inc.c +++ b/src/world/common/DeadUnkTexturePanFunc2.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(DeadUnkTexturePanFunc2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(DeadUnkTexturePanFunc2)(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 0; script->functionTemp[1] = 0; diff --git a/src/world/common/DoesPlayerNeedSleep.inc.c b/src/world/common/DoesPlayerNeedSleep.inc.c index d1c4365b24..1bd9bf19fd 100644 --- a/src/world/common/DoesPlayerNeedSleep.inc.c +++ b/src/world/common/DoesPlayerNeedSleep.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(DoesPlayerNeedSleep)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(DoesPlayerNeedSleep)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; script->varTable[1] = FALSE; diff --git a/src/world/common/GetCamVfov.inc.c b/src/world/common/GetCamVfov.inc.c index c89ca62612..c8ffb5bd95 100644 --- a/src/world/common/GetCamVfov.inc.c +++ b/src/world/common/GetCamVfov.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetCamVfov)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetCamVfov)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 cameraID = get_variable(script, *args++); diff --git a/src/world/common/GetCurrentCameraYawClamped180.inc.c b/src/world/common/GetCurrentCameraYawClamped180.inc.c index f15370fecd..0616fc542d 100644 --- a/src/world/common/GetCurrentCameraYawClamped180.inc.c +++ b/src/world/common/GetCurrentCameraYawClamped180.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetCurrentCameraYawClamped180)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetCurrentCameraYawClamped180)(Evt* script, s32 isInitialCall) { script->varTable[0] = clamp_angle(gCameras[gCurrentCameraID].currentYaw + 180.0f); return ApiStatus_DONE2; } diff --git a/src/world/common/GetCurrentFloor.inc.c b/src/world/common/GetCurrentFloor.inc.c index d0db2b6a0f..4f3854767e 100644 --- a/src/world/common/GetCurrentFloor.inc.c +++ b/src/world/common/GetCurrentFloor.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetCurrentFloor)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetCurrentFloor)(Evt* script, s32 isInitialCall) { script->varTable[0] = gCollisionStatus.currentFloor; return ApiStatus_DONE2; } diff --git a/src/world/common/GetEncounterEnemyIsOwner.inc.c b/src/world/common/GetEncounterEnemyIsOwner.inc.c index de595d15f5..764e949af2 100644 --- a/src/world/common/GetEncounterEnemyIsOwner.inc.c +++ b/src/world/common/GetEncounterEnemyIsOwner.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetEncounterEnemyIsOwner)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetEncounterEnemyIsOwner)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; set_variable(script, SI_VAR(0), gCurrentEncounter.currentEnemy == enemy); diff --git a/src/world/common/GetEntityPosition.inc.c b/src/world/common/GetEntityPosition.inc.c index c06418c54c..0ca65d3dc8 100644 --- a/src/world/common/GetEntityPosition.inc.c +++ b/src/world/common/GetEntityPosition.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetEntityPosition)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetEntityPosition)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Entity* entity = get_entity_by_index(get_variable(script, *args++)); diff --git a/src/world/common/GetEntryPos.inc.c b/src/world/common/GetEntryPos.inc.c index 965312f277..2b212ebebc 100644 --- a/src/world/common/GetEntryPos.inc.c +++ b/src/world/common/GetEntryPos.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetEntryPos)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetEntryPos)(Evt* script, s32 isInitialCall) { MapConfig* mapConfig = get_current_map_header(); s32 index = get_variable(script, SI_VAR(0)); diff --git a/src/world/common/GetFloorCollider.inc.c b/src/world/common/GetFloorCollider.inc.c index b5832b4049..e4a5de16c7 100644 --- a/src/world/common/GetFloorCollider.inc.c +++ b/src/world/common/GetFloorCollider.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetFloorCollider)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetFloorCollider)(Evt* script, s32 isInitialCall) { CollisionStatus* collisionStatus = &gCollisionStatus; set_variable(script, *script->ptrReadPos, collisionStatus->currentFloor); diff --git a/src/world/common/GetGameStatus75.inc.c b/src/world/common/GetGameStatus75.inc.c index d9e6c40d66..c77f9c7d1d 100644 --- a/src/world/common/GetGameStatus75.inc.c +++ b/src/world/common/GetGameStatus75.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetGameStatus75)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetGameStatus75)(Evt* script, s32 isInitialCall) { set_variable(script, SI_VAR(0), gGameStatusPtr->debugQuizmo); return ApiStatus_DONE2; } diff --git a/src/world/common/GetItemName.inc.c b/src/world/common/GetItemName.inc.c index f0c10844d8..ee494d74c7 100644 --- a/src/world/common/GetItemName.inc.c +++ b/src/world/common/GetItemName.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetItemName)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetItemName)(Evt* script, s32 isInitialCall) { Bytecode a0 = *script->ptrReadPos; s32 itemID = get_variable(script, a0); diff --git a/src/world/common/GetNpcCollisionHeight.inc.c b/src/world/common/GetNpcCollisionHeight.inc.c index a8de22f84c..ad176ef994 100644 --- a/src/world/common/GetNpcCollisionHeight.inc.c +++ b/src/world/common/GetNpcCollisionHeight.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetNpcCollisionHeight)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetNpcCollisionHeight)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcID npcID = get_variable(script, *args++); Npc* npc = get_npc_safe(npcID); diff --git a/src/world/common/GetPartnerCall800EB168.inc.c b/src/world/common/GetPartnerCall800EB168.inc.c index eb2079bed5..7ad99491b4 100644 --- a/src/world/common/GetPartnerCall800EB168.inc.c +++ b/src/world/common/GetPartnerCall800EB168.inc.c @@ -1,13 +1,13 @@ #include "common.h" #include "map.h" -ApiStatus N(GetPartnerCall800EB168)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetPartnerCall800EB168)(Evt* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gPlayerData.currentPartner); switch_to_partner(0); return ApiStatus_DONE2; } -ApiStatus N(Call800EB168)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(Call800EB168)(Evt* script, s32 isInitialCall) { switch_to_partner((s8)get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } diff --git a/src/world/common/GetPlayerCoins.inc.c b/src/world/common/GetPlayerCoins.inc.c index 0725908862..27cd5e16c3 100644 --- a/src/world/common/GetPlayerCoins.inc.c +++ b/src/world/common/GetPlayerCoins.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(GetPlayerCoins)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetPlayerCoins)(Evt* script, s32 isInitialCall) { script->varTable[0] = gPlayerData.coins; return ApiStatus_DONE2; } diff --git a/src/world/common/IsBerserkerEquipped.inc.c b/src/world/common/IsBerserkerEquipped.inc.c index ede6ce6e81..21c897044a 100644 --- a/src/world/common/IsBerserkerEquipped.inc.c +++ b/src/world/common/IsBerserkerEquipped.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(IsBerserkerEquipped)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(IsBerserkerEquipped)(Evt* script, s32 isInitialCall) { script->varTable[0] = gBattleStatus.unk_83; script->varTable[1] = 15; diff --git a/src/world/common/IsHammerMaxCharged.inc.c b/src/world/common/IsHammerMaxCharged.inc.c index ae3f9c7f48..9d7a0ddec7 100644 --- a/src/world/common/IsHammerMaxCharged.inc.c +++ b/src/world/common/IsHammerMaxCharged.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(IsHammerMaxCharged)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(IsHammerMaxCharged)(Evt* script, s32 isInitialCall) { script->varTable[0] = FALSE; if (gBattleStatus.hammerCharge >= 99) { diff --git a/src/world/common/IsJumpMaxCharged.inc.c b/src/world/common/IsJumpMaxCharged.inc.c index ddfbb77197..22443977b3 100644 --- a/src/world/common/IsJumpMaxCharged.inc.c +++ b/src/world/common/IsJumpMaxCharged.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(IsJumpMaxCharged)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(IsJumpMaxCharged)(Evt* script, s32 isInitialCall) { script->varTable[0] = FALSE; if (gBattleStatus.jumpCharge >= 99) { diff --git a/src/world/common/IsRightOnEquipped.inc.c b/src/world/common/IsRightOnEquipped.inc.c index b2a75d21cf..d93cd80dfd 100644 --- a/src/world/common/IsRightOnEquipped.inc.c +++ b/src/world/common/IsRightOnEquipped.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(IsRightOnEquipped)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(IsRightOnEquipped)(Evt* script, s32 isInitialCall) { script->varTable[0] = FALSE; if (is_ability_active(ABILITY_RIGHT_ON)) { diff --git a/src/world/common/LoadPartyImage.inc.c b/src/world/common/LoadPartyImage.inc.c index 5d99537bb1..6c2c75d277 100644 --- a/src/world/common/LoadPartyImage.inc.c +++ b/src/world/common/LoadPartyImage.inc.c @@ -5,7 +5,7 @@ #error "Define PARTY_IMAGE to the asset name to use LoadPartyImage." #endif -ApiStatus N(LoadPartyImage)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(LoadPartyImage)(Evt* script, s32 isInitialCall) { static u16 palette[256]; static u8 raster[0x3D90]; static struct { diff --git a/src/world/common/NpcJumpFunc.inc.c b/src/world/common/NpcJumpFunc.inc.c index b983942357..d4c091440a 100644 --- a/src/world/common/NpcJumpFunc.inc.c +++ b/src/world/common/NpcJumpFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(NpcJumpFunc)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(NpcJumpFunc)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); npc->pos.y += npc->jumpVelocity; diff --git a/src/world/common/NpcJumpFunc2.inc.c b/src/world/common/NpcJumpFunc2.inc.c index b9d6cf6899..24f76f0810 100644 --- a/src/world/common/NpcJumpFunc2.inc.c +++ b/src/world/common/NpcJumpFunc2.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(NpcJumpFunc2)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(NpcJumpFunc2)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/NpcJumpFunc3.inc.c b/src/world/common/NpcJumpFunc3.inc.c index f0168a4c36..916af1579a 100644 --- a/src/world/common/NpcJumpFunc3.inc.c +++ b/src/world/common/NpcJumpFunc3.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(NpcJumpFunc3)(ScriptInstance* script) { +void N(NpcJumpFunc3)(Evt* script) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); npc->jumpVelocity = 10.0f; diff --git a/src/world/common/PartnerToggleAbilityScript.inc.c b/src/world/common/PartnerToggleAbilityScript.inc.c index 5da23a5702..43c593273e 100644 --- a/src/world/common/PartnerToggleAbilityScript.inc.c +++ b/src/world/common/PartnerToggleAbilityScript.inc.c @@ -2,7 +2,7 @@ #include "../partners.h" #include "map.h" -ApiStatus N(PartnerSuspendAbilityScript)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(PartnerSuspendAbilityScript)(Evt* script, s32 isInitialCall) { if (gPlayerData.currentPartner == PARTNER_NONE) { return ApiStatus_DONE2; } @@ -10,7 +10,7 @@ ApiStatus N(PartnerSuspendAbilityScript)(ScriptInstance* script, s32 isInitialCa return ApiStatus_DONE2; } -ApiStatus N(PartnerResumeAbilityScript)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(PartnerResumeAbilityScript)(Evt* script, s32 isInitialCall) { partner_resume_ability_script(); return ApiStatus_DONE2; } diff --git a/src/world/common/PlayFX3D.inc.c b/src/world/common/PlayFX3D.inc.c index 4c77464b9e..287626d4a3 100644 --- a/src/world/common/PlayFX3D.inc.c +++ b/src/world/common/PlayFX3D.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "effects.h" -ApiStatus N(PlayFX3D)(ScriptInstance* script, s32 isInitialStatus) { +ApiStatus N(PlayFX3D)(Evt* script, s32 isInitialStatus) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); f32 var2 = get_float_variable(script, *args++); diff --git a/src/world/common/Set80151310.inc.c b/src/world/common/Set80151310.inc.c index 6c48215578..51b82de0ea 100644 --- a/src/world/common/Set80151310.inc.c +++ b/src/world/common/Set80151310.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(Set80151310_1)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(Set80151310_1)(Evt* script, s32 isInitialCall) { D_80151310 = 1; return ApiStatus_DONE2; } diff --git a/src/world/common/Set80151310_0.inc.c b/src/world/common/Set80151310_0.inc.c index ed043d2b96..7096bed93e 100644 --- a/src/world/common/Set80151310_0.inc.c +++ b/src/world/common/Set80151310_0.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(Set80151310_0)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(Set80151310_0)(Evt* script, s32 isInitialCall) { D_80151310 = 0; return ApiStatus_DONE2; } diff --git a/src/world/common/SetCamVfov.inc.c b/src/world/common/SetCamVfov.inc.c index e8ae32ed63..3548134df4 100644 --- a/src/world/common/SetCamVfov.inc.c +++ b/src/world/common/SetCamVfov.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SetCamVfov)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetCamVfov)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 cameraID = get_variable(script, *args++); diff --git a/src/world/common/SetCamera0Flag1000.inc.c b/src/world/common/SetCamera0Flag1000.inc.c index 59b6b09aff..0115594752 100644 --- a/src/world/common/SetCamera0Flag1000.inc.c +++ b/src/world/common/SetCamera0Flag1000.inc.c @@ -2,7 +2,7 @@ #include "map.h" #include "camera.h" -ApiStatus N(SetCamera0Flag1000)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetCamera0Flag1000)(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[0]; camera->flags |= 0x1000; diff --git a/src/world/common/SetCamera0MoveFlag1.inc.c b/src/world/common/SetCamera0MoveFlag1.inc.c index bbbc218152..10e21f1c90 100644 --- a/src/world/common/SetCamera0MoveFlag1.inc.c +++ b/src/world/common/SetCamera0MoveFlag1.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SetCamera0MoveFlag1)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetCamera0MoveFlag1)(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[0]; camera->moveFlags |= 1; diff --git a/src/world/common/SetEntityFlags100000.inc.c b/src/world/common/SetEntityFlags100000.inc.c index 8cbc7d447f..4b6fbda622 100644 --- a/src/world/common/SetEntityFlags100000.inc.c +++ b/src/world/common/SetEntityFlags100000.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SetEntityFlags100000)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetEntityFlags100000)(Evt* script, s32 isInitialCall) { Entity* entity = get_entity_by_index(script->varTable[0]); entity->flags |= 0x100000; diff --git a/src/world/common/SetEntityPosition.inc.c b/src/world/common/SetEntityPosition.inc.c index 701cdd4ead..9c2bb9b0de 100644 --- a/src/world/common/SetEntityPosition.inc.c +++ b/src/world/common/SetEntityPosition.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SetEntityPosition)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetEntityPosition)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 entityIndex = get_variable(script, *args++); s32 x = get_variable(script, *args++); diff --git a/src/world/common/SetForeverForestFog.inc.c b/src/world/common/SetForeverForestFog.inc.c index 9625db74dd..a4a9c1eee9 100644 --- a/src/world/common/SetForeverForestFog.inc.c +++ b/src/world/common/SetForeverForestFog.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SetForeverForestFog)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetForeverForestFog)(Evt* script, s32 isInitialCall) { enable_world_fog(); set_world_fog_dist(990, 1000); set_world_fog_color(0, 0, 0, 255); diff --git a/src/world/common/SetGameStatusUnk84_1.inc.c b/src/world/common/SetGameStatusUnk84_1.inc.c index ca5175fa36..782110be96 100644 --- a/src/world/common/SetGameStatusUnk84_1.inc.c +++ b/src/world/common/SetGameStatusUnk84_1.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SetGameStatusUnk84_1)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetGameStatusUnk84_1)(Evt* script, s32 isInitialCall) { gGameStatusPtr->playerSpriteSet = 1; return ApiStatus_BLOCK; } diff --git a/src/world/common/SetManyVars.inc.c b/src/world/common/SetManyVars.inc.c index 233a4f6231..1d623babe2 100644 --- a/src/world/common/SetManyVars.inc.c +++ b/src/world/common/SetManyVars.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SetManyVars)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetManyVars)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; script->varTable[2] = get_variable(script, *args++); diff --git a/src/world/common/SetNpcB5_3.inc.c b/src/world/common/SetNpcB5_3.inc.c index f1ede29d72..64c971412e 100644 --- a/src/world/common/SetNpcB5_3.inc.c +++ b/src/world/common/SetNpcB5_3.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SetNpcB5_3)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetNpcB5_3)(Evt* script, s32 isInitialCall) { script->owner1.enemy->unk_B5 = 3; return ApiStatus_DONE2; } diff --git a/src/world/common/SetOverrideFlags_40.inc.c b/src/world/common/SetOverrideFlags_40.inc.c index a6b3d5b076..66323eca9f 100644 --- a/src/world/common/SetOverrideFlags_40.inc.c +++ b/src/world/common/SetOverrideFlags_40.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SetOverrideFlags_40)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetOverrideFlags_40)(Evt* script, s32 isInitialCall) { gOverrideFlags |= 0x40; return ApiStatus_DONE2; } diff --git a/src/world/common/SetPlayerSpriteSet2.inc.c b/src/world/common/SetPlayerSpriteSet2.inc.c index fe6a83584e..0bff233950 100644 --- a/src/world/common/SetPlayerSpriteSet2.inc.c +++ b/src/world/common/SetPlayerSpriteSet2.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(SetPlayerSpriteSet2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetPlayerSpriteSet2)(Evt* script, s32 isInitialCall) { gGameStatusPtr->playerSpriteSet = 2; return ApiStatus_BLOCK; } diff --git a/src/world/common/SetPlayerStatusAnimFlags100000.inc.c b/src/world/common/SetPlayerStatusAnimFlags100000.inc.c index 34e19cd552..81b385a3c2 100644 --- a/src/world/common/SetPlayerStatusAnimFlags100000.inc.c +++ b/src/world/common/SetPlayerStatusAnimFlags100000.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SetPlayerStatusAnimFlags100000)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SetPlayerStatusAnimFlags100000)(Evt* script, s32 isInitialCall) { gPlayerStatusPtr->animFlags |= 0x100000; return ApiStatus_DONE2; } diff --git a/src/world/common/SomeItemEntityFunc.inc.c b/src/world/common/SomeItemEntityFunc.inc.c index 4bd8902235..d2401b4574 100644 --- a/src/world/common/SomeItemEntityFunc.inc.c +++ b/src/world/common/SomeItemEntityFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SomeItemEntityFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SomeItemEntityFunc)(Evt* script, s32 isInitialCall) { ItemEntity* itemEntity = get_item_entity(script->varTable[0]); f32* y = (f32*) &script->functionTemp[2]; diff --git a/src/world/common/SomeXYZFunc2.inc.c b/src/world/common/SomeXYZFunc2.inc.c index ca3a94e64d..5eefd25420 100644 --- a/src/world/common/SomeXYZFunc2.inc.c +++ b/src/world/common/SomeXYZFunc2.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SomeXYZFunc2)(ScriptInstance* script, s32 isInitialStatus) { +ApiStatus N(SomeXYZFunc2)(Evt* script, s32 isInitialStatus) { PlayerStatus* playerStatus = &gPlayerStatus; f32 r = get_float_variable(script, *script->ptrReadPos); f32 x = playerStatus->position.x; diff --git a/src/world/common/SpawnSunEffect.inc.c b/src/world/common/SpawnSunEffect.inc.c index 804acf366d..9859d3fa81 100644 --- a/src/world/common/SpawnSunEffect.inc.c +++ b/src/world/common/SpawnSunEffect.inc.c @@ -2,7 +2,7 @@ #include "map.h" #include "effects.h" -ApiStatus N(SpawnSunEffect)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SpawnSunEffect)(Evt* script, s32 isInitialCall) { playFX_82(0, 0.0f, 0.0f, 0.0f, 0.0f, 0); return ApiStatus_DONE2; } diff --git a/src/world/common/StashVars.inc.c b/src/world/common/StashVars.inc.c index d749e72bf1..ff569de6c9 100644 --- a/src/world/common/StashVars.inc.c +++ b/src/world/common/StashVars.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(StashVars)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(StashVars)(Evt* script, s32 isInitialCall) { static s32** varTable = NULL; s32 i; diff --git a/src/world/common/SwitchToPartner.inc.c b/src/world/common/SwitchToPartner.inc.c index 8454e7c926..2c6b005e20 100644 --- a/src/world/common/SwitchToPartner.inc.c +++ b/src/world/common/SwitchToPartner.inc.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus N(SwitchToPartner)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SwitchToPartner)(Evt* script, s32 isInitialCall) { switch_to_partner(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } diff --git a/src/world/common/SyncStatusMenu.inc.c b/src/world/common/SyncStatusMenu.inc.c index 0f2e7a906d..90e12a3512 100644 --- a/src/world/common/SyncStatusMenu.inc.c +++ b/src/world/common/SyncStatusMenu.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(SyncStatusMenu)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(SyncStatusMenu)(Evt* script, s32 isInitialCall) { sync_status_menu(); return ApiStatus_DONE2; } diff --git a/src/world/common/UnkCameraFunc.inc.c b/src/world/common/UnkCameraFunc.inc.c index a1c3b631cb..9188bc1c24 100644 --- a/src/world/common/UnkCameraFunc.inc.c +++ b/src/world/common/UnkCameraFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkCameraFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkCameraFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); diff --git a/src/world/common/UnkDistFunc.inc.c b/src/world/common/UnkDistFunc.inc.c index dc3aace94e..6dcfc643c1 100644 --- a/src/world/common/UnkDistFunc.inc.c +++ b/src/world/common/UnkDistFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkDistFunc)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +ApiStatus N(UnkDistFunc)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkDurationCheck.inc.c b/src/world/common/UnkDurationCheck.inc.c index 7366488a2d..7e23b2d6ec 100644 --- a/src/world/common/UnkDurationCheck.inc.c +++ b/src/world/common/UnkDurationCheck.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkDurationCheck)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkDurationCheck)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); npc->duration--; diff --git a/src/world/common/UnkFunc1.inc.c b/src/world/common/UnkFunc1.inc.c index 4361b93533..556086fb08 100644 --- a/src/world/common/UnkFunc1.inc.c +++ b/src/world/common/UnkFunc1.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc1)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc1)(Evt* script, s32 isInitialCall) { increment_status_menu_disabled(); set_screen_overlay_params_back(0, 255.0f); return ApiStatus_DONE2; diff --git a/src/world/common/UnkFunc10.inc.c b/src/world/common/UnkFunc10.inc.c index ffa75d040a..0fccdd0cf5 100644 --- a/src/world/common/UnkFunc10.inc.c +++ b/src/world/common/UnkFunc10.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc10)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc10)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ; diff --git a/src/world/common/UnkFunc11.inc.c b/src/world/common/UnkFunc11.inc.c index e8a151e033..a3fe44d6f2 100644 --- a/src/world/common/UnkFunc11.inc.c +++ b/src/world/common/UnkFunc11.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc11)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc11)(Evt* script, s32 isInitialCall) { s32 var = get_variable(script, *script->ptrReadPos); PlayerStatus* playerStatus = &gPlayerStatus; CollisionStatus* collisionStatus = &gCollisionStatus; diff --git a/src/world/common/UnkFunc12.inc.c b/src/world/common/UnkFunc12.inc.c index 82c0945116..c43ddd954f 100644 --- a/src/world/common/UnkFunc12.inc.c +++ b/src/world/common/UnkFunc12.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc12)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc12)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; f32 posX, posY, posZ, posW; diff --git a/src/world/common/UnkFunc13.inc.c b/src/world/common/UnkFunc13.inc.c index 1eba76583a..ba9a678e35 100644 --- a/src/world/common/UnkFunc13.inc.c +++ b/src/world/common/UnkFunc13.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc13)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc13)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, z; diff --git a/src/world/common/UnkFunc13_copy.inc.c b/src/world/common/UnkFunc13_copy.inc.c index d7f85a5d15..a7c2ce0311 100644 --- a/src/world/common/UnkFunc13_copy.inc.c +++ b/src/world/common/UnkFunc13_copy.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc13_copy)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc13_copy)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 x, z; diff --git a/src/world/common/UnkFunc14.inc.c b/src/world/common/UnkFunc14.inc.c index 9bcdc878c6..fbdea62117 100644 --- a/src/world/common/UnkFunc14.inc.c +++ b/src/world/common/UnkFunc14.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc14)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc14)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; diff --git a/src/world/common/UnkFunc14_copy.inc.c b/src/world/common/UnkFunc14_copy.inc.c index 27f38bc4af..1f0dad61df 100644 --- a/src/world/common/UnkFunc14_copy.inc.c +++ b/src/world/common/UnkFunc14_copy.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc14_copy)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc14_copy)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; diff --git a/src/world/common/UnkFunc15.inc.c b/src/world/common/UnkFunc15.inc.c index 66ab6c89c7..245b9a4c77 100644 --- a/src/world/common/UnkFunc15.inc.c +++ b/src/world/common/UnkFunc15.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc15)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +ApiStatus N(UnkFunc15)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; diff --git a/src/world/common/UnkFunc15_copy.inc.c b/src/world/common/UnkFunc15_copy.inc.c index 7c2d75a961..3f2eeba287 100644 --- a/src/world/common/UnkFunc15_copy.inc.c +++ b/src/world/common/UnkFunc15_copy.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc15_copy)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +ApiStatus N(UnkFunc15_copy)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; diff --git a/src/world/common/UnkFunc16.inc.c b/src/world/common/UnkFunc16.inc.c index 428c1d1a2e..60891f025a 100644 --- a/src/world/common/UnkFunc16.inc.c +++ b/src/world/common/UnkFunc16.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc16)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc16)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 i; diff --git a/src/world/common/UnkFunc16_copy.inc.c b/src/world/common/UnkFunc16_copy.inc.c index 4b60233c08..1d73553532 100644 --- a/src/world/common/UnkFunc16_copy.inc.c +++ b/src/world/common/UnkFunc16_copy.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc16_copy)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc16_copy)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 i; diff --git a/src/world/common/UnkFunc17.inc.c b/src/world/common/UnkFunc17.inc.c index 7ff83e5735..f9bb51de4b 100644 --- a/src/world/common/UnkFunc17.inc.c +++ b/src/world/common/UnkFunc17.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc17)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc17)(Evt* script, s32 isInitialCall) { gOverrideFlags &= ~0x40; return ApiStatus_DONE2; } diff --git a/src/world/common/UnkFunc18.inc.c b/src/world/common/UnkFunc18.inc.c index a4af5633d5..063b2c7d61 100644 --- a/src/world/common/UnkFunc18.inc.c +++ b/src/world/common/UnkFunc18.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc18)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc18)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; Bytecode* args = script->ptrReadPos; s32 partnerIdx = get_variable(script, *args++); @@ -25,7 +25,7 @@ s32 N(UnkFunc37)(s32 idx, s16 arg1) { return -1; } -ApiStatus N(UnkFunc38)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc38)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; s32 i; s16 var = script->varTable[12] >= 0; diff --git a/src/world/common/UnkFunc19.inc.c b/src/world/common/UnkFunc19.inc.c index aeb060495b..bc86a45043 100644 --- a/src/world/common/UnkFunc19.inc.c +++ b/src/world/common/UnkFunc19.inc.c @@ -3,7 +3,7 @@ extern s32 D_8008EF20[11][4]; -ApiStatus N(UnkFunc19)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc19)(Evt* script, s32 isInitialCall) { set_message_string(D_8008EF20[gPlayerData.currentPartner][0], 0); return ApiStatus_DONE2; diff --git a/src/world/common/UnkFunc20.inc.c b/src/world/common/UnkFunc20.inc.c index 623d22dc86..db4540619a 100644 --- a/src/world/common/UnkFunc20.inc.c +++ b/src/world/common/UnkFunc20.inc.c @@ -2,7 +2,7 @@ #include "map.h" #include "effects.h" -ApiStatus N(UnkFunc20)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc20)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 entityIdx = get_variable(script, *args++); Entity* entity = get_entity_by_index(entityIdx); diff --git a/src/world/common/UnkFunc21.inc.c b/src/world/common/UnkFunc21.inc.c index 00ab7bde6b..f035d967a3 100644 --- a/src/world/common/UnkFunc21.inc.c +++ b/src/world/common/UnkFunc21.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc21)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc21)(Evt* script, s32 isInitialCall) { Entity* entity = get_entity_by_index(get_variable(script, *script->ptrReadPos)); playFX_33(4, entity->position.x, entity->position.y + 12.5f, entity->position.z, 1.0f, 0x4B); diff --git a/src/world/common/UnkFunc22.inc.c b/src/world/common/UnkFunc22.inc.c index db27e70375..1dec31aa00 100644 --- a/src/world/common/UnkFunc22.inc.c +++ b/src/world/common/UnkFunc22.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc22)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc22)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_safe(-4); playFX_33(9, npc->pos.x, npc->pos.y + 12.5f, npc->pos.z, 1.0f, 0x1E); diff --git a/src/world/common/UnkFunc23.inc.c b/src/world/common/UnkFunc23.inc.c index 67dbb3e18b..07feaeb38b 100644 --- a/src/world/common/UnkFunc23.inc.c +++ b/src/world/common/UnkFunc23.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -s32 N(UnkFunc23)(ScriptInstance* script, s32 isInitialCall) { +s32 N(UnkFunc23)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 ret = 0; diff --git a/src/world/common/UnkFunc24.inc.c b/src/world/common/UnkFunc24.inc.c index abf06e5205..f2a60248ca 100644 --- a/src/world/common/UnkFunc24.inc.c +++ b/src/world/common/UnkFunc24.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc24)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc24)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; if ((gPartnerActionStatus.actionState.b[0] != 0) && (gPartnerActionStatus.actionState.b[3] == 3)) { script->varTable[0] = 1; diff --git a/src/world/common/UnkFunc25.inc.c b/src/world/common/UnkFunc25.inc.c index 943b0bff54..6df7d1e81d 100644 --- a/src/world/common/UnkFunc25.inc.c +++ b/src/world/common/UnkFunc25.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc25)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc25)(Evt* script, s32 isInitialCall) { CollisionStatus* collisionStatus = &gCollisionStatus; s32 stickX, stickY; diff --git a/src/world/common/UnkFunc26.inc.c b/src/world/common/UnkFunc26.inc.c index 45f0161ca3..cc064b5350 100644 --- a/src/world/common/UnkFunc26.inc.c +++ b/src/world/common/UnkFunc26.inc.c @@ -4,7 +4,7 @@ void set_model_fog_color_parameters(u8 var2, u8 var3, u8 var4, u8 var5, u8 var6, u8 var7, u8 var8, s32 var9, s32 var10); void set_model_env_color_parameters(u8 var2, u8 var3, u8 var4, u8 var5, u8 var6, u8 var7); -ApiStatus N(UnkFunc26)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc26)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/world/common/UnkFunc27.inc.c b/src/world/common/UnkFunc27.inc.c index d81cc13540..b1ba21e916 100644 --- a/src/world/common/UnkFunc27.inc.c +++ b/src/world/common/UnkFunc27.inc.c @@ -3,7 +3,7 @@ void func_8011B950(u16, s32, s32, s32); -ApiStatus N(UnkFunc27)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc27)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 testS2 = get_variable(script, *args++); s32 testS0 = get_variable(script, *args++); diff --git a/src/world/common/UnkFunc31.inc.c b/src/world/common/UnkFunc31.inc.c index 08c08403a9..b76412d4a9 100644 --- a/src/world/common/UnkFunc31.inc.c +++ b/src/world/common/UnkFunc31.inc.c @@ -3,7 +3,7 @@ s32 N(UnkFunc28)(Npc* npc); -ApiStatus N(UnkFunc31)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc31)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(script->owner2.npcID); npc->onRender = N(UnkFunc28); @@ -13,7 +13,7 @@ ApiStatus N(UnkFunc31)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE1; } -ApiStatus N(GetNpcUnsafeOwner2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(GetNpcUnsafeOwner2)(Evt* script, s32 isInitialCall) { get_npc_unsafe(script->owner2.npcID); return ApiStatus_BLOCK; } @@ -26,7 +26,7 @@ s32 N(UnkFunc28)(Npc* npc) { } } -ApiStatus N(UnkAlphaFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkAlphaFunc)(Evt* script, s32 isInitialCall) { if (isInitialCall) { s32 i; @@ -62,7 +62,7 @@ ApiStatus N(UnkAlphaFunc)(ScriptInstance* script, s32 isInitialCall) { return (script->functionTemp[0] == 255) * ApiStatus_DONE2; } -ApiStatus N(UnkFunc29)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc29)(Evt* script, s32 isInitialCall) { s32 i; if (isInitialCall) { diff --git a/src/world/common/UnkFunc32.inc.c b/src/world/common/UnkFunc32.inc.c index 75db1a24ea..f73f49b875 100644 --- a/src/world/common/UnkFunc32.inc.c +++ b/src/world/common/UnkFunc32.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc32)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc32)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/world/common/UnkFunc35.inc.c b/src/world/common/UnkFunc35.inc.c index f344bc329e..4331c78219 100644 --- a/src/world/common/UnkFunc35.inc.c +++ b/src/world/common/UnkFunc35.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc35)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc35)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/world/common/UnkFunc36.inc.c b/src/world/common/UnkFunc36.inc.c index 69ffde37f3..a222e4de1d 100644 --- a/src/world/common/UnkFunc36.inc.c +++ b/src/world/common/UnkFunc36.inc.c @@ -1,6 +1,6 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc36)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc36)(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } diff --git a/src/world/common/UnkFunc39.inc.c b/src/world/common/UnkFunc39.inc.c index c13aee0564..1de1f8443e 100644 --- a/src/world/common/UnkFunc39.inc.c +++ b/src/world/common/UnkFunc39.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc39)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc39)(Evt* script, s32 isInitialCall) { EffectGraphics* effect = (EffectGraphics*)get_variable(script, *script->ptrReadPos); effect->flags |= 0x10; diff --git a/src/world/common/UnkFunc4.inc.c b/src/world/common/UnkFunc4.inc.c index 75a29a435e..39abc99f44 100644 --- a/src/world/common/UnkFunc4.inc.c +++ b/src/world/common/UnkFunc4.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; diff --git a/src/world/common/UnkFunc40.inc.c b/src/world/common/UnkFunc40.inc.c index a108485855..7c359b5f9e 100644 --- a/src/world/common/UnkFunc40.inc.c +++ b/src/world/common/UnkFunc40.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc40)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc40)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; if ((gPartnerActionStatus.actionState.b[0] != 0) && (gPartnerActionStatus.actionState.b[3] == 3)) { script->varTable[0] = 1; diff --git a/src/world/common/UnkFunc41.inc.c b/src/world/common/UnkFunc41.inc.c index b472f7e852..795ad16d73 100644 --- a/src/world/common/UnkFunc41.inc.c +++ b/src/world/common/UnkFunc41.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc41)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc41)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerData* playerData = &gPlayerData; NpcID npcID = get_variable(script, *args++); diff --git a/src/world/common/UnkFunc42.inc.c b/src/world/common/UnkFunc42.inc.c index f726491ff3..2063e8c364 100644 --- a/src/world/common/UnkFunc42.inc.c +++ b/src/world/common/UnkFunc42.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc42)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc42)(Evt* script, s32 isInitialCall) { script->varTable[10] = atan2(script->varTable[0], script->varTable[2], script->varTable[3], script->varTable[5]); return ApiStatus_DONE2; } diff --git a/src/world/common/UnkFunc43.inc.c b/src/world/common/UnkFunc43.inc.c index 7ac850a1d6..e3e61d95ce 100644 --- a/src/world/common/UnkFunc43.inc.c +++ b/src/world/common/UnkFunc43.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc43)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc43)(Evt* script, s32 isInitialCall) { 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/UnkFunc44.inc.c b/src/world/common/UnkFunc44.inc.c index 44e6f25793..b5fbb3ac55 100644 --- a/src/world/common/UnkFunc44.inc.c +++ b/src/world/common/UnkFunc44.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc44)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc44)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; do {} while (0); if (gPlayerActionState == ACTION_STATE_GROUND_POUND) { diff --git a/src/world/common/UnkFunc45.inc.c b/src/world/common/UnkFunc45.inc.c index 5404dc8f8d..10611594b3 100644 --- a/src/world/common/UnkFunc45.inc.c +++ b/src/world/common/UnkFunc45.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc45)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc45)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkFunc5.inc.c b/src/world/common/UnkFunc5.inc.c index aca1a56af1..95c49dc7ee 100644 --- a/src/world/common/UnkFunc5.inc.c +++ b/src/world/common/UnkFunc5.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc5)(Npc* npc, Enemy* enemy, ScriptInstance* script, NpcAISettings* aiSettings) { +void N(UnkFunc5)(Npc* npc, Enemy* enemy, Evt* script, NpcAISettings* aiSettings) { f32 posX, posY, posZ, posW; s32 temp_a1; s32 temp_v1; diff --git a/src/world/common/UnkFunc6.inc.c b/src/world/common/UnkFunc6.inc.c index 5821e8e674..119232b0e4 100644 --- a/src/world/common/UnkFunc6.inc.c +++ b/src/world/common/UnkFunc6.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc6)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc6)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ, posW; diff --git a/src/world/common/UnkFunc7.inc.c b/src/world/common/UnkFunc7.inc.c index 012fd5ede7..870fbed00a 100644 --- a/src/world/common/UnkFunc7.inc.c +++ b/src/world/common/UnkFunc7.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkFunc7)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkFunc7)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Enemy* enemy2; diff --git a/src/world/common/UnkFunc8.inc.c b/src/world/common/UnkFunc8.inc.c index 22a5936920..4f64484339 100644 --- a/src/world/common/UnkFunc8.inc.c +++ b/src/world/common/UnkFunc8.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc8)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 var; diff --git a/src/world/common/UnkFunc9.inc.c b/src/world/common/UnkFunc9.inc.c index 11abe0c83a..06e87fe43d 100644 --- a/src/world/common/UnkFunc9.inc.c +++ b/src/world/common/UnkFunc9.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkFunc9)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkFunc9)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkMoveFunc1.inc.c b/src/world/common/UnkMoveFunc1.inc.c index f3fa4c36a9..3048752d88 100644 --- a/src/world/common/UnkMoveFunc1.inc.c +++ b/src/world/common/UnkMoveFunc1.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkMoveFunc1)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkMoveFunc1)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* playerActor = battleStatus->playerActor; f32 posX = playerActor->currentPos.x; diff --git a/src/world/common/UnkMoveFunc2.inc.c b/src/world/common/UnkMoveFunc2.inc.c index 089f3d56c8..e92cce7dbe 100644 --- a/src/world/common/UnkMoveFunc2.inc.c +++ b/src/world/common/UnkMoveFunc2.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkMoveFunc2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkMoveFunc2)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/world/common/UnkMoveFunc3.inc.c b/src/world/common/UnkMoveFunc3.inc.c index d681dd5bf8..2bebfba33d 100644 --- a/src/world/common/UnkMoveFunc3.inc.c +++ b/src/world/common/UnkMoveFunc3.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkMoveFunc3)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkMoveFunc3)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var1 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++); diff --git a/src/world/common/UnkMusicFunc.inc.c b/src/world/common/UnkMusicFunc.inc.c index ee8ea540cd..009ea8e939 100644 --- a/src/world/common/UnkMusicFunc.inc.c +++ b/src/world/common/UnkMusicFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkMusicFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkMusicFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; X32* something; s32 cond = 0; diff --git a/src/world/common/UnkNpcAIFunc1.inc.c b/src/world/common/UnkNpcAIFunc1.inc.c index c5250c48f7..3cacf5d576 100644 --- a/src/world/common/UnkNpcAIFunc1.inc.c +++ b/src/world/common/UnkNpcAIFunc1.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc1)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc1)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc10.inc.c b/src/world/common/UnkNpcAIFunc10.inc.c index 4a25da126d..51428fb089 100644 --- a/src/world/common/UnkNpcAIFunc10.inc.c +++ b/src/world/common/UnkNpcAIFunc10.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc10)(ScriptInstance* script) { +void N(UnkNpcAIFunc10)(Evt* script) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); npc->duration--; diff --git a/src/world/common/UnkNpcAIFunc11.inc.c b/src/world/common/UnkNpcAIFunc11.inc.c index 6f9fbab0a4..4695af6541 100644 --- a/src/world/common/UnkNpcAIFunc11.inc.c +++ b/src/world/common/UnkNpcAIFunc11.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc11)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* arg2) { +void N(UnkNpcAIFunc11)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* arg2) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc12.inc.c b/src/world/common/UnkNpcAIFunc12.inc.c index 48fac40518..816016fcdc 100644 --- a/src/world/common/UnkNpcAIFunc12.inc.c +++ b/src/world/common/UnkNpcAIFunc12.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc12)(ScriptInstance* script, NpcAISettings* aiSettings, s32 arg2) { +void N(UnkNpcAIFunc12)(Evt* script, NpcAISettings* aiSettings, s32 arg2) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 temp; diff --git a/src/world/common/UnkNpcAIFunc13.inc.c b/src/world/common/UnkNpcAIFunc13.inc.c index f5bc041d53..0a3714f260 100644 --- a/src/world/common/UnkNpcAIFunc13.inc.c +++ b/src/world/common/UnkNpcAIFunc13.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc13)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc13)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 tempAngle; diff --git a/src/world/common/UnkNpcAIFunc13_2.inc.c b/src/world/common/UnkNpcAIFunc13_2.inc.c index 6b406f4f58..7f0e2b8cfa 100644 --- a/src/world/common/UnkNpcAIFunc13_2.inc.c +++ b/src/world/common/UnkNpcAIFunc13_2.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc13_2)(ScriptInstance* script, NpcAISettings* aiSettings, s32 arg2) { +void N(UnkNpcAIFunc13_2)(Evt* script, NpcAISettings* aiSettings, s32 arg2) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 tempAngle; diff --git a/src/world/common/UnkNpcAIFunc14.inc.c b/src/world/common/UnkNpcAIFunc14.inc.c index 3ed4f99da9..dd19808d9f 100644 --- a/src/world/common/UnkNpcAIFunc14.inc.c +++ b/src/world/common/UnkNpcAIFunc14.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc14)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc14)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 vt5 = enemy->varTable[5]; diff --git a/src/world/common/UnkNpcAIFunc15.inc.c b/src/world/common/UnkNpcAIFunc15.inc.c index 0efcaf8db4..e27f8acc9f 100644 --- a/src/world/common/UnkNpcAIFunc15.inc.c +++ b/src/world/common/UnkNpcAIFunc15.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc15)(ScriptInstance* script, NpcAISettings* aiSettings, s32 arg2) { +void N(UnkNpcAIFunc15)(Evt* script, NpcAISettings* aiSettings, s32 arg2) { Npc* enemy = get_npc_unsafe(script->owner1.enemy->npcID); func_80049F7C(script, aiSettings, arg2); diff --git a/src/world/common/UnkNpcAIFunc16.inc.c b/src/world/common/UnkNpcAIFunc16.inc.c index 65ffc5d939..9a62450508 100644 --- a/src/world/common/UnkNpcAIFunc16.inc.c +++ b/src/world/common/UnkNpcAIFunc16.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc16)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc16)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc17.inc.c b/src/world/common/UnkNpcAIFunc17.inc.c index f4fb83377b..357d7840af 100644 --- a/src/world/common/UnkNpcAIFunc17.inc.c +++ b/src/world/common/UnkNpcAIFunc17.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc17)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc17)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc18.inc.c b/src/world/common/UnkNpcAIFunc18.inc.c index 4ef6b1293c..080e98f1da 100644 --- a/src/world/common/UnkNpcAIFunc18.inc.c +++ b/src/world/common/UnkNpcAIFunc18.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc18)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc18)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc19.inc.c b/src/world/common/UnkNpcAIFunc19.inc.c index 3e04fba084..60d5776a41 100644 --- a/src/world/common/UnkNpcAIFunc19.inc.c +++ b/src/world/common/UnkNpcAIFunc19.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc19)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc19)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc1_copy.inc.c b/src/world/common/UnkNpcAIFunc1_copy.inc.c index 93a499ad03..ce86512376 100644 --- a/src/world/common/UnkNpcAIFunc1_copy.inc.c +++ b/src/world/common/UnkNpcAIFunc1_copy.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc1_copy)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc1_copy)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc2.inc.c b/src/world/common/UnkNpcAIFunc2.inc.c index 41479e9c3d..c06805509d 100644 --- a/src/world/common/UnkNpcAIFunc2.inc.c +++ b/src/world/common/UnkNpcAIFunc2.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc2)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc2)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); PlayerStatus* playerStatus = gPlayerStatusPtr; diff --git a/src/world/common/UnkNpcAIFunc20.inc.c b/src/world/common/UnkNpcAIFunc20.inc.c index 31683b1371..cb5d192c6a 100644 --- a/src/world/common/UnkNpcAIFunc20.inc.c +++ b/src/world/common/UnkNpcAIFunc20.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc20)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc20)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); npc->duration--; diff --git a/src/world/common/UnkNpcAIFunc21.inc.c b/src/world/common/UnkNpcAIFunc21.inc.c index 458cc5588a..85162533ff 100644 --- a/src/world/common/UnkNpcAIFunc21.inc.c +++ b/src/world/common/UnkNpcAIFunc21.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc21)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc21)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc22.inc.c b/src/world/common/UnkNpcAIFunc22.inc.c index 38de9ca8bd..81a5849f41 100644 --- a/src/world/common/UnkNpcAIFunc22.inc.c +++ b/src/world/common/UnkNpcAIFunc22.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc22)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc22)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc23.inc.c b/src/world/common/UnkNpcAIFunc23.inc.c index aae9ce641e..4fd7ebb4b2 100644 --- a/src/world/common/UnkNpcAIFunc23.inc.c +++ b/src/world/common/UnkNpcAIFunc23.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc23)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc23)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc24.inc.c b/src/world/common/UnkNpcAIFunc24.inc.c index 66154ebcb5..d66915a97e 100644 --- a/src/world/common/UnkNpcAIFunc24.inc.c +++ b/src/world/common/UnkNpcAIFunc24.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc24)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc24)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 ret; diff --git a/src/world/common/UnkNpcAIFunc25.inc.c b/src/world/common/UnkNpcAIFunc25.inc.c index 8579c98123..ddf4185a78 100644 --- a/src/world/common/UnkNpcAIFunc25.inc.c +++ b/src/world/common/UnkNpcAIFunc25.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc25)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc25)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc26.inc.c b/src/world/common/UnkNpcAIFunc26.inc.c index 0ff8663cd2..583c689431 100644 --- a/src/world/common/UnkNpcAIFunc26.inc.c +++ b/src/world/common/UnkNpcAIFunc26.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -s32 N(UnkNpcAIFunc26)(ScriptInstance* script) { +s32 N(UnkNpcAIFunc26)(Evt* script) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Camera* camera = &gCameras[gCurrentCamID]; diff --git a/src/world/common/UnkNpcAIFunc27.inc.c b/src/world/common/UnkNpcAIFunc27.inc.c index d694963090..d8d4aea475 100644 --- a/src/world/common/UnkNpcAIFunc27.inc.c +++ b/src/world/common/UnkNpcAIFunc27.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkNpcAIFunc27)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(UnkNpcAIFunc27)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkNpcAIFunc28.inc.c b/src/world/common/UnkNpcAIFunc28.inc.c index fd0500a72a..cbca6f77d6 100644 --- a/src/world/common/UnkNpcAIFunc28.inc.c +++ b/src/world/common/UnkNpcAIFunc28.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkNpcAIFunc28)(ScriptInstance *script, s32 isInitialCall) { +ApiStatus N(UnkNpcAIFunc28)(Evt *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; diff --git a/src/world/common/UnkNpcAIFunc29.inc.c b/src/world/common/UnkNpcAIFunc29.inc.c index 578e5817e1..b61dee087d 100644 --- a/src/world/common/UnkNpcAIFunc29.inc.c +++ b/src/world/common/UnkNpcAIFunc29.inc.c @@ -2,7 +2,7 @@ #include "map.h" #include "effects.h" -void N(UnkNpcAIFunc29)(ScriptInstance *script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc29)(Evt *script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 d100; diff --git a/src/world/common/UnkNpcAIFunc3.inc.c b/src/world/common/UnkNpcAIFunc3.inc.c index 5ef55eb62c..5c314077e6 100644 --- a/src/world/common/UnkNpcAIFunc3.inc.c +++ b/src/world/common/UnkNpcAIFunc3.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc3)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc3)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); if ((npc->duration <= 0) || (--npc->duration <= 0)) { diff --git a/src/world/common/UnkNpcAIFunc30.inc.c b/src/world/common/UnkNpcAIFunc30.inc.c index 8ec22028cf..d3d2416e3b 100644 --- a/src/world/common/UnkNpcAIFunc30.inc.c +++ b/src/world/common/UnkNpcAIFunc30.inc.c @@ -2,7 +2,7 @@ #include "map.h" #include "effects.h" -void N(UnkNpcAIFunc30)(ScriptInstance *script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc30)(Evt *script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 retVal; diff --git a/src/world/common/UnkNpcAIFunc4.inc.c b/src/world/common/UnkNpcAIFunc4.inc.c index cd649b82ac..cf8ad78605 100644 --- a/src/world/common/UnkNpcAIFunc4.inc.c +++ b/src/world/common/UnkNpcAIFunc4.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcAIFunc4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc5.inc.c b/src/world/common/UnkNpcAIFunc5.inc.c index 5085f6db89..a1d65bf77d 100644 --- a/src/world/common/UnkNpcAIFunc5.inc.c +++ b/src/world/common/UnkNpcAIFunc5.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc5)(ScriptInstance* script) { +void N(UnkNpcAIFunc5)(Evt* script) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc6.inc.c b/src/world/common/UnkNpcAIFunc6.inc.c index 4340e25919..23936c7ae8 100644 --- a/src/world/common/UnkNpcAIFunc6.inc.c +++ b/src/world/common/UnkNpcAIFunc6.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc6)(ScriptInstance* script) { +void N(UnkNpcAIFunc6)(Evt* script) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc7.inc.c b/src/world/common/UnkNpcAIFunc7.inc.c index 8909a87dc4..70bcf30df0 100644 --- a/src/world/common/UnkNpcAIFunc7.inc.c +++ b/src/world/common/UnkNpcAIFunc7.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc7)(ScriptInstance* script) { +void N(UnkNpcAIFunc7)(Evt* script) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc8.inc.c b/src/world/common/UnkNpcAIFunc8.inc.c index 083443d964..e1e9013e54 100644 --- a/src/world/common/UnkNpcAIFunc8.inc.c +++ b/src/world/common/UnkNpcAIFunc8.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc8)(ScriptInstance* script) { +void N(UnkNpcAIFunc8)(Evt* script) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcAIFunc9.inc.c b/src/world/common/UnkNpcAIFunc9.inc.c index 6f10dc58da..051e085b62 100644 --- a/src/world/common/UnkNpcAIFunc9.inc.c +++ b/src/world/common/UnkNpcAIFunc9.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcAIFunc9)(ScriptInstance* script) { +void N(UnkNpcAIFunc9)(Evt* script) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Enemy* enemy2 = get_enemy(enemy->npcID + 1); diff --git a/src/world/common/UnkNpcDurationAnimationFunc.inc.c b/src/world/common/UnkNpcDurationAnimationFunc.inc.c index 7fbe36b237..971e8d82cd 100644 --- a/src/world/common/UnkNpcDurationAnimationFunc.inc.c +++ b/src/world/common/UnkNpcDurationAnimationFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcDurationAnimationFunc)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcDurationAnimationFunc)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcDurationFlagFunc.inc.c b/src/world/common/UnkNpcDurationFlagFunc.inc.c index b33c8e9044..69979696cf 100644 --- a/src/world/common/UnkNpcDurationFlagFunc.inc.c +++ b/src/world/common/UnkNpcDurationFlagFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcDurationFlagFunc)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcDurationFlagFunc)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcDurationFlagFunc2.inc.c b/src/world/common/UnkNpcDurationFlagFunc2.inc.c index fb2c73333d..b98c569c87 100644 --- a/src/world/common/UnkNpcDurationFlagFunc2.inc.c +++ b/src/world/common/UnkNpcDurationFlagFunc2.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcDurationFlagFunc2)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcDurationFlagFunc2)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkNpcDurationFlagFunc3.inc.c b/src/world/common/UnkNpcDurationFlagFunc3.inc.c index 9da2a513c2..645b752be8 100644 --- a/src/world/common/UnkNpcDurationFlagFunc3.inc.c +++ b/src/world/common/UnkNpcDurationFlagFunc3.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkNpcDurationFlagFunc3)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(UnkNpcDurationFlagFunc3)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/UnkPartnerFuncs.inc.c b/src/world/common/UnkPartnerFuncs.inc.c index a63b7097f9..5841cb13a6 100644 --- a/src/world/common/UnkPartnerFuncs.inc.c +++ b/src/world/common/UnkPartnerFuncs.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkRotatePartner)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkRotatePartner)(Evt* script, s32 isInitialCall) { Npc* partner = get_npc_unsafe(NPC_PARTNER); if (isInitialCall) { @@ -18,7 +18,7 @@ ApiStatus N(UnkRotatePartner)(ScriptInstance* script, s32 isInitialCall) { return (script->functionTemp[0] >> 0x1F) & ApiStatus_DONE2; } -ApiStatus N(UnkMovePartner)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkMovePartner)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(NPC_PARTNER); f32* x = (f32*) &script->functionTemp[1]; f32* y = (f32*) &script->functionTemp[2]; diff --git a/src/world/common/UnkPartnerPosFuncs.inc.c b/src/world/common/UnkPartnerPosFuncs.inc.c index f6b9bc456b..32069f4369 100644 --- a/src/world/common/UnkPartnerPosFuncs.inc.c +++ b/src/world/common/UnkPartnerPosFuncs.inc.c @@ -1,13 +1,13 @@ #include "common.h" -ApiStatus N(UnkPartnerPosFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkPartnerPosFunc)(Evt* script, s32 isInitialCall) { Npc* partner = get_npc_safe(NPC_PARTNER); playFX_11(2, partner->pos.x, partner->pos.y + 30.0f, partner->pos.z, 30.0f); return ApiStatus_DONE2; } -ApiStatus N(UnkPartnerPosFunc2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkPartnerPosFunc2)(Evt* script, s32 isInitialCall) { Npc* partner = get_npc_safe(NPC_PARTNER); playFX_11(4, partner->pos.x, partner->pos.y + 30.0f, partner->pos.z, 30.0f); diff --git a/src/world/common/UnkPositionFunc.inc.c b/src/world/common/UnkPositionFunc.inc.c index 803a3df5e4..3a6b1c96ae 100644 --- a/src/world/common/UnkPositionFunc.inc.c +++ b/src/world/common/UnkPositionFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkPositionFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkPositionFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; f32 var0 = get_variable(script, *args++); diff --git a/src/world/common/UnkRotatePlayer.inc.c b/src/world/common/UnkRotatePlayer.inc.c index d164665e50..01f15520e0 100644 --- a/src/world/common/UnkRotatePlayer.inc.c +++ b/src/world/common/UnkRotatePlayer.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkRotatePlayer)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkRotatePlayer)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; if (isInitialCall) { diff --git a/src/world/common/UnkSetDurationFunc.inc.c b/src/world/common/UnkSetDurationFunc.inc.c index 7e02abe6bc..21f6d724ab 100644 --- a/src/world/common/UnkSetDurationFunc.inc.c +++ b/src/world/common/UnkSetDurationFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(UnkSetDurationFunc)(ScriptInstance* script) { +void N(UnkSetDurationFunc)(Evt* script) { Enemy* enemy = script->owner1.enemy; get_npc_unsafe(enemy->npcID)->duration = enemy->varTable[2]; diff --git a/src/world/common/UnkTexturePanFunc.inc.c b/src/world/common/UnkTexturePanFunc.inc.c index 44b0a1713a..bd8c033ec5 100644 --- a/src/world/common/UnkTexturePanFunc.inc.c +++ b/src/world/common/UnkTexturePanFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkTexturePanFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkTexturePanFunc)(Evt* script, s32 isInitialCall) { script->varTable[9] += script->varTable[1]; if (script->varTable[9] < 0) { script->varTable[9] += 0x20000; diff --git a/src/world/common/UnkTexturePanFunc2.inc.c b/src/world/common/UnkTexturePanFunc2.inc.c index 7f0f023b98..45f697f616 100644 --- a/src/world/common/UnkTexturePanFunc2.inc.c +++ b/src/world/common/UnkTexturePanFunc2.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkTexturePanFunc2)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkTexturePanFunc2)(Evt* script, s32 isInitialCall) { if (isInitialCall) { script->functionTemp[0] = 0; script->functionTemp[1] = 0; diff --git a/src/world/common/UnkYawFunc.inc.c b/src/world/common/UnkYawFunc.inc.c index 9b1d66b3e9..53d3373475 100644 --- a/src/world/common/UnkYawFunc.inc.c +++ b/src/world/common/UnkYawFunc.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnkYawFunc)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnkYawFunc)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 a0 = *args++; f32 a = get_variable(script, a0); diff --git a/src/world/common/UnsetCamera0Flag1000.inc.c b/src/world/common/UnsetCamera0Flag1000.inc.c index b02ee80aa2..39f795e89c 100644 --- a/src/world/common/UnsetCamera0Flag1000.inc.c +++ b/src/world/common/UnsetCamera0Flag1000.inc.c @@ -2,7 +2,7 @@ #include "map.h" #include "camera.h" -ApiStatus N(UnsetCamera0Flag1000)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnsetCamera0Flag1000)(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[0]; camera->flags &= ~CAM_FLAG_1000; diff --git a/src/world/common/UnsetCamera0MoveFlag1.inc.c b/src/world/common/UnsetCamera0MoveFlag1.inc.c index 9cc66d8715..b24296352b 100644 --- a/src/world/common/UnsetCamera0MoveFlag1.inc.c +++ b/src/world/common/UnsetCamera0MoveFlag1.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -ApiStatus N(UnsetCamera0MoveFlag1)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(UnsetCamera0MoveFlag1)(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[0]; camera->moveFlags &= ~1; diff --git a/src/world/common/foliage.inc.c b/src/world/common/foliage.inc.c index 878f441632..8aef96c2c2 100644 --- a/src/world/common/foliage.inc.c +++ b/src/world/common/foliage.inc.c @@ -26,7 +26,7 @@ typedef struct SearchBushConfig { FoliageModelList* bush; FoliageDropList* drops; FoliageVectorList* vectors; - Script* callback; + EvtSource* callback; } SearchBushConfig; typedef struct ShakeTreeConfig { @@ -34,7 +34,7 @@ typedef struct ShakeTreeConfig { FoliageModelList* trunk; FoliageDropList* drops; FoliageVectorList* vectors; - Script* callback; + EvtSource* callback; } ShakeTreeConfig; void N(foliage_setup_shear_mtx)(Matrix4f mtx, f32 scale, f32 xAmount, f32 zAmount) { @@ -49,7 +49,7 @@ void N(foliage_setup_shear_mtx)(Matrix4f mtx, f32 scale, f32 xAmount, f32 zAmoun /// @apiparam float dx /// @apiparam float dy /// @apiparam float dz -ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 modelListIndex = get_model_list_index_from_tree_index(get_variable(script, *args++)); f32 scale = get_float_variable(script, *args++); @@ -78,7 +78,7 @@ ApiStatus N(TransformFoliage)(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -Script N(searchBush) = SCRIPT({ +EvtSource N(searchBush) = SCRIPT({ buf_use SI_VAR(0); buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3) SI_VAR(4); GetPlayerPos(SI_VAR(5), SI_VAR(15), SI_VAR(7)); @@ -140,7 +140,7 @@ Script N(searchBush) = SCRIPT({ } }); -Script N(shakeTree) = SCRIPT({ +EvtSource N(shakeTree) = SCRIPT({ timescale 2.0; buf_use SI_VAR(0); buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3) SI_VAR(4); diff --git a/src/world/common/reflection.inc.c b/src/world/common/reflection.inc.c index b9acf27a4e..664444f156 100644 --- a/src/world/common/reflection.inc.c +++ b/src/world/common/reflection.inc.c @@ -62,7 +62,7 @@ s32 N(reflection_unk_change_anim_facing)(s32 playerAnim) { return playerAnim | 0x1000000; } -ApiStatus N(ReflectWall)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(ReflectWall)(Evt* script, s32 isInitialCall) { script->array[0] = (s32) create_generic_entity_world(NULL, N(reflection_setup_wall)); return ApiStatus_DONE2; } @@ -138,7 +138,7 @@ void N(reflection_render_wall)(PlayerStatus* playerStatus) { spr_draw_player_sprite(2, 0, 0, NULL, main); } -ApiStatus N(ReflectFloor)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(ReflectFloor)(Evt* script, s32 isInitialCall) { switch (script->varTable[0]) { case REFLECTION_FLOOR_WALL: case REFLECTION_FLOOR: @@ -316,7 +316,7 @@ void N(reflection_render_floor_fancy)(PlayerStatus* playerStatus) { /// int var0 = reflection type /// bool var1 = enable wall reflection -ApiStatus N(ReflectPartner)(ScriptInstance* script, s32 isInitialCall) { +ApiStatus N(ReflectPartner)(Evt* script, s32 isInitialCall) { Npc* partner; if (script->varTable[1] == FALSE) { @@ -402,7 +402,7 @@ void N(SetPartnerFlags20000)(void) { // Requires most of area_pra to have its data decomped. /* -#new:Script $Script_802415D0 +#new:EvtSource $Script_802415D0 { 0: NewArray 00000010 *VarA 10: If *Var1 == 00000000 diff --git a/src/world/common/set_script_owner_npc_anim.inc.c b/src/world/common/set_script_owner_npc_anim.inc.c index 741b7d76e9..42fe45a0ac 100644 --- a/src/world/common/set_script_owner_npc_anim.inc.c +++ b/src/world/common/set_script_owner_npc_anim.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(set_script_owner_npc_anim)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { +void N(set_script_owner_npc_anim)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/common/set_script_owner_npc_col_height.inc.c b/src/world/common/set_script_owner_npc_col_height.inc.c index b847c19fe9..ca3ca2a151 100644 --- a/src/world/common/set_script_owner_npc_col_height.inc.c +++ b/src/world/common/set_script_owner_npc_col_height.inc.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void N(set_script_owner_npc_col_height)(ScriptInstance* script, NpcAISettings* aiSettings, +void N(set_script_owner_npc_col_height)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); diff --git a/src/world/partner/bombette.c b/src/world/partner/bombette.c index 4fa54e5215..e9c7d334ce 100644 --- a/src/world/partner/bombette.c +++ b/src/world/partner/bombette.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/partner/bombette", func_802BD100_317E50); INCLUDE_ASM(s32, "world/partner/bombette", func_802BD2D8_318028); -ApiStatus func_802BD300_318050(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BD300_318050(Evt* script, s32 isInitialCall) { Npc* unk = script->owner2.npc; // todo what is this if (isInitialCall) { @@ -33,7 +33,7 @@ s32 func_802BD748(void) { INCLUDE_ASM(s32, "world/partner/bombette", func_802BD758_3184A8); -ApiStatus func_802BE4E8_319238(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BE4E8_319238(Evt* script, s32 isInitialCall) { s32 unk = script->owner2.npc; // todo what is this if (isInitialCall) { diff --git a/src/world/partner/goombaria.c b/src/world/partner/goombaria.c index 3d4ca80e4c..04b51ba0a0 100644 --- a/src/world/partner/goombaria.c +++ b/src/world/partner/goombaria.c @@ -7,7 +7,7 @@ void world_goombaria_init(Npc* partner) { partner->collisionRadius = 20; } -ApiStatus GoombariaTakeOut(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GoombariaTakeOut(Evt* script, s32 isInitialCall) { Npc* owner = script->owner2.npc; if (isInitialCall) { @@ -16,7 +16,7 @@ ApiStatus GoombariaTakeOut(ScriptInstance* script, s32 isInitialCall) { return partner_get_out(owner) != 0; } -ApiStatus GoombariaUpdate(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GoombariaUpdate(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; Npc* owner = script->owner2.npc; @@ -31,11 +31,11 @@ ApiStatus GoombariaUpdate(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus GoombariaUseAbility(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GoombariaUseAbility(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GoombariaPutAway(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GoombariaPutAway(Evt* script, s32 isInitialCall) { Npc* owner = script->owner2.npc; if (isInitialCall) { @@ -44,18 +44,18 @@ ApiStatus GoombariaPutAway(ScriptInstance* script, s32 isInitialCall) { return partner_put_away(owner) != 0; } -Script world_goombaria_take_out = SCRIPT({ +EvtSource world_goombaria_take_out = SCRIPT({ GoombariaTakeOut(); }); -Script world_goombaria_update = SCRIPT({ +EvtSource world_goombaria_update = SCRIPT({ GoombariaUpdate(); }); -Script world_goombaria_use_ability = SCRIPT({ +EvtSource world_goombaria_use_ability = SCRIPT({ GoombariaUseAbility(); }); -Script world_goombaria_put_away = SCRIPT({ +EvtSource world_goombaria_put_away = SCRIPT({ GoombariaPutAway(); }); diff --git a/src/world/partner/goombaria.h b/src/world/partner/goombaria.h index d72015fb26..36fe910f48 100644 --- a/src/world/partner/goombaria.h +++ b/src/world/partner/goombaria.h @@ -6,9 +6,9 @@ void world_goombaria_init(Npc* partner); -extern Script world_goombaria_take_out; -extern Script world_goombaria_update; -extern Script world_goombaria_use_ability; -extern Script world_goombaria_put_away; +extern EvtSource world_goombaria_take_out; +extern EvtSource world_goombaria_update; +extern EvtSource world_goombaria_use_ability; +extern EvtSource world_goombaria_put_away; #endif diff --git a/src/world/partner/goombario.c b/src/world/partner/goombario.c index dfe37b1e75..2f57742095 100644 --- a/src/world/partner/goombario.c +++ b/src/world/partner/goombario.c @@ -20,9 +20,9 @@ void world_goombario_init(Npc* partner) { partner->collisionRadius = 20; } -INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BD188_3170A8, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BD188_3170A8, Evt* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BD1D0_3170F0, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BD1D0_3170F0, Evt* script, s32 isInitialCall); INCLUDE_ASM(s32, "world/partner/goombario", func_802BD564_317484); @@ -43,11 +43,11 @@ s32 world_goombario_can_pause(Npc* partner) { // get message for tattle routine // has big jumptable at rodata 802BDE88 -INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BD5D8_3174F8, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BD5D8_3174F8, Evt* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BDB30_317A50, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BDB30_317A50, Evt* script, s32 isInitialCall); -ApiStatus func_802BDB84(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BDB84(Evt* script, s32 isInitialCall) { s32 unk = script->owner2.npc; // todo what is this? if (isInitialCall) { @@ -85,17 +85,17 @@ s32 D_802BDC40_317B60[] = { 0x00000039, 0x001B0024, 0xFFFFFFFF }; -Script world_goombario_take_out = SCRIPT({ +EvtSource world_goombario_take_out = SCRIPT({ func_802BD188_3170A8(); }); s32 D_802BDD88_317CA8 = 0x802BDF40; -Script world_goombario_update = SCRIPT({ +EvtSource world_goombario_update = SCRIPT({ func_802BD1D0_3170F0(); }); -Script world_goombario_use_ability = SCRIPT({ +EvtSource world_goombario_use_ability = SCRIPT({ func_802BD5D8_3174F8(); // returns tattle message id on SI_VAR(0), and something else on SI_VAR(1) if (SI_VAR(0) == -1) { @@ -117,6 +117,6 @@ Script world_goombario_use_ability = SCRIPT({ func_802BDB30_317A50(); }); -Script world_goombario_put_away = SCRIPT({ +EvtSource world_goombario_put_away = SCRIPT({ func_802BDB84(); }); diff --git a/src/world/partner/goombario.h b/src/world/partner/goombario.h index d002503e08..376db4a9d5 100644 --- a/src/world/partner/goombario.h +++ b/src/world/partner/goombario.h @@ -6,12 +6,12 @@ void world_goombario_init(Npc* partner); s32 world_goombario_can_pause(Npc* partner); -ApiStatus func_802BDB84(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_802BDB84(Evt* script, s32 isInitialCall); void world_goombario_pre_battle(Npc* partner); -extern Script world_goombario_take_out; -extern Script world_goombario_update; -extern Script world_goombario_use_ability; -extern Script world_goombario_put_away; +extern EvtSource world_goombario_take_out; +extern EvtSource world_goombario_update; +extern EvtSource world_goombario_use_ability; +extern EvtSource world_goombario_put_away; #endif diff --git a/src/world/partner/goompa.c b/src/world/partner/goompa.c index 1372323f96..890ef12b31 100644 --- a/src/world/partner/goompa.c +++ b/src/world/partner/goompa.c @@ -8,7 +8,7 @@ void world_goompa_init(Npc* partner) { partner->collisionRadius = 20; } -ApiStatus GoompaTakeOut(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GoompaTakeOut(Evt* script, s32 isInitialCall) { Npc* owner = script->owner2.npc; if (isInitialCall) { @@ -21,11 +21,11 @@ INCLUDE_ASM(s32, "world/partner/goompa", func_802BD14C_324A5C); INCLUDE_ASM(s32, "world/partner/goompa", func_802BD4E0_324DF0); -ApiStatus GoompaUseAbility(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GoompaUseAbility(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus GoompaPutAway(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GoompaPutAway(Evt* script, s32 isInitialCall) { Npc* owner = script->owner2.npc; if (isInitialCall) { @@ -34,20 +34,20 @@ ApiStatus GoompaPutAway(ScriptInstance* script, s32 isInitialCall) { return partner_put_away(owner) != 0; } -Script world_goompa_take_out = SCRIPT({ +EvtSource world_goompa_take_out = SCRIPT({ GoompaTakeOut(); }); s32 D_802BD58C_324E9C = &goompa_802BD600; -Script world_goompa_update = SCRIPT({ +EvtSource world_goompa_update = SCRIPT({ func_802BD14C_324A5C(); }); -Script world_goompa_use_ability = SCRIPT({ +EvtSource world_goompa_use_ability = SCRIPT({ GoompaUseAbility(); }); -Script world_goompa_put_away = SCRIPT({ +EvtSource world_goompa_put_away = SCRIPT({ GoompaPutAway(); }); diff --git a/src/world/partner/goompa.h b/src/world/partner/goompa.h index 4f3c07304a..6f492da6fb 100644 --- a/src/world/partner/goompa.h +++ b/src/world/partner/goompa.h @@ -6,9 +6,9 @@ void world_goompa_init(Npc* partner); -extern Script world_goompa_take_out; -extern Script world_goompa_update; -extern Script world_goompa_use_ability; -extern Script world_goompa_put_away; +extern EvtSource world_goompa_take_out; +extern EvtSource world_goompa_update; +extern EvtSource world_goompa_use_ability; +extern EvtSource world_goompa_put_away; #endif diff --git a/src/world/partner/parakarry.c b/src/world/partner/parakarry.c index 1f1b159e8e..c3454c315d 100644 --- a/src/world/partner/parakarry.c +++ b/src/world/partner/parakarry.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/partner/parakarry", func_802BD100_319670); -ApiStatus func_802BD148_3196B8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BD148_3196B8(Evt* script, s32 isInitialCall) { Npc* unk = script->owner2.npc; // todo what is this if (isInitialCall) { @@ -19,7 +19,7 @@ INCLUDE_ASM(s32, "world/partner/parakarry", func_802BD558_319AC8); INCLUDE_ASM(s32, "world/partner/parakarry", func_802BD660_319BD0); -ApiStatus func_802BE8D4_31AE44(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802BE8D4_31AE44(Evt* script, s32 isInitialCall) { s32 unk = script->owner2.npc; // todo what is this if (isInitialCall) { diff --git a/src/world/partner/twink.c b/src/world/partner/twink.c index dfa94051f5..78580a05b5 100644 --- a/src/world/partner/twink.c +++ b/src/world/partner/twink.c @@ -7,7 +7,7 @@ void world_twink_init(Npc* partner) { partner->collisionRadius = 20; } -ApiStatus TwinkTakeOut(ScriptInstance* script, s32 isInitialCall) { +ApiStatus TwinkTakeOut(Evt* script, s32 isInitialCall) { Npc* owner = script->owner2.npc; if (isInitialCall) { @@ -16,7 +16,7 @@ ApiStatus TwinkTakeOut(ScriptInstance* script, s32 isInitialCall) { return partner_get_out(owner) != 0; } -ApiStatus TwinkUpdate(ScriptInstance* script, s32 isInitialCall) { +ApiStatus TwinkUpdate(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; Npc* owner = script->owner2.npc; @@ -31,11 +31,11 @@ ApiStatus TwinkUpdate(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -ApiStatus TwinkUseAbility(ScriptInstance* script, s32 isInitialCall) { +ApiStatus TwinkUseAbility(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus TwinkPutAway(ScriptInstance* script, s32 isInitialCall) { +ApiStatus TwinkPutAway(Evt* script, s32 isInitialCall) { Npc* owner = script->owner2.npc; if (isInitialCall) { @@ -44,18 +44,18 @@ ApiStatus TwinkPutAway(ScriptInstance* script, s32 isInitialCall) { return partner_put_away(owner) != 0; } -Script world_twink_take_out = SCRIPT({ +EvtSource world_twink_take_out = SCRIPT({ TwinkTakeOut(); }); -Script world_twink_update = SCRIPT({ +EvtSource world_twink_update = SCRIPT({ TwinkUpdate(); }); -Script world_twink_use_ability = SCRIPT({ +EvtSource world_twink_use_ability = SCRIPT({ TwinkUseAbility(); }); -Script world_twink_put_away = SCRIPT({ +EvtSource world_twink_put_away = SCRIPT({ TwinkPutAway(); }); diff --git a/src/world/partner/twink.h b/src/world/partner/twink.h index 98ca996021..6f8f6659cb 100644 --- a/src/world/partner/twink.h +++ b/src/world/partner/twink.h @@ -6,9 +6,9 @@ void world_twink_init(Npc* partner); -extern Script world_twink_take_out; -extern Script world_twink_update; -extern Script world_twink_use_ability; -extern Script world_twink_put_away; +extern EvtSource world_twink_take_out; +extern EvtSource world_twink_update; +extern EvtSource world_twink_use_ability; +extern EvtSource world_twink_put_away; #endif diff --git a/src/world/partners.c b/src/world/partners.c index d3e4731b3d..29462a207e 100644 --- a/src/world/partners.c +++ b/src/world/partners.c @@ -274,7 +274,7 @@ PartnerAnimations gPartnerAnimations[] = { s32 D_800F84F8 = { 0x00000000, 0x00000000, }; s32 use_consumable(s32 arg0) { - ScriptInstance* script; + Evt* script; D_8010CD20 = arg0; arg0 = gPlayerData.invItems[arg0]; @@ -514,7 +514,7 @@ Bytecode* partner_get_ride_script(void) { void partner_handle_before_battle(void) { if (D_8010CFD8 != 0) { - ScriptID* scriptID = &D_8010CFDC; + s32* scriptID = &D_8010CFDC; if (does_script_exist(*scriptID)) { kill_script_by_ID(*scriptID); @@ -555,7 +555,7 @@ void partner_handle_after_battle(void) { } void partner_kill_ability_script(void) { - ScriptID* scriptID = &D_8010CFDC; + s32* scriptID = &D_8010CFDC; D_8010CFE8 = 10; if (does_script_exist(*scriptID)) { @@ -565,7 +565,7 @@ void partner_kill_ability_script(void) { void partner_suspend_ability_script(void) { if (D_8010CFD8 != NULL) { - ScriptID* scriptID = &D_8010CFDC; + s32* scriptID = &D_8010CFDC; if (does_script_exist(*scriptID)) { suspend_all_script(*scriptID); @@ -575,7 +575,7 @@ void partner_suspend_ability_script(void) { void partner_resume_ability_script(void) { if (D_8010CFD8 != NULL) { - ScriptID* scriptID = &D_8010CFDC; + s32* scriptID = &D_8010CFDC; if (does_script_exist(*scriptID)) { resume_all_script(*scriptID); diff --git a/src/world/partners.h b/src/world/partners.h index 51cf510d88..1cac415802 100644 --- a/src/world/partners.h +++ b/src/world/partners.h @@ -28,9 +28,9 @@ typedef struct WorldPartner { extern s32 D_8010C954; extern s32 D_8010CFC4; -extern ScriptInstance* D_8010CFD4; +extern Evt* D_8010CFD4; extern s32 D_8010CFD8; -extern ScriptID D_8010CFDC; +extern s32 D_8010CFDC; extern s32 D_8010CFE0; extern s32 D_8010CFE4; extern s32 D_8010CFE8; diff --git a/src/world/script_api/7E0E80.c b/src/world/script_api/7E0E80.c index bfe2f3ae87..32e8a5d67b 100644 --- a/src/world/script_api/7E0E80.c +++ b/src/world/script_api/7E0E80.c @@ -7,10 +7,10 @@ extern s32 MessageSingular; extern s32 D_80286520; extern s32 D_80286524; -ApiStatus func_802803C8(ScriptInstance* script, s32 isInitialCall); -ApiStatus func_80280410(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowShopPurchaseDialog(ScriptInstance* script, s32 isInitialCall); -ApiStatus ShowShopOwnerDialog(ScriptInstance* script, s32 isInitialCall); +ApiStatus func_802803C8(Evt* script, s32 isInitialCall); +ApiStatus func_80280410(Evt* script, s32 isInitialCall); +ApiStatus ShowShopPurchaseDialog(Evt* script, s32 isInitialCall); +ApiStatus ShowShopOwnerDialog(Evt* script, s32 isInitialCall); s32 ShopBeginSpeech[] = { 0x00000043, 0x00000006, SpeakToPlayer, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; @@ -27,7 +27,7 @@ s32 BadgeShopInteract[] = { 0x00000043, 0x00000002, ShowShopPurchaseDialog, 0xFE s32 shop_owner_begin_speech(s32 messageIndex) { Shop* shop = gGameStatusPtr->mapShop; s32 shopStringID = shop->owner->shopStringIDs[messageIndex]; - ScriptInstance* script = start_script(&ShopBeginSpeech, 1, 0); + Evt* script = start_script(&ShopBeginSpeech, 1, 0); script->varTable[0] = shopStringID; script->varTable[1] = shop->owner->npcID; @@ -40,7 +40,7 @@ s32 shop_owner_begin_speech(s32 messageIndex) { s32 shop_owner_buy_dialog(s32 messageIndex, s32 itemName, s32 coinCost, s32 bpCost) { Shop* shop = gGameStatusPtr->mapShop; s32 shopStringID = shop->owner->shopStringIDs[messageIndex]; - ScriptInstance* script; + Evt* script; s32 phi_a0; set_message_string(itemName, 0); @@ -69,7 +69,7 @@ s32 shop_owner_buy_dialog(s32 messageIndex, s32 itemName, s32 coinCost, s32 bpCo s32 shop_owner_continue_speech(s32 messageIndex) { Shop* shop = gGameStatusPtr->mapShop; s32 shopStringID = shop->owner->shopStringIDs[messageIndex]; - ScriptInstance* script = start_script(&ShopContinueSpeech, 1, 0); + Evt* script = start_script(&ShopContinueSpeech, 1, 0); script->varTable[0] = shopStringID; script->varTable[1] = shop->owner->npcID; @@ -83,7 +83,7 @@ s32 shop_owner_continue_speech_with_quantity(s32 messageIndex, s32 amount) { Shop* shop = gGameStatusPtr->mapShop; s32 shopStringID = shop->owner->shopStringIDs[messageIndex]; s32 phi_a0; - ScriptInstance* script; + Evt* script; set_message_value(amount, 0); @@ -107,7 +107,7 @@ s32 shop_owner_continue_speech_with_quantity(s32 messageIndex, s32 amount) { s32 shop_owner_reset_speech(s32 messageIndex) { Shop* shop = gGameStatusPtr->mapShop; s32 shopStringID = shop->owner->shopStringIDs[messageIndex]; - ScriptInstance* script = start_script(&ShopResetSpeech, 1, 0); + Evt* script = start_script(&ShopResetSpeech, 1, 0); script->varTable[0] = shopStringID; script->varTable[1] = shop->owner->npcID; @@ -119,7 +119,7 @@ s32 shop_owner_reset_speech(s32 messageIndex) { s32 shop_owner_end_speech(void) { Shop* shop = gGameStatusPtr->mapShop; - ScriptInstance* script = start_script(&ShopEndSpeech, 1, 0); + Evt* script = start_script(&ShopEndSpeech, 1, 0); script->varTable[0] = shop->owner->npcID; script->varTable[1] = shop->owner->talkAnim; @@ -128,7 +128,7 @@ s32 shop_owner_end_speech(void) { return script->id; } -ApiStatus func_802803C8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802803C8(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; script->varTable[2] = FALSE; @@ -146,8 +146,8 @@ ApiStatus func_802803C8(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80280410(ScriptInstance* script, s32 isInitialCall) { - static ScriptInstance* D_80286520; +ApiStatus func_80280410(Evt* script, s32 isInitialCall) { + static Evt* D_80286520; static s32 D_80286524; Shop* shop = gGameStatusPtr->mapShop; @@ -161,7 +161,7 @@ ApiStatus func_80280410(ScriptInstance* script, s32 isInitialCall) { if (gGameStatusPtr->pressedButtons & 0x8000) { - ScriptInstance* childScript; + Evt* childScript; disable_player_input(); disable_player_static_collisions(); @@ -185,7 +185,7 @@ ApiStatus func_80280410(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(ApiStatus, "world/script_api/7E0E80", ShowShopPurchaseDialog, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/script_api/7E0E80", ShowShopPurchaseDialog, Evt* script, s32 isInitialCall); //dumb stuff #ifdef NON_MATCHING @@ -294,7 +294,7 @@ s32 shop_get_sell_price(s32 itemID) { return gItemTable[itemID].sellValue; } -INCLUDE_ASM(ApiStatus, "world/script_api/7E0E80", ShowShopOwnerDialog, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/script_api/7E0E80", ShowShopOwnerDialog, Evt* script, s32 isInitialCall); void shop_draw_item_name(s32 arg0, s32 posX, s32 posY) { Shop* shop = gGameStatusPtr->mapShop; @@ -385,9 +385,9 @@ void draw_shop_items(void) { INCLUDE_ASM(s32, "world/script_api/7E0E80", draw_shop_items); #endif -INCLUDE_ASM(ApiStatus, "world/script_api/7E0E80", MakeShop, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/script_api/7E0E80", MakeShop, Evt* script, s32 isInitialCall); -ApiStatus MakeShopOwner(ScriptInstance* script, s32 isInitialCall) { +ApiStatus MakeShopOwner(Evt* script, s32 isInitialCall) { Shop* mapShop = gGameStatusPtr->mapShop; mapShop->owner = get_variable(script, *script->ptrReadPos); diff --git a/src/world/script_api/7E2AA0.c b/src/world/script_api/7E2AA0.c index 2699037df2..de6f35310c 100644 --- a/src/world/script_api/7E2AA0.c +++ b/src/world/script_api/7E2AA0.c @@ -22,7 +22,7 @@ typedef struct { /* 0x4C */ s32* unk_4C; } DoorStuff; -ApiStatus func_80281C20(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80281C20(Evt* script, s32 isInitialCall) { Bytecode* thisPos = script->ptrReadPos; func_800EF414(get_variable(script, *thisPos++), get_variable(script, *thisPos++)); @@ -30,27 +30,27 @@ ApiStatus func_80281C20(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80281C84(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80281C84(Evt* script, s32 isInitialCall) { func_800EF3E4(); repartner_set_tether_distance(); return ApiStatus_DONE2; } -INCLUDE_ASM(ApiStatus, "world/script_api/7E2AA0", MakeDoorAdvanced, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/script_api/7E2AA0", MakeDoorAdvanced, Evt* script, s32 isInitialCall); INCLUDE_ASM(s32, "world/script_api/7E2AA0", func_802822A8); -ApiStatus func_80282314(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80282314(Evt* script, s32 isInitialCall) { script->functionTemp[1] = script->varTable[1]; return ApiStatus_DONE2; } -ApiStatus func_80282324(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80282324(Evt* script, s32 isInitialCall) { script->varTable[0] = *(UNK_TYPE*)script->functionTemp[1]; return ApiStatus_DONE2; } -ApiStatus func_80282338(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80282338(Evt* script, s32 isInitialCall) { UNK_TYPE* temp_s0 = script->functionTemp[1]; *temp_s0 = get_variable(script, *script->ptrReadPos); @@ -65,7 +65,7 @@ INCLUDE_ASM(s32, "world/script_api/7E2AA0", func_80282414); // D_80286540 needs to be defined wherever it's meant to be, and this matches #ifdef NON_MATCHING -ApiStatus func_80282594(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80282594(Evt* script, s32 isInitialCall) { Camera* camera; f32 temp_f0; @@ -85,18 +85,18 @@ ApiStatus func_80282594(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/script_api/7E2AA0", func_80282594); #endif -ApiStatus SetEntityHideMode1(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetEntityHideMode1(Evt* script, s32 isInitialCall) { D_80151310 = 1; return ApiStatus_DONE2; } -ApiStatus SetEntityHideMode2(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetEntityHideMode2(Evt* script, s32 isInitialCall) { D_80151310 = 2; return ApiStatus_DONE2; } // common probably -ApiStatus SetEntityHideMode0(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetEntityHideMode0(Evt* script, s32 isInitialCall) { D_80151310 = 0; return ApiStatus_DONE2; } @@ -105,7 +105,7 @@ INCLUDE_ASM(s32, "world/script_api/7E2AA0", func_80282634); INCLUDE_ASM(s32, "world/script_api/7E2AA0", func_80282700); -ApiStatus func_80282774(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80282774(Evt* script, s32 isInitialCall) { DoorStuff* doorStuff = (DoorStuff*)script->functionTemp[1]; doorStuff->unk_0A = func_80134240(); @@ -113,12 +113,12 @@ ApiStatus func_80282774(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802827A8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802827A8(Evt* script, s32 isInitialCall) { func_80134230(((DoorStuff*)script->functionTemp[1])->unk_0A); return ApiStatus_DONE2; } -ApiStatus func_802827CC(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_802827CC(Evt* script, s32 isInitialCall) { DoorStuff* temp = script->functionTemp[1]; script->varTable[2] = temp->unk_04; @@ -138,7 +138,7 @@ ApiStatus func_802827CC(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_80282868(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80282868(Evt* script, s32 isInitialCall) { script->varTable[1] = script->functionTemp[1]; return ApiStatus_DONE2; } diff --git a/src/world/script_api/7E3700.c b/src/world/script_api/7E3700.c index 6c727ba40c..cb8e391da6 100644 --- a/src/world/script_api/7E3700.c +++ b/src/world/script_api/7E3700.c @@ -1,6 +1,6 @@ #include "common.h" -ApiStatus func_80282880(ScriptInstance* script, s32 isInitialCall) { +ApiStatus func_80282880(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; playerStatus->position.x += (script->varTable[0] - playerStatus->position.x) / 2; @@ -19,7 +19,7 @@ INCLUDE_ASM(s32, "world/script_api/7E3700", func_80283080); INCLUDE_ASM(s32, "world/script_api/7E3700", func_80283174); -ApiStatus CheckActionState(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CheckActionState(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode a0 = *args++; s32 var = get_float_variable(script, *args); @@ -30,12 +30,12 @@ ApiStatus CheckActionState(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "world/script_api/7E3700", func_80283240); -INCLUDE_ASM(ApiStatus, "world/script_api/7E3700", CreatePushBlockGrid, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/script_api/7E3700", CreatePushBlockGrid, Evt* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "world/script_api/7E3700", SetPushBlock, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/script_api/7E3700", SetPushBlock, Evt* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "world/script_api/7E3700", GetPushBlock, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/script_api/7E3700", GetPushBlock, Evt* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "world/script_api/7E3700", GetGridIndexFromPos, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/script_api/7E3700", GetGridIndexFromPos, Evt* script, s32 isInitialCall); -INCLUDE_ASM(ApiStatus, "world/script_api/7E3700", SetPushBlockFallEffect, ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "world/script_api/7E3700", SetPushBlockFallEffect, Evt* script, s32 isInitialCall); diff --git a/src/world/script_api/7E4690.c b/src/world/script_api/7E4690.c index b0a6d64189..ac770e27dc 100644 --- a/src/world/script_api/7E4690.c +++ b/src/world/script_api/7E4690.c @@ -1,7 +1,7 @@ #include "common.h" #include "../partners.h" -ApiStatus CheckRideScriptForEnterExit(ScriptInstance* script, s32 isInitialCall) { +ApiStatus CheckRideScriptForEnterExit(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; script->varTable[10] = 0; @@ -18,7 +18,7 @@ ApiStatus CheckRideScriptForEnterExit(ScriptInstance* script, s32 isInitialCall) return ApiStatus_DONE2; } -ApiStatus TeleportPartnerToPlayer(ScriptInstance* script, s32 isInitialCall) { +ApiStatus TeleportPartnerToPlayer(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Npc* partner; @@ -39,7 +39,7 @@ ApiStatus TeleportPartnerToPlayer(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus SetPlayerPositionFromSaveData(ScriptInstance* script, s32 isInitialCall) { +ApiStatus SetPlayerPositionFromSaveData(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Camera* camera = &gCameras[gCurrentCameraID]; s32 currentPartner = gPlayerData.currentPartner; @@ -65,17 +65,17 @@ ApiStatus SetPlayerPositionFromSaveData(ScriptInstance* script, s32 isInitialCal INCLUDE_ASM(s32, "world/script_api/7E4690", EnterPlayerPostPipe); -ApiStatus ShortenPartnerTetherDistance(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShortenPartnerTetherDistance(Evt* script, s32 isInitialCall) { partner_set_tether_distance(20.0f); return ApiStatus_DONE2; } -ApiStatus ResetPartnerTetherDistance(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ResetPartnerTetherDistance(Evt* script, s32 isInitialCall) { repartner_set_tether_distance(); return ApiStatus_DONE2; } -ApiStatus PlayerMoveToDoor(ScriptInstance* script, s32 isInitialCall) { +ApiStatus PlayerMoveToDoor(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; diff --git a/tools/build/cc_dsl/compile_script.py b/tools/build/cc_dsl/compile_script.py index b6b052fdb7..b3aa1fd4e5 100755 --- a/tools/build/cc_dsl/compile_script.py +++ b/tools/build/cc_dsl/compile_script.py @@ -225,18 +225,18 @@ class CmdCtx(): class RootCtx(CmdCtx): def break_opcode(self, meta): - return "ScriptOpcode_END" + return "EVT_OP_END" class IfCtx(CmdCtx): pass class MatchCtx(CmdCtx): def break_opcode(self, meta): - return "ScriptOpcode_BREAK_MATCH" + return "EVT_OP_BREAK_MATCH" class LoopCtx(CmdCtx): def break_opcode(self, meta): - return "ScriptOpcode_BREAK_LOOP" + return "EVT_OP_BREAK_LOOP" class LabelCtx(CmdCtx): def __init__(self, label): @@ -350,7 +350,7 @@ class Compile(Transformer): def call(self, tree): # TODO: type checking etc - return Cmd("ScriptOpcode_CALL", *tree.children, meta=tree.meta) + return Cmd("EVT_OP_CALL", *tree.children, meta=tree.meta) def if_stmt(self, tree): if len(tree.children) == 4: # no else @@ -358,7 +358,7 @@ class Compile(Transformer): for cmd in block: if isinstance(cmd, BaseCmd): cmd.add_context(IfCtx()) - return [ Cmd(op["if"], a, b, meta=tree.meta), *block, Cmd("ScriptOpcode_END_IF") ] + return [ Cmd(op["if"], a, b, meta=tree.meta), *block, Cmd("EVT_OP_END_IF") ] else: a, op, b, block, else_block = tree.children for cmd in block: @@ -367,16 +367,16 @@ class Compile(Transformer): for cmd in else_block: if isinstance(cmd, BaseCmd): cmd.add_context(IfCtx()) - return [ Cmd(op["if"], a, b, meta=tree.meta), *block, Cmd("ScriptOpcode_ELSE"), *else_block, Cmd("ScriptOpcode_END_IF") ] + return [ Cmd(op["if"], a, b, meta=tree.meta), *block, Cmd("EVT_OP_ELSE"), *else_block, Cmd("EVT_OP_END_IF") ] - def cond_op_eq(self, tree): return { "if": "ScriptOpcode_IF_EQ", "case": "ScriptOpcode_CASE_EQ" } - def cond_op_ne(self, tree): return { "if": "ScriptOpcode_IF_NE", "case": "ScriptOpcode_CASE_NE" } - def cond_op_lt(self, tree): return { "if": "ScriptOpcode_IF_LT", "case": "ScriptOpcode_CASE_LT" } - def cond_op_gt(self, tree): return { "if": "ScriptOpcode_IF_GT", "case": "ScriptOpcode_CASE_GT" } - def cond_op_le(self, tree): return { "if": "ScriptOpcode_IF_LE", "case": "ScriptOpcode_CASE_LE" } - def cond_op_ge(self, tree): return { "if": "ScriptOpcode_IF_GE", "case": "ScriptOpcode_CASE_GE" } - def cond_op_flag(self, tree): return { "__op__": "&", "if": "ScriptOpcode_IF_FLAG", "case": "ScriptOpcode_CASE_FLAG" } - def cond_op_not_flag(self, tree): return { "__op__": "!&", "if": "ScriptOpcode_IF_NOT_FLAG" } + def cond_op_eq(self, tree): return { "if": "EVT_OP_IF_EQ", "case": "EVT_OP_CASE_EQ" } + def cond_op_ne(self, tree): return { "if": "EVT_OP_IF_NE", "case": "EVT_OP_CASE_NE" } + def cond_op_lt(self, tree): return { "if": "EVT_OP_IF_LT", "case": "EVT_OP_CASE_LT" } + def cond_op_gt(self, tree): return { "if": "EVT_OP_IF_GT", "case": "EVT_OP_CASE_GT" } + def cond_op_le(self, tree): return { "if": "EVT_OP_IF_LE", "case": "EVT_OP_CASE_LE" } + def cond_op_ge(self, tree): return { "if": "EVT_OP_IF_GE", "case": "EVT_OP_CASE_GE" } + def cond_op_flag(self, tree): return { "__op__": "&", "if": "EVT_OP_IF_FLAG", "case": "EVT_OP_CASE_FLAG" } + def cond_op_not_flag(self, tree): return { "__op__": "!&", "if": "EVT_OP_IF_NOT_FLAG" } def match_stmt(self, tree): expr = tree.children[0] @@ -397,13 +397,13 @@ class Compile(Transformer): raise Exception(f"uncompiled match case: {cmd}") return [ - Cmd("ScriptOpcode_MATCH", expr, meta=tree.meta), + Cmd("EVT_OP_MATCH", expr, meta=tree.meta), *cases, - Cmd("ScriptOpcode_END_MATCH"), + Cmd("EVT_OP_END_MATCH"), ] def match_const_stmt(self, tree): commands = self.match_stmt(tree) - commands[0].opcode = "ScriptOpcode_MATCH_CONST" + commands[0].opcode = "EVT_OP_MATCH_CONST" return commands def match_cases(self, tree): if len(tree.children) == 1: @@ -412,7 +412,7 @@ class Compile(Transformer): return [tree.children[0], *tree.children[1]] def case_else(self, tree): - return [Cmd("ScriptOpcode_CASE_ELSE"), *tree.children[0]] + return [Cmd("EVT_OP_CASE_ELSE"), *tree.children[0]] def case_op(self, tree): if len(tree.children) == 4: op, expr, multi_case, block = tree.children @@ -420,7 +420,7 @@ class Compile(Transformer): if not "case" in op: raise CompileError(f"operation `{opcodes['__op__']}' not supported in match cases", tree.meta) - return [Cmd(op["case"], expr), *multi_case, *block, Cmd("ScriptOpcode_END_CASE_MULTI")] + return [Cmd(op["case"], expr), *multi_case, *block, Cmd("EVT_OP_END_CASE_MULTI")] else: op, expr, block = tree.children @@ -431,16 +431,16 @@ class Compile(Transformer): def case_range(self, tree): if len(tree.children) == 4: a, b, multi_case, block = tree.children - return [Cmd("ScriptOpcode_CASE_RANGE", a, b), *multi_case, *block, Cmd("ScriptOpcode_END_CASE_MULTI")] + return [Cmd("EVT_OP_CASE_RANGE", a, b), *multi_case, *block, Cmd("EVT_OP_END_CASE_MULTI")] else: a, b, block = tree.children - return [Cmd("ScriptOpcode_CASE_RANGE", a, b), *block] + return [Cmd("EVT_OP_CASE_RANGE", a, b), *block] def case_multi(self, tree): multi_case, block = tree.children - return [*multi_case, *block, Cmd("ScriptOpcode_END_CASE_MULTI")] + return [*multi_case, *block, Cmd("EVT_OP_END_CASE_MULTI")] def multi_case(self, tree): - return [Cmd("ScriptOpcode_CASE_MULTI_OR_EQ", expr) for expr in tree.children] + return [Cmd("EVT_OP_CASE_MULTI_OR_EQ", expr) for expr in tree.children] def loop_stmt(self, tree): expr = tree.children.pop(0) if len(tree.children) > 1 else 0 @@ -450,28 +450,28 @@ class Compile(Transformer): if isinstance(cmd, BaseCmd): cmd.add_context(LoopCtx()) - return [ Cmd("ScriptOpcode_LOOP", expr, meta=tree.meta), *block, Cmd("ScriptOpcode_END_LOOP") ] + return [ Cmd("EVT_OP_LOOP", expr, meta=tree.meta), *block, Cmd("EVT_OP_END_LOOP") ] def return_stmt(self, tree): - return Cmd("ScriptOpcode_RETURN", meta=tree.meta) + return Cmd("EVT_OP_RETURN", meta=tree.meta) def break_stmt(self, tree): return BreakCmd(meta=tree.meta) def break_match_stmt(self, tree): - return Cmd("ScriptOpcode_BREAK_MATCH", meta=tree.meta) + return Cmd("EVT_OP_BREAK_MATCH", meta=tree.meta) def break_loop_stmt(self, tree): - return Cmd("ScriptOpcode_BREAK_LOOP", meta=tree.meta) + return Cmd("EVT_OP_BREAK_LOOP", meta=tree.meta) def set_priority(self, tree): - return Cmd("ScriptOpcode_SET_PRIORITY", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_SET_PRIORITY", tree.children[0], meta=tree.meta) def set_timescale(self, tree): - return Cmd("ScriptOpcode_SET_TIMESCALE", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_SET_TIMESCALE", tree.children[0], meta=tree.meta) def set_group(self, tree): - return Cmd("ScriptOpcode_SET_GROUP", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_SET_GROUP", tree.children[0], meta=tree.meta) def suspend_stmt(self, tree): commands = [] @@ -497,49 +497,49 @@ class Compile(Transformer): def control_type_group(self, tree): return { "__control_type__": "group", - "suspend": "ScriptOpcode_SUSPEND_GROUP", - "resume": "ScriptOpcode_RESUME_GROUP", + "suspend": "EVT_OP_SUSPEND_GROUP", + "resume": "EVT_OP_RESUME_GROUP", } def control_type_others(self, tree): return { "__control_type__": "others", - "suspend": "ScriptOpcode_SUSPEND_OTHERS", - "resume": "ScriptOpcode_RESUME_OTHERS", + "suspend": "EVT_OP_SUSPEND_OTHERS", + "resume": "EVT_OP_RESUME_OTHERS", } def control_type_script(self, tree): return { "__control_type__": "script", - "suspend": "ScriptOpcode_SUSPEND_SCRIPT", - "resume": "ScriptOpcode_RESUME_SCRIPT", - "kill": "ScriptOpcode_KILL_SCRIPT", + "suspend": "EVT_OP_SUSPEND_SCRIPT", + "resume": "EVT_OP_RESUME_SCRIPT", + "kill": "EVT_OP_KILL_SCRIPT", } def sleep_stmt(self, tree): - return Cmd("ScriptOpcode_SLEEP_FRAMES", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_SLEEP_FRAMES", tree.children[0], meta=tree.meta) def sleep_secs_stmt(self, tree): - return Cmd("ScriptOpcode_SLEEP_SECS", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_SLEEP_SECS", tree.children[0], meta=tree.meta) def bind_stmt(self, tree): script, trigger, target = tree.children - return Cmd("ScriptOpcode_BIND_TRIGGER", script, trigger, target, 1, 0, meta=tree.meta) + return Cmd("EVT_OP_BIND_TRIGGER", script, trigger, target, 1, 0, meta=tree.meta) def bind_set_stmt(self, tree): ret, script, trigger, target = tree.children - return Cmd("ScriptOpcode_BIND_TRIGGER", script, trigger, target, 1, ret, meta=tree.meta) + return Cmd("EVT_OP_BIND_TRIGGER", script, trigger, target, 1, ret, meta=tree.meta) def bind_padlock_stmt(self, tree): script, trigger, target, items = tree.children - return Cmd("ScriptOpcode_BIND_PADLOCK", script, trigger, target, items, 0, 1, meta=tree.meta) + return Cmd("EVT_OP_BIND_PADLOCK", script, trigger, target, items, 0, 1, meta=tree.meta) def unbind_stmt(self, tree): - return Cmd("ScriptOpcode_UNBIND", meta=tree.meta) + return Cmd("EVT_OP_UNBIND", meta=tree.meta) def spawn_stmt(self, tree): - return Cmd("ScriptOpcode_SPAWN_SCRIPT", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_SPAWN_SCRIPT", tree.children[0], meta=tree.meta) def spawn_set_stmt(self, tree): lhs, script = tree.children - return Cmd("ScriptOpcode_SPAWN_GET_ID", script, lhs, meta=tree.meta) + return Cmd("EVT_OP_SPAWN_GET_ID", script, lhs, meta=tree.meta) def await_stmt(self, tree): - return Cmd("ScriptOpcode_AWAIT_SCRIPT", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_AWAIT_SCRIPT", tree.children[0], meta=tree.meta) def jump_stmt(self, tree): - return Cmd("ScriptOpcode_JUMP", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_JUMP", tree.children[0], meta=tree.meta) def set_stmt(self, tree): lhs, opcodes, rhs = tree.children @@ -573,50 +573,50 @@ class Compile(Transformer): def set_op_eq(self, tree): return { "__op__": "=", - "int": "ScriptOpcode_SET", - "const": "ScriptOpcode_SET_CONST", - "float": "ScriptOpcode_SET_F", + "int": "EVT_OP_SET", + "const": "EVT_OP_SET_CONST", + "float": "EVT_OP_SET_F", } def set_op_add(self, tree): return { "__op__": "+", - "int": "ScriptOpcode_ADD", - "float": "ScriptOpcode_ADD_F", + "int": "EVT_OP_ADD", + "float": "EVT_OP_ADD_F", } def set_op_sub(self, tree): return { "__op__": "-", - "int": "ScriptOpcode_SUB", - "float": "ScriptOpcode_SUB_F", + "int": "EVT_OP_SUB", + "float": "EVT_OP_SUB_F", } def set_op_mul(self, tree): return { "__op__": "*", - "int": "ScriptOpcode_MUL", - "float": "ScriptOpcode_MUL_F", + "int": "EVT_OP_MUL", + "float": "EVT_OP_MUL_F", } def set_op_div(self, tree): return { "__op__": "/", - "int": "ScriptOpcode_DIV", - "float": "ScriptOpcode_DIV_F", + "int": "EVT_OP_DIV", + "float": "EVT_OP_DIV_F", } def set_op_mod(self, tree): return { "__op__": "%", - "int": "ScriptOpcode_MOD", + "int": "EVT_OP_MOD", } def set_op_and(self, tree): return { "__op__": "&", - "int": "ScriptOpcode_AND", - "const": "ScriptOpcode_AND_CONST", + "int": "EVT_OP_AND", + "const": "EVT_OP_AND_CONST", } def set_op_or(self, tree): return { "__op__": "|", - "int": "ScriptOpcode_OR", - "const": "ScriptOpcode_OR_CONST", + "int": "EVT_OP_OR", + "const": "EVT_OP_OR_CONST", } def variable(self, tree): @@ -629,7 +629,7 @@ class Compile(Transformer): def label_decl(self, tree): if len(tree.children) == 1: label = tree.children[0] - return Cmd("ScriptOpcode_LABEL", label, meta=tree.meta) + return Cmd("EVT_OP_LABEL", label, meta=tree.meta) else: label, cmd_or_block = tree.children @@ -641,12 +641,12 @@ class Compile(Transformer): cmd.add_context(LabelCtx(label)) return [ - Cmd("ScriptOpcode_LABEL", label, meta=tree.meta), + Cmd("EVT_OP_LABEL", label, meta=tree.meta), *cmd_or_block ] def label_goto(self, tree): label = tree.children[0] - return Cmd("ScriptOpcode_GOTO", label, meta=tree.meta) + return Cmd("EVT_OP_GOTO", label, meta=tree.meta) def label(self, tree): name = tree.children[0] if name in self.alloc.labels: @@ -664,71 +664,71 @@ class Compile(Transformer): for cmd in block: if isinstance(cmd, BaseCmd): cmd.add_context(SpawnCtx()) - return [ Cmd("ScriptOpcode_SPAWN_THREAD", meta=tree.meta), *block, Cmd("ScriptOpcode_END_SPAWN_THREAD") ] + return [ Cmd("EVT_OP_SPAWN_THREAD", meta=tree.meta), *block, Cmd("EVT_OP_END_SPAWN_THREAD") ] def parallel_block_stmt(self, tree): block, = tree.children for cmd in block: if isinstance(cmd, BaseCmd): cmd.add_context(ParallelCtx()) - return [ Cmd("ScriptOpcode_PARALLEL_THREAD", meta=tree.meta), *block, Cmd("ScriptOpcode_END_PARALLEL_THREAD") ] + return [ Cmd("EVT_OP_PARALLEL_THREAD", meta=tree.meta), *block, Cmd("EVT_OP_END_PARALLEL_THREAD") ] def entity_id(self, tree): expr, = tree.children return f"({expr} + 0x4000)" def buf_use(self, tree): - return Cmd("ScriptOpcode_USE_BUFFER", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_USE_BUFFER", tree.children[0], meta=tree.meta) def buf_read(self, tree): args = tree.children cmds = [] while args: if len(args) >= 4: - cmds.append(Cmd("ScriptOpcode_BUFFER_READ_4", args.pop(0), args.pop(0), args.pop(0), args.pop(0), meta=tree.meta)) + cmds.append(Cmd("EVT_OP_BUFFER_READ_4", args.pop(0), args.pop(0), args.pop(0), args.pop(0), meta=tree.meta)) elif len(args) == 3: - cmds.append(Cmd("ScriptOpcode_BUFFER_READ_3", args.pop(0), args.pop(0), args.pop(0), meta=tree.meta)) + cmds.append(Cmd("EVT_OP_BUFFER_READ_3", args.pop(0), args.pop(0), args.pop(0), meta=tree.meta)) elif len(args) == 2: - cmds.append(Cmd("ScriptOpcode_BUFFER_READ_2", args.pop(0), args.pop(0), meta=tree.meta)) + cmds.append(Cmd("EVT_OP_BUFFER_READ_2", args.pop(0), args.pop(0), meta=tree.meta)) elif len(args) == 1: - cmds.append(Cmd("ScriptOpcode_BUFFER_READ_1", args.pop(0), meta=tree.meta)) + cmds.append(Cmd("EVT_OP_BUFFER_READ_1", args.pop(0), meta=tree.meta)) else: break return cmds def buf_peek(self, tree): - return Cmd("ScriptOpcode_BUFFER_PEEK", tree.children[0], tree.children[1], meta=tree.meta) + return Cmd("EVT_OP_BUFFER_PEEK", tree.children[0], tree.children[1], meta=tree.meta) def buf_usef(self, tree): - return Cmd("ScriptOpcode_USE_BUFFER_F", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_USE_BUFFER_F", tree.children[0], meta=tree.meta) def buf_readf(self, tree): args = tree.children cmds = [] while args: if len(args) >= 4: - cmds.append(Cmd("ScriptOpcode_BUFFER_READ_4_F", args.pop(0), args.pop(0), args.pop(0), args.pop(0), meta=tree.meta)) + cmds.append(Cmd("EVT_OP_BUFFER_READ_4_F", args.pop(0), args.pop(0), args.pop(0), args.pop(0), meta=tree.meta)) elif len(args) == 3: - cmds.append(Cmd("ScriptOpcode_BUFFER_READ_3_F", args.pop(0), args.pop(0), args.pop(0), meta=tree.meta)) + cmds.append(Cmd("EVT_OP_BUFFER_READ_3_F", args.pop(0), args.pop(0), args.pop(0), meta=tree.meta)) elif len(args) == 2: - cmds.append(Cmd("ScriptOpcode_BUFFER_READ_2_F", args.pop(0), args.pop(0), meta=tree.meta)) + cmds.append(Cmd("EVT_OP_BUFFER_READ_2_F", args.pop(0), args.pop(0), meta=tree.meta)) elif len(args) == 1: - cmds.append(Cmd("ScriptOpcode_BUFFER_READ_1_F", args.pop(0), meta=tree.meta)) + cmds.append(Cmd("EVT_OP_BUFFER_READ_1_F", args.pop(0), meta=tree.meta)) else: break return cmds def buf_peekf(self, tree): - return Cmd("ScriptOpcode_BUFFER_PEEK_F", tree.children[0], tree.children[1], meta=tree.meta) + return Cmd("EVT_OP_BUFFER_PEEK_F", tree.children[0], tree.children[1], meta=tree.meta) def use_array(self, tree): - return Cmd("ScriptOpcode_USE_ARRAY", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_USE_ARRAY", tree.children[0], meta=tree.meta) def use_flags(self, tree): - return Cmd("ScriptOpcode_USE_FLAGS", tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_USE_FLAGS", tree.children[0], meta=tree.meta) def new_array(self, tree): - return Cmd("ScriptOpcode_NEW_ARRAY", tree.children[0], tree.children[1], meta=tree.meta) + return Cmd("EVT_OP_NEW_ARRAY", tree.children[0], tree.children[1], meta=tree.meta) def does_script_exist(self, tree): - return Cmd("ScriptOpcode_DOES_SCRIPT_EXIST", tree.children[1], tree.children[0], meta=tree.meta) + return Cmd("EVT_OP_DOES_SCRIPT_EXIST", tree.children[1], tree.children[0], meta=tree.meta) def compile_script(s): tree = script_parser.parse(s) @@ -738,8 +738,8 @@ def compile_script(s): commands = Compile().transform(tree) # add RETURN END if no explicit END (top-level `break') was given - if next((cmd for cmd in commands if cmd.opcode() == "ScriptOpcode_END"), None) == None: - commands += (Cmd("ScriptOpcode_RETURN"), Cmd("ScriptOpcode_END")) + if next((cmd for cmd in commands if cmd.opcode() == "EVT_OP_END"), None) == None: + commands += (Cmd("EVT_OP_RETURN"), Cmd("EVT_OP_END")) return commands diff --git a/tools/build/cc_dsl/process_scripts.py b/tools/build/cc_dsl/process_scripts.py new file mode 100755 index 0000000000..29dcfd860c --- /dev/null +++ b/tools/build/cc_dsl/process_scripts.py @@ -0,0 +1,69 @@ +#! /usr/bin/python3 + +import sys +from compile_script import read_until_closing_paren + +def read_scripts_in_file(in_file): + line_no = 1 + + macro_name = "" # captures recent UPPER_CASE identifier + prev_char = "" + while True: + char = in_file.read(1) + + if len(char) == 0: + # EOF + break + + if char == "#" and (prev_char == "\n" or prev_char == ""): + pass + elif char == "(": + # SCRIPT(...) + if macro_name == "SCRIPT": + pos_before = in_file.tell() + read_data = read_until_closing_paren(in_file, lex_strings=True) + line_no += read_data.count("\n") + assert read_data[0] == '{' + yield pos_before, in_file.tell(), read_data + + macro_name = "" + elif char == "_" or (char >= 'A' and char <= 'Z'): + macro_name += char + else: + macro_name = "" + + if char == "\n": + line_no += 1 + + prev_char = char + +def process_script(script): + # TODO + return script + +def process_file(filename): + with open(filename, "r") as f: + scripts = [k for k in read_scripts_in_file(f)] + f.seek(0) + file_content = f.read() + + pos_delta = 0 + + for start_pos, end_pos, script in scripts: + start_pos = start_pos - pos_delta + end_pos = end_pos - pos_delta + + script_len_before = len(script) + script = process_script(script) + script_len_after = len(script) + + pos_delta += script_len_before - script_len_after + + file_content = file_content[:start_pos] + script + file_content[end_pos-1:] + + with open(filename, "w") as f: + f.write(file_content) + +if __name__ == "__main__": + for filename in sys.argv[1:]: + process_file(filename) diff --git a/tools/disasm_script.py b/tools/disasm_script.py index 57b3a4ae85..37f8e65cb2 100755 --- a/tools/disasm_script.py +++ b/tools/disasm_script.py @@ -536,10 +536,10 @@ class ScriptDisassembler: if name.startswith("N(func_"): prefix = "ApiStatus " name = self.replace_star_rod_function_name(name[2:-1]) - suffix = "(ScriptInstance* script, s32 isInitialCall)" + suffix = "(Evt* script, s32 isInitialCall)" elif name[2:-1] in self.INCLUDED["includes"]: prefix = "ApiStatus " - suffix = "(ScriptInstance* script, s32 isInitialCall)" + suffix = "(Evt* script, s32 isInitialCall)" elif name.startswith("N(npcAISettings_"): prefix = "NpcAISettings " elif name.startswith("N(npcSettings_"): @@ -551,7 +551,7 @@ class ScriptDisassembler: elif name.startswith("N(npcGroupList_"): prefix = "NpcGroupList " elif name.startswith("N("): - prefix = "Script " + prefix = "EvtSource " else: toReplace = False @@ -591,208 +591,208 @@ class ScriptDisassembler: def disassemble_command(self, opcode, argc, argv): if opcode == 0x01: - self.write_line("SI_CMD(ScriptOpcode_END)") + self.write_line("SI_CMD(EVT_OP_END)") self.indent -= 1 if self.indent_used: self.prefix_line("// *INDENT-OFF*") - self.prefix_line(f"Script {self.script_name} = {{") + self.prefix_line(f"EvtSource {self.script_name} = {{") self.write_line("};") self.write_line("// *INDENT-ON*") else: - self.prefix_line(f"Script {self.script_name} = {{") + self.prefix_line(f"EvtSource {self.script_name} = {{") self.write_line("};") self.done = True - elif opcode == 0x02: self.write_line(f"SI_CMD(ScriptOpcode_RETURN),") - elif opcode == 0x03: self.write_line(f"SI_CMD(ScriptOpcode_LABEL, {self.var(argv[0])}),") - elif opcode == 0x04: self.write_line(f"SI_CMD(ScriptOpcode_GOTO, {self.var(argv[0])}),") + elif opcode == 0x02: self.write_line(f"SI_CMD(EVT_OP_RETURN),") + elif opcode == 0x03: self.write_line(f"SI_CMD(EVT_OP_LABEL, {self.var(argv[0])}),") + elif opcode == 0x04: self.write_line(f"SI_CMD(EVT_OP_GOTO, {self.var(argv[0])}),") elif opcode == 0x05: - self.write_line(f"SI_CMD(ScriptOpcode_LOOP, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_LOOP, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x06: self.indent -= 1 - self.write_line("SI_CMD(ScriptOpcode_END_LOOP),") - elif opcode == 0x07: self.write_line(f"SI_CMD(ScriptOpcode_BREAK_LOOP),") - elif opcode == 0x08: self.write_line(f"SI_CMD(ScriptOpcode_SLEEP_FRAMES, {self.var(argv[0])}),") - elif opcode == 0x09: self.write_line(f"SI_CMD(ScriptOpcode_SLEEP_SECS, {self.var(argv[0])}),") + self.write_line("SI_CMD(EVT_OP_END_LOOP),") + elif opcode == 0x07: self.write_line(f"SI_CMD(EVT_OP_BREAK_LOOP),") + elif opcode == 0x08: self.write_line(f"SI_CMD(EVT_OP_SLEEP_FRAMES, {self.var(argv[0])}),") + elif opcode == 0x09: self.write_line(f"SI_CMD(EVT_OP_SLEEP_SECS, {self.var(argv[0])}),") elif opcode == 0x0A: - self.write_line(f"SI_CMD(ScriptOpcode_IF_EQ, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"SI_CMD(EVT_OP_IF_EQ, {self.var(argv[0])}, {self.var(argv[1])}),") self.indent += 1 elif opcode == 0x0B: - self.write_line(f"SI_CMD(ScriptOpcode_IF_NE, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"SI_CMD(EVT_OP_IF_NE, {self.var(argv[0])}, {self.var(argv[1])}),") self.indent += 1 elif opcode == 0x0C: - self.write_line(f"SI_CMD(ScriptOpcode_IF_LT, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"SI_CMD(EVT_OP_IF_LT, {self.var(argv[0])}, {self.var(argv[1])}),") self.indent += 1 elif opcode == 0x0D: - self.write_line(f"SI_CMD(ScriptOpcode_IF_GT, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"SI_CMD(EVT_OP_IF_GT, {self.var(argv[0])}, {self.var(argv[1])}),") self.indent += 1 elif opcode == 0x0E: - self.write_line(f"SI_CMD(ScriptOpcode_IF_LE, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"SI_CMD(EVT_OP_IF_LE, {self.var(argv[0])}, {self.var(argv[1])}),") self.indent += 1 elif opcode == 0x0F: - self.write_line(f"SI_CMD(ScriptOpcode_IF_GE, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"SI_CMD(EVT_OP_IF_GE, {self.var(argv[0])}, {self.var(argv[1])}),") self.indent += 1 elif opcode == 0x10: - self.write_line(f"SI_CMD(ScriptOpcode_IF_FLAG, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"SI_CMD(EVT_OP_IF_FLAG, {self.var(argv[0])}, {self.var(argv[1])}),") self.indent += 1 elif opcode == 0x11: - self.write_line(f"SI_CMD(ScriptOpcode_IF_NOT_FLAG, ({self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"SI_CMD(EVT_OP_IF_NOT_FLAG, ({self.var(argv[0])}, {self.var(argv[1])}),") self.indent += 1 elif opcode == 0x12: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_ELSE),") + self.write_line(f"SI_CMD(EVT_OP_ELSE),") self.indent += 1 elif opcode == 0x13: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_END_IF),") + self.write_line(f"SI_CMD(EVT_OP_END_IF),") elif opcode == 0x14: - self.write_line(f"SI_CMD(ScriptOpcode_MATCH, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_MATCH, {self.var(argv[0])}),") self.indent += 2 elif opcode == 0x15: - self.write_line(f"SI_CMD(ScriptOpcode_MATCH_CONST, 0x{argv[0]:X}),") + self.write_line(f"SI_CMD(EVT_OP_MATCH_CONST, 0x{argv[0]:X}),") self.indent += 2 elif opcode == 0x16: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_CASE_EQ, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_CASE_EQ, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x17: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_CASE_NE, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_CASE_NE, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x18: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_CASE_LT, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_CASE_LT, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x19: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_CASE_GT, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_CASE_GT, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x1A: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_CASE_LE, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_CASE_LE, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x1B: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_CASE_GE, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_CASE_GE, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x1C: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_CASE_ELSE),") + self.write_line(f"SI_CMD(EVT_OP_CASE_ELSE),") self.indent += 1 elif opcode == 0x1D: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_CASE_MULTI_OR_EQ, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x1E: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_CASE_MULTI_AND_EQ, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_CASE_MULTI_AND_EQ, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x1F: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_CASE_FLAG, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_CASE_FLAG, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x20: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_END_CASE_MULTI),") + self.write_line(f"SI_CMD(EVT_OP_END_CASE_MULTI),") self.indent += 1 elif opcode == 0x21: self.indent -= 1 - self.write_line(f"SI_CMD(ScriptOpcode_CASE_RANGE, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"SI_CMD(EVT_OP_CASE_RANGE, {self.var(argv[0])}, {self.var(argv[1])}),") self.indent += 1 - elif opcode == 0x22: self.write_line(f"SI_CMD(ScriptOpcode_BREAK_CASE),") + elif opcode == 0x22: self.write_line(f"SI_CMD(EVT_OP_BREAK_CASE),") elif opcode == 0x23: self.indent -= 2 - self.write_line(f"SI_CMD(ScriptOpcode_END_MATCH),") - elif opcode == 0x24: self.write_line(f"SI_CMD(ScriptOpcode_SET, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x25: self.write_line(f"SI_CMD(ScriptOpcode_SET_CONST, {self.var(argv[0])}, 0x{argv[1]:X}),") - elif opcode == 0x26: self.write_line(f"SI_CMD(ScriptOpcode_SET_F, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x27: self.write_line(f"SI_CMD(ScriptOpcode_ADD, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x28: self.write_line(f"SI_CMD(ScriptOpcode_SUB, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x29: self.write_line(f"SI_CMD(ScriptOpcode_MUL, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x2A: self.write_line(f"SI_CMD(ScriptOpcode_DIV, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x2B: self.write_line(f"SI_CMD(ScriptOpcode_MOD, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x2C: self.write_line(f"SI_CMD(ScriptOpcode_ADD_F, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x2D: self.write_line(f"SI_CMD(ScriptOpcode_SUB_F, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x2E: self.write_line(f"SI_CMD(ScriptOpcode_MUL_F, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x2F: self.write_line(f"SI_CMD(ScriptOpcode_DIV_F, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x30: self.write_line(f"SI_CMD(ScriptOpcode_USE_BUFFER, {self.var(argv[0])}),") + self.write_line(f"SI_CMD(EVT_OP_END_MATCH),") + elif opcode == 0x24: self.write_line(f"SI_CMD(EVT_OP_SET, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x25: self.write_line(f"SI_CMD(EVT_OP_SET_CONST, {self.var(argv[0])}, 0x{argv[1]:X}),") + elif opcode == 0x26: self.write_line(f"SI_CMD(EVT_OP_SET_F, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x27: self.write_line(f"SI_CMD(EVT_OP_ADD, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x28: self.write_line(f"SI_CMD(EVT_OP_SUB, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x29: self.write_line(f"SI_CMD(EVT_OP_MUL, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2A: self.write_line(f"SI_CMD(EVT_OP_DIV, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2B: self.write_line(f"SI_CMD(EVT_OP_MOD, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2C: self.write_line(f"SI_CMD(EVT_OP_ADD_F, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2D: self.write_line(f"SI_CMD(EVT_OP_SUB_F, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2E: self.write_line(f"SI_CMD(EVT_OP_MUL_F, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2F: self.write_line(f"SI_CMD(EVT_OP_DIV_F, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x30: self.write_line(f"SI_CMD(EVT_OP_USE_BUFFER, {self.var(argv[0])}),") elif opcode == 0x31: - args = ["ScriptOpcode_BUFFER_READ_1",*map(self.var, argv)] + args = ["EVT_OP_BUFFER_READ_1",*map(self.var, argv)] self.write_line(f"SI_CMD({', '.join(args)}),") elif opcode == 0x32: - args = ["ScriptOpcode_BUFFER_READ_2",*map(self.var, argv)] + args = ["EVT_OP_BUFFER_READ_2",*map(self.var, argv)] self.write_line(f"SI_CMD({', '.join(args)}),") elif opcode == 0x33: - args = ["ScriptOpcode_BUFFER_READ_3",*map(self.var, argv)] + args = ["EVT_OP_BUFFER_READ_3",*map(self.var, argv)] self.write_line(f"SI_CMD({', '.join(args)}),") elif opcode == 0x34: - args = ["ScriptOpcode_BUFFER_READ_4",*map(self.var, argv)] + args = ["EVT_OP_BUFFER_READ_4",*map(self.var, argv)] self.write_line(f"SI_CMD({', '.join(args)}),") elif opcode == 0x35: - args = ["ScriptOpcode_BUFFER_PEEK",*map(self.var, argv)] + args = ["EVT_OP_BUFFER_PEEK",*map(self.var, argv)] self.write_line(f"SI_CMD({', '.join(args)}),") - elif opcode == 0x36: self.write_line(f"SI_CMD(ScriptOpcode_USE_BUFFER_f, {self.var(argv[0])}),") + elif opcode == 0x36: self.write_line(f"SI_CMD(EVT_OP_USE_BUFFER_f, {self.var(argv[0])}),") elif opcode == 0x37: - args = ["ScriptOpcode_BUFFER_READ_1_F",*map(self.var, argv)] + args = ["EVT_OP_BUFFER_READ_1_F",*map(self.var, argv)] self.write_line(f"SI_CMD({', '.join(args)}),") elif opcode == 0x38: - args = ["ScriptOpcode_BUFFER_READ_2_F",*map(self.var, argv)] + args = ["EVT_OP_BUFFER_READ_2_F",*map(self.var, argv)] self.write_line(f"SI_CMD({', '.join(args)}),") elif opcode == 0x39: - args = ["ScriptOpcode_BUFFER_READ_3_F",*map(self.var, argv)] + args = ["EVT_OP_BUFFER_READ_3_F",*map(self.var, argv)] self.write_line(f"SI_CMD({', '.join(args)}),") elif opcode == 0x3A: - args = ["ScriptOpcode_BUFFER_READ_4_F",*map(self.var, argv)] + args = ["EVT_OP_BUFFER_READ_4_F",*map(self.var, argv)] self.write_line(f"SI_CMD({', '.join(args)}),") elif opcode == 0x3B: - args = ["ScriptOpcode_BUFFER_PEEK_F",*map(self.var, argv)] + args = ["EVT_OP_BUFFER_PEEK_F",*map(self.var, argv)] self.write_line(f"SI_CMD({', '.join(args)}),") - elif opcode == 0x3C: self.write_line(f"SI_CMD(ScriptOpcode_USE_ARRAY, {self.var(argv[0])}),") - elif opcode == 0x3D: self.write_line(f"SI_CMD(ScriptOpcode_USE_FLAGS, {self.var(argv[0])}),") - elif opcode == 0x3E: self.write_line(f"SI_CMD(ScriptOpcode_NEW_ARRAY, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x3F: self.write_line(f"SI_CMD(ScriptOpcode_AND, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x40: self.write_line(f"SI_CMD(ScriptOpcode_OR, {self.var(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x41: self.write_line(f"SI_CMD(ScriptOpcode_AND_CONST, {self.var(argv[0])}, 0x{argv[1]:X})") - elif opcode == 0x42: self.write_line(f"SI_CMD(ScriptOpcode_OR_CONST, {self.var(argv[0])}, 0x{argv[1]:X})") + elif opcode == 0x3C: self.write_line(f"SI_CMD(EVT_OP_USE_ARRAY, {self.var(argv[0])}),") + elif opcode == 0x3D: self.write_line(f"SI_CMD(EVT_OP_USE_FLAGS, {self.var(argv[0])}),") + elif opcode == 0x3E: self.write_line(f"SI_CMD(EVT_OP_NEW_ARRAY, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x3F: self.write_line(f"SI_CMD(EVT_OP_AND, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x40: self.write_line(f"SI_CMD(EVT_OP_OR, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x41: self.write_line(f"SI_CMD(EVT_OP_AND_CONST, {self.var(argv[0])}, 0x{argv[1]:X})") + elif opcode == 0x42: self.write_line(f"SI_CMD(EVT_OP_OR_CONST, {self.var(argv[0])}, 0x{argv[1]:X})") elif opcode == 0x43: - args = ["ScriptOpcode_CALL", self.addr_ref(argv[0]), *map(self.var, argv[1:])] + args = ["EVT_OP_CALL", self.addr_ref(argv[0]), *map(self.var, argv[1:])] self.write_line(f"SI_CMD({', '.join(args)}),") - elif opcode == 0x44: self.write_line(f"SI_CMD(ScriptOpcode_SPAWN_SCRIPT, {self.addr_ref(argv[0])}),") - elif opcode == 0x45: self.write_line(f"SI_CMD(ScriptOpcode_SPAWN_GET_ID, {self.addr_ref(argv[0])}, {self.var(argv[1])}),") - elif opcode == 0x46: self.write_line(f"SI_CMD(ScriptOpcode_AWAIT_SCRIPT, {self.addr_ref(argv[0])}),") + elif opcode == 0x44: self.write_line(f"SI_CMD(EVT_OP_SPAWN_SCRIPT, {self.addr_ref(argv[0])}),") + elif opcode == 0x45: self.write_line(f"SI_CMD(EVT_OP_SPAWN_GET_ID, {self.addr_ref(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x46: self.write_line(f"SI_CMD(EVT_OP_AWAIT_SCRIPT, {self.addr_ref(argv[0])}),") elif opcode == 0x47: - args = ["ScriptOpcode_BIND_TRIGGER", self.addr_ref(argv[0]), self.trigger(argv[1]), *map(self.var, argv[2:])] + args = ["EVT_OP_BIND_TRIGGER", self.addr_ref(argv[0]), self.trigger(argv[1]), *map(self.var, argv[2:])] self.write_line(f"SI_CMD({', '.join(args)}),") - elif opcode == 0x48: self.write_line(f"SI_CMD(ScriptOpcode_UNBIND),") - elif opcode == 0x49: self.write_line(f"SI_CMD(ScriptOpcode_KILL_SCRIPT, {self.var(argv[0])}),") - elif opcode == 0x4A: self.write_line(f"SI_CMD(ScriptOpcode_JUMP, {self.var(argv[0])}),") - elif opcode == 0x4B: self.write_line(f"SI_CMD(ScriptOpcode_SET_PRIORITY, {self.var(argv[0])}),") - elif opcode == 0x4C: self.write_line(f"SI_CMD(ScriptOpcode_SET_TIMESCALE, {self.var(argv[0])}),") - elif opcode == 0x4D: self.write_line(f"SI_CMD(ScriptOpcode_SET_GROUP, {self.var(argv[0])}),") + elif opcode == 0x48: self.write_line(f"SI_CMD(EVT_OP_UNBIND),") + elif opcode == 0x49: self.write_line(f"SI_CMD(EVT_OP_KILL_SCRIPT, {self.var(argv[0])}),") + elif opcode == 0x4A: self.write_line(f"SI_CMD(EVT_OP_JUMP, {self.var(argv[0])}),") + elif opcode == 0x4B: self.write_line(f"SI_CMD(EVT_OP_SET_PRIORITY, {self.var(argv[0])}),") + elif opcode == 0x4C: self.write_line(f"SI_CMD(EVT_OP_SET_TIMESCALE, {self.var(argv[0])}),") + elif opcode == 0x4D: self.write_line(f"SI_CMD(EVT_OP_SET_GROUP, {self.var(argv[0])}),") elif opcode == 0x4E: - args = ["ScriptOpcode_BIND_PADLOCK", self.addr_ref(argv[0]), self.trigger(argv[1]), *map(self.var, argv[2:])] + args = ["EVT_OP_BIND_PADLOCK", self.addr_ref(argv[0]), self.trigger(argv[1]), *map(self.var, argv[2:])] self.write_line(f"SI_CMD({', '.join(args)}),") - elif opcode == 0x4F: self.write_line(f"SI_CMD(ScriptOpcode_SUSPEND_GROUP, {self.var(argv[0])}),") - elif opcode == 0x50: self.write_line(f"SI_CMD(ScriptOpcode_RESUME_GROUP, {self.var(argv[0])}),") - elif opcode == 0x51: self.write_line(f"SI_CMD(ScriptOpcode_SUSPEND_OTHERS, {self.var(argv[0])}),") - elif opcode == 0x52: self.write_line(f"SI_CMD(ScriptOpcode_RESUME_OTHERS, {self.var(argv[0])}),") - elif opcode == 0x53: self.write_line(f"SI_CMD(ScriptOpcode_SUSPEND_SCRIPT, {self.var(argv[0])}),") - elif opcode == 0x54: self.write_line(f"SI_CMD(ScriptOpcode_RESUME_SCRIPT, {self.var(argv[0])}),") - elif opcode == 0x55: self.write_line(f"SI_CMD(ScriptOpcode_DOES_SCRIPT_EXIST, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x4F: self.write_line(f"SI_CMD(EVT_OP_SUSPEND_GROUP, {self.var(argv[0])}),") + elif opcode == 0x50: self.write_line(f"SI_CMD(EVT_OP_RESUME_GROUP, {self.var(argv[0])}),") + elif opcode == 0x51: self.write_line(f"SI_CMD(EVT_OP_SUSPEND_OTHERS, {self.var(argv[0])}),") + elif opcode == 0x52: self.write_line(f"SI_CMD(EVT_OP_RESUME_OTHERS, {self.var(argv[0])}),") + elif opcode == 0x53: self.write_line(f"SI_CMD(EVT_OP_SUSPEND_SCRIPT, {self.var(argv[0])}),") + elif opcode == 0x54: self.write_line(f"SI_CMD(EVT_OP_RESUME_SCRIPT, {self.var(argv[0])}),") + elif opcode == 0x55: self.write_line(f"SI_CMD(EVT_OP_DOES_SCRIPT_EXIST, {self.var(argv[0])}, {self.var(argv[1])}),") elif opcode == 0x56: - self.write_line("SI_CMD(ScriptOpcode_SPAWN_THREAD),") + self.write_line("SI_CMD(EVT_OP_SPAWN_THREAD),") self.indent += 1 elif opcode == 0x57: self.indent -= 1 - self.write_line("SI_CMD(ScriptOpcode_END_SPAWN_THREAD),") + self.write_line("SI_CMD(EVT_OP_END_SPAWN_THREAD),") elif opcode == 0x58: - self.write_line("SI_CMD(ScriptOpcode_PARALLEL_THREAD),") + self.write_line("SI_CMD(EVT_OP_PARALLEL_THREAD),") self.indent += 1 elif opcode == 0x59: self.indent -= 1 - self.write_line("SI_CMD(ScriptOpcode_END_PARALLEL_THREAD),") + self.write_line("SI_CMD(EVT_OP_END_PARALLEL_THREAD),") else: # unknown opcode argv_str = "" @@ -951,7 +951,7 @@ class ScriptDSLDisassembler(ScriptDisassembler): self.INCLUDED["functions"].add(self.script_name) - self.prefix_line(f"Script {self.script_name} = SCRIPT({{") + self.prefix_line(f"EvtSource {self.script_name} = SCRIPT({{") self.write_line("});") self.done = True @@ -1285,11 +1285,11 @@ if __name__ == "__main__": print(f"========== 0x{gap_size:X} byte gap ({potential_count} {potential_struct}?) 0x{gap_start:X} - 0x{args.offset:X} ==========") print() gap = False - #print(f"Script read from 0x{script.start_pos:X} to 0x{script.end_pos:X} " + #print(f"EvtSource read from 0x{script.start_pos:X} to 0x{script.end_pos:X} " # f"(0x{script.end_pos - script.start_pos:X} bytes, {script.instructions} instructions)") #print() vram = f"{args.vram:X}_" if vram_base > 0 else f"" - script_text = script_text.replace("Script script = SCRIPT({", f"Script N(D_{vram}{args.offset:X}) = " + "SCRIPT({") + script_text = script_text.replace("EvtSource script = SCRIPT({", f"EvtSource N(D_{vram}{args.offset:X}) = " + "SCRIPT({") print(script_text, end="") print() #print(f"Valid script found at 0x{args.offset:X}") @@ -1321,7 +1321,7 @@ if __name__ == "__main__": try: script_text = script.disassemble() - print(f"Script read from 0x{script.start_pos:X} to 0x{script.end_pos:X} " + print(f"EvtSource read from 0x{script.start_pos:X} to 0x{script.end_pos:X} " f"(0x{script.end_pos - script.start_pos:X} bytes, {script.instructions} instructions)") print() print(script_text, end="") diff --git a/tools/make_npc_structs.py b/tools/make_npc_structs.py index 6145106fc3..6ee19f2b26 100644 --- a/tools/make_npc_structs.py +++ b/tools/make_npc_structs.py @@ -5,7 +5,7 @@ from struct import unpack_from CONSTANTS = {} def get_constants(): global CONSTANTS - valid_enums = { "StoryProgress", "ItemIDs", "PlayerAnims", + valid_enums = { "StoryProgress", "ItemIDs", "PlayerAnims", "ActorIDs", "Events", "SoundIDs", "SongIDs", "Locations", "AmbientSounds", "NpcIDs", "Emotes" } for enum in valid_enums: @@ -327,7 +327,7 @@ def print_data(vals, indent, needs_name, is_array=False, is_struct=False): elif "tattle" in val["name"]: val["fmt"] = "06X" val["type"] = "hex" - + fmt = val["fmt"] if val["type"] == "float": line += f"{val['data']:{fmt}}f" @@ -382,7 +382,7 @@ def recurse_check_list(vals): if check_list(val, 1): return len(vals) - x elif val != 0: - return len(vals) - x + return len(vals) - x return -1 def get_single_struct_vals(fd, i): @@ -509,10 +509,10 @@ def MacroReplaceStaticNPC(fd): indent = len(fd[i].split(".",1)[0]) // 4 new_line = fd[i].split("{",1)[0] + "{\n" - + if not vals: i = x - i += 1 + i += 1 continue vals += "\n},\n." @@ -526,7 +526,7 @@ def MacroReplaceStaticNPC(fd): added_item = True item_name = CONSTANTS["ItemIDs"][item[0]] new_line += " " * (indent+1) + "{ " + item_name + f", {item[1]}, {item[2]}" + " },\n" - + if added_item: new_line += " " * indent + "}," @@ -549,7 +549,7 @@ def MacroReplaceStaticNPC(fd): new_line += " " * indent + "}," out.append(new_line) i = x - + elif ".heartDrops" in fd[i] or ".flowerDrops" in fd[i]: vals, x = get_single_struct_vals(fd, i) @@ -659,7 +659,7 @@ offset, out = output_type2(fd, args.count, args.offset, STRUCTS[args.type]) for i,entry in enumerate(out): out[i] = "\n".join(entry) -print(f"Script range 0x{args.offset:08X} - 0x{offset:08X}") +print(f"EvtSource range 0x{args.offset:08X} - 0x{offset:08X}") print() if args.type.lower() == "staticnpc": diff --git a/tools/star_rod_idx_to_c.py b/tools/star_rod_idx_to_c.py index e68c05b8cb..022f4cfe94 100755 --- a/tools/star_rod_idx_to_c.py +++ b/tools/star_rod_idx_to_c.py @@ -143,15 +143,15 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0): out += f"// rodata: {struct['name']}\n" # format struct - if struct["type"].startswith("Script"): + if struct["type"].startswith("EvtSource"): if struct["type"] == "Script_Main": name = "N(main)" - INCLUDES_NEEDED["forward"].append(f"Script " + name + ";") + INCLUDES_NEEDED["forward"].append(f"EvtSource " + name + ";") main_script_name = name # For PlayMusic script if using a separate header file #if afterHeader: - # INCLUDES_NEEDED["forward"].append(f"Script " + name + ";") + # INCLUDES_NEEDED["forward"].append(f"EvtSource " + name + ";") # afterHeader = False pos = bytes.tell() @@ -182,7 +182,7 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0): if "GotoMap" in script_text[4]: map_, entryIdx = script_text[4].split("(",1)[1].split(")",1)[0].split(",") if walkDistance and exitIdx and map_ and entryIdx: - out += f"Script {name} = EXIT_WALK_SCRIPT({walkDistance}, {exitIdx}, {map_}, {entryIdx});\n" + out += f"EvtSource {name} = EXIT_WALK_SCRIPT({walkDistance}, {exitIdx}, {map_}, {entryIdx});\n" else: print(f"Unable to macro replace exit script {name}") out += "\n".join(script_text) + "\n"