From afab42451941b6027dbb41ce8476e62fe681ea8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Fa=C3=9Fbender?= <31699028+Brotenko@users.noreply.github.com> Date: Sun, 29 Aug 2021 16:34:42 +0200 Subject: [PATCH] Rename all si_funcs to evt_funcs (#403) * resolve #397 * fix libultra * Match func_80144E4C (#406) * Update hud_element.c * Update hud_element.h * Update hud_element.h * Delete func_80144E4C.s * Trigger funcs (#405) * remove old tools, fix warnings * almost match si_handle_print_debug_var * si_goto_end_loop and warnings * is_trigger_bound and create_trigger * Cleanup + matching 2 non-matchings * update_triggers (trigger.c complete) * fix warnings * PR comments, m2ctx.py fix * combine PR #398 with #403 * More entity decomp (#402) * More entity decomp * cleanup * Vec3f instead of 3 floats in structE307C0 * resolve #397 * fix libultra * combine PR #398 with #403 * decompile evt_goto_end_loop Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com> Co-authored-by: Ethan Roseman Co-authored-by: JaThePlayer <50085307+JaThePlayer@users.noreply.github.com> --- include/PR/rcp.h | 1770 ++++++++--------- include/common.h | 2 +- include/common_structs.h | 2 +- include/{si.h => evt.h} | 44 +- include/script_api/battle.h | 2 +- include/script_api/common.h | 2 +- include/script_api/map.h | 2 +- include/si_funcs.h | 226 +++ src/111f0_len_860.c | 2 +- src/16c8e0.c | 26 +- src/197F40.c | 6 +- src/1A5830.c | 8 +- src/7fd10_len_b40.c | 2 +- src/EA6FD0.c | 2 +- src/battle/area_kmr_part_1/actor/goomba.c | 198 +- src/battle/area_kmr_part_1/actor/paragoomba.c | 386 ++-- .../area_kmr_part_1/actor/spiked_goomba.c | 218 +- src/battle/area_kmr_part_1/stage/clouds.inc.c | 74 +- src/battle/area_kmr_part_1/stage/kmr_03.c | 8 +- src/battle/area_kmr_part_1/stage/kmr_04.c | 8 +- src/battle/area_kmr_part_1/stage/kmr_06.c | 8 +- src/battle/battle.c | 2 +- src/battle/item/UseItem.inc.c | 22 +- src/battle/item/coconut.c | 36 +- src/battle/item/dizzy_dial.c | 16 +- src/battle/item/dried_shroom.c | 24 +- src/battle/item/dusty_hammer.c | 56 +- src/battle/item/egg_missile.c | 36 +- src/battle/item/electro_pop.c | 30 +- src/battle/item/fire_flower.c | 32 +- src/battle/item/food.c | 122 +- src/battle/item/fright_jar.c | 28 +- src/battle/item/hustle_drink.c | 16 +- src/battle/item/insecticide_herb.c | 64 +- src/battle/item/life_shroom.c | 88 +- src/battle/item/mushroom.c | 110 +- src/battle/item/mystery.c | 38 +- src/battle/item/pebble.c | 56 +- src/battle/item/please_come_back.c | 2 +- src/battle/item/pow_block.c | 26 +- src/battle/item/repel_gel.c | 10 +- src/battle/item/shooting_star.c | 30 +- src/battle/item/sleepy_sheep.c | 84 +- src/battle/item/snowman_doll.c | 30 +- src/battle/item/stone_cap.c | 6 +- src/battle/item/stop_watch.c | 16 +- src/battle/item/strange_cake.c | 48 +- src/battle/item/super_soda.c | 90 +- src/battle/item/tasty_tonic.c | 42 +- src/battle/item/thunder_bolt.c | 10 +- src/battle/item/thunder_rage.c | 14 +- src/battle/item/ultra_shroom.c | 24 +- src/battle/item/unknown_item.c | 24 +- src/battle/item/volt_shroom.c | 18 +- src/battle/partner/goombario.c | 448 ++--- src/common/IsSaveVar123.inc.c | 2 +- src/dc470_len_14c0.c | 2 +- src/entity/Chest.c | 2 +- src/entity/HeartBlock.c | 8 +- src/entity/SaveBlock.c | 4 +- src/evt/cam_api.c | 12 +- src/evt/{si.c => evt.c} | 495 +++-- src/evt/f8f60_len_1560.c | 2 +- src/evt/fx_api.c | 2 +- src/evt/script_list.c | 2 +- src/fio.c | 2 +- src/state_demo.c | 4 +- src/world/area_arn/arn.h | 2 +- src/world/area_arn/arn_02/events.c | 14 +- src/world/area_arn/arn_02/header.c | 2 +- src/world/area_arn/arn_03/events.c | 238 +-- src/world/area_arn/arn_03/header.c | 2 +- src/world/area_arn/arn_04/events.c | 12 +- src/world/area_arn/arn_04/header.c | 2 +- src/world/area_arn/arn_05/events.c | 220 +- src/world/area_arn/arn_05/header.c | 2 +- src/world/area_arn/arn_07/BECDF0.c | 110 +- src/world/area_arn/arn_07/BED5F0.c | 4 +- src/world/area_arn/arn_07/events.c | 294 +-- src/world/area_arn/arn_07/header.c | 2 +- src/world/area_arn/arn_08/events.c | 96 +- src/world/area_arn/arn_08/header.c | 2 +- src/world/area_arn/arn_09/events.c | 36 +- src/world/area_arn/arn_09/header.c | 2 +- src/world/area_arn/arn_10/events.c | 54 +- src/world/area_arn/arn_10/header.c | 2 +- src/world/area_arn/arn_11/events.c | 76 +- src/world/area_arn/arn_11/header.c | 2 +- src/world/area_arn/arn_12/events.c | 54 +- src/world/area_arn/arn_12/header.c | 2 +- src/world/area_arn/arn_13/events.c | 54 +- src/world/area_arn/arn_13/header.c | 2 +- src/world/area_dgb/dgb_00/BFA0A0.c | 38 +- src/world/area_dgb/dgb_00/BFA100.c | 166 +- src/world/area_dgb/dgb_01/BFD9A0.c | 284 +-- src/world/area_dgb/dgb_02/C2EBA0.c | 62 +- src/world/area_dgb/dgb_03/C31730.c | 186 +- src/world/area_dgb/dgb_04/C36530.c | 146 +- src/world/area_dgb/dgb_05/C3AA10.c | 32 +- src/world/area_dgb/dgb_06/C3D080.c | 52 +- src/world/area_dgb/dgb_07/C3DBF0.c | 28 +- src/world/area_dgb/dgb_08/C3FDB0.c | 148 +- src/world/area_dgb/dgb_09/C46BE0.c | 116 +- src/world/area_dgb/dgb_10/C4C390.c | 170 +- src/world/area_dgb/dgb_11/C4D3E0.c | 86 +- src/world/area_dgb/dgb_12/C4DEF0.c | 50 +- src/world/area_dgb/dgb_13/C4E960.c | 42 +- src/world/area_dgb/dgb_14/C4F030.c | 36 +- src/world/area_dgb/dgb_15/C4F510.c | 118 +- src/world/area_dgb/dgb_16/C52540.c | 34 +- src/world/area_dgb/dgb_17/C55A60.c | 36 +- src/world/area_dgb/dgb_18/C55F40.c | 196 +- src/world/area_dro/dro_01/95B7E0.c | 1434 ++++++------- src/world/area_dro/dro_01/95E7A0.c | 4 +- src/world/area_dro/dro_02/9694C0.c | 1250 ++++++------ src/world/area_flo/flo_00/C9DF60.c | 886 ++++----- src/world/area_flo/flo_03/CA72E0.c | 548 ++--- src/world/area_flo/flo_07/CAC5D0.c | 288 +-- src/world/area_flo/flo_08/CAFAC0.c | 480 ++--- src/world/area_flo/flo_09/CB50E0.c | 374 ++-- src/world/area_flo/flo_10/CB9200.c | 2 +- src/world/area_flo/flo_10/CB9280.c | 468 ++--- src/world/area_flo/flo_10/CBA430.c | 4 +- src/world/area_flo/flo_11/CBDCD0.c | 404 ++-- src/world/area_flo/flo_12/CC0E70.c | 214 +- src/world/area_flo/flo_13/CC3850.c | 390 ++-- src/world/area_flo/flo_14/CCB310.c | 488 ++--- src/world/area_flo/flo_14/CCBE20.c | 134 +- src/world/area_flo/flo_15/CD06C0.c | 132 +- src/world/area_flo/flo_16/CD1F10.c | 280 +-- src/world/area_flo/flo_16/CD2C80.c | 186 +- src/world/area_flo/flo_17/CD7350.c | 250 +-- src/world/area_flo/flo_18/CDC6A0.c | 1152 +++++------ src/world/area_flo/flo_19/CE36F0.c | 494 ++--- src/world/area_flo/flo_21/CE6700.c | 410 ++-- src/world/area_flo/flo_22/CEC240.c | 96 +- src/world/area_flo/flo_22/CEC290.c | 4 +- src/world/area_flo/flo_23/CEE2A0.c | 216 +- src/world/area_flo/flo_24/CF0980.c | 370 ++-- src/world/area_flo/flo_25/CF2C10.c | 214 +- src/world/area_flo/flo_25/CF4BC0.c | 164 +- src/world/area_hos/hos_03/A1BDB0.c | 28 +- src/world/area_isk/isk_16/9951F0.c | 2 +- src/world/area_jan/jan_02/B2C8A0.c | 28 +- src/world/area_jan/jan_03/B34BD0.c | 28 +- src/world/area_kmr/kmr.h | 146 +- src/world/area_kmr/kmr_02/8B0070.c | 28 +- src/world/area_kmr/kmr_03/8C8140.c | 88 +- src/world/area_kmr/kmr_03/8C83A0.c | 18 +- src/world/area_kmr/kmr_03/8C85E0.c | 30 +- src/world/area_kmr/kmr_06/8D2A10.c | 12 +- src/world/area_kmr/kmr_07/8D3DC0.c | 2 +- src/world/area_kmr/kmr_12/events.c | 30 +- src/world/area_kzn/kzn_19/C8DBB0.c | 2 +- src/world/area_mac/mac_00/7EB340.c | 30 +- src/world/area_mac/mac_01/800880.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 28 +- src/world/area_mac/mac_02/823BF0.c | 28 +- src/world/area_mac/mac_03/831B20.c | 28 +- src/world/area_mac/mac_04/843030.c | 28 +- src/world/area_mac/mac_05/852170.c | 28 +- src/world/area_nok/nok_01/9C53E0.c | 28 +- src/world/area_nok/nok_02/9D7AA0.c | 28 +- src/world/area_omo/omo_15/DE8770.c | 2 +- src/world/area_pra/pra_32/D86A20.c | 2 +- src/world/area_sam/sam_01/CF7E80.c | 28 +- src/world/area_sam/sam_02/D05F60.c | 28 +- src/world/area_sam/sam_11/D3ADA0.c | 28 +- src/world/area_sbk/sbk_00/929270.c | 6 +- src/world/area_sbk/sbk_00/9292B0.c | 4 +- src/world/area_sbk/sbk_01/929A90.c | 6 +- src/world/area_sbk/sbk_02/92A2B0.c | 2 +- src/world/area_trd/trd_10/9C2910.c | 2 +- src/world/area_tst/tst_04/B1B570.c | 4 +- src/world/common/GetCamVfov.inc.c | 2 +- .../common/GetEncounterEnemyIsOwner.inc.c | 2 +- src/world/common/GetEntryPos.inc.c | 10 +- src/world/common/GetGameStatus75.inc.c | 2 +- src/world/common/SomeXYZFunc2.inc.c | 6 +- src/world/common/UnkCameraFunc.inc.c | 4 +- src/world/common/UnkFunc18.inc.c | 4 +- src/world/common/UnkFunc20.inc.c | 4 +- src/world/common/UnkPartnerFuncs.inc.c | 6 +- src/world/common/foliage.inc.c | 206 +- src/world/partner/goombario.c | 10 +- tools/disasm_script.py | 244 +-- tools/get_variable.py | 22 +- tools/star_rod_idx_to_c.py | 24 +- ...si_goto_end_case.s => evt_goto_end_case.s} | 2 +- ...ild_thread.s => evt_handle_child_thread.s} | 2 +- ...bug_var.s => evt_handle_print_debug_var.s} | 2 +- ...si_handle_thread.s => evt_handle_thread.s} | 2 +- ver/us/splat.yaml | 6 +- ver/us/symbol_addrs.txt | 194 +- 194 files changed, 10817 insertions(+), 10598 deletions(-) rename include/{si.h => evt.h} (84%) create mode 100644 include/si_funcs.h rename src/evt/{si.c => evt.c} (78%) rename ver/us/asm/nonmatchings/evt/si/{si_goto_end_case.s => evt_goto_end_case.s} (98%) rename ver/us/asm/nonmatchings/evt/si/{si_handle_child_thread.s => evt_handle_child_thread.s} (98%) rename ver/us/asm/nonmatchings/evt/si/{si_handle_print_debug_var.s => evt_handle_print_debug_var.s} (99%) rename ver/us/asm/nonmatchings/evt/si/{si_handle_thread.s => evt_handle_thread.s} (99%) diff --git a/include/PR/rcp.h b/include/PR/rcp.h index d292bf3fc3..d446a20741 100755 --- a/include/PR/rcp.h +++ b/include/PR/rcp.h @@ -1,885 +1,885 @@ -#ifndef _RCP_H_ -#define _RCP_H_ - -/************************************************************************** - * * - * Copyright (C) 1995, Silicon Graphics, Inc. * - * * - * These coded instructions, statements, and computer programs contain * - * unpublished proprietary information of Silicon Graphics, Inc., and * - * are protected by Federal copyright law. They may not be disclosed * - * to third parties or copied or duplicated in any form, in whole or * - * in part, without the prior written consent of Silicon Graphics, Inc. * - * * - **************************************************************************/ - -/************************************************************************** - * - * File: rcp.h - * - * This file contains register and bit definitions for RCP memory map. - * $Revision: 1.22 $ - * $Date: 1999/05/20 03:01:49 $ - * $Source: /hosts/gate3/exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/rcp.h,v $ - * - **************************************************************************/ - -#include -#include - -/********************************************************************** - * - * Here is a quick overview of the RCP memory map: - * - -0x0000_0000 .. 0x03ef_ffff RDRAM memory -0x03f0_0000 .. 0x03ff_ffff RDRAM registers - - RCP registers (see below) -0x0400_0000 .. 0x040f_ffff SP registers -0x0410_0000 .. 0x041f_ffff DP command registers -0x0420_0000 .. 0x042f_ffff DP span registers -0x0430_0000 .. 0x043f_ffff MI registers -0x0440_0000 .. 0x044f_ffff VI registers -0x0450_0000 .. 0x045f_ffff AI registers -0x0460_0000 .. 0x046f_ffff PI registers -0x0470_0000 .. 0x047f_ffff RI registers -0x0480_0000 .. 0x048f_ffff SI registers -0x0490_0000 .. 0x04ff_ffff unused - -0x0500_0000 .. 0x05ff_ffff cartridge domain 2 -0x0600_0000 .. 0x07ff_ffff cartridge domain 1 -0x0800_0000 .. 0x0fff_ffff cartridge domain 2 -0x1000_0000 .. 0x1fbf_ffff cartridge domain 1 - -0x1fc0_0000 .. 0x1fc0_07bf PIF Boot Rom (1984 bytes) -0x1fc0_07c0 .. 0x1fc0_07ff PIF (JoyChannel) RAM (64 bytes) -0x1fc0_0800 .. 0x1fcf_ffff Reserved -0x1fd0_0000 .. 0x7fff_ffff cartridge domain 1 -0x8000_0000 .. 0xffff_ffff external SysAD device - -The Indy development board use cartridge domain 1: -0x1000_0000 .. 0x10ff_ffff RAMROM -0x1800_0000 .. 0x1800_0003 GIO interrupt (6 bits valid in 4 bytes) -0x1800_0400 .. 0x1800_0403 GIO sync (6 bits valid in 4 bytes) -0x1800_0800 .. 0x1800_0803 CART interrupt (6 bits valid in 4 bytes) - - - -**************************************************************************/ - - -/************************************************************************* - * RDRAM Memory (Assumes that maximum size is 4 MB) - */ -#define RDRAM_0_START 0x00000000 -#define RDRAM_0_END 0x001FFFFF -#define RDRAM_1_START 0x00200000 -#define RDRAM_1_END 0x003FFFFF - -#define RDRAM_START RDRAM_0_START -#define RDRAM_END RDRAM_1_END - - -/************************************************************************* - * Address predicates - */ -#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) -#define IS_RDRAM(x) ((unsigned)(x) >= RDRAM_START && \ - (unsigned)(x) < RDRAM_END) -#endif - - -/************************************************************************* - * RDRAM Registers (0x03f0_0000 .. 0x03ff_ffff) - */ -#define RDRAM_BASE_REG 0x03F00000 - -#define RDRAM_CONFIG_REG (RDRAM_BASE_REG+0x00) -#define RDRAM_DEVICE_TYPE_REG (RDRAM_BASE_REG+0x00) -#define RDRAM_DEVICE_ID_REG (RDRAM_BASE_REG+0x04) -#define RDRAM_DELAY_REG (RDRAM_BASE_REG+0x08) -#define RDRAM_MODE_REG (RDRAM_BASE_REG+0x0c) -#define RDRAM_REF_INTERVAL_REG (RDRAM_BASE_REG+0x10) -#define RDRAM_REF_ROW_REG (RDRAM_BASE_REG+0x14) -#define RDRAM_RAS_INTERVAL_REG (RDRAM_BASE_REG+0x18) -#define RDRAM_MIN_INTERVAL_REG (RDRAM_BASE_REG+0x1c) -#define RDRAM_ADDR_SELECT_REG (RDRAM_BASE_REG+0x20) -#define RDRAM_DEVICE_MANUF_REG (RDRAM_BASE_REG+0x24) - -#define RDRAM_0_DEVICE_ID 0 -#define RDRAM_1_DEVICE_ID 1 - -#define RDRAM_RESET_MODE 0 -#define RDRAM_ACTIVE_MODE 1 -#define RDRAM_STANDBY_MODE 2 - -#define RDRAM_LENGTH (2*512*2048) -#define RDRAM_0_BASE_ADDRESS (RDRAM_0_DEVICE_ID*RDRAM_LENGTH) -#define RDRAM_1_BASE_ADDRESS (RDRAM_1_DEVICE_ID*RDRAM_LENGTH) - -#define RDRAM_0_CONFIG 0x00000 -#define RDRAM_1_CONFIG 0x00400 -#define RDRAM_GLOBAL_CONFIG 0x80000 - - -/************************************************************************* - * PIF Physical memory map (total size = 2 KB) - * - * Size Description Mode - * 1FC007FF +-------+-----------------+-----+ - * | 64 B | JoyChannel RAM | R/W | - * 1FC007C0 +-------+-----------------+-----+ - * |1984 B | Boot ROM | * | * = Reserved - * 1FC00000 +-------+-----------------+-----+ - * - */ -#define PIF_ROM_START 0x1FC00000 -#define PIF_ROM_END 0x1FC007BF -#define PIF_RAM_START 0x1FC007C0 -#define PIF_RAM_END 0x1FC007FF - - -/************************************************************************* - * Controller channel - * Each game controller channel has 4 error bits that are defined in bit 6-7 of - * the Rx and Tx data size area bytes. Programmers need to clear these bits - * when setting the Tx/Rx size area values for a channel - */ -#define CHNL_ERR_NORESP 0x80 /* Bit 7 (Rx): No response error */ -#define CHNL_ERR_OVERRUN 0x40 /* Bit 6 (Rx): Overrun error */ -#define CHNL_ERR_FRAME 0x80 /* Bit 7 (Tx): Frame error */ -#define CHNL_ERR_COLLISION 0x40 /* Bit 6 (Tx): Collision error */ - -#define CHNL_ERR_MASK 0xC0 /* Bit 6-7: channel errors */ - - -/************************************************************************* - * External device info - */ -#define DEVICE_TYPE_CART 0 /* ROM cartridge */ -#define DEVICE_TYPE_BULK 1 /* ROM bulk */ -#define DEVICE_TYPE_64DD 2 /* 64 Disk Drive */ -#define DEVICE_TYPE_SRAM 3 /* SRAM */ -/* 4-6 are reserved */ -#define DEVICE_TYPE_INIT 7 /* initial value */ -/* 8-14 are reserved */ - -/************************************************************************* - * SP Memory - */ -#define SP_DMEM_START 0x04000000 /* read/write */ -#define SP_DMEM_END 0x04000FFF -#define SP_IMEM_START 0x04001000 /* read/write */ -#define SP_IMEM_END 0x04001FFF - -/************************************************************************* - * SP CP0 Registers - */ - -#define SP_BASE_REG 0x04040000 - -/* SP memory address (R/W): [11:0] DMEM/IMEM address; [12] 0=DMEM,1=IMEM */ -#define SP_MEM_ADDR_REG (SP_BASE_REG+0x00) /* Master */ - -/* SP DRAM DMA address (R/W): [23:0] RDRAM address */ -#define SP_DRAM_ADDR_REG (SP_BASE_REG+0x04) /* Slave */ - -/* SP read DMA length (R/W): [11:0] length, [19:12] count, [31:20] skip */ -/* direction: I/DMEM <- RDRAM */ -#define SP_RD_LEN_REG (SP_BASE_REG+0x08) /* R/W: read len */ - -/* SP write DMA length (R/W): [11:0] length, [19:12] count, [31:20] skip */ -/* direction: I/DMEM -> RDRAM */ -#define SP_WR_LEN_REG (SP_BASE_REG+0x0C) /* R/W: write len */ - -/* SP status (R/W): [14:0] valid bits; see below for write/read mode */ -#define SP_STATUS_REG (SP_BASE_REG+0x10) - -/* SP DMA full (R): [0] valid bit; dma full */ -#define SP_DMA_FULL_REG (SP_BASE_REG+0x14) - -/* SP DMA busy (R): [0] valid bit; dma busy */ -#define SP_DMA_BUSY_REG (SP_BASE_REG+0x18) - -/* SP semaphore (R/W): Read: [0] semaphore flag (set on read) */ -/* Write: [] clear semaphore flag */ -#define SP_SEMAPHORE_REG (SP_BASE_REG+0x1C) - -/* SP PC (R/W): [11:0] program counter */ -#define SP_PC_REG 0x04080000 - -/* SP MEM address: bit 12 specifies if address is IMEM or DMEM */ -#define SP_DMA_DMEM 0x0000 /* Bit 12: 0=DMEM, 1=IMEM */ -#define SP_DMA_IMEM 0x1000 /* Bit 12: 0=DMEM, 1=IMEM */ - -/* - * Values to clear/set bit in status reg (SP_STATUS_REG - write) - */ -#define SP_CLR_HALT 0x00001 /* Bit 0: clear halt */ -#define SP_SET_HALT 0x00002 /* Bit 1: set halt */ -#define SP_CLR_BROKE 0x00004 /* Bit 2: clear broke */ -#define SP_CLR_INTR 0x00008 /* Bit 3: clear intr */ -#define SP_SET_INTR 0x00010 /* Bit 4: set intr */ -#define SP_CLR_SSTEP 0x00020 /* Bit 5: clear sstep */ -#define SP_SET_SSTEP 0x00040 /* Bit 6: set sstep */ -#define SP_CLR_INTR_BREAK 0x00080 /* Bit 7: clear intr on break */ -#define SP_SET_INTR_BREAK 0x00100 /* Bit 8: set intr on break */ -#define SP_CLR_SIG0 0x00200 /* Bit 9: clear signal 0 */ -#define SP_SET_SIG0 0x00400 /* Bit 10: set signal 0 */ -#define SP_CLR_SIG1 0x00800 /* Bit 11: clear signal 1 */ -#define SP_SET_SIG1 0x01000 /* Bit 12: set signal 1 */ -#define SP_CLR_SIG2 0x02000 /* Bit 13: clear signal 2 */ -#define SP_SET_SIG2 0x04000 /* Bit 14: set signal 2 */ -#define SP_CLR_SIG3 0x08000 /* Bit 15: clear signal 3 */ -#define SP_SET_SIG3 0x10000 /* Bit 16: set signal 3 */ -#define SP_CLR_SIG4 0x20000 /* Bit 17: clear signal 4 */ -#define SP_SET_SIG4 0x40000 /* Bit 18: set signal 4 */ -#define SP_CLR_SIG5 0x80000 /* Bit 19: clear signal 5 */ -#define SP_SET_SIG5 0x100000 /* Bit 20: set signal 5 */ -#define SP_CLR_SIG6 0x200000 /* Bit 21: clear signal 6 */ -#define SP_SET_SIG6 0x400000 /* Bit 22: set signal 6 */ -#define SP_CLR_SIG7 0x800000 /* Bit 23: clear signal 7 */ -#define SP_SET_SIG7 0x1000000 /* Bit 24: set signal 7 */ - -/* - * Patterns to interpret status reg (SP_STATUS_REG - read) - */ -#define SP_STATUS_HALT 0x001 /* Bit 0: halt */ -#define SP_STATUS_BROKE 0x002 /* Bit 1: broke */ -#define SP_STATUS_DMA_BUSY 0x004 /* Bit 2: dma busy */ -#define SP_STATUS_DMA_FULL 0x008 /* Bit 3: dma full */ -#define SP_STATUS_IO_FULL 0x010 /* Bit 4: io full */ -#define SP_STATUS_SSTEP 0x020 /* Bit 5: single step */ -#define SP_STATUS_INTR_BREAK 0x040 /* Bit 6: interrupt on break */ -#define SP_STATUS_SIG0 0x080 /* Bit 7: signal 0 set */ -#define SP_STATUS_SIG1 0x100 /* Bit 8: signal 1 set */ -#define SP_STATUS_SIG2 0x200 /* Bit 9: signal 2 set */ -#define SP_STATUS_SIG3 0x400 /* Bit 10: signal 3 set */ -#define SP_STATUS_SIG4 0x800 /* Bit 11: signal 4 set */ -#define SP_STATUS_SIG5 0x1000 /* Bit 12: signal 5 set */ -#define SP_STATUS_SIG6 0x2000 /* Bit 13: signal 6 set */ -#define SP_STATUS_SIG7 0x4000 /* Bit 14: signal 7 set */ - -/* - * Use of SIG bits - */ -#define SP_CLR_YIELD SP_CLR_SIG0 -#define SP_SET_YIELD SP_SET_SIG0 -#define SP_STATUS_YIELD SP_STATUS_SIG0 -#define SP_CLR_YIELDED SP_CLR_SIG1 -#define SP_SET_YIELDED SP_SET_SIG1 -#define SP_STATUS_YIELDED SP_STATUS_SIG1 -#define SP_CLR_TASKDONE SP_CLR_SIG2 -#define SP_SET_TASKDONE SP_SET_SIG2 -#define SP_STATUS_TASKDONE SP_STATUS_SIG2 -#define SP_CLR_RSPSIGNAL SP_CLR_SIG3 -#define SP_SET_RSPSIGNAL SP_SET_SIG3 -#define SP_STATUS_RSPSIGNAL SP_STATUS_SIG3 -#define SP_CLR_CPUSIGNAL SP_CLR_SIG4 -#define SP_SET_CPUSIGNAL SP_SET_SIG4 -#define SP_STATUS_CPUSIGNAL SP_STATUS_SIG4 - -/* SP IMEM BIST REG (R/W): [6:0] BIST status bits; see below for detail */ -#define SP_IBIST_REG 0x04080004 - -/* - * Patterns to interpret status reg (SP_BIST_REG - write) - */ -#define SP_IBIST_CHECK 0x01 /* Bit 0: BIST check */ -#define SP_IBIST_GO 0x02 /* Bit 1: BIST go */ -#define SP_IBIST_CLEAR 0x04 /* Bit 2: BIST clear */ - -/* - * Patterns to interpret status reg (SP_BIST_REG - read) - */ -/* First 2 bits are same as in write mode: - * Bit 0: BIST check; Bit 1: BIST go - */ -#define SP_IBIST_DONE 0x04 /* Bit 2: BIST done */ -#define SP_IBIST_FAILED 0x78 /* Bit [6:3]: BIST fail */ - - -/************************************************************************* - * DP Command Registers - */ -#define DPC_BASE_REG 0x04100000 - -/* DP CMD DMA start (R/W): [23:0] DMEM/RDRAM start address */ -#define DPC_START_REG (DPC_BASE_REG+0x00) - -/* DP CMD DMA end (R/W): [23:0] DMEM/RDRAM end address */ -#define DPC_END_REG (DPC_BASE_REG+0x04) - -/* DP CMD DMA end (R): [23:0] DMEM/RDRAM current address */ -#define DPC_CURRENT_REG (DPC_BASE_REG+0x08) - -/* DP CMD status (R/W): [9:0] valid bits - see below for definitions */ -#define DPC_STATUS_REG (DPC_BASE_REG+0x0C) - -/* DP clock counter (R): [23:0] clock counter */ -#define DPC_CLOCK_REG (DPC_BASE_REG+0x10) - -/* DP buffer busy counter (R): [23:0] clock counter */ -#define DPC_BUFBUSY_REG (DPC_BASE_REG+0x14) - -/* DP pipe busy counter (R): [23:0] clock counter */ -#define DPC_PIPEBUSY_REG (DPC_BASE_REG+0x18) - -/* DP TMEM load counter (R): [23:0] clock counter */ -#define DPC_TMEM_REG (DPC_BASE_REG+0x1C) - -/* - * Values to clear/set bit in status reg (DPC_STATUS_REG - write) - */ -#define DPC_CLR_XBUS_DMEM_DMA 0x0001 /* Bit 0: clear xbus_dmem_dma */ -#define DPC_SET_XBUS_DMEM_DMA 0x0002 /* Bit 1: set xbus_dmem_dma */ -#define DPC_CLR_FREEZE 0x0004 /* Bit 2: clear freeze */ -#define DPC_SET_FREEZE 0x0008 /* Bit 3: set freeze */ -#define DPC_CLR_FLUSH 0x0010 /* Bit 4: clear flush */ -#define DPC_SET_FLUSH 0x0020 /* Bit 5: set flush */ -#define DPC_CLR_TMEM_CTR 0x0040 /* Bit 6: clear tmem ctr */ -#define DPC_CLR_PIPE_CTR 0x0080 /* Bit 7: clear pipe ctr */ -#define DPC_CLR_CMD_CTR 0x0100 /* Bit 8: clear cmd ctr */ -#define DPC_CLR_CLOCK_CTR 0x0200 /* Bit 9: clear clock ctr */ - -/* - * Patterns to interpret status reg (DPC_STATUS_REG - read) - */ -#define DPC_STATUS_XBUS_DMEM_DMA 0x001 /* Bit 0: xbus_dmem_dma */ -#define DPC_STATUS_FREEZE 0x002 /* Bit 1: freeze */ -#define DPC_STATUS_FLUSH 0x004 /* Bit 2: flush */ -/*#define DPC_STATUS_FROZEN 0x008*/ /* Bit 3: frozen */ -#define DPC_STATUS_START_GCLK 0x008 /* Bit 3: start gclk */ -#define DPC_STATUS_TMEM_BUSY 0x010 /* Bit 4: tmem busy */ -#define DPC_STATUS_PIPE_BUSY 0x020 /* Bit 5: pipe busy */ -#define DPC_STATUS_CMD_BUSY 0x040 /* Bit 6: cmd busy */ -#define DPC_STATUS_CBUF_READY 0x080 /* Bit 7: cbuf ready */ -#define DPC_STATUS_DMA_BUSY 0x100 /* Bit 8: dma busy */ -#define DPC_STATUS_END_VALID 0x200 /* Bit 9: end valid */ -#define DPC_STATUS_START_VALID 0x400 /* Bit 10: start valid */ - - -/************************************************************************* - * DP Span Registers - */ -#define DPS_BASE_REG 0x04200000 - -/* DP tmem bist (R/W): [10:0] BIST status bits; see below for detail */ -#define DPS_TBIST_REG (DPS_BASE_REG+0x00) - -/* DP span test mode (R/W): [0] Span buffer test access enable */ -#define DPS_TEST_MODE_REG (DPS_BASE_REG+0x04) - -/* DP span buffer test address (R/W): [6:0] bits; see below for detail */ -#define DPS_BUFTEST_ADDR_REG (DPS_BASE_REG+0x08) - -/* DP span buffer test data (R/W): [31:0] span buffer data */ -#define DPS_BUFTEST_DATA_REG (DPS_BASE_REG+0x0C) - -/* - * Patterns to interpret status reg (DPS_TMEM_BIST_REG - write) - */ -#define DPS_TBIST_CHECK 0x01 /* Bit 0: BIST check */ -#define DPS_TBIST_GO 0x02 /* Bit 1: BIST go */ -#define DPS_TBIST_CLEAR 0x04 /* Bit 2: BIST clear */ - -/* - * Patterns to interpret status reg (DPS_TMEM_BIST_REG - read) - */ -/* First 2 bits are same as in write mode: - * Bit 0: BIST check; Bit 1: BIST go - */ -#define DPS_TBIST_DONE 0x004 /* Bit 2: BIST done */ -#define DPS_TBIST_FAILED 0x7F8 /* Bit [10:3]: BIST fail */ - - -/************************************************************************* - * MIPS Interface (MI) Registers - */ -#define MI_BASE_REG 0x04300000 - -/* - * MI init mode (W): [6:0] init length, [7] clear init mode, [8] set init mode - * [9/10] clear/set ebus test mode, [11] clear DP interrupt - * (R): [6:0] init length, [7] init mode, [8] ebus test mode - */ -#define MI_INIT_MODE_REG (MI_BASE_REG+0x00) -#define MI_MODE_REG MI_INIT_MODE_REG - -/* - * Values to clear/set bit in mode reg (MI_MODE_REG - write) - */ -#define MI_CLR_INIT 0x0080 /* Bit 7: clear init mode */ -#define MI_SET_INIT 0x0100 /* Bit 8: set init mode */ -#define MI_CLR_EBUS 0x0200 /* Bit 9: clear ebus test */ -#define MI_SET_EBUS 0x0400 /* Bit 10: set ebus test mode */ -#define MI_CLR_DP_INTR 0x0800 /* Bit 11: clear dp interrupt */ -#define MI_CLR_RDRAM 0x1000 /* Bit 12: clear RDRAM reg */ -#define MI_SET_RDRAM 0x2000 /* Bit 13: set RDRAM reg mode */ - -/* - * Patterns to interpret mode reg (MI_MODE_REG - read) - */ -#define MI_MODE_INIT 0x0080 /* Bit 7: init mode */ -#define MI_MODE_EBUS 0x0100 /* Bit 8: ebus test mode */ -#define MI_MODE_RDRAM 0x0200 /* Bit 9: RDRAM reg mode */ - -/* MI version (R): [7:0] io, [15:8] rac, [23:16] rdp, [31:24] rsp */ -#define MI_VERSION_REG (MI_BASE_REG+0x04) -#define MI_NOOP_REG MI_VERSION_REG - -/* MI interrupt (R): [5:0] valid bits - see below for bit patterns */ -#define MI_INTR_REG (MI_BASE_REG+0x08) - -/* - * MI interrupt mask (W): [11:0] valid bits - see below for bit patterns - * (R): [5:0] valid bits - see below for bit patterns - */ -#define MI_INTR_MASK_REG (MI_BASE_REG+0x0C) - -/* - * The following are values to check for interrupt setting (MI_INTR_REG) - */ -#define MI_INTR_SP 0x01 /* Bit 0: SP intr */ -#define MI_INTR_SI 0x02 /* Bit 1: SI intr */ -#define MI_INTR_AI 0x04 /* Bit 2: AI intr */ -#define MI_INTR_VI 0x08 /* Bit 3: VI intr */ -#define MI_INTR_PI 0x10 /* Bit 4: PI intr */ -#define MI_INTR_DP 0x20 /* Bit 5: DP intr */ - -/* - * The following are values to clear/set various interrupt bit mask - * They can be ORed together to manipulate multiple bits - * (MI_INTR_MASK_REG - write) - */ -#define MI_INTR_MASK_CLR_SP 0x0001 /* Bit 0: clear SP mask */ -#define MI_INTR_MASK_SET_SP 0x0002 /* Bit 1: set SP mask */ -#define MI_INTR_MASK_CLR_SI 0x0004 /* Bit 2: clear SI mask */ -#define MI_INTR_MASK_SET_SI 0x0008 /* Bit 3: set SI mask */ -#define MI_INTR_MASK_CLR_AI 0x0010 /* Bit 4: clear AI mask */ -#define MI_INTR_MASK_SET_AI 0x0020 /* Bit 5: set AI mask */ -#define MI_INTR_MASK_CLR_VI 0x0040 /* Bit 6: clear VI mask */ -#define MI_INTR_MASK_SET_VI 0x0080 /* Bit 7: set VI mask */ -#define MI_INTR_MASK_CLR_PI 0x0100 /* Bit 8: clear PI mask */ -#define MI_INTR_MASK_SET_PI 0x0200 /* Bit 9: set PI mask */ -#define MI_INTR_MASK_CLR_DP 0x0400 /* Bit 10: clear DP mask */ -#define MI_INTR_MASK_SET_DP 0x0800 /* Bit 11: set DP mask */ - -/* - * The following are values to check for interrupt mask setting - * (MI_INTR_MASK_REG - read) - */ -#define MI_INTR_MASK_SP 0x01 /* Bit 0: SP intr mask */ -#define MI_INTR_MASK_SI 0x02 /* Bit 1: SI intr mask */ -#define MI_INTR_MASK_AI 0x04 /* Bit 2: AI intr mask */ -#define MI_INTR_MASK_VI 0x08 /* Bit 3: VI intr mask */ -#define MI_INTR_MASK_PI 0x10 /* Bit 4: PI intr mask */ -#define MI_INTR_MASK_DP 0x20 /* Bit 5: DP intr mask */ - - -/************************************************************************* - * Video Interface (VI) Registers - */ -#define VI_BASE_REG 0x04400000 - -/* VI status/control (R/W): [15-0] valid bits: - * [1:0] = type[1:0] (pixel size) - * 0: blank (no data, no sync) - * 1: reserved - * 2: 5/5/5/3 ("16" bit) - * 3: 8/8/8/8 (32 bit) - * [2] = gamma_dither_enable (normally on, unless "special effect") - * [3] = gamma_enable (normally on, unless MPEG/JPEG) - * [4] = divot_enable (normally on if antialiased, unless decal lines) - * [5] = reserved - always off - * [6] = serrate (always on if interlaced, off if not) - * [7] = reserved - diagnostics only - * [9:8] = anti-alias (aa) mode[1:0] - * 0: aa & resamp (always fetch extra lines) - * 1: aa & resamp (fetch extra lines if needed) - * 2: resamp only (treat as all fully covered) - * 3: neither (replicate pixels, no interpolate) - * [11] = reserved - diagnostics only - * [15:12] = reserved - * - */ -#define VI_STATUS_REG (VI_BASE_REG+0x00) -#define VI_CONTROL_REG VI_STATUS_REG - -/* VI origin (R/W): [23:0] frame buffer origin in bytes */ -#define VI_ORIGIN_REG (VI_BASE_REG+0x04) -#define VI_DRAM_ADDR_REG VI_ORIGIN_REG - -/* VI width (R/W): [11:0] frame buffer line width in pixels */ -#define VI_WIDTH_REG (VI_BASE_REG+0x08) -#define VI_H_WIDTH_REG VI_WIDTH_REG - -/* VI vertical intr (R/W): [9:0] interrupt when current half-line = V_INTR */ -#define VI_INTR_REG (VI_BASE_REG+0x0C) -#define VI_V_INTR_REG VI_INTR_REG - -/* - * VI current vertical line (R/W): [9:0] current half line, sampled once per - * line (the lsb of V_CURRENT is constant within a field, and in - * interlaced modes gives the field number - which is constant for non- - * interlaced modes) - * - Any write to this register will clear interrupt line - */ -#define VI_CURRENT_REG (VI_BASE_REG+0x10) -#define VI_V_CURRENT_LINE_REG VI_CURRENT_REG - -/* - * VI video timing (R/W): [ 7: 0] horizontal sync width in pixels, - * [15: 8] color burst width in pixels, - * [19:16] vertical sync width in half lines, - * [29:20] start of color burst in pixels from h-sync - */ -#define VI_BURST_REG (VI_BASE_REG+0x14) -#define VI_TIMING_REG VI_BURST_REG - -/* VI vertical sync (R/W): [9:0] number of half-lines per field */ -#define VI_V_SYNC_REG (VI_BASE_REG+0x18) - -/* VI horizontal sync (R/W): [11: 0] total duration of a line in 1/4 pixel - * [20:16] a 5-bit leap pattern used for PAL only - * (h_sync_period) - */ -#define VI_H_SYNC_REG (VI_BASE_REG+0x1C) - -/* - * VI horizontal sync leap (R/W): [11: 0] identical to h_sync_period - * [27:16] identical to h_sync_period - */ -#define VI_LEAP_REG (VI_BASE_REG+0x20) -#define VI_H_SYNC_LEAP_REG VI_LEAP_REG - -/* - * VI horizontal video (R/W): [ 9: 0] end of active video in screen pixels - * : [25:16] start of active video in screen pixels - */ -#define VI_H_START_REG (VI_BASE_REG+0x24) -#define VI_H_VIDEO_REG VI_H_START_REG - -/* - * VI vertical video (R/W): [ 9: 0] end of active video in screen half-lines - * : [25:16] start of active video in screen half-lines - */ -#define VI_V_START_REG (VI_BASE_REG+0x28) -#define VI_V_VIDEO_REG VI_V_START_REG - -/* - * VI vertical burst (R/W): [ 9: 0] end of color burst enable in half-lines - * : [25:16] start of color burst enable in half-lines - */ -#define VI_V_BURST_REG (VI_BASE_REG+0x2C) - -/* VI x-scale (R/W): [11: 0] 1/horizontal scale up factor (2.10 format) - * [27:16] horizontal subpixel offset (2.10 format) - */ -#define VI_X_SCALE_REG (VI_BASE_REG+0x30) - -/* VI y-scale (R/W): [11: 0] 1/vertical scale up factor (2.10 format) - * [27:16] vertical subpixel offset (2.10 format) - */ -#define VI_Y_SCALE_REG (VI_BASE_REG+0x34) - -/* - * Patterns to interpret VI_CONTROL_REG - */ -#define VI_CTRL_TYPE_16 0x00002 /* Bit [1:0] pixel size: 16 bit */ -#define VI_CTRL_TYPE_32 0x00003 /* Bit [1:0] pixel size: 32 bit */ -#define VI_CTRL_GAMMA_DITHER_ON 0x00004 /* Bit 2: default = on */ -#define VI_CTRL_GAMMA_ON 0x00008 /* Bit 3: default = on */ -#define VI_CTRL_DIVOT_ON 0x00010 /* Bit 4: default = on */ -#define VI_CTRL_SERRATE_ON 0x00040 /* Bit 6: on if interlaced */ -#define VI_CTRL_ANTIALIAS_MASK 0x00300 /* Bit [9:8] anti-alias mode */ -#define VI_CTRL_DITHER_FILTER_ON 0x10000 /* Bit 16: dither-filter mode */ - -/* - * Possible video clocks (NTSC or PAL) - */ -#define VI_NTSC_CLOCK 48681812 /* Hz = 48.681812 MHz */ -#define VI_PAL_CLOCK 49656530 /* Hz = 49.656530 MHz */ -#define VI_MPAL_CLOCK 48628316 /* Hz = 48.628316 MHz */ - - -/************************************************************************* - * Audio Interface (AI) Registers - * - * The address and length registers are double buffered; that is, they - * can be written twice before becoming full. - * The address must be written before the length. - */ -#define AI_BASE_REG 0x04500000 - -/* AI DRAM address (W): [23:0] starting RDRAM address (8B-aligned) */ -#define AI_DRAM_ADDR_REG (AI_BASE_REG+0x00) /* R0: DRAM address */ - -/* AI length (R/W): [14:0] transfer length (v1.0) - Bottom 3 bits are ignored */ -/* [17:0] transfer length (v2.0) - Bottom 3 bits are ignored */ -#define AI_LEN_REG (AI_BASE_REG+0x04) /* R1: Length */ - -/* AI control (W): [0] DMA enable - if LSB == 1, DMA is enabled */ -#define AI_CONTROL_REG (AI_BASE_REG+0x08) /* R2: DMA Control */ - -/* - * AI status (R): [31]/[0] ai_full (addr & len buffer full), [30] ai_busy - * Note that a 1->0 transition in ai_full will set interrupt - * (W): clear audio interrupt - */ -#define AI_STATUS_REG (AI_BASE_REG+0x0C) /* R3: Status */ - -/* - * AI DAC sample period register (W): [13:0] dac rate - * - vid_clock/(dperiod + 1) is the DAC sample rate - * - (dperiod + 1) >= 66 * (aclockhp + 1) must be true - */ -#define AI_DACRATE_REG (AI_BASE_REG+0x10) /* R4: DAC rate 14-lsb*/ - -/* - * AI bit rate (W): [3:0] bit rate (abus clock half period register - aclockhp) - * - vid_clock/(2 * (aclockhp + 1)) is the DAC clock rate - * - The abus clock stops if aclockhp is zero - */ -#define AI_BITRATE_REG (AI_BASE_REG+0x14) /* R5: Bit rate 4-lsb */ - -/* Value for control register */ -#define AI_CONTROL_DMA_ON 0x01 /* LSB = 1: DMA enable*/ -#define AI_CONTROL_DMA_OFF 0x00 /* LSB = 1: DMA enable*/ - -/* Value for status register */ -#define AI_STATUS_FIFO_FULL 0x80000000 /* Bit 31: full */ -#define AI_STATUS_DMA_BUSY 0x40000000 /* Bit 30: busy */ - -/* DAC rate = video clock / audio frequency - * - DAC rate >= (66 * Bit rate) must be true - */ -#define AI_MAX_DAC_RATE 16384 /* 14-bit+1 */ -#define AI_MIN_DAC_RATE 132 - -/* Bit rate <= (DAC rate / 66) */ -#define AI_MAX_BIT_RATE 16 /* 4-bit+1 */ -#define AI_MIN_BIT_RATE 2 - -/* - * Maximum and minimum values for audio frequency based on video clocks - * max frequency = (video clock / min dac rate) - * min frequency = (video clock / max dac rate) - */ -#define AI_NTSC_MAX_FREQ 368000 /* 368 KHz */ -#define AI_NTSC_MIN_FREQ 3000 /* 3 KHz ~ 2971 Hz */ - -#define AI_PAL_MAX_FREQ 376000 /* 376 KHz */ -#define AI_PAL_MIN_FREQ 3050 /* 3 KHz ~ 3031 Hz */ - -#define AI_MPAL_MAX_FREQ 368000 /* 368 KHz */ -#define AI_MPAL_MIN_FREQ 3000 /* 3 KHz ~ 2968 Hz */ - - -/************************************************************************* - * Peripheral Interface (PI) Registers - */ -#define PI_BASE_REG 0x04600000 - -/* PI DRAM address (R/W): [23:0] starting RDRAM address */ -#define PI_DRAM_ADDR_REG (PI_BASE_REG+0x00) /* DRAM address */ - -/* PI pbus (cartridge) address (R/W): [31:0] starting AD16 address */ -#define PI_CART_ADDR_REG (PI_BASE_REG+0x04) - -/* PI read length (R/W): [23:0] read data length */ -#define PI_RD_LEN_REG (PI_BASE_REG+0x08) - -/* PI write length (R/W): [23:0] write data length */ -#define PI_WR_LEN_REG (PI_BASE_REG+0x0C) - -/* - * PI status (R): [0] DMA busy, [1] IO busy, [2], error - * (W): [0] reset controller (and abort current op), [1] clear intr - */ -#define PI_STATUS_REG (PI_BASE_REG+0x10) - -/* PI dom1 latency (R/W): [7:0] domain 1 device latency */ -#define PI_BSD_DOM1_LAT_REG (PI_BASE_REG+0x14) - -/* PI dom1 pulse width (R/W): [7:0] domain 1 device R/W strobe pulse width */ -#define PI_BSD_DOM1_PWD_REG (PI_BASE_REG+0x18) - -/* PI dom1 page size (R/W): [3:0] domain 1 device page size */ -#define PI_BSD_DOM1_PGS_REG (PI_BASE_REG+0x1C) /* page size */ - -/* PI dom1 release (R/W): [1:0] domain 1 device R/W release duration */ -#define PI_BSD_DOM1_RLS_REG (PI_BASE_REG+0x20) - -/* PI dom2 latency (R/W): [7:0] domain 2 device latency */ -#define PI_BSD_DOM2_LAT_REG (PI_BASE_REG+0x24) /* Domain 2 latency */ - -/* PI dom2 pulse width (R/W): [7:0] domain 2 device R/W strobe pulse width */ -#define PI_BSD_DOM2_PWD_REG (PI_BASE_REG+0x28) /* pulse width */ - -/* PI dom2 page size (R/W): [3:0] domain 2 device page size */ -#define PI_BSD_DOM2_PGS_REG (PI_BASE_REG+0x2C) /* page size */ - -/* PI dom2 release (R/W): [1:0] domain 2 device R/W release duration */ -#define PI_BSD_DOM2_RLS_REG (PI_BASE_REG+0x30) /* release duration */ - -#define PI_DOMAIN1_REG PI_BSD_DOM1_LAT_REG -#define PI_DOMAIN2_REG PI_BSD_DOM2_LAT_REG - -#define PI_DOM_LAT_OFS 0x00 -#define PI_DOM_PWD_OFS 0x04 -#define PI_DOM_PGS_OFS 0x08 -#define PI_DOM_RLS_OFS 0x0C - -/* - * PI status register has 3 bits active when read from (PI_STATUS_REG - read) - * Bit 0: DMA busy - set when DMA is in progress - * Bit 1: IO busy - set when IO is in progress - * Bit 2: Error - set when CPU issues IO request while DMA is busy - */ -#define PI_STATUS_ERROR 0x04 -#define PI_STATUS_IO_BUSY 0x02 -#define PI_STATUS_DMA_BUSY 0x01 - -/* PI status register has 2 bits active when written to: - * Bit 0: When set, reset PIC - * Bit 1: When set, clear interrupt flag - * The values of the two bits can be ORed together to both reset PIC and - * clear interrupt at the same time. - * - * Note: - * - The PIC does generate an interrupt at the end of each DMA. CPU - * needs to clear the interrupt flag explicitly (from an interrupt - * handler) by writing into the STATUS register with bit 1 set. - * - * - When a DMA completes, the interrupt flag is set. CPU can issue - * another request even while the interrupt flag is set (as long as - * PIC is idle). However, it is the CPU's responsibility for - * maintaining accurate correspondence between DMA completions and - * interrupts. - * - * - When PIC is reset, if PIC happens to be busy, an interrupt will - * be generated as PIC returns to idle. Otherwise, no interrupt will - * be generated and PIC remains idle. - */ -/* - * Values to clear interrupt/reset PIC (PI_STATUS_REG - write) - */ -#define PI_STATUS_RESET 0x01 -#define PI_SET_RESET PI_STATUS_RESET - -#define PI_STATUS_CLR_INTR 0x02 -#define PI_CLR_INTR PI_STATUS_CLR_INTR - -#define PI_DMA_BUFFER_SIZE 128 - -#define PI_DOM1_ADDR1 0x06000000 /* to 0x07FFFFFF */ -#define PI_DOM1_ADDR2 0x10000000 /* to 0x1FBFFFFF */ -#define PI_DOM1_ADDR3 0x1FD00000 /* to 0x7FFFFFFF */ -#define PI_DOM2_ADDR1 0x05000000 /* to 0x05FFFFFF */ -#define PI_DOM2_ADDR2 0x08000000 /* to 0x0FFFFFFF */ - - -/************************************************************************* - * RDRAM Interface (RI) Registers - */ -#define RI_BASE_REG 0x04700000 - -/* RI mode (R/W): [1:0] operating mode, [2] stop T active, [3] stop R active */ -#define RI_MODE_REG (RI_BASE_REG+0x00) - -/* RI config (R/W): [5:0] current control input, [6] current control enable */ -#define RI_CONFIG_REG (RI_BASE_REG+0x04) - -/* RI current load (W): [] any write updates current control register */ -#define RI_CURRENT_LOAD_REG (RI_BASE_REG+0x08) - -/* RI select (R/W): [2:0] receive select, [2:0] transmit select */ -#define RI_SELECT_REG (RI_BASE_REG+0x0C) - -/* RI refresh (R/W): [7:0] clean refresh delay, [15:8] dirty refresh delay, - * [16] refresh bank, [17] refresh enable - * [18] refresh optimize - */ -#define RI_REFRESH_REG (RI_BASE_REG+0x10) -#define RI_COUNT_REG RI_REFRESH_REG - -/* RI latency (R/W): [3:0] DMA latency/overlap */ -#define RI_LATENCY_REG (RI_BASE_REG+0x14) - -/* RI error (R): [0] nack error, [1] ack error */ -#define RI_RERROR_REG (RI_BASE_REG+0x18) - -/* RI error (W): [] any write clears all error bits */ -#define RI_WERROR_REG (RI_BASE_REG+0x1C) - - -/************************************************************************* - * Serial Interface (SI) Registers - */ -#define SI_BASE_REG 0x04800000 - -/* SI DRAM address (R/W): [23:0] starting RDRAM address */ -#define SI_DRAM_ADDR_REG (SI_BASE_REG+0x00) /* R0: DRAM address */ - -/* SI address read 64B (W): [] any write causes a 64B DMA write */ -#define SI_PIF_ADDR_RD64B_REG (SI_BASE_REG+0x04) /* R1: 64B PIF->DRAM */ - -/* Address SI_BASE_REG + (0x08, 0x0c, 0x14) are reserved */ - -/* SI address write 64B (W): [] any write causes a 64B DMA read */ -#define SI_PIF_ADDR_WR64B_REG (SI_BASE_REG+0x10) /* R4: 64B DRAM->PIF */ - -/* - * SI status (W): [] any write clears interrupt - * (R): [0] DMA busy, [1] IO read busy, [2] reserved - * [3] DMA error, [12] interrupt - */ -#define SI_STATUS_REG (SI_BASE_REG+0x18) /* R6: Status */ - -/* SI status register has the following bits active: - * 0: DMA busy - set when DMA is in progress - * 1: IO busy - set when IO access is in progress - * 3: DMA error - set when there are overlapping DMA requests - * 12: Interrupt - Interrupt set - */ -#define SI_STATUS_DMA_BUSY 0x0001 -#define SI_STATUS_RD_BUSY 0x0002 -#define SI_STATUS_DMA_ERROR 0x0008 -#define SI_STATUS_INTERRUPT 0x1000 - -/************************************************************************* - * Development Board GIO Control Registers - */ - -#define GIO_BASE_REG 0x18000000 - -/* Game to Host Interrupt */ -#define GIO_GIO_INTR_REG (GIO_BASE_REG+0x000) - -/* Game to Host SYNC */ -#define GIO_GIO_SYNC_REG (GIO_BASE_REG+0x400) - -/* Host to Game Interrupt */ -#define GIO_CART_INTR_REG (GIO_BASE_REG+0x800) - - -/************************************************************************* - * Common macros - */ -#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) -#define IO_READ(addr) (*(vu32 *)PHYS_TO_K1(addr)) -#define IO_WRITE(addr,data) (*(vu32 *)PHYS_TO_K1(addr)=(u32)(data)) -#define RCP_STAT_PRINT \ - rmonPrintf("current=%x start=%x end=%x dpstat=%x spstat=%x\n", \ - IO_READ(DPC_CURRENT_REG), \ - IO_READ(DPC_START_REG), \ - IO_READ(DPC_END_REG), \ - IO_READ(DPC_STATUS_REG), \ - IO_READ(SP_STATUS_REG)) - -#endif - -#endif /* _RCP_H_ */ - +#ifndef _RCP_H_ +#define _RCP_H_ + +/************************************************************************** + * * + * Copyright (C) 1995, Silicon Graphics, Inc. * + * * + * These coded instructions, statements, and computer programs contain * + * unpublished proprietary information of Silicon Graphics, Inc., and * + * are protected by Federal copyright law. They may not be disclosed * + * to third parties or copied or duplicated in any form, in whole or * + * in part, without the prior written consent of Silicon Graphics, Inc. * + * * + **************************************************************************/ + +/************************************************************************** + * + * File: rcp.h + * + * This file contains register and bit definitions for RCP memory map. + * $Revision: 1.22 $ + * $Date: 1999/05/20 03:01:49 $ + * $Source: /hosts/gate3/exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/rcp.h,v $ + * + **************************************************************************/ + +#include +#include + +/********************************************************************** + * + * Here is a quick overview of the RCP memory map: + * + +0x0000_0000 .. 0x03ef_ffff RDRAM memory +0x03f0_0000 .. 0x03ff_ffff RDRAM registers + + RCP registers (see below) +0x0400_0000 .. 0x040f_ffff SP registers +0x0410_0000 .. 0x041f_ffff DP command registers +0x0420_0000 .. 0x042f_ffff DP span registers +0x0430_0000 .. 0x043f_ffff MI registers +0x0440_0000 .. 0x044f_ffff VI registers +0x0450_0000 .. 0x045f_ffff AI registers +0x0460_0000 .. 0x046f_ffff PI registers +0x0470_0000 .. 0x047f_ffff RI registers +0x0480_0000 .. 0x048f_ffff SI registers +0x0490_0000 .. 0x04ff_ffff unused + +0x0500_0000 .. 0x05ff_ffff cartridge domain 2 +0x0600_0000 .. 0x07ff_ffff cartridge domain 1 +0x0800_0000 .. 0x0fff_ffff cartridge domain 2 +0x1000_0000 .. 0x1fbf_ffff cartridge domain 1 + +0x1fc0_0000 .. 0x1fc0_07bf PIF Boot Rom (1984 bytes) +0x1fc0_07c0 .. 0x1fc0_07ff PIF (JoyChannel) RAM (64 bytes) +0x1fc0_0800 .. 0x1fcf_ffff Reserved +0x1fd0_0000 .. 0x7fff_ffff cartridge domain 1 +0x8000_0000 .. 0xffff_ffff external SysAD device + +The Indy development board use cartridge domain 1: +0x1000_0000 .. 0x10ff_ffff RAMROM +0x1800_0000 .. 0x1800_0003 GIO interrupt (6 bits valid in 4 bytes) +0x1800_0400 .. 0x1800_0403 GIO sync (6 bits valid in 4 bytes) +0x1800_0800 .. 0x1800_0803 CART interrupt (6 bits valid in 4 bytes) + + + +**************************************************************************/ + + +/************************************************************************* + * RDRAM Memory (Assumes that maximum size is 4 MB) + */ +#define RDRAM_0_START 0x00000000 +#define RDRAM_0_END 0x001FFFFF +#define RDRAM_1_START 0x00200000 +#define RDRAM_1_END 0x003FFFFF + +#define RDRAM_START RDRAM_0_START +#define RDRAM_END RDRAM_1_END + + +/************************************************************************* + * Address predicates + */ +#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) +#define IS_RDRAM(x) ((unsigned)(x) >= RDRAM_START && \ + (unsigned)(x) < RDRAM_END) +#endif + + +/************************************************************************* + * RDRAM Registers (0x03f0_0000 .. 0x03ff_ffff) + */ +#define RDRAM_BASE_REG 0x03F00000 + +#define RDRAM_CONFIG_REG (RDRAM_BASE_REG+0x00) +#define RDRAM_DEVICE_TYPE_REG (RDRAM_BASE_REG+0x00) +#define RDRAM_DEVICE_ID_REG (RDRAM_BASE_REG+0x04) +#define RDRAM_DELAY_REG (RDRAM_BASE_REG+0x08) +#define RDRAM_MODE_REG (RDRAM_BASE_REG+0x0c) +#define RDRAM_REF_INTERVAL_REG (RDRAM_BASE_REG+0x10) +#define RDRAM_REF_ROW_REG (RDRAM_BASE_REG+0x14) +#define RDRAM_RAS_INTERVAL_REG (RDRAM_BASE_REG+0x18) +#define RDRAM_MIN_INTERVAL_REG (RDRAM_BASE_REG+0x1c) +#define RDRAM_ADDR_SELECT_REG (RDRAM_BASE_REG+0x20) +#define RDRAM_DEVICE_MANUF_REG (RDRAM_BASE_REG+0x24) + +#define RDRAM_0_DEVICE_ID 0 +#define RDRAM_1_DEVICE_ID 1 + +#define RDRAM_RESET_MODE 0 +#define RDRAM_ACTIVE_MODE 1 +#define RDRAM_STANDBY_MODE 2 + +#define RDRAM_LENGTH (2*512*2048) +#define RDRAM_0_BASE_ADDRESS (RDRAM_0_DEVICE_ID*RDRAM_LENGTH) +#define RDRAM_1_BASE_ADDRESS (RDRAM_1_DEVICE_ID*RDRAM_LENGTH) + +#define RDRAM_0_CONFIG 0x00000 +#define RDRAM_1_CONFIG 0x00400 +#define RDRAM_GLOBAL_CONFIG 0x80000 + + +/************************************************************************* + * PIF Physical memory map (total size = 2 KB) + * + * Size Description Mode + * 1FC007FF +-------+-----------------+-----+ + * | 64 B | JoyChannel RAM | R/W | + * 1FC007C0 +-------+-----------------+-----+ + * |1984 B | Boot ROM | * | * = Reserved + * 1FC00000 +-------+-----------------+-----+ + * + */ +#define PIF_ROM_START 0x1FC00000 +#define PIF_ROM_END 0x1FC007BF +#define PIF_RAM_START 0x1FC007C0 +#define PIF_RAM_END 0x1FC007FF + + +/************************************************************************* + * Controller channel + * Each game controller channel has 4 error bits that are defined in bit 6-7 of + * the Rx and Tx data size area bytes. Programmers need to clear these bits + * when setting the Tx/Rx size area values for a channel + */ +#define CHNL_ERR_NORESP 0x80 /* Bit 7 (Rx): No response error */ +#define CHNL_ERR_OVERRUN 0x40 /* Bit 6 (Rx): Overrun error */ +#define CHNL_ERR_FRAME 0x80 /* Bit 7 (Tx): Frame error */ +#define CHNL_ERR_COLLISION 0x40 /* Bit 6 (Tx): Collision error */ + +#define CHNL_ERR_MASK 0xC0 /* Bit 6-7: channel errors */ + + +/************************************************************************* + * External device info + */ +#define DEVICE_TYPE_CART 0 /* ROM cartridge */ +#define DEVICE_TYPE_BULK 1 /* ROM bulk */ +#define DEVICE_TYPE_64DD 2 /* 64 Disk Drive */ +#define DEVICE_TYPE_SRAM 3 /* SRAM */ +/* 4-6 are reserved */ +#define DEVICE_TYPE_INIT 7 /* initial value */ +/* 8-14 are reserved */ + +/************************************************************************* + * SP Memory + */ +#define SP_DMEM_START 0x04000000 /* read/write */ +#define SP_DMEM_END 0x04000FFF +#define SP_IMEM_START 0x04001000 /* read/write */ +#define SP_IMEM_END 0x04001FFF + +/************************************************************************* + * SP CP0 Registers + */ + +#define SP_BASE_REG 0x04040000 + +/* SP memory address (R/W): [11:0] DMEM/IMEM address; [12] 0=DMEM,1=IMEM */ +#define SP_MEM_ADDR_REG (SP_BASE_REG+0x00) /* Master */ + +/* SP DRAM DMA address (R/W): [23:0] RDRAM address */ +#define SP_DRAM_ADDR_REG (SP_BASE_REG+0x04) /* Slave */ + +/* SP read DMA length (R/W): [11:0] length, [19:12] count, [31:20] skip */ +/* direction: I/DMEM <- RDRAM */ +#define SP_RD_LEN_REG (SP_BASE_REG+0x08) /* R/W: read len */ + +/* SP write DMA length (R/W): [11:0] length, [19:12] count, [31:20] skip */ +/* direction: I/DMEM -> RDRAM */ +#define SP_WR_LEN_REG (SP_BASE_REG+0x0C) /* R/W: write len */ + +/* SP status (R/W): [14:0] valid bits; see below for write/read mode */ +#define SP_STATUS_REG (SP_BASE_REG+0x10) + +/* SP DMA full (R): [0] valid bit; dma full */ +#define SP_DMA_FULL_REG (SP_BASE_REG+0x14) + +/* SP DMA busy (R): [0] valid bit; dma busy */ +#define SP_DMA_BUSY_REG (SP_BASE_REG+0x18) + +/* SP semaphore (R/W): Read: [0] semaphore flag (set on read) */ +/* Write: [] clear semaphore flag */ +#define SP_SEMAPHORE_REG (SP_BASE_REG+0x1C) + +/* SP PC (R/W): [11:0] program counter */ +#define SP_PC_REG 0x04080000 + +/* SP MEM address: bit 12 specifies if address is IMEM or DMEM */ +#define SP_DMA_DMEM 0x0000 /* Bit 12: 0=DMEM, 1=IMEM */ +#define SP_DMA_IMEM 0x1000 /* Bit 12: 0=DMEM, 1=IMEM */ + +/* + * Values to clear/set bit in status reg (SP_STATUS_REG - write) + */ +#define SP_CLR_HALT 0x00001 /* Bit 0: clear halt */ +#define SP_SET_HALT 0x00002 /* Bit 1: set halt */ +#define SP_CLR_BROKE 0x00004 /* Bit 2: clear broke */ +#define SP_CLR_INTR 0x00008 /* Bit 3: clear intr */ +#define SP_SET_INTR 0x00010 /* Bit 4: set intr */ +#define SP_CLR_SSTEP 0x00020 /* Bit 5: clear sstep */ +#define SP_SET_SSTEP 0x00040 /* Bit 6: set sstep */ +#define SP_CLR_INTR_BREAK 0x00080 /* Bit 7: clear intr on break */ +#define SP_SET_INTR_BREAK 0x00100 /* Bit 8: set intr on break */ +#define SP_CLR_SIG0 0x00200 /* Bit 9: clear signal 0 */ +#define SP_SET_SIG0 0x00400 /* Bit 10: set signal 0 */ +#define SP_CLR_SIG1 0x00800 /* Bit 11: clear signal 1 */ +#define SP_SET_SIG1 0x01000 /* Bit 12: set signal 1 */ +#define SP_CLR_SIG2 0x02000 /* Bit 13: clear signal 2 */ +#define SP_SET_SIG2 0x04000 /* Bit 14: set signal 2 */ +#define SP_CLR_SIG3 0x08000 /* Bit 15: clear signal 3 */ +#define SP_SET_SIG3 0x10000 /* Bit 16: set signal 3 */ +#define SP_CLR_SIG4 0x20000 /* Bit 17: clear signal 4 */ +#define SP_SET_SIG4 0x40000 /* Bit 18: set signal 4 */ +#define SP_CLR_SIG5 0x80000 /* Bit 19: clear signal 5 */ +#define SP_SET_SIG5 0x100000 /* Bit 20: set signal 5 */ +#define SP_CLR_SIG6 0x200000 /* Bit 21: clear signal 6 */ +#define SP_SET_SIG6 0x400000 /* Bit 22: set signal 6 */ +#define SP_CLR_SIG7 0x800000 /* Bit 23: clear signal 7 */ +#define SP_SET_SIG7 0x1000000 /* Bit 24: set signal 7 */ + +/* + * Patterns to interpret status reg (SP_STATUS_REG - read) + */ +#define SP_STATUS_HALT 0x001 /* Bit 0: halt */ +#define SP_STATUS_BROKE 0x002 /* Bit 1: broke */ +#define SP_STATUS_DMA_BUSY 0x004 /* Bit 2: dma busy */ +#define SP_STATUS_DMA_FULL 0x008 /* Bit 3: dma full */ +#define SP_STATUS_IO_FULL 0x010 /* Bit 4: io full */ +#define SP_STATUS_SSTEP 0x020 /* Bit 5: single step */ +#define SP_STATUS_INTR_BREAK 0x040 /* Bit 6: interrupt on break */ +#define SP_STATUS_SIG0 0x080 /* Bit 7: signal 0 set */ +#define SP_STATUS_SIG1 0x100 /* Bit 8: signal 1 set */ +#define SP_STATUS_SIG2 0x200 /* Bit 9: signal 2 set */ +#define SP_STATUS_SIG3 0x400 /* Bit 10: signal 3 set */ +#define SP_STATUS_SIG4 0x800 /* Bit 11: signal 4 set */ +#define SP_STATUS_SIG5 0x1000 /* Bit 12: signal 5 set */ +#define SP_STATUS_SIG6 0x2000 /* Bit 13: signal 6 set */ +#define SP_STATUS_SIG7 0x4000 /* Bit 14: signal 7 set */ + +/* + * Use of SIG bits + */ +#define SP_CLR_YIELD SP_CLR_SIG0 +#define SP_SET_YIELD SP_SET_SIG0 +#define SP_STATUS_YIELD SP_STATUS_SIG0 +#define SP_CLR_YIELDED SP_CLR_SIG1 +#define SP_SET_YIELDED SP_SET_SIG1 +#define SP_STATUS_YIELDED SP_STATUS_SIG1 +#define SP_CLR_TASKDONE SP_CLR_SIG2 +#define SP_SET_TASKDONE SP_SET_SIG2 +#define SP_STATUS_TASKDONE SP_STATUS_SIG2 +#define SP_CLR_RSPSIGNAL SP_CLR_SIG3 +#define SP_SET_RSPSIGNAL SP_SET_SIG3 +#define SP_STATUS_RSPSIGNAL SP_STATUS_SIG3 +#define SP_CLR_CPUSIGNAL SP_CLR_SIG4 +#define SP_SET_CPUSIGNAL SP_SET_SIG4 +#define SP_STATUS_CPUSIGNAL SP_STATUS_SIG4 + +/* SP IMEM BIST REG (R/W): [6:0] BIST status bits; see below for detail */ +#define SP_IBIST_REG 0x04080004 + +/* + * Patterns to interpret status reg (SP_BIST_REG - write) + */ +#define SP_IBIST_CHECK 0x01 /* Bit 0: BIST check */ +#define SP_IBIST_GO 0x02 /* Bit 1: BIST go */ +#define SP_IBIST_CLEAR 0x04 /* Bit 2: BIST clear */ + +/* + * Patterns to interpret status reg (SP_BIST_REG - read) + */ +/* First 2 bits are same as in write mode: + * Bit 0: BIST check; Bit 1: BIST go + */ +#define SP_IBIST_DONE 0x04 /* Bit 2: BIST done */ +#define SP_IBIST_FAILED 0x78 /* Bit [6:3]: BIST fail */ + + +/************************************************************************* + * DP Command Registers + */ +#define DPC_BASE_REG 0x04100000 + +/* DP CMD DMA start (R/W): [23:0] DMEM/RDRAM start address */ +#define DPC_START_REG (DPC_BASE_REG+0x00) + +/* DP CMD DMA end (R/W): [23:0] DMEM/RDRAM end address */ +#define DPC_END_REG (DPC_BASE_REG+0x04) + +/* DP CMD DMA end (R): [23:0] DMEM/RDRAM current address */ +#define DPC_CURRENT_REG (DPC_BASE_REG+0x08) + +/* DP CMD status (R/W): [9:0] valid bits - see below for definitions */ +#define DPC_STATUS_REG (DPC_BASE_REG+0x0C) + +/* DP clock counter (R): [23:0] clock counter */ +#define DPC_CLOCK_REG (DPC_BASE_REG+0x10) + +/* DP buffer busy counter (R): [23:0] clock counter */ +#define DPC_BUFBUSY_REG (DPC_BASE_REG+0x14) + +/* DP pipe busy counter (R): [23:0] clock counter */ +#define DPC_PIPEBUSY_REG (DPC_BASE_REG+0x18) + +/* DP TMEM load counter (R): [23:0] clock counter */ +#define DPC_TMEM_REG (DPC_BASE_REG+0x1C) + +/* + * Values to clear/set bit in status reg (DPC_STATUS_REG - write) + */ +#define DPC_CLR_XBUS_DMEM_DMA 0x0001 /* Bit 0: clear xbus_dmem_dma */ +#define DPC_SET_XBUS_DMEM_DMA 0x0002 /* Bit 1: set xbus_dmem_dma */ +#define DPC_CLR_FREEZE 0x0004 /* Bit 2: clear freeze */ +#define DPC_SET_FREEZE 0x0008 /* Bit 3: set freeze */ +#define DPC_CLR_FLUSH 0x0010 /* Bit 4: clear flush */ +#define DPC_SET_FLUSH 0x0020 /* Bit 5: set flush */ +#define DPC_CLR_TMEM_CTR 0x0040 /* Bit 6: clear tmem ctr */ +#define DPC_CLR_PIPE_CTR 0x0080 /* Bit 7: clear pipe ctr */ +#define DPC_CLR_CMD_CTR 0x0100 /* Bit 8: clear cmd ctr */ +#define DPC_CLR_CLOCK_CTR 0x0200 /* Bit 9: clear clock ctr */ + +/* + * Patterns to interpret status reg (DPC_STATUS_REG - read) + */ +#define DPC_STATUS_XBUS_DMEM_DMA 0x001 /* Bit 0: xbus_dmem_dma */ +#define DPC_STATUS_FREEZE 0x002 /* Bit 1: freeze */ +#define DPC_STATUS_FLUSH 0x004 /* Bit 2: flush */ +/*#define DPC_STATUS_FROZEN 0x008*/ /* Bit 3: frozen */ +#define DPC_STATUS_START_GCLK 0x008 /* Bit 3: start gclk */ +#define DPC_STATUS_TMEM_BUSY 0x010 /* Bit 4: tmem busy */ +#define DPC_STATUS_PIPE_BUSY 0x020 /* Bit 5: pipe busy */ +#define DPC_STATUS_CMD_BUSY 0x040 /* Bit 6: cmd busy */ +#define DPC_STATUS_CBUF_READY 0x080 /* Bit 7: cbuf ready */ +#define DPC_STATUS_DMA_BUSY 0x100 /* Bit 8: dma busy */ +#define DPC_STATUS_END_VALID 0x200 /* Bit 9: end valid */ +#define DPC_STATUS_START_VALID 0x400 /* Bit 10: start valid */ + + +/************************************************************************* + * DP Span Registers + */ +#define DPS_BASE_REG 0x04200000 + +/* DP tmem bist (R/W): [10:0] BIST status bits; see below for detail */ +#define DPS_TBIST_REG (DPS_BASE_REG+0x00) + +/* DP span test mode (R/W): [0] Span buffer test access enable */ +#define DPS_TEST_MODE_REG (DPS_BASE_REG+0x04) + +/* DP span buffer test address (R/W): [6:0] bits; see below for detail */ +#define DPS_BUFTEST_ADDR_REG (DPS_BASE_REG+0x08) + +/* DP span buffer test data (R/W): [31:0] span buffer data */ +#define DPS_BUFTEST_DATA_REG (DPS_BASE_REG+0x0C) + +/* + * Patterns to interpret status reg (DPS_TMEM_BIST_REG - write) + */ +#define DPS_TBIST_CHECK 0x01 /* Bit 0: BIST check */ +#define DPS_TBIST_GO 0x02 /* Bit 1: BIST go */ +#define DPS_TBIST_CLEAR 0x04 /* Bit 2: BIST clear */ + +/* + * Patterns to interpret status reg (DPS_TMEM_BIST_REG - read) + */ +/* First 2 bits are same as in write mode: + * Bit 0: BIST check; Bit 1: BIST go + */ +#define DPS_TBIST_DONE 0x004 /* Bit 2: BIST done */ +#define DPS_TBIST_FAILED 0x7F8 /* Bit [10:3]: BIST fail */ + + +/************************************************************************* + * MIPS Interface (MI) Registers + */ +#define MI_BASE_REG 0x04300000 + +/* + * MI init mode (W): [6:0] init length, [7] clear init mode, [8] set init mode + * [9/10] clear/set ebus test mode, [11] clear DP interrupt + * (R): [6:0] init length, [7] init mode, [8] ebus test mode + */ +#define MI_INIT_MODE_REG (MI_BASE_REG+0x00) +#define MI_MODE_REG MI_INIT_MODE_REG + +/* + * Values to clear/set bit in mode reg (MI_MODE_REG - write) + */ +#define MI_CLR_INIT 0x0080 /* Bit 7: clear init mode */ +#define MI_SET_INIT 0x0100 /* Bit 8: set init mode */ +#define MI_CLR_EBUS 0x0200 /* Bit 9: clear ebus test */ +#define MI_SET_EBUS 0x0400 /* Bit 10: set ebus test mode */ +#define MI_CLR_DP_INTR 0x0800 /* Bit 11: clear dp interrupt */ +#define MI_CLR_RDRAM 0x1000 /* Bit 12: clear RDRAM reg */ +#define MI_SET_RDRAM 0x2000 /* Bit 13: set RDRAM reg mode */ + +/* + * Patterns to interpret mode reg (MI_MODE_REG - read) + */ +#define MI_MODE_INIT 0x0080 /* Bit 7: init mode */ +#define MI_MODE_EBUS 0x0100 /* Bit 8: ebus test mode */ +#define MI_MODE_RDRAM 0x0200 /* Bit 9: RDRAM reg mode */ + +/* MI version (R): [7:0] io, [15:8] rac, [23:16] rdp, [31:24] rsp */ +#define MI_VERSION_REG (MI_BASE_REG+0x04) +#define MI_NOOP_REG MI_VERSION_REG + +/* MI interrupt (R): [5:0] valid bits - see below for bit patterns */ +#define MI_INTR_REG (MI_BASE_REG+0x08) + +/* + * MI interrupt mask (W): [11:0] valid bits - see below for bit patterns + * (R): [5:0] valid bits - see below for bit patterns + */ +#define MI_INTR_MASK_REG (MI_BASE_REG+0x0C) + +/* + * The following are values to check for interrupt setting (MI_INTR_REG) + */ +#define MI_INTR_SP 0x01 /* Bit 0: SP intr */ +#define MI_INTR_SI 0x02 /* Bit 1: SI intr */ +#define MI_INTR_AI 0x04 /* Bit 2: AI intr */ +#define MI_INTR_VI 0x08 /* Bit 3: VI intr */ +#define MI_INTR_PI 0x10 /* Bit 4: PI intr */ +#define MI_INTR_DP 0x20 /* Bit 5: DP intr */ + +/* + * The following are values to clear/set various interrupt bit mask + * They can be ORed together to manipulate multiple bits + * (MI_INTR_MASK_REG - write) + */ +#define MI_INTR_MASK_CLR_SP 0x0001 /* Bit 0: clear SP mask */ +#define MI_INTR_MASK_SET_SP 0x0002 /* Bit 1: set SP mask */ +#define MI_INTR_MASK_CLR_SI 0x0004 /* Bit 2: clear SI mask */ +#define MI_INTR_MASK_SET_SI 0x0008 /* Bit 3: set SI mask */ +#define MI_INTR_MASK_CLR_AI 0x0010 /* Bit 4: clear AI mask */ +#define MI_INTR_MASK_SET_AI 0x0020 /* Bit 5: set AI mask */ +#define MI_INTR_MASK_CLR_VI 0x0040 /* Bit 6: clear VI mask */ +#define MI_INTR_MASK_SET_VI 0x0080 /* Bit 7: set VI mask */ +#define MI_INTR_MASK_CLR_PI 0x0100 /* Bit 8: clear PI mask */ +#define MI_INTR_MASK_SET_PI 0x0200 /* Bit 9: set PI mask */ +#define MI_INTR_MASK_CLR_DP 0x0400 /* Bit 10: clear DP mask */ +#define MI_INTR_MASK_SET_DP 0x0800 /* Bit 11: set DP mask */ + +/* + * The following are values to check for interrupt mask setting + * (MI_INTR_MASK_REG - read) + */ +#define MI_INTR_MASK_SP 0x01 /* Bit 0: SP intr mask */ +#define MI_INTR_MASK_SI 0x02 /* Bit 1: SI intr mask */ +#define MI_INTR_MASK_AI 0x04 /* Bit 2: AI intr mask */ +#define MI_INTR_MASK_VI 0x08 /* Bit 3: VI intr mask */ +#define MI_INTR_MASK_PI 0x10 /* Bit 4: PI intr mask */ +#define MI_INTR_MASK_DP 0x20 /* Bit 5: DP intr mask */ + + +/************************************************************************* + * Video Interface (VI) Registers + */ +#define VI_BASE_REG 0x04400000 + +/* VI status/control (R/W): [15-0] valid bits: + * [1:0] = type[1:0] (pixel size) + * 0: blank (no data, no sync) + * 1: reserved + * 2: 5/5/5/3 ("16" bit) + * 3: 8/8/8/8 (32 bit) + * [2] = gamma_dither_enable (normally on, unless "special effect") + * [3] = gamma_enable (normally on, unless MPEG/JPEG) + * [4] = divot_enable (normally on if antialiased, unless decal lines) + * [5] = reserved - always off + * [6] = serrate (always on if interlaced, off if not) + * [7] = reserved - diagnostics only + * [9:8] = anti-alias (aa) mode[1:0] + * 0: aa & resamp (always fetch extra lines) + * 1: aa & resamp (fetch extra lines if needed) + * 2: resamp only (treat as all fully covered) + * 3: neither (replicate pixels, no interpolate) + * [11] = reserved - diagnostics only + * [15:12] = reserved + * + */ +#define VI_STATUS_REG (VI_BASE_REG+0x00) +#define VI_CONTROL_REG VI_STATUS_REG + +/* VI origin (R/W): [23:0] frame buffer origin in bytes */ +#define VI_ORIGIN_REG (VI_BASE_REG+0x04) +#define VI_DRAM_ADDR_REG VI_ORIGIN_REG + +/* VI width (R/W): [11:0] frame buffer line width in pixels */ +#define VI_WIDTH_REG (VI_BASE_REG+0x08) +#define VI_H_WIDTH_REG VI_WIDTH_REG + +/* VI vertical intr (R/W): [9:0] interrupt when current half-line = V_INTR */ +#define VI_INTR_REG (VI_BASE_REG+0x0C) +#define VI_V_INTR_REG VI_INTR_REG + +/* + * VI current vertical line (R/W): [9:0] current half line, sampled once per + * line (the lsb of V_CURRENT is constant within a field, and in + * interlaced modes gives the field number - which is constant for non- + * interlaced modes) + * - Any write to this register will clear interrupt line + */ +#define VI_CURRENT_REG (VI_BASE_REG+0x10) +#define VI_V_CURRENT_LINE_REG VI_CURRENT_REG + +/* + * VI video timing (R/W): [ 7: 0] horizontal sync width in pixels, + * [15: 8] color burst width in pixels, + * [19:16] vertical sync width in half lines, + * [29:20] start of color burst in pixels from h-sync + */ +#define VI_BURST_REG (VI_BASE_REG+0x14) +#define VI_TIMING_REG VI_BURST_REG + +/* VI vertical sync (R/W): [9:0] number of half-lines per field */ +#define VI_V_SYNC_REG (VI_BASE_REG+0x18) + +/* VI horizontal sync (R/W): [11: 0] total duration of a line in 1/4 pixel + * [20:16] a 5-bit leap pattern used for PAL only + * (h_sync_period) + */ +#define VI_H_SYNC_REG (VI_BASE_REG+0x1C) + +/* + * VI horizontal sync leap (R/W): [11: 0] identical to h_sync_period + * [27:16] identical to h_sync_period + */ +#define VI_LEAP_REG (VI_BASE_REG+0x20) +#define VI_H_SYNC_LEAP_REG VI_LEAP_REG + +/* + * VI horizontal video (R/W): [ 9: 0] end of active video in screen pixels + * : [25:16] start of active video in screen pixels + */ +#define VI_H_START_REG (VI_BASE_REG+0x24) +#define VI_H_VIDEO_REG VI_H_START_REG + +/* + * VI vertical video (R/W): [ 9: 0] end of active video in screen half-lines + * : [25:16] start of active video in screen half-lines + */ +#define VI_V_START_REG (VI_BASE_REG+0x28) +#define VI_V_VIDEO_REG VI_V_START_REG + +/* + * VI vertical burst (R/W): [ 9: 0] end of color burst enable in half-lines + * : [25:16] start of color burst enable in half-lines + */ +#define VI_V_BURST_REG (VI_BASE_REG+0x2C) + +/* VI x-scale (R/W): [11: 0] 1/horizontal scale up factor (2.10 format) + * [27:16] horizontal subpixel offset (2.10 format) + */ +#define VI_X_SCALE_REG (VI_BASE_REG+0x30) + +/* VI y-scale (R/W): [11: 0] 1/vertical scale up factor (2.10 format) + * [27:16] vertical subpixel offset (2.10 format) + */ +#define VI_Y_SCALE_REG (VI_BASE_REG+0x34) + +/* + * Patterns to interpret VI_CONTROL_REG + */ +#define VI_CTRL_TYPE_16 0x00002 /* Bit [1:0] pixel size: 16 bit */ +#define VI_CTRL_TYPE_32 0x00003 /* Bit [1:0] pixel size: 32 bit */ +#define VI_CTRL_GAMMA_DITHER_ON 0x00004 /* Bit 2: default = on */ +#define VI_CTRL_GAMMA_ON 0x00008 /* Bit 3: default = on */ +#define VI_CTRL_DIVOT_ON 0x00010 /* Bit 4: default = on */ +#define VI_CTRL_SERRATE_ON 0x00040 /* Bit 6: on if interlaced */ +#define VI_CTRL_ANTIALIAS_MASK 0x00300 /* Bit [9:8] anti-alias mode */ +#define VI_CTRL_DITHER_FILTER_ON 0x10000 /* Bit 16: dither-filter mode */ + +/* + * Possible video clocks (NTSC or PAL) + */ +#define VI_NTSC_CLOCK 48681812 /* Hz = 48.681812 MHz */ +#define VI_PAL_CLOCK 49656530 /* Hz = 49.656530 MHz */ +#define VI_MPAL_CLOCK 48628316 /* Hz = 48.628316 MHz */ + + +/************************************************************************* + * Audio Interface (AI) Registers + * + * The address and length registers are double buffered; that is, they + * can be written twice before becoming full. + * The address must be written before the length. + */ +#define AI_BASE_REG 0x04500000 + +/* AI DRAM address (W): [23:0] starting RDRAM address (8B-aligned) */ +#define AI_DRAM_ADDR_REG (AI_BASE_REG+0x00) /* R0: DRAM address */ + +/* AI length (R/W): [14:0] transfer length (v1.0) - Bottom 3 bits are ignored */ +/* [17:0] transfer length (v2.0) - Bottom 3 bits are ignored */ +#define AI_LEN_REG (AI_BASE_REG+0x04) /* R1: Length */ + +/* AI control (W): [0] DMA enable - if LSB == 1, DMA is enabled */ +#define AI_CONTROL_REG (AI_BASE_REG+0x08) /* R2: DMA Control */ + +/* + * AI status (R): [31]/[0] ai_full (addr & len buffer full), [30] ai_busy + * Note that a 1->0 transition in ai_full will set interrupt + * (W): clear audio interrupt + */ +#define AI_STATUS_REG (AI_BASE_REG+0x0C) /* R3: Status */ + +/* + * AI DAC sample period register (W): [13:0] dac rate + * - vid_clock/(dperiod + 1) is the DAC sample rate + * - (dperiod + 1) >= 66 * (aclockhp + 1) must be true + */ +#define AI_DACRATE_REG (AI_BASE_REG+0x10) /* R4: DAC rate 14-lsb*/ + +/* + * AI bit rate (W): [3:0] bit rate (abus clock half period register - aclockhp) + * - vid_clock/(2 * (aclockhp + 1)) is the DAC clock rate + * - The abus clock stops if aclockhp is zero + */ +#define AI_BITRATE_REG (AI_BASE_REG+0x14) /* R5: Bit rate 4-lsb */ + +/* Value for control register */ +#define AI_CONTROL_DMA_ON 0x01 /* LSB = 1: DMA enable*/ +#define AI_CONTROL_DMA_OFF 0x00 /* LSB = 1: DMA enable*/ + +/* Value for status register */ +#define AI_STATUS_FIFO_FULL 0x80000000 /* Bit 31: full */ +#define AI_STATUS_DMA_BUSY 0x40000000 /* Bit 30: busy */ + +/* DAC rate = video clock / audio frequency + * - DAC rate >= (66 * Bit rate) must be true + */ +#define AI_MAX_DAC_RATE 16384 /* 14-bit+1 */ +#define AI_MIN_DAC_RATE 132 + +/* Bit rate <= (DAC rate / 66) */ +#define AI_MAX_BIT_RATE 16 /* 4-bit+1 */ +#define AI_MIN_BIT_RATE 2 + +/* + * Maximum and minimum values for audio frequency based on video clocks + * max frequency = (video clock / min dac rate) + * min frequency = (video clock / max dac rate) + */ +#define AI_NTSC_MAX_FREQ 368000 /* 368 KHz */ +#define AI_NTSC_MIN_FREQ 3000 /* 3 KHz ~ 2971 Hz */ + +#define AI_PAL_MAX_FREQ 376000 /* 376 KHz */ +#define AI_PAL_MIN_FREQ 3050 /* 3 KHz ~ 3031 Hz */ + +#define AI_MPAL_MAX_FREQ 368000 /* 368 KHz */ +#define AI_MPAL_MIN_FREQ 3000 /* 3 KHz ~ 2968 Hz */ + + +/************************************************************************* + * Peripheral Interface (PI) Registers + */ +#define PI_BASE_REG 0x04600000 + +/* PI DRAM address (R/W): [23:0] starting RDRAM address */ +#define PI_DRAM_ADDR_REG (PI_BASE_REG+0x00) /* DRAM address */ + +/* PI pbus (cartridge) address (R/W): [31:0] starting AD16 address */ +#define PI_CART_ADDR_REG (PI_BASE_REG+0x04) + +/* PI read length (R/W): [23:0] read data length */ +#define PI_RD_LEN_REG (PI_BASE_REG+0x08) + +/* PI write length (R/W): [23:0] write data length */ +#define PI_WR_LEN_REG (PI_BASE_REG+0x0C) + +/* + * PI status (R): [0] DMA busy, [1] IO busy, [2], error + * (W): [0] reset controller (and abort current op), [1] clear intr + */ +#define PI_STATUS_REG (PI_BASE_REG+0x10) + +/* PI dom1 latency (R/W): [7:0] domain 1 device latency */ +#define PI_BSD_DOM1_LAT_REG (PI_BASE_REG+0x14) + +/* PI dom1 pulse width (R/W): [7:0] domain 1 device R/W strobe pulse width */ +#define PI_BSD_DOM1_PWD_REG (PI_BASE_REG+0x18) + +/* PI dom1 page size (R/W): [3:0] domain 1 device page size */ +#define PI_BSD_DOM1_PGS_REG (PI_BASE_REG+0x1C) /* page size */ + +/* PI dom1 release (R/W): [1:0] domain 1 device R/W release duration */ +#define PI_BSD_DOM1_RLS_REG (PI_BASE_REG+0x20) + +/* PI dom2 latency (R/W): [7:0] domain 2 device latency */ +#define PI_BSD_DOM2_LAT_REG (PI_BASE_REG+0x24) /* Domain 2 latency */ + +/* PI dom2 pulse width (R/W): [7:0] domain 2 device R/W strobe pulse width */ +#define PI_BSD_DOM2_PWD_REG (PI_BASE_REG+0x28) /* pulse width */ + +/* PI dom2 page size (R/W): [3:0] domain 2 device page size */ +#define PI_BSD_DOM2_PGS_REG (PI_BASE_REG+0x2C) /* page size */ + +/* PI dom2 release (R/W): [1:0] domain 2 device R/W release duration */ +#define PI_BSD_DOM2_RLS_REG (PI_BASE_REG+0x30) /* release duration */ + +#define PI_DOMAIN1_REG PI_BSD_DOM1_LAT_REG +#define PI_DOMAIN2_REG PI_BSD_DOM2_LAT_REG + +#define PI_DOM_LAT_OFS 0x00 +#define PI_DOM_PWD_OFS 0x04 +#define PI_DOM_PGS_OFS 0x08 +#define PI_DOM_RLS_OFS 0x0C + +/* + * PI status register has 3 bits active when read from (PI_STATUS_REG - read) + * Bit 0: DMA busy - set when DMA is in progress + * Bit 1: IO busy - set when IO is in progress + * Bit 2: Error - set when CPU issues IO request while DMA is busy + */ +#define PI_STATUS_ERROR 0x04 +#define PI_STATUS_IO_BUSY 0x02 +#define PI_STATUS_DMA_BUSY 0x01 + +/* PI status register has 2 bits active when written to: + * Bit 0: When set, reset PIC + * Bit 1: When set, clear interrupt flag + * The values of the two bits can be ORed together to both reset PIC and + * clear interrupt at the same time. + * + * Note: + * - The PIC does generate an interrupt at the end of each DMA. CPU + * needs to clear the interrupt flag explicitly (from an interrupt + * handler) by writing into the STATUS register with bit 1 set. + * + * - When a DMA completes, the interrupt flag is set. CPU can issue + * another request even while the interrupt flag is set (as long as + * PIC is idle). However, it is the CPU's responsibility for + * maintaining accurate correspondence between DMA completions and + * interrupts. + * + * - When PIC is reset, if PIC happens to be busy, an interrupt will + * be generated as PIC returns to idle. Otherwise, no interrupt will + * be generated and PIC remains idle. + */ +/* + * Values to clear interrupt/reset PIC (PI_STATUS_REG - write) + */ +#define PI_STATUS_RESET 0x01 +#define PI_SET_RESET PI_STATUS_RESET + +#define PI_STATUS_CLR_INTR 0x02 +#define PI_CLR_INTR PI_STATUS_CLR_INTR + +#define PI_DMA_BUFFER_SIZE 128 + +#define PI_DOM1_ADDR1 0x06000000 /* to 0x07FFFFFF */ +#define PI_DOM1_ADDR2 0x10000000 /* to 0x1FBFFFFF */ +#define PI_DOM1_ADDR3 0x1FD00000 /* to 0x7FFFFFFF */ +#define PI_DOM2_ADDR1 0x05000000 /* to 0x05FFFFFF */ +#define PI_DOM2_ADDR2 0x08000000 /* to 0x0FFFFFFF */ + + +/************************************************************************* + * RDRAM Interface (RI) Registers + */ +#define RI_BASE_REG 0x04700000 + +/* RI mode (R/W): [1:0] operating mode, [2] stop T active, [3] stop R active */ +#define RI_MODE_REG (RI_BASE_REG+0x00) + +/* RI config (R/W): [5:0] current control input, [6] current control enable */ +#define RI_CONFIG_REG (RI_BASE_REG+0x04) + +/* RI current load (W): [] any write updates current control register */ +#define RI_CURRENT_LOAD_REG (RI_BASE_REG+0x08) + +/* RI select (R/W): [2:0] receive select, [2:0] transmit select */ +#define RI_SELECT_REG (RI_BASE_REG+0x0C) + +/* RI refresh (R/W): [7:0] clean refresh delay, [15:8] dirty refresh delay, + * [16] refresh bank, [17] refresh enable + * [18] refresh optimize + */ +#define RI_REFRESH_REG (RI_BASE_REG+0x10) +#define RI_COUNT_REG RI_REFRESH_REG + +/* RI latency (R/W): [3:0] DMA latency/overlap */ +#define RI_LATENCY_REG (RI_BASE_REG+0x14) + +/* RI error (R): [0] nack error, [1] ack error */ +#define RI_RERROR_REG (RI_BASE_REG+0x18) + +/* RI error (W): [] any write clears all error bits */ +#define RI_WERROR_REG (RI_BASE_REG+0x1C) + + +/************************************************************************* + * Serial Interface (SI) Registers + */ +#define SI_BASE_REG 0x04800000 + +/* SI DRAM address (R/W): [23:0] starting RDRAM address */ +#define SI_DRAM_ADDR_REG (SI_BASE_REG+0x00) /* R0: DRAM address */ + +/* SI address read 64B (W): [] any write causes a 64B DMA write */ +#define SI_PIF_ADDR_RD64B_REG (SI_BASE_REG+0x04) /* R1: 64B PIF->DRAM */ + +/* Address SI_BASE_REG + (0x08, 0x0c, 0x14) are reserved */ + +/* SI address write 64B (W): [] any write causes a 64B DMA read */ +#define SI_PIF_ADDR_WR64B_REG (SI_BASE_REG+0x10) /* R4: 64B DRAM->PIF */ + +/* + * SI status (W): [] any write clears interrupt + * (R): [0] DMA busy, [1] IO read busy, [2] reserved + * [3] DMA error, [12] interrupt + */ +#define SI_STATUS_REG (SI_BASE_REG+0x18) /* R6: Status */ + +/* SI status register has the following bits active: + * 0: DMA busy - set when DMA is in progress + * 1: IO busy - set when IO access is in progress + * 3: DMA error - set when there are overlapping DMA requests + * 12: Interrupt - Interrupt set + */ +#define SI_STATUS_DMA_BUSY 0x0001 +#define SI_STATUS_RD_BUSY 0x0002 +#define SI_STATUS_DMA_ERROR 0x0008 +#define SI_STATUS_INTERRUPT 0x1000 + +/************************************************************************* + * Development Board GIO Control Registers + */ + +#define GIO_BASE_REG 0x18000000 + +/* Game to Host Interrupt */ +#define GIO_GIO_INTR_REG (GIO_BASE_REG+0x000) + +/* Game to Host SYNC */ +#define GIO_GIO_SYNC_REG (GIO_BASE_REG+0x400) + +/* Host to Game Interrupt */ +#define GIO_CART_INTR_REG (GIO_BASE_REG+0x800) + + +/************************************************************************* + * Common macros + */ +#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) +#define IO_READ(addr) (*(vu32 *)PHYS_TO_K1(addr)) +#define IO_WRITE(addr,data) (*(vu32 *)PHYS_TO_K1(addr)=(u32)(data)) +#define RCP_STAT_PRINT \ + rmonPrintf("current=%x start=%x end=%x dpstat=%x spstat=%x\n", \ + IO_READ(DPC_CURRENT_REG), \ + IO_READ(DPC_START_REG), \ + IO_READ(DPC_END_REG), \ + IO_READ(DPC_STATUS_REG), \ + IO_READ(SP_STATUS_REG)) + +#endif + +#endif /* _RCP_H_ */ + diff --git a/include/common.h b/include/common.h index 632fc3c5c8..d4a7e57916 100644 --- a/include/common.h +++ b/include/common.h @@ -9,7 +9,7 @@ #include "variables.h" #include "macros.h" #include "enums.h" -#include "si.h" +#include "evt.h" #include "messages.h" #ifdef PERMUTER diff --git a/include/common_structs.h b/include/common_structs.h index 16c40233d8..ce935b7c30 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -4,7 +4,7 @@ #include "macros.h" #include "ultra64.h" #include "types.h" -#include "si.h" +#include "evt.h" #include "enums.h" struct Evt; diff --git a/include/si.h b/include/evt.h similarity index 84% rename from include/si.h rename to include/evt.h index 82e5fffb26..4d598587e7 100644 --- a/include/si.h +++ b/include/evt.h @@ -1,5 +1,5 @@ -#ifndef _SI_H_ -#define _SI_H_ +#ifndef _EVT_H_ +#define _EVT_H_ #include "ultra64.h" @@ -104,27 +104,27 @@ enum { EVT_OP_94, }; -#define SI_VAR(v) ((v - 30000000)) -#define SI_MAP_VAR(v) ((v - 50000000)) -#define SI_FLAG(v) ((v - 70000000)) -#define SI_MAP_FLAG(v) ((v - 90000000)) -#define SI_AREA_FLAG(v) ((v - 110000000)) -#define SI_SAVE_FLAG(v) ((v - 130000000)) -#define SI_AREA_VAR(v) ((v - 150000000)) -#define SI_SAVE_VAR(v) ((v - 170000000)) -#define SI_ARRAY(v) ((v - 190000000)) -#define SI_ARRAY_FLAG(v) ((v - 210000000)) -#define SI_FIXED(v) (((v * 1024.0f) + -230000000)) // See float_to_fixed_var -#define SI_LIMIT -250000000 // TODO better name +#define EVT_VAR(v) ((v - 30000000)) +#define EVT_MAP_VAR(v) ((v - 50000000)) +#define EVT_FLAG(v) ((v - 70000000)) +#define EVT_MAP_FLAG(v) ((v - 90000000)) +#define EVT_AREA_FLAG(v) ((v - 110000000)) +#define EVT_SAVE_FLAG(v) ((v - 130000000)) +#define EVT_AREA_VAR(v) ((v - 150000000)) +#define EVT_SAVE_VAR(v) ((v - 170000000)) +#define EVT_ARRAY(v) ((v - 190000000)) +#define EVT_ARRAY_FLAG(v) ((v - 210000000)) +#define EVT_FIXED(v) (((v * 1024.0f) + -230000000)) // See float_to_fixed_var +#define EVT_LIMIT -250000000 // TODO better name #define MAKE_ENTITY_END 0x80000000 -#define SI_STORY_PROGRESS SI_SAVE_VAR(0) -#define SI_WORLD_LOCATION SI_SAVE_VAR(425) +#define EVT_STORY_PROGRESS EVT_SAVE_VAR(0) +#define EVT_WORLD_LOCATION EVT_SAVE_VAR(425) -/* Return type of si_execute_next_command */ -#define SI_CONTINUE 0 /* Continue to next command */ -#define SI_ABORT 1 /* Quit execution */ -#define SI_FINISH 255 /* Return from script */ +/* Return type of evt_execute_next_command */ +#define EVT_CONTINUE 0 /* Continue to next command */ +#define EVT_ABORT 1 /* Quit execution */ +#define EVT_FINISH 255 /* Return from script */ /* Return type of script API functions */ typedef s32 ApiStatus; @@ -132,9 +132,9 @@ typedef s32 ApiStatus; #define ApiStatus_DONE1 1 /* Unconditional. Probably only exists to return a bool from functions */ #define ApiStatus_DONE2 2 /* Conditional on Evt->disableScripts */ #define ApiStatus_REPEAT 3 /* Call again immediately */ -#define ApiStatus_FINISH 255 /* Corresponds to SI_FINISH */ +#define ApiStatus_FINISH 255 /* Corresponds to EVT_FINISH */ -#define SI_CMD(opcode, argv...) \ +#define EVT_CMD(opcode, argv...) \ opcode, \ /* argc */ (sizeof((Bytecode[]){argv})/sizeof(Bytecode)), \ ##argv diff --git a/include/script_api/battle.h b/include/script_api/battle.h index d06c50115e..92e5185e01 100644 --- a/include/script_api/battle.h +++ b/include/script_api/battle.h @@ -2,7 +2,7 @@ #define _SCRIPT_API_BATTLE_H_ #include "common_structs.h" -#include "si.h" +#include "evt.h" #include "script_api/common.h" diff --git a/include/script_api/common.h b/include/script_api/common.h index 7e8ef81787..21bb4fbf5a 100644 --- a/include/script_api/common.h +++ b/include/script_api/common.h @@ -2,7 +2,7 @@ #define _SCRIPT_API_COMMON_H_ #include "common_structs.h" -#include "si.h" +#include "evt.h" ApiStatus FadeBackgroundToBlack(Evt* script, s32 isInitialCall); ApiStatus UnfadeBackgroundFromBlack(Evt* script, s32 isInitialCall); diff --git a/include/script_api/map.h b/include/script_api/map.h index 3f53f47745..fba831fdf5 100644 --- a/include/script_api/map.h +++ b/include/script_api/map.h @@ -2,7 +2,7 @@ #define _SCRIPT_API_MAP_H_ #include "common_structs.h" -#include "si.h" +#include "evt.h" #include "script_api/common.h" diff --git a/include/si_funcs.h b/include/si_funcs.h new file mode 100644 index 0000000000..cb2e72223d --- /dev/null +++ b/include/si_funcs.h @@ -0,0 +1,226 @@ +#ifndef _EVT_FUNCS_H_ +#define _EVT_FUNCS_H_ + +f32 fixed_var_to_float(Bytecode scriptVar); + +Bytecode float_to_fixed_var(f32 value); + +ApiStatus evt_handle_return(Evt* script); + +ApiStatus evt_handle_label(Evt* script); + +ApiStatus evt_handle_goto(Evt* script); + +ApiStatus evt_handle_loop(Evt* script); + +ApiStatus evt_handle_end_loop(Evt* script); + +ApiStatus evt_handle_break_loop(Evt* script); + +ApiStatus evt_handle_wait(Evt* script); + +ApiStatus evt_handle_wait_seconds(Evt* script); + +ApiStatus evt_handle_if_equal(Evt* script); + +ApiStatus evt_handle_if_not_equal(Evt* script); + +ApiStatus evt_handle_if_less(Evt* script); + +ApiStatus evt_handle_if_greater(Evt* script); + +ApiStatus evt_handle_if_less_equal(Evt* script); + +ApiStatus evt_handle_if_greater_equal(Evt* script); + +ApiStatus evt_handle_if_AND(Evt* script); + +ApiStatus evt_handle_if_not_AND(Evt* script); + +ApiStatus evt_handle_else(Evt* script); + +ApiStatus evt_handle_end_if(Evt* script); + +ApiStatus evt_handle_switch(Evt* script); + +ApiStatus evt_handle_switch_const(Evt* script); + +ApiStatus evt_handle_case_equal(Evt* script); + +ApiStatus evt_handle_case_not_equal(Evt* script); + +ApiStatus evt_handle_case_less(Evt* script); + +ApiStatus evt_handle_case_less_equal(Evt* script); + +ApiStatus evt_handle_case_greater(Evt* script); + +ApiStatus evt_handle_case_greater_equal(Evt* script); + +ApiStatus evt_handle_case_range(Evt* script); + +ApiStatus evt_handle_case_default(Evt* script); + +ApiStatus evt_handle_case_AND(Evt* script); + +ApiStatus evt_handle_case_equal_OR(Evt* script); + +ApiStatus evt_handle_case_equal_AND(Evt* script); + +ApiStatus evt_handle_end_case_group(Evt* script); + +ApiStatus evt_handle_break_case(Evt* script); + +ApiStatus evt_handle_end_switch(Evt* script); + +ApiStatus evt_handle_set_var(Evt* script); + +ApiStatus evt_handle_set_const(Evt* script); + +ApiStatus evt_handle_set_float(Evt* script); + +ApiStatus evt_handle_add(Evt* script); + +ApiStatus evt_handle_subtract(Evt* script); + +ApiStatus evt_handle_multiply(Evt* script); + +ApiStatus evt_handle_divide(Evt* script); + +ApiStatus evt_handle_mod(Evt* script); + +ApiStatus evt_handle_addF(Evt* script); + +ApiStatus evt_handle_subtractF(Evt* script); + +ApiStatus evt_handle_multiplyF(Evt* script); + +ApiStatus evt_handle_divideF(Evt* script); + +ApiStatus evt_handle_set_int_buffer_ptr(Evt* script); + +ApiStatus evt_handle_set_float_buffer_ptr(Evt* script); + +ApiStatus evt_handle_get_1_word(Evt* script); + +ApiStatus evt_handle_get_2_word(Evt* script); + +ApiStatus evt_handle_get_3_word(Evt* script); + +ApiStatus evt_handle_get_4_word(Evt* script); + +ApiStatus evt_handle_get_Nth_word(Evt* script); + +ApiStatus evt_handle_get_1_float(Evt* script); + +ApiStatus evt_handle_get_2_float(Evt* script); + +ApiStatus evt_handle_get_3_float(Evt* script); + +ApiStatus evt_handle_get_4_float(Evt* script); + +ApiStatus evt_handle_get_Nth_float(Evt* script); + +ApiStatus evt_handle_set_array(Evt* script); + +ApiStatus evt_handle_set_flag_array(Evt* script); + +ApiStatus evt_handle_allocate_array(Evt* script); + +ApiStatus evt_handle_AND(Evt* script); + +ApiStatus evt_handle_AND_const(Evt* script); + +ApiStatus evt_handle_OR(Evt* script); + +ApiStatus evt_handle_OR_const(Evt* script); + +ApiStatus evt_handle_call(Evt* script); + +ApiStatus evt_handle_exec1(Evt* script); + +ApiStatus evt_handle_exec1_get_id(Evt* script); + +ApiStatus evt_handle_exec_wait(Evt* script); + +ApiStatus evt_handle_jump(Evt* script); + +s32 _bound_script_trigger_handler(Trigger* trigger); + +ApiStatus evt_handle_bind(Evt* script); + +ApiStatus DeleteTrigger(Evt* script, s32 isInitialCall); + +ApiStatus evt_handle_unbind(Evt* script); + +ApiStatus evt_handle_kill(Evt* script); + +ApiStatus evt_handle_set_priority(Evt* script); + +ApiStatus evt_handle_set_timescale(Evt* script); + +ApiStatus evt_handle_set_group(Evt* script); + +ApiStatus evt_handle_suspend_all(Evt* script); + +ApiStatus evt_handle_resume_all(Evt* script); + +ApiStatus evt_handle_suspend_others(Evt* script); + +ApiStatus evt_handle_resume_others(Evt* script); + +ApiStatus evt_handle_suspend(Evt* script); + +ApiStatus evt_handle_resume(Evt* script); + +ApiStatus evt_handle_does_script_exist(Evt* script); + +void evt_standard_trigger_executor(Trigger* trigger); + +ApiStatus evt_handle_bind_lock(Evt* script); + +ApiStatus evt_handle_thread(Evt* script); + +ApiStatus evt_handle_end_thread(Evt* script); + +ApiStatus evt_handle_child_thread(Evt* script); + +ApiStatus evt_handle_end_child_thread(Evt* script); + +ApiStatus func_802C6E14(Evt* script); + +ApiStatus evt_handle_print_debug_var(Evt* script); + +ApiStatus func_802C739C(Evt* script); + +ApiStatus func_802C73B0(Evt* script); + +s32 func_802C73B8(Evt* script); + +s32 evt_execute_next_command(Evt *script); + +s32 get_variable(Evt* script, Bytecode var); + +s32 get_variable_index(Evt* script, s32 var); + +s32 get_variable_index_alt(s32 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, s32 value); + +Bytecode* evt_find_label(Evt* script, s32 arg1); + +Bytecode* evt_skip_if(Evt* script); + +Bytecode* evt_skip_else(Evt* script); + +Bytecode* evt_goto_end_case(Evt* script); + +Bytecode* evt_goto_next_case(Evt* script); + +Bytecode* evt_goto_end_loop(Evt* script); + +#endif diff --git a/src/111f0_len_860.c b/src/111f0_len_860.c index b1665ca210..e5ae2dc161 100644 --- a/src/111f0_len_860.c +++ b/src/111f0_len_860.c @@ -28,7 +28,7 @@ void init_enter_world_shared(void) { gOverrideFlags |= 0x8; - set_variable(NULL, SI_SAVE_VAR(1), gGameStatusPtr->unk_A9); + set_variable(NULL, EVT_SAVE_VAR(1), gGameStatusPtr->unk_A9); timeFreezeMode = 0; } diff --git a/src/16c8e0.c b/src/16c8e0.c index 9c283313ed..4162461960 100644 --- a/src/16c8e0.c +++ b/src/16c8e0.c @@ -25,43 +25,43 @@ extern f32 D_8029EFB8; EvtSource BtlPutPartnerAway = SCRIPT({ DispatchEvent(ACTOR_PARTNER, 62); parallel { - SI_VAR(0) = 1.0; + EVT_VAR(0) = 1.0; loop 10 { - SetActorScale(ACTOR_PARTNER, SI_VAR(0), SI_VAR(0), 1.0); - SI_VAR(0) -= 0.1005859375; + SetActorScale(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(0), 1.0); + EVT_VAR(0) -= 0.1005859375; sleep 1; } } EnablePartnerBlur(); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_E); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; SetActorJumpGravity(ACTOR_PARTNER, 1.0); - SetGoalPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_PARTNER, 10, 0, 0, 1); DisablePartnerBlur(); }); EvtSource BtlBringPartnerOut = SCRIPT({ parallel { - SI_VAR(0) = 0.1005859375; + EVT_VAR(0) = 0.1005859375; loop 20 { - SetActorScale(ACTOR_PARTNER, SI_VAR(0), SI_VAR(0), 1.0); - SI_VAR(0) += 0.05078125; + SetActorScale(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(0), 1.0); + EVT_VAR(0) += 0.05078125; sleep 1; } SetActorScale(ACTOR_PARTNER, 1.0, 1.0, 1.0); } PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_D); - GetGoalPos(256, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(256, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetActorJumpGravity(ACTOR_PARTNER, 1.0); - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { JumpToGoal(ACTOR_PARTNER, 20, 0, 0, 1); } else { JumpToGoal(ACTOR_PARTNER, 20, 0, 0, 1); } - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ForceHomePos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ForceHomePos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); }); s8 D_80280CE0[] = { 0, 0, 0, 0 }; diff --git a/src/197F40.c b/src/197F40.c index 38655d6c01..0e99da8d40 100644 --- a/src/197F40.c +++ b/src/197F40.c @@ -1224,15 +1224,15 @@ ApiStatus SetActorRotation(Evt* script, s32 isInitialCall) { actor = get_actor(actorID); - if (x != SI_LIMIT) { + if (x != EVT_LIMIT) { actor->rotation.x = x; } - if (y != SI_LIMIT) { + if (y != EVT_LIMIT) { actor->rotation.y = y; } - if (z != SI_LIMIT) { + if (z != EVT_LIMIT) { actor->rotation.z = z; } diff --git a/src/1A5830.c b/src/1A5830.c index 148a1c5255..d0e5079e59 100644 --- a/src/1A5830.c +++ b/src/1A5830.c @@ -1659,10 +1659,10 @@ ApiStatus SetActorSize(Evt* script, s32 isInitialCall) { actor = get_actor(actorID); - if (y != SI_LIMIT) { + if (y != EVT_LIMIT) { actor->size.y = y; } - if (x != SI_LIMIT) { + if (x != EVT_LIMIT) { actor->size.x = x; } actor->shadowScale = actor->size.x / 24.0; @@ -1701,11 +1701,11 @@ ApiStatus SetPartSize(Evt* script, s32 isInitialCall) { part = get_actor_part(get_actor(actorID), partIndex); - if (sizeY != SI_LIMIT) { + if (sizeY != EVT_LIMIT) { part->size.y = sizeY; } - if (sizeX != SI_LIMIT) { + if (sizeX != EVT_LIMIT) { part->size.x = sizeX; } diff --git a/src/7fd10_len_b40.c b/src/7fd10_len_b40.c index 2ca0919d42..9e7a3f10e3 100644 --- a/src/7fd10_len_b40.c +++ b/src/7fd10_len_b40.c @@ -65,7 +65,7 @@ void check_input_status_menu(void) { PlayerStatus* playerStatus = &gPlayerStatus; s32 pressedButtons; - if (get_variable(NULL, SI_STORY_PROGRESS) < STORY_EPILOGUE) { + if (get_variable(NULL, EVT_STORY_PROGRESS) < STORY_EPILOGUE) { if (playerStatus->actionState != ACTION_STATE_RIDE) { pressedButtons = playerStatus->pressedButtons; } else { diff --git a/src/EA6FD0.c b/src/EA6FD0.c index 6a50a25265..d9ba7fca9e 100644 --- a/src/EA6FD0.c +++ b/src/EA6FD0.c @@ -2,7 +2,7 @@ #include "common.h" s32 func_80240000_EA6FD0(void) { - s32 temp = get_variable(NULL, SI_STORY_PROGRESS); + s32 temp = get_variable(NULL, EVT_STORY_PROGRESS); if (temp <= 0x26) { return 0x19010F; diff --git a/src/battle/area_kmr_part_1/actor/goomba.c b/src/battle/area_kmr_part_1/actor/goomba.c index 8f252143d3..5febc9954c 100644 --- a/src/battle/area_kmr_part_1/actor/goomba.c +++ b/src/battle/area_kmr_part_1/actor/goomba.c @@ -114,44 +114,44 @@ EvtSource N(init_802197AC) = SCRIPT({ EvtSource N(idle_802197F8) = SCRIPT({ 10: - RandInt(80, SI_VAR(0)); - SI_VAR(0) += 80; - loop SI_VAR(0) { + RandInt(80, EVT_VAR(0)); + EVT_VAR(0) += 80; + loop EVT_VAR(0) { 0: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 0; } sleep 1; } - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 5; + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 5; SetActorIdleSpeed(ACTOR_SELF, 1.0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_80219760)); - SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetIdleGoal(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); IdleRunToGoal(ACTOR_SELF, 0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_80219714)); loop 20 { 1: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 1; } sleep 1; } - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 5; + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 5; SetActorIdleSpeed(ACTOR_SELF, 1.0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_80219760)); - SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetIdleGoal(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); IdleRunToGoal(ACTOR_SELF, 0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_80219714)); loop 80 { 2: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 2; } @@ -164,49 +164,49 @@ EvtSource N(handleEvent_80219AD4) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, FALSE); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); - GetLastEvent(ACTOR_SELF, SI_VAR(0)); - match SI_VAR(0) { + GetLastEvent(ACTOR_SELF, EVT_VAR(0)); + match EVT_VAR(0) { EVENT_HIT_COMBO, EVENT_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoNormalHit; } == EVENT_BURN_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_pain; - SI_VAR(2) = (const) NPC_ANIM_goomba_normal_burn_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_pain; + EVT_VAR(2) = (const) NPC_ANIM_goomba_normal_burn_dead; await DoBurnHit; } == EVENT_BURN_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_pain; - SI_VAR(2) = (const) NPC_ANIM_goomba_normal_burn_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_pain; + EVT_VAR(2) = (const) NPC_ANIM_goomba_normal_burn_dead; await DoBurnHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_dead; await DoDeath; return; } == EVENT_SPIN_SMASH_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoSpinSmashHit; } == EVENT_SPIN_SMASH_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoSpinSmashHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; await DoDeath; return; } == EVENT_SHOCK_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_electrocute; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_electrocute; await DoShockHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoJumpBack; JumpToGoal(ACTOR_SELF, 5, FALSE, TRUE, FALSE); SetAnimationRate(ACTOR_SELF, 1, 2.0); @@ -221,26 +221,26 @@ EvtSource N(handleEvent_80219AD4) = SCRIPT({ JumpToGoal(ACTOR_SELF, 5, FALSE, TRUE, FALSE); } == EVENT_SHOCK_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_electrocute; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_electrocute; await DoShockHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; await DoDeath; return; } == EVENT_STAR_BEAM, 23, EVENT_IMMUNE, EVENT_AIR_LIFT_FAILED { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_idle; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_idle; await DoImmune; } == EVENT_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoNormalHit; sleep 10; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; await DoDeath; return; } @@ -254,25 +254,25 @@ EvtSource N(handleEvent_80219AD4) = SCRIPT({ HPBarToHome(ACTOR_SELF); } == EVENT_RECOVER_STATUS { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_idle; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_idle; await DoRecover; } == EVENT_SCARE_AWAY { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_run; - SI_VAR(2) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_run; + EVT_VAR(2) = (const) NPC_ANIM_goomba_normal_pain; await DoScareAway; return; } == EVENT_BEGIN_AIR_LIFT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_run; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_run; await DoAirLift; } == EVENT_BLOW_AWAY { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoBlowAway; return; } @@ -305,27 +305,27 @@ EvtSource N(takeTurn_8021A300) = SCRIPT({ sleep 5; SetActorDispOffset(ACTOR_SELF, 0, 0, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk); - EnemyTestTarget(ACTOR_SELF, SI_VAR(0), ((0)), 0, 1, 16); - match SI_VAR(0) { + EnemyTestTarget(ACTOR_SELF, EVT_VAR(0), ((0)), 0, 1, 16); + match EVT_VAR(0) { HIT_RESULT_MISS, HIT_RESULT_LUCKY { - SI_VAR(10) = SI_VAR(0); + EVT_VAR(10) = EVT_VAR(0); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 10; - SI_VAR(1) = 10; - SI_VAR(2) += 3; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 10; + EVT_VAR(1) = 10; + EVT_VAR(2) += 3; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetActorJumpGravity(ACTOR_SELF, 1.2); spawn { - GetActorPos(ACTOR_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); - SI_VAR(0) = 0; + GetActorPos(ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0)); + EVT_VAR(0) = 0; loop 16 { - GetActorPos(ACTOR_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); - N(AngleCalculate)(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0)); - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - SI_VAR(3) = SI_VAR(6); + GetActorPos(ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6)); + N(AngleCalculate)(EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0)); + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + EVT_VAR(3) = EVT_VAR(6); sleep 1; } } @@ -345,24 +345,24 @@ EvtSource N(takeTurn_8021A300) = SCRIPT({ SetActorDispOffset(ACTOR_SELF, 0, 7, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain); sleep 5; - if (SI_VAR(10) == 5) { - EnemyTestTarget(ACTOR_SELF, SI_VAR(0), ((0x80000000)), 0, 0, 0); + if (EVT_VAR(10) == 5) { + EnemyTestTarget(ACTOR_SELF, EVT_VAR(0), ((0x80000000)), 0, 0, 0); } sleep 5; SetActorDispOffset(ACTOR_SELF, 0, 0, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 20; - SI_VAR(1) = 0; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 20; + EVT_VAR(1) = 0; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetActorJumpGravity(ACTOR_SELF, 2.0); spawn { sleep 4; - SI_VAR(0) = 180; + EVT_VAR(0) = 180; loop 4 { - SI_VAR(0) -= 45; - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); + EVT_VAR(0) -= 45; + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); sleep 1; } SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk); @@ -393,15 +393,15 @@ EvtSource N(takeTurn_8021A300) = SCRIPT({ SetGoalToTarget(ACTOR_SELF); SetActorJumpGravity(ACTOR_SELF, 1.2); spawn { - GetActorPos(ACTOR_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); - SI_VAR(0) = 0; + GetActorPos(ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0)); + EVT_VAR(0) = 0; loop 16 { - GetActorPos(ACTOR_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); - N(AngleCalculate)(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0)); - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - SI_VAR(3) = SI_VAR(6); + GetActorPos(ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6)); + N(AngleCalculate)(EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0)); + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + EVT_VAR(3) = EVT_VAR(6); sleep 1; } } @@ -417,8 +417,8 @@ EvtSource N(takeTurn_8021A300) = SCRIPT({ sleep 1; } } - EnemyDamageTarget(ACTOR_SELF, SI_VAR(0), ((0)), 0, 0, 1, 32); - match SI_VAR(0) { + EnemyDamageTarget(ACTOR_SELF, EVT_VAR(0), ((0)), 0, 0, 1, 32); + match EVT_VAR(0) { HIT_RESULT_HIT, 2 { UseBattleCamPreset(2); SetActorScale(ACTOR_SELF, 1.1, 0.8, 1.0); @@ -428,17 +428,17 @@ EvtSource N(takeTurn_8021A300) = SCRIPT({ SetActorRotation(ACTOR_SELF, 0, 0, 0); SetActorDispOffset(ACTOR_SELF, 0, 0, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 40; - SI_VAR(1) = 0; + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 40; + EVT_VAR(1) = 0; SetActorJumpGravity(ACTOR_SELF, 1.8); - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 10, FALSE, TRUE, FALSE); - SI_VAR(0) += 30; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) += 30; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 8, FALSE, TRUE, FALSE); - SI_VAR(0) += 20; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) += 20; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 6, FALSE, TRUE, FALSE); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle); sleep 3; diff --git a/src/battle/area_kmr_part_1/actor/paragoomba.c b/src/battle/area_kmr_part_1/actor/paragoomba.c index 70b8970b7f..f6373695af 100644 --- a/src/battle/area_kmr_part_1/actor/paragoomba.c +++ b/src/battle/area_kmr_part_1/actor/paragoomba.c @@ -196,42 +196,42 @@ EvtSource N(init_8021CDD8) = SCRIPT({ EvtSource N(idle_8021CE24) = SCRIPT({ 10: - RandInt(80, SI_VAR(0)); - SI_VAR(0) += 80; - loop SI_VAR(0) { + RandInt(80, EVT_VAR(0)); + EVT_VAR(0) += 80; + loop EVT_VAR(0) { 0: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 0; } sleep 1; } - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 5; + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 5; SetActorIdleSpeed(ACTOR_SELF, 0.6); SetIdleAnimations(ACTOR_SELF, 2, N(idleAnimations_8021CD74)); - SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetIdleGoal(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); IdleFlyToGoal(ACTOR_SELF, 0, -5, 0); loop 20 { 1: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 1; } sleep 1; } - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 5; + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 5; SetActorIdleSpeed(ACTOR_SELF, 0.6); - SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetIdleGoal(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); IdleFlyToGoal(ACTOR_SELF, 0, -5, 0); SetIdleAnimations(ACTOR_SELF, 2, N(idleAnimations_8021CD28)); loop 40 { 2: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 2; } @@ -253,80 +253,80 @@ EvtSource N(8021DF64); EvtSource N(handleEvent_8021D158) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, 0); - GetLastEvent(ACTOR_SELF, SI_VAR(0)); - match SI_VAR(0) { + GetLastEvent(ACTOR_SELF, EVT_VAR(0)); + match EVT_VAR(0) { EVENT_HIT_COMBO, EVENT_HIT { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_pain; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_pain; await DoNormalHit; - GetBattlePhase(SI_VAR(0)); - if (SI_VAR(0) == 1) { - GetEncounterState(SI_VAR(0)); - if (SI_VAR(0) == 4) { + GetBattlePhase(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { + GetEncounterState(EVT_VAR(0)); + if (EVT_VAR(0) == 4) { await N(8021DF64); } } } == EVENT_BURN_HIT { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_burn_pain; - SI_VAR(2) = (const) NPC_ANIM_paragoomba_default_burn_dead; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_burn_pain; + EVT_VAR(2) = (const) NPC_ANIM_paragoomba_default_burn_dead; await DoBurnHit; } == EVENT_BURN_DEATH { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_burn_pain; - SI_VAR(2) = (const) NPC_ANIM_paragoomba_default_burn_dead; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_burn_pain; + EVT_VAR(2) = (const) NPC_ANIM_paragoomba_default_burn_dead; await DoBurnHit; - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_burn_dead; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_burn_dead; await DoDeath; return; } == EVENT_FALL_TRIGGER { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_pain; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_pain; await DoNormalHit; await N(8021DF64); } == 15 { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_burn_pain; - SI_VAR(2) = (const) NPC_ANIM_paragoomba_default_burn_dead; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_burn_pain; + EVT_VAR(2) = (const) NPC_ANIM_paragoomba_default_burn_dead; await DoBurnHit; await N(8021DF64); } == EVENT_SHOCK_HIT { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_electrocute; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_electrocute; await DoShockHit; - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_pain; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_pain; await DoJumpBack; SetAnimation(ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_dizzy); await N(8021D0E0); } == EVENT_SHOCK_DEATH { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_electrocute; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_electrocute; await DoShockHit; - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_dead; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_dead; await DoDeath; return; } == EVENT_STAR_BEAM, 23, EVENT_IMMUNE, EVENT_AIR_LIFT_FAILED { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_idle; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_idle; await DoImmune; } == EVENT_DEATH { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_pain; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_pain; await DoNormalHit; sleep 10; - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_dead; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_dead; await DoDeath; return; } @@ -340,26 +340,26 @@ EvtSource N(handleEvent_8021D158) = SCRIPT({ HPBarToHome(ACTOR_SELF); } == EVENT_RECOVER_STATUS { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_idle; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_idle; await DoRecover; } == EVENT_SCARE_AWAY { SetActorFlagBits(ACTOR_SELF, 512, 0); - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_run; - SI_VAR(2) = (const) NPC_ANIM_paragoomba_default_pain; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_run; + EVT_VAR(2) = (const) NPC_ANIM_paragoomba_default_pain; await DoScareAway; return; } == EVENT_BEGIN_AIR_LIFT { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_run; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_run; await DoAirLift; } == EVENT_BLOW_AWAY { - SI_VAR(0) = (const) 2; - SI_VAR(1) = (const) NPC_ANIM_paragoomba_default_pain; + EVT_VAR(0) = (const) 2; + EVT_VAR(1) = (const) NPC_ANIM_paragoomba_default_pain; await DoBlowAway; return; } @@ -383,10 +383,10 @@ EvtSource N(takeTurn_8021D74C) = SCRIPT({ AddGoalPos(ACTOR_SELF, 50, 0, 0); SetActorSpeed(ACTOR_SELF, 6.0); FlyToGoal(ACTOR_SELF, 0, -4, 0); - EnemyTestTarget(ACTOR_SELF, SI_VAR(0), ((0)), 0, 1, 16); - match SI_VAR(0) { + EnemyTestTarget(ACTOR_SELF, EVT_VAR(0), ((0)), 0, 1, 16); + match EVT_VAR(0) { HIT_RESULT_MISS, HIT_RESULT_LUCKY { - SI_VAR(10) = SI_VAR(0); + EVT_VAR(10) = EVT_VAR(0); sleep 10; UseBattleCamPreset(66); SetBattleCamZoom(300); @@ -397,15 +397,15 @@ EvtSource N(takeTurn_8021D74C) = SCRIPT({ SetActorSpeed(ACTOR_SELF, 5.0); SetActorJumpGravity(ACTOR_SELF, 1.8); SetAnimation(ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack); - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 10, FALSE, FALSE, FALSE); PlaySoundAtActor(ACTOR_SELF, SOUND_UNUSED_2C1); SetActorSounds(ACTOR_SELF, 1, 0, 0); SetGoalToTarget(ACTOR_SELF); - SI_VAR(0) -= 80; - SI_VAR(1) = 20; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) -= 80; + EVT_VAR(1) = 20; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetActorSpeed(ACTOR_SELF, 8.0); SetAnimation(ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack); FlyToGoal(ACTOR_SELF, 0, -10, 4); @@ -419,8 +419,8 @@ EvtSource N(takeTurn_8021D74C) = SCRIPT({ AddActorDecoration(ACTOR_SELF, 2, 0, 2); SetAnimationRate(ACTOR_SELF, 2, 3.0); sleep 10; - if (SI_VAR(10) == 5) { - EnemyTestTarget(ACTOR_SELF, SI_VAR(0), ((0x80000000)), 0, 0, 0); + if (EVT_VAR(10) == 5) { + EnemyTestTarget(ACTOR_SELF, EVT_VAR(0), ((0x80000000)), 0, 0, 0); } sleep 10; SetAnimationRate(ACTOR_SELF, 2, 1.0); @@ -447,8 +447,8 @@ EvtSource N(takeTurn_8021D74C) = SCRIPT({ SetActorSpeed(ACTOR_SELF, 5.0); SetActorJumpGravity(ACTOR_SELF, 1.8); SetAnimation(ACTOR_SELF, 2, NPC_ANIM_paragoomba_default_attack); - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 10, FALSE, FALSE, FALSE); PlaySoundAtActor(ACTOR_SELF, SOUND_UNUSED_2C1); SetActorSounds(ACTOR_SELF, 1, 0, 0); @@ -459,8 +459,8 @@ EvtSource N(takeTurn_8021D74C) = SCRIPT({ } } sleep 2; - EnemyDamageTarget(ACTOR_SELF, SI_VAR(0), ((0)), 0, 0, 1, 32); - match SI_VAR(0) { + EnemyDamageTarget(ACTOR_SELF, EVT_VAR(0), ((0)), 0, 0, 1, 32); + match EVT_VAR(0) { HIT_RESULT_HIT, 2 { UseBattleCamPreset(2); SetGoalToTarget(ACTOR_SELF); @@ -489,39 +489,39 @@ EvtSource N(8021DF64) = SCRIPT({ SetPartFlags(ACTOR_SELF, 3, 1179652); SetPartFlags(ACTOR_SELF, 4, 1179652); SetPartFlags(ACTOR_SELF, 1, 8388612); - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPartPos(ACTOR_SELF, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPartPos(ACTOR_SELF, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetPartDispOffset(ACTOR_SELF, 3, -9, 7, -2); - SetPartPos(ACTOR_SELF, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPartPos(ACTOR_SELF, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetPartDispOffset(ACTOR_SELF, 4, 11, 7, -2); - GetLastEvent(ACTOR_SELF, SI_VAR(0)); - if (SI_VAR(0) == 15) { + GetLastEvent(ACTOR_SELF, EVT_VAR(0)); + if (EVT_VAR(0) == 15) { SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_burn_dead); } else { SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain); } SetActorSounds(ACTOR_SELF, 2, 769, 0); - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) = 0; + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) = 0; SetActorJumpGravity(ACTOR_SELF, 0.8); - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 15, FALSE, TRUE, FALSE); N(StartRumbleWithParams)(100, 10); spawn { ShakeCam(1, 0, 5, 0.3); } ResetActorSounds(ACTOR_SELF, 2); - GetLastEvent(ACTOR_SELF, SI_VAR(3)); - if (SI_VAR(3) == 15) { + GetLastEvent(ACTOR_SELF, EVT_VAR(3)); + if (EVT_VAR(3) == 15) { SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain); - GetActorPos(ACTOR_SELF, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(4) += 10; - SI_VAR(5) += 5; - PlayEffect(0x27, 0, SI_VAR(3), SI_VAR(4), SI_VAR(5), 1.0, 10, 0, 0, 0, 0, 0, 0, 0); + GetActorPos(ACTOR_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(4) += 10; + EVT_VAR(5) += 5; + PlayEffect(0x27, 0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1.0, 10, 0, 0, 0, 0, 0, 0, 0); } - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 10, FALSE, TRUE, FALSE); - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 5, FALSE, TRUE, FALSE); loop 10 { SetPartFlagBits(ACTOR_SELF, 3, 1, 1); @@ -533,11 +533,11 @@ EvtSource N(8021DF64) = SCRIPT({ } SetPartFlagBits(ACTOR_SELF, 3, 1, 1); SetPartFlagBits(ACTOR_SELF, 4, 1, 1); - GetIndexFromHome(ACTOR_SELF, SI_VAR(0)); - SI_VAR(0) %= 4; - SetGoalToIndex(ACTOR_SELF, SI_VAR(0)); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetHomePos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetIndexFromHome(ACTOR_SELF, EVT_VAR(0)); + EVT_VAR(0) %= 4; + SetGoalToIndex(ACTOR_SELF, EVT_VAR(0)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetHomePos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle); SetActorFlagBits(ACTOR_SELF, 512, 0); SetStatusTable(ACTOR_SELF, N(statusTable_8021CB18)); @@ -589,44 +589,44 @@ EvtSource N(8021E584) = SCRIPT({ EvtSource N(idle_8021E5D0) = SCRIPT({ 10: - RandInt(80, SI_VAR(0)); - SI_VAR(0) += 80; - loop SI_VAR(0) { + RandInt(80, EVT_VAR(0)); + EVT_VAR(0) += 80; + loop EVT_VAR(0) { 0: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 0; } sleep 1; } - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 5; + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 5; SetActorIdleSpeed(ACTOR_SELF, 1.0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_8021E538)); - SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetIdleGoal(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); IdleRunToGoal(ACTOR_SELF, 0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_8021E4EC)); loop 20 { 1: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 1; } sleep 1; } - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 5; + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 5; SetActorIdleSpeed(ACTOR_SELF, 1.0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_8021E538)); - SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetIdleGoal(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); IdleRunToGoal(ACTOR_SELF, 0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_8021E4EC)); loop 80 { 2: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 2; } @@ -639,49 +639,49 @@ EvtSource N(handleEvent_8021E8AC) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, FALSE); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); - GetLastEvent(ACTOR_SELF, SI_VAR(0)); - match SI_VAR(0) { + GetLastEvent(ACTOR_SELF, EVT_VAR(0)); + match EVT_VAR(0) { EVENT_HIT_COMBO, EVENT_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoNormalHit; } == EVENT_BURN_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_pain; - SI_VAR(2) = (const) NPC_ANIM_goomba_normal_burn_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_pain; + EVT_VAR(2) = (const) NPC_ANIM_goomba_normal_burn_dead; await DoBurnHit; } == EVENT_BURN_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_pain; - SI_VAR(2) = (const) NPC_ANIM_goomba_normal_burn_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_pain; + EVT_VAR(2) = (const) NPC_ANIM_goomba_normal_burn_dead; await DoBurnHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_burn_dead; await DoDeath; return; } == EVENT_SPIN_SMASH_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoSpinSmashHit; } == EVENT_SPIN_SMASH_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoSpinSmashHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; await DoDeath; return; } == EVENT_SHOCK_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_electrocute; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_electrocute; await DoShockHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoJumpBack; JumpToGoal(ACTOR_SELF, 5, FALSE, TRUE, FALSE); SetAnimationRate(ACTOR_SELF, 1, 2.0); @@ -696,26 +696,26 @@ EvtSource N(handleEvent_8021E8AC) = SCRIPT({ JumpToGoal(ACTOR_SELF, 5, FALSE, TRUE, FALSE); } == EVENT_SHOCK_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_electrocute; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_electrocute; await DoShockHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; await DoDeath; return; } == EVENT_STAR_BEAM, 23, EVENT_IMMUNE, EVENT_AIR_LIFT_FAILED { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_idle; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_idle; await DoImmune; } == EVENT_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoNormalHit; sleep 10; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_dead; await DoDeath; return; } @@ -729,25 +729,25 @@ EvtSource N(handleEvent_8021E8AC) = SCRIPT({ HPBarToHome(ACTOR_SELF); } == EVENT_RECOVER_STATUS { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_idle; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_idle; await DoRecover; } == EVENT_SCARE_AWAY { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_run; - SI_VAR(2) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_run; + EVT_VAR(2) = (const) NPC_ANIM_goomba_normal_pain; await DoScareAway; return; } == EVENT_BEGIN_AIR_LIFT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_run; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_run; await DoAirLift; } == EVENT_BLOW_AWAY { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_goomba_normal_pain; await DoBlowAway; return; } @@ -780,27 +780,27 @@ EvtSource N(takeTurn_8021F0D8) = SCRIPT({ sleep 5; SetActorDispOffset(ACTOR_SELF, 0, 0, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk); - EnemyTestTarget(ACTOR_SELF, SI_VAR(0), ((0)), 0, 1, 16); - match SI_VAR(0) { + EnemyTestTarget(ACTOR_SELF, EVT_VAR(0), ((0)), 0, 1, 16); + match EVT_VAR(0) { HIT_RESULT_MISS, HIT_RESULT_LUCKY { - SI_VAR(10) = SI_VAR(0); + EVT_VAR(10) = EVT_VAR(0); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 10; - SI_VAR(1) = 10; - SI_VAR(2) += 3; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 10; + EVT_VAR(1) = 10; + EVT_VAR(2) += 3; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetActorJumpGravity(ACTOR_SELF, 1.2); spawn { - GetActorPos(ACTOR_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); - SI_VAR(0) = 0; + GetActorPos(ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0)); + EVT_VAR(0) = 0; loop 16 { - GetActorPos(ACTOR_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); - N(AngleCalculate)(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0)); - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - SI_VAR(3) = SI_VAR(6); + GetActorPos(ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6)); + N(AngleCalculate)(EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0)); + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + EVT_VAR(3) = EVT_VAR(6); sleep 1; } } @@ -820,24 +820,24 @@ EvtSource N(takeTurn_8021F0D8) = SCRIPT({ SetActorDispOffset(ACTOR_SELF, 0, 7, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_pain); sleep 5; - if (SI_VAR(10) == 5) { - EnemyTestTarget(ACTOR_SELF, SI_VAR(0), ((0x80000000)), 0, 0, 0); + if (EVT_VAR(10) == 5) { + EnemyTestTarget(ACTOR_SELF, EVT_VAR(0), ((0x80000000)), 0, 0, 0); } sleep 5; SetActorDispOffset(ACTOR_SELF, 0, 0, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 20; - SI_VAR(1) = 0; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 20; + EVT_VAR(1) = 0; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetActorJumpGravity(ACTOR_SELF, 2.0); spawn { sleep 4; - SI_VAR(0) = 180; + EVT_VAR(0) = 180; loop 4 { - SI_VAR(0) -= 45; - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); + EVT_VAR(0) -= 45; + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); sleep 1; } SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk); @@ -868,15 +868,15 @@ EvtSource N(takeTurn_8021F0D8) = SCRIPT({ SetGoalToTarget(ACTOR_SELF); SetActorJumpGravity(ACTOR_SELF, 1.2); spawn { - GetActorPos(ACTOR_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); - SI_VAR(0) = 0; + GetActorPos(ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0)); + EVT_VAR(0) = 0; loop 16 { - GetActorPos(ACTOR_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); - N(AngleCalculate)(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0)); - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - SI_VAR(3) = SI_VAR(6); + GetActorPos(ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6)); + N(AngleCalculate)(EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0)); + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + EVT_VAR(3) = EVT_VAR(6); sleep 1; } } @@ -892,8 +892,8 @@ EvtSource N(takeTurn_8021F0D8) = SCRIPT({ sleep 1; } } - EnemyDamageTarget(ACTOR_SELF, SI_VAR(0), ((0)), 0, 0, 1, 32); - match SI_VAR(0) { + EnemyDamageTarget(ACTOR_SELF, EVT_VAR(0), ((0)), 0, 0, 1, 32); + match EVT_VAR(0) { HIT_RESULT_HIT, 2 { UseBattleCamPreset(2); SetActorScale(ACTOR_SELF, 1.1, 0.8, 1.0); @@ -903,17 +903,17 @@ EvtSource N(takeTurn_8021F0D8) = SCRIPT({ SetActorRotation(ACTOR_SELF, 0, 0, 0); SetActorDispOffset(ACTOR_SELF, 0, 0, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 40; - SI_VAR(1) = 0; + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 40; + EVT_VAR(1) = 0; SetActorJumpGravity(ACTOR_SELF, 1.8); - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 10, FALSE, TRUE, FALSE); - SI_VAR(0) += 30; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) += 30; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 8, FALSE, TRUE, FALSE); - SI_VAR(0) += 20; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) += 20; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 6, FALSE, TRUE, FALSE); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_goomba_normal_idle); sleep 3; 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 daa19fa9e7..0b6aba1f42 100644 --- a/src/battle/area_kmr_part_1/actor/spiked_goomba.c +++ b/src/battle/area_kmr_part_1/actor/spiked_goomba.c @@ -114,44 +114,44 @@ EvtSource N(init_8021B16C) = SCRIPT({ EvtSource N(idle_8021B1B8) = SCRIPT({ 10: - RandInt(80, SI_VAR(0)); - SI_VAR(0) += 80; - loop SI_VAR(0) { + RandInt(80, EVT_VAR(0)); + EVT_VAR(0) += 80; + loop EVT_VAR(0) { 0: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 0; } sleep 1; } - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 5; + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 5; SetActorIdleSpeed(ACTOR_SELF, 1.0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_8021B120)); - SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetIdleGoal(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); IdleRunToGoal(ACTOR_SELF, 0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_8021B0D4)); loop 20 { 1: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 1; } sleep 1; } - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 5; + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 5; SetActorIdleSpeed(ACTOR_SELF, 1.0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_8021B120)); - SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetIdleGoal(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); IdleRunToGoal(ACTOR_SELF, 0); SetIdleAnimations(ACTOR_SELF, 1, N(idleAnimations_8021B0D4)); loop 80 { 2: - GetStatusFlags(ACTOR_SELF, SI_VAR(1)); - if (SI_VAR(1) & 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(1)); + if (EVT_VAR(1) & 3526656) { sleep 1; goto 2; } @@ -164,49 +164,49 @@ EvtSource N(handleEvent_8021B494) = SCRIPT({ UseIdleAnimation(ACTOR_SELF, FALSE); EnableIdleScript(ACTOR_SELF, FALSE); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); - GetLastEvent(ACTOR_SELF, SI_VAR(0)); - match SI_VAR(0) { + GetLastEvent(ACTOR_SELF, EVT_VAR(0)); + match EVT_VAR(0) { EVENT_HIT_COMBO, EVENT_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; await DoNormalHit; } == EVENT_BURN_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_burn_dead; - SI_VAR(2) = (const) NPC_ANIM_spiked_goomba_default_burn_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_burn_dead; + EVT_VAR(2) = (const) NPC_ANIM_spiked_goomba_default_burn_pain; await DoBurnHit; } == EVENT_BURN_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_burn_dead; - SI_VAR(2) = (const) NPC_ANIM_spiked_goomba_default_burn_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_burn_dead; + EVT_VAR(2) = (const) NPC_ANIM_spiked_goomba_default_burn_pain; await DoBurnHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_burn_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_burn_pain; await DoDeath; return; } == EVENT_SPIN_SMASH_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; await DoSpinSmashHit; } == EVENT_SPIN_SMASH_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; await DoSpinSmashHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_dead; await DoDeath; return; } == EVENT_SHOCK_HIT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_electrocute; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_electrocute; await DoShockHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; await DoJumpBack; JumpToGoal(ACTOR_SELF, 5, FALSE, TRUE, FALSE); SetAnimationRate(ACTOR_SELF, 1, 2.0); @@ -221,26 +221,26 @@ EvtSource N(handleEvent_8021B494) = SCRIPT({ JumpToGoal(ACTOR_SELF, 5, FALSE, TRUE, FALSE); } == EVENT_SHOCK_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_electrocute; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_electrocute; await DoShockHit; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_dead; await DoDeath; return; } == EVENT_STAR_BEAM, 23, EVENT_IMMUNE, EVENT_AIR_LIFT_FAILED { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_idle; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_idle; await DoImmune; } == EVENT_DEATH { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; await DoNormalHit; sleep 10; - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_dead; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_dead; await DoDeath; return; } @@ -254,42 +254,42 @@ EvtSource N(handleEvent_8021B494) = SCRIPT({ HPBarToHome(ACTOR_SELF); } == EVENT_RECOVER_STATUS { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_idle; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_idle; await DoRecover; } == EVENT_SCARE_AWAY { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_run; - SI_VAR(2) = (const) NPC_ANIM_spiked_goomba_default_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_run; + EVT_VAR(2) = (const) NPC_ANIM_spiked_goomba_default_pain; await DoScareAway; return; } == EVENT_BEGIN_AIR_LIFT { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_run; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_run; await DoAirLift; } == EVENT_BLOW_AWAY { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_spiked_goomba_default_pain; await DoBlowAway; return; } == EVENT_SPIKE_TAUNT { - GetStatusFlags(ACTOR_SELF, SI_VAR(0)); - if (SI_VAR(0) !& 3526656) { + GetStatusFlags(ACTOR_SELF, EVT_VAR(0)); + if (EVT_VAR(0) !& 3526656) { SetAnimation(ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_laugh); } sleep 10; - GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetStatusFlags(ACTOR_SELF, SI_VAR(3)); - if (SI_VAR(3) & 524288) { - SI_VAR(1) += 10; + GetActorPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetStatusFlags(ACTOR_SELF, EVT_VAR(3)); + if (EVT_VAR(3) & 524288) { + EVT_VAR(1) += 10; } else { - SI_VAR(1) += 26; + EVT_VAR(1) += 26; } - PlayEffect(0x1A, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x1A, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); sleep 20; } else { @@ -321,27 +321,27 @@ EvtSource N(takeTurn_8021BDDC) = SCRIPT({ sleep 5; SetActorDispOffset(ACTOR_SELF, 0, 0, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk); - EnemyTestTarget(ACTOR_SELF, SI_VAR(0), ((0)), 0, 1, 16); - match SI_VAR(0) { + EnemyTestTarget(ACTOR_SELF, EVT_VAR(0), ((0)), 0, 1, 16); + match EVT_VAR(0) { HIT_RESULT_MISS, HIT_RESULT_LUCKY { - SI_VAR(10) = SI_VAR(0); + EVT_VAR(10) = EVT_VAR(0); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 10; - SI_VAR(1) = 10; - SI_VAR(2) += 3; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 10; + EVT_VAR(1) = 10; + EVT_VAR(2) += 3; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetActorJumpGravity(ACTOR_SELF, 1.2); spawn { - GetActorPos(ACTOR_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); - SI_VAR(0) = 0; + GetActorPos(ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0)); + EVT_VAR(0) = 0; loop 16 { - GetActorPos(ACTOR_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); - N(AngleCalculate)(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0)); - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - SI_VAR(3) = SI_VAR(6); + GetActorPos(ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6)); + N(AngleCalculate)(EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0)); + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + EVT_VAR(3) = EVT_VAR(6); sleep 1; } } @@ -361,24 +361,24 @@ EvtSource N(takeTurn_8021BDDC) = SCRIPT({ SetActorDispOffset(ACTOR_SELF, 0, 7, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_pain); sleep 5; - if (SI_VAR(10) == 5) { - EnemyTestTarget(ACTOR_SELF, SI_VAR(0), ((0x80000000)), 0, 0, 0); + if (EVT_VAR(10) == 5) { + EnemyTestTarget(ACTOR_SELF, EVT_VAR(0), ((0x80000000)), 0, 0, 0); } sleep 5; SetActorDispOffset(ACTOR_SELF, 0, 0, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 20; - SI_VAR(1) = 0; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 20; + EVT_VAR(1) = 0; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetActorJumpGravity(ACTOR_SELF, 2.0); spawn { sleep 4; - SI_VAR(0) = 180; + EVT_VAR(0) = 180; loop 4 { - SI_VAR(0) -= 45; - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); + EVT_VAR(0) -= 45; + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); sleep 1; } SetAnimation(ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk); @@ -409,15 +409,15 @@ EvtSource N(takeTurn_8021BDDC) = SCRIPT({ SetGoalToTarget(ACTOR_SELF); SetActorJumpGravity(ACTOR_SELF, 1.2); spawn { - GetActorPos(ACTOR_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); - SI_VAR(0) = 0; + GetActorPos(ACTOR_SELF, EVT_VAR(1), EVT_VAR(2), EVT_VAR(0)); + EVT_VAR(0) = 0; loop 16 { - GetActorPos(ACTOR_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); - N(AngleCalculate)(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0)); - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - SI_VAR(3) = SI_VAR(6); + GetActorPos(ACTOR_SELF, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6)); + N(AngleCalculate)(EVT_VAR(1), EVT_VAR(2), EVT_VAR(4), EVT_VAR(5), EVT_VAR(0)); + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + EVT_VAR(3) = EVT_VAR(6); sleep 1; } } @@ -433,8 +433,8 @@ EvtSource N(takeTurn_8021BDDC) = SCRIPT({ sleep 1; } } - EnemyDamageTarget(ACTOR_SELF, SI_VAR(0), ((0)), 0, 0, 2, 32); - match SI_VAR(0) { + EnemyDamageTarget(ACTOR_SELF, EVT_VAR(0), ((0)), 0, 0, 2, 32); + match EVT_VAR(0) { HIT_RESULT_HIT, 2 { UseBattleCamPreset(2); SetActorScale(ACTOR_SELF, 1.1, 0.8, 1.0); @@ -444,20 +444,20 @@ EvtSource N(takeTurn_8021BDDC) = SCRIPT({ SetActorRotation(ACTOR_SELF, 0, 0, 0); SetActorDispOffset(ACTOR_SELF, 0, 0, 0); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_idle); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 40; - SI_VAR(1) = 0; + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 40; + EVT_VAR(1) = 0; SetActorJumpGravity(ACTOR_SELF, 1.8); - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 10, FALSE, TRUE, FALSE); - SI_VAR(0) += 30; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) += 30; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 8, FALSE, TRUE, FALSE); - SI_VAR(0) += 20; - SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) += 20; + SetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_SELF, 6, FALSE, TRUE, FALSE); - GetLastDamage(0, SI_VAR(0)); - if (SI_VAR(0) > 0) { + GetLastDamage(0, EVT_VAR(0)); + if (EVT_VAR(0) > 0) { SetAnimation(ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_laugh); sleep 15; } else { 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 f5b10ab95a..3975edc989 100644 --- a/src/battle/area_kmr_part_1/stage/clouds.inc.c +++ b/src/battle/area_kmr_part_1/stage/clouds.inc.c @@ -1,59 +1,59 @@ #include "common/UnkAngleFunc2.inc.c" EvtSource N(clouds1) = SCRIPT({ - SI_VAR(10) = SI_VAR(0); - SI_VAR(7) = SI_VAR(2); - SI_VAR(7) *= 10; + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(7) = EVT_VAR(2); + EVT_VAR(7) *= 10; 0: - SI_VAR(7) += 4; - if (SI_VAR(7) > 3599) { - SI_VAR(7) -= 3600; + EVT_VAR(7) += 4; + if (EVT_VAR(7) > 3599) { + EVT_VAR(7) -= 3600; } - N(UnkAngleFunc2)(SI_VAR(7), SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); - TranslateModel(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - RotateModel(SI_VAR(10), SI_VAR(3), 0, 1, 0); + N(UnkAngleFunc2)(EVT_VAR(7), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + TranslateModel(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + RotateModel(EVT_VAR(10), EVT_VAR(3), 0, 1, 0); sleep 1; goto 0; }); EvtSource N(clouds2) = SCRIPT({ - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(3); - SI_VAR(12) = SI_VAR(4); - SI_VAR(7) = SI_VAR(2); - SI_VAR(7) *= 10; + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(3); + EVT_VAR(12) = EVT_VAR(4); + EVT_VAR(7) = EVT_VAR(2); + EVT_VAR(7) *= 10; 0: - SI_VAR(7) += 4; - if (SI_VAR(7) > 3599) { - SI_VAR(7) -= 3600; + EVT_VAR(7) += 4; + if (EVT_VAR(7) > 3599) { + EVT_VAR(7) -= 3600; } - N(UnkAngleFunc2)(SI_VAR(7), SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); - SI_VAR(1) += (float) SI_VAR(11); - SI_VAR(2) += (float) SI_VAR(12); - TranslateModel(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - RotateModel(SI_VAR(10), SI_VAR(3), 0, 1, 0); + N(UnkAngleFunc2)(EVT_VAR(7), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + EVT_VAR(1) += (float) EVT_VAR(11); + EVT_VAR(2) += (float) EVT_VAR(12); + TranslateModel(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + RotateModel(EVT_VAR(10), EVT_VAR(3), 0, 1, 0); sleep 1; goto 0; }); EvtSource N(clouds3) = SCRIPT({ - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(3); - SI_VAR(12) = SI_VAR(4); - SI_VAR(13) = SI_VAR(5); - SI_VAR(7) = SI_VAR(2); - SI_VAR(7) *= 10; + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(3); + EVT_VAR(12) = EVT_VAR(4); + EVT_VAR(13) = EVT_VAR(5); + EVT_VAR(7) = EVT_VAR(2); + EVT_VAR(7) *= 10; 0: - SI_VAR(7) += 4; - if (SI_VAR(7) > 3599) { - SI_VAR(7) -= 3600; + EVT_VAR(7) += 4; + if (EVT_VAR(7) > 3599) { + EVT_VAR(7) -= 3600; } - N(UnkAngleFunc2)(SI_VAR(7), SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); - SI_VAR(0) += (float) SI_VAR(11); - SI_VAR(1) += (float) SI_VAR(12); - SI_VAR(2) += (float) SI_VAR(13); - TranslateModel(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - RotateModel(SI_VAR(10), SI_VAR(3), 0, 1, 0); + N(UnkAngleFunc2)(EVT_VAR(7), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + EVT_VAR(0) += (float) EVT_VAR(11); + EVT_VAR(1) += (float) EVT_VAR(12); + EVT_VAR(2) += (float) EVT_VAR(13); + TranslateModel(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + RotateModel(EVT_VAR(10), EVT_VAR(3), 0, 1, 0); sleep 1; goto 0; }); 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 c5b0075596..143a797aa0 100644 --- a/src/battle/area_kmr_part_1/stage/kmr_03.c +++ b/src/battle/area_kmr_part_1/stage/kmr_03.c @@ -8,12 +8,12 @@ EvtSource N(beforeBattle_80220188) = SCRIPT({ SetSpriteShading(-1); - SI_VAR(0) = 1; // model - SI_VAR(2) = 0; // speed + EVT_VAR(0) = 1; // model + EVT_VAR(2) = 0; // speed spawn N(clouds1); - SI_VAR(0) = 4; - SI_VAR(2) = 70; + EVT_VAR(0) = 4; + EVT_VAR(2) = 70; spawn N(clouds1); }); 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 a51f198f18..1066584bc9 100644 --- a/src/battle/area_kmr_part_1/stage/kmr_04.c +++ b/src/battle/area_kmr_part_1/stage/kmr_04.c @@ -8,12 +8,12 @@ EvtSource N(beforeBattle_802205D8) = SCRIPT({ SetSpriteShading(-1); - SI_VAR(0) = 1; - SI_VAR(2) = 0; + EVT_VAR(0) = 1; + EVT_VAR(2) = 0; spawn N(clouds1); - SI_VAR(0) = 4; - SI_VAR(2) = 70; + EVT_VAR(0) = 4; + EVT_VAR(2) = 70; spawn N(clouds1); }); 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 9bbc7ca809..bfcc36bbec 100644 --- a/src/battle/area_kmr_part_1/stage/kmr_06.c +++ b/src/battle/area_kmr_part_1/stage/kmr_06.c @@ -11,12 +11,12 @@ EvtSource N(beforeBattle_80220E28) = SCRIPT({ N(UnkFogFunc)(); - SI_VAR(0) = 1; - SI_VAR(2) = 0; + EVT_VAR(0) = 1; + EVT_VAR(2) = 0; spawn N(clouds1); - SI_VAR(0) = 4; - SI_VAR(2) = 70; + EVT_VAR(0) = 4; + EVT_VAR(2) = 70; spawn N(clouds1); }); diff --git a/src/battle/battle.c b/src/battle/battle.c index 8e5545db6d..c6bb9c634d 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -501,7 +501,7 @@ void load_demo_battle(u32 index) { break; } - set_variable(NULL, SI_SAVE_FLAG(1817), 1); + set_variable(NULL, EVT_SAVE_FLAG(1817), 1); gCurrentEncounter.unk_07 = 0; gCurrentEncounter.unk_10 = 0; set_battle_stage(-1); diff --git a/src/battle/item/UseItem.inc.c b/src/battle/item/UseItem.inc.c index 0890531fb3..7bfce3229d 100644 --- a/src/battle/item/UseItem.inc.c +++ b/src/battle/item/UseItem.inc.c @@ -1,8 +1,8 @@ #include "common.h" -/// Provide arg `TRUE` on `SI_VAR(1)` to disable refunding. +/// Provide arg `TRUE` on `EVT_VAR(1)` to disable refunding. EvtSource N(UseItemWithEffect) = SCRIPT({ - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { UseBattleCamPreset(69); // Nice sleep 10; @@ -19,8 +19,8 @@ EvtSource N(UseItemWithEffect) = SCRIPT({ $effectY += 10; $effectY += 2; PlayEffect(0x33, 1, $x, $effectY, $z, 1.0, 30, 0, 0, 0, 0, 0, 0, 0); - MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); - SI_VAR(10) = $x; + MakeItemEntity(EVT_VAR(10), $x, $y, $z, 1, 0); + EVT_VAR(10) = $x; N(GiveRefund)(); sleep $x; @@ -28,7 +28,7 @@ EvtSource N(UseItemWithEffect) = SCRIPT({ sleep 15; N(GiveRefundCleanup)(); - RemoveItemEntity(SI_VAR(10)); + RemoveItemEntity(EVT_VAR(10)); } else { // No refund. @@ -42,11 +42,11 @@ EvtSource N(UseItemWithEffect) = SCRIPT({ $effectY += 10; $effectY += 2; PlayEffect(0x33, 1, $x, $effectY, $z, 1.0, 30, 0, 0, 0, 0, 0, 0, 0); - MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); - SI_VAR(10) = $x; + MakeItemEntity(EVT_VAR(10), $x, $y, $z, 1, 0); + EVT_VAR(10) = $x; sleep 15; - RemoveItemEntity(SI_VAR(10)); + RemoveItemEntity(EVT_VAR(10)); } }); @@ -61,8 +61,8 @@ EvtSource N(UseItem) = SCRIPT({ SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); GetActorPos(ACTOR_PLAYER, $x, $y, $z); $y += 45; - MakeItemEntity(SI_VAR(10), $x, $y, $z, 1, 0); - SI_VAR(14) = $x; + MakeItemEntity(EVT_VAR(10), $x, $y, $z, 1, 0); + EVT_VAR(14) = $x; N(GiveRefund)(); sleep $x; @@ -70,7 +70,7 @@ EvtSource N(UseItem) = SCRIPT({ sleep 15; N(GiveRefundCleanup)(); - RemoveItemEntity(SI_VAR(14)); + RemoveItemEntity(EVT_VAR(14)); }); EvtSource N(PlayerGoHome) = SCRIPT({ diff --git a/src/battle/item/coconut.c b/src/battle/item/coconut.c index f56d54b6dd..243d7723f5 100644 --- a/src/battle/item/coconut.c +++ b/src/battle/item/coconut.c @@ -46,7 +46,7 @@ s32 N(modelCommandList)[] = { }; EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_COCONUT; + EVT_VAR(10) = (const) ITEM_COCONUT; await N(UseItemWithEffect); @@ -57,21 +57,21 @@ EvtSource N(main) = SCRIPT({ PlaySound(SOUND_THROW); sleep 3; - CreateVirtualEntity(SI_VAR(10), N(modelCommandList)); + CreateVirtualEntity(EVT_VAR(10), N(modelCommandList)); $x = 1.0; MultiplyByActorScale($x); - SetVirtualEntityScale(SI_VAR(10), $x, $x, $x); + SetVirtualEntityScale(EVT_VAR(10), $x, $x, $x); GetActorPos(ACTOR_PLAYER, $x, $y, $z); - SI_VAR(3) = 20; - SI_VAR(4) = 42; - SI_VAR(5) = 5; - MultiplyVec3ByActorScale(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - $x += SI_VAR(3); - $y += SI_VAR(4); - $z += SI_VAR(5); - SetVirtualEntityPosition(SI_VAR(10), $x, $y, $z); + EVT_VAR(3) = 20; + EVT_VAR(4) = 42; + EVT_VAR(5) = 5; + MultiplyVec3ByActorScale(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + $x += EVT_VAR(3); + $y += EVT_VAR(4); + $z += EVT_VAR(5); + SetVirtualEntityPosition(EVT_VAR(10), $x, $y, $z); InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); @@ -81,25 +81,25 @@ EvtSource N(main) = SCRIPT({ $x = 0; loop 18 { $x += -60; - SetVirtualEntityRotation(SI_VAR(10), 0, 0, $x); + SetVirtualEntityRotation(EVT_VAR(10), 0, 0, $x); sleep 1; } } - SetVirtualEntityJumpGravity(SI_VAR(10), 0.8); + SetVirtualEntityJumpGravity(EVT_VAR(10), 0.8); $z += 5; - VirtualEntityJumpTo(SI_VAR(10), $x, $y, $z, 18); + VirtualEntityJumpTo(EVT_VAR(10), $x, $y, $z, 18); - GetItemPower(ITEM_COCONUT, $damage, SI_VAR(4)); + GetItemPower(ITEM_COCONUT, $damage, EVT_VAR(4)); ApplyShrinkFromOwner($damage); - ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, $damage, 32); + ItemDamageEnemy(EVT_VAR(9), 0x18000000, 0, $damage, 32); // Bounce off $x += 60; $y += 0; - VirtualEntityJumpTo(SI_VAR(10), $x, $y, $z, 16); + VirtualEntityJumpTo(EVT_VAR(10), $x, $y, $z, 16); - DeleteVirtualEntity(SI_VAR(10)); + DeleteVirtualEntity(EVT_VAR(10)); await N(PlayerGoHome); }); diff --git a/src/battle/item/dizzy_dial.c b/src/battle/item/dizzy_dial.c index 3887aa6746..338b8af0dc 100644 --- a/src/battle/item/dizzy_dial.c +++ b/src/battle/item/dizzy_dial.c @@ -46,7 +46,7 @@ ApiStatus N(func_802A1270_727B80)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_DIZZY_DIAL; + EVT_VAR(10) = (const) ITEM_DIZZY_DIAL; await N(UseItemWithEffect); UseBattleCamPreset(2); MoveBattleCamOver(20); @@ -78,17 +78,17 @@ EvtSource N(main) = SCRIPT({ InitTargetIterator(); 0: SetGoalToTarget(ACTOR_SELF); - ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); - if (SI_VAR(0) == 6) { + ItemCheckHit(EVT_VAR(0), 0x10000000, 0, EVT_VAR(0), 0); + if (EVT_VAR(0) == 6) { goto 1; } - GetItemPower(ITEM_DIZZY_DIAL, SI_VAR(0), SI_VAR(1)); - MakeStatusField(SI_VAR(0), 0x40000, 100, SI_VAR(0)); - func_80252B3C(SI_VAR(0), 0x50000000, SI_VAR(0), 0, 32); + GetItemPower(ITEM_DIZZY_DIAL, EVT_VAR(0), EVT_VAR(1)); + MakeStatusField(EVT_VAR(0), 0x40000, 100, EVT_VAR(0)); + func_80252B3C(EVT_VAR(0), 0x50000000, EVT_VAR(0), 0, 32); 1: sleep 5; - ChooseNextTarget(0, SI_VAR(0)); - if (SI_VAR(0) != -1) { + ChooseNextTarget(0, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { goto 0; } sleep 30; diff --git a/src/battle/item/dried_shroom.c b/src/battle/item/dried_shroom.c index ec6270012b..3f469914ea 100644 --- a/src/battle/item/dried_shroom.c +++ b/src/battle/item/dried_shroom.c @@ -28,23 +28,23 @@ ApiStatus N(func_802A12FC_71CFDC)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_DRIED_SHROOM; + EVT_VAR(10) = (const) ITEM_DRIED_SHROOM; await N(UseItemWithEffect); await N(EatItem); SetAnimation(ACTOR_PLAYER, 0, ANIM_STICK_OUT_TONGUE); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 35; - N(func_802A123C_71CF1C)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - SI_VAR(2) += 5; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 35; + N(func_802A123C_71CF1C)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + EVT_VAR(2) += 5; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1); N(func_802A12FC_71CFDC)(); sleep 30; - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) += 5; - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) += 5; + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); diff --git a/src/battle/item/dusty_hammer.c b/src/battle/item/dusty_hammer.c index 1b8bc065ea..73cfdb6cb4 100644 --- a/src/battle/item/dusty_hammer.c +++ b/src/battle/item/dusty_hammer.c @@ -45,46 +45,46 @@ s32 N(modelCommandList)[] = { }; EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) 0x86; + EVT_VAR(10) = (const) 0x86; await N(UseItemWithEffect); UseBattleCamPreset(3); MoveBattleCamOver(15); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); PlaySound(SOUND_THROW); sleep 3; - CreateVirtualEntity(SI_VAR(10), N(modelCommandList)); - SI_VAR(0) = 1.0; - MultiplyByActorScale(SI_VAR(0)); - SetVirtualEntityScale(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0)); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(3) = 20; - SI_VAR(4) = 42; - SI_VAR(5) = 5; - MultiplyVec3ByActorScale(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) += SI_VAR(3); - SI_VAR(1) += SI_VAR(4); - SI_VAR(2) += SI_VAR(5); - SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); + CreateVirtualEntity(EVT_VAR(10), N(modelCommandList)); + EVT_VAR(0) = 1.0; + MultiplyByActorScale(EVT_VAR(0)); + SetVirtualEntityScale(EVT_VAR(10), EVT_VAR(0), EVT_VAR(0), EVT_VAR(0)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(3) = 20; + EVT_VAR(4) = 42; + EVT_VAR(5) = 5; + MultiplyVec3ByActorScale(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) += EVT_VAR(3); + EVT_VAR(1) += EVT_VAR(4); + EVT_VAR(2) += EVT_VAR(5); + SetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); spawn { - SI_VAR(0) = 0; + EVT_VAR(0) = 0; loop 18 { - SI_VAR(0) += 0xFFFFFFC4; - SetVirtualEntityRotation(SI_VAR(10), 0, 0, SI_VAR(0)); + EVT_VAR(0) += 0xFFFFFFC4; + SetVirtualEntityRotation(EVT_VAR(10), 0, 0, EVT_VAR(0)); sleep 1; } } - SetVirtualEntityJumpGravity(SI_VAR(10), 0.80078125); - SI_VAR(2) += 5; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); - GetItemPower(ITEM_DUSTY_HAMMER, SI_VAR(3), SI_VAR(4)); - ApplyShrinkFromOwner(SI_VAR(3)); - ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, SI_VAR(3), 32); - SI_VAR(0) += 40; - SI_VAR(1) += 10; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - DeleteVirtualEntity(SI_VAR(10)); + SetVirtualEntityJumpGravity(EVT_VAR(10), 0.80078125); + EVT_VAR(2) += 5; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 18); + GetItemPower(ITEM_DUSTY_HAMMER, EVT_VAR(3), EVT_VAR(4)); + ApplyShrinkFromOwner(EVT_VAR(3)); + ItemDamageEnemy(EVT_VAR(9), 0x18000000, 0, EVT_VAR(3), 32); + EVT_VAR(0) += 40; + EVT_VAR(1) += 10; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + DeleteVirtualEntity(EVT_VAR(10)); await N(PlayerGoHome); }); diff --git a/src/battle/item/egg_missile.c b/src/battle/item/egg_missile.c index ca7d39c7eb..ffdcb23234 100644 --- a/src/battle/item/egg_missile.c +++ b/src/battle/item/egg_missile.c @@ -140,36 +140,36 @@ s32 N(modelCommandList)[] = { }; EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_EGG_MISSILE; + EVT_VAR(10) = (const) ITEM_EGG_MISSILE; await N(UseItemWithEffect); UseBattleCamPreset(3); MoveBattleCamOver(15); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); PlaySound(SOUND_THROW); sleep 3; - CreateVirtualEntity(SI_VAR(10), N(modelCommandList)); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 20; - SI_VAR(1) += 42; - SI_VAR(2) += 5; - SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); + CreateVirtualEntity(EVT_VAR(10), N(modelCommandList)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 20; + EVT_VAR(1) += 42; + EVT_VAR(2) += 5; + SetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); spawn { - SI_VAR(0) = 0; + EVT_VAR(0) = 0; loop 18 { - SI_VAR(0) += 60; - SetVirtualEntityRotation(SI_VAR(10), 0, 0, SI_VAR(0)); + EVT_VAR(0) += 60; + SetVirtualEntityRotation(EVT_VAR(10), 0, 0, EVT_VAR(0)); sleep 1; } } - SetVirtualEntityJumpGravity(SI_VAR(10), 1.0); - SI_VAR(2) += 5; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); - DeleteVirtualEntity(SI_VAR(10)); + SetVirtualEntityJumpGravity(EVT_VAR(10), 1.0); + EVT_VAR(2) += 5; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 18); + DeleteVirtualEntity(EVT_VAR(10)); PlaySound(SOUND_UNKNOWN_2010); - N(func_802A123C_71CF1C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + N(func_802A123C_71CF1C)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); spawn { StartRumble(5); ShakeCam(1, 0, 2, 0.75); @@ -177,7 +177,7 @@ EvtSource N(main) = SCRIPT({ ShakeCam(1, 0, 4, 1.2001953125); ShakeCam(1, 0, 2, 0.4501953125); } - GetItemPower(ITEM_EGG_MISSILE, SI_VAR(0), SI_VAR(1)); - ItemDamageEnemy(SI_VAR(0), 0x18000202, 0, SI_VAR(0), 32); + GetItemPower(ITEM_EGG_MISSILE, EVT_VAR(0), EVT_VAR(1)); + ItemDamageEnemy(EVT_VAR(0), 0x18000202, 0, EVT_VAR(0), 32); await N(PlayerGoHome); }); diff --git a/src/battle/item/electro_pop.c b/src/battle/item/electro_pop.c index 04233be68a..d49ab8763b 100644 --- a/src/battle/item/electro_pop.c +++ b/src/battle/item/electro_pop.c @@ -85,30 +85,30 @@ ApiStatus N(func_802A14F0_730A90)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_ELECTRO_POP; + EVT_VAR(10) = (const) ITEM_ELECTRO_POP; await N(UseItemWithEffect); await N(EatItem); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; - PlayEffect(0x57, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + PlayEffect(0x57, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); PlaySound(SOUND_UNKNOWN_379); - GetItemPower(ITEM_VOLT_SHROOM, SI_VAR(0), SI_VAR(1)); + GetItemPower(ITEM_VOLT_SHROOM, EVT_VAR(0), EVT_VAR(1)); N(func_802A123C_7307DC)(); sleep 40; N(func_802A14F0_730A90)(); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 20; - SI_VAR(1) += 25; - N(func_802A133C_7308DC)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); - N(AddFP)(SI_VAR(3)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 20; + EVT_VAR(1) += 25; + N(func_802A133C_7308DC)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + N(AddFP)(EVT_VAR(3)); sleep 10; SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; ShowMessageBox(16, 60); diff --git a/src/battle/item/fire_flower.c b/src/battle/item/fire_flower.c index e5e19e8590..2c4e523fa0 100644 --- a/src/battle/item/fire_flower.c +++ b/src/battle/item/fire_flower.c @@ -35,7 +35,7 @@ ApiStatus N(func_802A1378_716FD8)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_FIRE_FLOWER; + EVT_VAR(10) = (const) ITEM_FIRE_FLOWER; await N(UseItemWithEffect); N(FadeBackgroundToBlack)(); PlaySound(SOUND_UNKNOWN_377); @@ -48,21 +48,21 @@ EvtSource N(main) = SCRIPT({ UseBattleCamPreset(2); MoveBattleCamOver(20); sleep 10; - GetActorPos(ACTOR_PLAYER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) = 40; - MultiplyByActorScale(SI_VAR(0)); - SI_VAR(3) += SI_VAR(0); + GetActorPos(ACTOR_PLAYER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) = 40; + MultiplyByActorScale(EVT_VAR(0)); + EVT_VAR(3) += EVT_VAR(0); spawn { - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 10; + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 10; SetActorSpeed(ACTOR_PLAYER, 2.0); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); - SetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); PlayerRunToGoal(ACTOR_PLAYER); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } spawn { - N(func_802A123C_716E9C)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); + N(func_802A123C_716E9C)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); sleep 25; loop 12 { sleep 1; @@ -78,17 +78,17 @@ EvtSource N(main) = SCRIPT({ InitTargetIterator(); 0: SetGoalToTarget(ACTOR_SELF); - ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); - if (SI_VAR(0) == 6) { + ItemCheckHit(EVT_VAR(0), 0x10000000, 0, EVT_VAR(0), 0); + if (EVT_VAR(0) == 6) { goto 1; } - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetItemPower(ITEM_FIRE_FLOWER, SI_VAR(0), SI_VAR(1)); - ItemDamageEnemy(SI_VAR(0), 0x38000002, 0, SI_VAR(0), 32); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetItemPower(ITEM_FIRE_FLOWER, EVT_VAR(0), EVT_VAR(1)); + ItemDamageEnemy(EVT_VAR(0), 0x38000002, 0, EVT_VAR(0), 32); 1: sleep 5; - ChooseNextTarget(0, SI_VAR(0)); - if (SI_VAR(0) != -1) { + ChooseNextTarget(0, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { goto 0; } N(func_802A1378_716FD8)(); diff --git a/src/battle/item/food.c b/src/battle/item/food.c index 1516a8e4a0..640e14a4c0 100644 --- a/src/battle/item/food.c +++ b/src/battle/item/food.c @@ -108,54 +108,54 @@ EvtSource N(script6) = SCRIPT({ sleep 1; SetActorYaw(ACTOR_PLAYER, 180); sleep 10; - SI_VAR(1) = SI_VAR(15); + EVT_VAR(1) = EVT_VAR(15); await N(UseItem); - SI_VAR(14) = SI_VAR(10); + EVT_VAR(14) = EVT_VAR(10); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); spawn { sleep 20; SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } - CreateVirtualEntity(SI_VAR(10), 0x80283EE8); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 30; - SI_VAR(2) += 5; - SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetVirtualEntityFlags(SI_VAR(10), 32); + CreateVirtualEntity(EVT_VAR(10), 0x80283EE8); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 30; + EVT_VAR(2) += 5; + SetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetVirtualEntityFlags(EVT_VAR(10), 32); spawn { - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 45; - MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0); - SI_VAR(14) = SI_VAR(0); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 45; + MakeItemEntity(EVT_VAR(14), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 0); + EVT_VAR(14) = EVT_VAR(0); loop 25 { - GetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - N(func_802A123C_73330C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + N(func_802A123C_73330C)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } - RemoveItemEntity(SI_VAR(14)); + RemoveItemEntity(EVT_VAR(14)); } InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamOffsetZ(41); SetBattleCamZoom(248); MoveBattleCamOver(25); - SetVirtualEntityJumpGravity(SI_VAR(10), 0.400390625); - SI_VAR(2) += 5; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); + SetVirtualEntityJumpGravity(EVT_VAR(10), 0.400390625); + EVT_VAR(2) += 5; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 25); AddBattleCamZoom(100); MoveBattleCamOver(30); - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); - if (SI_VAR(11) > 0) { - N(func_802A12EC_7333BC)(SI_VAR(11)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); + if (EVT_VAR(11) > 0) { + N(func_802A12EC_7333BC)(EVT_VAR(11)); } sleep 30; - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); sleep 20; SetActorYaw(ACTOR_PLAYER, 150); sleep 1; @@ -172,62 +172,62 @@ EvtSource N(script6) = 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); - N(func_802A15A0_733670)(SI_VAR(10)); + EVT_VAR(14) = EVT_VAR(1); + GetMenuSelection(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(10) = EVT_VAR(1); + N(func_802A15A0_733670)(EVT_VAR(10)); InitTargetIterator(); - GetOwnerTarget(SI_VAR(0), SI_VAR(1)); - if (SI_VAR(0) == ACTOR_PARTNER) { + GetOwnerTarget(EVT_VAR(0), EVT_VAR(1)); + if (EVT_VAR(0) == ACTOR_PARTNER) { await N(script6); return; } - SI_VAR(1) = SI_VAR(14); + EVT_VAR(1) = EVT_VAR(14); await N(UseItemWithEffect); - if (SI_VAR(13) == 0) { + if (EVT_VAR(13) == 0) { await N(EatItem); } else { await N(DrinkItem); } - if (SI_VAR(15) == 1) { + if (EVT_VAR(15) == 1) { SetAnimation(ACTOR_PLAYER, 0, ANIM_STICK_OUT_TONGUE); } - if (SI_VAR(11) > 0) { - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 35; - N(func_802A1378_733448)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); + if (EVT_VAR(11) > 0) { + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 35; + N(func_802A1378_733448)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); } - if (SI_VAR(11) < 0) { - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 35; - N(func_802A1378_733448)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); + if (EVT_VAR(11) < 0) { + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 35; + N(func_802A1378_733448)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); } - if (SI_VAR(12) > 0) { - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 20; - SI_VAR(1) += 25; - N(func_802A1438_733508)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(12)); + if (EVT_VAR(12) > 0) { + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 20; + EVT_VAR(1) += 25; + N(func_802A1438_733508)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(12)); } - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); - if (SI_VAR(11) != 0) { - N(AddHP)(SI_VAR(11)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); + if (EVT_VAR(11) != 0) { + N(AddHP)(EVT_VAR(11)); } - if (SI_VAR(12) != 0) { - N(AddFP)(SI_VAR(12)); + if (EVT_VAR(12) != 0) { + N(AddFP)(EVT_VAR(12)); } - if (SI_VAR(15) == 0) { + if (EVT_VAR(15) == 0) { sleep 10; SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; } else { sleep 30; } - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); diff --git a/src/battle/item/fright_jar.c b/src/battle/item/fright_jar.c index 65b495bbbc..538c8f7be2 100644 --- a/src/battle/item/fright_jar.c +++ b/src/battle/item/fright_jar.c @@ -23,7 +23,7 @@ ApiStatus N(func_802A12D4_72BBE4)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_FRIGHT_JAR; + EVT_VAR(10) = (const) ITEM_FRIGHT_JAR; await N(UseItemWithEffect); N(FadeBackgroundToBlack)(); spawn { @@ -33,17 +33,17 @@ EvtSource N(main) = SCRIPT({ } SetAnimation(ACTOR_PLAYER, 0, ANIM_CROUCH); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_367); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0xFFFFFFD8; - SI_VAR(1) += 5; - SI_VAR(3) = 0.7001953125; + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0xFFFFFFD8; + EVT_VAR(1) += 5; + EVT_VAR(3) = 0.7001953125; loop 5 { - PlayEffect(0x61, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3), 25, 0, 0, 0, 0, 0, 0, 0); - SI_VAR(0) += 5; - SI_VAR(3) += 0.150390625; + PlayEffect(0x61, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3), 25, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(0) += 5; + EVT_VAR(3) += 0.150390625; sleep 7; } - PlayEffect(0x61, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.5, 60, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x61, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1.5, 60, 0, 0, 0, 0, 0, 0, 0); sleep 20; loop 4 { AddBattleCamZoom(0xFFFFFF9C); @@ -58,15 +58,15 @@ EvtSource N(main) = SCRIPT({ InitTargetIterator(); 0: SetGoalToTarget(ACTOR_SELF); - ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); - if (SI_VAR(0) == 6) { + ItemCheckHit(EVT_VAR(0), 0x10000000, 0, EVT_VAR(0), 0); + if (EVT_VAR(0) == 6) { goto 1; } func_80269EAC(21); - ItemAfflictEnemy(SI_VAR(0), 0x70001000, 0, 100, 0, 32); + ItemAfflictEnemy(EVT_VAR(0), 0x70001000, 0, 100, 0, 32); 1: - ChooseNextTarget(0, SI_VAR(0)); - if (SI_VAR(0) != -1) { + ChooseNextTarget(0, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { goto 0; } sleep 10; diff --git a/src/battle/item/hustle_drink.c b/src/battle/item/hustle_drink.c index 5f787204a8..1d7e445210 100644 --- a/src/battle/item/hustle_drink.c +++ b/src/battle/item/hustle_drink.c @@ -37,17 +37,17 @@ ApiStatus N(func_802A12C4_726224)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_HUSTLE_DRINK; + EVT_VAR(10) = (const) ITEM_HUSTLE_DRINK; await N(UseItemWithEffect); await N(DrinkItem); SetAnimation(ACTOR_PLAYER, 0, ANIM_SQUISH); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 5); N(func_802A12C4_726224)(); N(func_802A123C_72619C)(); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; UseBattleCamPreset(13); BattleCamTargetActor(ACTOR_SELF); MoveBattleCamOver(20); @@ -102,8 +102,8 @@ EvtSource N(main) = SCRIPT({ } loop 10 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_369); - PlayEffect(0x6, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - PlayEffect(0x6, 1, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x6, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x6, 1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); sleep 4; } sleep 10; diff --git a/src/battle/item/insecticide_herb.c b/src/battle/item/insecticide_herb.c index bd3f7967ee..7d364e9861 100644 --- a/src/battle/item/insecticide_herb.c +++ b/src/battle/item/insecticide_herb.c @@ -94,58 +94,58 @@ s32 N(modelCommandList)[] = { }; EvtSource script = SCRIPT({ - SI_VAR(10) = (const) ITEM_INSECTICIDE_HERB; + EVT_VAR(10) = (const) ITEM_INSECTICIDE_HERB; await N(UseItemWithEffect); UseBattleCamPreset(3); MoveBattleCamOver(15); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); PlaySound(SOUND_THROW); sleep 3; - CreateVirtualEntity(SI_VAR(10), N(modelCommandList)); - SI_VAR(0) = 1.0; - MultiplyByActorScale(SI_VAR(0)); - SetVirtualEntityScale(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0)); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(3) = 20; - SI_VAR(4) = 42; - SI_VAR(5) = 5; - MultiplyVec3ByActorScale(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) += SI_VAR(3); - SI_VAR(1) += SI_VAR(4); - SI_VAR(2) += SI_VAR(5); - SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); + CreateVirtualEntity(EVT_VAR(10), N(modelCommandList)); + EVT_VAR(0) = 1.0; + MultiplyByActorScale(EVT_VAR(0)); + SetVirtualEntityScale(EVT_VAR(10), EVT_VAR(0), EVT_VAR(0), EVT_VAR(0)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(3) = 20; + EVT_VAR(4) = 42; + EVT_VAR(5) = 5; + MultiplyVec3ByActorScale(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) += EVT_VAR(3); + EVT_VAR(1) += EVT_VAR(4); + EVT_VAR(2) += EVT_VAR(5); + SetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); spawn { - SI_VAR(0) = 0; + EVT_VAR(0) = 0; loop 18 { - SI_VAR(0) += 0xFFFFFFC4; - SetVirtualEntityRotation(SI_VAR(10), 0, 0, SI_VAR(0)); + EVT_VAR(0) += 0xFFFFFFC4; + SetVirtualEntityRotation(EVT_VAR(10), 0, 0, EVT_VAR(0)); sleep 1; } } - SetVirtualEntityJumpGravity(SI_VAR(10), 0.80078125); - SI_VAR(2) += 5; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); - PlayEffect(0x7, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - SI_VAR(0) -= 10; - PlayEffect(0x7, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - SI_VAR(0) += 20; - PlayEffect(0x7, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + SetVirtualEntityJumpGravity(EVT_VAR(10), 0.80078125); + EVT_VAR(2) += 5; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 18); + PlayEffect(0x7, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(0) -= 10; + PlayEffect(0x7, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(0) += 20; + PlayEffect(0x7, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); spawn { - N(func_802A12E0_72AA30)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + N(func_802A12E0_72AA30)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 3; - N(func_802A12E0_72AA30)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + N(func_802A12E0_72AA30)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 3; - N(func_802A12E0_72AA30)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + N(func_802A12E0_72AA30)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); N(func_802A123C_72A98C)(); - DeleteVirtualEntity(SI_VAR(10)); - if (SI_VAR(9) == 0) { - ItemDamageEnemy(SI_VAR(0), 0, 0, 0, 32); + DeleteVirtualEntity(EVT_VAR(10)); + if (EVT_VAR(9) == 0) { + ItemDamageEnemy(EVT_VAR(0), 0, 0, 0, 32); } else { InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); diff --git a/src/battle/item/life_shroom.c b/src/battle/item/life_shroom.c index f23c90346c..4e2f2a1765 100644 --- a/src/battle/item/life_shroom.c +++ b/src/battle/item/life_shroom.c @@ -97,54 +97,54 @@ EvtSource N(script6) = SCRIPT({ sleep 1; SetActorYaw(ACTOR_PLAYER, 180); sleep 10; - SI_VAR(1) = SI_VAR(15); + EVT_VAR(1) = EVT_VAR(15); await N(UseItem); - SI_VAR(14) = SI_VAR(10); + EVT_VAR(14) = EVT_VAR(10); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); spawn { sleep 20; SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } - CreateVirtualEntity(SI_VAR(10), 0x80283EE8); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 30; - SI_VAR(2) += 5; - SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetVirtualEntityFlags(SI_VAR(10), 32); + CreateVirtualEntity(EVT_VAR(10), 0x80283EE8); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 30; + EVT_VAR(2) += 5; + SetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetVirtualEntityFlags(EVT_VAR(10), 32); spawn { - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 45; - MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0); - SI_VAR(14) = SI_VAR(0); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 45; + MakeItemEntity(EVT_VAR(14), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 0); + EVT_VAR(14) = EVT_VAR(0); loop 25 { - GetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - N(func_802A123C_72E76C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + N(func_802A123C_72E76C)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } - RemoveItemEntity(SI_VAR(14)); + RemoveItemEntity(EVT_VAR(14)); } InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamOffsetZ(41); SetBattleCamZoom(248); MoveBattleCamOver(25); - SetVirtualEntityJumpGravity(SI_VAR(10), 0.400390625); - SI_VAR(2) += 5; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); + SetVirtualEntityJumpGravity(EVT_VAR(10), 0.400390625); + EVT_VAR(2) += 5; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 25); AddBattleCamZoom(100); MoveBattleCamOver(30); - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); - if (SI_VAR(11) > 0) { - N(func_802A12EC_72E81C)(SI_VAR(11)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); + if (EVT_VAR(11) > 0) { + N(func_802A12EC_72E81C)(EVT_VAR(11)); } sleep 30; - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); sleep 20; SetActorYaw(ACTOR_PLAYER, 150); sleep 1; @@ -161,33 +161,33 @@ EvtSource N(script6) = 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); - N(func_802A1484_72E9B4)(SI_VAR(10)); + EVT_VAR(15) = EVT_VAR(1); + GetMenuSelection(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(10) = EVT_VAR(1); + N(func_802A1484_72E9B4)(EVT_VAR(10)); InitTargetIterator(); - GetOwnerTarget(SI_VAR(0), SI_VAR(1)); - if (SI_VAR(0) == ACTOR_PARTNER) { + GetOwnerTarget(EVT_VAR(0), EVT_VAR(1)); + if (EVT_VAR(0) == ACTOR_PARTNER) { await N(script6); return; } - SI_VAR(10) = (const) ITEM_LIFE_SHROOM; - SI_VAR(1) = SI_VAR(15); + EVT_VAR(10) = (const) ITEM_LIFE_SHROOM; + EVT_VAR(1) = EVT_VAR(15); await N(UseItemWithEffect); await N(EatItem); N(func_802A1438_72E968)(); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 35; - N(func_802A1378_72E8A8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 35; + N(func_802A1378_72E8A8)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 10; SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); diff --git a/src/battle/item/mushroom.c b/src/battle/item/mushroom.c index 776947b383..6770179ce9 100644 --- a/src/battle/item/mushroom.c +++ b/src/battle/item/mushroom.c @@ -96,54 +96,54 @@ EvtSource N(script6) = SCRIPT({ sleep 1; SetActorYaw(ACTOR_PLAYER, 180); sleep 10; - SI_VAR(1) = SI_VAR(15); + EVT_VAR(1) = EVT_VAR(15); await N(UseItem); - SI_VAR(14) = SI_VAR(10); + EVT_VAR(14) = EVT_VAR(10); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); spawn { sleep 20; SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } - CreateVirtualEntity(SI_VAR(10), 0x80283EE8); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 30; - SI_VAR(2) += 5; - SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetVirtualEntityFlags(SI_VAR(10), 32); + CreateVirtualEntity(EVT_VAR(10), 0x80283EE8); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 30; + EVT_VAR(2) += 5; + SetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetVirtualEntityFlags(EVT_VAR(10), 32); spawn { - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 45; - MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0); - SI_VAR(14) = SI_VAR(0); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 45; + MakeItemEntity(EVT_VAR(14), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 0); + EVT_VAR(14) = EVT_VAR(0); loop 25 { - GetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - N(func_802A123C_715A8C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + N(func_802A123C_715A8C)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } - RemoveItemEntity(SI_VAR(14)); + RemoveItemEntity(EVT_VAR(14)); } InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamOffsetZ(41); SetBattleCamZoom(248); MoveBattleCamOver(25); - SetVirtualEntityJumpGravity(SI_VAR(10), 0.400390625); - SI_VAR(2) += 5; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); + SetVirtualEntityJumpGravity(EVT_VAR(10), 0.400390625); + EVT_VAR(2) += 5; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 25); AddBattleCamZoom(100); MoveBattleCamOver(30); - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); - if (SI_VAR(11) > 0) { - N(func_802A12EC_715B3C)(SI_VAR(11)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); + if (EVT_VAR(11) > 0) { + N(func_802A12EC_715B3C)(EVT_VAR(11)); } sleep 30; - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); sleep 20; SetActorYaw(ACTOR_PLAYER, 150); sleep 1; @@ -160,52 +160,52 @@ EvtSource N(script6) = 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); - N(func_802A15A0_715DF0)(SI_VAR(10)); + EVT_VAR(14) = EVT_VAR(1); + GetMenuSelection(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(10) = EVT_VAR(1); + N(func_802A15A0_715DF0)(EVT_VAR(10)); InitTargetIterator(); - GetOwnerTarget(SI_VAR(0), SI_VAR(1)); - if (SI_VAR(0) == ACTOR_PARTNER) { + GetOwnerTarget(EVT_VAR(0), EVT_VAR(1)); + if (EVT_VAR(0) == ACTOR_PARTNER) { await N(script6); return; } - SI_VAR(1) = SI_VAR(14); + EVT_VAR(1) = EVT_VAR(14); await N(UseItemWithEffect); await N(EatItem); - if (SI_VAR(15) == 1) { + if (EVT_VAR(15) == 1) { SetAnimation(ACTOR_PLAYER, 0, ANIM_STICK_OUT_TONGUE); } - if (SI_VAR(11) > 0) { - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 35; - N(func_802A1378_715BC8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); + if (EVT_VAR(11) > 0) { + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 35; + N(func_802A1378_715BC8)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); } - if (SI_VAR(12) > 0) { - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 20; - SI_VAR(1) += 25; - N(func_802A1438_715C88)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(12)); + if (EVT_VAR(12) > 0) { + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 20; + EVT_VAR(1) += 25; + N(func_802A1438_715C88)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(12)); } - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); - if (SI_VAR(11) != 0) { - N(AddHP)(SI_VAR(11)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); + if (EVT_VAR(11) != 0) { + N(AddHP)(EVT_VAR(11)); } - if (SI_VAR(12) != 0) { - N(AddFP)(SI_VAR(12)); + if (EVT_VAR(12) != 0) { + N(AddFP)(EVT_VAR(12)); } - if (SI_VAR(15) == 0) { + if (EVT_VAR(15) == 0) { sleep 10; SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; } else { sleep 30; } - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); diff --git a/src/battle/item/mystery.c b/src/battle/item/mystery.c index 2f6f5eccbc..76a67499b0 100644 --- a/src/battle/item/mystery.c +++ b/src/battle/item/mystery.c @@ -274,7 +274,7 @@ s32 N(D_802A229C_72D84C)[8] = { }; EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_MYSTERY; + EVT_VAR(10) = (const) ITEM_MYSTERY; await N(UseItemWithEffect); spawn { sleep 220; @@ -283,38 +283,38 @@ EvtSource N(main) = SCRIPT({ PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_368); N(func_802A13E4_72C994)(); sleep 2; - if (SI_VAR(0) != ITEM_PEBBLE) { + if (EVT_VAR(0) != ITEM_PEBBLE) { jump UseMystery; return; } - CreateVirtualEntity(SI_VAR(10), N(modelCommandList)); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 150; - SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); + CreateVirtualEntity(EVT_VAR(10), N(modelCommandList)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 150; + SetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetOwnerTarget(0, 0); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); spawn { - SI_VAR(0) = 0; + EVT_VAR(0) = 0; loop 18 { - SI_VAR(0) += 0xFFFFFFC4; - SetVirtualEntityRotation(SI_VAR(10), 0, 0, SI_VAR(0)); + EVT_VAR(0) += 0xFFFFFFC4; + SetVirtualEntityRotation(EVT_VAR(10), 0, 0, EVT_VAR(0)); sleep 1; } } - SetVirtualEntityJumpGravity(SI_VAR(10), 0.6005859375); - SI_VAR(2) += 5; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 12); + SetVirtualEntityJumpGravity(EVT_VAR(10), 0.6005859375); + EVT_VAR(2) += 5; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 12); spawn { - SI_VAR(0) += 60; - SI_VAR(1) += 0; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 16); - DeleteVirtualEntity(SI_VAR(10)); + EVT_VAR(0) += 60; + EVT_VAR(1) += 0; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 16); + DeleteVirtualEntity(EVT_VAR(10)); } SetTargetActor(ACTOR_SELF, 0); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - N(func_802A188C_72CE3C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + N(func_802A188C_72CE3C)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetBattleFlagBits(32, 1); DispatchDamagePlayerEvent(1, EVENT_HIT); }); diff --git a/src/battle/item/pebble.c b/src/battle/item/pebble.c index 9426ed824c..0fa6b9b72f 100644 --- a/src/battle/item/pebble.c +++ b/src/battle/item/pebble.c @@ -45,46 +45,46 @@ s32 N(modelCommandList)[] = { }; EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_PEBBLE; + EVT_VAR(10) = (const) ITEM_PEBBLE; await N(UseItemWithEffect); UseBattleCamPreset(3); MoveBattleCamOver(15); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); PlaySound(SOUND_THROW); sleep 3; - CreateVirtualEntity(SI_VAR(10), N(modelCommandList)); - SI_VAR(0) = 1.0; - MultiplyByActorScale(SI_VAR(0)); - SetVirtualEntityScale(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0)); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(3) = 20; - SI_VAR(4) = 42; - SI_VAR(5) = 5; - MultiplyVec3ByActorScale(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) += SI_VAR(3); - SI_VAR(1) += SI_VAR(4); - SI_VAR(2) += SI_VAR(5); - SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); + CreateVirtualEntity(EVT_VAR(10), N(modelCommandList)); + EVT_VAR(0) = 1.0; + MultiplyByActorScale(EVT_VAR(0)); + SetVirtualEntityScale(EVT_VAR(10), EVT_VAR(0), EVT_VAR(0), EVT_VAR(0)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(3) = 20; + EVT_VAR(4) = 42; + EVT_VAR(5) = 5; + MultiplyVec3ByActorScale(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) += EVT_VAR(3); + EVT_VAR(1) += EVT_VAR(4); + EVT_VAR(2) += EVT_VAR(5); + SetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); spawn { - SI_VAR(0) = 0; + EVT_VAR(0) = 0; loop 18 { - SI_VAR(0) += 0xFFFFFFC4; - SetVirtualEntityRotation(SI_VAR(10), 0, 0, SI_VAR(0)); + EVT_VAR(0) += 0xFFFFFFC4; + SetVirtualEntityRotation(EVT_VAR(10), 0, 0, EVT_VAR(0)); sleep 1; } } - SetVirtualEntityJumpGravity(SI_VAR(10), 0.80078125); - SI_VAR(2) += 5; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); - GetItemPower(ITEM_PEBBLE, SI_VAR(3), SI_VAR(4)); - ApplyShrinkFromOwner(SI_VAR(3)); - ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, SI_VAR(3), 32); - SI_VAR(0) += 60; - SI_VAR(1) += 0; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 16); - DeleteVirtualEntity(SI_VAR(10)); + SetVirtualEntityJumpGravity(EVT_VAR(10), 0.80078125); + EVT_VAR(2) += 5; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 18); + GetItemPower(ITEM_PEBBLE, EVT_VAR(3), EVT_VAR(4)); + ApplyShrinkFromOwner(EVT_VAR(3)); + ItemDamageEnemy(EVT_VAR(9), 0x18000000, 0, EVT_VAR(3), 32); + EVT_VAR(0) += 60; + EVT_VAR(1) += 0; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 16); + DeleteVirtualEntity(EVT_VAR(10)); await N(PlayerGoHome); }); diff --git a/src/battle/item/please_come_back.c b/src/battle/item/please_come_back.c index 3225440eea..edc9a1753b 100644 --- a/src/battle/item/please_come_back.c +++ b/src/battle/item/please_come_back.c @@ -5,7 +5,7 @@ #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_DIZZY_DIAL; + EVT_VAR(10) = (const) ITEM_DIZZY_DIAL; await N(UseItemWithEffect); SetGoalToHome(ACTOR_PLAYER); SetJumpAnimations(ACTOR_PLAYER, 0, ANIM_MIDAIR_STILL, ANIM_MIDAIR, ANIM_10009); diff --git a/src/battle/item/pow_block.c b/src/battle/item/pow_block.c index 25077d420d..533f0ff7e3 100644 --- a/src/battle/item/pow_block.c +++ b/src/battle/item/pow_block.c @@ -48,11 +48,11 @@ ApiStatus N(func_802A1318_718B68)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_P_O_W_BLOCK; + EVT_VAR(10) = (const) ITEM_P_O_W_BLOCK; await N(UseItemWithEffect); sleep 10; MakeEntity(0x802EA2E0, -40, 60, 0, 0, MAKE_ENTITY_END); - SI_VAR(10) = SI_VAR(0); + EVT_VAR(10) = EVT_VAR(0); N(func_802A1318_718B68)(); PlayEffect(0x7, 2, -40, 60, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x7, 2, -30, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -83,16 +83,16 @@ EvtSource N(main) = SCRIPT({ ShakeCam(1, 0, 2, 0.5); ShakeCam(1, 0, 2, 0.2001953125); } - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 30; + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 30; SetActorSpeed(ACTOR_PLAYER, 4.0); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); - SetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); PlayerRunToGoal(ACTOR_PLAYER); sleep 5; SetJumpAnimations(ACTOR_PLAYER, 0, ANIM_MIDAIR_STILL, ANIM_MIDAIR, ANIM_10009); SetActorJumpGravity(ACTOR_PLAYER, 0.6005859375); - SetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); func_80273444(20, 0, 0); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); UseBattleCamPreset(3); @@ -100,17 +100,17 @@ EvtSource N(main) = SCRIPT({ InitTargetIterator(); 0: SetGoalToTarget(ACTOR_SELF); - ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); - if (SI_VAR(0) == 6) { + ItemCheckHit(EVT_VAR(0), 0x10000000, 0, EVT_VAR(0), 0); + if (EVT_VAR(0) == 6) { goto 1; } - GetItemPower(ITEM_P_O_W_BLOCK, SI_VAR(3), SI_VAR(4)); - ApplyShrinkFromOwner(SI_VAR(3)); + GetItemPower(ITEM_P_O_W_BLOCK, EVT_VAR(3), EVT_VAR(4)); + ApplyShrinkFromOwner(EVT_VAR(3)); func_80269EAC(22); - ItemDamageEnemy(SI_VAR(0), 0x38000400, 0, SI_VAR(3), 32); + ItemDamageEnemy(EVT_VAR(0), 0x38000400, 0, EVT_VAR(3), 32); 1: - ChooseNextTarget(0, SI_VAR(0)); - if (SI_VAR(0) != -1) { + ChooseNextTarget(0, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { goto 0; } PlayEffect(0x7, 2, -70, 60, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); diff --git a/src/battle/item/repel_gel.c b/src/battle/item/repel_gel.c index dfab511cb6..08c7037ef4 100644 --- a/src/battle/item/repel_gel.c +++ b/src/battle/item/repel_gel.c @@ -17,17 +17,17 @@ ApiStatus N(func_802A123C_72DDAC)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_REPEL_GEL; + EVT_VAR(10) = (const) ITEM_REPEL_GEL; await N(UseItemWithEffect); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_375); SetAnimation(ACTOR_PLAYER, 0, ANIM_30008); sleep 45; SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; - PlayEffect(0x33, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + PlayEffect(0x33, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_376); - GetItemPower(ITEM_REPEL_GEL, SI_VAR(0), SI_VAR(1)); + GetItemPower(ITEM_REPEL_GEL, EVT_VAR(0), EVT_VAR(1)); N(func_802A123C_72DDAC)(); sleep 20; ShowMessageBox(17, 60); diff --git a/src/battle/item/shooting_star.c b/src/battle/item/shooting_star.c index 7839db1442..cff917dda4 100644 --- a/src/battle/item/shooting_star.c +++ b/src/battle/item/shooting_star.c @@ -94,7 +94,7 @@ ApiStatus N(func_802A14D4_71DC44)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_SHOOTING_STAR; + EVT_VAR(10) = (const) ITEM_SHOOTING_STAR; await N(UseItemWithEffect); spawn { sleep 5; @@ -103,27 +103,27 @@ EvtSource N(main) = SCRIPT({ } N(func_802A1444_71DBB4)(); spawn { - SI_VAR(0) = 0; + EVT_VAR(0) = 0; loop 10 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_259); N(func_802A123C_71D9AC)(); - SI_VAR(0) += 1; + EVT_VAR(0) += 1; sleep 5; PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_25A); N(func_802A123C_71D9AC)(); - SI_VAR(0) += 1; + EVT_VAR(0) += 1; sleep 5; } } spawn { - SI_VAR(0) = 0; + EVT_VAR(0) = 0; sleep 50; loop 10 { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_25C); - SI_VAR(0) += 1; + EVT_VAR(0) += 1; sleep 5; PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_25D); - SI_VAR(0) += 1; + EVT_VAR(0) += 1; sleep 5; } } @@ -140,18 +140,18 @@ EvtSource N(main) = SCRIPT({ InitTargetIterator(); 0: SetGoalToTarget(ACTOR_SELF); - ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); - if (SI_VAR(0) == 6) { + ItemCheckHit(EVT_VAR(0), 0x10000000, 0, EVT_VAR(0), 0); + if (EVT_VAR(0) == 6) { goto 1; } - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - N(func_802A1388_71DAF8)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetItemPower(ITEM_SHOOTING_STAR, SI_VAR(0), SI_VAR(1)); - ItemDamageEnemy(SI_VAR(0), 0x38000100, 0, SI_VAR(0), 32); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + N(func_802A1388_71DAF8)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetItemPower(ITEM_SHOOTING_STAR, EVT_VAR(0), EVT_VAR(1)); + ItemDamageEnemy(EVT_VAR(0), 0x38000100, 0, EVT_VAR(0), 32); 1: sleep 10; - ChooseNextTarget(0, SI_VAR(0)); - if (SI_VAR(0) != -1) { + ChooseNextTarget(0, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { goto 0; } sleep 20; diff --git a/src/battle/item/sleepy_sheep.c b/src/battle/item/sleepy_sheep.c index 23f903f1c0..1911c65181 100644 --- a/src/battle/item/sleepy_sheep.c +++ b/src/battle/item/sleepy_sheep.c @@ -336,7 +336,7 @@ s32 N(modelCommandList)[] = { }; EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_SLEEPY_SHEEP; + EVT_VAR(10) = (const) ITEM_SLEEPY_SHEEP; await N(UseItemWithEffect); UseBattleCamPreset(19); SetBattleCamTarget(0xFFFFFFBD, 0xFFFFFFF1, 0xFFFFFFFB); @@ -366,9 +366,9 @@ EvtSource N(main) = SCRIPT({ } sleep 20; SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 32; - ShowEmote(0, EMOTE_QUESTION, -45, 20, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 32; + ShowEmote(0, EMOTE_QUESTION, -45, 20, 2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); sleep 30; SetActorYaw(ACTOR_PLAYER, 30); sleep 1; @@ -395,8 +395,8 @@ EvtSource N(main) = SCRIPT({ sleep 8; SetJumpAnimations(ACTOR_PLAYER, 0, ANIM_1002B, ANIM_1002B, ANIM_MIDAIR); SetActorJumpGravity(ACTOR_PLAYER, 1.80078125); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetGoalPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); func_80273444(15, 0, 0); spawn { sleep 5; @@ -413,21 +413,21 @@ EvtSource N(main) = SCRIPT({ SetActorYaw(ACTOR_PLAYER, 0); } sleep 40; - CreateVirtualEntity(SI_VAR(10), N(modelCommandList)); - SI_VAR(7) = 0xFFFFFF38; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SetVirtualEntityPosition(SI_VAR(10), SI_VAR(7), SI_VAR(8), SI_VAR(9)); - SetVirtualEntityScale(SI_VAR(10), 0.7109375, 0.7109375, 0.7109375); - SetVirtualEntityMoveSpeed(SI_VAR(10), 7.0); - SetVirtualEntityJumpGravity(SI_VAR(10), 1.400390625); + CreateVirtualEntity(EVT_VAR(10), N(modelCommandList)); + EVT_VAR(7) = 0xFFFFFF38; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + SetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(7), EVT_VAR(8), EVT_VAR(9)); + SetVirtualEntityScale(EVT_VAR(10), 0.7109375, 0.7109375, 0.7109375); + SetVirtualEntityMoveSpeed(EVT_VAR(10), 7.0); + SetVirtualEntityJumpGravity(EVT_VAR(10), 1.400390625); SetOwnerTarget(0, 0); SetGoalToTarget(ACTOR_PLAYER); - GetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 60; - VirtualEntityMoveTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); - GetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); + GetGoalPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 60; + VirtualEntityMoveTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0); + GetGoalPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0); PlaySoundAtActor(ACTOR_PLAYER, SOUND_HIT_BLOCK); spawn { SetAnimation(ACTOR_PLAYER, 0, ANIM_SHOCK_STILL); @@ -439,26 +439,26 @@ EvtSource N(main) = SCRIPT({ sleep 1; SetActorScale(ACTOR_PLAYER, 1.0, 1.0, 1.0); } - PlayEffect(0x6, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x6, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); sleep 2; - SetVirtualEntityJumpGravity(SI_VAR(10), 1.400390625); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 60; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); - PlayEffect(0x6, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + SetVirtualEntityJumpGravity(EVT_VAR(10), 1.400390625); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 60; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0); + PlayEffect(0x6, 2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); - SI_VAR(0) += 20; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); - PlayEffect(0x6, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - SI_VAR(0) += 10; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); - PlayEffect(0x6, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(0) += 20; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0); + PlayEffect(0x6, 2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(0) += 10; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0); + PlayEffect(0x6, 2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); sleep 5; spawn { - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 270; - VirtualEntityMoveTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); - DeleteVirtualEntity(SI_VAR(10)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 270; + VirtualEntityMoveTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0); + DeleteVirtualEntity(EVT_VAR(10)); } sleep 30; UseBattleCamPreset(3); @@ -466,17 +466,17 @@ EvtSource N(main) = SCRIPT({ InitTargetIterator(); 0: SetGoalToTarget(ACTOR_SELF); - ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); - if (SI_VAR(0) == 6) { + ItemCheckHit(EVT_VAR(0), 0x10000000, 0, EVT_VAR(0), 0); + if (EVT_VAR(0) == 6) { goto 1; } - GetItemPower(ITEM_SLEEPY_SHEEP, SI_VAR(0), SI_VAR(1)); - MakeStatusField(SI_VAR(0), 4096, 100, SI_VAR(0)); - func_80252B3C(SI_VAR(0), 0x50000000, SI_VAR(0), 0, 32); + GetItemPower(ITEM_SLEEPY_SHEEP, EVT_VAR(0), EVT_VAR(1)); + MakeStatusField(EVT_VAR(0), 4096, 100, EVT_VAR(0)); + func_80252B3C(EVT_VAR(0), 0x50000000, EVT_VAR(0), 0, 32); 1: sleep 5; - ChooseNextTarget(0, SI_VAR(0)); - if (SI_VAR(0) != -1) { + ChooseNextTarget(0, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { goto 0; } sleep 30; diff --git a/src/battle/item/snowman_doll.c b/src/battle/item/snowman_doll.c index 1e17d44af3..ac6f69e1fc 100644 --- a/src/battle/item/snowman_doll.c +++ b/src/battle/item/snowman_doll.c @@ -36,18 +36,18 @@ ApiStatus N(func_802A13B8_71C1E8)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_SNOWMAN_DOLL; + EVT_VAR(10) = (const) ITEM_SNOWMAN_DOLL; await N(UseItemWithEffect); N(FadeBackgroundToBlack)(); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_363); spawn { loop 45 { - RandInt(300, SI_VAR(0)); - SI_VAR(0) -= 150; - SI_VAR(1) = 170; - RandInt(50, SI_VAR(2)); - SI_VAR(2) -= 25; - PlayEffect(0xE, SI_VAR(0), SI_VAR(1), SI_VAR(2), 60, 0, 0, 0, 0, 0, 0, 0, 0, 0); + RandInt(300, EVT_VAR(0)); + EVT_VAR(0) -= 150; + EVT_VAR(1) = 170; + RandInt(50, EVT_VAR(2)); + EVT_VAR(2) -= 25; + PlayEffect(0xE, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 60, 0, 0, 0, 0, 0, 0, 0, 0, 0); sleep 2; } } @@ -83,18 +83,18 @@ EvtSource N(main) = SCRIPT({ InitTargetIterator(); 0: SetGoalToTarget(ACTOR_SELF); - ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); - if (SI_VAR(0) == 6) { + ItemCheckHit(EVT_VAR(0), 0x10000000, 0, EVT_VAR(0), 0); + if (EVT_VAR(0) == 6) { goto 1; } - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - N(func_802A123C_71C06C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetItemPower(ITEM_SNOWMAN_DOLL, SI_VAR(0), SI_VAR(1)); - ItemDamageEnemy(SI_VAR(0), 0x38000008, 0, SI_VAR(0), 32); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + N(func_802A123C_71C06C)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetItemPower(ITEM_SNOWMAN_DOLL, EVT_VAR(0), EVT_VAR(1)); + ItemDamageEnemy(EVT_VAR(0), 0x38000008, 0, EVT_VAR(0), 32); sleep 5; 1: - ChooseNextTarget(0, SI_VAR(0)); - if (SI_VAR(0) != -1) { + ChooseNextTarget(0, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { goto 0; } SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); diff --git a/src/battle/item/stone_cap.c b/src/battle/item/stone_cap.c index 95718f0707..4befed314a 100644 --- a/src/battle/item/stone_cap.c +++ b/src/battle/item/stone_cap.c @@ -48,15 +48,15 @@ ApiStatus N(func_802A123C_7217DC)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_STONE_CAP; + EVT_VAR(10) = (const) ITEM_STONE_CAP; await N(UseItemWithEffect); PlaySound(SOUND_UNKNOWN_361); SetAnimation(ACTOR_PLAYER, 0, ANIM_30009); sleep 30; SetAnimation(ACTOR_PLAYER, 0, ANIM_CROUCH); - GetItemPower(ITEM_STONE_CAP, SI_VAR(0), SI_VAR(1)); + GetItemPower(ITEM_STONE_CAP, EVT_VAR(0), EVT_VAR(1)); PlaySound(SOUND_UNKNOWN_362); N(func_802A123C_7217DC)(); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 20; }); diff --git a/src/battle/item/stop_watch.c b/src/battle/item/stop_watch.c index 262eb0c47a..ac350fbd06 100644 --- a/src/battle/item/stop_watch.c +++ b/src/battle/item/stop_watch.c @@ -23,7 +23,7 @@ ApiStatus N(func_802A12D4_7270A4)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_STOP_WATCH; + EVT_VAR(10) = (const) ITEM_STOP_WATCH; await N(UseItemWithEffect); spawn { sleep 5; @@ -39,17 +39,17 @@ EvtSource N(main) = SCRIPT({ InitTargetIterator(); 0: SetGoalToTarget(ACTOR_SELF); - ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); - if (SI_VAR(0) == 6) { + ItemCheckHit(EVT_VAR(0), 0x10000000, 0, EVT_VAR(0), 0); + if (EVT_VAR(0) == 6) { goto 1; } - GetItemPower(ITEM_STOP_WATCH, SI_VAR(0), SI_VAR(1)); - MakeStatusField(SI_VAR(0), 0x200000, 100, SI_VAR(0)); - func_80252B3C(SI_VAR(0), 0x50000000, SI_VAR(0), 0, 32); + GetItemPower(ITEM_STOP_WATCH, EVT_VAR(0), EVT_VAR(1)); + MakeStatusField(EVT_VAR(0), 0x200000, 100, EVT_VAR(0)); + func_80252B3C(EVT_VAR(0), 0x50000000, EVT_VAR(0), 0, 32); 1: sleep 5; - ChooseNextTarget(0, SI_VAR(0)); - if (SI_VAR(0) != -1) { + ChooseNextTarget(0, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { goto 0; } N(func_802A12D4_7270A4)(); diff --git a/src/battle/item/strange_cake.c b/src/battle/item/strange_cake.c index 641c661aa7..864773c8f0 100644 --- a/src/battle/item/strange_cake.c +++ b/src/battle/item/strange_cake.c @@ -322,32 +322,32 @@ s32 N(D_802A2858_732B58)[] = { }; 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; - SI_VAR(1) = 0; + GetMenuSelection(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(1) == 211) { + EVT_VAR(10) = (const) ITEM_KOOKY_COOKIE; + EVT_VAR(1) = 0; await N(UseItemWithEffect); await N(EatItem); N(func_802A1A8C_731D8C)(); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 20; - SI_VAR(1) += 25; - N(func_802A18D8_731BD8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); - N(AddFP)(SI_VAR(3)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 20; + EVT_VAR(1) += 25; + N(func_802A18D8_731BD8)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + N(AddFP)(EVT_VAR(3)); sleep 10; SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); } else { - SI_VAR(10) = (const) ITEM_STRANGE_CAKE; - SI_VAR(1) = 0; + EVT_VAR(10) = (const) ITEM_STRANGE_CAKE; + EVT_VAR(1) = 0; await N(UseItemWithEffect); await N(EatItem); SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); @@ -360,7 +360,7 @@ EvtSource N(script6) = SCRIPT({ PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_368); N(func_802A13E4_7316E4)(); sleep 2; - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { await N(script7); } @@ -376,9 +376,9 @@ EvtSource N(script6) = 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; - PlayEffect(0x57, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + PlayEffect(0x57, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); N(func_802A1AD8_731DD8)(); sleep 20; ShowMessageBox(16, 60); @@ -387,9 +387,9 @@ EvtSource N(script7) = 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; - PlayEffect(0x33, 6, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + PlayEffect(0x33, 6, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1.0, 30, 0, 0, 0, 0, 0, 0, 0); N(func_802A1B14_731E14)(); sleep 20; ShowMessageBox(17, 60); @@ -399,7 +399,7 @@ EvtSource N(script8) = 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)); + GetGoalPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); spawn DoSleepHit; N(func_802A1B68_731E68)(); sleep 20; diff --git a/src/battle/item/super_soda.c b/src/battle/item/super_soda.c index b0fa29297b..bc175f2612 100644 --- a/src/battle/item/super_soda.c +++ b/src/battle/item/super_soda.c @@ -96,54 +96,54 @@ EvtSource N(script6) = SCRIPT({ sleep 1; SetActorYaw(ACTOR_PLAYER, 180); sleep 10; - SI_VAR(1) = SI_VAR(15); + EVT_VAR(1) = EVT_VAR(15); await N(UseItem); - SI_VAR(14) = SI_VAR(10); + EVT_VAR(14) = EVT_VAR(10); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); spawn { sleep 20; SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } - CreateVirtualEntity(SI_VAR(10), 0x80283EE8); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 30; - SI_VAR(2) += 5; - SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetVirtualEntityFlags(SI_VAR(10), 32); + CreateVirtualEntity(EVT_VAR(10), 0x80283EE8); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 30; + EVT_VAR(2) += 5; + SetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetVirtualEntityFlags(EVT_VAR(10), 32); spawn { - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 45; - MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0); - SI_VAR(14) = SI_VAR(0); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 45; + MakeItemEntity(EVT_VAR(14), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 0); + EVT_VAR(14) = EVT_VAR(0); loop 25 { - GetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - N(func_802A123C_724F1C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetVirtualEntityPosition(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + N(func_802A123C_724F1C)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } - RemoveItemEntity(SI_VAR(14)); + RemoveItemEntity(EVT_VAR(14)); } InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamOffsetZ(41); SetBattleCamZoom(248); MoveBattleCamOver(25); - SetVirtualEntityJumpGravity(SI_VAR(10), 0.400390625); - SI_VAR(2) += 5; - VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); + SetVirtualEntityJumpGravity(EVT_VAR(10), 0.400390625); + EVT_VAR(2) += 5; + VirtualEntityJumpTo(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 25); AddBattleCamZoom(100); MoveBattleCamOver(30); - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); - if (SI_VAR(11) > 0) { - N(func_802A12EC_724FCC)(SI_VAR(11)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); + if (EVT_VAR(11) > 0) { + N(func_802A12EC_724FCC)(EVT_VAR(11)); } sleep 30; - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(11)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(11)); sleep 20; SetActorYaw(ACTOR_PLAYER, 150); sleep 1; @@ -160,37 +160,37 @@ EvtSource N(script6) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_SUPER_SODA; + EVT_VAR(10) = (const) ITEM_SUPER_SODA; await N(UseItemWithEffect); InitTargetIterator(); - GetOwnerTarget(SI_VAR(0), SI_VAR(1)); - if (SI_VAR(0) == ACTOR_PLAYER) { + GetOwnerTarget(EVT_VAR(0), EVT_VAR(1)); + if (EVT_VAR(0) == ACTOR_PLAYER) { PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 35; - N(func_802A1418_7250F8)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 35; + N(func_802A1418_7250F8)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 5); N(AddFP)(5); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 5); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 5); InitTargetIterator(); - GetOwnerTarget(SI_VAR(0), SI_VAR(1)); + GetOwnerTarget(EVT_VAR(0), EVT_VAR(1)); N(func_802A1378_725058)(ACTOR_PLAYER); sleep 20; } else { - SI_VAR(11) = 0; - SI_VAR(12) = 0; - SI_VAR(15) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; + EVT_VAR(15) = 0; await N(script6); } await N(PlayerGoHome); diff --git a/src/battle/item/tasty_tonic.c b/src/battle/item/tasty_tonic.c index 402bb0486a..c9c3eaf77d 100644 --- a/src/battle/item/tasty_tonic.c +++ b/src/battle/item/tasty_tonic.c @@ -30,37 +30,37 @@ ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_TASTY_TONIC; + EVT_VAR(10) = (const) ITEM_TASTY_TONIC; await N(UseItemWithEffect); InitTargetIterator(); - GetOwnerTarget(SI_VAR(0), SI_VAR(1)); - if (SI_VAR(0) == 0) { + GetOwnerTarget(EVT_VAR(0), EVT_VAR(1)); + if (EVT_VAR(0) == 0) { await N(DrinkItem); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - SI_VAR(2) += 5; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + EVT_VAR(2) += 5; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) += 5; - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) += 5; + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); N(func_802A123C_72223C)(ACTOR_PLAYER); sleep 20; } else { - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - SI_VAR(2) += 5; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + EVT_VAR(2) += 5; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 5); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; sleep 30; - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) += 5; - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) += 5; + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 5); N(func_802A123C_72223C)(ACTOR_PARTNER); sleep 20; } diff --git a/src/battle/item/thunder_bolt.c b/src/battle/item/thunder_bolt.c index 9213554d2f..21d59d68de 100644 --- a/src/battle/item/thunder_bolt.c +++ b/src/battle/item/thunder_bolt.c @@ -52,7 +52,7 @@ ApiStatus N(func_802A1420_722F60)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_THUNDER_BOLT; + EVT_VAR(10) = (const) ITEM_THUNDER_BOLT; await N(UseItemWithEffect); spawn { sleep 5; @@ -64,16 +64,16 @@ EvtSource N(main) = SCRIPT({ sleep 10; InitTargetIterator(); SetGoalToTarget(ACTOR_SELF); - ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); - if (SI_VAR(0) == 6) { + ItemCheckHit(EVT_VAR(0), 0x10000000, 0, EVT_VAR(0), 0); + if (EVT_VAR(0) == 6) { goto 1; } N(func_802A123C_722D7C)(); sleep 5; StartRumble(10); ShakeCam(1, 0, 5, 1.0); - GetItemPower(ITEM_THUNDER_RAGE, SI_VAR(0), SI_VAR(1)); - ItemDamageEnemy(SI_VAR(0), 0x38000020, 0, SI_VAR(0), 32); + GetItemPower(ITEM_THUNDER_RAGE, EVT_VAR(0), EVT_VAR(1)); + ItemDamageEnemy(EVT_VAR(0), 0x38000020, 0, EVT_VAR(0), 32); 1: sleep 5; UseBattleCamPreset(3); diff --git a/src/battle/item/thunder_rage.c b/src/battle/item/thunder_rage.c index 7e2336d2d6..2f7fbedd52 100644 --- a/src/battle/item/thunder_rage.c +++ b/src/battle/item/thunder_rage.c @@ -52,7 +52,7 @@ ApiStatus N(func_802A1354_71B4F4)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_THUNDER_RAGE; + EVT_VAR(10) = (const) ITEM_THUNDER_RAGE; await N(UseItemWithEffect); parallel { sleep 5; @@ -65,8 +65,8 @@ EvtSource N(main) = SCRIPT({ InitTargetIterator(); 0: SetGoalToTarget(ACTOR_SELF); - ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); - if (SI_VAR(0) == 6) { + ItemCheckHit(EVT_VAR(0), 0x10000000, 0, EVT_VAR(0), 0); + if (EVT_VAR(0) == 6) { goto 1; } N(func_802A1354_71B4F4)(); @@ -74,12 +74,12 @@ EvtSource N(main) = SCRIPT({ StartRumble(10); ShakeCam(1, 0, 5, 1.0); SetGoalToTarget(ACTOR_SELF); - GetItemPower(ITEM_THUNDER_RAGE, SI_VAR(0), SI_VAR(1)); - ItemDamageEnemy(SI_VAR(0), 0x38000020, 0, SI_VAR(0), 32); + GetItemPower(ITEM_THUNDER_RAGE, EVT_VAR(0), EVT_VAR(1)); + ItemDamageEnemy(EVT_VAR(0), 0x38000020, 0, EVT_VAR(0), 32); 1: sleep 5; - ChooseNextTarget(0, SI_VAR(0)); - if (SI_VAR(0) != -1) { + ChooseNextTarget(0, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { goto 0; } UseBattleCamPreset(3); diff --git a/src/battle/item/ultra_shroom.c b/src/battle/item/ultra_shroom.c index 3599beeaca..d69691022e 100644 --- a/src/battle/item/ultra_shroom.c +++ b/src/battle/item/ultra_shroom.c @@ -27,26 +27,26 @@ ApiStatus N(func_802A12FC_723A7C)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_SUPER_SHROOM; + EVT_VAR(10) = (const) ITEM_SUPER_SHROOM; await N(UseItemWithEffect); AddBattleCamZoom(50); MoveBattleCamOver(20); await N(EatItem); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 35; - N(func_802A123C_7239BC)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - SI_VAR(2) += 5; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 35; + N(func_802A123C_7239BC)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + EVT_VAR(2) += 5; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); N(func_802A12FC_723A7C)(); sleep 10; SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) += 5; - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) += 5; + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); diff --git a/src/battle/item/unknown_item.c b/src/battle/item/unknown_item.c index 990043da7b..be013edf03 100644 --- a/src/battle/item/unknown_item.c +++ b/src/battle/item/unknown_item.c @@ -27,24 +27,24 @@ ApiStatus N(func_802A12FC_72453C)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_ULTRA_SHROOM; + EVT_VAR(10) = (const) ITEM_ULTRA_SHROOM; await N(UseItemWithEffect); await N(EatItem); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 0; - SI_VAR(1) += 35; - N(func_802A123C_72447C)(SI_VAR(0), SI_VAR(1), SI_VAR(2), 20); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 25; - SI_VAR(2) += 5; - func_802D7520(SI_VAR(0), SI_VAR(1), SI_VAR(2), 20); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 0; + EVT_VAR(1) += 35; + N(func_802A123C_72447C)(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 20); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 25; + EVT_VAR(2) += 5; + func_802D7520(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 20); N(func_802A12FC_72453C)(); sleep 10; SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) += 5; - func_802D75D8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 20); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) += 5; + func_802D75D8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 20); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); diff --git a/src/battle/item/volt_shroom.c b/src/battle/item/volt_shroom.c index d8101305d3..99a0212258 100644 --- a/src/battle/item/volt_shroom.c +++ b/src/battle/item/volt_shroom.c @@ -14,19 +14,19 @@ ApiStatus N(func_802A123C_71AA2C)(Evt* script, s32 isInitialCall) { #include "UseItem.inc.c" EvtSource N(main) = SCRIPT({ - SI_VAR(10) = (const) ITEM_VOLT_SHROOM; + EVT_VAR(10) = (const) ITEM_VOLT_SHROOM; await N(UseItemWithEffect); await N(EatItem); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); - GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(3) = 20; - MultiplyByActorScale(SI_VAR(3)); - SI_VAR(1) += SI_VAR(3); - SI_VAR(3) = 1.0; - MultiplyByActorScale(SI_VAR(3)); - PlayEffect(0x57, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3), 30, 0, 0, 0, 0, 0, 0, 0); + GetActorPos(ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(3) = 20; + MultiplyByActorScale(EVT_VAR(3)); + EVT_VAR(1) += EVT_VAR(3); + EVT_VAR(3) = 1.0; + MultiplyByActorScale(EVT_VAR(3)); + PlayEffect(0x57, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3), 30, 0, 0, 0, 0, 0, 0, 0); PlaySound(SOUND_UNKNOWN_379); - GetItemPower(ITEM_VOLT_SHROOM, SI_VAR(0), SI_VAR(1)); + GetItemPower(ITEM_VOLT_SHROOM, EVT_VAR(0), EVT_VAR(1)); N(func_802A123C_71AA2C)(); sleep 20; ShowMessageBox(16, 60); diff --git a/src/battle/partner/goombario.c b/src/battle/partner/goombario.c index 3faa6c08e8..bb5cf5a17b 100644 --- a/src/battle/partner/goombario.c +++ b/src/battle/partner/goombario.c @@ -331,64 +331,64 @@ EvtSource N(idle_80239350) = SCRIPT({ EvtSource N(handleEvent_80239360) = SCRIPT({ UseIdleAnimation(ACTOR_PARTNER, FALSE); CloseActionCommandInfo(); - GetLastEvent(ACTOR_PARTNER, SI_VAR(0)); - match SI_VAR(0) { + GetLastEvent(ACTOR_PARTNER, EVT_VAR(0)); + match EVT_VAR(0) { EVENT_HIT_COMBO, EVENT_HIT { - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; - SI_VAR(2) = (const) NPC_ANIM_battle_goombario_default_pain; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; + EVT_VAR(2) = (const) NPC_ANIM_battle_goombario_default_pain; await 0x802977BC; - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; await 0x80296014; } 23, EVENT_IMMUNE { PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_208C); - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; await 0x80297814; } == EVENT_SPIKE_CONTACT { - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; - SI_VAR(2) = 12; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; + EVT_VAR(2) = 12; await 0x80294FE4; - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; await 0x80296014; } == EVENT_BURN_CONTACT { - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_burn_pain; - SI_VAR(2) = 12; - SI_VAR(3) = (const) NPC_ANIM_battle_goombario_default_burn_dead; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_burn_pain; + EVT_VAR(2) = 12; + EVT_VAR(3) = (const) NPC_ANIM_battle_goombario_default_burn_dead; await 0x80294C68; - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; await 0x80296014; } == EVENT_BURN_HIT { - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_burn_pain; - SI_VAR(2) = (const) NPC_ANIM_battle_goombario_default_burn_dead; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_burn_pain; + EVT_VAR(2) = (const) NPC_ANIM_battle_goombario_default_burn_dead; await 0x8029621C; - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; await 0x80296014; } == EVENT_SHOCK_HIT { - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; - SI_VAR(2) = 12; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; + EVT_VAR(2) = 12; await 0x80295744; } == 51 { N(StopGlowing)(); - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_pain; await 0x80296014; } == 52 { - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_idle; - SI_VAR(2) = (const) NPC_ANIM_battle_goombario_default_run; - SI_VAR(3) = 0; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_idle; + EVT_VAR(2) = (const) NPC_ANIM_battle_goombario_default_run; + EVT_VAR(3) = 0; await 0x80295EC4; } 24, EVENT_BLOCK { PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_208C); - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_block; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_block; await 0x80297814; sleep 10; } @@ -399,8 +399,8 @@ EvtSource N(handleEvent_80239360) = SCRIPT({ }); EvtSource N(takeTurn_802396D8) = SCRIPT({ - GetBattlePhase(SI_VAR(0)); - match SI_VAR(0) { + GetBattlePhase(EVT_VAR(0)); + match EVT_VAR(0) { == 1 { await N(8023993C); } @@ -420,18 +420,18 @@ EvtSource N(takeTurn_802396D8) = 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; - SI_VAR(3) = (const) NPC_ANIM_battle_goombario_default_idle; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_celebrate; + EVT_VAR(2) = (const) NPC_ANIM_battle_goombario_default_celebrate_still; + EVT_VAR(3) = (const) NPC_ANIM_battle_goombario_default_idle; await 0x80294720; }); EvtSource N(802397E0) = SCRIPT({ - GetMenuSelection(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetMenuSelection(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); func_802694A4(1); SetBattleFlagBits(16384, 0); - match SI_VAR(0) { + match EVT_VAR(0) { == 8 { LoadStarPowerScript(); await 0xFE363C80; @@ -443,7 +443,7 @@ EvtSource N(802397E0) = SCRIPT({ return; } } - match SI_VAR(2) { + match EVT_VAR(2) { == 131 { await N(8023A754); } @@ -470,8 +470,8 @@ EvtSource N(8023993C) = SCRIPT({ }); EvtSource N(8023994C) = SCRIPT({ - SI_VAR(0) = (const) 1; - SI_VAR(1) = (const) NPC_ANIM_battle_goombario_default_run; + EVT_VAR(0) = (const) 1; + EVT_VAR(1) = (const) NPC_ANIM_battle_goombario_default_run; await 0x80294AFC; }); @@ -487,10 +487,10 @@ EvtSource N(80239988) = SCRIPT({ }); EvtSource N(nextTurn_80239A3C) = SCRIPT({ - GetBattlePhase(SI_VAR(0)); - match SI_VAR(0) { + GetBattlePhase(EVT_VAR(0)); + match EVT_VAR(0) { == 10 { - if (SI_SAVE_FLAG(1817) == 0) { + if (EVT_SAVE_FLAG(1817) == 0) { UseIdleAnimation(ACTOR_PARTNER, 0); UseBattleCamPreset(14); BattleCamTargetActor(ACTOR_SELF); @@ -521,7 +521,7 @@ EvtSource N(nextTurn_80239A3C) = SCRIPT({ sleep 1; SetActorYaw(ACTOR_PLAYER, 0); sleep 5; - SI_SAVE_FLAG(1817) = 1; + EVT_SAVE_FLAG(1817) = 1; UseIdleAnimation(ACTOR_PARTNER, 1); } } @@ -535,22 +535,22 @@ EvtSource N(80239CA8) = SCRIPT({ spawn { sleep 4; SetActorRotationOffset(-127, 0, 12, 0); - SI_VAR(0) = 180; + EVT_VAR(0) = 180; loop 3 { - SI_VAR(0) += 60; - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); + EVT_VAR(0) += 60; + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); sleep 1; } SetActorRotation(ACTOR_SELF, 0, 0, 0); SetActorRotationOffset(-127, 0, 0, 0); } - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 30; - SI_VAR(1) = 0; - SetGoalPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 30; + EVT_VAR(1) = 0; + SetGoalPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetActorJumpGravity(ACTOR_PARTNER, 1.2); N(func_80238000_6F10E0)(); - JumpToGoal(ACTOR_PARTNER, SI_VAR(0), FALSE, TRUE, FALSE); + JumpToGoal(ACTOR_PARTNER, EVT_VAR(0), FALSE, TRUE, FALSE); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_charge); SetActorDispOffset(ACTOR_PARTNER, 0, 18, 0); sleep 1; @@ -582,37 +582,37 @@ EvtSource N(8023A06C) = SCRIPT({ UseBattleCamPreset(3); SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM_battle_goombario_default_idle); SetGoalToHome(ACTOR_PARTNER); - GetGoalPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 60; - SetGoalPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 60; + SetGoalPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetActorJumpGravity(ACTOR_PARTNER, 1.4); N(func_80238000_6F10E0)(); spawn { sleep 4; SetActorRotationOffset(-127, 0, 12, 0); - SI_VAR(0) -= 4; - SI_VAR(1) = SI_VAR(0); - SI_VAR(1) /= 3; - if (SI_VAR(1) < 1) { - SI_VAR(1) = 1; + EVT_VAR(0) -= 4; + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(1) /= 3; + if (EVT_VAR(1) < 1) { + EVT_VAR(1) = 1; } - SI_VAR(2) = SI_VAR(1); - SI_VAR(2) %= 2; - if (SI_VAR(2) == 0) { - SI_VAR(1) -= 1; + EVT_VAR(2) = EVT_VAR(1); + EVT_VAR(2) %= 2; + if (EVT_VAR(2) == 0) { + EVT_VAR(1) -= 1; } - SI_VAR(0) = 180; - loop SI_VAR(1) { + EVT_VAR(0) = 180; + loop EVT_VAR(1) { loop 3 { - SI_VAR(0) += 60; - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); + EVT_VAR(0) += 60; + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); sleep 1; } } SetActorRotation(ACTOR_SELF, 0, 0, 0); SetActorRotationOffset(-127, 0, 0, 0); } - JumpToGoal(ACTOR_PARTNER, SI_VAR(0), FALSE, TRUE, FALSE); + JumpToGoal(ACTOR_PARTNER, EVT_VAR(0), FALSE, TRUE, FALSE); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_charge); SetActorDispOffset(ACTOR_PARTNER, 0, 18, 0); sleep 1; @@ -643,16 +643,16 @@ EvtSource N(8023A06C) = SCRIPT({ EvtSource N(8023A52C) = SCRIPT({ SetGoalToFirstTarget(-127); - GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 40; + GetGoalPos(ACTOR_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 40; InitTargetIterator(); SetGoalToTarget(ACTOR_PARTNER); - GetGoalPos(ACTOR_PARTNER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(3) -= (int) 70.0; - if (SI_VAR(0) < SI_VAR(3)) { - SI_VAR(3) = SI_VAR(0); + GetGoalPos(ACTOR_PARTNER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(3) -= (int) 70.0; + if (EVT_VAR(0) < EVT_VAR(3)) { + EVT_VAR(3) = EVT_VAR(0); } - SetGoalPos(ACTOR_PARTNER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + SetGoalPos(ACTOR_PARTNER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); UseBattleCamPreset(47); SetActorSpeed(ACTOR_PARTNER, 5.0); SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM_battle_goombario_default_run); @@ -662,18 +662,18 @@ EvtSource N(8023A52C) = 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)); - if (SI_VAR(11) > SI_VAR(7)) { - SI_VAR(11) -= SI_VAR(7); + GetGoalPos(ACTOR_PARTNER, EVT_VAR(11), EVT_VAR(7), EVT_VAR(13)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(7), EVT_VAR(13), EVT_VAR(14)); + if (EVT_VAR(11) > EVT_VAR(7)) { + EVT_VAR(11) -= EVT_VAR(7); } else { - SI_VAR(7) -= SI_VAR(11); - SI_VAR(11) = SI_VAR(7); + EVT_VAR(7) -= EVT_VAR(11); + EVT_VAR(11) = EVT_VAR(7); } - SI_VAR(11) -= 20; - SI_VAR(11) /= 10.5888671875; - SI_VAR(11) += (float) 15; - SI_VAR(10) = SI_VAR(11); + EVT_VAR(11) -= 20; + EVT_VAR(11) /= 10.5888671875; + EVT_VAR(11) += (float) 15; + EVT_VAR(10) = EVT_VAR(11); }); EvtSource N(8023A754) = SCRIPT({ @@ -687,16 +687,16 @@ EvtSource N(8023A754) = SCRIPT({ SetActorDispOffset(ACTOR_PARTNER, 0, 19, 0); sleep 1; UseBattleCamPreset(52); - func_802A9120_421B10(SI_VAR(10), 3); + func_802A9120_421B10(EVT_VAR(10), 3); UseBattleCamPreset(52); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk); SetActorDispOffset(ACTOR_PARTNER, 0, 9, 0); SetGoalToTarget(ACTOR_PARTNER); SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_200D); - func_8023817C_6F125C(SI_VAR(10), 0); - PartnerTestEnemy(SI_VAR(0), 128, 20, 0, 1, 16); - if (SI_VAR(0) == 6) { + func_8023817C_6F125C(EVT_VAR(10), 0); + PartnerTestEnemy(EVT_VAR(0), 128, 20, 0, 1, 16); + if (EVT_VAR(0) == 6) { SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); N(func_80238A20_6F1B00)(); spawn { @@ -715,21 +715,21 @@ EvtSource N(8023A754) = SCRIPT({ SetActorScale(ACTOR_PARTNER, 1.0, 1.0, 1.0); } sleep 1; - GetActionCommandResult(SI_VAR(0)); - match SI_VAR(0) { + GetActionCommandResult(EVT_VAR(0)); + match EVT_VAR(0) { > 0 { N(IsGlowing)(); - SI_VAR(0) += 1; - PartnerDamageEnemy(SI_VAR(0), 128, 0, 0, SI_VAR(0), 80); + EVT_VAR(0) += 1; + PartnerDamageEnemy(EVT_VAR(0), 128, 0, 0, EVT_VAR(0), 80); } else { N(StopGlowingAndGet)(); - SI_VAR(0) += 1; - PartnerDamageEnemy(SI_VAR(0), 128, 0, 0, SI_VAR(0), 48); + EVT_VAR(0) += 1; + PartnerDamageEnemy(EVT_VAR(0), 128, 0, 0, EVT_VAR(0), 48); } } PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_0); - match SI_VAR(0) { + match EVT_VAR(0) { 0, 2 { await N(80239CA8); return; @@ -742,26 +742,26 @@ EvtSource N(8023A754) = SCRIPT({ SetGoalToTarget(ACTOR_PARTNER); UseBattleCamPreset(53); } - func_80269524(SI_VAR(15)); + func_80269524(EVT_VAR(15)); CloseActionCommandInfo(); LoadActionCommand(1); func_802A9000_430020(); func_802694A4(0); func_802A9120_421B10(24, 3); - SI_VAR(10) = 24; + EVT_VAR(10) = 24; spawn { sleep 4; - SI_VAR(0) = 0; + EVT_VAR(0) = 0; loop 6 { - SI_VAR(0) += -30; - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); + EVT_VAR(0) += -30; + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); sleep 1; } } SetGoalToTarget(ACTOR_PARTNER); SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); PlaySoundAtActor(ACTOR_PARTNER, 0x281); - func_8023817C_6F125C(SI_VAR(10), 3); + func_8023817C_6F125C(EVT_VAR(10), 3); parallel { SetActorScale(ACTOR_PARTNER, 1.1, 0.8, 1.0); sleep 1; @@ -771,10 +771,10 @@ EvtSource N(8023A754) = SCRIPT({ } sleep 1; N(StopGlowingAndGet)(); - SI_VAR(0) += 1; - PartnerDamageEnemy(SI_VAR(0), 128, 0, 0, SI_VAR(0), 32); + EVT_VAR(0) += 1; + PartnerDamageEnemy(EVT_VAR(0), 128, 0, 0, EVT_VAR(0), 32); PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_0); - func_80269550(SI_VAR(15)); + func_80269550(EVT_VAR(15)); await N(8023A06C); }); @@ -789,16 +789,16 @@ EvtSource N(8023ADC4) = SCRIPT({ SetActorDispOffset(ACTOR_PARTNER, 0, 19, 0); sleep 1; UseBattleCamPreset(52); - func_802A9120_421B10(SI_VAR(10), 3); + func_802A9120_421B10(EVT_VAR(10), 3); UseBattleCamPreset(52); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk); SetActorDispOffset(ACTOR_PARTNER, 0, 9, 0); SetGoalToTarget(ACTOR_PARTNER); SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_200D); - func_8023817C_6F125C(SI_VAR(10), 0); - PartnerTestEnemy(SI_VAR(0), 128, 20, 0, 1, 16); - if (SI_VAR(0) == 6) { + func_8023817C_6F125C(EVT_VAR(10), 0); + PartnerTestEnemy(EVT_VAR(0), 128, 20, 0, 1, 16); + if (EVT_VAR(0) == 6) { SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); N(func_80238A20_6F1B00)(); spawn { @@ -817,21 +817,21 @@ EvtSource N(8023ADC4) = SCRIPT({ SetActorScale(ACTOR_PARTNER, 1.0, 1.0, 1.0); } sleep 1; - GetActionCommandResult(SI_VAR(0)); - match SI_VAR(0) { + GetActionCommandResult(EVT_VAR(0)); + match EVT_VAR(0) { > 0 { N(IsGlowing)(); - SI_VAR(0) += 2; - PartnerDamageEnemy(SI_VAR(0), 128, 0, 0, SI_VAR(0), 80); + EVT_VAR(0) += 2; + PartnerDamageEnemy(EVT_VAR(0), 128, 0, 0, EVT_VAR(0), 80); } else { N(StopGlowingAndGet)(); - SI_VAR(0) += 2; - PartnerDamageEnemy(SI_VAR(0), 128, 0, 0, SI_VAR(0), 48); + EVT_VAR(0) += 2; + PartnerDamageEnemy(EVT_VAR(0), 128, 0, 0, EVT_VAR(0), 48); } } PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_0); - match SI_VAR(0) { + match EVT_VAR(0) { 0, 2 { await N(80239CA8); return; @@ -844,19 +844,19 @@ EvtSource N(8023ADC4) = SCRIPT({ SetGoalToTarget(ACTOR_PARTNER); UseBattleCamPreset(53); } - func_80269524(SI_VAR(15)); + func_80269524(EVT_VAR(15)); CloseActionCommandInfo(); LoadActionCommand(1); func_802A9000_430020(); func_802694A4(0); func_802A9120_421B10(24, 3); - SI_VAR(10) = 24; + EVT_VAR(10) = 24; spawn { sleep 4; - SI_VAR(0) = 0; + EVT_VAR(0) = 0; loop 6 { - SI_VAR(0) += -30; - SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); + EVT_VAR(0) += -30; + SetActorRotation(ACTOR_SELF, 0, 0, EVT_VAR(0)); sleep 1; } } @@ -864,7 +864,7 @@ EvtSource N(8023ADC4) = SCRIPT({ EnableActorBlur(256, 1); SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); PlaySoundAtActor(ACTOR_PARTNER, 0x281); - func_8023817C_6F125C(SI_VAR(10), 3); + func_8023817C_6F125C(EVT_VAR(10), 3); EnableActorBlur(256, -1); parallel { SetActorScale(ACTOR_PARTNER, 1.1, 0.8, 1.0); @@ -875,10 +875,10 @@ EvtSource N(8023ADC4) = SCRIPT({ } sleep 1; N(StopGlowingAndGet)(); - SI_VAR(0) += 2; - PartnerDamageEnemy(SI_VAR(0), 128, 0, 0, SI_VAR(0), 32); + EVT_VAR(0) += 2; + PartnerDamageEnemy(EVT_VAR(0), 128, 0, 0, EVT_VAR(0), 32); PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_0); - func_80269550(SI_VAR(15)); + func_80269550(EVT_VAR(15)); await N(8023A06C); }); @@ -893,16 +893,16 @@ EvtSource N(8023B45C) = SCRIPT({ SetActorDispOffset(ACTOR_PARTNER, 0, 19, 0); sleep 1; UseBattleCamPreset(52); - func_802A9120_421B10(SI_VAR(10), 3); + func_802A9120_421B10(EVT_VAR(10), 3); UseBattleCamPreset(52); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk); SetActorDispOffset(ACTOR_PARTNER, 0, 9, 0); SetGoalToTarget(ACTOR_PARTNER); SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_200D); - func_8023817C_6F125C(SI_VAR(10), 0); - PartnerTestEnemy(SI_VAR(0), 128, 20, 0, 1, 16); - if (SI_VAR(0) == 6) { + func_8023817C_6F125C(EVT_VAR(10), 0); + PartnerTestEnemy(EVT_VAR(0), 128, 20, 0, 1, 16); + if (EVT_VAR(0) == 6) { SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); N(func_80238A20_6F1B00)(); spawn { @@ -921,21 +921,21 @@ EvtSource N(8023B45C) = SCRIPT({ SetActorScale(ACTOR_PARTNER, 1.0, 1.0, 1.0); } sleep 1; - GetActionCommandResult(SI_VAR(0)); - match SI_VAR(0) { + GetActionCommandResult(EVT_VAR(0)); + match EVT_VAR(0) { > 0 { N(IsGlowing)(); - SI_VAR(0) += 3; - PartnerDamageEnemy(SI_VAR(0), 128, 0, 0, SI_VAR(0), 80); + EVT_VAR(0) += 3; + PartnerDamageEnemy(EVT_VAR(0), 128, 0, 0, EVT_VAR(0), 80); } else { N(StopGlowingAndGet)(); - SI_VAR(0) += 3; - PartnerDamageEnemy(SI_VAR(0), 128, 0, 0, SI_VAR(0), 48); + EVT_VAR(0) += 3; + PartnerDamageEnemy(EVT_VAR(0), 128, 0, 0, EVT_VAR(0), 48); } } PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_0); - match SI_VAR(0) { + match EVT_VAR(0) { 0, 2 { await N(80239CA8); return; @@ -948,28 +948,28 @@ EvtSource N(8023B45C) = SCRIPT({ SetGoalToTarget(ACTOR_PARTNER); UseBattleCamPreset(53); } - func_80269524(SI_VAR(15)); + func_80269524(EVT_VAR(15)); CloseActionCommandInfo(); LoadActionCommand(1); func_802A9000_430020(); func_802694A4(0); func_802A9120_421B10(24, 3); - SI_VAR(10) = 24; + EVT_VAR(10) = 24; spawn { sleep 4; - SI_VAR(0) = 0; + EVT_VAR(0) = 0; loop 6 { - SI_VAR(0) += -30; - SetActorRotation(ACTOR_SELF, 0, -250000000, SI_VAR(0)); + EVT_VAR(0) += -30; + SetActorRotation(ACTOR_SELF, 0, -250000000, EVT_VAR(0)); sleep 1; } SetAnimation(ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk); } spawn { - SI_VAR(0) = 0; - loop SI_VAR(10) { - SI_VAR(0) += 133; - SetActorRotation(ACTOR_SELF, -250000000, SI_VAR(0), -250000000); + EVT_VAR(0) = 0; + loop EVT_VAR(10) { + EVT_VAR(0) += 133; + SetActorRotation(ACTOR_SELF, -250000000, EVT_VAR(0), -250000000); sleep 1; } } @@ -977,7 +977,7 @@ EvtSource N(8023B45C) = SCRIPT({ EnableActorBlur(256, 1); SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); PlaySoundAtActor(ACTOR_PARTNER, 0x281); - func_8023817C_6F125C(SI_VAR(10), 3); + func_8023817C_6F125C(EVT_VAR(10), 3); EnableActorBlur(256, -1); parallel { SetActorScale(ACTOR_PARTNER, 1.1, 0.8, 1.0); @@ -988,10 +988,10 @@ EvtSource N(8023B45C) = SCRIPT({ } sleep 1; N(StopGlowingAndGet)(); - SI_VAR(0) += 3; - PartnerDamageEnemy(SI_VAR(0), 128, 0, 0, SI_VAR(0), 32); + EVT_VAR(0) += 3; + PartnerDamageEnemy(EVT_VAR(0), 128, 0, 0, EVT_VAR(0), 32); PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_0); - func_80269550(SI_VAR(15)); + func_80269550(EVT_VAR(15)); await N(8023A06C); }); @@ -1012,16 +1012,16 @@ EvtSource N(8023BB9C) = SCRIPT({ SetActorDispOffset(ACTOR_PARTNER, 0, 19, 0); sleep 1; UseBattleCamPreset(52); - func_802A9120_421B10(SI_VAR(10), 1); + func_802A9120_421B10(EVT_VAR(10), 1); UseBattleCamPreset(52); SetAnimation(ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk); SetActorDispOffset(ACTOR_PARTNER, 0, 9, 0); SetGoalToTarget(ACTOR_PARTNER); SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_200D); - func_8023817C_6F125C(SI_VAR(10), 0); - PartnerTestEnemy(SI_VAR(0), 1048704, 20, 0, 1, 16); - if (SI_VAR(0) == 6) { + func_8023817C_6F125C(EVT_VAR(10), 0); + PartnerTestEnemy(EVT_VAR(0), 1048704, 20, 0, 1, 16); + if (EVT_VAR(0) == 6) { SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); N(func_80238A20_6F1B00)(); spawn { @@ -1040,21 +1040,21 @@ EvtSource N(8023BB9C) = SCRIPT({ SetActorScale(ACTOR_PARTNER, 1.0, 1.0, 1.0); } sleep 1; - GetActionCommandResult(SI_VAR(0)); - match SI_VAR(0) { + GetActionCommandResult(EVT_VAR(0)); + match EVT_VAR(0) { > 0 { N(IsGlowing)(); - SI_VAR(0) += 3; - PartnerDamageEnemy(SI_VAR(0), 1048704, 0, 0, SI_VAR(0), 80); + EVT_VAR(0) += 3; + PartnerDamageEnemy(EVT_VAR(0), 1048704, 0, 0, EVT_VAR(0), 80); } else { N(StopGlowingAndGet)(); - SI_VAR(0) += 3; - PartnerDamageEnemy(SI_VAR(0), 1048704, 0, 0, SI_VAR(0), 48); + EVT_VAR(0) += 3; + PartnerDamageEnemy(EVT_VAR(0), 1048704, 0, 0, EVT_VAR(0), 48); } } PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_0); - match SI_VAR(0) { + match EVT_VAR(0) { 0, 2 { await N(80239CA8); return; @@ -1067,10 +1067,10 @@ EvtSource N(8023BB9C) = SCRIPT({ SetGoalToTarget(ACTOR_PARTNER); UseBattleCamPreset(53); } - func_80269524(SI_VAR(15)); - SI_VAR(13) = 0; - SI_VAR(15) = 0; - SI_FLAG(0) = 0; + func_80269524(EVT_VAR(15)); + EVT_VAR(13) = 0; + EVT_VAR(15) = 0; + EVT_FLAG(0) = 0; 10: spawn { UseBattleCamPreset(50); @@ -1082,39 +1082,39 @@ EvtSource N(8023BB9C) = SCRIPT({ func_8026919C(N(D_8023BB78_6ECC58)); LoadActionCommand(1); func_802A9000_430020(); - SI_VAR(10) = 24; - match SI_VAR(15) { + EVT_VAR(10) = 24; + match EVT_VAR(15) { == 0 { - func_802A9120_421B10(SI_VAR(10), 1); + func_802A9120_421B10(EVT_VAR(10), 1); } == 1 { - func_802A9120_421B10(SI_VAR(10), 2); + func_802A9120_421B10(EVT_VAR(10), 2); } == 2 { - func_802A9120_421B10(SI_VAR(10), 3); + func_802A9120_421B10(EVT_VAR(10), 3); } == 3 { - func_802A9120_421B10(SI_VAR(10), 4); + func_802A9120_421B10(EVT_VAR(10), 4); } else { - func_802A9120_421B10(SI_VAR(10), 5); + func_802A9120_421B10(EVT_VAR(10), 5); } } spawn { sleep 4; - SI_VAR(0) = 0; + EVT_VAR(0) = 0; loop 6 { - SI_VAR(0) += -30; - SetActorRotation(ACTOR_SELF, 0, -250000000, SI_VAR(0)); + EVT_VAR(0) += -30; + SetActorRotation(ACTOR_SELF, 0, -250000000, EVT_VAR(0)); sleep 1; } SetAnimation(ACTOR_SELF, 1, NPC_ANIM_battle_goombario_default_headbonk); } spawn { - SI_VAR(0) = 0; - loop SI_VAR(10) { - SI_VAR(0) += 133; - SetActorRotation(ACTOR_SELF, -250000000, SI_VAR(0), -250000000); + EVT_VAR(0) = 0; + loop EVT_VAR(10) { + EVT_VAR(0) += 133; + SetActorRotation(ACTOR_SELF, -250000000, EVT_VAR(0), -250000000); sleep 1; } } @@ -1122,12 +1122,12 @@ EvtSource N(8023BB9C) = SCRIPT({ EnableActorBlur(256, 1); SetJumpAnimations(ACTOR_PARTNER, 0, ANIM_90006, ANIM_90006, ANIM_90006); PlaySoundAtActor(ACTOR_PARTNER, 0x281); - func_8023817C_6F125C(SI_VAR(10), 3); + func_8023817C_6F125C(EVT_VAR(10), 3); EnableActorBlur(256, -1); - SI_VAR(13) -= 1; + EVT_VAR(13) -= 1; func_802380E4_6F11C4(); - if (SI_VAR(15) >= SI_VAR(0)) { - SI_FLAG(0) = 1; + if (EVT_VAR(15) >= EVT_VAR(0)) { + EVT_FLAG(0) = 1; } parallel { SetActorScale(ACTOR_PARTNER, 1.1, 0.8, 1.0); @@ -1137,50 +1137,50 @@ EvtSource N(8023BB9C) = SCRIPT({ SetActorScale(ACTOR_PARTNER, 1.0, 1.0, 1.0); } sleep 1; - GetActionCommandResult(SI_VAR(0)); - match SI_VAR(0) { + GetActionCommandResult(EVT_VAR(0)); + match EVT_VAR(0) { > 0 { - if (SI_FLAG(0) == 0) { + if (EVT_FLAG(0) == 0) { N(IsGlowing)(); - SI_VAR(0) += 3; - PartnerPowerBounceEnemy(SI_VAR(0), 1048704, 0, 0, SI_VAR(0), SI_VAR(13), 64); + EVT_VAR(0) += 3; + PartnerPowerBounceEnemy(EVT_VAR(0), 1048704, 0, 0, EVT_VAR(0), EVT_VAR(13), 64); } else { N(StopGlowingAndGet)(); - SI_VAR(0) += 3; - PartnerPowerBounceEnemy(SI_VAR(0), 1048704, 0, 0, SI_VAR(0), SI_VAR(13), 32); + EVT_VAR(0) += 3; + PartnerPowerBounceEnemy(EVT_VAR(0), 1048704, 0, 0, EVT_VAR(0), EVT_VAR(13), 32); } } else { N(StopGlowingAndGet)(); - SI_VAR(0) += 3; - PartnerPowerBounceEnemy(SI_VAR(0), 1048704, 0, 0, SI_VAR(0), SI_VAR(13), 32); - SI_FLAG(0) = 0; + EVT_VAR(0) += 3; + PartnerPowerBounceEnemy(EVT_VAR(0), 1048704, 0, 0, EVT_VAR(0), EVT_VAR(13), 32); + EVT_FLAG(0) = 0; } } PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_0); - func_80269550(SI_VAR(14)); - match SI_VAR(0) { + func_80269550(EVT_VAR(14)); + match EVT_VAR(0) { 0, 2 { await N(80239CA8); return; } 1, 3 { - if (SI_FLAG(0) == 1) { + if (EVT_FLAG(0) == 1) { await N(8023A06C); return; } } } - SI_VAR(15) += 1; + EVT_VAR(15) += 1; goto 10; }); EvtSource N(8023C5B8) = SCRIPT({ - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 30; + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 30; SetActorSpeed(ACTOR_PARTNER, 6.0); SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM_battle_goombario_default_run); - SetGoalPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); RunToGoal(ACTOR_PARTNER, 0, FALSE); SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM_battle_goombario_default_idle); InitTargetIterator(); @@ -1192,19 +1192,19 @@ EvtSource N(8023C5B8) = SCRIPT({ SetCamFlag80(2, 0); SetCamPerspective(2, 6, 25, 16, 1024); SetCamViewport(2, 137, 95, 138, 99); - GetOwnerTarget(SI_VAR(10), SI_VAR(11)); - GetActorPos(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetGoalPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetOwnerTarget(EVT_VAR(10), EVT_VAR(11)); + GetActorPos(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetGoalPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); func_80238BCC_6F1CAC(); sleep 1; - func_802CAE50(2, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - func_802CABE8(2, 0, SI_VAR(3), 100, 4); + func_802CAE50(2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + func_802CABE8(2, 0, EVT_VAR(3), 100, 4); sleep 2; PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_282); SetCamFlag80(2, 1); sleep 10; func_80238B60_6F1C40(); - ActorSpeak(SI_VAR(0), -127, 1, 589839, 589825); + ActorSpeak(EVT_VAR(0), -127, 1, 589839, 589825); func_80238E48_6F1F28(); sleep 12; SetCamEnabled(2, 0); @@ -1225,19 +1225,19 @@ EvtSource N(8023C90C) = SCRIPT({ sleep 10; SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM_battle_goombario_default_charge); SetActorDispOffset(ACTOR_PARTNER, 0, 19, 0); - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 15; + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 15; PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_208F); - func_802390C8_6F21A8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.2); + func_802390C8_6F21A8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1.2); sleep 3; - func_802390C8_6F21A8(SI_VAR(0), SI_VAR(1), SI_VAR(2), 0.8); + func_802390C8_6F21A8(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0.8); spawn { sleep 15; - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 15; - SI_VAR(2) += -5; + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 15; + EVT_VAR(2) += -5; PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_2003); - PlayEffect(0x52, 9, SI_VAR(0), SI_VAR(1), SI_VAR(2), 2.0, 20, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x52, 9, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 2.0, 20, 0, 0, 0, 0, 0, 0, 0); } sleep 30; SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM_battle_goombario_default_idle); @@ -1245,28 +1245,28 @@ EvtSource N(8023C90C) = SCRIPT({ UseBattleCamPreset(2); MoveBattleCamOver(10); func_80238E74_6F1F54(); - if (SI_VAR(0) == 0) { - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 10; - SI_VAR(1) += 25; - SI_VAR(2) += 5; + if (EVT_VAR(0) == 0) { + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 10; + EVT_VAR(1) += 25; + EVT_VAR(2) += 5; PlaySoundAtActor(ACTOR_PARTNER, SOUND_UNKNOWN_208E); - func_80238EDC_6F1FBC(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + func_80238EDC_6F1FBC(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 4; SetActorJumpGravity(ACTOR_PARTNER, 1.4); - GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetJumpAnimations(ACTOR_PARTNER, 589828, ANIM_1, ANIM_90004, ANIM_90004); - SetGoalPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalPos(ACTOR_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); JumpToGoal(ACTOR_PARTNER, 20, 1, 1, 0); SetAnimation(ACTOR_PARTNER, -1, NPC_ANIM_battle_goombario_default_idle); - GetMenuSelection(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - match SI_VAR(2) { + GetMenuSelection(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + match EVT_VAR(2) { == 134 { ShowMessageBox(36, 60); } == 135 { N(func_80239190_6F2270)(); - ShowMessageBox(SI_VAR(0), 60); + ShowMessageBox(EVT_VAR(0), 60); } == 136 { ShowMessageBox(36, 60); @@ -1277,8 +1277,8 @@ EvtSource N(8023C90C) = SCRIPT({ } 0: sleep 1; - IsMessageBoxDisplayed(SI_VAR(0)); - if (SI_VAR(0) == 1) { + IsMessageBoxDisplayed(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { goto 0; } }); diff --git a/src/common/IsSaveVar123.inc.c b/src/common/IsSaveVar123.inc.c index dbe86939e8..5f1cee682e 100644 --- a/src/common/IsSaveVar123.inc.c +++ b/src/common/IsSaveVar123.inc.c @@ -3,7 +3,7 @@ ApiStatus N(IsSaveVar123)(Evt* script, s32 isInitialCall) { script->varTable[0] = 0; - if (get_variable(NULL, SI_SAVE_VAR(123)) >= 8) { + if (get_variable(NULL, EVT_SAVE_VAR(123)) >= 8) { script->varTable[0] = 1; } diff --git a/src/dc470_len_14c0.c b/src/dc470_len_14c0.c index 1d88fe6644..90c5e54217 100644 --- a/src/dc470_len_14c0.c +++ b/src/dc470_len_14c0.c @@ -12,7 +12,7 @@ void load_map_bg(char* optAssetName) { u32 assetSize; char* assetName = optAssetName; - if (get_variable(NULL, SI_STORY_PROGRESS) >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (get_variable(NULL, EVT_STORY_PROGRESS) >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { // Use sunny Flower Fields bg rather than cloudy if (strcmp(assetName, gCloudyFlowerFieldsBg) == 0) { assetName = gSunnyFlowerFieldsBg; diff --git a/src/entity/Chest.c b/src/entity/Chest.c index 872168f719..b87e59daac 100644 --- a/src/entity/Chest.c +++ b/src/entity/Chest.c @@ -185,7 +185,7 @@ void entity_GiantChest_give_equipment(Entity* entity) { } flag = data->unk_00; - if (flag <= SI_SAVE_FLAG(10000000)) { + if (flag <= EVT_SAVE_FLAG(10000000)) { flag += 130000000; } set_global_flag(flag); diff --git a/src/entity/HeartBlock.c b/src/entity/HeartBlock.c index 0b9cf88f08..8df9264d2d 100644 --- a/src/entity/HeartBlock.c +++ b/src/entity/HeartBlock.c @@ -177,9 +177,9 @@ void entity_HeartBlockContent__anim_heal(Entity* entity, s32 arg1) { offsetX = data->unk_1C * sin_rad((data->unk_18 * TAU) / 360.0f); offsetZ = data->unk_1C * cos_rad((data->unk_18 * TAU) / 360.0f); offsetY = data->unk_04; - + data->unk_04 -= 0.7; - + if ((data->unk_03++ & 1) != 0) { playFX_11(3, playerStatus->position.x + offsetX, playerStatus->position.y + offsetY, @@ -258,14 +258,14 @@ void entity_HeartBlock_change_render_script(Entity* entity) { } void entity_HeartBlock_show_tutorial_message(Entity* entity) { - if ((!gPlayerData.partners[1].enabled) && get_global_flag(SI_SAVE_FLAG(96)) == 0) { + if ((!gPlayerData.partners[1].enabled) && get_global_flag(EVT_SAVE_FLAG(96)) == 0) { UNK_TYPE* ptr = &D_802EB3C0; *ptr = 0; msg_get_printer_for_string(0x1D0001, ptr); set_time_freeze_mode(TIME_FREEZE_PARTIAL); gOverrideFlags |= 0x40; disable_player_input(); - set_global_flag(SI_SAVE_FLAG(96)); + set_global_flag(EVT_SAVE_FLAG(96)); return; } exec_entity_commandlist(entity); diff --git a/src/entity/SaveBlock.c b/src/entity/SaveBlock.c index 45da164d85..e05134eb55 100644 --- a/src/entity/SaveBlock.c +++ b/src/entity/SaveBlock.c @@ -49,10 +49,10 @@ void entity_SaveBlock_save_data(void) { } void entity_SaveBlock_show_tutorial_message(Entity* entity) { - if (!get_global_flag(SI_SAVE_FLAG(95))) { + if (!get_global_flag(EVT_SAVE_FLAG(95))) { D_802EB390 = FALSE; msg_get_printer_for_string(0x1D0000, &D_802EB390); - set_global_flag(SI_SAVE_FLAG(95)); + set_global_flag(EVT_SAVE_FLAG(95)); return; } diff --git a/src/evt/cam_api.c b/src/evt/cam_api.c index 737028dd63..8f7e963f2b 100644 --- a/src/evt/cam_api.c +++ b/src/evt/cam_api.c @@ -3,12 +3,12 @@ EvtSource ShakeCam1 = SCRIPT({ group 0; - ShakeCam(SI_VAR(0), SI_VAR(1), SI_VAR(2), 1.0); + ShakeCam(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1.0); }); EvtSource ShakeCamX = SCRIPT({ group 0; - ShakeCam(SI_VAR(0), SI_VAR(1), SI_VAR(2), SI_VAR(3)); + ShakeCam(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); }); ApiStatus SetCamEnabled(Evt* script, s32 isInitialCall) { @@ -207,10 +207,10 @@ void exec_ShakeCamX(s32 arg0, s32 arg1, s32 arg2, f32 arg3) { Evt* script; script = start_script_in_group(&ShakeCamX, 1, 0, 4); - set_variable(script, SI_VAR(0), arg0); - set_variable(script, SI_VAR(1), arg1); - set_variable(script, SI_VAR(2), arg2); - set_float_variable(script, SI_VAR(3), arg3); + set_variable(script, EVT_VAR(0), arg0); + set_variable(script, EVT_VAR(1), arg1); + set_variable(script, EVT_VAR(2), arg2); + set_float_variable(script, EVT_VAR(3), arg3); } ApiStatus SetCamLeadPlayer(Evt* script, s32 isInitialCall) { diff --git a/src/evt/si.c b/src/evt/evt.c similarity index 78% rename from src/evt/si.c rename to src/evt/evt.c index 0fc9696ff9..319a839abf 100644 --- a/src/evt/si.c +++ b/src/evt/evt.c @@ -1,11 +1,11 @@ #include "common.h" -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); +Bytecode* evt_find_label(Evt* script, s32 arg1); +Bytecode* evt_skip_if(Evt* script); +Bytecode* evt_skip_else(Evt* script); +Bytecode* evt_goto_end_case(Evt* script); +Bytecode* evt_goto_next_case(Evt* script); +Bytecode* evt_goto_end_loop(Evt* script); s32 get_variable_index(Evt* script, s32 var); u8 D_802D9D70 = 0xFE; @@ -28,21 +28,21 @@ Bytecode float_to_fixed_var(f32 value) { return (s32)(value * 1024.0f) + -230000000; } -ApiStatus si_handle_return(Evt* script) { +ApiStatus evt_handle_return(Evt* script) { kill_script(script); return ApiStatus_FINISH; } -ApiStatus si_handle_label(Evt* script) { +ApiStatus evt_handle_label(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_goto(Evt* script) { - script->ptrNextLine = si_find_label(script, get_variable(script, *script->ptrReadPos)); +ApiStatus evt_handle_goto(Evt* script) { + script->ptrNextLine = evt_find_label(script, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_loop(Evt* script) { +ApiStatus evt_handle_loop(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 loopDepth = ++script->loopDepth; @@ -55,7 +55,7 @@ ApiStatus si_handle_loop(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_end_loop(Evt* script) { +ApiStatus evt_handle_end_loop(Evt* script) { s32 loopDepth = script->loopDepth; s32 loopCounter; @@ -85,14 +85,14 @@ ApiStatus si_handle_end_loop(Evt* script) { } } -ApiStatus si_handle_break_loop(Evt* script) { +ApiStatus evt_handle_break_loop(Evt* script) { ASSERT(script->loopDepth >= 0); - script->ptrNextLine = si_goto_end_loop(script); + script->ptrNextLine = evt_goto_end_loop(script); script->loopDepth -= 1; return ApiStatus_DONE2; } -ApiStatus si_handle_wait(Evt* script) { +ApiStatus evt_handle_wait(Evt* script) { Bytecode* ptrReadPos = script->ptrReadPos; if (!script->blocked) { @@ -108,7 +108,7 @@ ApiStatus si_handle_wait(Evt* script) { return !script->functionTemp[0]; } -ApiStatus si_handle_wait_seconds(Evt* script) { +ApiStatus evt_handle_wait_seconds(Evt* script) { Bytecode* ptrReadPos = script->ptrReadPos; if (!script->blocked) { @@ -124,98 +124,98 @@ ApiStatus si_handle_wait_seconds(Evt* script) { return !script->functionTemp[0]; } -ApiStatus si_handle_if_equal(Evt* script) { +ApiStatus evt_handle_if_equal(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) != get_variable(script, *args++)) { - script->ptrNextLine = si_skip_if(script); + script->ptrNextLine = evt_skip_if(script); return ApiStatus_DONE2; } return ApiStatus_DONE2; } -ApiStatus si_handle_if_not_equal(Evt* script) { +ApiStatus evt_handle_if_not_equal(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) == get_variable(script, *args++)) { - script->ptrNextLine = si_skip_if(script); + script->ptrNextLine = evt_skip_if(script); return ApiStatus_DONE2; } return ApiStatus_DONE2; } -ApiStatus si_handle_if_less(Evt* script) { +ApiStatus evt_handle_if_less(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) >= get_variable(script, *args++)) { - script->ptrNextLine = si_skip_if(script); + script->ptrNextLine = evt_skip_if(script); return ApiStatus_DONE2; } return ApiStatus_DONE2; } -ApiStatus si_handle_if_greater(Evt* script) { +ApiStatus evt_handle_if_greater(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) <= get_variable(script, *args++)) { - script->ptrNextLine = si_skip_if(script); + script->ptrNextLine = evt_skip_if(script); return ApiStatus_DONE2; } return ApiStatus_DONE2; } -ApiStatus si_handle_if_less_equal(Evt* script) { +ApiStatus evt_handle_if_less_equal(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) > get_variable(script, *args++)) { - script->ptrNextLine = si_skip_if(script); + script->ptrNextLine = evt_skip_if(script); return ApiStatus_DONE2; } return ApiStatus_DONE2; } -ApiStatus si_handle_if_greater_equal(Evt* script) { +ApiStatus evt_handle_if_greater_equal(Evt* script) { Bytecode* args = script->ptrReadPos; if (get_variable(script, *args++) < get_variable(script, *args++)) { - script->ptrNextLine = si_skip_if(script); + script->ptrNextLine = evt_skip_if(script); return ApiStatus_DONE2; } return ApiStatus_DONE2; } -ApiStatus si_handle_if_AND(Evt* script) { +ApiStatus evt_handle_if_AND(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; if ((get_variable(script, var) & *args) == 0) { - script->ptrNextLine = si_skip_if(script); + script->ptrNextLine = evt_skip_if(script); return ApiStatus_DONE2; } return ApiStatus_DONE2; } -ApiStatus si_handle_if_not_AND(Evt* script) { +ApiStatus evt_handle_if_not_AND(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; if ((get_variable(script, var) & *args) != 0) { - script->ptrNextLine = si_skip_if(script); + script->ptrNextLine = evt_skip_if(script); return ApiStatus_DONE2; } return ApiStatus_DONE2; } -ApiStatus si_handle_else(Evt* script) { - script->ptrNextLine = si_skip_else(script); +ApiStatus evt_handle_else(Evt* script) { + script->ptrNextLine = evt_skip_else(script); return ApiStatus_DONE2; } -ApiStatus si_handle_end_if(Evt* script) { +ApiStatus evt_handle_end_if(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_switch(Evt* script) { +ApiStatus evt_handle_switch(Evt* script) { Bytecode value = get_variable(script, *script->ptrReadPos); s32 switchDepth = ++script->switchDepth; @@ -227,7 +227,7 @@ ApiStatus si_handle_switch(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_switch_const(Evt* script) { +ApiStatus evt_handle_switch_const(Evt* script) { Bytecode* args = script->ptrReadPos; s32 a0 = *args++; s32 switchDepth = ++script->switchDepth; @@ -240,7 +240,7 @@ ApiStatus si_handle_switch_const(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_equal(Evt* script) { +ApiStatus evt_handle_case_equal(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -252,10 +252,10 @@ ApiStatus si_handle_case_equal(Evt* script) { switchBlockValue = script->switchBlockValue[switchDepth]; if (script->switchBlockState[switchDepth] <= 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else if (var != switchBlockValue) { - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } else { script->switchBlockState[switchDepth] = 0; } @@ -263,7 +263,7 @@ ApiStatus si_handle_case_equal(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_not_equal(Evt* script) { +ApiStatus evt_handle_case_not_equal(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -275,10 +275,10 @@ ApiStatus si_handle_case_not_equal(Evt* script) { switchBlockValue = script->switchBlockValue[switchDepth]; if (script->switchBlockState[switchDepth] <= 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else if (var == switchBlockValue) { - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } else { script->switchBlockState[switchDepth] = 0; } @@ -286,7 +286,7 @@ ApiStatus si_handle_case_not_equal(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_less(Evt* script) { +ApiStatus evt_handle_case_less(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -298,10 +298,10 @@ ApiStatus si_handle_case_less(Evt* script) { switchBlockValue = script->switchBlockValue[switchDepth]; if (script->switchBlockState[switchDepth] <= 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else if (var <= switchBlockValue) { - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } else { script->switchBlockState[switchDepth] = 0; } @@ -309,7 +309,7 @@ ApiStatus si_handle_case_less(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_less_equal(Evt* script) { +ApiStatus evt_handle_case_less_equal(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -321,10 +321,10 @@ ApiStatus si_handle_case_less_equal(Evt* script) { switchBlockValue = script->switchBlockValue[switchDepth]; if (script->switchBlockState[switchDepth] <= 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else if (var < switchBlockValue) { - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } else { script->switchBlockState[switchDepth] = 0; } @@ -332,7 +332,7 @@ ApiStatus si_handle_case_less_equal(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_greater(Evt* script) { +ApiStatus evt_handle_case_greater(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -344,10 +344,10 @@ ApiStatus si_handle_case_greater(Evt* script) { switchBlockValue = script->switchBlockValue[switchDepth]; if (script->switchBlockState[switchDepth] <= 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else if (var >= switchBlockValue) { - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } else { script->switchBlockState[switchDepth] = 0; } @@ -355,7 +355,7 @@ ApiStatus si_handle_case_greater(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_greater_equal(Evt* script) { +ApiStatus evt_handle_case_greater_equal(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -367,10 +367,10 @@ ApiStatus si_handle_case_greater_equal(Evt* script) { switchBlockValue = script->switchBlockValue[switchDepth]; if (script->switchBlockState[switchDepth] <= 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else if (var > switchBlockValue) { - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } else { script->switchBlockState[switchDepth] = 0; } @@ -378,7 +378,7 @@ ApiStatus si_handle_case_greater_equal(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_range(Evt* script) { +ApiStatus evt_handle_case_range(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -393,24 +393,24 @@ ApiStatus si_handle_case_range(Evt* script) { switchBlockValue = script->switchBlockValue[switchDepth]; if (script->switchBlockState[switchDepth] <= 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else if ((var <= switchBlockValue) && (switchBlockValue <= var2)) { script->switchBlockState[switchDepth] = 0; } else { - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } return ApiStatus_DONE2; } -ApiStatus si_handle_case_default(Evt* script) { +ApiStatus evt_handle_case_default(Evt* script) { s32 switchDepth = script->switchDepth; ASSERT(switchDepth >= 0); if (script->switchBlockState[switchDepth] <= 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else { script->switchBlockState[switchDepth] = 0; @@ -419,7 +419,7 @@ ApiStatus si_handle_case_default(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_AND(Evt* script) { +ApiStatus evt_handle_case_AND(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -433,10 +433,10 @@ ApiStatus si_handle_case_AND(Evt* script) { switchBlockState = script->switchBlockState[switchDepth]; if (switchBlockState <= 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else if ((var & switchBlockValue) == 0) { - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } else { script->switchBlockState[switchDepth] = 0; } @@ -444,7 +444,7 @@ ApiStatus si_handle_case_AND(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_case_equal_OR(Evt* script) { +ApiStatus evt_handle_case_equal_OR(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -458,18 +458,18 @@ ApiStatus si_handle_case_equal_OR(Evt* script) { switchBlockState = script->switchBlockState[switchDepth]; if (switchBlockState == 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else if (var == switchBlockValue) { script->switchBlockState[switchDepth] = -1; } else if (switchBlockState != -1) { - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } return ApiStatus_DONE2; } -ApiStatus si_handle_case_equal_AND(Evt* script) { +ApiStatus evt_handle_case_equal_AND(Evt* script) { Bytecode* args = script->ptrReadPos; s32 switchDepth = script->switchDepth; s32 var; @@ -483,44 +483,44 @@ ApiStatus si_handle_case_equal_AND(Evt* script) { switchBlockState = script->switchBlockState[switchDepth]; if (switchBlockState == 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else if (switchBlockState == -2) { - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } else if (var == switchBlockValue) { script->switchBlockState[switchDepth] = -1; } else { script->switchBlockState[switchDepth] = -2; - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } return ApiStatus_DONE2; } -ApiStatus si_handle_end_case_group(Evt* script) { +ApiStatus evt_handle_end_case_group(Evt* script) { ASSERT(script->switchDepth >= 0); if (script->switchBlockState[script->switchDepth] == 0) { - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } else if (script->switchBlockState[script->switchDepth] != -1) { script->switchBlockState[script->switchDepth] = 1; - script->ptrNextLine = si_goto_next_case(script); + script->ptrNextLine = evt_goto_next_case(script); } else { script->switchBlockState[script->switchDepth] = 0; - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); } return ApiStatus_DONE2; } -ApiStatus si_handle_break_case(Evt* script) { +ApiStatus evt_handle_break_case(Evt* script) { ASSERT(script->switchDepth >= 0); - script->ptrNextLine = si_goto_end_case(script); + script->ptrNextLine = evt_goto_end_case(script); return ApiStatus_DONE2; } -ApiStatus si_handle_end_switch(Evt* script) { +ApiStatus evt_handle_end_switch(Evt* script) { s32 switchDepth = script->switchDepth; ASSERT(switchDepth >= 0); @@ -531,7 +531,7 @@ ApiStatus si_handle_end_switch(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_set_var(Evt* script) { +ApiStatus evt_handle_set_var(Evt* script) { Bytecode* args = script->ptrReadPos; s32 curPtrReadPos = args[0]; @@ -539,12 +539,12 @@ ApiStatus si_handle_set_var(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_set_const(Evt* script) { +ApiStatus evt_handle_set_const(Evt* script) { set_variable(script, *script->ptrReadPos, script->ptrReadPos[1]); return ApiStatus_DONE2; } -ApiStatus si_handle_set_float(Evt* script) { +ApiStatus evt_handle_set_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; @@ -552,7 +552,7 @@ ApiStatus si_handle_set_float(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_add(Evt* script) { +ApiStatus evt_handle_add(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 result = get_variable(script, *args++); @@ -564,7 +564,7 @@ ApiStatus si_handle_add(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_subtract(Evt* script) { +ApiStatus evt_handle_subtract(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 result = get_variable(script, *args++); @@ -576,7 +576,7 @@ ApiStatus si_handle_subtract(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_multiply(Evt* script) { +ApiStatus evt_handle_multiply(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 result = get_variable(script, *args++); @@ -588,7 +588,7 @@ ApiStatus si_handle_multiply(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_divide(Evt* script) { +ApiStatus evt_handle_divide(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 result = get_variable(script, *args++); @@ -600,7 +600,7 @@ ApiStatus si_handle_divide(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_mod(Evt* script) { +ApiStatus evt_handle_mod(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; s32 result = get_variable(script, *args++) + 0.5; @@ -612,7 +612,7 @@ ApiStatus si_handle_mod(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_addF(Evt* script) { +ApiStatus evt_handle_addF(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; f32 result = get_float_variable(script, *args++); @@ -624,7 +624,7 @@ ApiStatus si_handle_addF(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_subtractF(Evt* script) { +ApiStatus evt_handle_subtractF(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; f32 result = get_float_variable(script, *args++); @@ -636,7 +636,7 @@ ApiStatus si_handle_subtractF(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_multiplyF(Evt* script) { +ApiStatus evt_handle_multiplyF(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; f32 result = get_float_variable(script, *args++); @@ -648,7 +648,7 @@ ApiStatus si_handle_multiplyF(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_divideF(Evt* script) { +ApiStatus evt_handle_divideF(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var = *args++; f32 result = get_float_variable(script, *args++); @@ -660,21 +660,17 @@ ApiStatus si_handle_divideF(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_set_int_buffer_ptr(Evt* script) { - Bytecode* args = script->ptrReadPos; - - script->buffer = (s32*)get_variable(script, *args++); +ApiStatus evt_handle_set_int_buffer_ptr(Evt* script) { + script->buffer = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus si_handle_set_float_buffer_ptr(Evt* script) { - Bytecode* args = script->ptrReadPos; - - script->buffer = (s32*)get_variable(script, *args++); +ApiStatus evt_handle_set_float_buffer_ptr(Evt* script) { + script->buffer = get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus si_handle_get_1_word(Evt* script) { +ApiStatus evt_handle_get_1_word(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; @@ -684,7 +680,7 @@ ApiStatus si_handle_get_1_word(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_2_word(Evt* script) { +ApiStatus evt_handle_get_2_word(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -698,7 +694,7 @@ ApiStatus si_handle_get_2_word(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_3_word(Evt* script) { +ApiStatus evt_handle_get_3_word(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -716,7 +712,7 @@ ApiStatus si_handle_get_3_word(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_4_word(Evt* script) { +ApiStatus evt_handle_get_4_word(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -738,7 +734,7 @@ ApiStatus si_handle_get_4_word(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_Nth_word(Evt* script) { +ApiStatus evt_handle_get_Nth_word(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; @@ -748,7 +744,7 @@ ApiStatus si_handle_get_Nth_word(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_1_float(Evt* script) { +ApiStatus evt_handle_get_1_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; @@ -758,7 +754,7 @@ ApiStatus si_handle_get_1_float(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_2_float(Evt* script) { +ApiStatus evt_handle_get_2_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -772,7 +768,7 @@ ApiStatus si_handle_get_2_float(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_3_float(Evt* script) { +ApiStatus evt_handle_get_3_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -790,7 +786,7 @@ ApiStatus si_handle_get_3_float(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_4_float(Evt* script) { +ApiStatus evt_handle_get_4_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; Bytecode var2; @@ -812,7 +808,7 @@ ApiStatus si_handle_get_4_float(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_get_Nth_float(Evt* script) { +ApiStatus evt_handle_get_Nth_float(Evt* script) { Bytecode* args = script->ptrReadPos; Bytecode var; @@ -822,17 +818,17 @@ ApiStatus si_handle_get_Nth_float(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_set_array(Evt* script) { +ApiStatus evt_handle_set_array(Evt* script) { script->array = (s32*)get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus si_handle_set_flag_array(Evt* script) { +ApiStatus evt_handle_set_flag_array(Evt* script) { script->flagArray = (s32*)get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } -ApiStatus si_handle_allocate_array(Evt* script) { +ApiStatus evt_handle_allocate_array(Evt* script) { Bytecode* args = script->ptrReadPos; s32 size = get_variable(script, *args++); Bytecode var = *args++; @@ -842,7 +838,7 @@ ApiStatus si_handle_allocate_array(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_AND(Evt* script) { +ApiStatus evt_handle_AND(Evt* script) { Bytecode var = script->ptrReadPos[0]; s32 val = get_variable(script, script->ptrReadPos[1]); @@ -851,7 +847,7 @@ ApiStatus si_handle_AND(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_AND_const(Evt* script) { +ApiStatus evt_handle_AND_const(Evt* script) { Bytecode* ptrReadPos = script->ptrReadPos; // todo improve s32 constant = ptrReadPos[0]; // NOLINT @@ -863,7 +859,7 @@ ApiStatus si_handle_AND_const(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_OR(Evt* script) { +ApiStatus evt_handle_OR(Evt* script) { Bytecode var = script->ptrReadPos[0]; s32 val = get_variable(script, script->ptrReadPos[1]); @@ -872,7 +868,7 @@ ApiStatus si_handle_OR(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_OR_const(Evt* script) { +ApiStatus evt_handle_OR_const(Evt* script) { Bytecode* ptrReadPos = script->ptrReadPos; // todo improve s32 constant = ptrReadPos[0]; // NOLINT @@ -884,7 +880,7 @@ ApiStatus si_handle_OR_const(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_call(Evt* script) { +ApiStatus evt_handle_call(Evt* script) { Bytecode* args = script->ptrReadPos; s32 isInitialCall; ApiFunc func; @@ -907,7 +903,7 @@ ApiStatus si_handle_call(Evt* script) { return func(newScript, isInitialCall); // todo fake match } -ApiStatus si_handle_exec1(Evt* script) { +ApiStatus evt_handle_exec1(Evt* script) { Evt* newScript; s32 i; @@ -933,7 +929,7 @@ ApiStatus si_handle_exec1(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_exec1_get_id(Evt* script) { +ApiStatus evt_handle_exec1_get_id(Evt* script) { Bytecode* args = script->ptrReadPos; EvtSource* evtSource = (EvtSource*)get_variable(script, *args++); Bytecode arg2 = *args++; @@ -961,18 +957,14 @@ ApiStatus si_handle_exec1_get_id(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_exec_wait(Evt* script) { - Bytecode* args = script->ptrReadPos; - - start_child_script(script, (EvtSource*)get_variable(script, *args++), 0); +ApiStatus evt_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(Evt* script) { - Bytecode* args = script->ptrReadPos; - - script->ptrFirstLine = (Bytecode*)get_variable(script, *args++); +ApiStatus evt_handle_jump(Evt* script) { + script->ptrFirstLine = (Bytecode*)get_variable(script, *script->ptrReadPos); restart_script(script); return ApiStatus_DONE2; } @@ -1004,7 +996,7 @@ s32 _bound_script_trigger_handler(Trigger* trigger) { return 1; } -ApiStatus si_handle_bind(Evt* script) { +ApiStatus evt_handle_bind(Evt* script) { Bytecode* args = script->ptrReadPos; Trigger* trigger; Bytecode* triggerScript = (Bytecode*)get_variable(script, *args++); @@ -1041,62 +1033,62 @@ ApiStatus DeleteTrigger(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus si_handle_unbind(Evt* script) { +ApiStatus evt_handle_unbind(Evt* script) { delete_trigger(script->owner2.trigger); return ApiStatus_DONE2; } -ApiStatus si_handle_kill(Evt* script) { +ApiStatus evt_handle_kill(Evt* script) { kill_script_by_ID(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_set_priority(Evt* script) { +ApiStatus evt_handle_set_priority(Evt* script) { set_script_priority(script, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_set_timescale(Evt* script) { +ApiStatus evt_handle_set_timescale(Evt* script) { set_script_timescale(script, get_float_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_set_group(Evt* script) { +ApiStatus evt_handle_set_group(Evt* script) { set_script_group(script, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_suspend_all(Evt* script) { +ApiStatus evt_handle_suspend_all(Evt* script) { suspend_all_group(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_resume_all(Evt* script) { +ApiStatus evt_handle_resume_all(Evt* script) { resume_all_group(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_suspend_others(Evt* script) { +ApiStatus evt_handle_suspend_others(Evt* script) { suspend_group_others(script, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_resume_others(Evt* script) { +ApiStatus evt_handle_resume_others(Evt* script) { resume_group_others(script, get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_suspend(Evt* script) { +ApiStatus evt_handle_suspend(Evt* script) { suspend_all_script(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_resume(Evt* script) { +ApiStatus evt_handle_resume(Evt* script) { resume_all_script(get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } -ApiStatus si_handle_does_script_exist(Evt* script) { +ApiStatus evt_handle_does_script_exist(Evt* script) { Bytecode* args = script->ptrReadPos; s32 scriptID = get_variable(script, *args++); Bytecode var2 = *args++; @@ -1105,7 +1097,7 @@ ApiStatus si_handle_does_script_exist(Evt* script) { return ApiStatus_DONE2; } -void si_standard_trigger_executor(Trigger* trigger) { +void evt_standard_trigger_executor(Trigger* trigger) { if (trigger->runningScript == NULL) { Evt* newScript = start_script(trigger->scriptSource, trigger->priority, 0x20); trigger->runningScript = newScript; @@ -1122,7 +1114,7 @@ void si_standard_trigger_executor(Trigger* trigger) { } } -ApiStatus si_handle_bind_lock(Evt* script) { +ApiStatus evt_handle_bind_lock(Evt* script) { Bytecode* args = script->ptrReadPos; Trigger* trigger; Bytecode* triggerScript = (Bytecode*)get_variable(script, *args++); @@ -1137,7 +1129,7 @@ ApiStatus si_handle_bind_lock(Evt* script) { def.flagIndex = get_variable(script, colliderIDVar); def.colliderIndex = get_variable_index(script, colliderIDVar); def.unk_1C = itemList; - def.function = si_standard_trigger_executor; + def.function = evt_standard_trigger_executor; def.unk_14 = triggerOut; def.inputArg3 = a5; @@ -1152,18 +1144,18 @@ ApiStatus si_handle_bind_lock(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_thread(Evt* script); -INCLUDE_ASM(s32, "evt/si", si_handle_thread, Evt* script); +ApiStatus evt_handle_thread(Evt* script); +INCLUDE_ASM(s32, "evt/si", evt_handle_thread, Evt* script); -ApiStatus si_handle_end_thread(Evt* script) { +ApiStatus evt_handle_end_thread(Evt* script) { kill_script(script); return ApiStatus_FINISH; } -ApiStatus si_handle_child_thread(Evt* script); -INCLUDE_ASM(ApiStatus, "evt/si", si_handle_child_thread, Evt* script); +ApiStatus evt_handle_child_thread(Evt* script); +INCLUDE_ASM(ApiStatus, "evt/si", evt_handle_child_thread, Evt* script); -ApiStatus si_handle_end_child_thread(Evt* script) { +ApiStatus evt_handle_end_child_thread(Evt* script) { kill_script(script); return ApiStatus_BLOCK; } @@ -1172,10 +1164,11 @@ ApiStatus func_802C6E14(Evt* script) { return ApiStatus_DONE2; } -ApiStatus si_handle_print_debug_var(Evt* script); +ApiStatus evt_handle_print_debug_var(Evt* script); + // Almost, some ordering stuff and such #ifdef NON_MATCHING -s32 si_handle_print_debug_var(Evt* script) { +s32 evt_handle_print_debug_var(Evt* script) { Bytecode* args = script->ptrReadPos; s32 var = *args++; s32 phi_t0; @@ -1273,7 +1266,7 @@ s32 si_handle_print_debug_var(Evt* script) { return ApiStatus_DONE2; } #else -INCLUDE_ASM(ApiStatus, "evt/si", si_handle_print_debug_var, Evt* script); +INCLUDE_ASM(ApiStatus, "evt/si", evt_handle_print_debug_var, Evt* script); #endif ApiStatus func_802C739C(Evt* script) { @@ -1296,7 +1289,7 @@ s32 func_802C73B8(Evt* script) { return 1; } -s32 si_execute_next_command(Evt *script) { +s32 evt_execute_next_command(Evt *script) { while (TRUE) { s32 status = ApiStatus_DONE2; s32* lines; @@ -1316,274 +1309,274 @@ s32 si_execute_next_command(Evt *script) { status = ApiStatus_REPEAT; break; case EVT_OP_RETURN: - status = si_handle_return(script); + status = evt_handle_return(script); break; case EVT_OP_LABEL: - status = si_handle_label(script); + status = evt_handle_label(script); break; case EVT_OP_GOTO: - status = si_handle_goto(script); + status = evt_handle_goto(script); break; case EVT_OP_LOOP: - status = si_handle_loop(script); + status = evt_handle_loop(script); break; case EVT_OP_END_LOOP: - status = si_handle_end_loop(script); + status = evt_handle_end_loop(script); break; case EVT_OP_BREAK_LOOP: - status = si_handle_break_loop(script); + status = evt_handle_break_loop(script); break; case EVT_OP_SLEEP_FRAMES: - status = si_handle_wait(script); + status = evt_handle_wait(script); break; case EVT_OP_SLEEP_SECS: - status = si_handle_wait_seconds(script); + status = evt_handle_wait_seconds(script); break; case EVT_OP_IF_EQ: - status = si_handle_if_equal(script); + status = evt_handle_if_equal(script); break; case EVT_OP_IF_NE: - status = si_handle_if_not_equal(script); + status = evt_handle_if_not_equal(script); break; case EVT_OP_IF_LT: - status = si_handle_if_less(script); + status = evt_handle_if_less(script); break; case EVT_OP_IF_GT: - status = si_handle_if_greater(script); + status = evt_handle_if_greater(script); break; case EVT_OP_IF_LE: - status = si_handle_if_less_equal(script); + status = evt_handle_if_less_equal(script); break; case EVT_OP_IF_GE: - status = si_handle_if_greater_equal(script); + status = evt_handle_if_greater_equal(script); break; case EVT_OP_IF_FLAG: - status = si_handle_if_AND(script); + status = evt_handle_if_AND(script); break; case EVT_OP_IF_NOT_FLAG: - status = si_handle_if_not_AND(script); + status = evt_handle_if_not_AND(script); break; case EVT_OP_ELSE: - status = si_handle_else(script); + status = evt_handle_else(script); break; case EVT_OP_END_IF: - status = si_handle_end_if(script); + status = evt_handle_end_if(script); break; case EVT_OP_MATCH: - status = si_handle_switch(script); + status = evt_handle_switch(script); break; case EVT_OP_MATCH_CONST: - status = si_handle_switch_const(script); + status = evt_handle_switch_const(script); break; case EVT_OP_CASE_EQ: - status = si_handle_case_equal(script); + status = evt_handle_case_equal(script); break; case EVT_OP_CASE_NE: - status = si_handle_case_not_equal(script); + status = evt_handle_case_not_equal(script); break; case EVT_OP_CASE_LT: - status = si_handle_case_less(script); + status = evt_handle_case_less(script); break; case EVT_OP_CASE_LE: - status = si_handle_case_less_equal(script); + status = evt_handle_case_less_equal(script); break; case EVT_OP_CASE_GT: - status = si_handle_case_greater(script); + status = evt_handle_case_greater(script); break; case EVT_OP_CASE_GE: - status = si_handle_case_greater_equal(script); + status = evt_handle_case_greater_equal(script); break; case EVT_OP_CASE_ELSE: - status = si_handle_case_default(script); + status = evt_handle_case_default(script); break; case EVT_OP_BREAK_MATCH: - status = si_handle_break_case(script); + status = evt_handle_break_case(script); break; case EVT_OP_CASE_MULTI_OR_EQ: - status = si_handle_case_equal_OR(script); + status = evt_handle_case_equal_OR(script); break; case EVT_OP_END_CASE_MULTI: - status = si_handle_end_case_group(script); + status = evt_handle_end_case_group(script); break; case EVT_OP_CASE_MULTI_AND_EQ: - status = si_handle_case_equal_AND(script); + status = evt_handle_case_equal_AND(script); break; case EVT_OP_CASE_FLAG: - status = si_handle_case_AND(script); + status = evt_handle_case_AND(script); break; case EVT_OP_CASE_RANGE: - status = si_handle_case_range(script); + status = evt_handle_case_range(script); break; case EVT_OP_END_MATCH: - status = si_handle_end_switch(script); + status = evt_handle_end_switch(script); break; case EVT_OP_SET: - status = si_handle_set_var(script); + status = evt_handle_set_var(script); break; case EVT_OP_SET_CONST: - status = si_handle_set_const(script); + status = evt_handle_set_const(script); break; case EVT_OP_SET_F: - status = si_handle_set_float(script); + status = evt_handle_set_float(script); break; case EVT_OP_ADD: - status = si_handle_add(script); + status = evt_handle_add(script); break; case EVT_OP_SUB: - status = si_handle_subtract(script); + status = evt_handle_subtract(script); break; case EVT_OP_MUL: - status = si_handle_multiply(script); + status = evt_handle_multiply(script); break; case EVT_OP_DIV: - status = si_handle_divide(script); + status = evt_handle_divide(script); break; case EVT_OP_MOD: - status = si_handle_mod(script); + status = evt_handle_mod(script); break; case EVT_OP_ADD_F: - status = si_handle_addF(script); + status = evt_handle_addF(script); break; case EVT_OP_SUB_F: - status = si_handle_subtractF(script); + status = evt_handle_subtractF(script); break; case EVT_OP_MUL_F: - status = si_handle_multiplyF(script); + status = evt_handle_multiplyF(script); break; case EVT_OP_DIV_F: - status = si_handle_divideF(script); + status = evt_handle_divideF(script); break; case EVT_OP_USE_BUFFER: - status = si_handle_set_int_buffer_ptr(script); + status = evt_handle_set_int_buffer_ptr(script); break; case EVT_OP_BUFFER_READ_1: - status = si_handle_get_1_word(script); + status = evt_handle_get_1_word(script); break; case EVT_OP_BUFFER_READ_2: - status = si_handle_get_2_word(script); + status = evt_handle_get_2_word(script); break; case EVT_OP_BUFFER_READ_3: - status = si_handle_get_3_word(script); + status = evt_handle_get_3_word(script); break; case EVT_OP_BUFFER_READ_4: - status = si_handle_get_4_word(script); + status = evt_handle_get_4_word(script); break; case EVT_OP_BUFFER_PEEK: - status = si_handle_get_Nth_word(script); + status = evt_handle_get_Nth_word(script); break; case EVT_OP_USE_BUFFER_F: - status = si_handle_set_float_buffer_ptr(script); + status = evt_handle_set_float_buffer_ptr(script); break; case EVT_OP_BUFFER_READ_1_F: - status = si_handle_get_1_float(script); + status = evt_handle_get_1_float(script); break; case EVT_OP_BUFFER_READ_2_F: - status = si_handle_get_2_float(script); + status = evt_handle_get_2_float(script); break; case EVT_OP_BUFFER_READ_3_F: - status = si_handle_get_3_float(script); + status = evt_handle_get_3_float(script); break; case EVT_OP_BUFFER_READ_4_F: - status = si_handle_get_4_float(script); + status = evt_handle_get_4_float(script); break; case EVT_OP_BUFFER_PEEK_F: - status = si_handle_get_Nth_float(script); + status = evt_handle_get_Nth_float(script); break; case EVT_OP_USE_ARRAY: - status = si_handle_set_array(script); + status = evt_handle_set_array(script); break; case EVT_OP_USE_FLAGS: - status = si_handle_set_flag_array(script); + status = evt_handle_set_flag_array(script); break; case EVT_OP_NEW_ARRAY: - status = si_handle_allocate_array(script); + status = evt_handle_allocate_array(script); break; case EVT_OP_KILL_SCRIPT: - status = si_handle_kill(script); + status = evt_handle_kill(script); break; case EVT_OP_AND: - status = si_handle_AND(script); + status = evt_handle_AND(script); break; case EVT_OP_AND_CONST: - status = si_handle_AND_const(script); + status = evt_handle_AND_const(script); break; case EVT_OP_OR: - status = si_handle_OR(script); + status = evt_handle_OR(script); break; case EVT_OP_OR_CONST: - status = si_handle_OR_const(script); + status = evt_handle_OR_const(script); break; case EVT_OP_CALL: - status = si_handle_call(script); + status = evt_handle_call(script); break; case EVT_OP_SPAWN_SCRIPT: - status = si_handle_exec1(script); + status = evt_handle_exec1(script); break; case EVT_OP_SPAWN_GET_ID: - status = si_handle_exec1_get_id(script); + status = evt_handle_exec1_get_id(script); break; case EVT_OP_AWAIT_SCRIPT: - status = si_handle_exec_wait(script); + status = evt_handle_exec_wait(script); break; case EVT_OP_BIND_TRIGGER: - status = si_handle_bind(script); + status = evt_handle_bind(script); break; case EVT_OP_UNBIND: - status = si_handle_unbind(script); + status = evt_handle_unbind(script); break; case EVT_OP_SET_PRIORITY: - status = si_handle_set_priority(script); + status = evt_handle_set_priority(script); break; case EVT_OP_SET_TIMESCALE: - status = si_handle_set_timescale(script); + status = evt_handle_set_timescale(script); break; case EVT_OP_SET_GROUP: - status = si_handle_set_group(script); + status = evt_handle_set_group(script); break; case EVT_OP_JUMP: - status = si_handle_jump(script); + status = evt_handle_jump(script); break; case EVT_OP_BIND_PADLOCK: - status = si_handle_bind_lock(script); + status = evt_handle_bind_lock(script); break; case EVT_OP_SUSPEND_GROUP: - status = si_handle_suspend_all(script); + status = evt_handle_suspend_all(script); break; case EVT_OP_RESUME_GROUP: - status = si_handle_resume_all(script); + status = evt_handle_resume_all(script); break; case EVT_OP_SUSPEND_OTHERS: - status = si_handle_suspend_others(script); + status = evt_handle_suspend_others(script); break; case EVT_OP_RESUME_OTHERS: - status = si_handle_resume_others(script); + status = evt_handle_resume_others(script); break; case EVT_OP_SUSPEND_SCRIPT: - status = si_handle_suspend(script); + status = evt_handle_suspend(script); break; case EVT_OP_RESUME_SCRIPT: - status = si_handle_resume(script); + status = evt_handle_resume(script); break; case EVT_OP_DOES_SCRIPT_EXIST: - status = si_handle_does_script_exist(script); + status = evt_handle_does_script_exist(script); break; case EVT_OP_SPAWN_THREAD: - status = si_handle_thread(script); + status = evt_handle_thread(script); break; case EVT_OP_END_SPAWN_THREAD: - status = si_handle_end_thread(script); + status = evt_handle_end_thread(script); break; case EVT_OP_PARALLEL_THREAD: - status = si_handle_child_thread(script); + status = evt_handle_child_thread(script); break; case EVT_OP_END_PARALLEL_THREAD: - status = si_handle_end_child_thread(script); + status = evt_handle_end_child_thread(script); break; case EVT_OP_90: status = func_802C6E14(script); break; case EVT_OP_DEBUG_PRINT: - status = si_handle_print_debug_var(script); + status = evt_handle_print_debug_var(script); break; case EVT_OP_92: status = func_802C739C(script); @@ -1630,7 +1623,7 @@ s32 si_execute_next_command(Evt *script) { } } -// TODO: consider renaming to si_get_variable +// TODO: consider renaming to evt_get_variable #ifdef NON_MATCHING s32 get_variable(Evt* script, Bytecode var) { s32 wordIdx; @@ -1638,7 +1631,7 @@ s32 get_variable(Evt* script, Bytecode var) { if (var <= -270000000) { return var; - } else if (var <= SI_LIMIT) { + } else if (var <= EVT_LIMIT) { return var; } else if (var <= -220000000) { return fixed_var_to_float(var); @@ -1693,7 +1686,7 @@ s32 get_variable_index(Evt* script, s32 var) { if (-270000000 >= var) { return var; } - if (SI_LIMIT >= var) { + if (EVT_LIMIT >= var) { return var; } if (-220000000 >= var) { @@ -1736,7 +1729,7 @@ s32 get_variable_index_alt(s32 var) { if (-270000000 >= var) { return var; } - if (SI_LIMIT >= var) { + if (EVT_LIMIT >= var) { return var; } if (-220000000 >= var) { @@ -1784,7 +1777,7 @@ f32 get_float_variable(Evt* script, Bytecode var) { if (var <= -270000000) { return var; - } else if (var <= SI_LIMIT) { + } else if (var <= EVT_LIMIT) { return var; } else if (var <= -220000000) { return fixed_var_to_float(var); @@ -1829,7 +1822,7 @@ INCLUDE_ASM(f32, "evt/si", get_float_variable, Evt* script, Bytecode var); INCLUDE_ASM(f32, "evt/si", set_float_variable, Evt* script, Bytecode var, f32 value); -Bytecode* si_find_label(Evt* script, s32 arg1) { +Bytecode* evt_find_label(Evt* script, s32 arg1) { Bytecode* ret = script->ptrReadPos; s32 i; @@ -1848,7 +1841,7 @@ Bytecode* si_find_label(Evt* script, s32 arg1) { return ret; } -Bytecode* si_skip_if(Evt* script) { +Bytecode* evt_skip_if(Evt* script) { s32 nestedIfDepth = 0; Bytecode* pos = script->ptrNextLine; Bytecode opcode; @@ -1887,7 +1880,7 @@ Bytecode* si_skip_if(Evt* script) { } while(1); } -Bytecode* si_skip_else(Evt* script) { +Bytecode* evt_skip_else(Evt* script) { s32 nestedIfDepth = 0; Bytecode* pos = script->ptrNextLine; Bytecode opcode; @@ -1937,9 +1930,9 @@ Bytecode* si_skip_else(Evt* script) { } while(1); } -INCLUDE_ASM(Bytecode*, "evt/si", si_goto_end_case, Evt* script); +INCLUDE_ASM(Bytecode*, "evt/si", evt_goto_end_case, Evt* script); -Bytecode* si_goto_next_case(Evt* script) { +Bytecode* evt_goto_next_case(Evt* script) { s32 switchDepth = 1; Bytecode* pos = script->ptrNextLine; s32* opcode; @@ -1982,7 +1975,7 @@ Bytecode* si_goto_next_case(Evt* script) { } while(1); } -Bytecode* si_goto_end_loop(Evt* script) { +Bytecode* evt_goto_end_loop(Evt* script) { s32 loopDepth = 0; Bytecode* pos = script->ptrNextLine; s32 opcode; diff --git a/src/evt/f8f60_len_1560.c b/src/evt/f8f60_len_1560.c index a3af1b4025..13be7e7858 100644 --- a/src/evt/f8f60_len_1560.c +++ b/src/evt/f8f60_len_1560.c @@ -119,7 +119,7 @@ ApiStatus IsPlayerWithin(Evt* script, s32 isInitialCall) { s32* distanceRequired = &script->functionTemp[2]; f32 distance; - Bytecode outVar = SI_VAR(0); + Bytecode outVar = EVT_VAR(0); if (isInitialCall) { *targetX = get_variable(script, *ptrReadPos++); diff --git a/src/evt/fx_api.c b/src/evt/fx_api.c index 0b0c25e51c..348edcbed8 100644 --- a/src/evt/fx_api.c +++ b/src/evt/fx_api.c @@ -616,7 +616,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) { } if (effectRet != NULL) { - set_variable(script, SI_VAR(15), effectRet); + set_variable(script, EVT_VAR(15), effectRet); } return ApiStatus_DONE2; diff --git a/src/evt/script_list.c b/src/evt/script_list.c index 0a20255197..f00d935190 100644 --- a/src/evt/script_list.c +++ b/src/evt/script_list.c @@ -511,7 +511,7 @@ void update_scripts(void) { }; script->frameCounter -= 1.0; - status = si_execute_next_command(script); + status = evt_execute_next_command(script); if (status == 1) { stop = TRUE; break; diff --git a/src/fio.c b/src/fio.c index 5d77d50359..395f73edc3 100644 --- a/src/fio.c +++ b/src/fio.c @@ -10,7 +10,7 @@ extern s32 D_800D95E8[]; void fio_serialize_state(void); s32 get_spirits_rescued(void) { - s32 storyProgress = get_variable(NULL, SI_STORY_PROGRESS); + s32 storyProgress = get_variable(NULL, EVT_STORY_PROGRESS); s32 ret = 7; if (storyProgress < get_variable(NULL, STORY_CH1_STAR_SPIRIT_RESCUED)) { diff --git a/src/state_demo.c b/src/state_demo.c index d551c028ad..43239e34a4 100644 --- a/src/state_demo.c +++ b/src/state_demo.c @@ -132,7 +132,7 @@ void state_step_demo(void) { gGameStatusPtr->peachFlags = 0; playerData->currentPartner = demoSceneData->partnerID; set_cam_viewport(0, 29, 20, -262, 177); - set_variable(NULL, SI_STORY_PROGRESS, demoSceneData->unk_6); + set_variable(NULL, EVT_STORY_PROGRESS, demoSceneData->unk_6); if (gGameStatusPtr->nextDemoScene == 0) { set_map_transition_effect(3); @@ -150,7 +150,7 @@ void state_step_demo(void) { gGameStatusPtr->peachFlags = 1; playerData->currentPartner = demoSceneData->partnerID; set_cam_viewport(0, 29, 20, -262, 177); - set_variable(NULL, SI_STORY_PROGRESS, demoSceneData->unk_6); + set_variable(NULL, EVT_STORY_PROGRESS, demoSceneData->unk_6); if (gGameStatusPtr->nextDemoScene == 0) { set_map_transition_effect(3); diff --git a/src/world/area_arn/arn.h b/src/world/area_arn/arn.h index 04caf9e553..8994f703af 100644 --- a/src/world/area_arn/arn.h +++ b/src/world/area_arn/arn.h @@ -1,7 +1,7 @@ #ifndef _WORLD_AREA_ARN_ARN_H_ #define _WORLD_AREA_ARN_ARN_H_ -#include "si.h" +#include "evt.h" extern MapConfig arn_02_config; extern MapConfig arn_03_config; diff --git a/src/world/area_arn/arn_02/events.c b/src/world/area_arn/arn_02/events.c index 9b289331e3..1eb5825e99 100644 --- a/src/world/area_arn/arn_02/events.c +++ b/src/world/area_arn/arn_02/events.c @@ -13,7 +13,7 @@ EvtSource N(802411A8) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; + EVT_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -21,7 +21,7 @@ EvtSource N(main) = SCRIPT({ MakeNpcs(0, N(npcGroupList_80241A9C)); await N(makeEntities); spawn N(80241040); - SI_VAR(0) = N(802411A8); + EVT_VAR(0) = N(802411A8); spawn EnterWalk; sleep 1; }); @@ -31,14 +31,14 @@ static s32 N(pad_12C4)[] = { }; 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)); + MakeItemEntity(ITEM_DIZZY_DIAL, -248, 193, 45, 17, EVT_SAVE_FLAG(1005)); + MakeItemEntity(ITEM_LETTER07, 536, 260, 227, 17, EVT_SAVE_FLAG(1006)); MakeEntity(0x802EA564, -350, 172, 170, 0, ITEM_COIN, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1002)); + AssignBlockFlag(EVT_SAVE_FLAG(1002)); MakeEntity(0x802EA564, 225, 265, 30, 0, ITEM_COIN, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1003)); + AssignBlockFlag(EVT_SAVE_FLAG(1003)); MakeEntity(0x802EA564, 275, 265, 150, 0, ITEM_REPEL_GEL, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1004)); + AssignBlockFlag(EVT_SAVE_FLAG(1004)); }); NpcAISettings N(npcAISettings_802413D0) = { diff --git a/src/world/area_arn/arn_02/header.c b/src/world/area_arn/arn_02/header.c index 3e6a052ab0..a8ad65fff0 100644 --- a/src/world/area_arn/arn_02/header.c +++ b/src/world/area_arn/arn_02/header.c @@ -15,7 +15,7 @@ MapConfig N(config) = { }; EvtSource N(80241040) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); } diff --git a/src/world/area_arn/arn_03/events.c b/src/world/area_arn/arn_03/events.c index d82ac62dad..a277475bae 100644 --- a/src/world/area_arn/arn_03/events.c +++ b/src/world/area_arn/arn_03/events.c @@ -14,13 +14,13 @@ EvtSource N(802418E8) = SCRIPT({ }); EvtSource N(enterWalk_80241930) = SCRIPT({ - GetLoadType(SI_VAR(1)); - if (SI_VAR(1) == 1) { + GetLoadType(EVT_VAR(1)); + if (EVT_VAR(1) == 1) { spawn EnterSavePoint; spawn N(802418E8); return; } - if (SI_STORY_PROGRESS < STORY_CH3_ARRIVED_AT_GHOST_TOWN) { + if (EVT_STORY_PROGRESS < STORY_CH3_ARRIVED_AT_GHOST_TOWN) { SetPlayerPos(-175, 165, 160); InterpPlayerYaw(90, 0); SetNpcPos(NPC_PARTNER, -175, 165, 160); @@ -30,27 +30,27 @@ EvtSource N(enterWalk_80241930) = SCRIPT({ spawn N(802418E8); return; } - SI_VAR(0) = N(802418E8); + EVT_VAR(0) = N(802418E8); spawn EnterWalk; }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; + EVT_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - SI_AREA_FLAG(3) = 0; - SI_AREA_FLAG(4) = 0; - SI_AREA_FLAG(5) = 0; - if (SI_STORY_PROGRESS < STORY_CH3_DEFEATED_TUBBA_BLUBBA) { + EVT_AREA_FLAG(3) = 0; + EVT_AREA_FLAG(4) = 0; + EVT_AREA_FLAG(5) = 0; + if (EVT_STORY_PROGRESS < STORY_CH3_DEFEATED_TUBBA_BLUBBA) { MakeNpcs(0, N(npcGroupList_80244740)); } else { MakeNpcs(0, N(npcGroupList_80244788)); } - if (SI_SAVE_FLAG(1020) == 1) { - SI_MAP_VAR(0) = 450; - SI_MAP_VAR(1) = 450; + if (EVT_SAVE_FLAG(1020) == 1) { + EVT_MAP_VAR(0) = 450; + EVT_MAP_VAR(1) = 450; } await N(makeEntities); spawn N(80241780); @@ -296,12 +296,12 @@ ApiStatus N(func_8024113C_BDFECC)(Evt* script, s32 isInitialCall) { #include "world/common/StashVars.inc.c" EvtSource N(80241C6C) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 0); + ShowGotItem(EVT_VAR(0), 1, 0); return; }); EvtSource N(80241C9C) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 16); + ShowGotItem(EVT_VAR(0), 1, 16); return; }); @@ -314,33 +314,33 @@ s32 N(D_80241CD0_BE0A60) = { }; EvtSource N(80241CD4) = SCRIPT({ - SI_VAR(9) = SI_VAR(1); + EVT_VAR(9) = EVT_VAR(1); ShowKeyChoicePopup(); - SI_VAR(10) = SI_VAR(0); - match SI_VAR(0) { + EVT_VAR(10) = EVT_VAR(0); + match EVT_VAR(0) { == 0 {} == -1 {} else { - RemoveKeyItemAt(SI_VAR(1)); - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - N(AddPlayerHandsOffset)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) |= (const) 0x50000; - MakeItemEntity(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5), 1, 0); + RemoveKeyItemAt(EVT_VAR(1)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(AddPlayerHandsOffset)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) |= (const) 0x50000; + MakeItemEntity(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1, 0); SetPlayerAnimation(0x60005); sleep 30; SetPlayerAnimation(ANIM_10002); - RemoveItemEntity(SI_VAR(0)); + RemoveItemEntity(EVT_VAR(0)); } } - N(func_80241648_BE03D8)(SI_VAR(10)); + N(func_80241648_BE03D8)(EVT_VAR(10)); CloseChoicePopup(); unbind; }); EvtSource N(80241E18) = SCRIPT({ - N(func_80241680_BE0410)(SI_VAR(0)); + N(func_80241680_BE0410)(EVT_VAR(0)); bind_padlock N(80241CD4) 0x10 0 N(D_80244A20); - N(func_802415F4_BE0384)(SI_VAR(0)); + N(func_802415F4_BE0384)(EVT_VAR(0)); }); EvtSource N(80241E68) = SCRIPT({ @@ -351,16 +351,16 @@ EvtSource N(80241E68) = SCRIPT({ }); EvtSource N(interact_80241EB0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { - if (SI_AREA_FLAG(2) == 0) { + if (EVT_AREA_FLAG(2) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x0073)); - SI_AREA_FLAG(2) = 1; + EVT_AREA_FLAG(2) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x0074)); - SI_AREA_FLAG(2) = 0; + EVT_AREA_FLAG(2) = 0; } } < STORY_CH3_DEFEATED_TUBBA_BLUBBA { @@ -388,24 +388,24 @@ EvtSource N(idle_80242064) = SCRIPT({ sleep 25; spawn { sleep 50; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 325); SetCamSpeed(0, 4.0); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); PanToTarget(0, 0, 1); } spawn { sleep 20; - GetCurrentPartnerID(SI_VAR(6)); - if (SI_VAR(6) != 9) { + GetCurrentPartnerID(EVT_VAR(6)); + if (EVT_VAR(6) != 9) { BringPartnerOut(9); DisablePartnerAI(0); sleep 1; NpcFaceNpc(NPC_PARTNER, NPC_SELF, 0); sleep 5; SetNpcJumpscale(NPC_PARTNER, 0); - if (SI_VAR(6) == 4) { + if (EVT_VAR(6) == 4) { NpcJump0(NPC_PARTNER, -81, 176, 171, 20); } else { NpcJump0(NPC_PARTNER, -81, 186, 171, 20); @@ -427,8 +427,8 @@ EvtSource N(idle_80242064) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 5, MESSAGE_ID(0x0E, 0x0072)); EnablePartnerAI(); sleep 10; - GetCurrentPartnerID(SI_VAR(6)); - if (SI_VAR(6) != 9) { + GetCurrentPartnerID(EVT_VAR(6)); + if (EVT_VAR(6) != 9) { PutPartnerAway(); } spawn { @@ -437,10 +437,10 @@ EvtSource N(idle_80242064) = SCRIPT({ } func_802CF56C(2); sleep 15; - SI_STORY_PROGRESS = STORY_CH3_ARRIVED_AT_GHOST_TOWN; + EVT_STORY_PROGRESS = STORY_CH3_ARRIVED_AT_GHOST_TOWN; DisablePlayerInput(FALSE); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 3); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); @@ -448,7 +448,7 @@ EvtSource N(idle_80242064) = SCRIPT({ }); EvtSource N(init_802424E0) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH3_ARRIVED_AT_GHOST_TOWN) { + if (EVT_STORY_PROGRESS < STORY_CH3_ARRIVED_AT_GHOST_TOWN) { SetNpcPos(NPC_SELF, 175, 240, 145); BindNpcIdle(NPC_SELF, N(idle_80242064)); } @@ -456,17 +456,17 @@ EvtSource N(init_802424E0) = SCRIPT({ }); EvtSource N(interact_8024254C) = SCRIPT({ - if (SI_MAP_VAR(0) != 0) { - if (SI_MAP_VAR(0) >= SI_MAP_VAR(1)) { + if (EVT_MAP_VAR(0) != 0) { + if (EVT_MAP_VAR(0) >= EVT_MAP_VAR(1)) { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x0081)); - SI_VAR(0) = 118; - SI_VAR(1) = 1; + EVT_VAR(0) = 118; + EVT_VAR(1) = 1; await N(80241C6C); AddKeyItem(ITEM_PACKAGE); - SI_MAP_VAR(0) = 0; - SI_SAVE_FLAG(1015) = 1; - SI_SAVE_FLAG(1020) = 0; + EVT_MAP_VAR(0) = 0; + EVT_SAVE_FLAG(1015) = 1; + EVT_SAVE_FLAG(1020) = 0; return; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, @@ -474,16 +474,16 @@ EvtSource N(interact_8024254C) = SCRIPT({ return; } } - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { - if (SI_AREA_FLAG(3) == 0) { + if (EVT_AREA_FLAG(3) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x0079)); - SI_AREA_FLAG(3) = 1; + EVT_AREA_FLAG(3) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x007A)); - SI_AREA_FLAG(3) = 0; + EVT_AREA_FLAG(3) = 0; } } < STORY_CH3_DEFEATED_TUBBA_BLUBBA { @@ -499,20 +499,20 @@ EvtSource N(interact_8024254C) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x007E)); } } - if (SI_SAVE_FLAG(1015) == 0) { - if (SI_SAVE_VAR(348) == 18) { + if (EVT_SAVE_FLAG(1015) == 0) { + if (EVT_SAVE_VAR(348) == 18) { await N(80241E68); SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x007F)); EndSpeech(-1, 9765124, 9765121, 0); - SI_MAP_VAR(0) = 0; - SI_MAP_VAR(1) = 450; - SI_SAVE_FLAG(1020) = 1; + EVT_MAP_VAR(0) = 0; + EVT_MAP_VAR(1) = 450; + EVT_SAVE_FLAG(1020) = 1; spawn { loop { - SI_MAP_VAR(0) += 1; + EVT_MAP_VAR(0) += 1; sleep 1; - if (SI_MAP_VAR(0) >= SI_MAP_VAR(1)) { + if (EVT_MAP_VAR(0) >= EVT_MAP_VAR(1)) { break loop; } } @@ -526,74 +526,74 @@ EvtSource N(init_802428A8) = 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)) { - SI_VAR(0) += 60; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + if (EVT_VAR(0) > EVT_VAR(3)) { + EVT_VAR(0) += 60; SetNpcYaw(0x4, 90); } else { - SI_VAR(0) -= 60; + EVT_VAR(0) -= 60; SetNpcYaw(0x4, 270); } - SI_VAR(1) += 20; - SetNpcPos(0x4, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 20; + SetNpcPos(0x4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); func_802CFD30(0x4, 7, 0, 0, 0, 0); sleep 1; }); 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)) { - SI_VAR(0) += 30; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + if (EVT_VAR(0) > EVT_VAR(3)) { + EVT_VAR(0) += 30; } else { - SI_VAR(0) -= 30; + EVT_VAR(0) -= 30; } spawn { MakeLerp(0, 255, 40, 0); 10: UpdateLerp(); - func_802CFD30(0x4, 7, SI_VAR(0), 0, 0, 0); + func_802CFD30(0x4, 7, EVT_VAR(0), 0, 0, 0); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 10; } } - NpcMoveTo(0x4, SI_VAR(0), SI_VAR(2), 40); + NpcMoveTo(0x4, EVT_VAR(0), EVT_VAR(2), 40); }); 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)) { - SI_VAR(0) += 60; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + if (EVT_VAR(0) > EVT_VAR(3)) { + EVT_VAR(0) += 60; } else { - SI_VAR(0) -= 60; + EVT_VAR(0) -= 60; } spawn { MakeLerp(255, 0, 40, 0); 10: UpdateLerp(); - func_802CFD30(0x4, 7, SI_VAR(0), 0, 0, 0); + func_802CFD30(0x4, 7, EVT_VAR(0), 0, 0, 0); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 10; } } - NpcMoveTo(0x4, SI_VAR(0), SI_VAR(2), 40); + NpcMoveTo(0x4, EVT_VAR(0), EVT_VAR(2), 40); SetNpcPos(0x4, 0, -1000, 0); }); EvtSource N(80242C60) = SCRIPT({ await N(802429D4); - SI_MAP_VAR(2) = 0; - SI_MAP_VAR(3) = 0; + EVT_MAP_VAR(2) = 0; + EVT_MAP_VAR(3) = 0; spawn { sleep 25; SetPlayerAnimation(0x80017); SetNpcAnimation(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_9); loop { - if (SI_MAP_VAR(2) == 1) { + if (EVT_MAP_VAR(2) == 1) { break loop; } sleep 1; @@ -607,21 +607,21 @@ EvtSource N(80242C60) = SCRIPT({ SetNpcAnimation(0x4, NPC_ANIM_boo_Palette_01_Anim_1); sleep 10; await N(80242B0C); - SI_MAP_VAR(2) = 1; + EVT_MAP_VAR(2) = 1; sleep 15; }); EvtSource N(interact_80242DC4) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { - if (SI_AREA_FLAG(4) == 0) { + if (EVT_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, 0x0082)); - SI_AREA_FLAG(4) = 1; + EVT_AREA_FLAG(4) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x0083)); - SI_AREA_FLAG(4) = 0; + EVT_AREA_FLAG(4) = 0; } } < STORY_CH3_DEFEATED_TUBBA_BLUBBA { @@ -634,10 +634,10 @@ EvtSource N(interact_80242DC4) = SCRIPT({ DisablePartnerAI(0); DisablePlayerPhysics(TRUE); spawn { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) += -20; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) += -20; SetNpcSpeed(NPC_PARTNER, 2.0); - NpcMoveTo(NPC_PARTNER, SI_VAR(0), SI_VAR(2), 0); + NpcMoveTo(NPC_PARTNER, EVT_VAR(0), EVT_VAR(2), 0); NpcFaceNpc(NPC_PARTNER, NPC_SELF, 1); } SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x0086)); @@ -654,10 +654,10 @@ EvtSource N(interact_80242DC4) = SCRIPT({ DisablePartnerAI(0); DisablePlayerPhysics(TRUE); spawn { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) += -20; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) += -20; SetNpcSpeed(NPC_PARTNER, 2.0); - NpcMoveTo(NPC_PARTNER, SI_VAR(0), SI_VAR(2), 0); + NpcMoveTo(NPC_PARTNER, EVT_VAR(0), EVT_VAR(2), 0); NpcFaceNpc(NPC_PARTNER, NPC_SELF, 1); } SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x0089)); @@ -678,16 +678,16 @@ EvtSource N(init_802431A4) = SCRIPT({ }); EvtSource N(interact_802431C8) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { - if (SI_AREA_FLAG(5) == 0) { + if (EVT_AREA_FLAG(5) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x008C)); - SI_AREA_FLAG(5) = 1; + EVT_AREA_FLAG(5) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x008D)); - SI_AREA_FLAG(5) = 0; + EVT_AREA_FLAG(5) = 0; } } < STORY_CH3_DEFEATED_TUBBA_BLUBBA { @@ -870,24 +870,24 @@ StaticNpc N(npcGroup_80243B38) = { }; 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; - SI_VAR(4) = SI_VAR(0); - SI_VAR(4) += 60; + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(3) = EVT_VAR(0); + EVT_VAR(3) += -60; + EVT_VAR(4) = EVT_VAR(0); + EVT_VAR(4) += 60; loop { - RandInt(5, SI_VAR(5)); - SI_VAR(6) = (float) SI_VAR(5); - SI_VAR(6) *= 0.1005859375; - SI_VAR(6) += 0.80078125; - SetNpcSpeed(NPC_SELF, SI_VAR(6)); - NpcMoveTo(NPC_SELF, SI_VAR(3), SI_VAR(2), 0); - RandInt(5, SI_VAR(5)); - SI_VAR(6) = (float) SI_VAR(5); - SI_VAR(6) *= 0.1005859375; - SI_VAR(6) += 0.80078125; - SetNpcSpeed(NPC_SELF, SI_VAR(6)); - NpcMoveTo(NPC_SELF, SI_VAR(4), SI_VAR(2), 0); + RandInt(5, EVT_VAR(5)); + EVT_VAR(6) = (float) EVT_VAR(5); + EVT_VAR(6) *= 0.1005859375; + EVT_VAR(6) += 0.80078125; + SetNpcSpeed(NPC_SELF, EVT_VAR(6)); + NpcMoveTo(NPC_SELF, EVT_VAR(3), EVT_VAR(2), 0); + RandInt(5, EVT_VAR(5)); + EVT_VAR(6) = (float) EVT_VAR(5); + EVT_VAR(6) *= 0.1005859375; + EVT_VAR(6) += 0.80078125; + SetNpcSpeed(NPC_SELF, EVT_VAR(6)); + NpcMoveTo(NPC_SELF, EVT_VAR(4), EVT_VAR(2), 0); } }); @@ -1055,7 +1055,7 @@ static s32 N(pad_47DC) = { EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA564, 300, 237, 60, 0, ITEM_COIN, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1007)); + AssignBlockFlag(EVT_SAVE_FLAG(1007)); MakeEntity(0x802E9A18, 250, 237, 125, 0, MAKE_ENTITY_END); }); diff --git a/src/world/area_arn/arn_03/header.c b/src/world/area_arn/arn_03/header.c index 58aba48366..a9f75e5744 100644 --- a/src/world/area_arn/arn_03/header.c +++ b/src/world/area_arn/arn_03/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; EvtSource N(80241780) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); } diff --git a/src/world/area_arn/arn_04/events.c b/src/world/area_arn/arn_04/events.c index 08e168ddce..dfc16bd72a 100644 --- a/src/world/area_arn/arn_04/events.c +++ b/src/world/area_arn/arn_04/events.c @@ -14,7 +14,7 @@ EvtSource N(80243538) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; + EVT_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -22,7 +22,7 @@ EvtSource N(main) = SCRIPT({ MakeNpcs(0, N(npcGroupList_80244000)); await N(makeEntities); spawn N(802433D0); - SI_VAR(0) = N(80243538); + EVT_VAR(0) = N(80243538); spawn EnterWalk; sleep 1; }); @@ -268,12 +268,12 @@ static s32 N(pad_403C)[] = { EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA564, 450, 285, 120, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1008)); + AssignBlockFlag(EVT_SAVE_FLAG(1008)); MakeEntity(0x802EA564, 720, 333, 75, 0, ITEM_COIN, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1009)); + AssignBlockFlag(EVT_SAVE_FLAG(1009)); MakeEntity(0x802EA0E8, 600, 290, 200, 0, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1010)); - MakeItemEntity(ITEM_STAR_PIECE, 540, 230, 13, 17, SI_SAVE_FLAG(1019)); + AssignBlockFlag(EVT_SAVE_FLAG(1010)); + MakeItemEntity(ITEM_STAR_PIECE, 540, 230, 13, 17, EVT_SAVE_FLAG(1019)); }); #include "world/common/UnkNpcAIFunc24.inc.c" diff --git a/src/world/area_arn/arn_04/header.c b/src/world/area_arn/arn_04/header.c index 49537e177f..baa36ca817 100644 --- a/src/world/area_arn/arn_04/header.c +++ b/src/world/area_arn/arn_04/header.c @@ -15,7 +15,7 @@ MapConfig N(config) = { }; EvtSource N(802433D0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); } diff --git a/src/world/area_arn/arn_05/events.c b/src/world/area_arn/arn_05/events.c index 359711b1af..742828cc36 100644 --- a/src/world/area_arn/arn_05/events.c +++ b/src/world/area_arn/arn_05/events.c @@ -26,24 +26,24 @@ EvtSource N(802414E8) = SCRIPT({ }); EvtSource N(enterWalk_80241530) = SCRIPT({ - GetLoadType(SI_VAR(1)); - if (SI_VAR(1) == 1) { + GetLoadType(EVT_VAR(1)); + if (EVT_VAR(1) == 1) { spawn EnterSavePoint; spawn N(802414E8); return; } - SI_VAR(0) = N(802414E8); + EVT_VAR(0) = N(802414E8); spawn EnterWalk; sleep 1; }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; + EVT_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - if (SI_STORY_PROGRESS < STORY_CH3_DEFEATED_TUBBA_BLUBBA) { + if (EVT_STORY_PROGRESS < STORY_CH3_DEFEATED_TUBBA_BLUBBA) { MakeNpcs(0, N(npcGroupList_80244FA4)); } else { MakeNpcs(0, N(npcGroupList_80244FC8)); @@ -100,16 +100,16 @@ EvtSource N(idle_80241784) = SCRIPT({ }); EvtSource N(interact_80241794) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { - if (SI_AREA_FLAG(6) == 0) { + if (EVT_AREA_FLAG(6) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x0092)); - SI_AREA_FLAG(6) = 1; + EVT_AREA_FLAG(6) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x0093)); - SI_AREA_FLAG(6) = 0; + EVT_AREA_FLAG(6) = 0; } } < STORY_CH3_DEFEATED_TUBBA_BLUBBA { @@ -132,16 +132,16 @@ EvtSource N(interact_802418F4) = SCRIPT({ }); EvtSource N(interact_80241924) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { - if (SI_AREA_FLAG(7) == 0) { + if (EVT_AREA_FLAG(7) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x0099)); - SI_AREA_FLAG(7) = 1; + EVT_AREA_FLAG(7) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x009A)); - SI_AREA_FLAG(7) = 0; + EVT_AREA_FLAG(7) = 0; } } < STORY_CH3_DEFEATED_TUBBA_BLUBBA { @@ -164,7 +164,7 @@ EvtSource N(interact_80241A84) = SCRIPT({ }); EvtSource N(interact_80241AB4) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER {} < STORY_CH3_DEFEATED_TUBBA_BLUBBA {} < STORY_CH3_BEGAN_PEACH_MISSION {} @@ -172,8 +172,8 @@ EvtSource N(interact_80241AB4) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00A9)); } >= STORY_CH5_STAR_SPRIT_DEPARTED { - if (SI_SAVE_FLAG(1014) == 1) { - if (SI_AREA_FLAG(9) == 1) { + if (EVT_SAVE_FLAG(1014) == 1) { + if (EVT_AREA_FLAG(9) == 1) { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_5, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00AE)); } else { @@ -189,20 +189,20 @@ EvtSource N(interact_80241AB4) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_A); ContinueSpeech(-1, NPC_ANIM_boo_Palette_01_Anim_A, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00AC)); ShowChoice(1966110); - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { SetNpcAnimation(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_5); ContinueSpeech(-1, NPC_ANIM_boo_Palette_01_Anim_5, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00AD)); SetNpcAnimation(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_1); - SI_SAVE_FLAG(1014) = 1; - SI_AREA_FLAG(9) = 1; + EVT_SAVE_FLAG(1014) = 1; + EVT_AREA_FLAG(9) = 1; } == 1 { SetNpcAnimation(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_5); ContinueSpeech(-1, NPC_ANIM_boo_Palette_01_Anim_5, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00AD)); SetNpcAnimation(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_1); - SI_SAVE_FLAG(1014) = 1; - SI_AREA_FLAG(9) = 1; + EVT_SAVE_FLAG(1014) = 1; + EVT_AREA_FLAG(9) = 1; } == 2 { ContinueSpeech(-1, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00AF)); @@ -214,7 +214,7 @@ EvtSource N(interact_80241AB4) = SCRIPT({ }); EvtSource N(interact_80241D88) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER {} < STORY_CH3_DEFEATED_TUBBA_BLUBBA {} < STORY_CH3_BEGAN_PEACH_MISSION {} @@ -228,16 +228,16 @@ EvtSource N(interact_80241D88) = SCRIPT({ }); EvtSource N(interact_80241E28) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { - if (SI_AREA_FLAG(8) == 0) { + if (EVT_AREA_FLAG(8) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00B3)); - SI_AREA_FLAG(8) = 1; + EVT_AREA_FLAG(8) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00B4)); - SI_AREA_FLAG(8) = 0; + EVT_AREA_FLAG(8) = 0; } } < STORY_CH3_DEFEATED_TUBBA_BLUBBA { @@ -260,7 +260,7 @@ EvtSource N(interact_80241F88) = SCRIPT({ }); EvtSource N(init_80241FB8) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { + if (EVT_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { BindNpcIdle(NPC_SELF, N(idle_80241784)); } BindNpcInteract(NPC_SELF, N(interact_80241794)); @@ -272,7 +272,7 @@ EvtSource N(init_80242008) = SCRIPT({ EvtSource N(init_8024202C) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241AB4)); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_SAW_TUBBA_EAT_BOO { SetNpcFlagBits(NPC_SELF, NPC_FLAG_100, TRUE); } @@ -295,7 +295,7 @@ EvtSource N(init_8024202C) = SCRIPT({ EvtSource N(init_8024212C) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241D88)); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_SAW_TUBBA_EAT_BOO { RemoveNpc(NPC_SELF); } @@ -315,7 +315,7 @@ EvtSource N(init_8024212C) = SCRIPT({ }); EvtSource N(init_802421EC) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { + if (EVT_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { BindNpcIdle(NPC_SELF, N(idle_80241784)); } BindNpcInteract(NPC_SELF, N(interact_80241E28)); @@ -477,7 +477,7 @@ StaticNpc N(npcGroup_8024223C)[] = { }; EvtSource N(80242BEC) = SCRIPT({ - loop SI_VAR(0) { + loop EVT_VAR(0) { PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0); ShakeCam(0, 0, 10, 0.5); sleep 5; @@ -490,22 +490,22 @@ EvtSource N(80242C50) = SCRIPT({ PlaySoundAtNpc(NPC_BOO2, SOUND_UNKNOWN_262, 0); ShowEmote(2, EMOTE_EXCLAMATION, -45, 20, 1, 0, 0, 0, 0); sleep 20; - GetNpcPos(NPC_BOO2, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) -= SI_VAR(3); - SI_VAR(0) -= 50; - SI_VAR(1) -= SI_VAR(4); - SI_VAR(2) -= SI_VAR(5); - GetNpcPos(NPC_BOO2, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(3) -= SI_VAR(0); - SI_VAR(4) -= SI_VAR(1); - SI_VAR(5) -= SI_VAR(2); - NpcMoveTo(NPC_BOO2, SI_VAR(3), SI_VAR(5), 30); + GetNpcPos(NPC_BOO2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) -= EVT_VAR(3); + EVT_VAR(0) -= 50; + EVT_VAR(1) -= EVT_VAR(4); + EVT_VAR(2) -= EVT_VAR(5); + GetNpcPos(NPC_BOO2, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(3) -= EVT_VAR(0); + EVT_VAR(4) -= EVT_VAR(1); + EVT_VAR(5) -= EVT_VAR(2); + NpcMoveTo(NPC_BOO2, EVT_VAR(3), EVT_VAR(5), 30); SetCamType(0, 6, 1); SetCamSpeed(0, 5.0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 350); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); @@ -527,12 +527,12 @@ EvtSource N(80242C50) = SCRIPT({ InterpNpcYaw(NPC_BOO4, 90, 1); sleep 20; PlaySound(SOUND_BOO_APPEAR); - SI_VAR(0) = 240.0; + EVT_VAR(0) = 240.0; loop 20 { - SI_VAR(0) -= 12.0; - func_802CFD30(NPC_BOO0, 7, SI_VAR(0), 0, 0, 0); - func_802CFD30(NPC_BOO1, 7, SI_VAR(0), 0, 0, 0); - func_802CFD30(NPC_BOO4, 7, SI_VAR(0), 0, 0, 0); + EVT_VAR(0) -= 12.0; + func_802CFD30(NPC_BOO0, 7, EVT_VAR(0), 0, 0, 0); + func_802CFD30(NPC_BOO1, 7, EVT_VAR(0), 0, 0, 0); + func_802CFD30(NPC_BOO4, 7, EVT_VAR(0), 0, 0, 0); sleep 1; } SetNpcPos(NPC_BOO0, 420, 300, 220); @@ -542,21 +542,21 @@ EvtSource N(80242C50) = SCRIPT({ EnableNpcShadow(NPC_BOO1, FALSE); EnableNpcShadow(NPC_BOO4, FALSE); PlaySound(SOUND_BOO_VANISH); - SI_VAR(0) = 0.0; + EVT_VAR(0) = 0.0; loop 20 { - SI_VAR(0) += 12.0; - func_802CFD30(NPC_BOO0, 7, SI_VAR(0), 0, 0, 0); - func_802CFD30(NPC_BOO1, 7, SI_VAR(0), 0, 0, 0); + EVT_VAR(0) += 12.0; + func_802CFD30(NPC_BOO0, 7, EVT_VAR(0), 0, 0, 0); + func_802CFD30(NPC_BOO1, 7, EVT_VAR(0), 0, 0, 0); sleep 1; } SpeakToPlayer(NPC_BOO2, NPC_ANIM_boo_Palette_01_Anim_6, NPC_ANIM_boo_Palette_01_Anim_6, 0, MESSAGE_ID(0x0E, 0x00A1)); - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 9) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 9) { N(SwitchToPartner)(9); spawn { - SI_MAP_VAR(0) = 0; + EVT_MAP_VAR(0) = 0; ShowMessageAtScreenPos(MESSAGE_ID(0x0E, 0x00A2), 160, 40); - SI_MAP_VAR(0) = 1; + EVT_MAP_VAR(0) = 1; } sleep 50; DisablePartnerAI(0); @@ -564,7 +564,7 @@ EvtSource N(80242C50) = SCRIPT({ EnablePartnerAI(); loop { sleep 1; - if (SI_MAP_VAR(0) == 1) { + if (EVT_MAP_VAR(0) == 1) { break loop; } } @@ -602,18 +602,18 @@ EvtSource N(80242C50) = SCRIPT({ spawn { PlaySound(SOUND_BOO_APPEAR); sleep 20; - SI_VAR(0) = 240.0; + EVT_VAR(0) = 240.0; loop 20 { - SI_VAR(0) -= 12.0; - func_802CFD30(NPC_BOO0, 7, SI_VAR(0), 0, 0, 0); - func_802CFD30(NPC_BOO1, 7, SI_VAR(0), 0, 0, 0); + EVT_VAR(0) -= 12.0; + func_802CFD30(NPC_BOO0, 7, EVT_VAR(0), 0, 0, 0); + func_802CFD30(NPC_BOO1, 7, EVT_VAR(0), 0, 0, 0); sleep 1; } SetNpcPos(NPC_BOO0, 0, -1000, 0); SetNpcPos(NPC_BOO1, 0, -1000, 0); sleep 10; } - SI_VAR(0) = 4; + EVT_VAR(0) = 4; spawn N(80242BEC); SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM_world_tubba_Palette_00_Anim_9); NpcMoveTo(NPC_WORLD_TUBBA, 550, 196, 0); @@ -627,16 +627,16 @@ EvtSource N(80242C50) = SCRIPT({ SetPanTarget(0, 426, 190, 194); PanToTarget(0, 0, 1); sleep 30; - SI_MAP_VAR(1) = 0; + EVT_MAP_VAR(1) = 0; spawn { - SI_VAR(0) = 7; + EVT_VAR(0) = 7; spawn N(80242BEC); SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM_world_tubba_Palette_00_Anim_9); NpcMoveTo(NPC_WORLD_TUBBA, 370, 220, 0); - GetNpcPos(NPC_BOO2, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcMoveTo(NPC_WORLD_TUBBA, 330, SI_VAR(2), 0); + GetNpcPos(NPC_BOO2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcMoveTo(NPC_WORLD_TUBBA, 330, EVT_VAR(2), 0); SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM_world_tubba_Palette_00_Anim_6); - SI_MAP_VAR(1) = 1; + EVT_MAP_VAR(1) = 1; } SetCamSpeed(0, 90.0); SetCamPitch(0, 17.0, -11.5); @@ -651,7 +651,7 @@ EvtSource N(80242C50) = SCRIPT({ sleep 15; loop { sleep 1; - if (SI_MAP_VAR(1) == 1) { + if (EVT_MAP_VAR(1) == 1) { break loop; } } @@ -697,16 +697,16 @@ EvtSource N(80242C50) = SCRIPT({ sleep 15; SpeakToPlayer(NPC_WORLD_TUBBA, NPC_ANIM_world_tubba_Palette_00_Anim_21, NPC_ANIM_world_tubba_Palette_00_Anim_6, 5, MESSAGE_ID(0x0E, 0x00A7)); SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM_world_tubba_Palette_00_Anim_21); - GetNpcPos(NPC_WORLD_TUBBA, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += -50; - SI_VAR(1) += 50; - SI_VAR(2) += 10; - PlayEffect(0x6, 1, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10, 0, 0, 0, 0, 0, 0, 0, 0); + GetNpcPos(NPC_WORLD_TUBBA, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += -50; + EVT_VAR(1) += 50; + EVT_VAR(2) += 10; + PlayEffect(0x6, 1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10, 0, 0, 0, 0, 0, 0, 0, 0); sleep 20; SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM_world_tubba_Palette_00_Anim_6); InterpNpcYaw(NPC_WORLD_TUBBA, 90, 1); sleep 30; - SI_VAR(0) = 7; + EVT_VAR(0) = 7; spawn N(80242BEC); SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM_world_tubba_Palette_00_Anim_9); NpcMoveTo(NPC_WORLD_TUBBA, 370, 220, 0); @@ -722,12 +722,12 @@ EvtSource N(80242C50) = SCRIPT({ EnableNpcShadow(NPC_BOO1, TRUE); EnableNpcShadow(NPC_BOO4, TRUE); PlaySound(SOUND_BOO_VANISH); - SI_VAR(0) = 0.0; + EVT_VAR(0) = 0.0; loop 20 { - SI_VAR(0) += 12.5; - func_802CFD30(NPC_BOO0, 7, SI_VAR(0), 0, 0, 0); - func_802CFD30(NPC_BOO1, 7, SI_VAR(0), 0, 0, 0); - func_802CFD30(NPC_BOO4, 7, SI_VAR(0), 0, 0, 0); + EVT_VAR(0) += 12.5; + func_802CFD30(NPC_BOO0, 7, EVT_VAR(0), 0, 0, 0); + func_802CFD30(NPC_BOO1, 7, EVT_VAR(0), 0, 0, 0); + func_802CFD30(NPC_BOO4, 7, EVT_VAR(0), 0, 0, 0); sleep 1; } func_802CFD30(NPC_BOO0, 0, 0, 0, 0, 0); @@ -736,9 +736,9 @@ EvtSource N(80242C50) = SCRIPT({ sleep 10; SetCamType(0, 4, 0); SetCamSpeed(0, 3.0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); @@ -747,17 +747,17 @@ EvtSource N(80242C50) = SCRIPT({ }); EvtSource N(802441FC) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { + if (EVT_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { SetNpcPos(NPC_BOO2, 330, 184, 240); loop { - SI_VAR(10) = 0; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(2) >= 110) { - if (SI_VAR(0) >= 220) { - SI_VAR(10) = 1; + EVT_VAR(10) = 0; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(2) >= 110) { + if (EVT_VAR(0) >= 220) { + EVT_VAR(10) = 1; } } - if (SI_VAR(10) == 1) { + if (EVT_VAR(10) == 1) { break loop; } sleep 1; @@ -767,13 +767,13 @@ EvtSource N(802441FC) = SCRIPT({ BindNpcInteract(NPC_BOO0, N(interact_802418F4)); BindNpcInteract(NPC_BOO1, N(interact_80241A84)); BindNpcInteract(NPC_BOO4, N(interact_80241F88)); - SI_STORY_PROGRESS = STORY_CH3_SAW_TUBBA_EAT_BOO; + EVT_STORY_PROGRESS = STORY_CH3_SAW_TUBBA_EAT_BOO; spawn N(80241360); } }); EvtSource N(init_80244358) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH3_SAW_TUBBA_EAT_BOO) { + if (EVT_STORY_PROGRESS >= STORY_CH3_SAW_TUBBA_EAT_BOO) { RemoveNpc(NPC_SELF); } }); @@ -820,24 +820,24 @@ StaticNpc N(npcGroup_802443AC) = { }; 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; - SI_VAR(4) = SI_VAR(0); - SI_VAR(4) += 60; + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(3) = EVT_VAR(0); + EVT_VAR(3) += -60; + EVT_VAR(4) = EVT_VAR(0); + EVT_VAR(4) += 60; loop { - RandInt(5, SI_VAR(5)); - SI_VAR(6) = (float) SI_VAR(5); - SI_VAR(6) *= 0.1005859375; - SI_VAR(6) += 0.80078125; - SetNpcSpeed(NPC_SELF, SI_VAR(6)); - NpcMoveTo(NPC_SELF, SI_VAR(3), SI_VAR(2), 0); - RandInt(5, SI_VAR(5)); - SI_VAR(6) = (float) SI_VAR(5); - SI_VAR(6) *= 0.1005859375; - SI_VAR(6) += 0.80078125; - SetNpcSpeed(NPC_SELF, SI_VAR(6)); - NpcMoveTo(NPC_SELF, SI_VAR(4), SI_VAR(2), 0); + RandInt(5, EVT_VAR(5)); + EVT_VAR(6) = (float) EVT_VAR(5); + EVT_VAR(6) *= 0.1005859375; + EVT_VAR(6) += 0.80078125; + SetNpcSpeed(NPC_SELF, EVT_VAR(6)); + NpcMoveTo(NPC_SELF, EVT_VAR(3), EVT_VAR(2), 0); + RandInt(5, EVT_VAR(5)); + EVT_VAR(6) = (float) EVT_VAR(5); + EVT_VAR(6) *= 0.1005859375; + EVT_VAR(6) += 0.80078125; + SetNpcSpeed(NPC_SELF, EVT_VAR(6)); + NpcMoveTo(NPC_SELF, EVT_VAR(4), EVT_VAR(2), 0); } }); diff --git a/src/world/area_arn/arn_05/header.c b/src/world/area_arn/arn_05/header.c index a9165d1d79..0e05506e37 100644 --- a/src/world/area_arn/arn_05/header.c +++ b/src/world/area_arn/arn_05/header.c @@ -15,7 +15,7 @@ MapConfig N(config) = { }; EvtSource N(80241360) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_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 c76d8bd647..8e05a805f0 100644 --- a/src/world/area_arn/arn_07/BECDF0.c +++ b/src/world/area_arn/arn_07/BECDF0.c @@ -49,7 +49,7 @@ ApiStatus N(func_8024004C_BECE3C)(Evt* script, s32 isInitialCall) { if (isInitialCall) { arn_07_struct* ptr = heap_malloc(sizeof(arn_07_struct)); script->varTable[0] = ptr; - set_variable(NULL, SI_MAP_VAR(1), ptr); + set_variable(NULL, EVT_MAP_VAR(1), ptr); ptr->unk_38 = get_variable(script, *args++); ptr->unk_3C = get_variable(script, *args++); ptr->unk_0C = get_float_variable(script, *args++); @@ -222,18 +222,18 @@ s32 N(itemList_80242040)[] = { EvtSource N(80242048) = SCRIPT({ FadeOutMusic(0, 1000); - SI_VAR(0) = 0; - if (SI_VAR(0) == 0) { + EVT_VAR(0) = 0; + if (EVT_VAR(0) == 0) { DisablePlayerInput(TRUE); UseSettingsFrom(0, 145, 65, 0); SetCamSpeed(0, 0.6005859375); SetPanTarget(0, 145, 30, 0); - GetCamDistance(0, SI_VAR(1)); - SI_VAR(1) -= 100; - SetCamDistance(0, SI_VAR(1)); + GetCamDistance(0, EVT_VAR(1)); + EVT_VAR(1) -= 100; + SetCamDistance(0, EVT_VAR(1)); if (10000 != 10000) { - GetCamPitch(0, SI_VAR(2), SI_VAR(3)); - SetCamPitch(0, SI_VAR(2), 10000); + GetCamPitch(0, EVT_VAR(2), EVT_VAR(3)); + SetCamPitch(0, EVT_VAR(2), 10000); } PanToTarget(0, 0, 1); N(func_8024004C_BECE3C)(2, 50, 100, 31, -6, 145, 65, 0, 30, 0); @@ -261,14 +261,14 @@ EvtSource N(80242048) = SCRIPT({ sleep 80; SetPlayerAnimation(ANIM_10002); } - SI_VAR(1) += 100; - SetCamDistance(0, SI_VAR(1)); + EVT_VAR(1) += 100; + SetCamDistance(0, EVT_VAR(1)); SetPanTarget(0, 145, 0, 0); N(func_802405BC_BED3AC)(2); - GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4)); - UseSettingsFrom(0, SI_VAR(2), SI_VAR(3), SI_VAR(4)); + GetPlayerPos(EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + UseSettingsFrom(0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); SetCamSpeed(0, 1.0); - SetPanTarget(0, SI_VAR(2), SI_VAR(3), SI_VAR(4)); + SetPanTarget(0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); DisablePlayerInput(FALSE); @@ -282,24 +282,24 @@ EvtSource N(80242048) = SCRIPT({ N(func_802405BC_BED3AC)(3); PlaySoundAtPlayer(312, 0); DisablePlayerInput(TRUE); - SI_STORY_PROGRESS = STORY_CH3_STAR_SPIRIT_RESCUED; + EVT_STORY_PROGRESS = STORY_CH3_STAR_SPIRIT_RESCUED; GotoMapSpecial("kmr_23", 2, 14); sleep 100; }); EvtSource N(80242498) = SCRIPT({ - SI_VAR(0) = 1; - if (SI_VAR(0) == 0) { + EVT_VAR(0) = 1; + if (EVT_VAR(0) == 0) { DisablePlayerInput(TRUE); UseSettingsFrom(0, 145, 65, 0); SetCamSpeed(0, 0.6005859375); SetPanTarget(0, 145, 30, 0); - GetCamDistance(0, SI_VAR(1)); - SI_VAR(1) -= 100; - SetCamDistance(0, SI_VAR(1)); + GetCamDistance(0, EVT_VAR(1)); + EVT_VAR(1) -= 100; + SetCamDistance(0, EVT_VAR(1)); if (10000 != 10000) { - GetCamPitch(0, SI_VAR(2), SI_VAR(3)); - SetCamPitch(0, SI_VAR(2), 10000); + GetCamPitch(0, EVT_VAR(2), EVT_VAR(3)); + SetCamPitch(0, EVT_VAR(2), 10000); } PanToTarget(0, 0, 1); N(func_8024004C_BECE3C)(2, 50, 100, 31, -6, 145, 65, 0, 30, 0); @@ -327,14 +327,14 @@ EvtSource N(80242498) = SCRIPT({ sleep 80; SetPlayerAnimation(ANIM_10002); } - SI_VAR(1) += 100; - SetCamDistance(0, SI_VAR(1)); + EVT_VAR(1) += 100; + SetCamDistance(0, EVT_VAR(1)); SetPanTarget(0, 145, 0, 0); N(func_802405BC_BED3AC)(2); - GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4)); - UseSettingsFrom(0, SI_VAR(2), SI_VAR(3), SI_VAR(4)); + GetPlayerPos(EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + UseSettingsFrom(0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); SetCamSpeed(0, 1.0); - SetPanTarget(0, SI_VAR(2), SI_VAR(3), SI_VAR(4)); + SetPanTarget(0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); DisablePlayerInput(FALSE); @@ -348,7 +348,7 @@ EvtSource N(80242498) = SCRIPT({ N(func_802405BC_BED3AC)(3); PlaySoundAtPlayer(312, 0); DisablePlayerInput(TRUE); - SI_STORY_PROGRESS = STORY_CH3_STAR_SPIRIT_RESCUED; + EVT_STORY_PROGRESS = STORY_CH3_STAR_SPIRIT_RESCUED; GotoMapSpecial("kmr_23", 2, 14); sleep 100; }); @@ -356,10 +356,10 @@ EvtSource N(80242498) = SCRIPT({ EvtSource N(exitSingleDoor_802428D4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); - SI_VAR(0) = 0; - SI_VAR(1) = 10; - SI_VAR(2) = 29; - SI_VAR(3) = 1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 10; + EVT_VAR(2) = 29; + EVT_VAR(3) = 1; spawn ExitSingleDoor; sleep 17; GotoMap("arn_08", 0); @@ -403,8 +403,8 @@ EvtSource N(80242A30) = SCRIPT({ PlaySoundAtNpc(NPC_TUBBAS_HEART, 0x20C8, 0); NpcJump0(NPC_TUBBAS_HEART, 0, 0, 0, 10); sleep 1; - GetNpcVar(0, 0, SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetNpcVar(0, 0, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { break loop; } } @@ -414,9 +414,9 @@ EvtSource N(80242A30) = SCRIPT({ MakeLerp(80, 0, 10, 0); loop { UpdateLerp(); - RotateModel(29, SI_VAR(0), 0, -1, 0); + RotateModel(29, EVT_VAR(0), 0, -1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -426,8 +426,8 @@ EvtSource N(80242A30) = SCRIPT({ SpeakToPlayer(NPC_TUBBAS_HEART, NPC_ANIM_tubbas_heart_Palette_00_Anim_A, NPC_ANIM_tubbas_heart_Palette_00_Anim_1, 5, MESSAGE_ID(0x0E, 0x00C7)); SetNpcVar(0, 0, 1); loop { - GetNpcVar(0, 0, SI_VAR(0)); - if (SI_VAR(0) == 2) { + GetNpcVar(0, 0, EVT_VAR(0)); + if (EVT_VAR(0) == 2) { break loop; } sleep 1; @@ -465,9 +465,9 @@ EvtSource N(80242A30) = SCRIPT({ MakeLerp(0, 80, 10, 0); loop { UpdateLerp(); - RotateModel(29, SI_VAR(0), 0, -1, 0); + RotateModel(29, EVT_VAR(0), 0, -1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -491,9 +491,9 @@ EvtSource N(80242A30) = SCRIPT({ MakeLerp(80, 0, 10, 0); loop { UpdateLerp(); - RotateModel(29, SI_VAR(0), 0, -1, 0); + RotateModel(29, EVT_VAR(0), 0, -1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -510,7 +510,7 @@ EvtSource N(80242A30) = 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) { + if (EVT_STORY_PROGRESS < STORY_CH3_UNLOCKED_WINDY_MILL) { bind_padlock N(802439B0) TRIGGER_WALL_PRESS_A entity(0) N(itemList_80242040); } else { bind N(exitSingleDoor_802428D4) TRIGGER_WALL_PRESS_A 10; @@ -518,26 +518,26 @@ EvtSource N(802433C8) = SCRIPT({ }); EvtSource N(enterWalk_8024346C) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - if (SI_STORY_PROGRESS == STORY_CH3_HEART_ESCAPED_WINDY_MILL) { + if (EVT_STORY_PROGRESS == STORY_CH3_HEART_ESCAPED_WINDY_MILL) { await N(80242A30); spawn N(802433C8); } else { - SI_VAR(2) = 29; - SI_VAR(3) = 1; + EVT_VAR(2) = 29; + EVT_VAR(3) = 1; await EnterSingleDoor; spawn N(802433C8); } } == 1 { - SI_VAR(0) = N(802433C8); + EVT_VAR(0) = N(802433C8); spawn EnterWalk; sleep 1; } == 2 { - SI_VAR(0) = N(802433C8); + EVT_VAR(0) = N(802433C8); spawn EnterWalk; sleep 1; } @@ -549,14 +549,14 @@ EvtSource N(enterWalk_8024346C) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; + EVT_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamLeadPlayer(0, 0); SetCamEnabled(0, 1); - SI_SAVE_FLAG(1977) = 1; - match SI_STORY_PROGRESS { + EVT_SAVE_FLAG(1977) = 1; + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { MakeNpcs(0, N(npcGroupList_802478B8)); } @@ -570,12 +570,12 @@ EvtSource N(main) = SCRIPT({ } } await N(makeEntities); - if (SI_STORY_PROGRESS == STORY_CH3_DEFEATED_TUBBA_BLUBBA) { + if (EVT_STORY_PROGRESS == STORY_CH3_DEFEATED_TUBBA_BLUBBA) { spawn N(80242498); } spawn N(enterWalk_8024346C); - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 3) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 3) { sleep 65; } spawn N(80243790); diff --git a/src/world/area_arn/arn_07/BED5F0.c b/src/world/area_arn/arn_07/BED5F0.c index e333837d20..b69f747c18 100644 --- a/src/world/area_arn/arn_07/BED5F0.c +++ b/src/world/area_arn/arn_07/BED5F0.c @@ -1,11 +1,11 @@ #include "arn_07.h" ApiStatus N(func_80240800_BED5F0)(Evt* script, s32 isInitialCall) { - f32 temp_f0 = get_float_variable(script, SI_VAR(0)); + f32 temp_f0 = get_float_variable(script, EVT_VAR(0)); if (temp_f0 >= 360.0) { temp_f0 -= 360.0; } - set_float_variable(script, SI_VAR(0), temp_f0); + set_float_variable(script, EVT_VAR(0), temp_f0); return ApiStatus_DONE2; } diff --git a/src/world/area_arn/arn_07/events.c b/src/world/area_arn/arn_07/events.c index 0df5f09dab..d71c52f114 100644 --- a/src/world/area_arn/arn_07/events.c +++ b/src/world/area_arn/arn_07/events.c @@ -12,37 +12,37 @@ EvtSource N(80243790) = SCRIPT({ }); EvtSource N(802437AC) = SCRIPT({ - SI_VAR(0) = 0.0; - SI_VAR(1) = 30; + EVT_VAR(0) = 0.0; + EVT_VAR(1) = 30; PlaySoundAtModel(23, 0x8000004A, 0); 0: - SI_VAR(0) += 1.0; + EVT_VAR(0) += 1.0; N(func_80240800_BED5F0)(); - RotateModel(27, SI_VAR(0), 0, 0, 1); + RotateModel(27, EVT_VAR(0), 0, 0, 1); sleep 1; - SI_VAR(1) -= 1; - if (SI_VAR(1) > 0) { + EVT_VAR(1) -= 1; + if (EVT_VAR(1) > 0) { goto 0; } - SI_VAR(1) = 30; - RandInt(100, SI_VAR(2)); - if (SI_VAR(2) > 10) { + EVT_VAR(1) = 30; + RandInt(100, EVT_VAR(2)); + if (EVT_VAR(2) > 10) { goto 0; } - SI_VAR(2) = 1.0; + EVT_VAR(2) = 1.0; loop 50 { - SI_VAR(2) -= 0.0107421875; - SI_VAR(0) += (float) SI_VAR(2); - RotateModel(27, SI_VAR(0), 0, 0, 1); + EVT_VAR(2) -= 0.0107421875; + EVT_VAR(0) += (float) EVT_VAR(2); + RotateModel(27, EVT_VAR(0), 0, 0, 1); sleep 1; } loop 50 { - SI_VAR(2) += 0.0107421875; - SI_VAR(0) += (float) SI_VAR(2); - RotateModel(27, SI_VAR(0), 0, 0, 1); + EVT_VAR(2) += 0.0107421875; + EVT_VAR(0) += (float) EVT_VAR(2); + RotateModel(27, EVT_VAR(0), 0, 0, 1); sleep 1; } - SI_VAR(1) = 30; + EVT_VAR(1) = 30; goto 0; }); @@ -50,24 +50,24 @@ EvtSource N(802439B0) = SCRIPT({ group 0; SetTimeFreezeMode(1); ShowKeyChoicePopup(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00D8), 160, 40); CloseChoicePopup(); SetTimeFreezeMode(0); return; } - if (SI_VAR(0) == -1) { + if (EVT_VAR(0) == -1) { CloseChoicePopup(); SetTimeFreezeMode(0); return; } - FindKeyItem(31, SI_VAR(0)); - RemoveKeyItemAt(SI_VAR(0)); + FindKeyItem(31, EVT_VAR(0)); + RemoveKeyItemAt(EVT_VAR(0)); CloseChoicePopup(); - SI_STORY_PROGRESS = STORY_CH3_UNLOCKED_WINDY_MILL; - N(GetEntityPosition)(SI_MAP_VAR(0), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - PlaySoundAt(0x269, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) = SI_MAP_VAR(0); + EVT_STORY_PROGRESS = STORY_CH3_UNLOCKED_WINDY_MILL; + N(GetEntityPosition)(EVT_MAP_VAR(0), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + PlaySoundAt(0x269, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) = EVT_MAP_VAR(0); N(SetEntityFlags100000)(); SetTimeFreezeMode(0); unbind; @@ -78,10 +78,10 @@ EvtSource N(80243B28) = SCRIPT({ }); EvtSource N(makeEntities) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH3_UNLOCKED_WINDY_MILL) { + if (EVT_STORY_PROGRESS < STORY_CH3_UNLOCKED_WINDY_MILL) { MakeEntity(0x802BCD68, 10, 30, -155, 0, MAKE_ENTITY_END); AssignScript(N(80243B28)); - SI_MAP_VAR(0) = SI_VAR(0); + EVT_MAP_VAR(0) = EVT_VAR(0); } }); @@ -194,8 +194,8 @@ EvtSource N(80243E24) = SCRIPT({ SetCamDistance(0, 300); SetCamSpeed(0, 2.0); SetCamPitch(0, 5.0, -16.0); - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); WaitForCam(0, 1.0); }); @@ -235,9 +235,9 @@ EvtSource N(80243FE8) = SCRIPT({ sleep 45; UseSettingsFrom(0, 236, 0, -46); SetCamSpeed(0, 90.0); - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 50; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 50; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); PanToTarget(0, 0, 1); sleep 5; SetPlayerAnimation(ANIM_STAND_STILL); @@ -247,8 +247,8 @@ EvtSource N(80243FE8) = SCRIPT({ sleep 5; SetCamSpeed(0, 90.0); loop 40 { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } @@ -258,39 +258,39 @@ EvtSource N(80243FE8) = SCRIPT({ PlayerFaceNpc(-1, 1); } } - SI_VAR(10) = spawn N(80243DCC); - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 800; - NpcMoveTo(NPC_SELF, SI_VAR(0), SI_VAR(2), 80); - kill SI_VAR(10); + EVT_VAR(10) = spawn N(80243DCC); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 800; + NpcMoveTo(NPC_SELF, EVT_VAR(0), EVT_VAR(2), 80); + kill EVT_VAR(10); SetNpcPos(NPC_SELF, 0, -1000, 0); EnableNpcShadow(NPC_SELF, FALSE); - SI_STORY_PROGRESS = STORY_CH3_DEFEATED_TUBBA_BLUBBA; + EVT_STORY_PROGRESS = STORY_CH3_DEFEATED_TUBBA_BLUBBA; SetMusicTrack(0, SONG_CHEERFUL_BOOS_MANSION, 0, 8); - GetCurrentPartnerID(SI_VAR(6)); - if (SI_VAR(6) == 9) { - SI_VAR(5) = -4; + GetCurrentPartnerID(EVT_VAR(6)); + if (EVT_VAR(6) == 9) { + EVT_VAR(5) = -4; func_802CF56C(0); DisablePartnerAI(0); SetNpcPos(NPC_PARTNER, 257, 25, 0); } SetCamSpeed(0, 90.0); SetCamDistance(0, 300); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 30; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 30; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 10; - if (SI_VAR(6) != 9) { - SI_VAR(5) = 8; + if (EVT_VAR(6) != 9) { + EVT_VAR(5) = 8; SetNpcPos(NPC_WORLD_BOW, 257, 25, 0); func_802CFD30(NPC_WORLD_BOW, 7, 0, 0, 0, 0); NpcFacePlayer(NPC_WORLD_BOW, 0); MakeLerp(0, 240, 20, 0); loop { UpdateLerp(); - func_802CFD30(NPC_WORLD_BOW, 7, SI_VAR(0), 0, 0, 0); + func_802CFD30(NPC_WORLD_BOW, 7, EVT_VAR(0), 0, 0, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -298,31 +298,31 @@ EvtSource N(80243FE8) = SCRIPT({ } sleep 10; spawn { - if (SI_VAR(6) != 9) { + if (EVT_VAR(6) != 9) { DisablePartnerAI(0); sleep 1; NpcFaceNpc(NPC_PARTNER, NPC_WORLD_BOW, 0); sleep 5; } } - SpeakToPlayer(SI_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_B, NPC_ANIM_world_bow_Palette_00_Anim_B, 0, MESSAGE_ID(0x0E, 0x00CD)); + SpeakToPlayer(EVT_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_B, NPC_ANIM_world_bow_Palette_00_Anim_B, 0, MESSAGE_ID(0x0E, 0x00CD)); InterpPlayerYaw(270, 0); sleep 10; - GetNpcPos(SI_VAR(5), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += -20; - SetCamProperties(0, 2.0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 300.0, 15.0, -7.0); - PlayerFaceNpc(SI_VAR(5), 0); + GetNpcPos(EVT_VAR(5), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += -20; + SetCamProperties(0, 2.0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 300.0, 15.0, -7.0); + PlayerFaceNpc(EVT_VAR(5), 0); sleep 10; - SpeakToPlayer(SI_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_4, NPC_ANIM_world_bow_Palette_00_Anim_1, 0, MESSAGE_ID(0x0E, 0x00CE)); + SpeakToPlayer(EVT_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_4, NPC_ANIM_world_bow_Palette_00_Anim_1, 0, MESSAGE_ID(0x0E, 0x00CE)); ShowChoice(1966093); - if (SI_VAR(0) == 0) { - ContinueSpeech(SI_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_B, NPC_ANIM_world_bow_Palette_00_Anim_B, 0, + if (EVT_VAR(0) == 0) { + ContinueSpeech(EVT_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_B, NPC_ANIM_world_bow_Palette_00_Anim_B, 0, MESSAGE_ID(0x0E, 0x00CF)); } else { - ContinueSpeech(SI_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_B, NPC_ANIM_world_bow_Palette_00_Anim_B, 0, + ContinueSpeech(EVT_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_B, NPC_ANIM_world_bow_Palette_00_Anim_B, 0, MESSAGE_ID(0x0E, 0x00D0)); } - SpeakToPlayer(SI_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_4, NPC_ANIM_world_bow_Palette_00_Anim_1, 0, MESSAGE_ID(0x0E, 0x00D1)); + SpeakToPlayer(EVT_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_4, NPC_ANIM_world_bow_Palette_00_Anim_1, 0, MESSAGE_ID(0x0E, 0x00D1)); UseSettingsFrom(0, 175, 0, 0); SetCamSpeed(0, 4.0); SetPanTarget(0, 175, 0, 0); @@ -334,7 +334,7 @@ EvtSource N(80243FE8) = SCRIPT({ InterpPlayerYaw(270, 0); } spawn { - if (SI_VAR(6) != 9) { + if (EVT_VAR(6) != 9) { sleep 12; InterpNpcYaw(NPC_PARTNER, 270, 0); } @@ -342,20 +342,20 @@ EvtSource N(80243FE8) = SCRIPT({ MakeLerp(160, 31, 70, 0); loop { UpdateLerp(); - SetNpcPos(NPC_BOOTLER, 93, SI_VAR(0), -6); + SetNpcPos(NPC_BOOTLER, 93, EVT_VAR(0), -6); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } spawn { - if (SI_VAR(6) != 9) { + if (EVT_VAR(6) != 9) { InterpNpcYaw(NPC_PARTNER, 90, 0); } } - SpeakToPlayer(SI_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_4, NPC_ANIM_world_bow_Palette_00_Anim_1, 0, MESSAGE_ID(0x0E, 0x00D2)); + SpeakToPlayer(EVT_VAR(5), NPC_ANIM_world_bow_Palette_00_Anim_4, NPC_ANIM_world_bow_Palette_00_Anim_1, 0, MESSAGE_ID(0x0E, 0x00D2)); spawn { - if (SI_VAR(6) != 9) { + if (EVT_VAR(6) != 9) { sleep 12; InterpNpcYaw(NPC_PARTNER, 270, 0); } @@ -365,13 +365,13 @@ EvtSource N(80243FE8) = SCRIPT({ spawn N(80242048); sleep 20; spawn { - if (SI_VAR(6) != 9) { + if (EVT_VAR(6) != 9) { MakeLerp(240, 0, 20, 0); loop { UpdateLerp(); - func_802CFD30(NPC_WORLD_BOW, 7, SI_VAR(0), 0, 0, 0); + func_802CFD30(NPC_WORLD_BOW, 7, EVT_VAR(0), 0, 0, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -391,8 +391,8 @@ EvtSource N(80243FE8) = SCRIPT({ EvtSource N(idle_80244C54) = SCRIPT({ loop { - GetSelfVar(0, SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetSelfVar(0, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { break loop; } sleep 1; @@ -403,48 +403,48 @@ EvtSource N(idle_80244C54) = SCRIPT({ EvtSource N(idle_80244CC8) = SCRIPT({ 10: loop { - GetSelfVar(0, SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetSelfVar(0, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { break loop; } sleep 1; } spawn { - SI_VAR(0) = 0.5; + EVT_VAR(0) = 0.5; MakeLerp(50, 80, 15, 0); loop { UpdateLerp(); - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(2) /= (float) 100; - SetNpcScale(NPC_SELF, SI_VAR(2), SI_VAR(2), SI_VAR(2)); + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(2) /= (float) 100; + SetNpcScale(NPC_SELF, EVT_VAR(2), EVT_VAR(2), EVT_VAR(2)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } } spawn { - RandInt(80, SI_VAR(2)); - RandInt(10, SI_VAR(3)); - SI_VAR(3) += 5; - MakeLerp(SI_VAR(2), 240, SI_VAR(3), 0); + RandInt(80, EVT_VAR(2)); + RandInt(10, EVT_VAR(3)); + EVT_VAR(3) += 5; + MakeLerp(EVT_VAR(2), 240, EVT_VAR(3), 0); loop { UpdateLerp(); - func_802CFD30(NPC_SELF, 7, SI_VAR(0), 0, 0, 0); + func_802CFD30(NPC_SELF, 7, EVT_VAR(0), 0, 0, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } } SetNpcPos(NPC_SELF, 293, 59, 21); sleep 1; - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetNpcJumpscale(NPC_SELF, -0.2998046875); - RandInt(100, SI_VAR(3)); - SI_VAR(0) -= SI_VAR(3); - SI_VAR(1) += 100; - NpcJump0(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2), 20); + RandInt(100, EVT_VAR(3)); + EVT_VAR(0) -= EVT_VAR(3); + EVT_VAR(1) += 100; + NpcJump0(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 20); SetNpcPos(NPC_SELF, 0, -1000, 0); SetSelfVar(0, 0); goto 10; @@ -452,8 +452,8 @@ EvtSource N(idle_80244CC8) = SCRIPT({ EvtSource N(defeat_80244FB8) = SCRIPT({ SetEncounterStatusFlags(2, 1); - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { SetMusicTrack(0, SONG_TUBBAS_MANOR, 1, 8); await N(80243E24); @@ -466,7 +466,7 @@ EvtSource N(defeat_80244FB8) = SCRIPT({ }); EvtSource N(init_80245058) = SCRIPT({ - if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { + if (EVT_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); @@ -475,7 +475,7 @@ EvtSource N(init_80245090) = SCRIPT({ SetSelfVar(0, 0); BindNpcIdle(NPC_SELF, N(idle_80244C54)); BindNpcDefeat(NPC_SELF, N(defeat_80244FB8)); - if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { + if (EVT_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); @@ -483,19 +483,19 @@ EvtSource N(init_80245090) = 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) { + if (EVT_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); EvtSource N(init_80245164) = SCRIPT({ - if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { + if (EVT_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); EvtSource N(init_8024519C) = SCRIPT({ - if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { + if (EVT_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); @@ -530,15 +530,15 @@ s32 N(extraAnimationList_80245208)[] = { EvtSource N(idle_80245210) = SCRIPT({ loop { loop 10 { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) -= 1; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) -= 1; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } loop 10 { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } @@ -547,17 +547,17 @@ EvtSource N(idle_80245210) = SCRIPT({ EvtSource N(80245304) = SCRIPT({ DisablePartnerAI(0); func_802CF56C(2); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(3) = SI_VAR(0); - SI_VAR(3) += -50; - SI_VAR(4) = SI_VAR(1); - SI_VAR(4) += 26; - SetNpcPos(NPC_WORLD_SKOLAR, SI_VAR(3), SI_VAR(4), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(3) = EVT_VAR(0); + EVT_VAR(3) += -50; + EVT_VAR(4) = EVT_VAR(1); + EVT_VAR(4) += 26; + SetNpcPos(NPC_WORLD_SKOLAR, EVT_VAR(3), EVT_VAR(4), EVT_VAR(2)); PlayerFaceNpc(13, 0); NpcFaceNpc(NPC_PARTNER, NPC_WORLD_SKOLAR, 0); - SI_VAR(0) += -25; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) += -25; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 475.0); SetCamPitch(0, 18, -8); SetCamSpeed(0, 90.0); @@ -575,9 +575,9 @@ EvtSource N(80245304) = SCRIPT({ MakeLerp(0, 360, 10, 0); loop { UpdateLerp(); - SetNpcRotation(NPC_WORLD_SKOLAR, 0, SI_VAR(0), 0); + SetNpcRotation(NPC_WORLD_SKOLAR, 0, EVT_VAR(0), 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -586,22 +586,22 @@ EvtSource N(80245304) = SCRIPT({ sleep 20; SetPlayerAnimation(ANIM_GOT_ITEM); PlaySoundAtPlayer(313, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(3) = SI_VAR(1); - SI_VAR(1) += 50; - SI_VAR(2) += 10; - SI_VAR(3) += 30; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(3) = EVT_VAR(1); + EVT_VAR(1) += 50; + EVT_VAR(2) += 10; + EVT_VAR(3) += 30; loop 5 { - PlayEffect(0x11, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x11, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); sleep 6; - PlayEffect(0x11, 1, SI_VAR(0), SI_VAR(3), SI_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x11, 1, EVT_VAR(0), EVT_VAR(3), EVT_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); sleep 6; } sleep 20; PlaySoundAtPlayer(392, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; - PlayEffect(0x52, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 30, 0, 0, 0, 0, 0, 0, 0); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + PlayEffect(0x52, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 30, 0, 0, 0, 0, 0, 0, 0); sleep 30; SetPlayerAnimation(ANIM_10002); SetNpcAnimation(NPC_WORLD_SKOLAR, NPC_ANIM_world_skolar_Palette_00_Anim_1); @@ -609,17 +609,17 @@ EvtSource N(80245304) = SCRIPT({ PostChapter3StatUpdate(); ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x0193), 160, 40); sleep 10; - GetNpcPos(NPC_WORLD_SKOLAR, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_WORLD_SKOLAR, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 250.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); sleep 10; SpeakToPlayer(NPC_WORLD_SKOLAR, NPC_ANIM_world_skolar_Palette_00_Anim_2, NPC_ANIM_world_skolar_Palette_00_Anim_1, 512, MESSAGE_ID(0x0E, 0x00D4)); sleep 10; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += -25; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += -25; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 300.0); SetCamSpeed(0, 4.0); PanToTarget(0, 0, 1); @@ -629,34 +629,34 @@ EvtSource N(80245304) = SCRIPT({ SetNpcFlagBits(NPC_WORLD_SKOLAR, NPC_FLAG_40000, TRUE); spawn { loop 25 { - GetNpcPos(NPC_WORLD_SKOLAR, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - PlayEffect(0x11, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); + GetNpcPos(NPC_WORLD_SKOLAR, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + PlayEffect(0x11, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); sleep 4; } } spawn { - SI_VAR(2) = 0; - SI_VAR(3) = 1800; - MakeLerp(SI_VAR(2), SI_VAR(3), 100, 2); + EVT_VAR(2) = 0; + EVT_VAR(3) = 1800; + MakeLerp(EVT_VAR(2), EVT_VAR(3), 100, 2); loop { UpdateLerp(); - SetNpcRotation(NPC_WORLD_SKOLAR, 0, SI_VAR(0), 0); + SetNpcRotation(NPC_WORLD_SKOLAR, 0, EVT_VAR(0), 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } } spawn { - GetNpcPos(NPC_WORLD_SKOLAR, SI_VAR(2), SI_VAR(3), SI_VAR(4)); - SI_VAR(5) = SI_VAR(3); - SI_VAR(5) += 180; - MakeLerp(SI_VAR(3), SI_VAR(5), 100, 2); + GetNpcPos(NPC_WORLD_SKOLAR, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + EVT_VAR(5) = EVT_VAR(3); + EVT_VAR(5) += 180; + MakeLerp(EVT_VAR(3), EVT_VAR(5), 100, 2); loop { UpdateLerp(); - SetNpcPos(NPC_WORLD_SKOLAR, SI_VAR(2), SI_VAR(0), SI_VAR(4)); + SetNpcPos(NPC_WORLD_SKOLAR, EVT_VAR(2), EVT_VAR(0), EVT_VAR(4)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -672,15 +672,15 @@ EvtSource N(80245304) = SCRIPT({ ResetCam(0, 3); sleep 20; SetPlayerAnimation(ANIM_10002); - SI_STORY_PROGRESS = STORY_CH3_STAR_SPRIT_DEPARTED; + EVT_STORY_PROGRESS = STORY_CH3_STAR_SPRIT_DEPARTED; spawn N(80241F10); EnablePartnerAI(); DisablePlayerInput(FALSE); }); EvtSource N(init_80245C9C) = SCRIPT({ - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 3) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 3) { BindNpcIdle(NPC_SELF, N(idle_80245210)); spawn N(80245304); } else { @@ -995,8 +995,8 @@ StaticNpc N(npcGroup_80246E7C) = { }; 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) { + if (EVT_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { + if (EVT_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { RemoveNpc(NPC_SELF); } } diff --git a/src/world/area_arn/arn_07/header.c b/src/world/area_arn/arn_07/header.c index 0dde94d0ea..f08d43be4b 100644 --- a/src/world/area_arn/arn_07/header.c +++ b/src/world/area_arn/arn_07/header.c @@ -17,7 +17,7 @@ MapConfig N(config) = { }; EvtSource N(80241F10) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); PlayAmbientSounds(AMBIENT_WIND); diff --git a/src/world/area_arn/arn_08/events.c b/src/world/area_arn/arn_08/events.c index 78027151e1..1907efed0f 100644 --- a/src/world/area_arn/arn_08/events.c +++ b/src/world/area_arn/arn_08/events.c @@ -15,11 +15,11 @@ EvtSource N(802403B0) = SCRIPT({ group 27; DisablePlayerInput(TRUE); ClearDefeatedEnemies(); - SI_VAR(0) = 0; - SI_VAR(1) = 6; - SI_VAR(2) = 0; - SI_VAR(4) = 1; - SI_VAR(3) = -1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 6; + EVT_VAR(2) = 0; + EVT_VAR(4) = 1; + EVT_VAR(3) = -1; spawn 0x80285DFC; sleep 17; GotoMap("arn_07", 0); @@ -31,26 +31,26 @@ EvtSource N(80240470) = SCRIPT({ }); EvtSource N(8024049C) = SCRIPT({ - GetLoadType(SI_VAR(1)); - if (SI_VAR(1) == 1) { + GetLoadType(EVT_VAR(1)); + if (EVT_VAR(1) == 1) { spawn EnterSavePoint; spawn N(80240470); return; } - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(4) = 1; - SI_VAR(2) = 0; - SI_VAR(3) = -1; + EVT_VAR(4) = 1; + EVT_VAR(2) = 0; + EVT_VAR(3) = -1; await 0x80285E24; - SI_AREA_FLAG(1) = 0; + EVT_AREA_FLAG(1) = 0; spawn N(80240470); } == 1 { DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); - if (SI_STORY_PROGRESS == STORY_CH3_HEART_ESCAPED_WELL) { + if (EVT_STORY_PROGRESS == STORY_CH3_HEART_ESCAPED_WELL) { SetPlayerPos(1000, 1000, 0); SetNpcPos(NPC_PARTNER, 1000, 1000, 0); RotateModel(0, 80, 0, -1, 0); @@ -74,10 +74,10 @@ EvtSource N(8024049C) = SCRIPT({ MakeLerp(80, 0, 10, 0); loop { UpdateLerp(); - RotateModel(0, SI_VAR(0), 0, -1, 0); - RotateModel(1, SI_VAR(0), 0, -1, 0); + RotateModel(0, EVT_VAR(0), 0, -1, 0); + RotateModel(1, EVT_VAR(0), 0, -1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -85,7 +85,7 @@ EvtSource N(8024049C) = SCRIPT({ sleep 20; SetPlayerPos(0, 0, 0); SetNpcPos(NPC_PARTNER, 0, 0, 0); - SI_STORY_PROGRESS = STORY_CH3_HEART_ESCAPED_WINDY_MILL; + EVT_STORY_PROGRESS = STORY_CH3_HEART_ESCAPED_WINDY_MILL; } DisablePlayerPhysics(FALSE); SetPlayerJumpscale(2.0); @@ -97,23 +97,23 @@ EvtSource N(8024049C) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_WINDY_MILL; + EVT_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamLeadPlayer(0, 0); SetCamEnabled(0, 1); - SI_SAVE_FLAG(1979) = 1; - if (SI_STORY_PROGRESS >= STORY_CH4_FRYING_PAN_STOLEN) { - SI_SAVE_FLAG(1016) = 0; - SI_SAVE_FLAG(1017) = 0; - SI_SAVE_FLAG(1018) = 0; + EVT_SAVE_FLAG(1979) = 1; + if (EVT_STORY_PROGRESS >= STORY_CH4_FRYING_PAN_STOLEN) { + EVT_SAVE_FLAG(1016) = 0; + EVT_SAVE_FLAG(1017) = 0; + EVT_SAVE_FLAG(1018) = 0; } MakeNpcs(0, N(npcGroupList_80241828)); await N(makeEntities); spawn N(80240BA0); - GetDemoState(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetDemoState(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { await N(8024118C); return; } @@ -128,7 +128,7 @@ static s32 N(pad_A6C) = { EvtSource N(80240A70) = SCRIPT({ loop { - if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WELL) { + if (EVT_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WELL) { break loop; } sleep 1; @@ -137,9 +137,9 @@ EvtSource N(80240A70) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); N(func_80240000_BF47A0)(); - SI_AREA_FLAG(1) = 1; - if (SI_STORY_PROGRESS < STORY_CH3_WENT_DOWN_THE_WELL) { - SI_STORY_PROGRESS = STORY_CH3_WENT_DOWN_THE_WELL; + EVT_AREA_FLAG(1) = 1; + if (EVT_STORY_PROGRESS < STORY_CH3_WENT_DOWN_THE_WELL) { + EVT_STORY_PROGRESS = STORY_CH3_WENT_DOWN_THE_WELL; } GotoMap("arn_09", 1); sleep 100; @@ -157,14 +157,14 @@ static s32 N(pad_B98)[] = { EvtSource N(80240BA0) = SCRIPT({ PlaySound(0x8000004B); spawn { - SI_VAR(0) = 0; + EVT_VAR(0) = 0; 10: - RotateModel(9, SI_VAR(0), 0, 0, 1); - RotateModel(15, SI_VAR(0), 0, 0, 1); - RotateModel(11, SI_VAR(0), 0, 0, 1); - RotateModel(13, SI_VAR(0), 0, 0, -1); - RotateModel(17, SI_VAR(0), 0, 0, -1); - SI_VAR(0) += 1; + RotateModel(9, EVT_VAR(0), 0, 0, 1); + RotateModel(15, EVT_VAR(0), 0, 0, 1); + RotateModel(11, EVT_VAR(0), 0, 0, 1); + RotateModel(13, EVT_VAR(0), 0, 0, -1); + RotateModel(17, EVT_VAR(0), 0, 0, -1); + EVT_VAR(0) += 1; sleep 1; goto 10; } @@ -233,10 +233,10 @@ EvtSource N(80240CC0) = SCRIPT({ sleep 12; DemoSetButtons(0); sleep 20; - if (SI_SAVE_FLAG(9) == 1) { + if (EVT_SAVE_FLAG(9) == 1) { return; } - SI_SAVE_FLAG(9) = 1; + EVT_SAVE_FLAG(9) = 1; GotoMapSpecial("arn_08", 2, 2); sleep 100; }); @@ -244,16 +244,16 @@ EvtSource N(80240CC0) = SCRIPT({ EvtSource N(802410AC) = SCRIPT({ sleep 10; loop { - GetDemoState(SI_VAR(0)); - if (SI_VAR(0) == 2) { + GetDemoState(EVT_VAR(0)); + if (EVT_VAR(0) == 2) { break loop; } sleep 1; } - if (SI_SAVE_FLAG(9) == 1) { + if (EVT_SAVE_FLAG(9) == 1) { return; } - SI_SAVE_FLAG(9) = 1; + EVT_SAVE_FLAG(9) = 1; GotoMapSpecial("arn_08", 2, 3); sleep 35; }); @@ -269,7 +269,7 @@ s32 N(D_80241188_BF5928) = { 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; + EVT_SAVE_FLAG(9) = 0; spawn N(802410AC); spawn N(80240CC0); }); @@ -305,7 +305,7 @@ EvtSource N(idle_80241278) = SCRIPT({ }); EvtSource N(init_80241288) = SCRIPT({ - if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WELL) { + if (EVT_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WELL) { SetNpcPos(NPC_SELF, 0, -1000, 0); } else { BindNpcIdle(NPC_SELF, N(idle_80241278)); @@ -313,7 +313,7 @@ EvtSource N(init_80241288) = SCRIPT({ }); EvtSource N(interact_802412E8) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_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)); } @@ -333,7 +333,7 @@ EvtSource N(interact_802412E8) = SCRIPT({ }); EvtSource N(init_802413E8) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { + if (EVT_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { SetNpcPos(NPC_SELF, 0, -1000, 0); } else { BindNpcInteract(NPC_SELF, N(interact_802412E8)); @@ -412,7 +412,7 @@ static s32 N(pad_184C) = { }; EvtSource N(makeEntities) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH3_WENT_DOWN_THE_WELL) { + if (EVT_STORY_PROGRESS < STORY_CH3_WENT_DOWN_THE_WELL) { MakeEntity(0x802BCE84, 0, 30, 0, 0, MAKE_ENTITY_END); } }); diff --git a/src/world/area_arn/arn_08/header.c b/src/world/area_arn/arn_08/header.c index ac73194674..83234a7dd9 100644 --- a/src/world/area_arn/arn_08/header.c +++ b/src/world/area_arn/arn_08/header.c @@ -15,7 +15,7 @@ MapConfig N(config) = { }; EvtSource N(80240300) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } diff --git a/src/world/area_arn/arn_09/events.c b/src/world/area_arn/arn_09/events.c index 121894cd88..488a34e58f 100644 --- a/src/world/area_arn/arn_09/events.c +++ b/src/world/area_arn/arn_09/events.c @@ -6,11 +6,11 @@ extern s32 D_000001E4; EvtSource N(80240140) = SCRIPT({ group 27; DisablePlayerInput(TRUE); - SI_VAR(0) = 0; - SI_VAR(1) = 5; - SI_VAR(2) = 0; - SI_VAR(4) = 1; - SI_VAR(3) = 1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 5; + EVT_VAR(2) = 0; + EVT_VAR(4) = 1; + EVT_VAR(3) = 1; spawn 0x80285DFC; sleep 17; GotoMap("arn_10", 0); @@ -22,12 +22,12 @@ EvtSource N(802401F4) = SCRIPT({ }); EvtSource N(80240220) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 0; - SI_VAR(4) = 1; - SI_VAR(3) = 1; + EVT_VAR(2) = 0; + EVT_VAR(4) = 1; + EVT_VAR(3) = 1; await 0x80285E24; spawn N(802401F4); } @@ -38,7 +38,7 @@ EvtSource N(80240220) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_WINDY_MILL; + EVT_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524288); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -56,10 +56,10 @@ static s32 N(pad_398)[] = { }; EvtSource N(802403A0) = SCRIPT({ - if (SI_AREA_FLAG(1) == 1) { + if (EVT_AREA_FLAG(1) == 1) { return; } - SI_AREA_FLAG(1) = 1; + EVT_AREA_FLAG(1) = 1; DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); SetPlayerActionState(6); @@ -82,10 +82,10 @@ static s32 N(pad_4CC)[] = { }; EvtSource N(802404D0) = SCRIPT({ - if (SI_AREA_FLAG(1) == 0) { + if (EVT_AREA_FLAG(1) == 0) { return; } - SI_AREA_FLAG(1) = 1; + EVT_AREA_FLAG(1) = 1; DisablePlayerInput(TRUE); SetPlayerActionState(8); func_802D2484(); @@ -93,7 +93,7 @@ EvtSource N(802404D0) = SCRIPT({ SetPlayerJumpscale(1.5); PlayerJump(50, 0, 0, 16); SetPlayerAnimation(ANIM_10002); - SI_AREA_FLAG(1) = 0; + EVT_AREA_FLAG(1) = 0; DisablePlayerInput(FALSE); }); @@ -130,11 +130,11 @@ EvtSource N(idle_802405FC) = SCRIPT({ PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); NpcJump0(NPC_SELF, 0, 200, 0, 15); SetNpcPos(NPC_SELF, 0, -1000, 0); - SI_STORY_PROGRESS = STORY_CH3_HEART_ESCAPED_WELL; + EVT_STORY_PROGRESS = STORY_CH3_HEART_ESCAPED_WELL; }); EvtSource N(init_80240730) = SCRIPT({ - if (SI_STORY_PROGRESS != STORY_CH3_HEART_FLED_SECOND_TUNNEL) { + if (EVT_STORY_PROGRESS != STORY_CH3_HEART_FLED_SECOND_TUNNEL) { RemoveNpc(NPC_SELF); } else { BindNpcIdle(NPC_SELF, N(idle_802405FC)); diff --git a/src/world/area_arn/arn_09/header.c b/src/world/area_arn/arn_09/header.c index 4e23673bb5..e330032431 100644 --- a/src/world/area_arn/arn_09/header.c +++ b/src/world/area_arn/arn_09/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; EvtSource N(802400A0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } diff --git a/src/world/area_arn/arn_10/events.c b/src/world/area_arn/arn_10/events.c index fe57c3dcf9..c831e82aae 100644 --- a/src/world/area_arn/arn_10/events.c +++ b/src/world/area_arn/arn_10/events.c @@ -5,10 +5,10 @@ EvtSource N(exitSingleDoor_80240100) = SCRIPT({ group 27; DisablePlayerInput(TRUE); - SI_VAR(0) = 0; - SI_VAR(1) = 6; - SI_VAR(2) = 0; - SI_VAR(3) = -1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 6; + EVT_VAR(2) = 0; + EVT_VAR(3) = -1; spawn ExitSingleDoor; sleep 17; GotoMap("arn_09", 0); @@ -18,10 +18,10 @@ EvtSource N(exitSingleDoor_80240100) = SCRIPT({ EvtSource N(exitSingleDoor_802401A4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); - SI_VAR(0) = 1; - SI_VAR(1) = 11; - SI_VAR(2) = 2; - SI_VAR(3) = 1; + EVT_VAR(0) = 1; + EVT_VAR(1) = 11; + EVT_VAR(2) = 2; + EVT_VAR(3) = 1; spawn ExitSingleDoor; sleep 17; GotoMap("arn_12", 0); @@ -34,17 +34,17 @@ EvtSource N(80240248) = SCRIPT({ }); EvtSource N(enterSingleDoor_80240290) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 0; - SI_VAR(3) = -1; + EVT_VAR(2) = 0; + EVT_VAR(3) = -1; await EnterSingleDoor; spawn N(80240248); } == 1 { - SI_VAR(2) = 2; - SI_VAR(3) = 1; + EVT_VAR(2) = 2; + EVT_VAR(3) = 1; await EnterSingleDoor; spawn N(80240248); } @@ -52,7 +52,7 @@ EvtSource N(enterSingleDoor_80240290) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_WINDY_MILL; + EVT_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524289); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -114,44 +114,44 @@ NpcSettings N(npcSettings_802404CC) = { 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)); - SI_VAR(0) -= 30; + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 30; PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 8); + NpcJump0(NPC_SELF, EVT_VAR(0), 0, EVT_VAR(2), 8); SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_14); sleep 1; SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_13); - SI_VAR(0) -= 80; + EVT_VAR(0) -= 80; SetNpcJumpscale(NPC_SELF, 2.5); PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 12); + NpcJump0(NPC_SELF, EVT_VAR(0), 0, EVT_VAR(2), 12); SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_14); sleep 1; SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_13); - SI_VAR(0) -= 80; + EVT_VAR(0) -= 80; SetNpcJumpscale(NPC_SELF, 2.5); PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 12); + NpcJump0(NPC_SELF, EVT_VAR(0), 0, EVT_VAR(2), 12); EnableNpcShadow(NPC_SELF, FALSE); SetNpcPos(NPC_SELF, 0, -1000, 0); - SI_STORY_PROGRESS = STORY_CH3_HEART_FLED_SECOND_TUNNEL; + EVT_STORY_PROGRESS = STORY_CH3_HEART_FLED_SECOND_TUNNEL; }); EvtSource N(defeat_802406F4) = SCRIPT({ - SI_SAVE_FLAG(1016) = 1; + EVT_SAVE_FLAG(1016) = 1; DoNpcDefeat(); }); EvtSource N(init_80240720) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_802404F8)); - if (SI_STORY_PROGRESS != STORY_UNUSED_FFFFFFEC) { + if (EVT_STORY_PROGRESS != STORY_UNUSED_FFFFFFEC) { RemoveNpc(NPC_SELF); } }); EvtSource N(init_8024076C) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { - if (SI_SAVE_FLAG(1016) == 1) { + if (EVT_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { + if (EVT_SAVE_FLAG(1016) == 1) { RemoveNpc(NPC_SELF); return; } diff --git a/src/world/area_arn/arn_10/header.c b/src/world/area_arn/arn_10/header.c index c6e9b8534c..5cad5ad87a 100644 --- a/src/world/area_arn/arn_10/header.c +++ b/src/world/area_arn/arn_10/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; EvtSource N(80240060) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } diff --git a/src/world/area_arn/arn_11/events.c b/src/world/area_arn/arn_11/events.c index 86d5ebd3be..0d9b5c1188 100644 --- a/src/world/area_arn/arn_11/events.c +++ b/src/world/area_arn/arn_11/events.c @@ -36,12 +36,12 @@ EvtSource N(802401BC) = SCRIPT({ SetPlayerAnimation(0x90000); spawn { SetNpcJumpscale(NPC_TUBBAS_HEART, 2.5); - GetNpcPos(NPC_TUBBAS_HEART, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_TUBBAS_HEART, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); PlaySoundAtNpc(NPC_TUBBAS_HEART, 0x20C8, 0); - NpcJump0(NPC_TUBBAS_HEART, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + NpcJump0(NPC_TUBBAS_HEART, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); sleep 1; PlaySoundAtNpc(NPC_TUBBAS_HEART, 0x20C8, 0); - NpcJump0(NPC_TUBBAS_HEART, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + NpcJump0(NPC_TUBBAS_HEART, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); } sleep 40; SpeakToPlayer(NPC_TUBBAS_HEART, NPC_ANIM_tubbas_heart_Palette_00_Anim_B, NPC_ANIM_tubbas_heart_Palette_00_Anim_1, 0, MESSAGE_ID(0x0E, 0x00C2)); @@ -54,10 +54,10 @@ EvtSource N(802401BC) = SCRIPT({ EvtSource N(exitSingleDoor_80240428) = SCRIPT({ group 27; DisablePlayerInput(TRUE); - SI_VAR(0) = 0; - SI_VAR(1) = 2; - SI_VAR(2) = 0; - SI_VAR(3) = -1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 2; + EVT_VAR(2) = 0; + EVT_VAR(3) = -1; spawn ExitSingleDoor; sleep 17; GotoMap("arn_13", 1); @@ -70,11 +70,11 @@ EvtSource N(802404CC) = SCRIPT({ EvtSource N(enterSingleDoor_802404F8) = SCRIPT({ DisablePlayerInput(TRUE); - SI_VAR(2) = 0; - SI_VAR(3) = -1; + EVT_VAR(2) = 0; + EVT_VAR(3) = -1; await EnterSingleDoor; spawn N(802404CC); - if (SI_STORY_PROGRESS < STORY_CH3_HEART_FLED_FIRST_TUNNEL) { + if (EVT_STORY_PROGRESS < STORY_CH3_HEART_FLED_FIRST_TUNNEL) { sleep 10; spawn N(802400F0); spawn N(802401BC); @@ -84,7 +84,7 @@ EvtSource N(enterSingleDoor_802404F8) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_WINDY_MILL; + EVT_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524290); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -118,8 +118,8 @@ NpcSettings N(npcSettings_802406A0) = { EvtSource N(idle_802406CC) = SCRIPT({ loop { - GetSelfVar(0, SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetSelfVar(0, EVT_VAR(0)); + if (EVT_VAR(0) != 0) { break loop; } sleep 1; @@ -127,10 +127,10 @@ EvtSource N(idle_802406CC) = SCRIPT({ spawn { SetCamType(0, 6, 1); SetCamSpeed(0, 4.0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 50; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 50; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 3000); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); @@ -144,9 +144,9 @@ EvtSource N(8024081C) = SCRIPT({ MakeLerp(0, 80, 10, 0); loop { UpdateLerp(); - RotateModel(0, SI_VAR(0), 0, -1, 0); + RotateModel(0, EVT_VAR(0), 0, -1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -156,9 +156,9 @@ EvtSource N(802408D8) = SCRIPT({ MakeLerp(80, 0, 10, 0); loop { UpdateLerp(); - RotateModel(0, SI_VAR(0), 0, -1, 0); + RotateModel(0, EVT_VAR(0), 0, -1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -175,20 +175,20 @@ EvtSource N(defeat_802409DC) = SCRIPT({ spawn { SetCamType(0, 6, 1); SetCamSpeed(0, 90.0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 50; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 50; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 450); PanToTarget(0, 0, 1); } sleep 10; PlayerFaceNpc(0, 1); loop 2 { - GetNpcPos(NPC_TUBBAS_HEART, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_TUBBAS_HEART, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetNpcJumpscale(NPC_TUBBAS_HEART, 2.5); PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_TUBBAS_HEART, SI_VAR(0), SI_VAR(1), SI_VAR(2), 12); + NpcJump0(NPC_TUBBAS_HEART, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 12); sleep 1; } spawn { @@ -205,40 +205,40 @@ EvtSource N(defeat_802409DC) = SCRIPT({ PlayerFaceNpc(0, 1); buf_use N(intTable_80240988); loop { - buf_read SI_VAR(0) SI_VAR(1) SI_VAR(2); - if (SI_VAR(0) == -10000) { + buf_read EVT_VAR(0) EVT_VAR(1) EVT_VAR(2); + if (EVT_VAR(0) == -10000) { break loop; } PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_TUBBAS_HEART, SI_VAR(0), SI_VAR(1), SI_VAR(2), 12); + NpcJump0(NPC_TUBBAS_HEART, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 12); sleep 1; } spawn N(8024081C); loop { - buf_read SI_VAR(0) SI_VAR(1) SI_VAR(2); - if (SI_VAR(0) == -10000) { + buf_read EVT_VAR(0) EVT_VAR(1) EVT_VAR(2); + if (EVT_VAR(0) == -10000) { break loop; } PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_TUBBAS_HEART, SI_VAR(0), SI_VAR(1), SI_VAR(2), 12); + NpcJump0(NPC_TUBBAS_HEART, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 12); sleep 1; } spawn N(802408D8); sleep 30; SetCamType(0, 6, 1); SetCamSpeed(0, 90.0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 450); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); - SI_STORY_PROGRESS = STORY_CH3_HEART_FLED_FIRST_TUNNEL; + EVT_STORY_PROGRESS = STORY_CH3_HEART_FLED_FIRST_TUNNEL; }); EvtSource N(init_80240E70) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH3_HEART_FLED_FIRST_TUNNEL) { + if (EVT_STORY_PROGRESS >= STORY_CH3_HEART_FLED_FIRST_TUNNEL) { RemoveNpc(NPC_SELF); } else { SetSelfVar(0, 0); diff --git a/src/world/area_arn/arn_11/header.c b/src/world/area_arn/arn_11/header.c index c1e4feffaa..9565610244 100644 --- a/src/world/area_arn/arn_11/header.c +++ b/src/world/area_arn/arn_11/header.c @@ -13,7 +13,7 @@ MapConfig N(config) = { }; EvtSource N(80240050) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_WENT_DOWN_THE_WELL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } diff --git a/src/world/area_arn/arn_12/events.c b/src/world/area_arn/arn_12/events.c index 4e2eabdcb6..1e7c2dc8c8 100644 --- a/src/world/area_arn/arn_12/events.c +++ b/src/world/area_arn/arn_12/events.c @@ -5,10 +5,10 @@ EvtSource N(exitSingleDoor_80240100) = SCRIPT({ group 27; DisablePlayerInput(TRUE); - SI_VAR(0) = 0; - SI_VAR(1) = 2; - SI_VAR(2) = 0; - SI_VAR(3) = -1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 2; + EVT_VAR(2) = 0; + EVT_VAR(3) = -1; spawn ExitSingleDoor; sleep 17; GotoMap("arn_10", 1); @@ -18,10 +18,10 @@ EvtSource N(exitSingleDoor_80240100) = SCRIPT({ EvtSource N(exitSingleDoor_802401A4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); - SI_VAR(0) = 1; - SI_VAR(1) = 7; - SI_VAR(2) = 2; - SI_VAR(3) = 1; + EVT_VAR(0) = 1; + EVT_VAR(1) = 7; + EVT_VAR(2) = 2; + EVT_VAR(3) = 1; spawn ExitSingleDoor; sleep 17; GotoMap("arn_13", 0); @@ -34,17 +34,17 @@ EvtSource N(80240248) = SCRIPT({ }); EvtSource N(enterSingleDoor_80240290) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 0; - SI_VAR(3) = -1; + EVT_VAR(2) = 0; + EVT_VAR(3) = -1; await EnterSingleDoor; spawn N(80240248); } == 1 { - SI_VAR(2) = 2; - SI_VAR(3) = 1; + EVT_VAR(2) = 2; + EVT_VAR(3) = 1; await EnterSingleDoor; spawn N(80240248); } @@ -52,7 +52,7 @@ EvtSource N(enterSingleDoor_80240290) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_WINDY_MILL; + EVT_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524291); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -113,44 +113,44 @@ NpcSettings N(npcSettings_802404BC) = { 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)); - SI_VAR(0) -= 30; + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 30; PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 8); + NpcJump0(NPC_SELF, EVT_VAR(0), 0, EVT_VAR(2), 8); SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_14); sleep 1; SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_13); - SI_VAR(0) -= 80; + EVT_VAR(0) -= 80; SetNpcJumpscale(NPC_SELF, 2.5); PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 12); + NpcJump0(NPC_SELF, EVT_VAR(0), 0, EVT_VAR(2), 12); SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_14); sleep 1; SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_13); - SI_VAR(0) -= 80; + EVT_VAR(0) -= 80; SetNpcJumpscale(NPC_SELF, 2.5); PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 12); + NpcJump0(NPC_SELF, EVT_VAR(0), 0, EVT_VAR(2), 12); EnableNpcShadow(NPC_SELF, FALSE); SetNpcPos(NPC_SELF, 0, -1000, 0); - SI_STORY_PROGRESS = STORY_UNUSED_FFFFFFEC; + EVT_STORY_PROGRESS = STORY_UNUSED_FFFFFFEC; }); EvtSource N(defeat_802406E4) = SCRIPT({ - SI_SAVE_FLAG(1017) = 1; + EVT_SAVE_FLAG(1017) = 1; DoNpcDefeat(); }); EvtSource N(init_80240710) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_802404E8)); - if (SI_STORY_PROGRESS != STORY_UNUSED_FFFFFFEB) { + if (EVT_STORY_PROGRESS != STORY_UNUSED_FFFFFFEB) { RemoveNpc(NPC_SELF); } }); EvtSource N(init_8024075C) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { - if (SI_SAVE_FLAG(1017) == 1) { + if (EVT_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { + if (EVT_SAVE_FLAG(1017) == 1) { RemoveNpc(NPC_SELF); return; } diff --git a/src/world/area_arn/arn_12/header.c b/src/world/area_arn/arn_12/header.c index 318dee4233..edcd4548e4 100644 --- a/src/world/area_arn/arn_12/header.c +++ b/src/world/area_arn/arn_12/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; EvtSource N(80240060) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } diff --git a/src/world/area_arn/arn_13/events.c b/src/world/area_arn/arn_13/events.c index 802c657e0e..784eed7acb 100644 --- a/src/world/area_arn/arn_13/events.c +++ b/src/world/area_arn/arn_13/events.c @@ -5,10 +5,10 @@ EvtSource N(exitSingleDoor_80240100) = SCRIPT({ group 27; DisablePlayerInput(TRUE); - SI_VAR(0) = 0; - SI_VAR(1) = 2; - SI_VAR(2) = 0; - SI_VAR(3) = -1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 2; + EVT_VAR(2) = 0; + EVT_VAR(3) = -1; spawn ExitSingleDoor; sleep 17; GotoMap("arn_12", 1); @@ -18,10 +18,10 @@ EvtSource N(exitSingleDoor_80240100) = SCRIPT({ EvtSource N(exitSingleDoor_802401A4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); - SI_VAR(0) = 1; - SI_VAR(1) = 7; - SI_VAR(2) = 2; - SI_VAR(3) = 1; + EVT_VAR(0) = 1; + EVT_VAR(1) = 7; + EVT_VAR(2) = 2; + EVT_VAR(3) = 1; spawn ExitSingleDoor; sleep 17; GotoMap("arn_11", 0); @@ -34,17 +34,17 @@ EvtSource N(80240248) = SCRIPT({ }); EvtSource N(enterSingleDoor_80240290) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 0; - SI_VAR(3) = -1; + EVT_VAR(2) = 0; + EVT_VAR(3) = -1; await EnterSingleDoor; spawn N(80240248); } == 1 { - SI_VAR(2) = 2; - SI_VAR(3) = 1; + EVT_VAR(2) = 2; + EVT_VAR(3) = 1; await EnterSingleDoor; spawn N(80240248); } @@ -52,7 +52,7 @@ EvtSource N(enterSingleDoor_80240290) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_WINDY_MILL; + EVT_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524292); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -114,44 +114,44 @@ NpcSettings N(npcSettings_802404CC) = { 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)); - SI_VAR(0) -= 30; + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 30; PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 8); + NpcJump0(NPC_SELF, EVT_VAR(0), 0, EVT_VAR(2), 8); SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_14); sleep 1; SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_13); - SI_VAR(0) -= 80; + EVT_VAR(0) -= 80; SetNpcJumpscale(NPC_SELF, 2.5); PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 12); + NpcJump0(NPC_SELF, EVT_VAR(0), 0, EVT_VAR(2), 12); SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_14); sleep 1; SetNpcAnimation(NPC_SELF, NPC_ANIM_tubbas_heart_Palette_00_Anim_13); - SI_VAR(0) -= 80; + EVT_VAR(0) -= 80; SetNpcJumpscale(NPC_SELF, 2.5); PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); - NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 12); + NpcJump0(NPC_SELF, EVT_VAR(0), 0, EVT_VAR(2), 12); EnableNpcShadow(NPC_SELF, FALSE); SetNpcPos(NPC_SELF, 0, -1000, 0); - SI_STORY_PROGRESS = STORY_CH3_HEART_FLED_SECOND_TUNNEL; + EVT_STORY_PROGRESS = STORY_CH3_HEART_FLED_SECOND_TUNNEL; }); EvtSource N(defeat_802406F4) = SCRIPT({ - SI_SAVE_FLAG(1018) = 1; + EVT_SAVE_FLAG(1018) = 1; DoNpcDefeat(); }); EvtSource N(init_80240720) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_802404F8)); - if (SI_STORY_PROGRESS != STORY_CH3_HEART_FLED_FIRST_TUNNEL) { + if (EVT_STORY_PROGRESS != STORY_CH3_HEART_FLED_FIRST_TUNNEL) { RemoveNpc(NPC_SELF); } }); EvtSource N(init_8024076C) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { - if (SI_SAVE_FLAG(1018) == 1) { + if (EVT_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { + if (EVT_SAVE_FLAG(1018) == 1) { RemoveNpc(NPC_SELF); return; } diff --git a/src/world/area_arn/arn_13/header.c b/src/world/area_arn/arn_13/header.c index c238cbfdb5..ecb2712080 100644 --- a/src/world/area_arn/arn_13/header.c +++ b/src/world/area_arn/arn_13/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; EvtSource N(80240060) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_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 6ddcc8c035..18ed382848 100644 --- a/src/world/area_dgb/dgb_00/BFA0A0.c +++ b/src/world/area_dgb/dgb_00/BFA0A0.c @@ -22,7 +22,7 @@ MapConfig N(config) = { }; EvtSource N(80240110) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); } @@ -45,10 +45,10 @@ EvtSource N(exitDoubleDoor_8024021C) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 1; - SI_VAR(1) = 18; - SI_VAR(2) = 5; - SI_VAR(3) = 7; + EVT_VAR(0) = 1; + EVT_VAR(1) = 18; + EVT_VAR(2) = 5; + EVT_VAR(3) = 7; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_01", 0); @@ -57,7 +57,7 @@ EvtSource N(exitDoubleDoor_8024021C) = SCRIPT({ EvtSource N(802402D0) = SCRIPT({ bind N(exitWalk_802401C0) TRIGGER_FLOOR_ABOVE 15; - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_SMASHED_THE_BRIDGES { bind N(exitDoubleDoor_8024021C) TRIGGER_WALL_PRESS_A 18; } @@ -72,22 +72,22 @@ EvtSource N(802402D0) = SCRIPT({ }); EvtSource N(enterDoubleDoor_8024038C) = SCRIPT({ - GetLoadType(SI_VAR(1)); - if (SI_VAR(1) == 1) { + GetLoadType(EVT_VAR(1)); + if (EVT_VAR(1) == 1) { spawn EnterSavePoint; spawn N(802402D0); return; } - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(0) = N(802402D0); + EVT_VAR(0) = N(802402D0); spawn EnterWalk; sleep 1; } == 1 { - if (SI_STORY_PROGRESS >= STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) { - if (SI_STORY_PROGRESS < STORY_CH3_ESCAPED_TUBBAS_MANOR) { + if (EVT_STORY_PROGRESS >= STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) { + if (EVT_STORY_PROGRESS < STORY_CH3_ESCAPED_TUBBAS_MANOR) { spawn N(802402D0); spawn { await N(8024103C); @@ -97,8 +97,8 @@ EvtSource N(enterDoubleDoor_8024038C) = SCRIPT({ } } UseDoorSounds(3); - SI_VAR(2) = 5; - SI_VAR(3) = 7; + EVT_VAR(2) = 5; + EVT_VAR(3) = 7; await EnterDoubleDoor; spawn N(802402D0); } @@ -110,15 +110,15 @@ EvtSource N(enterDoubleDoor_8024038C) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; - SI_SAVE_FLAG(1978) = 1; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_SAVE_FLAG(1978) = 1; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamLeadPlayer(0, 0); SetCamEnabled(0, 1); - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 2) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 2) { MakeNpcs(0, N(npcGroupList_80243740)); } else { MakeNpcs(0, N(npcGroupList_802436EC)); diff --git a/src/world/area_dgb/dgb_00/BFA100.c b/src/world/area_dgb/dgb_00/BFA100.c index f9ccbac6b4..d41f5fcf37 100644 --- a/src/world/area_dgb/dgb_00/BFA100.c +++ b/src/world/area_dgb/dgb_00/BFA100.c @@ -30,31 +30,31 @@ NpcSettings N(npcSettings_8024066C) = { }; EvtSource N(80240698) = SCRIPT({ - SI_VAR(3) = 0; - SI_VAR(3) -= SI_VAR(2); + EVT_VAR(3) = 0; + EVT_VAR(3) -= EVT_VAR(2); ModifyColliderFlags(0, 18, 0x7FFFFE00); PlaySoundAtCollider(18, 455, 0); MakeLerp(0, 80, 30, 0); 10: UpdateLerp(); - RotateModel(7, SI_VAR(0), 0, SI_VAR(2), 0); - RotateModel(5, SI_VAR(0), 0, SI_VAR(3), 0); + RotateModel(7, EVT_VAR(0), 0, EVT_VAR(2), 0); + RotateModel(5, EVT_VAR(0), 0, EVT_VAR(3), 0); sleep 1; - if (SI_VAR(1) != 0) { + if (EVT_VAR(1) != 0) { goto 10; } }); EvtSource N(8024079C) = SCRIPT({ - SI_VAR(3) = 0; - SI_VAR(3) -= SI_VAR(2); + EVT_VAR(3) = 0; + EVT_VAR(3) -= EVT_VAR(2); MakeLerp(80, 0, 12, 0); 10: UpdateLerp(); - RotateModel(7, SI_VAR(0), 0, SI_VAR(2), 0); - RotateModel(5, SI_VAR(0), 0, SI_VAR(3), 0); + RotateModel(7, EVT_VAR(0), 0, EVT_VAR(2), 0); + RotateModel(5, EVT_VAR(0), 0, EVT_VAR(3), 0); sleep 1; - if (SI_VAR(1) != 0) { + if (EVT_VAR(1) != 0) { goto 10; } ModifyColliderFlags(1, 18, 0x7FFFFE00); @@ -62,39 +62,39 @@ EvtSource N(8024079C) = 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); + GetNpcPos(NPC_BOO0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 200; + NpcMoveTo(NPC_BOO0, EVT_VAR(0), EVT_VAR(2), 46); }); 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); + GetNpcPos(NPC_BOO1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 200; + NpcMoveTo(NPC_BOO1, EVT_VAR(0), EVT_VAR(2), 50); }); 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); + GetNpcPos(NPC_BOO2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 200; + NpcMoveTo(NPC_BOO2, EVT_VAR(0), EVT_VAR(2), 53); }); 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); + GetNpcPos(NPC_BOO3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 200; + NpcMoveTo(NPC_BOO3, EVT_VAR(0), EVT_VAR(2), 46); }); 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); + GetNpcPos(NPC_BOO4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 200; + NpcMoveTo(NPC_BOO4, EVT_VAR(0), EVT_VAR(2), 50); }); 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); + GetNpcPos(NPC_BOO5, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 200; + NpcMoveTo(NPC_BOO5, EVT_VAR(0), EVT_VAR(2), 53); }); EvtSource N(80240AB0) = SCRIPT({ @@ -157,37 +157,37 @@ EvtSource N(80240D90) = SCRIPT({ }); EvtSource N(80240DDC) = SCRIPT({ - GetNpcPos(NPC_BOO0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_BOO0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); loop { - RandInt(5, SI_VAR(10)); - SI_VAR(10) += 2; - SI_VAR(11) = 0; + RandInt(5, EVT_VAR(10)); + EVT_VAR(10) += 2; + EVT_VAR(11) = 0; 10: - SI_VAR(3) = SI_VAR(0); - SI_VAR(3) += 1; - SetNpcPos(NPC_BOO0, SI_VAR(3), SI_VAR(1), SI_VAR(2)); + EVT_VAR(3) = EVT_VAR(0); + EVT_VAR(3) += 1; + SetNpcPos(NPC_BOO0, EVT_VAR(3), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(3) = SI_VAR(0); - SI_VAR(3) += -1; - SetNpcPos(NPC_BOO0, SI_VAR(3), SI_VAR(1), SI_VAR(2)); + EVT_VAR(3) = EVT_VAR(0); + EVT_VAR(3) += -1; + SetNpcPos(NPC_BOO0, EVT_VAR(3), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(11) += 1; - if (SI_VAR(11) < SI_VAR(10)) { + EVT_VAR(11) += 1; + if (EVT_VAR(11) < EVT_VAR(10)) { goto 10; } - RandInt(10, SI_VAR(10)); - SI_VAR(10) += 10; - sleep SI_VAR(10); + RandInt(10, EVT_VAR(10)); + EVT_VAR(10) += 10; + sleep EVT_VAR(10); } }); EvtSource N(80240F50) = SCRIPT({ group 239; loop { - RandInt(50, SI_VAR(0)); - SI_VAR(0) += 80; - sleep SI_VAR(0); - if (SI_MAP_VAR(0) == 0) { + RandInt(50, EVT_VAR(0)); + EVT_VAR(0) += 80; + sleep EVT_VAR(0); + if (EVT_MAP_VAR(0) == 0) { DisablePlayerInput(TRUE); PlaySoundAt(SOUND_UNKNOWN_B4, 0, 240, 10, -125); ShakeCam(0, 0, 20, 2.0); @@ -206,12 +206,12 @@ EvtSource N(8024103C) = SCRIPT({ EnablePartnerAI(); SetCamType(0, 4, 0); SetCamSpeed(0, 90.0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) = 175; - SI_VAR(1) = 0; - SI_VAR(2) = -75; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) = 175; + EVT_VAR(1) = 0; + EVT_VAR(2) = -75; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); sleep 40; @@ -237,7 +237,7 @@ EvtSource N(8024103C) = SCRIPT({ SetPlayerPos(350, 10, -150); InterpPlayerYaw(270, 1); SetNpcPos(NPC_PARTNER, 350, 10, -150); - SI_VAR(2) = 1; + EVT_VAR(2) = 1; await N(80240698); }); @@ -257,22 +257,22 @@ EvtSource N(802413F4) = SCRIPT({ ShowEmote(4, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0); ShowEmote(5, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0); sleep 50; - SI_VAR(2) = 1; + EVT_VAR(2) = 1; spawn N(8024079C); spawn N(80240D90); sleep 20; SetCamType(0, 6, 1); SetCamSpeed(0, 6.0); SetCamPitch(0, 15.0, -15.0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 300); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); - SI_VAR(10) = spawn N(80240DDC); + EVT_VAR(10) = spawn N(80240DDC); SpeakToPlayer(NPC_BOO0, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00DF)); - kill SI_VAR(10); + kill EVT_VAR(10); SetPlayerAnimation(ANIM_80007); sleep 20; SpeakToPlayer(NPC_BOO0, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00E0)); @@ -281,8 +281,8 @@ EvtSource N(802413F4) = SCRIPT({ sleep 20; SpeakToPlayer(NPC_BOO0, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00E1)); DisablePartnerAI(0); - GetCurrentPartnerID(SI_VAR(0)); - match SI_VAR(0) { + GetCurrentPartnerID(EVT_VAR(0)); + match EVT_VAR(0) { == 1 { SpeakToPlayer(NPC_PARTNER, NPC_ANIM_world_goombario_normal_talk, NPC_ANIM_world_goombario_normal_idle, 0, MESSAGE_ID(0x0E, 0x00E2)); } @@ -302,9 +302,9 @@ EvtSource N(802413F4) = SCRIPT({ EnablePartnerAI(); SetCamType(0, 4, 0); SetCamSpeed(0, 6.0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); @@ -319,7 +319,7 @@ EvtSource N(802413F4) = SCRIPT({ SpeakToPlayer(NPC_BOO0, NPC_ANIM_boo_Palette_01_Anim_6, NPC_ANIM_boo_Palette_01_Anim_6, 5, MESSAGE_ID(0x0E, 0x00E8)); SetNpcAnimation(NPC_BOO0, NPC_ANIM_boo_Palette_01_Anim_6); spawn N(80240F50); - SI_STORY_PROGRESS = STORY_CH3_ESCAPED_TUBBAS_MANOR; + EVT_STORY_PROGRESS = STORY_CH3_ESCAPED_TUBBAS_MANOR; DisablePlayerInput(FALSE); }); @@ -351,12 +351,12 @@ EvtSource N(80241AA0) = SCRIPT({ }); EvtSource N(interact_80241CD8) = SCRIPT({ - SI_MAP_VAR(0) = 1; + EVT_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); DisablePartnerAI(0); - GetCurrentPartnerID(SI_VAR(0)); - match SI_VAR(0) { + GetCurrentPartnerID(EVT_VAR(0)); + match EVT_VAR(0) { == 1 { AdjustCam(0, 6.0, 0, -275.0, 15.0, -6.0); SpeakToPlayer(NPC_PARTNER, NPC_ANIM_world_goombario_normal_talk, NPC_ANIM_world_goombario_normal_idle, 0, MESSAGE_ID(0x0E, 0x00EA)); @@ -384,7 +384,7 @@ EvtSource N(interact_80241CD8) = SCRIPT({ } } EnablePartnerAI(); - SI_MAP_VAR(0) = 0; + EVT_MAP_VAR(0) = 0; }); EvtSource N(init_80241F70) = SCRIPT({ @@ -600,7 +600,7 @@ EvtSource N(80242B84) = SCRIPT({ PlaySound(SOUND_UNKNOWN_32E); spawn { loop 180 { - GetNpcPos(NPC_SENTINEL, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SENTINEL, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); N(func_80240060_BFA100)(); sleep 1; } @@ -618,7 +618,7 @@ EvtSource N(80242B84) = SCRIPT({ PanToTarget(0, 0, 1); sleep 20; spawn { - SI_VAR(2) = 1; + EVT_VAR(2) = 1; spawn N(80240698); } sleep 15; @@ -653,7 +653,7 @@ EvtSource N(80242B84) = SCRIPT({ } spawn { sleep 60; - SI_VAR(2) = 1; + EVT_VAR(2) = 1; spawn N(8024079C); } SetPlayerJumpscale(0); @@ -671,8 +671,8 @@ EvtSource N(80242B84) = SCRIPT({ PanToTarget(0, 0, 1); } sleep 65; - GetCurrentPartnerID(SI_VAR(0)); - match SI_VAR(0) { + GetCurrentPartnerID(EVT_VAR(0)); + match EVT_VAR(0) { == 1 { SetNpcFlagBits(NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE); } @@ -684,8 +684,8 @@ EvtSource N(80242B84) = SCRIPT({ } } DisablePartnerAI(0); - GetCurrentPartnerID(SI_VAR(0)); - match SI_VAR(0) { + GetCurrentPartnerID(EVT_VAR(0)); + match EVT_VAR(0) { == 1 { SpeakToPlayer(NPC_PARTNER, 0x108, 0x106, 5, MESSAGE_ID(0x0E, 0x00D6)); } @@ -723,13 +723,13 @@ EvtSource N(80242B84) = SCRIPT({ sleep 10; SetPlayerAnimation(ANIM_MIDAIR_STILL); SetPlayerJumpscale(1); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - PlayerJump1(SI_VAR(0), 0, SI_VAR(2), 10); - PlayerJump1(SI_VAR(0), 0, SI_VAR(2), 10); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + PlayerJump1(EVT_VAR(0), 0, EVT_VAR(2), 10); + PlayerJump1(EVT_VAR(0), 0, EVT_VAR(2), 10); SetPlayerAnimation(ANIM_10002); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 4.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); diff --git a/src/world/area_dgb/dgb_01/BFD9A0.c b/src/world/area_dgb/dgb_01/BFD9A0.c index 55457fe038..69d5a091b8 100644 --- a/src/world/area_dgb/dgb_01/BFD9A0.c +++ b/src/world/area_dgb/dgb_01/BFD9A0.c @@ -21,7 +21,7 @@ MapConfig N(config) = { }; EvtSource N(802434A0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -42,10 +42,10 @@ EvtSource N(exitDoubleDoor_80243550) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 0; - SI_VAR(1) = 4; - SI_VAR(2) = 54; - SI_VAR(3) = 57; + EVT_VAR(0) = 0; + EVT_VAR(1) = 4; + EVT_VAR(2) = 54; + EVT_VAR(3) = 57; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_00", 1); @@ -56,10 +56,10 @@ EvtSource N(exitDoubleDoor_80243604) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 1; - SI_VAR(1) = 8; - SI_VAR(2) = 34; - SI_VAR(3) = 36; + EVT_VAR(0) = 1; + EVT_VAR(1) = 8; + EVT_VAR(2) = 34; + EVT_VAR(3) = 36; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_02", 1); @@ -70,10 +70,10 @@ EvtSource N(exitDoubleDoor_802436B8) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 2; - SI_VAR(1) = 20; - SI_VAR(2) = 41; - SI_VAR(3) = 39; + EVT_VAR(0) = 2; + EVT_VAR(1) = 20; + EVT_VAR(2) = 41; + EVT_VAR(3) = 39; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_08", 0); @@ -84,10 +84,10 @@ EvtSource N(exitDoubleDoor_8024376C) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 3; - SI_VAR(1) = 12; - SI_VAR(2) = 29; - SI_VAR(3) = 31; + EVT_VAR(0) = 3; + EVT_VAR(1) = 12; + EVT_VAR(2) = 29; + EVT_VAR(3) = 31; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_09", 1); @@ -98,10 +98,10 @@ EvtSource N(exitDoubleDoor_80243820) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 4; - SI_VAR(1) = 24; - SI_VAR(2) = 46; - SI_VAR(3) = 44; + EVT_VAR(0) = 4; + EVT_VAR(1) = 24; + EVT_VAR(2) = 46; + EVT_VAR(3) = 44; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_08", 1); @@ -112,10 +112,10 @@ EvtSource N(exitDoubleDoor_802438D4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 5; - SI_VAR(1) = 16; - SI_VAR(2) = 24; - SI_VAR(3) = 26; + EVT_VAR(0) = 5; + EVT_VAR(1) = 16; + EVT_VAR(2) = 24; + EVT_VAR(3) = 26; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_17", 1); @@ -126,10 +126,10 @@ EvtSource N(exitDoubleDoor_80243988) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 6; - SI_VAR(1) = 28; - SI_VAR(2) = 51; - SI_VAR(3) = 49; + EVT_VAR(0) = 6; + EVT_VAR(1) = 28; + EVT_VAR(2) = 51; + EVT_VAR(3) = 49; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_18", 0); @@ -138,45 +138,45 @@ EvtSource N(exitDoubleDoor_80243988) = SCRIPT({ EvtSource N(enterDoubleDoor_80243A3C) = SCRIPT({ UseDoorSounds(3); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - if (SI_SAVE_FLAG(1041) == 0) { - SI_SAVE_FLAG(1041) = 1; - SI_STORY_PROGRESS = STORY_CH3_ARRIVED_AT_TUBBAS_MANOR; + if (EVT_SAVE_FLAG(1041) == 0) { + EVT_SAVE_FLAG(1041) = 1; + EVT_STORY_PROGRESS = STORY_CH3_ARRIVED_AT_TUBBAS_MANOR; } - SI_VAR(2) = 54; - SI_VAR(3) = 57; + EVT_VAR(2) = 54; + EVT_VAR(3) = 57; await EnterDoubleDoor; } == 1 { - SI_VAR(2) = 34; - SI_VAR(3) = 36; + EVT_VAR(2) = 34; + EVT_VAR(3) = 36; await EnterDoubleDoor; } == 2 { - SI_VAR(2) = 41; - SI_VAR(3) = 39; + EVT_VAR(2) = 41; + EVT_VAR(3) = 39; await EnterDoubleDoor; } == 3 { - SI_VAR(2) = 29; - SI_VAR(3) = 31; + EVT_VAR(2) = 29; + EVT_VAR(3) = 31; await EnterDoubleDoor; } == 4 { - SI_VAR(2) = 46; - SI_VAR(3) = 44; + EVT_VAR(2) = 46; + EVT_VAR(3) = 44; await EnterDoubleDoor; } == 5 { - SI_VAR(2) = 24; - SI_VAR(3) = 26; + EVT_VAR(2) = 24; + EVT_VAR(3) = 26; await EnterDoubleDoor; } == 6 { - SI_VAR(2) = 51; - SI_VAR(3) = 49; + EVT_VAR(2) = 51; + EVT_VAR(3) = 49; await EnterDoubleDoor; } } @@ -188,13 +188,13 @@ s32 N(itemList_80243C40)[] = { }; EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); SetCamLeadPlayer(0, 0); - SI_SAVE_FLAG(1978) = 1; + EVT_SAVE_FLAG(1978) = 1; await N(makeEntities); spawn N(802449C4); spawn N(802434A0); @@ -204,18 +204,18 @@ EvtSource N(main) = SCRIPT({ bind N(exitDoubleDoor_80243820) TRIGGER_WALL_PRESS_A 24; bind N(exitDoubleDoor_802438D4) TRIGGER_WALL_PRESS_A 16; bind N(exitDoubleDoor_80243988) TRIGGER_WALL_PRESS_A 28; - if (SI_SAVE_FLAG(1040) == 0) { + if (EVT_SAVE_FLAG(1040) == 0) { bind_padlock N(80244AD0) TRIGGER_WALL_PRESS_A entity(0) N(itemList_80243C40); } else { bind N(exitDoubleDoor_802436B8) TRIGGER_WALL_PRESS_A 20; } - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { MakeNpcs(1, N(npcGroupList_80246E50)); } < STORY_CH3_DEFEATED_TUBBA_BLUBBA { - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 2 { MakeNpcs(1, N(npcGroupList_80246F1C)); } @@ -237,8 +237,8 @@ static s32 N(pad_3EE4)[] = { EvtSource N(80243EF0) = SCRIPT({ loop { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(0) < 100) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(0) < 100) { break loop; } sleep 1; @@ -276,26 +276,26 @@ EvtSource N(80243EF0) = SCRIPT({ SetCamSpeed(0, 3.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); - SI_SAVE_VAR(203) = 1; + EVT_SAVE_VAR(203) = 1; SetNpcVar(4, 0, 1); loop { - GetNpcVar(4, 0, SI_VAR(0)); - if (SI_VAR(0) == 3) { + GetNpcVar(4, 0, EVT_VAR(0)); + if (EVT_VAR(0) == 3) { break loop; } sleep 1; } - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += -50; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += -50; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 90.0); SetCamDistance(0, 750.0); SetCamPitch(0, 0.0, 3.0); DisablePartnerAI(0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 30; - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 30; + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; EnablePartnerAI(); ShakeCam(0, 0, 20, 1.0); @@ -346,11 +346,11 @@ EvtSource N(80243EF0) = SCRIPT({ } spawn { DisablePartnerAI(0); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) -= 210; + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) -= 210; sleep 1; SetNpcJumpscale(NPC_PARTNER, 0.5); - NpcJump1(NPC_PARTNER, 151, SI_VAR(1), 0, 60); + NpcJump1(NPC_PARTNER, 151, EVT_VAR(1), 0, 60); sleep 30; EnablePartnerAI(); } @@ -370,13 +370,13 @@ EvtSource N(80243EF0) = SCRIPT({ sleep 8; } sleep 20; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 2.0); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); - SI_STORY_PROGRESS = STORY_CH3_TUBBA_SMASHED_THE_BRIDGES; + EVT_STORY_PROGRESS = STORY_CH3_TUBBA_SMASHED_THE_BRIDGES; SetGroupEnabled(210, 1); DeleteAnimatedModel(0); spawn { @@ -404,7 +404,7 @@ EvtSource N(80243EF0) = SCRIPT({ }); EvtSource N(802449C4) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetGroupEnabled(210, 0); ModifyColliderFlags(0, 50, 0x7FFFFE00); @@ -428,24 +428,24 @@ EvtSource N(80244AD0) = SCRIPT({ group 0; suspend group 1; ShowKeyChoicePopup(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00D8), 160, 40); CloseChoicePopup(); resume group 1; return; } - if (SI_VAR(0) == -1) { + if (EVT_VAR(0) == -1) { CloseChoicePopup(); resume group 1; return; } - FindKeyItem(19, SI_VAR(0)); - RemoveKeyItemAt(SI_VAR(0)); + FindKeyItem(19, EVT_VAR(0)); + RemoveKeyItemAt(EVT_VAR(0)); CloseChoicePopup(); - SI_SAVE_FLAG(1040) = 1; - N(GetEntityPosition)(SI_MAP_VAR(0), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - PlaySoundAt(0x269, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) = SI_MAP_VAR(0); + EVT_SAVE_FLAG(1040) = 1; + N(GetEntityPosition)(EVT_MAP_VAR(0), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + PlaySoundAt(0x269, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) = EVT_MAP_VAR(0); N(SetEntityFlags100000)(); resume group 1; unbind; @@ -456,10 +456,10 @@ EvtSource N(80244C38) = SCRIPT({ }); EvtSource N(makeEntities) = SCRIPT({ - if (SI_SAVE_FLAG(1040) == 0) { + if (EVT_SAVE_FLAG(1040) == 0) { MakeEntity(0x802BCD68, 490, 8, 0, -80, MAKE_ENTITY_END); AssignScript(N(80244C38)); - SI_MAP_VAR(0) = SI_VAR(0); + EVT_MAP_VAR(0) = EVT_VAR(0); } }); @@ -1042,11 +1042,11 @@ EvtSource N(npcAI_80244D54) = SCRIPT({ DisablePlayerInput(TRUE); sleep 2; 20: - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetNpcPos(NPC_SELF, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(4), SI_VAR(2)); - GetPlayerActionState(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(4), EVT_VAR(2)); + GetPlayerActionState(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { sleep 1; goto 20; } @@ -1055,10 +1055,10 @@ EvtSource N(npcAI_80244D54) = SCRIPT({ DisablePartnerAI(0); group 0; SetTimeFreezeMode(1); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; - SI_VAR(2) += 2; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + EVT_VAR(2) += 2; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); func_80045838(-1, 759, 0); SetNpcAnimation(NPC_SELF, NPC_ANIM_sentinel_Palette_00_Anim_8); sleep 10; @@ -1067,25 +1067,25 @@ EvtSource N(npcAI_80244D54) = SCRIPT({ func_80045838(-1, 1838, 0); spawn { loop 100 { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } spawn { SetNpcAnimation(NPC_PARTNER, 0x108); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); } sleep 30; GotoMap(N(dgb_00_name_hack), 2); @@ -1093,18 +1093,18 @@ EvtSource N(npcAI_80244D54) = SCRIPT({ }); EvtSource N(8024517C) = SCRIPT({ - GetOwnerEncounterTrigger(SI_VAR(0)); - match SI_VAR(0) { + GetOwnerEncounterTrigger(EVT_VAR(0)); + match EVT_VAR(0) { == 1, 2, 4, 6 { - GetSelfAnimationFromTable(7, SI_VAR(0)); + GetSelfAnimationFromTable(7, EVT_VAR(0)); await 0x800936DC; } } }); EvtSource N(80245208) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { DoNpcDefeat(); } @@ -1164,21 +1164,21 @@ NpcSettings N(npcSettings_80245340) = { EvtSource N(idle_8024536C) = SCRIPT({ loop { - GetSelfVar(0, SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetSelfVar(0, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { break loop; } sleep 1; } - SI_SAVE_VAR(203) = 1; + EVT_SAVE_VAR(203) = 1; PlaySoundAtCollider(28, 455, 0); MakeLerp(0, 80, 10, 0); loop { UpdateLerp(); - RotateModel(49, SI_VAR(0), 0, 1, 0); - RotateModel(51, SI_VAR(0), 0, -1, 0); + RotateModel(49, EVT_VAR(0), 0, 1, 0); + RotateModel(51, EVT_VAR(0), 0, -1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -1192,10 +1192,10 @@ EvtSource N(idle_8024536C) = SCRIPT({ MakeLerp(80, 0, 10, 0); loop { UpdateLerp(); - RotateModel(49, SI_VAR(0), 0, 1, 0); - RotateModel(51, SI_VAR(0), 0, -1, 0); + RotateModel(49, EVT_VAR(0), 0, 1, 0); + RotateModel(51, EVT_VAR(0), 0, -1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -1215,8 +1215,8 @@ EvtSource N(idle_8024536C) = SCRIPT({ } sleep 4; SetNpcJumpscale(NPC_WORLD_TUBBA, 1.0); - GetNpcPos(NPC_WORLD_TUBBA, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_WORLD_TUBBA, SI_VAR(0), SI_VAR(1), SI_VAR(2), 30); + GetNpcPos(NPC_WORLD_TUBBA, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_WORLD_TUBBA, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 30); PlaySoundAtNpc(NPC_WORLD_TUBBA, 0x20A0, 0); PlaySound(0x8000005D); ShakeCam(0, 0, 15, 4.0); @@ -1351,12 +1351,12 @@ EvtSource N(defeat_802457D8) = SCRIPT({ }); EvtSource N(init_80245814) = SCRIPT({ - if (SI_SAVE_VAR(203) != 1) { + if (EVT_SAVE_VAR(203) != 1) { SetNpcPos(NPC_SELF, 0, -1000, 0); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_4)), TRUE); return; } - if (SI_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL) { + if (EVT_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL) { SetNpcPos(NPC_SELF, 0, -1000, 0); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_4)), TRUE); return; @@ -1376,16 +1376,16 @@ EvtSource N(init_80245814) = 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; + EVT_SAVE_VAR(203) = 1; + EVT_STORY_PROGRESS = STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER; PlaySoundAtCollider(20, 455, 0); MakeLerp(0, 80, 10, 0); loop { UpdateLerp(); - RotateModel(39, SI_VAR(0), 0, -1, 0); - RotateModel(41, SI_VAR(0), 0, 1, 0); + RotateModel(39, EVT_VAR(0), 0, -1, 0); + RotateModel(41, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -1398,10 +1398,10 @@ EvtSource N(idle_8024598C) = SCRIPT({ MakeLerp(80, 0, 10, 0); loop { UpdateLerp(); - RotateModel(39, SI_VAR(0), 0, -1, 0); - RotateModel(41, SI_VAR(0), 0, 1, 0); + RotateModel(39, EVT_VAR(0), 0, -1, 0); + RotateModel(41, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -1429,7 +1429,7 @@ EvtSource N(defeat_80245CB4) = SCRIPT({ }); EvtSource N(init_80245CF0) = SCRIPT({ - if (SI_SAVE_VAR(203) != 1) { + if (EVT_SAVE_VAR(203) != 1) { BindNpcIdle(NPC_SELF, N(idle_8024598C)); } else { SetNpcPos(NPC_SELF, 136, 0, -330); @@ -1439,8 +1439,8 @@ EvtSource N(init_80245CF0) = SCRIPT({ }); EvtSource N(init_80245D80) = SCRIPT({ - SI_VAR(0) = SI_STORY_PROGRESS; - if (SI_VAR(0) >= -29) { + EVT_VAR(0) = EVT_STORY_PROGRESS; + if (EVT_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); EnableNpcShadow(NPC_SELF, FALSE); SetNpcAnimation(NPC_SELF, NPC_ANIM_sentinel_Palette_00_Anim_1); @@ -1451,8 +1451,8 @@ EvtSource N(init_80245D80) = SCRIPT({ }); EvtSource N(init_80245E44) = SCRIPT({ - SI_VAR(0) = SI_STORY_PROGRESS; - if (SI_VAR(0) >= -29) { + EVT_VAR(0) = EVT_STORY_PROGRESS; + if (EVT_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); EnableNpcShadow(NPC_SELF, FALSE); SetNpcAnimation(NPC_SELF, NPC_ANIM_sentinel_Palette_00_Anim_1); @@ -1463,8 +1463,8 @@ EvtSource N(init_80245E44) = SCRIPT({ }); EvtSource N(init_80245F08) = SCRIPT({ - SI_VAR(0) = SI_STORY_PROGRESS; - if (SI_VAR(0) >= -29) { + EVT_VAR(0) = EVT_STORY_PROGRESS; + if (EVT_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); EnableNpcShadow(NPC_SELF, FALSE); SetNpcAnimation(NPC_SELF, NPC_ANIM_sentinel_Palette_00_Anim_1); @@ -1475,8 +1475,8 @@ EvtSource N(init_80245F08) = SCRIPT({ }); EvtSource N(init_80245FCC) = SCRIPT({ - SI_VAR(0) = SI_STORY_PROGRESS; - if (SI_VAR(0) >= -29) { + EVT_VAR(0) = EVT_STORY_PROGRESS; + if (EVT_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); EnableNpcShadow(NPC_SELF, FALSE); SetNpcAnimation(NPC_SELF, NPC_ANIM_sentinel_Palette_00_Anim_1); diff --git a/src/world/area_dgb/dgb_02/C2EBA0.c b/src/world/area_dgb/dgb_02/C2EBA0.c index 44e6dc25e2..614f6cbbe2 100644 --- a/src/world/area_dgb/dgb_02/C2EBA0.c +++ b/src/world/area_dgb/dgb_02/C2EBA0.c @@ -27,7 +27,7 @@ MapConfig N(config) = { }; EvtSource N(802414B0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -47,10 +47,10 @@ EvtSource N(exitDoubleDoor_80241550) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 0; - SI_VAR(1) = 5; - SI_VAR(2) = 11; - SI_VAR(3) = 13; + EVT_VAR(0) = 0; + EVT_VAR(1) = 5; + EVT_VAR(2) = 11; + EVT_VAR(3) = 13; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_03", 1); @@ -61,10 +61,10 @@ EvtSource N(exitDoubleDoor_80241604) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 1; - SI_VAR(1) = 17; - SI_VAR(2) = 18; - SI_VAR(3) = 16; + EVT_VAR(0) = 1; + EVT_VAR(1) = 17; + EVT_VAR(2) = 18; + EVT_VAR(3) = 16; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_01", 1); @@ -75,10 +75,10 @@ EvtSource N(exitSingleDoor_802416B8) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 2; - SI_VAR(1) = 9; - SI_VAR(2) = 21; - SI_VAR(3) = 1; + EVT_VAR(0) = 2; + EVT_VAR(1) = 9; + EVT_VAR(2) = 21; + EVT_VAR(3) = 1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_07", 0); @@ -89,10 +89,10 @@ EvtSource N(exitSingleDoor_8024176C) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 3; - SI_VAR(1) = 13; - SI_VAR(2) = 23; - SI_VAR(3) = 1; + EVT_VAR(0) = 3; + EVT_VAR(1) = 13; + EVT_VAR(2) = 23; + EVT_VAR(3) = 1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_11", 0); @@ -100,42 +100,42 @@ EvtSource N(exitSingleDoor_8024176C) = SCRIPT({ }); EvtSource N(enterSingleDoor_80241820) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { UseDoorSounds(3); - SI_VAR(2) = 11; - SI_VAR(3) = 13; + EVT_VAR(2) = 11; + EVT_VAR(3) = 13; await EnterDoubleDoor; } == 1 { UseDoorSounds(3); - SI_VAR(2) = 18; - SI_VAR(3) = 16; + EVT_VAR(2) = 18; + EVT_VAR(3) = 16; await EnterDoubleDoor; } == 2 { UseDoorSounds(0); - SI_VAR(2) = 21; - SI_VAR(3) = 1; + EVT_VAR(2) = 21; + EVT_VAR(3) = 1; await EnterSingleDoor; } == 3 { UseDoorSounds(0); - SI_VAR(2) = 23; - SI_VAR(3) = 1; + EVT_VAR(2) = 23; + EVT_VAR(3) = 1; await EnterSingleDoor; } } }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (EVT_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_802425C8)); } bind N(exitDoubleDoor_80241550) TRIGGER_WALL_PRESS_A 5; @@ -151,8 +151,8 @@ static s32 N(pad_1AA8)[] = { }; EvtSource N(80241AB0) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { RemoveNpc(NPC_SELF); } diff --git a/src/world/area_dgb/dgb_03/C31730.c b/src/world/area_dgb/dgb_03/C31730.c index eeb77b4b6e..82f8235a59 100644 --- a/src/world/area_dgb/dgb_03/C31730.c +++ b/src/world/area_dgb/dgb_03/C31730.c @@ -31,7 +31,7 @@ MapConfig N(config) = { }; EvtSource N(80242870) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -51,10 +51,10 @@ EvtSource N(exitDoubleDoor_80242910) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 1; - SI_VAR(1) = 25; - SI_VAR(2) = 36; - SI_VAR(3) = 34; + EVT_VAR(0) = 1; + EVT_VAR(1) = 25; + EVT_VAR(2) = 36; + EVT_VAR(3) = 34; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_02", 0); @@ -65,10 +65,10 @@ EvtSource N(exitDoubleDoor_802429C4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 4; - SI_VAR(1) = 21; - SI_VAR(2) = 46; - SI_VAR(3) = 44; + EVT_VAR(0) = 4; + EVT_VAR(1) = 21; + EVT_VAR(2) = 46; + EVT_VAR(3) = 44; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_09", 0); @@ -79,10 +79,10 @@ EvtSource N(exitDoubleDoor_80242A78) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 0; - SI_VAR(1) = 13; - SI_VAR(2) = 29; - SI_VAR(3) = 31; + EVT_VAR(0) = 0; + EVT_VAR(1) = 13; + EVT_VAR(2) = 29; + EVT_VAR(3) = 31; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_04", 0); @@ -95,10 +95,10 @@ EvtSource N(exitSingleDoor_80242B88) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 2; - SI_VAR(1) = 33; - SI_VAR(2) = 49; - SI_VAR(3) = 1; + EVT_VAR(0) = 2; + EVT_VAR(1) = 33; + EVT_VAR(2) = 49; + EVT_VAR(3) = 1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_05", 0); @@ -109,10 +109,10 @@ EvtSource N(exitDoubleDoor_80242C3C) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 3; - SI_VAR(1) = 17; - SI_VAR(2) = 39; - SI_VAR(3) = 41; + EVT_VAR(0) = 3; + EVT_VAR(1) = 17; + EVT_VAR(2) = 39; + EVT_VAR(3) = 41; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_14", 0); @@ -124,45 +124,45 @@ EvtSource N(80242CF0) = SCRIPT({ }); EvtSource N(enterDoubleDoor_80242D1C) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { UseDoorSounds(3); - SI_VAR(2) = 29; - SI_VAR(3) = 31; + EVT_VAR(2) = 29; + EVT_VAR(3) = 31; await EnterDoubleDoor; spawn N(80242CF0); } == 1 { UseDoorSounds(3); - SI_VAR(2) = 36; - SI_VAR(3) = 34; + EVT_VAR(2) = 36; + EVT_VAR(3) = 34; await EnterDoubleDoor; spawn N(80242CF0); } == 2 { UseDoorSounds(0); - SI_VAR(2) = 49; - SI_VAR(3) = 1; + EVT_VAR(2) = 49; + EVT_VAR(3) = 1; await EnterSingleDoor; spawn N(80242CF0); } == 3 { UseDoorSounds(3); - SI_VAR(2) = 39; - SI_VAR(3) = 41; + EVT_VAR(2) = 39; + EVT_VAR(3) = 41; await EnterDoubleDoor; spawn N(80242CF0); } == 4 { UseDoorSounds(3); - SI_VAR(2) = 46; - SI_VAR(3) = 44; + EVT_VAR(2) = 46; + EVT_VAR(3) = 44; await EnterDoubleDoor; spawn N(80242CF0); } == 5 { - SI_VAR(0) = N(80242CF0); + EVT_VAR(0) = N(80242CF0); spawn EnterWalkShort; sleep 1; } @@ -175,12 +175,12 @@ s32 N(itemList_80242F28)[] = { }; EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (EVT_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_80244988)); } await N(makeEntities); @@ -189,7 +189,7 @@ EvtSource N(main) = SCRIPT({ bind N(exitDoubleDoor_802429C4) TRIGGER_WALL_PRESS_A 21; bind N(exitDoubleDoor_80242A78) TRIGGER_WALL_PRESS_A 13; bind N(exitSingleDoor_80242B88) TRIGGER_WALL_PRESS_A 33; - if (SI_SAVE_FLAG(1043) == 0) { + if (EVT_SAVE_FLAG(1043) == 0) { bind_padlock N(80243740) TRIGGER_WALL_PRESS_A entity(0) N(itemList_80242F28); } else { bind N(exitDoubleDoor_80242C3C) TRIGGER_WALL_PRESS_A 17; @@ -205,23 +205,23 @@ static s32 N(pad_30D8)[] = { EvtSource N(802430E0) = SCRIPT({ group 0; loop 20 { - GetCurrentPartner(SI_VAR(10)); - if (SI_VAR(10) != 0) { - SI_VAR(8) = -1; + GetCurrentPartner(EVT_VAR(10)); + if (EVT_VAR(10) != 0) { + EVT_VAR(8) = -1; return; } - N(UnkFunc11)(SI_VAR(9)); - if (SI_VAR(0) == 0) { - SI_VAR(8) = -1; + N(UnkFunc11)(EVT_VAR(9)); + if (EVT_VAR(0) == 0) { + EVT_VAR(8) = -1; return; } else { SetPlayerActionState(20); } sleep 1; } - GetCurrentPartner(SI_VAR(10)); - if (SI_VAR(10) != 0) { - SI_VAR(8) = -1; + GetCurrentPartner(EVT_VAR(10)); + if (EVT_VAR(10) != 0) { + EVT_VAR(8) = -1; return; } DisablePlayerInput(TRUE); @@ -229,40 +229,40 @@ EvtSource N(802430E0) = SCRIPT({ ShakeCam(0, 0, 100, 0.6005859375); } spawn { - if (SI_VAR(6) >= SI_VAR(7)) { + if (EVT_VAR(6) >= EVT_VAR(7)) { InterpPlayerYaw(270, 0); } else { InterpPlayerYaw(90, 0); } SetPlayerActionState(20); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) = SI_VAR(0); - SI_VAR(2) = SI_VAR(7); - SI_VAR(2) -= SI_VAR(6); - SI_VAR(1) += SI_VAR(2); - MakeLerp(SI_VAR(0), SI_VAR(1), 100, 0); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(2) = EVT_VAR(7); + EVT_VAR(2) -= EVT_VAR(6); + EVT_VAR(1) += EVT_VAR(2); + MakeLerp(EVT_VAR(0), EVT_VAR(1), 100, 0); loop { SetPlayerActionState(20); UpdateLerp(); N(UnkFunc12)(); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } SetPlayerActionState(0); DisablePlayerInput(FALSE); } - MakeLerp(SI_VAR(6), SI_VAR(7), 100, 0); + MakeLerp(EVT_VAR(6), EVT_VAR(7), 100, 0); PlaySoundAtCollider(27, 0x80000010, 0); loop { UpdateLerp(); - TranslateModel(51, SI_VAR(0), 0, 0); + TranslateModel(51, EVT_VAR(0), 0, 0); UpdateColliderTransform(27); UpdateColliderTransform(28); UpdateColliderTransform(29); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -270,35 +270,35 @@ EvtSource N(802430E0) = SCRIPT({ }); EvtSource N(80243470) = SCRIPT({ - if (SI_SAVE_FLAG(1044) != 0) { + if (EVT_SAVE_FLAG(1044) != 0) { goto 90; } - SI_VAR(6) = 0; - SI_VAR(7) = 48; - SI_VAR(8) = 0; - SI_VAR(9) = 27; + EVT_VAR(6) = 0; + EVT_VAR(7) = 48; + EVT_VAR(8) = 0; + EVT_VAR(9) = 27; await N(802430E0); 90: - if (SI_VAR(8) != -1) { - SI_SAVE_FLAG(1045) = 0; - SI_SAVE_FLAG(1044) = 1; + if (EVT_VAR(8) != -1) { + EVT_SAVE_FLAG(1045) = 0; + EVT_SAVE_FLAG(1044) = 1; unbind; } }); EvtSource N(8024353C) = SCRIPT({ - if (SI_SAVE_FLAG(1044) != 0) { + if (EVT_SAVE_FLAG(1044) != 0) { goto 90; } - SI_VAR(6) = 0; - SI_VAR(7) = -48; - SI_VAR(8) = 0; - SI_VAR(9) = 28; + EVT_VAR(6) = 0; + EVT_VAR(7) = -48; + EVT_VAR(8) = 0; + EVT_VAR(9) = 28; await N(802430E0); 90: - if (SI_VAR(8) != -1) { - SI_SAVE_FLAG(1045) = 1; - SI_SAVE_FLAG(1044) = 1; + if (EVT_VAR(8) != -1) { + EVT_SAVE_FLAG(1045) = 1; + EVT_SAVE_FLAG(1044) = 1; unbind; } }); @@ -307,16 +307,16 @@ EvtSource N(80243608) = SCRIPT({ ParentColliderToModel(27, 51); ParentColliderToModel(28, 51); ParentColliderToModel(29, 51); - if (SI_SAVE_FLAG(1044) == 0) { + if (EVT_SAVE_FLAG(1044) == 0) { bind N(80243470) TRIGGER_WALL_PUSH 27; bind N(8024353C) TRIGGER_WALL_PUSH 28; } else { - if (SI_SAVE_FLAG(1045) == 0) { - SI_VAR(0) = 48; + if (EVT_SAVE_FLAG(1045) == 0) { + EVT_VAR(0) = 48; } else { - SI_VAR(0) = -48; + EVT_VAR(0) = -48; } - TranslateModel(51, SI_VAR(0), 0, 0); + TranslateModel(51, EVT_VAR(0), 0, 0); UpdateColliderTransform(27); UpdateColliderTransform(28); UpdateColliderTransform(29); @@ -331,24 +331,24 @@ EvtSource N(80243740) = SCRIPT({ group 0; suspend group 1; ShowKeyChoicePopup(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00D8), 160, 40); CloseChoicePopup(); resume group 1; return; } - if (SI_VAR(0) == -1) { + if (EVT_VAR(0) == -1) { CloseChoicePopup(); resume group 1; return; } - FindKeyItem(19, SI_VAR(0)); - RemoveKeyItemAt(SI_VAR(0)); + FindKeyItem(19, EVT_VAR(0)); + RemoveKeyItemAt(EVT_VAR(0)); CloseChoicePopup(); - SI_SAVE_FLAG(1043) = 1; - N(GetEntityPosition)(SI_MAP_VAR(0), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - PlaySoundAt(0x269, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) = SI_MAP_VAR(0); + EVT_SAVE_FLAG(1043) = 1; + N(GetEntityPosition)(EVT_MAP_VAR(0), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + PlaySoundAt(0x269, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) = EVT_MAP_VAR(0); N(SetEntityFlags100000)(); resume group 1; unbind; @@ -359,12 +359,12 @@ EvtSource N(802438A8) = SCRIPT({ }); EvtSource N(makeEntities) = SCRIPT({ - if (SI_SAVE_FLAG(1043) == 0) { + if (EVT_SAVE_FLAG(1043) == 0) { MakeEntity(0x802BCD68, -355, 218, 75, 80, MAKE_ENTITY_END); AssignScript(N(802438A8)); - SI_MAP_VAR(0) = SI_VAR(0); + EVT_MAP_VAR(0) = EVT_VAR(0); } - MakeItemEntity(ITEM_STAR_PIECE, 0, 75, 100, 17, SI_SAVE_FLAG(1042)); + MakeItemEntity(ITEM_STAR_PIECE, 0, 75, 100, 17, EVT_SAVE_FLAG(1042)); }); static s32 N(pad_3964)[] = { @@ -372,8 +372,8 @@ static s32 N(pad_3964)[] = { }; EvtSource N(80243970) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { RemoveNpc(NPC_SELF); } @@ -515,8 +515,8 @@ NpcSettings N(npcSettings_80243D68) = { }; EvtSource N(init_80243D94) = SCRIPT({ - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 3) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 3) { SetNpcPos(NPC_SELF, -330, 210, -20); } }); diff --git a/src/world/area_dgb/dgb_04/C36530.c b/src/world/area_dgb/dgb_04/C36530.c index b8c53adf5a..4876f2d388 100644 --- a/src/world/area_dgb/dgb_04/C36530.c +++ b/src/world/area_dgb/dgb_04/C36530.c @@ -23,7 +23,7 @@ MapConfig N(config) = { }; EvtSource N(80243170) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -43,10 +43,10 @@ EvtSource N(exitSingleDoor_80243210) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 0; - SI_VAR(1) = 16; - SI_VAR(2) = 16; - SI_VAR(3) = 1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 16; + EVT_VAR(2) = 16; + EVT_VAR(3) = 1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_06", 0); @@ -57,10 +57,10 @@ EvtSource N(exitDoubleDoor_802432C4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 1; - SI_VAR(1) = 20; - SI_VAR(2) = 13; - SI_VAR(3) = 11; + EVT_VAR(0) = 1; + EVT_VAR(1) = 20; + EVT_VAR(2) = 13; + EVT_VAR(3) = 11; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_03", 0); @@ -68,31 +68,31 @@ EvtSource N(exitDoubleDoor_802432C4) = SCRIPT({ }); EvtSource N(enterSingleDoor_80243378) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { UseDoorSounds(3); - SI_VAR(2) = 13; - SI_VAR(3) = 11; + EVT_VAR(2) = 13; + EVT_VAR(3) = 11; await EnterDoubleDoor; } == 1 { UseDoorSounds(0); - SI_VAR(2) = 16; - SI_VAR(3) = 1; + EVT_VAR(2) = 16; + EVT_VAR(3) = 1; await EnterSingleDoor; } } }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamLeadPlayer(0, 0); SetCamEnabled(0, 1); - if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (EVT_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_80243D18)); } await N(makeEntities); @@ -140,11 +140,11 @@ EvtSource N(npcAI_802435E4) = SCRIPT({ DisablePlayerInput(TRUE); sleep 2; 20: - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetNpcPos(NPC_SELF, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(4), SI_VAR(2)); - GetPlayerActionState(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(4), EVT_VAR(2)); + GetPlayerActionState(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { sleep 1; goto 20; } @@ -153,10 +153,10 @@ EvtSource N(npcAI_802435E4) = SCRIPT({ DisablePartnerAI(0); group 0; SetTimeFreezeMode(1); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; - SI_VAR(2) += 2; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + EVT_VAR(2) += 2; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); func_80045838(-1, 759, 0); SetNpcAnimation(NPC_SELF, NPC_ANIM_sentinel_Palette_00_Anim_8); sleep 10; @@ -165,25 +165,25 @@ EvtSource N(npcAI_802435E4) = SCRIPT({ func_80045838(-1, 1838, 0); spawn { loop 100 { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } spawn { SetNpcAnimation(NPC_PARTNER, 0x108); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); } sleep 30; GotoMap(N(dgb_00_name_hack), 2); @@ -191,18 +191,18 @@ EvtSource N(npcAI_802435E4) = SCRIPT({ }); EvtSource N(80243A0C) = SCRIPT({ - GetOwnerEncounterTrigger(SI_VAR(0)); - match SI_VAR(0) { + GetOwnerEncounterTrigger(EVT_VAR(0)); + match EVT_VAR(0) { == 1, 2, 4, 6 { - GetSelfAnimationFromTable(7, SI_VAR(0)); + GetSelfAnimationFromTable(7, EVT_VAR(0)); await 0x800936DC; } } }); EvtSource N(80243A98) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { DoNpcDefeat(); } @@ -279,7 +279,7 @@ f32 N(D_80243D88_C3A2B8)[] = { EvtSource N(80243D94) = SCRIPT({ sleep 10; PlaySound(0x212D); - N(UnkFunc21)(SI_MAP_VAR(0)); + N(UnkFunc21)(EVT_MAP_VAR(0)); sleep 85; spawn { PlaySound(0x212E); @@ -290,7 +290,7 @@ EvtSource N(80243D94) = SCRIPT({ } spawn { sleep 3; - N(func_8024240C_C3893C)(SI_MAP_VAR(0)); + N(func_8024240C_C3893C)(EVT_MAP_VAR(0)); } spawn { sleep 47; @@ -302,20 +302,20 @@ EvtSource N(80243D94) = SCRIPT({ N(UnkPartnerPosFunc)(); } sleep 3; - N(func_802429D0_C38F00)(SI_MAP_VAR(0)); + N(func_802429D0_C38F00)(EVT_MAP_VAR(0)); sleep 30; }); EvtSource N(80243EF8) = SCRIPT({ - if (SI_SAVE_FLAG(1046) == 1) { + if (EVT_SAVE_FLAG(1046) == 1) { return; } - IsStartingConversation(SI_VAR(0)); - if (SI_VAR(0) == 1) { + IsStartingConversation(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { return; } N(UnkFunc24)(); - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { return; } ModifyGlobalOverrideFlags(1, 2097152); @@ -323,40 +323,40 @@ EvtSource N(80243EF8) = SCRIPT({ DisablePlayerInput(TRUE); DisablePartnerAI(0); SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_100)), TRUE); - N(UnkFunc20)(SI_MAP_VAR(0), SI_VAR(9)); - FindKeyItem(15, SI_VAR(12)); + N(UnkFunc20)(EVT_MAP_VAR(0), EVT_VAR(9)); + FindKeyItem(15, EVT_VAR(12)); N(UnkFunc38)(); - if (SI_VAR(0) == -1) { + if (EVT_VAR(0) == -1) { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DC), 160, 40); sleep 10; - N(UnkFunc39)(SI_VAR(9)); + N(UnkFunc39)(EVT_VAR(9)); DisablePlayerInput(FALSE); EnablePartnerAI(); ModifyGlobalOverrideFlags(0, 2097152); N(UnkFunc17)(); return; } - if (SI_SAVE_FLAG(438) == 0) { - SI_SAVE_FLAG(438) = 1; + if (EVT_SAVE_FLAG(438) == 0) { + EVT_SAVE_FLAG(438) = 1; ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DA), 160, 40); } else { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DB), 160, 40); } N(func_8024259C_C38ACC)(); - if (SI_VAR(0) == -1) { - N(UnkFunc39)(SI_VAR(9)); + if (EVT_VAR(0) == -1) { + N(UnkFunc39)(EVT_VAR(9)); DisablePlayerInput(FALSE); EnablePartnerAI(); ModifyGlobalOverrideFlags(0, 2097152); N(UnkFunc17)(); return; } - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); EnablePartnerAI(); - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != SI_VAR(11)) { - N(SwitchToPartner)(SI_VAR(11)); + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != EVT_VAR(11)) { + N(SwitchToPartner)(EVT_VAR(11)); } else { func_802CF56C(2); } @@ -364,8 +364,8 @@ EvtSource N(80243EF8) = SCRIPT({ ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DF), 160, 40); ShowChoice(1966093); CloseMessage(); - if (SI_VAR(0) != 0) { - N(UnkFunc39)(SI_VAR(9)); + if (EVT_VAR(0) != 0) { + N(UnkFunc39)(EVT_VAR(9)); DisablePlayerInput(FALSE); EnablePartnerAI(); ModifyGlobalOverrideFlags(0, 2097152); @@ -373,11 +373,11 @@ EvtSource N(80243EF8) = SCRIPT({ return; } await N(80243D94); - N(UnkFunc18)(SI_VAR(11), SI_VAR(13)); - SI_SAVE_FLAG(1046) = 1; - N(UnkFunc39)(SI_VAR(9)); + N(UnkFunc18)(EVT_VAR(11), EVT_VAR(13)); + EVT_SAVE_FLAG(1046) = 1; + N(UnkFunc39)(EVT_VAR(9)); N(UnkFunc19)(); - if (SI_VAR(13) == 1) { + if (EVT_VAR(13) == 1) { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DD), 160, 40); } else { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DE), 160, 40); @@ -390,8 +390,8 @@ EvtSource N(80243EF8) = 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)); + EVT_MAP_VAR(0) = EVT_VAR(0); + AssignBlockFlag(EVT_SAVE_FLAG(1046)); AssignScript(N(80243EF8)); }); diff --git a/src/world/area_dgb/dgb_05/C3AA10.c b/src/world/area_dgb/dgb_05/C3AA10.c index 54daad121e..2857f44287 100644 --- a/src/world/area_dgb/dgb_05/C3AA10.c +++ b/src/world/area_dgb/dgb_05/C3AA10.c @@ -24,7 +24,7 @@ MapConfig N(config) = { }; EvtSource N(802414E0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -44,10 +44,10 @@ EvtSource N(exitSingleDoor_80241580) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 0; - SI_VAR(1) = 16; - SI_VAR(2) = 30; - SI_VAR(3) = -1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 16; + EVT_VAR(2) = 30; + EVT_VAR(3) = -1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_03", 2); @@ -56,24 +56,24 @@ EvtSource N(exitSingleDoor_80241580) = SCRIPT({ EvtSource N(enterSingleDoor_80241634) = SCRIPT({ UseDoorSounds(0); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 30; - SI_VAR(3) = -1; + EVT_VAR(2) = 30; + EVT_VAR(3) = -1; await EnterSingleDoor; } } }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamLeadPlayer(0, 0); SetCamEnabled(0, 1); - if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (EVT_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_8024230C)); } await N(makeEntities); @@ -91,9 +91,9 @@ static s32 N(pad_17E8)[] = { EvtSource N(802417F0) = SCRIPT({ N(func_80240000_C3AA10)(); - func_802CA988(0, SI_VAR(2), SI_VAR(3), SI_VAR(4), SI_VAR(5)); + func_802CA988(0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); N(func_80240030_C3AA40)(); - SI_SAVE_FLAG(1047) = 1; + EVT_SAVE_FLAG(1047) = 1; GotoMap("dgb_06", 1); sleep 100; }); @@ -103,7 +103,7 @@ static s32 N(pad_1868)[] = { }; EvtSource N(makeEntities) = SCRIPT({ - if (SI_SAVE_FLAG(1047) == 0) { + if (EVT_SAVE_FLAG(1047) == 0) { MakeEntity(0x802BCE84, 510, -210, 100, 0, MAKE_ENTITY_END); } }); @@ -113,8 +113,8 @@ static s32 N(pad_18BC) = { }; EvtSource N(802418C0) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { RemoveNpc(NPC_SELF); } diff --git a/src/world/area_dgb/dgb_06/C3D080.c b/src/world/area_dgb/dgb_06/C3D080.c index 03d44e939b..0e9d2b85be 100644 --- a/src/world/area_dgb/dgb_06/C3D080.c +++ b/src/world/area_dgb/dgb_06/C3D080.c @@ -19,7 +19,7 @@ MapConfig N(config) = { }; EvtSource N(80240320) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -39,10 +39,10 @@ EvtSource N(exitSingleDoor_802403C0) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 0; - SI_VAR(1) = 12; - SI_VAR(2) = 5; - SI_VAR(3) = -1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 12; + EVT_VAR(2) = 5; + EVT_VAR(3) = -1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_04", 1); @@ -51,18 +51,18 @@ EvtSource N(exitSingleDoor_802403C0) = SCRIPT({ EvtSource N(enterSingleDoor_80240474) = SCRIPT({ UseDoorSounds(0); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 5; - SI_VAR(3) = -1; + EVT_VAR(2) = 5; + EVT_VAR(3) = -1; await EnterSingleDoor; } } }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(589824); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -70,7 +70,7 @@ EvtSource N(main) = SCRIPT({ SetCamEnabled(0, 1); MakeNpcs(1, N(npcGroupList_80240B44)); await N(makeEntities); - if (SI_SAVE_FLAG(1047) == 0) { + if (EVT_SAVE_FLAG(1047) == 0) { EnableGroup(28, 0); } else { EnableGroup(25, 0); @@ -86,26 +86,26 @@ EvtSource N(80240624) = SCRIPT({ group 0; SetTimeFreezeMode(2); sleep 40; - ShowGotItem(SI_VAR(0), 0, 0); + ShowGotItem(EVT_VAR(0), 0, 0); SetTimeFreezeMode(0); return; }); EvtSource N(8024068C) = SCRIPT({ DisablePlayerInput(TRUE); - SI_VAR(0) = SI_VAR(10); - if (SI_VAR(10) != 0) { + EVT_VAR(0) = EVT_VAR(10); + if (EVT_VAR(10) != 0) { await N(80240624); } - match SI_VAR(11) { + match EVT_VAR(11) { == 0 { - AddItem(SI_VAR(10), SI_VAR(0)); + AddItem(EVT_VAR(10), EVT_VAR(0)); } == 1 { - AddKeyItem(SI_VAR(10)); + AddKeyItem(EVT_VAR(10)); } == 2 { - AddBadge(SI_VAR(10), SI_VAR(0)); + AddBadge(EVT_VAR(10), EVT_VAR(0)); } } sleep 15; @@ -113,15 +113,15 @@ EvtSource N(8024068C) = SCRIPT({ }); EvtSource N(8024076C) = SCRIPT({ - SI_VAR(10) = 19; - SI_VAR(11) = 1; - SI_SAVE_FLAG(1048) = 1; + EVT_VAR(10) = 19; + EVT_VAR(11) = 1; + EVT_SAVE_FLAG(1048) = 1; await N(8024068C); }); EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAE30, -300, 50, -200, 0, ITEM_NONE, MAKE_ENTITY_END); - AssignFlag(SI_SAVE_FLAG(1048)); + AssignFlag(EVT_SAVE_FLAG(1048)); AssignScript(N(8024076C)); MakeEntity(0x802EA7E0, -125, 60, 175, 0, MAKE_ENTITY_END); }); @@ -137,19 +137,19 @@ NpcSettings N(npcSettings_80240840) = { }; EvtSource N(interact_8024086C) = SCRIPT({ - if (SI_AREA_FLAG(4) == 0) { + if (EVT_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)); - SI_AREA_FLAG(4) = 1; + EVT_AREA_FLAG(4) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00F1)); - SI_AREA_FLAG(4) = 0; + EVT_AREA_FLAG(4) = 0; } }); EvtSource N(init_802408FC) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { + if (EVT_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { SetNpcPos(NPC_SELF, 0, -1000, 0); } BindNpcInteract(NPC_SELF, N(interact_8024086C)); diff --git a/src/world/area_dgb/dgb_07/C3DBF0.c b/src/world/area_dgb/dgb_07/C3DBF0.c index 731b743e9c..6d2f9e324a 100644 --- a/src/world/area_dgb/dgb_07/C3DBF0.c +++ b/src/world/area_dgb/dgb_07/C3DBF0.c @@ -23,7 +23,7 @@ MapConfig N(config) = { }; EvtSource N(80241490) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -43,10 +43,10 @@ EvtSource N(exitSingleDoor_80241530) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 0; - SI_VAR(1) = 6; - SI_VAR(2) = 22; - SI_VAR(3) = -1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 6; + EVT_VAR(2) = 22; + EVT_VAR(3) = -1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_02", 2); @@ -55,24 +55,24 @@ EvtSource N(exitSingleDoor_80241530) = SCRIPT({ EvtSource N(enterSingleDoor_802415E4) = SCRIPT({ UseDoorSounds(0); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 22; - SI_VAR(3) = -1; + EVT_VAR(2) = 22; + EVT_VAR(3) = -1; await EnterSingleDoor; } } }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamLeadPlayer(0, 0); SetCamEnabled(0, 1); - if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (EVT_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_80241E5C)); } await N(makeEntities); @@ -82,7 +82,7 @@ EvtSource N(main) = SCRIPT({ }); EvtSource N(makeEntities) = SCRIPT({ - MakeItemEntity(ITEM_STAR_PIECE, -220, 75, -210, 17, SI_SAVE_FLAG(1050)); + MakeItemEntity(ITEM_STAR_PIECE, -220, 75, -210, 17, EVT_SAVE_FLAG(1050)); MakeEntity(0x802EAED4, -370, 0, -200, 0, -1, MAKE_ENTITY_END); MakeEntity(0x802EAED4, -410, 0, -200, 0, -1, MAKE_ENTITY_END); }); @@ -92,8 +92,8 @@ static s32 N(pad_17E4)[] = { }; EvtSource N(802417F0) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { RemoveNpc(NPC_SELF); } diff --git a/src/world/area_dgb/dgb_08/C3FDB0.c b/src/world/area_dgb/dgb_08/C3FDB0.c index d1060d5180..313d3de55c 100644 --- a/src/world/area_dgb/dgb_08/C3FDB0.c +++ b/src/world/area_dgb/dgb_08/C3FDB0.c @@ -33,7 +33,7 @@ MapConfig N(config) = { }; EvtSource N(80243CF0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -53,10 +53,10 @@ EvtSource N(exitDoubleDoor_80243D90) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 0; - SI_VAR(1) = 14; - SI_VAR(2) = 23; - SI_VAR(3) = 25; + EVT_VAR(0) = 0; + EVT_VAR(1) = 14; + EVT_VAR(2) = 23; + EVT_VAR(3) = 25; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_01", 2); @@ -67,10 +67,10 @@ EvtSource N(exitDoubleDoor_80243E44) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 1; - SI_VAR(1) = 18; - SI_VAR(2) = 18; - SI_VAR(3) = 20; + EVT_VAR(0) = 1; + EVT_VAR(1) = 18; + EVT_VAR(2) = 18; + EVT_VAR(3) = 20; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_01", 4); @@ -83,28 +83,28 @@ const s32 N(pad_XXXX)[] = { EvtSource N(enterDoubleDoor_80243EF8) = SCRIPT({ UseDoorSounds(3); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 23; - SI_VAR(3) = 25; + EVT_VAR(2) = 23; + EVT_VAR(3) = 25; await EnterDoubleDoor; } == 1 { - SI_VAR(2) = 18; - SI_VAR(3) = 20; + EVT_VAR(2) = 18; + EVT_VAR(3) = 20; await EnterDoubleDoor; } } }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_SMASHED_THE_BRIDGES { MakeNpcs(1, N(npcGroupList_80246958)); } @@ -167,8 +167,8 @@ NpcSettings N(npcSettings_802441A8) = { }; EvtSource N(802441D4) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { RemoveNpc(NPC_SELF); } @@ -287,11 +287,11 @@ EvtSource N(npcAI_802444E4) = SCRIPT({ DisablePlayerInput(TRUE); sleep 2; 20: - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetNpcPos(NPC_SELF, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(4), SI_VAR(2)); - GetPlayerActionState(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(4), EVT_VAR(2)); + GetPlayerActionState(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { sleep 1; goto 20; } @@ -300,10 +300,10 @@ EvtSource N(npcAI_802444E4) = SCRIPT({ DisablePartnerAI(0); group 0; SetTimeFreezeMode(1); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; - SI_VAR(2) += 2; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + EVT_VAR(2) += 2; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); func_80045838(-1, 759, 0); SetNpcAnimation(NPC_SELF, NPC_ANIM_sentinel_Palette_00_Anim_8); sleep 10; @@ -312,25 +312,25 @@ EvtSource N(npcAI_802444E4) = SCRIPT({ func_80045838(-1, 1838, 0); spawn { loop 100 { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } spawn { SetNpcAnimation(NPC_PARTNER, 0x108); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); } sleep 30; GotoMap(N(dgb_00_name_hack), 2); @@ -338,18 +338,18 @@ EvtSource N(npcAI_802444E4) = SCRIPT({ }); EvtSource N(8024490C) = SCRIPT({ - GetOwnerEncounterTrigger(SI_VAR(0)); - match SI_VAR(0) { + GetOwnerEncounterTrigger(EVT_VAR(0)); + match EVT_VAR(0) { == 1, 2, 4, 6 { - GetSelfAnimationFromTable(7, SI_VAR(0)); + GetSelfAnimationFromTable(7, EVT_VAR(0)); await 0x800936DC; } } }); EvtSource N(80244998) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { DoNpcDefeat(); } @@ -375,22 +375,22 @@ NpcSettings N(npcSettings_80244A28) = { EvtSource N(idle_80244A54) = SCRIPT({ loop { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(0) >= -350) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(0) >= -350) { break loop; } sleep 1; } - SI_SAVE_VAR(203) = 8; - SI_STORY_PROGRESS = STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL; + EVT_SAVE_VAR(203) = 8; + EVT_STORY_PROGRESS = STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL; PlaySoundAtCollider(18, 455, 0); MakeLerp(0, 80, 10, 0); loop { UpdateLerp(); - RotateModel(18, SI_VAR(0), 0, -1, 0); - RotateModel(20, SI_VAR(0), 0, 1, 0); + RotateModel(18, EVT_VAR(0), 0, -1, 0); + RotateModel(20, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -403,10 +403,10 @@ EvtSource N(idle_80244A54) = SCRIPT({ MakeLerp(80, 0, 10, 0); loop { UpdateLerp(); - RotateModel(18, SI_VAR(0), 0, -1, 0); - RotateModel(20, SI_VAR(0), 0, 1, 0); + RotateModel(18, EVT_VAR(0), 0, -1, 0); + RotateModel(20, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -418,8 +418,8 @@ EvtSource N(idle_80244A54) = SCRIPT({ EvtSource N(80244D08) = SCRIPT({ 10: - GetNpcPos(NPC_WORLD_TUBBA, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(1) > 0) { + GetNpcPos(NPC_WORLD_TUBBA, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(1) > 0) { sleep 1; goto 10; } @@ -451,22 +451,22 @@ EvtSource N(defeat_80244E58) = SCRIPT({ }); EvtSource N(init_80244E94) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) { + if (EVT_STORY_PROGRESS < STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) { SetNpcPos(NPC_SELF, 0, -1000, 0); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_4)), TRUE); return; } - if (SI_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { + if (EVT_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { SetNpcPos(NPC_SELF, 0, -1000, 0); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_4)), TRUE); return; } SetNpcScale(NPC_SELF, 1.25, 1.25, 1.25); BindNpcDefeat(NPC_SELF, N(defeat_80244E58)); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - if (SI_SAVE_VAR(203) != 8) { + if (EVT_SAVE_VAR(203) != 8) { SetNpcPos(NPC_SELF, 0, -1000, 0); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_4)), TRUE); } else { @@ -475,7 +475,7 @@ EvtSource N(init_80244E94) = SCRIPT({ } } == 1 { - if (SI_SAVE_VAR(203) != 8) { + if (EVT_SAVE_VAR(203) != 8) { BindNpcIdle(NPC_SELF, N(idle_80244A54)); } else { SetNpcPos(NPC_SELF, -130, 210, 80); @@ -817,17 +817,17 @@ EvtSource N(interact_80246310) = SCRIPT({ sleep 10; SetNpcAnimation(NPC_SELF, NPC_ANIM_world_clubba_Palette_00_Anim_2); sleep 20; - GetNpcYaw(-1, SI_VAR(0)); - SI_VAR(0) += 180; - InterpNpcYaw(NPC_SELF, SI_VAR(0), 0); + GetNpcYaw(-1, EVT_VAR(0)); + EVT_VAR(0) += 180; + InterpNpcYaw(NPC_SELF, EVT_VAR(0), 0); sleep 10; - GetNpcYaw(-1, SI_VAR(0)); - SI_VAR(0) += 180; - InterpNpcYaw(NPC_SELF, SI_VAR(0), 0); + GetNpcYaw(-1, EVT_VAR(0)); + EVT_VAR(0) += 180; + InterpNpcYaw(NPC_SELF, EVT_VAR(0), 0); sleep 25; - GetNpcYaw(-1, SI_VAR(0)); - SI_VAR(0) += 180; - InterpNpcYaw(NPC_SELF, SI_VAR(0), 0); + GetNpcYaw(-1, EVT_VAR(0)); + EVT_VAR(0) += 180; + InterpNpcYaw(NPC_SELF, EVT_VAR(0), 0); sleep 15; NpcFacePlayer(NPC_SELF, 0); SpeakToPlayer(NPC_SELF, NPC_ANIM_world_clubba_Palette_00_Anim_5, NPC_ANIM_world_clubba_Palette_00_Anim_2, 0, MESSAGE_ID(0x0E, 0x00F2)); diff --git a/src/world/area_dgb/dgb_09/C46BE0.c b/src/world/area_dgb/dgb_09/C46BE0.c index edd29727ed..43c625aa6e 100644 --- a/src/world/area_dgb/dgb_09/C46BE0.c +++ b/src/world/area_dgb/dgb_09/C46BE0.c @@ -29,7 +29,7 @@ MapConfig N(config) = { }; EvtSource N(80243880) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -49,10 +49,10 @@ EvtSource N(exitDoubleDoor_80243920) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 0; - SI_VAR(1) = 5; - SI_VAR(2) = 10; - SI_VAR(3) = 12; + EVT_VAR(0) = 0; + EVT_VAR(1) = 5; + EVT_VAR(2) = 10; + EVT_VAR(3) = 12; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_03", 4); @@ -63,10 +63,10 @@ EvtSource N(exitDoubleDoor_802439D4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 1; - SI_VAR(1) = 17; - SI_VAR(2) = 17; - SI_VAR(3) = 15; + EVT_VAR(0) = 1; + EVT_VAR(1) = 17; + EVT_VAR(2) = 17; + EVT_VAR(3) = 15; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_01", 3); @@ -77,10 +77,10 @@ EvtSource N(exitSingleDoor_80243A88) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 2; - SI_VAR(1) = 9; - SI_VAR(2) = 20; - SI_VAR(3) = 1; + EVT_VAR(0) = 2; + EVT_VAR(1) = 9; + EVT_VAR(2) = 20; + EVT_VAR(3) = 1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_12", 0); @@ -94,31 +94,31 @@ EvtSource N(80243B98) = SCRIPT({ }); EvtSource N(enterWalk_80243BC4) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { UseDoorSounds(3); - SI_VAR(2) = 10; - SI_VAR(3) = 12; + EVT_VAR(2) = 10; + EVT_VAR(3) = 12; await EnterDoubleDoor; spawn N(80243B98); } == 1 { UseDoorSounds(3); - SI_VAR(2) = 17; - SI_VAR(3) = 15; + EVT_VAR(2) = 17; + EVT_VAR(3) = 15; await EnterDoubleDoor; spawn N(80243B98); } == 2 { UseDoorSounds(0); - SI_VAR(2) = 20; - SI_VAR(3) = 1; + EVT_VAR(2) = 20; + EVT_VAR(3) = 1; await EnterSingleDoor; spawn N(80243B98); } == 3 { - SI_VAR(0) = N(80243B98); + EVT_VAR(0) = N(80243B98); spawn EnterWalk; sleep 1; } @@ -126,12 +126,12 @@ EvtSource N(enterWalk_80243BC4) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (EVT_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_8024533C)); } spawn N(80243F6C); @@ -160,12 +160,12 @@ EvtSource N(80243E60) = SCRIPT({ sleep 1; } ModifyColliderFlags(0, 13, 0x7FFFFE00); - SI_SAVE_FLAG(1051) = 1; + EVT_SAVE_FLAG(1051) = 1; unbind; }); EvtSource N(80243F6C) = SCRIPT({ - if (SI_SAVE_FLAG(1051) == 0) { + if (EVT_SAVE_FLAG(1051) == 0) { bind N(80243E60) TRIGGER_POINT_BOMB N(triggerCoord_80243E50); EnableModel(29, 0); } else { @@ -179,8 +179,8 @@ static s32 N(pad_3FF8)[] = { }; EvtSource N(80244000) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { RemoveNpc(NPC_SELF); } @@ -331,11 +331,11 @@ EvtSource N(npcAI_802443DC) = SCRIPT({ DisablePlayerInput(TRUE); sleep 2; 20: - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetNpcPos(NPC_SELF, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(4), SI_VAR(2)); - GetPlayerActionState(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(4), EVT_VAR(2)); + GetPlayerActionState(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { sleep 1; goto 20; } @@ -344,10 +344,10 @@ EvtSource N(npcAI_802443DC) = SCRIPT({ DisablePartnerAI(0); group 0; SetTimeFreezeMode(1); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; - SI_VAR(2) += 2; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + EVT_VAR(2) += 2; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); func_80045838(-1, 759, 0); SetNpcAnimation(NPC_SELF, NPC_ANIM_sentinel_Palette_00_Anim_8); sleep 10; @@ -356,25 +356,25 @@ EvtSource N(npcAI_802443DC) = SCRIPT({ func_80045838(-1, 1838, 0); spawn { loop 100 { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } spawn { SetNpcAnimation(NPC_PARTNER, 0x108); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); } sleep 30; GotoMap(N(dgb_00_name_hack), 2); @@ -382,18 +382,18 @@ EvtSource N(npcAI_802443DC) = SCRIPT({ }); EvtSource N(80244804) = SCRIPT({ - GetOwnerEncounterTrigger(SI_VAR(0)); - match SI_VAR(0) { + GetOwnerEncounterTrigger(EVT_VAR(0)); + match EVT_VAR(0) { == 1, 2, 4, 6 { - GetSelfAnimationFromTable(7, SI_VAR(0)); + GetSelfAnimationFromTable(7, EVT_VAR(0)); await 0x800936DC; } } }); EvtSource N(80244890) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { DoNpcDefeat(); } @@ -481,8 +481,8 @@ StaticNpc N(npcGroup_80244920)[] = { }; EvtSource N(init_80244D00) = SCRIPT({ - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 3) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 3) { SetNpcPos(NPC_SELF, 240, 0, 88); InterpNpcYaw(NPC_SELF, 270, 0); } diff --git a/src/world/area_dgb/dgb_10/C4C390.c b/src/world/area_dgb/dgb_10/C4C390.c index abbfa92a31..94d12dcbc0 100644 --- a/src/world/area_dgb/dgb_10/C4C390.c +++ b/src/world/area_dgb/dgb_10/C4C390.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; EvtSource N(80240250) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -37,10 +37,10 @@ EvtSource N(8024034C) = SCRIPT({ }); EvtSource N(enterWalk_80240378) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(0) = N(8024034C); + EVT_VAR(0) = N(8024034C); spawn EnterWalk; sleep 1; } @@ -65,7 +65,7 @@ EvtSource N(enterWalk_80240378) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -89,156 +89,156 @@ static s32 N(pad_66C) = { }; EvtSource N(80240670) = SCRIPT({ - buf_use SI_VAR(0); - arr_new 6 SI_VAR(10); - buf_read SI_VAR(0); - SI_ARRAY(0) = SI_VAR(0); - buf_read SI_VAR(0); - SI_ARRAY(1) = SI_VAR(0); - buf_read SI_VAR(0); - SI_ARRAY(2) = SI_VAR(0); - buf_read SI_VAR(0); - SI_ARRAY(3) = SI_VAR(0); - buf_read SI_VAR(0); - SI_ARRAY(4) = SI_VAR(0); - buf_read SI_VAR(0); - SI_ARRAY(5) = SI_VAR(0); - SI_VAR(0) = SI_VAR(10); + buf_use EVT_VAR(0); + arr_new 6 EVT_VAR(10); + buf_read EVT_VAR(0); + EVT_ARRAY(0) = EVT_VAR(0); + buf_read EVT_VAR(0); + EVT_ARRAY(1) = EVT_VAR(0); + buf_read EVT_VAR(0); + EVT_ARRAY(2) = EVT_VAR(0); + buf_read EVT_VAR(0); + EVT_ARRAY(3) = EVT_VAR(0); + buf_read EVT_VAR(0); + EVT_ARRAY(4) = EVT_VAR(0); + buf_read EVT_VAR(0); + EVT_ARRAY(5) = EVT_VAR(0); + EVT_VAR(0) = EVT_VAR(10); bind N(80240770) TRIGGER_FLOOR_TOUCH 0xF4ACD480; // TODO: what is this id? see also below TODO }); EvtSource N(80240770) = SCRIPT({ - arr_use SI_VAR(0); + arr_use EVT_VAR(0); N(func_80240000_C4C390)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { return; } loop 5 { - ModifyColliderFlags(1, SI_ARRAY(0), 0x7FFFFE00); - EnableModel(SI_ARRAY(1), 1); + ModifyColliderFlags(1, EVT_ARRAY(0), 0x7FFFFE00); + EnableModel(EVT_ARRAY(1), 1); sleep 1; - ModifyColliderFlags(0, SI_ARRAY(0), 0x7FFFFE00); - EnableModel(SI_ARRAY(1), 0); + ModifyColliderFlags(0, EVT_ARRAY(0), 0x7FFFFE00); + EnableModel(EVT_ARRAY(1), 0); sleep 1; } - if (SI_ARRAY(5) != 0) { + if (EVT_ARRAY(5) != 0) { await 0xF4ACD485; // TODO: what is this? } }); EvtSource N(80240860) = SCRIPT({ - buf_use SI_VAR(0); - arr_new 6 SI_VAR(9); - buf_read SI_VAR(1); - SI_ARRAY(0) = SI_VAR(1); - buf_read SI_VAR(1); - SI_ARRAY(1) = SI_VAR(1); - buf_read SI_VAR(1); - SI_ARRAY(2) = SI_VAR(1); - buf_read SI_VAR(1); - SI_ARRAY(3) = SI_VAR(1); - buf_read SI_VAR(1); - SI_ARRAY(4) = SI_VAR(1); - buf_read SI_VAR(1); - SI_ARRAY(5) = SI_VAR(1); - ParentColliderToModel(SI_ARRAY(1), SI_ARRAY(0)); + buf_use EVT_VAR(0); + arr_new 6 EVT_VAR(9); + buf_read EVT_VAR(1); + EVT_ARRAY(0) = EVT_VAR(1); + buf_read EVT_VAR(1); + EVT_ARRAY(1) = EVT_VAR(1); + buf_read EVT_VAR(1); + EVT_ARRAY(2) = EVT_VAR(1); + buf_read EVT_VAR(1); + EVT_ARRAY(3) = EVT_VAR(1); + buf_read EVT_VAR(1); + EVT_ARRAY(4) = EVT_VAR(1); + buf_read EVT_VAR(1); + EVT_ARRAY(5) = EVT_VAR(1); + ParentColliderToModel(EVT_ARRAY(1), EVT_ARRAY(0)); 0: 1: - GetPlayerActionState(SI_VAR(10)); - if (SI_VAR(10) == 13) { + GetPlayerActionState(EVT_VAR(10)); + if (EVT_VAR(10) == 13) { goto 2; } - if (SI_VAR(10) == 15) { + if (EVT_VAR(10) == 15) { goto 2; } sleep 1; goto 0; 2: - GetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); + GetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(2) != SI_ARRAY(3)) { + if (EVT_VAR(2) != EVT_ARRAY(3)) { goto 2; } N(func_802400A0_C4C430)(); - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { await N(80240AF4); } - if (SI_VAR(0) == 2) { + if (EVT_VAR(0) == 2) { await N(80240CB8); } 3: - GetPlayerActionState(SI_VAR(0)); + GetPlayerActionState(EVT_VAR(0)); sleep 1; - if (SI_VAR(0) == 13) { + if (EVT_VAR(0) == 13) { goto 3; } - if (SI_VAR(0) == 15) { + if (EVT_VAR(0) == 15) { goto 3; } goto 0; }); EvtSource N(80240AF4) = SCRIPT({ - arr_use SI_VAR(9); - GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4)); + arr_use EVT_VAR(9); + GetPlayerPos(EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); MakeLerp(0, 5, 3, 1); 2: UpdateLerp(); - TranslateModel(SI_ARRAY(0), 0, SI_VAR(0), 0); - SI_VAR(5) = SI_VAR(3); - SI_VAR(5) += SI_VAR(0); - SetPlayerPos(SI_VAR(2), SI_VAR(5), SI_VAR(4)); - UpdateColliderTransform(SI_ARRAY(1)); + TranslateModel(EVT_ARRAY(0), 0, EVT_VAR(0), 0); + EVT_VAR(5) = EVT_VAR(3); + EVT_VAR(5) += EVT_VAR(0); + SetPlayerPos(EVT_VAR(2), EVT_VAR(5), EVT_VAR(4)); + UpdateColliderTransform(EVT_ARRAY(1)); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 2; } MakeLerp(5, 0, 3, 1); 3: UpdateLerp(); - TranslateModel(SI_ARRAY(0), 0, SI_VAR(0), 0); - SI_VAR(5) = SI_VAR(3); - SI_VAR(5) += SI_VAR(0); - SetPlayerPos(SI_VAR(2), SI_VAR(5), SI_VAR(4)); - UpdateColliderTransform(SI_ARRAY(1)); + TranslateModel(EVT_ARRAY(0), 0, EVT_VAR(0), 0); + EVT_VAR(5) = EVT_VAR(3); + EVT_VAR(5) += EVT_VAR(0); + SetPlayerPos(EVT_VAR(2), EVT_VAR(5), EVT_VAR(4)); + UpdateColliderTransform(EVT_ARRAY(1)); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 3; } }); 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; + arr_use EVT_VAR(9); + MakeItemEntity(EVT_ARRAY(5), EVT_ARRAY(2), EVT_ARRAY(3), EVT_ARRAY(4), 3, 0); + EVT_VAR(2) = 0; MakeLerp(0, 150, 19, 4); 2: UpdateLerp(); - TranslateModel(SI_ARRAY(0), 0, SI_VAR(0), 0); - SI_VAR(2) += 45; - RotateModel(SI_ARRAY(0), SI_VAR(2), 1, 0, 0); + TranslateModel(EVT_ARRAY(0), 0, EVT_VAR(0), 0); + EVT_VAR(2) += 45; + RotateModel(EVT_ARRAY(0), EVT_VAR(2), 1, 0, 0); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 2; } MakeLerp(150, 0, 19, 4); 3: UpdateLerp(); - TranslateModel(SI_ARRAY(0), 0, SI_VAR(0), 0); - SI_VAR(2) += 45; - RotateModel(SI_ARRAY(0), SI_VAR(2), 1, 0, 0); + TranslateModel(EVT_ARRAY(0), 0, EVT_VAR(0), 0); + EVT_VAR(2) += 45; + RotateModel(EVT_ARRAY(0), EVT_VAR(2), 1, 0, 0); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 3; } }); EvtSource N(80240E68) = SCRIPT({ N(func_8024013C_C4C4CC)(); - func_802CA988(0, SI_VAR(2), SI_VAR(3), SI_VAR(4), SI_VAR(5)); + func_802CA988(0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); N(func_802401C0_C4C550)(); func_802D2B6C(); - GotoMap("dgb_11", SI_VAR(0)); + GotoMap("dgb_11", EVT_VAR(0)); sleep 100; }); @@ -247,27 +247,27 @@ static s32 N(pad_EDC) = { }; EvtSource N(80240EE0) = SCRIPT({ - SI_SAVE_FLAG(1052) = 1; + EVT_SAVE_FLAG(1052) = 1; }); EvtSource N(80240F00) = SCRIPT({ - SI_SAVE_FLAG(1053) = 1; + EVT_SAVE_FLAG(1053) = 1; }); EvtSource N(80240F20) = SCRIPT({ - SI_SAVE_FLAG(1054) = 1; + EVT_SAVE_FLAG(1054) = 1; }); EvtSource N(makeEntities) = SCRIPT({ - if (SI_SAVE_FLAG(1052) == 0) { + if (EVT_SAVE_FLAG(1052) == 0) { MakeEntity(0x802BCE84, 500, 0, -100, 0, MAKE_ENTITY_END); AssignScript(N(80240EE0)); } - if (SI_SAVE_FLAG(1053) == 0) { + if (EVT_SAVE_FLAG(1053) == 0) { MakeEntity(0x802BCE84, 500, 0, -250, 0, MAKE_ENTITY_END); AssignScript(N(80240F00)); } - if (SI_SAVE_FLAG(1054) == 0) { + if (EVT_SAVE_FLAG(1054) == 0) { MakeEntity(0x802BCE84, 375, 0, -250, 0, MAKE_ENTITY_END); AssignScript(N(80240F20)); } diff --git a/src/world/area_dgb/dgb_11/C4D3E0.c b/src/world/area_dgb/dgb_11/C4D3E0.c index 057856430c..ed163384a9 100644 --- a/src/world/area_dgb/dgb_11/C4D3E0.c +++ b/src/world/area_dgb/dgb_11/C4D3E0.c @@ -18,7 +18,7 @@ MapConfig N(config) = { }; EvtSource N(802400D0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -38,10 +38,10 @@ EvtSource N(exitSingleDoor_80240170) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 0; - SI_VAR(1) = 11; - SI_VAR(2) = 21; - SI_VAR(3) = -1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 11; + EVT_VAR(2) = 21; + EVT_VAR(3) = -1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_02", 3); @@ -49,31 +49,31 @@ EvtSource N(exitSingleDoor_80240170) = SCRIPT({ }); EvtSource N(enterSingleDoor_80240224) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { UseDoorSounds(0); - SI_VAR(2) = 21; - SI_VAR(3) = -1; + EVT_VAR(2) = 21; + EVT_VAR(3) = -1; await EnterSingleDoor; return; } == 1 { UseSettingsFrom(0, 500, 0, -100); SetPanTarget(0, 500, 0, -100); - SI_VAR(3) = 1; + EVT_VAR(3) = 1; } == 2 { UseSettingsFrom(0, 500, 75, -250); SetPanTarget(0, 500, 75, -250); - SI_VAR(3) = 75; + EVT_VAR(3) = 75; } == 3 { SetZoneEnabled(5, 0); UseSettingsFrom(0, 375, 0, -175); SetPanTarget(0, 375, 0, -175); - SI_AREA_FLAG(2) = 1; - SI_VAR(3) = 1; + EVT_AREA_FLAG(2) = 1; + EVT_VAR(3) = 1; } } DisablePlayerInput(TRUE); @@ -81,8 +81,8 @@ EvtSource N(enterSingleDoor_80240224) = SCRIPT({ SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); loop { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(1) <= SI_VAR(3)) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(1) <= EVT_VAR(3)) { break loop; } sleep 1; @@ -92,7 +92,7 @@ EvtSource N(enterSingleDoor_80240224) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -110,11 +110,11 @@ static s32 N(pad_56C) = { EvtSource N(80240570) = SCRIPT({ 0: - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(1) >= SI_VAR(3)) { - SI_VAR(1) = SI_VAR(3); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(1) >= EVT_VAR(3)) { + EVT_VAR(1) = EVT_VAR(3); } - SetCamTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetCamTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; goto 0; }); @@ -124,31 +124,31 @@ EvtSource N(80240600) = SCRIPT({ }); EvtSource N(8024062C) = SCRIPT({ - if (SI_AREA_FLAG(3) == 1) { + if (EVT_AREA_FLAG(3) == 1) { return; } - SI_AREA_FLAG(3) = 1; + EVT_AREA_FLAG(3) = 1; DisablePlayerInput(TRUE); SetZoneEnabled(5, 0); - if (SI_AREA_FLAG(2) == 0) { - if (SI_SAVE_FLAG(1054) == 0) { + if (EVT_AREA_FLAG(2) == 0) { + if (EVT_SAVE_FLAG(1054) == 0) { DisablePlayerPhysics(TRUE); SetPlayerActionState(3); sleep 1; - SI_VAR(3) = 500; - SI_VAR(10) = spawn N(80240570); + EVT_VAR(3) = 500; + EVT_VAR(10) = spawn N(80240570); SetPlayerJumpscale(0.7001953125); - SI_VAR(11) = spawn N(80240600); + EVT_VAR(11) = spawn N(80240600); loop { sleep 1; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(1) >= 165) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(1) >= 165) { break loop; } } - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPlayerPos(SI_VAR(0), 165, SI_VAR(2)); - kill SI_VAR(11); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPlayerPos(EVT_VAR(0), 165, EVT_VAR(2)); + kill EVT_VAR(11); SetPlayerAnimation(0x80015); ShakeCam(0, 0, 20, 1.0); sleep 10; @@ -159,13 +159,13 @@ EvtSource N(8024062C) = SCRIPT({ PlaySoundAtPlayer(8326, 0); SetPlayerJumpscale(0.7001953125); PlayerJump(375, 0, -175, 15); - kill SI_VAR(10); + kill EVT_VAR(10); SetPlayerActionState(0); sleep 2; SetZoneEnabled(5, 1); DisablePlayerPhysics(FALSE); DisablePlayerInput(FALSE); - SI_AREA_FLAG(3) = 0; + EVT_AREA_FLAG(3) = 0; } else { DisablePlayerPhysics(TRUE); SetPlayerActionState(3); @@ -175,33 +175,33 @@ EvtSource N(8024062C) = SCRIPT({ GotoMap("dgb_10", 1); sleep 100; } - SI_VAR(3) = 500; - SI_VAR(10) = spawn N(80240570); + EVT_VAR(3) = 500; + EVT_VAR(10) = spawn N(80240570); SetPlayerJumpscale(0.7001953125); PlayerJump(375, 270, -250, 20); - SI_AREA_FLAG(3) = 0; + EVT_AREA_FLAG(3) = 0; } } else { SetPlayerActionState(3); sleep 1; - SI_VAR(3) = 25; + EVT_VAR(3) = 25; SetPlayerJumpscale(0.7001953125); PlayerJump(375, 0, -175, 15); - SI_AREA_FLAG(2) = 0; - kill SI_VAR(10); + EVT_AREA_FLAG(2) = 0; + kill EVT_VAR(10); SetPlayerActionState(0); sleep 2; SetZoneEnabled(5, 1); DisablePlayerInput(FALSE); - SI_AREA_FLAG(3) = 0; + EVT_AREA_FLAG(3) = 0; } }); EvtSource N(makeEntities) = SCRIPT({ - MakeItemEntity(ITEM_D_DOWN_JUMP, 250, 75, -100, 17, SI_SAVE_FLAG(1055)); + MakeItemEntity(ITEM_D_DOWN_JUMP, 250, 75, -100, 17, EVT_SAVE_FLAG(1055)); MakeEntity(0x802EAA30, 375, 0, -250, 0, MAKE_ENTITY_END); AssignScript(N(8024062C)); - SI_MAP_VAR(0) = SI_VAR(0); + EVT_MAP_VAR(0) = EVT_VAR(0); }); ApiStatus N(func_80240000_C4D3E0)(Evt* script, s32 isInitialCall) { diff --git a/src/world/area_dgb/dgb_12/C4DEF0.c b/src/world/area_dgb/dgb_12/C4DEF0.c index 0d2417b9c7..74ec7985b0 100644 --- a/src/world/area_dgb/dgb_12/C4DEF0.c +++ b/src/world/area_dgb/dgb_12/C4DEF0.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; EvtSource N(80240310) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -34,10 +34,10 @@ EvtSource N(exitSingleDoor_802403B0) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 0; - SI_VAR(1) = 8; - SI_VAR(2) = 14; - SI_VAR(3) = -1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 8; + EVT_VAR(2) = 14; + EVT_VAR(3) = -1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_09", 2); @@ -46,18 +46,18 @@ EvtSource N(exitSingleDoor_802403B0) = SCRIPT({ EvtSource N(enterSingleDoor_80240464) = SCRIPT({ UseDoorSounds(0); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 14; - SI_VAR(3) = -1; + EVT_VAR(2) = 14; + EVT_VAR(3) = -1; await EnterSingleDoor; } } }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -93,10 +93,10 @@ EvtSource N(802405E0) = SCRIPT({ MakeLerp(0, -35, 15, 0); loop { UpdateLerp(); - TranslateModel(19, 0, SI_VAR(0), 0); + TranslateModel(19, 0, EVT_VAR(0), 0); UpdateColliderTransform(12); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -108,10 +108,10 @@ EvtSource N(802405E0) = SCRIPT({ MakeLerp(-35, 0, 4, 0); loop { UpdateLerp(); - TranslateModel(19, 0, SI_VAR(0), 0); + TranslateModel(19, 0, EVT_VAR(0), 0); UpdateColliderTransform(12); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -129,26 +129,26 @@ EvtSource N(80240874) = SCRIPT({ group 0; SetTimeFreezeMode(TIME_FREEZE_FULL); sleep 40; - ShowGotItem(SI_VAR(0), 0, 0); + ShowGotItem(EVT_VAR(0), 0, 0); SetTimeFreezeMode(TIME_FREEZE_NORMAL); return; }); EvtSource N(802408DC) = SCRIPT({ DisablePlayerInput(TRUE); - SI_VAR(0) = SI_VAR(10); - if (SI_VAR(10) != 0) { + EVT_VAR(0) = EVT_VAR(10); + if (EVT_VAR(10) != 0) { await N(80240874); } - match SI_VAR(11) { + match EVT_VAR(11) { == 0 { - AddItem(SI_VAR(10), SI_VAR(0)); + AddItem(EVT_VAR(10), EVT_VAR(0)); } == 1 { - AddKeyItem(SI_VAR(10)); + AddKeyItem(EVT_VAR(10)); } == 2 { - AddBadge(SI_VAR(10), SI_VAR(0)); + AddBadge(EVT_VAR(10), EVT_VAR(0)); } } sleep 15; @@ -156,15 +156,15 @@ EvtSource N(802408DC) = SCRIPT({ }); EvtSource N(802409BC) = SCRIPT({ - SI_VAR(10) = 19; - SI_VAR(11) = 1; - SI_SAVE_FLAG(1057) = 1; + EVT_VAR(10) = 19; + EVT_VAR(11) = 1; + EVT_SAVE_FLAG(1057) = 1; await N(802408DC); }); EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAE30, -225, 0, -245, 0, ITEM_NONE, MAKE_ENTITY_END); - AssignFlag(SI_SAVE_FLAG(1057)); + AssignFlag(EVT_SAVE_FLAG(1057)); AssignScript(N(802409BC)); }); diff --git a/src/world/area_dgb/dgb_13/C4E960.c b/src/world/area_dgb/dgb_13/C4E960.c index 4b98ee9e0d..38ad89f502 100644 --- a/src/world/area_dgb/dgb_13/C4E960.c +++ b/src/world/area_dgb/dgb_13/C4E960.c @@ -13,7 +13,7 @@ MapConfig N(config) = { }; EvtSource N(80240050) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -36,7 +36,7 @@ EvtSource N(8024014C) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -46,19 +46,19 @@ EvtSource N(main) = SCRIPT({ ModifyColliderFlags(0, 6, 0x7FFFFE00); await N(80240680); spawn N(80240050); - SI_VAR(0) = N(8024014C); + EVT_VAR(0) = N(8024014C); spawn EnterWalk; sleep 1; }); 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)); - MakeItemEntity(ITEM_COIN, -510, 55, -205, 17, SI_SAVE_FLAG(1061)); - MakeItemEntity(ITEM_COIN, -490, 55, -160, 17, SI_SAVE_FLAG(1062)); - MakeItemEntity(ITEM_COIN, -490, 55, -190, 17, SI_SAVE_FLAG(1063)); - MakeItemEntity(ITEM_COIN, -490, 55, -220, 17, SI_SAVE_FLAG(1064)); + MakeItemEntity(ITEM_MEGA_RUSH, -910, 50, -206, 17, EVT_SAVE_FLAG(1058)); + MakeItemEntity(ITEM_COIN, -530, 55, -190, 17, EVT_SAVE_FLAG(1059)); + MakeItemEntity(ITEM_COIN, -510, 55, -175, 17, EVT_SAVE_FLAG(1060)); + MakeItemEntity(ITEM_COIN, -510, 55, -205, 17, EVT_SAVE_FLAG(1061)); + MakeItemEntity(ITEM_COIN, -490, 55, -160, 17, EVT_SAVE_FLAG(1062)); + MakeItemEntity(ITEM_COIN, -490, 55, -190, 17, EVT_SAVE_FLAG(1063)); + MakeItemEntity(ITEM_COIN, -490, 55, -220, 17, EVT_SAVE_FLAG(1064)); }); static s32 N(pad_37C) = { @@ -69,10 +69,10 @@ EvtSource N(80240380) = SCRIPT({ MakeLerp(0, 30, 15, 0); loop { UpdateLerp(); - TranslateGroup(47, 0, 0, SI_VAR(0)); + TranslateGroup(47, 0, 0, EVT_VAR(0)); UpdateColliderTransform(13); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -82,10 +82,10 @@ EvtSource N(80240424) = SCRIPT({ MakeLerp(30, 0, 15, 0); loop { UpdateLerp(); - TranslateGroup(47, 0, 0, SI_VAR(0)); + TranslateGroup(47, 0, 0, EVT_VAR(0)); UpdateColliderTransform(13); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -95,10 +95,10 @@ EvtSource N(802404C8) = SCRIPT({ MakeLerp(0, 30, 15, 0); loop { UpdateLerp(); - TranslateGroup(53, 0, 0, SI_VAR(0)); + TranslateGroup(53, 0, 0, EVT_VAR(0)); UpdateColliderTransform(17); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -108,22 +108,22 @@ EvtSource N(8024056C) = SCRIPT({ MakeLerp(30, 0, 15, 0); loop { UpdateLerp(); - TranslateGroup(53, 0, 0, SI_VAR(0)); + TranslateGroup(53, 0, 0, EVT_VAR(0)); UpdateColliderTransform(17); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } }); EvtSource N(80240610) = SCRIPT({ - if (SI_MAP_VAR(0) == 0) { + if (EVT_MAP_VAR(0) == 0) { await N(80240380); - SI_MAP_VAR(0) = 1; + EVT_MAP_VAR(0) = 1; } else { await N(80240424); - SI_MAP_VAR(0) = 0; + EVT_MAP_VAR(0) = 0; } unbind; }); diff --git a/src/world/area_dgb/dgb_14/C4F030.c b/src/world/area_dgb/dgb_14/C4F030.c index 80eafbec25..62c4dffd11 100644 --- a/src/world/area_dgb/dgb_14/C4F030.c +++ b/src/world/area_dgb/dgb_14/C4F030.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; EvtSource N(80240060) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -34,10 +34,10 @@ EvtSource N(exitDoubleDoor_80240100) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 1; - SI_VAR(1) = 14; - SI_VAR(2) = 24; - SI_VAR(3) = 22; + EVT_VAR(0) = 1; + EVT_VAR(1) = 14; + EVT_VAR(2) = 24; + EVT_VAR(3) = 22; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_03", 3); @@ -48,10 +48,10 @@ EvtSource N(exitDoubleDoor_802401B4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 0; - SI_VAR(1) = 18; - SI_VAR(2) = 19; - SI_VAR(3) = 17; + EVT_VAR(0) = 0; + EVT_VAR(1) = 18; + EVT_VAR(2) = 19; + EVT_VAR(3) = 17; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_15", 0); @@ -60,19 +60,19 @@ EvtSource N(exitDoubleDoor_802401B4) = SCRIPT({ EvtSource N(enterDoubleDoor_80240268) = SCRIPT({ UseDoorSounds(3); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 24; - SI_VAR(3) = 22; + EVT_VAR(2) = 24; + EVT_VAR(3) = 22; await EnterDoubleDoor; } == 1 { DisablePlayerInput(TRUE); - SI_VAR(2) = 19; - SI_VAR(3) = 17; + EVT_VAR(2) = 19; + EVT_VAR(3) = 17; await EnterDoubleDoor; - if (SI_AREA_FLAG(1) == 1) { + if (EVT_AREA_FLAG(1) == 1) { sleep 5; SetPlayerAnimation(ANIM_8001D); sleep 20; @@ -84,7 +84,7 @@ EvtSource N(enterDoubleDoor_80240268) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -103,5 +103,5 @@ static s32 N(pad_47C) = { EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA564, 500, 60, 75, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1065)); + AssignBlockFlag(EVT_SAVE_FLAG(1065)); }); diff --git a/src/world/area_dgb/dgb_15/C4F510.c b/src/world/area_dgb/dgb_15/C4F510.c index 312e59f7a2..68b760749d 100644 --- a/src/world/area_dgb/dgb_15/C4F510.c +++ b/src/world/area_dgb/dgb_15/C4F510.c @@ -22,9 +22,9 @@ MapConfig N(config) = { }; EvtSource N(802418E0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { - if (SI_SAVE_VAR(203) == 15) { + if (EVT_SAVE_VAR(203) == 15) { SetMusicTrack(0, SONG_TUBBA_BLUBBA_THEME, 0, 8); } else { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); @@ -51,10 +51,10 @@ EvtSource N(exitDoubleDoor_802419C8) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 0; - SI_VAR(1) = 19; - SI_VAR(2) = 12; - SI_VAR(3) = 14; + EVT_VAR(0) = 0; + EVT_VAR(1) = 19; + EVT_VAR(2) = 12; + EVT_VAR(3) = 14; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_14", 1); @@ -65,10 +65,10 @@ EvtSource N(exitDoubleDoor_80241A7C) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 1; - SI_VAR(1) = 10; - SI_VAR(2) = 19; - SI_VAR(3) = 17; + EVT_VAR(0) = 1; + EVT_VAR(1) = 10; + EVT_VAR(2) = 19; + EVT_VAR(3) = 17; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_17", 0); @@ -79,10 +79,10 @@ EvtSource N(exitSingleDoor_80241B30) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 2; - SI_VAR(1) = 6; - SI_VAR(2) = 22; - SI_VAR(3) = 1; + EVT_VAR(0) = 2; + EVT_VAR(1) = 6; + EVT_VAR(2) = 22; + EVT_VAR(3) = 1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_16", 0); @@ -94,7 +94,7 @@ const N(pad_XXXX)[] = { 0, 0 }; 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) { + if (EVT_SAVE_FLAG(1066) == 0) { bind_padlock N(80242AD0) TRIGGER_WALL_PRESS_A entity(0) N(itemList_802419C0); } else { bind N(exitDoubleDoor_80241A7C) TRIGGER_WALL_PRESS_A 10; @@ -102,24 +102,24 @@ EvtSource N(80241BE4) = SCRIPT({ }); EvtSource N(enterSingleDoor_80241C88) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { UseDoorSounds(3); - SI_VAR(2) = 12; - SI_VAR(3) = 14; + EVT_VAR(2) = 12; + EVT_VAR(3) = 14; await EnterDoubleDoor; } == 1 { UseDoorSounds(3); - SI_VAR(2) = 19; - SI_VAR(3) = 17; + EVT_VAR(2) = 19; + EVT_VAR(3) = 17; await EnterDoubleDoor; } == 2 { UseDoorSounds(0); - SI_VAR(2) = 22; - SI_VAR(3) = 1; + EVT_VAR(2) = 22; + EVT_VAR(3) = 1; await EnterSingleDoor; } } @@ -127,14 +127,14 @@ EvtSource N(enterSingleDoor_80241C88) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); - SI_AREA_FLAG(1) = 0; + EVT_AREA_FLAG(1) = 0; SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); SetCamLeadPlayer(0, 0); - if (SI_SAVE_FLAG(1068) == 0) { + if (EVT_SAVE_FLAG(1068) == 0) { MakeNpcs(1, N(npcGroupList_80242AB0)); } await N(makeEntities); @@ -147,8 +147,8 @@ static s32 N(pad_1E94)[] = { }; EvtSource N(80241EA0) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { RemoveNpc(NPC_SELF); } @@ -217,22 +217,22 @@ s32 N(unk_missing_80242158)[] = { 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)); - SI_VAR(1) -= SI_VAR(0); - if (SI_VAR(1) < 150) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_WORLD_TUBBA, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + EVT_VAR(1) -= EVT_VAR(0); + if (EVT_VAR(1) < 150) { break loop; } sleep 1; } - SI_SAVE_FLAG(1067) = 1; - SI_AREA_FLAG(1) = 1; + EVT_SAVE_FLAG(1067) = 1; + EVT_AREA_FLAG(1) = 1; }); EvtSource N(idle_80242238) = SCRIPT({ loop { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(0) >= -1150) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(0) >= -1150) { break loop; } sleep 1; @@ -246,7 +246,7 @@ EvtSource N(idle_80242238) = SCRIPT({ SetPanTarget(0, -50, 0, 180); PanToTarget(0, 0, 1); } - SI_SAVE_VAR(203) = 15; + EVT_SAVE_VAR(203) = 15; SetNpcPos(NPC_SELF, 0, 0, 88); SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM_world_tubba_Palette_00_Anim_9); SetNpcYaw(NPC_SELF, 270); @@ -257,10 +257,10 @@ EvtSource N(idle_80242238) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM_world_tubba_Palette_00_Anim_10, NPC_ANIM_world_tubba_Palette_00_Anim_6, 0, MESSAGE_ID(0x0E, 0x00F3)); sleep 15; spawn { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 2.0); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); DisablePlayerInput(FALSE); @@ -269,15 +269,15 @@ EvtSource N(idle_80242238) = SCRIPT({ }); EvtSource N(802424E8) = SCRIPT({ - GetNpcPos(NPC_SELF, SI_VAR(6), SI_VAR(7), SI_VAR(8)); + GetNpcPos(NPC_SELF, EVT_VAR(6), EVT_VAR(7), EVT_VAR(8)); loop { sleep 1; - 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(3) != SI_VAR(6)) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + if (EVT_VAR(3) != EVT_VAR(6)) { PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_20F6, 65538); - GetDist2D(SI_VAR(10), SI_VAR(0), SI_VAR(2), SI_VAR(3), SI_VAR(5)); - match SI_VAR(10) { + GetDist2D(EVT_VAR(10), EVT_VAR(0), EVT_VAR(2), EVT_VAR(3), EVT_VAR(5)); + match EVT_VAR(10) { < 200 { spawn { ShakeCam(0, 0, 5, 1.6005859375); @@ -303,7 +303,7 @@ EvtSource N(802424E8) = SCRIPT({ sleep 12; } else { } - GetNpcPos(NPC_SELF, SI_VAR(6), SI_VAR(7), SI_VAR(8)); + GetNpcPos(NPC_SELF, EVT_VAR(6), EVT_VAR(7), EVT_VAR(8)); } }); @@ -339,12 +339,12 @@ EvtSource N(defeat_802427B0) = SCRIPT({ }); EvtSource N(init_802427EC) = SCRIPT({ - if (SI_STORY_PROGRESS != STORY_CH3_ARRIVED_AT_TUBBAS_MANOR) { + if (EVT_STORY_PROGRESS != STORY_CH3_ARRIVED_AT_TUBBAS_MANOR) { RemoveNpc(NPC_SELF); return; } SetNpcScale(NPC_SELF, 1.25, 1.25, 1.25); - if (SI_SAVE_VAR(203) != 15) { + if (EVT_SAVE_VAR(203) != 15) { BindNpcIdle(NPC_SELF, N(idle_80242238)); } else { SetNpcPos(NPC_SELF, -310, 0, 180); @@ -404,24 +404,24 @@ EvtSource N(80242AD0) = SCRIPT({ group 0; suspend group 1; ShowKeyChoicePopup(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00D8), 160, 40); CloseChoicePopup(); resume group 1; return; } - if (SI_VAR(0) == -1) { + if (EVT_VAR(0) == -1) { CloseChoicePopup(); resume group 1; return; } - FindKeyItem(19, SI_VAR(0)); - RemoveKeyItemAt(SI_VAR(0)); + FindKeyItem(19, EVT_VAR(0)); + RemoveKeyItemAt(EVT_VAR(0)); CloseChoicePopup(); - SI_SAVE_FLAG(1066) = 1; - N(GetEntityPosition)(SI_MAP_VAR(0), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - PlaySoundAt(0x269, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) = SI_MAP_VAR(0); + EVT_SAVE_FLAG(1066) = 1; + N(GetEntityPosition)(EVT_MAP_VAR(0), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + PlaySoundAt(0x269, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) = EVT_MAP_VAR(0); N(SetEntityFlags100000)(); resume group 1; unbind; @@ -432,10 +432,10 @@ EvtSource N(80242C38) = SCRIPT({ }); EvtSource N(makeEntities) = SCRIPT({ - if (SI_SAVE_FLAG(1066) == 0) { + if (EVT_SAVE_FLAG(1066) == 0) { MakeEntity(0x802BCD68, 130, 8, 175, -80, MAKE_ENTITY_END); AssignScript(N(80242C38)); - SI_MAP_VAR(0) = SI_VAR(0); + EVT_MAP_VAR(0) = EVT_VAR(0); } }); diff --git a/src/world/area_dgb/dgb_16/C52540.c b/src/world/area_dgb/dgb_16/C52540.c index b3c7dd2697..413ca5c4e5 100644 --- a/src/world/area_dgb/dgb_16/C52540.c +++ b/src/world/area_dgb/dgb_16/C52540.c @@ -32,7 +32,7 @@ MapConfig N(config) = { }; EvtSource N(80241480) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -52,10 +52,10 @@ EvtSource N(exitSingleDoor_80241520) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(0); - SI_VAR(0) = 0; - SI_VAR(1) = 6; - SI_VAR(2) = 16; - SI_VAR(3) = -1; + EVT_VAR(0) = 0; + EVT_VAR(1) = 6; + EVT_VAR(2) = 16; + EVT_VAR(3) = -1; spawn ExitSingleDoor; sleep 17; GotoMap("dgb_15", 2); @@ -66,27 +66,27 @@ const char N(pad_XXX)[] = { 0, 0 }; EvtSource N(enterSingleDoor_802415D4) = SCRIPT({ UseDoorSounds(0); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - if (SI_SAVE_FLAG(1068) == 0) { - SI_SAVE_FLAG(1068) = 1; - SI_SAVE_VAR(203) = 18; + if (EVT_SAVE_FLAG(1068) == 0) { + EVT_SAVE_FLAG(1068) = 1; + EVT_SAVE_VAR(203) = 18; } - SI_VAR(2) = 16; - SI_VAR(3) = -1; + EVT_VAR(2) = 16; + EVT_VAR(3) = -1; await EnterSingleDoor; } } }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (EVT_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_8024318C)); } await N(80241780); @@ -100,7 +100,7 @@ static s32 N(pad_1774)[] = { }; EvtSource N(80241780) = SCRIPT({ - MakeItemEntity(ITEM_CASTLE_KEY1, -235, 25, -165, 17, SI_SAVE_FLAG(1069)); + MakeItemEntity(ITEM_CASTLE_KEY1, -235, 25, -165, 17, EVT_SAVE_FLAG(1069)); }); static s32 N(pad_17B4)[] = { @@ -108,8 +108,8 @@ static s32 N(pad_17B4)[] = { }; EvtSource N(802417C0) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { RemoveNpc(NPC_SELF); } diff --git a/src/world/area_dgb/dgb_17/C55A60.c b/src/world/area_dgb/dgb_17/C55A60.c index 68ff74eb80..0087e8704e 100644 --- a/src/world/area_dgb/dgb_17/C55A60.c +++ b/src/world/area_dgb/dgb_17/C55A60.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; EvtSource N(80240060) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -34,10 +34,10 @@ EvtSource N(exitDoubleDoor_80240100) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 0; - SI_VAR(1) = 7; - SI_VAR(2) = 14; - SI_VAR(3) = 16; + EVT_VAR(0) = 0; + EVT_VAR(1) = 7; + EVT_VAR(2) = 14; + EVT_VAR(3) = 16; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_15", 1); @@ -48,10 +48,10 @@ EvtSource N(exitDoubleDoor_802401B4) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 1; - SI_VAR(1) = 11; - SI_VAR(2) = 21; - SI_VAR(3) = 19; + EVT_VAR(0) = 1; + EVT_VAR(1) = 11; + EVT_VAR(2) = 21; + EVT_VAR(3) = 19; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_01", 5); @@ -64,23 +64,23 @@ EvtSource N(80240268) = SCRIPT({ }); EvtSource N(enterDoubleDoor_802402B0) = SCRIPT({ - GetLoadType(SI_VAR(1)); - if (SI_VAR(1) == 1) { + GetLoadType(EVT_VAR(1)); + if (EVT_VAR(1) == 1) { spawn EnterSavePoint; spawn N(80240268); return; } UseDoorSounds(3); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 14; - SI_VAR(3) = 16; + EVT_VAR(2) = 14; + EVT_VAR(3) = 16; await EnterDoubleDoor; } == 1 { - SI_VAR(2) = 21; - SI_VAR(3) = 19; + EVT_VAR(2) = 21; + EVT_VAR(3) = 19; await EnterDoubleDoor; } } @@ -88,7 +88,7 @@ EvtSource N(enterDoubleDoor_802402B0) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); diff --git a/src/world/area_dgb/dgb_18/C55F40.c b/src/world/area_dgb/dgb_18/C55F40.c index b2f613a1a1..2bf11f2fb7 100644 --- a/src/world/area_dgb/dgb_18/C55F40.c +++ b/src/world/area_dgb/dgb_18/C55F40.c @@ -25,7 +25,7 @@ MapConfig N(config) = { }; EvtSource N(802412C0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -45,10 +45,10 @@ EvtSource N(exitDoubleDoor_80241360) = SCRIPT({ group 27; DisablePlayerInput(TRUE); UseDoorSounds(3); - SI_VAR(0) = 0; - SI_VAR(1) = 17; - SI_VAR(2) = 8; - SI_VAR(3) = 10; + EVT_VAR(0) = 0; + EVT_VAR(1) = 17; + EVT_VAR(2) = 8; + EVT_VAR(3) = 10; spawn ExitDoubleDoor; sleep 17; GotoMap("dgb_01", 6); @@ -57,18 +57,18 @@ EvtSource N(exitDoubleDoor_80241360) = SCRIPT({ EvtSource N(enterDoubleDoor_80241414) = SCRIPT({ UseDoorSounds(3); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_VAR(2) = 8; - SI_VAR(3) = 10; + EVT_VAR(2) = 8; + EVT_VAR(3) = 10; await EnterDoubleDoor; } } }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + EVT_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -127,12 +127,12 @@ NpcSettings N(npcSettings_80241628) = { EvtSource N(idle_80241654) = SCRIPT({ 10: - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - if (SI_VAR(0) < 700) { + if (EVT_VAR(0) < 700) { goto 10; } - if (SI_VAR(2) > 185) { + if (EVT_VAR(2) > 185) { goto 10; } DisablePlayerInput(TRUE); @@ -170,10 +170,10 @@ EvtSource N(idle_80241654) = SCRIPT({ MakeLerp(0, 80, 10, 0); loop { UpdateLerp(); - RotateModel(8, SI_VAR(0), 0, -1, 0); - RotateModel(10, SI_VAR(0), 0, 1, 0); + RotateModel(8, EVT_VAR(0), 0, -1, 0); + RotateModel(10, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -193,10 +193,10 @@ EvtSource N(idle_80241654) = SCRIPT({ MakeLerp(80, 0, 10, 0); loop { UpdateLerp(); - RotateModel(8, SI_VAR(0), 0, -1, 0); - RotateModel(10, SI_VAR(0), 0, 1, 0); + RotateModel(8, EVT_VAR(0), 0, -1, 0); + RotateModel(10, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -209,15 +209,15 @@ EvtSource N(idle_80241654) = SCRIPT({ SetSelfVar(0, 0); spawn { loop { - GetSelfVar(0, SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetSelfVar(0, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { break loop; } PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_20F6, 0); ShakeCam(0, 0, 5, 0.30078125); sleep 9; - GetSelfVar(0, SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetSelfVar(0, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { break loop; } PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_20F6, 0); @@ -227,11 +227,11 @@ EvtSource N(idle_80241654) = SCRIPT({ } spawn { loop { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - GetSelfVar(0, SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetSelfVar(0, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { break loop; } } @@ -271,19 +271,19 @@ EvtSource N(idle_80241654) = SCRIPT({ sleep 1; SetNpcScale(NPC_SELF, 1.25, 1.2001953125, 1.25); sleep 1; - GetNpcPos(NPC_SELF, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + GetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); spawn { SetNpcJumpscale(NPC_SELF, 0.5); - NpcJump0(NPC_SELF, SI_VAR(3), 30, SI_VAR(5), 23); + NpcJump0(NPC_SELF, EVT_VAR(3), 30, EVT_VAR(5), 23); } sleep 2; spawn { MakeLerp(0, 50, 18, 1); loop { UpdateLerp(); - func_802CDE68(-1, SI_VAR(0)); + func_802CDE68(-1, EVT_VAR(0)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -291,9 +291,9 @@ EvtSource N(idle_80241654) = SCRIPT({ MakeLerp(0, -90, 18, 1); loop { UpdateLerp(); - SetNpcRotation(NPC_SELF, 0, 0, SI_VAR(0)); + SetNpcRotation(NPC_SELF, 0, 0, EVT_VAR(0)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -303,7 +303,7 @@ EvtSource N(idle_80241654) = SCRIPT({ sleep 5; FadeOutMusic(0, 1000); SetNpcScale(NPC_SELF, 1.25, 1.25, 1.25); - SetNpcPos(NPC_SELF, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + SetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); func_802CDE68(-1, 0); SetNpcRotation(NPC_SELF, 0, 0, 0); SetNpcAnimation(NPC_SELF, NPC_ANIM_world_tubba_Palette_00_Anim_2); @@ -315,30 +315,30 @@ EvtSource N(idle_80241654) = SCRIPT({ spawn { SetSelfVar(1, 0); loop { - GetSelfVar(1, SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetSelfVar(1, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { break loop; } PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2039, 0); - RandInt(10, SI_VAR(1)); - SI_VAR(1) += 15; - ShowSleepBubble(0, 0, 0, 2, 628, 121, 127, SI_VAR(1), SI_VAR(0)); + RandInt(10, EVT_VAR(1)); + EVT_VAR(1) += 15; + ShowSleepBubble(0, 0, 0, 2, 628, 121, 127, EVT_VAR(1), EVT_VAR(0)); sleep 48; PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2038, 0); - RandInt(10, SI_VAR(1)); - SI_VAR(1) += 10; - func_802D8248(SI_VAR(0), SI_VAR(1)); + RandInt(10, EVT_VAR(1)); + EVT_VAR(1) += 10; + func_802D8248(EVT_VAR(0), EVT_VAR(1)); sleep 30; } } sleep 30; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 2.0); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); - SI_STORY_PROGRESS = STORY_CH3_TUBBA_BEGAN_NAPPING; + EVT_STORY_PROGRESS = STORY_CH3_TUBBA_BEGAN_NAPPING; DisablePlayerInput(FALSE); }); @@ -356,19 +356,19 @@ EvtSource N(idle_80242494) = SCRIPT({ spawn { SetSelfVar(1, 0); loop { - GetSelfVar(1, SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetSelfVar(1, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { break loop; } PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2039, 0); - RandInt(10, SI_VAR(1)); - SI_VAR(1) += 15; - ShowSleepBubble(0, 0, 0, 2, 628, 121, 127, SI_VAR(1), SI_VAR(0)); + RandInt(10, EVT_VAR(1)); + EVT_VAR(1) += 15; + ShowSleepBubble(0, 0, 0, 2, 628, 121, 127, EVT_VAR(1), EVT_VAR(0)); sleep 48; PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2038, 0); - RandInt(10, SI_VAR(1)); - SI_VAR(1) += 10; - func_802D8248(SI_VAR(0), SI_VAR(1)); + RandInt(10, EVT_VAR(1)); + EVT_VAR(1) += 10; + func_802D8248(EVT_VAR(0), EVT_VAR(1)); sleep 30; } } @@ -377,9 +377,9 @@ EvtSource N(idle_80242494) = 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)); + ShowSleepBubble(0, 0, 50, 2, 552, 111, 128, 30, EVT_VAR(0)); sleep 360; - func_802D8248(SI_VAR(0), 20); + func_802D8248(EVT_VAR(0), 20); SetNpcVar(-1, 1, 2); sleep 20; PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2F1, 0); @@ -424,7 +424,7 @@ const char N(pad_XXX)[] = { 0, 0 }; EvtSource N(init_80242924) = SCRIPT({ SetNpcScale(NPC_SELF, 1.25, 1.25, 1.25); BindNpcDefeat(NPC_SELF, N(defeat_802428E8)); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH3_TUBBA_BEGAN_NAPPING { BindNpcIdle(NPC_SELF, N(idle_80241654)); } @@ -444,8 +444,8 @@ EvtSource N(init_80242924) = SCRIPT({ EvtSource N(idle_80242A24) = SCRIPT({ loop { - GetSelfVar(0, SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetSelfVar(0, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { break loop; } sleep 1; @@ -458,48 +458,48 @@ EvtSource N(idle_80242A24) = SCRIPT({ NpcJump1(NPC_SELF, 845, 35, 145, 15); PlayerFaceNpc(-1, 0); sleep 15; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 90.0); SetCamDistance(0, 300); SetCamPosB(0, 800, 245); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); PanToTarget(0, 0, 1); SpeakToPlayer(NPC_SELF, NPC_ANIM_yakkey_Palette_00_Anim_2, NPC_ANIM_yakkey_Palette_00_Anim_1, 5, MESSAGE_ID(0x0E, 0x00F6)); sleep 15; SpeakToPlayer(NPC_SELF, NPC_ANIM_yakkey_Palette_00_Anim_2, NPC_ANIM_yakkey_Palette_00_Anim_1, 5, MESSAGE_ID(0x0E, 0x00F7)); ShowChoice(1966093); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { ContinueSpeech(-1, NPC_ANIM_yakkey_Palette_00_Anim_2, NPC_ANIM_yakkey_Palette_00_Anim_1, 0, MESSAGE_ID(0x0E, 0x00F8)); } else { ContinueSpeech(-1, NPC_ANIM_yakkey_Palette_00_Anim_2, NPC_ANIM_yakkey_Palette_00_Anim_1, 0, MESSAGE_ID(0x0E, 0x00F9)); } - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 4.0); - UseSettingsFrom(0, 740, SI_VAR(1), SI_VAR(2)); + UseSettingsFrom(0, 740, EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 600); SetCamPosB(0, 800, 245); - SetPanTarget(0, 740, SI_VAR(1), SI_VAR(2)); + SetPanTarget(0, 740, EVT_VAR(1), EVT_VAR(2)); WaitForCam(0, 1.0); spawn { - SI_MAP_FLAG(0) = 0; + EVT_MAP_FLAG(0) = 0; SpeakToPlayer(NPC_SELF, NPC_ANIM_yakkey_Palette_00_Anim_2, NPC_ANIM_yakkey_Palette_00_Anim_1, 517, MESSAGE_ID(0x0E, 0x00FA)); - SI_MAP_FLAG(0) = 1; + EVT_MAP_FLAG(0) = 1; } - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); loop { SetCamDistance(0, 550.0); SetCamSpeed(0, 90.0); - SetPanTarget(0, 740, SI_VAR(1), SI_VAR(2)); + SetPanTarget(0, 740, EVT_VAR(1), EVT_VAR(2)); sleep 1; SetCamDistance(0, 600.0); SetCamSpeed(0, 90.0); - SetPanTarget(0, 740, SI_VAR(1), SI_VAR(2)); + SetPanTarget(0, 740, EVT_VAR(1), EVT_VAR(2)); sleep 1; - if (SI_MAP_FLAG(0) == 1) { + if (EVT_MAP_FLAG(0) == 1) { break loop; } } @@ -509,15 +509,15 @@ EvtSource N(idle_80242A24) = SCRIPT({ SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM_world_tubba_Palette_00_Anim_25); spawn { loop { - GetNpcVar(0, 1, SI_VAR(0)); - if (SI_VAR(0) == 2) { + GetNpcVar(0, 1, EVT_VAR(0)); + if (EVT_VAR(0) == 2) { break loop; } - RandInt(40, SI_VAR(0)); - RandInt(40, SI_VAR(1)); - SI_VAR(0) += 537; - SI_VAR(1) += 110; - PlayEffect(0x27, 2, SI_VAR(0), SI_VAR(1), 128, 0.30078125, 24, 0, 0, 0, 0, 0, 0, 0); + RandInt(40, EVT_VAR(0)); + RandInt(40, EVT_VAR(1)); + EVT_VAR(0) += 537; + EVT_VAR(1) += 110; + PlayEffect(0x27, 2, EVT_VAR(0), EVT_VAR(1), 128, 0.30078125, 24, 0, 0, 0, 0, 0, 0, 0); sleep 5; } } @@ -526,8 +526,8 @@ EvtSource N(idle_80242A24) = SCRIPT({ SpeakToPlayer(NPC_WORLD_TUBBA, NPC_ANIM_world_tubba_Palette_00_Anim_13, NPC_ANIM_world_tubba_Palette_00_Anim_5, 5, MESSAGE_ID(0x0E, 0x00FB)); sleep 15; DisablePartnerAI(0); - GetCurrentPartnerID(SI_VAR(0)); - match SI_VAR(0) { + GetCurrentPartnerID(EVT_VAR(0)); + match EVT_VAR(0) { == 1 { SpeakToPlayer(NPC_PARTNER, NPC_ANIM_world_goombario_normal_talk, NPC_ANIM_world_goombario_normal_idle, 0, MESSAGE_ID(0x0E, 0x00FC)); } @@ -547,19 +547,19 @@ EvtSource N(idle_80242A24) = SCRIPT({ EnablePartnerAI(); sleep 15; BindNpcAI(NPC_WORLD_TUBBA, N(npcAI_802426B0)); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 4.0); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetNpcJumpscale(NPC_SELF, 1.0); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100)), TRUE); - SI_VAR(1) -= 10; - NpcJump0(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + EVT_VAR(1) -= 10; + NpcJump0(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); SetNpcPos(NPC_SELF, 0, -1000, 0); - SI_STORY_PROGRESS = STORY_CH3_TUBBA_WOKE_UP; + EVT_STORY_PROGRESS = STORY_CH3_TUBBA_WOKE_UP; DisablePlayerInput(FALSE); }); @@ -645,26 +645,26 @@ EvtSource N(802436E4) = SCRIPT({ group 0; SetTimeFreezeMode(2); sleep 40; - ShowGotItem(SI_VAR(0), 0, 0); + ShowGotItem(EVT_VAR(0), 0, 0); SetTimeFreezeMode(0); return; }); EvtSource N(8024374C) = SCRIPT({ DisablePlayerInput(TRUE); - SI_VAR(0) = SI_VAR(10); - if (SI_VAR(10) != 0) { + EVT_VAR(0) = EVT_VAR(10); + if (EVT_VAR(10) != 0) { await N(802436E4); } - match SI_VAR(11) { + match EVT_VAR(11) { == 0 { - AddItem(SI_VAR(10), SI_VAR(0)); + AddItem(EVT_VAR(10), EVT_VAR(0)); } == 1 { - AddKeyItem(SI_VAR(10)); + AddKeyItem(EVT_VAR(10)); } == 2 { - AddBadge(SI_VAR(10), SI_VAR(0)); + AddBadge(EVT_VAR(10), EVT_VAR(0)); } } sleep 15; @@ -672,14 +672,14 @@ EvtSource N(8024374C) = SCRIPT({ }); EvtSource N(8024382C) = SCRIPT({ - SI_SAVE_FLAG(1071) = 1; + EVT_SAVE_FLAG(1071) = 1; AddKeyItem(ITEM_MYSTICAL_KEY); SetNpcVar(1, 0, 1); }); EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAE30, 845, 0, 145, -35, ITEM_NONE, MAKE_ENTITY_END); - AssignFlag(SI_SAVE_FLAG(1071)); + AssignFlag(EVT_SAVE_FLAG(1071)); AssignScript(N(8024382C)); }); diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index 60b297aef1..bc9a3f34a5 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -111,8 +111,8 @@ MapConfig N(config) = { // Extraneous END_CASE_MULTI #ifdef NON_MATCHING EvtSource N(80243BB0) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { 3, 4 {} else { SetMusicTrack(0, SONG_DRY_DRY_OUTPOST, 0, 8); @@ -121,17 +121,17 @@ EvtSource N(80243BB0) = SCRIPT({ }); #else 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) + EVT_CMD(EVT_OP_CALL, GetEntryID, EVT_VAR(0)), + EVT_CMD(EVT_OP_MATCH, EVT_VAR(0)), + EVT_CMD(EVT_OP_CASE_MULTI_OR_EQ, 3), + EVT_CMD(EVT_OP_CASE_MULTI_OR_EQ, 4), + EVT_CMD(EVT_OP_END_CASE_MULTI), + EVT_CMD(EVT_OP_CASE_ELSE), + EVT_CMD(EVT_OP_CALL, SetMusicTrack, 0, SONG_DRY_DRY_OUTPOST, 0, 8), + EVT_CMD(EVT_OP_END_CASE_MULTI), + EVT_CMD(EVT_OP_END_MATCH), + EVT_CMD(EVT_OP_RETURN), + EVT_CMD(EVT_OP_END) }; #endif @@ -141,33 +141,33 @@ EvtSource N(80243C30) = SCRIPT({ DisablePartnerAI(0); HidePlayerShadow(TRUE); SetPlayerAnimation(ANIM_STAND_STILL); - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { EnableNpcShadow(NPC_PARTNER, FALSE); SetNpcPos(NPC_PARTNER, 0, -1000, 0); } - GetEntryID(SI_VAR(0)); + GetEntryID(EVT_VAR(0)); N(GetEntryPos)(); - SI_VAR(2) -= 40; - SetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - InterpPlayerYaw(SI_VAR(4), 0); + EVT_VAR(2) -= 40; + SetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + InterpPlayerYaw(EVT_VAR(4), 0); PlaySound(0x163); func_802D286C(256); func_802D2520(ANIM_STAND_STILL, 5, 2, 1, 1, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); loop 40 { - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } sleep 3; - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { spawn { DisablePartnerAI(0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) -= 3; - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) -= 3; + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetNpcFlagBits(NPC_PARTNER, ((0x00000002)), FALSE); EnablePartnerAI(); EnableNpcShadow(NPC_PARTNER, TRUE); @@ -183,7 +183,7 @@ EvtSource N(80243C30) = SCRIPT({ 0: N(GetCurrentFloor)(); sleep 1; - if (SI_VAR(0) != -1) { + if (EVT_VAR(0) != -1) { goto 0; } spawn 0xFE363C8A; @@ -193,30 +193,30 @@ EvtSource N(80243F84) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); HidePlayerShadow(TRUE); - ModifyColliderFlags(0, SI_VAR(11), 0x7FFFFE00); - GetEntryID(SI_VAR(0)); + ModifyColliderFlags(0, EVT_VAR(11), 0x7FFFFE00); + GetEntryID(EVT_VAR(0)); N(GetEntryPos)(); - SI_VAR(5) = SI_VAR(1); - SI_VAR(6) = SI_VAR(2); - SI_VAR(7) = SI_VAR(3); - SI_VAR(2) += 2; - SetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - InterpPlayerYaw(SI_VAR(4), 0); - if (SI_VAR(4) == 90) { - SI_VAR(5) += 40; + EVT_VAR(5) = EVT_VAR(1); + EVT_VAR(6) = EVT_VAR(2); + EVT_VAR(7) = EVT_VAR(3); + EVT_VAR(2) += 2; + SetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + InterpPlayerYaw(EVT_VAR(4), 0); + if (EVT_VAR(4) == 90) { + EVT_VAR(5) += 40; } else { - SI_VAR(5) -= 40; + EVT_VAR(5) -= 40; } - UseSettingsFrom(0, SI_VAR(5), SI_VAR(6), SI_VAR(7)); - SetPanTarget(0, SI_VAR(5), SI_VAR(6), SI_VAR(7)); + UseSettingsFrom(0, EVT_VAR(5), EVT_VAR(6), EVT_VAR(7)); + SetPanTarget(0, EVT_VAR(5), EVT_VAR(6), EVT_VAR(7)); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { DisablePartnerAI(0); EnableNpcShadow(NPC_PARTNER, FALSE); SetNpcPos(NPC_PARTNER, 0, -1000, 0); - InterpNpcYaw(NPC_PARTNER, SI_VAR(0), 0); + InterpNpcYaw(NPC_PARTNER, EVT_VAR(0), 0); } sleep 1; PlaySound(0x163); @@ -228,22 +228,22 @@ EvtSource N(80243F84) = SCRIPT({ func_802D2520(ANIM_10002, 5, 3, 1, 1, 0); loop 40 { N(SomeXYZFunc2)(1.0); - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { spawn { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) -= 3; - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) -= 3; + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); EnableNpcShadow(NPC_PARTNER, TRUE); EnablePartnerAI(); } } sleep 5; func_802D2520(ANIM_10002, 0, 0, 0, 0, 0); - ModifyColliderFlags(1, SI_VAR(11), 0x7FFFFE00); + ModifyColliderFlags(1, EVT_VAR(11), 0x7FFFFE00); DisablePlayerInput(FALSE); DisablePlayerPhysics(FALSE); PanToTarget(0, 0, 0); @@ -252,13 +252,13 @@ EvtSource N(80243F84) = SCRIPT({ EvtSource N(80244374) = SCRIPT({ N(UnkFunc25)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { return; } - GetCurrentPartner(SI_VAR(0)); - if (SI_VAR(0) != 0) { - GetCurrentPartnerID(SI_VAR(1)); - if (SI_VAR(1) != 6) { + GetCurrentPartner(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(1)); + if (EVT_VAR(1) != 6) { return; } else { func_802D2B6C(); @@ -275,24 +275,24 @@ EvtSource N(80244450) = SCRIPT({ group 27; DisablePlayerPhysics(TRUE); HidePlayerShadow(TRUE); - SI_VAR(0) = SI_VAR(10); + EVT_VAR(0) = EVT_VAR(10); N(GetEntryPos)(); - PlayerMoveTo(SI_VAR(1), SI_VAR(3), 3); - SI_VAR(0) = SI_VAR(10); + PlayerMoveTo(EVT_VAR(1), EVT_VAR(3), 3); + EVT_VAR(0) = EVT_VAR(10); N(GetEntryPos)(); - SetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); SetPlayerFlagBits(2097152, 1); N(GetCurrentCameraYawClamped180)(); - InterpPlayerYaw(SI_VAR(0), 0); + InterpPlayerYaw(EVT_VAR(0), 0); sleep 2; SetPlayerFlagBits(2097152, 0); PlaySound(0x163); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); spawn { sleep 4; loop 40 { - SI_VAR(1) -= 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) -= 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } @@ -303,18 +303,18 @@ EvtSource N(80244450) = SCRIPT({ }); EvtSource N(8024462C) = SCRIPT({ - IsPlayerOnValidFloor(SI_VAR(0)); - if (SI_VAR(0) == 0) { + IsPlayerOnValidFloor(EVT_VAR(0)); + if (EVT_VAR(0) == 0) { return; } - GetPlayerActionState(SI_VAR(0)); - if (SI_VAR(0) == 26) { + GetPlayerActionState(EVT_VAR(0)); + if (EVT_VAR(0) == 26) { return; } - GetCurrentPartner(SI_VAR(0)); - if (SI_VAR(0) != 0) { - GetCurrentPartnerID(SI_VAR(1)); - if (SI_VAR(1) != 6) { + GetCurrentPartner(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(1)); + if (EVT_VAR(1) != 6) { return; } else { func_802D2B6C(); @@ -326,23 +326,23 @@ EvtSource N(8024462C) = SCRIPT({ group 27; N(SetPlayerStatusAnimFlags100000)(); DisablePlayerPhysics(TRUE); - ModifyColliderFlags(0, SI_VAR(11), 0x7FFFFE00); - SI_VAR(0) = SI_VAR(10); + ModifyColliderFlags(0, EVT_VAR(11), 0x7FFFFE00); + EVT_VAR(0) = EVT_VAR(10); N(GetEntryPos)(); - SI_VAR(5) = SI_VAR(1); - SI_VAR(6) = SI_VAR(2); - SI_VAR(6) += 2; - SI_VAR(7) = SI_VAR(3); - SI_VAR(8) = SI_VAR(4); - SI_VAR(8) += 180; - if (SI_VAR(4) >= 360) { - SI_VAR(4) -= 360; + EVT_VAR(5) = EVT_VAR(1); + EVT_VAR(6) = EVT_VAR(2); + EVT_VAR(6) += 2; + EVT_VAR(7) = EVT_VAR(3); + EVT_VAR(8) = EVT_VAR(4); + EVT_VAR(8) += 180; + if (EVT_VAR(4) >= 360) { + EVT_VAR(4) -= 360; } - InterpPlayerYaw(SI_VAR(8), 1); + InterpPlayerYaw(EVT_VAR(8), 1); sleep 1; PlaySound(0x163); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPlayerPos(SI_VAR(0), SI_VAR(6), SI_VAR(7)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_VAR(6), EVT_VAR(7)); SetPlayerAnimation(ANIM_STAND_STILL); func_802D286C(2048); func_802D2520(ANIM_STAND_STILL, 5, 3, 1, 1, 0); @@ -354,7 +354,7 @@ EvtSource N(8024462C) = SCRIPT({ sleep 3; loop 40 { N(SomeXYZFunc2)(1.0); - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } @@ -364,7 +364,7 @@ EvtSource N(8024462C) = SCRIPT({ EvtSource N(exitWalk_80244960) = SCRIPT({ group 27; - SI_SAVE_FLAG(761) = 0; + EVT_SAVE_FLAG(761) = 0; UseExitHeading(60, 0); spawn ExitWalk; GotoMap("sbk_36", 1); @@ -393,8 +393,8 @@ EvtSource N(80244A70) = SCRIPT({ } spawn { sleep 60; - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 3) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 3) { GotoMap("dro_02", 2); } else { GotoMap("dro_02", 3); @@ -404,32 +404,32 @@ EvtSource N(80244A70) = SCRIPT({ }); EvtSource N(enterWalk_80244C14) = SCRIPT({ - GetLoadType(SI_VAR(1)); - if (SI_VAR(1) == 1) { + GetLoadType(EVT_VAR(1)); + if (EVT_VAR(1) == 1) { spawn EnterSavePoint; spawn N(80244A28); return; } - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 2 { - if (SI_SAVE_FLAG(1939) == 0) { + if (EVT_SAVE_FLAG(1939) == 0) { DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPlayerPos(SI_VAR(0), -1000, SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPlayerPos(EVT_VAR(0), -1000, EVT_VAR(2)); sleep 30; PlaySound(SOUND_UNKNOWN_208E); - SI_SAVE_FLAG(1939) = 1; + EVT_SAVE_FLAG(1939) = 1; sleep 30; SetPlayerActionState(0); - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); DisablePlayerPhysics(FALSE); DisablePlayerInput(FALSE); } - SI_VAR(10) = N(80244A28); + EVT_VAR(10) = N(80244A28); await N(80243C30); } 3, 4 { @@ -439,7 +439,7 @@ EvtSource N(enterWalk_80244C14) = SCRIPT({ spawn 0x80285C50; spawn N(80244A28); } else { - SI_VAR(0) = N(80244A28); + EVT_VAR(0) = N(80244A28); spawn EnterWalk; } } @@ -447,17 +447,17 @@ EvtSource N(enterWalk_80244C14) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_DRY_DRY_OUTPOST; + EVT_WORLD_LOCATION = LOCATION_DRY_DRY_OUTPOST; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); SetCamLeadPlayer(0, 0); - SI_SAVE_FLAG(1973) = 1; - if (SI_STORY_PROGRESS < STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) { - SI_STORY_PROGRESS = STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST; + EVT_SAVE_FLAG(1973) = 1; + if (EVT_STORY_PROGRESS < STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) { + EVT_STORY_PROGRESS = STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST; } - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { -53 ... 6 { MakeNpcs(0, N(npcGroupList_8024B47C)); } else { @@ -547,12 +547,12 @@ NpcSettings N(npcSettings_8024518C) = { s32** N(D_802451B8_9603B8) = NULL; EvtSource N(802451BC) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 0); + ShowGotItem(EVT_VAR(0), 1, 0); return; }); EvtSource N(802451EC) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 16); + ShowGotItem(EVT_VAR(0), 1, 16); return; }); @@ -582,9 +582,9 @@ N(quizReqStruct) N(quizRequirements)[] = { EvtSource N(802452AC) = SCRIPT({ N(GetGameStatus75)(); - if (SI_VAR(0) <= 1) { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 300; + if (EVT_VAR(0) <= 1) { + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 300; SetNpcJumpscale(NPC_SELF, 1); SetNpcAnimation(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_C); sleep 40; @@ -593,92 +593,92 @@ EvtSource N(802452AC) = SCRIPT({ }); EvtSource N(8024535C) = SCRIPT({ - N(GetCamVfov)(0, SI_ARRAY(0)); + N(GetCamVfov)(0, EVT_ARRAY(0)); N(SetCamVfov)(0, 25); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetCamType(0, SI_VAR(1), SI_VAR(2)); - SetCamType(0, SI_VAR(1), 0); - GetCamDistance(0, SI_VAR(0)); - if (SI_VAR(0) > 0) { - SI_VAR(0) = (float) 370; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetCamType(0, EVT_VAR(1), EVT_VAR(2)); + SetCamType(0, EVT_VAR(1), 0); + GetCamDistance(0, EVT_VAR(0)); + if (EVT_VAR(0) > 0) { + EVT_VAR(0) = (float) 370; } else { - SI_VAR(0) = (float) -370; + EVT_VAR(0) = (float) -370; } - SetCamDistance(0, SI_VAR(0)); - GetCamPitch(0, SI_VAR(0), SI_VAR(1)); - SI_VAR(0) = 13.0; - SI_VAR(1) = -10.0; - SetCamPitch(0, SI_VAR(0), SI_VAR(1)); + SetCamDistance(0, EVT_VAR(0)); + GetCamPitch(0, EVT_VAR(0), EVT_VAR(1)); + EVT_VAR(0) = 13.0; + EVT_VAR(1) = -10.0; + SetCamPitch(0, EVT_VAR(0), EVT_VAR(1)); PanToTarget(0, 0, 1); SetCamLeadPlayer(0, 0); }); 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)); - GetCamDistance(0, SI_VAR(0)); - if (SI_VAR(0) > 0) { - SI_VAR(0) = (float) 17; + GetNpcPos(NPC_CHUCK_QUIZMO, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 30; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetCamDistance(0, EVT_VAR(0)); + if (EVT_VAR(0) > 0) { + EVT_VAR(0) = (float) 17; } else { - SI_VAR(0) = (float) -17; + EVT_VAR(0) = (float) -17; } - SetCamDistance(0, SI_VAR(0)); + SetCamDistance(0, EVT_VAR(0)); SetCamSpeed(0, 90.0); WaitForCam(0, 1.0); SetCamSpeed(0, 1); }); EvtSource N(802455F4) = SCRIPT({ - N(SetCamVfov)(0, SI_ARRAY(0)); + N(SetCamVfov)(0, EVT_ARRAY(0)); PanToTarget(0, 0, 0); }); EvtSource N(80245630) = SCRIPT({ sleep 20; - N(UnkCameraFunc)(SI_ARRAY(1), SI_ARRAY(3), 83, SI_VAR(0), SI_VAR(1)); + N(UnkCameraFunc)(EVT_ARRAY(1), EVT_ARRAY(3), 83, EVT_VAR(0), EVT_VAR(1)); spawn { - SI_VAR(2) = (float) 0; + EVT_VAR(2) = (float) 0; loop 60 { - SI_VAR(3) = (float) SI_VAR(0); - SI_VAR(4) = (float) SI_VAR(1); - SI_VAR(3) *= (float) SI_VAR(2); - SI_VAR(4) *= (float) SI_VAR(2); - SI_VAR(3) /= (float) 60; - SI_VAR(4) /= (float) 60; - SI_VAR(3) += (float) SI_ARRAY(1); - SI_VAR(4) += (float) SI_ARRAY(3); - SetPlayerPos(SI_VAR(3), SI_ARRAY(2), SI_VAR(4)); - SI_VAR(2) += (float) 1; + EVT_VAR(3) = (float) EVT_VAR(0); + EVT_VAR(4) = (float) EVT_VAR(1); + EVT_VAR(3) *= (float) EVT_VAR(2); + EVT_VAR(4) *= (float) EVT_VAR(2); + EVT_VAR(3) /= (float) 60; + EVT_VAR(4) /= (float) 60; + EVT_VAR(3) += (float) EVT_ARRAY(1); + EVT_VAR(4) += (float) EVT_ARRAY(3); + SetPlayerPos(EVT_VAR(3), EVT_ARRAY(2), EVT_VAR(4)); + EVT_VAR(2) += (float) 1; sleep 1; } - SI_VAR(3) = (float) SI_VAR(0); - SI_VAR(4) = (float) SI_VAR(1); - SI_VAR(3) += (float) SI_ARRAY(1); - SI_VAR(4) += (float) SI_ARRAY(3); - SetPlayerPos(SI_VAR(3), SI_ARRAY(2), SI_VAR(4)); + EVT_VAR(3) = (float) EVT_VAR(0); + EVT_VAR(4) = (float) EVT_VAR(1); + EVT_VAR(3) += (float) EVT_ARRAY(1); + EVT_VAR(4) += (float) EVT_ARRAY(3); + SetPlayerPos(EVT_VAR(3), EVT_ARRAY(2), EVT_VAR(4)); } N(UnkRotatePlayer)(); - func_802D2884(SI_ARRAY(1), SI_ARRAY(3), 0); + func_802D2884(EVT_ARRAY(1), EVT_ARRAY(3), 0); SetPlayerAnimation(ANIM_10002); }); 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); - SI_VAR(5) -= (float) SI_VAR(11); + GetNpcPos(NPC_PARTNER, EVT_VAR(10), EVT_VAR(11), EVT_VAR(12)); + N(UnkCameraFunc)(EVT_VAR(10), EVT_VAR(12), 108, EVT_VAR(0), EVT_VAR(1)); + EVT_VAR(5) = (float) EVT_ARRAY(2); + EVT_VAR(5) -= (float) EVT_VAR(11); spawn { N(UnkMovePartner)(); - SI_VAR(3) = (float) SI_VAR(0); - SI_VAR(4) = (float) SI_VAR(1); - SI_VAR(6) = (float) SI_VAR(5); - SI_VAR(3) += (float) SI_VAR(10); - SI_VAR(4) += (float) SI_VAR(12); - SI_VAR(6) += (float) SI_VAR(11); - SetNpcPos(NPC_PARTNER, SI_VAR(3), SI_VAR(6), SI_VAR(4)); + EVT_VAR(3) = (float) EVT_VAR(0); + EVT_VAR(4) = (float) EVT_VAR(1); + EVT_VAR(6) = (float) EVT_VAR(5); + EVT_VAR(3) += (float) EVT_VAR(10); + EVT_VAR(4) += (float) EVT_VAR(12); + EVT_VAR(6) += (float) EVT_VAR(11); + SetNpcPos(NPC_PARTNER, EVT_VAR(3), EVT_VAR(6), EVT_VAR(4)); } N(UnkRotatePartner)(); NpcFacePlayer(NPC_PARTNER, 0); @@ -686,21 +686,21 @@ EvtSource N(802457E0) = 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)); + GetNpcPos(NPC_CHUCK_QUIZMO, EVT_VAR(10), EVT_VAR(11), EVT_VAR(12)); + N(UnkCameraFunc)(EVT_VAR(10), EVT_VAR(12), -70, EVT_VAR(0), EVT_VAR(1)); spawn { - SI_VAR(2) = (float) 0; + EVT_VAR(2) = (float) 0; loop 60 { - SI_VAR(3) = (float) SI_VAR(0); - SI_VAR(4) = (float) SI_VAR(1); - SI_VAR(3) *= (float) SI_VAR(2); - SI_VAR(4) *= (float) SI_VAR(2); - SI_VAR(3) /= (float) 60; - SI_VAR(4) /= (float) 60; - SI_VAR(3) += (float) SI_VAR(10); - SI_VAR(4) += (float) SI_VAR(12); - SetNpcPos(NPC_CHUCK_QUIZMO, SI_VAR(3), SI_ARRAY(2), SI_VAR(4)); - SI_VAR(2) += (float) 1; + EVT_VAR(3) = (float) EVT_VAR(0); + EVT_VAR(4) = (float) EVT_VAR(1); + EVT_VAR(3) *= (float) EVT_VAR(2); + EVT_VAR(4) *= (float) EVT_VAR(2); + EVT_VAR(3) /= (float) 60; + EVT_VAR(4) /= (float) 60; + EVT_VAR(3) += (float) EVT_VAR(10); + EVT_VAR(4) += (float) EVT_VAR(12); + SetNpcPos(NPC_CHUCK_QUIZMO, EVT_VAR(3), EVT_ARRAY(2), EVT_VAR(4)); + EVT_VAR(2) += (float) 1; sleep 1; } } @@ -735,53 +735,53 @@ EvtSource N(80245B34) = SCRIPT({ SetPlayerAnimation(ANIM_BEFORE_JUMP); sleep 2; SetPlayerAnimation(ANIM_MIDAIR_STILL); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_MIDAIR); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_10009); sleep 2; @@ -789,53 +789,53 @@ EvtSource N(80245B34) = SCRIPT({ SetPlayerAnimation(ANIM_BEFORE_JUMP); sleep 2; SetPlayerAnimation(ANIM_MIDAIR_STILL); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_MIDAIR); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_10009); sleep 2; @@ -843,59 +843,59 @@ EvtSource N(80245B34) = SCRIPT({ SetPlayerAnimation(ANIM_BEFORE_JUMP); sleep 2; SetPlayerAnimation(ANIM_MIDAIR_STILL); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_MIDAIR); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_10009); sleep 2; } SetPlayerAnimation(ANIM_10002); - SetPlayerPos(SI_VAR(0), SI_ARRAY(2), SI_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_ARRAY(2), EVT_VAR(2)); sleep 1; }); @@ -908,26 +908,26 @@ EvtSource N(8024667C) = 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); - SI_VAR(2) += (float) SI_VAR(0); - SI_VAR(3) = (float) SI_ARRAY(3); - SI_VAR(3) += (float) SI_VAR(1); + N(UnkCameraFunc)(EVT_ARRAY(1), EVT_ARRAY(3), 25, EVT_VAR(0), EVT_VAR(1)); + EVT_VAR(2) = (float) EVT_ARRAY(1); + EVT_VAR(2) += (float) EVT_VAR(0); + EVT_VAR(3) = (float) EVT_ARRAY(3); + EVT_VAR(3) += (float) EVT_VAR(1); SetNpcAnimation(NPC_PARTNER, 0x102); - NpcMoveTo(NPC_PARTNER, SI_VAR(2), SI_VAR(3), 40); + NpcMoveTo(NPC_PARTNER, EVT_VAR(2), EVT_VAR(3), 40); SetNpcAnimation(NPC_PARTNER, 0x106); } - PlayerMoveTo(SI_ARRAY(1), SI_ARRAY(3), 40); + PlayerMoveTo(EVT_ARRAY(1), EVT_ARRAY(3), 40); }); EvtSource N(80246798) = SCRIPT({ - SI_VAR(1) = spawn N(80245B34); + EVT_VAR(1) = spawn N(80245B34); sleep 60; - kill SI_VAR(1); + kill EVT_VAR(1); loop 5 { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 2; } sleep 20; @@ -935,44 +935,44 @@ EvtSource N(80246798) = SCRIPT({ }); EvtSource N(80246848) = SCRIPT({ - SI_VAR(1) = spawn N(8024667C); + EVT_VAR(1) = spawn N(8024667C); sleep 60; loop 5 { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 2; } sleep 20; - kill SI_VAR(1); + kill EVT_VAR(1); await N(802466BC); }); EvtSource N(802468F8) = SCRIPT({ - if (SI_SAVE_VAR(352) > 63) { - SI_VAR(0) = 0; + if (EVT_SAVE_VAR(352) > 63) { + EVT_VAR(0) = 0; return; } - GetPlayerPos(SI_ARRAY(1), SI_ARRAY(2), SI_ARRAY(3)); + GetPlayerPos(EVT_ARRAY(1), EVT_ARRAY(2), EVT_ARRAY(3)); NpcFacePlayer(NPC_SELF, 16); - if (SI_SAVE_VAR(352) == 63) { + if (EVT_SAVE_VAR(352) == 63) { SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x000A)); } else { - if (SI_SAVE_FLAG(1767) == 1) { + if (EVT_SAVE_FLAG(1767) == 1) { SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x0009)); } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x0008)); - SI_SAVE_FLAG(1767) = 1; + EVT_SAVE_FLAG(1767) = 1; } } ShowChoice(MESSAGE_ID(0x1E, 0x000D)); - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { ContinueSpeech(-1, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x000C)); await N(802452AC); - SI_VAR(0) = 0; + EVT_VAR(0) = 0; return; } - SI_SAVE_FLAG(1793) = 1; + EVT_SAVE_FLAG(1793) = 1; N(Set80151310_1)(); N(UnkAlphaFunc)(); spawn N(8024535C); @@ -982,49 +982,49 @@ EvtSource N(802468F8) = SCRIPT({ SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_100)), TRUE); SetNpcFlagBits(NPC_CHUCK_QUIZMO, ((NPC_FLAG_100)), TRUE); SetNpcAnimation(NPC_PARTNER, 0x106); - SI_VAR(1) = spawn N(80245A84); + EVT_VAR(1) = spawn N(80245A84); ContinueSpeech(-1, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x000B)); PlaySound(0x89); loop { - SI_VAR(0) = does_script_exist SI_VAR(1); - if (SI_VAR(0) == 0) { + EVT_VAR(0) = does_script_exist EVT_VAR(1); + if (EVT_VAR(0) == 0) { break loop; } sleep 1; } N(func_80241BE0_95CDE0)(); loop 5 { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 2; } - SI_VAR(0) = 2883584; - SI_VAR(0) += SI_SAVE_VAR(352); - SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_5, NPC_ANIM_chuck_quizmo_Palette_00_Anim_6, 0, SI_VAR(0)); + EVT_VAR(0) = 2883584; + EVT_VAR(0) += EVT_SAVE_VAR(352); + SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_5, NPC_ANIM_chuck_quizmo_Palette_00_Anim_6, 0, EVT_VAR(0)); SetPlayerAnimation(ANIM_QUESTION); - SI_VAR(0) = 2949120; - SI_VAR(0) += SI_SAVE_VAR(352); + EVT_VAR(0) = 2949120; + EVT_VAR(0) += EVT_SAVE_VAR(352); PlaySound(0x8E); - ShowChoice(SI_VAR(0)); - kill SI_VAR(1); + ShowChoice(EVT_VAR(0)); + kill EVT_VAR(1); StopSound(142); spawn N(80245AF8); sleep 15; PlaySound(0x8D); - N(func_80241EE0_95D0E0)(SI_VAR(0)); - SI_ARRAY(4) = 0; + N(func_80241EE0_95D0E0)(EVT_VAR(0)); + EVT_ARRAY(4) = 0; N(func_802424D4_95D6D4)(); sleep 40; N(func_80241B5C_95CD5C)(); spawn { sleep 110; CloseChoice(); - SI_ARRAY(4) = 0; + EVT_ARRAY(4) = 0; } - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_7); - SI_ARRAY(4) = 1; + EVT_ARRAY(4) = 1; spawn { N(func_80241EAC_95D0AC)(1); sleep 6; @@ -1045,89 +1045,89 @@ EvtSource N(802468F8) = SCRIPT({ N(func_80241F78_95D178)(); spawn { sleep 15; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 50; - N(UnkCameraFunc)(0, 0, 83, SI_VAR(0), SI_VAR(2)); - PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 50; + N(UnkCameraFunc)(0, 0, 83, EVT_VAR(0), EVT_VAR(2)); + PlayEffect(0x7, 2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x44, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); sleep 15; - SI_VAR(1) += -3; - N(UnkCameraFunc)(0, 0, 58, SI_VAR(0), SI_VAR(2)); - PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(1) += -3; + N(UnkCameraFunc)(0, 0, 58, EVT_VAR(0), EVT_VAR(2)); + PlayEffect(0x7, 2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x44, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); sleep 15; - SI_VAR(1) += 30; - N(UnkCameraFunc)(0, 0, 93, SI_VAR(0), SI_VAR(2)); - PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(1) += 30; + N(UnkCameraFunc)(0, 0, 93, EVT_VAR(0), EVT_VAR(2)); + PlayEffect(0x7, 2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x44, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); sleep 15; } sleep 20; - SI_VAR(1) = spawn N(80246798); - SI_SAVE_VAR(352) += 1; - if (SI_SAVE_VAR(352) > 63) { + EVT_VAR(1) = spawn N(80246798); + EVT_SAVE_VAR(352) += 1; + if (EVT_SAVE_VAR(352) > 63) { ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x0010)); SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_6); loop { - SI_VAR(0) = does_script_exist SI_VAR(1); - if (SI_VAR(0) == 0) { + EVT_VAR(0) = does_script_exist EVT_VAR(1); + if (EVT_VAR(0) == 0) { break loop; } sleep 1; } SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_5); - SI_VAR(0) = 348; - SI_VAR(1) = 3; + EVT_VAR(0) = 348; + EVT_VAR(1) = 3; await N(802451BC); AddStarPieces(1); N(func_80241EAC_95D0AC)(15); N(func_80241F60_95D160)(); - SetMessageValue(SI_SAVE_VAR(352), 0); + SetMessageValue(EVT_SAVE_VAR(352), 0); SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x0011)); } else { ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x000E)); SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_6); loop { - SI_VAR(0) = does_script_exist SI_VAR(1); - if (SI_VAR(0) == 0) { + EVT_VAR(0) = does_script_exist EVT_VAR(1); + if (EVT_VAR(0) == 0) { break loop; } sleep 1; } SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_5); - SI_VAR(0) = 348; - SI_VAR(1) = 1; + EVT_VAR(0) = 348; + EVT_VAR(1) = 1; await N(802451BC); AddStarPieces(1); N(func_80241EAC_95D0AC)(15); N(func_80241F60_95D160)(); - SetMessageValue(SI_SAVE_VAR(352), 0); - if (SI_SAVE_VAR(352) == 1) { + SetMessageValue(EVT_SAVE_VAR(352), 0); + if (EVT_SAVE_VAR(352) == 1) { SetMessageString(2148844180, 1); } else { SetMessageString(2148844176, 1); } SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x000F)); } - SI_VAR(0) = 1; + EVT_VAR(0) = 1; } else { SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_9); - SI_ARRAY(4) = 2; + EVT_ARRAY(4) = 2; PlaySound(0x21D); PlaySound(0x8B); - SI_VAR(1) = spawn N(80246848); - GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4)); - PlayEffect(0x2B, 0, SI_VAR(2), SI_VAR(3), SI_VAR(4), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(1) = spawn N(80246848); + GetPlayerPos(EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + PlayEffect(0x2B, 0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4), 0, 0, 0, 0, 0, 0, 0, 0, 0); ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x000D)); SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_A); loop { - SI_VAR(0) = does_script_exist SI_VAR(1); - if (SI_VAR(0) == 0) { + EVT_VAR(0) = does_script_exist EVT_VAR(1); + if (EVT_VAR(0) == 0) { break loop; } sleep 1; } - SI_VAR(0) = 0; + EVT_VAR(0) = 0; } N(func_80241EE0_95D0E0)(-1); EnablePartnerAI(); @@ -1145,12 +1145,12 @@ EvtSource N(802468F8) = SCRIPT({ spawn N(802455F4); N(UnkFunc29)(); N(Set80151310_0)(); - SI_SAVE_FLAG(1793) = 0; + EVT_SAVE_FLAG(1793) = 0; }); EvtSource N(80247628) = SCRIPT({ N(func_802415AC_95C7AC)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { return; } SetNpcFlagBits(NPC_SELF, ((0x01000000)), FALSE); @@ -1160,7 +1160,7 @@ EvtSource N(80247628) = SCRIPT({ EvtSource N(8024769C) = SCRIPT({ arr_use 0x8024DFC8; // TODO rawptr - SI_SAVE_FLAG(1769) = 1; + EVT_SAVE_FLAG(1769) = 1; DisablePlayerPhysics(TRUE); SetPlayerFlagBits(4194304, 1); await N(802468F8); @@ -1217,145 +1217,145 @@ s32 N(D_802477E4_9629E4) = { }; EvtSource N(802477E8) = SCRIPT({ - SI_VAR(9) = SI_VAR(1); + EVT_VAR(9) = EVT_VAR(1); ShowKeyChoicePopup(); - SI_VAR(10) = SI_VAR(0); - match SI_VAR(0) { + EVT_VAR(10) = EVT_VAR(0); + match EVT_VAR(0) { == 0 {} == -1 {} else { - RemoveKeyItemAt(SI_VAR(1)); - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - N(AddPlayerHandsOffset)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) |= (const) 0x50000; - MakeItemEntity(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5), 1, 0); + RemoveKeyItemAt(EVT_VAR(1)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(AddPlayerHandsOffset)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) |= (const) 0x50000; + MakeItemEntity(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1, 0); SetPlayerAnimation(0x60005); sleep 30; SetPlayerAnimation(ANIM_10002); - RemoveItemEntity(SI_VAR(0)); + RemoveItemEntity(EVT_VAR(0)); } } - N(func_80242784_95D984)(SI_VAR(10)); + N(func_80242784_95D984)(EVT_VAR(10)); CloseChoicePopup(); unbind; }); EvtSource N(8024792C) = SCRIPT({ - N(func_802427BC_95D9BC)(SI_VAR(0)); + N(func_802427BC_95D9BC)(EVT_VAR(0)); bind_padlock N(802477E8) 0x10 0 N(D_8024DFF0); - N(func_80242730_95D930)(SI_VAR(0)); + N(func_80242730_95D930)(EVT_VAR(0)); }); 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)); - SetItemPos(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5)); + GetNpcPos(NPC_PARTNER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(UnkYawFunc)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + SetItemPos(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); sleep 1; } }); EvtSource N(802479FC) = SCRIPT({ - SI_VAR(9) = SI_VAR(1); + EVT_VAR(9) = EVT_VAR(1); ShowKeyChoicePopup(); - SI_VAR(10) = SI_VAR(0); - match SI_VAR(0) { + EVT_VAR(10) = EVT_VAR(0); + match EVT_VAR(0) { == 0 {} == -1 {} else { - RemoveKeyItemAt(SI_VAR(1)); + RemoveKeyItemAt(EVT_VAR(1)); DisablePartnerAI(0); - GetNpcPos(NPC_PARTNER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - N(UnkYawFunc)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) |= (const) 0x50000; - MakeItemEntity(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5), 1, 0); - SI_VAR(10) = spawn N(8024797C); + GetNpcPos(NPC_PARTNER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(UnkYawFunc)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) |= (const) 0x50000; + MakeItemEntity(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1, 0); + EVT_VAR(10) = spawn N(8024797C); SetNpcAnimation(NPC_PARTNER, NPC_ANIM_world_parakarry_Palette_00_Anim_2); - GetAngleBetweenNPCs(SI_VAR(9), -4, SI_VAR(11)); - GetNpcPos(NPC_PARTNER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - GetNpcPos(SI_VAR(9), SI_VAR(6), SI_VAR(7), SI_VAR(8)); + GetAngleBetweenNPCs(EVT_VAR(9), -4, EVT_VAR(11)); + GetNpcPos(NPC_PARTNER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + GetNpcPos(EVT_VAR(9), EVT_VAR(6), EVT_VAR(7), EVT_VAR(8)); SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_100)), TRUE); - if (SI_VAR(11) <= 180) { - SI_VAR(6) += 20; + if (EVT_VAR(11) <= 180) { + EVT_VAR(6) += 20; } else { - SI_VAR(6) += -20; + EVT_VAR(6) += -20; } - SI_VAR(7) += 10; + EVT_VAR(7) += 10; SetNpcJumpscale(NPC_PARTNER, 0.0); - NpcJump1(NPC_PARTNER, SI_VAR(6), SI_VAR(7), SI_VAR(8), 20); - kill SI_VAR(10); - RemoveItemEntity(SI_VAR(0)); + NpcJump1(NPC_PARTNER, EVT_VAR(6), EVT_VAR(7), EVT_VAR(8), 20); + kill EVT_VAR(10); + RemoveItemEntity(EVT_VAR(0)); sleep 20; - GetNpcYaw(-4, SI_VAR(10)); - SI_VAR(10) += 180; - InterpNpcYaw(NPC_PARTNER, SI_VAR(10), 0); + GetNpcYaw(-4, EVT_VAR(10)); + EVT_VAR(10) += 180; + InterpNpcYaw(NPC_PARTNER, EVT_VAR(10), 0); sleep 5; - NpcJump1(NPC_PARTNER, SI_VAR(3), SI_VAR(4), SI_VAR(5), 20); + NpcJump1(NPC_PARTNER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 20); SetNpcAnimation(NPC_PARTNER, NPC_ANIM_world_parakarry_Palette_00_Anim_1); - NpcFaceNpc(NPC_PARTNER, SI_VAR(9), 0); + NpcFaceNpc(NPC_PARTNER, EVT_VAR(9), 0); sleep 5; SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_100)), FALSE); EnablePartnerAI(); sleep 5; } } - N(func_80242784_95D984)(SI_VAR(10)); + N(func_80242784_95D984)(EVT_VAR(10)); CloseChoicePopup(); unbind; }); EvtSource N(80247D20) = SCRIPT({ - SI_VAR(0) = SI_VAR(11); - SI_VAR(1) = SI_VAR(2); - N(func_802427BC_95D9BC)(SI_VAR(0)); + EVT_VAR(0) = EVT_VAR(11); + EVT_VAR(1) = EVT_VAR(2); + N(func_802427BC_95D9BC)(EVT_VAR(0)); bind_padlock N(802479FC) 0x10 0 N(D_8024DFF0); - N(func_80242730_95D930)(SI_VAR(0)); + N(func_80242730_95D930)(EVT_VAR(0)); }); EvtSource N(80247D90) = SCRIPT({ - SI_VAR(12) = 0; - if (SI_STORY_PROGRESS < STORY_CH2_PARAKARRY_JOINED_PARTY) { + EVT_VAR(12) = 0; + if (EVT_STORY_PROGRESS < STORY_CH2_PARAKARRY_JOINED_PARTY) { return; } N(func_80243014_95E214)(); - GetCurrentPartnerID(SI_VAR(0)); - FindKeyItem(SI_VAR(5), SI_VAR(1)); - if (SI_VAR(0) == 4) { - if (SI_VAR(1) != -1) { + GetCurrentPartnerID(EVT_VAR(0)); + FindKeyItem(EVT_VAR(5), EVT_VAR(1)); + if (EVT_VAR(0) == 4) { + if (EVT_VAR(1) != -1) { DisablePartnerAI(0); - PlayerFaceNpc(SI_VAR(2), 0); + PlayerFaceNpc(EVT_VAR(2), 0); sleep 1; - GetNpcPos(SI_VAR(2), SI_VAR(13), SI_VAR(0), SI_VAR(14)); - GetNpcPos(NPC_PARTNER, SI_VAR(13), SI_VAR(14), SI_VAR(15)); + GetNpcPos(EVT_VAR(2), EVT_VAR(13), EVT_VAR(0), EVT_VAR(14)); + GetNpcPos(NPC_PARTNER, EVT_VAR(13), EVT_VAR(14), EVT_VAR(15)); SetNpcJumpscale(NPC_PARTNER, 0.0); - SI_VAR(0) += 10; - NpcJump1(NPC_PARTNER, SI_VAR(13), SI_VAR(0), SI_VAR(15), 10); - SpeakToNpc(-4, 262150, 262145, 0, SI_VAR(2), SI_VAR(7)); + EVT_VAR(0) += 10; + NpcJump1(NPC_PARTNER, EVT_VAR(13), EVT_VAR(0), EVT_VAR(15), 10); + SpeakToNpc(-4, 262150, 262145, 0, EVT_VAR(2), EVT_VAR(7)); EnablePartnerAI(); await N(80247D20); - match SI_VAR(0) { + match EVT_VAR(0) { == -1 { DisablePartnerAI(0); sleep 1; - SpeakToPlayer(NPC_PARTNER, NPC_ANIM_world_parakarry_Palette_00_Anim_6, NPC_ANIM_world_parakarry_Palette_00_Anim_1, 5, SI_VAR(8)); + SpeakToPlayer(NPC_PARTNER, NPC_ANIM_world_parakarry_Palette_00_Anim_6, NPC_ANIM_world_parakarry_Palette_00_Anim_1, 5, EVT_VAR(8)); EnablePartnerAI(); - SI_VAR(12) = 1; + EVT_VAR(12) = 1; } else { DisablePartnerAI(0); sleep 1; SpeakToPlayer(NPC_PARTNER, NPC_ANIM_world_parakarry_Palette_00_Anim_6, NPC_ANIM_world_parakarry_Palette_00_Anim_1, - 5, SI_VAR(9)); - if (SI_VAR(10) != 0) { - SpeakToPlayer(SI_VAR(2), SI_VAR(3), SI_VAR(4), 0, SI_VAR(10)); + 5, EVT_VAR(9)); + if (EVT_VAR(10) != 0) { + SpeakToPlayer(EVT_VAR(2), EVT_VAR(3), EVT_VAR(4), 0, EVT_VAR(10)); } EnablePartnerAI(); - if (SI_VAR(6) != 0) { - SI_VAR(0) = SI_VAR(6); - SI_VAR(1) = 1; + if (EVT_VAR(6) != 0) { + EVT_VAR(0) = EVT_VAR(6); + EVT_VAR(1) = 1; await N(802451BC); - AddKeyItem(SI_VAR(6)); + AddKeyItem(EVT_VAR(6)); } - SI_VAR(12) = 2; + EVT_VAR(12) = 2; } } } @@ -1373,23 +1373,23 @@ EvtSource N(80248090) = SCRIPT({ }); EvtSource N(interact_802480E0) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH2_STAR_SPRIT_DEPARTED) { + if (EVT_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)); return; } - match SI_AREA_VAR(0) { + match EVT_AREA_VAR(0) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_mouser_Palette_00_Anim_5, NPC_ANIM_mouser_Palette_00_Anim_1, 0, MESSAGE_ID(0x0D, 0x005F)); - SI_AREA_VAR(0) += 1; + EVT_AREA_VAR(0) += 1; } == 1 { SpeakToPlayer(NPC_SELF, NPC_ANIM_mouser_Palette_00_Anim_5, NPC_ANIM_mouser_Palette_00_Anim_1, 0, MESSAGE_ID(0x0D, 0x0060)); - SI_AREA_VAR(0) += 1; + EVT_AREA_VAR(0) += 1; } == 2 { SpeakToPlayer(NPC_SELF, NPC_ANIM_mouser_Palette_00_Anim_5, NPC_ANIM_mouser_Palette_00_Anim_1, 0, MESSAGE_ID(0x0D, 0x0061)); - SI_AREA_VAR(0) -= 1; + EVT_AREA_VAR(0) -= 1; } } }); @@ -1399,25 +1399,25 @@ EvtSource N(init_802481F8) = SCRIPT({ }); EvtSource N(interact_8024821C) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { - if (SI_STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { - if (SI_AREA_VAR(1) == 2) { - SI_AREA_VAR(1) = 0; + if (EVT_STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { + if (EVT_AREA_VAR(1) == 2) { + EVT_AREA_VAR(1) = 0; } } - match SI_AREA_VAR(1) { + match EVT_AREA_VAR(1) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_dryite_Palette_03_Anim_4, NPC_ANIM_dryite_Palette_03_Anim_1, 0, MESSAGE_ID(0x0D, 0x0063)); - SI_AREA_VAR(1) += 1; + EVT_AREA_VAR(1) += 1; } == 1 { SpeakToPlayer(NPC_SELF, NPC_ANIM_dryite_Palette_03_Anim_4, NPC_ANIM_dryite_Palette_03_Anim_1, 0, MESSAGE_ID(0x0D, 0x0064)); - SI_AREA_VAR(1) += 1; + EVT_AREA_VAR(1) += 1; } == 2 { SpeakToPlayer(NPC_SELF, NPC_ANIM_dryite_Palette_03_Anim_4, NPC_ANIM_dryite_Palette_03_Anim_1, 0, MESSAGE_ID(0x0D, 0x0065)); - SI_AREA_VAR(1) = 0; + EVT_AREA_VAR(1) = 0; } } } @@ -1435,22 +1435,22 @@ EvtSource N(init_802483A8) = SCRIPT({ }); EvtSource N(interact_802483CC) = SCRIPT({ - match SI_AREA_VAR(2) { + match EVT_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)); - SI_AREA_VAR(2) += 1; + EVT_AREA_VAR(2) += 1; } == 1 { SpeakToPlayer(NPC_SELF, NPC_ANIM_dryite_Palette_02_Anim_4, NPC_ANIM_dryite_Palette_02_Anim_1, 0, MESSAGE_ID(0x0D, 0x0069)); - SI_AREA_VAR(2) += 1; + EVT_AREA_VAR(2) += 1; } == 2 { SpeakToPlayer(NPC_SELF, NPC_ANIM_dryite_Palette_02_Anim_4, NPC_ANIM_dryite_Palette_02_Anim_1, 0, MESSAGE_ID(0x0D, 0x006A)); - SI_AREA_VAR(2) += 1; + EVT_AREA_VAR(2) += 1; } == 3 { SpeakToPlayer(NPC_SELF, NPC_ANIM_dryite_Palette_02_Anim_4, NPC_ANIM_dryite_Palette_02_Anim_1, 0, MESSAGE_ID(0x0D, 0x006B)); - SI_AREA_VAR(2) = 0; + EVT_AREA_VAR(2) = 0; } } }); @@ -1461,8 +1461,8 @@ EvtSource N(init_802484E0) = SCRIPT({ EvtSource N(80248504) = SCRIPT({ loop { - N(GetFloorCollider)(SI_VAR(0)); - if (SI_VAR(0) == 8) { + N(GetFloorCollider)(EVT_VAR(0)); + if (EVT_VAR(0) == 8) { break loop; } sleep 1; @@ -1476,16 +1476,16 @@ EvtSource N(80248504) = SCRIPT({ } PlayerFaceNpc(3, 0); SpeakToPlayer(NPC_DRYITE2, NPC_ANIM_dryite_Palette_00_Anim_4, NPC_ANIM_dryite_Palette_00_Anim_1, 0, MESSAGE_ID(0x0D, 0x0078)); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetNpcPos(NPC_DRYITE2, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += (float) SI_VAR(3); - SI_VAR(1) += (float) SI_VAR(4); - SI_VAR(2) += (float) SI_VAR(5); - SI_VAR(0) /= 2.0; - SI_VAR(1) /= 2.0; - SI_VAR(2) /= 2.0; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_DRYITE2, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += (float) EVT_VAR(3); + EVT_VAR(1) += (float) EVT_VAR(4); + EVT_VAR(2) += (float) EVT_VAR(5); + EVT_VAR(0) /= 2.0; + EVT_VAR(1) /= 2.0; + EVT_VAR(2) /= 2.0; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, -300.0); SetCamSpeed(0, 5.0); PanToTarget(0, 0, 1); @@ -1496,14 +1496,14 @@ EvtSource N(80248504) = SCRIPT({ sleep 30; SetPlayerAnimation(ANIM_10002); SpeakToPlayer(NPC_DRYITE2, NPC_ANIM_dryite_Palette_00_Anim_4, NPC_ANIM_dryite_Palette_00_Anim_1, 0, MESSAGE_ID(0x0D, 0x007A)); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 4.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); N(func_80243084_95E284)(); - SI_SAVE_FLAG(761) = 1; + EVT_SAVE_FLAG(761) = 1; DisablePlayerInput(FALSE); }); @@ -1512,26 +1512,26 @@ s32 N(D_8024884C_963A4C)[] = { }; EvtSource N(interact_80248864) = SCRIPT({ - if (SI_SAVE_FLAG(253) == 1) { - if (SI_SAVE_FLAG(761) == 1) { + if (EVT_SAVE_FLAG(253) == 1) { + if (EVT_SAVE_FLAG(761) == 1) { N(func_802431B4_95E3B4)(); - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { SpeakToPlayer(NPC_DRYITE2, NPC_ANIM_dryite_Palette_00_Anim_4, NPC_ANIM_dryite_Palette_00_Anim_1, 0, MESSAGE_ID(0x0D, 0x007B)); return; } } } - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { - if (SI_AREA_FLAG(1) == 0) { + if (EVT_AREA_FLAG(1) == 0) { SpeakToPlayer(NPC_DRYITE2, NPC_ANIM_dryite_Palette_00_Anim_4, NPC_ANIM_dryite_Palette_00_Anim_1, 0, MESSAGE_ID(0x0D, 0x006C)); SpeakToPlayer(NPC_DRYITE3, NPC_ANIM_dryite_Palette_00_Anim_4, NPC_ANIM_dryite_Palette_00_Anim_1, 0, MESSAGE_ID(0x0D, 0x006D)); SpeakToPlayer(NPC_DRYITE2, NPC_ANIM_dryite_Palette_00_Anim_4, NPC_ANIM_dryite_Palette_00_Anim_1, 0, MESSAGE_ID(0x0D, 0x006E)); - SI_AREA_FLAG(1) = 1; + EVT_AREA_FLAG(1) = 1; } else { SpeakToPlayer(NPC_DRYITE2, NPC_ANIM_dryite_Palette_00_Anim_4, NPC_ANIM_dryite_Palette_00_Anim_1, 0, MESSAGE_ID(0x0D, 0x006F)); @@ -1539,7 +1539,7 @@ EvtSource N(interact_80248864) = SCRIPT({ MESSAGE_ID(0x0D, 0x0070)); SpeakToPlayer(NPC_DRYITE2, NPC_ANIM_dryite_Palette_00_Anim_4, NPC_ANIM_dryite_Palette_00_Anim_1, 0, MESSAGE_ID(0x0D, 0x0071)); - SI_AREA_FLAG(1) = 0; + EVT_AREA_FLAG(1) = 0; } } < STORY_CH5_STAR_SPRIT_DEPARTED { @@ -1558,15 +1558,15 @@ EvtSource N(interact_80248864) = SCRIPT({ }); EvtSource N(init_80248AE4) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { 3, 4 { SetNpcAnimation(NPC_SELF, NPC_ANIM_dryite_Palette_00_Anim_4); return; } } BindNpcInteract(NPC_SELF, N(interact_80248864)); - if (SI_SAVE_FLAG(253) == 1) { + if (EVT_SAVE_FLAG(253) == 1) { spawn { N(func_80242858_95DA58)(N(D_8024884C_963A4C)); } @@ -1583,18 +1583,18 @@ EvtSource N(interact_80248BA0) = SCRIPT({ SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100)), TRUE); SetNpcAnimation(NPC_SELF, NPC_ANIM_dryite_Palette_00_Anim_3); SetNpcSpeed(NPC_SELF, 3.5); - NpcMoveTo(NPC_SELF, SI_VAR(0), SI_VAR(1), 0); + NpcMoveTo(NPC_SELF, EVT_VAR(0), EVT_VAR(1), 0); SetNpcAnimation(NPC_SELF, NPC_ANIM_dryite_Palette_00_Anim_1); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100)), FALSE); sleep 5; - GetNpcYaw(-1, SI_VAR(0)); - SI_VAR(0) += 180; - InterpNpcYaw(NPC_SELF, SI_VAR(0), 0); + GetNpcYaw(-1, EVT_VAR(0)); + EVT_VAR(0) += 180; + InterpNpcYaw(NPC_SELF, EVT_VAR(0), 0); }); EvtSource N(init_80248CC8) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { 3, 4 { SetNpcAnimation(NPC_SELF, NPC_ANIM_dryite_Palette_00_Anim_4); return; @@ -1608,15 +1608,15 @@ s32 N(D_80248D4C_963F4C)[] = { }; EvtSource N(interact_80248D54) = SCRIPT({ - if (SI_SAVE_FLAG(754) == 1) { - FindKeyItem(ITEM_MELODY, SI_VAR(0)); - if (SI_VAR(0) != -1) { + if (EVT_SAVE_FLAG(754) == 1) { + FindKeyItem(ITEM_MELODY, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { SpeakToPlayer(NPC_SELF, NPC_ANIM_artist_toad_Palette_01_Anim_2, NPC_ANIM_artist_toad_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x0084)); return; } else { - if (SI_SAVE_FLAG(755) == 0) { - if (SI_STORY_PROGRESS < STORY_CH7_BEGAN_PEACH_MISSION) { + if (EVT_SAVE_FLAG(755) == 0) { + if (EVT_STORY_PROGRESS < STORY_CH7_BEGAN_PEACH_MISSION) { SpeakToPlayer(NPC_SELF, NPC_ANIM_artist_toad_Palette_01_Anim_2, NPC_ANIM_artist_toad_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x0085)); SetPlayerAnimation(ANIM_NOD_YES); @@ -1624,50 +1624,50 @@ EvtSource N(interact_80248D54) = SCRIPT({ SetPlayerAnimation(ANIM_10002); SpeakToPlayer(NPC_SELF, NPC_ANIM_artist_toad_Palette_01_Anim_2, NPC_ANIM_artist_toad_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x0086)); - SI_SAVE_FLAG(755) = 1; + EVT_SAVE_FLAG(755) = 1; return; } } } } - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { - if (SI_AREA_FLAG(2) == 0) { + if (EVT_AREA_FLAG(2) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_artist_toad_Palette_01_Anim_2, NPC_ANIM_artist_toad_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x007C)); - SI_AREA_FLAG(2) = 1; + EVT_AREA_FLAG(2) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_artist_toad_Palette_01_Anim_2, NPC_ANIM_artist_toad_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x007D)); - SI_AREA_FLAG(2) = 0; + EVT_AREA_FLAG(2) = 0; } } < STORY_CH5_STAR_SPRIT_DEPARTED { - if (SI_AREA_FLAG(2) == 0) { + if (EVT_AREA_FLAG(2) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_artist_toad_Palette_01_Anim_2, NPC_ANIM_artist_toad_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x007E)); - SI_AREA_FLAG(2) = 1; + EVT_AREA_FLAG(2) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_artist_toad_Palette_01_Anim_2, NPC_ANIM_artist_toad_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x007F)); - SI_AREA_FLAG(2) = 0; + EVT_AREA_FLAG(2) = 0; } } else { - if (SI_AREA_FLAG(2) == 0) { + if (EVT_AREA_FLAG(2) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_artist_toad_Palette_01_Anim_2, NPC_ANIM_artist_toad_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x0080)); - SI_AREA_FLAG(2) = 1; + EVT_AREA_FLAG(2) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_artist_toad_Palette_01_Anim_2, NPC_ANIM_artist_toad_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x0081)); - SI_AREA_FLAG(2) = 0; + EVT_AREA_FLAG(2) = 0; } } } - SI_VAR(0) = N(D_80248D4C_963F4C); - SI_VAR(1) = 5; + EVT_VAR(0) = N(D_80248D4C_963F4C); + EVT_VAR(1) = 5; await N(8024792C); - match SI_VAR(0) { + match EVT_VAR(0) { == 0 {} == -1 {} else { @@ -1678,11 +1678,11 @@ EvtSource N(interact_80248D54) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM_artist_toad_Palette_01_Anim_1); SpeakToPlayer(NPC_SELF, NPC_ANIM_artist_toad_Palette_01_Anim_2, NPC_ANIM_artist_toad_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x0083)); - SI_VAR(0) = 104; - SI_VAR(1) = 1; + EVT_VAR(0) = 104; + EVT_VAR(1) = 1; await N(802451BC); AddKeyItem(ITEM_MELODY); - SI_SAVE_FLAG(754) = 1; + EVT_SAVE_FLAG(754) = 1; return; } } @@ -1693,7 +1693,7 @@ EvtSource N(init_80249168) = SCRIPT({ }); EvtSource N(idle_8024918C) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_SHADY_MOUSE_LEFT_SHOP { N(func_80243350_95E550)(16, 190, -134, -131); DisablePlayerInput(TRUE); @@ -1701,15 +1701,15 @@ EvtSource N(idle_8024918C) = SCRIPT({ SetNpcPos(NPC_SELF, 0, 0, -180); await N(8024C41C); sleep 10; - GetPlayerPos(SI_VAR(10), SI_VAR(11), SI_VAR(12)); - UseSettingsFrom(0, SI_VAR(10), SI_VAR(11), SI_VAR(12)); + GetPlayerPos(EVT_VAR(10), EVT_VAR(11), EVT_VAR(12)); + UseSettingsFrom(0, EVT_VAR(10), EVT_VAR(11), EVT_VAR(12)); SetPanTarget(0, 32, 0, -67); SetCamDistance(0, -210); SetCamPitch(0, 20, -12); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); sleep 20; - UseSettingsFrom(0, SI_VAR(10), SI_VAR(11), SI_VAR(12)); + UseSettingsFrom(0, EVT_VAR(10), EVT_VAR(11), EVT_VAR(12)); SetCamDistance(0, -350); SetCamSpeed(0, 0.80078125); PanToTarget(0, 0, 1); @@ -1721,7 +1721,7 @@ EvtSource N(idle_8024918C) = SCRIPT({ await N(8024C4C8); SetNpcAnimation(NPC_SELF, NPC_ANIM_mouser_Palette_01_Anim_4); NpcMoveTo(NPC_SELF, 37, -27, 20); - UseSettingsFrom(0, SI_VAR(10), SI_VAR(11), SI_VAR(12)); + UseSettingsFrom(0, EVT_VAR(10), EVT_VAR(11), EVT_VAR(12)); SetPanTarget(0, 142, 0, -67); PanToTarget(0, 0, 1); NpcMoveTo(NPC_SELF, 62, -6, 20); @@ -1732,15 +1732,15 @@ EvtSource N(idle_8024918C) = SCRIPT({ NpcMoveTo(NPC_SELF, 554, -12, 20); SetNpcPos(NPC_SELF, 0, -1000, 0); sleep 30; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 2.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); DisablePlayerInput(FALSE); - SI_STORY_PROGRESS = STORY_CH2_SHADY_MOUSE_LEFT_SHOP; + EVT_STORY_PROGRESS = STORY_CH2_SHADY_MOUSE_LEFT_SHOP; } < STORY_CH2_SPOKE_WITH_SHEEK {} < STORY_CH2_SHADY_MOUSE_ENTERED_SHOP { @@ -1758,7 +1758,7 @@ EvtSource N(idle_8024918C) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM_mouser_Palette_01_Anim_1); await N(8024C4C8); EnableNpcBlur(-1, 0); - SI_STORY_PROGRESS = STORY_CH2_SHADY_MOUSE_ENTERED_SHOP; + EVT_STORY_PROGRESS = STORY_CH2_SHADY_MOUSE_ENTERED_SHOP; } else { SetNpcAnimation(NPC_SELF, NPC_ANIM_mouser_Palette_01_Anim_1); SetNpcPos(NPC_SELF, 20, 0, -375); @@ -1767,12 +1767,12 @@ EvtSource N(idle_8024918C) = SCRIPT({ }); EvtSource N(interact_80249750) = SCRIPT({ - if (SI_AREA_VAR(4) == 4) { - if (SI_AREA_VAR(5) == 1) { + if (EVT_AREA_VAR(4) == 4) { + if (EVT_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, 0x0088)); await N(80248090); - if (SI_VAR(12) != 0) { + if (EVT_VAR(12) != 0) { return; } return; @@ -1780,7 +1780,7 @@ EvtSource N(interact_80249750) = SCRIPT({ } await 0x80284054; await N(80248090); - if (SI_VAR(12) != 0) { + if (EVT_VAR(12) != 0) { return; } }); @@ -1801,32 +1801,32 @@ EvtSource N(init_802498C4) = 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)); - FindKeyItem(ITEM_FOURTH_DEGREE_CARD, SI_VAR(4)); - FindKeyItem(ITEM_DIPLOMA, SI_VAR(5)); - if (SI_VAR(1) != -1) { + FindKeyItem(ITEM_FIRST_DEGREE_CARD, EVT_VAR(1)); + FindKeyItem(ITEM_SECOND_DEGREE_CARD, EVT_VAR(2)); + FindKeyItem(ITEM_THIRD_DEGREE_CARD, EVT_VAR(3)); + FindKeyItem(ITEM_FOURTH_DEGREE_CARD, EVT_VAR(4)); + FindKeyItem(ITEM_DIPLOMA, EVT_VAR(5)); + if (EVT_VAR(1) != -1) { SpeakToPlayer(NPC_SELF, NPC_ANIM_dryite_Palette_01_Anim_4, NPC_ANIM_dryite_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x009A)); return; } - if (SI_VAR(2) != -1) { + if (EVT_VAR(2) != -1) { SpeakToPlayer(NPC_SELF, NPC_ANIM_dryite_Palette_01_Anim_4, NPC_ANIM_dryite_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x009B)); return; } - if (SI_VAR(3) != -1) { + if (EVT_VAR(3) != -1) { SpeakToPlayer(NPC_SELF, NPC_ANIM_dryite_Palette_01_Anim_4, NPC_ANIM_dryite_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x009C)); return; } - if (SI_VAR(4) != -1) { + if (EVT_VAR(4) != -1) { SpeakToPlayer(NPC_SELF, NPC_ANIM_dryite_Palette_01_Anim_4, NPC_ANIM_dryite_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x009D)); return; } - if (SI_VAR(5) != -1) { + if (EVT_VAR(5) != -1) { SpeakToPlayer(NPC_SELF, NPC_ANIM_dryite_Palette_01_Anim_4, NPC_ANIM_dryite_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x009E)); return; @@ -2289,12 +2289,12 @@ N(shopPrice) N(shopPriceList_8024B550)[] = { s32** N(D_8024B5B0_9667B0) = NULL; EvtSource N(8024B5B4) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 0); + ShowGotItem(EVT_VAR(0), 1, 0); return; }); EvtSource N(8024B5E4) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 16); + ShowGotItem(EVT_VAR(0), 1, 16); return; }); @@ -2314,7 +2314,7 @@ EvtSource N(8024B6B4) = SCRIPT({ N(func_80243578_95E778)(); func_802D2C14(1); await N(8024B614); - if (SI_STORY_PROGRESS < STORY_CH2_BOUGHT_SECRET_ITEMS) { + if (EVT_STORY_PROGRESS < STORY_CH2_BOUGHT_SECRET_ITEMS) { SpeakToPlayer(NPC_MOUSER1, NPC_ANIM_mouser_Palette_01_Anim_5, NPC_ANIM_mouser_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x0087)); SetPlayerAnimation(ANIM_10002); sleep 10; @@ -2322,44 +2322,44 @@ EvtSource N(8024B6B4) = SCRIPT({ sleep 30; } SpeakToPlayer(NPC_MOUSER1, NPC_ANIM_mouser_Palette_01_Anim_5, NPC_ANIM_mouser_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x0088)); - SI_STORY_PROGRESS = STORY_CH2_BOUGHT_SECRET_ITEMS; + EVT_STORY_PROGRESS = STORY_CH2_BOUGHT_SECRET_ITEMS; func_802D2C14(0); await N(8024B664); }); #else 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) + EVT_CMD(EVT_OP_CALL, N(func_80243578_95E778)), + EVT_CMD(EVT_OP_CALL, func_802D2C14, 1), + EVT_CMD(EVT_OP_AWAIT_SCRIPT, N(8024B614)), + EVT_CMD(EVT_OP_IF_LT, EVT_STORY_PROGRESS, -64), + EVT_CMD(EVT_OP_CALL, SpeakToPlayer, 6, 9699589, 9699585, 0, 852103), + EVT_CMD(EVT_OP_CALL, SetPlayerAnimation, 65538), + EVT_CMD(EVT_OP_SLEEP_FRAMES, 10), + EVT_CMD(EVT_OP_CALL, SetPlayerAnimation, 524295), + EVT_CMD(EVT_OP_SLEEP_FRAMES, 30), + EVT_CMD(EVT_OP_END_IF), + EVT_CMD(EVT_OP_CALL, SpeakToPlayer, 6, 9699589, 9699585, 0, 852104), + EVT_CMD(EVT_OP_SET, EVT_STORY_PROGRESS, -64), + EVT_CMD(EVT_OP_CALL, func_802D2C14, 0), + EVT_CMD(EVT_OP_AWAIT_SCRIPT, N(8024B664)), +EVT_CMD(EVT_OP_END_IF), +EVT_CMD(EVT_OP_RETURN), +EVT_CMD(EVT_OP_END) }; #endif EvtSource N(8024B7B0) = SCRIPT({ - if (SI_SAVE_FLAG(758) == 0) { + if (EVT_SAVE_FLAG(758) == 0) { N(func_80243578_95E778)(); func_802D2C14(1); await N(8024B614); SpeakToPlayer(NPC_MOUSER1, NPC_ANIM_mouser_Palette_01_Anim_5, NPC_ANIM_mouser_Palette_01_Anim_1, 0, MESSAGE_ID(0x0D, 0x008D)); - SI_VAR(0) = 119; - SI_VAR(1) = 1; + EVT_VAR(0) = 119; + EVT_VAR(1) = 1; await N(8024B5B4); AddKeyItem(ITEM_RED_JAR); - SI_SAVE_FLAG(758) = 1; + EVT_SAVE_FLAG(758) = 1; sleep 20; func_802D2C14(0); await N(8024B664); @@ -2367,40 +2367,40 @@ EvtSource N(8024B7B0) = SCRIPT({ }); EvtSource N(8024B894) = SCRIPT({ - match SI_VAR(0) { + match EVT_VAR(0) { == 3 {} == 4 {} == 1 { - SI_VAR(2) = SI_AREA_VAR(4); - SI_VAR(3) = SI_AREA_VAR(5); - SI_VAR(4) = SI_AREA_VAR(6); - SI_AREA_VAR(5) = SI_VAR(2); - SI_AREA_VAR(6) = SI_VAR(3); - match SI_VAR(1) { + EVT_VAR(2) = EVT_AREA_VAR(4); + EVT_VAR(3) = EVT_AREA_VAR(5); + EVT_VAR(4) = EVT_AREA_VAR(6); + EVT_AREA_VAR(5) = EVT_VAR(2); + EVT_AREA_VAR(6) = EVT_VAR(3); + match EVT_VAR(1) { == 141 { - SI_AREA_VAR(4) = 1; - if (SI_VAR(2) == 2) { - if (SI_VAR(3) == 3) { - if (SI_VAR(4) == 2) { + EVT_AREA_VAR(4) = 1; + if (EVT_VAR(2) == 2) { + if (EVT_VAR(3) == 3) { + if (EVT_VAR(4) == 2) { await N(8024B7B0); - SI_AREA_VAR(4) = 0; + EVT_AREA_VAR(4) = 0; } } } } == 134 { - SI_AREA_VAR(4) = 2; - if (SI_VAR(2) == 1) { - if (SI_STORY_PROGRESS < STORY_CH2_GOT_PULSE_STONE) { + EVT_AREA_VAR(4) = 2; + if (EVT_VAR(2) == 1) { + if (EVT_STORY_PROGRESS < STORY_CH2_GOT_PULSE_STONE) { await N(8024B6B4); - SI_AREA_VAR(4) = 0; + EVT_AREA_VAR(4) = 0; } } } == 167 { - SI_AREA_VAR(4) = 3; + EVT_AREA_VAR(4) = 3; } else { - SI_AREA_VAR(4) = 0; + EVT_AREA_VAR(4) = 0; } } } @@ -2422,79 +2422,79 @@ s32 N(pad_BA9C) = { }; EvtSource N(openDoor_8024BAA0) = SCRIPT({ - RotateModel(103, SI_VAR(0), 0, 1, 0); + RotateModel(103, EVT_VAR(0), 0, 1, 0); }); EvtSource N(moveWalls_8024BAD0) = SCRIPT({ - SI_VAR(1) = SI_VAR(0); - SI_VAR(1) /= (float) 50; - TranslateModel(98, 0, SI_VAR(1), 0); - TranslateModel(97, 0, SI_VAR(1), 0); - RotateModel(98, SI_VAR(0), 1, 0, 0); - RotateModel(97, SI_VAR(0), 1, 0, 0); - RotateModel(100, SI_VAR(0), -1, 0, 0); - RotateModel(101, SI_VAR(0), -1, 0, 0); + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(1) /= (float) 50; + TranslateModel(98, 0, EVT_VAR(1), 0); + TranslateModel(97, 0, EVT_VAR(1), 0); + RotateModel(98, EVT_VAR(0), 1, 0, 0); + RotateModel(97, EVT_VAR(0), 1, 0, 0); + RotateModel(100, EVT_VAR(0), -1, 0, 0); + RotateModel(101, EVT_VAR(0), -1, 0, 0); }); 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); + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(1) /= (float) 50; + TranslateModel(103, 0, EVT_VAR(1), 0); + RotateModel(103, EVT_VAR(0), 1, 0, 0); }); EvtSource N(openDoor_8024BC24) = SCRIPT({ - RotateModel(83, SI_VAR(0), 0, 1, 0); + RotateModel(83, EVT_VAR(0), 0, 1, 0); }); EvtSource N(moveWalls_8024BC54) = SCRIPT({ - SI_VAR(1) = SI_VAR(0); - SI_VAR(1) /= (float) 50; - TranslateModel(47, 0, SI_VAR(1), 0); - TranslateModel(48, 0, SI_VAR(1), 0); - RotateModel(47, SI_VAR(0), 1, 0, 0); - RotateModel(48, SI_VAR(0), 1, 0, 0); - RotateModel(41, SI_VAR(0), -1, 0, 0); - RotateModel(42, SI_VAR(0), -1, 0, 0); - RotateModel(43, SI_VAR(0), -1, 0, 0); - RotateModel(44, SI_VAR(0), -1, 0, 0); - RotateModel(45, SI_VAR(0), -1, 0, 0); + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(1) /= (float) 50; + TranslateModel(47, 0, EVT_VAR(1), 0); + TranslateModel(48, 0, EVT_VAR(1), 0); + RotateModel(47, EVT_VAR(0), 1, 0, 0); + RotateModel(48, EVT_VAR(0), 1, 0, 0); + RotateModel(41, EVT_VAR(0), -1, 0, 0); + RotateModel(42, EVT_VAR(0), -1, 0, 0); + RotateModel(43, EVT_VAR(0), -1, 0, 0); + RotateModel(44, EVT_VAR(0), -1, 0, 0); + RotateModel(45, EVT_VAR(0), -1, 0, 0); }); EvtSource N(openDoor_8024BD9C) = SCRIPT({ - RotateModel(157, SI_VAR(0), 0, 1, 0); + RotateModel(157, EVT_VAR(0), 0, 1, 0); }); 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); + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(1) /= 45; + TranslateModel(157, 0, EVT_VAR(1), 0); + RotateModel(157, EVT_VAR(0), 1, 0, 0); }); EvtSource N(moveWalls_8024BE38) = SCRIPT({ - if (SI_VAR(0) == 90) { + if (EVT_VAR(0) == 90) { EnableModel(142, 0); } else { EnableModel(142, 1); } - SI_VAR(1) = SI_VAR(0); - SI_VAR(1) /= 45; - SI_VAR(2) = SI_VAR(0); - SI_VAR(2) -= -90; - SI_VAR(2) /= -90; - TranslateModel(140, 0, SI_VAR(1), 0); - RotateModel(140, SI_VAR(0), 1, 0, 0); - RotateModel(138, SI_VAR(0), -1, 0, 0); - RotateModel(137, SI_VAR(0), -1, 0, 0); - RotateModel(136, SI_VAR(0), -1, 0, 0); - RotateModel(135, SI_VAR(0), -1, 0, 0); - RotateModel(143, SI_VAR(0), 1, 0, 0); - RotateModel(142, SI_VAR(0), 1, 0, 0); + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(1) /= 45; + EVT_VAR(2) = EVT_VAR(0); + EVT_VAR(2) -= -90; + EVT_VAR(2) /= -90; + TranslateModel(140, 0, EVT_VAR(1), 0); + RotateModel(140, EVT_VAR(0), 1, 0, 0); + RotateModel(138, EVT_VAR(0), -1, 0, 0); + RotateModel(137, EVT_VAR(0), -1, 0, 0); + RotateModel(136, EVT_VAR(0), -1, 0, 0); + RotateModel(135, EVT_VAR(0), -1, 0, 0); + RotateModel(143, EVT_VAR(0), 1, 0, 0); + RotateModel(142, EVT_VAR(0), 1, 0, 0); }); EvtSource N(toggleVis_8024BFDC) = SCRIPT({ - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { SetGroupEnabled(127, 1); } @@ -2505,16 +2505,16 @@ EvtSource N(toggleVis_8024BFDC) = SCRIPT({ }); EvtSource N(toggleVis_8024C040) = SCRIPT({ - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_SPOKE_WITH_SHEEK { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x017B), 160, 40); - SI_VAR(0) = -1; + EVT_VAR(0) = -1; return; } < STORY_CH2_SHADY_MOUSE_ENTERED_SHOP { - SI_VAR(0) = -1; + EVT_VAR(0) = -1; return; } } @@ -2529,14 +2529,14 @@ EvtSource N(toggleVis_8024C040) = SCRIPT({ } == 3 { SetGroupEnabled(82, 0); - SI_AREA_VAR(4) = 0; - SI_AREA_VAR(5) = 0; + EVT_AREA_VAR(4) = 0; + EVT_AREA_VAR(5) = 0; } } }); EvtSource N(toggleVis_8024C190) = SCRIPT({ - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { SetGroupEnabled(156, 1); } @@ -2563,7 +2563,7 @@ 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)); - SI_VAR(0) = 3; + EVT_VAR(0) = 3; spawn N(toggleVis_8024BFDC); spawn N(toggleVis_8024C040); spawn N(toggleVis_8024C190); @@ -2574,17 +2574,17 @@ EvtSource N(8024C2EC) = SCRIPT({ MakeLerp(10, -10, 30, 10); 10: UpdateLerp(); - RotateModel(34, SI_VAR(0), 1, 0, 0); + RotateModel(34, EVT_VAR(0), 1, 0, 0); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 10; } MakeLerp(-10, 10, 30, 10); 11: UpdateLerp(); - RotateModel(34, SI_VAR(0), 1, 0, 0); + RotateModel(34, EVT_VAR(0), 1, 0, 0); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 11; } goto 9; @@ -2598,7 +2598,7 @@ EvtSource N(8024C41C) = SCRIPT({ UpdateLerp(); spawn N(openDoor_8024BC24); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 10; } }); @@ -2609,7 +2609,7 @@ EvtSource N(8024C4C8) = SCRIPT({ UpdateLerp(); spawn N(openDoor_8024BC24); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 10; } PlaySoundAtCollider(23, 450, 0); @@ -2626,33 +2626,33 @@ EvtSource N(8024C580) = SCRIPT({ DisablePartnerAI(0); HidePlayerShadow(TRUE); SetPlayerAnimation(ANIM_STAND_STILL); - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { EnableNpcShadow(NPC_PARTNER, FALSE); SetNpcPos(NPC_PARTNER, 0, -1000, 0); } - GetEntryID(SI_VAR(0)); + GetEntryID(EVT_VAR(0)); N(dup_GetEntryPos)(); - SI_VAR(2) -= 40; - SetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - InterpPlayerYaw(SI_VAR(4), 0); + EVT_VAR(2) -= 40; + SetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + InterpPlayerYaw(EVT_VAR(4), 0); PlaySound(0x163); func_802D286C(256); func_802D2520(ANIM_STAND_STILL, 5, 2, 1, 1, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); loop 40 { - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } sleep 3; - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { spawn { DisablePartnerAI(0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) -= 3; - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) -= 3; + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetNpcFlagBits(NPC_PARTNER, ((0x00000002)), FALSE); EnablePartnerAI(); EnableNpcShadow(NPC_PARTNER, TRUE); @@ -2668,7 +2668,7 @@ EvtSource N(8024C580) = SCRIPT({ 0: N(dup_GetCurrentFloor)(); sleep 1; - if (SI_VAR(0) != -1) { + if (EVT_VAR(0) != -1) { goto 0; } spawn 0xFE363C8A; @@ -2678,30 +2678,30 @@ EvtSource N(8024C8D4) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); HidePlayerShadow(TRUE); - ModifyColliderFlags(0, SI_VAR(11), 0x7FFFFE00); - GetEntryID(SI_VAR(0)); + ModifyColliderFlags(0, EVT_VAR(11), 0x7FFFFE00); + GetEntryID(EVT_VAR(0)); N(dup_GetEntryPos)(); - SI_VAR(5) = SI_VAR(1); - SI_VAR(6) = SI_VAR(2); - SI_VAR(7) = SI_VAR(3); - SI_VAR(2) += 2; - SetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - InterpPlayerYaw(SI_VAR(4), 0); - if (SI_VAR(4) == 90) { - SI_VAR(5) += 40; + EVT_VAR(5) = EVT_VAR(1); + EVT_VAR(6) = EVT_VAR(2); + EVT_VAR(7) = EVT_VAR(3); + EVT_VAR(2) += 2; + SetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + InterpPlayerYaw(EVT_VAR(4), 0); + if (EVT_VAR(4) == 90) { + EVT_VAR(5) += 40; } else { - SI_VAR(5) -= 40; + EVT_VAR(5) -= 40; } - UseSettingsFrom(0, SI_VAR(5), SI_VAR(6), SI_VAR(7)); - SetPanTarget(0, SI_VAR(5), SI_VAR(6), SI_VAR(7)); + UseSettingsFrom(0, EVT_VAR(5), EVT_VAR(6), EVT_VAR(7)); + SetPanTarget(0, EVT_VAR(5), EVT_VAR(6), EVT_VAR(7)); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { DisablePartnerAI(0); EnableNpcShadow(NPC_PARTNER, FALSE); SetNpcPos(NPC_PARTNER, 0, -1000, 0); - InterpNpcYaw(NPC_PARTNER, SI_VAR(0), 0); + InterpNpcYaw(NPC_PARTNER, EVT_VAR(0), 0); } sleep 1; PlaySound(0x163); @@ -2713,22 +2713,22 @@ EvtSource N(8024C8D4) = SCRIPT({ func_802D2520(ANIM_10002, 5, 3, 1, 1, 0); loop 40 { N(dup_SomeXYZFunc2)(1.0); - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { spawn { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) -= 3; - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) -= 3; + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); EnableNpcShadow(NPC_PARTNER, TRUE); EnablePartnerAI(); } } sleep 5; func_802D2520(ANIM_10002, 0, 0, 0, 0, 0); - ModifyColliderFlags(1, SI_VAR(11), 0x7FFFFE00); + ModifyColliderFlags(1, EVT_VAR(11), 0x7FFFFE00); DisablePlayerInput(FALSE); DisablePlayerPhysics(FALSE); PanToTarget(0, 0, 0); @@ -2737,13 +2737,13 @@ EvtSource N(8024C8D4) = SCRIPT({ EvtSource N(8024CCC4) = SCRIPT({ N(dup_UnkFunc25)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { return; } - GetCurrentPartner(SI_VAR(0)); - if (SI_VAR(0) != 0) { - GetCurrentPartnerID(SI_VAR(1)); - if (SI_VAR(1) != 6) { + GetCurrentPartner(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(1)); + if (EVT_VAR(1) != 6) { return; } else { func_802D2B6C(); @@ -2760,24 +2760,24 @@ EvtSource N(8024CDA0) = SCRIPT({ group 27; DisablePlayerPhysics(TRUE); HidePlayerShadow(TRUE); - SI_VAR(0) = SI_VAR(10); + EVT_VAR(0) = EVT_VAR(10); N(dup_GetEntryPos)(); - PlayerMoveTo(SI_VAR(1), SI_VAR(3), 3); - SI_VAR(0) = SI_VAR(10); + PlayerMoveTo(EVT_VAR(1), EVT_VAR(3), 3); + EVT_VAR(0) = EVT_VAR(10); N(dup_GetEntryPos)(); - SetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); SetPlayerFlagBits(2097152, 1); N(dup_GetCurrentCameraYawClamped180)(); - InterpPlayerYaw(SI_VAR(0), 0); + InterpPlayerYaw(EVT_VAR(0), 0); sleep 2; SetPlayerFlagBits(2097152, 0); PlaySound(0x163); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); spawn { sleep 4; loop 40 { - SI_VAR(1) -= 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) -= 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } @@ -2788,18 +2788,18 @@ EvtSource N(8024CDA0) = SCRIPT({ }); EvtSource N(8024CF7C) = SCRIPT({ - IsPlayerOnValidFloor(SI_VAR(0)); - if (SI_VAR(0) == 0) { + IsPlayerOnValidFloor(EVT_VAR(0)); + if (EVT_VAR(0) == 0) { return; } - GetPlayerActionState(SI_VAR(0)); - if (SI_VAR(0) == 26) { + GetPlayerActionState(EVT_VAR(0)); + if (EVT_VAR(0) == 26) { return; } - GetCurrentPartner(SI_VAR(0)); - if (SI_VAR(0) != 0) { - GetCurrentPartnerID(SI_VAR(1)); - if (SI_VAR(1) != 6) { + GetCurrentPartner(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(1)); + if (EVT_VAR(1) != 6) { return; } else { func_802D2B6C(); @@ -2811,23 +2811,23 @@ EvtSource N(8024CF7C) = SCRIPT({ group 27; N(dup_SetPlayerStatusAnimFlags100000)(); DisablePlayerPhysics(TRUE); - ModifyColliderFlags(0, SI_VAR(11), 0x7FFFFE00); - SI_VAR(0) = SI_VAR(10); + ModifyColliderFlags(0, EVT_VAR(11), 0x7FFFFE00); + EVT_VAR(0) = EVT_VAR(10); N(dup_GetEntryPos)(); - SI_VAR(5) = SI_VAR(1); - SI_VAR(6) = SI_VAR(2); - SI_VAR(6) += 2; - SI_VAR(7) = SI_VAR(3); - SI_VAR(8) = SI_VAR(4); - SI_VAR(8) += 180; - if (SI_VAR(4) >= 360) { - SI_VAR(4) -= 360; + EVT_VAR(5) = EVT_VAR(1); + EVT_VAR(6) = EVT_VAR(2); + EVT_VAR(6) += 2; + EVT_VAR(7) = EVT_VAR(3); + EVT_VAR(8) = EVT_VAR(4); + EVT_VAR(8) += 180; + if (EVT_VAR(4) >= 360) { + EVT_VAR(4) -= 360; } - InterpPlayerYaw(SI_VAR(8), 1); + InterpPlayerYaw(EVT_VAR(8), 1); sleep 1; PlaySound(0x163); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPlayerPos(SI_VAR(0), SI_VAR(6), SI_VAR(7)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_VAR(6), EVT_VAR(7)); SetPlayerAnimation(ANIM_STAND_STILL); func_802D286C(2048); func_802D2520(ANIM_STAND_STILL, 5, 3, 1, 1, 0); @@ -2839,7 +2839,7 @@ EvtSource N(8024CF7C) = SCRIPT({ sleep 3; loop 40 { N(dup_SomeXYZFunc2)(1.0); - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } @@ -2850,18 +2850,18 @@ EvtSource N(8024CF7C) = SCRIPT({ const char N(dro_01_name_hack)[]; EvtSource N(8024D2B0) = SCRIPT({ - SI_SAVE_FLAG(761) = 0; + EVT_SAVE_FLAG(761) = 0; GotoMap(N(dro_01_name_hack), 4); sleep 100; }); 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) { - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) != 2) { - SI_SAVE_FLAG(1939) = 1; + if (EVT_SAVE_FLAG(1939) == 0) { + if (EVT_SAVE_FLAG(1933) == 1) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) != 2) { + EVT_SAVE_FLAG(1939) = 1; } } } @@ -2999,10 +2999,10 @@ ApiStatus N(func_80241470_95C670)(Evt* script, s32 isInitialCall) { // Ok good luck. 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -3023,16 +3023,16 @@ ApiStatus N(func_802415AC_95C7AC)(Evt* script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -3063,7 +3063,7 @@ ApiStatus N(func_80241B5C_95CD5C)(Evt* script, s32 isInitialCall) { gPlayerData.quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; gPlayerData.quizzesCorrect++; } else { @@ -3077,12 +3077,12 @@ ApiStatus N(func_80241BE0_95CDE0)(Evt* script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { - N(D_8024DFE0) = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), - get_variable(script, SI_ARRAY(3))); - N(D_8024DFE4) = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), - get_variable(script, SI_ARRAY(3))); - N(D_8024DFE8) = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), - get_variable(script, SI_ARRAY(3)), 1.0f, 0); + N(D_8024DFE0) = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), + get_variable(script, EVT_ARRAY(3))); + N(D_8024DFE4) = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), + get_variable(script, EVT_ARRAY(3))); + N(D_8024DFE8) = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), + get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = N(D_8024DFE0)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_dro/dro_01/95E7A0.c b/src/world/area_dro/dro_01/95E7A0.c index ac1a0610a1..9eb4b31245 100644 --- a/src/world/area_dro/dro_01/95E7A0.c +++ b/src/world/area_dro/dro_01/95E7A0.c @@ -43,7 +43,7 @@ FoliageDropList N(tree1_Drops) = { .itemID = ITEM_COIN, .pos = { 120, 92, -18 }, .spawnMode = 0xF, - .pickupFlag = SI_SAVE_FLAG(760), + .pickupFlag = EVT_SAVE_FLAG(760), }, } }; @@ -57,7 +57,7 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_8024DD68) = { 120.0f, 0.0f, -43.0f, 0.0f }; EvtSource N(8024DD78) = SCRIPT({ - SI_VAR(0) = N(tree1); + EVT_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_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 0fda0a70ae..cf8bb71285 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -93,8 +93,8 @@ MapConfig N(config) = { // Extraneous END_CASE_MULTI #ifdef NON_MATCHING EvtSource N(80243AF0) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { 2, 3 {} else { SetMusicTrack(0, SONG_DRY_DRY_OUTPOST, 0, 8); @@ -103,17 +103,17 @@ EvtSource N(80243AF0) = SCRIPT({ }); #else 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) + EVT_CMD(EVT_OP_CALL, GetEntryID, EVT_VAR(0)), + EVT_CMD(EVT_OP_MATCH, EVT_VAR(0)), + EVT_CMD(EVT_OP_CASE_MULTI_OR_EQ, 2), + EVT_CMD(EVT_OP_CASE_MULTI_OR_EQ, 3), + EVT_CMD(EVT_OP_END_CASE_MULTI), + EVT_CMD(EVT_OP_CASE_ELSE), + EVT_CMD(EVT_OP_CALL, SetMusicTrack, 0, 21, 0, 8), + EVT_CMD(EVT_OP_END_CASE_MULTI), + EVT_CMD(EVT_OP_END_MATCH), + EVT_CMD(EVT_OP_RETURN), + EVT_CMD(EVT_OP_END) }; #endif @@ -130,9 +130,9 @@ static s32 N(pad_3BC8)[] = { }; EvtSource N(makeEntities) = SCRIPT({ - MakeItemEntity(ITEM_LETTER08, -135, 160, -245, 17, SI_SAVE_FLAG(757)); + MakeItemEntity(ITEM_LETTER08, -135, 160, -245, 17, EVT_SAVE_FLAG(757)); MakeEntity(0x802EAB04, 180, 173, -200, 0, ITEM_STOREROOM_KEY, MAKE_ENTITY_END); - AssignPanelFlag(SI_SAVE_FLAG(756)); + AssignPanelFlag(EVT_SAVE_FLAG(756)); }); static s32 N(pad_3C3C) = { @@ -168,8 +168,8 @@ EvtSource N(80243D10) = SCRIPT({ } spawn { sleep 60; - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 2) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 2) { GotoMap("sbk_02", 6); } else { GotoMap("sbk_02", 7); @@ -179,7 +179,7 @@ EvtSource N(80243D10) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_DRY_DRY_OUTPOST; + EVT_WORLD_LOCATION = LOCATION_DRY_DRY_OUTPOST; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -190,34 +190,34 @@ EvtSource N(main) = SCRIPT({ await N(makeEntities); await N(80244C78); spawn N(80243AF0); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { 2, 3 { await N(80243D10); } else { - SI_VAR(0) = N(80243C9C); + EVT_VAR(0) = N(80243C9C); spawn EnterWalk; } } sleep 1; spawn { SetTexPanner(162, 1); - SI_VAR(0) = 0; + EVT_VAR(0) = 0; 123: - SI_VAR(0) += 420; - if (SI_VAR(0) > 65536) { - SI_VAR(0) += -65536; + EVT_VAR(0) += 420; + if (EVT_VAR(0) > 65536) { + EVT_VAR(0) += -65536; } - SetTexPanOffset(1, 0, 0, SI_VAR(0)); + SetTexPanOffset(1, 0, 0, EVT_VAR(0)); sleep 1; goto 123; } - SI_MAP_FLAG(0) = 0; + EVT_MAP_FLAG(0) = 0; bind N(80243CC8) TRIGGER_WALL_PRESS_A 56; spawn { loop { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(2) < -200) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(2) < -200) { EnableGroup(163, 1); } else { EnableGroup(163, 0); @@ -237,65 +237,65 @@ EvtSource N(802441C0) = SCRIPT({ MakeLerp(10, -10, 30, 10); 10: UpdateLerp(); - RotateModel(48, SI_VAR(0), 1, 0, 0); + RotateModel(48, EVT_VAR(0), 1, 0, 0); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 10; } MakeLerp(-10, 10, 30, 10); 11: UpdateLerp(); - RotateModel(48, SI_VAR(0), 1, 0, 0); + RotateModel(48, EVT_VAR(0), 1, 0, 0); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 11; } goto 9; }); EvtSource N(802442F0) = SCRIPT({ - SI_VAR(0) /= 2; - SI_VAR(0) += 18; - RotateModel(21, SI_VAR(0), 0, 1, 0); + EVT_VAR(0) /= 2; + EVT_VAR(0) += 18; + RotateModel(21, EVT_VAR(0), 0, 1, 0); }); EvtSource N(openDoor_80244340) = SCRIPT({ - RotateModel(108, SI_VAR(0), 0, -1, 0); - RotateModel(110, SI_VAR(0), 0, 1, 0); + RotateModel(108, EVT_VAR(0), 0, -1, 0); + RotateModel(110, EVT_VAR(0), 0, 1, 0); }); EvtSource N(moveWalls_80244390) = SCRIPT({ - SI_VAR(1) = SI_VAR(0); - SI_VAR(1) /= (float) 50; - TranslateModel(104, 0, SI_VAR(1), 0); - TranslateModel(105, 0, SI_VAR(1), 0); - TranslateModel(106, 0, SI_VAR(1), 0); - RotateModel(104, SI_VAR(0), 1, 0, 0); - RotateModel(105, SI_VAR(0), 1, 0, 0); - RotateModel(106, SI_VAR(0), 1, 0, 0); + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(1) /= (float) 50; + TranslateModel(104, 0, EVT_VAR(1), 0); + TranslateModel(105, 0, EVT_VAR(1), 0); + TranslateModel(106, 0, EVT_VAR(1), 0); + RotateModel(104, EVT_VAR(0), 1, 0, 0); + RotateModel(105, EVT_VAR(0), 1, 0, 0); + RotateModel(106, EVT_VAR(0), 1, 0, 0); }); EvtSource N(dropDoor_80244474) = SCRIPT({ - SI_VAR(1) = SI_VAR(0); - SI_VAR(1) /= (float) 50; - TranslateModel(108, 0, SI_VAR(1), 0); - TranslateModel(110, 0, SI_VAR(1), 0); - RotateModel(108, SI_VAR(0), 1, 0, 0); - RotateModel(110, SI_VAR(0), 1, 0, 0); + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(1) /= (float) 50; + TranslateModel(108, 0, EVT_VAR(1), 0); + TranslateModel(110, 0, EVT_VAR(1), 0); + RotateModel(108, EVT_VAR(0), 1, 0, 0); + RotateModel(110, EVT_VAR(0), 1, 0, 0); }); EvtSource N(openDoor_8024451C) = SCRIPT({ - RotateModel(62, SI_VAR(0), 0, 1, 0); + RotateModel(62, EVT_VAR(0), 0, 1, 0); }); EvtSource N(moveWalls_8024454C) = SCRIPT({ - SI_VAR(1) = SI_VAR(0); - SI_VAR(1) /= (float) 50; - RotateGroup(61, SI_VAR(0), 0, 0, -1); + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(1) /= (float) 50; + RotateGroup(61, EVT_VAR(0), 0, 0, -1); }); EvtSource N(8024459C) = SCRIPT({ - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { SetCamSpeed(0, 3.0); } @@ -306,7 +306,7 @@ EvtSource N(8024459C) = SCRIPT({ }); EvtSource N(toggleVis_80244600) = SCRIPT({ - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { SetGroupEnabled(87, 1); SetCamSpeed(0, 3.0); @@ -319,7 +319,7 @@ EvtSource N(toggleVis_80244600) = SCRIPT({ }); EvtSource N(toggleVis_8024468C) = SCRIPT({ - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { SetGroupEnabled(132, 1); SetCamType(0, 0, 0); @@ -357,9 +357,9 @@ EvtSource N(8024486C) = SCRIPT({ MakeLerp(18, 80, 10, 0); loop { UpdateLerp(); - RotateModel(21, SI_VAR(0), 0, 1, 0); + RotateModel(21, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -367,9 +367,9 @@ EvtSource N(8024486C) = SCRIPT({ MakeLerp(80, 18, 10, 0); loop { UpdateLerp(); - RotateModel(21, SI_VAR(0), 0, 1, 0); + RotateModel(21, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -389,9 +389,9 @@ EvtSource N(80244A68) = SCRIPT({ MakeLerp(18, 80, 10, 0); loop { UpdateLerp(); - RotateModel(21, SI_VAR(0), 0, 1, 0); + RotateModel(21, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -399,9 +399,9 @@ EvtSource N(80244A68) = SCRIPT({ MakeLerp(80, 18, 10, 0); loop { UpdateLerp(); - RotateModel(21, SI_VAR(0), 0, 1, 0); + RotateModel(21, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -422,17 +422,17 @@ s32 N(npcList_80244C70)[] = { EvtSource N(80244C78) = SCRIPT({ spawn N(802441C0); ParentColliderToModel(8, 21); - if (SI_STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { + if (EVT_STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { RotateModel(21, 18, 0, 1, 0); UpdateColliderTransform(8); } MakeDoorAdvanced(4, N(openDoor_80244340), N(moveWalls_80244390), N(dropDoor_80244474), N(toggleVis_8024468C), 15, 16, 133, N(npcList_80244C64)); - if (SI_STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { + if (EVT_STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { bind N(8024486C) TRIGGER_WALL_PRESS_A 8; bind N(80244A68) TRIGGER_WALL_PRESS_A 10; } MakeDoorAdvanced(4101, N(openDoor_8024451C), N(moveWalls_8024454C), 0, N(toggleVis_80244600), 12, 13, 94, N(npcList_80244C70)); - SI_VAR(0) = 3; + EVT_VAR(0) = 3; spawn N(toggleVis_8024468C); spawn N(8024459C); spawn N(toggleVis_80244600); @@ -445,12 +445,12 @@ static s32 N(pad_4DD4)[] = { s32** N(D_80244DE0_96DFA0) = NULL; EvtSource N(80244DE4) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 0); + ShowGotItem(EVT_VAR(0), 1, 0); return; }); EvtSource N(80244E14) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 16); + ShowGotItem(EVT_VAR(0), 1, 16); return; }); @@ -480,9 +480,9 @@ N(quizReqStruct) N(quizRequirements)[] = { EvtSource N(80244ED4) = SCRIPT({ N(GetGameStatus75)(); - if (SI_VAR(0) <= 1) { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 300; + if (EVT_VAR(0) <= 1) { + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 300; SetNpcJumpscale(NPC_SELF, 1); SetNpcAnimation(NPC_SELF, 0xAF000C); sleep 40; @@ -491,92 +491,92 @@ EvtSource N(80244ED4) = SCRIPT({ }); EvtSource N(80244F84) = SCRIPT({ - N(GetCamVfov)(0, SI_ARRAY(0)); + N(GetCamVfov)(0, EVT_ARRAY(0)); N(SetCamVfov)(0, 25); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetCamType(0, SI_VAR(1), SI_VAR(2)); - SetCamType(0, SI_VAR(1), 0); - GetCamDistance(0, SI_VAR(0)); - if (SI_VAR(0) > 0) { - SI_VAR(0) = (float) 370; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetCamType(0, EVT_VAR(1), EVT_VAR(2)); + SetCamType(0, EVT_VAR(1), 0); + GetCamDistance(0, EVT_VAR(0)); + if (EVT_VAR(0) > 0) { + EVT_VAR(0) = (float) 370; } else { - SI_VAR(0) = (float) -370; + EVT_VAR(0) = (float) -370; } - SetCamDistance(0, SI_VAR(0)); - GetCamPitch(0, SI_VAR(0), SI_VAR(1)); - SI_VAR(0) = (float) 13.0; - SI_VAR(1) = (float) -10.0; - SetCamPitch(0, SI_VAR(0), SI_VAR(1)); + SetCamDistance(0, EVT_VAR(0)); + GetCamPitch(0, EVT_VAR(0), EVT_VAR(1)); + EVT_VAR(0) = (float) 13.0; + EVT_VAR(1) = (float) -10.0; + SetCamPitch(0, EVT_VAR(0), EVT_VAR(1)); PanToTarget(0, 0, 1); SetCamLeadPlayer(0, 0); }); 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)); - GetCamDistance(0, SI_VAR(0)); - if (SI_VAR(0) > 0) { - SI_VAR(0) = (float) 17; + GetNpcPos(NPC_CHUCK_QUIZMO, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 30; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetCamDistance(0, EVT_VAR(0)); + if (EVT_VAR(0) > 0) { + EVT_VAR(0) = (float) 17; } else { - SI_VAR(0) = (float) -17; + EVT_VAR(0) = (float) -17; } - SetCamDistance(0, SI_VAR(0)); + SetCamDistance(0, EVT_VAR(0)); SetCamSpeed(0, 90.0); WaitForCam(0, 1.0); SetCamSpeed(0, 1); }); EvtSource N(8024521C) = SCRIPT({ - N(SetCamVfov)(0, SI_ARRAY(0)); + N(SetCamVfov)(0, EVT_ARRAY(0)); PanToTarget(0, 0, 0); }); EvtSource N(80245258) = SCRIPT({ sleep 20; - N(UnkCameraFunc)(SI_ARRAY(1), SI_ARRAY(3), 83, SI_VAR(0), SI_VAR(1)); + N(UnkCameraFunc)(EVT_ARRAY(1), EVT_ARRAY(3), 83, EVT_VAR(0), EVT_VAR(1)); spawn { - SI_VAR(2) = (float) 0; + EVT_VAR(2) = (float) 0; loop 60 { - SI_VAR(3) = (float) SI_VAR(0); - SI_VAR(4) = (float) SI_VAR(1); - SI_VAR(3) *= (float) SI_VAR(2); - SI_VAR(4) *= (float) SI_VAR(2); - SI_VAR(3) /= (float) 60; - SI_VAR(4) /= (float) 60; - SI_VAR(3) += (float) SI_ARRAY(1); - SI_VAR(4) += (float) SI_ARRAY(3); - SetPlayerPos(SI_VAR(3), SI_ARRAY(2), SI_VAR(4)); - SI_VAR(2) += (float) 1; + EVT_VAR(3) = (float) EVT_VAR(0); + EVT_VAR(4) = (float) EVT_VAR(1); + EVT_VAR(3) *= (float) EVT_VAR(2); + EVT_VAR(4) *= (float) EVT_VAR(2); + EVT_VAR(3) /= (float) 60; + EVT_VAR(4) /= (float) 60; + EVT_VAR(3) += (float) EVT_ARRAY(1); + EVT_VAR(4) += (float) EVT_ARRAY(3); + SetPlayerPos(EVT_VAR(3), EVT_ARRAY(2), EVT_VAR(4)); + EVT_VAR(2) += (float) 1; sleep 1; } - SI_VAR(3) = (float) SI_VAR(0); - SI_VAR(4) = (float) SI_VAR(1); - SI_VAR(3) += (float) SI_ARRAY(1); - SI_VAR(4) += (float) SI_ARRAY(3); - SetPlayerPos(SI_VAR(3), SI_ARRAY(2), SI_VAR(4)); + EVT_VAR(3) = (float) EVT_VAR(0); + EVT_VAR(4) = (float) EVT_VAR(1); + EVT_VAR(3) += (float) EVT_ARRAY(1); + EVT_VAR(4) += (float) EVT_ARRAY(3); + SetPlayerPos(EVT_VAR(3), EVT_ARRAY(2), EVT_VAR(4)); } N(UnkRotatePlayer)(); - func_802D2884(SI_ARRAY(1), SI_ARRAY(3), 0); + func_802D2884(EVT_ARRAY(1), EVT_ARRAY(3), 0); SetPlayerAnimation(ANIM_10002); }); 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); - SI_VAR(5) -= (float) SI_VAR(11); + GetNpcPos(NPC_PARTNER, EVT_VAR(10), EVT_VAR(11), EVT_VAR(12)); + N(UnkCameraFunc)(EVT_VAR(10), EVT_VAR(12), 108, EVT_VAR(0), EVT_VAR(1)); + EVT_VAR(5) = (float) EVT_ARRAY(2); + EVT_VAR(5) -= (float) EVT_VAR(11); spawn { N(UnkMovePartner)(); - SI_VAR(3) = (float) SI_VAR(0); - SI_VAR(4) = (float) SI_VAR(1); - SI_VAR(6) = (float) SI_VAR(5); - SI_VAR(3) += (float) SI_VAR(10); - SI_VAR(4) += (float) SI_VAR(12); - SI_VAR(6) += (float) SI_VAR(11); - SetNpcPos(NPC_PARTNER, SI_VAR(3), SI_VAR(6), SI_VAR(4)); + EVT_VAR(3) = (float) EVT_VAR(0); + EVT_VAR(4) = (float) EVT_VAR(1); + EVT_VAR(6) = (float) EVT_VAR(5); + EVT_VAR(3) += (float) EVT_VAR(10); + EVT_VAR(4) += (float) EVT_VAR(12); + EVT_VAR(6) += (float) EVT_VAR(11); + SetNpcPos(NPC_PARTNER, EVT_VAR(3), EVT_VAR(6), EVT_VAR(4)); } N(UnkRotatePartner)(); NpcFacePlayer(NPC_PARTNER, 0); @@ -584,21 +584,21 @@ EvtSource N(80245408) = 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)); + GetNpcPos(NPC_CHUCK_QUIZMO, EVT_VAR(10), EVT_VAR(11), EVT_VAR(12)); + N(UnkCameraFunc)(EVT_VAR(10), EVT_VAR(12), -70, EVT_VAR(0), EVT_VAR(1)); spawn { - SI_VAR(2) = (float) 0; + EVT_VAR(2) = (float) 0; loop 60 { - SI_VAR(3) = (float) SI_VAR(0); - SI_VAR(4) = (float) SI_VAR(1); - SI_VAR(3) *= (float) SI_VAR(2); - SI_VAR(4) *= (float) SI_VAR(2); - SI_VAR(3) /= (float) 60; - SI_VAR(4) /= (float) 60; - SI_VAR(3) += (float) SI_VAR(10); - SI_VAR(4) += (float) SI_VAR(12); - SetNpcPos(NPC_CHUCK_QUIZMO, SI_VAR(3), SI_ARRAY(2), SI_VAR(4)); - SI_VAR(2) += (float) 1; + EVT_VAR(3) = (float) EVT_VAR(0); + EVT_VAR(4) = (float) EVT_VAR(1); + EVT_VAR(3) *= (float) EVT_VAR(2); + EVT_VAR(4) *= (float) EVT_VAR(2); + EVT_VAR(3) /= (float) 60; + EVT_VAR(4) /= (float) 60; + EVT_VAR(3) += (float) EVT_VAR(10); + EVT_VAR(4) += (float) EVT_VAR(12); + SetNpcPos(NPC_CHUCK_QUIZMO, EVT_VAR(3), EVT_ARRAY(2), EVT_VAR(4)); + EVT_VAR(2) += (float) 1; sleep 1; } } @@ -633,53 +633,53 @@ EvtSource N(8024575C) = SCRIPT({ SetPlayerAnimation(ANIM_BEFORE_JUMP); sleep 2; SetPlayerAnimation(ANIM_MIDAIR_STILL); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_MIDAIR); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_10009); sleep 2; @@ -687,53 +687,53 @@ EvtSource N(8024575C) = SCRIPT({ SetPlayerAnimation(ANIM_BEFORE_JUMP); sleep 2; SetPlayerAnimation(ANIM_MIDAIR_STILL); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_MIDAIR); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_10009); sleep 2; @@ -741,59 +741,59 @@ EvtSource N(8024575C) = SCRIPT({ SetPlayerAnimation(ANIM_BEFORE_JUMP); sleep 2; SetPlayerAnimation(ANIM_MIDAIR_STILL); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_MIDAIR); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += 0; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 0; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_VAR(1) += -3; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += -3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; SetPlayerAnimation(ANIM_10009); sleep 2; } SetPlayerAnimation(ANIM_10002); - SetPlayerPos(SI_VAR(0), SI_ARRAY(2), SI_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_ARRAY(2), EVT_VAR(2)); sleep 1; }); @@ -806,26 +806,26 @@ EvtSource N(802462A4) = 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); - SI_VAR(2) += (float) SI_VAR(0); - SI_VAR(3) = (float) SI_ARRAY(3); - SI_VAR(3) += (float) SI_VAR(1); + N(UnkCameraFunc)(EVT_ARRAY(1), EVT_ARRAY(3), 25, EVT_VAR(0), EVT_VAR(1)); + EVT_VAR(2) = (float) EVT_ARRAY(1); + EVT_VAR(2) += (float) EVT_VAR(0); + EVT_VAR(3) = (float) EVT_ARRAY(3); + EVT_VAR(3) += (float) EVT_VAR(1); SetNpcAnimation(NPC_PARTNER, 0x102); - NpcMoveTo(NPC_PARTNER, SI_VAR(2), SI_VAR(3), 40); + NpcMoveTo(NPC_PARTNER, EVT_VAR(2), EVT_VAR(3), 40); SetNpcAnimation(NPC_PARTNER, 0x106); } - PlayerMoveTo(SI_ARRAY(1), SI_ARRAY(3), 40); + PlayerMoveTo(EVT_ARRAY(1), EVT_ARRAY(3), 40); }); EvtSource N(802463C0) = SCRIPT({ - SI_VAR(1) = spawn N(8024575C); + EVT_VAR(1) = spawn N(8024575C); sleep 60; - kill SI_VAR(1); + kill EVT_VAR(1); loop 5 { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 2; } sleep 20; @@ -833,44 +833,44 @@ EvtSource N(802463C0) = SCRIPT({ }); EvtSource N(80246470) = SCRIPT({ - SI_VAR(1) = spawn N(802462A4); + EVT_VAR(1) = spawn N(802462A4); sleep 60; loop 5 { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += -1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += -1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 2; } sleep 20; - kill SI_VAR(1); + kill EVT_VAR(1); await N(802462E4); }); EvtSource N(80246520) = SCRIPT({ - if (SI_SAVE_VAR(352) > 63) { - SI_VAR(0) = 0; + if (EVT_SAVE_VAR(352) > 63) { + EVT_VAR(0) = 0; return; } - GetPlayerPos(SI_ARRAY(1), SI_ARRAY(2), SI_ARRAY(3)); + GetPlayerPos(EVT_ARRAY(1), EVT_ARRAY(2), EVT_ARRAY(3)); NpcFacePlayer(NPC_SELF, 16); - if (SI_SAVE_VAR(352) == 63) { + if (EVT_SAVE_VAR(352) == 63) { SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x000A)); } else { - if (SI_SAVE_FLAG(1767) == 1) { + if (EVT_SAVE_FLAG(1767) == 1) { SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x0009)); } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x0008)); - SI_SAVE_FLAG(1767) = 1; + EVT_SAVE_FLAG(1767) = 1; } } ShowChoice(MESSAGE_ID(0x1E, 0x000D)); - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { ContinueSpeech(-1, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x000C)); await N(80244ED4); - SI_VAR(0) = 0; + EVT_VAR(0) = 0; return; } - SI_SAVE_FLAG(1793) = 1; + EVT_SAVE_FLAG(1793) = 1; N(Set80151310_1)(); N(UnkAlphaFunc)(); spawn N(80244F84); @@ -880,49 +880,49 @@ EvtSource N(80246520) = SCRIPT({ SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_100)), TRUE); SetNpcFlagBits(NPC_CHUCK_QUIZMO, ((NPC_FLAG_100)), TRUE); SetNpcAnimation(NPC_PARTNER, 0x106); - SI_VAR(1) = spawn N(802456AC); + EVT_VAR(1) = spawn N(802456AC); ContinueSpeech(-1, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x000B)); PlaySound(0x89); loop { - SI_VAR(0) = does_script_exist SI_VAR(1); - if (SI_VAR(0) == 0) { + EVT_VAR(0) = does_script_exist EVT_VAR(1); + if (EVT_VAR(0) == 0) { break loop; } sleep 1; } N(func_80240A70_969C30)(); loop 5 { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 2; } - SI_VAR(0) = 2883584; - SI_VAR(0) += SI_SAVE_VAR(352); - SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_5, NPC_ANIM_chuck_quizmo_Palette_00_Anim_6, 0, SI_VAR(0)); + EVT_VAR(0) = 2883584; + EVT_VAR(0) += EVT_SAVE_VAR(352); + SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_5, NPC_ANIM_chuck_quizmo_Palette_00_Anim_6, 0, EVT_VAR(0)); SetPlayerAnimation(ANIM_QUESTION); - SI_VAR(0) = 2949120; - SI_VAR(0) += SI_SAVE_VAR(352); + EVT_VAR(0) = 2949120; + EVT_VAR(0) += EVT_SAVE_VAR(352); PlaySound(0x8E); - ShowChoice(SI_VAR(0)); - kill SI_VAR(1); + ShowChoice(EVT_VAR(0)); + kill EVT_VAR(1); StopSound(142); spawn N(80245720); sleep 15; PlaySound(0x8D); - N(func_80240D70_969F30)(SI_VAR(0)); - SI_ARRAY(4) = 0; + N(func_80240D70_969F30)(EVT_VAR(0)); + EVT_ARRAY(4) = 0; N(func_80241364_96A524)(); sleep 40; N(func_802409EC_969BAC)(); spawn { sleep 110; CloseChoice(); - SI_ARRAY(4) = 0; + EVT_ARRAY(4) = 0; } - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_7); - SI_ARRAY(4) = 1; + EVT_ARRAY(4) = 1; spawn { N(func_80240D3C_969EFC)(1); sleep 6; @@ -943,89 +943,89 @@ EvtSource N(80246520) = SCRIPT({ N(func_80240E08_969FC8)(); spawn { sleep 15; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 50; - N(UnkCameraFunc)(0, 0, 83, SI_VAR(0), SI_VAR(2)); - PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 50; + N(UnkCameraFunc)(0, 0, 83, EVT_VAR(0), EVT_VAR(2)); + PlayEffect(0x7, 2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x44, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); sleep 15; - SI_VAR(1) += -3; - N(UnkCameraFunc)(0, 0, 58, SI_VAR(0), SI_VAR(2)); - PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(1) += -3; + N(UnkCameraFunc)(0, 0, 58, EVT_VAR(0), EVT_VAR(2)); + PlayEffect(0x7, 2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x44, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); sleep 15; - SI_VAR(1) += 30; - N(UnkCameraFunc)(0, 0, 93, SI_VAR(0), SI_VAR(2)); - PlayEffect(0x7, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - PlayEffect(0x44, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(1) += 30; + N(UnkCameraFunc)(0, 0, 93, EVT_VAR(0), EVT_VAR(2)); + PlayEffect(0x7, 2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x44, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 60, 0, 0, 0, 0, 0, 0, 0); sleep 15; } sleep 20; - SI_VAR(1) = spawn N(802463C0); - SI_SAVE_VAR(352) += 1; - if (SI_SAVE_VAR(352) > 63) { + EVT_VAR(1) = spawn N(802463C0); + EVT_SAVE_VAR(352) += 1; + if (EVT_SAVE_VAR(352) > 63) { ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x0010)); SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_6); loop { - SI_VAR(0) = does_script_exist SI_VAR(1); - if (SI_VAR(0) == 0) { + EVT_VAR(0) = does_script_exist EVT_VAR(1); + if (EVT_VAR(0) == 0) { break loop; } sleep 1; } SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_5); - SI_VAR(0) = 348; - SI_VAR(1) = 3; + EVT_VAR(0) = 348; + EVT_VAR(1) = 3; await N(80244DE4); AddStarPieces(1); N(func_80240D3C_969EFC)(15); N(func_80240DF0_969FB0)(); - SetMessageValue(SI_SAVE_VAR(352), 0); + SetMessageValue(EVT_SAVE_VAR(352), 0); SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x0011)); } else { ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x000E)); SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_6); loop { - SI_VAR(0) = does_script_exist SI_VAR(1); - if (SI_VAR(0) == 0) { + EVT_VAR(0) = does_script_exist EVT_VAR(1); + if (EVT_VAR(0) == 0) { break loop; } sleep 1; } SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_5); - SI_VAR(0) = 348; - SI_VAR(1) = 1; + EVT_VAR(0) = 348; + EVT_VAR(1) = 1; await N(80244DE4); AddStarPieces(1); N(func_80240D3C_969EFC)(15); N(func_80240DF0_969FB0)(); - SetMessageValue(SI_SAVE_VAR(352), 0); - if (SI_SAVE_VAR(352) == 1) { + SetMessageValue(EVT_SAVE_VAR(352), 0); + if (EVT_SAVE_VAR(352) == 1) { SetMessageString(2148844180, 1); } else { SetMessageString(2148844176, 1); } SpeakToPlayer(NPC_SELF, NPC_ANIM_chuck_quizmo_Palette_00_Anim_4, NPC_ANIM_chuck_quizmo_Palette_00_Anim_1, 0, MESSAGE_ID(0x08, 0x000F)); } - SI_VAR(0) = 1; + EVT_VAR(0) = 1; } else { SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_9); - SI_ARRAY(4) = 2; + EVT_ARRAY(4) = 2; PlaySound(0x21D); PlaySound(0x8B); - SI_VAR(1) = spawn N(80246470); - GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4)); - PlayEffect(0x2B, 0, SI_VAR(2), SI_VAR(3), SI_VAR(4), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(1) = spawn N(80246470); + GetPlayerPos(EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + PlayEffect(0x2B, 0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4), 0, 0, 0, 0, 0, 0, 0, 0, 0); ContinueSpeech(-1, -1, -1, 0, MESSAGE_ID(0x08, 0x000D)); SetNpcAnimation(NPC_CHUCK_QUIZMO, NPC_ANIM_chuck_quizmo_Palette_00_Anim_A); loop { - SI_VAR(0) = does_script_exist SI_VAR(1); - if (SI_VAR(0) == 0) { + EVT_VAR(0) = does_script_exist EVT_VAR(1); + if (EVT_VAR(0) == 0) { break loop; } sleep 1; } - SI_VAR(0) = 0; + EVT_VAR(0) = 0; } N(func_80240D70_969F30)(-1); EnablePartnerAI(); @@ -1043,12 +1043,12 @@ EvtSource N(80246520) = SCRIPT({ spawn N(8024521C); N(UnkFunc29)(); N(Set80151310_0)(); - SI_SAVE_FLAG(1793) = 0; + EVT_SAVE_FLAG(1793) = 0; }); EvtSource N(80247250) = SCRIPT({ N(func_8024043C_9695FC)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { return; } SetNpcFlagBits(NPC_SELF, ((0x01000000)), FALSE); @@ -1058,7 +1058,7 @@ EvtSource N(80247250) = SCRIPT({ EvtSource N(802472C4) = SCRIPT({ arr_use gPauseMenuTargetPosX; - SI_SAVE_FLAG(1769) = 1; + EVT_SAVE_FLAG(1769) = 1; DisablePlayerPhysics(TRUE); SetPlayerFlagBits(4194304, 1); await N(80246520); @@ -1294,30 +1294,30 @@ EvtSource N(npcAI_80247A90) = 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)); - SI_ARRAY(4) += 60; - SI_ARRAY(6) += 0; + EVT_ARRAY(9) = 0; + GetNpcPos(NPC_WORLD_MERLEE, EVT_ARRAY(4), EVT_ARRAY(5), EVT_ARRAY(6)); + EVT_ARRAY(4) += 60; + EVT_ARRAY(6) += 0; PlaySoundAtNpc(NPC_WORLD_MERLEE, 513, 0); spawn { MakeLerp(720, 0, 60, 0); loop { UpdateLerp(); - SetNpcRotation(NPC_WORLD_MERLEE, 0, SI_VAR(0), 0); - if (SI_VAR(0) > 360) { - SI_VAR(0) += -360; + SetNpcRotation(NPC_WORLD_MERLEE, 0, EVT_VAR(0), 0); + if (EVT_VAR(0) > 360) { + EVT_VAR(0) += -360; } - match SI_VAR(0) { + match EVT_VAR(0) { 90 ... 270 { - SI_VAR(2) = 12189697; + EVT_VAR(2) = 12189697; } else { - SI_VAR(2) = 12189698; + EVT_VAR(2) = 12189698; } } - SetNpcAnimation(NPC_WORLD_MERLEE, SI_VAR(2)); + SetNpcAnimation(NPC_WORLD_MERLEE, EVT_VAR(2)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -1332,13 +1332,13 @@ EvtSource N(80247AA0) = SCRIPT({ } sleep 60; PlaySoundAtNpc(NPC_WORLD_MERLEE, 514, 0); - SI_VAR(0) = SI_ARRAY(5); - SI_VAR(0) += 25; - PlayEffect(0x4F, 0, SI_ARRAY(4), SI_VAR(0), SI_ARRAY(6), 1, -1, 0, 0, 0, 0, 0, 0, 0); - SI_ARRAY(8) = SI_VAR(15); + EVT_VAR(0) = EVT_ARRAY(5); + EVT_VAR(0) += 25; + PlayEffect(0x4F, 0, EVT_ARRAY(4), EVT_VAR(0), EVT_ARRAY(6), 1, -1, 0, 0, 0, 0, 0, 0, 0); + EVT_ARRAY(8) = EVT_VAR(15); spawn { sleep 30; - func_802D7B10(SI_ARRAY(8)); + func_802D7B10(EVT_ARRAY(8)); } N(func_802414C0_96A680)(); DisablePlayerPhysics(TRUE); @@ -1346,7 +1346,7 @@ EvtSource N(80247AA0) = SCRIPT({ N(func_802416FC_96A8BC)(); spawn { loop { - if (SI_ARRAY(9) == 2) { + if (EVT_ARRAY(9) == 2) { break loop; } sleep 1; @@ -1385,7 +1385,7 @@ EvtSource N(80247AA0) = SCRIPT({ } spawn { loop { - if (SI_ARRAY(9) >= 3) { + if (EVT_ARRAY(9) >= 3) { break loop; } sleep 1; @@ -1395,7 +1395,7 @@ EvtSource N(80247AA0) = SCRIPT({ sleep 2; N(func_80243068_96C228)(); loop { - if (SI_ARRAY(9) >= 10) { + if (EVT_ARRAY(9) >= 10) { break loop; } sleep 1; @@ -1403,7 +1403,7 @@ EvtSource N(80247AA0) = SCRIPT({ sleep 3; PlaySound(516); loop { - if (SI_ARRAY(9) >= 11) { + if (EVT_ARRAY(9) >= 11) { break loop; } sleep 1; @@ -1412,15 +1412,15 @@ EvtSource N(80247AA0) = SCRIPT({ PlaySound(517); } loop { - if (SI_ARRAY(9) == 13) { + if (EVT_ARRAY(9) == 13) { break loop; } sleep 1; } - SetPlayerPos(SI_ARRAY(4), SI_ARRAY(5), SI_ARRAY(6)); + SetPlayerPos(EVT_ARRAY(4), EVT_ARRAY(5), EVT_ARRAY(6)); SetPlayerAnimation(ANIM_GOT_ITEM); sleep 1; - SetPlayerPos(SI_ARRAY(4), SI_ARRAY(5), SI_ARRAY(6)); + SetPlayerPos(EVT_ARRAY(4), EVT_ARRAY(5), EVT_ARRAY(6)); sleep 1; DisablePlayerPhysics(FALSE); N(func_80241874_96AA34)(); @@ -1430,10 +1430,10 @@ EvtSource N(80247AA0) = 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)); + GetNpcPos(NPC_WORLD_MERLEE, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 200); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 8.0); SetCamPitch(0, 20, -15); PanToTarget(0, 0, 1); @@ -1449,23 +1449,23 @@ EvtSource N(802482A8) = SCRIPT({ EvtSource N(802482F8) = SCRIPT({ func_802D2C14(1); await N(802481D8); - SI_VAR(0) = 0; - if (SI_SAVE_VAR(348) == 8) { - SI_VAR(0) += 1; + EVT_VAR(0) = 0; + if (EVT_SAVE_VAR(348) == 8) { + EVT_VAR(0) += 1; } - if (SI_SAVE_FLAG(536) == 1) { - SI_VAR(0) += 1; + if (EVT_SAVE_FLAG(536) == 1) { + EVT_VAR(0) += 1; } - if (SI_SAVE_FLAG(759) == 0) { - SI_VAR(0) += 1; + if (EVT_SAVE_FLAG(759) == 0) { + EVT_VAR(0) += 1; } - if (SI_VAR(0) == 3) { + if (EVT_VAR(0) == 3) { SpeakToPlayer(NPC_SELF, NPC_ANIM_world_merlee_Palette_00_Anim_7, NPC_ANIM_world_merlee_Palette_00_Anim_4, 0, MESSAGE_ID(0x0D, 0x00DC)); - SI_VAR(0) = 39; - SI_VAR(1) = 1; + EVT_VAR(0) = 39; + EVT_VAR(1) = 1; await N(80244DE4); AddKeyItem(ITEM_CRYSTAL_BALL); - SI_SAVE_FLAG(759) = 1; + EVT_SAVE_FLAG(759) = 1; sleep 20; func_802D2C14(0); await N(802482A8); @@ -1473,7 +1473,7 @@ EvtSource N(802482F8) = SCRIPT({ } SpeakToPlayer(NPC_SELF, NPC_ANIM_world_merlee_Palette_00_Anim_7, NPC_ANIM_world_merlee_Palette_00_Anim_4, 0, MESSAGE_ID(0x0D, 0x00D6)); ShowChoice(MESSAGE_ID(0x1E, 0x0011)); - if (SI_VAR(0) != 0) { + if (EVT_VAR(0) != 0) { ContinueSpeech(-1, NPC_ANIM_world_merlee_Palette_00_Anim_7, NPC_ANIM_world_merlee_Palette_00_Anim_4, 0, MESSAGE_ID(0x0D, 0x00D7)); func_802D2C14(0); await N(802482A8); @@ -1483,14 +1483,14 @@ EvtSource N(802482F8) = SCRIPT({ ShowCoinCounter(1); ShowChoice(MESSAGE_ID(0x1E, 0x0018)); ShowCoinCounter(0); - if (SI_VAR(0) == 3) { + if (EVT_VAR(0) == 3) { ContinueSpeech(-1, NPC_ANIM_world_merlee_Palette_00_Anim_7, NPC_ANIM_world_merlee_Palette_00_Anim_4, 0, MESSAGE_ID(0x0D, 0x00D7)); func_802D2C14(0); await N(802482A8); return; } - N(func_80241394_96A554)(SI_VAR(0), SI_VAR(1)); - if (SI_VAR(1) != 0) { + N(func_80241394_96A554)(EVT_VAR(0), EVT_VAR(1)); + if (EVT_VAR(1) != 0) { ContinueSpeech(-1, NPC_ANIM_world_merlee_Palette_00_Anim_7, NPC_ANIM_world_merlee_Palette_00_Anim_4, 0, MESSAGE_ID(0x0D, 0x00D9)); func_802D2C14(0); await N(802482A8); @@ -1500,10 +1500,10 @@ EvtSource N(802482F8) = SCRIPT({ SetMusicTrack(0, SONG_MERLEE_SPELL, 0, 8); DisablePartnerAI(0); SetNpcAnimation(NPC_PARTNER, 0x106); - SI_VAR(9) = spawn N(80247AA0); + EVT_VAR(9) = spawn N(80247AA0); loop { - SI_VAR(1) = does_script_exist SI_VAR(9); - if (SI_VAR(1) == 0) { + EVT_VAR(1) = does_script_exist EVT_VAR(9); + if (EVT_VAR(1) == 0) { break loop; } sleep 1; @@ -1536,62 +1536,62 @@ s32 N(D_80248784_971944) = { }; EvtSource N(80248788) = SCRIPT({ - SI_VAR(9) = SI_VAR(1); + EVT_VAR(9) = EVT_VAR(1); ShowKeyChoicePopup(); - SI_VAR(10) = SI_VAR(0); - match SI_VAR(0) { + EVT_VAR(10) = EVT_VAR(0); + match EVT_VAR(0) { == 0 {} == -1 {} else { - RemoveKeyItemAt(SI_VAR(1)); - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - N(AddPlayerHandsOffset)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) |= (const) 0x50000; - MakeItemEntity(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5), 1, 0); + RemoveKeyItemAt(EVT_VAR(1)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(AddPlayerHandsOffset)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) |= (const) 0x50000; + MakeItemEntity(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1, 0); SetPlayerAnimation(0x60005); sleep 30; SetPlayerAnimation(ANIM_10002); - RemoveItemEntity(SI_VAR(0)); + RemoveItemEntity(EVT_VAR(0)); } } - N(func_80243314_96C4D4)(SI_VAR(10)); + N(func_80243314_96C4D4)(EVT_VAR(10)); CloseChoicePopup(); unbind; }); EvtSource N(802488CC) = SCRIPT({ - N(func_8024334C_96C50C)(SI_VAR(0)); + N(func_8024334C_96C50C)(EVT_VAR(0)); bind_padlock N(80248788) 0x10 0 N(D_8024F080); - N(func_802432C0_96C480)(SI_VAR(0)); + N(func_802432C0_96C480)(EVT_VAR(0)); }); EvtSource N(8024891C) = SCRIPT({ - SI_VAR(9) = SI_VAR(1); + EVT_VAR(9) = EVT_VAR(1); ShowConsumableChoicePopup(); - SI_VAR(10) = SI_VAR(0); - match SI_VAR(0) { + EVT_VAR(10) = EVT_VAR(0); + match EVT_VAR(0) { == 0 {} == -1 {} else { - RemoveItemAt(SI_VAR(1)); - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - N(AddPlayerHandsOffset)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - MakeItemEntity(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5), 1, 0); + RemoveItemAt(EVT_VAR(1)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(AddPlayerHandsOffset)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + MakeItemEntity(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1, 0); SetPlayerAnimation(0x60005); sleep 30; SetPlayerAnimation(ANIM_10002); - RemoveItemEntity(SI_VAR(0)); + RemoveItemEntity(EVT_VAR(0)); } } - N(func_80243314_96C4D4)(SI_VAR(10)); + N(func_80243314_96C4D4)(EVT_VAR(10)); CloseChoicePopup(); unbind; }); EvtSource N(80248A50) = SCRIPT({ - N(func_802433E8_96C5A8)(SI_VAR(0)); + N(func_802433E8_96C5A8)(EVT_VAR(0)); bind_padlock N(8024891C) 0x10 0 N(D_8024F248); - N(func_802432C0_96C480)(SI_VAR(0)); + N(func_802432C0_96C480)(EVT_VAR(0)); }); Gfx N(D_8024A3B8_973578)[]; @@ -1976,88 +1976,88 @@ s32 N(image2)[] = { }; 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); + EnableModel(EVT_VAR(4), 0); + EnableModel(EVT_VAR(5), 1); + RotateModel(EVT_VAR(6), 0, 0, 0, 1); + RotateModel(EVT_VAR(7), 0, 0, 0, 1); }); EvtSource N(8024AC8C) = SCRIPT({ - SI_VAR(9) = SI_VAR(7); - SI_VAR(8) = SI_VAR(6); - SI_VAR(7) = SI_VAR(5); - SI_VAR(6) = SI_VAR(4); + EVT_VAR(9) = EVT_VAR(7); + EVT_VAR(8) = EVT_VAR(6); + EVT_VAR(7) = EVT_VAR(5); + EVT_VAR(6) = EVT_VAR(4); sleep 70; - EnableModel(SI_VAR(6), 0); + EnableModel(EVT_VAR(6), 0); spawn { sleep 5; - EnableModel(SI_VAR(6), 1); + EnableModel(EVT_VAR(6), 1); } MakeLerp(0, 180, 20, 2); 1: UpdateLerp(); - RotateModel(SI_VAR(8), SI_VAR(0), 0, 0, -1); - RotateModel(SI_VAR(9), SI_VAR(0), 0, 0, -1); - if (SI_VAR(1) == 1) { + RotateModel(EVT_VAR(8), EVT_VAR(0), 0, 0, -1); + RotateModel(EVT_VAR(9), EVT_VAR(0), 0, 0, -1); + if (EVT_VAR(1) == 1) { sleep 1; goto 1; } - EnableModel(SI_VAR(7), 0); + EnableModel(EVT_VAR(7), 0); }); EvtSource N(interact_8024ADE4) = SCRIPT({ N(UnkFunc35)(0, 0, 0); await N(8024D434); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { return; } - SI_VAR(9) = SI_VAR(1); - SI_VAR(10) = SI_VAR(2); - SI_VAR(11) = SI_VAR(3); + EVT_VAR(9) = EVT_VAR(1); + EVT_VAR(10) = EVT_VAR(2); + EVT_VAR(11) = EVT_VAR(3); N(DoesPlayerNeedSleep)(); - if (SI_VAR(1) == 0) { - SI_VAR(8) = SI_VAR(0); + if (EVT_VAR(1) == 0) { + EVT_VAR(8) = EVT_VAR(0); } - SpeakToPlayer(NPC_SELF, 0x830004, 0x830001, 0, SI_VAR(8)); + SpeakToPlayer(NPC_SELF, 0x830004, 0x830001, 0, EVT_VAR(8)); ShowChoice(MESSAGE_ID(0x1E, 0x0006)); sleep 3; - if (SI_VAR(0) == 1) { - ContinueSpeech(-1, 0x830004, 0x830001, 0, SI_VAR(9)); + if (EVT_VAR(0) == 1) { + ContinueSpeech(-1, 0x830004, 0x830001, 0, EVT_VAR(9)); return; } - ContinueSpeech(-1, 0x830004, 0x830001, 0, SI_VAR(10)); + ContinueSpeech(-1, 0x830004, 0x830001, 0, EVT_VAR(10)); SetPlayerJumpscale(1); DisablePlayerPhysics(TRUE); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100)), TRUE); N(Call800E9894)(); - if (SI_VAR(4) != 0) { + if (EVT_VAR(4) != 0) { spawn N(8024AC8C); } - N(GetPartnerCall800EB168)(SI_VAR(10)); + N(GetPartnerCall800EB168)(EVT_VAR(10)); sleep 20; await N(8024D494); spawn { MakeLerp(0, 255, 60, 0); 0: UpdateLerp(); - N(UnkFunc32)(3, SI_VAR(0)); + N(UnkFunc32)(3, EVT_VAR(0)); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 0; } FullyRestoreHPandFP(); FullyRestoreSP(); - if (SI_VAR(4) != 0) { + if (EVT_VAR(4) != 0) { spawn N(8024AC14); } - N(Call800EB168)(SI_VAR(10)); + N(Call800EB168)(EVT_VAR(10)); sleep 45; MakeLerp(255, 0, 30, 0); 1: UpdateLerp(); - N(UnkFunc32)(0, SI_VAR(0)); + N(UnkFunc32)(0, EVT_VAR(0)); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 1; } } @@ -2065,119 +2065,119 @@ EvtSource N(interact_8024ADE4) = SCRIPT({ await N(8024D700); DisablePlayerPhysics(FALSE); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100)), FALSE); - SpeakToPlayer(NPC_SELF, 0x830004, 0x830001, 0, SI_VAR(11)); + SpeakToPlayer(NPC_SELF, 0x830004, 0x830001, 0, EVT_VAR(11)); N(Call800E98C4SyncStatusMenu)(); }); 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)); - SetItemPos(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5)); + GetNpcPos(NPC_PARTNER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(UnkYawFunc)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + SetItemPos(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); sleep 1; } }); EvtSource N(8024B20C) = SCRIPT({ - SI_VAR(9) = SI_VAR(1); + EVT_VAR(9) = EVT_VAR(1); ShowKeyChoicePopup(); - SI_VAR(10) = SI_VAR(0); - match SI_VAR(0) { + EVT_VAR(10) = EVT_VAR(0); + match EVT_VAR(0) { == 0 {} == -1 {} else { - RemoveKeyItemAt(SI_VAR(1)); + RemoveKeyItemAt(EVT_VAR(1)); DisablePartnerAI(0); - GetNpcPos(NPC_PARTNER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - N(UnkYawFunc)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) |= (const) 0x50000; - MakeItemEntity(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5), 1, 0); - SI_VAR(10) = spawn N(8024B18C); + GetNpcPos(NPC_PARTNER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(UnkYawFunc)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) |= (const) 0x50000; + MakeItemEntity(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1, 0); + EVT_VAR(10) = spawn N(8024B18C); SetNpcAnimation(NPC_PARTNER, 0x40002); - GetAngleBetweenNPCs(SI_VAR(9), -4, SI_VAR(11)); - GetNpcPos(NPC_PARTNER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - GetNpcPos(SI_VAR(9), SI_VAR(6), SI_VAR(7), SI_VAR(8)); + GetAngleBetweenNPCs(EVT_VAR(9), -4, EVT_VAR(11)); + GetNpcPos(NPC_PARTNER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + GetNpcPos(EVT_VAR(9), EVT_VAR(6), EVT_VAR(7), EVT_VAR(8)); SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_100)), TRUE); - if (SI_VAR(11) <= 180) { - SI_VAR(6) += 20; + if (EVT_VAR(11) <= 180) { + EVT_VAR(6) += 20; } else { - SI_VAR(6) += -20; + EVT_VAR(6) += -20; } - SI_VAR(7) += 10; + EVT_VAR(7) += 10; SetNpcJumpscale(NPC_PARTNER, 0.0); - NpcJump1(NPC_PARTNER, SI_VAR(6), SI_VAR(7), SI_VAR(8), 20); - kill SI_VAR(10); - RemoveItemEntity(SI_VAR(0)); + NpcJump1(NPC_PARTNER, EVT_VAR(6), EVT_VAR(7), EVT_VAR(8), 20); + kill EVT_VAR(10); + RemoveItemEntity(EVT_VAR(0)); sleep 20; - GetNpcYaw(-4, SI_VAR(10)); - SI_VAR(10) += 180; - InterpNpcYaw(NPC_PARTNER, SI_VAR(10), 0); + GetNpcYaw(-4, EVT_VAR(10)); + EVT_VAR(10) += 180; + InterpNpcYaw(NPC_PARTNER, EVT_VAR(10), 0); sleep 5; - NpcJump1(NPC_PARTNER, SI_VAR(3), SI_VAR(4), SI_VAR(5), 20); + NpcJump1(NPC_PARTNER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 20); SetNpcAnimation(NPC_PARTNER, 0x40001); - NpcFaceNpc(NPC_PARTNER, SI_VAR(9), 0); + NpcFaceNpc(NPC_PARTNER, EVT_VAR(9), 0); sleep 5; SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_100)), FALSE); EnablePartnerAI(); sleep 5; } } - N(func_80243314_96C4D4)(SI_VAR(10)); + N(func_80243314_96C4D4)(EVT_VAR(10)); CloseChoicePopup(); unbind; }); EvtSource N(8024B530) = SCRIPT({ - SI_VAR(0) = SI_VAR(11); - SI_VAR(1) = SI_VAR(2); - N(func_8024334C_96C50C)(SI_VAR(0)); + EVT_VAR(0) = EVT_VAR(11); + EVT_VAR(1) = EVT_VAR(2); + N(func_8024334C_96C50C)(EVT_VAR(0)); bind_padlock N(8024B20C) 0x10 0 N(D_8024F080); - N(func_802432C0_96C480)(SI_VAR(0)); + N(func_802432C0_96C480)(EVT_VAR(0)); }); EvtSource N(8024B5A0) = SCRIPT({ - SI_VAR(12) = 0; - if (SI_STORY_PROGRESS < STORY_CH2_PARAKARRY_JOINED_PARTY) { + EVT_VAR(12) = 0; + if (EVT_STORY_PROGRESS < STORY_CH2_PARAKARRY_JOINED_PARTY) { return; } N(func_802439FC_96CBBC)(); - GetCurrentPartnerID(SI_VAR(0)); - FindKeyItem(SI_VAR(5), SI_VAR(1)); - if (SI_VAR(0) == 4) { - if (SI_VAR(1) != -1) { + GetCurrentPartnerID(EVT_VAR(0)); + FindKeyItem(EVT_VAR(5), EVT_VAR(1)); + if (EVT_VAR(0) == 4) { + if (EVT_VAR(1) != -1) { DisablePartnerAI(0); - PlayerFaceNpc(SI_VAR(2), 0); + PlayerFaceNpc(EVT_VAR(2), 0); sleep 1; - GetNpcPos(SI_VAR(2), SI_VAR(13), SI_VAR(0), SI_VAR(14)); - GetNpcPos(NPC_PARTNER, SI_VAR(13), SI_VAR(14), SI_VAR(15)); + GetNpcPos(EVT_VAR(2), EVT_VAR(13), EVT_VAR(0), EVT_VAR(14)); + GetNpcPos(NPC_PARTNER, EVT_VAR(13), EVT_VAR(14), EVT_VAR(15)); SetNpcJumpscale(NPC_PARTNER, 0.0); - SI_VAR(0) += 10; - NpcJump1(NPC_PARTNER, SI_VAR(13), SI_VAR(0), SI_VAR(15), 10); - SpeakToNpc(-4, 262150, 262145, 0, SI_VAR(2), SI_VAR(7)); + EVT_VAR(0) += 10; + NpcJump1(NPC_PARTNER, EVT_VAR(13), EVT_VAR(0), EVT_VAR(15), 10); + SpeakToNpc(-4, 262150, 262145, 0, EVT_VAR(2), EVT_VAR(7)); EnablePartnerAI(); await N(8024B530); - match SI_VAR(0) { + match EVT_VAR(0) { == -1 { DisablePartnerAI(0); sleep 1; - SpeakToPlayer(NPC_PARTNER, 0x40006, 0x40001, 5, SI_VAR(8)); + SpeakToPlayer(NPC_PARTNER, 0x40006, 0x40001, 5, EVT_VAR(8)); EnablePartnerAI(); - SI_VAR(12) = 1; + EVT_VAR(12) = 1; } else { DisablePartnerAI(0); sleep 1; - SpeakToPlayer(NPC_PARTNER, 0x40006, 0x40001, 5, SI_VAR(9)); - if (SI_VAR(10) != 0) { - SpeakToPlayer(SI_VAR(2), SI_VAR(3), SI_VAR(4), 0, SI_VAR(10)); + SpeakToPlayer(NPC_PARTNER, 0x40006, 0x40001, 5, EVT_VAR(9)); + if (EVT_VAR(10) != 0) { + SpeakToPlayer(EVT_VAR(2), EVT_VAR(3), EVT_VAR(4), 0, EVT_VAR(10)); } EnablePartnerAI(); - if (SI_VAR(6) != 0) { - SI_VAR(0) = SI_VAR(6); - SI_VAR(1) = 1; + if (EVT_VAR(6) != 0) { + EVT_VAR(0) = EVT_VAR(6); + EVT_VAR(1) = 1; await N(80244DE4); - AddKeyItem(SI_VAR(6)); + AddKeyItem(EVT_VAR(6)); } - SI_VAR(12) = 2; + EVT_VAR(12) = 2; } } } @@ -2195,23 +2195,23 @@ EvtSource N(8024B8A0) = SCRIPT({ }); EvtSource N(interact_8024B8F0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { - if (SI_SAVE_FLAG(787) == 1) { + if (EVT_SAVE_FLAG(787) == 1) { SpeakToPlayer(NPC_SELF, 0xB80004, 0xB80001, 0, MESSAGE_ID(0x0D, 0x00B2)); } else { - match SI_AREA_VAR(3) { + match EVT_AREA_VAR(3) { == 0 { SpeakToPlayer(NPC_SELF, 0xB80004, 0xB80001, 0, MESSAGE_ID(0x0D, 0x00AF)); - SI_AREA_VAR(3) = 1; + EVT_AREA_VAR(3) = 1; } == 1 { SpeakToPlayer(NPC_SELF, 0xB80004, 0xB80001, 0, MESSAGE_ID(0x0D, 0x00B0)); - SI_AREA_VAR(3) = 2; + EVT_AREA_VAR(3) = 2; } == 2 { SpeakToPlayer(NPC_SELF, 0xB80004, 0xB80001, 0, MESSAGE_ID(0x0D, 0x00B1)); - SI_AREA_VAR(3) = 1; + EVT_AREA_VAR(3) = 1; } } } @@ -2223,15 +2223,15 @@ EvtSource N(interact_8024B8F0) = SCRIPT({ EvtSource N(init_8024BA50) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024B8F0)); - if (SI_STORY_PROGRESS >= STORY_UNUSED_FFFFFFCC) { + if (EVT_STORY_PROGRESS >= STORY_UNUSED_FFFFFFCC) { RemoveNpc(NPC_SELF); } }); EvtSource N(interact_8024BA9C) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { - if (SI_SAVE_FLAG(747) == 0) { + if (EVT_SAVE_FLAG(747) == 0) { SpeakToPlayer(NPC_SELF, 0x930204, 0x930201, 0, MESSAGE_ID(0x0D, 0x0091)); } else { SpeakToPlayer(NPC_SELF, 0x930204, 0x930201, 0, MESSAGE_ID(0x0D, 0x0092)); @@ -2244,7 +2244,7 @@ EvtSource N(interact_8024BA9C) = SCRIPT({ } } await N(8024B8A0); - if (SI_VAR(12) != 0) { + if (EVT_VAR(12) != 0) { return; } }); @@ -2254,14 +2254,14 @@ EvtSource N(init_8024BBAC) = SCRIPT({ }); EvtSource N(interact_8024BBD0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { - if (SI_AREA_FLAG(3) == 0) { + if (EVT_AREA_FLAG(3) == 0) { SpeakToPlayer(NPC_SELF, 0x930004, 0x930001, 0, MESSAGE_ID(0x0D, 0x00A1)); - SI_AREA_FLAG(3) = 1; + EVT_AREA_FLAG(3) = 1; } else { SpeakToPlayer(NPC_SELF, 0x930004, 0x930001, 0, MESSAGE_ID(0x0D, 0x00A2)); - SI_AREA_FLAG(3) = 0; + EVT_AREA_FLAG(3) = 0; } } < STORY_CH5_STAR_SPRIT_DEPARTED { @@ -2285,31 +2285,31 @@ EvtSource N(init_8024BD28) = SCRIPT({ }); EvtSource N(interact_8024BD4C) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { - if (SI_AREA_FLAG(4) == 0) { + if (EVT_AREA_FLAG(4) == 0) { SpeakToPlayer(NPC_SELF, 0x940005, 0x940001, 0, MESSAGE_ID(0x0D, 0x00A5)); - SI_AREA_FLAG(4) = 1; + EVT_AREA_FLAG(4) = 1; } else { SpeakToPlayer(NPC_SELF, 0x940005, 0x940001, 0, MESSAGE_ID(0x0D, 0x00A6)); - SI_AREA_FLAG(4) = 0; + EVT_AREA_FLAG(4) = 0; } } < STORY_CH5_STAR_SPRIT_DEPARTED { - if (SI_AREA_FLAG(4) == 0) { + if (EVT_AREA_FLAG(4) == 0) { SpeakToPlayer(NPC_SELF, 0x940005, 0x940001, 0, MESSAGE_ID(0x0D, 0x00A7)); - SI_AREA_FLAG(4) = 1; + EVT_AREA_FLAG(4) = 1; } else { SpeakToPlayer(NPC_SELF, 0x940005, 0x940001, 0, MESSAGE_ID(0x0D, 0x00A8)); - SI_AREA_FLAG(4) = 0; + EVT_AREA_FLAG(4) = 0; } } else { - if (SI_AREA_FLAG(4) == 0) { + if (EVT_AREA_FLAG(4) == 0) { SpeakToPlayer(NPC_SELF, 0x940005, 0x940001, 0, MESSAGE_ID(0x0D, 0x00A9)); - SI_AREA_FLAG(4) = 1; + EVT_AREA_FLAG(4) = 1; } else { SpeakToPlayer(NPC_SELF, 0x940005, 0x940001, 0, MESSAGE_ID(0x0D, 0x00AA)); - SI_AREA_FLAG(4) = 0; + EVT_AREA_FLAG(4) = 0; } } } @@ -2320,14 +2320,14 @@ EvtSource N(init_8024BF10) = SCRIPT({ }); EvtSource N(interact_8024BF34) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { - if (SI_AREA_FLAG(5) == 0) { + if (EVT_AREA_FLAG(5) == 0) { SpeakToPlayer(NPC_SELF, 0x940005, 0x940001, 0, MESSAGE_ID(0x0D, 0x00AB)); - SI_AREA_FLAG(5) = 1; + EVT_AREA_FLAG(5) = 1; } else { SpeakToPlayer(NPC_SELF, 0x940005, 0x940001, 0, MESSAGE_ID(0x0D, 0x00AC)); - SI_AREA_FLAG(5) = 0; + EVT_AREA_FLAG(5) = 0; } } < STORY_CH5_STAR_SPRIT_DEPARTED { @@ -2351,18 +2351,18 @@ EvtSource N(8024C05C) = 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)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 275); - GetNpcPos(NPC_DISGUISED_MOUSTAFA, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) += SI_VAR(3); - SI_VAR(1) += SI_VAR(4); - SI_VAR(2) += SI_VAR(5); - SI_VAR(0) /= 2; - SI_VAR(1) /= 2; - SI_VAR(2) /= 2; - SI_VAR(1) += 15; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_DISGUISED_MOUSTAFA, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) += EVT_VAR(3); + EVT_VAR(1) += EVT_VAR(4); + EVT_VAR(2) += EVT_VAR(5); + EVT_VAR(0) /= 2; + EVT_VAR(1) /= 2; + EVT_VAR(2) /= 2; + EVT_VAR(1) += 15; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 8.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); @@ -2387,13 +2387,13 @@ EvtSource N(8024C248) = SCRIPT({ MakeLerp(0, 80, 30, 5); 10: UpdateLerp(); - SI_VAR(2) = -335; - SI_VAR(3) = 163; - SI_VAR(2) -= SI_VAR(0); - SI_VAR(3) += SI_VAR(0); - SetNpcPos(NPC_DISGUISED_MOUSTAFA, SI_VAR(2), SI_VAR(3), -260); + EVT_VAR(2) = -335; + EVT_VAR(3) = 163; + EVT_VAR(2) -= EVT_VAR(0); + EVT_VAR(3) += EVT_VAR(0); + SetNpcPos(NPC_DISGUISED_MOUSTAFA, EVT_VAR(2), EVT_VAR(3), -260); sleep 1; - if (SI_VAR(1) == 1) { + if (EVT_VAR(1) == 1) { goto 10; } SetNpcFlagBits(NPC_DISGUISED_MOUSTAFA, ((NPC_FLAG_100)), FALSE); @@ -2405,7 +2405,7 @@ EvtSource N(8024C248) = SCRIPT({ }); EvtSource N(idle_8024C450) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_BOUGHT_SECRET_ITEMS {} < STORY_CH2_GOT_PULSE_STONE { SetNpcPos(NPC_SELF, -335, 163, -260); @@ -2418,17 +2418,17 @@ EvtSource N(idle_8024C450) = SCRIPT({ }); EvtSource N(interact_8024C4EC) = SCRIPT({ - if (SI_SAVE_FLAG(750) == 1) { + if (EVT_SAVE_FLAG(750) == 1) { SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00CF)); return; } - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_BOUGHT_SECRET_ITEMS { - SI_VAR(11) = 0; + EVT_VAR(11) = 0; SpeakToPlayer(NPC_DISGUISED_MOUSTAFA, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00B4)); 0: ShowChoice(MESSAGE_ID(0x1E, 0x0019)); - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { ContinueSpeech(2, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00B6)); spawn N(8024C1F8); return; @@ -2436,10 +2436,10 @@ EvtSource N(interact_8024C4EC) = SCRIPT({ EndSpeech(2, 12320772, 12320769, 0); } 1: - SI_VAR(0) = 0; - SI_VAR(1) = 2; + EVT_VAR(0) = 0; + EVT_VAR(1) = 2; await N(80248A50); - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { SpeakToPlayer(NPC_DISGUISED_MOUSTAFA, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00B8)); spawn N(8024C1F8); @@ -2451,45 +2451,45 @@ EvtSource N(interact_8024C4EC) = SCRIPT({ return; } } - SI_VAR(10) = SI_VAR(0); - if (SI_SAVE_VAR(135) == 0) { - if (SI_VAR(10) == 156) { - SI_SAVE_VAR(135) = 1; - SI_SAVE_VAR(134) = 10; + EVT_VAR(10) = EVT_VAR(0); + if (EVT_SAVE_VAR(135) == 0) { + if (EVT_VAR(10) == 156) { + EVT_SAVE_VAR(135) = 1; + EVT_SAVE_VAR(134) = 10; SpeakToPlayer(NPC_DISGUISED_MOUSTAFA, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00BB)); ShowChoice(MESSAGE_ID(0x1E, 0x001C)); } else { - SI_SAVE_VAR(134) += 1; - if (SI_SAVE_VAR(134) <= 2) { + EVT_SAVE_VAR(134) += 1; + if (EVT_SAVE_VAR(134) <= 2) { SpeakToPlayer(NPC_DISGUISED_MOUSTAFA, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00B5)); goto 0; } - if (SI_SAVE_VAR(134) == 3) { + if (EVT_SAVE_VAR(134) == 3) { SpeakToPlayer(NPC_DISGUISED_MOUSTAFA, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00B9)); ShowChoice(MESSAGE_ID(0x1E, 0x001B)); } else { SpeakToPlayer(NPC_DISGUISED_MOUSTAFA, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00BA)); ShowChoice(MESSAGE_ID(0x1E, 0x001B)); - SI_SAVE_VAR(134) = 10; + EVT_SAVE_VAR(134) = 10; } } } else { SpeakToPlayer(NPC_DISGUISED_MOUSTAFA, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00BA)); ShowChoice(MESSAGE_ID(0x1E, 0x001C)); } - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { ContinueSpeech(2, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00BC)); } == 1 { await N(8024C0B8); ContinueSpeech(2, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00BD)); - SI_SAVE_FLAG(747) = 1; + EVT_SAVE_FLAG(747) = 1; } == 2 { await N(8024C0B8); ContinueSpeech(2, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00BE)); - SI_SAVE_FLAG(748) = 1; + EVT_SAVE_FLAG(748) = 1; } == 3 { await N(8024C0B8); @@ -2498,29 +2498,29 @@ EvtSource N(interact_8024C4EC) = SCRIPT({ == 4 { await N(8024C0B8); ContinueSpeech(2, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00C1)); - SI_SAVE_FLAG(749) = 1; - SI_VAR(11) = 1; + EVT_SAVE_FLAG(749) = 1; + EVT_VAR(11) = 1; } } - SI_SAVE_FLAG(746) = 1; + EVT_SAVE_FLAG(746) = 1; ContinueSpeech(2, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00C0)); ShowChoice(MESSAGE_ID(0x1E, 0x001A)); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { EndSpeech(2, 12320772, 12320769, 0); goto 1; } else { ContinueSpeech(2, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00B6)); } - if (SI_VAR(11) == 1) { - if (SI_MAP_FLAG(0) == 0) { - SI_MAP_FLAG(0) = 1; + if (EVT_VAR(11) == 1) { + if (EVT_MAP_FLAG(0) == 0) { + EVT_MAP_FLAG(0) = 1; spawn { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - AwaitPlayerLeave(SI_VAR(0), SI_VAR(2), 50); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + AwaitPlayerLeave(EVT_VAR(0), EVT_VAR(2), 50); DisablePlayerInput(TRUE); SpeakToPlayer(NPC_DISGUISED_MOUSTAFA, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00C2)); DisablePlayerInput(FALSE); - SI_MAP_FLAG(0) = 0; + EVT_MAP_FLAG(0) = 0; } } } @@ -2536,10 +2536,10 @@ EvtSource N(interact_8024C4EC) = SCRIPT({ PlayerMoveTo(-391, -260, 0); InterpPlayerYaw(90, 3); SetNpcFlagBits(NPC_DISGUISED_MOUSTAFA, ((NPC_FLAG_100)), FALSE); - SI_VAR(10) = spawn N(8024C05C); + EVT_VAR(10) = spawn N(8024C05C); SetNpcFlagBits(NPC_MOUSTAFA, ((NPC_FLAG_100)), TRUE); FadeOutMusic(0, 500); - if (SI_SAVE_FLAG(749) == 1) { + if (EVT_SAVE_FLAG(749) == 1) { SpeakToPlayer(NPC_DISGUISED_MOUSTAFA, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00C3)); await N(8024C248); func_802D2C14(0); @@ -2561,30 +2561,30 @@ EvtSource N(interact_8024C4EC) = SCRIPT({ SetNpcJumpscale(NPC_MOUSTAFA, 1.0); NpcJump0(NPC_MOUSTAFA, -335, 163, -260, 20); SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00C9)); - SI_VAR(0) = 18; - SI_VAR(1) = 1; + EVT_VAR(0) = 18; + EVT_VAR(1) = 1; await N(80244DE4); AddKeyItem(ITEM_PULSE_STONE); - SI_STORY_PROGRESS = STORY_CH2_GOT_PULSE_STONE; + EVT_STORY_PROGRESS = STORY_CH2_GOT_PULSE_STONE; SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00CA)); - kill SI_VAR(10); + kill EVT_VAR(10); spawn N(80243AF0); } >= -63 { - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH2_UNCOVERED_DRY_DRY_RUINS { SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00CB)); } >= STORY_CH2_UNCOVERED_DRY_DRY_RUINS { - if (SI_STORY_PROGRESS >= STORY_CH2_DEFEATED_TUTANKOOPA) { - if (SI_SAVE_FLAG(751) == 0) { + if (EVT_STORY_PROGRESS >= STORY_CH2_DEFEATED_TUTANKOOPA) { + if (EVT_SAVE_FLAG(751) == 0) { SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00CD)); SetPlayerAnimation(ANIM_10002); sleep 15; SetPlayerAnimation(ANIM_80007); sleep 30; SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00CE)); - SI_SAVE_FLAG(751) = 1; + EVT_SAVE_FLAG(751) = 1; } else { SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00D0)); } @@ -2598,8 +2598,8 @@ EvtSource N(interact_8024C4EC) = SCRIPT({ }); EvtSource N(init_8024D04C) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { 2, 3 { SetNpcPos(NPC_SELF, 200, 0, -15); InterpNpcYaw(NPC_SELF, 270, 0); @@ -2622,8 +2622,8 @@ EvtSource N(idle_8024D154) = SCRIPT({ SetNpcAnimation(NPC_SELF, 0x940107); SetNpcAnimation(NPC_DISGUISED_MOUSTAFA, 0xBC0001); loop 50 { - IsPlayerWithin(200, 50, 100, SI_VAR(0)); - if (SI_VAR(0) == 1) { + IsPlayerWithin(200, 50, 100, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { goto 20; } sleep 1; @@ -2631,8 +2631,8 @@ EvtSource N(idle_8024D154) = SCRIPT({ SetNpcAnimation(NPC_SELF, 0x940101); SetNpcAnimation(NPC_DISGUISED_MOUSTAFA, 0xBC0007); loop 50 { - IsPlayerWithin(200, 50, 100, SI_VAR(0)); - if (SI_VAR(0) == 1) { + IsPlayerWithin(200, 50, 100, EVT_VAR(0)); + if (EVT_VAR(0) == 1) { goto 20; } sleep 1; @@ -2651,22 +2651,22 @@ EvtSource N(idle_8024D154) = SCRIPT({ NpcMoveTo(NPC_SELF, -371, 5, 20); NpcMoveTo(NPC_SELF, -487, 5, 20); SetNpcPos(NPC_SELF, 0, -1000, 0); - SI_STORY_PROGRESS = STORY_CH2_SPOKE_WITH_SHEEK; + EVT_STORY_PROGRESS = STORY_CH2_SPOKE_WITH_SHEEK; }); EvtSource N(init_8024D3E8) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_8024D154)); - if (SI_STORY_PROGRESS >= STORY_CH2_SPOKE_WITH_SHEEK) { + if (EVT_STORY_PROGRESS >= STORY_CH2_SPOKE_WITH_SHEEK) { RemoveNpc(NPC_SELF); } }); EvtSource N(8024D434) = SCRIPT({ - SI_VAR(0) = 852177; - SI_VAR(8) = 852178; - SI_VAR(1) = 852179; - SI_VAR(2) = 852180; - SI_VAR(3) = 852181; + EVT_VAR(0) = 852177; + EVT_VAR(8) = 852178; + EVT_VAR(1) = 852179; + EVT_VAR(2) = 852180; + EVT_VAR(3) = 852181; }); EvtSource N(8024D494) = SCRIPT({ @@ -2699,8 +2699,8 @@ EvtSource N(8024D494) = SCRIPT({ spawn { sleep 81; N(CamSetFOV)(0, 25); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; PanToTarget(0, 0, 0); } @@ -3112,10 +3112,10 @@ ApiStatus N(func_80240300_9694C0)(Evt* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -3136,16 +3136,16 @@ ApiStatus N(func_8024043C_9695FC)(Evt* script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -3176,7 +3176,7 @@ ApiStatus N(func_802409EC_969BAC)(Evt* script, s32 isInitialCall) { gPlayerData.quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; gPlayerData.quizzesCorrect++; } else { @@ -3190,12 +3190,12 @@ ApiStatus N(func_80240A70_969C30)(Evt* script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { - N(D_8024EFC0) = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), - get_variable(script, SI_ARRAY(3))); - N(D_8024EFC4) = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), - get_variable(script, SI_ARRAY(3))); - N(D_8024EFC8) = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), - get_variable(script, SI_ARRAY(3)), 1.0f, 0); + N(D_8024EFC0) = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), + get_variable(script, EVT_ARRAY(3))); + N(D_8024EFC4) = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), + get_variable(script, EVT_ARRAY(3))); + N(D_8024EFC8) = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), + get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = N(D_8024EFC0)->freeDelay; // TODO this is wrong effectPtr->unk_18 = 0; @@ -3414,27 +3414,27 @@ ApiStatus N(func_802416FC_96A8BC)(Evt* script, s32 isInitialCall) { ret = func_8013A704(1); func_8013AA9C(ret, 5, 0xF, 1, 1, 0, 0x800); - set_variable(script, SI_ARRAY(0), ret); + set_variable(script, EVT_ARRAY(0), ret); ret = func_8013A704(1); func_8013AA9C(ret, 5, 0x10, 1, 1, 0, 0x800); - set_variable(script, SI_ARRAY(1), ret); + set_variable(script, EVT_ARRAY(1), ret); ret = func_8013A704(1); func_8013AA9C(ret, 5, 0x11, 1, 1, 0, 0x800); - set_variable(script, SI_ARRAY(2), ret); + set_variable(script, EVT_ARRAY(2), ret); ret = func_8013A704(1); func_8013AA9C(ret, 5, 0x12, 1, 1, 0, 0x800); - set_variable(script, SI_ARRAY(3), ret); + set_variable(script, EVT_ARRAY(3), ret); - set_variable(script, SI_ARRAY(7), create_generic_entity_world(N(func_8024240C_96B5CC), N(func_80242EAC_96C06C))); + set_variable(script, EVT_ARRAY(7), create_generic_entity_world(N(func_8024240C_96B5CC), N(func_80242EAC_96C06C))); return ApiStatus_DONE2; } 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))); - func_8013A854(get_variable(script, SI_ARRAY(3))); - free_generic_entity(get_variable(script, SI_ARRAY(7))); + func_8013A854(get_variable(script, EVT_ARRAY(0))); + func_8013A854(get_variable(script, EVT_ARRAY(1))); + func_8013A854(get_variable(script, EVT_ARRAY(2))); + func_8013A854(get_variable(script, EVT_ARRAY(3))); + free_generic_entity(get_variable(script, EVT_ARRAY(7))); return ApiStatus_DONE2; } @@ -3515,7 +3515,7 @@ s32 dro_02_func_8024190C_96AACC(D_8024F010_Struct* ptr, Matrix4f matrix) { gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - func_8013AF70(get_variable(N(D_8024EFCC), SI_ARRAY(0)), &subroutine_arg26, 0x30, &subroutine_arg6); + func_8013AF70(get_variable(N(D_8024EFCC), EVT_ARRAY(0)), &subroutine_arg26, 0x30, &subroutine_arg6); gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW); @@ -3531,8 +3531,8 @@ s32 dro_02_func_8024190C_96AACC(D_8024F010_Struct* ptr, Matrix4f matrix) { gSPMatrix(gMasterGfxPos++, 0xFFFFFFFF, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - func_8013AF70(get_variable(N(D_8024EFCC), SI_ARRAY(1)), &subroutine_arg26, 0x30, &subroutine_arg6); - func_8013AF70(get_variable(N(D_8024EFCC), SI_ARRAY(2)), &subroutine_arg26, 0x30, &subroutine_arg6); + func_8013AF70(get_variable(N(D_8024EFCC), EVT_ARRAY(1)), &subroutine_arg26, 0x30, &subroutine_arg6); + func_8013AF70(get_variable(N(D_8024EFCC), EVT_ARRAY(2)), &subroutine_arg26, 0x30, &subroutine_arg6); gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW); @@ -3544,7 +3544,7 @@ s32 dro_02_func_8024190C_96AACC(D_8024F010_Struct* ptr, Matrix4f matrix) { gMatrixListPos++; spr_get_player_raster_info(&subroutine_arg2C, ptr->unk_18, ptr->unk_1C); - func_8013AF70(get_variable(N(D_8024EFCC), SI_ARRAY(3)), subroutine_arg2C, subroutine_arg2D, subroutine_arg2E, + func_8013AF70(get_variable(N(D_8024EFCC), EVT_ARRAY(3)), subroutine_arg2C, subroutine_arg2D, subroutine_arg2E, subroutine_arg2F, -(subroutine_arg2E / 2), subroutine_arg2F / 2, 0xFF, &subroutine_arg26, 0x10, &subroutine_arg6); gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW); @@ -3563,8 +3563,8 @@ void N(func_80242214_96B3D4)(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg Matrix4f spA0; guPositionF(&spA0, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, SPRITE_WORLD_SCALE, - get_variable(*CC_ptr, SI_ARRAY(4)), get_variable(*CC_ptr, SI_ARRAY(5)), - get_variable(*CC_ptr, SI_ARRAY(6))); + get_variable(*CC_ptr, EVT_ARRAY(4)), get_variable(*CC_ptr, EVT_ARRAY(5)), + get_variable(*CC_ptr, EVT_ARRAY(6))); F010_ptr = ({ D_8024F010_Struct* a = &N(D_8024F010); &a[arg0]; }); guTranslateF(&sp60, F010_ptr->unk_04, F010_ptr->unk_08, F010_ptr->unk_0C); @@ -3586,7 +3586,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { N(temp)** effect2; N(temp)** effect3; EffectInstanceDataThing* effectPtr; - s32 var = get_variable(N(D_8024EFCC), SI_ARRAY(9)); + s32 var = get_variable(N(D_8024EFCC), EVT_ARRAY(9)); s32 i, j, x; f32 subroutine_arg6; f32 subroutine_arg7; @@ -3637,7 +3637,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { switch (var) { case 0: N(D_8024EF88) = 0; - set_variable(N(D_8024EFCC), SI_ARRAY(9), 1); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 1); N(D_8024F010)[0].unk_00 = 1; N(D_8024F010)[0].unk_04 = -200.0f; @@ -3679,7 +3679,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { gPlayerStatus.position.y = -1000.0f; } if (N(D_8024EF88) == 0x14) { - set_variable(N(D_8024EFCC), SI_ARRAY(9), 2); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 2); N(D_8024EF88) = 0; } break; @@ -3702,7 +3702,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { N(D_8024EF88)++; if (N(D_8024EF88) == 0xA) { N(D_8024EF88) = 0; - set_variable(N(D_8024EFCC), SI_ARRAY(9), 4); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 4); } break; @@ -3719,7 +3719,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { N(D_8024EF88)++; if (N(D_8024EF88) == 0x14) { N(D_8024EF88) = 0; - set_variable(N(D_8024EFCC), SI_ARRAY(9), 5); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 5); sfx_play_sound_with_params(0x203, 0, 0x18, 0); } break; @@ -3735,7 +3735,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { } if (N(D_8024EF88) == 0xA) { N(D_8024EF88) = 0; - set_variable(N(D_8024EFCC), SI_ARRAY(9), 6); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 6); sfx_play_sound_with_params(0x203, 0, 0x40, 0); } break; @@ -3751,7 +3751,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { } if (N(D_8024EF88) == 0xA) { N(D_8024EF88) = 0; - set_variable(N(D_8024EFCC), SI_ARRAY(9), 7); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 7); sfx_play_sound_with_params(0x203, 0, 0x68, 0); } break; @@ -3767,7 +3767,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { } if (N(D_8024EF88) == 0xA) { N(D_8024EF88) = 0; - set_variable(N(D_8024EFCC), SI_ARRAY(9), 8); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 8); } break; @@ -3778,7 +3778,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { N(D_8024EF88)++; if (N(D_8024EF88) == 0xA) { N(D_8024EF88) = 0; - set_variable(N(D_8024EFCC), SI_ARRAY(9), 9); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 9); } break; @@ -3795,7 +3795,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { N(D_8024EF88)++; if (N(D_8024EF88) == 0xA) { N(D_8024EF88) = 0; - set_variable(N(D_8024EFCC), SI_ARRAY(9), 10); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 10); } break; @@ -3822,7 +3822,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { N(D_8024F010)[0].unk_10 = 180.0f; N(D_8024F010)[1].unk_08 = 68.0f; N(D_8024F010)[1].unk_10 = 180.0f; - set_variable(N(D_8024EFCC), SI_ARRAY(9), 0xC); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 0xC); gPauseMenuTabs[0].unk_00 = 0; N(D_8024EF84) = 1.0f; N(func_80242214_96B3D4)(1, &subroutine_arg12, &subroutine_arg13, &subroutine_arg14, &subroutine_arg15); @@ -3873,7 +3873,7 @@ void func_8024240C_96B5CC(Evt* script, s32 isInitialCall) { if (N(D_8024F010)[1].unk_08 < -5.0f) { N(D_8024F010)[1].unk_08 = -5.0f; N(D_8024EF88) = 0; - set_variable(N(D_8024EFCC), SI_ARRAY(9), 0xD); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 0xD); N(D_8024F010)[0].unk_00 = 0; N(D_8024F010)[1].unk_00 = 0; N(func_80242214_96B3D4)(1, &subroutine_arg1A, &subroutine_arg1B, &subroutine_arg1C, &subroutine_arg1D); @@ -3900,17 +3900,17 @@ void N(func_80242EAC_96C06C)(Evt* script, s32 isInitialCall) { u32 temp_s1; guPositionF(&sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, SPRITE_WORLD_SCALE, - get_variable(N(D_8024EFCC), SI_ARRAY(4)), get_variable(N(D_8024EFCC), SI_ARRAY(5)), - get_variable(N(D_8024EFCC), SI_ARRAY(6))); + get_variable(N(D_8024EFCC), EVT_ARRAY(4)), get_variable(N(D_8024EFCC), EVT_ARRAY(5)), + get_variable(N(D_8024EFCC), EVT_ARRAY(6))); temp_s1 = N(func_8024190C_96AACC)(&N(D_8024F010)[0], &sp20); N(func_8024190C_96AACC)(&N(D_8024F010)[1], &sp20); N(func_8024190C_96AACC)(&N(D_8024F010)[2], &sp20); if ((N(D_8024F010)[0].unk_00 == 2) && ((temp_s1 - 1) < 2)) { - set_variable(N(D_8024EFCC), SI_ARRAY(9), 3); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 3); } if ((N(D_8024F010)[0].unk_00 == 3) && ((temp_s1 - 1) < 2)) { - set_variable(N(D_8024EFCC), SI_ARRAY(9), 0xB); + set_variable(N(D_8024EFCC), EVT_ARRAY(9), 0xB); } } diff --git a/src/world/area_flo/flo_00/C9DF60.c b/src/world/area_flo/flo_00/C9DF60.c index 75fc678e38..d881d4e474 100644 --- a/src/world/area_flo/flo_00/C9DF60.c +++ b/src/world/area_flo/flo_00/C9DF60.c @@ -42,10 +42,10 @@ MapConfig N(config) = { }; EvtSource N(802414D0) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 8 { - if (SI_AREA_FLAG(44) != 0) { + if (EVT_AREA_FLAG(44) != 0) { SetMusicTrack(0, SONG_MAGIC_BEANSTALK, 1, 8); } else { SetMusicTrack(0, SONG_FLOWER_FIELDS_SUNNY, 0, 8); @@ -59,7 +59,7 @@ EvtSource N(802414D0) = SCRIPT({ spawn { loop { sleep 1; - if (SI_STORY_PROGRESS >= STORY_CH6_STAR_SPRIT_DEPARTED) { + if (EVT_STORY_PROGRESS >= STORY_CH6_STAR_SPRIT_DEPARTED) { break loop; } } @@ -69,7 +69,7 @@ EvtSource N(802414D0) = SCRIPT({ == 11 { FadeInMusic(0, 49, 0, 3000, 0, 127); } else { - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -86,40 +86,40 @@ static s32 N(pad_16BC) = { EvtSource N(802416C0) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -132,24 +132,24 @@ EvtSource N(8024196C) = SCRIPT({ MakeLerp(0, -100, 20, 4); loop { UpdateLerp(); - RotateGroup(28, SI_VAR(0), 0, 1, 0); + RotateGroup(28, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } func_802D2C14(1); PlayerMoveTo(0, -310, 30); func_802D2C14(0); - if (SI_STORY_PROGRESS == STORY_CH6_STAR_SPRIT_DEPARTED) { - SI_STORY_PROGRESS = STORY_CH6_RETURNED_TO_TOAD_TOWN; + if (EVT_STORY_PROGRESS == STORY_CH6_STAR_SPRIT_DEPARTED) { + EVT_STORY_PROGRESS = STORY_CH6_RETURNED_TO_TOAD_TOWN; } MakeLerp(-100, 0, 30, 1); loop { UpdateLerp(); - RotateGroup(28, SI_VAR(0), 0, 1, 0); + RotateGroup(28, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -166,9 +166,9 @@ EvtSource N(80241B90) = SCRIPT({ MakeLerp(0, -100, 30, 1); loop { UpdateLerp(); - RotateGroup(28, SI_VAR(0), 0, 1, 0); + RotateGroup(28, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -178,9 +178,9 @@ EvtSource N(80241B90) = SCRIPT({ MakeLerp(-100, 0, 30, 1); loop { UpdateLerp(); - RotateGroup(28, SI_VAR(0), 0, 1, 0); + RotateGroup(28, EVT_VAR(0), 0, 1, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -213,16 +213,16 @@ EvtSource N(80241FA4) = SCRIPT({ }); EvtSource N(enterWalk_8024205C) = SCRIPT({ - GetLoadType(SI_VAR(1)); - if (SI_VAR(1) == 1) { + GetLoadType(EVT_VAR(1)); + if (EVT_VAR(1) == 1) { spawn EnterSavePoint; spawn N(80241FA4); } else { - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) != 8) { - SI_AREA_FLAG(44) = 0; + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) != 8) { + EVT_AREA_FLAG(44) = 0; } - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { spawn { await N(80241B90); @@ -230,7 +230,7 @@ EvtSource N(enterWalk_8024205C) = SCRIPT({ } } 1 ... 6 { - SI_VAR(0) = N(80241FA4); + EVT_VAR(0) = N(80241FA4); spawn EnterWalk; } == 7 { @@ -247,7 +247,7 @@ EvtSource N(enterWalk_8024205C) = SCRIPT({ } == 9 { spawn N(80242998); - SI_VAR(0) = N(80241FA4); + EVT_VAR(0) = N(80241FA4); spawn EnterWalk; } == 10 { @@ -262,19 +262,19 @@ EvtSource N(enterWalk_8024205C) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - SI_SAVE_FLAG(1984) = 1; - if (SI_STORY_PROGRESS < STORY_CH6_GREW_MAGIC_BEANSTALK) { + EVT_SAVE_FLAG(1984) = 1; + if (EVT_STORY_PROGRESS < STORY_CH6_GREW_MAGIC_BEANSTALK) { ModifyColliderFlags(0, 48, 0x7FFFFE00); } - SI_SAVE_FLAG(263) = 0; - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 11) { + EVT_SAVE_FLAG(263) = 0; + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 11) { MakeNpcs(0, N(npcGroupList_80246834)); } else { MakeNpcs(0, N(npcGroupList_80245DE4)); @@ -285,72 +285,72 @@ EvtSource N(main) = SCRIPT({ spawn N(80248E30); ModifyColliderFlags(3, 30, 0x00000006); ModifyColliderFlags(3, 31, 0x00000006); - SI_VAR(0) = 150; - SI_VAR(1) = -270; - SI_VAR(2) = 410; - SI_VAR(3) = 170; - SI_VAR(4) = 0; + EVT_VAR(0) = 150; + EVT_VAR(1) = -270; + EVT_VAR(2) = 410; + EVT_VAR(3) = 170; + EVT_VAR(4) = 0; spawn N(802416C0); - SI_VAR(0) = 115; - SI_VAR(1) = -450; - SI_VAR(2) = 250; - SI_VAR(3) = -270; - SI_VAR(4) = 0; + EVT_VAR(0) = 115; + EVT_VAR(1) = -450; + EVT_VAR(2) = 250; + EVT_VAR(3) = -270; + EVT_VAR(4) = 0; spawn N(802416C0); - SI_VAR(0) = -330; - SI_VAR(1) = 220; - SI_VAR(2) = 45; - SI_VAR(3) = 410; - SI_VAR(4) = 0; + EVT_VAR(0) = -330; + EVT_VAR(1) = 220; + EVT_VAR(2) = 45; + EVT_VAR(3) = 410; + EVT_VAR(4) = 0; spawn N(802416C0); - SI_VAR(0) = -420; - SI_VAR(1) = -260; - SI_VAR(2) = -140; - SI_VAR(3) = 160; - SI_VAR(4) = 0; + EVT_VAR(0) = -420; + EVT_VAR(1) = -260; + EVT_VAR(2) = -140; + EVT_VAR(3) = 160; + EVT_VAR(4) = 0; spawn N(802416C0); ModifyColliderFlags(0, 26, 0x7FFFFE00); ModifyColliderFlags(0, 18, 0x7FFFFE00); ModifyColliderFlags(0, 14, 0x7FFFFE00); ModifyColliderFlags(0, 6, 0x7FFFFE00); spawn N(enterWalk_8024205C); - GetLoadType(SI_VAR(1)); - if (SI_VAR(1) != 1) { - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 10) { + GetLoadType(EVT_VAR(1)); + if (EVT_VAR(1) != 1) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 10) { sleep 65; } } await N(802414D0); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_C9DF20)(); } spawn { EnableTexPanning(35, 1); - SI_VAR(0) = 0; + EVT_VAR(0) = 0; 0: - RandInt(300, SI_VAR(1)); - SI_VAR(1) += 100; - RandInt(1, SI_VAR(2)); - SI_VAR(2) += 1; - sleep SI_VAR(1); - loop SI_VAR(2) { + RandInt(300, EVT_VAR(1)); + EVT_VAR(1) += 100; + RandInt(1, EVT_VAR(2)); + EVT_VAR(2) += 1; + sleep EVT_VAR(1); + loop EVT_VAR(2) { SetTexPanOffset(12, 0, -32768, 0); sleep 2; SetTexPanOffset(12, 0, -65536, 0); sleep 2; SetTexPanOffset(12, 0, -98304, 0); - RandInt(5, SI_VAR(3)); - SI_VAR(3) += 2; - sleep SI_VAR(3); + RandInt(5, EVT_VAR(3)); + EVT_VAR(3) += 2; + sleep EVT_VAR(3); SetTexPanOffset(12, 0, -65536, 0); sleep 2; SetTexPanOffset(12, 0, -32768, 0); sleep 2; SetTexPanOffset(12, 0, 0, 0); - RandInt(5, SI_VAR(3)); - SI_VAR(3) += 2; - sleep SI_VAR(3); + RandInt(5, EVT_VAR(3)); + EVT_VAR(3) += 2; + sleep EVT_VAR(3); } goto 0; } @@ -436,9 +436,9 @@ EvtSource N(80242AF0) = SCRIPT({ PanToTarget(0, 0, 1); sleep 75; ShowMessageAtScreenPos(MESSAGE_ID(0x11, 0x0000), 160, 40); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetPlayerJumpscale(1.5); - PlayerJump1(SI_VAR(0), SI_VAR(1), SI_VAR(2), 12); + PlayerJump1(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 12); sleep 10; DisablePartnerAI(0); InterpPlayerYaw(270, 0); @@ -485,7 +485,7 @@ EvtSource N(80242AF0) = SCRIPT({ sleep 10; ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x0005), 0, 70, -200); ResetCam(0, 90.0); - SI_STORY_PROGRESS = STORY_CH6_ARRIVED_AT_FLOWER_FIELDS; + EVT_STORY_PROGRESS = STORY_CH6_ARRIVED_AT_FLOWER_FIELDS; func_802D2C14(0); DisablePlayerInput(FALSE); }); @@ -493,34 +493,34 @@ EvtSource N(80242AF0) = SCRIPT({ EvtSource N(80242FCC) = SCRIPT({ DisablePlayerInput(TRUE); sleep 2; - GetPlayerActionState(SI_VAR(3)); - SI_VAR(4) = 0; - if (SI_VAR(3) == 0) { - SI_VAR(4) += 1; + GetPlayerActionState(EVT_VAR(3)); + EVT_VAR(4) = 0; + if (EVT_VAR(3) == 0) { + EVT_VAR(4) += 1; } - if (SI_VAR(3) == 1) { - SI_VAR(4) += 1; + if (EVT_VAR(3) == 1) { + EVT_VAR(4) += 1; } - if (SI_VAR(3) == 2) { - SI_VAR(4) += 1; + if (EVT_VAR(3) == 2) { + EVT_VAR(4) += 1; } - if (SI_VAR(4) == 0) { + if (EVT_VAR(4) == 0) { DisablePlayerInput(FALSE); return; } - if (SI_STORY_PROGRESS == STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS == STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x0006), 0, 50, -200); - SI_STORY_PROGRESS = STORY_CH6_WISTERWOOD_GAVE_HINT; + EVT_STORY_PROGRESS = STORY_CH6_WISTERWOOD_GAVE_HINT; DisablePlayerInput(FALSE); return; } - if (SI_STORY_PROGRESS < STORY_CH6_RETURNED_TO_TOAD_TOWN) { + if (EVT_STORY_PROGRESS < STORY_CH6_RETURNED_TO_TOAD_TOWN) { ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x000D), 0, 50, -200); ShowChoice(MESSAGE_ID(0x1E, 0x001F)); sleep 10; - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { SwitchMessage(MESSAGE_ID(0x11, 0x000E)); } @@ -556,7 +556,7 @@ EvtSource N(80242FCC) = SCRIPT({ ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x0014), 0, 50, -200); ShowChoice(MESSAGE_ID(0x1E, 0x001F)); sleep 10; - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { SwitchMessage(MESSAGE_ID(0x11, 0x0015)); } @@ -594,13 +594,13 @@ EvtSource N(init_80243474) = SCRIPT({ SetNpcPos(NPC_SELF, 50, 70, -230); SetNpcFlagBits(NPC_SELF, ((0x00000002)), TRUE); EnableNpcShadow(NPC_SELF, FALSE); - if (SI_STORY_PROGRESS < STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) { + if (EVT_STORY_PROGRESS < STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) { spawn N(80242AF0); } }); EvtSource N(interact_8024352C) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_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)); } @@ -614,14 +614,14 @@ EvtSource N(interact_8024352C) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_00_Anim_3, NPC_ANIM_bubulb_Palette_00_Anim_2, 0, MESSAGE_ID(0x11, 0x0019)); } < STORY_CH6_STAR_SPIRIT_RESCUED { - match SI_AREA_FLAG(18) { + match EVT_AREA_FLAG(18) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_00_Anim_9, NPC_ANIM_bubulb_Palette_00_Anim_8, 0, MESSAGE_ID(0x11, 0x001A)); - SI_AREA_FLAG(18) = 1; + EVT_AREA_FLAG(18) = 1; } == 1 { SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_00_Anim_9, NPC_ANIM_bubulb_Palette_00_Anim_8, 0, MESSAGE_ID(0x11, 0x001B)); - SI_AREA_FLAG(18) = 0; + EVT_AREA_FLAG(18) = 0; } } } else { @@ -632,7 +632,7 @@ EvtSource N(interact_8024352C) = SCRIPT({ }); EvtSource N(interact_802436C0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_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)); } @@ -646,14 +646,14 @@ EvtSource N(interact_802436C0) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_01_Anim_3, NPC_ANIM_bubulb_Palette_01_Anim_2, 0, MESSAGE_ID(0x11, 0x0020)); } < STORY_CH6_STAR_SPIRIT_RESCUED { - match SI_AREA_FLAG(19) { + match EVT_AREA_FLAG(19) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_01_Anim_3, NPC_ANIM_bubulb_Palette_01_Anim_2, 0, MESSAGE_ID(0x11, 0x0021)); - SI_AREA_FLAG(19) = 1; + EVT_AREA_FLAG(19) = 1; } == 1 { SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_01_Anim_3, NPC_ANIM_bubulb_Palette_01_Anim_2, 0, MESSAGE_ID(0x11, 0x0022)); - SI_AREA_FLAG(19) = 0; + EVT_AREA_FLAG(19) = 0; } } } else { @@ -664,7 +664,7 @@ EvtSource N(interact_802436C0) = SCRIPT({ }); EvtSource N(interact_80243854) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_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)); } @@ -678,14 +678,14 @@ EvtSource N(interact_80243854) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_02_Anim_3, NPC_ANIM_bubulb_Palette_02_Anim_2, 0, MESSAGE_ID(0x11, 0x0027)); } < STORY_CH6_STAR_SPIRIT_RESCUED { - match SI_AREA_FLAG(20) { + match EVT_AREA_FLAG(20) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_02_Anim_9, NPC_ANIM_bubulb_Palette_02_Anim_8, 0, MESSAGE_ID(0x11, 0x0028)); - SI_AREA_FLAG(20) = 1; + EVT_AREA_FLAG(20) = 1; } == 1 { SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_02_Anim_9, NPC_ANIM_bubulb_Palette_02_Anim_8, 0, MESSAGE_ID(0x11, 0x0029)); - SI_AREA_FLAG(20) = 0; + EVT_AREA_FLAG(20) = 0; } } } else { @@ -696,7 +696,7 @@ EvtSource N(interact_80243854) = SCRIPT({ }); EvtSource N(interact_802439E8) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_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)); } @@ -710,14 +710,14 @@ EvtSource N(interact_802439E8) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_03_Anim_3, NPC_ANIM_bubulb_Palette_03_Anim_2, 0, MESSAGE_ID(0x11, 0x002E)); } < STORY_CH6_STAR_SPIRIT_RESCUED { - match SI_AREA_FLAG(21) { + match EVT_AREA_FLAG(21) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_03_Anim_9, NPC_ANIM_bubulb_Palette_03_Anim_8, 0, MESSAGE_ID(0x11, 0x002F)); - SI_AREA_FLAG(21) = 1; + EVT_AREA_FLAG(21) = 1; } == 1 { SpeakToPlayer(NPC_SELF, NPC_ANIM_bubulb_Palette_03_Anim_9, NPC_ANIM_bubulb_Palette_03_Anim_8, 0, MESSAGE_ID(0x11, 0x0030)); - SI_AREA_FLAG(21) = 0; + EVT_AREA_FLAG(21) = 0; } } } else { @@ -728,94 +728,94 @@ EvtSource N(interact_802439E8) = SCRIPT({ }); EvtSource N(init_80243B7C) = SCRIPT({ - SI_AREA_FLAG(18) = 0; + EVT_AREA_FLAG(18) = 0; BindNpcInteract(NPC_SELF, N(interact_8024352C)); }); EvtSource N(init_80243BB0) = SCRIPT({ - SI_AREA_FLAG(19) = 0; + EVT_AREA_FLAG(19) = 0; BindNpcInteract(NPC_SELF, N(interact_802436C0)); }); EvtSource N(init_80243BE4) = SCRIPT({ - SI_AREA_FLAG(20) = 0; + EVT_AREA_FLAG(20) = 0; BindNpcInteract(NPC_SELF, N(interact_80243854)); }); EvtSource N(init_80243C18) = SCRIPT({ - SI_AREA_FLAG(21) = 0; + EVT_AREA_FLAG(21) = 0; BindNpcInteract(NPC_SELF, N(interact_802439E8)); }); EvtSource N(interact_80243C4C) = SCRIPT({ - if (SI_SAVE_FLAG(1373) == 0) { + if (EVT_SAVE_FLAG(1373) == 0) { AdjustCam(0, 4.0, -30, 300, 20.0, -9.5); - SI_SAVE_FLAG(1373) = 1; + EVT_SAVE_FLAG(1373) = 1; } - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { - match SI_AREA_VAR(0) { + match EVT_AREA_VAR(0) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_tolielup_Palette_00_Anim_2, NPC_ANIM_tolielup_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0035)); EndSpeech(-1, NPC_ANIM_tolielup_Palette_00_Anim_3, NPC_ANIM_tolielup_Palette_00_Anim_3, 0); - SI_AREA_VAR(0) = 1; + EVT_AREA_VAR(0) = 1; } == 1 { SpeakToPlayer(NPC_SELF, NPC_ANIM_tolielup_Palette_00_Anim_2, NPC_ANIM_tolielup_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0038)); EndSpeech(-1, NPC_ANIM_tolielup_Palette_00_Anim_3, NPC_ANIM_tolielup_Palette_00_Anim_3, 0); - SI_AREA_VAR(0) = 2; + EVT_AREA_VAR(0) = 2; } == 2 { SpeakToPlayer(NPC_SELF, NPC_ANIM_tolielup_Palette_00_Anim_2, NPC_ANIM_tolielup_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0039)); EndSpeech(-1, NPC_ANIM_tolielup_Palette_00_Anim_3, NPC_ANIM_tolielup_Palette_00_Anim_3, 0); - SI_AREA_VAR(0) = 0; + EVT_AREA_VAR(0) = 0; } } } < 47 { - match SI_AREA_VAR(0) { + match EVT_AREA_VAR(0) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_tolielup_Palette_00_Anim_2, NPC_ANIM_tolielup_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0036)); EndSpeech(-1, NPC_ANIM_tolielup_Palette_00_Anim_3, NPC_ANIM_tolielup_Palette_00_Anim_3, 0); - SI_AREA_VAR(0) = 1; + EVT_AREA_VAR(0) = 1; } == 1 { SpeakToPlayer(NPC_SELF, NPC_ANIM_tolielup_Palette_00_Anim_2, NPC_ANIM_tolielup_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0038)); EndSpeech(-1, NPC_ANIM_tolielup_Palette_00_Anim_3, NPC_ANIM_tolielup_Palette_00_Anim_3, 0); - SI_AREA_VAR(0) = 2; + EVT_AREA_VAR(0) = 2; } == 2 { SpeakToPlayer(NPC_SELF, NPC_ANIM_tolielup_Palette_00_Anim_2, NPC_ANIM_tolielup_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0039)); EndSpeech(-1, NPC_ANIM_tolielup_Palette_00_Anim_3, NPC_ANIM_tolielup_Palette_00_Anim_3, 0); - SI_AREA_VAR(0) = 0; + EVT_AREA_VAR(0) = 0; } } } < 53 { - match SI_AREA_VAR(0) { + match EVT_AREA_VAR(0) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_tolielup_Palette_00_Anim_2, NPC_ANIM_tolielup_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0037)); EndSpeech(-1, NPC_ANIM_tolielup_Palette_00_Anim_3, NPC_ANIM_tolielup_Palette_00_Anim_3, 0); - SI_AREA_VAR(0) = 1; + EVT_AREA_VAR(0) = 1; } == 1 { SpeakToPlayer(NPC_SELF, NPC_ANIM_tolielup_Palette_00_Anim_2, NPC_ANIM_tolielup_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0038)); EndSpeech(-1, NPC_ANIM_tolielup_Palette_00_Anim_3, NPC_ANIM_tolielup_Palette_00_Anim_3, 0); - SI_AREA_VAR(0) = 2; + EVT_AREA_VAR(0) = 2; } == 2 { SpeakToPlayer(NPC_SELF, NPC_ANIM_tolielup_Palette_00_Anim_2, NPC_ANIM_tolielup_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0039)); EndSpeech(-1, NPC_ANIM_tolielup_Palette_00_Anim_3, NPC_ANIM_tolielup_Palette_00_Anim_3, 0); - SI_AREA_VAR(0) = 0; + EVT_AREA_VAR(0) = 0; } } } < 57 { - match SI_AREA_VAR(0) { + match EVT_AREA_VAR(0) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_tolielup_Palette_00_Anim_2, NPC_ANIM_tolielup_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0039)); EndSpeech(-1, NPC_ANIM_tolielup_Palette_00_Anim_3, NPC_ANIM_tolielup_Palette_00_Anim_3, 0); - SI_AREA_VAR(0) = 1; + EVT_AREA_VAR(0) = 1; } == 1 { SpeakToPlayer(NPC_SELF, NPC_ANIM_tolielup_Palette_00_Anim_2, NPC_ANIM_tolielup_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0038)); @@ -839,15 +839,15 @@ EvtSource N(init_8024414C) = SCRIPT({ EvtSource N(idle_80244188) = SCRIPT({ loop { loop 10 { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) -= 1; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) -= 1; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } loop 10 { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } @@ -856,17 +856,17 @@ EvtSource N(idle_80244188) = SCRIPT({ EvtSource N(8024427C) = SCRIPT({ DisablePartnerAI(0); func_802CF56C(2); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(3) = SI_VAR(0); - SI_VAR(3) += -50; - SI_VAR(4) = SI_VAR(1); - SI_VAR(4) += 26; - SetNpcPos(NPC_WORLD_KLEVAR, SI_VAR(3), SI_VAR(4), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(3) = EVT_VAR(0); + EVT_VAR(3) += -50; + EVT_VAR(4) = EVT_VAR(1); + EVT_VAR(4) += 26; + SetNpcPos(NPC_WORLD_KLEVAR, EVT_VAR(3), EVT_VAR(4), EVT_VAR(2)); PlayerFaceNpc(6, 0); NpcFaceNpc(NPC_PARTNER, NPC_WORLD_KLEVAR, 0); - SI_VAR(0) += -25; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) += -25; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 475.0); SetCamPitch(0, 18, -8); SetCamSpeed(0, 90.0); @@ -884,9 +884,9 @@ EvtSource N(8024427C) = SCRIPT({ MakeLerp(0, 360, 10, 0); loop { UpdateLerp(); - SetNpcRotation(NPC_WORLD_KLEVAR, 0, SI_VAR(0), 0); + SetNpcRotation(NPC_WORLD_KLEVAR, 0, EVT_VAR(0), 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -895,22 +895,22 @@ EvtSource N(8024427C) = SCRIPT({ sleep 20; SetPlayerAnimation(ANIM_GOT_ITEM); PlaySoundAtPlayer(313, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(3) = SI_VAR(1); - SI_VAR(1) += 50; - SI_VAR(2) += 10; - SI_VAR(3) += 30; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(3) = EVT_VAR(1); + EVT_VAR(1) += 50; + EVT_VAR(2) += 10; + EVT_VAR(3) += 30; loop 5 { - PlayEffect(0x11, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x11, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); sleep 6; - PlayEffect(0x11, 1, SI_VAR(0), SI_VAR(3), SI_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x11, 1, EVT_VAR(0), EVT_VAR(3), EVT_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); sleep 6; } sleep 20; PlaySoundAtPlayer(392, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; - PlayEffect(0x52, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 30, 0, 0, 0, 0, 0, 0, 0); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + PlayEffect(0x52, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 30, 0, 0, 0, 0, 0, 0, 0); sleep 30; SetPlayerAnimation(ANIM_10002); SetNpcAnimation(NPC_WORLD_KLEVAR, NPC_ANIM_world_klevar_Palette_00_Anim_1); @@ -918,17 +918,17 @@ EvtSource N(8024427C) = SCRIPT({ N(PostChapter6StatUpdate)(); ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x0196), 160, 40); sleep 10; - GetNpcPos(NPC_WORLD_KLEVAR, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_WORLD_KLEVAR, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 250.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); sleep 10; SpeakToPlayer(NPC_WORLD_KLEVAR, NPC_ANIM_world_klevar_Palette_00_Anim_3, NPC_ANIM_world_klevar_Palette_00_Anim_1, 512, MESSAGE_ID(0x11, 0x00D9)); sleep 10; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += -25; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += -25; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 300.0); SetCamSpeed(0, 4.0); PanToTarget(0, 0, 1); @@ -938,34 +938,34 @@ EvtSource N(8024427C) = SCRIPT({ SetNpcFlagBits(NPC_WORLD_KLEVAR, ((NPC_FLAG_40000)), TRUE); spawn { loop 25 { - GetNpcPos(NPC_WORLD_KLEVAR, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - PlayEffect(0x11, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); + GetNpcPos(NPC_WORLD_KLEVAR, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + PlayEffect(0x11, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 20, 0, 0, 0, 0, 0, 0, 0, 0); sleep 4; } } spawn { - SI_VAR(2) = 0; - SI_VAR(3) = 1800; - MakeLerp(SI_VAR(2), SI_VAR(3), 100, 2); + EVT_VAR(2) = 0; + EVT_VAR(3) = 1800; + MakeLerp(EVT_VAR(2), EVT_VAR(3), 100, 2); loop { UpdateLerp(); - SetNpcRotation(NPC_WORLD_KLEVAR, 0, SI_VAR(0), 0); + SetNpcRotation(NPC_WORLD_KLEVAR, 0, EVT_VAR(0), 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } } spawn { - GetNpcPos(NPC_WORLD_KLEVAR, SI_VAR(2), SI_VAR(3), SI_VAR(4)); - SI_VAR(5) = SI_VAR(3); - SI_VAR(5) += 180; - MakeLerp(SI_VAR(3), SI_VAR(5), 100, 2); + GetNpcPos(NPC_WORLD_KLEVAR, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + EVT_VAR(5) = EVT_VAR(3); + EVT_VAR(5) += 180; + MakeLerp(EVT_VAR(3), EVT_VAR(5), 100, 2); loop { UpdateLerp(); - SetNpcPos(NPC_WORLD_KLEVAR, SI_VAR(2), SI_VAR(0), SI_VAR(4)); + SetNpcPos(NPC_WORLD_KLEVAR, EVT_VAR(2), EVT_VAR(0), EVT_VAR(4)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -979,17 +979,17 @@ EvtSource N(8024427C) = SCRIPT({ SetPlayerAnimation(0x1002A); sleep 110; SetPlayerAnimation(ANIM_10002); - SI_STORY_PROGRESS = STORY_CH6_STAR_SPRIT_DEPARTED; + EVT_STORY_PROGRESS = STORY_CH6_STAR_SPRIT_DEPARTED; await N(80243368); EnablePartnerAI(); DisablePlayerInput(FALSE); }); EvtSource N(init_80244BF4) = SCRIPT({ - GetLoadType(SI_VAR(1)); - if (SI_VAR(1) != 1) { - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 10) { + GetLoadType(EVT_VAR(1)); + if (EVT_VAR(1) != 1) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 10) { BindNpcIdle(NPC_SELF, N(idle_80244188)); spawn N(8024427C); } else { @@ -999,12 +999,12 @@ EvtSource N(init_80244BF4) = SCRIPT({ }); EvtSource N(interact_80244C98) = SCRIPT({ - if (SI_STORY_PROGRESS <= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_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)); } else { - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) == 8) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) == 8) { SpeakToPlayer(NPC_LAKILULU, NPC_ANIM_lakilulu_Palette_00_Anim_4, NPC_ANIM_lakilulu_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0032)); sleep 10; @@ -1021,7 +1021,7 @@ EvtSource N(interact_80244C98) = SCRIPT({ }); EvtSource N(init_80244DD0) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH6_BEGAN_PEACH_MISSION) { + if (EVT_STORY_PROGRESS >= STORY_CH6_BEGAN_PEACH_MISSION) { BindNpcInteract(NPC_SELF, N(interact_80244C98)); SetNpcCollisionSize(-1, 36, 28); SetNpcPos(NPC_SELF, -200, 15, -300); @@ -1320,11 +1320,11 @@ EvtSource N(80245EB8) = SCRIPT({ DisablePartnerAI(0); DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); - SI_VAR(0) = 230; - SI_VAR(1) = 0; - SI_VAR(2) = 350; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) = 230; + EVT_VAR(1) = 0; + EVT_VAR(2) = 350; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 90.0); SetCamPitch(0, 17.0, -10.0); SetCamDistance(0, 350); @@ -1467,67 +1467,67 @@ static s32 N(pad_684C) = { }; EvtSource N(80246850) = SCRIPT({ - SI_VAR(1) = (float) SI_VAR(0); - SI_VAR(1) -= -700.0; - SI_VAR(1) /= 100.0; - SI_VAR(2) = (float) SI_VAR(1); - SI_VAR(2) *= 100.0; - if (SI_VAR(2) > 100) { - SI_VAR(1) = 1.0; + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) -= -700.0; + EVT_VAR(1) /= 100.0; + EVT_VAR(2) = (float) EVT_VAR(1); + EVT_VAR(2) *= 100.0; + if (EVT_VAR(2) > 100) { + EVT_VAR(1) = 1.0; } - ScaleGroup(74, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(89, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(91, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(93, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(95, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(97, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(99, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(101, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(103, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(105, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(107, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(109, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(111, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(113, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(115, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(117, SI_VAR(1), 1, SI_VAR(1)); - ScaleModel(119, SI_VAR(1), 1, SI_VAR(1)); - TranslateGroup(74, 0, SI_VAR(0), 0); - TranslateModel(89, 0, SI_VAR(0), 0); - TranslateModel(91, 0, SI_VAR(0), 0); - TranslateModel(93, 0, SI_VAR(0), 0); - TranslateModel(95, 0, SI_VAR(0), 0); - TranslateModel(97, 0, SI_VAR(0), 0); - TranslateModel(99, 0, SI_VAR(0), 0); - TranslateModel(101, 0, SI_VAR(0), 0); - TranslateModel(103, 0, SI_VAR(0), 0); - TranslateModel(105, 0, SI_VAR(0), 0); - TranslateModel(107, 0, SI_VAR(0), 0); - TranslateModel(109, 0, SI_VAR(0), 0); - TranslateModel(111, 0, SI_VAR(0), 0); - TranslateModel(113, 0, SI_VAR(0), 0); - TranslateModel(115, 0, SI_VAR(0), 0); - TranslateModel(117, 0, SI_VAR(0), 0); - TranslateModel(119, 0, SI_VAR(0), 0); - SI_VAR(1) = (float) SI_VAR(0); - SI_VAR(1) *= -12.0; - RotateGroup(74, SI_VAR(1), 0, 1, 0); - RotateModel(89, SI_VAR(1), 0, 1, 0); - RotateModel(91, SI_VAR(1), 0, 1, 0); - RotateModel(93, SI_VAR(1), 0, 1, 0); - RotateModel(95, SI_VAR(1), 0, 1, 0); - RotateModel(97, SI_VAR(1), 0, 1, 0); - RotateModel(99, SI_VAR(1), 0, 1, 0); - RotateModel(101, SI_VAR(1), 0, 1, 0); - RotateModel(103, SI_VAR(1), 0, 1, 0); - RotateModel(105, SI_VAR(1), 0, 1, 0); - RotateModel(107, SI_VAR(1), 0, 1, 0); - RotateModel(109, SI_VAR(1), 0, 1, 0); - RotateModel(111, SI_VAR(1), 0, 1, 0); - RotateModel(113, SI_VAR(1), 0, 1, 0); - RotateModel(115, SI_VAR(1), 0, 1, 0); - RotateModel(117, SI_VAR(1), 0, 1, 0); - RotateModel(119, SI_VAR(1), 0, 1, 0); + ScaleGroup(74, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(89, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(91, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(93, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(95, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(97, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(99, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(101, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(103, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(105, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(107, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(109, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(111, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(113, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(115, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(117, EVT_VAR(1), 1, EVT_VAR(1)); + ScaleModel(119, EVT_VAR(1), 1, EVT_VAR(1)); + TranslateGroup(74, 0, EVT_VAR(0), 0); + TranslateModel(89, 0, EVT_VAR(0), 0); + TranslateModel(91, 0, EVT_VAR(0), 0); + TranslateModel(93, 0, EVT_VAR(0), 0); + TranslateModel(95, 0, EVT_VAR(0), 0); + TranslateModel(97, 0, EVT_VAR(0), 0); + TranslateModel(99, 0, EVT_VAR(0), 0); + TranslateModel(101, 0, EVT_VAR(0), 0); + TranslateModel(103, 0, EVT_VAR(0), 0); + TranslateModel(105, 0, EVT_VAR(0), 0); + TranslateModel(107, 0, EVT_VAR(0), 0); + TranslateModel(109, 0, EVT_VAR(0), 0); + TranslateModel(111, 0, EVT_VAR(0), 0); + TranslateModel(113, 0, EVT_VAR(0), 0); + TranslateModel(115, 0, EVT_VAR(0), 0); + TranslateModel(117, 0, EVT_VAR(0), 0); + TranslateModel(119, 0, EVT_VAR(0), 0); + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) *= -12.0; + RotateGroup(74, EVT_VAR(1), 0, 1, 0); + RotateModel(89, EVT_VAR(1), 0, 1, 0); + RotateModel(91, EVT_VAR(1), 0, 1, 0); + RotateModel(93, EVT_VAR(1), 0, 1, 0); + RotateModel(95, EVT_VAR(1), 0, 1, 0); + RotateModel(97, EVT_VAR(1), 0, 1, 0); + RotateModel(99, EVT_VAR(1), 0, 1, 0); + RotateModel(101, EVT_VAR(1), 0, 1, 0); + RotateModel(103, EVT_VAR(1), 0, 1, 0); + RotateModel(105, EVT_VAR(1), 0, 1, 0); + RotateModel(107, EVT_VAR(1), 0, 1, 0); + RotateModel(109, EVT_VAR(1), 0, 1, 0); + RotateModel(111, EVT_VAR(1), 0, 1, 0); + RotateModel(113, EVT_VAR(1), 0, 1, 0); + RotateModel(115, EVT_VAR(1), 0, 1, 0); + RotateModel(117, EVT_VAR(1), 0, 1, 0); + RotateModel(119, EVT_VAR(1), 0, 1, 0); TranslateModel(89, 8.1220703125, 56.1533203125, 1.166015625); TranslateModel(91, -6.8779296875, 91.1533203125, 1.166015625); TranslateModel(93, 13.1220703125, 106.1533203125, 1.166015625); @@ -1544,30 +1544,30 @@ EvtSource N(80246850) = SCRIPT({ TranslateModel(115, 8.0029296875, 536.2294921875, 0.947265625); TranslateModel(117, 12.998046875, 586.1533203125, 0.947265625); TranslateModel(119, -13.001953125, 631.1533203125, 0.947265625); - SI_VAR(1) = (float) SI_VAR(0); - SI_VAR(1) -= -700.0; - SI_VAR(1) /= 300.0; - SI_VAR(2) = (float) SI_VAR(1); - SI_VAR(2) *= 100.0; - if (SI_VAR(2) > 100) { - SI_VAR(1) = 1.0; + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) -= -700.0; + EVT_VAR(1) /= 300.0; + EVT_VAR(2) = (float) EVT_VAR(1); + EVT_VAR(2) *= 100.0; + if (EVT_VAR(2) > 100) { + EVT_VAR(1) = 1.0; } - ScaleModel(89, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(91, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(93, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(95, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(97, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(99, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(101, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(103, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(105, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(107, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(109, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(111, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(113, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(115, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(117, SI_VAR(1), SI_VAR(1), SI_VAR(1)); - ScaleModel(119, SI_VAR(1), SI_VAR(1), SI_VAR(1)); + ScaleModel(89, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(91, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(93, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(95, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(97, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(99, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(101, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(103, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(105, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(107, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(109, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(111, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(113, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(115, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(117, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); + ScaleModel(119, EVT_VAR(1), EVT_VAR(1), EVT_VAR(1)); TranslateModel(89, -8.12109375, -56.15234375, -1.1650390625); TranslateModel(91, 6.87890625, -91.15234375, -1.1650390625); TranslateModel(93, -13.12109375, -106.15234375, -1.1650390625); @@ -1587,112 +1587,112 @@ EvtSource N(80246850) = SCRIPT({ }); EvtSource N(80247488) = SCRIPT({ - SI_VAR(1) = (float) SI_VAR(0); - SI_VAR(1) -= -700.0; - SI_VAR(1) /= 100.0; - SI_VAR(2) = (float) SI_VAR(1); - SI_VAR(2) *= 100.0; - if (SI_VAR(2) > 100) { - SI_VAR(1) = 1.0; + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) -= -700.0; + EVT_VAR(1) /= 100.0; + EVT_VAR(2) = (float) EVT_VAR(1); + EVT_VAR(2) *= 100.0; + if (EVT_VAR(2) > 100) { + EVT_VAR(1) = 1.0; } - ScaleGroup(79, SI_VAR(1), 1, SI_VAR(1)); - TranslateGroup(79, 0, SI_VAR(0), 0); - SI_VAR(1) = (float) SI_VAR(0); - SI_VAR(1) *= -12.0; - RotateGroup(79, SI_VAR(1), 0, 1, 0); + ScaleGroup(79, EVT_VAR(1), 1, EVT_VAR(1)); + TranslateGroup(79, 0, EVT_VAR(0), 0); + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) *= -12.0; + RotateGroup(79, EVT_VAR(1), 0, 1, 0); }); 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); - SI_VAR(1) = (float) SI_VAR(0); - SI_VAR(1) *= 90.0; - RotateModel(83, SI_VAR(1), 0, 0, -1); - RotateModel(85, SI_VAR(1), 0, 0, 1); + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) *= 90.0; + RotateModel(83, EVT_VAR(1), 0, 0, -1); + RotateModel(85, EVT_VAR(1), 0, 0, 1); TranslateModel(83, -9.5, -12.0, -15.0); TranslateModel(85, 9.5, -12.0, -15.0); TranslateModel(87, 0.0, 0.0, -17.0); - ScaleModel(83, SI_VAR(0), SI_VAR(0), SI_VAR(0)); - ScaleModel(85, SI_VAR(0), SI_VAR(0), SI_VAR(0)); - ScaleModel(87, SI_VAR(0), SI_VAR(0), SI_VAR(0)); + ScaleModel(83, EVT_VAR(0), EVT_VAR(0), EVT_VAR(0)); + ScaleModel(85, EVT_VAR(0), EVT_VAR(0), EVT_VAR(0)); + ScaleModel(87, EVT_VAR(0), EVT_VAR(0), EVT_VAR(0)); }); 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; - SI_VAR(1) += -90.0; - RotateModel(81, SI_VAR(1), 1, 0, 0); + ScaleModel(81, EVT_VAR(0), EVT_VAR(0), EVT_VAR(0)); + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) *= 90.0; + EVT_VAR(1) += -90.0; + RotateModel(81, EVT_VAR(1), 1, 0, 0); }); 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); - RotateModel(81, SI_VAR(1), 0, 1, 0); + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) *= -3.0; + TranslateModel(81, -0.259765625, EVT_VAR(0), 1.4775390625); + RotateModel(81, EVT_VAR(1), 0, 1, 0); UpdateColliderTransform(46); }); const char N(flo_19_name_hack)[]; EvtSource N(802477EC) = SCRIPT({ - if (SI_AREA_FLAG(44) == 0) { + if (EVT_AREA_FLAG(44) == 0) { DisablePlayerInput(TRUE); func_802D2B6C(); sleep 15; DisablePartnerAI(0); - SI_AREA_FLAG(44) = 1; + EVT_AREA_FLAG(44) = 1; ModifyColliderFlags(0, 47, 0x7FFFFE00); ModifyColliderFlags(0, 48, 0x7FFFFE00); - SI_VAR(9) = (int) -59.0; - SI_VAR(10) = (int) 22.0; - SI_VAR(11) = (int) 125.0; - SI_VAR(12) = (int) -55.0; - SI_VAR(13) = (int) 24.0; - SI_VAR(14) = (int) 145.0; - PlayerMoveTo(SI_VAR(9), SI_VAR(11), 8); + EVT_VAR(9) = (int) -59.0; + EVT_VAR(10) = (int) 22.0; + EVT_VAR(11) = (int) 125.0; + EVT_VAR(12) = (int) -55.0; + EVT_VAR(13) = (int) 24.0; + EVT_VAR(14) = (int) 145.0; + PlayerMoveTo(EVT_VAR(9), EVT_VAR(11), 8); SetNpcJumpscale(NPC_PARTNER, 0.0); - NpcJump0(NPC_PARTNER, SI_VAR(12), SI_VAR(13), SI_VAR(14), 5); + NpcJump0(NPC_PARTNER, EVT_VAR(12), EVT_VAR(13), EVT_VAR(14), 5); PlaySound(0x19C); SetMusicTrack(0, SONG_MAGIC_BEANSTALK, 1, 8); SetNpcAnimation(NPC_PARTNER, 0x106); SetPlayerAnimation(ANIM_WALKING); - N(func_80240F10_C9EE30)(SI_VAR(3), SI_VAR(4)); - match SI_VAR(4) { + N(func_80240F10_C9EE30)(EVT_VAR(3), EVT_VAR(4)); + match EVT_VAR(4) { < 90 { - SI_AREA_FLAG(16) = 0; + EVT_AREA_FLAG(16) = 0; InterpPlayerYaw(90, 0); InterpNpcYaw(NPC_PARTNER, 90, 0); } >= 270 { - SI_AREA_FLAG(16) = 1; + EVT_AREA_FLAG(16) = 1; InterpPlayerYaw(270, 0); InterpNpcYaw(NPC_PARTNER, 270, 0); } } TranslateModel(81, -0.259765625, 2.0, 1.4775390625); UpdateColliderTransform(46); - SI_MAP_VAR(10) = 0; + EVT_MAP_VAR(10) = 0; spawn { - SI_VAR(15) = 0; + EVT_VAR(15) = 0; loop { - SI_VAR(15) += 1; - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(0), 0, 700, 800, 0, 0); + EVT_VAR(15) += 1; + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(0), 0, 700, 800, 0, 0); spawn N(80247770); - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(2) *= -3.0; - SI_VAR(3) = (float) SI_VAR(0); + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(2) *= -3.0; + EVT_VAR(3) = (float) EVT_VAR(0); N(func_80240F80_C9EEA0)(); N(func_802410B4_C9EFD4)(); - if (SI_VAR(15) == 350) { - SI_MAP_VAR(10) = 1; + if (EVT_VAR(15) == 350) { + EVT_MAP_VAR(10) = 1; } sleep 1; } } 10: - if (SI_MAP_VAR(10) == 0) { + if (EVT_MAP_VAR(10) == 0) { sleep 1; goto 10; } @@ -1706,22 +1706,22 @@ EvtSource N(80247BCC) = SCRIPT({ SetPlayerActionState(10); ModifyColliderFlags(0, 47, 0x7FFFFE00); ModifyColliderFlags(0, 48, 0x7FFFFE00); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); - SI_VAR(9) = (int) -59.0; - SI_VAR(10) = (int) 22.0; - SI_VAR(11) = (int) 125.0; - SI_VAR(12) = (int) -55.0; - SI_VAR(13) = (int) 23.0; - SI_VAR(14) = (int) 145.0; + EVT_VAR(9) = (int) -59.0; + EVT_VAR(10) = (int) 22.0; + EVT_VAR(11) = (int) 125.0; + EVT_VAR(12) = (int) -55.0; + EVT_VAR(13) = (int) 23.0; + EVT_VAR(14) = (int) 145.0; spawn { sleep 5; SetNpcAnimation(NPC_PARTNER, 0x106); SetPlayerAnimation(ANIM_WALKING); - match SI_AREA_FLAG(16) { + match EVT_AREA_FLAG(16) { == 0 { InterpPlayerYaw(90, 0); InterpNpcYaw(NPC_PARTNER, 90, 0); @@ -1734,14 +1734,14 @@ EvtSource N(80247BCC) = SCRIPT({ } TranslateModel(81, -0.259765625, 2.0, 1.4775390625); UpdateColliderTransform(46); - SI_VAR(15) = 0; + EVT_VAR(15) = 0; loop 120 { - SI_VAR(15) += 1; - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(0), 70, 0, 120, 0, 0); + EVT_VAR(15) += 1; + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(0), 70, 0, 120, 0, 0); spawn N(80247770); - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(2) *= -3.0; - SI_VAR(3) = (float) SI_VAR(0); + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(2) *= -3.0; + EVT_VAR(3) = (float) EVT_VAR(0); N(func_80240F80_C9EEA0)(); N(func_802410B4_C9EFD4)(); sleep 1; @@ -1755,7 +1755,7 @@ EvtSource N(80247BCC) = SCRIPT({ sleep 5; ModifyColliderFlags(1, 47, 0x7FFFFE00); ModifyColliderFlags(1, 48, 0x7FFFFE00); - SI_AREA_FLAG(44) = 0; + EVT_AREA_FLAG(44) = 0; StopSound(413); await N(802414D0); ResetCam(0, 1.0); @@ -1764,37 +1764,37 @@ EvtSource N(80247BCC) = SCRIPT({ EvtSource N(80247FAC) = SCRIPT({ PlaySoundAtCollider(47, 411, 0); - SI_VAR(15) = 0; + EVT_VAR(15) = 0; loop 100 { - SI_VAR(15) += 1; - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(0), 0, 1.0, 100, 0, 0); + EVT_VAR(15) += 1; + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(0), 0, 1.0, 100, 0, 0); spawn N(80247588); sleep 1; } - SI_MAP_VAR(10) = 0; + EVT_MAP_VAR(10) = 0; spawn { - SI_VAR(15) = 0; + EVT_VAR(15) = 0; loop 1200 { - SI_VAR(15) += 1; - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(0), -700, 0, 1200, 0, 0); - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(2) *= 1.0; - SI_VAR(0) = (float) SI_VAR(2); + EVT_VAR(15) += 1; + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(0), -700, 0, 1200, 0, 0); + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(2) *= 1.0; + EVT_VAR(0) = (float) EVT_VAR(2); spawn N(80246850); - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(2) *= 1.0; - SI_VAR(0) = (float) SI_VAR(2); + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(2) *= 1.0; + EVT_VAR(0) = (float) EVT_VAR(2); spawn N(80247488); - match SI_VAR(15) { + match EVT_VAR(15) { == 200 { SetPlayerAnimation(0x1002A); } == 250 { - SI_VAR(0) = -60; - SI_VAR(1) = 0; - SI_VAR(2) = 65; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) = -60; + EVT_VAR(1) = 0; + EVT_VAR(2) = 65; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 90.0); SetCamPitch(0, 12.5, -7.0); SetCamDistance(0, 800); @@ -1805,14 +1805,14 @@ EvtSource N(80247FAC) = SCRIPT({ } else { } } - if (SI_VAR(15) > 550) { - SI_MAP_VAR(10) = 1; + if (EVT_VAR(15) > 550) { + EVT_MAP_VAR(10) = 1; } sleep 1; } } 10: - if (SI_MAP_VAR(10) == 0) { + if (EVT_MAP_VAR(10) == 0) { sleep 1; goto 10; } @@ -1828,11 +1828,11 @@ EvtSource N(8024834C) = SCRIPT({ SetPlayerPos(-60, 0, 30); NpcFacePlayer(NPC_PARTNER, 1); SetNpcPos(NPC_PARTNER, -20, 0, 10); - SI_VAR(0) = -60; - SI_VAR(1) = 0; - SI_VAR(2) = 65; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) = -60; + EVT_VAR(1) = 0; + EVT_VAR(2) = 65; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 90.0); SetCamPitch(0, 12.5, -7.0); SetCamDistance(0, 800); @@ -1840,10 +1840,10 @@ EvtSource N(8024834C) = SCRIPT({ SetCamPosB(0, 0, -300); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); - SI_VAR(15) = 0; + EVT_VAR(15) = 0; loop 5 { - SI_VAR(15) += 20; - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(0), 0.0, 1.0, 100, 0, 0); + EVT_VAR(15) += 20; + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(0), 0.0, 1.0, 100, 0, 0); spawn N(802476F4); sleep 1; } @@ -1865,13 +1865,13 @@ EvtSource N(802485A8) = SCRIPT({ func_802D2884(-85, 85, 0); func_802CF56C(2); DisablePlayerInput(FALSE); - if (SI_SAVE_FLAG(1371) == 0) { + if (EVT_SAVE_FLAG(1371) == 0) { group 0; SetTimeFreezeMode(1); 10: ShowKeyChoicePopup(); - SI_VAR(2) = SI_VAR(0); - match SI_VAR(2) { + EVT_VAR(2) = EVT_VAR(0); + match EVT_VAR(2) { <= 0 { CloseChoicePopup(); SetTimeFreezeMode(0); @@ -1881,16 +1881,16 @@ EvtSource N(802485A8) = SCRIPT({ == 89 { SetPlayerAnimation(0x60006); sleep 5; - RemoveKeyItemAt(SI_VAR(1)); + RemoveKeyItemAt(EVT_VAR(1)); MakeItemEntity(ITEM_FERTILE_SOIL, -83, 0, 87, 1, 0); - SI_MAP_VAR(11) = SI_VAR(0); + EVT_MAP_VAR(11) = EVT_VAR(0); SetPlayerAnimation(ANIM_STAND_STILL); sleep 20; } else { - match SI_AREA_FLAG(17) { + match EVT_AREA_FLAG(17) { == 0 { ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x0008), 0, 10, -200); - SI_AREA_FLAG(17) = 1; + EVT_AREA_FLAG(17) = 1; } else { ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x0009), 0, 10, -200); } @@ -1899,18 +1899,18 @@ EvtSource N(802485A8) = SCRIPT({ } DisablePlayerInput(FALSE); DisablePlayerPhysics(FALSE); - if (SI_VAR(2) != 89) { + if (EVT_VAR(2) != 89) { goto 10; } - SI_SAVE_FLAG(1371) = 1; + EVT_SAVE_FLAG(1371) = 1; } - if (SI_SAVE_FLAG(1372) == 0) { + if (EVT_SAVE_FLAG(1372) == 0) { group 0; SetTimeFreezeMode(1); 20: ShowKeyChoicePopup(); - SI_VAR(2) = SI_VAR(0); - match SI_VAR(2) { + EVT_VAR(2) = EVT_VAR(0); + match EVT_VAR(2) { <= 0 { CloseChoicePopup(); SetTimeFreezeMode(0); @@ -1918,20 +1918,20 @@ EvtSource N(802485A8) = SCRIPT({ return; } == 88 { - RemoveItemEntity(SI_MAP_VAR(11)); + RemoveItemEntity(EVT_MAP_VAR(11)); sleep 5; SetPlayerAnimation(0x60006); sleep 5; - RemoveKeyItemAt(SI_VAR(1)); + RemoveKeyItemAt(EVT_VAR(1)); MakeItemEntity(ITEM_MAGICAL_BEAN, -83, 0, 87, 1, 0); - SI_MAP_VAR(11) = SI_VAR(0); + EVT_MAP_VAR(11) = EVT_VAR(0); SetPlayerAnimation(ANIM_STAND_STILL); sleep 20; } else { - match SI_AREA_FLAG(17) { + match EVT_AREA_FLAG(17) { == 0 { ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x0008), 0, 10, -200); - SI_AREA_FLAG(17) = 1; + EVT_AREA_FLAG(17) = 1; } else { ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x0009), 0, 10, -200); } @@ -1940,17 +1940,17 @@ EvtSource N(802485A8) = SCRIPT({ } DisablePlayerInput(FALSE); DisablePlayerPhysics(FALSE); - if (SI_VAR(2) != 88) { + if (EVT_VAR(2) != 88) { goto 20; } - SI_SAVE_FLAG(1372) = 1; + EVT_SAVE_FLAG(1372) = 1; } group 0; SetTimeFreezeMode(1); 30: ShowKeyChoicePopup(); - SI_VAR(2) = SI_VAR(0); - match SI_VAR(2) { + EVT_VAR(2) = EVT_VAR(0); + match EVT_VAR(2) { <= 0 { CloseChoicePopup(); SetTimeFreezeMode(0); @@ -1958,17 +1958,17 @@ EvtSource N(802485A8) = SCRIPT({ return; } == 90 { - RemoveItemEntity(SI_MAP_VAR(11)); + RemoveItemEntity(EVT_MAP_VAR(11)); sleep 5; SetPlayerAnimation(0x60006); sleep 5; - RemoveKeyItemAt(SI_VAR(1)); + RemoveKeyItemAt(EVT_VAR(1)); N(SyncStatusMenu)(); MakeItemEntity(ITEM_MIRACLE_WATER, -83, 0, 87, 1, 0); - SI_MAP_VAR(11) = SI_VAR(0); + EVT_MAP_VAR(11) = EVT_VAR(0); SetPlayerAnimation(ANIM_STAND_STILL); sleep 30; - RemoveItemEntity(SI_MAP_VAR(11)); + RemoveItemEntity(EVT_MAP_VAR(11)); sleep 30; ModifyColliderFlags(0, 47, 0x7FFFFE00); PlayerMoveTo(-60, 30, 20); @@ -1989,24 +1989,24 @@ EvtSource N(802485A8) = SCRIPT({ await N(80247FAC); } } - if (SI_VAR(2) != 90) { + if (EVT_VAR(2) != 90) { goto 30; } }); EvtSource N(80248D3C) = SCRIPT({ 0: - IsPlayerWithin(-85, 85, 20, SI_VAR(0)); - if (SI_VAR(0) == 0) { + IsPlayerWithin(-85, 85, 20, EVT_VAR(0)); + if (EVT_VAR(0) == 0) { return; } else { - IsPlayerOnValidFloor(SI_VAR(0)); - if (SI_VAR(0) == 0) { + IsPlayerOnValidFloor(EVT_VAR(0)); + if (EVT_VAR(0) == 0) { sleep 1; goto 0; } - GetCurrentPartner(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartner(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { return; } } @@ -2016,20 +2016,20 @@ EvtSource N(80248D3C) = SCRIPT({ }); EvtSource N(80248E30) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_GREW_MAGIC_BEANSTALK) { + if (EVT_STORY_PROGRESS < STORY_CH6_GREW_MAGIC_BEANSTALK) { loop { sleep 1; - if (SI_STORY_PROGRESS == STORY_CH6_WISTERWOOD_GAVE_HINT) { + if (EVT_STORY_PROGRESS == STORY_CH6_WISTERWOOD_GAVE_HINT) { break; } } - if (SI_SAVE_FLAG(1371) == 1) { - if (SI_SAVE_FLAG(1372) == 0) { + if (EVT_SAVE_FLAG(1371) == 1) { + if (EVT_SAVE_FLAG(1372) == 0) { MakeItemEntity(ITEM_FERTILE_SOIL, -83, 0, 87, 1, 0); } else { MakeItemEntity(ITEM_MAGICAL_BEAN, -83, 0, 87, 1, 0); } - SI_MAP_VAR(11) = SI_VAR(0); + EVT_MAP_VAR(11) = EVT_VAR(0); } bind_padlock N(80248D3C) 0x10 0 N(itemList_80248598); } @@ -2039,30 +2039,30 @@ EvtSource N(80248F48) = SCRIPT({ bind N(802477EC) TRIGGER_FLOOR_TOUCH 46; EnableGroup(121, 1); EnableGroup(80, 1); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { == STORY_CH6_WISTERWOOD_GAVE_HINT { - SI_VAR(0) = -700; + EVT_VAR(0) = -700; spawn N(80246850); spawn N(80247488); - SI_VAR(0) = 0; + EVT_VAR(0) = 0; spawn N(80247588); - SI_VAR(0) = 0; + EVT_VAR(0) = 0; spawn N(802476F4); ModifyColliderFlags(0, 46, 0x7FFFFE00); ModifyColliderFlags(0, 47, 0x7FFFFE00); } >= STORY_CH6_GREW_MAGIC_BEANSTALK { - SI_VAR(0) = 1; + EVT_VAR(0) = 1; spawn N(80247588); - SI_VAR(0) = 1; + EVT_VAR(0) = 1; spawn N(802476F4); } else { - SI_VAR(0) = -700; + EVT_VAR(0) = -700; spawn N(80246850); spawn N(80247488); - SI_VAR(0) = 0; + EVT_VAR(0) = 0; spawn N(80247588); - SI_VAR(0) = 0; + EVT_VAR(0) = 0; spawn N(802476F4); ModifyColliderFlags(0, 46, 0x7FFFFE00); ModifyColliderFlags(0, 47, 0x7FFFFE00); @@ -2075,7 +2075,7 @@ static s32 N(pad_9128)[] = { }; EvtSource N(makeEntities) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_EPILOGUE) { + if (EVT_STORY_PROGRESS < STORY_EPILOGUE) { MakeEntity(0x802E9A18, 110, 60, -100, 0, MAKE_ENTITY_END); } }); diff --git a/src/world/area_flo/flo_03/CA72E0.c b/src/world/area_flo/flo_03/CA72E0.c index c988496cbf..32f2048ab5 100644 --- a/src/world/area_flo/flo_03/CA72E0.c +++ b/src/world/area_flo/flo_03/CA72E0.c @@ -28,13 +28,13 @@ MapConfig N(config) = { }; EvtSource N(802406A0) = SCRIPT({ - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 2) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 2) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); } else { - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { <= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { - if (SI_SAVE_FLAG(1411) == 0) { + if (EVT_SAVE_FLAG(1411) == 0) { SetMusicTrack(0, SONG_MONTY_MOLE_ASSAULT, 0, 8); } else { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); @@ -50,16 +50,16 @@ EvtSource N(802406A0) = SCRIPT({ }); EvtSource N(802407C0) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { - if (SI_SAVE_FLAG(1411) == 1) { + if (EVT_STORY_PROGRESS >= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + if (EVT_SAVE_FLAG(1411) == 1) { PushSong(137, 0); } } }); EvtSource N(80240814) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { - if (SI_SAVE_FLAG(1411) == 1) { + if (EVT_STORY_PROGRESS >= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + if (EVT_SAVE_FLAG(1411) == 1) { FadeOutMusic(0, 250); sleep 10; PopSong(); @@ -69,40 +69,40 @@ EvtSource N(80240814) = SCRIPT({ EvtSource N(80240880) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -116,43 +116,43 @@ EvtSource N(80240BE4) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - SI_AREA_FLAG(27) = 0; - SI_AREA_FLAG(28) = 0; - SI_AREA_VAR(1) = 0; + EVT_AREA_FLAG(27) = 0; + EVT_AREA_FLAG(28) = 0; + EVT_AREA_VAR(1) = 0; MakeNpcs(0, N(npcGroupList_8024442C)); await N(makeEntities); await N(80241EF4); spawn N(80244E54); spawn N(80244ED0); ModifyColliderFlags(3, 9, 0x00000006); - SI_VAR(0) = -145; - SI_VAR(1) = -335; - SI_VAR(2) = 182; - SI_VAR(3) = -180; - SI_VAR(4) = 0; + EVT_VAR(0) = -145; + EVT_VAR(1) = -335; + EVT_VAR(2) = 182; + EVT_VAR(3) = -180; + EVT_VAR(4) = 0; spawn N(80240880); - SI_VAR(0) = 200; - SI_VAR(1) = -170; - SI_VAR(2) = 310; - SI_VAR(3) = 150; - SI_VAR(4) = 0; + EVT_VAR(0) = 200; + EVT_VAR(1) = -170; + EVT_VAR(2) = 310; + EVT_VAR(3) = 150; + EVT_VAR(4) = 0; spawn N(80240880); - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 2) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 2) { spawn N(80240FFC); } else { ModifyColliderFlags(0, 1, 0x7FFFFE00); - SI_VAR(0) = N(80240BE4); + EVT_VAR(0) = N(80240BE4); spawn EnterWalk; } await N(802406A0); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CA72A0)(); } }); @@ -176,12 +176,12 @@ NpcSettings N(npcSettings_80240EDC) = { s32** N(D_80240F08_CA81A8) = NULL; EvtSource N(80240F0C) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 0); + ShowGotItem(EVT_VAR(0), 1, 0); return; }); EvtSource N(80240F3C) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 16); + ShowGotItem(EVT_VAR(0), 1, 16); return; }); @@ -209,9 +209,9 @@ EvtSource N(80240FFC) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); SetNpcYaw(NPC_PETUNIA, 90); - GetNpcPos(NPC_PETUNIA, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_PETUNIA, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 300); SetCamPitch(0, 17.0, -9.5); SetCamPosA(0, -27, 0); @@ -232,10 +232,10 @@ EvtSource N(npcAI_8024119C) = SCRIPT({ }); EvtSource N(defeat_802411B8) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - SI_SAVE_FLAG(1366) = 1; + EVT_SAVE_FLAG(1366) = 1; DoNpcDefeat(); } == 1 {} @@ -245,19 +245,19 @@ EvtSource N(defeat_802411B8) = 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); - SI_VAR(0) /= 2; - SetCamProperties(0, SI_VAR(4), SI_VAR(0), SI_VAR(1), SI_VAR(2), 300, 20.0, -9.5); + GetPlayerPos(EVT_VAR(3), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += EVT_VAR(3); + EVT_VAR(0) /= 2; + SetCamProperties(0, EVT_VAR(4), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 300, 20.0, -9.5); }); EvtSource N(interact_802412BC) = SCRIPT({ await N(802407C0); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { - SI_MAP_VAR(14) = 1; - SI_VAR(4) = (int) 3.5; + EVT_MAP_VAR(14) = 1; + EVT_VAR(4) = (int) 3.5; await N(8024122C); SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_7, NPC_ANIM_petunia_Palette_00_Anim_6, 0, MESSAGE_ID(0x11, 0x0050)); SetNpcAnimation(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_6); @@ -266,9 +266,9 @@ EvtSource N(interact_802412BC) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_7, NPC_ANIM_petunia_Palette_00_Anim_6, 0, MESSAGE_ID(0x11, 0x0051)); SetNpcAnimation(NPC_MONTY_MOLE0, NPC_ANIM_monty_mole_Palette_01_Anim_12); SetNpcYaw(NPC_MONTY_MOLE0, 270); - GetNpcPos(NPC_MONTY_MOLE0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_MONTY_MOLE0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 90.0); SetCamPitch(0, 17.0, -8.0); SetCamDistance(0, 200); @@ -280,12 +280,12 @@ EvtSource N(interact_802412BC) = SCRIPT({ sleep 10; PlaySoundAtNpc(NPC_MONTY_MOLE0, 0x263, 0); ShowEmote(2, EMOTE_QUESTION, -45, 30, 1, 0, 0, 0, 0); - GetNpcPos(NPC_MONTY_MOLE1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_MONTY_MOLE1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_7, NPC_ANIM_petunia_Palette_00_Anim_6, 0, MESSAGE_ID(0x11, 0x0052)); SetNpcYaw(NPC_MONTY_MOLE1, 90); SetNpcPos(NPC_MONTY_MOLE1, 0, -1000, 0); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 200); SetCamPitch(0, 17.0, -8.0); PanToTarget(0, 0, 1); @@ -293,14 +293,14 @@ EvtSource N(interact_802412BC) = SCRIPT({ SetNpcAnimation(NPC_MONTY_MOLE1, NPC_ANIM_monty_mole_Palette_01_Anim_0); sleep 20; PlaySoundAtNpc(NPC_MONTY_MOLE1, SOUND_MOLE_SURFACE, 0); - SetNpcPos(NPC_MONTY_MOLE1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetNpcPos(NPC_MONTY_MOLE1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetNpcAnimation(NPC_MONTY_MOLE1, NPC_ANIM_monty_mole_Palette_01_Anim_10); sleep 20; SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_7, NPC_ANIM_petunia_Palette_00_Anim_6, 0, MESSAGE_ID(0x11, 0x0053)); SetNpcYaw(NPC_MONTY_MOLE2, 270); - GetNpcPos(NPC_MONTY_MOLE2, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_MONTY_MOLE2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 200); SetCamPitch(0, 17.0, -8.0); PanToTarget(0, 0, 1); @@ -309,9 +309,9 @@ EvtSource N(interact_802412BC) = SCRIPT({ SetNpcAnimation(NPC_MONTY_MOLE2, NPC_ANIM_monty_mole_Palette_01_Anim_14); SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_7, NPC_ANIM_petunia_Palette_00_Anim_6, 0, MESSAGE_ID(0x11, 0x0054)); SetNpcYaw(NPC_MONTY_MOLE3, 270); - GetNpcPos(NPC_MONTY_MOLE3, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_MONTY_MOLE3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 200); SetCamPitch(0, 17.0, -9.0); PanToTarget(0, 0, 1); @@ -325,9 +325,9 @@ EvtSource N(interact_802412BC) = SCRIPT({ SetNpcAnimation(NPC_MONTY_MOLE3, NPC_ANIM_monty_mole_Palette_01_Anim_16); SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_7, NPC_ANIM_petunia_Palette_00_Anim_6, 0, MESSAGE_ID(0x11, 0x0055)); SetNpcPos(NPC_DAYZEE, -233, 0, -217); - GetNpcPos(NPC_DAYZEE, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_DAYZEE, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 300); SetCamPitch(0, 17.0, -9.0); PanToTarget(0, 0, 1); @@ -337,7 +337,7 @@ EvtSource N(interact_802412BC) = SCRIPT({ ShowEmote(1, EMOTE_EXCLAMATION, 45, 30, 1, 0, 0, 0, 0); sleep 15; SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_7, NPC_ANIM_petunia_Palette_00_Anim_6, 0, MESSAGE_ID(0x11, 0x0056)); - SI_VAR(4) = (int) 90.0; + EVT_VAR(4) = (int) 90.0; await N(8024122C); SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_7, NPC_ANIM_petunia_Palette_00_Anim_6, 0, MESSAGE_ID(0x11, 0x0057)); SetEnemyFlagBits(1, 1, 0); @@ -346,17 +346,17 @@ EvtSource N(interact_802412BC) = SCRIPT({ SetEnemyFlagBits(4, 1, 0); SetEnemyFlagBits(5, 1, 0); BindNpcAI(NPC_DAYZEE, N(npcAI_8024119C)); - SI_MAP_VAR(14) = 0; - SI_MAP_VAR(15) = 60; - SI_STORY_PROGRESS = STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES; + EVT_MAP_VAR(14) = 0; + EVT_MAP_VAR(15) = 60; + EVT_STORY_PROGRESS = STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES; } == STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { - if (SI_SAVE_FLAG(1411) == 0) { + if (EVT_SAVE_FLAG(1411) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_7, NPC_ANIM_petunia_Palette_00_Anim_6, 0, MESSAGE_ID(0x11, 0x0058)); SetNpcAnimation(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_6); } else { - SI_VAR(4) = (int) 3.5; + EVT_VAR(4) = (int) 3.5; await N(8024122C); SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_8, NPC_ANIM_petunia_Palette_00_Anim_3, 0, MESSAGE_ID(0x11, 0x0059)); @@ -364,15 +364,15 @@ EvtSource N(interact_802412BC) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_4); sleep 20; SetNpcAnimation(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_1); - SI_VAR(0) = 88; - SI_VAR(1) = 1; + EVT_VAR(0) = 88; + EVT_VAR(1) = 1; await N(80240F0C); AddKeyItem(ITEM_MAGICAL_BEAN); sleep 20; SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_2, NPC_ANIM_petunia_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x005A)); EndSpeech(-1, NPC_ANIM_petunia_Palette_00_Anim_7, NPC_ANIM_petunia_Palette_00_Anim_6, 0); - SI_STORY_PROGRESS = STORY_CH6_GOT_MAGICAL_BEAN; + EVT_STORY_PROGRESS = STORY_CH6_GOT_MAGICAL_BEAN; } } < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { @@ -381,10 +381,10 @@ EvtSource N(interact_802412BC) = SCRIPT({ < STORY_CH6_RETURNED_TO_TOAD_TOWN { SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_2, NPC_ANIM_petunia_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x005C)); } else { - if (SI_AREA_VAR(1) == 0) { + if (EVT_AREA_VAR(1) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_2, NPC_ANIM_petunia_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x005D)); - SI_AREA_VAR(1) = 1; + EVT_AREA_VAR(1) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_2, NPC_ANIM_petunia_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x005E)); @@ -397,7 +397,7 @@ EvtSource N(interact_802412BC) = SCRIPT({ EvtSource N(init_80241DA4) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_802412BC)); - if (SI_SAVE_FLAG(1411) == 0) { + if (EVT_SAVE_FLAG(1411) == 0) { SetNpcAnimation(NPC_PETUNIA, NPC_ANIM_petunia_Palette_00_Anim_6); } else { SetNpcAnimation(NPC_PETUNIA, NPC_ANIM_petunia_Palette_00_Anim_1); @@ -407,11 +407,11 @@ EvtSource N(init_80241DA4) = SCRIPT({ EvtSource N(init_80241E10) = SCRIPT({ BindNpcDefeat(NPC_SELF, N(defeat_802411B8)); EnableNpcShadow(NPC_DAYZEE, FALSE); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { SetNpcPos(NPC_DAYZEE, 0, -1000, 0); } else { - if (SI_SAVE_FLAG(1366) == 0) { + if (EVT_SAVE_FLAG(1366) == 0) { SetEnemyFlagBits(1, 1, 0); BindNpcIdle(NPC_SELF, N(npcAI_8024119C)); } else { @@ -422,43 +422,43 @@ EvtSource N(init_80241E10) = SCRIPT({ }); EvtSource N(80241EF4) = SCRIPT({ - SI_MAP_VAR(14) = 0; - SI_MAP_VAR(10) = 0; - SI_MAP_VAR(11) = 0; - SI_MAP_VAR(12) = 0; - SI_MAP_VAR(13) = 0; - SI_MAP_VAR(15) = 100; + EVT_MAP_VAR(14) = 0; + EVT_MAP_VAR(10) = 0; + EVT_MAP_VAR(11) = 0; + EVT_MAP_VAR(12) = 0; + EVT_MAP_VAR(13) = 0; + EVT_MAP_VAR(15) = 100; }); EvtSource N(defeat_80241F64) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - GetSelfNpcID(SI_VAR(0)); - match SI_VAR(0) { + GetSelfNpcID(EVT_VAR(0)); + match EVT_VAR(0) { == 2 { - SI_SAVE_FLAG(1367) = 1; + EVT_SAVE_FLAG(1367) = 1; } == 3 { - SI_SAVE_FLAG(1368) = 1; + EVT_SAVE_FLAG(1368) = 1; } == 4 { - SI_SAVE_FLAG(1369) = 1; + EVT_SAVE_FLAG(1369) = 1; } == 5 { - SI_SAVE_FLAG(1370) = 1; + EVT_SAVE_FLAG(1370) = 1; } } - SI_VAR(0) = 0; - SI_VAR(0) += SI_SAVE_FLAG(1367); - SI_VAR(0) += SI_SAVE_FLAG(1368); - SI_VAR(0) += SI_SAVE_FLAG(1369); - SI_VAR(0) += SI_SAVE_FLAG(1370); - if (SI_VAR(0) != 4) { + EVT_VAR(0) = 0; + EVT_VAR(0) += EVT_SAVE_FLAG(1367); + EVT_VAR(0) += EVT_SAVE_FLAG(1368); + EVT_VAR(0) += EVT_SAVE_FLAG(1369); + EVT_VAR(0) += EVT_SAVE_FLAG(1370); + if (EVT_VAR(0) != 4) { SetNpcAnimation(NPC_PETUNIA, NPC_ANIM_petunia_Palette_00_Anim_6); } else { SetNpcAnimation(NPC_PETUNIA, NPC_ANIM_petunia_Palette_00_Anim_1); - SI_SAVE_FLAG(1411) = 1; + EVT_SAVE_FLAG(1411) = 1; await N(802406A0); } DoNpcDefeat(); @@ -473,9 +473,9 @@ EvtSource N(defeat_80241F64) = 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) { + if (EVT_STORY_PROGRESS == STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + GetOwnerEncounterTrigger(EVT_VAR(0)); + if (EVT_VAR(0) != 1) { SetNpcAnimation(NPC_SELF, NPC_ANIM_monty_mole_Palette_01_Anim_5); } } @@ -483,73 +483,73 @@ EvtSource N(hit_80242138) = SCRIPT({ EvtSource N(idle_8024219C) = SCRIPT({ loop { - if (SI_MAP_VAR(10) == 0) { - if (SI_AREA_FLAG(23) == 1) { + if (EVT_MAP_VAR(10) == 0) { + if (EVT_AREA_FLAG(23) == 1) { goto 0; } - SI_VAR(3) = 1; + EVT_VAR(3) = 1; } else { 0: - GetNpcPos(NPC_MONTY_MOLE0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - IsPlayerWithin(SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3)); + GetNpcPos(NPC_MONTY_MOLE0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + IsPlayerWithin(EVT_VAR(0), EVT_VAR(2), EVT_MAP_VAR(15), EVT_VAR(3)); } - GetCurrentPartner(SI_VAR(9)); - if (SI_VAR(9) == 9) { - SI_VAR(3) = 0; + GetCurrentPartner(EVT_VAR(9)); + if (EVT_VAR(9) == 9) { + EVT_VAR(3) = 0; } - if (SI_MAP_VAR(14) == 1) { - SI_VAR(3) = 0; + if (EVT_MAP_VAR(14) == 1) { + EVT_VAR(3) = 0; } - if (SI_VAR(3) == 1) { - if (SI_AREA_FLAG(23) == 0) { + if (EVT_VAR(3) == 1) { + if (EVT_AREA_FLAG(23) == 0) { SetNpcFlagBits(NPC_MONTY_MOLE0, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE); NpcFacePlayer(NPC_MONTY_MOLE0, 1); sleep 1; - SI_AREA_FLAG(23) = 1; - if (SI_MAP_VAR(10) != 0) { - if (SI_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { - SI_VAR(1) = 4; + EVT_AREA_FLAG(23) = 1; + if (EVT_MAP_VAR(10) != 0) { + if (EVT_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + EVT_VAR(1) = 4; } else { - SI_VAR(1) = 10; + EVT_VAR(1) = 10; } PlaySoundAtNpc(NPC_MONTY_MOLE0, SOUND_UNKNOWN_262, 0); - ShowEmote(2, EMOTE_EXCLAMATION, 0, SI_VAR(1), 1, 0, 0, 0, 0); - sleep SI_VAR(1); + ShowEmote(2, EMOTE_EXCLAMATION, 0, EVT_VAR(1), 1, 0, 0, 0, 0); + sleep EVT_VAR(1); SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE); } PlaySoundAtNpc(NPC_MONTY_MOLE0, SOUND_MOLE_DIG, 0); SetNpcAnimation(NPC_MONTY_MOLE0, NPC_ANIM_monty_mole_Palette_01_Anim_11); sleep 20; - if (SI_SAVE_FLAG(1367) == 0) { + if (EVT_SAVE_FLAG(1367) == 0) { SetNpcPos(NPC_MONTY_MOLE0, 0, -50, 0); } sleep 45; } } else { - if (SI_AREA_FLAG(23) == 1) { - if (SI_SAVE_FLAG(1367) == 0) { - RandInt(2, SI_VAR(0)); - SI_VAR(0) += 1; + if (EVT_AREA_FLAG(23) == 1) { + if (EVT_SAVE_FLAG(1367) == 0) { + RandInt(2, EVT_VAR(0)); + EVT_VAR(0) += 1; buf_use N(intTable_80240F6C); - loop SI_VAR(0) { - buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3); + loop EVT_VAR(0) { + buf_read EVT_VAR(1) EVT_VAR(2) EVT_VAR(3); } - SetNpcPos(NPC_MONTY_MOLE0, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_MONTY_MOLE0, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); } SetNpcFlagBits(NPC_MONTY_MOLE0, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE); - SI_AREA_FLAG(23) = 0; + EVT_AREA_FLAG(23) = 0; NpcFacePlayer(NPC_MONTY_MOLE0, 1); sleep 1; PlaySoundAtNpc(NPC_MONTY_MOLE0, SOUND_MOLE_SURFACE, 0); SetNpcAnimation(NPC_MONTY_MOLE0, NPC_ANIM_monty_mole_Palette_01_Anim_10); sleep 10; SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), FALSE); - RandInt(30, SI_VAR(0)); - SI_VAR(0) += 60; - SI_MAP_VAR(10) = SI_VAR(0); + RandInt(30, EVT_VAR(0)); + EVT_VAR(0) += 60; + EVT_MAP_VAR(10) = EVT_VAR(0); } else { - if (SI_MAP_VAR(10) > 0) { - SI_MAP_VAR(10) -= 1; + if (EVT_MAP_VAR(10) > 0) { + EVT_MAP_VAR(10) -= 1; } } } @@ -559,73 +559,73 @@ EvtSource N(idle_8024219C) = SCRIPT({ EvtSource N(idle_80242618) = SCRIPT({ loop { - if (SI_MAP_VAR(11) == 0) { - if (SI_AREA_FLAG(24) == 1) { + if (EVT_MAP_VAR(11) == 0) { + if (EVT_AREA_FLAG(24) == 1) { goto 0; } - SI_VAR(3) = 1; + EVT_VAR(3) = 1; } else { 0: - GetNpcPos(NPC_MONTY_MOLE1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - IsPlayerWithin(SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3)); + GetNpcPos(NPC_MONTY_MOLE1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + IsPlayerWithin(EVT_VAR(0), EVT_VAR(2), EVT_MAP_VAR(15), EVT_VAR(3)); } - GetCurrentPartner(SI_VAR(9)); - if (SI_VAR(9) == 9) { - SI_VAR(3) = 0; + GetCurrentPartner(EVT_VAR(9)); + if (EVT_VAR(9) == 9) { + EVT_VAR(3) = 0; } - if (SI_MAP_VAR(14) == 1) { - SI_VAR(3) = 0; + if (EVT_MAP_VAR(14) == 1) { + EVT_VAR(3) = 0; } - if (SI_VAR(3) == 1) { - if (SI_AREA_FLAG(24) == 0) { + if (EVT_VAR(3) == 1) { + if (EVT_AREA_FLAG(24) == 0) { SetNpcFlagBits(NPC_MONTY_MOLE1, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE); NpcFacePlayer(NPC_MONTY_MOLE1, 1); sleep 1; - SI_AREA_FLAG(24) = 1; - if (SI_MAP_VAR(11) != 0) { - if (SI_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { - SI_VAR(1) = 4; + EVT_AREA_FLAG(24) = 1; + if (EVT_MAP_VAR(11) != 0) { + if (EVT_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + EVT_VAR(1) = 4; } else { - SI_VAR(1) = 10; + EVT_VAR(1) = 10; } PlaySoundAtNpc(NPC_MONTY_MOLE1, SOUND_UNKNOWN_262, 0); - ShowEmote(3, EMOTE_EXCLAMATION, 0, SI_VAR(1), 1, 0, 0, 0, 0); - sleep SI_VAR(1); + ShowEmote(3, EMOTE_EXCLAMATION, 0, EVT_VAR(1), 1, 0, 0, 0, 0); + sleep EVT_VAR(1); SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE); } PlaySoundAtNpc(NPC_MONTY_MOLE1, SOUND_MOLE_DIG, 0); SetNpcAnimation(NPC_MONTY_MOLE1, NPC_ANIM_monty_mole_Palette_01_Anim_11); sleep 20; - if (SI_SAVE_FLAG(1368) == 0) { + if (EVT_SAVE_FLAG(1368) == 0) { SetNpcPos(NPC_MONTY_MOLE1, 0, -50, 0); } sleep 45; } } else { - if (SI_AREA_FLAG(24) == 1) { - if (SI_SAVE_FLAG(1368) == 0) { - RandInt(2, SI_VAR(0)); - SI_VAR(0) += 1; + if (EVT_AREA_FLAG(24) == 1) { + if (EVT_SAVE_FLAG(1368) == 0) { + RandInt(2, EVT_VAR(0)); + EVT_VAR(0) += 1; buf_use N(intTable_80240F90); - loop SI_VAR(0) { - buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3); + loop EVT_VAR(0) { + buf_read EVT_VAR(1) EVT_VAR(2) EVT_VAR(3); } - SetNpcPos(NPC_MONTY_MOLE1, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_MONTY_MOLE1, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); } SetNpcFlagBits(NPC_MONTY_MOLE1, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE); - SI_AREA_FLAG(24) = 0; + EVT_AREA_FLAG(24) = 0; NpcFacePlayer(NPC_MONTY_MOLE1, 1); sleep 1; PlaySoundAtNpc(NPC_MONTY_MOLE1, SOUND_MOLE_SURFACE, 0); SetNpcAnimation(NPC_MONTY_MOLE1, NPC_ANIM_monty_mole_Palette_01_Anim_10); sleep 10; SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), FALSE); - RandInt(35, SI_VAR(0)); - SI_VAR(0) += 55; - SI_MAP_VAR(11) = SI_VAR(0); + RandInt(35, EVT_VAR(0)); + EVT_VAR(0) += 55; + EVT_MAP_VAR(11) = EVT_VAR(0); } else { - if (SI_MAP_VAR(11) > 0) { - SI_MAP_VAR(11) -= 1; + if (EVT_MAP_VAR(11) > 0) { + EVT_MAP_VAR(11) -= 1; } } } @@ -635,73 +635,73 @@ EvtSource N(idle_80242618) = SCRIPT({ EvtSource N(idle_80242A94) = SCRIPT({ loop { - if (SI_MAP_VAR(12) == 0) { - if (SI_AREA_FLAG(25) == 1) { + if (EVT_MAP_VAR(12) == 0) { + if (EVT_AREA_FLAG(25) == 1) { goto 0; } - SI_VAR(3) = 1; + EVT_VAR(3) = 1; } else { 0: - GetNpcPos(NPC_MONTY_MOLE2, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - IsPlayerWithin(SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3)); + GetNpcPos(NPC_MONTY_MOLE2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + IsPlayerWithin(EVT_VAR(0), EVT_VAR(2), EVT_MAP_VAR(15), EVT_VAR(3)); } - GetCurrentPartner(SI_VAR(9)); - if (SI_VAR(9) == 9) { - SI_VAR(3) = 0; + GetCurrentPartner(EVT_VAR(9)); + if (EVT_VAR(9) == 9) { + EVT_VAR(3) = 0; } - if (SI_MAP_VAR(14) == 1) { - SI_VAR(3) = 0; + if (EVT_MAP_VAR(14) == 1) { + EVT_VAR(3) = 0; } - if (SI_VAR(3) == 1) { - if (SI_AREA_FLAG(25) == 0) { + if (EVT_VAR(3) == 1) { + if (EVT_AREA_FLAG(25) == 0) { SetNpcFlagBits(NPC_MONTY_MOLE2, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE); NpcFacePlayer(NPC_MONTY_MOLE2, 1); sleep 1; - SI_AREA_FLAG(25) = 1; - if (SI_MAP_VAR(12) != 0) { - if (SI_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { - SI_VAR(1) = 4; + EVT_AREA_FLAG(25) = 1; + if (EVT_MAP_VAR(12) != 0) { + if (EVT_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + EVT_VAR(1) = 4; } else { - SI_VAR(1) = 10; + EVT_VAR(1) = 10; } PlaySoundAtNpc(NPC_MONTY_MOLE2, SOUND_UNKNOWN_262, 0); - ShowEmote(4, EMOTE_EXCLAMATION, 0, SI_VAR(1), 1, 0, 0, 0, 0); - sleep SI_VAR(1); + ShowEmote(4, EMOTE_EXCLAMATION, 0, EVT_VAR(1), 1, 0, 0, 0, 0); + sleep EVT_VAR(1); SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE); } PlaySoundAtNpc(NPC_MONTY_MOLE2, SOUND_MOLE_DIG, 0); SetNpcAnimation(NPC_MONTY_MOLE2, NPC_ANIM_monty_mole_Palette_01_Anim_11); sleep 20; - if (SI_SAVE_FLAG(1369) == 0) { + if (EVT_SAVE_FLAG(1369) == 0) { SetNpcPos(NPC_MONTY_MOLE2, 0, -50, 0); } sleep 45; } } else { - if (SI_AREA_FLAG(25) == 1) { - if (SI_SAVE_FLAG(1369) == 0) { - RandInt(2, SI_VAR(0)); - SI_VAR(0) += 1; + if (EVT_AREA_FLAG(25) == 1) { + if (EVT_SAVE_FLAG(1369) == 0) { + RandInt(2, EVT_VAR(0)); + EVT_VAR(0) += 1; buf_use N(intTable_80240FB4); - loop SI_VAR(0) { - buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3); + loop EVT_VAR(0) { + buf_read EVT_VAR(1) EVT_VAR(2) EVT_VAR(3); } - SetNpcPos(NPC_MONTY_MOLE2, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_MONTY_MOLE2, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); } SetNpcFlagBits(NPC_MONTY_MOLE2, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE); - SI_AREA_FLAG(25) = 0; + EVT_AREA_FLAG(25) = 0; NpcFacePlayer(NPC_MONTY_MOLE2, 1); sleep 1; PlaySoundAtNpc(NPC_MONTY_MOLE2, SOUND_MOLE_SURFACE, 0); SetNpcAnimation(NPC_MONTY_MOLE2, NPC_ANIM_monty_mole_Palette_01_Anim_10); sleep 10; SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), FALSE); - RandInt(40, SI_VAR(0)); - SI_VAR(0) += 50; - SI_MAP_VAR(12) = SI_VAR(0); + RandInt(40, EVT_VAR(0)); + EVT_VAR(0) += 50; + EVT_MAP_VAR(12) = EVT_VAR(0); } else { - if (SI_MAP_VAR(12) > 0) { - SI_MAP_VAR(12) -= 1; + if (EVT_MAP_VAR(12) > 0) { + EVT_MAP_VAR(12) -= 1; } } } @@ -711,73 +711,73 @@ EvtSource N(idle_80242A94) = SCRIPT({ EvtSource N(idle_80242F10) = SCRIPT({ loop { - if (SI_MAP_VAR(13) == 0) { - if (SI_AREA_FLAG(26) == 1) { + if (EVT_MAP_VAR(13) == 0) { + if (EVT_AREA_FLAG(26) == 1) { goto 0; } - SI_VAR(3) = 1; + EVT_VAR(3) = 1; } else { 0: - GetNpcPos(NPC_MONTY_MOLE3, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - IsPlayerWithin(SI_VAR(0), SI_VAR(2), SI_MAP_VAR(15), SI_VAR(3)); + GetNpcPos(NPC_MONTY_MOLE3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + IsPlayerWithin(EVT_VAR(0), EVT_VAR(2), EVT_MAP_VAR(15), EVT_VAR(3)); } - GetCurrentPartner(SI_VAR(9)); - if (SI_VAR(9) == 9) { - SI_VAR(3) = 0; + GetCurrentPartner(EVT_VAR(9)); + if (EVT_VAR(9) == 9) { + EVT_VAR(3) = 0; } - if (SI_MAP_VAR(14) == 1) { - SI_VAR(3) = 0; + if (EVT_MAP_VAR(14) == 1) { + EVT_VAR(3) = 0; } - if (SI_VAR(3) == 1) { - if (SI_AREA_FLAG(26) == 0) { + if (EVT_VAR(3) == 1) { + if (EVT_AREA_FLAG(26) == 0) { SetNpcFlagBits(NPC_MONTY_MOLE3, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE); NpcFacePlayer(NPC_MONTY_MOLE3, 1); sleep 1; - SI_AREA_FLAG(26) = 1; - if (SI_MAP_VAR(13) != 0) { - if (SI_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { - SI_VAR(1) = 4; + EVT_AREA_FLAG(26) = 1; + if (EVT_MAP_VAR(13) != 0) { + if (EVT_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + EVT_VAR(1) = 4; } else { - SI_VAR(1) = 10; + EVT_VAR(1) = 10; } PlaySoundAtNpc(NPC_MONTY_MOLE3, SOUND_UNKNOWN_262, 0); - ShowEmote(5, EMOTE_EXCLAMATION, 0, SI_VAR(1), 1, 0, 0, 0, 0); - sleep SI_VAR(1); + ShowEmote(5, EMOTE_EXCLAMATION, 0, EVT_VAR(1), 1, 0, 0, 0, 0); + sleep EVT_VAR(1); SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE); } PlaySoundAtNpc(NPC_MONTY_MOLE3, SOUND_MOLE_DIG, 0); SetNpcAnimation(NPC_MONTY_MOLE3, NPC_ANIM_monty_mole_Palette_01_Anim_11); sleep 20; - if (SI_SAVE_FLAG(1370) == 0) { + if (EVT_SAVE_FLAG(1370) == 0) { SetNpcPos(NPC_MONTY_MOLE3, 0, -50, 0); } sleep 45; } } else { - if (SI_AREA_FLAG(26) == 1) { - if (SI_SAVE_FLAG(1370) == 0) { - RandInt(2, SI_VAR(0)); - SI_VAR(0) += 1; + if (EVT_AREA_FLAG(26) == 1) { + if (EVT_SAVE_FLAG(1370) == 0) { + RandInt(2, EVT_VAR(0)); + EVT_VAR(0) += 1; buf_use N(intTable_80240FD8); - loop SI_VAR(0) { - buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3); + loop EVT_VAR(0) { + buf_read EVT_VAR(1) EVT_VAR(2) EVT_VAR(3); } - SetNpcPos(NPC_MONTY_MOLE3, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_MONTY_MOLE3, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); } SetNpcFlagBits(NPC_MONTY_MOLE3, ((NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000)), TRUE); - SI_AREA_FLAG(26) = 0; + EVT_AREA_FLAG(26) = 0; NpcFacePlayer(NPC_MONTY_MOLE3, 1); sleep 1; PlaySoundAtNpc(NPC_MONTY_MOLE3, SOUND_MOLE_SURFACE, 0); SetNpcAnimation(NPC_MONTY_MOLE3, NPC_ANIM_monty_mole_Palette_01_Anim_10); sleep 10; SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), FALSE); - RandInt(45, SI_VAR(0)); - SI_VAR(0) += 45; - SI_MAP_VAR(13) = SI_VAR(0); + RandInt(45, EVT_VAR(0)); + EVT_VAR(0) += 45; + EVT_MAP_VAR(13) = EVT_VAR(0); } else { - if (SI_MAP_VAR(13) > 0) { - SI_MAP_VAR(13) -= 1; + if (EVT_MAP_VAR(13) > 0) { + EVT_MAP_VAR(13) -= 1; } } } @@ -789,13 +789,13 @@ EvtSource N(init_8024338C) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE0, FALSE); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { BindNpcIdle(NPC_SELF, N(idle_8024219C)); SetNpcAnimation(NPC_MONTY_MOLE0, NPC_ANIM_monty_mole_Palette_01_Anim_10); } == STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { - if (SI_SAVE_FLAG(1367) == 0) { + if (EVT_SAVE_FLAG(1367) == 0) { BindNpcIdle(NPC_SELF, N(idle_8024219C)); SetNpcAnimation(NPC_MONTY_MOLE0, NPC_ANIM_monty_mole_Palette_01_Anim_10); SetEnemyFlagBits(2, 1, 0); @@ -812,13 +812,13 @@ EvtSource N(init_802434CC) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE1, FALSE); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { BindNpcIdle(NPC_SELF, N(idle_80242618)); SetNpcAnimation(NPC_MONTY_MOLE1, NPC_ANIM_monty_mole_Palette_01_Anim_10); } == STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { - if (SI_SAVE_FLAG(1368) == 0) { + if (EVT_SAVE_FLAG(1368) == 0) { BindNpcIdle(NPC_SELF, N(idle_80242618)); SetNpcAnimation(NPC_MONTY_MOLE1, NPC_ANIM_monty_mole_Palette_01_Anim_10); SetEnemyFlagBits(3, 1, 0); @@ -835,13 +835,13 @@ EvtSource N(init_8024360C) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE2, FALSE); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { BindNpcIdle(NPC_SELF, N(idle_80242A94)); SetNpcAnimation(NPC_MONTY_MOLE2, NPC_ANIM_monty_mole_Palette_01_Anim_10); } == STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { - if (SI_SAVE_FLAG(1369) == 0) { + if (EVT_SAVE_FLAG(1369) == 0) { BindNpcIdle(NPC_SELF, N(idle_80242A94)); SetNpcAnimation(NPC_MONTY_MOLE2, NPC_ANIM_monty_mole_Palette_01_Anim_10); SetEnemyFlagBits(4, 1, 0); @@ -858,13 +858,13 @@ EvtSource N(init_8024374C) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE3, FALSE); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { BindNpcIdle(NPC_SELF, N(idle_80242F10)); SetNpcAnimation(NPC_MONTY_MOLE3, NPC_ANIM_monty_mole_Palette_01_Anim_10); } == STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { - if (SI_SAVE_FLAG(1370) == 0) { + if (EVT_SAVE_FLAG(1370) == 0) { BindNpcIdle(NPC_SELF, N(idle_80242F10)); SetNpcAnimation(NPC_MONTY_MOLE3, NPC_ANIM_monty_mole_Palette_01_Anim_10); SetEnemyFlagBits(5, 1, 0); @@ -1160,13 +1160,13 @@ FoliageDropList N(tree1_Drops) = { .itemID = ITEM_RED_BERRY, .pos = { -256, 102, -169 }, .spawnMode = 0xC, - .spawnFlag = SI_AREA_FLAG(27), + .spawnFlag = EVT_AREA_FLAG(27), }, { .itemID = ITEM_RED_BERRY, .pos = { -156, 102, -169 }, .spawnMode = 0xC, - .spawnFlag = SI_AREA_FLAG(28), + .spawnFlag = EVT_AREA_FLAG(28), }, } }; @@ -1180,9 +1180,9 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_80244E44) = { -208.0f, 0.0f, -182.0f, 0.0f }; EvtSource N(80244E54) = SCRIPT({ - SI_AREA_FLAG(27) = 0; - SI_AREA_FLAG(28) = 0; - SI_VAR(0) = N(tree1); + EVT_AREA_FLAG(27) = 0; + EVT_AREA_FLAG(28) = 0; + EVT_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 16; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80244E44); }); @@ -1197,5 +1197,5 @@ EvtSource N(80244ED0) = SCRIPT({ EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAB04, -175, 0, 150, 0, ITEM_MAP, MAKE_ENTITY_END); - AssignPanelFlag(SI_SAVE_FLAG(1404)); + AssignPanelFlag(EVT_SAVE_FLAG(1404)); }); diff --git a/src/world/area_flo/flo_07/CAC5D0.c b/src/world/area_flo/flo_07/CAC5D0.c index c429678057..429870677c 100644 --- a/src/world/area_flo/flo_07/CAC5D0.c +++ b/src/world/area_flo/flo_07/CAC5D0.c @@ -20,11 +20,11 @@ MapConfig N(config) = { }; EvtSource N(802407A0) = SCRIPT({ - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); } else { - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -51,10 +51,10 @@ static s32 N(pad_8CC) = { EvtSource N(updateTexturePan_802408D0) = SCRIPT({ group 0; - if (SI_VAR(5) == 1) { - if (SI_VAR(6) == 1) { - if (SI_VAR(7) == 1) { - if (SI_VAR(8) == 1) { + if (EVT_VAR(5) == 1) { + if (EVT_VAR(6) == 1) { + if (EVT_VAR(7) == 1) { + if (EVT_VAR(8) == 1) { N(UnkTexturePanFunc)(); return; } @@ -66,40 +66,40 @@ EvtSource N(updateTexturePan_802408D0) = SCRIPT({ EvtSource N(8024096C) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -110,92 +110,92 @@ EvtSource N(80240C74) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - SI_AREA_FLAG(6) = 0; + EVT_AREA_FLAG(6) = 0; MakeNpcs(0, N(npcGroupList_80242B0C)); await N(802428C4); ModifyColliderFlags(3, 6, 0x00000006); - SI_VAR(0) = 297; - SI_VAR(1) = -95; - SI_VAR(2) = 383; - SI_VAR(3) = -65; - SI_VAR(4) = 0; + EVT_VAR(0) = 297; + EVT_VAR(1) = -95; + EVT_VAR(2) = 383; + EVT_VAR(3) = -65; + EVT_VAR(4) = 0; spawn N(8024096C); - SI_VAR(0) = 293; - SI_VAR(1) = 71; - SI_VAR(2) = 378; - SI_VAR(3) = 113; - SI_VAR(4) = 0; + EVT_VAR(0) = 293; + EVT_VAR(1) = 71; + EVT_VAR(2) = 378; + EVT_VAR(3) = 113; + EVT_VAR(4) = 0; spawn N(8024096C); - SI_VAR(0) = 21; - SI_VAR(1) = -346; - SI_VAR(2) = 147; - SI_VAR(3) = -242; - SI_VAR(4) = 20; + EVT_VAR(0) = 21; + EVT_VAR(1) = -346; + EVT_VAR(2) = 147; + EVT_VAR(3) = -242; + EVT_VAR(4) = 20; spawn N(8024096C); - SI_VAR(0) = -350; - SI_VAR(1) = -190; - SI_VAR(2) = -81; - SI_VAR(3) = -106; - SI_VAR(4) = 0; + EVT_VAR(0) = -350; + EVT_VAR(1) = -190; + EVT_VAR(2) = -81; + EVT_VAR(3) = -106; + EVT_VAR(4) = 0; spawn N(8024096C); - SI_VAR(0) = -380; - SI_VAR(1) = 85; - SI_VAR(2) = -95; - SI_VAR(3) = 150; - SI_VAR(4) = 0; + EVT_VAR(0) = -380; + EVT_VAR(1) = 85; + EVT_VAR(2) = -95; + EVT_VAR(3) = 150; + EVT_VAR(4) = 0; spawn N(8024096C); EnableTexPanning(51, 1); EnableTexPanning(49, 1); EnableTexPanning(50, 1); spawn { - SI_VAR(0) = 2; - SI_VAR(1) = -100; - SI_VAR(2) = 100; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 1; - SI_VAR(6) = 1; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 2; + EVT_VAR(1) = -100; + EVT_VAR(2) = 100; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 1; + EVT_VAR(6) = 1; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_802408D0); } spawn { - SI_VAR(0) = 3; - SI_VAR(1) = 0; - SI_VAR(2) = -1200; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 0; - SI_VAR(6) = 1; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 3; + EVT_VAR(1) = 0; + EVT_VAR(2) = -1200; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 0; + EVT_VAR(6) = 1; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_802408D0); } - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { spawn N(80241C14); } else { ModifyColliderFlags(0, 1, 0x7FFFFE00); - SI_VAR(0) = N(80240C74); + EVT_VAR(0) = N(80240C74); spawn EnterWalk; spawn N(802424F4); } await N(802407A0); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(SpawnSunEffect)(); } N(func_80240344_CAC534)(); @@ -216,22 +216,22 @@ NpcSettings N(npcSettings_80241220) = { s32** N(D_80241BB0_CADDA0) = NULL; EvtSource N(80241BB4) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 0); + ShowGotItem(EVT_VAR(0), 1, 0); return; }); EvtSource N(80241BE4) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 16); + ShowGotItem(EVT_VAR(0), 1, 16); return; }); EvtSource N(80241C14) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); - GetNpcPos(NPC_POSIE, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 30; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_POSIE, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 30; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 300); SetCamPitch(0, 11.0, -11.0); SetCamSpeed(0, 90.0); @@ -252,7 +252,7 @@ EvtSource N(80241D6C) = SCRIPT({ }); EvtSource N(80241DBC) = SCRIPT({ - if (SI_AREA_FLAG(6) == 1) { + if (EVT_AREA_FLAG(6) == 1) { return; } SpeakToPlayer(NPC_POSIE, NPC_ANIM_posie_Palette_00_Anim_2, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0068)); @@ -263,40 +263,40 @@ EvtSource N(80241DBC) = SCRIPT({ PanToTarget(0, 0, 1); } PlaySound(0x8000006B); - SI_MAP_VAR(0) = spawn N(80241D6C); + EVT_MAP_VAR(0) = spawn N(80241D6C); SpeakToPlayer(NPC_POSIE, NPC_ANIM_posie_Palette_00_Anim_6, NPC_ANIM_posie_Palette_00_Anim_6, 0, MESSAGE_ID(0x11, 0x0069)); - kill SI_MAP_VAR(0); + kill EVT_MAP_VAR(0); SetCamDistance(0, 350); SetCamPitch(0, 18.0, -7.5); SetCamSpeed(0, 8.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); sleep 10; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= SI_VAR(2); - if (SI_VAR(0) < -250) { - MakeItemEntity(ITEM_CRYSTAL_BERRY, -225, 100, -25, 13, SI_SAVE_FLAG(1374)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= EVT_VAR(2); + if (EVT_VAR(0) < -250) { + MakeItemEntity(ITEM_CRYSTAL_BERRY, -225, 100, -25, 13, EVT_SAVE_FLAG(1374)); } else { - MakeItemEntity(ITEM_CRYSTAL_BERRY, -265, 100, 54, 13, SI_SAVE_FLAG(1374)); - SI_SAVE_FLAG(1396) = 1; + MakeItemEntity(ITEM_CRYSTAL_BERRY, -265, 100, 54, 13, EVT_SAVE_FLAG(1374)); + EVT_SAVE_FLAG(1396) = 1; } PlaySound(0x7BC); func_802D62E4(956); - SI_AREA_FLAG(6) = 1; + EVT_AREA_FLAG(6) = 1; sleep 20; SpeakToPlayer(NPC_POSIE, NPC_ANIM_posie_Palette_00_Anim_2, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x006A)); - SI_STORY_PROGRESS = STORY_CH6_GOT_CRYSTAL_BERRY; + EVT_STORY_PROGRESS = STORY_CH6_GOT_CRYSTAL_BERRY; }); EvtSource N(interact_80242044) = SCRIPT({ await N(8024086C); NpcFacePlayer(NPC_SELF, 1); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { - if (SI_AREA_FLAG(5) == 0) { + if (EVT_AREA_FLAG(5) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_posie_Palette_00_Anim_2, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0070)); - SI_AREA_FLAG(5) = 1; + EVT_AREA_FLAG(5) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_posie_Palette_00_Anim_2, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0071)); @@ -308,20 +308,20 @@ EvtSource N(interact_80242044) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM_posie_Palette_00_Anim_5); sleep 20; SetNpcAnimation(NPC_SELF, NPC_ANIM_posie_Palette_00_Anim_0); - SI_VAR(0) = 89; - SI_VAR(1) = 1; + EVT_VAR(0) = 89; + EVT_VAR(1) = 1; await N(80241BB4); AddKeyItem(ITEM_FERTILE_SOIL); - SI_STORY_PROGRESS = STORY_CH6_GOT_FERTILE_SOIL; + EVT_STORY_PROGRESS = STORY_CH6_GOT_FERTILE_SOIL; SpeakToPlayer(NPC_SELF, NPC_ANIM_posie_Palette_00_Anim_2, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0066)); - if (SI_SAVE_FLAG(1379) == 1) { + if (EVT_SAVE_FLAG(1379) == 1) { await N(80241DBC); } ResetCam(0, 4.0); } < STORY_CH6_GOT_CRYSTAL_BERRY { - if (SI_SAVE_FLAG(1379) == 1) { - if (SI_AREA_FLAG(6) == 0) { + if (EVT_SAVE_FLAG(1379) == 1) { + if (EVT_AREA_FLAG(6) == 0) { AdjustCam(0, 4.0, 0, 350.0, 18.0, -7.5); await N(80241DBC); ResetCam(0, 4.0); @@ -335,11 +335,11 @@ EvtSource N(interact_80242044) = SCRIPT({ } } < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { - if (SI_SAVE_FLAG(1374) == 0) { + if (EVT_SAVE_FLAG(1374) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM_posie_Palette_00_Anim_2, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0072)); } else { - if (SI_STORY_PROGRESS < STORY_CH6_GOT_WATER_STONE) { + if (EVT_STORY_PROGRESS < STORY_CH6_GOT_WATER_STONE) { SpeakToPlayer(NPC_SELF, NPC_ANIM_posie_Palette_00_Anim_2, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0073)); } else { @@ -361,33 +361,33 @@ EvtSource N(interact_80242044) = 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) { - MakeItemEntity(ITEM_CRYSTAL_BERRY, -225, 0, -25, 17, SI_SAVE_FLAG(1374)); + if (EVT_STORY_PROGRESS == STORY_CH6_GOT_CRYSTAL_BERRY) { + if (EVT_SAVE_FLAG(1374) == 0) { + if (EVT_SAVE_FLAG(1396) == 0) { + MakeItemEntity(ITEM_CRYSTAL_BERRY, -225, 0, -25, 17, EVT_SAVE_FLAG(1374)); } else { - MakeItemEntity(ITEM_CRYSTAL_BERRY, -265, 0, 54, 17, SI_SAVE_FLAG(1374)); + MakeItemEntity(ITEM_CRYSTAL_BERRY, -265, 0, 54, 17, EVT_SAVE_FLAG(1374)); } } } - SI_AREA_FLAG(5) = 0; + EVT_AREA_FLAG(5) = 0; BindNpcInteract(NPC_SELF, N(interact_80242044)); }); EvtSource N(802424F4) = SCRIPT({ - if (SI_AREA_VAR(3) != 0) { + if (EVT_AREA_VAR(3) != 0) { DisablePlayerInput(TRUE); sleep 10; - if (SI_AREA_VAR(3) < 5) { + if (EVT_AREA_VAR(3) < 5) { SpeakToPlayer(NPC_POSIE, NPC_ANIM_posie_Palette_00_Anim_2, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x006E)); - GetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - PlayerMoveTo(410, SI_VAR(3), 10); - SI_AREA_VAR(3) += 1; + GetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + PlayerMoveTo(410, EVT_VAR(3), 10); + EVT_AREA_VAR(3) += 1; } else { SpeakToPlayer(NPC_POSIE, NPC_ANIM_posie_Palette_00_Anim_2, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x006F)); - SI_AREA_VAR(3) = 0; + EVT_AREA_VAR(3) = 0; } DisablePlayerInput(FALSE); } @@ -397,13 +397,13 @@ const char N(flo_25_name_hack)[]; EvtSource N(tree1_Callback) = SCRIPT({ DisablePlayerInput(TRUE); - if (SI_STORY_PROGRESS < STORY_CH6_GOT_CRYSTAL_BERRY) { + if (EVT_STORY_PROGRESS < STORY_CH6_GOT_CRYSTAL_BERRY) { NpcFacePlayer(NPC_POSIE, 1); sleep 10; SpeakToPlayer(NPC_POSIE, NPC_ANIM_posie_Palette_00_Anim_4, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0067)); - if (SI_STORY_PROGRESS == STORY_CH6_GOT_FERTILE_SOIL) { - if (SI_SAVE_FLAG(1379) == 1) { + if (EVT_STORY_PROGRESS == STORY_CH6_GOT_FERTILE_SOIL) { + if (EVT_SAVE_FLAG(1379) == 1) { UseSettingsFrom(0, -250, 0, 0); SetPanTarget(0, -250, 0, 0); SetCamDistance(0, 350); @@ -413,14 +413,14 @@ EvtSource N(tree1_Callback) = SCRIPT({ } } } else { - if (SI_SAVE_FLAG(1374) == 0) { + if (EVT_SAVE_FLAG(1374) == 0) { NpcFacePlayer(NPC_POSIE, 1); sleep 10; SpeakToPlayer(NPC_POSIE, NPC_ANIM_posie_Palette_00_Anim_4, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0067)); } else { - SI_AREA_VAR(2) += 1; - match SI_AREA_VAR(2) { + EVT_AREA_VAR(2) += 1; + match EVT_AREA_VAR(2) { < 2 { SpeakToPlayer(NPC_POSIE, NPC_ANIM_posie_Palette_00_Anim_3, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x006B)); } @@ -429,7 +429,7 @@ EvtSource N(tree1_Callback) = SCRIPT({ } >= 5 { SpeakToPlayer(NPC_POSIE, NPC_ANIM_posie_Palette_00_Anim_3, NPC_ANIM_posie_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x006D)); - SI_AREA_VAR(3) = 1; + EVT_AREA_VAR(3) = 1; GotoMap(N(flo_25_name_hack), 1); sleep 100; } @@ -459,7 +459,7 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_802428B4) = { -309.0f, 0.0f, 31.0f, 0.0f }; EvtSource N(802428C4) = SCRIPT({ - SI_VAR(0) = N(tree1); + EVT_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 4; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_802428B4); }); diff --git a/src/world/area_flo/flo_08/CAFAC0.c b/src/world/area_flo/flo_08/CAFAC0.c index e4a3573c1a..35142daf90 100644 --- a/src/world/area_flo/flo_08/CAFAC0.c +++ b/src/world/area_flo/flo_08/CAFAC0.c @@ -37,7 +37,7 @@ MapConfig N(config) = { }; EvtSource N(80241F40) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -69,7 +69,7 @@ f32 N(D_80242008_CB0D48)[3] = { EvtSource N(80242014) = SCRIPT({ sleep 10; PlaySound(0x212D); - N(UnkFunc21)(SI_MAP_VAR(0)); + N(UnkFunc21)(EVT_MAP_VAR(0)); sleep 85; spawn { PlaySound(0x212E); @@ -80,7 +80,7 @@ EvtSource N(80242014) = SCRIPT({ } spawn { sleep 3; - N(func_8024003C_CAED7C)(SI_MAP_VAR(0)); + N(func_8024003C_CAED7C)(EVT_MAP_VAR(0)); } spawn { sleep 47; @@ -92,20 +92,20 @@ EvtSource N(80242014) = SCRIPT({ N(UnkPartnerPosFunc)(); } sleep 3; - N(func_80240600_CAF340)(SI_MAP_VAR(0)); + N(func_80240600_CAF340)(EVT_MAP_VAR(0)); sleep 30; }); EvtSource N(80242178) = SCRIPT({ - if (SI_SAVE_FLAG(1402) == 1) { + if (EVT_SAVE_FLAG(1402) == 1) { return; } - IsStartingConversation(SI_VAR(0)); - if (SI_VAR(0) == 1) { + IsStartingConversation(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { return; } N(UnkFunc40)(); - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { return; } ModifyGlobalOverrideFlags(1, 2097152); @@ -113,40 +113,40 @@ EvtSource N(80242178) = SCRIPT({ DisablePlayerInput(TRUE); DisablePartnerAI(0); SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_100)), TRUE); - N(UnkFunc20)(SI_MAP_VAR(0), SI_VAR(9)); - FindKeyItem(ITEM_ULTRA_STONE, SI_VAR(12)); + N(UnkFunc20)(EVT_MAP_VAR(0), EVT_VAR(9)); + FindKeyItem(ITEM_ULTRA_STONE, EVT_VAR(12)); N(UnkFunc38)(); - if (SI_VAR(0) == -1) { + if (EVT_VAR(0) == -1) { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DC), 160, 40); sleep 10; - N(UnkFunc39)(SI_VAR(9)); + N(UnkFunc39)(EVT_VAR(9)); DisablePlayerInput(FALSE); EnablePartnerAI(); ModifyGlobalOverrideFlags(0, 2097152); N(UnkFunc17)(); return; } - if (SI_SAVE_FLAG(438) == 0) { - SI_SAVE_FLAG(438) = 1; + if (EVT_SAVE_FLAG(438) == 0) { + EVT_SAVE_FLAG(438) = 1; ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DA), 160, 40); } else { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DB), 160, 40); } N(func_802401CC_CAEF0C)(); - if (SI_VAR(0) == -1) { - N(UnkFunc39)(SI_VAR(9)); + if (EVT_VAR(0) == -1) { + N(UnkFunc39)(EVT_VAR(9)); DisablePlayerInput(FALSE); EnablePartnerAI(); ModifyGlobalOverrideFlags(0, 2097152); N(UnkFunc17)(); return; } - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); EnablePartnerAI(); - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != SI_VAR(11)) { - N(SwitchToPartner)(SI_VAR(11)); + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != EVT_VAR(11)) { + N(SwitchToPartner)(EVT_VAR(11)); } else { func_802CF56C(2); } @@ -154,8 +154,8 @@ EvtSource N(80242178) = SCRIPT({ ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DF), 160, 40); ShowChoice(MESSAGE_ID(0x1E, 0x000D)); CloseMessage(); - if (SI_VAR(0) != 0) { - N(UnkFunc39)(SI_VAR(9)); + if (EVT_VAR(0) != 0) { + N(UnkFunc39)(EVT_VAR(9)); DisablePlayerInput(FALSE); EnablePartnerAI(); ModifyGlobalOverrideFlags(0, 2097152); @@ -163,11 +163,11 @@ EvtSource N(80242178) = SCRIPT({ return; } await N(80242014); - N(UnkFunc18)(SI_VAR(11), SI_VAR(13)); - SI_SAVE_FLAG(1402) = 1; - N(UnkFunc39)(SI_VAR(9)); + N(UnkFunc18)(EVT_VAR(11), EVT_VAR(13)); + EVT_SAVE_FLAG(1402) = 1; + N(UnkFunc39)(EVT_VAR(9)); N(UnkFunc19)(); - if (SI_VAR(13) == 1) { + if (EVT_VAR(13) == 1) { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DD), 160, 40); } else { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DE), 160, 40); @@ -180,48 +180,48 @@ EvtSource N(80242178) = 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)); + EVT_MAP_VAR(0) = EVT_VAR(0); + AssignBlockFlag(EVT_SAVE_FLAG(1402)); AssignScript(N(80242178)); - MakeItemEntity(ITEM_STAR_PIECE, 510, 0, -90, 17, SI_SAVE_FLAG(1381)); + MakeItemEntity(ITEM_STAR_PIECE, 510, 0, -90, 17, EVT_SAVE_FLAG(1381)); }); EvtSource N(80242680) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -240,7 +240,7 @@ s32 N(lavaResetList_80242A2C)[] = { }; EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -266,42 +266,42 @@ EvtSource N(main) = SCRIPT({ EnableTexPanning(30, 1); EnableTexPanning(32, 1); spawn { - SI_VAR(0) = 0; - SI_VAR(1) = 0; + EVT_VAR(0) = 0; + EVT_VAR(1) = 0; 0: - SI_VAR(0) += 140; - if (SI_VAR(0) > 65536) { - SI_VAR(0) += -65536; + EVT_VAR(0) += 140; + if (EVT_VAR(0) > 65536) { + EVT_VAR(0) += -65536; } - SetTexPanOffset(1, 0, SI_VAR(0), 0); - SI_VAR(1) += -200; - if (SI_VAR(1) < 0) { - SI_VAR(1) += 65536; + SetTexPanOffset(1, 0, EVT_VAR(0), 0); + EVT_VAR(1) += -200; + if (EVT_VAR(1) < 0) { + EVT_VAR(1) += 65536; } - SetTexPanOffset(2, 0, SI_VAR(1), 0); + SetTexPanOffset(2, 0, EVT_VAR(1), 0); sleep 1; goto 0; } ModifyColliderFlags(3, 21, 0x00000006); - SI_VAR(0) = 140; - SI_VAR(1) = -137; - SI_VAR(2) = 340; - SI_VAR(3) = -60; - SI_VAR(4) = 0; + EVT_VAR(0) = 140; + EVT_VAR(1) = -137; + EVT_VAR(2) = 340; + EVT_VAR(3) = -60; + EVT_VAR(4) = 0; spawn N(80242680); - SI_VAR(0) = 450; - SI_VAR(1) = -137; - SI_VAR(2) = 590; - SI_VAR(3) = -60; - SI_VAR(4) = 0; + EVT_VAR(0) = 450; + EVT_VAR(1) = -137; + EVT_VAR(2) = 590; + EVT_VAR(3) = -60; + EVT_VAR(4) = 0; spawn N(80242680); spawn N(80245914); ModifyColliderFlags(0, 1, 0x7FFFFE00); ModifyColliderFlags(0, 5, 0x7FFFFE00); - SI_VAR(0) = N(802429E4); + EVT_VAR(0) = N(802429E4); spawn EnterWalk; await N(80241F40); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240D40_CAFA80)(); } }); @@ -331,10 +331,10 @@ EvtSource N(npcAI_80242EE0) = SCRIPT({ EvtSource N(80242F00) = SCRIPT({ 0: - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 30; - SI_VAR(2) -= 2; - PlayEffect(0x11, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 30, 0, 0, 0, 0, 0, 0, 0, 0); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 30; + EVT_VAR(2) -= 2; + PlayEffect(0x11, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 30, 0, 0, 0, 0, 0, 0, 0, 0); sleep 15; goto 0; }); @@ -390,40 +390,40 @@ s32 N(D_8024308C_CB1DCC) = { }; EvtSource N(80243090) = SCRIPT({ - SI_VAR(9) = SI_VAR(1); + EVT_VAR(9) = EVT_VAR(1); ShowConsumableChoicePopup(); - SI_VAR(10) = SI_VAR(0); - match SI_VAR(0) { + EVT_VAR(10) = EVT_VAR(0); + match EVT_VAR(0) { == 0 {} == -1 {} else { - RemoveItemAt(SI_VAR(1)); - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - N(AddPlayerHandsOffset)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - MakeItemEntity(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5), 1, 0); + RemoveItemAt(EVT_VAR(1)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(AddPlayerHandsOffset)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + MakeItemEntity(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1, 0); SetPlayerAnimation(0x60005); sleep 30; SetPlayerAnimation(ANIM_10002); - RemoveItemEntity(SI_VAR(0)); + RemoveItemEntity(EVT_VAR(0)); } } - N(func_802419C4_CB0704)(SI_VAR(10)); + N(func_802419C4_CB0704)(EVT_VAR(10)); CloseChoicePopup(); unbind; }); EvtSource N(802431C4) = SCRIPT({ - N(func_802419FC_CB073C)(SI_VAR(0)); + N(func_802419FC_CB073C)(EVT_VAR(0)); bind_padlock N(80243090) 0x10 0 N(D_802462C0_B4AA30); - N(func_80241970_CB06B0)(SI_VAR(0)); + N(func_80241970_CB06B0)(EVT_VAR(0)); }); 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)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + if (EVT_SAVE_FLAG(1364) == 0) { + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 350); SetCamPitch(0, 18.5, -7.5); SetCamSpeed(0, 4.0); @@ -433,23 +433,23 @@ EvtSource N(interact_80243214) = SCRIPT({ MESSAGE_ID(0x11, 0x0042)); SetPlayerAnimation(ANIM_THINKING); N(func_80241BCC_CB090C)(); - SI_VAR(0) = 0x80246430; - SI_VAR(1) = 0; + EVT_VAR(0) = 0x80246430; + EVT_VAR(1) = 0; await N(802431C4); - match SI_VAR(0) { + match EVT_VAR(0) { <= 0 { SetPlayerAnimation(ANIM_STAND_STILL); SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_02_Anim_2, NPC_ANIM_gate_flower_Palette_02_Anim_1, 0, MESSAGE_ID(0x11, 0x0043)); } else { - SI_VAR(8) = SI_VAR(0); - N(func_80241B5C_CB089C)(SI_VAR(0)); - MakeItemEntity(SI_VAR(8), -695, 20, -29, 1, 0); - SI_VAR(7) = SI_VAR(0); + EVT_VAR(8) = EVT_VAR(0); + N(func_80241B5C_CB089C)(EVT_VAR(0)); + MakeItemEntity(EVT_VAR(8), -695, 20, -29, 1, 0); + EVT_VAR(7) = EVT_VAR(0); PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2095, 0); SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_02_Anim_3); sleep 20; - RemoveItemEntity(SI_VAR(7)); - match SI_VAR(8) { + RemoveItemEntity(EVT_VAR(7)); + match EVT_VAR(8) { == 160 { SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_02_Anim_4, NPC_ANIM_gate_flower_Palette_02_Anim_1, 0, MESSAGE_ID(0x11, 0x0046)); PlaySoundAtNpc(NPC_SELF, 0x21C, 0); @@ -460,23 +460,23 @@ EvtSource N(interact_80243214) = SCRIPT({ MakeLerp(0, 100, 30, 1); loop { UpdateLerp(); - SI_VAR(8) = (float) SI_VAR(0); - SI_VAR(9) = (float) SI_VAR(0); - SI_VAR(8) *= 0.5; - SI_VAR(9) *= 1.2001953125; - RotateModel(103, SI_VAR(8), 0, 1, 0); - RotateModel(104, SI_VAR(8), 0, 1, 0); - RotateModel(105, SI_VAR(8), 0, 1, 0); - RotateModel(99, SI_VAR(9), 0, -1, 0); - RotateModel(100, SI_VAR(9), 0, -1, 0); - RotateModel(101, SI_VAR(9), 0, -1, 0); + EVT_VAR(8) = (float) EVT_VAR(0); + EVT_VAR(9) = (float) EVT_VAR(0); + EVT_VAR(8) *= 0.5; + EVT_VAR(9) *= 1.2001953125; + RotateModel(103, EVT_VAR(8), 0, 1, 0); + RotateModel(104, EVT_VAR(8), 0, 1, 0); + RotateModel(105, EVT_VAR(8), 0, 1, 0); + RotateModel(99, EVT_VAR(9), 0, -1, 0); + RotateModel(100, EVT_VAR(9), 0, -1, 0); + RotateModel(101, EVT_VAR(9), 0, -1, 0); sleep 1; - if (SI_VAR(1) != 1) { + if (EVT_VAR(1) != 1) { break loop; } } SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_02_Anim_5); - SI_SAVE_FLAG(1364) = 1; + EVT_SAVE_FLAG(1364) = 1; } == 159 { SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_02_Anim_4, NPC_ANIM_gate_flower_Palette_02_Anim_1, 0, MESSAGE_ID(0x11, 0x0045)); @@ -490,26 +490,26 @@ EvtSource N(interact_80243214) = SCRIPT({ MESSAGE_ID(0x11, 0x0044)); SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_02_Anim_6); PlaySoundAtNpc(NPC_SELF, 0x2096, 0); - MakeItemEntity(SI_VAR(8), 125, 20, 0, 1, 0); - SI_VAR(7) = SI_VAR(0); + MakeItemEntity(EVT_VAR(8), 125, 20, 0, 1, 0); + EVT_VAR(7) = EVT_VAR(0); sleep 5; - GetAngleToPlayer(-1, SI_VAR(0)); - if (SI_VAR(0) < 180) { + GetAngleToPlayer(-1, EVT_VAR(0)); + if (EVT_VAR(0) < 180) { MakeLerp(0, 100, 7, 0); loop { UpdateLerp(); - SI_VAR(2) = -0.5; - SI_VAR(3) = -0.19921875; - SI_VAR(4) = 0.900390625; - SI_VAR(2) *= (float) SI_VAR(0); - SI_VAR(3) *= (float) SI_VAR(0); - SI_VAR(4) *= (float) SI_VAR(0); - SI_VAR(2) += -700.0; - SI_VAR(3) += 15.0; - SI_VAR(4) += -25.0; - N(func_80241A98_CB07D8)(SI_VAR(7), SI_VAR(2), SI_VAR(3), SI_VAR(4)); + EVT_VAR(2) = -0.5; + EVT_VAR(3) = -0.19921875; + EVT_VAR(4) = 0.900390625; + EVT_VAR(2) *= (float) EVT_VAR(0); + EVT_VAR(3) *= (float) EVT_VAR(0); + EVT_VAR(4) *= (float) EVT_VAR(0); + EVT_VAR(2) += -700.0; + EVT_VAR(3) += 15.0; + EVT_VAR(4) += -25.0; + N(func_80241A98_CB07D8)(EVT_VAR(7), EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -517,24 +517,24 @@ EvtSource N(interact_80243214) = SCRIPT({ MakeLerp(0, 100, 7, 0); loop { UpdateLerp(); - SI_VAR(2) = 0.5; - SI_VAR(3) = -0.19921875; - SI_VAR(4) = 0.900390625; - SI_VAR(2) *= (float) SI_VAR(0); - SI_VAR(3) *= (float) SI_VAR(0); - SI_VAR(4) *= (float) SI_VAR(0); - SI_VAR(2) += -690.0; - SI_VAR(3) += 15.0; - SI_VAR(4) += -25.0; - N(func_80241A98_CB07D8)(SI_VAR(7), SI_VAR(2), SI_VAR(3), SI_VAR(4)); + EVT_VAR(2) = 0.5; + EVT_VAR(3) = -0.19921875; + EVT_VAR(4) = 0.900390625; + EVT_VAR(2) *= (float) EVT_VAR(0); + EVT_VAR(3) *= (float) EVT_VAR(0); + EVT_VAR(4) *= (float) EVT_VAR(0); + EVT_VAR(2) += -690.0; + EVT_VAR(3) += 15.0; + EVT_VAR(4) += -25.0; + N(func_80241A98_CB07D8)(EVT_VAR(7), EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } } SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_02_Anim_1); - RemoveItemEntity(SI_VAR(7)); + RemoveItemEntity(EVT_VAR(7)); SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_02_Anim_1); EndSpeech(-1, NPC_ANIM_gate_flower_Palette_02_Anim_2, NPC_ANIM_gate_flower_Palette_02_Anim_1, 0); } @@ -546,7 +546,7 @@ EvtSource N(interact_80243214) = SCRIPT({ } sleep 10; } else { - if (SI_STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { + if (EVT_STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_02_Anim_9, NPC_ANIM_gate_flower_Palette_02_Anim_8, 0, MESSAGE_ID(0x11, 0x0047)); } else { @@ -560,7 +560,7 @@ EvtSource N(interact_80243214) = SCRIPT({ EvtSource N(init_80243B20) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80243214)); - if (SI_SAVE_FLAG(1364) == 1) { + if (EVT_SAVE_FLAG(1364) == 1) { SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_02_Anim_5); ModifyColliderFlags(0, 17, 0x7FFFFE00); RotateModel(103, 50, 0, 1, 0); @@ -865,13 +865,13 @@ StaticNpc N(npcGroup_802449D8) = { EvtSource N(init_80244BC8) = SCRIPT({ spawn { sleep 2; - GetNpcPointer(2, SI_VAR(0)); - if (SI_VAR(0) == 0) { + GetNpcPointer(2, EVT_VAR(0)); + if (EVT_VAR(0) == 0) { RemoveNpc(NPC_SELF); return; } - RandInt(100, SI_VAR(0)); - if (SI_VAR(0) < 30) { + RandInt(100, EVT_VAR(0)); + if (EVT_VAR(0) < 30) { SetNpcFlagBits(NPC_DAYZEE1, ((0x00000002 | NPC_FLAG_4)), TRUE); SetNpcPos(NPC_DAYZEE1, 0, -1000, 0); } else { @@ -1262,13 +1262,13 @@ FoliageDropList N(tree1_Drops) = { .itemID = ITEM_BLUE_BERRY, .pos = { 340, 102, -89 }, .spawnMode = 0xC, - .spawnFlag = SI_AREA_FLAG(29), + .spawnFlag = EVT_AREA_FLAG(29), }, { .itemID = ITEM_BLUE_BERRY, .pos = { 440, 102, -89 }, .spawnMode = 0xC, - .spawnFlag = SI_AREA_FLAG(30), + .spawnFlag = EVT_AREA_FLAG(30), }, } }; @@ -1282,9 +1282,9 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_80245904) = { 391.0f, 0.0f, -102.0f, 0.0f }; EvtSource N(80245914) = SCRIPT({ - SI_AREA_FLAG(29) = 0; - SI_AREA_FLAG(30) = 0; - SI_VAR(0) = N(tree1); + EVT_AREA_FLAG(29) = 0; + EVT_AREA_FLAG(30) = 0; + EVT_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 22; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80245904); }); @@ -1295,120 +1295,120 @@ static s32 N(pad_598C) = { EvtSource N(80245990) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); EvtSource N(80245C3C) = SCRIPT({ - SI_VAR(9) = SI_VAR(6); - SI_VAR(8) = SI_VAR(5); - SI_VAR(7) = SI_VAR(4); - SI_VAR(6) = SI_VAR(3); - SI_VAR(5) = SI_VAR(2); - SI_VAR(4) = SI_VAR(1); - SI_VAR(3) = SI_VAR(0); - EnableModel(SI_VAR(6), 0); + EVT_VAR(9) = EVT_VAR(6); + EVT_VAR(8) = EVT_VAR(5); + EVT_VAR(7) = EVT_VAR(4); + EVT_VAR(6) = EVT_VAR(3); + EVT_VAR(5) = EVT_VAR(2); + EVT_VAR(4) = EVT_VAR(1); + EVT_VAR(3) = EVT_VAR(0); + EnableModel(EVT_VAR(6), 0); 0: - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); N(UnkFunc43)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { sleep 1; goto 0; } spawn { sleep 5; - EnableModel(SI_VAR(6), 1); + EnableModel(EVT_VAR(6), 1); } - if (SI_VAR(10) != 0) { + if (EVT_VAR(10) != 0) { spawn { sleep 5; - SI_VAR(0) = SI_VAR(3); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - SI_VAR(1) += 10; - SI_VAR(2) += 8; - PlayEffect(0x11, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 15, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(0) = EVT_VAR(3); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + EVT_VAR(1) += 10; + EVT_VAR(2) += 8; + PlayEffect(0x11, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 15, 0, 0, 0, 0, 0, 0, 0, 0); sleep 15; - SI_VAR(1) -= 10; - MakeItemEntity(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 14, 0); + EVT_VAR(1) -= 10; + MakeItemEntity(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 14, 0); } } spawn { sleep 10; - PlaySoundAt(0xF8, 0, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + PlaySoundAt(0xF8, 0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); } MakeLerp(0, 180, 20, 2); 1: UpdateLerp(); - RotateModel(SI_VAR(8), SI_VAR(0), 1, 0, 0); - RotateModel(SI_VAR(9), SI_VAR(0), 1, 0, 0); - if (SI_VAR(1) == 1) { + RotateModel(EVT_VAR(8), EVT_VAR(0), 1, 0, 0); + RotateModel(EVT_VAR(9), EVT_VAR(0), 1, 0, 0); + if (EVT_VAR(1) == 1) { sleep 1; goto 1; } - EnableModel(SI_VAR(7), 0); + EnableModel(EVT_VAR(7), 0); }); EvtSource N(80245F5C) = SCRIPT({ GetModelCenter(60); - SI_VAR(3) = 60; - SI_VAR(4) = 61; - SI_VAR(5) = 62; - SI_VAR(6) = 63; - SI_VAR(10) = 0; + EVT_VAR(3) = 60; + EVT_VAR(4) = 61; + EVT_VAR(5) = 62; + EVT_VAR(6) = 63; + EVT_VAR(10) = 0; spawn N(80245C3C); GetModelCenter(54); - SI_VAR(3) = 54; - SI_VAR(4) = 55; - SI_VAR(5) = 56; - SI_VAR(6) = 57; - SI_VAR(10) = 0; + EVT_VAR(3) = 54; + EVT_VAR(4) = 55; + EVT_VAR(5) = 56; + EVT_VAR(6) = 57; + EVT_VAR(10) = 0; spawn N(80245C3C); GetModelCenter(48); - SI_VAR(3) = 48; - SI_VAR(4) = 49; - SI_VAR(5) = 50; - SI_VAR(6) = 51; - SI_VAR(10) = 0; + EVT_VAR(3) = 48; + EVT_VAR(4) = 49; + EVT_VAR(5) = 50; + EVT_VAR(6) = 51; + EVT_VAR(10) = 0; spawn N(80245C3C); GetModelCenter(67); - SI_VAR(3) = 67; - SI_VAR(4) = 66; - SI_VAR(5) = 68; - SI_VAR(6) = 69; - SI_VAR(10) = 174; + EVT_VAR(3) = 67; + EVT_VAR(4) = 66; + EVT_VAR(5) = 68; + EVT_VAR(6) = 69; + EVT_VAR(10) = 174; spawn N(80245C3C); }); diff --git a/src/world/area_flo/flo_09/CB50E0.c b/src/world/area_flo/flo_09/CB50E0.c index 5223e7204a..d7870062e7 100644 --- a/src/world/area_flo/flo_09/CB50E0.c +++ b/src/world/area_flo/flo_09/CB50E0.c @@ -24,7 +24,7 @@ MapConfig N(config) = { }; EvtSource N(80241880) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -35,40 +35,40 @@ EvtSource N(80241880) = SCRIPT({ EvtSource N(802418F0) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -82,7 +82,7 @@ EvtSource N(80241C54) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -91,48 +91,48 @@ EvtSource N(main) = SCRIPT({ spawn N(802425DC); spawn N(802434A8); ModifyColliderFlags(3, 9, 0x00000006); - SI_VAR(0) = -511; - SI_VAR(1) = -4; - SI_VAR(2) = -319; - SI_VAR(3) = 10; - SI_VAR(4) = 0; + EVT_VAR(0) = -511; + EVT_VAR(1) = -4; + EVT_VAR(2) = -319; + EVT_VAR(3) = 10; + EVT_VAR(4) = 0; spawn N(802418F0); - SI_VAR(0) = -302; - SI_VAR(1) = 77; - SI_VAR(2) = -32; - SI_VAR(3) = 116; - SI_VAR(4) = 0; + EVT_VAR(0) = -302; + EVT_VAR(1) = 77; + EVT_VAR(2) = -32; + EVT_VAR(3) = 116; + EVT_VAR(4) = 0; spawn N(802418F0); - SI_VAR(0) = 51; - SI_VAR(1) = 18; - SI_VAR(2) = 141; - SI_VAR(3) = 127; - SI_VAR(4) = 0; + EVT_VAR(0) = 51; + EVT_VAR(1) = 18; + EVT_VAR(2) = 141; + EVT_VAR(3) = 127; + EVT_VAR(4) = 0; spawn N(802418F0); - SI_VAR(0) = 234; - SI_VAR(1) = 38; - SI_VAR(2) = 502; - SI_VAR(3) = 98; - SI_VAR(4) = 0; + EVT_VAR(0) = 234; + EVT_VAR(1) = 38; + EVT_VAR(2) = 502; + EVT_VAR(3) = 98; + EVT_VAR(4) = 0; spawn N(802418F0); - SI_VAR(0) = -525; - SI_VAR(1) = -163; - SI_VAR(2) = -400; - SI_VAR(3) = -80; - SI_VAR(4) = 60; + EVT_VAR(0) = -525; + EVT_VAR(1) = -163; + EVT_VAR(2) = -400; + EVT_VAR(3) = -80; + EVT_VAR(4) = 60; spawn N(802418F0); - SI_VAR(0) = -346; - SI_VAR(1) = -148; - SI_VAR(2) = 517; - SI_VAR(3) = -91; - SI_VAR(4) = 60; + EVT_VAR(0) = -346; + EVT_VAR(1) = -148; + EVT_VAR(2) = 517; + EVT_VAR(3) = -91; + EVT_VAR(4) = 60; spawn N(802418F0); ModifyColliderFlags(0, 1, 0x7FFFFE00); ModifyColliderFlags(0, 5, 0x7FFFFE00); - SI_VAR(0) = N(80241C54); + EVT_VAR(0) = N(80241C54); spawn EnterWalk; await N(80241880); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CB5000)(); } }); @@ -143,135 +143,135 @@ static s32 N(pad_2004)[] = { EvtSource N(80242010) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); EvtSource N(802422BC) = SCRIPT({ - SI_VAR(9) = SI_VAR(6); - SI_VAR(8) = SI_VAR(5); - SI_VAR(7) = SI_VAR(4); - SI_VAR(6) = SI_VAR(3); - SI_VAR(5) = SI_VAR(2); - SI_VAR(4) = SI_VAR(1); - SI_VAR(3) = SI_VAR(0); - EnableModel(SI_VAR(6), 0); + EVT_VAR(9) = EVT_VAR(6); + EVT_VAR(8) = EVT_VAR(5); + EVT_VAR(7) = EVT_VAR(4); + EVT_VAR(6) = EVT_VAR(3); + EVT_VAR(5) = EVT_VAR(2); + EVT_VAR(4) = EVT_VAR(1); + EVT_VAR(3) = EVT_VAR(0); + EnableModel(EVT_VAR(6), 0); 0: - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); N(UnkFunc43)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { sleep 1; goto 0; } spawn { sleep 5; - EnableModel(SI_VAR(6), 1); + EnableModel(EVT_VAR(6), 1); } - if (SI_VAR(10) != 0) { + if (EVT_VAR(10) != 0) { spawn { sleep 5; - SI_VAR(0) = SI_VAR(3); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - SI_VAR(1) += 10; - SI_VAR(2) += 8; - PlayEffect(0x11, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 15, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(0) = EVT_VAR(3); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + EVT_VAR(1) += 10; + EVT_VAR(2) += 8; + PlayEffect(0x11, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 15, 0, 0, 0, 0, 0, 0, 0, 0); sleep 15; - SI_VAR(1) -= 10; - MakeItemEntity(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 14, 0); + EVT_VAR(1) -= 10; + MakeItemEntity(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 14, 0); } } spawn { sleep 10; - PlaySoundAt(0xF8, 0, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + PlaySoundAt(0xF8, 0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); } MakeLerp(0, 180, 20, 2); 1: UpdateLerp(); - RotateModel(SI_VAR(8), SI_VAR(0), 1, 0, 0); - RotateModel(SI_VAR(9), SI_VAR(0), 1, 0, 0); - if (SI_VAR(1) == 1) { + RotateModel(EVT_VAR(8), EVT_VAR(0), 1, 0, 0); + RotateModel(EVT_VAR(9), EVT_VAR(0), 1, 0, 0); + if (EVT_VAR(1) == 1) { sleep 1; goto 1; } - EnableModel(SI_VAR(7), 0); + EnableModel(EVT_VAR(7), 0); }); EvtSource N(802425DC) = SCRIPT({ GetModelCenter(69); - SI_VAR(3) = 69; - SI_VAR(4) = 70; - SI_VAR(5) = 71; - SI_VAR(6) = 72; - SI_VAR(10) = 0; + EVT_VAR(3) = 69; + EVT_VAR(4) = 70; + EVT_VAR(5) = 71; + EVT_VAR(6) = 72; + EVT_VAR(10) = 0; spawn N(802422BC); GetModelCenter(75); - SI_VAR(3) = 75; - SI_VAR(4) = 76; - SI_VAR(5) = 77; - SI_VAR(6) = 78; - SI_VAR(10) = 174; + EVT_VAR(3) = 75; + EVT_VAR(4) = 76; + EVT_VAR(5) = 77; + EVT_VAR(6) = 78; + EVT_VAR(10) = 174; spawn N(802422BC); GetModelCenter(83); - SI_VAR(3) = 83; - SI_VAR(4) = 84; - SI_VAR(5) = 85; - SI_VAR(6) = 86; - SI_VAR(10) = 0; + EVT_VAR(3) = 83; + EVT_VAR(4) = 84; + EVT_VAR(5) = 85; + EVT_VAR(6) = 86; + EVT_VAR(10) = 0; spawn N(802422BC); GetModelCenter(89); - SI_VAR(3) = 89; - SI_VAR(4) = 90; - SI_VAR(5) = 91; - SI_VAR(6) = 92; - SI_VAR(10) = 0; + EVT_VAR(3) = 89; + EVT_VAR(4) = 90; + EVT_VAR(5) = 91; + EVT_VAR(6) = 92; + EVT_VAR(10) = 0; spawn N(802422BC); GetModelCenter(97); - SI_VAR(3) = 97; - SI_VAR(4) = 98; - SI_VAR(5) = 99; - SI_VAR(6) = 100; - SI_VAR(10) = 0; + EVT_VAR(3) = 97; + EVT_VAR(4) = 98; + EVT_VAR(5) = 99; + EVT_VAR(6) = 100; + EVT_VAR(10) = 0; spawn N(802422BC); GetModelCenter(103); - SI_VAR(3) = 103; - SI_VAR(4) = 104; - SI_VAR(5) = 105; - SI_VAR(6) = 106; - SI_VAR(10) = 0; + EVT_VAR(3) = 103; + EVT_VAR(4) = 104; + EVT_VAR(5) = 105; + EVT_VAR(6) = 106; + EVT_VAR(10) = 0; spawn N(802422BC); }); @@ -282,46 +282,46 @@ static s32 N(pad_2874)[] = { #include "world/common/foliage.inc.c" 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)); - SI_VAR(2) += 35; - SetNpcPos(NPC_BZZAP1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_BZZAP1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(1) < 0) { + GetModelCenter(EVT_VAR(9)); + EVT_VAR(2) += 35; + SetNpcPos(NPC_BZZAP1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } }); 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)); + if (EVT_SAVE_FLAG(1382) == 0) { + if (EVT_AREA_VAR(5) == 1) { + MakeItemEntity(ITEM_HAPPY_FLOWER_B, -250, 100, 0, 13, EVT_SAVE_FLAG(1382)); } else { - SI_VAR(9) = 14; + EVT_VAR(9) = 14; spawn N(802431E4); } - SI_AREA_VAR(4) = 0; - SI_AREA_VAR(5) = 0; + EVT_AREA_VAR(4) = 0; + EVT_AREA_VAR(5) = 0; } }); EvtSource N(tree2_Callback) = SCRIPT({ - if (SI_SAVE_FLAG(1382) == 0) { - SI_AREA_VAR(4) = 1; - SI_AREA_VAR(5) = 0; + if (EVT_SAVE_FLAG(1382) == 0) { + EVT_AREA_VAR(4) = 1; + EVT_AREA_VAR(5) = 0; } }); EvtSource N(tree3_Callback) = SCRIPT({ - if (SI_SAVE_FLAG(1382) == 0) { - if (SI_AREA_VAR(4) == 1) { - if (SI_AREA_VAR(5) == 0) { - SI_AREA_VAR(5) = 1; + if (EVT_SAVE_FLAG(1382) == 0) { + if (EVT_AREA_VAR(4) == 1) { + if (EVT_AREA_VAR(5) == 0) { + EVT_AREA_VAR(5) = 1; return; } } - SI_VAR(9) = 22; + EVT_VAR(9) = 22; spawn N(802431E4); - SI_AREA_VAR(4) = 0; - SI_AREA_VAR(5) = 0; + EVT_AREA_VAR(4) = 0; + EVT_AREA_VAR(5) = 0; } }); @@ -380,15 +380,15 @@ ShakeTreeConfig N(tree3) = { Vec4f N(triggerCoord_80243498) = { 200.0f, 0.0f, 1.0f, 0.0f }; EvtSource N(802434A8) = SCRIPT({ - SI_AREA_VAR(4) = 0; - SI_AREA_VAR(5) = 0; - SI_VAR(0) = N(tree1); + EVT_AREA_VAR(4) = 0; + EVT_AREA_VAR(5) = 0; + EVT_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 15; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80243428); - SI_VAR(0) = N(tree2); + EVT_VAR(0) = N(tree2); bind N(shakeTree) TRIGGER_WALL_HAMMER 16; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80243460); - SI_VAR(0) = N(tree3); + EVT_VAR(0) = N(tree3); bind N(shakeTree) TRIGGER_WALL_HAMMER 17; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80243498); }); @@ -466,14 +466,14 @@ NpcSettings N(npcSettings_80243710) = { EvtSource N(npcAI_8024373C) = SCRIPT({ loop { - GetSelfVar(0, SI_VAR(0)); - match SI_VAR(0) { + GetSelfVar(0, EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(1) > 0) { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(1) > 0) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetNpcJumpscale(NPC_SELF, 0); - NpcJump0(NPC_SELF, SI_VAR(0), 50, SI_VAR(2), 15); + NpcJump0(NPC_SELF, EVT_VAR(0), 50, EVT_VAR(2), 15); SetSelfVar(0, 1); BindNpcAI(NPC_SELF, N(npcAI_80243674)); } @@ -492,8 +492,8 @@ EvtSource N(npcAI_8024373C) = SCRIPT({ }); EvtSource N(defeat_802438C8) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { SetSelfVar(0, 2); BindNpcAI(NPC_SELF, N(npcAI_8024373C)); diff --git a/src/world/area_flo/flo_10/CB9200.c b/src/world/area_flo/flo_10/CB9200.c index 6f1828714d..1cbae522dc 100644 --- a/src/world/area_flo/flo_10/CB9200.c +++ b/src/world/area_flo/flo_10/CB9200.c @@ -1,7 +1,7 @@ #include "flo_10.h" s32 N(func_80240000_CB9200)(void) { - if (get_variable(NULL, SI_STORY_PROGRESS) <= 0x30) { + if (get_variable(NULL, EVT_STORY_PROGRESS) <= 0x30) { return MESSAGE_ID(0x19, 0x0119); } return MESSAGE_ID(0x19, 0x011A); diff --git a/src/world/area_flo/flo_10/CB9280.c b/src/world/area_flo/flo_10/CB9280.c index a5c937f165..186c6c99ee 100644 --- a/src/world/area_flo/flo_10/CB9280.c +++ b/src/world/area_flo/flo_10/CB9280.c @@ -21,11 +21,11 @@ MapConfig N(config) = { }; EvtSource N(802414E0) = SCRIPT({ - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); } else { - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -33,7 +33,7 @@ EvtSource N(802414E0) = SCRIPT({ } } } - if (SI_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (EVT_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { PlaySound(0x80000022); } }); @@ -53,7 +53,7 @@ static s32 N(pad_1624)[] = { }; EvtSource N(80241630) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (EVT_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { MakeItemEntity(ITEM_WATER_STONE, 0, -60, 6, 1, 0); } }); @@ -64,40 +64,40 @@ static s32 N(pad_167C) = { EvtSource N(80241680) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -108,7 +108,7 @@ EvtSource N(80241988) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -122,26 +122,26 @@ EvtSource N(main) = SCRIPT({ spawn N(80244074); ModifyColliderFlags(3, 11, 0x00000006); ModifyColliderFlags(3, 12, 0x00000006); - SI_VAR(0) = -265; - SI_VAR(1) = 247; - SI_VAR(2) = 199; - SI_VAR(3) = 313; - SI_VAR(4) = 0; + EVT_VAR(0) = -265; + EVT_VAR(1) = 247; + EVT_VAR(2) = 199; + EVT_VAR(3) = 313; + EVT_VAR(4) = 0; spawn N(80241680); - SI_VAR(0) = -300; - SI_VAR(1) = -275; - SI_VAR(2) = -140; - SI_VAR(3) = -185; - SI_VAR(4) = 0; + EVT_VAR(0) = -300; + EVT_VAR(1) = -275; + EVT_VAR(2) = -140; + EVT_VAR(3) = -185; + EVT_VAR(4) = 0; spawn N(80241680); - SI_VAR(0) = 263; - SI_VAR(1) = -248; - SI_VAR(2) = 362; - SI_VAR(3) = 146; - SI_VAR(4) = 0; + EVT_VAR(0) = 263; + EVT_VAR(1) = -248; + EVT_VAR(2) = 362; + EVT_VAR(3) = 146; + EVT_VAR(4) = 0; spawn N(80241680); - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { == 1 { spawn N(8024324C); } @@ -150,12 +150,12 @@ EvtSource N(main) = SCRIPT({ spawn N(80241988); } else { ModifyColliderFlags(0, 1, 0x7FFFFE00); - SI_VAR(0) = N(80241988); + EVT_VAR(0) = N(80241988); spawn EnterWalk; } } await N(802414E0); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240040_CB9240)(); } }); @@ -167,21 +167,21 @@ static s32 N(pad_1CA8)[] = { s32** N(D_80241CB0_CBAEB0) = NULL; EvtSource N(80241CB4) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 0); + ShowGotItem(EVT_VAR(0), 1, 0); return; }); EvtSource N(80241CE4) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 16); + ShowGotItem(EVT_VAR(0), 1, 16); return; }); EvtSource N(updateTexturePan_80241D14) = SCRIPT({ group 0; - if (SI_VAR(5) == 1) { - if (SI_VAR(6) == 1) { - if (SI_VAR(7) == 1) { - if (SI_VAR(8) == 1) { + if (EVT_VAR(5) == 1) { + if (EVT_VAR(6) == 1) { + if (EVT_VAR(7) == 1) { + if (EVT_VAR(8) == 1) { N(UnkTexturePanFunc)(); return; } @@ -195,8 +195,8 @@ EvtSource N(80241DB0) = SCRIPT({ MakeLerp(-50, 170, 385, 0); 1: UpdateLerp(); - TranslateGroup(56, 0, SI_VAR(0), 0); - if (SI_VAR(1) == 1) { + TranslateGroup(56, 0, EVT_VAR(0), 0); + if (EVT_VAR(1) == 1) { sleep 1; goto 1; } @@ -206,13 +206,13 @@ EvtSource N(80241E40) = SCRIPT({ MakeLerp(0, 100, 90, 1); 1: UpdateLerp(); - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(3) = (float) SI_VAR(0); - SI_VAR(2) /= 333.0; - SI_VAR(3) /= 100.0; - SI_VAR(2) += 0.703125; - ScaleGroup(56, SI_VAR(2), SI_VAR(3), SI_VAR(2)); - if (SI_VAR(1) == 1) { + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(3) = (float) EVT_VAR(0); + EVT_VAR(2) /= 333.0; + EVT_VAR(3) /= 100.0; + EVT_VAR(2) += 0.703125; + ScaleGroup(56, EVT_VAR(2), EVT_VAR(3), EVT_VAR(2)); + if (EVT_VAR(1) == 1) { sleep 1; goto 1; } @@ -221,19 +221,19 @@ EvtSource N(80241E40) = SCRIPT({ EvtSource N(80241F20) = SCRIPT({ EnableTexPanning(53, 1); spawn { - SI_VAR(0) = 10; - SI_VAR(1) = -150; - SI_VAR(2) = 0; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 1; - SI_VAR(6) = 0; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 10; + EVT_VAR(1) = -150; + EVT_VAR(2) = 0; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 1; + EVT_VAR(6) = 0; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_80241D14); } }); @@ -247,17 +247,17 @@ EvtSource N(80242030) = SCRIPT({ EvtSource N(8024206C) = SCRIPT({ sleep 80; EnableNpcShadow(NPC_LILY, FALSE); - GetNpcPos(NPC_LILY, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + GetNpcPos(NPC_LILY, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); MakeLerp(10, 55, 108, 0); loop { UpdateLerp(); - SI_VAR(6) = SI_VAR(4); - SI_VAR(6) += SI_VAR(0); - SI_VAR(6) += -10; - SetNpcPos(NPC_LILY, SI_VAR(3), SI_VAR(6), SI_VAR(5)); - TranslateGroup(60, 0, SI_VAR(0), 0); + EVT_VAR(6) = EVT_VAR(4); + EVT_VAR(6) += EVT_VAR(0); + EVT_VAR(6) += -10; + SetNpcPos(NPC_LILY, EVT_VAR(3), EVT_VAR(6), EVT_VAR(5)); + TranslateGroup(60, 0, EVT_VAR(0), 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -267,24 +267,24 @@ EvtSource N(80242188) = SCRIPT({ DisablePlayerPhysics(TRUE); sleep 40; SetPlayerAnimation(0x80024); - GetPlayerPos(SI_VAR(2), SI_VAR(0), SI_VAR(3)); + GetPlayerPos(EVT_VAR(2), EVT_VAR(0), EVT_VAR(3)); MakeLerp(-50, 90, 60, 1); loop { UpdateLerp(); - SI_VAR(2) /= 1.2001953125; - SI_VAR(3) /= 1.2001953125; - SetPlayerPos(SI_VAR(2), SI_VAR(0), SI_VAR(3)); + EVT_VAR(2) /= 1.2001953125; + EVT_VAR(3) /= 1.2001953125; + SetPlayerPos(EVT_VAR(2), EVT_VAR(0), EVT_VAR(3)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } MakeLerp(90, 270, 280, 0); loop { UpdateLerp(); - SetPlayerPos(0, SI_VAR(0), 0); + SetPlayerPos(0, EVT_VAR(0), 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -293,9 +293,9 @@ EvtSource N(80242188) = 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)); - SetPanTarget(0, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + UseSettingsFrom(0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + SetPanTarget(0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); SetCamSpeed(0, 0.7001953125); SetCamPitch(0, 25.0, -22.0); SetCamDistance(0, 450); @@ -317,8 +317,8 @@ EvtSource N(8024244C) = SCRIPT({ MakeLerp(170, 75, 150, 0); 1: UpdateLerp(); - TranslateGroup(56, 0, SI_VAR(0), 0); - if (SI_VAR(1) == 1) { + TranslateGroup(56, 0, EVT_VAR(0), 0); + if (EVT_VAR(1) == 1) { sleep 1; goto 1; } @@ -328,13 +328,13 @@ EvtSource N(802424DC) = SCRIPT({ MakeLerp(100, 15, 150, 1); 1: UpdateLerp(); - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(3) = (float) SI_VAR(0); - SI_VAR(2) /= 333.0; - SI_VAR(3) /= 100.0; - SI_VAR(2) += 0.703125; - ScaleGroup(56, SI_VAR(2), SI_VAR(3), SI_VAR(2)); - if (SI_VAR(1) == 1) { + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(3) = (float) EVT_VAR(0); + EVT_VAR(2) /= 333.0; + EVT_VAR(3) /= 100.0; + EVT_VAR(2) += 0.703125; + ScaleGroup(56, EVT_VAR(2), EVT_VAR(3), EVT_VAR(2)); + if (EVT_VAR(1) == 1) { sleep 1; goto 1; } @@ -350,9 +350,9 @@ const char N(flo_24_name_hack)[]; EvtSource N(802425E4) = SCRIPT({ sleep 20; SetPlayerAnimation(ANIM_STAND_STILL); - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - UseSettingsFrom(0, SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SetPanTarget(0, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + UseSettingsFrom(0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + SetPanTarget(0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); SetCamSpeed(0, 1.0); SetCamDistance(0, 600); PanToTarget(0, 0, 1); @@ -405,8 +405,8 @@ EvtSource N(802427EC) = SCRIPT({ SetNpcAnimation(NPC_LILY, NPC_ANIM_lily_Palette_00_Anim_6); sleep 20; SetNpcAnimation(NPC_LILY, NPC_ANIM_lily_Palette_00_Anim_1); - SI_VAR(0) = 90; - SI_VAR(1) = 1; + EVT_VAR(0) = 90; + EVT_VAR(1) = 1; await N(80241CB4); AddKeyItem(ITEM_MIRACLE_WATER); SpeakToPlayer(NPC_LILY, NPC_ANIM_lily_Palette_00_Anim_3, NPC_ANIM_lily_Palette_00_Anim_7, 0, MESSAGE_ID(0x11, 0x0084)); @@ -419,7 +419,7 @@ EvtSource N(802427EC) = SCRIPT({ }); EvtSource N(80242AE8) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (EVT_STORY_PROGRESS < STORY_CH6_FILLED_SPRING_WITH_WATER) { EnableGroup(52, 0); EnableGroup(61, 0); ModifyColliderFlags(0, 21, 0x7FFFFE00); @@ -439,102 +439,102 @@ EvtSource N(80242AE8) = SCRIPT({ EnableTexPanning(49, 1); EnableTexPanning(51, 1); spawn { - SI_VAR(0) = 1; - SI_VAR(1) = 0; - SI_VAR(2) = -2000; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 0; - SI_VAR(6) = 1; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 1; + EVT_VAR(1) = 0; + EVT_VAR(2) = -2000; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 0; + EVT_VAR(6) = 1; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_80241D14); } spawn { - SI_VAR(0) = 3; - SI_VAR(1) = -100; - SI_VAR(2) = 80; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 1; - SI_VAR(6) = 1; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 3; + EVT_VAR(1) = -100; + EVT_VAR(2) = 80; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 1; + EVT_VAR(6) = 1; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_80241D14); } spawn { - SI_VAR(0) = 5; - SI_VAR(1) = -1000; - SI_VAR(2) = 2000; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 1; - SI_VAR(6) = 1; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 5; + EVT_VAR(1) = -1000; + EVT_VAR(2) = 2000; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 1; + EVT_VAR(6) = 1; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_80241D14); } spawn { - SI_VAR(0) = 6; - SI_VAR(1) = 0; - SI_VAR(2) = -2000; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 0; - SI_VAR(6) = 1; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 6; + EVT_VAR(1) = 0; + EVT_VAR(2) = -2000; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 0; + EVT_VAR(6) = 1; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_80241D14); } spawn { - SI_VAR(0) = 8; - SI_VAR(1) = 0; - SI_VAR(2) = -1500; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 0; - SI_VAR(6) = 1; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 8; + EVT_VAR(1) = 0; + EVT_VAR(2) = -1500; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 0; + EVT_VAR(6) = 1; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_80241D14); } spawn { - SI_VAR(0) = 9; - SI_VAR(1) = 0; - SI_VAR(2) = -1000; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 0; - SI_VAR(6) = 1; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 9; + EVT_VAR(1) = 0; + EVT_VAR(2) = -1000; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 0; + EVT_VAR(6) = 1; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_80241D14); } - if (SI_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (EVT_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { spawn N(80241F20); } }); @@ -575,9 +575,9 @@ s32 N(itemList_80243394)[] = { }; EvtSource N(8024339C) = SCRIPT({ - if (SI_SAVE_FLAG(1376) == 1) { - GetCurrentPartner(SI_VAR(10)); - if (SI_VAR(10) != 0) { + if (EVT_SAVE_FLAG(1376) == 1) { + GetCurrentPartner(EVT_VAR(10)); + if (EVT_VAR(10) != 0) { AwaitPlayerLeave(0, 0, 19); return; } @@ -585,15 +585,15 @@ EvtSource N(8024339C) = SCRIPT({ group 0; SetTimeFreezeMode(1); ShowKeyChoicePopup(); - SI_VAR(2) = SI_VAR(0); - match SI_VAR(2) { + EVT_VAR(2) = EVT_VAR(0); + match EVT_VAR(2) { == -1 { CloseChoicePopup(); SetTimeFreezeMode(0); sleep 10; SpeakToPlayer(NPC_LILY, NPC_ANIM_lily_Palette_00_Anim_4, NPC_ANIM_lily_Palette_00_Anim_8, 0, MESSAGE_ID(0x11, 0x0081)); } else { - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); PlayerMoveTo(-17, -17, 20); func_802CF56C(2); InterpPlayerYaw(100, 1); @@ -601,9 +601,9 @@ EvtSource N(8024339C) = SCRIPT({ AdjustCam(0, 1.0, 0, 450, 25.0, -6.0); sleep 10; SetPlayerAnimation(0x60006); - RemoveKeyItemAt(SI_VAR(1)); + RemoveKeyItemAt(EVT_VAR(1)); MakeItemEntity(ITEM_WATER_STONE, 0, -60, 6, 1, 0); - SI_VAR(10) = SI_VAR(0); + EVT_VAR(10) = EVT_VAR(0); CloseChoicePopup(); SetTimeFreezeMode(0); await N(802425E4); @@ -620,27 +620,27 @@ EvtSource N(802435F8) = 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)); - if (SI_VAR(5) < SI_VAR(2)) { - SI_VAR(6) = 30; + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + if (EVT_VAR(5) < EVT_VAR(2)) { + EVT_VAR(6) = 30; } else { - SI_VAR(6) = 20; + EVT_VAR(6) = 20; } - SI_VAR(1) = SI_VAR(0); - SI_VAR(4) = SI_VAR(0); - SI_VAR(1) -= SI_VAR(6); - SI_VAR(4) += SI_VAR(6); - match SI_VAR(3) { - SI_VAR(1) ... SI_VAR(4) { + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(4) = EVT_VAR(0); + EVT_VAR(1) -= EVT_VAR(6); + EVT_VAR(4) += EVT_VAR(6); + match EVT_VAR(3) { + EVT_VAR(1) ... EVT_VAR(4) { spawn { - if (SI_VAR(3) < SI_VAR(0)) { - SI_VAR(0) -= 40; + if (EVT_VAR(3) < EVT_VAR(0)) { + EVT_VAR(0) -= 40; } else { - SI_VAR(0) += 40; + EVT_VAR(0) += 40; } SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100)), TRUE); - PlayerMoveTo(SI_VAR(0), SI_VAR(5), 15); + PlayerMoveTo(EVT_VAR(0), EVT_VAR(5), 15); PlayerFaceNpc(0, 1); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100)), FALSE); } @@ -650,12 +650,12 @@ EvtSource N(80243628) = SCRIPT({ EvtSource N(interact_802437C8) = SCRIPT({ await N(802415C4); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { spawn N(80243628); - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 325); SetCamPitch(0, 23.0, -9.0); SetCamSpeed(0, 4.0); @@ -666,11 +666,11 @@ EvtSource N(interact_802437C8) = SCRIPT({ EndSpeech(-1, NPC_ANIM_lily_Palette_00_Anim_9, NPC_ANIM_lily_Palette_00_Anim_5, 5); } < STORY_CH6_GOT_WATER_STONE { - if (SI_SAVE_FLAG(1375) == 0) { + if (EVT_SAVE_FLAG(1375) == 0) { spawn N(80243628); - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 325); SetCamPitch(0, 23.0, -9.0); SetCamSpeed(0, 4.0); @@ -687,8 +687,8 @@ EvtSource N(interact_802437C8) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM_lily_Palette_00_Anim_1, NPC_ANIM_lily_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x007A)); EndSpeech(-1, NPC_ANIM_lily_Palette_00_Anim_5, NPC_ANIM_lily_Palette_00_Anim_1, 0); - GetPlayerTargetYaw(SI_VAR(0)); - InterpNpcYaw(NPC_SELF, SI_VAR(0), 1); + GetPlayerTargetYaw(EVT_VAR(0)); + InterpNpcYaw(NPC_SELF, EVT_VAR(0), 1); sleep 20; SpeakToPlayer(NPC_SELF, NPC_ANIM_lily_Palette_00_Anim_2, NPC_ANIM_lily_Palette_00_Anim_1, 5, MESSAGE_ID(0x11, 0x007B)); @@ -698,7 +698,7 @@ EvtSource N(interact_802437C8) = SCRIPT({ 0x007C)); ShowChoice(MESSAGE_ID(0x1E, 0x0011)); sleep 10; - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { ContinueSpeech(-1, NPC_ANIM_lily_Palette_00_Anim_3, NPC_ANIM_lily_Palette_00_Anim_7, 0, MESSAGE_ID(0x11, 0x007D)); } @@ -707,7 +707,7 @@ EvtSource N(interact_802437C8) = SCRIPT({ } } sleep 10; - SI_SAVE_FLAG(1375) = 1; + EVT_SAVE_FLAG(1375) = 1; SetEnemyFlagBits(-1, 4194304, 0); } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_lily_Palette_00_Anim_4, NPC_ANIM_lily_Palette_00_Anim_8, 5, MESSAGE_ID(0x11, @@ -716,7 +716,7 @@ EvtSource N(interact_802437C8) = SCRIPT({ } < 49 { SpeakToPlayer(NPC_SELF, NPC_ANIM_lily_Palette_00_Anim_2, NPC_ANIM_lily_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0080)); - SI_SAVE_FLAG(1376) = 1; + EVT_SAVE_FLAG(1376) = 1; } < 53 { SpeakToPlayer(NPC_SELF, NPC_ANIM_lily_Palette_00_Anim_4, NPC_ANIM_lily_Palette_00_Anim_8, 0, MESSAGE_ID(0x11, 0x0085)); @@ -736,9 +736,9 @@ EvtSource N(interact_802437C8) = SCRIPT({ EvtSource N(init_80243D78) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_802437C8)); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_GOT_WATER_STONE { - if (SI_SAVE_FLAG(1375) == 0) { + if (EVT_SAVE_FLAG(1375) == 0) { SetNpcAnimation(NPC_SELF, NPC_ANIM_lily_Palette_00_Anim_8); InterpNpcYaw(NPC_SELF, 90, 1); SetEnemyFlagBits(-1, 4194304, 1); diff --git a/src/world/area_flo/flo_10/CBA430.c b/src/world/area_flo/flo_10/CBA430.c index fe8b31bd2c..d94ad93bdd 100644 --- a/src/world/area_flo/flo_10/CBA430.c +++ b/src/world/area_flo/flo_10/CBA430.c @@ -19,7 +19,7 @@ FoliageDropList N(tree1_Drops) = { .itemID = ITEM_JAMMIN_JELLY, .pos = { 80, 100, -240 }, .spawnMode = 0xF, - .pickupFlag = SI_SAVE_FLAG(1383), + .pickupFlag = EVT_SAVE_FLAG(1383), }, } }; @@ -33,7 +33,7 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_80244A40) = { 137.0f, 0.0f, -283.0f, 0.0f }; EvtSource N(80244A50) = SCRIPT({ - SI_VAR(0) = N(tree1); + EVT_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_11/CBDCD0.c b/src/world/area_flo/flo_11/CBDCD0.c index 52c497a66d..37b386ac63 100644 --- a/src/world/area_flo/flo_11/CBDCD0.c +++ b/src/world/area_flo/flo_11/CBDCD0.c @@ -27,7 +27,7 @@ MapConfig N(config) = { }; EvtSource N(802403E0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -38,40 +38,40 @@ EvtSource N(802403E0) = SCRIPT({ EvtSource N(80240450) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -81,33 +81,33 @@ EvtSource N(802406FC) = SCRIPT({ DisablePartnerAI(0); HidePlayerShadow(TRUE); SetPlayerAnimation(ANIM_STAND_STILL); - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { EnableNpcShadow(NPC_PARTNER, FALSE); SetNpcPos(NPC_PARTNER, 0, -1000, 0); } - GetEntryID(SI_VAR(0)); + GetEntryID(EVT_VAR(0)); N(GetEntryPos)(); - SI_VAR(2) -= 40; - SetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - InterpPlayerYaw(SI_VAR(4), 0); + EVT_VAR(2) -= 40; + SetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + InterpPlayerYaw(EVT_VAR(4), 0); PlaySound(0x163); func_802D286C(256); func_802D2520(ANIM_STAND_STILL, 5, 2, 1, 1, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); loop 40 { - SI_VAR(1) += 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) += 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } sleep 3; - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { spawn { DisablePartnerAI(0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) -= 3; - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) -= 3; + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetNpcFlagBits(NPC_PARTNER, ((0x00000002)), FALSE); EnablePartnerAI(); EnableNpcShadow(NPC_PARTNER, TRUE); @@ -123,7 +123,7 @@ EvtSource N(802406FC) = SCRIPT({ 0: N(GetCurrentFloor)(); sleep 1; - if (SI_VAR(0) != -1) { + if (EVT_VAR(0) != -1) { goto 0; } spawn 0xFE363C8A; @@ -133,30 +133,30 @@ EvtSource N(80240A50) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); HidePlayerShadow(TRUE); - ModifyColliderFlags(0, SI_VAR(11), 0x7FFFFE00); - GetEntryID(SI_VAR(0)); + ModifyColliderFlags(0, EVT_VAR(11), 0x7FFFFE00); + GetEntryID(EVT_VAR(0)); N(GetEntryPos)(); - SI_VAR(5) = SI_VAR(1); - SI_VAR(6) = SI_VAR(2); - SI_VAR(7) = SI_VAR(3); - SI_VAR(2) += 2; - SetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - InterpPlayerYaw(SI_VAR(4), 0); - if (SI_VAR(4) == 90) { - SI_VAR(5) += 40; + EVT_VAR(5) = EVT_VAR(1); + EVT_VAR(6) = EVT_VAR(2); + EVT_VAR(7) = EVT_VAR(3); + EVT_VAR(2) += 2; + SetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + InterpPlayerYaw(EVT_VAR(4), 0); + if (EVT_VAR(4) == 90) { + EVT_VAR(5) += 40; } else { - SI_VAR(5) -= 40; + EVT_VAR(5) -= 40; } - UseSettingsFrom(0, SI_VAR(5), SI_VAR(6), SI_VAR(7)); - SetPanTarget(0, SI_VAR(5), SI_VAR(6), SI_VAR(7)); + UseSettingsFrom(0, EVT_VAR(5), EVT_VAR(6), EVT_VAR(7)); + SetPanTarget(0, EVT_VAR(5), EVT_VAR(6), EVT_VAR(7)); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { DisablePartnerAI(0); EnableNpcShadow(NPC_PARTNER, FALSE); SetNpcPos(NPC_PARTNER, 0, -1000, 0); - InterpNpcYaw(NPC_PARTNER, SI_VAR(0), 0); + InterpNpcYaw(NPC_PARTNER, EVT_VAR(0), 0); } sleep 1; PlaySound(0x163); @@ -168,22 +168,22 @@ EvtSource N(80240A50) = SCRIPT({ func_802D2520(ANIM_10002, 5, 3, 1, 1, 0); loop 40 { N(SomeXYZFunc2)(1.0); - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { spawn { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) -= 3; - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) -= 3; + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); EnableNpcShadow(NPC_PARTNER, TRUE); EnablePartnerAI(); } } sleep 5; func_802D2520(ANIM_10002, 0, 0, 0, 0, 0); - ModifyColliderFlags(1, SI_VAR(11), 0x7FFFFE00); + ModifyColliderFlags(1, EVT_VAR(11), 0x7FFFFE00); DisablePlayerInput(FALSE); DisablePlayerPhysics(FALSE); PanToTarget(0, 0, 0); @@ -192,13 +192,13 @@ EvtSource N(80240A50) = SCRIPT({ EvtSource N(80240E40) = SCRIPT({ N(UnkFunc25)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { return; } - GetCurrentPartner(SI_VAR(0)); - if (SI_VAR(0) != 0) { - GetCurrentPartnerID(SI_VAR(1)); - if (SI_VAR(1) != 6) { + GetCurrentPartner(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(1)); + if (EVT_VAR(1) != 6) { return; } else { func_802D2B6C(); @@ -215,24 +215,24 @@ EvtSource N(80240F1C) = SCRIPT({ group 27; DisablePlayerPhysics(TRUE); HidePlayerShadow(TRUE); - SI_VAR(0) = SI_VAR(10); + EVT_VAR(0) = EVT_VAR(10); N(GetEntryPos)(); - PlayerMoveTo(SI_VAR(1), SI_VAR(3), 3); - SI_VAR(0) = SI_VAR(10); + PlayerMoveTo(EVT_VAR(1), EVT_VAR(3), 3); + EVT_VAR(0) = EVT_VAR(10); N(GetEntryPos)(); - SetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); SetPlayerFlagBits(2097152, 1); N(GetCurrentCameraYawClamped180)(); - InterpPlayerYaw(SI_VAR(0), 0); + InterpPlayerYaw(EVT_VAR(0), 0); sleep 2; SetPlayerFlagBits(2097152, 0); PlaySound(0x163); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); spawn { sleep 4; loop 40 { - SI_VAR(1) -= 1; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(1) -= 1; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } @@ -243,18 +243,18 @@ EvtSource N(80240F1C) = SCRIPT({ }); EvtSource N(802410F8) = SCRIPT({ - IsPlayerOnValidFloor(SI_VAR(0)); - if (SI_VAR(0) == 0) { + IsPlayerOnValidFloor(EVT_VAR(0)); + if (EVT_VAR(0) == 0) { return; } - GetPlayerActionState(SI_VAR(0)); - if (SI_VAR(0) == 26) { + GetPlayerActionState(EVT_VAR(0)); + if (EVT_VAR(0) == 26) { return; } - GetCurrentPartner(SI_VAR(0)); - if (SI_VAR(0) != 0) { - GetCurrentPartnerID(SI_VAR(1)); - if (SI_VAR(1) != 6) { + GetCurrentPartner(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { + GetCurrentPartnerID(EVT_VAR(1)); + if (EVT_VAR(1) != 6) { return; } else { func_802D2B6C(); @@ -266,23 +266,23 @@ EvtSource N(802410F8) = SCRIPT({ group 27; N(SetPlayerStatusAnimFlags100000)(); DisablePlayerPhysics(TRUE); - ModifyColliderFlags(0, SI_VAR(11), 0x7FFFFE00); - SI_VAR(0) = SI_VAR(10); + ModifyColliderFlags(0, EVT_VAR(11), 0x7FFFFE00); + EVT_VAR(0) = EVT_VAR(10); N(GetEntryPos)(); - SI_VAR(5) = SI_VAR(1); - SI_VAR(6) = SI_VAR(2); - SI_VAR(6) += 2; - SI_VAR(7) = SI_VAR(3); - SI_VAR(8) = SI_VAR(4); - SI_VAR(8) += 180; - if (SI_VAR(4) >= 360) { - SI_VAR(4) -= 360; + EVT_VAR(5) = EVT_VAR(1); + EVT_VAR(6) = EVT_VAR(2); + EVT_VAR(6) += 2; + EVT_VAR(7) = EVT_VAR(3); + EVT_VAR(8) = EVT_VAR(4); + EVT_VAR(8) += 180; + if (EVT_VAR(4) >= 360) { + EVT_VAR(4) -= 360; } - InterpPlayerYaw(SI_VAR(8), 1); + InterpPlayerYaw(EVT_VAR(8), 1); sleep 1; PlaySound(0x163); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPlayerPos(SI_VAR(0), SI_VAR(6), SI_VAR(7)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_VAR(6), EVT_VAR(7)); SetPlayerAnimation(ANIM_STAND_STILL); func_802D286C(2048); func_802D2520(ANIM_STAND_STILL, 5, 3, 1, 1, 0); @@ -294,7 +294,7 @@ EvtSource N(802410F8) = SCRIPT({ sleep 3; loop 40 { N(SomeXYZFunc2)(1.0); - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } } @@ -343,43 +343,43 @@ EvtSource N(80241610) = SCRIPT({ }); EvtSource N(8024164C) = SCRIPT({ - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); await N(80240E40); }); EvtSource N(80241698) = SCRIPT({ bind N(exitWalk_80241488) TRIGGER_FLOOR_ABOVE 0; bind N(exitWalk_8024142C) TRIGGER_FLOOR_ABOVE 4; - SI_VAR(0) = 2; - SI_VAR(1) = 35; - SI_VAR(2) = N(802414E4); - bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1); - SI_VAR(0) = 3; - SI_VAR(1) = 34; - SI_VAR(2) = N(80241520); - bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1); - SI_VAR(0) = 4; - SI_VAR(1) = 33; - SI_VAR(2) = N(8024155C); - bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1); - SI_VAR(0) = 5; - SI_VAR(1) = 32; - SI_VAR(2) = N(80241598); - bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1); - SI_VAR(0) = 6; - SI_VAR(1) = 31; - SI_VAR(2) = N(802415D4); - bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1); - SI_VAR(0) = 7; - SI_VAR(1) = 30; - SI_VAR(2) = N(80241610); - bind N(8024164C) TRIGGER_FLOOR_TOUCH SI_VAR(1); + EVT_VAR(0) = 2; + EVT_VAR(1) = 35; + EVT_VAR(2) = N(802414E4); + bind N(8024164C) TRIGGER_FLOOR_TOUCH EVT_VAR(1); + EVT_VAR(0) = 3; + EVT_VAR(1) = 34; + EVT_VAR(2) = N(80241520); + bind N(8024164C) TRIGGER_FLOOR_TOUCH EVT_VAR(1); + EVT_VAR(0) = 4; + EVT_VAR(1) = 33; + EVT_VAR(2) = N(8024155C); + bind N(8024164C) TRIGGER_FLOOR_TOUCH EVT_VAR(1); + EVT_VAR(0) = 5; + EVT_VAR(1) = 32; + EVT_VAR(2) = N(80241598); + bind N(8024164C) TRIGGER_FLOOR_TOUCH EVT_VAR(1); + EVT_VAR(0) = 6; + EVT_VAR(1) = 31; + EVT_VAR(2) = N(802415D4); + bind N(8024164C) TRIGGER_FLOOR_TOUCH EVT_VAR(1); + EVT_VAR(0) = 7; + EVT_VAR(1) = 30; + EVT_VAR(2) = N(80241610); + bind N(8024164C) TRIGGER_FLOOR_TOUCH EVT_VAR(1); }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -390,19 +390,19 @@ EvtSource N(main) = SCRIPT({ await N(makeEntities); ModifyColliderFlags(0, 1, 0x7FFFFE00); ModifyColliderFlags(0, 5, 0x7FFFFE00); - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) <= 1) { - SI_VAR(0) = N(80241698); + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) <= 1) { + EVT_VAR(0) = N(80241698); spawn EnterWalk; spawn N(80242240); sleep 1; } else { - SI_VAR(10) = N(80241698); + EVT_VAR(10) = N(80241698); spawn N(802406FC); sleep 1; } await N(802403E0); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_802402E0_CBDFB0)(); } ModifyColliderFlags(3, 9, 0x00000009); @@ -468,20 +468,20 @@ s32 N(vectorList_80241C84)[] = { EvtSource N(80241CB4) = SCRIPT({ loop { PlaySound(0x295); - sleep SI_VAR(0); + sleep EVT_VAR(0); } }); EvtSource N(80241CF4) = SCRIPT({ - SI_VAR(0) = 5; - SI_MAP_VAR(11) = spawn N(80241CB4); + EVT_VAR(0) = 5; + EVT_MAP_VAR(11) = spawn N(80241CB4); spawn { LoadPath(160, N(vectorList_80241AEC), 8, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_LAKITU0, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKITU0, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { break loop; } } @@ -489,13 +489,13 @@ EvtSource N(80241CF4) = SCRIPT({ LoadPath(160, N(vectorList_80241B4C), 8, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_LAKITU1, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKITU1, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { break loop; } } - SI_MAP_VAR(10) = 1; + EVT_MAP_VAR(10) = 1; }); EvtSource N(80241E4C) = SCRIPT({ @@ -503,9 +503,9 @@ EvtSource N(80241E4C) = SCRIPT({ LoadPath(30, N(vectorList_80241BAC), 4, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_LAKITU0, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKITU0, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { break loop; } } @@ -513,25 +513,25 @@ EvtSource N(80241E4C) = SCRIPT({ LoadPath(45, N(vectorList_80241BDC), 4, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_LAKITU1, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKITU1, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { break loop; } } - kill SI_MAP_VAR(11); + kill EVT_MAP_VAR(11); }); EvtSource N(80241F80) = SCRIPT({ - SI_VAR(0) = 4; - SI_MAP_VAR(11) = spawn N(80241CB4); + EVT_VAR(0) = 4; + EVT_MAP_VAR(11) = spawn N(80241CB4); spawn { LoadPath(35, N(vectorList_80241C0C), 3, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_LAKITU0, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKITU0, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { break loop; } } @@ -539,9 +539,9 @@ EvtSource N(80241F80) = SCRIPT({ LoadPath(35, N(vectorList_80241C30), 3, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_LAKITU1, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKITU1, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { break loop; } } @@ -552,9 +552,9 @@ EvtSource N(802420C8) = SCRIPT({ LoadPath(40, N(vectorList_80241C54), 4, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_LAKITU0, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKITU0, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { break loop; } } @@ -563,54 +563,54 @@ EvtSource N(802420C8) = SCRIPT({ LoadPath(40, N(vectorList_80241C84), 4, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_LAKITU1, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKITU1, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { break loop; } } SetNpcPos(NPC_LAKITU1, 0, -1000, 0); sleep 40; - kill SI_MAP_VAR(11); + kill EVT_MAP_VAR(11); }); EvtSource N(80242240) = SCRIPT({ - if (SI_SAVE_FLAG(1377) == 1) { + if (EVT_SAVE_FLAG(1377) == 1) { return; } - if (SI_STORY_PROGRESS < STORY_CH6_GOT_MAGICAL_BEAN) { + if (EVT_STORY_PROGRESS < STORY_CH6_GOT_MAGICAL_BEAN) { return; } - if (SI_SAVE_FLAG(1375) == 0) { + if (EVT_SAVE_FLAG(1375) == 0) { return; } SetNpcPos(NPC_LAKITU0, 460, 200, -240); SetNpcPos(NPC_LAKITU1, -100, 200, -50); loop { sleep 1; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(0) < 440) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(0) < 440) { break loop; } } DisablePlayerInput(TRUE); - SI_MAP_VAR(10) = 0; + EVT_MAP_VAR(10) = 0; spawn N(80241CF4); SetCamType(0, 1, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 90.0); SetCamPitch(0, 25.0, -7.0); SetCamDistance(0, 450); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); sleep 20; - SI_VAR(0) = 270; - SI_VAR(1) = 100; - SI_VAR(2) = -87; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) = 270; + EVT_VAR(1) = 100; + EVT_VAR(2) = -87; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamPitch(0, 14.0, -11.0); SetCamPosA(0, 87, 0); SetCamPosB(0, 0, -50); @@ -624,7 +624,7 @@ EvtSource N(80242240) = SCRIPT({ PanToTarget(0, 0, 1); loop { sleep 1; - if (SI_MAP_VAR(10) == 1) { + if (EVT_MAP_VAR(10) == 1) { break loop; } } @@ -640,9 +640,9 @@ EvtSource N(80242240) = SCRIPT({ SpeakToPlayer(NPC_LAKITU0, NPC_ANIM_lakitu_Palette_00_Anim_16, NPC_ANIM_lakitu_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x008A)); SpeakToPlayer(NPC_LAKITU1, NPC_ANIM_lakitu_Palette_00_Anim_16, NPC_ANIM_lakitu_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x008B)); SetCamType(0, 1, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 90.0); SetCamPitch(0, 14.0, -11.0); SetCamDistance(0, 450); @@ -656,8 +656,8 @@ EvtSource N(80242240) = SCRIPT({ EvtSource N(idle_80242810) = SCRIPT({ loop { - GetSelfVar(0, SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetSelfVar(0, EVT_VAR(0)); + if (EVT_VAR(0) != 0) { break loop; } sleep 1; @@ -669,17 +669,17 @@ EvtSource N(idle_80242810) = SCRIPT({ }); EvtSource N(defeat_802428B8) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { SetNpcPos(NPC_LAKITU0, 400, 20, -40); SetNpcPos(NPC_LAKITU1, 400, 20, 40); InterpNpcYaw(NPC_LAKITU0, 270, 0); InterpNpcYaw(NPC_LAKITU1, 270, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(2) += -60; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(2) += -60; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 900); SetCamPitch(0, 24.0, -4.0); SetCamPosA(0, -95.0, 0.0); @@ -689,8 +689,8 @@ EvtSource N(defeat_802428B8) = SCRIPT({ WaitForCam(0, 1.0); await N(802420C8); ResetCam(0, 4.0); - SI_SAVE_FLAG(1377) = 1; - SI_MAP_VAR(0) = 1; + EVT_SAVE_FLAG(1377) = 1; + EVT_MAP_VAR(0) = 1; DisablePlayerInput(FALSE); } == 1 {} @@ -700,11 +700,11 @@ EvtSource N(defeat_802428B8) = SCRIPT({ }); EvtSource N(defeat_80242AC4) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { 0: - if (SI_MAP_VAR(0) == 0) { + if (EVT_MAP_VAR(0) == 0) { sleep 1; goto 0; } @@ -717,10 +717,10 @@ EvtSource N(defeat_80242AC4) = 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) { - if (SI_SAVE_FLAG(1375) == 1) { - SI_MAP_VAR(0) = 0; + if (EVT_SAVE_FLAG(1377) == 0) { + if (EVT_STORY_PROGRESS >= STORY_CH6_GOT_MAGICAL_BEAN) { + if (EVT_SAVE_FLAG(1375) == 1) { + EVT_MAP_VAR(0) = 0; BindNpcIdle(NPC_SELF, N(idle_80242810)); BindNpcDefeat(NPC_SELF, N(defeat_802428B8)); SetNpcPos(NPC_LAKITU0, 350, 120, -220); @@ -732,9 +732,9 @@ EvtSource N(init_80242B58) = 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) { - if (SI_SAVE_FLAG(1375) == 1) { + if (EVT_SAVE_FLAG(1377) == 0) { + if (EVT_STORY_PROGRESS >= STORY_CH6_GOT_MAGICAL_BEAN) { + if (EVT_SAVE_FLAG(1375) == 1) { BindNpcDefeat(NPC_SELF, N(defeat_80242AC4)); SetNpcPos(NPC_LAKITU1, 200, 110, 29); InterpNpcYaw(NPC_LAKITU1, 0, 1); @@ -831,7 +831,7 @@ static s32 N(pad_30EC) = { EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA0E8, -220, 60, -75, 0, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1384)); + AssignBlockFlag(EVT_SAVE_FLAG(1384)); }); #include "world/common/SetPlayerStatusAnimFlags100000.inc.c" diff --git a/src/world/area_flo/flo_12/CC0E70.c b/src/world/area_flo/flo_12/CC0E70.c index 8e81ae8ca2..af9b048534 100644 --- a/src/world/area_flo/flo_12/CC0E70.c +++ b/src/world/area_flo/flo_12/CC0E70.c @@ -23,11 +23,11 @@ MapConfig N(config) = { }; EvtSource N(80240750) = SCRIPT({ - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); } else { - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -53,40 +53,40 @@ static s32 N(pad_86C) = { EvtSource N(80240870) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -97,43 +97,43 @@ EvtSource N(80240B78) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - SI_AREA_FLAG(22) = 0; + EVT_AREA_FLAG(22) = 0; MakeNpcs(0, N(npcGroupList_802429B8)); ModifyColliderFlags(3, 11, 0x00000006); - SI_VAR(0) = -65; - SI_VAR(1) = -210; - SI_VAR(2) = 90; - SI_VAR(3) = -110; - SI_VAR(4) = 0; + EVT_VAR(0) = -65; + EVT_VAR(1) = -210; + EVT_VAR(2) = 90; + EVT_VAR(3) = -110; + EVT_VAR(4) = 0; spawn N(80240870); - SI_VAR(0) = -200; - SI_VAR(1) = 130; - SI_VAR(2) = -80; - SI_VAR(3) = 170; - SI_VAR(4) = 0; + EVT_VAR(0) = -200; + EVT_VAR(1) = 130; + EVT_VAR(2) = -80; + EVT_VAR(3) = 170; + EVT_VAR(4) = 0; spawn N(80240870); - SI_VAR(0) = -270; - SI_VAR(1) = -80; - SI_VAR(2) = -225; - SI_VAR(3) = 125; - SI_VAR(4) = 0; + EVT_VAR(0) = -270; + EVT_VAR(1) = -80; + EVT_VAR(2) = -225; + EVT_VAR(3) = 125; + EVT_VAR(4) = 0; spawn N(80240870); - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { spawn N(802419F4); } else { ModifyColliderFlags(0, 1, 0x7FFFFE00); - SI_VAR(0) = N(80240B78); + EVT_VAR(0) = N(80240B78); spawn EnterWalk; } await N(80240750); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CC0E30)(); } }); @@ -159,12 +159,12 @@ NpcSettings N(npcSettings_80240E5C) = { s32** N(D_802417EC_CC261C) = NULL; EvtSource N(802417F0) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 0); + ShowGotItem(EVT_VAR(0), 1, 0); return; }); EvtSource N(80241820) = SCRIPT({ - ShowGotItem(SI_VAR(0), 1, 16); + ShowGotItem(EVT_VAR(0), 1, 16); return; }); @@ -177,33 +177,33 @@ s32 N(D_80241854_CC2684) = { }; EvtSource N(80241858) = SCRIPT({ - SI_VAR(9) = SI_VAR(1); + EVT_VAR(9) = EVT_VAR(1); ShowKeyChoicePopup(); - SI_VAR(10) = SI_VAR(0); - match SI_VAR(0) { + EVT_VAR(10) = EVT_VAR(0); + match EVT_VAR(0) { == 0 {} == -1 {} else { - RemoveKeyItemAt(SI_VAR(1)); - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - N(AddPlayerHandsOffset)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - SI_VAR(0) |= (const) 0x50000; - MakeItemEntity(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5), 1, 0); + RemoveKeyItemAt(EVT_VAR(1)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(AddPlayerHandsOffset)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + EVT_VAR(0) |= (const) 0x50000; + MakeItemEntity(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1, 0); SetPlayerAnimation(0x60005); sleep 30; SetPlayerAnimation(ANIM_10002); - RemoveItemEntity(SI_VAR(0)); + RemoveItemEntity(EVT_VAR(0)); } } - N(func_80240614_CC1444)(SI_VAR(10)); + N(func_80240614_CC1444)(EVT_VAR(10)); CloseChoicePopup(); unbind; }); EvtSource N(8024199C) = SCRIPT({ - N(func_8024064C_CC147C)(SI_VAR(0)); + N(func_8024064C_CC147C)(EVT_VAR(0)); bind_padlock N(80241858) 0x10 0 N(D_802429E0); - N(func_802405C0_CC13F0)(SI_VAR(0)); + N(func_802405C0_CC13F0)(EVT_VAR(0)); }); s32 N(D_802419EC_CC281C)[] = { @@ -213,9 +213,9 @@ s32 N(D_802419EC_CC281C)[] = { EvtSource N(802419F4) = SCRIPT({ DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); - GetNpcPos(NPC_ROSIE0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_ROSIE0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 350); SetCamPitch(0, 17.0, -9.5); SetCamPosA(0, 0, 0); @@ -250,18 +250,18 @@ EvtSource N(80241BE4) = SCRIPT({ EvtSource N(interact_80241C8C) = SCRIPT({ await N(8024080C); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_GOT_CRYSTAL_BERRY { - match SI_SAVE_FLAG(1378) { + match EVT_SAVE_FLAG(1378) { == 0 { spawn N(80241B6C); - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 30; - SetCamProperties(0, 4.0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 325, 19.0, -9.5); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 30; + SetCamProperties(0, 4.0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 325, 19.0, -9.5); SpeakToPlayer(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_3, NPC_ANIM_rosie_Palette_00_Anim_1, 5, MESSAGE_ID(0x11, 0x008C)); ShowChoice(MESSAGE_ID(0x1E, 0x0011)); sleep 10; - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { ContinueSpeech(-1, NPC_ANIM_rosie_Palette_00_Anim_3, NPC_ANIM_rosie_Palette_00_Anim_1, 5, MESSAGE_ID(0x11, 0x008D)); } @@ -275,7 +275,7 @@ EvtSource N(interact_80241C8C) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_2); MakeItemEntity(ITEM_WATER_STONE, -33, 14, 19, 1, 1380); sleep 10; - match SI_SAVE_FLAG(1375) { + match EVT_SAVE_FLAG(1375) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_4, NPC_ANIM_rosie_Palette_00_Anim_4, 5, MESSAGE_ID(0x11, 0x008F)); } @@ -288,15 +288,15 @@ EvtSource N(interact_80241C8C) = SCRIPT({ sleep 40; SetPlayerAnimation(ANIM_10002); SpeakToPlayer(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_4, NPC_ANIM_rosie_Palette_00_Anim_2, 5, MESSAGE_ID(0x11, 0x0092)); - SI_SAVE_FLAG(1379) = 1; + EVT_SAVE_FLAG(1379) = 1; } } - SI_SAVE_FLAG(1378) = 1; + EVT_SAVE_FLAG(1378) = 1; } == 1 { - match SI_SAVE_FLAG(1379) { + match EVT_SAVE_FLAG(1379) { == 0 { - if (SI_SAVE_FLAG(1375) == 1) { + if (EVT_SAVE_FLAG(1375) == 1) { spawn N(80241BE4); SpeakToPlayer(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_4, NPC_ANIM_rosie_Palette_00_Anim_4, 5, MESSAGE_ID(0x11, 0x0090)); @@ -308,7 +308,7 @@ EvtSource N(interact_80241C8C) = SCRIPT({ SetPlayerAnimation(ANIM_10002); SpeakToPlayer(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_4, NPC_ANIM_rosie_Palette_00_Anim_2, 5, MESSAGE_ID(0x11, 0x0092)); - SI_SAVE_FLAG(1379) = 1; + EVT_SAVE_FLAG(1379) = 1; } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_4, NPC_ANIM_rosie_Palette_00_Anim_4, 5, MESSAGE_ID(0x11, 0x0090)); @@ -322,39 +322,39 @@ EvtSource N(interact_80241C8C) = SCRIPT({ } } < 48 { - FindKeyItem(ITEM_CRYSTAL_BERRY, SI_VAR(0)); - if (SI_VAR(0) != -1) { + FindKeyItem(ITEM_CRYSTAL_BERRY, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { spawn N(80241BE4); - GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 30; - SetCamProperties(0, 4.0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 325, 19.0, -9.5); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 30; + SetCamProperties(0, 4.0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 325, 19.0, -9.5); } SpeakToPlayer(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_4, NPC_ANIM_rosie_Palette_00_Anim_2, 5, MESSAGE_ID(0x11, 0x0094)); - SI_VAR(0) = N(D_802419EC_CC281C); - SI_VAR(1) = 0; + EVT_VAR(0) = N(D_802419EC_CC281C); + EVT_VAR(1) = 0; await N(8024199C); - match SI_VAR(0) { + match EVT_VAR(0) { <= 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_4, NPC_ANIM_rosie_Palette_00_Anim_2, 5, MESSAGE_ID(0x11, 0x0093)); } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_4, NPC_ANIM_rosie_Palette_00_Anim_2, 5, MESSAGE_ID(0x11, 0x0095)); - RemoveItemEntity(SI_VAR(7)); + RemoveItemEntity(EVT_VAR(7)); MakeItemEntity(ITEM_CRYSTAL_BERRY, -33, 14, 19, 1, 1380); - SI_VAR(0) = 87; - SI_VAR(1) = 1; + EVT_VAR(0) = 87; + EVT_VAR(1) = 1; await N(802417F0); AddKeyItem(ITEM_WATER_STONE); sleep 10; SpeakToPlayer(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_4, NPC_ANIM_rosie_Palette_00_Anim_2, 5, MESSAGE_ID(0x11, 0x0096)); - SI_AREA_FLAG(22) = 1; - SI_STORY_PROGRESS = STORY_CH6_GOT_WATER_STONE; + EVT_AREA_FLAG(22) = 1; + EVT_STORY_PROGRESS = STORY_CH6_GOT_WATER_STONE; } } } < 53 { - match SI_AREA_FLAG(22) { + match EVT_AREA_FLAG(22) { == 0 { SpeakToPlayer(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_4, NPC_ANIM_rosie_Palette_00_Anim_2, 5, MESSAGE_ID(0x11, 0x0097)); } @@ -376,30 +376,30 @@ EvtSource N(interact_80241C8C) = 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; - SetNpcPos(NPC_ROSIE1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 35; + SetNpcPos(NPC_ROSIE1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetNpcFlagBits(NPC_ROSIE1, ((0x00000002)), TRUE); SetNpcFlagBits(NPC_ROSIE1, ((NPC_FLAG_HAS_SHADOW)), TRUE); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_GOT_CRYSTAL_BERRY { - if (SI_SAVE_FLAG(1378) == 1) { + if (EVT_SAVE_FLAG(1378) == 1) { SetNpcFlagBits(NPC_ROSIE1, ((NPC_FLAG_100)), FALSE); SetNpcAnimation(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_2); MakeItemEntity(ITEM_WATER_STONE, -33, 14, 19, 1, 1380); - SI_VAR(10) = SI_VAR(0); + EVT_VAR(10) = EVT_VAR(0); } } < STORY_CH6_GOT_WATER_STONE { SetNpcFlagBits(NPC_ROSIE1, ((NPC_FLAG_100)), FALSE); SetNpcAnimation(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_2); MakeItemEntity(ITEM_WATER_STONE, -33, 14, 19, 1, 1380); - SI_VAR(10) = SI_VAR(0); + EVT_VAR(10) = EVT_VAR(0); } else { SetNpcFlagBits(NPC_ROSIE1, ((NPC_FLAG_100)), FALSE); SetNpcAnimation(NPC_SELF, NPC_ANIM_rosie_Palette_00_Anim_2); MakeItemEntity(ITEM_CRYSTAL_BERRY, -33, 14, 19, 1, 1380); - SI_VAR(10) = SI_VAR(0); + EVT_VAR(10) = EVT_VAR(0); } } }); diff --git a/src/world/area_flo/flo_13/CC3850.c b/src/world/area_flo/flo_13/CC3850.c index 199338e17f..f11b08bff8 100644 --- a/src/world/area_flo/flo_13/CC3850.c +++ b/src/world/area_flo/flo_13/CC3850.c @@ -33,12 +33,12 @@ MapConfig N(config) = { }; EvtSource N(802436D0) = SCRIPT({ - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(0) < -500) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(0) < -500) { goto 10; } 0: - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -46,14 +46,14 @@ EvtSource N(802436D0) = SCRIPT({ } } loop { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(0) < -500) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(0) < -500) { break loop; } sleep 1; } 10: - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_SUN_TOWER_CLOUDY, 0, 8); } else { @@ -61,8 +61,8 @@ EvtSource N(802436D0) = SCRIPT({ } } loop { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(0) > -500) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(0) > -500) { break loop; } sleep 1; @@ -93,9 +93,9 @@ EvtSource N(80243950) = 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) { + MakeItemEntity(ITEM_MEGA_SMASH, -61, 60, -85, 17, EVT_SAVE_FLAG(1385)); + MakeItemEntity(ITEM_SHOOTING_STAR, 128, 0, 157, 17, EVT_SAVE_FLAG(1386)); + if (EVT_SAVE_FLAG(1385) == 0) { MakeEntity(0x802BCF00, -160, 160, -90, 0, MAKE_ENTITY_END); AssignScript(N(80243950)); } else { @@ -109,40 +109,40 @@ static s32 N(pad_3A3C) = { EvtSource N(80243A40) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -156,7 +156,7 @@ EvtSource N(80243DA4) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -165,42 +165,42 @@ EvtSource N(main) = SCRIPT({ MakeNpcs(0, N(npcGroupList_80247984)); await N(makeEntities); ModifyColliderFlags(3, 13, 0x00000006); - SI_VAR(0) = 274; - SI_VAR(1) = -137; - SI_VAR(2) = 583; - SI_VAR(3) = -64; - SI_VAR(4) = 0; + EVT_VAR(0) = 274; + EVT_VAR(1) = -137; + EVT_VAR(2) = 583; + EVT_VAR(3) = -64; + EVT_VAR(4) = 0; spawn N(80243A40); - SI_VAR(0) = 433; - SI_VAR(1) = 108; - SI_VAR(2) = 580; - SI_VAR(3) = 169; - SI_VAR(4) = 0; + EVT_VAR(0) = 433; + EVT_VAR(1) = 108; + EVT_VAR(2) = 580; + EVT_VAR(3) = 169; + EVT_VAR(4) = 0; spawn N(80243A40); - SI_VAR(0) = -460; - SI_VAR(1) = 90; - SI_VAR(2) = -125; - SI_VAR(3) = 130; - SI_VAR(4) = 0; + EVT_VAR(0) = -460; + EVT_VAR(1) = 90; + EVT_VAR(2) = -125; + EVT_VAR(3) = 130; + EVT_VAR(4) = 0; spawn N(80243A40); - SI_VAR(0) = -420; - SI_VAR(1) = -130; - SI_VAR(2) = -260; - SI_VAR(3) = -90; - SI_VAR(4) = 0; + EVT_VAR(0) = -420; + EVT_VAR(1) = -130; + EVT_VAR(2) = -260; + EVT_VAR(3) = -90; + EVT_VAR(4) = 0; spawn N(80243A40); - SI_VAR(0) = -220; - SI_VAR(1) = -137; - SI_VAR(2) = 0; - SI_VAR(3) = -50; - SI_VAR(4) = 160; + EVT_VAR(0) = -220; + EVT_VAR(1) = -137; + EVT_VAR(2) = 0; + EVT_VAR(3) = -50; + EVT_VAR(4) = 160; spawn N(80243A40); ModifyColliderFlags(0, 1, 0x7FFFFE00); ModifyColliderFlags(0, 5, 0x7FFFFE00); - SI_VAR(0) = N(80243DA4); + EVT_VAR(0) = N(80243DA4); spawn EnterWalk; await N(802438B0); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CC3810)(); } }); @@ -273,8 +273,8 @@ EvtSource N(npcAI_80244240) = SCRIPT({ EvtSource N(802442B0) = SCRIPT({ SetNpcRotation(NPC_SELF, 0, 0, 0); - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { SetSelfVar(10, 100); DoNpcDefeat(); @@ -317,35 +317,35 @@ Vec3f N(vectorList_80244420)[] = { }; EvtSource N(8024445C) = SCRIPT({ - GetNpcPos(NPC_WORLD_LAKILESTER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_WORLD_LAKILESTER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); 0: - GetNpcPos(NPC_WORLD_LAKILESTER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + GetNpcPos(NPC_WORLD_LAKILESTER, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); N(UnkFunc42)(); - InterpNpcYaw(NPC_WORLD_LAKILESTER, SI_VAR(10), 0); - SI_VAR(0) = SI_VAR(3); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - GetAngleBetweenNPCs(-4, 0, SI_VAR(10)); - InterpNpcYaw(NPC_PARTNER, SI_VAR(10), 0); + InterpNpcYaw(NPC_WORLD_LAKILESTER, EVT_VAR(10), 0); + EVT_VAR(0) = EVT_VAR(3); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + GetAngleBetweenNPCs(-4, 0, EVT_VAR(10)); + InterpNpcYaw(NPC_PARTNER, EVT_VAR(10), 0); PlayerFaceNpc(0, 0); sleep 1; goto 0; }); EvtSource N(80244560) = SCRIPT({ - GetNpcPos(NPC_LAKILULU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_LAKILULU0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); 0: - GetNpcPos(NPC_LAKILULU0, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + GetNpcPos(NPC_LAKILULU0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); N(UnkFunc42)(); - InterpNpcYaw(NPC_LAKILULU0, SI_VAR(10), 0); - SI_VAR(0) = SI_VAR(3); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - GetAngleBetweenNPCs(-4, 1, SI_VAR(10)); - InterpNpcYaw(NPC_PARTNER, SI_VAR(10), 0); - if (SI_STORY_PROGRESS < STORY_CH6_LAKILESTER_JOINED_PARTY) { - GetAngleBetweenNPCs(0, 1, SI_VAR(11)); - InterpNpcYaw(NPC_WORLD_LAKILESTER, SI_VAR(11), 0); + InterpNpcYaw(NPC_LAKILULU0, EVT_VAR(10), 0); + EVT_VAR(0) = EVT_VAR(3); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + GetAngleBetweenNPCs(-4, 1, EVT_VAR(10)); + InterpNpcYaw(NPC_PARTNER, EVT_VAR(10), 0); + if (EVT_STORY_PROGRESS < STORY_CH6_LAKILESTER_JOINED_PARTY) { + GetAngleBetweenNPCs(0, 1, EVT_VAR(11)); + InterpNpcYaw(NPC_WORLD_LAKILESTER, EVT_VAR(11), 0); } PlayerFaceNpc(1, 0); sleep 1; @@ -353,30 +353,30 @@ EvtSource N(80244560) = SCRIPT({ }); EvtSource N(802446AC) = SCRIPT({ - SI_MAP_VAR(10) = 0; + EVT_MAP_VAR(10) = 0; loop { loop 2 { - GetNpcPos(NPC_LAKILULU1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetNpcPos(NPC_LAKILULU1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetNpcPos(NPC_LAKILULU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetNpcPos(NPC_LAKILULU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_LAKILULU1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetNpcPos(NPC_LAKILULU1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_LAKILULU0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetNpcPos(NPC_LAKILULU0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 2; } sleep 1; loop 2 { - GetNpcPos(NPC_LAKILULU1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += -1; - SetNpcPos(NPC_LAKILULU1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetNpcPos(NPC_LAKILULU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += -1; - SetNpcPos(NPC_LAKILULU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_LAKILULU1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += -1; + SetNpcPos(NPC_LAKILULU1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + GetNpcPos(NPC_LAKILULU0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += -1; + SetNpcPos(NPC_LAKILULU0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 2; } sleep 1; - if (SI_MAP_VAR(10) == 1) { - SI_MAP_VAR(10) = 2; + if (EVT_MAP_VAR(10) == 1) { + EVT_MAP_VAR(10) = 2; break loop; } } @@ -385,12 +385,12 @@ EvtSource N(802446AC) = 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)); - SI_VAR(1) += -5; - SI_VAR(2) += 30; - SI_VAR(3) += 2; + GetNpcPos(NPC_LAKILULU0, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + EVT_VAR(1) += -5; + EVT_VAR(2) += 30; + EVT_VAR(3) += 2; SetNpcYaw(NPC_LAKILULU1, 270); - SetNpcPos(NPC_LAKILULU1, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKILULU1, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); spawn { sleep 5; SetPlayerAnimation(ANIM_1002B); @@ -400,24 +400,24 @@ EvtSource N(80244888) = SCRIPT({ sleep 15; EndSpeech(1, -1, -1, 512); } - SI_MAP_VAR(10) = 1; + EVT_MAP_VAR(10) = 1; loop { sleep 1; - if (SI_MAP_VAR(10) == 2) { + if (EVT_MAP_VAR(10) == 2) { break loop; } } SetNpcAnimation(NPC_LAKILULU0, NPC_ANIM_lakilulu_Palette_00_Anim_D); - GetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - SI_VAR(1) += 5; - SI_VAR(2) += 20; + GetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + EVT_VAR(1) += 5; + EVT_VAR(2) += 20; SetNpcJumpscale(NPC_LAKILULU1, 0.0); - NpcJump0(NPC_LAKILULU1, SI_VAR(1), SI_VAR(2), SI_VAR(3), 7); - SI_VAR(1) += -100; - SI_VAR(2) += 10; + NpcJump0(NPC_LAKILULU1, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3), 7); + EVT_VAR(1) += -100; + EVT_VAR(2) += 10; spawn { SetNpcJumpscale(NPC_LAKILULU1, 1.5); - NpcJump0(NPC_LAKILULU1, SI_VAR(1), SI_VAR(2), SI_VAR(3), 15); + NpcJump0(NPC_LAKILULU1, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3), 15); SetNpcPos(NPC_LAKILULU1, 0, -1000, 0); } spawn { @@ -425,13 +425,13 @@ EvtSource N(80244888) = SCRIPT({ } PlaySoundAtPlayer(225, 0); SetPlayerAnimation(ANIM_FALL_BACK); - SI_VAR(0) = 90; + EVT_VAR(0) = 90; loop 20 { - SI_VAR(0) += 144; - if (SI_VAR(0) > 359) { - SI_VAR(0) -= 360; + EVT_VAR(0) += 144; + if (EVT_VAR(0) > 359) { + EVT_VAR(0) -= 360; } - InterpPlayerYaw(SI_VAR(0), 1); + InterpPlayerYaw(EVT_VAR(0), 1); sleep 1; } SetPlayerAnimation(ANIM_STAND_STILL); @@ -439,7 +439,7 @@ EvtSource N(80244888) = SCRIPT({ }); EvtSource N(idle_80244BF8) = SCRIPT({ - if (SI_STORY_PROGRESS != STORY_CH6_SPOKE_WITH_THE_SUN) { + if (EVT_STORY_PROGRESS != STORY_CH6_SPOKE_WITH_THE_SUN) { return; } AwaitPlayerApproach(200, 20, 275); @@ -460,22 +460,22 @@ EvtSource N(idle_80244BF8) = SCRIPT({ spawn { N(func_802434D4_CC6CE4)(); } - SI_VAR(9) = spawn N(8024445C); + EVT_VAR(9) = spawn N(8024445C); LoadPath(80, N(vectorList_802443A8), 5, 0); 0: GetNextPathPos(); - SetNpcPos(NPC_WORLD_LAKILESTER, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_WORLD_LAKILESTER, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { goto 0; } - kill SI_VAR(9); + kill EVT_VAR(9); SetNpcAnimation(NPC_WORLD_LAKILESTER, NPC_ANIM_world_lakilester_Palette_00_Anim_1); PlayerFaceNpc(0, 0); sleep 15; - GetNpcPos(NPC_WORLD_LAKILESTER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_WORLD_LAKILESTER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 200); SetCamPitch(0, 18.0, -8.5); SetCamSpeed(0, 90.0); @@ -501,12 +501,12 @@ EvtSource N(idle_80244BF8) = 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); + GetNpcPos(NPC_LAKILULU0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + AwaitPlayerLeave(EVT_VAR(0), EVT_VAR(2), 120); DisablePlayerInput(TRUE); - GetNpcPos(NPC_LAKILULU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), 0, SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_LAKILULU0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), 0, EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 250); SetCamPitch(0, 5.5, -7.5); SetCamSpeed(0, 90.0); @@ -527,25 +527,25 @@ EvtSource N(80245014) = SCRIPT({ N(func_802433C0_CC6BD0)(55); } SetNpcFlagBits(NPC_LAKILULU0, ((NPC_FLAG_100)), TRUE); - SI_VAR(9) = spawn N(80244560); + EVT_VAR(9) = spawn N(80244560); LoadPath(55, N(vectorList_80244420), 5, 0); 20: GetNextPathPos(); - SetNpcPos(NPC_LAKILULU0, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKILULU0, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { goto 20; } - kill SI_VAR(9); - GetCurrentPartnerID(SI_VAR(0)); + kill EVT_VAR(9); + GetCurrentPartnerID(EVT_VAR(0)); BringPartnerOut(8); - if (SI_VAR(0) != 8) { + if (EVT_VAR(0) != 8) { SetNpcJumpscale(NPC_PARTNER, 0.0); - GetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - SI_VAR(1) += 20; - SI_VAR(2) += 20; - SI_VAR(3) += 20; - NpcJump0(NPC_PARTNER, SI_VAR(1), SI_VAR(2), SI_VAR(3), 30); + GetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + EVT_VAR(1) += 20; + EVT_VAR(2) += 20; + EVT_VAR(3) += 20; + NpcJump0(NPC_PARTNER, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3), 30); } DisablePartnerAI(0); InterpNpcYaw(NPC_PARTNER, 270, 0); @@ -591,40 +591,40 @@ EvtSource N(80245444) = SCRIPT({ spawn { N(func_802433C0_CC6BD0)(80); } - SI_VAR(9) = spawn N(80244560); + EVT_VAR(9) = spawn N(80244560); LoadPath(80, N(vectorList_802443E4), 5, 0); 0: GetNextPathPos(); - SetNpcPos(NPC_LAKILULU0, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKILULU0, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { goto 0; } - kill SI_VAR(9); + kill EVT_VAR(9); SetNpcAnimation(NPC_LAKILULU0, NPC_ANIM_lakilulu_Palette_00_Anim_9); SetPlayerAnimation(ANIM_STAND_STILL); sleep 20; - GetNpcPos(NPC_LAKILULU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 20; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_LAKILULU0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 20; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 250); SetCamPitch(0, 5.5, -7.5); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); SpeakToPlayer(NPC_WORLD_LAKILESTER, NPC_ANIM_world_lakilester_Palette_00_Anim_9, NPC_ANIM_world_lakilester_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x00A4)); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 40; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 40; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 300); SetCamSpeed(0, 4.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); SpeakToPlayer(NPC_LAKILULU0, NPC_ANIM_lakilulu_Palette_00_Anim_8, NPC_ANIM_lakilulu_Palette_00_Anim_8, 0, MESSAGE_ID(0x11, 0x00A5)); - GetNpcPos(NPC_LAKILULU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 20; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_LAKILULU0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 20; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 250); SetCamSpeed(0, 4.0); PanToTarget(0, 0, 1); @@ -632,9 +632,9 @@ EvtSource N(80245444) = SCRIPT({ SpeakToPlayer(NPC_WORLD_LAKILESTER, NPC_ANIM_world_lakilester_Palette_00_Anim_B, NPC_ANIM_world_lakilester_Palette_00_Anim_3, 0, MESSAGE_ID(0x11, 0x00A6)); SetNpcAnimation(NPC_WORLD_LAKILESTER, NPC_ANIM_world_lakilester_Palette_00_Anim_1); EndSpeech(0, NPC_ANIM_world_lakilester_Palette_00_Anim_9, NPC_ANIM_world_lakilester_Palette_00_Anim_1, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 40; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 40; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 350); SetCamSpeed(0, 10.0); PanToTarget(0, 0, 1); @@ -642,7 +642,7 @@ EvtSource N(80245444) = SCRIPT({ 10: SpeakToPlayer(NPC_LAKILULU0, NPC_ANIM_lakilulu_Palette_00_Anim_A, NPC_ANIM_lakilulu_Palette_00_Anim_9, 0, MESSAGE_ID(0x11, 0x00A7)); ShowChoice(MESSAGE_ID(0x1E, 0x0020)); - if (SI_VAR(0) != 0) { + if (EVT_VAR(0) != 0) { await N(80244888); sleep 10; goto 10; @@ -654,9 +654,9 @@ EvtSource N(80245444) = SCRIPT({ sleep 10; SetPlayerAnimation(ANIM_STAND_STILL); sleep 20; - GetNpcPos(NPC_LAKILULU0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 20; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_LAKILULU0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 20; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 250); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); @@ -664,9 +664,9 @@ EvtSource N(80245444) = SCRIPT({ SpeakToPlayer(NPC_WORLD_LAKILESTER, NPC_ANIM_world_lakilester_Palette_00_Anim_B, NPC_ANIM_world_lakilester_Palette_00_Anim_3, 0, MESSAGE_ID(0x11, 0x00AA)); SetNpcAnimation(NPC_WORLD_LAKILESTER, NPC_ANIM_world_lakilester_Palette_00_Anim_1); EndSpeech(0, NPC_ANIM_world_lakilester_Palette_00_Anim_9, NPC_ANIM_world_lakilester_Palette_00_Anim_1, 0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 40; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 40; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 350); SetCamSpeed(0, 5.0); PanToTarget(0, 0, 1); @@ -675,7 +675,7 @@ EvtSource N(80245444) = SCRIPT({ SpeakToPlayer(NPC_WORLD_LAKILESTER, NPC_ANIM_world_lakilester_Palette_00_Anim_B, NPC_ANIM_world_lakilester_Palette_00_Anim_3, 0, MESSAGE_ID(0x11, 0x00AB)); sleep 10; ShowChoice(MESSAGE_ID(0x1E, 0x0021)); - match SI_VAR(0) { + match EVT_VAR(0) { == -1 {} == 0 { ContinueSpeech(0, NPC_ANIM_world_lakilester_Palette_00_Anim_9, NPC_ANIM_world_lakilester_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x00AC)); @@ -702,10 +702,10 @@ EvtSource N(80245444) = SCRIPT({ spawn { ResetCam(0, 90.0); } - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 30; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 30; SetNpcSpeed(NPC_WORLD_LAKILESTER, 3.5); - NpcMoveTo(NPC_WORLD_LAKILESTER, SI_VAR(0), 60, 0); + NpcMoveTo(NPC_WORLD_LAKILESTER, EVT_VAR(0), 60, 0); N(UnkFunc41)(0, 8); N(LoadPartyImage)(); spawn N(802438CC); @@ -714,24 +714,24 @@ EvtSource N(80245444) = SCRIPT({ spawn N(802438F8); sleep 10; PanToTarget(0, 0, 0); - SI_STORY_PROGRESS = STORY_CH6_LAKILESTER_JOINED_PARTY; + EVT_STORY_PROGRESS = STORY_CH6_LAKILESTER_JOINED_PARTY; EnablePartnerAI(); DisablePlayerInput(FALSE); await N(80245014); }); EvtSource N(defeat_80246038) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { SetNpcAnimation(NPC_SELF, NPC_ANIM_world_lakilester_Palette_00_Anim_4); SetCamType(0, 6, 1); - GetNpcPos(NPC_SELF, SI_VAR(3), SI_VAR(1), SI_VAR(2)); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += SI_VAR(3); - SI_VAR(0) /= 2; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(1), EVT_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += EVT_VAR(3); + EVT_VAR(0) /= 2; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 300); SetCamPitch(0, 17.0, -7.5); SetCamSpeed(0, 90.0); @@ -746,12 +746,12 @@ EvtSource N(defeat_80246038) = SCRIPT({ }); EvtSource N(interact_802461C0) = SCRIPT({ - if (SI_STORY_PROGRESS <= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_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)); } else { - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 8) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 8) { SpeakToPlayer(NPC_LAKILULU0, NPC_ANIM_lakilulu_Palette_00_Anim_4, NPC_ANIM_lakilulu_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x0034)); } else { @@ -762,17 +762,17 @@ EvtSource N(interact_802461C0) = SCRIPT({ }); EvtSource N(init_80246280) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_LAKILESTER_JOINED_PARTY) { + if (EVT_STORY_PROGRESS < STORY_CH6_LAKILESTER_JOINED_PARTY) { BindNpcIdle(NPC_SELF, N(idle_80244BF8)); BindNpcDefeat(NPC_SELF, N(defeat_80246038)); } }); EvtSource N(init_802462D0) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_BEGAN_PEACH_MISSION) { + if (EVT_STORY_PROGRESS < STORY_CH6_BEGAN_PEACH_MISSION) { BindNpcInteract(NPC_SELF, N(interact_802461C0)); SetNpcCollisionSize(-1, 36, 28); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SetNpcPos(NPC_SELF, -50, 180, -50); } } else { @@ -786,13 +786,13 @@ EvtSource N(init_80246370) = SCRIPT({ }); EvtSource N(init_802463B0) = SCRIPT({ - if (SI_STORY_PROGRESS == STORY_CH6_SPOKE_WITH_THE_SUN) { + if (EVT_STORY_PROGRESS == STORY_CH6_SPOKE_WITH_THE_SUN) { RemoveNpc(NPC_SELF); } }); EvtSource N(init_802463E8) = SCRIPT({ - if (SI_STORY_PROGRESS == STORY_CH6_SPOKE_WITH_THE_SUN) { + if (EVT_STORY_PROGRESS == STORY_CH6_SPOKE_WITH_THE_SUN) { RemoveNpc(NPC_SELF); } SetSelfVar(13, 1); diff --git a/src/world/area_flo/flo_14/CCB310.c b/src/world/area_flo/flo_14/CCB310.c index 84d0e983b1..2e02407193 100644 --- a/src/world/area_flo/flo_14/CCB310.c +++ b/src/world/area_flo/flo_14/CCB310.c @@ -15,7 +15,7 @@ MapConfig N(config) = { }; EvtSource N(802423F0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -26,10 +26,10 @@ EvtSource N(802423F0) = SCRIPT({ EvtSource N(updateTexturePan_80242460) = SCRIPT({ group 0; - if (SI_VAR(5) == 1) { - if (SI_VAR(6) == 1) { - if (SI_VAR(7) == 1) { - if (SI_VAR(8) == 1) { + if (EVT_VAR(5) == 1) { + if (EVT_VAR(6) == 1) { + if (EVT_VAR(7) == 1) { + if (EVT_VAR(8) == 1) { N(UnkTexturePanFunc)(); return; } @@ -58,7 +58,7 @@ s32 N(lavaResetList_802425FC)[] = { }; EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -95,45 +95,45 @@ EvtSource N(main) = SCRIPT({ EnableTexPanning(52, 1); EnableTexPanning(54, 1); spawn { - SI_VAR(0) = 1; - SI_VAR(1) = 140; - SI_VAR(2) = 0; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 1; - SI_VAR(6) = 0; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 1; + EVT_VAR(1) = 140; + EVT_VAR(2) = 0; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 1; + EVT_VAR(6) = 0; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_80242460); } spawn { - SI_VAR(0) = 2; - SI_VAR(1) = -200; - SI_VAR(2) = 0; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 1; - SI_VAR(6) = 0; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 2; + EVT_VAR(1) = -200; + EVT_VAR(2) = 0; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 1; + EVT_VAR(6) = 0; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_80242460); } spawn N(80243E78); spawn N(80245224); ModifyColliderFlags(0, 1, 0x7FFFFE00); ModifyColliderFlags(0, 5, 0x7FFFFE00); - SI_VAR(0) = N(802425B4); + EVT_VAR(0) = N(802425B4); spawn EnterWalk; await N(802423F0); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_8024030C_CCB61C)(); } }); @@ -144,91 +144,91 @@ static s32 N(pad_2BF4)[] = { EvtSource N(80242C00) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); EvtSource N(80242EAC) = SCRIPT({ - SI_VAR(9) = SI_VAR(6); - SI_VAR(8) = SI_VAR(5); - SI_VAR(7) = SI_VAR(4); - SI_VAR(6) = SI_VAR(3); - SI_VAR(5) = SI_VAR(2); - SI_VAR(4) = SI_VAR(1); - SI_VAR(3) = SI_VAR(0); - EnableModel(SI_VAR(6), 0); + EVT_VAR(9) = EVT_VAR(6); + EVT_VAR(8) = EVT_VAR(5); + EVT_VAR(7) = EVT_VAR(4); + EVT_VAR(6) = EVT_VAR(3); + EVT_VAR(5) = EVT_VAR(2); + EVT_VAR(4) = EVT_VAR(1); + EVT_VAR(3) = EVT_VAR(0); + EnableModel(EVT_VAR(6), 0); 0: - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); N(UnkFunc43)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { sleep 1; goto 0; } spawn { sleep 5; - EnableModel(SI_VAR(6), 1); + EnableModel(EVT_VAR(6), 1); } - if (SI_VAR(10) != 0) { + if (EVT_VAR(10) != 0) { spawn { sleep 5; - SI_VAR(0) = SI_VAR(3); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - SI_VAR(1) += 10; - SI_VAR(2) += 8; - PlayEffect(0x11, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 15, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(0) = EVT_VAR(3); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + EVT_VAR(1) += 10; + EVT_VAR(2) += 8; + PlayEffect(0x11, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 15, 0, 0, 0, 0, 0, 0, 0, 0); sleep 15; - SI_VAR(1) -= 10; - MakeItemEntity(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 14, 0); + EVT_VAR(1) -= 10; + MakeItemEntity(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 14, 0); } } spawn { sleep 10; - PlaySoundAt(0xF8, 0, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + PlaySoundAt(0xF8, 0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); } MakeLerp(0, 180, 20, 2); 1: UpdateLerp(); - RotateModel(SI_VAR(8), SI_VAR(0), 1, 0, 0); - RotateModel(SI_VAR(9), SI_VAR(0), 1, 0, 0); - if (SI_VAR(1) == 1) { + RotateModel(EVT_VAR(8), EVT_VAR(0), 1, 0, 0); + RotateModel(EVT_VAR(9), EVT_VAR(0), 1, 0, 0); + if (EVT_VAR(1) == 1) { sleep 1; goto 1; } - EnableModel(SI_VAR(7), 0); + EnableModel(EVT_VAR(7), 0); }); s32 N(D_802431CC_CCE4DC) = { @@ -236,20 +236,20 @@ s32 N(D_802431CC_CCE4DC) = { }; EvtSource N(802431D0) = SCRIPT({ - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - MakeLerp(SI_VAR(1), 48, 15, 0); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + MakeLerp(EVT_VAR(1), 48, 15, 0); loop { UpdateLerp(); - GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4)); - SetCamTarget(0, SI_VAR(2), SI_VAR(0), SI_VAR(4)); + GetPlayerPos(EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + SetCamTarget(0, EVT_VAR(2), EVT_VAR(0), EVT_VAR(4)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } loop { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetCamTarget(0, SI_VAR(0), 48, SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetCamTarget(0, EVT_VAR(0), 48, EVT_VAR(2)); sleep 1; } }); @@ -257,10 +257,10 @@ EvtSource N(802431D0) = SCRIPT({ EvtSource N(802432E8) = SCRIPT({ SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_GRAVITY)), FALSE); loop { - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; - SI_VAR(2) += -5; - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + EVT_VAR(2) += -5; + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; } }); @@ -281,26 +281,26 @@ EvtSource N(80243420) = SCRIPT({ LoadPath(165, N(vectorList_80243384), 13, 10); 0: GetNextPathPos(); - TranslateModel(123, SI_VAR(1), SI_VAR(2), SI_VAR(3)); - SI_VAR(2) += -27; - SI_VAR(3) += -10; - SetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - N(func_8024046C_CCB77C)(SI_VAR(1), SI_VAR(2), SI_VAR(3)); + TranslateModel(123, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + EVT_VAR(2) += -27; + EVT_VAR(3) += -10; + SetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + N(func_8024046C_CCB77C)(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { goto 0; } StopSound(0x80000023); }); EvtSource N(8024352C) = SCRIPT({ - IsPlayerWithin(531, 81, 30, SI_VAR(0)); - if (SI_VAR(0) == 0) { + IsPlayerWithin(531, 81, 30, EVT_VAR(0)); + if (EVT_VAR(0) == 0) { return; } DisablePlayerInput(TRUE); - GetCurrentPartner(SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetCurrentPartner(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { func_802D2B6C(); sleep 20; } @@ -310,35 +310,35 @@ EvtSource N(8024352C) = SCRIPT({ SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_100)), TRUE); GetModelCenter(123); spawn { - SI_VAR(2) += -10; + EVT_VAR(2) += -10; SetPlayerJumpscale(0.2001953125); - PlayerJump(531, 48, SI_VAR(2), 10); + PlayerJump(531, 48, EVT_VAR(2), 10); SetPlayerActionState(10); } spawn { sleep 5; - SI_VAR(2) += -15; + EVT_VAR(2) += -15; SetNpcJumpscale(NPC_PARTNER, 0.2001953125); - NpcJump0(NPC_PARTNER, 531, 68, SI_VAR(2), 10); + NpcJump0(NPC_PARTNER, 531, 68, EVT_VAR(2), 10); } - SI_MAP_VAR(9) = spawn N(802431D0); + EVT_MAP_VAR(9) = spawn N(802431D0); sleep 15; N(func_802403D4_CCB6E4)(); - if (SI_VAR(14) != 0) { - SI_VAR(14) = spawn N(802432E8); + if (EVT_VAR(14) != 0) { + EVT_VAR(14) = spawn N(802432E8); } await N(80243420); - if (SI_VAR(14) != 0) { - kill SI_VAR(14); + if (EVT_VAR(14) != 0) { + kill EVT_VAR(14); N(func_8024042C_CCB73C)(); } GetModelCenter(123); - PlayEffect(0x43, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 2, 0, 0, 0, 0, 0, 0, 0, 0); - PlaySoundAt(0x2F3, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + PlayEffect(0x43, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 2, 0, 0, 0, 0, 0, 0, 0, 0); + PlaySoundAt(0x2F3, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); ClearPartnerMoveHistory(-4); EnableModel(123, 0); - SI_AREA_FLAG(37) = 0; - kill SI_MAP_VAR(9); + EVT_AREA_FLAG(37) = 0; + kill EVT_MAP_VAR(9); SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_GRAVITY)), TRUE); EnablePartnerAI(); DisablePlayerPhysics(FALSE); @@ -349,42 +349,42 @@ EvtSource N(8024352C) = SCRIPT({ EvtSource N(80243870) = SCRIPT({ PlaySoundAt(0x193, 0, 591, 55, 121); EnableModel(123, 1); - SI_VAR(2) = 1.0; - SI_VAR(4) = 0.0; - SI_VAR(5) = 0.0; - SI_VAR(6) = 0.0; - SI_VAR(7) = -30; - SI_VAR(8) = 20; - SI_VAR(7) /= 90.0; - SI_VAR(8) /= 90.0; - SI_VAR(9) = 180; - loop SI_VAR(9) { + EVT_VAR(2) = 1.0; + EVT_VAR(4) = 0.0; + EVT_VAR(5) = 0.0; + EVT_VAR(6) = 0.0; + EVT_VAR(7) = -30; + EVT_VAR(8) = 20; + EVT_VAR(7) /= 90.0; + EVT_VAR(8) /= 90.0; + EVT_VAR(9) = 180; + loop EVT_VAR(9) { TranslateModel(123, 591, 55, 121); - SI_VAR(3) = (float) SI_VAR(2); - SI_VAR(3) /= (float) 10; - ScaleModel(123, SI_VAR(3), SI_VAR(3), SI_VAR(3)); - TranslateModel(123, SI_VAR(4), SI_VAR(5), SI_VAR(6)); - SI_VAR(2) += 0.05078125; - if (SI_VAR(9) > 90) { - SI_VAR(4) += (float) SI_VAR(7); - SI_VAR(5) += (float) SI_VAR(8); + EVT_VAR(3) = (float) EVT_VAR(2); + EVT_VAR(3) /= (float) 10; + ScaleModel(123, EVT_VAR(3), EVT_VAR(3), EVT_VAR(3)); + TranslateModel(123, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6)); + EVT_VAR(2) += 0.05078125; + if (EVT_VAR(9) > 90) { + EVT_VAR(4) += (float) EVT_VAR(7); + EVT_VAR(5) += (float) EVT_VAR(8); } sleep 1; } - SI_VAR(7) = -30; - SI_VAR(8) = -40; - SI_VAR(7) /= 60.0; - SI_VAR(8) /= 60.0; + EVT_VAR(7) = -30; + EVT_VAR(8) = -40; + EVT_VAR(7) /= 60.0; + EVT_VAR(8) /= 60.0; loop 60 { TranslateModel(123, 591, 55, 121); - ScaleModel(123, SI_VAR(3), SI_VAR(3), SI_VAR(3)); - TranslateModel(123, SI_VAR(4), SI_VAR(5), SI_VAR(6)); - SI_VAR(4) += (float) SI_VAR(7); - SI_VAR(6) += (float) SI_VAR(8); + ScaleModel(123, EVT_VAR(3), EVT_VAR(3), EVT_VAR(3)); + TranslateModel(123, EVT_VAR(4), EVT_VAR(5), EVT_VAR(6)); + EVT_VAR(4) += (float) EVT_VAR(7); + EVT_VAR(6) += (float) EVT_VAR(8); sleep 1; } - SI_AREA_FLAG(36) = 0; - SI_AREA_FLAG(37) = 1; + EVT_AREA_FLAG(36) = 0; + EVT_AREA_FLAG(37) = 1; }); s32 N(D_80243B14_CCEE24) = { @@ -397,58 +397,58 @@ s32 N(D_80243B18_CCEE28) = { EvtSource N(80243B1C) = SCRIPT({ group 0; - SI_VAR(15) = SI_VAR(0); + EVT_VAR(15) = EVT_VAR(0); 0: - if (SI_AREA_FLAG(35) == 1) { + if (EVT_AREA_FLAG(35) == 1) { sleep 10; goto 0; } buf_use N(D_802431CC_CCE4DC); - buf_read SI_VAR(0); - if (SI_VAR(0) == 0) { - RandInt(10, SI_VAR(0)); - SI_VAR(0) += 1; - sleep SI_VAR(0); + buf_read EVT_VAR(0); + if (EVT_VAR(0) == 0) { + RandInt(10, EVT_VAR(0)); + EVT_VAR(0) += 1; + sleep EVT_VAR(0); goto 0; } - EnableModel(SI_VAR(15), 1); - RandInt(4, SI_VAR(0)); - SI_VAR(0) += 4.0; - SI_VAR(0) *= -1.0; - SI_VAR(1) = 2.0; - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(2) /= 10.0; - SI_VAR(3) = 0.4; - SI_VAR(4) = 591.0; - SI_VAR(5) = 60.0; - SI_VAR(6) = 121.0; - RandInt(3, SI_VAR(7)); - SI_VAR(7) += 3.0; - SI_VAR(7) *= 0.04; - SI_VAR(9) = (float) SI_VAR(7); - SI_VAR(9) /= 5.0; - RandInt(50, SI_VAR(8)); - SI_VAR(8) += 50; - loop SI_VAR(8) { - SI_VAR(14) = (float) SI_VAR(2); - SI_VAR(14) -= (float) SI_VAR(0); - SI_VAR(14) *= 0.046875; - SI_VAR(0) += (float) SI_VAR(14); - SI_VAR(14) = (float) SI_VAR(3); - SI_VAR(14) -= (float) SI_VAR(1); - SI_VAR(14) *= 0.046875; - SI_VAR(1) += (float) SI_VAR(14); - SI_VAR(4) += (float) SI_VAR(0); - SI_VAR(5) += (float) SI_VAR(1); - SI_VAR(14) = (float) SI_VAR(7); - SI_VAR(14) -= (float) SI_VAR(9); - SI_VAR(14) *= 0.203125; - SI_VAR(9) += (float) SI_VAR(14); - TranslateModel(SI_VAR(15), SI_VAR(4), SI_VAR(5), SI_VAR(6)); - ScaleModel(SI_VAR(15), SI_VAR(9), SI_VAR(9), SI_VAR(9)); + EnableModel(EVT_VAR(15), 1); + RandInt(4, EVT_VAR(0)); + EVT_VAR(0) += 4.0; + EVT_VAR(0) *= -1.0; + EVT_VAR(1) = 2.0; + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(2) /= 10.0; + EVT_VAR(3) = 0.4; + EVT_VAR(4) = 591.0; + EVT_VAR(5) = 60.0; + EVT_VAR(6) = 121.0; + RandInt(3, EVT_VAR(7)); + EVT_VAR(7) += 3.0; + EVT_VAR(7) *= 0.04; + EVT_VAR(9) = (float) EVT_VAR(7); + EVT_VAR(9) /= 5.0; + RandInt(50, EVT_VAR(8)); + EVT_VAR(8) += 50; + loop EVT_VAR(8) { + EVT_VAR(14) = (float) EVT_VAR(2); + EVT_VAR(14) -= (float) EVT_VAR(0); + EVT_VAR(14) *= 0.046875; + EVT_VAR(0) += (float) EVT_VAR(14); + EVT_VAR(14) = (float) EVT_VAR(3); + EVT_VAR(14) -= (float) EVT_VAR(1); + EVT_VAR(14) *= 0.046875; + EVT_VAR(1) += (float) EVT_VAR(14); + EVT_VAR(4) += (float) EVT_VAR(0); + EVT_VAR(5) += (float) EVT_VAR(1); + EVT_VAR(14) = (float) EVT_VAR(7); + EVT_VAR(14) -= (float) EVT_VAR(9); + EVT_VAR(14) *= 0.203125; + EVT_VAR(9) += (float) EVT_VAR(14); + TranslateModel(EVT_VAR(15), EVT_VAR(4), EVT_VAR(5), EVT_VAR(6)); + ScaleModel(EVT_VAR(15), EVT_VAR(9), EVT_VAR(9), EVT_VAR(9)); sleep 1; } - EnableModel(SI_VAR(15), 0); + EnableModel(EVT_VAR(15), 0); goto 0; }); @@ -459,57 +459,57 @@ EvtSource N(80243E78) = SCRIPT({ ModifyColliderFlags(3, 33, 0x00000006); ModifyColliderFlags(3, 34, 0x00000006); ModifyColliderFlags(3, 35, 0x00000006); - SI_VAR(0) = -730; - SI_VAR(1) = -130; - SI_VAR(2) = -470; - SI_VAR(3) = -70; - SI_VAR(4) = 0; + EVT_VAR(0) = -730; + EVT_VAR(1) = -130; + EVT_VAR(2) = -470; + EVT_VAR(3) = -70; + EVT_VAR(4) = 0; spawn N(80242C00); - SI_VAR(0) = -730; - SI_VAR(1) = 70; - SI_VAR(2) = -470; - SI_VAR(3) = 140; - SI_VAR(4) = 0; + EVT_VAR(0) = -730; + EVT_VAR(1) = 70; + EVT_VAR(2) = -470; + EVT_VAR(3) = 140; + EVT_VAR(4) = 0; spawn N(80242C00); - SI_VAR(0) = -280; - SI_VAR(1) = 130; - SI_VAR(2) = -110; - SI_VAR(3) = -70; - SI_VAR(4) = 0; + EVT_VAR(0) = -280; + EVT_VAR(1) = 130; + EVT_VAR(2) = -110; + EVT_VAR(3) = -70; + EVT_VAR(4) = 0; spawn N(80242C00); - SI_VAR(0) = -280; - SI_VAR(1) = 70; - SI_VAR(2) = -10; - SI_VAR(3) = 140; - SI_VAR(4) = 0; + EVT_VAR(0) = -280; + EVT_VAR(1) = 70; + EVT_VAR(2) = -10; + EVT_VAR(3) = 140; + EVT_VAR(4) = 0; spawn N(80242C00); GetModelCenter(96); - SI_VAR(3) = 96; - SI_VAR(4) = 97; - SI_VAR(5) = 98; - SI_VAR(6) = 99; - SI_VAR(10) = 174; + EVT_VAR(3) = 96; + EVT_VAR(4) = 97; + EVT_VAR(5) = 98; + EVT_VAR(6) = 99; + EVT_VAR(10) = 174; spawn N(80242EAC); GetModelCenter(82); - SI_VAR(3) = 82; - SI_VAR(4) = 83; - SI_VAR(5) = 84; - SI_VAR(6) = 85; - SI_VAR(10) = 0; + EVT_VAR(3) = 82; + EVT_VAR(4) = 83; + EVT_VAR(5) = 84; + EVT_VAR(6) = 85; + EVT_VAR(10) = 0; spawn N(80242EAC); GetModelCenter(76); - SI_VAR(3) = 76; - SI_VAR(4) = 77; - SI_VAR(5) = 78; - SI_VAR(6) = 79; - SI_VAR(10) = 0; + EVT_VAR(3) = 76; + EVT_VAR(4) = 77; + EVT_VAR(5) = 78; + EVT_VAR(6) = 79; + EVT_VAR(10) = 0; spawn N(80242EAC); GetModelCenter(90); - SI_VAR(3) = 90; - SI_VAR(4) = 91; - SI_VAR(5) = 92; - SI_VAR(6) = 93; - SI_VAR(10) = 0; + EVT_VAR(3) = 90; + EVT_VAR(4) = 91; + EVT_VAR(5) = 92; + EVT_VAR(6) = 93; + EVT_VAR(10) = 0; spawn N(80242EAC); ModifyColliderFlags(0, 15, 0x7FFFFE00); CloneModel(124, 10001); @@ -524,15 +524,15 @@ EvtSource N(80243E78) = SCRIPT({ EnableModel(10003, 0); EnableModel(10004, 0); EnableModel(10005, 0); - SI_VAR(0) = 10001; + EVT_VAR(0) = 10001; spawn N(80243B1C); - SI_VAR(0) = 10002; + EVT_VAR(0) = 10002; spawn N(80243B1C); - SI_VAR(0) = 10003; + EVT_VAR(0) = 10003; spawn N(80243B1C); - SI_VAR(0) = 10004; + EVT_VAR(0) = 10004; spawn N(80243B1C); - SI_VAR(0) = 10005; + EVT_VAR(0) = 10005; spawn N(80243B1C); MakeLocalVertexCopy(0, 123, 1); SetCustomGfxBuilders(1, N(func_80240504_CCB814), 0); @@ -567,14 +567,14 @@ ApiStatus N(func_802403D4_CCB6E4)(Evt* script, s32 isInitialCall) { } script->varTable[14] = 1; - set_variable(NULL, SI_MAP_VAR(0), get_npc_unsafe(-4)->flags); + set_variable(NULL, EVT_MAP_VAR(0), get_npc_unsafe(-4)->flags); return ApiStatus_DONE2; } ApiStatus N(func_8024042C_CCB73C)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(-4); - npc->flags = get_variable(NULL, SI_MAP_VAR(0)); + npc->flags = get_variable(NULL, EVT_MAP_VAR(0)); return ApiStatus_DONE2; } @@ -657,7 +657,7 @@ void N(func_802407D4_CCBAE4)(void) { gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1)); - if (get_variable(NULL, SI_AREA_FLAG(36)) != 0) { + if (get_variable(NULL, EVT_AREA_FLAG(36)) != 0) { if (N(D_80243B18_CCEE28) > 90) { N(D_80243B18_CCEE28) -= 360; } diff --git a/src/world/area_flo/flo_14/CCBE20.c b/src/world/area_flo/flo_14/CCBE20.c index 579a160ad3..4c9efeee97 100644 --- a/src/world/area_flo/flo_14/CCBE20.c +++ b/src/world/area_flo/flo_14/CCBE20.c @@ -67,32 +67,32 @@ s32 N(D_80244600_CCF910) = { }; EvtSource N(80244604) = SCRIPT({ - SI_VAR(9) = SI_VAR(1); + EVT_VAR(9) = EVT_VAR(1); ShowConsumableChoicePopup(); - SI_VAR(10) = SI_VAR(0); - match SI_VAR(0) { + EVT_VAR(10) = EVT_VAR(0); + match EVT_VAR(0) { == 0 {} == -1 {} else { - RemoveItemAt(SI_VAR(1)); - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - N(AddPlayerHandsOffset)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - MakeItemEntity(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5), 1, 0); + RemoveItemAt(EVT_VAR(1)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(AddPlayerHandsOffset)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + MakeItemEntity(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1, 0); SetPlayerAnimation(0x60005); sleep 30; SetPlayerAnimation(ANIM_10002); - RemoveItemEntity(SI_VAR(0)); + RemoveItemEntity(EVT_VAR(0)); } } - N(func_80242288_CCD598)(SI_VAR(10)); + N(func_80242288_CCD598)(EVT_VAR(10)); CloseChoicePopup(); unbind; }); EvtSource N(80244738) = SCRIPT({ - N(func_802422C0_CCD5D0)(SI_VAR(0)); + N(func_802422C0_CCD5D0)(EVT_VAR(0)); bind_padlock N(80244604) 0x10 0 N(D_802453B0_EF79C0); - N(func_80242234_CCD544)(SI_VAR(0)); + N(func_80242234_CCD544)(EVT_VAR(0)); }); @@ -101,28 +101,28 @@ s32 N(D_80244788_CCFA98)[] = { }; EvtSource N(interact_80244790) = SCRIPT({ - if (SI_AREA_FLAG(37) == 1) { - SI_AREA_FLAG(35) = 1; + if (EVT_AREA_FLAG(37) == 1) { + EVT_AREA_FLAG(35) = 1; SpeakToPlayer(NPC_SELF, -1, -1, 0, MESSAGE_ID(0x11, 0x0063)); - SI_AREA_FLAG(35) = 0; + EVT_AREA_FLAG(35) = 0; return; } - SI_AREA_FLAG(35) = 1; - if (SI_SAVE_FLAG(1412) == 0) { + EVT_AREA_FLAG(35) = 1; + if (EVT_SAVE_FLAG(1412) == 0) { SpeakToPlayer(NPC_SELF, -1, -1, 0, MESSAGE_ID(0x11, 0x005F)); } else { SpeakToPlayer(NPC_SELF, -1, -1, 0, MESSAGE_ID(0x11, 0x0060)); } - FindItem(161, SI_VAR(0)); - if (SI_VAR(0) != -1) { - SI_VAR(0) = N(D_80244788_CCFA98); - SI_VAR(1) = 0; + FindItem(161, EVT_VAR(0)); + if (EVT_VAR(0) != -1) { + EVT_VAR(0) = N(D_80244788_CCFA98); + EVT_VAR(1) = 0; await N(80244738); - if (SI_VAR(0) == -1) { + if (EVT_VAR(0) == -1) { SpeakToPlayer(NPC_SELF, -1, -1, 0, MESSAGE_ID(0x11, 0x0064)); } else { SpeakToPlayer(NPC_SELF, -1, -1, 0, MESSAGE_ID(0x11, 0x0061)); - SI_AREA_FLAG(36) = 1; + EVT_AREA_FLAG(36) = 1; SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100)), TRUE); PlayerMoveTo(555, 110, 20); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100)), FALSE); @@ -137,22 +137,22 @@ EvtSource N(interact_80244790) = SCRIPT({ InterpPlayerYaw(315, 0); } 10: - if (SI_AREA_FLAG(37) == 0) { + if (EVT_AREA_FLAG(37) == 0) { sleep 1; goto 10; } ResetCam(0, 4.0); SpeakToPlayer(NPC_SELF, -1, -1, 5, MESSAGE_ID(0x11, 0x0063)); - SI_SAVE_FLAG(1412) = 1; + EVT_SAVE_FLAG(1412) = 1; bind N(8024352C) TRIGGER_FLOOR_PRESS_A 30; } } - SI_AREA_FLAG(35) = 0; + EVT_AREA_FLAG(35) = 0; }); EvtSource N(init_80244ADC) = SCRIPT({ - SI_AREA_FLAG(36) = 0; - SI_AREA_FLAG(37) = 0; + EVT_AREA_FLAG(36) = 0; + EVT_AREA_FLAG(37) = 0; BindNpcInteract(NPC_SELF, N(interact_80244790)); }); @@ -236,7 +236,7 @@ static s32 N(pad_4F24)[] = { }; EvtSource N(80244F30) = SCRIPT({ - MakeItemEntity(ITEM_STAR_PIECE, 675, 60, -100, 17, SI_SAVE_FLAG(1387)); + MakeItemEntity(ITEM_STAR_PIECE, 675, 60, -100, 17, EVT_SAVE_FLAG(1387)); }); static s32 N(pad_4F64)[] = { @@ -245,66 +245,66 @@ static s32 N(pad_4F64)[] = { EvtSource N(80244F70) = SCRIPT({ loop { - N(func_80242360_CCD670)(SI_VAR(0)); - if (SI_VAR(0) == SI_VAR(4)) { - GetPlayerActionState(SI_VAR(0)); - if (SI_VAR(0) != 23) { - if (SI_VAR(8) == 0) { + N(func_80242360_CCD670)(EVT_VAR(0)); + if (EVT_VAR(0) == EVT_VAR(4)) { + GetPlayerActionState(EVT_VAR(0)); + if (EVT_VAR(0) != 23) { + if (EVT_VAR(8) == 0) { spawn { - GetModelCenter(SI_VAR(5)); - PlaySoundAt(0x1DB, 4194304, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetModelCenter(EVT_VAR(5)); + PlaySoundAt(0x1DB, 4194304, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } } - if (SI_VAR(7) < 90) { - if (SI_VAR(7) == 0) { + if (EVT_VAR(7) < 90) { + if (EVT_VAR(7) == 0) { sleep 5; - SI_VAR(8) = 6; - ModifyColliderFlags(0, SI_VAR(9), 0x7FFFFE00); + EVT_VAR(8) = 6; + ModifyColliderFlags(0, EVT_VAR(9), 0x7FFFFE00); } - SI_VAR(8) += 1; - SI_VAR(7) += SI_VAR(8); + EVT_VAR(8) += 1; + EVT_VAR(7) += EVT_VAR(8); } goto 50; } } - if (SI_VAR(7) != 0) { - SI_VAR(8) -= 1; - SI_VAR(7) += SI_VAR(8); - if (SI_VAR(7) <= 0) { - SI_VAR(8) = 0; - SI_VAR(7) = 0; + if (EVT_VAR(7) != 0) { + EVT_VAR(8) -= 1; + EVT_VAR(7) += EVT_VAR(8); + if (EVT_VAR(7) <= 0) { + EVT_VAR(8) = 0; + EVT_VAR(7) = 0; spawn { - GetModelCenter(SI_VAR(5)); - PlaySoundAt(0x1DC, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetModelCenter(EVT_VAR(5)); + PlaySoundAt(0x1DC, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } - ModifyColliderFlags(1, SI_VAR(9), 0x7FFFFE00); + ModifyColliderFlags(1, EVT_VAR(9), 0x7FFFFE00); } } 50: - if (SI_VAR(7) >= 90) { - SI_VAR(8) = -1; - SI_VAR(7) = 90; + if (EVT_VAR(7) >= 90) { + EVT_VAR(8) = -1; + EVT_VAR(7) = 90; } - RotateModel(SI_VAR(5), SI_VAR(7), -1, 0, 0); - RotateModel(SI_VAR(6), SI_VAR(7), -1, 0, 0); + RotateModel(EVT_VAR(5), EVT_VAR(7), -1, 0, 0); + RotateModel(EVT_VAR(6), EVT_VAR(7), -1, 0, 0); sleep 1; } }); EvtSource N(80245224) = SCRIPT({ - SI_VAR(4) = 21; - SI_VAR(5) = 21; - SI_VAR(6) = 20; - SI_VAR(7) = SI_MAP_VAR(10); - SI_VAR(8) = SI_MAP_VAR(11); - SI_VAR(9) = 22; + EVT_VAR(4) = 21; + EVT_VAR(5) = 21; + EVT_VAR(6) = 20; + EVT_VAR(7) = EVT_MAP_VAR(10); + EVT_VAR(8) = EVT_MAP_VAR(11); + EVT_VAR(9) = 22; spawn N(80244F70); - SI_VAR(4) = 17; - SI_VAR(5) = 26; - SI_VAR(6) = 25; - SI_VAR(7) = SI_MAP_VAR(12); - SI_VAR(8) = SI_MAP_VAR(13); - SI_VAR(9) = 18; + EVT_VAR(4) = 17; + EVT_VAR(5) = 26; + EVT_VAR(6) = 25; + EVT_VAR(7) = EVT_MAP_VAR(12); + EVT_VAR(8) = EVT_MAP_VAR(13); + EVT_VAR(9) = 18; spawn N(80244F70); }); diff --git a/src/world/area_flo/flo_15/CD06C0.c b/src/world/area_flo/flo_15/CD06C0.c index f01f3cc4ba..a0c8b109f2 100644 --- a/src/world/area_flo/flo_15/CD06C0.c +++ b/src/world/area_flo/flo_15/CD06C0.c @@ -21,11 +21,11 @@ MapConfig N(config) = { }; EvtSource N(80240060) = SCRIPT({ - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); } else { - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_SUN_TOWER_CLOUDY, 0, 8); } else { @@ -46,7 +46,7 @@ EvtSource N(8024017C) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -54,12 +54,12 @@ EvtSource N(main) = SCRIPT({ SetCamEnabled(0, 1); MakeNpcs(0, N(npcGroupList_802412C0)); await N(makeEntities); - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 1) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { spawn N(802404D8); } else { ModifyColliderFlags(0, 1, 0x7FFFFE00); - SI_VAR(0) = N(8024017C); + EVT_VAR(0) = N(8024017C); spawn EnterWalk; } ModifyColliderFlags(0, 14, 0x7FFFFE00); @@ -78,29 +78,29 @@ NpcSettings N(npcSettings_80240300) = { }; EvtSource N(8024032C) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { - SI_VAR(3) = 7; - SI_VAR(4) = 5; + if (EVT_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + EVT_VAR(3) = 7; + EVT_VAR(4) = 5; } else { - SI_VAR(3) = 15; - SI_VAR(4) = 1; + EVT_VAR(3) = 15; + EVT_VAR(4) = 1; } loop { - SI_VAR(5) = SI_VAR(3); - loop SI_VAR(5) { - GetNpcPos(NPC_SUN0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 1; - SetNpcPos(NPC_SUN0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetNpcPos(NPC_SUN1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - sleep SI_VAR(4); + EVT_VAR(5) = EVT_VAR(3); + loop EVT_VAR(5) { + GetNpcPos(NPC_SUN0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 1; + SetNpcPos(NPC_SUN0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetNpcPos(NPC_SUN1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + sleep EVT_VAR(4); } - SI_VAR(5) = SI_VAR(3); - loop SI_VAR(5) { - GetNpcPos(NPC_SUN0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += -1; - SetNpcPos(NPC_SUN0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetNpcPos(NPC_SUN1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - sleep SI_VAR(4); + EVT_VAR(5) = EVT_VAR(3); + loop EVT_VAR(5) { + GetNpcPos(NPC_SUN0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += -1; + SetNpcPos(NPC_SUN0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetNpcPos(NPC_SUN1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + sleep EVT_VAR(4); } } }); @@ -111,9 +111,9 @@ EvtSource N(802404D8) = SCRIPT({ SetNpcPos(NPC_SUN0, 0, 270, 0); SetNpcPos(NPC_SUN1, 0, -1000, 0); sleep 1; - GetNpcPos(NPC_SUN0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_SUN0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 1050); SetCamPitch(0, 10.0, 4.0); SetCamSpeed(0, 90.0); @@ -134,9 +134,9 @@ EvtSource N(802404D8) = SCRIPT({ } sleep 15; SetNpcJumpscale(NPC_SUN0, 0.0); - GetNpcPos(NPC_SUN0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 400; - NpcJump0(NPC_SUN0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 40); + GetNpcPos(NPC_SUN0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 400; + NpcJump0(NPC_SUN0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 40); GotoMap("flo_00", 9); sleep 70; }); @@ -147,22 +147,22 @@ EvtSource N(aux_8024079C) = SCRIPT({ MakeLerp(-30, 30, 20, 11); loop { UpdateLerp(); - SetNpcRotation(NPC_SUN1, 0, 0, SI_VAR(0)); - GetNpcPos(NPC_SUN0, SI_VAR(2), SI_VAR(3), SI_VAR(4)); - SetNpcPos(NPC_SUN1, SI_VAR(2), SI_VAR(3), SI_VAR(4)); + SetNpcRotation(NPC_SUN1, 0, 0, EVT_VAR(0)); + GetNpcPos(NPC_SUN0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + SetNpcPos(NPC_SUN1, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } MakeLerp(30, -30, 20, 11); loop { UpdateLerp(); - SetNpcRotation(NPC_SUN1, 0, 0, SI_VAR(0)); - GetNpcPos(NPC_SUN0, SI_VAR(2), SI_VAR(3), SI_VAR(4)); - SetNpcPos(NPC_SUN1, SI_VAR(2), SI_VAR(3), SI_VAR(4)); + SetNpcRotation(NPC_SUN1, 0, 0, EVT_VAR(0)); + GetNpcPos(NPC_SUN0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + SetNpcPos(NPC_SUN1, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -172,8 +172,8 @@ EvtSource N(aux_8024079C) = SCRIPT({ EvtSource N(8024094C) = SCRIPT({ loop { sleep 1; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(1) > 220) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(1) > 220) { break loop; } } @@ -182,28 +182,28 @@ EvtSource N(8024094C) = SCRIPT({ PlayerFaceNpc(10, 0); } SetNpcJumpscale(NPC_SUN0, 0.0); - GetNpcPos(NPC_SUN0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) -= 400; - NpcJump0(NPC_SUN0, SI_VAR(0), 275, SI_VAR(2), 30); - SI_VAR(9) = spawn N(8024032C); + GetNpcPos(NPC_SUN0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) -= 400; + NpcJump0(NPC_SUN0, EVT_VAR(0), 275, EVT_VAR(2), 30); + EVT_VAR(9) = spawn N(8024032C); loop { sleep 1; - if (SI_AREA_FLAG(38) == 1) { + if (EVT_AREA_FLAG(38) == 1) { break loop; } } DisablePlayerInput(TRUE); sleep 10; - kill SI_VAR(9); + kill EVT_VAR(9); SetNpcFlagBits(NPC_SUN0, ((NPC_FLAG_100)), TRUE); - GetNpcPos(NPC_SUN0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - NpcJump0(NPC_SUN0, SI_VAR(0), 450, SI_VAR(2), 30); + GetNpcPos(NPC_SUN0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + NpcJump0(NPC_SUN0, EVT_VAR(0), 450, EVT_VAR(2), 30); DisablePlayerInput(FALSE); unbind; }); EvtSource N(interact_80240B28) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_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)); SetPlayerAnimation(ANIM_THINKING); @@ -212,16 +212,16 @@ EvtSource N(interact_80240B28) = SCRIPT({ sleep 20; SetPlayerAnimation(ANIM_10002); SpeakToPlayer(NPC_SUN0, NPC_ANIM_sun_Palette_00_Anim_7, NPC_ANIM_sun_Palette_00_Anim_1, 517, MESSAGE_ID(0x11, 0x009B)); - SI_STORY_PROGRESS = STORY_CH6_SPOKE_WITH_THE_SUN; + EVT_STORY_PROGRESS = STORY_CH6_SPOKE_WITH_THE_SUN; } < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SpeakToPlayer(NPC_SUN0, NPC_ANIM_sun_Palette_00_Anim_7, NPC_ANIM_sun_Palette_00_Anim_1, 517, MESSAGE_ID(0x11, 0x009C)); } < STORY_CH6_STAR_SPIRIT_RESCUED { - if (SI_SAVE_FLAG(1410) == 0) { + if (EVT_SAVE_FLAG(1410) == 0) { SpeakToPlayer(NPC_SUN0, NPC_ANIM_sun_Palette_00_Anim_7, NPC_ANIM_sun_Palette_00_Anim_1, 517, MESSAGE_ID(0x11, 0x009D)); - SI_SAVE_FLAG(1410) = 1; + EVT_SAVE_FLAG(1410) = 1; } else { SpeakToPlayer(NPC_SUN0, NPC_ANIM_sun_Palette_00_Anim_7, NPC_ANIM_sun_Palette_00_Anim_1, 517, MESSAGE_ID(0x11, 0x009E)); @@ -231,20 +231,20 @@ EvtSource N(interact_80240B28) = SCRIPT({ 0x009F)); } } - SI_AREA_FLAG(38) = 1; + EVT_AREA_FLAG(38) = 1; }); EvtSource N(init_80240CD0) = SCRIPT({ SetNpcCollisionSize(10, 64, 40); EnableNpcShadow(NPC_SUN0, FALSE); - if (SI_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SetNpcPos(NPC_SUN0, 0, 270, 0); BindNpcInteract(NPC_SELF, N(interact_80240B28)); spawn N(8024032C); } else { SetNpcPos(NPC_SUN0, 0, 450, 0); BindNpcInteract(NPC_SELF, N(interact_80240B28)); - SI_AREA_FLAG(38) = 0; + EVT_AREA_FLAG(38) = 0; spawn N(8024094C); } }); @@ -256,7 +256,7 @@ EvtSource N(init_80240DB4) = SCRIPT({ SetNpcPaletteSwapMode(11, 3); SetNpcPaletteSwapping(10, 0, 1, 5, 5, 13, 5, 0, 0); SetNpcPaletteSwapping(11, 0, 1, 5, 5, 13, 5, 0, 0); - if (SI_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SetNpcPos(NPC_SUN1, 0, 270, -5); } else { SetNpcPos(NPC_SUN1, 0, 450, -5); @@ -337,11 +337,11 @@ static s32 N(pad_12D8)[] = { }; EvtSource N(802412E0) = SCRIPT({ - SI_SAVE_FLAG(1401) = 1; + EVT_SAVE_FLAG(1401) = 1; }); EvtSource N(makeEntities) = SCRIPT({ - if (SI_SAVE_FLAG(1401) == 0) { + if (EVT_SAVE_FLAG(1401) == 0) { MakeEntity(0x802BCF00, -180, 0, -18, 0, MAKE_ENTITY_END); AssignScript(N(802412E0)); } @@ -358,9 +358,9 @@ s32 N(intTable_80241360)[] = { }; EvtSource N(802413B0) = SCRIPT({ - if (SI_SAVE_FLAG(1401) == 0) { + if (EVT_SAVE_FLAG(1401) == 0) { 0: - if (SI_SAVE_FLAG(1401) == 0) { + if (EVT_SAVE_FLAG(1401) == 0) { sleep 1; goto 0; } @@ -368,8 +368,8 @@ EvtSource N(802413B0) = SCRIPT({ spawn { buf_use N(intTable_80241360); loop 10 { - buf_read SI_VAR(1) SI_VAR(2); - ShakeCam(0, 0, SI_VAR(1), SI_VAR(2)); + buf_read EVT_VAR(1) EVT_VAR(2); + ShakeCam(0, 0, EVT_VAR(1), EVT_VAR(2)); } } UseSettingsFrom(0, -170, 0, 35); @@ -394,9 +394,9 @@ EvtSource N(802413B0) = SCRIPT({ MakeLerp(0, -50, 120, 2); loop { UpdateLerp(); - TranslateGroup(16, 0, SI_VAR(0), 0); + TranslateGroup(16, 0, EVT_VAR(0), 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } diff --git a/src/world/area_flo/flo_16/CD1F10.c b/src/world/area_flo/flo_16/CD1F10.c index 199a48a8f1..ad840931d7 100644 --- a/src/world/area_flo/flo_16/CD1F10.c +++ b/src/world/area_flo/flo_16/CD1F10.c @@ -19,7 +19,7 @@ MapConfig N(config) = { }; EvtSource N(802429D0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -43,7 +43,7 @@ s32 N(lavaResetList_80242B40)[] = { }; EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -66,163 +66,163 @@ EvtSource N(main) = SCRIPT({ EnableTexPanning(23, 1); EnableTexPanning(25, 1); spawn { - SI_VAR(0) = 0; - SI_VAR(1) = 0; + EVT_VAR(0) = 0; + EVT_VAR(1) = 0; 0: - SI_VAR(0) += 140; - if (SI_VAR(0) > 65536) { - SI_VAR(0) += -65536; + EVT_VAR(0) += 140; + if (EVT_VAR(0) > 65536) { + EVT_VAR(0) += -65536; } - SetTexPanOffset(1, 0, SI_VAR(0), 0); - SI_VAR(1) += -200; - if (SI_VAR(1) < 0) { - SI_VAR(1) += 65536; + SetTexPanOffset(1, 0, EVT_VAR(0), 0); + EVT_VAR(1) += -200; + if (EVT_VAR(1) < 0) { + EVT_VAR(1) += 65536; } - SetTexPanOffset(2, 0, SI_VAR(1), 0); + SetTexPanOffset(2, 0, EVT_VAR(1), 0); sleep 1; goto 0; } spawn N(802451C4); ModifyColliderFlags(0, 1, 0x7FFFFE00); ModifyColliderFlags(0, 5, 0x7FFFFE00); - SI_VAR(0) = N(80242AF8); + EVT_VAR(0) = N(80242AF8); spawn EnterWalk; await N(802429D0); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CD1E30)(); } }); EvtSource N(80242EA0) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); EvtSource N(8024314C) = SCRIPT({ - SI_VAR(9) = SI_VAR(6); - SI_VAR(8) = SI_VAR(5); - SI_VAR(7) = SI_VAR(4); - SI_VAR(6) = SI_VAR(3); - SI_VAR(5) = SI_VAR(2); - SI_VAR(4) = SI_VAR(1); - SI_VAR(3) = SI_VAR(0); - EnableModel(SI_VAR(6), 0); + EVT_VAR(9) = EVT_VAR(6); + EVT_VAR(8) = EVT_VAR(5); + EVT_VAR(7) = EVT_VAR(4); + EVT_VAR(6) = EVT_VAR(3); + EVT_VAR(5) = EVT_VAR(2); + EVT_VAR(4) = EVT_VAR(1); + EVT_VAR(3) = EVT_VAR(0); + EnableModel(EVT_VAR(6), 0); 0: - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); N(UnkFunc43)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { sleep 1; goto 0; } spawn { sleep 5; - EnableModel(SI_VAR(6), 1); + EnableModel(EVT_VAR(6), 1); } - if (SI_VAR(10) != 0) { + if (EVT_VAR(10) != 0) { spawn { sleep 5; - SI_VAR(0) = SI_VAR(3); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - SI_VAR(1) += 10; - SI_VAR(2) += 8; - PlayEffect(0x11, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 15, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(0) = EVT_VAR(3); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + EVT_VAR(1) += 10; + EVT_VAR(2) += 8; + PlayEffect(0x11, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 15, 0, 0, 0, 0, 0, 0, 0, 0); sleep 15; - SI_VAR(1) -= 10; - MakeItemEntity(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 14, 0); + EVT_VAR(1) -= 10; + MakeItemEntity(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 14, 0); } } spawn { sleep 10; - PlaySoundAt(0xF8, 0, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + PlaySoundAt(0xF8, 0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); } MakeLerp(0, 180, 20, 2); 1: UpdateLerp(); - RotateModel(SI_VAR(8), SI_VAR(0), 1, 0, 0); - RotateModel(SI_VAR(9), SI_VAR(0), 1, 0, 0); - if (SI_VAR(1) == 1) { + RotateModel(EVT_VAR(8), EVT_VAR(0), 1, 0, 0); + RotateModel(EVT_VAR(9), EVT_VAR(0), 1, 0, 0); + if (EVT_VAR(1) == 1) { sleep 1; goto 1; } - EnableModel(SI_VAR(7), 0); + EnableModel(EVT_VAR(7), 0); }); EvtSource N(8024346C) = SCRIPT({ ModifyColliderFlags(3, 20, 0x00000006); - SI_VAR(0) = -740; - SI_VAR(1) = -140; - SI_VAR(2) = -260; - SI_VAR(3) = -55; - SI_VAR(4) = 100; + EVT_VAR(0) = -740; + EVT_VAR(1) = -140; + EVT_VAR(2) = -260; + EVT_VAR(3) = -55; + EVT_VAR(4) = 100; spawn N(80242EA0); - SI_VAR(0) = 250; - SI_VAR(1) = -140; - SI_VAR(2) = 725; - SI_VAR(3) = -55; - SI_VAR(4) = 180; + EVT_VAR(0) = 250; + EVT_VAR(1) = -140; + EVT_VAR(2) = 725; + EVT_VAR(3) = -55; + EVT_VAR(4) = 180; spawn N(80242EA0); GetModelCenter(65); - SI_VAR(3) = 65; - SI_VAR(4) = 66; - SI_VAR(5) = 67; - SI_VAR(6) = 68; - SI_VAR(10) = 0; + EVT_VAR(3) = 65; + EVT_VAR(4) = 66; + EVT_VAR(5) = 67; + EVT_VAR(6) = 68; + EVT_VAR(10) = 0; spawn N(8024314C); GetModelCenter(71); - SI_VAR(3) = 71; - SI_VAR(4) = 72; - SI_VAR(5) = 73; - SI_VAR(6) = 74; - SI_VAR(10) = 174; + EVT_VAR(3) = 71; + EVT_VAR(4) = 72; + EVT_VAR(5) = 73; + EVT_VAR(6) = 74; + EVT_VAR(10) = 174; spawn N(8024314C); GetModelCenter(79); - SI_VAR(3) = 79; - SI_VAR(4) = 80; - SI_VAR(5) = 81; - SI_VAR(6) = 82; - SI_VAR(10) = 0; + EVT_VAR(3) = 79; + EVT_VAR(4) = 80; + EVT_VAR(5) = 81; + EVT_VAR(6) = 82; + EVT_VAR(10) = 0; spawn N(8024314C); GetModelCenter(85); - SI_VAR(3) = 85; - SI_VAR(4) = 86; - SI_VAR(5) = 87; - SI_VAR(6) = 88; - SI_VAR(10) = 0; + EVT_VAR(3) = 85; + EVT_VAR(4) = 86; + EVT_VAR(5) = 87; + EVT_VAR(6) = 88; + EVT_VAR(10) = 0; spawn N(8024314C); }); @@ -253,7 +253,7 @@ f32 N(D_80243758_CD5588)[] = { EvtSource N(80243764) = SCRIPT({ sleep 10; PlaySound(0x212D); - N(UnkFunc21)(SI_MAP_VAR(0)); + N(UnkFunc21)(EVT_MAP_VAR(0)); sleep 85; spawn { PlaySound(0x212E); @@ -264,7 +264,7 @@ EvtSource N(80243764) = SCRIPT({ } spawn { sleep 3; - N(func_8024011C_CD1F4C)(SI_MAP_VAR(0)); + N(func_8024011C_CD1F4C)(EVT_MAP_VAR(0)); } spawn { sleep 47; @@ -276,20 +276,20 @@ EvtSource N(80243764) = SCRIPT({ N(UnkPartnerPosFunc)(); } sleep 3; - N(func_802406E0_CD2510)(SI_MAP_VAR(0)); + N(func_802406E0_CD2510)(EVT_MAP_VAR(0)); sleep 30; }); EvtSource N(802438C8) = SCRIPT({ - if (SI_SAVE_FLAG(1403) == 1) { + if (EVT_SAVE_FLAG(1403) == 1) { return; } - IsStartingConversation(SI_VAR(0)); - if (SI_VAR(0) == 1) { + IsStartingConversation(EVT_VAR(0)); + if (EVT_VAR(0) == 1) { return; } N(UnkFunc24)(); - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { return; } ModifyGlobalOverrideFlags(1, 2097152); @@ -297,40 +297,40 @@ EvtSource N(802438C8) = SCRIPT({ DisablePlayerInput(TRUE); DisablePartnerAI(0); SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_100)), TRUE); - N(UnkFunc20)(SI_MAP_VAR(0), SI_VAR(9)); - FindKeyItem(ITEM_ULTRA_STONE, SI_VAR(12)); + N(UnkFunc20)(EVT_MAP_VAR(0), EVT_VAR(9)); + FindKeyItem(ITEM_ULTRA_STONE, EVT_VAR(12)); N(UnkFunc38)(); - if (SI_VAR(0) == -1) { + if (EVT_VAR(0) == -1) { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DC), 160, 40); sleep 10; - N(UnkFunc39)(SI_VAR(9)); + N(UnkFunc39)(EVT_VAR(9)); DisablePlayerInput(FALSE); EnablePartnerAI(); ModifyGlobalOverrideFlags(0, 2097152); N(UnkFunc17)(); return; } - if (SI_SAVE_FLAG(438) == 0) { - SI_SAVE_FLAG(438) = 1; + if (EVT_SAVE_FLAG(438) == 0) { + EVT_SAVE_FLAG(438) = 1; ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DA), 160, 40); } else { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DB), 160, 40); } N(func_802402AC_CD20DC)(); - if (SI_VAR(0) == -1) { - N(UnkFunc39)(SI_VAR(9)); + if (EVT_VAR(0) == -1) { + N(UnkFunc39)(EVT_VAR(9)); DisablePlayerInput(FALSE); EnablePartnerAI(); ModifyGlobalOverrideFlags(0, 2097152); N(UnkFunc17)(); return; } - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); EnablePartnerAI(); - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != SI_VAR(11)) { - N(SwitchToPartner)(SI_VAR(11)); + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != EVT_VAR(11)) { + N(SwitchToPartner)(EVT_VAR(11)); } else { func_802CF56C(2); } @@ -338,8 +338,8 @@ EvtSource N(802438C8) = SCRIPT({ ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DF), 160, 40); ShowChoice(MESSAGE_ID(0x1E, 0x000D)); CloseMessage(); - if (SI_VAR(0) != 0) { - N(UnkFunc39)(SI_VAR(9)); + if (EVT_VAR(0) != 0) { + N(UnkFunc39)(EVT_VAR(9)); DisablePlayerInput(FALSE); EnablePartnerAI(); ModifyGlobalOverrideFlags(0, 2097152); @@ -347,11 +347,11 @@ EvtSource N(802438C8) = SCRIPT({ return; } await N(80243764); - N(UnkFunc18)(SI_VAR(11), SI_VAR(13)); - SI_SAVE_FLAG(1403) = 1; - N(UnkFunc39)(SI_VAR(9)); + N(UnkFunc18)(EVT_VAR(11), EVT_VAR(13)); + EVT_SAVE_FLAG(1403) = 1; + N(UnkFunc39)(EVT_VAR(9)); N(UnkFunc19)(); - if (SI_VAR(13) == 1) { + if (EVT_VAR(13) == 1) { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DD), 160, 40); } else { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x00DE), 160, 40); @@ -364,8 +364,8 @@ EvtSource N(802438C8) = 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)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetCamTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; goto 0; }); @@ -375,8 +375,8 @@ EvtSource N(80243DB0) = SCRIPT({ DisablePlayerPhysics(TRUE); SetPlayerActionState(6); sleep 2; - GetPlayerPos(SI_VAR(7), SI_VAR(8), SI_VAR(9)); - SI_VAR(10) = spawn N(80243D48); + GetPlayerPos(EVT_VAR(7), EVT_VAR(8), EVT_VAR(9)); + EVT_VAR(10) = spawn N(80243D48); SetPlayerJumpscale(0.7001953125); PlayerJump(450, 180, -120, 30); SetPlayerActionState(0); @@ -385,27 +385,27 @@ EvtSource N(80243DB0) = SCRIPT({ }); EvtSource N(80243E80) = SCRIPT({ - if (SI_AREA_FLAG(39) == 0) { + if (EVT_AREA_FLAG(39) == 0) { N(UnkFunc44)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { return; } - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - match SI_VAR(0) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + match EVT_VAR(0) { 620 ... 660 { - MakeItemEntity(ITEM_STAR_PIECE, 640, 145, -100, 13, SI_SAVE_FLAG(1388)); - SI_AREA_FLAG(39) = 1; + MakeItemEntity(ITEM_STAR_PIECE, 640, 145, -100, 13, EVT_SAVE_FLAG(1388)); + EVT_AREA_FLAG(39) = 1; } } } }); EvtSource N(makeEntities) = SCRIPT({ - SI_AREA_FLAG(39) = 0; + EVT_AREA_FLAG(39) = 0; bind N(80243E80) TRIGGER_FLOOR_TOUCH 20; MakeEntity(0x802EA910, 350, 240, -100, 0, MAKE_ENTITY_END); - SI_MAP_VAR(0) = SI_VAR(0); - AssignBlockFlag(SI_SAVE_FLAG(1403)); + EVT_MAP_VAR(0) = EVT_VAR(0); + AssignBlockFlag(EVT_SAVE_FLAG(1403)); AssignScript(N(802438C8)); MakeEntity(0x802EAA30, 472, 100, -100, 0, MAKE_ENTITY_END); AssignScript(N(80243DB0)); diff --git a/src/world/area_flo/flo_16/CD2C80.c b/src/world/area_flo/flo_16/CD2C80.c index fb5d4c7639..11b8087857 100644 --- a/src/world/area_flo/flo_16/CD2C80.c +++ b/src/world/area_flo/flo_16/CD2C80.c @@ -125,22 +125,22 @@ static s32 N(pad_44F8)[] = { EvtSource N(80244500) = SCRIPT({ N(func_80242940_CD4770)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { return; } DisablePlayerInput(TRUE); - if (SI_AREA_FLAG(41) == 0) { - SI_VAR(5) = 0; - SI_VAR(6) = 50; - SI_VAR(7) = 0; - SI_VAR(8) = 180; - SI_AREA_FLAG(41) = 1; + if (EVT_AREA_FLAG(41) == 0) { + EVT_VAR(5) = 0; + EVT_VAR(6) = 50; + EVT_VAR(7) = 0; + EVT_VAR(8) = 180; + EVT_AREA_FLAG(41) = 1; } else { - SI_VAR(5) = 50; - SI_VAR(6) = 0; - SI_VAR(7) = 180; - SI_VAR(8) = 0; - SI_AREA_FLAG(41) = 0; + EVT_VAR(5) = 50; + EVT_VAR(6) = 0; + EVT_VAR(7) = 180; + EVT_VAR(8) = 0; + EVT_AREA_FLAG(41) = 0; } sleep 15; PlaySound(0x204D); @@ -148,37 +148,37 @@ EvtSource N(80244500) = SCRIPT({ ShakeCam(0, 0, 30, 0.80078125); ShakeCam(0, 0, 5, 0.2001953125); } - MakeLerp(SI_VAR(5), SI_VAR(6), 30, 0); + MakeLerp(EVT_VAR(5), EVT_VAR(6), 30, 0); loop { UpdateLerp(); - TranslateModel(94, 0, SI_VAR(0), 0); - TranslateGroup(97, 0, SI_VAR(0), 0); - TranslateModel(108, 0, SI_VAR(0), 0); - TranslateGroup(111, 0, SI_VAR(0), 0); - RotateGroup(97, SI_VAR(7), 1, 0, 0); - RotateGroup(111, SI_VAR(7), 1, 0, 0); + TranslateModel(94, 0, EVT_VAR(0), 0); + TranslateGroup(97, 0, EVT_VAR(0), 0); + TranslateModel(108, 0, EVT_VAR(0), 0); + TranslateGroup(111, 0, EVT_VAR(0), 0); + RotateGroup(97, EVT_VAR(7), 1, 0, 0); + RotateGroup(111, EVT_VAR(7), 1, 0, 0); UpdateColliderTransform(26); UpdateColliderTransform(27); UpdateColliderTransform(32); UpdateColliderTransform(33); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } DisablePlayerInput(FALSE); sleep 10; - MakeLerp(SI_VAR(7), SI_VAR(8), 15, 0); + MakeLerp(EVT_VAR(7), EVT_VAR(8), 15, 0); loop { UpdateLerp(); - TranslateModel(94, 0, SI_VAR(6), 0); - TranslateGroup(97, 0, SI_VAR(6), 0); - TranslateModel(108, 0, SI_VAR(6), 0); - TranslateGroup(111, 0, SI_VAR(6), 0); - RotateGroup(97, SI_VAR(0), 1, 0, 0); - RotateGroup(111, SI_VAR(0), 1, 0, 0); + TranslateModel(94, 0, EVT_VAR(6), 0); + TranslateGroup(97, 0, EVT_VAR(6), 0); + TranslateModel(108, 0, EVT_VAR(6), 0); + TranslateGroup(111, 0, EVT_VAR(6), 0); + RotateGroup(97, EVT_VAR(0), 1, 0, 0); + RotateGroup(111, EVT_VAR(0), 1, 0, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -186,22 +186,22 @@ EvtSource N(80244500) = SCRIPT({ EvtSource N(802448FC) = SCRIPT({ N(func_80242940_CD4770)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { return; } DisablePlayerInput(TRUE); - if (SI_AREA_FLAG(42) == 0) { - SI_VAR(5) = 0; - SI_VAR(6) = 50; - SI_VAR(7) = 0; - SI_VAR(8) = 180; - SI_AREA_FLAG(42) = 1; + if (EVT_AREA_FLAG(42) == 0) { + EVT_VAR(5) = 0; + EVT_VAR(6) = 50; + EVT_VAR(7) = 0; + EVT_VAR(8) = 180; + EVT_AREA_FLAG(42) = 1; } else { - SI_VAR(5) = 50; - SI_VAR(6) = 0; - SI_VAR(7) = 180; - SI_VAR(8) = 0; - SI_AREA_FLAG(42) = 0; + EVT_VAR(5) = 50; + EVT_VAR(6) = 0; + EVT_VAR(7) = 180; + EVT_VAR(8) = 0; + EVT_AREA_FLAG(42) = 0; } sleep 15; PlaySound(0x204D); @@ -209,18 +209,18 @@ EvtSource N(802448FC) = SCRIPT({ ShakeCam(0, 0, 30, 0.80078125); ShakeCam(0, 0, 5, 0.2001953125); } - MakeLerp(SI_VAR(5), SI_VAR(6), 30, 0); + MakeLerp(EVT_VAR(5), EVT_VAR(6), 30, 0); loop { UpdateLerp(); - TranslateModel(101, 0, SI_VAR(0), 0); - TranslateGroup(104, 0, SI_VAR(0), 0); - TranslateModel(115, 0, SI_VAR(0), 0); - TranslateGroup(118, 0, SI_VAR(0), 0); - TranslateModel(129, 0, SI_VAR(0), 0); - TranslateGroup(132, 0, SI_VAR(0), 0); - RotateGroup(104, SI_VAR(7), 1, 0, 0); - RotateGroup(118, SI_VAR(7), 1, 0, 0); - RotateGroup(132, SI_VAR(7), 1, 0, 0); + TranslateModel(101, 0, EVT_VAR(0), 0); + TranslateGroup(104, 0, EVT_VAR(0), 0); + TranslateModel(115, 0, EVT_VAR(0), 0); + TranslateGroup(118, 0, EVT_VAR(0), 0); + TranslateModel(129, 0, EVT_VAR(0), 0); + TranslateGroup(132, 0, EVT_VAR(0), 0); + RotateGroup(104, EVT_VAR(7), 1, 0, 0); + RotateGroup(118, EVT_VAR(7), 1, 0, 0); + RotateGroup(132, EVT_VAR(7), 1, 0, 0); UpdateColliderTransform(29); UpdateColliderTransform(30); UpdateColliderTransform(35); @@ -228,26 +228,26 @@ EvtSource N(802448FC) = SCRIPT({ UpdateColliderTransform(41); UpdateColliderTransform(42); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } DisablePlayerInput(FALSE); sleep 10; - MakeLerp(SI_VAR(7), SI_VAR(8), 15, 0); + MakeLerp(EVT_VAR(7), EVT_VAR(8), 15, 0); loop { UpdateLerp(); - TranslateModel(101, 0, SI_VAR(6), 0); - TranslateGroup(104, 0, SI_VAR(6), 0); - TranslateModel(115, 0, SI_VAR(6), 0); - TranslateGroup(118, 0, SI_VAR(6), 0); - TranslateModel(129, 0, SI_VAR(6), 0); - TranslateGroup(132, 0, SI_VAR(6), 0); - RotateGroup(104, SI_VAR(0), 1, 0, 0); - RotateGroup(118, SI_VAR(0), 1, 0, 0); - RotateGroup(132, SI_VAR(0), 1, 0, 0); + TranslateModel(101, 0, EVT_VAR(6), 0); + TranslateGroup(104, 0, EVT_VAR(6), 0); + TranslateModel(115, 0, EVT_VAR(6), 0); + TranslateGroup(118, 0, EVT_VAR(6), 0); + TranslateModel(129, 0, EVT_VAR(6), 0); + TranslateGroup(132, 0, EVT_VAR(6), 0); + RotateGroup(104, EVT_VAR(0), 1, 0, 0); + RotateGroup(118, EVT_VAR(0), 1, 0, 0); + RotateGroup(132, EVT_VAR(0), 1, 0, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -255,22 +255,22 @@ EvtSource N(802448FC) = SCRIPT({ EvtSource N(80244DC8) = SCRIPT({ N(func_80242940_CD4770)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { return; } DisablePlayerInput(TRUE); - if (SI_AREA_FLAG(43) == 0) { - SI_VAR(5) = 0; - SI_VAR(6) = -50; - SI_VAR(7) = 0; - SI_VAR(8) = 180; - SI_AREA_FLAG(43) = 1; + if (EVT_AREA_FLAG(43) == 0) { + EVT_VAR(5) = 0; + EVT_VAR(6) = -50; + EVT_VAR(7) = 0; + EVT_VAR(8) = 180; + EVT_AREA_FLAG(43) = 1; } else { - SI_VAR(5) = -50; - SI_VAR(6) = 0; - SI_VAR(7) = 180; - SI_VAR(8) = 0; - SI_AREA_FLAG(43) = 0; + EVT_VAR(5) = -50; + EVT_VAR(6) = 0; + EVT_VAR(7) = 180; + EVT_VAR(8) = 0; + EVT_AREA_FLAG(43) = 0; } sleep 15; PlaySound(0x204D); @@ -278,46 +278,46 @@ EvtSource N(80244DC8) = SCRIPT({ ShakeCam(0, 0, 30, 0.80078125); ShakeCam(0, 0, 5, 0.2001953125); } - MakeLerp(SI_VAR(5), SI_VAR(6), 30, 0); + MakeLerp(EVT_VAR(5), EVT_VAR(6), 30, 0); loop { UpdateLerp(); - TranslateModel(122, 0, SI_VAR(0), 0); - TranslateGroup(125, 0, SI_VAR(0), 0); - TranslateModel(136, 0, SI_VAR(0), 0); - TranslateGroup(139, 0, SI_VAR(0), 0); - RotateGroup(125, SI_VAR(7), 1, 0, 0); - RotateGroup(139, SI_VAR(7), 1, 0, 0); + TranslateModel(122, 0, EVT_VAR(0), 0); + TranslateGroup(125, 0, EVT_VAR(0), 0); + TranslateModel(136, 0, EVT_VAR(0), 0); + TranslateGroup(139, 0, EVT_VAR(0), 0); + RotateGroup(125, EVT_VAR(7), 1, 0, 0); + RotateGroup(139, EVT_VAR(7), 1, 0, 0); UpdateColliderTransform(38); UpdateColliderTransform(39); UpdateColliderTransform(44); UpdateColliderTransform(45); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } DisablePlayerInput(FALSE); sleep 10; - MakeLerp(SI_VAR(7), SI_VAR(8), 15, 0); + MakeLerp(EVT_VAR(7), EVT_VAR(8), 15, 0); loop { UpdateLerp(); - TranslateModel(122, 0, SI_VAR(6), 0); - TranslateGroup(125, 0, SI_VAR(6), 0); - TranslateModel(136, 0, SI_VAR(6), 0); - TranslateGroup(139, 0, SI_VAR(6), 0); - RotateGroup(125, SI_VAR(0), 1, 0, 0); - RotateGroup(139, SI_VAR(0), 1, 0, 0); + TranslateModel(122, 0, EVT_VAR(6), 0); + TranslateGroup(125, 0, EVT_VAR(6), 0); + TranslateModel(136, 0, EVT_VAR(6), 0); + TranslateGroup(139, 0, EVT_VAR(6), 0); + RotateGroup(125, EVT_VAR(0), 1, 0, 0); + RotateGroup(139, EVT_VAR(0), 1, 0, 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } }); EvtSource N(802451C4) = SCRIPT({ - SI_AREA_FLAG(41) = 0; - SI_AREA_FLAG(42) = 0; - SI_AREA_FLAG(43) = 0; + EVT_AREA_FLAG(41) = 0; + EVT_AREA_FLAG(42) = 0; + EVT_AREA_FLAG(43) = 0; ParentColliderToModel(26, 94); ParentColliderToModel(27, 94); ParentColliderToModel(29, 101); diff --git a/src/world/area_flo/flo_17/CD7350.c b/src/world/area_flo/flo_17/CD7350.c index c0fc594468..8a71b25155 100644 --- a/src/world/area_flo/flo_17/CD7350.c +++ b/src/world/area_flo/flo_17/CD7350.c @@ -26,7 +26,7 @@ MapConfig N(config) = { }; EvtSource N(80243280) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -37,40 +37,40 @@ EvtSource N(80243280) = SCRIPT({ EvtSource N(802432F0) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -97,7 +97,7 @@ s32 N(lavaResetList_8024369C)[] = { }; EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -114,41 +114,41 @@ EvtSource N(main) = SCRIPT({ ModifyColliderFlags(3, 28, 0x00000006); ModifyColliderFlags(3, 31, 0x00000006); ModifyColliderFlags(3, 32, 0x00000006); - SI_VAR(0) = -736; - SI_VAR(1) = -137; - SI_VAR(2) = -522; - SI_VAR(3) = -118; - SI_VAR(4) = 0; + EVT_VAR(0) = -736; + EVT_VAR(1) = -137; + EVT_VAR(2) = -522; + EVT_VAR(3) = -118; + EVT_VAR(4) = 0; spawn N(802432F0); - SI_VAR(0) = -728; - SI_VAR(1) = 76; - SI_VAR(2) = -496; - SI_VAR(3) = 137; - SI_VAR(4) = 0; + EVT_VAR(0) = -728; + EVT_VAR(1) = 76; + EVT_VAR(2) = -496; + EVT_VAR(3) = 137; + EVT_VAR(4) = 0; spawn N(802432F0); - SI_VAR(0) = -160; - SI_VAR(1) = -117; - SI_VAR(2) = -92; - SI_VAR(3) = -54; - SI_VAR(4) = 0; + EVT_VAR(0) = -160; + EVT_VAR(1) = -117; + EVT_VAR(2) = -92; + EVT_VAR(3) = -54; + EVT_VAR(4) = 0; spawn N(802432F0); - SI_VAR(0) = 76; - SI_VAR(1) = -124; - SI_VAR(2) = 150; - SI_VAR(3) = -55; - SI_VAR(4) = 0; + EVT_VAR(0) = 76; + EVT_VAR(1) = -124; + EVT_VAR(2) = 150; + EVT_VAR(3) = -55; + EVT_VAR(4) = 0; spawn N(802432F0); - SI_VAR(0) = 192; - SI_VAR(1) = 60; - SI_VAR(2) = 309; - SI_VAR(3) = 133; - SI_VAR(4) = 0; + EVT_VAR(0) = 192; + EVT_VAR(1) = 60; + EVT_VAR(2) = 309; + EVT_VAR(3) = 133; + EVT_VAR(4) = 0; spawn N(802432F0); - SI_VAR(0) = 488; - SI_VAR(1) = 46; - SI_VAR(2) = 733; - SI_VAR(3) = 137; - SI_VAR(4) = 0; + EVT_VAR(0) = 488; + EVT_VAR(1) = 46; + EVT_VAR(2) = 733; + EVT_VAR(3) = 137; + EVT_VAR(4) = 0; spawn N(802432F0); ModifyColliderFlags(3, 9, 0x00000002); spawn { @@ -188,28 +188,28 @@ EvtSource N(main) = SCRIPT({ EnableTexPanning(62, 1); EnableTexPanning(63, 1); spawn { - SI_VAR(0) = 0; - SI_VAR(1) = 0; + EVT_VAR(0) = 0; + EVT_VAR(1) = 0; 0: - SI_VAR(0) += 140; - if (SI_VAR(0) > 65536) { - SI_VAR(0) += -65536; + EVT_VAR(0) += 140; + if (EVT_VAR(0) > 65536) { + EVT_VAR(0) += -65536; } - SetTexPanOffset(1, 0, SI_VAR(0), 0); - SI_VAR(1) += -200; - if (SI_VAR(1) < 0) { - SI_VAR(1) += 65536; + SetTexPanOffset(1, 0, EVT_VAR(0), 0); + EVT_VAR(1) += -200; + if (EVT_VAR(1) < 0) { + EVT_VAR(1) += 65536; } - SetTexPanOffset(2, 0, SI_VAR(1), 0); + SetTexPanOffset(2, 0, EVT_VAR(1), 0); sleep 1; goto 0; } ModifyColliderFlags(0, 1, 0x7FFFFE00); ModifyColliderFlags(0, 5, 0x7FFFFE00); - SI_VAR(0) = N(80243654); + EVT_VAR(0) = N(80243654); spawn EnterWalk; await N(80243280); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CD72E0)(); } }); @@ -220,73 +220,73 @@ static s32 N(pad_3FCC) = { EvtSource N(80243FD0) = SCRIPT({ loop { - N(func_80240040_CD7320)(SI_VAR(0)); - if (SI_VAR(0) == SI_VAR(4)) { - GetPlayerActionState(SI_VAR(0)); - if (SI_VAR(0) != 23) { - if (SI_VAR(8) == 0) { + N(func_80240040_CD7320)(EVT_VAR(0)); + if (EVT_VAR(0) == EVT_VAR(4)) { + GetPlayerActionState(EVT_VAR(0)); + if (EVT_VAR(0) != 23) { + if (EVT_VAR(8) == 0) { spawn { - GetModelCenter(SI_VAR(5)); - PlaySoundAt(0x1DB, 4194304, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetModelCenter(EVT_VAR(5)); + PlaySoundAt(0x1DB, 4194304, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } } - if (SI_VAR(7) < 90) { - if (SI_VAR(7) == 0) { + if (EVT_VAR(7) < 90) { + if (EVT_VAR(7) == 0) { sleep 5; - SI_VAR(8) = 6; - ModifyColliderFlags(0, SI_VAR(9), 0x7FFFFE00); + EVT_VAR(8) = 6; + ModifyColliderFlags(0, EVT_VAR(9), 0x7FFFFE00); } - SI_VAR(8) += 1; - SI_VAR(7) += SI_VAR(8); + EVT_VAR(8) += 1; + EVT_VAR(7) += EVT_VAR(8); } goto 50; } } - if (SI_VAR(7) != 0) { - SI_VAR(8) -= 1; - SI_VAR(7) += SI_VAR(8); - if (SI_VAR(7) <= 0) { - SI_VAR(8) = 0; - SI_VAR(7) = 0; + if (EVT_VAR(7) != 0) { + EVT_VAR(8) -= 1; + EVT_VAR(7) += EVT_VAR(8); + if (EVT_VAR(7) <= 0) { + EVT_VAR(8) = 0; + EVT_VAR(7) = 0; spawn { - GetModelCenter(SI_VAR(5)); - PlaySoundAt(0x1DC, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetModelCenter(EVT_VAR(5)); + PlaySoundAt(0x1DC, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } - ModifyColliderFlags(1, SI_VAR(9), 0x7FFFFE00); + ModifyColliderFlags(1, EVT_VAR(9), 0x7FFFFE00); } } 50: - if (SI_VAR(7) >= 90) { - SI_VAR(8) = -1; - SI_VAR(7) = 90; + if (EVT_VAR(7) >= 90) { + EVT_VAR(8) = -1; + EVT_VAR(7) = 90; } - RotateModel(SI_VAR(5), SI_VAR(7), -1, 0, 0); - RotateModel(SI_VAR(6), SI_VAR(7), -1, 0, 0); + RotateModel(EVT_VAR(5), EVT_VAR(7), -1, 0, 0); + RotateModel(EVT_VAR(6), EVT_VAR(7), -1, 0, 0); sleep 1; } }); EvtSource N(80244284) = SCRIPT({ - SI_VAR(4) = 35; - SI_VAR(5) = 14; - SI_VAR(6) = 15; - SI_VAR(7) = SI_MAP_VAR(10); - SI_VAR(8) = SI_MAP_VAR(11); - SI_VAR(9) = 38; + EVT_VAR(4) = 35; + EVT_VAR(5) = 14; + EVT_VAR(6) = 15; + EVT_VAR(7) = EVT_MAP_VAR(10); + EVT_VAR(8) = EVT_MAP_VAR(11); + EVT_VAR(9) = 38; spawn N(80243FD0); - SI_VAR(4) = 36; - SI_VAR(5) = 19; - SI_VAR(6) = 20; - SI_VAR(7) = SI_MAP_VAR(12); - SI_VAR(8) = SI_MAP_VAR(13); - SI_VAR(9) = 39; + EVT_VAR(4) = 36; + EVT_VAR(5) = 19; + EVT_VAR(6) = 20; + EVT_VAR(7) = EVT_MAP_VAR(12); + EVT_VAR(8) = EVT_MAP_VAR(13); + EVT_VAR(9) = 39; spawn N(80243FD0); - SI_VAR(4) = 37; - SI_VAR(5) = 24; - SI_VAR(6) = 25; - SI_VAR(7) = SI_MAP_VAR(14); - SI_VAR(8) = SI_MAP_VAR(15); - SI_VAR(9) = 40; + EVT_VAR(4) = 37; + EVT_VAR(5) = 24; + EVT_VAR(6) = 25; + EVT_VAR(7) = EVT_MAP_VAR(14); + EVT_VAR(8) = EVT_MAP_VAR(15); + EVT_VAR(9) = 40; spawn N(80243FD0); }); @@ -358,8 +358,8 @@ EvtSource N(npcAI_80244520) = SCRIPT({ EvtSource N(80244590) = SCRIPT({ SetNpcRotation(NPC_SELF, 0, 0, 0); - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { SetSelfVar(10, 100); DoNpcDefeat(); @@ -605,8 +605,8 @@ static s32 N(pad_527C) = { 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)); + AssignBlockFlag(EVT_SAVE_FLAG(1390)); + MakeItemEntity(ITEM_LETTER09, -245, 0, 105, 17, EVT_SAVE_FLAG(1389)); }); #include "world/common/UnkNpcAIFunc23.inc.c" diff --git a/src/world/area_flo/flo_18/CDC6A0.c b/src/world/area_flo/flo_18/CDC6A0.c index 45441b0d94..a8fbe5eeda 100644 --- a/src/world/area_flo/flo_18/CDC6A0.c +++ b/src/world/area_flo/flo_18/CDC6A0.c @@ -27,7 +27,7 @@ MapConfig N(config) = { }; EvtSource N(80240830) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_PUFF_PUFF_MACHINE, 0, 8); PlaySoundAtCollider(20, 0x80000025, 0); @@ -43,10 +43,10 @@ static s32 N(pad_8B8)[] = { EvtSource N(updateTexturePan_802408C0) = SCRIPT({ group 0; - if (SI_VAR(5) == 1) { - if (SI_VAR(6) == 1) { - if (SI_VAR(7) == 1) { - if (SI_VAR(8) == 1) { + if (EVT_VAR(5) == 1) { + if (EVT_VAR(6) == 1) { + if (EVT_VAR(7) == 1) { + if (EVT_VAR(8) == 1) { N(UnkTexturePanFunc)(); return; } @@ -68,7 +68,7 @@ s32 N(lavaResetList_802409E4)[] = { }; EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -94,48 +94,48 @@ EvtSource N(main) = SCRIPT({ EnableTexPanning(16, 1); EnableTexPanning(17, 1); spawn { - SI_VAR(0) = 1; - SI_VAR(1) = -140; - SI_VAR(2) = 0; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 1; - SI_VAR(6) = 0; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 1; + EVT_VAR(1) = -140; + EVT_VAR(2) = 0; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 1; + EVT_VAR(6) = 0; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_802408C0); } spawn { - SI_VAR(0) = 2; - SI_VAR(1) = -200; - SI_VAR(2) = 0; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 1; - SI_VAR(6) = 0; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 2; + EVT_VAR(1) = -200; + EVT_VAR(2) = 0; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 1; + EVT_VAR(6) = 0; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_802408C0); } - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 0) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 0) { ModifyColliderFlags(0, 1, 0x7FFFFE00); - SI_VAR(0) = N(802409B8); + EVT_VAR(0) = N(802409B8); spawn EnterWalk; } else { spawn N(80244058); spawn N(802409B8); } await N(80240830); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_8024030C_CDC9AC)(); } }); @@ -153,243 +153,243 @@ EvtSource N(80240E90) = SCRIPT({ PlayEffect(0x5E, 0, 80.900390625, 102.0, -4.099609375, -16.0, 102.0, -4.099609375, 0.5, 6, 0, 0, 0, 0); N(func_80240340_CDC9E0)(); sleep 4; - if (SI_SAVE_VAR(253) >= 3) { + if (EVT_SAVE_VAR(253) >= 3) { break loop; } } - SI_VAR(0) = 6; + EVT_VAR(0) = 6; loop 5 { PlayEffect(0x5E, 0, -16.0, 102.0, -4.099609375, 80.900390625, 102.0, -4.099609375, 0.5, 6, 0, 0, 0, 0); N(func_80240340_CDC9E0)(); - sleep SI_VAR(0); - SI_VAR(0) += 2; + sleep EVT_VAR(0); + EVT_VAR(0) += 2; PlayEffect(0x5E, 0, 80.900390625, 102.0, -4.099609375, -16.0, 102.0, -4.099609375, 0.5, 6, 0, 0, 0, 0); N(func_80240340_CDC9E0)(); - sleep SI_VAR(0); - SI_VAR(0) += 2; + sleep EVT_VAR(0); + EVT_VAR(0) += 2; } }); EvtSource N(80241094) = SCRIPT({ - EnableModel(SI_VAR(15), 1); - SI_VAR(14) = 159; - loop SI_VAR(14) { - SI_VAR(3) += (float) 0; - SI_VAR(4) += 0.0; - SI_VAR(5) = 0.0107421875; - SI_VAR(0) += (float) SI_VAR(3); - SI_VAR(1) += (float) SI_VAR(4); - SI_VAR(2) += (float) SI_VAR(5); - SI_VAR(6) *= 1.0107421875; - SI_VAR(7) += 0.0107421875; - SI_VAR(8) = (float) SI_VAR(6); - N(UnkFloatFunc)(SI_VAR(14), SI_VAR(10), 0.0, 0.203125, 15, 0, 0); - SI_VAR(8) += (float) SI_VAR(10); - SI_VAR(9) = (float) SI_VAR(7); - N(UnkFloatFunc)(SI_VAR(14), SI_VAR(10), 0.0, 0.203125, 20, 0, 90); - SI_VAR(9) += (float) SI_VAR(10); - SI_VAR(10) = (float) SI_VAR(0); - SI_VAR(10) *= 10.0; - TranslateModel(SI_VAR(15), SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(SI_VAR(15), SI_VAR(8), SI_VAR(9), 1); - RotateModel(SI_VAR(15), SI_VAR(10), 0, 0, 1); + EnableModel(EVT_VAR(15), 1); + EVT_VAR(14) = 159; + loop EVT_VAR(14) { + EVT_VAR(3) += (float) 0; + EVT_VAR(4) += 0.0; + EVT_VAR(5) = 0.0107421875; + EVT_VAR(0) += (float) EVT_VAR(3); + EVT_VAR(1) += (float) EVT_VAR(4); + EVT_VAR(2) += (float) EVT_VAR(5); + EVT_VAR(6) *= 1.0107421875; + EVT_VAR(7) += 0.0107421875; + EVT_VAR(8) = (float) EVT_VAR(6); + N(UnkFloatFunc)(EVT_VAR(14), EVT_VAR(10), 0.0, 0.203125, 15, 0, 0); + EVT_VAR(8) += (float) EVT_VAR(10); + EVT_VAR(9) = (float) EVT_VAR(7); + N(UnkFloatFunc)(EVT_VAR(14), EVT_VAR(10), 0.0, 0.203125, 20, 0, 90); + EVT_VAR(9) += (float) EVT_VAR(10); + EVT_VAR(10) = (float) EVT_VAR(0); + EVT_VAR(10) *= 10.0; + TranslateModel(EVT_VAR(15), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(EVT_VAR(15), EVT_VAR(8), EVT_VAR(9), 1); + RotateModel(EVT_VAR(15), EVT_VAR(10), 0, 0, 1); sleep 1; } - EnableModel(SI_VAR(15), 0); + EnableModel(EVT_VAR(15), 0); }); EvtSource N(80241284) = SCRIPT({ - SI_VAR(14) = 0; + EVT_VAR(14) = 0; 0: - if (SI_SAVE_VAR(253) >= 3) { + if (EVT_SAVE_VAR(253) >= 3) { return; } - SI_VAR(0) = 132.0; - SI_VAR(1) = 90.0; - SI_VAR(2) = -30.0; - RandInt(100, SI_VAR(3)); - SI_VAR(3) += (float) -50; - SI_VAR(3) /= (float) 200.0; - SI_VAR(4) = 1.0; - SI_VAR(5) = (float) 0; - SI_VAR(6) = 0.296875; - SI_VAR(7) = 0.296875; - SI_VAR(15) = SI_VAR(14); - SI_VAR(15) += 10000; + EVT_VAR(0) = 132.0; + EVT_VAR(1) = 90.0; + EVT_VAR(2) = -30.0; + RandInt(100, EVT_VAR(3)); + EVT_VAR(3) += (float) -50; + EVT_VAR(3) /= (float) 200.0; + EVT_VAR(4) = 1.0; + EVT_VAR(5) = (float) 0; + EVT_VAR(6) = 0.296875; + EVT_VAR(7) = 0.296875; + EVT_VAR(15) = EVT_VAR(14); + EVT_VAR(15) += 10000; spawn N(80241094); - SI_VAR(14) += 1; - if (SI_VAR(14) >= 16) { - SI_VAR(14) = 0; + EVT_VAR(14) += 1; + if (EVT_VAR(14) >= 16) { + EVT_VAR(14) = 0; } sleep 10; goto 0; }); EvtSource N(802413F0) = SCRIPT({ - if (SI_MAP_FLAG(2) == 1) { + if (EVT_MAP_FLAG(2) == 1) { return; } - SI_MAP_FLAG(2) = 1; - SI_VAR(15) = 0; + EVT_MAP_FLAG(2) = 1; + EVT_VAR(15) = 0; loop 12 { - RandInt(80, SI_VAR(0)); - SI_VAR(0) -= 40; - RandInt(50, SI_VAR(1)); - RandInt(50, SI_VAR(2)); - SI_VAR(2) -= 25; - PlayEffect(0x0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 5, 10, 1, 1, 0, 0, 0, 0, 0, 0); - SI_VAR(15) += 1; - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(14), 1.0, 1.09375, 2, 0, 0); - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(13), 1.09375, 1.0, 2, 0, 0); - SI_VAR(0) = (float) SI_VAR(14); - SI_VAR(1) = (float) SI_VAR(13); - SI_VAR(2) = (float) SI_VAR(14); - if (SI_SAVE_VAR(252) == 0) { - ScaleModel(31, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(32, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + RandInt(80, EVT_VAR(0)); + EVT_VAR(0) -= 40; + RandInt(50, EVT_VAR(1)); + RandInt(50, EVT_VAR(2)); + EVT_VAR(2) -= 25; + PlayEffect(0x0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 5, 10, 1, 1, 0, 0, 0, 0, 0, 0); + EVT_VAR(15) += 1; + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(14), 1.0, 1.09375, 2, 0, 0); + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(13), 1.09375, 1.0, 2, 0, 0); + EVT_VAR(0) = (float) EVT_VAR(14); + EVT_VAR(1) = (float) EVT_VAR(13); + EVT_VAR(2) = (float) EVT_VAR(14); + if (EVT_SAVE_VAR(252) == 0) { + ScaleModel(31, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(32, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } - if (SI_SAVE_VAR(253) == 0) { - ScaleModel(19, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(20, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + if (EVT_SAVE_VAR(253) == 0) { + ScaleModel(19, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(20, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } - if (SI_SAVE_VAR(252) <= 1) { - ScaleModel(21, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + if (EVT_SAVE_VAR(252) <= 1) { + ScaleModel(21, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } - if (SI_SAVE_VAR(252) <= 2) { - if (SI_SAVE_VAR(253) <= 1) { - ScaleModel(22, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(23, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(24, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(25, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(26, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + if (EVT_SAVE_VAR(252) <= 2) { + if (EVT_SAVE_VAR(253) <= 1) { + ScaleModel(22, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(23, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(24, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(25, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(26, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } } - ScaleModel(27, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_SAVE_VAR(252) <= 2) { - if (SI_SAVE_VAR(253) <= 2) { - ScaleModel(29, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(41, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(33, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + ScaleModel(27, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_SAVE_VAR(252) <= 2) { + if (EVT_SAVE_VAR(253) <= 2) { + ScaleModel(29, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(41, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(33, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } } - ScaleModel(36, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(37, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(38, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(39, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(40, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(34, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) -= 1.046875; - SI_VAR(0) *= 100.0; - if (SI_SAVE_VAR(252) == 0) { - RotateModel(31, SI_VAR(0), 0, 0, 1); - RotateModel(32, SI_VAR(0), 0, 0, 1); + ScaleModel(36, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(37, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(38, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(39, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(40, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(34, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) -= 1.046875; + EVT_VAR(0) *= 100.0; + if (EVT_SAVE_VAR(252) == 0) { + RotateModel(31, EVT_VAR(0), 0, 0, 1); + RotateModel(32, EVT_VAR(0), 0, 0, 1); } - if (SI_SAVE_VAR(253) == 0) { - RotateModel(19, SI_VAR(0), 0, 0, 1); - RotateModel(20, SI_VAR(0), 0, 0, 1); + if (EVT_SAVE_VAR(253) == 0) { + RotateModel(19, EVT_VAR(0), 0, 0, 1); + RotateModel(20, EVT_VAR(0), 0, 0, 1); } - if (SI_SAVE_VAR(252) <= 1) { - RotateModel(21, SI_VAR(0), 0, 0, 1); + if (EVT_SAVE_VAR(252) <= 1) { + RotateModel(21, EVT_VAR(0), 0, 0, 1); } - if (SI_SAVE_VAR(252) <= 2) { - if (SI_SAVE_VAR(253) <= 1) { - RotateModel(22, SI_VAR(0), 0, 0, 1); - RotateModel(23, SI_VAR(0), 0, 0, 1); - RotateModel(24, SI_VAR(0), 0, 0, 1); - RotateModel(25, SI_VAR(0), 0, 0, 1); - RotateModel(26, SI_VAR(0), 0, 0, 1); + if (EVT_SAVE_VAR(252) <= 2) { + if (EVT_SAVE_VAR(253) <= 1) { + RotateModel(22, EVT_VAR(0), 0, 0, 1); + RotateModel(23, EVT_VAR(0), 0, 0, 1); + RotateModel(24, EVT_VAR(0), 0, 0, 1); + RotateModel(25, EVT_VAR(0), 0, 0, 1); + RotateModel(26, EVT_VAR(0), 0, 0, 1); } } - RotateModel(27, SI_VAR(0), 0, 0, 1); - if (SI_SAVE_VAR(252) <= 2) { - if (SI_SAVE_VAR(253) <= 2) { - RotateModel(29, SI_VAR(0), 0, 0, 1); - RotateModel(41, SI_VAR(0), 0, 0, 1); - RotateModel(33, SI_VAR(0), 0, 0, 1); + RotateModel(27, EVT_VAR(0), 0, 0, 1); + if (EVT_SAVE_VAR(252) <= 2) { + if (EVT_SAVE_VAR(253) <= 2) { + RotateModel(29, EVT_VAR(0), 0, 0, 1); + RotateModel(41, EVT_VAR(0), 0, 0, 1); + RotateModel(33, EVT_VAR(0), 0, 0, 1); } } - RotateModel(36, SI_VAR(0), 0, 0, 1); - RotateModel(37, SI_VAR(0), 0, 0, 1); - RotateModel(38, SI_VAR(0), 0, 0, 1); - RotateModel(39, SI_VAR(0), 0, 0, 1); - RotateModel(40, SI_VAR(0), 0, 0, 1); - RotateModel(34, SI_VAR(0), 0, 0, 1); + RotateModel(36, EVT_VAR(0), 0, 0, 1); + RotateModel(37, EVT_VAR(0), 0, 0, 1); + RotateModel(38, EVT_VAR(0), 0, 0, 1); + RotateModel(39, EVT_VAR(0), 0, 0, 1); + RotateModel(40, EVT_VAR(0), 0, 0, 1); + RotateModel(34, EVT_VAR(0), 0, 0, 1); sleep 1; } - SI_VAR(0) = (float) 1; - SI_VAR(1) = (float) 1; - SI_VAR(2) = (float) 1; - if (SI_SAVE_VAR(252) == 0) { - ScaleModel(31, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(32, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(0) = (float) 1; + EVT_VAR(1) = (float) 1; + EVT_VAR(2) = (float) 1; + if (EVT_SAVE_VAR(252) == 0) { + ScaleModel(31, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(32, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } - if (SI_SAVE_VAR(253) == 0) { - ScaleModel(19, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(20, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + if (EVT_SAVE_VAR(253) == 0) { + ScaleModel(19, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(20, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } - if (SI_SAVE_VAR(252) <= 1) { - ScaleModel(21, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + if (EVT_SAVE_VAR(252) <= 1) { + ScaleModel(21, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } - if (SI_SAVE_VAR(252) <= 2) { - if (SI_SAVE_VAR(253) <= 1) { - ScaleModel(22, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(23, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(24, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(25, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(26, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + if (EVT_SAVE_VAR(252) <= 2) { + if (EVT_SAVE_VAR(253) <= 1) { + ScaleModel(22, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(23, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(24, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(25, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(26, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } } - ScaleModel(27, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_SAVE_VAR(252) <= 2) { - if (SI_SAVE_VAR(253) <= 2) { - ScaleModel(29, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(41, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(33, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + ScaleModel(27, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_SAVE_VAR(252) <= 2) { + if (EVT_SAVE_VAR(253) <= 2) { + ScaleModel(29, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(41, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(33, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); } } - ScaleModel(36, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(37, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(38, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(39, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(40, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ScaleModel(34, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + ScaleModel(36, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(37, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(38, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(39, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(40, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + ScaleModel(34, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; - SI_MAP_FLAG(2) = 0; + EVT_MAP_FLAG(2) = 0; }); #ifdef NON_MATCHING EvtSource N(80241ED4) = SCRIPT({ - SI_VAR(0) = 0; - SI_VAR(1) = 0; - SI_VAR(2) = 0; - SI_VAR(3) = -1.0; - SI_VAR(4) = 0.0; - SI_VAR(5) = 3.0; + EVT_VAR(0) = 0; + EVT_VAR(1) = 0; + EVT_VAR(2) = 0; + EVT_VAR(3) = -1.0; + EVT_VAR(4) = 0.0; + EVT_VAR(5) = 3.0; spawn { sleep 10; PlaySoundAtCollider(19, 486, 0); } loop 300 { - SI_VAR(4) += -0.5; - SI_VAR(5) += 0.09375; - SI_VAR(0) += (float) SI_VAR(3); - SI_VAR(1) += (float) SI_VAR(4); - SI_VAR(2) += (float) SI_VAR(5); - if (SI_VAR(1) < -10) { - SI_VAR(1) = -10.0; - SI_VAR(3) = 0.0; - SI_VAR(4) = 0.0; - if (SI_VAR(2) >= 80) { + EVT_VAR(4) += -0.5; + EVT_VAR(5) += 0.09375; + EVT_VAR(0) += (float) EVT_VAR(3); + EVT_VAR(1) += (float) EVT_VAR(4); + EVT_VAR(2) += (float) EVT_VAR(5); + if (EVT_VAR(1) < -10) { + EVT_VAR(1) = -10.0; + EVT_VAR(3) = 0.0; + EVT_VAR(4) = 0.0; + if (EVT_VAR(2) >= 80) { goto 0; } } } TranslateModel(31, -78, 19, 2); TranslateModel(32, -78, 19, 2); - TranslateModel(31, SI_VAR(0), SI_VAR(1), 0); - TranslateModel(32, SI_VAR(0), SI_VAR(1), 0); - RotateModel(31, SI_VAR(2), 0, 0, 1); - RotateModel(32, SI_VAR(2), 0, 0, 1); + TranslateModel(31, EVT_VAR(0), EVT_VAR(1), 0); + TranslateModel(32, EVT_VAR(0), EVT_VAR(1), 0); + RotateModel(31, EVT_VAR(2), 0, 0, 1); + RotateModel(32, EVT_VAR(2), 0, 0, 1); TranslateModel(31, 78, -19, -2); TranslateModel(32, 78, -19, -2); sleep 1; @@ -400,87 +400,87 @@ EvtSource N(80241ED4) = SCRIPT({ }); #else 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) + EVT_CMD(EVT_OP_SET_F, EVT_VAR(0), 0), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(1), 0), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(2), 0), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(3), EVT_FIXED(-1.0)), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(4), EVT_FIXED(0.0)), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(5), EVT_FIXED(3.0)), + EVT_CMD(EVT_OP_SPAWN_THREAD), + EVT_CMD(EVT_OP_SLEEP_FRAMES, 10), + EVT_CMD(EVT_OP_CALL, PlaySoundAtCollider, 19, 486, 0), + EVT_CMD(EVT_OP_END_SPAWN_THREAD), + EVT_CMD(EVT_OP_LOOP, 300), + EVT_CMD(EVT_OP_ADD_F, EVT_VAR(4), EVT_FIXED(-0.5)), + EVT_CMD(EVT_OP_ADD_F, EVT_VAR(5), EVT_FIXED(0.09375)), + EVT_CMD(EVT_OP_ADD_F, EVT_VAR(0), EVT_VAR(3)), + EVT_CMD(EVT_OP_ADD_F, EVT_VAR(1), EVT_VAR(4)), + EVT_CMD(EVT_OP_ADD_F, EVT_VAR(2), EVT_VAR(5)), + EVT_CMD(EVT_OP_IF_LT, EVT_VAR(1), -10), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(1), EVT_FIXED(-10.0)), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(3), EVT_FIXED(0.0)), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(4), EVT_FIXED(0.0)), + EVT_CMD(EVT_OP_IF_GE, EVT_VAR(2), 80), + EVT_CMD(EVT_OP_GOTO, 0), + EVT_CMD(EVT_OP_END_IF), + EVT_CMD(EVT_OP_END_IF), + EVT_CMD(EVT_OP_END_IF), // BUG: extraneous END_IF + EVT_CMD(EVT_OP_CALL, TranslateModel, 31, -78, 19, 2), + EVT_CMD(EVT_OP_CALL, TranslateModel, 32, -78, 19, 2), + EVT_CMD(EVT_OP_CALL, TranslateModel, 31, EVT_VAR(0), EVT_VAR(1), 0), + EVT_CMD(EVT_OP_CALL, TranslateModel, 32, EVT_VAR(0), EVT_VAR(1), 0), + EVT_CMD(EVT_OP_CALL, RotateModel, 31, EVT_VAR(2), 0, 0, 1), + EVT_CMD(EVT_OP_CALL, RotateModel, 32, EVT_VAR(2), 0, 0, 1), + EVT_CMD(EVT_OP_CALL, TranslateModel, 31, 78, -19, -2), + EVT_CMD(EVT_OP_CALL, TranslateModel, 32, 78, -19, -2), + EVT_CMD(EVT_OP_SLEEP_FRAMES, 1), +EVT_CMD(EVT_OP_END_LOOP), +EVT_CMD(EVT_OP_LABEL, 0), +EVT_CMD(EVT_OP_SLEEP_FRAMES, 30), +EVT_CMD(EVT_OP_CALL, ModifyColliderFlags, 0, 19, 0x7FFFFE00), +EVT_CMD(EVT_OP_RETURN), +EVT_CMD(EVT_OP_END) }; #endif EvtSource N(80242174) = SCRIPT({ - SI_VAR(0) = (float) 0; - SI_VAR(1) = (float) 0; - SI_VAR(2) = (float) 0; - SI_VAR(3) = 0.0; - SI_VAR(4) = 0.0; - SI_VAR(5) = -5.0; + EVT_VAR(0) = (float) 0; + EVT_VAR(1) = (float) 0; + EVT_VAR(2) = (float) 0; + EVT_VAR(3) = 0.0; + EVT_VAR(4) = 0.0; + EVT_VAR(5) = -5.0; spawn { sleep 12; PlaySoundAtCollider(21, 487, 0); } loop 300 { - SI_VAR(4) += -0.5; - SI_VAR(0) += (float) SI_VAR(3); - SI_VAR(1) += (float) SI_VAR(4); - SI_VAR(2) += (float) SI_VAR(5); - if (SI_VAR(2) < -45) { - SI_VAR(5) = 5; + EVT_VAR(4) += -0.5; + EVT_VAR(0) += (float) EVT_VAR(3); + EVT_VAR(1) += (float) EVT_VAR(4); + EVT_VAR(2) += (float) EVT_VAR(5); + if (EVT_VAR(2) < -45) { + EVT_VAR(5) = 5; } - if (SI_VAR(2) > 0) { - SI_VAR(2) = 0; - SI_VAR(3) = 5; + if (EVT_VAR(2) > 0) { + EVT_VAR(2) = 0; + EVT_VAR(3) = 5; } - if (SI_VAR(1) < -25) { - SI_VAR(4) = 0; - SI_VAR(1) = -25; + if (EVT_VAR(1) < -25) { + EVT_VAR(4) = 0; + EVT_VAR(1) = -25; } - if (SI_VAR(0) > 90) { + if (EVT_VAR(0) > 90) { goto 0; } TranslateModel(19, 50, 28, 27); TranslateModel(20, 50, 28, 27); - TranslateModel(19, 0, SI_VAR(1), 1); - TranslateModel(20, 0, SI_VAR(1), 1); - RotateModel(19, SI_VAR(0), 1, 0, 0); - RotateModel(20, SI_VAR(0), 1, 0, 0); - RotateModel(19, SI_VAR(2), 0, 0, 1); - RotateModel(20, SI_VAR(2), 0, 0, 1); + TranslateModel(19, 0, EVT_VAR(1), 1); + TranslateModel(20, 0, EVT_VAR(1), 1); + RotateModel(19, EVT_VAR(0), 1, 0, 0); + RotateModel(20, EVT_VAR(0), 1, 0, 0); + RotateModel(19, EVT_VAR(2), 0, 0, 1); + RotateModel(20, EVT_VAR(2), 0, 0, 1); TranslateModel(19, -50, -28, -27); TranslateModel(20, -50, -28, -27); sleep 1; @@ -490,27 +490,27 @@ EvtSource N(80242174) = SCRIPT({ }); EvtSource N(80242474) = SCRIPT({ - SI_VAR(2) = (float) 0; - SI_VAR(1) = (float) 0; - SI_VAR(0) = (float) 0; - SI_VAR(5) = 0.0; + EVT_VAR(2) = (float) 0; + EVT_VAR(1) = (float) 0; + EVT_VAR(0) = (float) 0; + EVT_VAR(5) = 0.0; spawn { sleep 15; PlaySoundAtCollider(23, 487, 0); } loop 300 { - SI_VAR(5) += 0.5; - SI_VAR(2) += (float) SI_VAR(5); - if (SI_VAR(2) >= 80) { - SI_VAR(2) = (float) 80; - SI_VAR(5) *= -0.5; - if (SI_VAR(5) == 0) { + EVT_VAR(5) += 0.5; + EVT_VAR(2) += (float) EVT_VAR(5); + if (EVT_VAR(2) >= 80) { + EVT_VAR(2) = (float) 80; + EVT_VAR(5) *= -0.5; + if (EVT_VAR(5) == 0) { goto 0; } } TranslateModel(21, -55, 5, 16); - TranslateModel(21, SI_VAR(0), SI_VAR(1), 0); - RotateModel(21, SI_VAR(2), 0, 0, 1); + TranslateModel(21, EVT_VAR(0), EVT_VAR(1), 0); + RotateModel(21, EVT_VAR(2), 0, 0, 1); TranslateModel(21, 55, -5, -16); sleep 1; } @@ -519,37 +519,37 @@ EvtSource N(80242474) = SCRIPT({ }); EvtSource N(80242620) = SCRIPT({ - SI_VAR(2) = (float) 0; - SI_VAR(1) = (float) 0; - SI_VAR(0) = (float) 0; - SI_VAR(5) = 0.0; + EVT_VAR(2) = (float) 0; + EVT_VAR(1) = (float) 0; + EVT_VAR(0) = (float) 0; + EVT_VAR(5) = 0.0; spawn { sleep 15; PlaySoundAtCollider(22, 487, 0); } loop 300 { - SI_VAR(5) += 0.5; - SI_VAR(2) += (float) SI_VAR(5); - if (SI_VAR(2) >= 80) { - SI_VAR(2) = (float) 80; - SI_VAR(5) *= -0.5; - if (SI_VAR(5) == 0) { + EVT_VAR(5) += 0.5; + EVT_VAR(2) += (float) EVT_VAR(5); + if (EVT_VAR(2) >= 80) { + EVT_VAR(2) = (float) 80; + EVT_VAR(5) *= -0.5; + if (EVT_VAR(5) == 0) { goto 0; } } TranslateModel(24, 60, 0, 16); - RotateModel(24, SI_VAR(2), 0, 0, -1); + RotateModel(24, EVT_VAR(2), 0, 0, -1); TranslateModel(24, -60, 0, -16); TranslateModel(22, 0, 0, 27); TranslateModel(23, 0, 0, 27); - RotateModel(22, SI_VAR(2), 1, 0, 0); - RotateModel(23, SI_VAR(2), 1, 0, 0); + RotateModel(22, EVT_VAR(2), 1, 0, 0); + RotateModel(23, EVT_VAR(2), 1, 0, 0); TranslateModel(22, 0, 0, -27); TranslateModel(23, 0, 0, -27); TranslateModel(25, 0, 0, -41); TranslateModel(26, 0, 0, -41); - RotateModel(25, SI_VAR(2), -1, 0, 0); - RotateModel(26, SI_VAR(2), -1, 0, 0); + RotateModel(25, EVT_VAR(2), -1, 0, 0); + RotateModel(26, EVT_VAR(2), -1, 0, 0); TranslateModel(25, 0, 0, 41); TranslateModel(26, 0, 0, 41); sleep 1; @@ -560,34 +560,34 @@ EvtSource N(80242620) = SCRIPT({ #ifdef NON_MATCHING EvtSource N(80242910) = SCRIPT({ - SI_VAR(0) = 0; - SI_VAR(1) = 0; - SI_VAR(2) = 0; - SI_VAR(3) = -1.0; - SI_VAR(4) = 0.0; - SI_VAR(5) = 3.0; + EVT_VAR(0) = 0; + EVT_VAR(1) = 0; + EVT_VAR(2) = 0; + EVT_VAR(3) = -1.0; + EVT_VAR(4) = 0.0; + EVT_VAR(5) = 3.0; spawn { sleep 15; PlaySoundAtCollider(18, 486, 0); } loop 300 { - SI_VAR(4) += -0.5; - SI_VAR(5) += 0.09375; - SI_VAR(0) += (float) SI_VAR(3); - SI_VAR(1) += (float) SI_VAR(4); - SI_VAR(2) += (float) SI_VAR(5); - if (SI_VAR(1) < -25) { - SI_VAR(1) = -25.0; - SI_VAR(3) = 0.0; - SI_VAR(4) = 0.0; - if (SI_VAR(2) >= 80) { + EVT_VAR(4) += -0.5; + EVT_VAR(5) += 0.09375; + EVT_VAR(0) += (float) EVT_VAR(3); + EVT_VAR(1) += (float) EVT_VAR(4); + EVT_VAR(2) += (float) EVT_VAR(5); + if (EVT_VAR(1) < -25) { + EVT_VAR(1) = -25.0; + EVT_VAR(3) = 0.0; + EVT_VAR(4) = 0.0; + if (EVT_VAR(2) >= 80) { goto 0; } } } TranslateModel(29, 124, 17, 3); - TranslateModel(29, SI_VAR(0), SI_VAR(1), 0); - RotateModel(29, SI_VAR(2), 0, 0, -1); + TranslateModel(29, EVT_VAR(0), EVT_VAR(1), 0); + RotateModel(29, EVT_VAR(2), 0, 0, -1); TranslateModel(29, -124, -17, -3); sleep 1; } @@ -597,77 +597,77 @@ EvtSource N(80242910) = SCRIPT({ }); #else 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) + EVT_CMD(EVT_OP_SET_F, EVT_VAR(0), 0), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(1), 0), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(2), 0), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(3), EVT_FIXED(-1.0)), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(4), EVT_FIXED(0.0)), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(5), EVT_FIXED(3.0)), + EVT_CMD(EVT_OP_SPAWN_THREAD), + EVT_CMD(EVT_OP_SLEEP_FRAMES, 15), + EVT_CMD(EVT_OP_CALL, PlaySoundAtCollider, 18, 486, 0), + EVT_CMD(EVT_OP_END_SPAWN_THREAD), + EVT_CMD(EVT_OP_LOOP, 300), + EVT_CMD(EVT_OP_ADD_F, EVT_VAR(4), EVT_FIXED(-0.5)), + EVT_CMD(EVT_OP_ADD_F, EVT_VAR(5), EVT_FIXED(0.09375)), + EVT_CMD(EVT_OP_ADD_F, EVT_VAR(0), EVT_VAR(3)), + EVT_CMD(EVT_OP_ADD_F, EVT_VAR(1), EVT_VAR(4)), + EVT_CMD(EVT_OP_ADD_F, EVT_VAR(2), EVT_VAR(5)), + EVT_CMD(EVT_OP_IF_LT, EVT_VAR(1), -25), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(1), EVT_FIXED(-25.0)), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(3), EVT_FIXED(0.0)), + EVT_CMD(EVT_OP_SET_F, EVT_VAR(4), EVT_FIXED(0.0)), + EVT_CMD(EVT_OP_IF_GE, EVT_VAR(2), 80), + EVT_CMD(EVT_OP_GOTO, 0), + EVT_CMD(EVT_OP_END_IF), + EVT_CMD(EVT_OP_END_IF), + EVT_CMD(EVT_OP_END_IF), // BUG: extraneous END_IF + EVT_CMD(EVT_OP_CALL, TranslateModel, 29, 124, 17, 3), + EVT_CMD(EVT_OP_CALL, TranslateModel, 29, EVT_VAR(0), EVT_VAR(1), 0), + EVT_CMD(EVT_OP_CALL, RotateModel, 29, EVT_VAR(2), 0, 0, -1), + EVT_CMD(EVT_OP_CALL, TranslateModel, 29, -124, -17, -3), + EVT_CMD(EVT_OP_SLEEP_FRAMES, 1), +EVT_CMD(EVT_OP_END_LOOP), +EVT_CMD(EVT_OP_LABEL, 0), +EVT_CMD(EVT_OP_RETURN), +EVT_CMD(EVT_OP_END) }; #endif EvtSource N(80242B18) = SCRIPT({ ModifyColliderFlags(0, 18, 0x7FFFFE00); - SI_VAR(0) = (float) 0; - SI_VAR(1) = (float) 0; - SI_VAR(2) = (float) 0; - SI_VAR(3) = 3.0; - SI_VAR(4) = 1.0; - SI_VAR(5) = 5.0; + EVT_VAR(0) = (float) 0; + EVT_VAR(1) = (float) 0; + EVT_VAR(2) = (float) 0; + EVT_VAR(3) = 3.0; + EVT_VAR(4) = 1.0; + EVT_VAR(5) = 5.0; spawn { sleep 15; PlaySoundAtCollider(20, 486, 0); } loop 300 { - SI_VAR(4) += -0.5; - SI_VAR(0) += (float) SI_VAR(3); - SI_VAR(1) += (float) SI_VAR(4); - SI_VAR(2) += (float) SI_VAR(5); - if (SI_VAR(1) <= -40) { - SI_VAR(1) = (float) -40; - SI_VAR(4) *= -0.5; - if (SI_VAR(4) <= 1) { + EVT_VAR(4) += -0.5; + EVT_VAR(0) += (float) EVT_VAR(3); + EVT_VAR(1) += (float) EVT_VAR(4); + EVT_VAR(2) += (float) EVT_VAR(5); + if (EVT_VAR(1) <= -40) { + EVT_VAR(1) = (float) -40; + EVT_VAR(4) *= -0.5; + if (EVT_VAR(4) <= 1) { goto 1; } } - if (SI_VAR(2) >= 60) { - SI_VAR(2) = (float) 60; - SI_VAR(5) = (float) 0; + if (EVT_VAR(2) >= 60) { + EVT_VAR(2) = (float) 60; + EVT_VAR(5) = (float) 0; } TranslateModel(41, -34, 50, 10); TranslateModel(33, -34, 50, 10); - TranslateModel(41, 0, SI_VAR(1), SI_VAR(0)); - RotateModel(41, SI_VAR(2), 0, 0, 1); - TranslateModel(33, 0, SI_VAR(1), SI_VAR(0)); - RotateModel(33, SI_VAR(2), 0, 0, 1); + TranslateModel(41, 0, EVT_VAR(1), EVT_VAR(0)); + RotateModel(41, EVT_VAR(2), 0, 0, 1); + TranslateModel(33, 0, EVT_VAR(1), EVT_VAR(0)); + RotateModel(33, EVT_VAR(2), 0, 0, 1); TranslateModel(41, 34, -50, -10); TranslateModel(33, 34, -50, -10); sleep 1; @@ -683,98 +683,98 @@ s32 N(intTable_80242DC8)[] = { }; 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) { + EVT_VAR(10) = EVT_VAR(0); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(0) < -210) { return; } PlaySound(0x1E5); await N(802413F0); - SI_VAR(0) = SI_VAR(10); - if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { - SI_MAP_FLAG(1) = 1; + EVT_VAR(0) = EVT_VAR(10); + if (EVT_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + EVT_MAP_FLAG(1) = 1; return; } - if (SI_MAP_FLAG(3) == 1) { + if (EVT_MAP_FLAG(3) == 1) { return; } - SI_MAP_FLAG(3) = 1; - if (SI_VAR(0) > 2) { + EVT_MAP_FLAG(3) = 1; + if (EVT_VAR(0) > 2) { goto 0; } - if (SI_VAR(0) == 2) { + if (EVT_VAR(0) == 2) { goto 11; } - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { 11: - if (SI_SAVE_VAR(252) == 0) { - SI_SAVE_VAR(252) = 1; + if (EVT_SAVE_VAR(252) == 0) { + EVT_SAVE_VAR(252) = 1; spawn N(80241ED4); goto 0; } } - if (SI_VAR(0) == 1) { - if (SI_SAVE_VAR(253) == 0) { - SI_SAVE_VAR(253) = 1; + if (EVT_VAR(0) == 1) { + if (EVT_SAVE_VAR(253) == 0) { + EVT_SAVE_VAR(253) = 1; spawn N(80242174); goto 0; } } - if (SI_VAR(0) == 0) { - if (SI_SAVE_VAR(252) == 1) { - SI_SAVE_VAR(252) = 2; + if (EVT_VAR(0) == 0) { + if (EVT_SAVE_VAR(252) == 1) { + EVT_SAVE_VAR(252) = 2; spawn N(80242474); goto 0; } } - if (SI_SAVE_VAR(252) == 2) { - if (SI_SAVE_VAR(253) == 1) { - SI_SAVE_VAR(253) = 2; + if (EVT_SAVE_VAR(252) == 2) { + if (EVT_SAVE_VAR(253) == 1) { + EVT_SAVE_VAR(253) = 2; spawn N(80242620); goto 0; } } - if (SI_SAVE_VAR(252) == 2) { - if (SI_SAVE_VAR(253) == 2) { + if (EVT_SAVE_VAR(252) == 2) { + if (EVT_SAVE_VAR(253) == 2) { DisablePlayerInput(TRUE); UseSettingsFrom(0, 40, 0, 0); SetPanTarget(0, 40, 0, 0); SetCamSpeed(0, 1.5); PanToTarget(0, 0, 1); - SI_SAVE_VAR(253) = 3; + EVT_SAVE_VAR(253) = 3; await N(802413F0); await N(802413F0); await N(802413F0); sleep 30; GetModelCenter(27); - PlayEffect(0x1D, 0, SI_VAR(0), 50, SI_VAR(2), 100, 20, 0, 30, 0, 0, 0, 0, 0); - PlayEffect(0x1D, 0, SI_VAR(0), 30, SI_VAR(2), 120, 20, 0, 30, 0, 0, 0, 0, 0); - PlayEffect(0x1D, 0, SI_VAR(0), 10, SI_VAR(2), 100, 20, 0, 30, 0, 0, 0, 0, 0); + PlayEffect(0x1D, 0, EVT_VAR(0), 50, EVT_VAR(2), 100, 20, 0, 30, 0, 0, 0, 0, 0); + PlayEffect(0x1D, 0, EVT_VAR(0), 30, EVT_VAR(2), 120, 20, 0, 30, 0, 0, 0, 0, 0); + PlayEffect(0x1D, 0, EVT_VAR(0), 10, EVT_VAR(2), 100, 20, 0, 30, 0, 0, 0, 0, 0); sleep 15; spawn { - SI_VAR(3) = 6; + EVT_VAR(3) = 6; buf_use N(intTable_80242DC8); loop 8 { - buf_read SI_VAR(0) SI_VAR(1) SI_VAR(2); - PlaySoundAt(0x190, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - PlayEffect(0x27, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 6, 0, 0, 0, 0, 0, 0, 0); + buf_read EVT_VAR(0) EVT_VAR(1) EVT_VAR(2); + PlaySoundAt(0x190, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + PlayEffect(0x27, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 6, 0, 0, 0, 0, 0, 0, 0); sleep 2; - SI_VAR(1) += 5; - PlaySoundAt(0x190, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - PlayEffect(0x27, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 2, 15, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(3); - SI_VAR(3) += 1; + EVT_VAR(1) += 5; + PlaySoundAt(0x190, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + PlayEffect(0x27, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 2, 15, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(3); + EVT_VAR(3) += 1; } - SI_VAR(4) = 2.0; + EVT_VAR(4) = 2.0; loop 2 { buf_use N(intTable_80242DC8); loop 8 { - buf_read SI_VAR(0) SI_VAR(1) SI_VAR(2); - PlaySoundAt(0x190, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - PlayEffect(0x27, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 25, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(3); - SI_VAR(3) += SI_VAR(4); - SI_VAR(4) += 0.5; + buf_read EVT_VAR(0) EVT_VAR(1) EVT_VAR(2); + PlaySoundAt(0x190, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + PlayEffect(0x27, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 1, 25, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(3); + EVT_VAR(3) += EVT_VAR(4); + EVT_VAR(4) += 0.5; } } } @@ -790,14 +790,14 @@ EvtSource N(80242E28) = SCRIPT({ DisablePlayerPhysics(TRUE); sleep 30; await N(80242B18); - SI_STORY_PROGRESS = STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE; + EVT_STORY_PROGRESS = STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE; GotoMap("flo_15", 1); sleep 70; return; } } 0: - SI_MAP_FLAG(3) = 0; + EVT_MAP_FLAG(3) = 0; }); Vec4f N(triggerCoord_8024367C) = { 5.0f, 0.0f, -10.0, 0.0f }; @@ -809,7 +809,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 }; EvtSource N(802436BC) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { EnableModel(49, 0); ModifyColliderFlags(0, 19, 0x7FFFFE00); EnableModel(31, 0); @@ -830,51 +830,51 @@ EvtSource N(802436BC) = SCRIPT({ } spawn N(80240E90); EnableModel(49, 0); - if (SI_SAVE_VAR(252) >= 1) { + if (EVT_SAVE_VAR(252) >= 1) { ModifyColliderFlags(0, 19, 0x7FFFFE00); EnableModel(31, 0); EnableModel(32, 0); } - if (SI_SAVE_VAR(253) >= 1) { + if (EVT_SAVE_VAR(253) >= 1) { EnableModel(19, 0); EnableModel(20, 0); } - if (SI_SAVE_VAR(252) >= 2) { + if (EVT_SAVE_VAR(252) >= 2) { EnableModel(21, 0); } - if (SI_SAVE_VAR(253) >= 2) { + if (EVT_SAVE_VAR(253) >= 2) { EnableModel(22, 0); EnableModel(23, 0); EnableModel(24, 0); EnableModel(25, 0); EnableModel(26, 0); } - if (SI_SAVE_VAR(253) >= 3) { + if (EVT_SAVE_VAR(253) >= 3) { EnableModel(29, 0); EnableModel(41, 0); EnableModel(33, 0); ModifyColliderFlags(0, 18, 0x7FFFFE00); return; } - SI_VAR(0) = 0; + EVT_VAR(0) = 0; bind N(80242E28) TRIGGER_WALL_HAMMER 23; bind N(80242E28) TRIGGER_POINT_BOMB N(triggerCoord_8024367C); bind N(80242E28) TRIGGER_POINT_BOMB N(triggerCoord_8024368C); - SI_VAR(0) = 1; + EVT_VAR(0) = 1; bind N(80242E28) TRIGGER_WALL_HAMMER 22; bind N(80242E28) TRIGGER_POINT_BOMB N(triggerCoord_8024369C); bind N(80242E28) TRIGGER_POINT_BOMB N(triggerCoord_802436AC); - SI_VAR(0) = 3; + EVT_VAR(0) = 3; bind N(80242E28) TRIGGER_WALL_HAMMER 19; - SI_VAR(0) = 4; + EVT_VAR(0) = 4; bind N(80242E28) TRIGGER_WALL_HAMMER 18; - SI_VAR(0) = 0; + EVT_VAR(0) = 0; loop 16 { - SI_VAR(1) = SI_VAR(0); - SI_VAR(1) += 10000; - SI_VAR(0) += 1; - CloneModel(49, SI_VAR(1)); - EnableModel(SI_VAR(1), 0); + EVT_VAR(1) = EVT_VAR(0); + EVT_VAR(1) += 10000; + EVT_VAR(0) += 1; + CloneModel(49, EVT_VAR(1)); + EnableModel(EVT_VAR(1), 0); } spawn N(80241284); EnableTexPanning(36, 1); @@ -884,46 +884,46 @@ EvtSource N(802436BC) = SCRIPT({ EnableTexPanning(40, 1); EnableTexPanning(41, 1); spawn { - SI_VAR(14) = 1.0; + EVT_VAR(14) = 1.0; 0: - if (SI_SAVE_VAR(253) >= 3) { - SI_VAR(14) *= 0.953125; + if (EVT_SAVE_VAR(253) >= 3) { + EVT_VAR(14) *= 0.953125; } - SI_VAR(15) += (float) SI_VAR(14); - if (SI_VAR(15) == 1080) { - SI_VAR(15) = (float) 0; + EVT_VAR(15) += (float) EVT_VAR(14); + if (EVT_VAR(15) == 1080) { + EVT_VAR(15) = (float) 0; } - SI_VAR(0) = SI_VAR(15); - SI_VAR(0) /= 9; - SI_VAR(0) %= 4; - SI_VAR(0) *= 16384; - SI_VAR(1) = SI_VAR(15); - SI_VAR(1) /= 4; - SI_VAR(1) %= 2; - SI_VAR(1) *= 16384; - SI_VAR(2) = SI_VAR(15); - SI_VAR(2) /= 5; - SI_VAR(2) %= 2; - SI_VAR(2) *= 16384; - SI_VAR(3) = SI_VAR(15); - SI_VAR(3) /= 6; - SI_VAR(3) %= 2; - SI_VAR(3) *= 16384; - SI_VAR(4) = SI_VAR(15); - SI_VAR(4) /= 2; - SI_VAR(4) %= 2; - SI_VAR(4) *= 32768; - SI_VAR(5) = SI_VAR(15); - SI_VAR(5) /= 8; - SI_VAR(5) %= 2; - SI_VAR(5) *= 16384; - SetTexPanOffset(12, 0, SI_VAR(0), 0); - SetTexPanOffset(13, 0, SI_VAR(1), 0); - SetTexPanOffset(14, 0, SI_VAR(2), 0); - SetTexPanOffset(15, 0, SI_VAR(3), 0); - SetTexPanOffset(11, 0, SI_VAR(4), 0); - SetTexPanOffset(10, 0, SI_VAR(5), 0); - SetTexPanOffset(9, 0, SI_VAR(5), 0); + EVT_VAR(0) = EVT_VAR(15); + EVT_VAR(0) /= 9; + EVT_VAR(0) %= 4; + EVT_VAR(0) *= 16384; + EVT_VAR(1) = EVT_VAR(15); + EVT_VAR(1) /= 4; + EVT_VAR(1) %= 2; + EVT_VAR(1) *= 16384; + EVT_VAR(2) = EVT_VAR(15); + EVT_VAR(2) /= 5; + EVT_VAR(2) %= 2; + EVT_VAR(2) *= 16384; + EVT_VAR(3) = EVT_VAR(15); + EVT_VAR(3) /= 6; + EVT_VAR(3) %= 2; + EVT_VAR(3) *= 16384; + EVT_VAR(4) = EVT_VAR(15); + EVT_VAR(4) /= 2; + EVT_VAR(4) %= 2; + EVT_VAR(4) *= 32768; + EVT_VAR(5) = EVT_VAR(15); + EVT_VAR(5) /= 8; + EVT_VAR(5) %= 2; + EVT_VAR(5) *= 16384; + SetTexPanOffset(12, 0, EVT_VAR(0), 0); + SetTexPanOffset(13, 0, EVT_VAR(1), 0); + SetTexPanOffset(14, 0, EVT_VAR(2), 0); + SetTexPanOffset(15, 0, EVT_VAR(3), 0); + SetTexPanOffset(11, 0, EVT_VAR(4), 0); + SetTexPanOffset(10, 0, EVT_VAR(5), 0); + SetTexPanOffset(9, 0, EVT_VAR(5), 0); sleep 1; goto 0; } @@ -977,15 +977,15 @@ EvtSource N(80244058) = SCRIPT({ SetNpcPos(NPC_PARTNER, 65, 0, 50); sleep 30; AdjustCam(0, 8.0, 0, 300, 19.0, -8.5); - GetCurrentPartnerID(SI_VAR(0)); + GetCurrentPartnerID(EVT_VAR(0)); BringPartnerOut(8); - if (SI_VAR(0) != 8) { + if (EVT_VAR(0) != 8) { SetNpcJumpscale(NPC_PARTNER, 0.0); - GetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - SI_VAR(1) += 20; - SI_VAR(2) += 20; - SI_VAR(3) += 20; - NpcJump0(NPC_PARTNER, SI_VAR(1), SI_VAR(2), SI_VAR(3), 30); + GetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + EVT_VAR(1) += 20; + EVT_VAR(2) += 20; + EVT_VAR(3) += 20; + NpcJump0(NPC_PARTNER, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3), 30); } PlayerFaceNpc(-4, 0); NpcFacePlayer(NPC_PARTNER, 0); @@ -1008,9 +1008,9 @@ EvtSource N(80244270) = SCRIPT({ LoadPath(60, N(vectorList_80243F68), 5, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_FLYING_MAGIKOOPA, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_FLYING_MAGIKOOPA, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) != 1) { + if (EVT_VAR(0) != 1) { break loop; } } @@ -1023,9 +1023,9 @@ EvtSource N(80244270) = SCRIPT({ LoadPath(60, N(vectorList_80243FA4), 5, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_LAKITU0, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKITU0, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) != 1) { + if (EVT_VAR(0) != 1) { break loop; } } @@ -1036,9 +1036,9 @@ EvtSource N(80244270) = SCRIPT({ LoadPath(70, N(vectorList_80243FE0), 5, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_LAKITU1, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKITU1, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) != 1) { + if (EVT_VAR(0) != 1) { break loop; } } @@ -1049,9 +1049,9 @@ EvtSource N(80244270) = SCRIPT({ LoadPath(80, N(vectorList_8024401C), 5, 0); loop { GetNextPathPos(); - SetNpcPos(NPC_LAKITU2, SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetNpcPos(NPC_LAKITU2, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) != 1) { + if (EVT_VAR(0) != 1) { break loop; } } @@ -1059,37 +1059,37 @@ EvtSource N(80244270) = SCRIPT({ EvtSource N(802445D4) = SCRIPT({ sleep 5; - IsPlayerWithin(40, 0, 200, SI_VAR(0)); - if (SI_VAR(0) == 0) { - SI_VAR(3) = 45; + IsPlayerWithin(40, 0, 200, EVT_VAR(0)); + if (EVT_VAR(0) == 0) { + EVT_VAR(3) = 45; } else { - SI_VAR(3) = 25; + EVT_VAR(3) = 25; } - SI_VAR(4) = SI_VAR(3); - SI_VAR(4) += -5; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(2) > -61) { + EVT_VAR(4) = EVT_VAR(3); + EVT_VAR(4) += -5; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(2) > -61) { parallel { SetNpcFlagBits(NPC_LAKITU0, ((NPC_FLAG_100)), TRUE); - NpcMoveTo(NPC_LAKITU0, SI_VAR(0), 55, SI_VAR(3)); + NpcMoveTo(NPC_LAKITU0, EVT_VAR(0), 55, EVT_VAR(3)); } parallel { SetNpcFlagBits(NPC_LAKITU1, ((NPC_FLAG_100)), TRUE); - NpcMoveTo(NPC_LAKITU1, SI_VAR(0), 55, SI_VAR(3)); + NpcMoveTo(NPC_LAKITU1, EVT_VAR(0), 55, EVT_VAR(3)); } parallel { SetNpcFlagBits(NPC_LAKITU2, ((NPC_FLAG_100)), TRUE); - NpcMoveTo(NPC_LAKITU2, SI_VAR(0), 55, SI_VAR(3)); + NpcMoveTo(NPC_LAKITU2, EVT_VAR(0), 55, EVT_VAR(3)); } - sleep SI_VAR(4); + sleep EVT_VAR(4); } }); EvtSource N(80244774) = SCRIPT({ DisablePlayerInput(TRUE); DisablePartnerAI(0); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetNpcPos(NPC_PARTNER, 65, SI_VAR(1), 80); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetNpcPos(NPC_PARTNER, 65, EVT_VAR(1), 80); SetNpcYaw(NPC_PARTNER, 270); AdjustCam(0, 8.0, 0, 450, 17.0, -6.0); SpeakToPlayer(NPC_FLYING_MAGIKOOPA, NPC_ANIM_flying_magikoopa_Palette_02_Anim_9, NPC_ANIM_flying_magikoopa_Palette_02_Anim_1, 0, MESSAGE_ID(0x11, 0x00BB)); @@ -1097,15 +1097,15 @@ EvtSource N(80244774) = SCRIPT({ spawn N(80244270); sleep 80; AdjustCam(0, 8.0, 0, 300, 19.0, -8.5); - GetCurrentPartnerID(SI_VAR(0)); + GetCurrentPartnerID(EVT_VAR(0)); BringPartnerOut(8); - if (SI_VAR(0) != 8) { + if (EVT_VAR(0) != 8) { SetNpcJumpscale(NPC_PARTNER, 0.0); - GetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - SI_VAR(1) += 20; - SI_VAR(2) += 20; - SI_VAR(3) += 20; - NpcJump0(NPC_PARTNER, SI_VAR(1), SI_VAR(2), SI_VAR(3), 30); + GetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + EVT_VAR(1) += 20; + EVT_VAR(2) += 20; + EVT_VAR(3) += 20; + NpcJump0(NPC_PARTNER, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3), 30); } NpcFacePlayer(NPC_PARTNER, 0); DisablePartnerAI(0); @@ -1114,19 +1114,19 @@ EvtSource N(80244774) = SCRIPT({ sleep 20; PutPartnerAway(); ResetCam(0, 4.0); - SI_STORY_PROGRESS = STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS; + EVT_STORY_PROGRESS = STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS; DisablePlayerInput(FALSE); AwaitPlayerApproach(-250, 0, 50); DisablePlayerInput(TRUE); - GetCurrentPartnerID(SI_VAR(0)); + GetCurrentPartnerID(EVT_VAR(0)); BringPartnerOut(8); - if (SI_VAR(0) != 8) { + if (EVT_VAR(0) != 8) { SetNpcJumpscale(NPC_PARTNER, 0.0); - GetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); - SI_VAR(1) += 20; - SI_VAR(2) += 20; - SI_VAR(3) += 20; - NpcJump0(NPC_PARTNER, SI_VAR(1), SI_VAR(2), SI_VAR(3), 30); + GetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + EVT_VAR(1) += 20; + EVT_VAR(2) += 20; + EVT_VAR(3) += 20; + NpcJump0(NPC_PARTNER, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3), 30); } PlayerFaceNpc(-4, 0); NpcFacePlayer(NPC_PARTNER, 0); @@ -1140,17 +1140,17 @@ EvtSource N(80244774) = SCRIPT({ EvtSource N(idle_80244B3C) = SCRIPT({ loop { - GetSelfVar(0, SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetSelfVar(0, EVT_VAR(0)); + if (EVT_VAR(0) != 0) { break loop; } sleep 1; } DisablePlayerInput(TRUE); sleep 10; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 1000); SetCamPitch(0, 17.0, -6.0); SetCamSpeed(0, 4.0); @@ -1160,14 +1160,14 @@ EvtSource N(idle_80244B3C) = SCRIPT({ }); EvtSource N(defeat_80244C84) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { - GetSelfNpcID(SI_VAR(0)); - if (SI_VAR(0) == 3) { + GetSelfNpcID(EVT_VAR(0)); + if (EVT_VAR(0) == 3) { SetNpcPos(NPC_MAGIKOOPA, 0, -1000, 0); SetNpcPos(NPC_FLYING_MAGIKOOPA, -55, 15, 35); - GetNpcYaw(3, SI_VAR(0)); + GetNpcYaw(3, EVT_VAR(0)); SetNpcYaw(NPC_FLYING_MAGIKOOPA, 90); InterpPlayerYaw(180, 0); SetPlayerPos(30, 0, 80); @@ -1187,7 +1187,7 @@ EvtSource N(defeat_80244C84) = SCRIPT({ }); EvtSource N(80244E2C) = SCRIPT({ - match SI_MAP_VAR(10) { + match EVT_MAP_VAR(10) { == 0 { NpcFacePlayer(NPC_MAGIKOOPA, 1); } @@ -1204,7 +1204,7 @@ EvtSource N(80244E2C) = SCRIPT({ }); EvtSource N(80244ED0) = SCRIPT({ - match SI_MAP_VAR(10) { + match EVT_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)); InterpNpcYaw(NPC_MAGIKOOPA, 90, 0); @@ -1225,7 +1225,7 @@ EvtSource N(80244ED0) = SCRIPT({ }); EvtSource N(80245004) = SCRIPT({ - match SI_MAP_VAR(10) { + match EVT_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)); } @@ -1245,7 +1245,7 @@ EvtSource N(80245004) = SCRIPT({ }); EvtSource N(80245108) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { return; } DisablePlayerInput(TRUE); @@ -1253,10 +1253,10 @@ EvtSource N(80245108) = SCRIPT({ SetNpcFlagBits(NPC_PARTNER, ((NPC_FLAG_100)), TRUE); AdjustCam(0, 8.0, 0, 300, 17.0, -6.0); await N(80244E2C); - match SI_AREA_VAR(7) { + match EVT_AREA_VAR(7) { == 0 { await N(80244ED0); - SI_AREA_VAR(7) += 1; + EVT_AREA_VAR(7) += 1; ResetCam(0, 4.0); } == 1 { @@ -1268,53 +1268,53 @@ EvtSource N(80245108) = SCRIPT({ }); EvtSource N(80245228) = SCRIPT({ - if (SI_MAP_VAR(10) == -1) { - SI_MAP_VAR(10) = 0; + if (EVT_MAP_VAR(10) == -1) { + EVT_MAP_VAR(10) = 0; await N(80245108); - SI_MAP_VAR(10) = -1; + EVT_MAP_VAR(10) = -1; } }); EvtSource N(8024527C) = SCRIPT({ - if (SI_MAP_VAR(10) == -1) { - SI_MAP_VAR(10) = 1; + if (EVT_MAP_VAR(10) == -1) { + EVT_MAP_VAR(10) = 1; await N(80245108); - SI_MAP_VAR(10) = -1; + EVT_MAP_VAR(10) = -1; } }); EvtSource N(802452D0) = SCRIPT({ - if (SI_MAP_VAR(10) == -1) { - SI_MAP_VAR(10) = 2; + if (EVT_MAP_VAR(10) == -1) { + EVT_MAP_VAR(10) = 2; await N(80245108); - SI_MAP_VAR(10) = -1; + EVT_MAP_VAR(10) = -1; } }); EvtSource N(80245324) = SCRIPT({ - if (SI_MAP_VAR(10) == -1) { - SI_MAP_VAR(10) = 3; + if (EVT_MAP_VAR(10) == -1) { + EVT_MAP_VAR(10) = 3; await N(80245108); - SI_MAP_VAR(10) = -1; + EVT_MAP_VAR(10) = -1; } }); EvtSource N(80245378) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { return; } DisablePlayerInput(TRUE); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 8.0); SetCamPitch(0, 17.0, -6.0); SetCamDistance(0, 300); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); await N(80244E2C); - if (SI_AREA_VAR(7) == 0) { + if (EVT_AREA_VAR(7) == 0) { await N(80244ED0); - SI_AREA_VAR(7) += 1; + EVT_AREA_VAR(7) += 1; ResetCam(0, 4.0); } else { await N(80245004); @@ -1323,38 +1323,38 @@ EvtSource N(80245378) = 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)); + if (EVT_MAP_VAR(10) == -1) { + EVT_MAP_VAR(10) = 0; + GetNpcPos(NPC_MAGIKOOPA, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); await N(80245378); - SI_MAP_VAR(10) = -1; + EVT_MAP_VAR(10) = -1; } }); 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)); + if (EVT_MAP_VAR(10) == -1) { + EVT_MAP_VAR(10) = 1; + GetNpcPos(NPC_LAKITU0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); await N(80245378); - SI_MAP_VAR(10) = -1; + EVT_MAP_VAR(10) = -1; } }); 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)); + if (EVT_MAP_VAR(10) == -1) { + EVT_MAP_VAR(10) = 2; + GetNpcPos(NPC_LAKITU1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); await N(80245378); - SI_MAP_VAR(10) = -1; + EVT_MAP_VAR(10) = -1; } }); 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)); + if (EVT_MAP_VAR(10) == -1) { + EVT_MAP_VAR(10) = 3; + GetNpcPos(NPC_LAKITU2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); await N(80245378); - SI_MAP_VAR(10) = -1; + EVT_MAP_VAR(10) = -1; } }); @@ -1367,7 +1367,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 }; EvtSource N(802456D4) = SCRIPT({ - SI_MAP_VAR(10) = -1; + EVT_MAP_VAR(10) = -1; bind N(80245228) TRIGGER_WALL_HAMMER 23; bind N(80245228) TRIGGER_WALL_HAMMER 19; bind N(802454D4) TRIGGER_POINT_BOMB N(triggerCoord_802456A4); @@ -1379,33 +1379,33 @@ EvtSource N(802456D4) = SCRIPT({ }); EvtSource N(interact_802457D4) = SCRIPT({ - match SI_AREA_VAR(6) { + match EVT_AREA_VAR(6) { == 0 { - GetSelfNpcID(SI_VAR(0)); - if (SI_VAR(0) == 3) { + GetSelfNpcID(EVT_VAR(0)); + if (EVT_VAR(0) == 3) { SpeakToPlayer(NPC_SELF, NPC_ANIM_magikoopa_Palette_02_Anim_2, NPC_ANIM_magikoopa_Palette_02_Anim_1, 5, MESSAGE_ID(0x11, 0x00B6)); } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_lakitu_Palette_00_Anim_16, NPC_ANIM_lakitu_Palette_00_Anim_1, 5, MESSAGE_ID(0x11, 0x00BC)); } - SI_AREA_VAR(6) += 1; + EVT_AREA_VAR(6) += 1; } == 1 { - GetSelfNpcID(SI_VAR(0)); - if (SI_VAR(0) == 3) { + GetSelfNpcID(EVT_VAR(0)); + if (EVT_VAR(0) == 3) { SpeakToPlayer(NPC_SELF, NPC_ANIM_magikoopa_Palette_02_Anim_2, NPC_ANIM_magikoopa_Palette_02_Anim_1, 5, MESSAGE_ID(0x11, 0x00B7)); } else { SpeakToPlayer(NPC_SELF, NPC_ANIM_lakitu_Palette_00_Anim_16, NPC_ANIM_lakitu_Palette_00_Anim_1, 5, MESSAGE_ID(0x11, 0x00BD)); } - SI_AREA_VAR(6) += 1; + EVT_AREA_VAR(6) += 1; } == 2 { AdjustCam(0, 8.0, 0, 300, 19.0, -9.0); - GetSelfNpcID(SI_VAR(0)); - if (SI_VAR(0) == 3) { + GetSelfNpcID(EVT_VAR(0)); + if (EVT_VAR(0) == 3) { SpeakToPlayer(NPC_SELF, NPC_ANIM_magikoopa_Palette_02_Anim_2, NPC_ANIM_magikoopa_Palette_02_Anim_1, 5, MESSAGE_ID(0x11, 0x00B8)); NpcFacePlayer(NPC_SELF, 0); @@ -1430,7 +1430,7 @@ EvtSource N(interact_802457D4) = SCRIPT({ }); EvtSource N(init_80245AA8) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (EVT_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcIdle(NPC_SELF, N(idle_80244B3C)); BindNpcInteract(NPC_SELF, N(interact_802457D4)); BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); @@ -1440,7 +1440,7 @@ EvtSource N(init_80245AA8) = SCRIPT({ }); EvtSource N(init_80245B30) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (EVT_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); } else { SetNpcPos(NPC_SELF, 0, -1000, 0); @@ -1448,7 +1448,7 @@ EvtSource N(init_80245B30) = SCRIPT({ }); EvtSource N(init_80245B90) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (EVT_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcInteract(NPC_SELF, N(interact_802457D4)); BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); } else { @@ -1457,7 +1457,7 @@ EvtSource N(init_80245B90) = SCRIPT({ }); EvtSource N(init_80245C04) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (EVT_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcInteract(NPC_SELF, N(interact_802457D4)); BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); } else { @@ -1466,7 +1466,7 @@ EvtSource N(init_80245C04) = SCRIPT({ }); EvtSource N(init_80245C78) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (EVT_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcInteract(NPC_SELF, N(interact_802457D4)); BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); } else { diff --git a/src/world/area_flo/flo_19/CE36F0.c b/src/world/area_flo/flo_19/CE36F0.c index eb3fc9a527..d50091812d 100644 --- a/src/world/area_flo/flo_19/CE36F0.c +++ b/src/world/area_flo/flo_19/CE36F0.c @@ -19,14 +19,14 @@ MapConfig N(config) = { // Extraneous END_CASE_MULTI #ifdef NON_MATCHING EvtSource N(802409C0) = SCRIPT({ - GetEntryID(SI_VAR(0)); - match SI_VAR(0) { + GetEntryID(EVT_VAR(0)); + match EVT_VAR(0) { 0, 1 { SetMusicTrack(0, SONG_CLOUDY_CLIMB, 0, 8); } 2, 7 {} == 3 { - if (SI_AREA_FLAG(44) != 0) { + if (EVT_AREA_FLAG(44) != 0) { } else { FadeOutMusic(1, 3000); FadeInMusic(0, 50, 0, 3000, 0, 127); @@ -36,25 +36,25 @@ EvtSource N(802409C0) = SCRIPT({ }); #else 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) + EVT_CMD(EVT_OP_CALL, GetEntryID, EVT_VAR(0)), + EVT_CMD(EVT_OP_MATCH, EVT_VAR(0)), + EVT_CMD(EVT_OP_CASE_MULTI_OR_EQ, 0), + EVT_CMD(EVT_OP_CASE_MULTI_OR_EQ, 1), + EVT_CMD(EVT_OP_CALL, SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8), + EVT_CMD(EVT_OP_END_CASE_MULTI), + EVT_CMD(EVT_OP_CASE_MULTI_OR_EQ, 2), + EVT_CMD(EVT_OP_CASE_MULTI_OR_EQ, 7), + EVT_CMD(EVT_OP_END_CASE_MULTI), + EVT_CMD(EVT_OP_CASE_EQ, 3), + EVT_CMD(EVT_OP_IF_NE, EVT_AREA_FLAG(44), 0), + EVT_CMD(EVT_OP_ELSE), + EVT_CMD(EVT_OP_CALL, FadeOutMusic, 1, 3000), + EVT_CMD(EVT_OP_CALL, FadeInMusic, 0, 50, 0, 3000, 0, 127), + EVT_CMD(EVT_OP_END_IF), + EVT_CMD(EVT_OP_END_CASE_MULTI), + EVT_CMD(EVT_OP_END_MATCH), + EVT_CMD(EVT_OP_RETURN), + EVT_CMD(EVT_OP_END) }; #endif @@ -63,7 +63,7 @@ static s32 N(pad_ABC) = { }; EvtSource N(80240AC0) = SCRIPT({ - MakeItemEntity(ITEM_S_JUMP_CHG, -200, 160, -213, 17, SI_SAVE_FLAG(1391)); + MakeItemEntity(ITEM_S_JUMP_CHG, -200, 160, -213, 17, EVT_SAVE_FLAG(1391)); }); static s32 N(pad_AF4)[] = { @@ -72,10 +72,10 @@ static s32 N(pad_AF4)[] = { EvtSource N(updateTexturePan_80240B00) = SCRIPT({ group 0; - if (SI_VAR(5) == 1) { - if (SI_VAR(6) == 1) { - if (SI_VAR(7) == 1) { - if (SI_VAR(8) == 1) { + if (EVT_VAR(5) == 1) { + if (EVT_VAR(6) == 1) { + if (EVT_VAR(7) == 1) { + if (EVT_VAR(8) == 1) { N(UnkTexturePanFunc)(); return; } @@ -92,13 +92,13 @@ EvtSource N(80240BF8) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_CLOUDY_CLIMB; + EVT_WORLD_LOCATION = LOCATION_CLOUDY_CLIMB; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - SI_SAVE_FLAG(1985) = 1; + EVT_SAVE_FLAG(1985) = 1; await N(80240AC0); ParentColliderToModel(12, 86); HidePlayerShadow(TRUE); @@ -108,48 +108,48 @@ EvtSource N(main) = SCRIPT({ EnableTexPanning(17, 1); EnableTexPanning(18, 1); spawn { - SI_VAR(0) = 1; - SI_VAR(1) = -120; - SI_VAR(2) = 0; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 1; - SI_VAR(6) = 0; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 1; + EVT_VAR(1) = -120; + EVT_VAR(2) = 0; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 1; + EVT_VAR(6) = 0; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_80240B00); } spawn { - SI_VAR(0) = 2; - SI_VAR(1) = -90; - SI_VAR(2) = 0; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 1; - SI_VAR(6) = 0; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 2; + EVT_VAR(1) = -90; + EVT_VAR(2) = 0; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 1; + EVT_VAR(6) = 0; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_80240B00); } - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) != 3) { - SI_AREA_FLAG(44) = 0; + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) != 3) { + EVT_AREA_FLAG(44) = 0; } - match SI_VAR(0) { + match EVT_VAR(0) { == 0 { spawn N(80240BF8); } == 1 { ModifyColliderFlags(0, 1, 0x7FFFFE00); - SI_VAR(0) = N(80240BF8); + EVT_VAR(0) = N(80240BF8); spawn EnterWalk; } == 2 { @@ -162,7 +162,7 @@ EvtSource N(main) = SCRIPT({ } } await N(802409C0); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_8024030C_CE39FC)(); } }); @@ -173,119 +173,119 @@ static s32 N(pad_1044)[] = { EvtSource N(80241050) = SCRIPT({ group 239; - SI_VAR(15) = 0; + EVT_VAR(15) = 0; 0: - SI_VAR(0) = -215.4375; - SI_VAR(1) = 128.59375; - SI_VAR(2) = -200.0; - SI_VAR(1) += (float) SI_MAP_VAR(12); - TranslateGroup(28, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) = -79.859375; - N(func_80240340_CE3A30)(SI_VAR(15), SI_VAR(1), 5.0, 136.765625, 300, 0, 0); - SI_VAR(2) = -200.0; - SI_VAR(1) += (float) SI_MAP_VAR(13); - TranslateGroup(32, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) = -364.265625; - N(func_80240340_CE3A30)(SI_VAR(15), SI_VAR(1), 5.0, 106.765625, 300, 0, 0); - SI_VAR(2) = 10.0; - SI_VAR(1) += (float) SI_MAP_VAR(14); - TranslateGroup(36, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) = 295.734375; - N(func_80240340_CE3A30)(SI_VAR(15), SI_VAR(1), 65.0, 86.984375, 200, 0, 0); - SI_VAR(2) = -80.0; - SI_VAR(1) += (float) SI_MAP_VAR(15); - TranslateGroup(40, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - N(func_80240340_CE3A30)(SI_VAR(15), SI_VAR(2), 0.96875, 1.03125, 15, 0, 0); - N(func_80240340_CE3A30)(SI_VAR(15), SI_VAR(3), 1.03125, 0.96875, 15, 0, 0); - SI_VAR(0) = (float) SI_MAP_VAR(12); - SI_VAR(1) = (float) SI_MAP_VAR(12); - SI_VAR(0) *= -0.01953125; - SI_VAR(1) *= 0.0400390625; - SI_VAR(0) += (float) SI_VAR(2); - SI_VAR(1) += (float) SI_VAR(3); - ScaleGroup(28, SI_VAR(0), SI_VAR(1), 1); - SI_VAR(0) = (float) SI_MAP_VAR(13); - SI_VAR(1) = (float) SI_MAP_VAR(13); - SI_VAR(0) *= -0.01953125; - SI_VAR(1) *= 0.0400390625; - SI_VAR(0) += (float) SI_VAR(2); - SI_VAR(1) += (float) SI_VAR(3); - ScaleGroup(32, SI_VAR(0), SI_VAR(1), 1); - SI_VAR(0) = (float) SI_MAP_VAR(14); - SI_VAR(1) = (float) SI_MAP_VAR(14); - SI_VAR(0) *= -0.01953125; - SI_VAR(1) *= 0.0400390625; - SI_VAR(0) += (float) SI_VAR(2); - SI_VAR(1) += (float) SI_VAR(3); - ScaleGroup(36, SI_VAR(0), SI_VAR(1), 1); - SI_VAR(0) = (float) SI_MAP_VAR(15); - SI_VAR(1) = (float) SI_MAP_VAR(15); - SI_VAR(0) *= -0.01953125; - SI_VAR(1) *= 0.0400390625; - SI_VAR(0) += (float) SI_VAR(2); - SI_VAR(1) += (float) SI_VAR(3); - ScaleGroup(40, SI_VAR(0), SI_VAR(1), 1); + EVT_VAR(0) = -215.4375; + EVT_VAR(1) = 128.59375; + EVT_VAR(2) = -200.0; + EVT_VAR(1) += (float) EVT_MAP_VAR(12); + TranslateGroup(28, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) = -79.859375; + N(func_80240340_CE3A30)(EVT_VAR(15), EVT_VAR(1), 5.0, 136.765625, 300, 0, 0); + EVT_VAR(2) = -200.0; + EVT_VAR(1) += (float) EVT_MAP_VAR(13); + TranslateGroup(32, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) = -364.265625; + N(func_80240340_CE3A30)(EVT_VAR(15), EVT_VAR(1), 5.0, 106.765625, 300, 0, 0); + EVT_VAR(2) = 10.0; + EVT_VAR(1) += (float) EVT_MAP_VAR(14); + TranslateGroup(36, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) = 295.734375; + N(func_80240340_CE3A30)(EVT_VAR(15), EVT_VAR(1), 65.0, 86.984375, 200, 0, 0); + EVT_VAR(2) = -80.0; + EVT_VAR(1) += (float) EVT_MAP_VAR(15); + TranslateGroup(40, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + N(func_80240340_CE3A30)(EVT_VAR(15), EVT_VAR(2), 0.96875, 1.03125, 15, 0, 0); + N(func_80240340_CE3A30)(EVT_VAR(15), EVT_VAR(3), 1.03125, 0.96875, 15, 0, 0); + EVT_VAR(0) = (float) EVT_MAP_VAR(12); + EVT_VAR(1) = (float) EVT_MAP_VAR(12); + EVT_VAR(0) *= -0.01953125; + EVT_VAR(1) *= 0.0400390625; + EVT_VAR(0) += (float) EVT_VAR(2); + EVT_VAR(1) += (float) EVT_VAR(3); + ScaleGroup(28, EVT_VAR(0), EVT_VAR(1), 1); + EVT_VAR(0) = (float) EVT_MAP_VAR(13); + EVT_VAR(1) = (float) EVT_MAP_VAR(13); + EVT_VAR(0) *= -0.01953125; + EVT_VAR(1) *= 0.0400390625; + EVT_VAR(0) += (float) EVT_VAR(2); + EVT_VAR(1) += (float) EVT_VAR(3); + ScaleGroup(32, EVT_VAR(0), EVT_VAR(1), 1); + EVT_VAR(0) = (float) EVT_MAP_VAR(14); + EVT_VAR(1) = (float) EVT_MAP_VAR(14); + EVT_VAR(0) *= -0.01953125; + EVT_VAR(1) *= 0.0400390625; + EVT_VAR(0) += (float) EVT_VAR(2); + EVT_VAR(1) += (float) EVT_VAR(3); + ScaleGroup(36, EVT_VAR(0), EVT_VAR(1), 1); + EVT_VAR(0) = (float) EVT_MAP_VAR(15); + EVT_VAR(1) = (float) EVT_MAP_VAR(15); + EVT_VAR(0) *= -0.01953125; + EVT_VAR(1) *= 0.0400390625; + EVT_VAR(0) += (float) EVT_VAR(2); + EVT_VAR(1) += (float) EVT_VAR(3); + ScaleGroup(40, EVT_VAR(0), EVT_VAR(1), 1); UpdateColliderTransform(8); UpdateColliderTransform(9); UpdateColliderTransform(7); UpdateColliderTransform(10); - SI_VAR(15) += 1; - if (SI_VAR(15) >= 1200) { - SI_VAR(15) = 0; + EVT_VAR(15) += 1; + if (EVT_VAR(15) >= 1200) { + EVT_VAR(15) = 0; } - SI_VAR(0) = (float) SI_VAR(10); - SI_VAR(1) = (float) SI_VAR(11); - SI_VAR(2) = (float) SI_VAR(12); - SI_VAR(3) = (float) SI_VAR(13); - SI_VAR(0) *= -0.046875; - SI_VAR(1) *= -0.09375; - SI_VAR(2) *= -0.09375; - SI_VAR(3) *= -0.09375; - SI_MAP_VAR(12) += (float) SI_VAR(0); - SI_MAP_VAR(13) += (float) SI_VAR(1); - SI_MAP_VAR(14) += (float) SI_VAR(2); - SI_MAP_VAR(15) += (float) SI_VAR(3); - SI_MAP_VAR(12) *= 0.84375; - SI_MAP_VAR(13) *= 0.84375; - SI_MAP_VAR(14) *= 0.84375; - SI_MAP_VAR(15) *= 0.84375; - SI_VAR(10) += (float) SI_MAP_VAR(12); - SI_VAR(11) += (float) SI_MAP_VAR(13); - SI_VAR(12) += (float) SI_MAP_VAR(14); - SI_VAR(13) += (float) SI_MAP_VAR(15); + EVT_VAR(0) = (float) EVT_VAR(10); + EVT_VAR(1) = (float) EVT_VAR(11); + EVT_VAR(2) = (float) EVT_VAR(12); + EVT_VAR(3) = (float) EVT_VAR(13); + EVT_VAR(0) *= -0.046875; + EVT_VAR(1) *= -0.09375; + EVT_VAR(2) *= -0.09375; + EVT_VAR(3) *= -0.09375; + EVT_MAP_VAR(12) += (float) EVT_VAR(0); + EVT_MAP_VAR(13) += (float) EVT_VAR(1); + EVT_MAP_VAR(14) += (float) EVT_VAR(2); + EVT_MAP_VAR(15) += (float) EVT_VAR(3); + EVT_MAP_VAR(12) *= 0.84375; + EVT_MAP_VAR(13) *= 0.84375; + EVT_MAP_VAR(14) *= 0.84375; + EVT_MAP_VAR(15) *= 0.84375; + EVT_VAR(10) += (float) EVT_MAP_VAR(12); + EVT_VAR(11) += (float) EVT_MAP_VAR(13); + EVT_VAR(12) += (float) EVT_MAP_VAR(14); + EVT_VAR(13) += (float) EVT_MAP_VAR(15); sleep 1; goto 0; }); EvtSource N(80241650) = SCRIPT({ spawn { - SI_MAP_VAR(12) += -1.5; + EVT_MAP_VAR(12) += -1.5; sleep 1; - SI_MAP_VAR(12) += -1.5; + EVT_MAP_VAR(12) += -1.5; } }); EvtSource N(8024169C) = SCRIPT({ spawn { - SI_MAP_VAR(13) += -1.5; + EVT_MAP_VAR(13) += -1.5; sleep 1; - SI_MAP_VAR(13) += -1.5; + EVT_MAP_VAR(13) += -1.5; } }); EvtSource N(802416E8) = SCRIPT({ spawn { - SI_MAP_VAR(14) += -1.5; + EVT_MAP_VAR(14) += -1.5; sleep 1; - SI_MAP_VAR(14) += -1.5; + EVT_MAP_VAR(14) += -1.5; } }); EvtSource N(80241734) = SCRIPT({ spawn { - SI_MAP_VAR(15) += -1.5; + EVT_MAP_VAR(15) += -1.5; sleep 1; - SI_MAP_VAR(15) += -1.5; + EVT_MAP_VAR(15) += -1.5; } }); @@ -304,21 +304,21 @@ EvtSource N(80241780) = SCRIPT({ bind N(802416E8) TRIGGER_FLOOR_TOUCH 7; bind N(80241734) TRIGGER_FLOOR_TOUCH 10; spawn { - SI_VAR(15) = 0; + EVT_VAR(15) = 0; 0: - N(func_80240340_CE3A30)(SI_VAR(15), SI_VAR(0), 0.96875, 1.03125, 15, 0, 0); - N(func_80240340_CE3A30)(SI_VAR(15), SI_VAR(1), 1.03125, 0.96875, 15, 0, 0); - ScaleModel(70, SI_VAR(1), SI_VAR(0), 1); - ScaleModel(60, SI_VAR(1), SI_VAR(0), 1); - ScaleModel(64, SI_VAR(0), SI_VAR(1), 1); - ScaleModel(68, SI_VAR(0), SI_VAR(1), 1); - ScaleModel(66, SI_VAR(0), SI_VAR(1), 1); - ScaleModel(58, SI_VAR(1), SI_VAR(0), 1); - ScaleModel(62, SI_VAR(0), SI_VAR(1), 1); - ScaleModel(72, SI_VAR(0), SI_VAR(1), 1); - SI_VAR(15) += 1; - if (SI_VAR(15) >= 30) { - SI_VAR(15) = 0; + N(func_80240340_CE3A30)(EVT_VAR(15), EVT_VAR(0), 0.96875, 1.03125, 15, 0, 0); + N(func_80240340_CE3A30)(EVT_VAR(15), EVT_VAR(1), 1.03125, 0.96875, 15, 0, 0); + ScaleModel(70, EVT_VAR(1), EVT_VAR(0), 1); + ScaleModel(60, EVT_VAR(1), EVT_VAR(0), 1); + ScaleModel(64, EVT_VAR(0), EVT_VAR(1), 1); + ScaleModel(68, EVT_VAR(0), EVT_VAR(1), 1); + ScaleModel(66, EVT_VAR(0), EVT_VAR(1), 1); + ScaleModel(58, EVT_VAR(1), EVT_VAR(0), 1); + ScaleModel(62, EVT_VAR(0), EVT_VAR(1), 1); + ScaleModel(72, EVT_VAR(0), EVT_VAR(1), 1); + EVT_VAR(15) += 1; + if (EVT_VAR(15) >= 30) { + EVT_VAR(15) = 0; } sleep 1; goto 0; @@ -330,47 +330,47 @@ static s32 N(pad_1A68)[] = { }; EvtSource N(80241A70) = SCRIPT({ - SI_VAR(0) = 0; + EVT_VAR(0) = 0; 10: N(func_80240784_CE3E74)(); - SI_VAR(0) += 25; + EVT_VAR(0) += 25; sleep 1; - if (SI_VAR(0) < 255) { + if (EVT_VAR(0) < 255) { goto 10; } - SI_VAR(0) = 255; + EVT_VAR(0) = 255; N(func_80240784_CE3E74)(); sleep 1; }); EvtSource N(80241B10) = SCRIPT({ - SI_VAR(0) = 255; + EVT_VAR(0) = 255; 10: N(func_80240784_CE3E74)(); - SI_VAR(0) -= 25; + EVT_VAR(0) -= 25; sleep 1; - if (SI_VAR(0) > 0) { + if (EVT_VAR(0) > 0) { goto 10; } - SI_VAR(0) = 0; + EVT_VAR(0) = 0; N(func_80240784_CE3E74)(); sleep 1; }); 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); - SI_VAR(1) *= -12.0; - RotateGroup(79, SI_VAR(1), 0, 1, 0); - RotateGroup(92, SI_VAR(1), 0, 1, 0); + TranslateGroup(79, 0, EVT_VAR(0), 0); + TranslateGroup(92, 0, EVT_VAR(0), 0); + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) *= -12.0; + RotateGroup(79, EVT_VAR(1), 0, 1, 0); + RotateGroup(92, EVT_VAR(1), 0, 1, 0); }); 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); + TranslateGroup(84, 0, EVT_VAR(0), 0); + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) *= -12.0; + RotateGroup(84, EVT_VAR(1), 0, 1, 0); }); EvtSource N(80241CC4) = SCRIPT({ @@ -396,17 +396,17 @@ EvtSource N(80241CC4) = SCRIPT({ EnableGroup(48, 0); EnableGroup(57, 0); EnableGroup(74, 0); - SI_VAR(9) = (int) 45.0; - SI_VAR(10) = (int) 28.0; - SI_VAR(11) = (int) 5.0; - SI_VAR(12) = (int) 60.0; - SI_VAR(13) = (int) 28.0; - SI_VAR(14) = (int) 10.0; + EVT_VAR(9) = (int) 45.0; + EVT_VAR(10) = (int) 28.0; + EVT_VAR(11) = (int) 5.0; + EVT_VAR(12) = (int) 60.0; + EVT_VAR(13) = (int) 28.0; + EVT_VAR(14) = (int) 10.0; spawn { sleep 5; SetNpcAnimation(NPC_PARTNER, 0x106); SetPlayerAnimation(ANIM_WALKING); - match SI_AREA_FLAG(16) { + match EVT_AREA_FLAG(16) { == 0 { InterpPlayerYaw(90, 0); InterpNpcYaw(NPC_PARTNER, 90, 0); @@ -420,11 +420,11 @@ EvtSource N(80241CC4) = SCRIPT({ TranslateModel(86, 1.3134765625, 3.0, -0.56640625); UpdateColliderTransform(12); spawn { - SI_AREA_FLAG(45) = 0; + EVT_AREA_FLAG(45) = 0; SetPlayerAnimation(ANIM_WALKING); sleep 200; await N(80241A70); - SI_AREA_FLAG(45) = 1; + EVT_AREA_FLAG(45) = 1; sleep 10; EnableGroup(2, 1); EnableGroup(13, 1); @@ -442,25 +442,25 @@ EvtSource N(80241CC4) = SCRIPT({ WaitForCam(0, 1.0); await N(80241B10); sleep 20; - SI_AREA_FLAG(45) = 0; + EVT_AREA_FLAG(45) = 0; } - SI_VAR(15) = 0; + EVT_VAR(15) = 0; loop 344 { - SI_VAR(15) += 1; - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(0), -210, 0, 344, 0, 0); - SI_VAR(1) = (float) SI_VAR(0); - SI_VAR(1) *= -3.0; - TranslateModel(86, 1.3134765625, SI_VAR(0), -0.56640625); - RotateModel(86, SI_VAR(1), 0, 1, 0); + EVT_VAR(15) += 1; + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(0), -210, 0, 344, 0, 0); + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) *= -3.0; + TranslateModel(86, 1.3134765625, EVT_VAR(0), -0.56640625); + RotateModel(86, EVT_VAR(1), 0, 1, 0); UpdateColliderTransform(12); - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(2) *= -3.0; - SI_VAR(3) = (float) SI_VAR(0); + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(2) *= -3.0; + EVT_VAR(3) = (float) EVT_VAR(0); N(func_80240540_CE3C30)(); N(func_80240660_CE3D50)(); 11: sleep 1; - if (SI_AREA_FLAG(45) == 1) { + if (EVT_AREA_FLAG(45) == 1) { goto 11; } } @@ -473,7 +473,7 @@ EvtSource N(80241CC4) = SCRIPT({ SetPlayerActionState(10); InterpPlayerYaw(90, 0); sleep 5; - SI_AREA_FLAG(44) = 0; + EVT_AREA_FLAG(44) = 0; StopSound(412); await N(802409C0); ResetCam(0, 1.0); @@ -481,47 +481,47 @@ EvtSource N(80241CC4) = SCRIPT({ }); EvtSource N(802423F8) = SCRIPT({ - if (SI_AREA_FLAG(44) == 0) { + if (EVT_AREA_FLAG(44) == 0) { DisablePlayerInput(TRUE); func_802D2B6C(); sleep 15; DisablePartnerAI(0); - SI_AREA_FLAG(44) = 1; + EVT_AREA_FLAG(44) = 1; ModifyColliderFlags(0, 13, 0x7FFFFE00); ModifyColliderFlags(0, 5, 0x7FFFFE00); - SI_VAR(9) = (int) 45.0; - SI_VAR(10) = (int) 28.0; - SI_VAR(11) = (int) 5.0; - SI_VAR(12) = (int) 60.0; - SI_VAR(13) = (int) 28.0; - SI_VAR(14) = (int) 10.0; - PlayerMoveTo(SI_VAR(9), SI_VAR(11), 8); + EVT_VAR(9) = (int) 45.0; + EVT_VAR(10) = (int) 28.0; + EVT_VAR(11) = (int) 5.0; + EVT_VAR(12) = (int) 60.0; + EVT_VAR(13) = (int) 28.0; + EVT_VAR(14) = (int) 10.0; + PlayerMoveTo(EVT_VAR(9), EVT_VAR(11), 8); SetNpcJumpscale(NPC_PARTNER, 0.0); - NpcJump0(NPC_PARTNER, SI_VAR(12), SI_VAR(13), SI_VAR(14), 5); + NpcJump0(NPC_PARTNER, EVT_VAR(12), EVT_VAR(13), EVT_VAR(14), 5); PlaySound(0x19D); SetMusicTrack(0, SONG_MAGIC_BEANSTALK, 1, 8); SetNpcAnimation(NPC_PARTNER, 0x106); SetPlayerAnimation(ANIM_WALKING); - N(func_802404D0_CE3BC0)(SI_VAR(3), SI_VAR(4)); - match SI_VAR(4) { + N(func_802404D0_CE3BC0)(EVT_VAR(3), EVT_VAR(4)); + match EVT_VAR(4) { < 90 { - SI_AREA_FLAG(16) = 0; + EVT_AREA_FLAG(16) = 0; InterpPlayerYaw(90, 0); InterpNpcYaw(NPC_PARTNER, 90, 0); } >= 270 { - SI_AREA_FLAG(16) = 1; + EVT_AREA_FLAG(16) = 1; InterpPlayerYaw(270, 0); InterpNpcYaw(NPC_PARTNER, 270, 0); } } TranslateModel(86, 1.3134765625, 3.0, -0.56640625); UpdateColliderTransform(12); - SI_MAP_VAR(10) = 0; + EVT_MAP_VAR(10) = 0; spawn { - SI_AREA_FLAG(45) = 0; + EVT_AREA_FLAG(45) = 0; sleep 120; - SI_AREA_FLAG(45) = 1; + EVT_AREA_FLAG(45) = 1; sleep 20; await N(80241A70); sleep 10; @@ -540,36 +540,36 @@ EvtSource N(802423F8) = SCRIPT({ SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); - SI_AREA_FLAG(45) = 0; + EVT_AREA_FLAG(45) = 0; await N(80241B10); } spawn { - SI_VAR(15) = 0; + EVT_VAR(15) = 0; loop 344 { - SI_VAR(15) += 1; - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(0), 0, -210, 344, 0, 0); - SI_VAR(1) = (float) SI_VAR(0); - SI_VAR(1) *= -3.0; - TranslateModel(86, 1.3134765625, SI_VAR(0), -0.56640625); - RotateModel(86, SI_VAR(1), 0, 1, 0); + EVT_VAR(15) += 1; + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(0), 0, -210, 344, 0, 0); + EVT_VAR(1) = (float) EVT_VAR(0); + EVT_VAR(1) *= -3.0; + TranslateModel(86, 1.3134765625, EVT_VAR(0), -0.56640625); + RotateModel(86, EVT_VAR(1), 0, 1, 0); UpdateColliderTransform(12); - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(2) *= -3.0; - SI_VAR(3) = (float) SI_VAR(0); + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(2) *= -3.0; + EVT_VAR(3) = (float) EVT_VAR(0); N(func_80240540_CE3C30)(); N(func_80240660_CE3D50)(); - if (SI_VAR(15) == 300) { - SI_MAP_VAR(10) = 1; + if (EVT_VAR(15) == 300) { + EVT_MAP_VAR(10) = 1; } 11: sleep 1; - if (SI_AREA_FLAG(45) == 1) { + if (EVT_AREA_FLAG(45) == 1) { goto 11; } } } 10: - if (SI_MAP_VAR(10) == 0) { + if (EVT_MAP_VAR(10) == 0) { sleep 1; goto 10; } @@ -600,12 +600,12 @@ EvtSource N(80242A2C) = SCRIPT({ SetCamPosB(0, 0, 0); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); - SI_VAR(15) = 100; - SI_MAP_VAR(11) = SI_VAR(15); - SI_AREA_FLAG(40) = 0; + EVT_VAR(15) = 100; + EVT_MAP_VAR(11) = EVT_VAR(15); + EVT_AREA_FLAG(40) = 0; loop 400 { - if (SI_AREA_FLAG(40) == 0) { - if (SI_MAP_VAR(11) > 400) { + if (EVT_AREA_FLAG(40) == 0) { + if (EVT_MAP_VAR(11) > 400) { EnableGroup(85, 0); EnableGroup(92, 0); EnableGroup(2, 1); @@ -621,7 +621,7 @@ EvtSource N(80242A2C) = SCRIPT({ SetCamPosB(0, 0, 0); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); - SI_VAR(15) = 150; + EVT_VAR(15) = 150; spawn { sleep 5; EnableGroup(85, 1); @@ -632,25 +632,25 @@ EvtSource N(80242A2C) = SCRIPT({ sleep 10; PlayEffect(0xA, 0, 22, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - SI_AREA_FLAG(40) = 1; + EVT_AREA_FLAG(40) = 1; } } - SI_VAR(15) += 1; - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(0), -350, 0, 400, 0, 0); - SI_MAP_VAR(11) = (float) SI_VAR(15); - SI_MAP_VAR(11) *= 1.6005859375; - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(2) *= 1.0; - SI_VAR(0) = (float) SI_VAR(2); + EVT_VAR(15) += 1; + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(0), -350, 0, 400, 0, 0); + EVT_MAP_VAR(11) = (float) EVT_VAR(15); + EVT_MAP_VAR(11) *= 1.6005859375; + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(2) *= 1.0; + EVT_VAR(0) = (float) EVT_VAR(2); spawn N(80241BB0); - SI_VAR(2) = (float) SI_VAR(0); - SI_VAR(2) *= 1.0; - SI_VAR(0) = (float) SI_VAR(2); + EVT_VAR(2) = (float) EVT_VAR(0); + EVT_VAR(2) *= 1.0; + EVT_VAR(0) = (float) EVT_VAR(2); spawn N(80241C58); sleep 1; } sleep 15; - SI_STORY_PROGRESS = STORY_CH6_GREW_MAGIC_BEANSTALK; + EVT_STORY_PROGRESS = STORY_CH6_GREW_MAGIC_BEANSTALK; GotoMap("flo_00", 7); }); diff --git a/src/world/area_flo/flo_21/CE6700.c b/src/world/area_flo/flo_21/CE6700.c index 64a9e4f6d8..9882e1eb4f 100644 --- a/src/world/area_flo/flo_21/CE6700.c +++ b/src/world/area_flo/flo_21/CE6700.c @@ -94,7 +94,7 @@ MapConfig N(config) = { }; EvtSource N(80240D40) = SCRIPT({ - if (SI_STORY_PROGRESS == STORY_CH6_DEFEATED_HUFF_N_PUFF) { + if (EVT_STORY_PROGRESS == STORY_CH6_DEFEATED_HUFF_N_PUFF) { FadeOutMusic(0, 500); } else { SetMusicTrack(0, SONG_CLOUDY_CLIMB, 0, 8); @@ -114,7 +114,7 @@ ApiStatus N(func_8024004C_CE674C)(Evt* script, s32 isInitialCall) { if (isInitialCall) { N(Unk_effect_struct)* ptr = (N(Unk_effect_struct)*)heap_malloc(sizeof(N(Unk_effect_struct))); script->varTable[0] = ptr; - set_variable(NULL, SI_MAP_VAR(1), ptr); + set_variable(NULL, EVT_MAP_VAR(1), ptr); ptr->unk_38 = get_variable(script, *args++); ptr->unk_3C = get_variable(script, *args++); ptr->unk_0C = get_float_variable(script, *args++); @@ -282,10 +282,10 @@ ApiStatus N(func_80240708_CE6E08)(Evt* script, s32 isInitialCall) { EvtSource N(80240DA0) = SCRIPT({ group 0; - if (SI_VAR(5) == 1) { - if (SI_VAR(6) == 1) { - if (SI_VAR(7) == 1) { - if (SI_VAR(8) == 1) { + if (EVT_VAR(5) == 1) { + if (EVT_VAR(6) == 1) { + if (EVT_VAR(7) == 1) { + if (EVT_VAR(8) == 1) { N(UnkTexturePanFunc)(); return; } @@ -296,31 +296,31 @@ EvtSource N(80240DA0) = SCRIPT({ }); EvtSource N(80240E3C) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { == STORY_CH6_GREW_MAGIC_BEANSTALK { - SI_VAR(0) = 0; - if (SI_MAP_VAR(10) == 0) { + EVT_VAR(0) = 0; + if (EVT_MAP_VAR(10) == 0) { return; } - SI_STORY_PROGRESS = STORY_CH6_DEFEATED_HUFF_N_PUFF; + EVT_STORY_PROGRESS = STORY_CH6_DEFEATED_HUFF_N_PUFF; } == STORY_CH6_DEFEATED_HUFF_N_PUFF { - SI_VAR(0) = 1; + EVT_VAR(0) = 1; } else { return; } } - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { DisablePlayerInput(TRUE); UseSettingsFrom(0, 650, 205, 0); SetCamSpeed(0, 0.6005859375); SetPanTarget(0, 650, 150, 0); - GetCamDistance(0, SI_VAR(1)); - SI_VAR(1) -= 100; - SetCamDistance(0, SI_VAR(1)); + GetCamDistance(0, EVT_VAR(1)); + EVT_VAR(1) -= 100; + SetCamDistance(0, EVT_VAR(1)); if (-5.5 != 10000) { - GetCamPitch(0, SI_VAR(2), SI_VAR(3)); - SetCamPitch(0, SI_VAR(2), -5.5); + GetCamPitch(0, EVT_VAR(2), EVT_VAR(3)); + SetCamPitch(0, EVT_VAR(2), -5.5); } PanToTarget(0, 0, 1); N(func_8024004C_CE674C)(5, 180, 650, 170, 0, 650, 205, 0, 150, 120); @@ -348,14 +348,14 @@ EvtSource N(80240E3C) = SCRIPT({ sleep 80; SetPlayerAnimation(ANIM_10002); } - SI_VAR(1) += 100; - SetCamDistance(0, SI_VAR(1)); + EVT_VAR(1) += 100; + SetCamDistance(0, EVT_VAR(1)); SetPanTarget(0, 650, 120, 0); N(func_802405BC_CE6CBC)(2); - GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4)); - UseSettingsFrom(0, SI_VAR(2), SI_VAR(3), SI_VAR(4)); + GetPlayerPos(EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + UseSettingsFrom(0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); SetCamSpeed(0, 1.0); - SetPanTarget(0, SI_VAR(2), SI_VAR(3), SI_VAR(4)); + SetPanTarget(0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); DisablePlayerInput(FALSE); @@ -369,7 +369,7 @@ EvtSource N(80240E3C) = SCRIPT({ N(func_802405BC_CE6CBC)(3); PlaySoundAtPlayer(312, 0); DisablePlayerInput(TRUE); - SI_STORY_PROGRESS = STORY_CH6_STAR_SPIRIT_RESCUED; + EVT_STORY_PROGRESS = STORY_CH6_STAR_SPIRIT_RESCUED; GotoMapSpecial("kmr_23", 5, 14); sleep 100; }); @@ -381,7 +381,7 @@ EvtSource N(80241350) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_CLOUDY_CLIMB; + EVT_WORLD_LOCATION = LOCATION_CLOUDY_CLIMB; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -393,12 +393,12 @@ EvtSource N(main) = SCRIPT({ spawn N(80241600); ModifyColliderFlags(3, 5, 0x00000007); ModifyColliderFlags(3, 7, 0x00000007); - GetEntryID(SI_VAR(0)); + GetEntryID(EVT_VAR(0)); ModifyColliderFlags(0, 1, 0x7FFFFE00); - SI_VAR(0) = N(80241350); + EVT_VAR(0) = N(80241350); spawn EnterWalk; await N(80240D40); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240B00_CE7200)(); } spawn N(80240E3C); @@ -406,53 +406,53 @@ EvtSource N(main) = SCRIPT({ s32 N(D_802414FC_CE7BFC)[] = { 0, - SI_FIXED(1), SI_FIXED(1), SI_FIXED(1), - SI_FIXED(1), SI_FIXED(1), SI_FIXED(1), - SI_FIXED(1.1005859375), SI_FIXED(1.1005859375), SI_FIXED(1.1005859375), - SI_FIXED(1.1005859375), SI_FIXED(1.1005859375), SI_FIXED(1.1005859375), - SI_FIXED(1), SI_FIXED(1), SI_FIXED(1), - SI_FIXED(1), SI_FIXED(1), SI_FIXED(1), - SI_FIXED(0.900390625), SI_FIXED(0.900390625), SI_FIXED(0.900390625), - SI_FIXED(0.900390625), SI_FIXED(0.900390625), SI_FIXED(0.900390625), + EVT_FIXED(1), EVT_FIXED(1), EVT_FIXED(1), + EVT_FIXED(1), EVT_FIXED(1), EVT_FIXED(1), + EVT_FIXED(1.1005859375), EVT_FIXED(1.1005859375), EVT_FIXED(1.1005859375), + EVT_FIXED(1.1005859375), EVT_FIXED(1.1005859375), EVT_FIXED(1.1005859375), + EVT_FIXED(1), EVT_FIXED(1), EVT_FIXED(1), + EVT_FIXED(1), EVT_FIXED(1), EVT_FIXED(1), + EVT_FIXED(0.900390625), EVT_FIXED(0.900390625), EVT_FIXED(0.900390625), + EVT_FIXED(0.900390625), EVT_FIXED(0.900390625), EVT_FIXED(0.900390625), }; EvtSource N(80241560) = SCRIPT({ - SI_MAP_VAR(0) += -1.5; + EVT_MAP_VAR(0) += -1.5; }); EvtSource N(80241580) = SCRIPT({ - SI_MAP_VAR(1) += -1.5; + EVT_MAP_VAR(1) += -1.5; }); EvtSource N(802415A0) = SCRIPT({ - SI_MAP_VAR(2) += -1.5; + EVT_MAP_VAR(2) += -1.5; }); EvtSource N(802415C0) = SCRIPT({ - SI_MAP_VAR(3) += -1.5; + EVT_MAP_VAR(3) += -1.5; }); EvtSource N(802415E0) = SCRIPT({ - SI_MAP_VAR(4) += -1.5; + EVT_MAP_VAR(4) += -1.5; }); EvtSource N(80241600) = SCRIPT({ spawn { - SI_VAR(15) = 0; + EVT_VAR(15) = 0; 0: - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(0), 0.96875, 1.03125, 15, 0, 0); - N(UnkFloatFunc)(SI_VAR(15), SI_VAR(1), 1.03125, 0.96875, 15, 0, 0); - ScaleModel(88, SI_VAR(1), SI_VAR(0), 1); - ScaleModel(90, SI_VAR(1), SI_VAR(0), 1); - ScaleModel(92, SI_VAR(0), SI_VAR(1), 1); - ScaleModel(94, SI_VAR(0), SI_VAR(1), 1); - ScaleModel(96, SI_VAR(0), SI_VAR(1), 1); - ScaleModel(98, SI_VAR(1), SI_VAR(0), 1); - ScaleModel(100, SI_VAR(0), SI_VAR(1), 1); - ScaleModel(102, SI_VAR(0), SI_VAR(1), 1); - SI_VAR(15) += 1; - if (SI_VAR(15) >= 30) { - SI_VAR(15) = 0; + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(0), 0.96875, 1.03125, 15, 0, 0); + N(UnkFloatFunc)(EVT_VAR(15), EVT_VAR(1), 1.03125, 0.96875, 15, 0, 0); + ScaleModel(88, EVT_VAR(1), EVT_VAR(0), 1); + ScaleModel(90, EVT_VAR(1), EVT_VAR(0), 1); + ScaleModel(92, EVT_VAR(0), EVT_VAR(1), 1); + ScaleModel(94, EVT_VAR(0), EVT_VAR(1), 1); + ScaleModel(96, EVT_VAR(0), EVT_VAR(1), 1); + ScaleModel(98, EVT_VAR(1), EVT_VAR(0), 1); + ScaleModel(100, EVT_VAR(0), EVT_VAR(1), 1); + ScaleModel(102, EVT_VAR(0), EVT_VAR(1), 1); + EVT_VAR(15) += 1; + if (EVT_VAR(15) >= 30) { + EVT_VAR(15) = 0; } sleep 1; goto 0; @@ -534,9 +534,9 @@ EvtSource N(80241920) = SCRIPT({ LoadPath(30, N(vectorList_8024189C), 3, 0); 0: GetNextPathPos(); - SetPlayerPos(SI_VAR(1), SI_VAR(2), SI_VAR(3)); + SetPlayerPos(EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; - if (SI_VAR(0) == 1) { + if (EVT_VAR(0) == 1) { goto 0; } } @@ -544,15 +544,15 @@ EvtSource N(80241920) = SCRIPT({ }); EvtSource N(80241B98) = SCRIPT({ - if (SI_STORY_PROGRESS >= STORY_CH6_DEFEATED_HUFF_N_PUFF) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DEFEATED_HUFF_N_PUFF) { return; } AwaitPlayerApproach(650, 0, 30); DisablePlayerInput(TRUE); SetMusicTrack(0, SONG_HUFF_N_PUFF_THEME, 0, 8); - SI_VAR(9) = spawn N(802418C0); - GetCurrentPartner(SI_VAR(0)); - if (SI_VAR(0) != 0) { + EVT_VAR(9) = spawn N(802418C0); + GetCurrentPartner(EVT_VAR(0)); + if (EVT_VAR(0) != 0) { func_802D2B6C(); sleep 20; } @@ -561,37 +561,37 @@ EvtSource N(80241B98) = SCRIPT({ sleep 5; SetPlayerAnimation(ANIM_1002B); SetNpcFlagBits(NPC_HUFF_N_PUFF1, ((NPC_FLAG_100)), TRUE); - GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4)); - UseSettingsFrom(0, SI_VAR(2), SI_VAR(3), SI_VAR(4)); - SetPanTarget(0, SI_VAR(2), SI_VAR(3), SI_VAR(4)); + GetPlayerPos(EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + UseSettingsFrom(0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + SetPanTarget(0, EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); - MakeLerp(SI_VAR(2), 600, 20, 0); - SI_VAR(2) = SI_VAR(3); - SI_VAR(5) = SI_VAR(3); - SI_VAR(5) += 15; + MakeLerp(EVT_VAR(2), 600, 20, 0); + EVT_VAR(2) = EVT_VAR(3); + EVT_VAR(5) = EVT_VAR(3); + EVT_VAR(5) += 15; loop { UpdateLerp(); - SI_VAR(3) += 3; - SetPlayerPos(SI_VAR(0), SI_VAR(3), SI_VAR(4)); - if (SI_VAR(3) > SI_VAR(5)) { - SI_VAR(3) = SI_VAR(2); + EVT_VAR(3) += 3; + SetPlayerPos(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4)); + if (EVT_VAR(3) > EVT_VAR(5)) { + EVT_VAR(3) = EVT_VAR(2); } sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } - SetPanTarget(0, SI_VAR(0), SI_VAR(2), SI_VAR(4)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(2), EVT_VAR(4)); } func_802D2C14(1); - SetPlayerPos(SI_VAR(0), SI_VAR(2), SI_VAR(4)); + SetPlayerPos(EVT_VAR(0), EVT_VAR(2), EVT_VAR(4)); SetNpcFlagBits(NPC_HUFF_N_PUFF1, ((NPC_FLAG_100)), FALSE); DisablePlayerPhysics(FALSE); sleep 10; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 25; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 25; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 300.0); SetCamPitch(0, 17.0, -9.0); SetCamSpeed(0, 4.0); @@ -610,34 +610,34 @@ EvtSource N(80241B98) = SCRIPT({ PanToTarget(0, 0, 1); func_802D2C14(0); sleep 10; - GetCurrentPartnerID(SI_VAR(0)); - if (SI_VAR(0) != 8) { + GetCurrentPartnerID(EVT_VAR(0)); + if (EVT_VAR(0) != 8) { ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x00CC), 630, 120, 0); } else { ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x00CD), 630, 120, 0); } parallel { sleep 15; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += 25; - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += 25; + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamPitch(0, 17.0, -6.0); - SI_VAR(3) = 40; + EVT_VAR(3) = 40; loop 5 { - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 400.0); - SetCamSpeed(0, SI_VAR(3)); + SetCamSpeed(0, EVT_VAR(3)); WaitForCam(0, 1.0); - SI_VAR(3) -= 10; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_VAR(3) -= 10; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 600.0); - SetCamSpeed(0, SI_VAR(3)); + SetCamSpeed(0, EVT_VAR(3)); WaitForCam(0, 1.0); - SI_VAR(3) += 7; + EVT_VAR(3) += 7; } } await N(80241920); - kill SI_VAR(9); + kill EVT_VAR(9); sleep 30; SetNpcVar(0, 0, 1); DisablePlayerInput(FALSE); @@ -645,38 +645,38 @@ EvtSource N(80241B98) = SCRIPT({ }); EvtSource N(80242290) = SCRIPT({ - SI_VAR(0) = 0.9501953125; - SI_VAR(1) = 1.1005859375; + EVT_VAR(0) = 0.9501953125; + EVT_VAR(1) = 1.1005859375; 0: - match SI_MAP_VAR(13) { + match EVT_MAP_VAR(13) { == 0 { - SI_VAR(3) = 10; - SI_VAR(2) = 2; + EVT_VAR(3) = 10; + EVT_VAR(2) = 2; } == 1 { - SI_VAR(3) = 5; - SI_VAR(2) = 1; + EVT_VAR(3) = 5; + EVT_VAR(2) = 1; } else { return; } } - SI_VAR(4) = SI_VAR(3); - loop SI_VAR(4) { - SetNpcScale(NPC_HUFF_N_PUFF0, SI_VAR(0), SI_VAR(1), 1); - SetNpcScale(NPC_HUFF_N_PUFF1, SI_VAR(0), SI_VAR(1), 1); - SetNpcScale(NPC_HUFF_N_PUFF2, SI_VAR(0), SI_VAR(1), 1); - SI_VAR(0) += 0.015625; - SI_VAR(1) -= 0.0107421875; - sleep SI_VAR(2); + EVT_VAR(4) = EVT_VAR(3); + loop EVT_VAR(4) { + SetNpcScale(NPC_HUFF_N_PUFF0, EVT_VAR(0), EVT_VAR(1), 1); + SetNpcScale(NPC_HUFF_N_PUFF1, EVT_VAR(0), EVT_VAR(1), 1); + SetNpcScale(NPC_HUFF_N_PUFF2, EVT_VAR(0), EVT_VAR(1), 1); + EVT_VAR(0) += 0.015625; + EVT_VAR(1) -= 0.0107421875; + sleep EVT_VAR(2); } - SI_VAR(4) = SI_VAR(3); - loop SI_VAR(4) { - SetNpcScale(NPC_HUFF_N_PUFF0, SI_VAR(0), SI_VAR(1), 1); - SetNpcScale(NPC_HUFF_N_PUFF1, SI_VAR(0), SI_VAR(1), 1); - SetNpcScale(NPC_HUFF_N_PUFF2, SI_VAR(0), SI_VAR(1), 1); - SI_VAR(0) -= 0.015625; - SI_VAR(1) += 0.0107421875; - sleep SI_VAR(2); + EVT_VAR(4) = EVT_VAR(3); + loop EVT_VAR(4) { + SetNpcScale(NPC_HUFF_N_PUFF0, EVT_VAR(0), EVT_VAR(1), 1); + SetNpcScale(NPC_HUFF_N_PUFF1, EVT_VAR(0), EVT_VAR(1), 1); + SetNpcScale(NPC_HUFF_N_PUFF2, EVT_VAR(0), EVT_VAR(1), 1); + EVT_VAR(0) -= 0.015625; + EVT_VAR(1) += 0.0107421875; + sleep EVT_VAR(2); } goto 0; }); @@ -713,30 +713,30 @@ s32 N(intTable_8024262C)[] = { }; EvtSource N(8024263C) = SCRIPT({ - SI_VAR(0) = (float) 10; - SI_VAR(1) = (float) 1; + EVT_VAR(0) = (float) 10; + EVT_VAR(1) = (float) 1; parallel { loop 8 { SetNpcFlagBits(NPC_HUFF_N_PUFF0, ((0x00000002)), FALSE); SetNpcFlagBits(NPC_HUFF_N_PUFF1, ((0x00000002)), FALSE); SetNpcFlagBits(NPC_HUFF_N_PUFF2, ((0x00000002)), FALSE); - sleep SI_VAR(0); + sleep EVT_VAR(0); SetNpcFlagBits(NPC_HUFF_N_PUFF0, ((0x00000002)), TRUE); SetNpcFlagBits(NPC_HUFF_N_PUFF1, ((0x00000002)), TRUE); SetNpcFlagBits(NPC_HUFF_N_PUFF2, ((0x00000002)), TRUE); - sleep SI_VAR(1); - SI_VAR(0) -= (float) 0; - SI_VAR(1) += (float) 0; + sleep EVT_VAR(1); + EVT_VAR(0) -= (float) 0; + EVT_VAR(1) += (float) 0; } loop { SetNpcFlagBits(NPC_HUFF_N_PUFF0, ((0x00000002)), FALSE); SetNpcFlagBits(NPC_HUFF_N_PUFF1, ((0x00000002)), FALSE); SetNpcFlagBits(NPC_HUFF_N_PUFF2, ((0x00000002)), FALSE); - sleep SI_VAR(0); + sleep EVT_VAR(0); SetNpcFlagBits(NPC_HUFF_N_PUFF0, ((0x00000002)), TRUE); SetNpcFlagBits(NPC_HUFF_N_PUFF1, ((0x00000002)), TRUE); SetNpcFlagBits(NPC_HUFF_N_PUFF2, ((0x00000002)), TRUE); - sleep SI_VAR(1); + sleep EVT_VAR(1); } } parallel { @@ -744,11 +744,11 @@ EvtSource N(8024263C) = SCRIPT({ MakeLerp(0, 255, 10, 4); loop { UpdateLerp(); - func_802CFD30(NPC_HUFF_N_PUFF0, 9, SI_VAR(0), SI_VAR(0), SI_VAR(0), 0); - func_802CFD30(NPC_HUFF_N_PUFF1, 9, SI_VAR(0), SI_VAR(0), SI_VAR(0), 0); - func_802CFD30(NPC_HUFF_N_PUFF2, 9, SI_VAR(0), SI_VAR(0), SI_VAR(0), 0); + func_802CFD30(NPC_HUFF_N_PUFF0, 9, EVT_VAR(0), EVT_VAR(0), EVT_VAR(0), 0); + func_802CFD30(NPC_HUFF_N_PUFF1, 9, EVT_VAR(0), EVT_VAR(0), EVT_VAR(0), 0); + func_802CFD30(NPC_HUFF_N_PUFF2, 9, EVT_VAR(0), EVT_VAR(0), EVT_VAR(0), 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -758,20 +758,20 @@ EvtSource N(8024263C) = SCRIPT({ }); EvtSource N(80242918) = SCRIPT({ - SI_MAP_VAR(11) = 1.0; - SI_MAP_VAR(12) = 1.0; + EVT_MAP_VAR(11) = 1.0; + EVT_MAP_VAR(12) = 1.0; parallel { buf_use N(intTable_8024258C); loop 6 { PlaySoundAtNpc(NPC_HUFF_N_PUFF0, 0x20B6, 0); - buf_read SI_VAR(6) SI_VAR(7) SI_VAR(8); - MakeLerp(SI_VAR(6), SI_VAR(7), SI_VAR(8), 11); + buf_read EVT_VAR(6) EVT_VAR(7) EVT_VAR(8); + MakeLerp(EVT_VAR(6), EVT_VAR(7), EVT_VAR(8), 11); loop { UpdateLerp(); - SI_VAR(0) /= (float) 10; - SI_MAP_VAR(11) = (float) SI_VAR(0); + EVT_VAR(0) /= (float) 10; + EVT_MAP_VAR(11) = (float) EVT_VAR(0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -781,14 +781,14 @@ EvtSource N(80242918) = SCRIPT({ buf_use N(intTable_802425D4); loop 2 { PlaySoundAtNpc(NPC_HUFF_N_PUFF0, 0x20B6, 0); - buf_read SI_VAR(6) SI_VAR(7); - MakeLerp(SI_VAR(6), SI_VAR(7), 4, 11); + buf_read EVT_VAR(6) EVT_VAR(7); + MakeLerp(EVT_VAR(6), EVT_VAR(7), 4, 11); loop { UpdateLerp(); - SI_VAR(0) /= (float) 10; - SI_MAP_VAR(11) = (float) SI_VAR(0); + EVT_VAR(0) /= (float) 10; + EVT_MAP_VAR(11) = (float) EVT_VAR(0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -798,14 +798,14 @@ EvtSource N(80242918) = SCRIPT({ parallel { buf_use N(intTable_802425E4); loop 6 { - buf_read SI_VAR(6) SI_VAR(7) SI_VAR(8); - MakeLerp(SI_VAR(6), SI_VAR(7), SI_VAR(8), 11); + buf_read EVT_VAR(6) EVT_VAR(7) EVT_VAR(8); + MakeLerp(EVT_VAR(6), EVT_VAR(7), EVT_VAR(8), 11); loop { UpdateLerp(); - SI_VAR(0) /= (float) 10; - SI_MAP_VAR(12) = (float) SI_VAR(0); + EVT_VAR(0) /= (float) 10; + EVT_MAP_VAR(12) = (float) EVT_VAR(0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -814,14 +814,14 @@ EvtSource N(80242918) = SCRIPT({ loop { buf_use N(intTable_8024262C); loop 2 { - buf_read SI_VAR(6) SI_VAR(7); - MakeLerp(SI_VAR(6), SI_VAR(7), 4, 11); + buf_read EVT_VAR(6) EVT_VAR(7); + MakeLerp(EVT_VAR(6), EVT_VAR(7), 4, 11); loop { UpdateLerp(); - SI_VAR(0) /= (float) 10; - SI_MAP_VAR(12) = (float) SI_VAR(0); + EVT_VAR(0) /= (float) 10; + EVT_MAP_VAR(12) = (float) EVT_VAR(0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } @@ -829,65 +829,65 @@ EvtSource N(80242918) = SCRIPT({ } } loop 100 { - SetNpcScale(NPC_HUFF_N_PUFF0, SI_MAP_VAR(11), SI_MAP_VAR(12), 1); - SetNpcScale(NPC_HUFF_N_PUFF1, SI_MAP_VAR(11), SI_MAP_VAR(12), 1); - SetNpcScale(NPC_HUFF_N_PUFF2, SI_MAP_VAR(11), SI_MAP_VAR(12), 1); + SetNpcScale(NPC_HUFF_N_PUFF0, EVT_MAP_VAR(11), EVT_MAP_VAR(12), 1); + SetNpcScale(NPC_HUFF_N_PUFF1, EVT_MAP_VAR(11), EVT_MAP_VAR(12), 1); + SetNpcScale(NPC_HUFF_N_PUFF2, EVT_MAP_VAR(11), EVT_MAP_VAR(12), 1); sleep 1; } }); EvtSource N(80242D34) = SCRIPT({ parallel { - SI_VAR(1) = 0; + EVT_VAR(1) = 0; loop { - SI_VAR(0) = 3; + EVT_VAR(0) = 3; loop 15 { - SetNpcRotation(SI_VAR(0), 0, SI_VAR(1), 0); - SI_VAR(0) += 1; + SetNpcRotation(EVT_VAR(0), 0, EVT_VAR(1), 0); + EVT_VAR(0) += 1; } - SI_VAR(1) += 60; - if (SI_VAR(1) > 360) { - SI_VAR(1) += -360; + EVT_VAR(1) += 60; + if (EVT_VAR(1) > 360) { + EVT_VAR(1) += -360; } sleep 1; } } buf_use N(intTable_8024249C); - SI_VAR(8) = 3; + EVT_VAR(8) = 3; loop 14 { - buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3) SI_VAR(4); + buf_read EVT_VAR(1) EVT_VAR(2) EVT_VAR(3) EVT_VAR(4); spawn { - RandInt(5, SI_VAR(5)); - sleep SI_VAR(5); - SetNpcPos(SI_VAR(8), SI_VAR(1), SI_VAR(2), -30); - RandInt(2, SI_VAR(5)); - SI_VAR(5) += 8; - PlaySoundAtNpc(SI_VAR(8), 0x3D5, 0); - NpcJump0(SI_VAR(8), SI_VAR(3), SI_VAR(4), -15, SI_VAR(5)); - SetNpcPos(SI_VAR(8), 0, -1000, 0); + RandInt(5, EVT_VAR(5)); + sleep EVT_VAR(5); + SetNpcPos(EVT_VAR(8), EVT_VAR(1), EVT_VAR(2), -30); + RandInt(2, EVT_VAR(5)); + EVT_VAR(5) += 8; + PlaySoundAtNpc(EVT_VAR(8), 0x3D5, 0); + NpcJump0(EVT_VAR(8), EVT_VAR(3), EVT_VAR(4), -15, EVT_VAR(5)); + SetNpcPos(EVT_VAR(8), 0, -1000, 0); } - SI_VAR(8) += 1; + EVT_VAR(8) += 1; } SetNpcPos(NPC_HUFF_N_PUFF0, 0, -1000, 0); SetNpcPos(NPC_HUFF_N_PUFF1, 0, -1000, 0); SetNpcPos(NPC_HUFF_N_PUFF2, 0, -1000, 0); - buf_read SI_VAR(1) SI_VAR(2) SI_VAR(3) SI_VAR(4); + buf_read EVT_VAR(1) EVT_VAR(2) EVT_VAR(3) EVT_VAR(4); sleep 5; - SetNpcPos(SI_VAR(8), SI_VAR(1), SI_VAR(2), -30); - PlaySoundAtNpc(SI_VAR(8), 0x3D6, 0); - NpcJump0(SI_VAR(8), SI_VAR(3), SI_VAR(4), -15, 10); - SetNpcPos(SI_VAR(8), 0, -1000, 0); + SetNpcPos(EVT_VAR(8), EVT_VAR(1), EVT_VAR(2), -30); + PlaySoundAtNpc(EVT_VAR(8), 0x3D6, 0); + NpcJump0(EVT_VAR(8), EVT_VAR(3), EVT_VAR(4), -15, 10); + SetNpcPos(EVT_VAR(8), 0, -1000, 0); }); 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); - GetNpcPos(NPC_HUFF_N_PUFF0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(0) += -15; - SI_VAR(2) += 40; - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_HUFF_N_PUFF0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(0) += -15; + EVT_VAR(2) += 40; + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 350.0); SetCamPitch(0, 17.0, -5.5); SetCamSpeed(0, 90.0); @@ -895,30 +895,30 @@ EvtSource N(80243010) = SCRIPT({ WaitForCam(0, 1.0); SpeakToPlayer(NPC_HUFF_N_PUFF0, NPC_ANIM_huff_n_puff_Palette_00_Anim_30, NPC_ANIM_huff_n_puff_Palette_00_Anim_5, 256, -30, 30, MESSAGE_ID(0x11, 0x00CE)); FadeOutMusic(0, 1500); - SI_MAP_VAR(13) = 2; - GetNpcPos(NPC_HUFF_N_PUFF0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + EVT_MAP_VAR(13) = 2; + GetNpcPos(NPC_HUFF_N_PUFF0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); spawn { - SI_VAR(3) = SI_VAR(0); - SI_VAR(4) = SI_VAR(0); - SI_VAR(3) += -35; - SI_VAR(4) += 35; + EVT_VAR(3) = EVT_VAR(0); + EVT_VAR(4) = EVT_VAR(0); + EVT_VAR(3) += -35; + EVT_VAR(4) += 35; loop 3 { - PlayEffect(0x19, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x19, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); sleep 12; - PlayEffect(0x19, 0, SI_VAR(3), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - SI_VAR(3) += 7; + PlayEffect(0x19, 0, EVT_VAR(3), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(3) += 7; sleep 8; - PlayEffect(0x19, 0, SI_VAR(4), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); - SI_VAR(4) += -7; + PlayEffect(0x19, 0, EVT_VAR(4), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(4) += -7; sleep 14; } - PlayEffect(0x19, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); + PlayEffect(0x19, 2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); ShakeCam(0, 0, 30, 1.5); } spawn { sleep 30; loop 10 { - PlayEffect(0x3A, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2), 40, 65, 12, 15, 0, 0, 0, 0, 0); + PlayEffect(0x3A, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 40, 65, 12, 15, 0, 0, 0, 0, 0); sleep 7; } } @@ -932,30 +932,30 @@ EvtSource N(idle_80243428) = SCRIPT({ 0: SetSelfVar(0, 0); loop { - GetSelfVar(0, SI_VAR(0)); - if (SI_VAR(0) != 0) { + GetSelfVar(0, EVT_VAR(0)); + if (EVT_VAR(0) != 0) { break loop; } sleep 1; } - SI_MAP_VAR(13) = 1; + EVT_MAP_VAR(13) = 1; StartBossBattle(14); goto 0; }); EvtSource N(defeat_802434D8) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { SetEncounterStatusFlags(1, 1); SetNpcYaw(NPC_PARTNER, 90); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(3)); - GetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(3) += -20; - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(3)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(3)); + GetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(3) += -20; + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(3)); await N(80243010); sleep 50; - SI_MAP_VAR(10) = 1; + EVT_MAP_VAR(10) = 1; spawn N(80240E3C); } } @@ -966,7 +966,7 @@ EvtSource N(defeat_802435D4) = SCRIPT({ }); EvtSource N(init_802435E4) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { + if (EVT_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { SetEnemyFlagBits(-1, 4194304, 1); BindNpcIdle(NPC_SELF, N(idle_80243428)); BindNpcDefeat(NPC_SELF, N(defeat_802434D8)); @@ -977,7 +977,7 @@ EvtSource N(init_802435E4) = SCRIPT({ }); EvtSource N(init_80243684) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { + if (EVT_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { SetEnemyFlagBits(-1, 4194304, 1); BindNpcDefeat(NPC_SELF, N(defeat_802435D4)); SetNpcAnimation(NPC_SELF, NPC_ANIM_huff_n_puff_Palette_00_Anim_1); @@ -988,7 +988,7 @@ EvtSource N(init_80243684) = SCRIPT({ }); EvtSource N(init_8024371C) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { + if (EVT_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { SetEnemyFlagBits(-1, 4194304, 1); BindNpcDefeat(NPC_SELF, N(defeat_802435D4)); SetNpcAnimation(NPC_SELF, NPC_ANIM_huff_n_puff_Palette_00_Anim_19); diff --git a/src/world/area_flo/flo_22/CEC240.c b/src/world/area_flo/flo_22/CEC240.c index e5e3d02453..0a0c9162ba 100644 --- a/src/world/area_flo/flo_22/CEC240.c +++ b/src/world/area_flo/flo_22/CEC240.c @@ -21,7 +21,7 @@ MapConfig N(config) = { }; EvtSource N(802402E0) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -37,7 +37,7 @@ EvtSource N(802403AC) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -46,13 +46,13 @@ EvtSource N(main) = SCRIPT({ MakeNpcs(0, N(npcGroupList_80240DE4)); spawn N(80241F6C); spawn N(80241528); - GetEntryID(SI_VAR(0)); + GetEntryID(EVT_VAR(0)); ModifyColliderFlags(0, 1, 0x7FFFFE00); - SI_VAR(0) = N(802403AC); + EVT_VAR(0) = N(802403AC); spawn EnterWalk; spawn N(80240E24); await N(802402E0); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CEC240)(); } }); @@ -68,13 +68,13 @@ NpcSettings N(npcSettings_80240520) = { }; EvtSource N(idle_8024054C) = SCRIPT({ - SI_MAP_VAR(10) = 0; + EVT_MAP_VAR(10) = 0; loop { - match SI_MAP_VAR(10) { + match EVT_MAP_VAR(10) { == 0 {} == 1 { SetPlayerAnimation(0x1002E); - SI_MAP_VAR(10) = 0; + EVT_MAP_VAR(10) = 0; StartBattle(); } } @@ -83,8 +83,8 @@ EvtSource N(idle_8024054C) = SCRIPT({ }); EvtSource N(defeat_802405E4) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { spawn { sleep 25; @@ -113,13 +113,13 @@ EvtSource N(init_80240740) = SCRIPT({ }); EvtSource N(idle_80240778) = SCRIPT({ - SI_MAP_VAR(11) = 0; + EVT_MAP_VAR(11) = 0; loop { - match SI_MAP_VAR(11) { + match EVT_MAP_VAR(11) { == 0 {} == 1 { SetPlayerAnimation(0x1002E); - SI_MAP_VAR(11) = 0; + EVT_MAP_VAR(11) = 0; StartBattle(); } } @@ -128,8 +128,8 @@ EvtSource N(idle_80240778) = SCRIPT({ }); EvtSource N(defeat_80240810) = SCRIPT({ - GetBattleOutcome(SI_VAR(0)); - match SI_VAR(0) { + GetBattleOutcome(EVT_VAR(0)); + match EVT_VAR(0) { == 0 { spawn { sleep 25; @@ -259,23 +259,23 @@ EvtSource N(80240E24) = SCRIPT({ EvtSource N(80240E84) = SCRIPT({ SetPlayerAnimation(0x6000E); spawn { - GetPlayerPos(SI_VAR(2), SI_VAR(3), SI_VAR(4)); - SI_VAR(6) = 35; - SI_VAR(5) = 5; - MakeItemEntity(SI_VAR(8), SI_VAR(2), SI_VAR(6), 0, 1, 0); - SI_VAR(7) = SI_VAR(0); - MakeLerp(SI_VAR(2), 35, 20, 5); + GetPlayerPos(EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); + EVT_VAR(6) = 35; + EVT_VAR(5) = 5; + MakeItemEntity(EVT_VAR(8), EVT_VAR(2), EVT_VAR(6), 0, 1, 0); + EVT_VAR(7) = EVT_VAR(0); + MakeLerp(EVT_VAR(2), 35, 20, 5); loop { UpdateLerp(); - SetItemPos(SI_VAR(7), SI_VAR(0), SI_VAR(6), 0); - SI_VAR(6) += SI_VAR(5); - SI_VAR(5) += -1; + SetItemPos(EVT_VAR(7), EVT_VAR(0), EVT_VAR(6), 0); + EVT_VAR(6) += EVT_VAR(5); + EVT_VAR(5) += -1; sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } - RemoveItemEntity(SI_VAR(7)); + RemoveItemEntity(EVT_VAR(7)); } sleep 10; PlaySoundAt(0x302, 0, 35, 0, 0); @@ -290,20 +290,20 @@ EvtSource N(80241028) = SCRIPT({ ShowConsumableChoicePopup(); CloseChoicePopup(); DisablePlayerInput(TRUE); - SI_VAR(8) = SI_VAR(0); - match SI_VAR(8) { + EVT_VAR(8) = EVT_VAR(0); + match EVT_VAR(8) { <= -1 {} <= 0 { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x015C), 160, 40); } == 158 { await N(80240E84); - RemoveItemAt(SI_VAR(1)); - if (SI_SAVE_FLAG(1395) == 0) { + RemoveItemAt(EVT_VAR(1)); + if (EVT_SAVE_FLAG(1395) == 0) { ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x00DD), 35, 35, 0); - SI_SAVE_FLAG(1395) = 1; - MakeItemEntity(ITEM_FLOWER_SAVER_B, -35, 0, 0, 0, SI_SAVE_FLAG(1392)); - SI_VAR(7) = SI_VAR(0); + EVT_SAVE_FLAG(1395) = 1; + MakeItemEntity(ITEM_FLOWER_SAVER_B, -35, 0, 0, 0, EVT_SAVE_FLAG(1392)); + EVT_VAR(7) = EVT_VAR(0); SetNpcFlagBits(NPC_BZZAP, ((0x00000002)), TRUE); SetNpcFlagBits(NPC_BZZAP, ((NPC_FLAG_HAS_SHADOW)), FALSE); SetNpcPos(NPC_BZZAP, 35, 0, 0); @@ -314,8 +314,8 @@ EvtSource N(80241028) = SCRIPT({ NpcJump0(NPC_BZZAP, -83, 0, 0, 8); } loop 53 { - GetNpcPos(NPC_BZZAP, SI_VAR(1), SI_VAR(2), SI_VAR(3)); - SetItemPos(SI_VAR(7), SI_VAR(1), SI_VAR(2), SI_VAR(3)); + GetNpcPos(NPC_BZZAP, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); + SetItemPos(EVT_VAR(7), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3)); sleep 1; } SetNpcPos(NPC_BZZAP, 0, -1000, 0); @@ -326,10 +326,10 @@ EvtSource N(80241028) = SCRIPT({ } } else { await N(80240E84); - RemoveItemAt(SI_VAR(1)); + RemoveItemAt(EVT_VAR(1)); ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x00DC), 35, 35, 0); - RandInt(1, SI_VAR(1)); - if (SI_VAR(1) == 0) { + RandInt(1, EVT_VAR(1)); + if (EVT_VAR(1) == 0) { SetNpcJumpscale(NPC_BZZAP, 0.0); NpcFacePlayer(NPC_BZZAP, 0); sleep 1; @@ -338,18 +338,18 @@ EvtSource N(80241028) = SCRIPT({ NpcJump0(NPC_BZZAP, 30, 60, 0, 20); sleep 10; SetNpcAnimation(NPC_BZZAP, NPC_ANIM_bzzap_Palette_00_Anim_4); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; - NpcJump0(NPC_BZZAP, SI_VAR(0), SI_VAR(1), SI_VAR(2), 5); - SI_MAP_VAR(10) = 1; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; + NpcJump0(NPC_BZZAP, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 5); + EVT_MAP_VAR(10) = 1; } else { SetNpcPos(NPC_DAYZEE, 30, 0, 0); SetNpcAnimation(NPC_DAYZEE, NPC_ANIM_dayzee_Palette_00_Anim_E); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += 20; + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += 20; SetNpcJumpscale(NPC_DAYZEE, 2.0); - NpcJump0(NPC_DAYZEE, SI_VAR(0), SI_VAR(1), SI_VAR(2), 20); - SI_MAP_VAR(11) = 1; + NpcJump0(NPC_DAYZEE, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 20); + EVT_MAP_VAR(11) = 1; } } } @@ -358,8 +358,8 @@ EvtSource N(80241028) = 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)); + if (EVT_SAVE_FLAG(1395) == 1) { + MakeItemEntity(ITEM_FLOWER_SAVER_B, -83, 0, 0, 0, EVT_SAVE_FLAG(1392)); } }); diff --git a/src/world/area_flo/flo_22/CEC290.c b/src/world/area_flo/flo_22/CEC290.c index cd881c1cee..895f75e5e9 100644 --- a/src/world/area_flo/flo_22/CEC290.c +++ b/src/world/area_flo/flo_22/CEC290.c @@ -25,10 +25,10 @@ ShakeTreeConfig N(tree2) = { Vec4f N(triggerCoord_80241F5C) = { 150.0f, 0.0f, 135.0f, 0.0f }; EvtSource N(80241F6C) = SCRIPT({ - SI_VAR(0) = N(tree1); + EVT_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 14; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80241F28); - SI_VAR(0) = N(tree2); + EVT_VAR(0) = N(tree2); bind N(shakeTree) TRIGGER_WALL_HAMMER 16; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80241F5C); }); diff --git a/src/world/area_flo/flo_23/CEE2A0.c b/src/world/area_flo/flo_23/CEE2A0.c index ccb9293dcf..edc9151602 100644 --- a/src/world/area_flo/flo_23/CEE2A0.c +++ b/src/world/area_flo/flo_23/CEE2A0.c @@ -29,7 +29,7 @@ MapConfig N(config) = { }; EvtSource N(80240D30) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -40,40 +40,40 @@ EvtSource N(80240D30) = SCRIPT({ EvtSource N(80240DA0) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -87,7 +87,7 @@ EvtSource N(80241104) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -95,18 +95,18 @@ EvtSource N(main) = SCRIPT({ SetCamEnabled(0, 1); MakeNpcs(0, N(npcGroupList_80242568)); await N(makeEntities); - SI_VAR(0) = -290; - SI_VAR(1) = -190; - SI_VAR(2) = 480; - SI_VAR(3) = -90; - SI_VAR(4) = 0; + EVT_VAR(0) = -290; + EVT_VAR(1) = -190; + EVT_VAR(2) = 480; + EVT_VAR(3) = -90; + EVT_VAR(4) = 0; spawn N(80240DA0); ModifyColliderFlags(0, 1, 0x7FFFFE00); ModifyColliderFlags(0, 5, 0x7FFFFE00); - SI_VAR(0) = N(80241104); + EVT_VAR(0) = N(80241104); spawn EnterWalk; await N(80240D30); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CEE260)(); } }); @@ -130,32 +130,32 @@ s32 N(D_80241310_CEF570) = { }; EvtSource N(80241314) = SCRIPT({ - SI_VAR(9) = SI_VAR(1); + EVT_VAR(9) = EVT_VAR(1); ShowConsumableChoicePopup(); - SI_VAR(10) = SI_VAR(0); - match SI_VAR(0) { + EVT_VAR(10) = EVT_VAR(0); + match EVT_VAR(0) { == 0 {} == -1 {} else { - RemoveItemAt(SI_VAR(1)); - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - N(AddPlayerHandsOffset)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - MakeItemEntity(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5), 1, 0); + RemoveItemAt(EVT_VAR(1)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(AddPlayerHandsOffset)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + MakeItemEntity(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1, 0); SetPlayerAnimation(0x60005); sleep 30; SetPlayerAnimation(ANIM_10002); - RemoveItemEntity(SI_VAR(0)); + RemoveItemEntity(EVT_VAR(0)); } } - N(func_802402C0_CEE520)(SI_VAR(10)); + N(func_802402C0_CEE520)(EVT_VAR(10)); CloseChoicePopup(); unbind; }); EvtSource N(80241448) = SCRIPT({ - N(func_802402F8_CEE558)(SI_VAR(0)); + N(func_802402F8_CEE558)(EVT_VAR(0)); bind_padlock N(80241314) 0x10 0 0x802426E0; // TODO: fix raw ptr - N(func_8024026C_CEE4CC)(SI_VAR(0)); + N(func_8024026C_CEE4CC)(EVT_VAR(0)); }); NpcAISettings N(npcAISettings_80241498) = { @@ -190,10 +190,10 @@ NpcSettings N(npcSettings_80241538) = { 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)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + if (EVT_SAVE_FLAG(1365) == 0) { + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 350); SetCamPitch(0, 18.5, -7.5); SetCamSpeed(0, 4.0); @@ -203,23 +203,23 @@ EvtSource N(interact_80241564) = SCRIPT({ MESSAGE_ID(0x11, 0x0049)); SetPlayerAnimation(ANIM_THINKING); N(func_80240C9C_CEEEFC)(); - SI_VAR(0) = N(D_80242850); - SI_VAR(1) = 2; + EVT_VAR(0) = N(D_80242850); + EVT_VAR(1) = 2; await N(80241448); - match SI_VAR(0) { + match EVT_VAR(0) { <= 0 { SetPlayerAnimation(ANIM_STAND_STILL); SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_00_Anim_2, NPC_ANIM_gate_flower_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x004A)); } else { - SI_VAR(8) = SI_VAR(0); - N(func_80240C2C_CEEE8C)(SI_VAR(0)); - MakeItemEntity(SI_VAR(8), 385, 20, -34, 1, 0); - SI_VAR(7) = SI_VAR(0); + EVT_VAR(8) = EVT_VAR(0); + N(func_80240C2C_CEEE8C)(EVT_VAR(0)); + MakeItemEntity(EVT_VAR(8), 385, 20, -34, 1, 0); + EVT_VAR(7) = EVT_VAR(0); PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2095, 0); SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_00_Anim_3); sleep 20; - RemoveItemEntity(SI_VAR(7)); - match SI_VAR(8) { + RemoveItemEntity(EVT_VAR(7)); + match EVT_VAR(8) { == 158 { SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_00_Anim_4, NPC_ANIM_gate_flower_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x004D)); PlaySoundAtNpc(NPC_SELF, 0x21C, 0); @@ -230,23 +230,23 @@ EvtSource N(interact_80241564) = SCRIPT({ MakeLerp(0, 100, 30, 1); loop { UpdateLerp(); - SI_VAR(8) = (float) SI_VAR(0); - SI_VAR(9) = (float) SI_VAR(0); - SI_VAR(8) *= 0.5; - SI_VAR(9) *= 1.2001953125; - RotateModel(59, SI_VAR(8), 0, -1, 0); - RotateModel(60, SI_VAR(8), 0, -1, 0); - RotateModel(61, SI_VAR(8), 0, -1, 0); - RotateModel(55, SI_VAR(9), 0, 1, 0); - RotateModel(56, SI_VAR(9), 0, 1, 0); - RotateModel(57, SI_VAR(9), 0, 1, 0); + EVT_VAR(8) = (float) EVT_VAR(0); + EVT_VAR(9) = (float) EVT_VAR(0); + EVT_VAR(8) *= 0.5; + EVT_VAR(9) *= 1.2001953125; + RotateModel(59, EVT_VAR(8), 0, -1, 0); + RotateModel(60, EVT_VAR(8), 0, -1, 0); + RotateModel(61, EVT_VAR(8), 0, -1, 0); + RotateModel(55, EVT_VAR(9), 0, 1, 0); + RotateModel(56, EVT_VAR(9), 0, 1, 0); + RotateModel(57, EVT_VAR(9), 0, 1, 0); sleep 1; - if (SI_VAR(1) != 1) { + if (EVT_VAR(1) != 1) { break loop; } } SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_00_Anim_5); - SI_SAVE_FLAG(1365) = 1; + EVT_SAVE_FLAG(1365) = 1; } == 159 { SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_00_Anim_4, NPC_ANIM_gate_flower_Palette_00_Anim_1, 0, MESSAGE_ID(0x11, 0x004C)); @@ -260,26 +260,26 @@ EvtSource N(interact_80241564) = SCRIPT({ MESSAGE_ID(0x11, 0x004B)); SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_00_Anim_6); PlaySoundAtNpc(NPC_SELF, 0x2096, 0); - MakeItemEntity(SI_VAR(8), 375, 20, 0, 1, 0); - SI_VAR(7) = SI_VAR(0); + MakeItemEntity(EVT_VAR(8), 375, 20, 0, 1, 0); + EVT_VAR(7) = EVT_VAR(0); sleep 5; - GetAngleToPlayer(-1, SI_VAR(0)); - if (SI_VAR(0) < 180) { + GetAngleToPlayer(-1, EVT_VAR(0)); + if (EVT_VAR(0) < 180) { MakeLerp(0, 100, 7, 0); loop { UpdateLerp(); - SI_VAR(2) = -0.5; - SI_VAR(3) = -0.19921875; - SI_VAR(4) = 0.900390625; - SI_VAR(2) *= (float) SI_VAR(0); - SI_VAR(3) *= (float) SI_VAR(0); - SI_VAR(4) *= (float) SI_VAR(0); - SI_VAR(2) += 380.0; - SI_VAR(3) += 15.0; - SI_VAR(4) += -30.0; - N(func_80240B68_CEEDC8)(SI_VAR(7), SI_VAR(2), SI_VAR(3), SI_VAR(4)); + EVT_VAR(2) = -0.5; + EVT_VAR(3) = -0.19921875; + EVT_VAR(4) = 0.900390625; + EVT_VAR(2) *= (float) EVT_VAR(0); + EVT_VAR(3) *= (float) EVT_VAR(0); + EVT_VAR(4) *= (float) EVT_VAR(0); + EVT_VAR(2) += 380.0; + EVT_VAR(3) += 15.0; + EVT_VAR(4) += -30.0; + N(func_80240B68_CEEDC8)(EVT_VAR(7), EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); sleep 1; - if (SI_VAR(1) != 1) { + if (EVT_VAR(1) != 1) { break loop; } } @@ -287,24 +287,24 @@ EvtSource N(interact_80241564) = SCRIPT({ MakeLerp(0, 100, 7, 0); loop { UpdateLerp(); - SI_VAR(2) = 0.5; - SI_VAR(3) = -0.19921875; - SI_VAR(4) = 1.0; - SI_VAR(2) *= (float) SI_VAR(0); - SI_VAR(3) *= (float) SI_VAR(0); - SI_VAR(4) *= (float) SI_VAR(0); - SI_VAR(2) += 390.0; - SI_VAR(3) += 15.0; - SI_VAR(4) += -30.0; - N(func_80240B68_CEEDC8)(SI_VAR(7), SI_VAR(2), SI_VAR(3), SI_VAR(4)); + EVT_VAR(2) = 0.5; + EVT_VAR(3) = -0.19921875; + EVT_VAR(4) = 1.0; + EVT_VAR(2) *= (float) EVT_VAR(0); + EVT_VAR(3) *= (float) EVT_VAR(0); + EVT_VAR(4) *= (float) EVT_VAR(0); + EVT_VAR(2) += 390.0; + EVT_VAR(3) += 15.0; + EVT_VAR(4) += -30.0; + N(func_80240B68_CEEDC8)(EVT_VAR(7), EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); sleep 1; - if (SI_VAR(1) != 1) { + if (EVT_VAR(1) != 1) { break loop; } } } SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_00_Anim_1); - RemoveItemEntity(SI_VAR(7)); + RemoveItemEntity(EVT_VAR(7)); SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_00_Anim_1); EndSpeech(-1, NPC_ANIM_gate_flower_Palette_00_Anim_2, NPC_ANIM_gate_flower_Palette_00_Anim_1, 0); } @@ -316,7 +316,7 @@ EvtSource N(interact_80241564) = SCRIPT({ } sleep 10; } else { - if (SI_STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { + if (EVT_STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_00_Anim_9, NPC_ANIM_gate_flower_Palette_00_Anim_8, 0, MESSAGE_ID(0x11, 0x004E)); } else { @@ -330,7 +330,7 @@ EvtSource N(interact_80241564) = SCRIPT({ EvtSource N(init_80241E70) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241564)); - if (SI_SAVE_FLAG(1365) == 1) { + if (EVT_SAVE_FLAG(1365) == 1) { SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_00_Anim_5); ModifyColliderFlags(0, 13, 0x7FFFFE00); RotateModel(59, 50, 0, -1, 0); @@ -449,9 +449,9 @@ static s32 N(pad_2598)[] = { 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)); + AssignBlockFlag(EVT_SAVE_FLAG(1409)); MakeEntity(0x802EA588, 25, 60, 0, 0, ITEM_COIN, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1408)); + AssignBlockFlag(EVT_SAVE_FLAG(1408)); MakeEntity(0x802EAA54, -50, 0, 0, 90, ITEM_LETTER07, MAKE_ENTITY_END); }); diff --git a/src/world/area_flo/flo_24/CF0980.c b/src/world/area_flo/flo_24/CF0980.c index 0073f8ae5c..05e2868309 100644 --- a/src/world/area_flo/flo_24/CF0980.c +++ b/src/world/area_flo/flo_24/CF0980.c @@ -16,52 +16,52 @@ MapConfig N(config) = { }; EvtSource N(80240600) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { SetMusicTrack(0, SONG_FLOWER_FIELDS_SUNNY, 0, 8); } - if (SI_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (EVT_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { PlaySound(0x80000022); } }); EvtSource N(80240690) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -75,7 +75,7 @@ EvtSource N(802409F4) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -93,30 +93,30 @@ EvtSource N(main) = SCRIPT({ ModifyColliderFlags(0, 27, 0x00080000); ModifyColliderFlags(0, 28, 0x00080000); ModifyColliderFlags(3, 23, 0x00000001); - SI_VAR(0) = -480; - SI_VAR(1) = -350; - SI_VAR(2) = -65; - SI_VAR(3) = -260; - SI_VAR(4) = 0; + EVT_VAR(0) = -480; + EVT_VAR(1) = -350; + EVT_VAR(2) = -65; + EVT_VAR(3) = -260; + EVT_VAR(4) = 0; spawn N(80240690); - SI_VAR(0) = 100; - SI_VAR(1) = -350; - SI_VAR(2) = 480; - SI_VAR(3) = -260; - SI_VAR(4) = 0; + EVT_VAR(0) = 100; + EVT_VAR(1) = -350; + EVT_VAR(2) = 480; + EVT_VAR(3) = -260; + EVT_VAR(4) = 0; spawn N(80240690); ModifyColliderFlags(0, 1, 0x7FFFFE00); ModifyColliderFlags(0, 5, 0x7FFFFE00); - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) == 2) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) == 2) { spawn N(8024183C); spawn N(802409F4); } else { - SI_VAR(0) = N(802409F4); + EVT_VAR(0) = N(802409F4); spawn EnterWalk; } await N(80240600); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CF0940)(); } }); @@ -144,13 +144,13 @@ FoliageDropList N(tree1_Drops) = { .itemID = ITEM_BUBBLE_BERRY, .pos = { -38, 87, -156 }, .spawnMode = 0xC, - .spawnFlag = SI_AREA_FLAG(31), + .spawnFlag = EVT_AREA_FLAG(31), }, { .itemID = ITEM_BUBBLE_BERRY, .pos = { 39, 65, -208 }, .spawnMode = 0xC, - .spawnFlag = SI_AREA_FLAG(32), + .spawnFlag = EVT_AREA_FLAG(32), }, } }; @@ -164,19 +164,19 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_80241718) = { 1.0f, 0.0f, -192.0f, 0.0f }; EvtSource N(80241728) = SCRIPT({ - SI_AREA_FLAG(31) = 0; - SI_AREA_FLAG(32) = 0; - SI_VAR(0) = N(tree1); + EVT_AREA_FLAG(31) = 0; + EVT_AREA_FLAG(32) = 0; + EVT_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 13; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_80241718); }); EvtSource N(updateTexturePan_802417A0) = SCRIPT({ group 0; - if (SI_VAR(5) == 1) { - if (SI_VAR(6) == 1) { - if (SI_VAR(7) == 1) { - if (SI_VAR(8) == 1) { + if (EVT_VAR(5) == 1) { + if (EVT_VAR(6) == 1) { + if (EVT_VAR(7) == 1) { + if (EVT_VAR(8) == 1) { N(UnkTexturePanFunc)(); return; } @@ -206,9 +206,9 @@ EvtSource N(8024183C) = SCRIPT({ MakeLerp(80, 90, 10, 0); 0: UpdateLerp(); - RotateModel(101, SI_VAR(0), 1, 0, 0); - RotateModel(103, SI_VAR(0), 1, 0, 0); - if (SI_VAR(1) == 1) { + RotateModel(101, EVT_VAR(0), 1, 0, 0); + RotateModel(103, EVT_VAR(0), 1, 0, 0); + if (EVT_VAR(1) == 1) { sleep 1; goto 0; } @@ -216,14 +216,14 @@ EvtSource N(8024183C) = SCRIPT({ MakeLerp(45, 100, 150, 0); loop { UpdateLerp(); - TranslateGroup(100, 0, SI_VAR(0), 0); + TranslateGroup(100, 0, EVT_VAR(0), 0); sleep 1; - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { break loop; } } sleep 30; - SI_STORY_PROGRESS = STORY_CH6_FILLED_SPRING_WITH_WATER; + EVT_STORY_PROGRESS = STORY_CH6_FILLED_SPRING_WITH_WATER; GotoMap("flo_10", 2); sleep 100; } @@ -231,55 +231,55 @@ EvtSource N(8024183C) = SCRIPT({ }); #else 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) + EVT_CMD(EVT_OP_CALL, DisablePlayerInput, 1), + EVT_CMD(EVT_OP_CALL, TranslateGroup, 100, 0, 45, 0), + EVT_CMD(EVT_OP_CALL, UseSettingsFrom, 0, 170, 0, 160), + EVT_CMD(EVT_OP_CALL, SetPanTarget, 0, 170, -90, 160), + EVT_CMD(EVT_OP_CALL, SetCamDistance, 0, 800), + EVT_CMD(EVT_OP_CALL, SetCamPitch, 0, EVT_FIXED(18.5), EVT_FIXED(-7.5)), + EVT_CMD(EVT_OP_CALL, SetCamPosA, 0, EVT_FIXED(-300.0), EVT_FIXED(200.0)), + EVT_CMD(EVT_OP_CALL, SetCamPosB, 0, EVT_FIXED(300.0), EVT_FIXED(-150.0)), + EVT_CMD(EVT_OP_CALL, SetCamSpeed, 0, EVT_FIXED(90.0)), + EVT_CMD(EVT_OP_CALL, PanToTarget, 0, 0, 1), + EVT_CMD(EVT_OP_CALL, PlaySound, 0x80000050), + EVT_CMD(EVT_OP_SPAWN_THREAD), + EVT_CMD(EVT_OP_CALL, MakeLerp, 80, 90, 10, 0), + EVT_CMD(EVT_OP_LABEL, 0), + EVT_CMD(EVT_OP_CALL, UpdateLerp), + EVT_CMD(EVT_OP_CALL, RotateModel, 101, EVT_VAR(0), 1, 0, 0), + EVT_CMD(EVT_OP_CALL, RotateModel, 103, EVT_VAR(0), 1, 0, 0), + EVT_CMD(EVT_OP_IF_EQ, EVT_VAR(1), 1), + EVT_CMD(EVT_OP_SLEEP_FRAMES, 1), + EVT_CMD(EVT_OP_GOTO, 0), + EVT_CMD(EVT_OP_END_IF), + EVT_CMD(EVT_OP_SPAWN_THREAD), + EVT_CMD(EVT_OP_CALL, MakeLerp, 45, 100, 150, 0), + EVT_CMD(EVT_OP_LOOP, 0), + EVT_CMD(EVT_OP_CALL, UpdateLerp), + EVT_CMD(EVT_OP_CALL, TranslateGroup, 100, 0, EVT_VAR(0), 0), + EVT_CMD(EVT_OP_SLEEP_FRAMES, 1), + EVT_CMD(EVT_OP_IF_EQ, EVT_VAR(1), 0), + EVT_CMD(EVT_OP_BREAK_LOOP), + EVT_CMD(EVT_OP_END_IF), + EVT_CMD(EVT_OP_END_LOOP), + EVT_CMD(EVT_OP_SLEEP_FRAMES, 30), + EVT_CMD(EVT_OP_SET, EVT_STORY_PROGRESS, STORY_CH6_FILLED_SPRING_WITH_WATER), + EVT_CMD(EVT_OP_CALL, GotoMap, N(flo_10_name_hack), 2), + EVT_CMD(EVT_OP_SLEEP_FRAMES, 100), + EVT_CMD(EVT_OP_RETURN), + EVT_CMD(EVT_OP_END) }; #endif EvtSource N(80241ABC) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (EVT_STORY_PROGRESS < STORY_CH6_FILLED_SPRING_WITH_WATER) { EnableGroup(94, 0); ModifyColliderFlags(0, 30, 0x7FFFFE00); } else { EnableGroup(65, 0); } - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) != 2) { + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) != 2) { EnableGroup(105, 0); } EnableTexPanning(89, 1); @@ -292,99 +292,99 @@ EvtSource N(80241ABC) = SCRIPT({ EnableTexPanning(103, 1); EnableTexPanning(99, 1); spawn { - SI_VAR(0) = 1; - SI_VAR(1) = 140; - SI_VAR(2) = -80; - SI_VAR(3) = -70; - SI_VAR(4) = 100; - SI_VAR(5) = 1; - SI_VAR(6) = 1; - SI_VAR(7) = 1; - SI_VAR(8) = 1; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 1; + EVT_VAR(1) = 140; + EVT_VAR(2) = -80; + EVT_VAR(3) = -70; + EVT_VAR(4) = 100; + EVT_VAR(5) = 1; + EVT_VAR(6) = 1; + EVT_VAR(7) = 1; + EVT_VAR(8) = 1; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_802417A0); } spawn { - SI_VAR(0) = 2; - SI_VAR(1) = -70; - SI_VAR(2) = 100; - SI_VAR(3) = 100; - SI_VAR(4) = -40; - SI_VAR(5) = 1; - SI_VAR(6) = 1; - SI_VAR(7) = 1; - SI_VAR(8) = 1; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 2; + EVT_VAR(1) = -70; + EVT_VAR(2) = 100; + EVT_VAR(3) = 100; + EVT_VAR(4) = -40; + EVT_VAR(5) = 1; + EVT_VAR(6) = 1; + EVT_VAR(7) = 1; + EVT_VAR(8) = 1; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_802417A0); } spawn { - SI_VAR(0) = 3; - SI_VAR(1) = 0; - SI_VAR(2) = -800; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 0; - SI_VAR(6) = 1; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 3; + EVT_VAR(1) = 0; + EVT_VAR(2) = -800; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 0; + EVT_VAR(6) = 1; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_802417A0); } spawn { - SI_VAR(0) = 4; - SI_VAR(1) = 0; - SI_VAR(2) = -800; - SI_VAR(3) = -200; - SI_VAR(4) = 100; - SI_VAR(5) = 0; - SI_VAR(6) = 1; - SI_VAR(7) = 1; - SI_VAR(8) = 1; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 4; + EVT_VAR(1) = 0; + EVT_VAR(2) = -800; + EVT_VAR(3) = -200; + EVT_VAR(4) = 100; + EVT_VAR(5) = 0; + EVT_VAR(6) = 1; + EVT_VAR(7) = 1; + EVT_VAR(8) = 1; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_802417A0); } spawn { - SI_VAR(0) = 5; - SI_VAR(1) = 0; - SI_VAR(2) = -2500; - SI_VAR(3) = 0; - SI_VAR(4) = 0; - SI_VAR(5) = 0; - SI_VAR(6) = 1; - SI_VAR(7) = 0; - SI_VAR(8) = 0; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 5; + EVT_VAR(1) = 0; + EVT_VAR(2) = -2500; + EVT_VAR(3) = 0; + EVT_VAR(4) = 0; + EVT_VAR(5) = 0; + EVT_VAR(6) = 1; + EVT_VAR(7) = 0; + EVT_VAR(8) = 0; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_802417A0); } spawn { - SI_VAR(0) = 6; - SI_VAR(1) = 0; - SI_VAR(2) = -2500; - SI_VAR(3) = -200; - SI_VAR(4) = 100; - SI_VAR(5) = 1; - SI_VAR(6) = 1; - SI_VAR(7) = 1; - SI_VAR(8) = 1; - SI_VAR(9) = 0; - SI_VAR(10) = 0; - SI_VAR(11) = 0; - SI_VAR(12) = 0; + EVT_VAR(0) = 6; + EVT_VAR(1) = 0; + EVT_VAR(2) = -2500; + EVT_VAR(3) = -200; + EVT_VAR(4) = 100; + EVT_VAR(5) = 1; + EVT_VAR(6) = 1; + EVT_VAR(7) = 1; + EVT_VAR(8) = 1; + EVT_VAR(9) = 0; + EVT_VAR(10) = 0; + EVT_VAR(11) = 0; + EVT_VAR(12) = 0; spawn N(updateTexturePan_802417A0); } }); @@ -395,11 +395,11 @@ static s32 N(pad_21A4)[] = { EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA564, -325, 60, -140, 0, ITEM_DIZZY_DIAL, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1393)); + AssignBlockFlag(EVT_SAVE_FLAG(1393)); MakeEntity(0x802EA588, 325, 60, -140, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(1394)); + AssignBlockFlag(EVT_SAVE_FLAG(1394)); MakeEntity(0x802EAB04, 335, 0, -160, 0, ITEM_MAP, MAKE_ENTITY_END); - AssignPanelFlag(SI_SAVE_FLAG(1406)); + AssignPanelFlag(EVT_SAVE_FLAG(1406)); }); const char N(flo_10_name_hack)[] = "flo_10"; diff --git a/src/world/area_flo/flo_25/CF2C10.c b/src/world/area_flo/flo_25/CF2C10.c index 5c523e531e..4a67770fc2 100644 --- a/src/world/area_flo/flo_25/CF2C10.c +++ b/src/world/area_flo/flo_25/CF2C10.c @@ -29,7 +29,7 @@ MapConfig N(config) = { }; EvtSource N(80242330) = SCRIPT({ - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -40,40 +40,40 @@ EvtSource N(80242330) = SCRIPT({ EvtSource N(802423A0) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); @@ -87,7 +87,7 @@ EvtSource N(80242704) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + EVT_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -97,18 +97,18 @@ EvtSource N(main) = SCRIPT({ await N(makeEntities); spawn N(80244D0C); spawn N(802446BC); - SI_VAR(0) = -270; - SI_VAR(1) = -190; - SI_VAR(2) = 640; - SI_VAR(3) = -60; - SI_VAR(4) = 60; + EVT_VAR(0) = -270; + EVT_VAR(1) = -190; + EVT_VAR(2) = 640; + EVT_VAR(3) = -60; + EVT_VAR(4) = 60; spawn N(802423A0); ModifyColliderFlags(0, 1, 0x7FFFFE00); ModifyColliderFlags(0, 5, 0x7FFFFE00); - SI_VAR(0) = N(80242704); + EVT_VAR(0) = N(80242704); spawn EnterWalk; await N(80242330); - if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (EVT_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CF2BD0)(); } }); @@ -195,40 +195,40 @@ s32 N(D_80242AD0_CF56A0) = { }; EvtSource N(80242AD4) = SCRIPT({ - SI_VAR(9) = SI_VAR(1); + EVT_VAR(9) = EVT_VAR(1); ShowConsumableChoicePopup(); - SI_VAR(10) = SI_VAR(0); - match SI_VAR(0) { + EVT_VAR(10) = EVT_VAR(0); + match EVT_VAR(0) { == 0 {} == -1 {} else { - RemoveItemAt(SI_VAR(1)); - GetPlayerPos(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - N(AddPlayerHandsOffset)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); - MakeItemEntity(SI_VAR(0), SI_VAR(3), SI_VAR(4), SI_VAR(5), 1, 0); + RemoveItemAt(EVT_VAR(1)); + GetPlayerPos(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + N(AddPlayerHandsOffset)(EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); + MakeItemEntity(EVT_VAR(0), EVT_VAR(3), EVT_VAR(4), EVT_VAR(5), 1, 0); SetPlayerAnimation(0x60005); sleep 30; SetPlayerAnimation(ANIM_10002); - RemoveItemEntity(SI_VAR(0)); + RemoveItemEntity(EVT_VAR(0)); } } - N(func_80241DAC_CF497C)(SI_VAR(10)); + N(func_80241DAC_CF497C)(EVT_VAR(10)); CloseChoicePopup(); unbind; }); EvtSource N(80242C08) = SCRIPT({ - N(func_80241DE4_CF49B4)(SI_VAR(0)); + N(func_80241DE4_CF49B4)(EVT_VAR(0)); bind_padlock N(80242AD4) 0x10 0 N(D_80244A20); - N(func_80241D58_CF4928)(SI_VAR(0)); + N(func_80241D58_CF4928)(EVT_VAR(0)); }); 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)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + if (EVT_SAVE_FLAG(1363) == 0) { + GetNpcPos(NPC_SELF, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamDistance(0, 350); SetCamPitch(0, 18.5, -7.5); SetCamSpeed(0, 4.0); @@ -238,23 +238,23 @@ EvtSource N(interact_80242C58) = SCRIPT({ MESSAGE_ID(0x11, 0x003B)); SetPlayerAnimation(ANIM_THINKING); N(func_80241FB4_CF4B84)(); - SI_VAR(0) = 0x80245110; - SI_VAR(1) = 0; + EVT_VAR(0) = 0x80245110; + EVT_VAR(1) = 0; await N(80242C08); - match SI_VAR(0) { + match EVT_VAR(0) { <= 0 { SetPlayerAnimation(ANIM_STAND_STILL); SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_01_Anim_2, NPC_ANIM_gate_flower_Palette_01_Anim_1, 0, MESSAGE_ID(0x11, 0x003C)); } else { - SI_VAR(8) = SI_VAR(0); - N(func_80241F44_CF4B14)(SI_VAR(0)); - MakeItemEntity(SI_VAR(8), 505, 20, -24, 1, 0); - SI_VAR(7) = SI_VAR(0); + EVT_VAR(8) = EVT_VAR(0); + N(func_80241F44_CF4B14)(EVT_VAR(0)); + MakeItemEntity(EVT_VAR(8), 505, 20, -24, 1, 0); + EVT_VAR(7) = EVT_VAR(0); PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2095, 0); SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_01_Anim_3); sleep 20; - RemoveItemEntity(SI_VAR(7)); - match SI_VAR(8) { + RemoveItemEntity(EVT_VAR(7)); + match EVT_VAR(8) { == 159 { SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_01_Anim_4, NPC_ANIM_gate_flower_Palette_01_Anim_1, 0, MESSAGE_ID(0x11, 0x003F)); PlaySoundAtNpc(NPC_SELF, 0x21C, 0); @@ -265,23 +265,23 @@ EvtSource N(interact_80242C58) = SCRIPT({ MakeLerp(0, 100, 30, 1); loop { UpdateLerp(); - SI_VAR(8) = (float) SI_VAR(0); - SI_VAR(9) = (float) SI_VAR(0); - SI_VAR(8) *= 0.5; - SI_VAR(9) *= 1.2001953125; - RotateModel(86, SI_VAR(8), 0, -1, 0); - RotateModel(87, SI_VAR(8), 0, -1, 0); - RotateModel(88, SI_VAR(8), 0, -1, 0); - RotateModel(82, SI_VAR(9), 0, 1, 0); - RotateModel(83, SI_VAR(9), 0, 1, 0); - RotateModel(84, SI_VAR(9), 0, 1, 0); + EVT_VAR(8) = (float) EVT_VAR(0); + EVT_VAR(9) = (float) EVT_VAR(0); + EVT_VAR(8) *= 0.5; + EVT_VAR(9) *= 1.2001953125; + RotateModel(86, EVT_VAR(8), 0, -1, 0); + RotateModel(87, EVT_VAR(8), 0, -1, 0); + RotateModel(88, EVT_VAR(8), 0, -1, 0); + RotateModel(82, EVT_VAR(9), 0, 1, 0); + RotateModel(83, EVT_VAR(9), 0, 1, 0); + RotateModel(84, EVT_VAR(9), 0, 1, 0); sleep 1; - if (SI_VAR(1) != 1) { + if (EVT_VAR(1) != 1) { break loop; } } SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_01_Anim_5); - SI_SAVE_FLAG(1363) = 1; + EVT_SAVE_FLAG(1363) = 1; } == 160 { SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_01_Anim_4, NPC_ANIM_gate_flower_Palette_01_Anim_1, 0, MESSAGE_ID(0x11, 0x003E)); @@ -295,26 +295,26 @@ EvtSource N(interact_80242C58) = SCRIPT({ MESSAGE_ID(0x11, 0x003D)); SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_01_Anim_6); PlaySoundAtNpc(NPC_SELF, 0x2096, 0); - MakeItemEntity(SI_VAR(8), -125, 20, 0, 1, 0); - SI_VAR(7) = SI_VAR(0); + MakeItemEntity(EVT_VAR(8), -125, 20, 0, 1, 0); + EVT_VAR(7) = EVT_VAR(0); sleep 5; - GetAngleToPlayer(-1, SI_VAR(0)); - if (SI_VAR(0) < 180) { + GetAngleToPlayer(-1, EVT_VAR(0)); + if (EVT_VAR(0) < 180) { MakeLerp(0, 100, 7, 0); loop { UpdateLerp(); - SI_VAR(2) = -0.5; - SI_VAR(3) = -0.19921875; - SI_VAR(4) = 0.900390625; - SI_VAR(2) *= (float) SI_VAR(0); - SI_VAR(3) *= (float) SI_VAR(0); - SI_VAR(4) *= (float) SI_VAR(0); - SI_VAR(2) += 500.0; - SI_VAR(3) += 15.0; - SI_VAR(4) += -20.0; - N(func_80241E80_CF4A50)(SI_VAR(7), SI_VAR(2), SI_VAR(3), SI_VAR(4)); + EVT_VAR(2) = -0.5; + EVT_VAR(3) = -0.19921875; + EVT_VAR(4) = 0.900390625; + EVT_VAR(2) *= (float) EVT_VAR(0); + EVT_VAR(3) *= (float) EVT_VAR(0); + EVT_VAR(4) *= (float) EVT_VAR(0); + EVT_VAR(2) += 500.0; + EVT_VAR(3) += 15.0; + EVT_VAR(4) += -20.0; + N(func_80241E80_CF4A50)(EVT_VAR(7), EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); sleep 1; - if (SI_VAR(1) != 1) { + if (EVT_VAR(1) != 1) { break loop; } } @@ -322,24 +322,24 @@ EvtSource N(interact_80242C58) = SCRIPT({ MakeLerp(0, 100, 7, 0); loop { UpdateLerp(); - SI_VAR(2) = 0.5; - SI_VAR(3) = -0.19921875; - SI_VAR(4) = 0.900390625; - SI_VAR(2) *= (float) SI_VAR(0); - SI_VAR(3) *= (float) SI_VAR(0); - SI_VAR(4) *= (float) SI_VAR(0); - SI_VAR(2) += 510.0; - SI_VAR(3) += 15.0; - SI_VAR(4) += -20.0; - N(func_80241E80_CF4A50)(SI_VAR(7), SI_VAR(2), SI_VAR(3), SI_VAR(4)); + EVT_VAR(2) = 0.5; + EVT_VAR(3) = -0.19921875; + EVT_VAR(4) = 0.900390625; + EVT_VAR(2) *= (float) EVT_VAR(0); + EVT_VAR(3) *= (float) EVT_VAR(0); + EVT_VAR(4) *= (float) EVT_VAR(0); + EVT_VAR(2) += 510.0; + EVT_VAR(3) += 15.0; + EVT_VAR(4) += -20.0; + N(func_80241E80_CF4A50)(EVT_VAR(7), EVT_VAR(2), EVT_VAR(3), EVT_VAR(4)); sleep 1; - if (SI_VAR(1) != 1) { + if (EVT_VAR(1) != 1) { break loop; } } } SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_01_Anim_1); - RemoveItemEntity(SI_VAR(7)); + RemoveItemEntity(EVT_VAR(7)); SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_01_Anim_1); EndSpeech(-1, NPC_ANIM_gate_flower_Palette_01_Anim_2, NPC_ANIM_gate_flower_Palette_01_Anim_1, 0); } @@ -351,7 +351,7 @@ EvtSource N(interact_80242C58) = SCRIPT({ } sleep 10; } else { - if (SI_STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { + if (EVT_STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { SpeakToPlayer(NPC_SELF, NPC_ANIM_gate_flower_Palette_01_Anim_9, NPC_ANIM_gate_flower_Palette_01_Anim_8, 0, MESSAGE_ID(0x11, 0x0040)); } else { @@ -365,7 +365,7 @@ EvtSource N(interact_80242C58) = SCRIPT({ EvtSource N(init_80243564) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80242C58)); - if (SI_SAVE_FLAG(1363) == 1) { + if (EVT_SAVE_FLAG(1363) == 1) { SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_01_Anim_5); ModifyColliderFlags(0, 14, 0x7FFFFE00); RotateModel(86, 50, 0, -1, 0); @@ -495,7 +495,7 @@ static s32 N(pad_3C8C) = { EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EAB04, -390, 0, 0, 0, ITEM_MAP, MAKE_ENTITY_END); - AssignPanelFlag(SI_SAVE_FLAG(1407)); + AssignPanelFlag(EVT_SAVE_FLAG(1407)); }); static s32 N(pad_3CD8)[] = { diff --git a/src/world/area_flo/flo_25/CF4BC0.c b/src/world/area_flo/flo_25/CF4BC0.c index da6118893e..d7ac42c83a 100644 --- a/src/world/area_flo/flo_25/CF4BC0.c +++ b/src/world/area_flo/flo_25/CF4BC0.c @@ -19,13 +19,13 @@ FoliageDropList N(tree1_Drops) = { .itemID = ITEM_YELLOW_BERRY, .pos = { -432, 84, -44 }, .spawnMode = 0xC, - .spawnFlag = SI_AREA_FLAG(33), + .spawnFlag = EVT_AREA_FLAG(33), }, { .itemID = ITEM_YELLOW_BERRY, .pos = { -346, 72, -114 }, .spawnMode = 0xC, - .spawnFlag = SI_AREA_FLAG(34), + .spawnFlag = EVT_AREA_FLAG(34), }, } }; @@ -39,9 +39,9 @@ ShakeTreeConfig N(tree1) = { Vec4f N(triggerCoord_802446AC) = { -388.0f, 0.0f, -92.0f, 0.0f }; EvtSource N(802446BC) = SCRIPT({ - SI_AREA_FLAG(33) = 0; - SI_AREA_FLAG(34) = 0; - SI_VAR(0) = N(tree1); + EVT_AREA_FLAG(33) = 0; + EVT_AREA_FLAG(34) = 0; + EVT_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 12; bind N(shakeTree) TRIGGER_POINT_BOMB N(triggerCoord_802446AC); }); @@ -52,120 +52,120 @@ static s32 N(pad_4734)[] = { EvtSource N(80244740) = SCRIPT({ group 11; - SI_VAR(10) = SI_VAR(0); - SI_VAR(11) = SI_VAR(1); - SI_VAR(12) = SI_VAR(2); - SI_VAR(13) = SI_VAR(3); - SI_VAR(14) = SI_VAR(4); - SI_VAR(12) -= SI_VAR(0); - SI_VAR(13) -= SI_VAR(1); - SI_VAR(0) = (float) SI_VAR(12); - SI_VAR(0) /= 100.0; - SI_VAR(15) = 100.0; - SI_VAR(15) /= (float) SI_VAR(0); - SI_VAR(15) += 11; - SI_VAR(5) = 200; - SI_VAR(5) /= SI_VAR(15); - SI_VAR(5) += 1; - loop SI_VAR(5) { - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - RandInt(199, SI_VAR(2)); - SI_VAR(3) = 210; - SI_VAR(3) -= SI_VAR(2); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - SI_VAR(2) += SI_VAR(14); - PlayEffect(0xD, SI_VAR(0), SI_VAR(2), SI_VAR(1), SI_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(10) = EVT_VAR(0); + EVT_VAR(11) = EVT_VAR(1); + EVT_VAR(12) = EVT_VAR(2); + EVT_VAR(13) = EVT_VAR(3); + EVT_VAR(14) = EVT_VAR(4); + EVT_VAR(12) -= EVT_VAR(0); + EVT_VAR(13) -= EVT_VAR(1); + EVT_VAR(0) = (float) EVT_VAR(12); + EVT_VAR(0) /= 100.0; + EVT_VAR(15) = 100.0; + EVT_VAR(15) /= (float) EVT_VAR(0); + EVT_VAR(15) += 11; + EVT_VAR(5) = 200; + EVT_VAR(5) /= EVT_VAR(15); + EVT_VAR(5) += 1; + loop EVT_VAR(5) { + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + RandInt(199, EVT_VAR(2)); + EVT_VAR(3) = 210; + EVT_VAR(3) -= EVT_VAR(2); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + EVT_VAR(2) += EVT_VAR(14); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(2), EVT_VAR(1), EVT_VAR(3), 0, 0, 0, 0, 0, 0, 0, 0, 0); } - sleep SI_VAR(15); + sleep EVT_VAR(15); 0: - RandInt(SI_VAR(12), SI_VAR(0)); - RandInt(SI_VAR(13), SI_VAR(1)); - SI_VAR(0) += SI_VAR(10); - SI_VAR(1) += SI_VAR(11); - PlayEffect(0xD, SI_VAR(0), SI_VAR(14), SI_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); - sleep SI_VAR(15); + RandInt(EVT_VAR(12), EVT_VAR(0)); + RandInt(EVT_VAR(13), EVT_VAR(1)); + EVT_VAR(0) += EVT_VAR(10); + EVT_VAR(1) += EVT_VAR(11); + PlayEffect(0xD, EVT_VAR(0), EVT_VAR(14), EVT_VAR(1), 200, 0, 0, 0, 0, 0, 0, 0, 0, 0); + sleep EVT_VAR(15); goto 0; }); EvtSource N(802449EC) = SCRIPT({ - SI_VAR(9) = SI_VAR(6); - SI_VAR(8) = SI_VAR(5); - SI_VAR(7) = SI_VAR(4); - SI_VAR(6) = SI_VAR(3); - SI_VAR(5) = SI_VAR(2); - SI_VAR(4) = SI_VAR(1); - SI_VAR(3) = SI_VAR(0); - EnableModel(SI_VAR(6), 0); + EVT_VAR(9) = EVT_VAR(6); + EVT_VAR(8) = EVT_VAR(5); + EVT_VAR(7) = EVT_VAR(4); + EVT_VAR(6) = EVT_VAR(3); + EVT_VAR(5) = EVT_VAR(2); + EVT_VAR(4) = EVT_VAR(1); + EVT_VAR(3) = EVT_VAR(0); + EnableModel(EVT_VAR(6), 0); 0: - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); N(UnkFunc43)(); - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { sleep 1; goto 0; } spawn { sleep 5; - EnableModel(SI_VAR(6), 1); + EnableModel(EVT_VAR(6), 1); } - if (SI_VAR(10) != 0) { + if (EVT_VAR(10) != 0) { spawn { sleep 5; - SI_VAR(0) = SI_VAR(3); - SI_VAR(1) = SI_VAR(4); - SI_VAR(2) = SI_VAR(5); - SI_VAR(1) += 10; - SI_VAR(2) += 8; - PlayEffect(0x11, 4, SI_VAR(0), SI_VAR(1), SI_VAR(2), 15, 0, 0, 0, 0, 0, 0, 0, 0); + EVT_VAR(0) = EVT_VAR(3); + EVT_VAR(1) = EVT_VAR(4); + EVT_VAR(2) = EVT_VAR(5); + EVT_VAR(1) += 10; + EVT_VAR(2) += 8; + PlayEffect(0x11, 4, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 15, 0, 0, 0, 0, 0, 0, 0, 0); sleep 15; - SI_VAR(1) -= 10; - MakeItemEntity(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 14, 0); + EVT_VAR(1) -= 10; + MakeItemEntity(EVT_VAR(10), EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 14, 0); } } spawn { sleep 10; - PlaySoundAt(0xF8, 0, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + PlaySoundAt(0xF8, 0, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5)); } MakeLerp(0, 180, 20, 2); 1: UpdateLerp(); - RotateModel(SI_VAR(8), SI_VAR(0), 1, 0, 0); - RotateModel(SI_VAR(9), SI_VAR(0), 1, 0, 0); - if (SI_VAR(1) == 1) { + RotateModel(EVT_VAR(8), EVT_VAR(0), 1, 0, 0); + RotateModel(EVT_VAR(9), EVT_VAR(0), 1, 0, 0); + if (EVT_VAR(1) == 1) { sleep 1; goto 1; } - EnableModel(SI_VAR(7), 0); + EnableModel(EVT_VAR(7), 0); }); EvtSource N(80244D0C) = SCRIPT({ GetModelCenter(57); - SI_VAR(3) = 57; - SI_VAR(4) = 58; - SI_VAR(5) = 59; - SI_VAR(6) = 60; - SI_VAR(10) = 0; + EVT_VAR(3) = 57; + EVT_VAR(4) = 58; + EVT_VAR(5) = 59; + EVT_VAR(6) = 60; + EVT_VAR(10) = 0; spawn N(802449EC); GetModelCenter(63); - SI_VAR(3) = 63; - SI_VAR(4) = 64; - SI_VAR(5) = 65; - SI_VAR(6) = 66; - SI_VAR(10) = 0; + EVT_VAR(3) = 63; + EVT_VAR(4) = 64; + EVT_VAR(5) = 65; + EVT_VAR(6) = 66; + EVT_VAR(10) = 0; spawn N(802449EC); GetModelCenter(69); - SI_VAR(3) = 69; - SI_VAR(4) = 70; - SI_VAR(5) = 71; - SI_VAR(6) = 72; - SI_VAR(10) = 174; + EVT_VAR(3) = 69; + EVT_VAR(4) = 70; + EVT_VAR(5) = 71; + EVT_VAR(6) = 72; + EVT_VAR(10) = 174; spawn N(802449EC); GetModelCenter(75); - SI_VAR(3) = 75; - SI_VAR(4) = 76; - SI_VAR(5) = 77; - SI_VAR(6) = 78; - SI_VAR(10) = 0; + EVT_VAR(3) = 75; + EVT_VAR(4) = 76; + EVT_VAR(5) = 77; + EVT_VAR(6) = 78; + EVT_VAR(10) = 0; spawn N(802449EC); }); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 78ffe25d68..dc06a3c092 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -145,10 +145,10 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802425E0_A1D6E0); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -169,16 +169,16 @@ ApiStatus N(func_802425E0_A1D6E0)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -213,7 +213,7 @@ ApiStatus N(func_80242B90_A1DC90)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -232,9 +232,9 @@ ApiStatus N(func_80242C14_A1DD14)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_isk/isk_16/9951F0.c b/src/world/area_isk/isk_16/9951F0.c index d56c434817..7d0e0dd995 100644 --- a/src/world/area_isk/isk_16/9951F0.c +++ b/src/world/area_isk/isk_16/9951F0.c @@ -18,7 +18,7 @@ ApiStatus N(func_8024004C_99523C)(Evt* script, s32 isInitialCall) { if (isInitialCall) { arn_07_struct* ptr = heap_malloc(sizeof(arn_07_struct)); script->varTable[0] = ptr; - set_variable(NULL, SI_MAP_VAR(1), ptr); + set_variable(NULL, EVT_MAP_VAR(1), ptr); ptr->unk_38 = get_variable(script, *args++); ptr->unk_3C = get_variable(script, *args++); ptr->unk_0C = get_float_variable(script, *args++); diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index f98d35899d..f8180db77e 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -196,10 +196,10 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241750_B2DBC0); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -220,16 +220,16 @@ ApiStatus N(func_80241750_B2DBC0)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -264,7 +264,7 @@ ApiStatus N(func_80241D00_B2E170)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -283,9 +283,9 @@ ApiStatus N(func_80241D84_B2E1F4)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index b57c275e65..e6d7aac7a6 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -263,10 +263,10 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241CD8_B368A8); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -287,16 +287,16 @@ ApiStatus N(func_80241CD8_B368A8)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -331,7 +331,7 @@ ApiStatus N(func_80242288_B36E58)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -350,9 +350,9 @@ ApiStatus N(func_8024230C_B36EDC)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_kmr/kmr.h b/src/world/area_kmr/kmr.h index 7e2b698db7..71ccb90839 100644 --- a/src/world/area_kmr/kmr.h +++ b/src/world/area_kmr/kmr.h @@ -1,81 +1,81 @@ #ifndef _WORLD_AREA_KMR_KMR_H_ #define _WORLD_AREA_KMR_KMR_H_ -#include "si.h" +#include "evt.h" -#define KMR20_MarioReadLetterFlags_00 SI_SAVE_VAR(0x00E) -#define KMR20_MarioReadLetterFlags_01 SI_SAVE_VAR(0x00F) +#define KMR20_MarioReadLetterFlags_00 EVT_SAVE_VAR(0x00E) +#define KMR20_MarioReadLetterFlags_01 EVT_SAVE_VAR(0x00F) -#define KMR04_Tree3_Dolly SI_SAVE_FLAG(0x01E) -#define KMR02_KeptDolly SI_SAVE_FLAG(0x01F) -#define KMR02_Met_Goompapa SI_SAVE_FLAG(0x020) -#define KMR02_Goompapa_SaidFarewell SI_SAVE_FLAG(0x021) -#define KMR02_Met_Goomama SI_SAVE_FLAG(0x022) -#define KMR02_Goomama_SaidFarewell SI_SAVE_FLAG(0x023) -#define KMR02_Met_Goombario SI_SAVE_FLAG(0x024) -#define KMR02_Goombario_SwapDialogue SI_SAVE_FLAG(0x025) -#define KMR02_Met_Gooma SI_SAVE_FLAG(0x026) -#define KMR02_Gooma_HealthAdvice SI_SAVE_FLAG(0x027) -#define KMR02_Met_Goompa SI_SAVE_FLAG(0x028) -#define KMR02_Goompa_SwapDialogue SI_SAVE_FLAG(0x029) -#define KMR02_ToadHouse_Intro SI_SAVE_FLAG(0x02A) -#define KMR02_ReturnedWithGoompa SI_SAVE_FLAG(0x02B) -#define KMR11_GoombaBrosFledToCastle SI_SAVE_FLAG(0x02D) -#define KMR02_Item_ShootingStar SI_SAVE_FLAG(0x02E) -#define KMR02_Bush2_Coin SI_SAVE_FLAG(0x02F) -#define KMR02_Tree1_Goomnut SI_SAVE_FLAG(0x030) -#define KMR02_Item_FireFlower SI_SAVE_FLAG(0x031) -#define KMR03_ItemBlock_Coin SI_SAVE_FLAG(0x032) -#define KMR03_HiddenItem_RepelGel SI_SAVE_FLAG(0x034) -#define KMR03_Tree1_Mushroom SI_SAVE_FLAG(0x035) -#define KMR03_Hammer1Block SI_SAVE_FLAG(0x036) -#define KMR03_Item_CoinA SI_SAVE_FLAG(0x038) -#define KMR03_Item_CoinB SI_SAVE_FLAG(0x039) -#define KMR03_Item_CoinC SI_SAVE_FLAG(0x03A) -#define KMR03_Item_CoinD SI_SAVE_FLAG(0x03B) -#define KMR04_Tree1_Coin SI_SAVE_FLAG(0x03C) -#define KMR04_Tree2_Coin SI_SAVE_FLAG(0x03D) -#define KMR04_Bush1_Coin SI_SAVE_FLAG(0x03E) -#define KMR04_Bush2_Coin SI_SAVE_FLAG(0x03F) -#define KMR04_Bush3_CoinA SI_SAVE_FLAG(0x040) -#define KMR04_Bush3_CoinB SI_SAVE_FLAG(0x041) -#define KMR04_Bush4_Coin SI_SAVE_FLAG(0x042) -#define KMR04_Bush5_Coin SI_SAVE_FLAG(0x043) -#define KMR04_MultiCoinBrick SI_SAVE_FLAG(0x046) -#define KMR04_Hammer1Block SI_SAVE_FLAG(0x047) -#define KMR05_EnemyWarning SI_SAVE_FLAG(0x048) -#define KMR05_Tree1_Coin SI_SAVE_FLAG(0x049) -#define KMR05_Item_StarPiece SI_SAVE_FLAG(0x04A) -#define KMR09_ItemBlock_CoinA SI_SAVE_FLAG(0x04D) -#define KMR09_ItemBlock_CoinB SI_SAVE_FLAG(0x04E) -#define KMR06_Item_Mushroom SI_SAVE_FLAG(0x04F) -#define KMR06_BadgeBlock_CloseCall SI_SAVE_FLAG(0x050) -#define KMR11_ItemBlock_SuperShroom SI_SAVE_FLAG(0x051) -#define KMR11_Tree1_StarPiece SI_SAVE_FLAG(0x052) -#define KMR11_Tree2_Coin SI_SAVE_FLAG(0x053) -#define KMR10_Chest_HammerThrow SI_SAVE_FLAG(0x054) -#define KMR10_ItemBlock_SleepySheep SI_SAVE_FLAG(0x055) -#define KMR00_HiddenPanel SI_SAVE_FLAG(0x056) -#define KMR03_HiddenPanel SI_SAVE_FLAG(0x058) -#define KMR11_HiddenPanel SI_SAVE_FLAG(0x05A) -#define KMR10_UnreadFlagForSpring SI_SAVE_FLAG(0x05B) -#define Tutorial_Badges SI_SAVE_FLAG(0x05E) -#define Tutorial_SaveBlock SI_SAVE_FLAG(0x05F) -#define Tutorial_HeartBlock SI_SAVE_FLAG(0x060) -#define Tutorial_GotItem SI_SAVE_FLAG(0x061) -#define KMR20_ReunitedWithLuigi SI_SAVE_FLAG(0x062) ///< And saw him whistling -#define KMR20_Gift_LuigisAutograph SI_SAVE_FLAG(0x063) -#define KMR02_Gift_TheTape SI_SAVE_FLAG(0x064) -#define Tutorial_GotStarPiece SI_SAVE_FLAG(0x065) -#define FoughtTheMaster SI_SAVE_FLAG(0x066) -#define KMR20_ReadThankYouLetterFromKoopaVillage SI_SAVE_FLAG(0x067) -#define KMR02_Goombario_RelayedMessage SI_SAVE_FLAG(0x068) -#define KMR20_CaughtLuigiInBasement SI_SAVE_FLAG(0x069) -#define KMR20_CaughtLuigiReadingLetter SI_SAVE_FLAG(0x06A) -#define KMR20_FoundLuigisDiary SI_SAVE_FLAG(0x06B) -#define KMR20_CheckedDeskForMail SI_SAVE_FLAG(0x06C) -#define KMR20_ChasedOffShyGuy SI_SAVE_FLAG(0x06D) -#define KMR10_KnockedSpringOutOfTree SI_SAVE_FLAG(0x06E) +#define KMR04_Tree3_Dolly EVT_SAVE_FLAG(0x01E) +#define KMR02_KeptDolly EVT_SAVE_FLAG(0x01F) +#define KMR02_Met_Goompapa EVT_SAVE_FLAG(0x020) +#define KMR02_Goompapa_SaidFarewell EVT_SAVE_FLAG(0x021) +#define KMR02_Met_Goomama EVT_SAVE_FLAG(0x022) +#define KMR02_Goomama_SaidFarewell EVT_SAVE_FLAG(0x023) +#define KMR02_Met_Goombario EVT_SAVE_FLAG(0x024) +#define KMR02_Goombario_SwapDialogue EVT_SAVE_FLAG(0x025) +#define KMR02_Met_Gooma EVT_SAVE_FLAG(0x026) +#define KMR02_Gooma_HealthAdvice EVT_SAVE_FLAG(0x027) +#define KMR02_Met_Goompa EVT_SAVE_FLAG(0x028) +#define KMR02_Goompa_SwapDialogue EVT_SAVE_FLAG(0x029) +#define KMR02_ToadHouse_Intro EVT_SAVE_FLAG(0x02A) +#define KMR02_ReturnedWithGoompa EVT_SAVE_FLAG(0x02B) +#define KMR11_GoombaBrosFledToCastle EVT_SAVE_FLAG(0x02D) +#define KMR02_Item_ShootingStar EVT_SAVE_FLAG(0x02E) +#define KMR02_Bush2_Coin EVT_SAVE_FLAG(0x02F) +#define KMR02_Tree1_Goomnut EVT_SAVE_FLAG(0x030) +#define KMR02_Item_FireFlower EVT_SAVE_FLAG(0x031) +#define KMR03_ItemBlock_Coin EVT_SAVE_FLAG(0x032) +#define KMR03_HiddenItem_RepelGel EVT_SAVE_FLAG(0x034) +#define KMR03_Tree1_Mushroom EVT_SAVE_FLAG(0x035) +#define KMR03_Hammer1Block EVT_SAVE_FLAG(0x036) +#define KMR03_Item_CoinA EVT_SAVE_FLAG(0x038) +#define KMR03_Item_CoinB EVT_SAVE_FLAG(0x039) +#define KMR03_Item_CoinC EVT_SAVE_FLAG(0x03A) +#define KMR03_Item_CoinD EVT_SAVE_FLAG(0x03B) +#define KMR04_Tree1_Coin EVT_SAVE_FLAG(0x03C) +#define KMR04_Tree2_Coin EVT_SAVE_FLAG(0x03D) +#define KMR04_Bush1_Coin EVT_SAVE_FLAG(0x03E) +#define KMR04_Bush2_Coin EVT_SAVE_FLAG(0x03F) +#define KMR04_Bush3_CoinA EVT_SAVE_FLAG(0x040) +#define KMR04_Bush3_CoinB EVT_SAVE_FLAG(0x041) +#define KMR04_Bush4_Coin EVT_SAVE_FLAG(0x042) +#define KMR04_Bush5_Coin EVT_SAVE_FLAG(0x043) +#define KMR04_MultiCoinBrick EVT_SAVE_FLAG(0x046) +#define KMR04_Hammer1Block EVT_SAVE_FLAG(0x047) +#define KMR05_EnemyWarning EVT_SAVE_FLAG(0x048) +#define KMR05_Tree1_Coin EVT_SAVE_FLAG(0x049) +#define KMR05_Item_StarPiece EVT_SAVE_FLAG(0x04A) +#define KMR09_ItemBlock_CoinA EVT_SAVE_FLAG(0x04D) +#define KMR09_ItemBlock_CoinB EVT_SAVE_FLAG(0x04E) +#define KMR06_Item_Mushroom EVT_SAVE_FLAG(0x04F) +#define KMR06_BadgeBlock_CloseCall EVT_SAVE_FLAG(0x050) +#define KMR11_ItemBlock_SuperShroom EVT_SAVE_FLAG(0x051) +#define KMR11_Tree1_StarPiece EVT_SAVE_FLAG(0x052) +#define KMR11_Tree2_Coin EVT_SAVE_FLAG(0x053) +#define KMR10_Chest_HammerThrow EVT_SAVE_FLAG(0x054) +#define KMR10_ItemBlock_SleepySheep EVT_SAVE_FLAG(0x055) +#define KMR00_HiddenPanel EVT_SAVE_FLAG(0x056) +#define KMR03_HiddenPanel EVT_SAVE_FLAG(0x058) +#define KMR11_HiddenPanel EVT_SAVE_FLAG(0x05A) +#define KMR10_UnreadFlagForSpring EVT_SAVE_FLAG(0x05B) +#define Tutorial_Badges EVT_SAVE_FLAG(0x05E) +#define Tutorial_SaveBlock EVT_SAVE_FLAG(0x05F) +#define Tutorial_HeartBlock EVT_SAVE_FLAG(0x060) +#define Tutorial_GotItem EVT_SAVE_FLAG(0x061) +#define KMR20_ReunitedWithLuigi EVT_SAVE_FLAG(0x062) ///< And saw him whistling +#define KMR20_Gift_LuigisAutograph EVT_SAVE_FLAG(0x063) +#define KMR02_Gift_TheTape EVT_SAVE_FLAG(0x064) +#define Tutorial_GotStarPiece EVT_SAVE_FLAG(0x065) +#define FoughtTheMaster EVT_SAVE_FLAG(0x066) +#define KMR20_ReadThankYouLetterFromKoopaVillage EVT_SAVE_FLAG(0x067) +#define KMR02_Goombario_RelayedMessage EVT_SAVE_FLAG(0x068) +#define KMR20_CaughtLuigiInBasement EVT_SAVE_FLAG(0x069) +#define KMR20_CaughtLuigiReadingLetter EVT_SAVE_FLAG(0x06A) +#define KMR20_FoundLuigisDiary EVT_SAVE_FLAG(0x06B) +#define KMR20_CheckedDeskForMail EVT_SAVE_FLAG(0x06C) +#define KMR20_ChasedOffShyGuy EVT_SAVE_FLAG(0x06D) +#define KMR10_KnockedSpringOutOfTree EVT_SAVE_FLAG(0x06E) extern MapConfig kmr_00_config; extern MapConfig kmr_02_config; diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index 021bb7b55c..74815d299f 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -52,10 +52,10 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802404CC_8B053C); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -76,16 +76,16 @@ ApiStatus N(func_802404CC_8B053C)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -120,7 +120,7 @@ ApiStatus N(func_80240A7C_8B0AEC)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -139,9 +139,9 @@ ApiStatus N(func_80240B00_8B0B70)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_kmr/kmr_03/8C8140.c b/src/world/area_kmr/kmr_03/8C8140.c index 8960f7811f..2a844ed305 100644 --- a/src/world/area_kmr/kmr_03/8C8140.c +++ b/src/world/area_kmr/kmr_03/8C8140.c @@ -24,21 +24,21 @@ EvtSource N(802407A8) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_GOOMBA_VILLAGE; + EVT_WORLD_LOCATION = LOCATION_GOOMBA_VILLAGE; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); SetCamLeadPlayer(0, 0); - SI_AREA_FLAG(8) = 0; + EVT_AREA_FLAG(8) = 0; MakeNpcs(0, N(npcGroupList_80241450)); ClearDefeatedEnemies(); await N(makeEntities); await N(802422B8); spawn N(802406C0); - GetEntryID(SI_VAR(0)); - if (SI_VAR(0) != 2) { - SI_VAR(0) = N(802407A8); + GetEntryID(EVT_VAR(0)); + if (EVT_VAR(0) != 2) { + EVT_VAR(0) = N(802407A8); spawn EnterWalk; } else { spawn N(802407A8); @@ -60,7 +60,7 @@ NpcSettings N(npcSettings_80240950) = { EvtSource N(8024097C) = SCRIPT({ 1: - if (SI_AREA_FLAG(8) == 1) { + if (EVT_AREA_FLAG(8) == 1) { 100: AwaitPlayerLeave(294, 123, 170); EnableNpcAI(0, 0); @@ -68,11 +68,11 @@ EvtSource N(8024097C) = SCRIPT({ SetNpcSpeed(NPC_GOOMPA, 4.0); SetNpcAnimation(NPC_GOOMPA, NPC_ANIM_goompa_Palette_00_Anim_3); N(func_802401B0_8C8140)(); - GetAngleToPlayer(0, SI_VAR(2)); - loop SI_VAR(1) { - GetNpcPos(NPC_GOOMPA, SI_VAR(7), SI_VAR(8), SI_VAR(9)); - AddVectorPolar(SI_VAR(7), SI_VAR(9), 4.0, SI_VAR(2)); - SetNpcPos(NPC_GOOMPA, SI_VAR(7), SI_VAR(8), SI_VAR(9)); + GetAngleToPlayer(0, EVT_VAR(2)); + loop EVT_VAR(1) { + GetNpcPos(NPC_GOOMPA, EVT_VAR(7), EVT_VAR(8), EVT_VAR(9)); + AddVectorPolar(EVT_VAR(7), EVT_VAR(9), 4.0, EVT_VAR(2)); + SetNpcPos(NPC_GOOMPA, EVT_VAR(7), EVT_VAR(8), EVT_VAR(9)); sleep 1; } PlayerFaceNpc(0, 3); @@ -89,12 +89,12 @@ EvtSource N(8024097C) = SCRIPT({ EvtSource N(npcAI_80240B50) = SCRIPT({ 1: - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { == STORY_CH0_FELL_OFF_CLIFF { 89: N(UnkPositionFunc)(-118, 86, -70, -15); sleep 1; - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { goto 89; } DisablePlayerInput(TRUE); @@ -116,7 +116,7 @@ EvtSource N(npcAI_80240B50) = SCRIPT({ SetPlayerSpeed(2.0); PlayerMoveTo(-38, 68, 0); } - GetNpcPos(NPC_GOOMPA, SI_VAR(7), SI_VAR(8), SI_VAR(9)); + GetNpcPos(NPC_GOOMPA, EVT_VAR(7), EVT_VAR(8), EVT_VAR(9)); SetNpcSpeed(NPC_GOOMPA, 4.0); SetNpcAnimation(NPC_GOOMPA, NPC_ANIM_goompa_Palette_00_Anim_3); NpcMoveTo(NPC_GOOMPA, 0, 70, 0); @@ -129,10 +129,10 @@ EvtSource N(npcAI_80240B50) = SCRIPT({ sleep 30; SpeakToPlayer(NPC_GOOMPA, NPC_ANIM_goompa_Palette_00_Anim_8, NPC_ANIM_goompa_Palette_00_Anim_1, 0, MESSAGE_ID(0x0B, 0x00A8)); N(UnkFunc41)(0, 5); - SI_STORY_PROGRESS = STORY_CH0_GOOMPA_JOINED_PARTY; + EVT_STORY_PROGRESS = STORY_CH0_GOOMPA_JOINED_PARTY; UseSettingsFrom(0, -220, 20, -72); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetCamSpeed(0, 3.0); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); @@ -148,24 +148,24 @@ 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); - SI_MAP_VAR(0) += 1; - if (SI_MAP_VAR(0) < 3) { - GetOwnerEncounterTrigger(SI_VAR(0)); - match SI_VAR(0) { + EVT_MAP_VAR(0) += 1; + if (EVT_MAP_VAR(0) < 3) { + GetOwnerEncounterTrigger(EVT_VAR(0)); + match EVT_VAR(0) { == 2 { SetNpcVar(0, 0, 1); - if (SI_AREA_FLAG(6) == 1) { + if (EVT_AREA_FLAG(6) == 1) { } else { - SI_AREA_FLAG(6) = 1; - SI_AREA_FLAG(7) = 0; + EVT_AREA_FLAG(6) = 1; + EVT_AREA_FLAG(7) = 0; } } == 4 { SetNpcVar(0, 0, 1); - if (SI_AREA_FLAG(7) == 1) { + if (EVT_AREA_FLAG(7) == 1) { } else { - SI_AREA_FLAG(6) = 0; - SI_AREA_FLAG(7) = 1; + EVT_AREA_FLAG(6) = 0; + EVT_AREA_FLAG(7) = 1; } } } @@ -173,8 +173,8 @@ EvtSource N(hit_80240F64) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM_goompa_Palette_00_Anim_3); } else { sleep 10; - GetNpcPos(NPC_GOOMPA, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetNpcPos(NPC_GOOMPA, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetNpcPos(NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetNpcFlagBits(NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE); SetNpcPos(NPC_GOOMPA, 0, -1000, 0); SetNpcFlagBits(NPC_GOOMPA, NPC_FLAG_100, FALSE); @@ -188,7 +188,7 @@ EvtSource N(init_802411A8) = SCRIPT({ BindNpcIdle(NPC_SELF, N(npcAI_80240B50)); BindNpcAux(-1, N(8024097C)); BindNpcHit(-1, N(hit_80240F64)); - match SI_STORY_PROGRESS { + match EVT_STORY_PROGRESS { >= STORY_CH0_GOOMPA_JOINED_PARTY { SetNpcFlagBits(NPC_SELF, NPC_FLAG_GRAVITY, FALSE); SetNpcFlagBits(NPC_SELF, NPC_FLAG_ENABLE_HIT_SCRIPT, TRUE); @@ -239,45 +239,45 @@ static s32 N(pad_1468)[] = { EvtSource N(80241470) = SCRIPT({ ModifyColliderFlags(0, 9, 0x7FFFFE00); - SI_STORY_PROGRESS = STORY_CH0_LEFT_THE_PLAYGROUND; + EVT_STORY_PROGRESS = STORY_CH0_LEFT_THE_PLAYGROUND; }); EvtSource N(802414A8) = SCRIPT({ - SI_SAVE_FLAG(54) = 1; + EVT_SAVE_FLAG(54) = 1; }); 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)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetCamTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); sleep 1; goto 0; }); EvtSource N(makeEntities) = SCRIPT({ - if (SI_STORY_PROGRESS < STORY_CH0_LEFT_THE_PLAYGROUND) { + if (EVT_STORY_PROGRESS < STORY_CH0_LEFT_THE_PLAYGROUND) { MakeEntity(0x802EA10C, 45, 0, 70, 15, MAKE_ENTITY_END); AssignScript(N(80241470)); } else { ModifyColliderFlags(0, 9, 0x7FFFFE00); } - if (SI_SAVE_FLAG(54) == 0) { + if (EVT_SAVE_FLAG(54) == 0) { MakeEntity(0x802EA19C, 230, 0, 310, 15, MAKE_ENTITY_END); AssignScript(N(802414A8)); } MakeEntity(0x802EA588, 230, 60, 310, 15, ITEM_REPEL_GEL, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(52)); + AssignBlockFlag(EVT_SAVE_FLAG(52)); MakeEntity(0x802EA0C4, 230, 50, -160, 15, MAKE_ENTITY_END); MakeEntity(0x802EA0C4, 165, 0, 380, 20, MAKE_ENTITY_END); MakeEntity(0x802EA564, -170, 0, 370, 43, ITEM_COIN, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(50)); + AssignBlockFlag(EVT_SAVE_FLAG(50)); MakeEntity(0x802EAA54, 345, 75, -250, 0, ITEM_WATER, MAKE_ENTITY_END); - MakeItemEntity(ITEM_COIN, 345, 205, -250, 17, SI_SAVE_FLAG(56)); - MakeItemEntity(ITEM_COIN, 345, 230, -250, 17, SI_SAVE_FLAG(57)); - MakeItemEntity(ITEM_COIN, 345, 255, -250, 17, SI_SAVE_FLAG(58)); - MakeItemEntity(ITEM_COIN, 345, 280, -250, 17, SI_SAVE_FLAG(59)); - MakeItemEntity(ITEM_FIRE_FLOWER, 229, 250, -156, 17, SI_SAVE_FLAG(49)); + MakeItemEntity(ITEM_COIN, 345, 205, -250, 17, EVT_SAVE_FLAG(56)); + MakeItemEntity(ITEM_COIN, 345, 230, -250, 17, EVT_SAVE_FLAG(57)); + MakeItemEntity(ITEM_COIN, 345, 255, -250, 17, EVT_SAVE_FLAG(58)); + MakeItemEntity(ITEM_COIN, 345, 280, -250, 17, EVT_SAVE_FLAG(59)); + MakeItemEntity(ITEM_FIRE_FLOWER, 229, 250, -156, 17, EVT_SAVE_FLAG(49)); MakeEntity(0x802EAB04, 300, 0, 150, 0, ITEM_PULSE_STONE, MAKE_ENTITY_END); - AssignPanelFlag(SI_SAVE_FLAG(88)); + AssignPanelFlag(EVT_SAVE_FLAG(88)); MakeEntity(0x802EA7E0, 130, 60, 0, 0, MAKE_ENTITY_END); }); diff --git a/src/world/area_kmr/kmr_03/8C83A0.c b/src/world/area_kmr/kmr_03/8C83A0.c index 757f245e69..5cbf2d4bc6 100644 --- a/src/world/area_kmr/kmr_03/8C83A0.c +++ b/src/world/area_kmr/kmr_03/8C83A0.c @@ -38,20 +38,20 @@ FoliageVectorList N(treeEffectVectors_Tree1) = { }; EvtSource N(tree1_Callback) = SCRIPT({ - if (SI_SAVE_FLAG(53) == TRUE) { + if (EVT_SAVE_FLAG(53) == TRUE) { return; } - if (SI_MAP_FLAG(10) == TRUE) { + if (EVT_MAP_FLAG(10) == TRUE) { return; } sleep 10; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(0) < -30) { - MakeItemEntity(ITEM_MUSHROOM, -23, 100, 35, 13, SI_SAVE_FLAG(53)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(0) < -30) { + MakeItemEntity(ITEM_MUSHROOM, -23, 100, 35, 13, EVT_SAVE_FLAG(53)); } else { - MakeItemEntity(ITEM_MUSHROOM, -85, 100, 16, 13, SI_SAVE_FLAG(53)); + MakeItemEntity(ITEM_MUSHROOM, -85, 100, 16, 13, EVT_SAVE_FLAG(53)); } - SI_MAP_FLAG(10) = 1; + EVT_MAP_FLAG(10) = 1; }); ShakeTreeConfig N(tree1) = { @@ -64,10 +64,10 @@ ShakeTreeConfig N(tree1) = { Vec4f N(tree1Point) = { -42.0f, 0.0f, -13.0f, 0.0f }; EvtSource N(802422B8) = SCRIPT({ - SI_VAR(0) = N(bush1); + EVT_VAR(0) = N(bush1); bind N(searchBush) TRIGGER_WALL_PRESS_A 53; - SI_VAR(0) = N(tree1); + EVT_VAR(0) = N(tree1); bind N(shakeTree) TRIGGER_WALL_HAMMER 52; bind N(shakeTree) TRIGGER_POINT_BOMB N(tree1Point); }); diff --git a/src/world/area_kmr/kmr_03/8C85E0.c b/src/world/area_kmr/kmr_03/8C85E0.c index edac445977..b7328caba5 100644 --- a/src/world/area_kmr/kmr_03/8C85E0.c +++ b/src/world/area_kmr/kmr_03/8C85E0.c @@ -6,16 +6,16 @@ EvtSource N(80242340) = SCRIPT({ SetCamDistance(0, 700.0); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); - if (SI_STORY_PROGRESS >= STORY_CH0_FOUND_HAMMER) { + if (EVT_STORY_PROGRESS >= STORY_CH0_FOUND_HAMMER) { SetPlayerPos(0, -1000, 0); DisablePlayerInput(TRUE); SetPlayerPos(-224, 20, -80); SetNpcPos(NPC_PARTNER, -224, 20, -80); sleep 20; SetCamSpeed(0, 3.0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); @@ -24,8 +24,8 @@ EvtSource N(80242340) = SCRIPT({ } DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPlayerPos(SI_VAR(0), -1000, SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPlayerPos(EVT_VAR(0), -1000, EVT_VAR(2)); sleep 30; SetCamDistance(0, 220); SetCamSpeed(0, 1.0); @@ -45,10 +45,10 @@ EvtSource N(80242340) = SCRIPT({ InterpPlayerYaw(90, 0); 0: sleep 1; - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SI_VAR(1) += -2; - SetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - if (SI_VAR(1) > 86) { + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + EVT_VAR(1) += -2; + SetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + if (EVT_VAR(1) > 86) { goto 0; } SetPlayerPos(-310, 20, -80); @@ -67,15 +67,15 @@ EvtSource N(80242340) = SCRIPT({ SetPlayerAnimation(ANIM_BEFORE_JUMP); sleep 10; SetPlayerAnimation(ANIM_MIDAIR_STILL); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); SetPlayerJumpscale(1.0); - PlayerJump(SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); + PlayerJump(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 10); SetPlayerAnimation(ANIM_10002); spawn { SetCamSpeed(0, 3.0); - GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); - UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + UseSettingsFrom(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); + SetPanTarget(0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2)); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); diff --git a/src/world/area_kmr/kmr_06/8D2A10.c b/src/world/area_kmr/kmr_06/8D2A10.c index e2cd20fb44..495a28e3f1 100644 --- a/src/world/area_kmr/kmr_06/8D2A10.c +++ b/src/world/area_kmr/kmr_06/8D2A10.c @@ -16,9 +16,9 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_06/8D2A10", func_80241C78_8D3188); 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)); - s32 mapVar12 = get_variable(script, SI_MAP_VAR(12)); + s32* mapVar10 = get_variable(script, EVT_MAP_VAR(10)); + s32 mapVar11 = get_variable(script, EVT_MAP_VAR(11)); + s32 mapVar12 = get_variable(script, EVT_MAP_VAR(12)); free_generic_entity(mapVar10[1]); @@ -26,9 +26,9 @@ ApiStatus func_80241CC8_8D31D8(Evt* script, s32 isInitialCall) { heap_free(mapVar11); heap_free(mapVar12); - set_variable(script, SI_MAP_VAR(10), NULL); - set_variable(script, SI_MAP_VAR(11), NULL); - set_variable(script, SI_MAP_VAR(12), NULL); + set_variable(script, EVT_MAP_VAR(10), NULL); + set_variable(script, EVT_MAP_VAR(11), NULL); + set_variable(script, EVT_MAP_VAR(12), NULL); return ApiStatus_DONE2; } diff --git a/src/world/area_kmr/kmr_07/8D3DC0.c b/src/world/area_kmr/kmr_07/8D3DC0.c index fabc2e33ea..e7e9531846 100644 --- a/src/world/area_kmr/kmr_07/8D3DC0.c +++ b/src/world/area_kmr/kmr_07/8D3DC0.c @@ -26,7 +26,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_07/8D3DC0", func_802407F4_8D45B4); // see func_802402BC_8D878C #ifdef NON_MATCHING ApiStatus func_80240A6C_8D482C(Evt* script, s32 isInitialCall) { - Entity* entity = get_entity_by_index(get_variable(NULL, SI_MAP_VAR(0))); + Entity* entity = get_entity_by_index(get_variable(NULL, EVT_MAP_VAR(0))); if (entity == NULL) { return ApiStatus_BLOCK; diff --git a/src/world/area_kmr/kmr_12/events.c b/src/world/area_kmr/kmr_12/events.c index be8cc6852d..fcb5ad2f97 100644 --- a/src/world/area_kmr/kmr_12/events.c +++ b/src/world/area_kmr/kmr_12/events.c @@ -11,7 +11,7 @@ EvtSource N(BindExits) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_GOOMBA_ROAD; + EVT_WORLD_LOCATION = LOCATION_GOOMBA_ROAD; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -19,7 +19,7 @@ EvtSource N(main) = SCRIPT({ MakeNpcs(0, N(npcGroupList)); await N(MakeEntities); spawn N(PlayMusic); - SI_VAR(0) = N(BindExits); + EVT_VAR(0) = N(BindExits); spawn EnterWalk; sleep 1; bind N(ReadWestSign) TRIGGER_WALL_PRESS_A 10; @@ -63,19 +63,19 @@ EvtSource N(ReadWestSign) = SCRIPT({ ShowMessageAtScreenPos(MSG_kmr_12_sign_trap, 160, 40); resume group 1; - SI_FLAG(0) = FALSE; + EVT_FLAG(0) = FALSE; GetGoomba(); - if (SI_VAR(0) != FALSE) { - GetNpcVar(NPC_GOOMBA, 0, SI_VAR(0)); - if (SI_VAR(0) == FALSE) { + if (EVT_VAR(0) != FALSE) { + GetNpcVar(NPC_GOOMBA, 0, EVT_VAR(0)); + if (EVT_VAR(0) == FALSE) { // Trigger Goomba to peel off SetNpcVar(NPC_GOOMBA, 0, TRUE); - SI_FLAG(0) = TRUE; + EVT_FLAG(0) = TRUE; sleep 10; } } DisablePlayerInput(FALSE); - if (SI_FLAG(0) == TRUE) { + if (EVT_FLAG(0) == TRUE) { unbind; } @@ -93,25 +93,25 @@ EvtSource N(GoombaIdle) = SCRIPT({ // Wait until read_sign sets NPC var 0 0: - GetSelfVar(0, SI_VAR(0)); + GetSelfVar(0, EVT_VAR(0)); sleep 1; - if (SI_VAR(0) == FALSE) { + if (EVT_VAR(0) == FALSE) { goto 0; } // Peel and jump off the sign SetNpcFlagBits(NPC_SELF, 0x240000, TRUE); sleep 3; - SI_VAR(0) = 0.0; + EVT_VAR(0) = 0.0; loop 9 { - SI_VAR(0) += 10.0; - SetNpcRotation(NPC_SELF, 0, SI_VAR(0), 0); + EVT_VAR(0) += 10.0; + SetNpcRotation(NPC_SELF, 0, EVT_VAR(0), 0); sleep 1; } SetNpcAnimation(NPC_SELF, NPC_ANIM_goomba_normal_still); loop 9 { - SI_VAR(0) += 10.0; - SetNpcRotation(NPC_SELF, 0, SI_VAR(0), 0); + EVT_VAR(0) += 10.0; + SetNpcRotation(NPC_SELF, 0, EVT_VAR(0), 0); sleep 1; } SetNpcAnimation(NPC_SELF, NPC_ANIM_goomba_normal_dizzy); diff --git a/src/world/area_kzn/kzn_19/C8DBB0.c b/src/world/area_kzn/kzn_19/C8DBB0.c index 59d26c5ed1..37fb52ee45 100644 --- a/src/world/area_kzn/kzn_19/C8DBB0.c +++ b/src/world/area_kzn/kzn_19/C8DBB0.c @@ -22,7 +22,7 @@ ApiStatus N(func_80240358_C8DF08)(Evt* script, s32 isInitialCall) { if (isInitialCall) { arn_07_struct* ptr = heap_malloc(sizeof(arn_07_struct)); script->varTable[0] = ptr; - set_variable(NULL, SI_MAP_VAR(1), ptr); + set_variable(NULL, EVT_MAP_VAR(1), ptr); ptr->unk_38 = get_variable(script, *args++); ptr->unk_3C = get_variable(script, *args++); ptr->unk_0C = get_float_variable(script, *args++); diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index 72f42875c4..e1455d14cd 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -31,10 +31,10 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024076C_7EB47C); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -55,16 +55,16 @@ ApiStatus N(func_8024076C_7EB47C)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -99,7 +99,7 @@ ApiStatus N(func_80240D1C_7EBA2C)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -118,9 +118,9 @@ ApiStatus N(func_80240DA0_7EBAB0)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; @@ -378,7 +378,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241FF0_7ECD00); ApiStatus N(SetDojoBattle)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; - gCurrentEncounter.encounterList[enemy->encounterIndex]->battle = N(dojoBattleIDs)[get_variable(script, SI_SAVE_VAR(28))]; + gCurrentEncounter.encounterList[enemy->encounterIndex]->battle = N(dojoBattleIDs)[get_variable(script, EVT_SAVE_VAR(28))]; return ApiStatus_DONE2; } diff --git a/src/world/area_mac/mac_01/800880.c b/src/world/area_mac/mac_01/800880.c index b635d72670..4d1cf596c2 100644 --- a/src/world/area_mac/mac_01/800880.c +++ b/src/world/area_mac/mac_01/800880.c @@ -16,7 +16,7 @@ ApiStatus func_80240000_800880(Evt* 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)); + s32* var1 = get_variable(NULL, EVT_MAP_VAR(2)); set_item_entity_flags(gGameStatusPtr->shopItemEntities[itemIndex].index, 0x40); set_variable(NULL, var1[itemIndex], 1); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 1126a33ee9..600d416c55 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -161,10 +161,10 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024204C_8028CC); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -185,16 +185,16 @@ ApiStatus N(func_8024204C_8028CC)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -229,7 +229,7 @@ ApiStatus N(func_802425FC_802E7C)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -248,9 +248,9 @@ ApiStatus N(func_80242680_802F00)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index f9a94c4f82..cc69abfb8c 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -140,10 +140,10 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802418FC_824BBC); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -164,16 +164,16 @@ ApiStatus N(func_802418FC_824BBC)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -208,7 +208,7 @@ ApiStatus N(func_80241EAC_82516C)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -227,9 +227,9 @@ ApiStatus N(func_80241F30_8251F0)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index 217b3220d9..f1012f643d 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -33,10 +33,10 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802405EC_831DEC); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -57,16 +57,16 @@ ApiStatus N(func_802405EC_831DEC)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -101,7 +101,7 @@ ApiStatus N(func_80240B9C_83239C)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -120,9 +120,9 @@ ApiStatus N(func_80240C20_832420)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index d97dcbce69..5f856e0b9a 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -31,10 +31,10 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024059C_84316C); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -55,16 +55,16 @@ ApiStatus N(func_8024059C_84316C)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -99,7 +99,7 @@ ApiStatus N(func_80240B4C_84371C)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -118,9 +118,9 @@ ApiStatus N(func_80240BD0_8437A0)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index 726932c78e..3e37391fc3 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -151,10 +151,10 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024145C_8535CC); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -175,16 +175,16 @@ ApiStatus N(func_8024145C_8535CC)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -219,7 +219,7 @@ ApiStatus N(func_80241A0C_853B7C)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -238,9 +238,9 @@ ApiStatus N(func_80241A90_853C00)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index c826cf3b4b..750fd9bbe3 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -74,10 +74,10 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240EA4_9C6284); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -98,16 +98,16 @@ ApiStatus N(func_80240EA4_9C6284)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -142,7 +142,7 @@ ApiStatus N(func_80241454_9C6834)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -161,9 +161,9 @@ ApiStatus N(func_802414D8_9C68B8)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index 926143239b..253bccd6bf 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -143,10 +143,10 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241A4C_9D8A6C); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -167,16 +167,16 @@ ApiStatus N(func_80241A4C_9D8A6C)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -211,7 +211,7 @@ ApiStatus N(func_80241FFC_9D901C)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -230,9 +230,9 @@ ApiStatus N(func_80242080_9D90A0)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_omo/omo_15/DE8770.c b/src/world/area_omo/omo_15/DE8770.c index f8ae0ce1cf..473f7e3c60 100644 --- a/src/world/area_omo/omo_15/DE8770.c +++ b/src/world/area_omo/omo_15/DE8770.c @@ -18,7 +18,7 @@ ApiStatus N(func_8024004C_DE87BC)(Evt* script, s32 isInitialCall) { if (isInitialCall) { arn_07_struct* ptr = heap_malloc(sizeof(arn_07_struct)); script->varTable[0] = ptr; - set_variable(NULL, SI_MAP_VAR(1), ptr); + set_variable(NULL, EVT_MAP_VAR(1), ptr); ptr->unk_38 = get_variable(script, *args++); ptr->unk_3C = get_variable(script, *args++); ptr->unk_0C = get_float_variable(script, *args++); diff --git a/src/world/area_pra/pra_32/D86A20.c b/src/world/area_pra/pra_32/D86A20.c index f73fe0ddc9..49aa535d63 100644 --- a/src/world/area_pra/pra_32/D86A20.c +++ b/src/world/area_pra/pra_32/D86A20.c @@ -18,7 +18,7 @@ ApiStatus N(func_8024006C_D86A6C)(Evt* script, s32 isInitialCall) { if (isInitialCall) { arn_07_struct* ptr = heap_malloc(sizeof(arn_07_struct)); script->varTable[0] = ptr; - set_variable(NULL, SI_MAP_VAR(1), ptr); + set_variable(NULL, EVT_MAP_VAR(1), ptr); ptr->unk_38 = get_variable(script, *args++); ptr->unk_3C = get_variable(script, *args++); ptr->unk_0C = get_float_variable(script, *args++); diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index 56351cb833..09c3ce1b32 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -109,10 +109,10 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024083C_CF83AC); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -133,16 +133,16 @@ ApiStatus N(func_8024083C_CF83AC)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -177,7 +177,7 @@ ApiStatus N(func_80240DEC_CF895C)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -196,9 +196,9 @@ ApiStatus N(func_80240E70_CF89E0)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 07414b962d..c39ce00099 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -51,10 +51,10 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240C68_D06398); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -75,16 +75,16 @@ ApiStatus N(func_80240C68_D06398)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -119,7 +119,7 @@ ApiStatus N(begin_battle_D06948)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -138,9 +138,9 @@ ApiStatus N(func_8024129C_D069CC)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index 9d628a1af7..fd203d5f4b 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -33,10 +33,10 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_8024090C_D3AEDC); /* 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)); - u16 temp_s6 = get_variable(script, SI_SAVE_VAR(350)); - u16 phi_s5 = get_variable(script, SI_SAVE_VAR(351)); + u16 phi_s0 = get_variable(script, EVT_SAVE_FLAG(1768)); + u16 phi_s7 = get_variable(script, EVT_SAVE_FLAG(1769)); + u16 temp_s6 = get_variable(script, EVT_SAVE_VAR(350)); + u16 phi_s5 = get_variable(script, EVT_SAVE_VAR(351)); s32 var; s32 i; @@ -57,16 +57,16 @@ ApiStatus N(func_8024090C_D3AEDC)(Evt *script, s32 isInitialCall) { if (rand_int(100) < 30) { phi_s5 = rand_int(temp_s2 - 1); temp_s6 = temp_s3; - set_variable(script, SI_SAVE_VAR(350), temp_s6); - set_variable(script, SI_SAVE_VAR(351), phi_s5); + set_variable(script, EVT_SAVE_VAR(350), temp_s6); + set_variable(script, EVT_SAVE_VAR(351), phi_s5); phi_s0 = 1; } } - set_variable(script, SI_SAVE_FLAG(1768), phi_s0); - set_variable(script, SI_SAVE_FLAG(1769), phi_s7); - temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); + set_variable(script, EVT_SAVE_FLAG(1768), phi_s0); + set_variable(script, EVT_SAVE_FLAG(1769), phi_s7); + temp_s0_2 = get_variable(NULL, EVT_SAVE_VAR(352)); + temp_v0 = get_variable(NULL, EVT_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -101,7 +101,7 @@ ApiStatus N(func_80240EBC_D3B48C)(Evt *script, s32 isInitialCall) { playerData->quizzesAnswered++; } - if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, SI_SAVE_VAR(352))]) { + if (script->varTable[0] == N(quizAnswers)[get_variable(NULL, EVT_SAVE_VAR(352))]) { script->varTable[0] = 1; playerData->quizzesCorrect++; } else { @@ -120,9 +120,9 @@ ApiStatus N(func_80240F40_D3B510)(Evt *script, s32 isInitialCall) { if (isInitialCall) { Effect** effect = &D_8024DFE0; - *effect = playFX_4E(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE4 = playFX_54(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3))); - D_8024DFE8 = playFX_80(0, get_variable(script, SI_ARRAY(1)), get_variable(script, SI_ARRAY(2)), get_variable(script, SI_ARRAY(3)), 1.0f, 0); + *effect = playFX_4E(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE4 = playFX_54(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3))); + D_8024DFE8 = playFX_80(0, get_variable(script, EVT_ARRAY(1)), get_variable(script, EVT_ARRAY(2)), get_variable(script, EVT_ARRAY(3)), 1.0f, 0); effectPtr = (*effect)->unk_0C; effectPtr->unk_18 = 0; diff --git a/src/world/area_sbk/sbk_00/929270.c b/src/world/area_sbk/sbk_00/929270.c index 9419d40826..840b54bfd8 100644 --- a/src/world/area_sbk/sbk_00/929270.c +++ b/src/world/area_sbk/sbk_00/929270.c @@ -28,9 +28,9 @@ EvtSource N(80240198) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_DRY_DRY_DESERT; + EVT_WORLD_LOCATION = LOCATION_DRY_DRY_DESERT; SetSpriteShading(-1); - if (SI_STORY_PROGRESS == STORY_CH2_GOT_PULSE_STONE) { + if (EVT_STORY_PROGRESS == STORY_CH2_GOT_PULSE_STONE) { DisablePulseStone(0); } SetCamPerspective(0, 3, 25, 16, 4096); @@ -41,6 +41,6 @@ EvtSource N(main) = SCRIPT({ await N(makeEntities); N(SpawnSunEffect)(); SetMusicTrack(0, SONG_DRY_DRY_DESERT, 0, 8); - SI_VAR(0) = N(80240198); + EVT_VAR(0) = N(80240198); spawn EnterWalk; }); diff --git a/src/world/area_sbk/sbk_00/9292B0.c b/src/world/area_sbk/sbk_00/9292B0.c index 07ee3a5220..582e7f3546 100644 --- a/src/world/area_sbk/sbk_00/9292B0.c +++ b/src/world/area_sbk/sbk_00/9292B0.c @@ -116,7 +116,7 @@ static s32 N(pad_78C) = { EvtSource N(makeEntities) = SCRIPT({ MakeEntity(0x802EA564, -230, 0, 155, 0, ITEM_FRIGHT_JAR, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(797)); + AssignBlockFlag(EVT_SAVE_FLAG(797)); MakeEntity(0x802EA564, 160, 0, 205, 0, ITEM_COIN, MAKE_ENTITY_END); - AssignBlockFlag(SI_SAVE_FLAG(798)); + AssignBlockFlag(EVT_SAVE_FLAG(798)); }); diff --git a/src/world/area_sbk/sbk_01/929A90.c b/src/world/area_sbk/sbk_01/929A90.c index 7ca0612c03..c32cfcb975 100644 --- a/src/world/area_sbk/sbk_01/929A90.c +++ b/src/world/area_sbk/sbk_01/929A90.c @@ -34,9 +34,9 @@ EvtSource N(802401F4) = SCRIPT({ }); EvtSource N(main) = SCRIPT({ - SI_WORLD_LOCATION = LOCATION_DRY_DRY_DESERT; + EVT_WORLD_LOCATION = LOCATION_DRY_DRY_DESERT; SetSpriteShading(-1); - if (SI_STORY_PROGRESS == STORY_CH2_GOT_PULSE_STONE) { + if (EVT_STORY_PROGRESS == STORY_CH2_GOT_PULSE_STONE) { DisablePulseStone(0); } SetCamPerspective(0, 3, 25, 16, 4096); @@ -46,6 +46,6 @@ EvtSource N(main) = SCRIPT({ MakeNpcs(0, N(npcGroupList_802407D8)); N(SpawnSunEffect)(); SetMusicTrack(0, SONG_DRY_DRY_DESERT, 0, 8); - SI_VAR(0) = N(802401F4); + EVT_VAR(0) = N(802401F4); spawn EnterWalk; }); diff --git a/src/world/area_sbk/sbk_02/92A2B0.c b/src/world/area_sbk/sbk_02/92A2B0.c index bfeb5b5b85..86228fa7d9 100644 --- a/src/world/area_sbk/sbk_02/92A2B0.c +++ b/src/world/area_sbk/sbk_02/92A2B0.c @@ -13,7 +13,7 @@ INCLUDE_ASM(s32, "world/area_sbk/sbk_02/92A2B0", func_80240000_92A2B0); #include "world/common/UnkFunc26.inc.c" -// Accesses SI_MAP_VAR(0) which is an effect handle +// Accesses EVT_MAP_VAR(0) which is an effect handle INCLUDE_ASM(s32, "world/area_sbk/sbk_02/92A2B0", func_80240338_92A5E8); INCLUDE_ASM(s32, "world/area_sbk/sbk_02/92A2B0", func_80240364_92A614); diff --git a/src/world/area_trd/trd_10/9C2910.c b/src/world/area_trd/trd_10/9C2910.c index fa96454be3..5b22c71793 100644 --- a/src/world/area_trd/trd_10/9C2910.c +++ b/src/world/area_trd/trd_10/9C2910.c @@ -18,7 +18,7 @@ ApiStatus N(func_8024004C_9C295C)(Evt* script, s32 isInitialCall) { if (isInitialCall) { arn_07_struct* ptr = heap_malloc(sizeof(arn_07_struct)); script->varTable[0] = ptr; - set_variable(NULL, SI_MAP_VAR(1), ptr); + set_variable(NULL, EVT_MAP_VAR(1), ptr); ptr->unk_38 = get_variable(script, *args++); ptr->unk_3C = get_variable(script, *args++); ptr->unk_0C = get_float_variable(script, *args++); diff --git a/src/world/area_tst/tst_04/B1B570.c b/src/world/area_tst/tst_04/B1B570.c index 87c64b7ebf..aeea6e5fe7 100644 --- a/src/world/area_tst/tst_04/B1B570.c +++ b/src/world/area_tst/tst_04/B1B570.c @@ -47,14 +47,14 @@ ApiStatus func_802400FC_B1B66C(Evt* script, s32 isInitialCall) { f32 sin2; f32 cos2; - theta1 = (get_variable(script, SI_VAR(0)) - 1) * TAU / 360.0f; + theta1 = (get_variable(script, EVT_VAR(0)) - 1) * TAU / 360.0f; sinTemp = sin_rad(theta1); cosTemp = cos_rad(theta1); sin1 = -sinTemp * dist; cos1 = cosTemp * dist; - theta2 = (get_variable(script, SI_VAR(0)) * TAU) / 360.0f; + theta2 = (get_variable(script, EVT_VAR(0)) * TAU) / 360.0f; sin2 = sin_rad(theta2); cos2 = cos_rad(theta2); diff --git a/src/world/common/GetCamVfov.inc.c b/src/world/common/GetCamVfov.inc.c index c8ffb5bd95..3971384cb7 100644 --- a/src/world/common/GetCamVfov.inc.c +++ b/src/world/common/GetCamVfov.inc.c @@ -5,6 +5,6 @@ ApiStatus N(GetCamVfov)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 cameraID = get_variable(script, *args++); - set_variable(script, *args++, SI_FIXED(gCameras[cameraID].vfov)); + set_variable(script, *args++, EVT_FIXED(gCameras[cameraID].vfov)); return ApiStatus_DONE2; } diff --git a/src/world/common/GetEncounterEnemyIsOwner.inc.c b/src/world/common/GetEncounterEnemyIsOwner.inc.c index 764e949af2..23bc095c07 100644 --- a/src/world/common/GetEncounterEnemyIsOwner.inc.c +++ b/src/world/common/GetEncounterEnemyIsOwner.inc.c @@ -4,6 +4,6 @@ ApiStatus N(GetEncounterEnemyIsOwner)(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; - set_variable(script, SI_VAR(0), gCurrentEncounter.currentEnemy == enemy); + set_variable(script, EVT_VAR(0), gCurrentEncounter.currentEnemy == enemy); return ApiStatus_DONE2; } diff --git a/src/world/common/GetEntryPos.inc.c b/src/world/common/GetEntryPos.inc.c index 2b212ebebc..7910afecd0 100644 --- a/src/world/common/GetEntryPos.inc.c +++ b/src/world/common/GetEntryPos.inc.c @@ -3,11 +3,11 @@ ApiStatus N(GetEntryPos)(Evt* script, s32 isInitialCall) { MapConfig* mapConfig = get_current_map_header(); - s32 index = get_variable(script, SI_VAR(0)); + s32 index = get_variable(script, EVT_VAR(0)); - set_variable(script, SI_VAR(1), ((Vec4f*)*mapConfig->entryList)[index].x); - set_variable(script, SI_VAR(2), ((Vec4f*)*mapConfig->entryList)[index].y); - set_variable(script, SI_VAR(3), ((Vec4f*)*mapConfig->entryList)[index].z); - set_variable(script, SI_VAR(4), ((Vec4f*)*mapConfig->entryList)[index].yaw); + set_variable(script, EVT_VAR(1), ((Vec4f*)*mapConfig->entryList)[index].x); + set_variable(script, EVT_VAR(2), ((Vec4f*)*mapConfig->entryList)[index].y); + set_variable(script, EVT_VAR(3), ((Vec4f*)*mapConfig->entryList)[index].z); + set_variable(script, EVT_VAR(4), ((Vec4f*)*mapConfig->entryList)[index].yaw); return ApiStatus_DONE2; } diff --git a/src/world/common/GetGameStatus75.inc.c b/src/world/common/GetGameStatus75.inc.c index c77f9c7d1d..7329c7a1b6 100644 --- a/src/world/common/GetGameStatus75.inc.c +++ b/src/world/common/GetGameStatus75.inc.c @@ -2,6 +2,6 @@ #include "map.h" ApiStatus N(GetGameStatus75)(Evt* script, s32 isInitialCall) { - set_variable(script, SI_VAR(0), gGameStatusPtr->debugQuizmo); + set_variable(script, EVT_VAR(0), gGameStatusPtr->debugQuizmo); return ApiStatus_DONE2; } diff --git a/src/world/common/SomeXYZFunc2.inc.c b/src/world/common/SomeXYZFunc2.inc.c index 5eefd25420..e40564718d 100644 --- a/src/world/common/SomeXYZFunc2.inc.c +++ b/src/world/common/SomeXYZFunc2.inc.c @@ -9,9 +9,9 @@ ApiStatus N(SomeXYZFunc2)(Evt* script, s32 isInitialStatus) { f32 z = playerStatus->position.z; add_vec2D_polar(&x, &z, r, playerStatus->targetYaw); - set_float_variable(script, SI_VAR(0), x); - set_float_variable(script, SI_VAR(1), y); - set_float_variable(script, SI_VAR(2), z); + set_float_variable(script, EVT_VAR(0), x); + set_float_variable(script, EVT_VAR(1), y); + set_float_variable(script, EVT_VAR(2), z); return ApiStatus_DONE2; } diff --git a/src/world/common/UnkCameraFunc.inc.c b/src/world/common/UnkCameraFunc.inc.c index 9188bc1c24..0b2a5ef534 100644 --- a/src/world/common/UnkCameraFunc.inc.c +++ b/src/world/common/UnkCameraFunc.inc.c @@ -9,8 +9,8 @@ ApiStatus N(UnkCameraFunc)(Evt* script, s32 isInitialCall) { Bytecode out1 = *args++; Bytecode out2 = *args++; s32 cameraYaw = gCameras[gCurrentCameraID].currentYaw; - s32 outVal1 = get_variable(script, SI_ARRAY(1)) - (var2 * cos_deg(cameraYaw)); - s32 outVal2 = get_variable(script, SI_ARRAY(3)) - (var2 * sin_deg(cameraYaw)); + s32 outVal1 = get_variable(script, EVT_ARRAY(1)) - (var2 * cos_deg(cameraYaw)); + s32 outVal2 = get_variable(script, EVT_ARRAY(3)) - (var2 * sin_deg(cameraYaw)); outVal1 -= var0; outVal2 -= var1; diff --git a/src/world/common/UnkFunc18.inc.c b/src/world/common/UnkFunc18.inc.c index 063b2c7d61..b3c49c70d0 100644 --- a/src/world/common/UnkFunc18.inc.c +++ b/src/world/common/UnkFunc18.inc.c @@ -5,10 +5,10 @@ ApiStatus N(UnkFunc18)(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; Bytecode* args = script->ptrReadPos; s32 partnerIdx = get_variable(script, *args++); - s32 si_var = *args++; + s32 evt_var = *args++; playerData->partners[partnerIdx].level++; - set_variable(script, si_var, playerData->partners[partnerIdx].level); + set_variable(script, evt_var, playerData->partners[partnerIdx].level); return ApiStatus_DONE2; } diff --git a/src/world/common/UnkFunc20.inc.c b/src/world/common/UnkFunc20.inc.c index db4540619a..c9edeffdcd 100644 --- a/src/world/common/UnkFunc20.inc.c +++ b/src/world/common/UnkFunc20.inc.c @@ -6,11 +6,11 @@ ApiStatus N(UnkFunc20)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 entityIdx = get_variable(script, *args++); Entity* entity = get_entity_by_index(entityIdx); - s32 si_var = *args++; + s32 evt_var = *args++; EffectInstance* effectInst = playFX_52(0, entity->position.x, entity->position.y + 12.5f, entity->position.z, 0.7f, 0); - set_variable(script, si_var, (s32) effectInst); + set_variable(script, evt_var, (s32) effectInst); return ApiStatus_DONE2; } diff --git a/src/world/common/UnkPartnerFuncs.inc.c b/src/world/common/UnkPartnerFuncs.inc.c index 5841cb13a6..4154924b1c 100644 --- a/src/world/common/UnkPartnerFuncs.inc.c +++ b/src/world/common/UnkPartnerFuncs.inc.c @@ -25,9 +25,9 @@ ApiStatus N(UnkMovePartner)(Evt* script, s32 isInitialCall) { f32* z = (f32*) &script->functionTemp[3]; if (isInitialCall) { - *x = get_float_variable(script, SI_VAR(0)) / 60.0f; - *y = get_float_variable(script, SI_VAR(5)) / 60.0f; - *z = get_float_variable(script, SI_VAR(1)) / 60.0f; + *x = get_float_variable(script, EVT_VAR(0)) / 60.0f; + *y = get_float_variable(script, EVT_VAR(5)) / 60.0f; + *z = get_float_variable(script, EVT_VAR(1)) / 60.0f; script->functionTemp[0] = 60; } diff --git a/src/world/common/foliage.inc.c b/src/world/common/foliage.inc.c index 8aef96c2c2..6295770aec 100644 --- a/src/world/common/foliage.inc.c +++ b/src/world/common/foliage.inc.c @@ -79,172 +79,172 @@ ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall) { } 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)); + buf_use EVT_VAR(0); + buf_read EVT_VAR(1) EVT_VAR(2) EVT_VAR(3) EVT_VAR(4); + GetPlayerPos(EVT_VAR(5), EVT_VAR(15), EVT_VAR(7)); spawn { - SI_FLAG(0) = 0; - if (SI_VAR(1) != NULL) { + EVT_FLAG(0) = 0; + if (EVT_VAR(1) != NULL) { loop 5 { - buf_use SI_VAR(1); - buf_read SI_VAR(2); - loop SI_VAR(2) { - buf_read SI_VAR(3); - N(TransformFoliage)(SI_VAR(3), 0.1, 1, SI_VAR(15), 0); - if (SI_FLAG(0) == 0) { - SI_FLAG(0) = 1; - PlaySoundAtModel(SI_VAR(3), 339, 0); + buf_use EVT_VAR(1); + buf_read EVT_VAR(2); + loop EVT_VAR(2) { + buf_read EVT_VAR(3); + N(TransformFoliage)(EVT_VAR(3), 0.1, 1, EVT_VAR(15), 0); + if (EVT_FLAG(0) == 0) { + EVT_FLAG(0) = 1; + PlaySoundAtModel(EVT_VAR(3), 339, 0); } } sleep 1; - buf_use SI_VAR(1); - buf_read SI_VAR(2); - loop SI_VAR(2) { - buf_read SI_VAR(3); - N(TransformFoliage)(SI_VAR(3), 0.1, -1, SI_VAR(15), 0); + buf_use EVT_VAR(1); + buf_read EVT_VAR(2); + loop EVT_VAR(2) { + buf_read EVT_VAR(3); + N(TransformFoliage)(EVT_VAR(3), 0.1, -1, EVT_VAR(15), 0); } sleep 1; } - buf_use SI_VAR(1); - buf_read SI_VAR(2); - loop SI_VAR(2) { - buf_read SI_VAR(3); - TranslateModel(SI_VAR(3), 0, 0, 0); + buf_use EVT_VAR(1); + buf_read EVT_VAR(2); + loop EVT_VAR(2) { + buf_read EVT_VAR(3); + TranslateModel(EVT_VAR(3), 0, 0, 0); } sleep 1; } } spawn { - if (SI_VAR(2) != NULL) { - buf_use SI_VAR(2); - buf_read SI_VAR(3); - loop SI_VAR(3) { - buf_read SI_VAR(4); - buf_read SI_VAR(5) SI_VAR(6) SI_VAR(7); - buf_read SI_VAR(8) SI_VAR(9) SI_VAR(10); - if (SI_VAR(10) == 0) { - DropItemEntity(SI_VAR(4), SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9)); + if (EVT_VAR(2) != NULL) { + buf_use EVT_VAR(2); + buf_read EVT_VAR(3); + loop EVT_VAR(3) { + buf_read EVT_VAR(4); + buf_read EVT_VAR(5) EVT_VAR(6) EVT_VAR(7); + buf_read EVT_VAR(8) EVT_VAR(9) EVT_VAR(10); + if (EVT_VAR(10) == 0) { + DropItemEntity(EVT_VAR(4), EVT_VAR(5), EVT_VAR(6), EVT_VAR(7), EVT_VAR(8), EVT_VAR(9)); } else { - GetValueByRef(SI_VAR(10), SI_VAR(11)); - if (SI_VAR(11) == 0) { - SetValueByRef(SI_VAR(10), 1); - DropItemEntity(SI_VAR(4), SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9)); + GetValueByRef(EVT_VAR(10), EVT_VAR(11)); + if (EVT_VAR(11) == 0) { + SetValueByRef(EVT_VAR(10), 1); + DropItemEntity(EVT_VAR(4), EVT_VAR(5), EVT_VAR(6), EVT_VAR(7), EVT_VAR(8), EVT_VAR(9)); } } } } } sleep 15; - if (SI_VAR(4) != NULL) { - await SI_VAR(4); + if (EVT_VAR(4) != NULL) { + await EVT_VAR(4); } }); 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); - buf_read SI_VAR(5); - GetPlayerPos(SI_VAR(6), SI_VAR(15), SI_VAR(8)); + buf_use EVT_VAR(0); + buf_read EVT_VAR(1) EVT_VAR(2) EVT_VAR(3) EVT_VAR(4); + buf_read EVT_VAR(5); + GetPlayerPos(EVT_VAR(6), EVT_VAR(15), EVT_VAR(8)); PlaySound(0x165); PlaySound(0x166); spawn { - SI_FLAG(0) = 0; - if (SI_VAR(1) != NULL) { + EVT_FLAG(0) = 0; + if (EVT_VAR(1) != NULL) { sleep 1; loop 5 { - buf_use SI_VAR(1); - buf_read SI_VAR(2); - loop SI_VAR(2) { - buf_read SI_VAR(3); - N(TransformFoliage)(SI_VAR(3), 0.1, 0.2, SI_VAR(15), 0); - if (SI_FLAG(0) == 0) { - SI_FLAG(0) = 1; - PlaySoundAtModel(SI_VAR(3), 358, 0); + buf_use EVT_VAR(1); + buf_read EVT_VAR(2); + loop EVT_VAR(2) { + buf_read EVT_VAR(3); + N(TransformFoliage)(EVT_VAR(3), 0.1, 0.2, EVT_VAR(15), 0); + if (EVT_FLAG(0) == 0) { + EVT_FLAG(0) = 1; + PlaySoundAtModel(EVT_VAR(3), 358, 0); } } sleep 1; - buf_use SI_VAR(1); - buf_read SI_VAR(2); - loop SI_VAR(2) { - buf_read SI_VAR(3); - N(TransformFoliage)(SI_VAR(3), 0.1, -0.2, SI_VAR(15), 0); + buf_use EVT_VAR(1); + buf_read EVT_VAR(2); + loop EVT_VAR(2) { + buf_read EVT_VAR(3); + N(TransformFoliage)(EVT_VAR(3), 0.1, -0.2, EVT_VAR(15), 0); } sleep 1; } - buf_use SI_VAR(1); - buf_read SI_VAR(2); - loop SI_VAR(2) { - buf_read SI_VAR(3); - TranslateModel(SI_VAR(3), 0, 0, 0); + buf_use EVT_VAR(1); + buf_read EVT_VAR(2); + loop EVT_VAR(2) { + buf_read EVT_VAR(3); + TranslateModel(EVT_VAR(3), 0, 0, 0); } sleep 1; } } spawn { - SI_FLAG(0) = 0; - if (SI_VAR(2) != NULL) { + EVT_FLAG(0) = 0; + if (EVT_VAR(2) != NULL) { loop 5 { - buf_use SI_VAR(2); - buf_read SI_VAR(3); - loop SI_VAR(3) { - buf_read SI_VAR(4); - N(TransformFoliage)(SI_VAR(4), 0.1, 0.2, SI_VAR(15), 0); - if (SI_FLAG(0) == 0) { - SI_FLAG(0) = 1; - PlaySoundAtModel(SI_VAR(4), 357, 0); + buf_use EVT_VAR(2); + buf_read EVT_VAR(3); + loop EVT_VAR(3) { + buf_read EVT_VAR(4); + N(TransformFoliage)(EVT_VAR(4), 0.1, 0.2, EVT_VAR(15), 0); + if (EVT_FLAG(0) == 0) { + EVT_FLAG(0) = 1; + PlaySoundAtModel(EVT_VAR(4), 357, 0); } } sleep 1; - buf_use SI_VAR(2); - buf_read SI_VAR(3); - loop SI_VAR(3) { - buf_read SI_VAR(4); - N(TransformFoliage)(SI_VAR(4), 0.1, -0.2, SI_VAR(15), 0); + buf_use EVT_VAR(2); + buf_read EVT_VAR(3); + loop EVT_VAR(3) { + buf_read EVT_VAR(4); + N(TransformFoliage)(EVT_VAR(4), 0.1, -0.2, EVT_VAR(15), 0); } sleep 1; } - buf_use SI_VAR(2); - buf_read SI_VAR(3); - loop SI_VAR(3) { - buf_read SI_VAR(4); - TranslateModel(SI_VAR(4), 0, 0, 0); + buf_use EVT_VAR(2); + buf_read EVT_VAR(3); + loop EVT_VAR(3) { + buf_read EVT_VAR(4); + TranslateModel(EVT_VAR(4), 0, 0, 0); } sleep 1; } } spawn { - if (SI_VAR(3) != NULL) { - buf_use SI_VAR(3); - buf_read SI_VAR(4); - loop SI_VAR(4) { - buf_read SI_VAR(5); - buf_read SI_VAR(6) SI_VAR(7) SI_VAR(8); - buf_read SI_VAR(9) SI_VAR(10) SI_VAR(11); - if (SI_VAR(11) == 0) { - DropItemEntity(SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9), SI_VAR(10)); + if (EVT_VAR(3) != NULL) { + buf_use EVT_VAR(3); + buf_read EVT_VAR(4); + loop EVT_VAR(4) { + buf_read EVT_VAR(5); + buf_read EVT_VAR(6) EVT_VAR(7) EVT_VAR(8); + buf_read EVT_VAR(9) EVT_VAR(10) EVT_VAR(11); + if (EVT_VAR(11) == 0) { + DropItemEntity(EVT_VAR(5), EVT_VAR(6), EVT_VAR(7), EVT_VAR(8), EVT_VAR(9), EVT_VAR(10)); } else { - GetValueByRef(SI_VAR(11), SI_VAR(12)); - if (SI_VAR(12) == 0) { - SetValueByRef(SI_VAR(11), 1); - DropItemEntity(SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9), SI_VAR(10)); + GetValueByRef(EVT_VAR(11), EVT_VAR(12)); + if (EVT_VAR(12) == 0) { + SetValueByRef(EVT_VAR(11), 1); + DropItemEntity(EVT_VAR(5), EVT_VAR(6), EVT_VAR(7), EVT_VAR(8), EVT_VAR(9), EVT_VAR(10)); } } } } } spawn { - if (SI_VAR(4) != NULL) { - buf_use SI_VAR(4); - buf_read SI_VAR(5); - loop SI_VAR(5) { - buf_read SI_VAR(6) SI_VAR(7) SI_VAR(8); - PlayEffect(0x14, 0, SI_VAR(6), SI_VAR(7), SI_VAR(8), 100, 0, 0, 0, 0, 0, 0, 0, 0); + if (EVT_VAR(4) != NULL) { + buf_use EVT_VAR(4); + buf_read EVT_VAR(5); + loop EVT_VAR(5) { + buf_read EVT_VAR(6) EVT_VAR(7) EVT_VAR(8); + PlayEffect(0x14, 0, EVT_VAR(6), EVT_VAR(7), EVT_VAR(8), 100, 0, 0, 0, 0, 0, 0, 0, 0); } } } - if (SI_VAR(5) != NULL) { - await SI_VAR(5); + if (EVT_VAR(5) != NULL) { + await EVT_VAR(5); } sleep 15; }); diff --git a/src/world/partner/goombario.c b/src/world/partner/goombario.c index e0bda0f577..f7d9f224be 100644 --- a/src/world/partner/goombario.c +++ b/src/world/partner/goombario.c @@ -101,20 +101,20 @@ EvtSource world_goombario_update = 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) + func_802BD5D8_3174F8(); // returns tattle message id on EVT_VAR(0), and something else on EVT_VAR(1) - if (SI_VAR(0) == -1) { + if (EVT_VAR(0) == -1) { return; } - if (SI_VAR(0) == 0) { + if (EVT_VAR(0) == 0) { func_802BDB30_317A50(); return; } - if (SI_VAR(1) == 0) { + if (EVT_VAR(1) == 0) { SpeakToPlayer(NPC_PARTNER, NPC_ANIM_world_goombario_normal_talk, NPC_ANIM_world_goombario_normal_idle, 0, - SI_VAR(0)); + EVT_VAR(0)); } sleep 1; diff --git a/tools/disasm_script.py b/tools/disasm_script.py index 37f8e65cb2..aa00bde4e7 100755 --- a/tools/disasm_script.py +++ b/tools/disasm_script.py @@ -91,7 +91,7 @@ def get_constants(): CONSTANTS["NPC_SPRITE"] = {} CONSTANTS["MAP_NPCS"] = {} - [SAVE_VARS.add(x) for x in ["SI_WORLD_LOCATION", "SI_STORY_PROGRESS"]] + [SAVE_VARS.add(x) for x in ["EVT_WORLD_LOCATION", "EVT_STORY_PROGRESS"]] include_path = Path(Path(__file__).resolve().parent.parent / "include") enums = Path(include_path / "enums.h").read_text().splitlines() @@ -237,7 +237,7 @@ def fix_args(self, func, args, info): if func == "SetAnimation" and int(new_args[1], 10) == 0: call = f"{CONSTANTS['PlayerAnims'][argNum]}" - elif "SI_" not in args[0] and int(args[0]) >= 0 and CONSTANTS["MAP_NPCS"].get(int(args[0])) == "NPC_PLAYER": + elif "EVT_" not in args[0] and int(args[0]) >= 0 and CONSTANTS["MAP_NPCS"].get(int(args[0])) == "NPC_PLAYER": if sprite == 0: print(f"Func {func} arg {i} ({CONSTANTS['MAP_NPCS'][int(args[0])]}) -- sprite was 0, is this really valid? Arg 0x{argNum:X} -- sprite: {sprite}, palette: {palette}, anim: {anim}") call = f"0x{argNum:X}" @@ -500,17 +500,17 @@ class ScriptDisassembler: v = arg - 2**32 # convert to s32 if v > -250000000: - if v <= -220000000: return f"SI_FIXED({(v + 230000000) / 1024})" - elif v <= -200000000: return f"SI_ARRAY_FLAG({v + 210000000})" - elif v <= -180000000: return f"SI_ARRAY({v + 190000000})" - elif v <= -160000000: return f"SI_SAVE_VAR({v + 170000000})" - elif v <= -140000000: return f"SI_AREA_VAR({v + 150000000})" - elif v <= -120000000: return f"SI_SAVE_FLAG({v + 130000000})" - elif v <= -100000000: return f"SI_AREA_FLAG({v + 110000000})" - elif v <= -80000000: return f"SI_MAP_FLAG({v + 90000000})" - elif v <= -60000000: return f"SI_FLAG({v + 70000000})" - elif v <= -40000000: return f"SI_MAP_VAR({v + 50000000})" - elif v <= -20000000: return f"SI_VAR({v + 30000000})" + if v <= -220000000: return f"EVT_FIXED({(v + 230000000) / 1024})" + elif v <= -200000000: return f"EVT_ARRAY_FLAG({v + 210000000})" + elif v <= -180000000: return f"EVT_ARRAY({v + 190000000})" + elif v <= -160000000: return f"EVT_SAVE_VAR({v + 170000000})" + elif v <= -140000000: return f"EVT_AREA_VAR({v + 150000000})" + elif v <= -120000000: return f"EVT_SAVE_FLAG({v + 130000000})" + elif v <= -100000000: return f"EVT_AREA_FLAG({v + 110000000})" + elif v <= -80000000: return f"EVT_MAP_FLAG({v + 90000000})" + elif v <= -60000000: return f"EVT_FLAG({v + 70000000})" + elif v <= -40000000: return f"EVT_MAP_VAR({v + 50000000})" + elif v <= -20000000: return f"EVT_VAR({v + 30000000})" if arg == 0xFFFFFFFF: return "-1" @@ -591,7 +591,7 @@ class ScriptDisassembler: def disassemble_command(self, opcode, argc, argv): if opcode == 0x01: - self.write_line("SI_CMD(EVT_OP_END)") + self.write_line("EVT_CMD(EVT_OP_END)") self.indent -= 1 if self.indent_used: @@ -604,202 +604,202 @@ class ScriptDisassembler: self.write_line("};") self.done = True - 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 == 0x02: self.write_line(f"EVT_CMD(EVT_OP_RETURN),") + elif opcode == 0x03: self.write_line(f"EVT_CMD(EVT_OP_LABEL, {self.var(argv[0])}),") + elif opcode == 0x04: self.write_line(f"EVT_CMD(EVT_OP_GOTO, {self.var(argv[0])}),") elif opcode == 0x05: - self.write_line(f"SI_CMD(EVT_OP_LOOP, {self.var(argv[0])}),") + self.write_line(f"EVT_CMD(EVT_OP_LOOP, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x06: self.indent -= 1 - 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])}),") + self.write_line("EVT_CMD(EVT_OP_END_LOOP),") + elif opcode == 0x07: self.write_line(f"EVT_CMD(EVT_OP_BREAK_LOOP),") + elif opcode == 0x08: self.write_line(f"EVT_CMD(EVT_OP_SLEEP_FRAMES, {self.var(argv[0])}),") + elif opcode == 0x09: self.write_line(f"EVT_CMD(EVT_OP_SLEEP_SECS, {self.var(argv[0])}),") elif opcode == 0x0A: - self.write_line(f"SI_CMD(EVT_OP_IF_EQ, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"EVT_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(EVT_OP_IF_NE, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"EVT_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(EVT_OP_IF_LT, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"EVT_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(EVT_OP_IF_GT, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"EVT_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(EVT_OP_IF_LE, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"EVT_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(EVT_OP_IF_GE, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"EVT_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(EVT_OP_IF_FLAG, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"EVT_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(EVT_OP_IF_NOT_FLAG, ({self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"EVT_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(EVT_OP_ELSE),") + self.write_line(f"EVT_CMD(EVT_OP_ELSE),") self.indent += 1 elif opcode == 0x13: self.indent -= 1 - self.write_line(f"SI_CMD(EVT_OP_END_IF),") + self.write_line(f"EVT_CMD(EVT_OP_END_IF),") elif opcode == 0x14: - self.write_line(f"SI_CMD(EVT_OP_MATCH, {self.var(argv[0])}),") + self.write_line(f"EVT_CMD(EVT_OP_MATCH, {self.var(argv[0])}),") self.indent += 2 elif opcode == 0x15: - self.write_line(f"SI_CMD(EVT_OP_MATCH_CONST, 0x{argv[0]:X}),") + self.write_line(f"EVT_CMD(EVT_OP_MATCH_CONST, 0x{argv[0]:X}),") self.indent += 2 elif opcode == 0x16: self.indent -= 1 - self.write_line(f"SI_CMD(EVT_OP_CASE_EQ, {self.var(argv[0])}),") + self.write_line(f"EVT_CMD(EVT_OP_CASE_EQ, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x17: self.indent -= 1 - self.write_line(f"SI_CMD(EVT_OP_CASE_NE, {self.var(argv[0])}),") + self.write_line(f"EVT_CMD(EVT_OP_CASE_NE, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x18: self.indent -= 1 - self.write_line(f"SI_CMD(EVT_OP_CASE_LT, {self.var(argv[0])}),") + self.write_line(f"EVT_CMD(EVT_OP_CASE_LT, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x19: self.indent -= 1 - self.write_line(f"SI_CMD(EVT_OP_CASE_GT, {self.var(argv[0])}),") + self.write_line(f"EVT_CMD(EVT_OP_CASE_GT, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x1A: self.indent -= 1 - self.write_line(f"SI_CMD(EVT_OP_CASE_LE, {self.var(argv[0])}),") + self.write_line(f"EVT_CMD(EVT_OP_CASE_LE, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x1B: self.indent -= 1 - self.write_line(f"SI_CMD(EVT_OP_CASE_GE, {self.var(argv[0])}),") + self.write_line(f"EVT_CMD(EVT_OP_CASE_GE, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x1C: self.indent -= 1 - self.write_line(f"SI_CMD(EVT_OP_CASE_ELSE),") + self.write_line(f"EVT_CMD(EVT_OP_CASE_ELSE),") self.indent += 1 elif opcode == 0x1D: self.indent -= 1 - self.write_line(f"SI_CMD(EVT_OP_CASE_MULTI_OR_EQ, {self.var(argv[0])}),") + self.write_line(f"EVT_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(EVT_OP_CASE_MULTI_AND_EQ, {self.var(argv[0])}),") + self.write_line(f"EVT_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(EVT_OP_CASE_FLAG, {self.var(argv[0])}),") + self.write_line(f"EVT_CMD(EVT_OP_CASE_FLAG, {self.var(argv[0])}),") self.indent += 1 elif opcode == 0x20: self.indent -= 1 - self.write_line(f"SI_CMD(EVT_OP_END_CASE_MULTI),") + self.write_line(f"EVT_CMD(EVT_OP_END_CASE_MULTI),") self.indent += 1 elif opcode == 0x21: self.indent -= 1 - self.write_line(f"SI_CMD(EVT_OP_CASE_RANGE, {self.var(argv[0])}, {self.var(argv[1])}),") + self.write_line(f"EVT_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(EVT_OP_BREAK_CASE),") + elif opcode == 0x22: self.write_line(f"EVT_CMD(EVT_OP_BREAK_CASE),") elif opcode == 0x23: self.indent -= 2 - 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])}),") + self.write_line(f"EVT_CMD(EVT_OP_END_MATCH),") + elif opcode == 0x24: self.write_line(f"EVT_CMD(EVT_OP_SET, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x25: self.write_line(f"EVT_CMD(EVT_OP_SET_CONST, {self.var(argv[0])}, 0x{argv[1]:X}),") + elif opcode == 0x26: self.write_line(f"EVT_CMD(EVT_OP_SET_F, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x27: self.write_line(f"EVT_CMD(EVT_OP_ADD, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x28: self.write_line(f"EVT_CMD(EVT_OP_SUB, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x29: self.write_line(f"EVT_CMD(EVT_OP_MUL, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2A: self.write_line(f"EVT_CMD(EVT_OP_DIV, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2B: self.write_line(f"EVT_CMD(EVT_OP_MOD, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2C: self.write_line(f"EVT_CMD(EVT_OP_ADD_F, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2D: self.write_line(f"EVT_CMD(EVT_OP_SUB_F, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2E: self.write_line(f"EVT_CMD(EVT_OP_MUL_F, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2F: self.write_line(f"EVT_CMD(EVT_OP_DIV_F, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x30: self.write_line(f"EVT_CMD(EVT_OP_USE_BUFFER, {self.var(argv[0])}),") elif opcode == 0x31: args = ["EVT_OP_BUFFER_READ_1",*map(self.var, argv)] - self.write_line(f"SI_CMD({', '.join(args)}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") elif opcode == 0x32: args = ["EVT_OP_BUFFER_READ_2",*map(self.var, argv)] - self.write_line(f"SI_CMD({', '.join(args)}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") elif opcode == 0x33: args = ["EVT_OP_BUFFER_READ_3",*map(self.var, argv)] - self.write_line(f"SI_CMD({', '.join(args)}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") elif opcode == 0x34: args = ["EVT_OP_BUFFER_READ_4",*map(self.var, argv)] - self.write_line(f"SI_CMD({', '.join(args)}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") elif opcode == 0x35: 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(EVT_OP_USE_BUFFER_f, {self.var(argv[0])}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") + elif opcode == 0x36: self.write_line(f"EVT_CMD(EVT_OP_USE_BUFFER_f, {self.var(argv[0])}),") elif opcode == 0x37: args = ["EVT_OP_BUFFER_READ_1_F",*map(self.var, argv)] - self.write_line(f"SI_CMD({', '.join(args)}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") elif opcode == 0x38: args = ["EVT_OP_BUFFER_READ_2_F",*map(self.var, argv)] - self.write_line(f"SI_CMD({', '.join(args)}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") elif opcode == 0x39: args = ["EVT_OP_BUFFER_READ_3_F",*map(self.var, argv)] - self.write_line(f"SI_CMD({', '.join(args)}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") elif opcode == 0x3A: args = ["EVT_OP_BUFFER_READ_4_F",*map(self.var, argv)] - self.write_line(f"SI_CMD({', '.join(args)}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") elif opcode == 0x3B: 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(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})") + self.write_line(f"EVT_CMD({', '.join(args)}),") + elif opcode == 0x3C: self.write_line(f"EVT_CMD(EVT_OP_USE_ARRAY, {self.var(argv[0])}),") + elif opcode == 0x3D: self.write_line(f"EVT_CMD(EVT_OP_USE_FLAGS, {self.var(argv[0])}),") + elif opcode == 0x3E: self.write_line(f"EVT_CMD(EVT_OP_NEW_ARRAY, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x3F: self.write_line(f"EVT_CMD(EVT_OP_AND, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x40: self.write_line(f"EVT_CMD(EVT_OP_OR, {self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x41: self.write_line(f"EVT_CMD(EVT_OP_AND_CONST, {self.var(argv[0])}, 0x{argv[1]:X})") + elif opcode == 0x42: self.write_line(f"EVT_CMD(EVT_OP_OR_CONST, {self.var(argv[0])}, 0x{argv[1]:X})") elif opcode == 0x43: 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(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])}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") + elif opcode == 0x44: self.write_line(f"EVT_CMD(EVT_OP_SPAWN_SCRIPT, {self.addr_ref(argv[0])}),") + elif opcode == 0x45: self.write_line(f"EVT_CMD(EVT_OP_SPAWN_GET_ID, {self.addr_ref(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x46: self.write_line(f"EVT_CMD(EVT_OP_AWAIT_SCRIPT, {self.addr_ref(argv[0])}),") elif opcode == 0x47: 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(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])}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") + elif opcode == 0x48: self.write_line(f"EVT_CMD(EVT_OP_UNBIND),") + elif opcode == 0x49: self.write_line(f"EVT_CMD(EVT_OP_KILL_SCRIPT, {self.var(argv[0])}),") + elif opcode == 0x4A: self.write_line(f"EVT_CMD(EVT_OP_JUMP, {self.var(argv[0])}),") + elif opcode == 0x4B: self.write_line(f"EVT_CMD(EVT_OP_SET_PRIORITY, {self.var(argv[0])}),") + elif opcode == 0x4C: self.write_line(f"EVT_CMD(EVT_OP_SET_TIMESCALE, {self.var(argv[0])}),") + elif opcode == 0x4D: self.write_line(f"EVT_CMD(EVT_OP_SET_GROUP, {self.var(argv[0])}),") elif opcode == 0x4E: 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(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])}),") + self.write_line(f"EVT_CMD({', '.join(args)}),") + elif opcode == 0x4F: self.write_line(f"EVT_CMD(EVT_OP_SUSPEND_GROUP, {self.var(argv[0])}),") + elif opcode == 0x50: self.write_line(f"EVT_CMD(EVT_OP_RESUME_GROUP, {self.var(argv[0])}),") + elif opcode == 0x51: self.write_line(f"EVT_CMD(EVT_OP_SUSPEND_OTHERS, {self.var(argv[0])}),") + elif opcode == 0x52: self.write_line(f"EVT_CMD(EVT_OP_RESUME_OTHERS, {self.var(argv[0])}),") + elif opcode == 0x53: self.write_line(f"EVT_CMD(EVT_OP_SUSPEND_SCRIPT, {self.var(argv[0])}),") + elif opcode == 0x54: self.write_line(f"EVT_CMD(EVT_OP_RESUME_SCRIPT, {self.var(argv[0])}),") + elif opcode == 0x55: self.write_line(f"EVT_CMD(EVT_OP_DOES_SCRIPT_EXIST, {self.var(argv[0])}, {self.var(argv[1])}),") elif opcode == 0x56: - self.write_line("SI_CMD(EVT_OP_SPAWN_THREAD),") + self.write_line("EVT_CMD(EVT_OP_SPAWN_THREAD),") self.indent += 1 elif opcode == 0x57: self.indent -= 1 - self.write_line("SI_CMD(EVT_OP_END_SPAWN_THREAD),") + self.write_line("EVT_CMD(EVT_OP_END_SPAWN_THREAD),") elif opcode == 0x58: - self.write_line("SI_CMD(EVT_OP_PARALLEL_THREAD),") + self.write_line("EVT_CMD(EVT_OP_PARALLEL_THREAD),") self.indent += 1 elif opcode == 0x59: self.indent -= 1 - self.write_line("SI_CMD(EVT_OP_END_PARALLEL_THREAD),") + self.write_line("EVT_CMD(EVT_OP_END_PARALLEL_THREAD),") else: # unknown opcode argv_str = "" for arg in argv: argv_str += ", " argv_str += f"0x{arg:X}" - self.write_line(f"SI_CMD(0x{opcode:02X}{argv_str}),") + self.write_line(f"EVT_CMD(0x{opcode:02X}{argv_str}),") class UnsupportedScript(Exception): pass @@ -831,23 +831,23 @@ class ScriptDSLDisassembler(ScriptDisassembler): v = arg - 2**32 # convert to s32 if v > -250000000: if v <= -220000000: return str(round_fixed((v + 230000000) / 1024)) - elif v <= -200000000: return f"SI_ARRAY_FLAG({v + 210000000})" - elif v <= -180000000: return f"SI_ARRAY({v + 190000000})" + elif v <= -200000000: return f"EVT_ARRAY_FLAG({v + 210000000})" + elif v <= -180000000: return f"EVT_ARRAY({v + 190000000})" elif v <= -160000000: if v + 170000000 == 0: - self.save_variable = "SI_STORY_PROGRESS" + self.save_variable = "EVT_STORY_PROGRESS" elif v + 170000000 == 425: - self.save_variable = "SI_WORLD_LOCATION" + self.save_variable = "EVT_WORLD_LOCATION" else: - self.save_variable = f"SI_SAVE_VAR({v + 170000000})" + self.save_variable = f"EVT_SAVE_VAR({v + 170000000})" return self.save_variable - elif v <= -140000000: return f"SI_AREA_VAR({v + 150000000})" - elif v <= -120000000: return f"SI_SAVE_FLAG({v + 130000000})" - elif v <= -100000000: return f"SI_AREA_FLAG({v + 110000000})" - elif v <= -80000000: return f"SI_MAP_FLAG({v + 90000000})" - elif v <= -60000000: return f"SI_FLAG({v + 70000000})" - elif v <= -40000000: return f"SI_MAP_VAR({v + 50000000})" - elif v <= -20000000: return f"SI_VAR({v + 30000000})" + elif v <= -140000000: return f"EVT_AREA_VAR({v + 150000000})" + elif v <= -120000000: return f"EVT_SAVE_FLAG({v + 130000000})" + elif v <= -100000000: return f"EVT_AREA_FLAG({v + 110000000})" + elif v <= -80000000: return f"EVT_MAP_FLAG({v + 90000000})" + elif v <= -60000000: return f"EVT_FLAG({v + 70000000})" + elif v <= -40000000: return f"EVT_MAP_VAR({v + 50000000})" + elif v <= -20000000: return f"EVT_VAR({v + 30000000})" if arg == 0xFFFFFFFF: return "-1" @@ -891,12 +891,12 @@ class ScriptDSLDisassembler(ScriptDisassembler): return CONSTANTS["Events"][var] elif case and "takeTurn" in self.script_name and var in CONSTANTS["HitResults"]: return CONSTANTS["HitResults"][var] - elif (( case and self.case_variable == "SI_STORY_PROGRESS") or - (not case and self.save_variable == "SI_STORY_PROGRESS")): + elif (( case and self.case_variable == "EVT_STORY_PROGRESS") or + (not case and self.save_variable == "EVT_STORY_PROGRESS")): if var in CONSTANTS["StoryProgress"]: return CONSTANTS["StoryProgress"][var] - elif (( case and self.case_variable == "SI_WORLD_LOCATION") or - (not case and self.save_variable == "SI_WORLD_LOCATION")): + elif (( case and self.case_variable == "EVT_WORLD_LOCATION") or + (not case and self.save_variable == "EVT_WORLD_LOCATION")): if var in CONSTANTS["Locations"]: return CONSTANTS["Locations"][var] @@ -936,8 +936,8 @@ class ScriptDSLDisassembler(ScriptDisassembler): #print(f"Op 0x{opcode:2X} saved_var \"{self.save_variable}\" case_var \"{self.case_variable}\"") # case variables need to be saved ahead of time, since they span many instructions - if ((self.in_case and 0x16 <= opcode <= 0x1B and self.case_variable == "SI_STORY_PROGRESS") or - (self.in_case and 0x16 <= opcode <= 0x1B and self.case_variable == "SI_WORLD_LOCATION")): + if ((self.in_case and 0x16 <= opcode <= 0x1B and self.case_variable == "EVT_STORY_PROGRESS") or + (self.in_case and 0x16 <= opcode <= 0x1B and self.case_variable == "EVT_WORLD_LOCATION")): argv[0] = self.replace_enum(argv[0], case=True) if opcode == 0x01: @@ -1271,7 +1271,7 @@ if __name__ == "__main__": try: script_text = script.disassemble() - if script.instructions > 1 and "SI_CMD" not in script_text: + if script.instructions > 1 and "EVT_CMD" not in script_text: if gap and first_print: potential_struct_sizes = { "StaticNpc": 0x1F0, "NpcAISettings":0x30, "NpcSettings":0x2C, "NpcGroupList":0xC } gap_size = args.offset - gap_start diff --git a/tools/get_variable.py b/tools/get_variable.py index 4ce415037a..cc232b06d5 100755 --- a/tools/get_variable.py +++ b/tools/get_variable.py @@ -3,17 +3,17 @@ def get_variable(arg): v = arg - 2**32 # convert to s32 if v > -250000000: - if v <= -220000000: return f"SI_FIXED({(v + 230000000) / 1024})" - elif v <= -200000000: return f"SI_ARRAY_FLAG({v + 210000000})" - elif v <= -180000000: return f"SI_ARRAY({v + 190000000})" - elif v <= -160000000: return f"SI_SAVE_VAR({v + 170000000})" - elif v <= -140000000: return f"SI_AREA_VAR({v + 150000000})" - elif v <= -120000000: return f"SI_SAVE_FLAG({v + 130000000})" - elif v <= -100000000: return f"SI_AREA_FLAG({v + 110000000})" - elif v <= -80000000: return f"SI_MAP_FLAG({v + 90000000})" - elif v <= -60000000: return f"SI_FLAG({v + 70000000})" - elif v <= -40000000: return f"SI_MAP_VAR({v + 50000000})" - elif v <= -20000000: return f"SI_VAR({v + 30000000})" + if v <= -220000000: return f"EVT_FIXED({(v + 230000000) / 1024})" + elif v <= -200000000: return f"EVT_ARRAY_FLAG({v + 210000000})" + elif v <= -180000000: return f"EVT_ARRAY({v + 190000000})" + elif v <= -160000000: return f"EVT_SAVE_VAR({v + 170000000})" + elif v <= -140000000: return f"EVT_AREA_VAR({v + 150000000})" + elif v <= -120000000: return f"EVT_SAVE_FLAG({v + 130000000})" + elif v <= -100000000: return f"EVT_AREA_FLAG({v + 110000000})" + elif v <= -80000000: return f"EVT_MAP_FLAG({v + 90000000})" + elif v <= -60000000: return f"EVT_FLAG({v + 70000000})" + elif v <= -40000000: return f"EVT_MAP_VAR({v + 50000000})" + elif v <= -20000000: return f"EVT_VAR({v + 30000000})" if arg == 0xFFFFFFFF: return "-1" diff --git a/tools/star_rod_idx_to_c.py b/tools/star_rod_idx_to_c.py index 182d067093..5b1ee9957a 100755 --- a/tools/star_rod_idx_to_c.py +++ b/tools/star_rod_idx_to_c.py @@ -28,22 +28,22 @@ def get_flag_name(arg): v = arg - 2**32 # convert to s32 if v > -250000000: if v <= -220000000: return str((v + 230000000) / 1024) - elif v <= -200000000: return f"SI_ARRAY_FLAG({v + 210000000})" - elif v <= -180000000: return f"SI_ARRAY({v + 190000000})" + elif v <= -200000000: return f"EVT_ARRAY_FLAG({v + 210000000})" + elif v <= -180000000: return f"EVT_ARRAY({v + 190000000})" elif v <= -160000000: if v + 170000000 == 0: - return "SI_STORY_PROGRESS" + return "EVT_STORY_PROGRESS" elif v + 170000000 == 425: - return "SI_WORLD_LOCATION" + return "EVT_WORLD_LOCATION" else: - return f"SI_SAVE_VAR({v + 170000000})" - elif v <= -140000000: return f"SI_AREA_VAR({v + 150000000})" - elif v <= -120000000: return f"SI_SAVE_FLAG({v + 130000000})" - elif v <= -100000000: return f"SI_AREA_FLAG({v + 110000000})" - elif v <= -80000000: return f"SI_MAP_FLAG({v + 90000000})" - elif v <= -60000000: return f"SI_FLAG({v + 70000000})" - elif v <= -40000000: return f"SI_MAP_VAR({v + 50000000})" - elif v <= -20000000: return f"SI_VAR({v + 30000000})" + return f"EVT_SAVE_VAR({v + 170000000})" + elif v <= -140000000: return f"EVT_AREA_VAR({v + 150000000})" + elif v <= -120000000: return f"EVT_SAVE_FLAG({v + 130000000})" + elif v <= -100000000: return f"EVT_AREA_FLAG({v + 110000000})" + elif v <= -80000000: return f"EVT_MAP_FLAG({v + 90000000})" + elif v <= -60000000: return f"EVT_FLAG({v + 70000000})" + elif v <= -40000000: return f"EVT_MAP_VAR({v + 50000000})" + elif v <= -20000000: return f"EVT_VAR({v + 30000000})" if arg == 0xFFFFFFFF: return "-1" diff --git a/ver/us/asm/nonmatchings/evt/si/si_goto_end_case.s b/ver/us/asm/nonmatchings/evt/si/evt_goto_end_case.s similarity index 98% rename from ver/us/asm/nonmatchings/evt/si/si_goto_end_case.s rename to ver/us/asm/nonmatchings/evt/si/evt_goto_end_case.s index 317f509e96..93f6927f3c 100644 --- a/ver/us/asm/nonmatchings/evt/si/si_goto_end_case.s +++ b/ver/us/asm/nonmatchings/evt/si/evt_goto_end_case.s @@ -1,7 +1,7 @@ .set noat # allow manual use of $at .set noreorder # don't insert nops after branches -glabel si_goto_end_case +glabel evt_goto_end_case /* ED394 802C89E4 24050001 */ addiu $a1, $zero, 1 /* ED398 802C89E8 8C860008 */ lw $a2, 8($a0) /* ED39C 802C89EC 24090014 */ addiu $t1, $zero, 0x14 diff --git a/ver/us/asm/nonmatchings/evt/si/si_handle_child_thread.s b/ver/us/asm/nonmatchings/evt/si/evt_handle_child_thread.s similarity index 98% rename from ver/us/asm/nonmatchings/evt/si/si_handle_child_thread.s rename to ver/us/asm/nonmatchings/evt/si/evt_handle_child_thread.s index b64104d3a3..b3813a5088 100644 --- a/ver/us/asm/nonmatchings/evt/si/si_handle_child_thread.s +++ b/ver/us/asm/nonmatchings/evt/si/evt_handle_child_thread.s @@ -1,7 +1,7 @@ .set noat # allow manual use of $at .set noreorder # don't insert nops after branches -glabel si_handle_child_thread +glabel evt_handle_child_thread /* EB71C 802C6D6C 27BDFFE8 */ addiu $sp, $sp, -0x18 /* EB720 802C6D70 AFB00010 */ sw $s0, 0x10($sp) /* EB724 802C6D74 0080802D */ daddu $s0, $a0, $zero diff --git a/ver/us/asm/nonmatchings/evt/si/si_handle_print_debug_var.s b/ver/us/asm/nonmatchings/evt/si/evt_handle_print_debug_var.s similarity index 99% rename from ver/us/asm/nonmatchings/evt/si/si_handle_print_debug_var.s rename to ver/us/asm/nonmatchings/evt/si/evt_handle_print_debug_var.s index 96ba58125c..9e249ca7bd 100644 --- a/ver/us/asm/nonmatchings/evt/si/si_handle_print_debug_var.s +++ b/ver/us/asm/nonmatchings/evt/si/evt_handle_print_debug_var.s @@ -74,7 +74,7 @@ glabel D_802D9F10 .section .text -glabel si_handle_print_debug_var +glabel evt_handle_print_debug_var /* EB7CC 802C6E1C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* EB7D0 802C6E20 0080382D */ daddu $a3, $a0, $zero /* EB7D4 802C6E24 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/ver/us/asm/nonmatchings/evt/si/si_handle_thread.s b/ver/us/asm/nonmatchings/evt/si/evt_handle_thread.s similarity index 99% rename from ver/us/asm/nonmatchings/evt/si/si_handle_thread.s rename to ver/us/asm/nonmatchings/evt/si/evt_handle_thread.s index af61337469..538084f3a1 100644 --- a/ver/us/asm/nonmatchings/evt/si/si_handle_thread.s +++ b/ver/us/asm/nonmatchings/evt/si/evt_handle_thread.s @@ -1,7 +1,7 @@ .set noat # allow manual use of $at .set noreorder # don't insert nops after branches -glabel si_handle_thread +glabel evt_handle_thread /* EB628 802C6C78 27BDFFE8 */ addiu $sp, $sp, -0x18 /* EB62C 802C6C7C AFB00010 */ sw $s0, 0x10($sp) /* EB630 802C6C80 0080802D */ daddu $s0, $a0, $zero diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 9fb15c73c5..c42e1feae3 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -728,7 +728,7 @@ segments: vram: 0x802C3000 subsegments: - [0xe79b0, c, script_list] - - [0xe92d0, c, si] + - [0xe92d0, c, evt] - [0xED510, c, map_api] - [0xef070, c, cam_api] - [0xf2470, c, npc_api] @@ -743,9 +743,9 @@ segments: - [0xFE6D0, .data, player_api] - [0xFE6E0, .data, fa4c0_len_3bf0] - [0xFE700, .data, fx_api] - - [0xFE720, .data, si] + - [0xFE720, .data, evt] - [0xFE730, .rodata, script_list] - - [0xFE748, .rodata, si] + - [0xFE748, .rodata, evt] - [0xFEB80, .rodata, cam_api] - [0xFEB90, .rodata, npc_api] - [0xFEBA0, .rodata, msg_api] diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index ea93420ab2..cfa2115e11 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -2801,115 +2801,115 @@ set_script_flags = 0x802C47E8; // type:func rom:0xE9198 clear_script_flags = 0x802C4880; // type:func rom:0xE9230 fixed_var_to_float = 0x802C4920; // type:func rom:0xE92D0 float_to_fixed_var = 0x802C496C; // type:func rom:0xE931C -si_handle_return = 0x802C4998; // type:func rom:0xE9348 -si_handle_label = 0x802C49B8; // type:func rom:0xE9368 -si_handle_goto = 0x802C49C0; // type:func rom:0xE9370 -si_handle_loop = 0x802C4A00; // type:func rom:0xE93B0 -si_handle_end_loop = 0x802C4A48; // type:func rom:0xE93F8 -si_handle_break_loop = 0x802C4B0C; // type:func rom:0xE94BC -si_handle_wait = 0x802C4B5C; // type:func rom:0xE950C -si_handle_wait_seconds = 0x802C4BB8; // type:func rom:0xE9568 -si_handle_if_equal = 0x802C4C40; // type:func rom:0xE95F0 -si_handle_if_not_equal = 0x802C4CA0; // type:func rom:0xE9650 -si_handle_if_less = 0x802C4D00; // type:func rom:0xE96B0 -si_handle_if_greater = 0x802C4D64; // type:func rom:0xE9714 -si_handle_if_less_equal = 0x802C4DC8; // type:func rom:0xE9778 -si_handle_if_greater_equal = 0x802C4E2C; // type:func rom:0xE97DC -si_handle_if_AND = 0x802C4E90; // type:func rom:0xE9840 -si_handle_if_not_AND = 0x802C4EE8; // type:func rom:0xE9898 -si_handle_else = 0x802C4F40; // type:func rom:0xE98F0 -si_handle_end_if = 0x802C4F6C; // type:func rom:0xE991C -si_handle_switch = 0x802C4F74; // type:func rom:0xE9924 -si_handle_switch_const = 0x802C4FE4; // type:func rom:0xE9994 -si_handle_case_equal = 0x802C5030; // type:func rom:0xE99E0 -si_handle_case_not_equal = 0x802C50BC; // type:func rom:0xE9A6C -si_handle_case_less = 0x802C5148; // type:func rom:0xE9AF8 -si_handle_case_less_equal = 0x802C51D8; // type:func rom:0xE9B88 -si_handle_case_greater = 0x802C5268; // type:func rom:0xE9C18 -si_handle_case_greater_equal = 0x802C52F8; // type:func rom:0xE9CA8 -si_handle_case_range = 0x802C5388; // type:func rom:0xE9D38 -si_handle_case_default = 0x802C5444; // type:func rom:0xE9DF4 -si_handle_case_AND = 0x802C549C; // type:func rom:0xE9E4C -si_handle_case_equal_OR = 0x802C5518; // type:func rom:0xE9EC8 -si_handle_case_equal_AND = 0x802C55B8; // type:func rom:0xE9F68 -si_handle_end_case_group = 0x802C565C; // type:func rom:0xEA00C -si_handle_break_case = 0x802C56D4; // type:func rom:0xEA084 -si_handle_end_switch = 0x802C5718; // type:func rom:0xEA0C8 -si_handle_set_var = 0x802C5744; // type:func rom:0xEA0F4 -si_handle_set_const = 0x802C5790; // type:func rom:0xEA140 -si_handle_set_float = 0x802C57B8; // type:func rom:0xEA168 -si_handle_add = 0x802C5804; // type:func rom:0xEA1B4 -si_handle_subtract = 0x802C5868; // type:func rom:0xEA218 -si_handle_multiply = 0x802C58CC; // type:func rom:0xEA27C -si_handle_divide = 0x802C5934; // type:func rom:0xEA2E4 -si_handle_mod = 0x802C59BC; // type:func rom:0xEA36C -si_handle_addF = 0x802C5A84; // type:func rom:0xEA434 -si_handle_subtractF = 0x802C5AEC; // type:func rom:0xEA49C -si_handle_multiplyF = 0x802C5B54; // type:func rom:0xEA504 -si_handle_divideF = 0x802C5BC0; // type:func rom:0xEA570 -si_handle_set_int_buffer_ptr = 0x802C5C28; // type:func rom:0xEA5D8 -si_handle_set_float_buffer_ptr = 0x802C5C5C; // type:func rom:0xEA60C -si_handle_get_1_word = 0x802C5C90; // type:func rom:0xEA640 -si_handle_get_2_word = 0x802C5CC4; // type:func rom:0xEA674 -si_handle_get_3_word = 0x802C5D2C; // type:func rom:0xEA6DC -si_handle_get_4_word = 0x802C5DB4; // type:func rom:0xEA764 -si_handle_get_Nth_word = 0x802C5E5C; // type:func rom:0xEA80C -si_handle_get_1_float = 0x802C5EB4; // type:func rom:0xEA864 -si_handle_get_2_float = 0x802C5F0C; // type:func rom:0xEA8BC -si_handle_get_3_float = 0x802C5F9C; // type:func rom:0xEA94C -si_handle_get_4_float = 0x802C605C; // type:func rom:0xEAA0C -si_handle_get_Nth_float = 0x802C614C; // type:func rom:0xEAAFC -si_handle_set_array = 0x802C61AC; // type:func rom:0xEAB5C -si_handle_set_flag_array = 0x802C61E0; // type:func rom:0xEAB90 -si_handle_allocate_array = 0x802C6214; // type:func rom:0xEABC4 -si_handle_AND = 0x802C6270; // type:func rom:0xEAC20 -si_handle_AND_const = 0x802C62D4; // type:func rom:0xEAC84 -si_handle_OR = 0x802C632C; // type:func rom:0xEACDC -si_handle_OR_const = 0x802C6390; // type:func rom:0xEAD40 -si_handle_call = 0x802C63E8; // type:func rom:0xEAD98 -si_handle_exec1 = 0x802C646C; // type:func rom:0xEAE1C -si_handle_exec1_get_id = 0x802C6524; // type:func rom:0xEAED4 -si_handle_exec_wait = 0x802C65FC; // type:func rom:0xEAFAC -si_handle_jump = 0x802C6640; // type:func rom:0xEAFF0 +evt_handle_return = 0x802C4998; // type:func rom:0xE9348 +evt_handle_label = 0x802C49B8; // type:func rom:0xE9368 +evt_handle_goto = 0x802C49C0; // type:func rom:0xE9370 +evt_handle_loop = 0x802C4A00; // type:func rom:0xE93B0 +evt_handle_end_loop = 0x802C4A48; // type:func rom:0xE93F8 +evt_handle_break_loop = 0x802C4B0C; // type:func rom:0xE94BC +evt_handle_wait = 0x802C4B5C; // type:func rom:0xE950C +evt_handle_wait_seconds = 0x802C4BB8; // type:func rom:0xE9568 +evt_handle_if_equal = 0x802C4C40; // type:func rom:0xE95F0 +evt_handle_if_not_equal = 0x802C4CA0; // type:func rom:0xE9650 +evt_handle_if_less = 0x802C4D00; // type:func rom:0xE96B0 +evt_handle_if_greater = 0x802C4D64; // type:func rom:0xE9714 +evt_handle_if_less_equal = 0x802C4DC8; // type:func rom:0xE9778 +evt_handle_if_greater_equal = 0x802C4E2C; // type:func rom:0xE97DC +evt_handle_if_AND = 0x802C4E90; // type:func rom:0xE9840 +evt_handle_if_not_AND = 0x802C4EE8; // type:func rom:0xE9898 +evt_handle_else = 0x802C4F40; // type:func rom:0xE98F0 +evt_handle_end_if = 0x802C4F6C; // type:func rom:0xE991C +evt_handle_switch = 0x802C4F74; // type:func rom:0xE9924 +evt_handle_switch_const = 0x802C4FE4; // type:func rom:0xE9994 +evt_handle_case_equal = 0x802C5030; // type:func rom:0xE99E0 +evt_handle_case_not_equal = 0x802C50BC; // type:func rom:0xE9A6C +evt_handle_case_less = 0x802C5148; // type:func rom:0xE9AF8 +evt_handle_case_less_equal = 0x802C51D8; // type:func rom:0xE9B88 +evt_handle_case_greater = 0x802C5268; // type:func rom:0xE9C18 +evt_handle_case_greater_equal = 0x802C52F8; // type:func rom:0xE9CA8 +evt_handle_case_range = 0x802C5388; // type:func rom:0xE9D38 +evt_handle_case_default = 0x802C5444; // type:func rom:0xE9DF4 +evt_handle_case_AND = 0x802C549C; // type:func rom:0xE9E4C +evt_handle_case_equal_OR = 0x802C5518; // type:func rom:0xE9EC8 +evt_handle_case_equal_AND = 0x802C55B8; // type:func rom:0xE9F68 +evt_handle_end_case_group = 0x802C565C; // type:func rom:0xEA00C +evt_handle_break_case = 0x802C56D4; // type:func rom:0xEA084 +evt_handle_end_switch = 0x802C5718; // type:func rom:0xEA0C8 +evt_handle_set_var = 0x802C5744; // type:func rom:0xEA0F4 +evt_handle_set_const = 0x802C5790; // type:func rom:0xEA140 +evt_handle_set_float = 0x802C57B8; // type:func rom:0xEA168 +evt_handle_add = 0x802C5804; // type:func rom:0xEA1B4 +evt_handle_subtract = 0x802C5868; // type:func rom:0xEA218 +evt_handle_multiply = 0x802C58CC; // type:func rom:0xEA27C +evt_handle_divide = 0x802C5934; // type:func rom:0xEA2E4 +evt_handle_mod = 0x802C59BC; // type:func rom:0xEA36C +evt_handle_addF = 0x802C5A84; // type:func rom:0xEA434 +evt_handle_subtractF = 0x802C5AEC; // type:func rom:0xEA49C +evt_handle_multiplyF = 0x802C5B54; // type:func rom:0xEA504 +evt_handle_divideF = 0x802C5BC0; // type:func rom:0xEA570 +evt_handle_set_int_buffer_ptr = 0x802C5C28; // type:func rom:0xEA5D8 +evt_handle_set_float_buffer_ptr = 0x802C5C5C; // type:func rom:0xEA60C +evt_handle_get_1_word = 0x802C5C90; // type:func rom:0xEA640 +evt_handle_get_2_word = 0x802C5CC4; // type:func rom:0xEA674 +evt_handle_get_3_word = 0x802C5D2C; // type:func rom:0xEA6DC +evt_handle_get_4_word = 0x802C5DB4; // type:func rom:0xEA764 +evt_handle_get_Nth_word = 0x802C5E5C; // type:func rom:0xEA80C +evt_handle_get_1_float = 0x802C5EB4; // type:func rom:0xEA864 +evt_handle_get_2_float = 0x802C5F0C; // type:func rom:0xEA8BC +evt_handle_get_3_float = 0x802C5F9C; // type:func rom:0xEA94C +evt_handle_get_4_float = 0x802C605C; // type:func rom:0xEAA0C +evt_handle_get_Nth_float = 0x802C614C; // type:func rom:0xEAAFC +evt_handle_set_array = 0x802C61AC; // type:func rom:0xEAB5C +evt_handle_set_flag_array = 0x802C61E0; // type:func rom:0xEAB90 +evt_handle_allocate_array = 0x802C6214; // type:func rom:0xEABC4 +evt_handle_AND = 0x802C6270; // type:func rom:0xEAC20 +evt_handle_AND_const = 0x802C62D4; // type:func rom:0xEAC84 +evt_handle_OR = 0x802C632C; // type:func rom:0xEACDC +evt_handle_OR_const = 0x802C6390; // type:func rom:0xEAD40 +evt_handle_call = 0x802C63E8; // type:func rom:0xEAD98 +evt_handle_exec1 = 0x802C646C; // type:func rom:0xEAE1C +evt_handle_exec1_get_id = 0x802C6524; // type:func rom:0xEAED4 +evt_handle_exec_wait = 0x802C65FC; // type:func rom:0xEAFAC +evt_handle_jump = 0x802C6640; // type:func rom:0xEAFF0 _bound_script_trigger_handler = 0x802C667C; // type:func rom:0xEB02C -si_handle_bind = 0x802C6714; // type:func rom:0xEB0C4 +evt_handle_bind = 0x802C6714; // type:func rom:0xEB0C4 DeleteTrigger = 0x802C6824; // type:func rom:0xEB1D4 -si_handle_unbind = 0x802C6850; // type:func rom:0xEB200 -si_handle_kill = 0x802C6870; // type:func rom:0xEB220 -si_handle_set_priority = 0x802C689C; // type:func rom:0xEB24C -si_handle_set_timescale = 0x802C68D8; // type:func rom:0xEB288 -si_handle_set_group = 0x802C6914; // type:func rom:0xEB2C4 -si_handle_suspend_all = 0x802C6950; // type:func rom:0xEB300 -si_handle_resume_all = 0x802C697C; // type:func rom:0xEB32C -si_handle_suspend_others = 0x802C69A8; // type:func rom:0xEB358 -si_handle_resume_others = 0x802C69E4; // type:func rom:0xEB394 -si_handle_suspend = 0x802C6A20; // type:func rom:0xEB3D0 -si_handle_resume = 0x802C6A4C; // type:func rom:0xEB3FC -si_handle_does_script_exist = 0x802C6A78; // type:func rom:0xEB428 -si_standard_trigger_executor = 0x802C6AD0; // type:func rom:0xEB480 -si_handle_bind_lock = 0x802C6B54; // type:func rom:0xEB504 -si_handle_thread = 0x802C6C78; // type:func rom:0xEB628 -si_handle_end_thread = 0x802C6D4C; // type:func rom:0xEB6FC -si_handle_child_thread = 0x802C6D6C; // type:func rom:0xEB71C -si_handle_end_child_thread = 0x802C6DF4; // type:func rom:0xEB7A4 +evt_handle_unbind = 0x802C6850; // type:func rom:0xEB200 +evt_handle_kill = 0x802C6870; // type:func rom:0xEB220 +evt_handle_set_priority = 0x802C689C; // type:func rom:0xEB24C +evt_handle_set_timescale = 0x802C68D8; // type:func rom:0xEB288 +evt_handle_set_group = 0x802C6914; // type:func rom:0xEB2C4 +evt_handle_suspend_all = 0x802C6950; // type:func rom:0xEB300 +evt_handle_resume_all = 0x802C697C; // type:func rom:0xEB32C +evt_handle_suspend_others = 0x802C69A8; // type:func rom:0xEB358 +evt_handle_resume_others = 0x802C69E4; // type:func rom:0xEB394 +evt_handle_suspend = 0x802C6A20; // type:func rom:0xEB3D0 +evt_handle_resume = 0x802C6A4C; // type:func rom:0xEB3FC +evt_handle_does_script_exist = 0x802C6A78; // type:func rom:0xEB428 +evt_standard_trigger_executor = 0x802C6AD0; // type:func rom:0xEB480 +evt_handle_bind_lock = 0x802C6B54; // type:func rom:0xEB504 +evt_handle_thread = 0x802C6C78; // type:func rom:0xEB628 +evt_handle_end_thread = 0x802C6D4C; // type:func rom:0xEB6FC +evt_handle_child_thread = 0x802C6D6C; // type:func rom:0xEB71C +evt_handle_end_child_thread = 0x802C6DF4; // type:func rom:0xEB7A4 func_802C6E14 = 0x802C6E14; // type:func rom:0xEB7C4 -si_handle_print_debug_var = 0x802C6E1C; // type:func rom:0xEB7CC +evt_handle_print_debug_var = 0x802C6E1C; // type:func rom:0xEB7CC func_802C739C = 0x802C739C; // type:func rom:0xEBD4C func_802C73B0 = 0x802C73B0; // type:func rom:0xEBD60 func_802C73B8 = 0x802C73B8; // type:func rom:0xEBD68 -si_execute_next_command = 0x802C7404; // type:func rom:0xEBDB4 +evt_execute_next_command = 0x802C7404; // type:func rom:0xEBDB4 get_variable = 0x802C7ABC; // type:func rom:0xEC46C get_variable_index = 0x802C7DA8; // type:func rom:0xEC758 get_variable_index_alt = 0x802C7F20; // type:func rom:0xEC8D0 set_variable = 0x802C8098; // type:func rom:0xECA48 get_float_variable = 0x802C842C; // type:func rom:0xECDDC set_float_variable = 0x802C8640; // type:func rom:0xECFF0 -si_find_label = 0x802C8890; // type:func rom:0xED240 -si_skip_if = 0x802C88FC; // type:func rom:0xED2AC -si_skip_else = 0x802C8978; // type:func rom:0xED328 -si_goto_end_case = 0x802C89E4; // type:func rom:0xED394 -si_goto_next_case = 0x802C8A60; // type:func rom:0xED410 -si_goto_end_loop = 0x802C8AE4; // type:func rom:0xED494 +evt_find_label = 0x802C8890; // type:func rom:0xED240 +evt_skip_if = 0x802C88FC; // type:func rom:0xED2AC +evt_skip_else = 0x802C8978; // type:func rom:0xED328 +evt_goto_end_case = 0x802C89E4; // type:func rom:0xED394 +evt_goto_next_case = 0x802C8A60; // type:func rom:0xED410 +evt_goto_end_loop = 0x802C8AE4; // type:func rom:0xED494 TranslateModel = 0x802C8B60; // type:func rom:0xED510 RotateModel = 0x802C8C64; // type:func rom:0xED614 ScaleModel = 0x802C8D88; // type:func rom:0xED738