diff --git a/include/common_structs.h b/include/common_structs.h index 9e40d754fe..e405d21639 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -278,7 +278,7 @@ typedef struct ScriptInstance { struct Actor* actor; ///< For battle scripts } owner1; ///< Initially -1 /* 0x14C */ union { - NpcId npcID; + NpcID npcID; s32 triggerID; struct Npc* npc; ///< For overworld scripts owned by an Npc struct Trigger* trigger; @@ -1402,7 +1402,7 @@ typedef struct Actor { /* 0x208 */ s8 unk_208; /* 0x209 */ char unk_209[3]; /* 0x20C */ u32* statusTable; - /* 0x210 */ Debuff debuff; + /* 0x210 */ Status debuff; /* 0x211 */ s8 debuffDuration; /* 0x212 */ s8 staticStatus; /* 0B = yes */ /* 0x213 */ s8 staticDuration; diff --git a/include/enums.h b/include/enums.h index 431a7d471f..a740904b16 100644 --- a/include/enums.h +++ b/include/enums.h @@ -9,7 +9,8 @@ enum StoryProgress { STORY_CH0_WAKE_UP, STORY_CH0_MET_INNKEEPER, - STORY_CH0_MET_GOOMPA = -124, + STORY_UNUSED_FFFFFF83, + STORY_CH0_MET_GOOMPA, STORY_CH0_GATE_CRUSHED, STORY_CH0_FELL_OFF_CLIFF, STORY_CH0_GOOMPA_JOINED_PARTY, @@ -17,7 +18,8 @@ enum StoryProgress { STORY_CH0_FOUND_HAMMER, STORY_CH0_DEFEATED_JR_TROOPA, STORY_CH0_LEFT_THE_PLAYGROUND, - STORY_CH0_GOOMBARIO_JOINED_PARTY = -115, + STORY_UNUSED_FFFFFF8C, + STORY_CH0_GOOMBARIO_JOINED_PARTY, STORY_CH0_SMASHED_GATE_BLOCK, STORY_CH0_DEFEATED_GOOMBA_BROS, STORY_CH0_DEFEATED_GOOMBA_KING, @@ -82,8 +84,9 @@ enum StoryProgress { STORY_CH2_STAR_SPIRIT_RESCUED, STORY_CH2_BEGAN_PEACH_MISSION, STORY_CH2_STAR_SPRIT_DEPARTED, + STORY_UNUSED_FFFFFFCC, - STORY_CH3_SAW_BOO_ENTER_FOREST = -51, + STORY_CH3_SAW_BOO_ENTER_FOREST, STORY_CH3_INVITED_TO_BOOS_MANSION, STORY_CH3_ALLOWED_INTO_FOREVER_FOREST, STORY_CH3_ARRIVED_AT_BOOS_MANSION, @@ -103,7 +106,8 @@ enum StoryProgress { STORY_CH3_ARRIVED_AT_GHOST_TOWN, STORY_CH3_SAW_TUBBA_EAT_BOO, STORY_CH3_ARRIVED_AT_TUBBAS_MANOR, - STORY_CH3_TUBBA_BEGAN_NAPPING = -30, + STORY_UNUSED_FFFFFFE1, + STORY_CH3_TUBBA_BEGAN_NAPPING, STORY_CH3_TUBBA_WOKE_UP, STORY_CH3_TUBBA_SMASHED_THE_BRIDGES, STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL, @@ -112,7 +116,9 @@ enum StoryProgress { STORY_CH3_UNLOCKED_WINDY_MILL, STORY_CH3_WENT_DOWN_THE_WELL, STORY_CH3_HEART_FLED_FIRST_TUNNEL, - STORY_CH3_HEART_FLED_SECOND_TUNNEL = -19, + STORY_UNUSED_FFFFFFEB, + STORY_UNUSED_FFFFFFEC, + STORY_CH3_HEART_FLED_SECOND_TUNNEL, STORY_CH3_HEART_ESCAPED_WELL, STORY_CH3_HEART_ESCAPED_WINDY_MILL, STORY_CH3_DEFEATED_TUBBA_BLUBBA, @@ -229,1153 +235,1243 @@ enum StoryProgress { STORY_CH8_OPENED_PATH_TO_STAR_WAY, STORY_CH8_REACHED_STAR_HAVEN, STORY_CH8_STAR_SHIP_ACTIVATED, - STORY_CH8_REACHED_BOWSERS_CASTLE = 94, + STORY_UNUSED_5D, + STORY_CH8_REACHED_BOWSERS_CASTLE, STORY_CH8_REACHED_PEACHS_CASTLE, STORY_EPILOGUE, }; -typedef UNK_TYPE EncounterTriggerFlags; -#define EncounterTriggerFlags_NONE 0x00000001 -#define EncounterTriggerFlags_JUMP 0x00000002 -#define EncounterTriggerFlags_SPIN 0x00000003 -#define EncounterTriggerFlags_HAMMER 0x00000004 -#define EncounterTriggerFlags_PARTNER 0x00000006 +typedef UNK_TYPE EncounterTrigger; +enum EncounterTriggers { + ENCOUNTER_TRIGGER_NONE = 1, + ENCOUNTER_TRIGGER_JUMP, + ENCOUNTER_TRIGGER_SPIN, + ENCOUNTER_TRIGGER_HAMMER, + ENCOUNTER_TRIGGER_CONVERSATION, + ENCOUNTER_TRIGGER_PARTNER, +}; typedef s32 SongID; -#define Song_TOAD_TOWN 0x00000000 -#define Song_NORMAL_BATTLE 0x00000002 -#define Song_SPECIAL_BATTLE 0x00000003 -#define Song_JR_TROOPA_BATTLE 0x00000004 -#define Song_FINAL_BOWSER_BATTLE 0x00000005 -#define Song_GOOMBA_KING_BATTLE 0x00000007 -#define Song_KOOPA_BROS_BATTLE 0x00000008 -#define Song_FAKE_BOWSER_BATTLE 0x00000009 -#define Song_TUTANKOOPA_BATTLE 0x0000000A -#define Song_TUBBA_BLUBBA_BATTLE 0x0000000B -#define Song_GENERAL_GUY_BATTLE 0x0000000C -#define Song_LAVA_PIRANHA_BATTLE 0x0000000D -#define Song_HUFF_N_PUFF_BATTLE 0x0000000E -#define Song_CRYSTAL_KING_BATTLE 0x0000000F -#define Song_GOOMBA_VILLAGE 0x00000010 -#define Song_PLEASANT_PATH 0x00000011 -#define Song_FUZZY_ATTACK 0x00000012 -#define Song_KOOPA_VILLAGE 0x00000013 -#define Song_KOOPA_FORTRESS 0x00000014 -#define Song_DRY_DRY_OUTPOST 0x00000015 -#define Song_MT_RUGGED 0x00000016 -#define Song_DRY_DRY_DESERT 0x00000017 -#define Song_DRY_DRY_RUINS 0x00000018 -#define Song_RUINS_BASEMENT 0x00000019 -#define Song_FOREVER_FOREST 0x0000001A -#define Song_BOOS_MANSION 0x0000001B -#define Song_CHEERFUL_BOOS_MANSION 0x0000001C -#define Song_GUSTY_GULCH 0x0000001D -#define Song_TUBBAS_MANOR 0x0000001E -#define Song_TUBBA_ESCAPE 0x0000001F -#define Song_SHY_GUY_TOYBOX 0x00000020 -#define Song_TOYBOX_TRAIN 0x00000021 -#define Song_CREEPY_TOYBOX 0x00000022 -#define Song_JADE_JUNGLE 0x00000024 -#define Song_DEEP_JUNGLE 0x00000025 -#define Song_YOSHIS_VILLAGE 0x00000026 -#define Song_YOSHIS_PANIC 0x00000027 -#define Song_RAPHAEL_RAVEN 0x00000028 -#define Song_MT_LAVALAVA 0x00000029 -#define Song_VOLCANO_ESCAPE 0x0000002A -#define Song_STAR_WAY_OPENS 0x0000002B -#define Song_MASTER_BATTLE 0x0000002C -#define Song_RADIO_ISLAND_SOUNDS 0x0000002D -#define Song_RADIO_HOT_HITS 0x0000002E -#define Song_RADIO_GOLDEN_OLDIES 0x0000002F -#define Song_FLOWER_FIELDS_CLOUDY 0x00000030 -#define Song_FLOWER_FIELDS_SUNNY 0x00000031 -#define Song_CLOUDY_CLIMB 0x00000032 -#define Song_PUFF_PUFF_MACHINE 0x00000033 -#define Song_SUN_TOWER_CLOUDY 0x00000034 -#define Song_SUN_TOWER_SUNNY 0x00000035 -#define Song_CRYSTAL_PALACE 0x00000037 -#define Song_SHIVER_CITY 0x00000038 -#define Song_PENGUIN_MYSTERY 0x00000039 -#define Song_SHIVER_SNOWFIELD 0x0000003A -#define Song_SHIVER_MOUNTAIN 0x0000003B -#define Song_STARBORN_VALLEY 0x0000003C -#define Song_MERLAR_THEME 0x0000003D -#define Song_MAIL_CALL 0x0000003E -#define Song_PEACHS_CASTLE_PARTY 0x0000003F -#define Song_CHAPTER_END 0x00000040 -#define Song_CHAPTER_START 0x00000041 -#define Song_ITEM_UPGRADE 0x00000042 -#define Song_PHONOGRAPH_MUSIC 0x00000044 -#define Song_TUTANKOOPA_THEME 0x00000045 -#define Song_KAMMY_KOOPA_THEME 0x00000046 -#define Song_JR_TROOPA_THEME 0x00000047 -#define Song_BULLET_BILL_ASSAULT 0x00000048 -#define Song_MONTY_MOLE_ASSAULT 0x00000049 -#define Song_SHY_GUY_INVASION 0x0000004A -#define Song_TOAD_TOWN_TUNNELS 0x0000004B -#define Song_WHALE_THEME 0x0000004C -#define Song_FOREVER_FOREST_WARNING 0x0000004D -#define Song_YOSHI_KIDS_FOUND 0x0000004E -#define Song_UNUSED_FANFARE 0x0000004F -#define Song_GOOMBA_KING_THEME 0x00000050 -#define Song_KOOPA_BROS_INTERLUDE 0x00000051 -#define Song_KOOPA_BROS_THEME 0x00000052 -#define Song_TUTANKOOPA_WARNING 0x00000053 -#define Song_TUTANKOOPA_REVEALED 0x00000054 -#define Song_TUBBA_BLUBBA_THEME 0x00000055 -#define Song_GENERAL_GUY_THEME 0x00000056 -#define Song_LAVA_PIRANHA_THEME 0x00000057 -#define Song_HUFF_N_PUFF_THEME 0x00000058 -#define Song_CRYSTAL_KING_THEME 0x00000059 -#define Song_BLOOPER_THEME 0x0000005A -#define Song_MINIBOSS_BATTLE 0x0000005B -#define Song_MONSTAR_THEME 0x0000005C -#define Song_CLUB64 0x0000005D -#define Song_UNUSED_OPENING 0x0000005E -#define Song_BOWSERS_CASTLE_FALLS 0x0000005F -#define Song_STAR_HAVEN 0x00000060 -#define Song_SHOOTING_STAR_SUMMIT 0x00000061 -#define Song_STARSHIP_THEME 0x00000062 -#define Song_STAR_SANCTUARY 0x00000063 -#define Song_BOWSERS_CASTLE 0x00000064 -#define Song_BOWSERS_CASTLE_CAVES 0x00000065 -#define Song_BOWSER_THEME 0x00000066 -#define Song_BOWSER_BATTLE 0x00000067 -#define Song_PEACH_WISHES 0x00000068 -#define Song_FILE_SELECT 0x00000069 -#define Song_MAIN_THEME 0x0000006A -#define Song_BOWSER_ATTACKS 0x0000006B -#define Song_MARIO_FALLS 0x0000006C -#define Song_PEACH_APPEARS 0x0000006D -#define Song_THE_END 0x0000006E -#define Song_RECOVERED_STAR_ROD 0x0000006F -#define Song_TWINK_THEME 0x00000070 -#define Song_STIRRING_CAKE 0x00000071 -#define Song_GOURMET_GUY_FREAKOUT 0x00000072 -#define Song_PRISONER_PEACH_THEME 0x00000073 -#define Song_PEACH_MISSION 0x00000074 -#define Song_PEACH_SNEAKING 0x00000075 -#define Song_PEACH_CAUGHT 0x00000076 -#define Song_PEACH_QUIZ_INTRO 0x00000077 -#define Song_STAR_SPIRIT_THEME 0x00000078 -#define Song_PENGUIN_WHODUNIT 0x00000079 -#define Song_PENGUIN_WAKES_UP 0x0000007A -#define Song_MAGIC_BEANSTALK 0x0000007B -#define Song_MERLEE_SPELL 0x0000007C -#define Song_LAKILESTER_THEME 0x0000007D -#define Song_GOOMBA_BROS_RETREAT 0x0000007E -#define Song_SUNSHINE_RETURNS 0x0000007F -#define Song_RIDING_THE_RAILS 0x00000080 -#define Song_RIDING_THE_WHALE 0x00000081 -#define Song_NEW_PARTNER 0x00000082 -#define Song_DRY_DRY_RUINS_APPEAR 0x00000083 -#define Song_CANDY_CANES 0x00000084 -#define Song_PLAYROOM 0x00000085 -#define Song_MOUSTAFA_THEME 0x00000086 -#define Song_GAME_OVER 0x00000087 -#define Song_TAKING_REST 0x00000088 -#define Song_FLOWER_N_P_C_THEME 0x00000089 -#define Song_FLOWER_GATE_APPEARS 0x0000008A -#define Song_BATTLE_END 0x0000008B -#define Song_POP_DIVA_SONG 0x0000008C -#define Song_BOO_MINIGAME 0x0000008D -#define Song_LEVEL_UP 0x0000008E -#define Song_PARADE_DAY 0x00000090 -#define Song_PARADE_NIGHT 0x00000091 -#define Song_MARIO_BROS_HOUSE 0x00000094 -#define Song_INTRO_STORY 0x00000095 -#define Song_NEW_PARTNER_J_P 0x00000096 +enum SongIDs { + SONG_TOAD_TOWN = 0, + SONG_UNUSED_1, + SONG_NORMAL_BATTLE, + SONG_SPECIAL_BATTLE, + SONG_JR_TROOPA_BATTLE, + SONG_FINAL_BOWSER_BATTLE, + SONG_UNUSED_6, + SONG_GOOMBA_KING_BATTLE, + SONG_KOOPA_BROS_BATTLE, + SONG_FAKE_BOWSER_BATTLE, + SONG_TUTANKOOPA_BATTLE, + SONG_TUBBA_BLUBBA_BATTLE, + SONG_GENERAL_GUY_BATTLE, + SONG_LAVA_PIRANHA_BATTLE, + SONG_HUFF_N_PUFF_BATTLE, + SONG_CRYSTAL_KING_BATTLE, + SONG_GOOMBA_VILLAGE, + SONG_PLEASANT_PATH, + SONG_FUZZY_ATTACK, + SONG_KOOPA_VILLAGE, + SONG_KOOPA_FORTRESS, + SONG_DRY_DRY_OUTPOST, + SONG_MT_RUGGED, + SONG_DRY_DRY_DESERT, + SONG_DRY_DRY_RUINS, + SONG_RUINS_BASEMENT, + SONG_FOREVER_FOREST, + SONG_BOOS_MANSION, + SONG_CHEERFUL_BOOS_MANSION, + SONG_GUSTY_GULCH, + SONG_TUBBAS_MANOR, + SONG_TUBBA_ESCAPE, + SONG_SHY_GUY_TOYBOX, + SONG_TOYBOX_TRAIN, + SONG_CREEPY_TOYBOX, + SONG_UNUSED_35, + SONG_JADE_JUNGLE, + SONG_DEEP_JUNGLE, + SONG_YOSHIS_VILLAGE, + SONG_YOSHIS_PANIC, + SONG_RAPHAEL_RAVEN, + SONG_MT_LAVALAVA, + SONG_VOLCANO_ESCAPE, + SONG_STAR_WAY_OPENS, + SONG_MASTER_BATTLE, + SONG_RADIO_ISLAND_SOUNDS, + SONG_RADIO_HOT_HITS, + SONG_RADIO_GOLDEN_OLDIES, + SONG_FLOWER_FIELDS_CLOUDY, + SONG_FLOWER_FIELDS_SUNNY, + SONG_CLOUDY_CLIMB, + SONG_PUFF_PUFF_MACHINE, + SONG_SUN_TOWER_CLOUDY, + SONG_SUN_TOWER_SUNNY, + SONG_UNUSED_54, + SONG_CRYSTAL_PALACE, + SONG_SHIVER_CITY, + SONG_PENGUIN_MYSTERY, + SONG_SHIVER_SNOWFIELD, + SONG_SHIVER_MOUNTAIN, + SONG_STARBORN_VALLEY, + SONG_MERLAR_THEME, + SONG_MAIL_CALL, + SONG_PEACHS_CASTLE_PARTY, + SONG_CHAPTER_END, + SONG_CHAPTER_START, + SONG_ITEM_UPGRADE, + SONG_UNUSED_67, + SONG_PHONOGRAPH_MUSIC, + SONG_TUTANKOOPA_THEME, + SONG_KAMMY_KOOPA_THEME, + SONG_JR_TROOPA_THEME, + SONG_BULLET_BILL_ASSAULT, + SONG_MONTY_MOLE_ASSAULT, + SONG_SHY_GUY_INVASION, + SONG_TOAD_TOWN_TUNNELS, + SONG_WHALE_THEME, + SONG_FOREVER_FOREST_WARNING, + SONG_YOSHI_KIDS_FOUND, + SONG_UNUSED_FANFARE, + SONG_GOOMBA_KING_THEME, + SONG_KOOPA_BROS_INTERLUDE, + SONG_KOOPA_BROS_THEME, + SONG_TUTANKOOPA_WARNING, + SONG_TUTANKOOPA_REVEALED, + SONG_TUBBA_BLUBBA_THEME, + SONG_GENERAL_GUY_THEME, + SONG_LAVA_PIRANHA_THEME, + SONG_HUFF_N_PUFF_THEME, + SONG_CRYSTAL_KING_THEME, + SONG_BLOOPER_THEME, + SONG_MINIBOSS_BATTLE, + SONG_MONSTAR_THEME, + SONG_CLUB64, + SONG_UNUSED_OPENING, + SONG_BOWSERS_CASTLE_FALLS, + SONG_STAR_HAVEN, + SONG_SHOOTING_STAR_SUMMIT, + SONG_STARSHIP_THEME, + SONG_STAR_SANCTUARY, + SONG_BOWSERS_CASTLE, + SONG_BOWSERS_CASTLE_CAVES, + SONG_BOWSER_THEME, + SONG_BOWSER_BATTLE, + SONG_PEACH_WISHES, + SONG_FILE_SELECT, + SONG_MAIN_THEME, + SONG_BOWSER_ATTACKS, + SONG_MARIO_FALLS, + SONG_PEACH_APPEARS, + SONG_THE_END, + SONG_RECOVERED_STAR_ROD, + SONG_TWINK_THEME, + SONG_STIRRING_CAKE, + SONG_GOURMET_GUY_FREAKOUT, + SONG_PRISONER_PEACH_THEME, + SONG_PEACH_MISSION, + SONG_PEACH_SNEAKING, + SONG_PEACH_CAUGHT, + SONG_PEACH_QUIZ_INTRO, + SONG_STAR_SPIRIT_THEME, + SONG_PENGUIN_WHODUNIT, + SONG_PENGUIN_WAKES_UP, + SONG_MAGIC_BEANSTALK, + SONG_MERLEE_SPELL, + SONG_LAKILESTER_THEME, + SONG_GOOMBA_BROS_RETREAT, + SONG_SUNSHINE_RETURNS, + SONG_RIDING_THE_RAILS, + SONG_RIDING_THE_WHALE, + SONG_NEW_PARTNER, + SONG_DRY_DRY_RUINS_APPEAR, + SONG_CANDY_CANES, + SONG_PLAYROOM, + SONG_MOUSTAFA_THEME, + SONG_GAME_OVER, + SONG_TAKING_REST, + SONG_FLOWER_N_P_C_THEME, + SONG_FLOWER_GATE_APPEARS, + SONG_BATTLE_END, + SONG_POP_DIVA_SONG, + SONG_BOO_MINIGAME, + SONG_LEVEL_UP, + SONG_UNUSED_143, + SONG_PARADE_DAY, + SONG_PARADE_NIGHT, + SONG_UNUSED_146, + SONG_UNUSED_147, + SONG_MARIO_BROS_HOUSE, + SONG_INTRO_STORY, + SONG_NEW_PARTNER_J_P, +}; typedef UNK_TYPE Ability; -#define Ability_DODGE_MASTER 0x00000000 -#define Ability_UNUSED 0x00000001 -#define Ability_SPIKE_SHIELD 0x00000002 -#define Ability_FIRST_ATTACK 0x00000003 -#define Ability_H_P_PLUS 0x00000004 -#define Ability_DOUBLE_DIP 0x00000005 -#define Ability_MYSTERY_SCROLL 0x00000006 -#define Ability_FIRE_SHIELD 0x00000007 -#define Ability_PRETTY_LUCKY 0x00000008 -#define Ability_H_P_DRAIN 0x00000009 -#define Ability_ALL_OR_NOTHING 0x0000000A -#define Ability_SLOW_GO 0x0000000B -#define Ability_F_P_PLUS 0x0000000C -#define Ability_ICE_POWER 0x0000000D -#define Ability_FEELING_FINE 0x0000000E -#define Ability_ATTACK_F_X 0x0000000F -#define Ability_MONEY_MONEY 0x00000010 -#define Ability_CHILL_OUT 0x00000011 -#define Ability_HAPPY_HEART 0x00000012 -#define Ability_ZAP_TAP 0x00000013 -#define Ability_MEGA_RUSH 0x00000014 -#define Ability_BERSERKER 0x00000015 -#define Ability_RIGHT_ON 0x00000016 -#define Ability_RUNAWAY_PAY 0x00000017 -#define Ability_FLOWER_SAVER 0x00000018 -#define Ability_PAY_OFF 0x00000019 -#define Ability_QUICK_CHANGE 0x0000001A -#define Ability_DEFEND_PLUS 0x0000001B -#define Ability_POWER_PLUS 0x0000001C -#define Ability_REFUND 0x0000001D -#define Ability_POWER_RUSH 0x0000001E -#define Ability_CRAZY_HEART 0x0000001F -#define Ability_LAST_STAND 0x00000020 -#define Ability_CLOSE_CALL 0x00000021 -#define Ability_P_UP_D_DOWN 0x00000022 -#define Ability_LUCKY_DAY 0x00000023 -#define Ability_MEGA_H_P_DRAIN 0x00000024 -#define Ability_P_DOWN_D_UP 0x00000025 -#define Ability_FLOWER_FANATIC 0x00000026 -#define Ability_SPEEDY_SPIN 0x00000027 -#define Ability_SPIN_ATTACK 0x00000028 -#define Ability_I_SPY 0x00000029 -#define Ability_BUMP_ATTACK 0x0000002A -#define Ability_HEART_FINDER 0x0000002B -#define Ability_FLOWER_FINDER 0x0000002C -#define Ability_DIZZY_ATTACK 0x0000002D -#define Ability_FINAL_GOOMPA 0x0000002E -#define Ability_FINAL_BOMBOMB 0x0000002F -#define Ability_DEEP_FOCUS 0x00000030 -#define Ability_SUPER_FOCUS 0x00000031 -#define Ability_KAIDEN 0x00000032 -#define Ability_DAMAGE_DODGE 0x00000033 -#define Ability_HAPPY_FLOWER 0x00000034 -#define Ability_GROUP_FOCUS 0x00000035 -#define Ability_PEEKABOO 0x00000036 -#define Ability_HEALTHY_HEALTHY 0x00000037 +enum Abilities { + ABILITY_DODGE_MASTER = 0, + ABILITY_UNUSED, + ABILITY_SPIKE_SHIELD, + ABILITY_FIRST_ATTACK, + ABILITY_H_P_PLUS, + ABILITY_DOUBLE_DIP, + ABILITY_MYSTERY_SCROLL, + ABILITY_FIRE_SHIELD, + ABILITY_PRETTY_LUCKY, + ABILITY_H_P_DRAIN, + ABILITY_ALL_OR_NOTHING, + ABILITY_SLOW_GO, + ABILITY_F_P_PLUS, + ABILITY_ICE_POWER, + ABILITY_FEELING_FINE, + ABILITY_ATTACK_F_X, + ABILITY_MONEY_MONEY, + ABILITY_CHILL_OUT, + ABILITY_HAPPY_HEART, + ABILITY_ZAP_TAP, + ABILITY_MEGA_RUSH, + ABILITY_BERSERKER, + ABILITY_RIGHT_ON, + ABILITY_RUNAWAY_PAY, + ABILITY_FLOWER_SAVER, + ABILITY_PAY_OFF, + ABILITY_QUICK_CHANGE, + ABILITY_DEFEND_PLUS, + ABILITY_POWER_PLUS, + ABILITY_REFUND, + ABILITY_POWER_RUSH, + ABILITY_CRAZY_HEART, + ABILITY_LAST_STAND, + ABILITY_CLOSE_CALL, + ABILITY_P_UP_D_DOWN, + ABILITY_LUCKY_DAY, + ABILITY_MEGA_H_P_DRAIN, + ABILITY_P_DOWN_D_UP, + ABILITY_FLOWER_FANATIC, + ABILITY_SPEEDY_SPIN, + ABILITY_SPIN_ATTACK, + ABILITY_I_SPY, + ABILITY_BUMP_ATTACK, + ABILITY_HEART_FINDER, + ABILITY_FLOWER_FINDER, + ABILITY_DIZZY_ATTACK, + ABILITY_FINAL_GOOMPA, + ABILITY_FINAL_BOMBOMB, + ABILITY_DEEP_FOCUS, + ABILITY_SUPER_FOCUS, + ABILITY_KAIDEN, + ABILITY_DAMAGE_DODGE, + ABILITY_HAPPY_FLOWER, + ABILITY_GROUP_FOCUS, + ABILITY_PEEKABOO, + ABILITY_HEALTHY_HEALTHY, +}; typedef UNK_TYPE Emote; -#define Emote_EXCLAMATION 0x00000000 -#define Emote_SHOCK 0x00000001 -#define Emote_QUESTION 0x00000002 -#define Emote_FRUSTRATION 0x00000003 -#define Emote_ELLIPSIS 0x00000004 -#define Emote_INVALID 0x00000005 +enum Emotes { + EMOTE_EXCLAMATION = 0, + EMOTE_SHOCK, + EMOTE_QUESTION, + EMOTE_FRUSTRATION, + EMOTE_ELLIPSIS, + EMOTE_INVALID, +}; typedef UNK_TYPE Easing; -#define Easing_LINEAR 0x00000000 -#define Easing_QUADRATIC_IN 0x00000001 -#define Easing_CUBIC_IN 0x00000002 -#define Easing_QUARTIC_IN 0x00000003 -#define Easing_QUADRATIC_OUT 0x00000004 -#define Easing_CUBIC_OUT 0x00000005 -#define Easing_QUARTIC_OUT 0x00000006 -#define Easing_COS_SLOW_OVERSHOOT 0x00000007 -#define Easing_COS_FAST_OVERSHOOT 0x00000008 -#define Easing_COS_BOUNCE 0x00000009 -#define Easing_COS_IN_OUT 0x0000000A -#define Easing_SIN_OUT 0x0000000B -#define Easing_COS_IN 0x0000000C +enum Easings { + EASING_LINEAR = 0, + EASING_QUADRATIC_IN, + EASING_CUBIC_IN, + EASING_QUARTIC_IN, + EASING_QUADRATIC_OUT, + EASING_CUBIC_OUT, + EASING_QUARTIC_OUT, + EASING_COS_SLOW_OVERSHOOT, + EASING_COS_FAST_OVERSHOOT, + EASING_COS_BOUNCE, + EASING_COS_IN_OUT, + EASING_SIN_OUT, + EASING_COS_IN, +}; typedef UNK_TYPE SoundID; -#define SoundId_D 0x0000000D // TODO -#define SoundId_E 0x0000000E // TODO -#define SoundId_JR_TROOPA_SPLASH 0x00000045 -#define SoundId_JR_TROOPA_SWIM 0x00000046 -#define SoundId_BOO_SPOOK 0x00000047 -#define SoundId_BOO_VANISH 0x000000C1 -#define SoundId_BOO_APPEAR 0x000000C3 -#define SoundId_MENU_OPEN 0x000000C5 -#define SoundId_MENU_CLOSE 0x000000C6 -#define SoundId_MENU_CHANGE_SELECTION 0x000000C7 -#define SoundId_MENU_CHANGE_TAB 0x000000C8 -#define SoundId_MENU_NEXT 0x000000C9 -#define SoundId_MENU_BACK 0x000000CA -#define SoundId_STEP1 0x00000141 -#define SoundId_STEP2 0x00000142 -#define SoundId_TORNADO_JUMP 0x00000147 -#define SoundId_SOFT_LAND 0x00000148 -#define SoundId_LAND 0x0000014B -#define SoundId_HIT_BLOCK 0x0000014E -#define SoundId_SEARCH_BUSH 0x00000153 -#define SoundId_BASIC_DOOR_OPEN 0x000001C1 -#define SoundId_BASIC_DOOR_CLOSE 0x000001C2 -#define SoundId_METAL_DOOR_OPEN 0x000001C3 -#define SoundId_METAL_DOOR_CLOSE 0x000001C4 -#define SoundId_LARGE_DOOR_OPEN 0x000001C5 -#define SoundId_LARGE_DOOR_CLOSE 0x000001C6 -#define SoundId_CREAKY_DOOR_OPEN 0x000001C7 -#define SoundId_CREAKY_DOOR_CLOSE 0x000001C8 -#define SoundId_METAL_GATE_OPEN 0x000001C9 -#define SoundId_METAL_GATE_CLOSE 0x000001CA -#define SoundId_246 0x00000246 // TODO -#define SoundId_259 0x00000259 // TODO -#define SoundId_25A 0x0000025A // TODO -#define SoundId_25C 0x0000025C // TODO -#define SoundId_25D 0x0000025D // TODO -#define SoundId_BOW_SPOOK 0x00000291 -#define SoundId_SMOKE_BURST 0x000002CD -#define SoundId_DAYZEE_SONG 0x000002D7 -#define SoundId_POWER_UP 0x000002D8 -#define SoundId_CLOSE_SHELL 0x000002FF -#define SoundId_SHY_GUY_SCREAMS1 0x0000030C -#define SoundId_SHY_GUY_SCREAMS2 0x0000030D -#define SoundId_SHY_GUY_SCREAMS3 0x0000030E -#define SoundId_TOY_TANK_MOVE1 0x0000030F -#define SoundId_TOY_TANK_MOVE2 0x00000310 -#define SoundId_MOLE_SURFACE 0x00000321 -#define SoundId_MOLE_DIG 0x00000322 -#define SoundId_MOLE_POP 0x00000323 -#define SoundId_361 0x00000361 // TODO -#define SoundId_362 0x00000362 // TODO -#define SoundId_363 0x00000363 // TODO -#define SoundId_364 0x00000364 // TODO -#define SoundId_365 0x00000365 // TODO -#define SoundId_367 0x00000367 // TODO -#define SoundId_368 0x00000368 // TODO -#define SoundId_369 0x00000369 // TODO -#define SoundId_375 0x00000375 // TODO -#define SoundId_376 0x00000376 // TODO -#define SoundId_377 0x00000377 // TODO -#define SoundId_379 0x00000379 // TODO -#define SoundId_GENERAL_WHISTLE 0x00000395 -#define SoundId_OPEN_SHELL 0x000003D4 -#define SoundId_JUMP 0x000003E2 -#define SoundId_MISS_JUMP 0x000003E3 -#define SoundId_DEATH 0x000003E5 -#define SoundId_BIG_POWER_UP 0x000003E6 -#define SoundId_MOLE_THROW 0x000003E8 -#define SoundId_3F3 0x000003F3 // TODO -#define SoundId_THROW 0x000003FA -#define SoundId_BOW_VANISH 0x0000200E -#define SoundId_BOW_APPEAR 0x0000200F -#define SoundId_2010 0x00002010 // TODO -#define SoundId_CANNON1 0x00002016 -#define SoundId_CANNON2 0x00002017 -#define SoundId_CANNON3 0x00002018 -#define SoundId_202C 0x0000202C // TODO -#define SoundId_202D 0x0000202D // TODO -#define SoundId_202E 0x0000202E // TODO -#define SoundId_2030 0x00002030 // TODO -#define SoundId_BOMB_BLAST 0x00002076 -#define SoundId_JUMP2 0x00002081 -#define SoundId_208D 0x0000208D // TODO -#define SoundId_208E 0x0000208E // TODO -#define SoundId_2095 0x00002095 // TODO -#define SoundId_SPELL_CAST1 0x000020D4 -#define SoundId_SPELL_CAST2 0x000020D5 -#define SoundId_SPELL_CAST3 0x000020D6 -#define SoundId_SPELL_CAST4 0x000020D7 -#define SoundId_SPELL_CAST5 0x000020D8 +enum SoundIDs { + SOUND_UNKNOWN_D = 13, + SOUND_UNKNOWN_E = 14, + SOUND_UNKNOWN_43 = 67, + SOUND_JR_TROOPA_SPLASH = 69, + SOUND_JR_TROOPA_SWIM, + SOUND_BOO_SPOOK, + SOUND_BOO_VANISH = 193, + SOUND_BOO_APPEAR = 195, + SOUND_MENU_OPEN = 197, + SOUND_MENU_CLOSE, + SOUND_MENU_CHANGE_SELECTION, + SOUND_MENU_CHANGE_TAB, + SOUND_MENU_NEXT, + SOUND_MENU_BACK, + SOUND_STEP1 = 321, + SOUND_STEP2, + SOUND_TORNADO_JUMP = 327, + SOUND_SOFT_LAND, + SOUND_LAND = 331, + SOUND_HIT_BLOCK = 334, + SOUND_SEARCH_BUSH = 339, + SOUND_BASIC_DOOR_OPEN = 449, + SOUND_BASIC_DOOR_CLOSE, + SOUND_METAL_DOOR_OPEN, + SOUND_METAL_DOOR_CLOSE, + SOUND_LARGE_DOOR_OPEN, + SOUND_LARGE_DOOR_CLOSE, + SOUND_CREAKY_DOOR_OPEN, + SOUND_CREAKY_DOOR_CLOSE, + SOUND_METAL_GATE_OPEN, + SOUND_METAL_GATE_CLOSE, + SOUND_UNKNOWN_246 = 582, + SOUND_UNKNOWN_259 = 601, + SOUND_UNKNOWN_25A, + SOUND_UNKNOWN_25C = 604, + SOUND_UNKNOWN_25D, + SOUND_BOW_SPOOK = 657, + SOUND_UNUSED_2C1 = 705, + SOUND_SMOKE_BURST = 717, + SOUND_DAYZEE_SONG = 727, + SOUND_POWER_UP, + SOUND_CLOSE_SHELL = 767, + SOUND_SHY_GUY_SCREAMS1 = 780, + SOUND_SHY_GUY_SCREAMS2, + SOUND_SHY_GUY_SCREAMS3, + SOUND_TOY_TANK_MOVE1, + SOUND_TOY_TANK_MOVE2, + SOUND_MOLE_SURFACE = 801, + SOUND_MOLE_DIG, + SOUND_MOLE_POP, + SOUND_UNKNOWN_361 = 865, + SOUND_UNKNOWN_362, + SOUND_UNKNOWN_363, + SOUND_UNKNOWN_364, + SOUND_UNKNOWN_365, + SOUND_UNKNOWN_366, + SOUND_UNKNOWN_367, + SOUND_UNKNOWN_368, + SOUND_UNKNOWN_369, + SOUND_UNKNOWN_375 = 885, + SOUND_UNKNOWN_376, + SOUND_UNKNOWN_377, + SOUND_UNKNOWN_379 = 889, + SOUND_GENERAL_WHISTLE = 917, + SOUND_OPEN_SHELL = 980, + SOUND_JUMP_3E2 = 994, + SOUND_MISS_JUMP, + SOUND_DEATH = 997, + SOUND_BIG_POWER_UP, + SOUND_MOLE_THROW = 1000, + SOUND_UNKNOWN_3F3 = 1011, + SOUND_THROW = 1018, + SOUND_BOW_VANISH = 8206, + SOUND_BOW_APPEAR, + SOUND_UNKNOWN_2010, + SOUND_CANNON1 = 8214, + SOUND_CANNON2, + SOUND_CANNON3, + SOUND_UNKNOWN_202C = 8236, + SOUND_UNKNOWN_202D, + SOUND_UNKNOWN_202E, + SOUND_UNKNOWN_202F, + SOUND_UNKNOWN_2030, + SOUND_BOMB_BLAST = 8310, + SOUND_JUMP_2081 = 8321, + SOUND_UNKNOWN_208D = 8333, + SOUND_UNKNOWN_208E, + SOUND_UNKNOWN_2095 = 8341, + SOUND_SPELL_CAST1 = 8404, + SOUND_SPELL_CAST2, + SOUND_SPELL_CAST3, + SOUND_SPELL_CAST4, + SOUND_SPELL_CAST5, +}; typedef UNK_TYPE Cam; -#define Cam_DEFAULT 0x00000000 -#define Cam_BATTLE 0x00000001 -#define Cam_TATTLE 0x00000002 -#define Cam_CAM3 0x00000003 +enum Cams { + CAM_DEFAULT = 0, + CAM_BATTLE, + CAM_TATTLE, + CAM_CAM3, +}; #define LOOKUP_ITEM(itemID) gItemTable[itemID & ~0xF0000] -typedef s16 ItemId; -#define ItemId_JUMP 0x00000001 -#define ItemId_SPIN_JUMP 0x00000002 -#define ItemId_TORNADO_JUMP 0x00000003 -#define ItemId_HAMMER 0x00000004 -#define ItemId_SUPER_HAMMER 0x00000005 -#define ItemId_ULTRA_HAMMER 0x00000006 -#define ItemId_LUCKY_STAR 0x00000007 -#define ItemId_MAP 0x00000008 -#define ItemId_BIG_MAP 0x00000009 -#define ItemId_FIRST_DEGREE_CARD 0x0000000A -#define ItemId_SECOND_DEGREE_CARD 0x0000000B -#define ItemId_THIRD_DEGREE_CARD 0x0000000C -#define ItemId_FOURTH_DEGREE_CARD 0x0000000D -#define ItemId_DIPLOMA 0x0000000E -#define ItemId_ULTRA_STONE 0x0000000F -#define ItemId_FORTRESS_KEY 0x00000010 -#define ItemId_RUINS_KEY 0x00000011 -#define ItemId_PULSE_STONE 0x00000012 -#define ItemId_CASTLE_KEY1 0x00000013 -#define ItemId_PALACE_KEY 0x00000014 -#define ItemId_LUNAR_STONE 0x00000015 -#define ItemId_PYRAMID_STONE 0x00000016 -#define ItemId_DIAMOND_STONE 0x00000017 -#define ItemId_GOLDEN_VASE 0x00000018 -#define ItemId_KOOPERS_SHELL 0x00000019 -#define ItemId_CASTLE_KEY2 0x0000001A -#define ItemId_FOREST_PASS 0x0000001B -#define ItemId_WEIGHT 0x0000001C -#define ItemId_BOOS_PORTRAIT 0x0000001D -#define ItemId_CRYSTAL_BERRY 0x0000001E -#define ItemId_MYSTICAL_KEY 0x0000001F -#define ItemId_STOREROOM_KEY 0x00000020 -#define ItemId_TOY_TRAIN 0x00000021 -#define ItemId_RECORD 0x00000022 -#define ItemId_FRYING_PAN 0x00000023 -#define ItemId_DICTIONARY 0x00000024 -#define ItemId_MYSTERY_NOTE 0x00000025 -#define ItemId_SUSPICIOUS_NOTE 0x00000026 -#define ItemId_CRYSTAL_BALL 0x00000027 -#define ItemId_SCREWDRIVER 0x00000028 -#define ItemId_COOKBOOK 0x00000029 -#define ItemId_JADE_RAVEN 0x0000002A -#define ItemId_MAGICAL_SEED1 0x0000002B -#define ItemId_MAGICAL_SEED2 0x0000002C -#define ItemId_MAGICAL_SEED3 0x0000002D -#define ItemId_MAGICAL_SEED4 0x0000002E -#define ItemId_TOAD_DOLL 0x0000002F -#define ItemId_CALCULATOR 0x00000030 -#define ItemId_BUCKET 0x00000031 -#define ItemId_SCARF 0x00000032 -#define ItemId_RED_KEY 0x00000033 -#define ItemId_BLUE_KEY 0x00000034 -#define ItemId_LETTER01 0x00000036 -#define ItemId_LETTER02 0x00000037 -#define ItemId_LETTER03 0x00000038 -#define ItemId_LETTER04 0x00000039 -#define ItemId_LETTER05 0x0000003A -#define ItemId_LETTER06 0x0000003B -#define ItemId_LETTER07 0x0000003C -#define ItemId_LETTER08 0x0000003D -#define ItemId_LETTER09 0x0000003E -#define ItemId_LETTER10 0x00000040 -#define ItemId_LETTER11 0x00000041 -#define ItemId_LETTER12 0x00000045 -#define ItemId_LETTER13 0x00000046 -#define ItemId_LETTER14 0x00000047 -#define ItemId_LETTER15 0x00000048 -#define ItemId_LETTER16 0x00000049 -#define ItemId_LETTER17 0x0000004A -#define ItemId_LETTER18 0x0000004B -#define ItemId_LETTER19 0x0000004C -#define ItemId_LETTER20 0x0000004E -#define ItemId_LETTER21 0x0000004F -#define ItemId_LETTER22 0x00000050 -#define ItemId_LETTER23 0x00000051 -#define ItemId_LETTER24 0x00000052 -#define ItemId_ARTIFACT 0x00000053 -#define ItemId_LETTER25 0x00000054 -#define ItemId_DOLLY 0x00000056 -#define ItemId_WATER_STONE 0x00000057 -#define ItemId_MAGICAL_BEAN 0x00000058 -#define ItemId_FERTILE_SOIL 0x00000059 -#define ItemId_MIRACLE_WATER 0x0000005A -#define ItemId_VOLCANO_VASE 0x0000005B -#define ItemId_TAPE 0x0000005C -#define ItemId_SUGAR 0x0000005D -#define ItemId_SALT 0x0000005E -#define ItemId_EGG1 0x0000005F -#define ItemId_CREAM 0x00000060 -#define ItemId_STRAWBERRY 0x00000061 -#define ItemId_BUTTER 0x00000062 -#define ItemId_CLEANSER 0x00000063 -#define ItemId_WATER 0x00000064 -#define ItemId_FLOUR 0x00000065 -#define ItemId_MILK 0x00000066 -#define ItemId_LYRICS 0x00000067 -#define ItemId_MELODY 0x00000068 -#define ItemId_MAILBAG 0x00000069 -#define ItemId_CASTLE_KEY3 0x0000006A -#define ItemId_ODD_KEY 0x0000006B -#define ItemId_STAR_STONE 0x0000006C -#define ItemId_SNEAKY_PARASOL 0x0000006D -#define ItemId_KOOPA_LEGENDS 0x0000006E -#define ItemId_AUTOGRAPH1 0x0000006F -#define ItemId_EMPTY_WALLET 0x00000070 -#define ItemId_AUTOGRAPH2 0x00000071 -#define ItemId_KOOPA_SHELL 0x00000072 -#define ItemId_OLD_PHOTO 0x00000073 -#define ItemId_GLASSES 0x00000074 -#define ItemId_PHOTOGRAPH 0x00000075 -#define ItemId_PACKAGE 0x00000076 -#define ItemId_RED_JAR 0x00000077 -#define ItemId_CASTLE_KEY4 0x00000078 -#define ItemId_WAREHOUSE_KEY 0x00000079 -#define ItemId_PRISON_KEY1 0x0000007A -#define ItemId_SILVER_CREDIT 0x0000007B -#define ItemId_GOLD_CREDIT 0x0000007C -#define ItemId_PRISON_KEY2 0x0000007D -#define ItemId_PRISON_KEY3 0x0000007E -#define ItemId_PRISON_KEY4 0x0000007F -#define ItemId_FIRE_FLOWER 0x00000080 -#define ItemId_SNOWMAN_DOLL 0x00000081 -#define ItemId_THUNDER_RAGE 0x00000082 -#define ItemId_SHOOTING_STAR 0x00000083 -#define ItemId_THUNDER_BOLT 0x00000084 -#define ItemId_PEBBLE 0x00000085 -#define ItemId_DUSTY_HAMMER 0x00000086 -#define ItemId_INSECTICIDE_HERB 0x00000087 -#define ItemId_STONE_CAP 0x00000088 -#define ItemId_TASTY_TONIC 0x00000089 -#define ItemId_MUSHROOM 0x0000008A -#define ItemId_VOLT_SHROOM 0x0000008B -#define ItemId_SUPER_SHROOM 0x0000008C -#define ItemId_DRIED_SHROOM 0x0000008D -#define ItemId_ULTRA_SHROOM 0x0000008E -#define ItemId_SLEEPY_SHEEP 0x0000008F -#define ItemId_P_O_W_BLOCK 0x00000090 -#define ItemId_HUSTLE_DRINK 0x00000091 -#define ItemId_STOP_WATCH 0x00000092 -#define ItemId_WHACKAS_BUMP 0x00000093 -#define ItemId_APPLE 0x00000094 -#define ItemId_LIFE_SHROOM 0x00000095 -#define ItemId_MYSTERY 0x00000096 -#define ItemId_REPEL_GEL 0x00000097 -#define ItemId_FRIGHT_JAR 0x00000098 -#define ItemId_PLEASE_COME_BACK 0x00000099 -#define ItemId_DIZZY_DIAL 0x0000009A -#define ItemId_SUPER_SODA 0x0000009B -#define ItemId_LEMON 0x0000009C -#define ItemId_LIME 0x0000009D -#define ItemId_BLUE_BERRY 0x0000009E -#define ItemId_RED_BERRY 0x0000009F -#define ItemId_YELLOW_BERRY 0x000000A0 -#define ItemId_BUBBLE_BERRY 0x000000A1 -#define ItemId_JAMMIN_JELLY 0x000000A2 -#define ItemId_MAPLE_SYRUP 0x000000A3 -#define ItemId_HONEY_SYRUP 0x000000A4 -#define ItemId_GOOMNUT 0x000000A5 -#define ItemId_KOOPA_LEAF 0x000000A6 -#define ItemId_DRIED_PASTA 0x000000A7 -#define ItemId_DRIED_FRUIT 0x000000A8 -#define ItemId_STRANGE_LEAF 0x000000A9 -#define ItemId_CAKE_MIX 0x000000AA -#define ItemId_EGG2 0x000000AB -#define ItemId_COCONUT 0x000000AC -#define ItemId_MELON 0x000000AD -#define ItemId_STINKY_HERB 0x000000AE -#define ItemId_ICED_POTATO 0x000000AF -#define ItemId_SPICY_SOUP 0x000000B0 -#define ItemId_APPLE_PIE 0x000000B1 -#define ItemId_HONEY_ULTRA 0x000000B2 -#define ItemId_MAPLE_ULTRA 0x000000B3 -#define ItemId_JELLY_ULTRA 0x000000B4 -#define ItemId_KOOPASTA 0x000000B5 -#define ItemId_FRIED_SHROOM 0x000000B6 -#define ItemId_SHROOM_CAKE 0x000000B7 -#define ItemId_SHROOM_STEAK 0x000000B8 -#define ItemId_HOT_SHROOM 0x000000B9 -#define ItemId_SWEET_SHROOM 0x000000BA -#define ItemId_YUMMY_MEAL 0x000000BB -#define ItemId_HEALTHY_JUICE 0x000000BC -#define ItemId_BLAND_MEAL 0x000000BD -#define ItemId_DELUXE_FEAST 0x000000BE -#define ItemId_SPECIAL_SHAKE 0x000000BF -#define ItemId_BIG_COOKIE 0x000000C0 -#define ItemId_CAKE 0x000000C1 -#define ItemId_MISTAKE 0x000000C2 -#define ItemId_KOOPA_TEA 0x000000C3 -#define ItemId_HONEY_SUPER 0x000000C4 -#define ItemId_MAPLE_SUPER 0x000000C5 -#define ItemId_JELLY_SUPER 0x000000C6 -#define ItemId_SPAGHETTI 0x000000C7 -#define ItemId_EGG_MISSILE 0x000000C8 -#define ItemId_FRIED_EGG 0x000000C9 -#define ItemId_HONEY_SHROOM 0x000000CA -#define ItemId_HONEY_CANDY 0x000000CB -#define ItemId_ELECTRO_POP 0x000000CC -#define ItemId_FIRE_POP 0x000000CD -#define ItemId_LIME_CANDY 0x000000CE -#define ItemId_COCO_POP 0x000000CF -#define ItemId_LEMON_CANDY 0x000000D0 -#define ItemId_JELLY_POP 0x000000D1 -#define ItemId_STRANGE_CAKE 0x000000D2 -#define ItemId_KOOKY_COOKIE 0x000000D3 -#define ItemId_FROZEN_FRIES 0x000000D4 -#define ItemId_POTATO_SALAD 0x000000D5 -#define ItemId_NUTTY_CAKE 0x000000D6 -#define ItemId_MAPLE_SHROOM 0x000000D7 -#define ItemId_BOILED_EGG 0x000000D8 -#define ItemId_YOSHI_COOKIE 0x000000D9 -#define ItemId_JELLY_SHROOM1 0x000000DA -#define ItemId_JELLY_SHROOM2 0x000000DB -#define ItemId_JELLY_SHROOM3 0x000000DC -#define ItemId_JELLY_SHROOM4 0x000000DD -#define ItemId_JELLY_SHROOM5 0x000000DE -#define ItemId_JELLY_SHROOM6 0x000000DF -#define ItemId_SPIN_SMASH 0x000000E0 -#define ItemId_MULTIBOUNCE 0x000000E1 -#define ItemId_POWER_PLUS_A 0x000000E2 -#define ItemId_DODGE_MASTER 0x000000E3 -#define ItemId_POWER_BOUNCE 0x000000E4 -#define ItemId_SPIKE_SHIELD 0x000000E5 -#define ItemId_FIRST_ATTACK 0x000000E6 -#define ItemId_H_P_PLUS_A 0x000000E7 -#define ItemId_QUAKE_HAMMER 0x000000E8 -#define ItemId_DOUBLE_DIP 0x000000E9 -#define ItemId_MYSTERY_SCROLL 0x000000EA -#define ItemId_SLEEP_STOMP 0x000000EB -#define ItemId_FIRE_SHIELD 0x000000EC -#define ItemId_QUICK_CHANGE 0x000000ED -#define ItemId_D_DOWN_POUND 0x000000EE -#define ItemId_DIZZY_STOMP 0x000000EF -#define ItemId_SMASH_CHARGE0 0x000000F0 -#define ItemId_PRETTY_LUCKY 0x000000F1 -#define ItemId_FEELING_FINE 0x000000F2 -#define ItemId_ATTACK_F_X_A 0x000000F3 -#define ItemId_ALLOR_NOTHING 0x000000F4 -#define ItemId_H_P_DRAIN 0x000000F5 -#define ItemId_JUMP_CHARGE0 0x000000F6 -#define ItemId_SLOW_GO 0x000000F7 -#define ItemId_F_P_PLUS_A 0x000000F8 -#define ItemId_MEGA_RUSH 0x000000F9 -#define ItemId_ICE_POWER 0x000000FA -#define ItemId_DEFEND_PLUS_A 0x000000FB -#define ItemId_PAY_OFF 0x000000FC -#define ItemId_MONEY_MONEY 0x000000FD -#define ItemId_CHILL_OUT 0x000000FE -#define ItemId_HAPPY_HEART_A 0x000000FF -#define ItemId_ZAP_TAP 0x00000100 -#define ItemId_BERSERKER 0x00000101 -#define ItemId_RIGHT_ON 0x00000102 -#define ItemId_RUNAWAY_PAY 0x00000103 -#define ItemId_REFUND 0x00000104 -#define ItemId_FLOWER_SAVER_A 0x00000105 -#define ItemId_TRIPLE_DIP 0x00000106 -#define ItemId_HAMMER_THROW 0x00000107 -#define ItemId_MEGA_QUAKE 0x00000108 -#define ItemId_SMASH_CHARGE 0x00000109 -#define ItemId_JUMP_CHARGE 0x0000010A -#define ItemId_S_SMASH_CHG 0x0000010B -#define ItemId_S_JUMP_CHG 0x0000010C -#define ItemId_POWER_RUSH 0x0000010D -#define ItemId_AUTO_JUMP 0x0000010E -#define ItemId_AUTO_SMASH 0x0000010F -#define ItemId_CRAZY_HEART 0x00000110 -#define ItemId_LAST_STAND 0x00000111 -#define ItemId_CLOSE_CALL 0x00000112 -#define ItemId_P_UP_D_DOWN 0x00000113 -#define ItemId_LUCKY_DAY 0x00000114 -#define ItemId_MEGA_H_P_DRAIN 0x00000115 -#define ItemId_P_DOWN_D_UP 0x00000116 -#define ItemId_POWER_QUAKE 0x00000117 -#define ItemId_AUTO_MULTIBOUNCE 0x00000118 -#define ItemId_FLOWER_FANATIC 0x00000119 -#define ItemId_HEART_FINDER 0x0000011A -#define ItemId_FLOWER_FINDER 0x0000011B -#define ItemId_SPIN_ATTACK 0x0000011C -#define ItemId_DIZZY_ATTACK 0x0000011D -#define ItemId_I_SPY 0x0000011E -#define ItemId_SPEEDY_SPIN 0x0000011F -#define ItemId_BUMP_ATTACK 0x00000120 -#define ItemId_POWER_JUMP 0x00000121 -#define ItemId_SUPER_JUMP 0x00000122 -#define ItemId_MEGA_JUMP 0x00000123 -#define ItemId_POWER_SMASH1 0x00000124 -#define ItemId_SUPER_SMASH 0x00000125 -#define ItemId_MEGA_SMASH 0x00000126 -#define ItemId_POWER_SMASH2 0x00000127 -#define ItemId_POWER_SMASH3 0x00000128 -#define ItemId_DEEP_FOCUS1 0x00000129 -#define ItemId_SUPER_FOCUS 0x0000012A -#define ItemId_SHRINK_SMASH 0x0000012B -#define ItemId_SHELL_CRACK 0x0000012C -#define ItemId_KAIDEN 0x0000012D -#define ItemId_D_DOWN_JUMP 0x0000012E -#define ItemId_SHRINK_STOMP 0x0000012F -#define ItemId_DAMAGE_DODGE_A 0x00000130 -#define ItemId_EARTHQUAKE_JUMP 0x00000131 -#define ItemId_DEEP_FOCUS2 0x00000132 -#define ItemId_DEEP_FOCUS3 0x00000133 -#define ItemId_H_P_PLUS_B 0x00000134 -#define ItemId_F_P_PLUS_B 0x00000135 -#define ItemId_HAPPY_HEART_B 0x00000136 -#define ItemId_HAPPY_HEART_X 0x00000137 -#define ItemId_FLOWER_SAVER_B 0x00000138 -#define ItemId_FLOWER_SAVER_X 0x00000139 -#define ItemId_DAMAGE_DODGE_B 0x0000013A -#define ItemId_DAMAGE_DODGE_X 0x0000013B -#define ItemId_POWER_PLUS_B 0x0000013C -#define ItemId_POWER_PLUS_X 0x0000013D -#define ItemId_DEFEND_PLUS_X 0x0000013E -#define ItemId_DEFEND_PLUS_Y 0x0000013F -#define ItemId_HAPPY_FLOWER_A 0x00000140 -#define ItemId_HAPPY_FLOWER_B 0x00000141 -#define ItemId_HAPPY_FLOWER_X 0x00000142 -#define ItemId_GROUP_FOCUS 0x00000143 -#define ItemId_PEEKABOO 0x00000144 -#define ItemId_ATTACK_F_X_D 0x00000145 -#define ItemId_ATTACK_F_X_B 0x00000146 -#define ItemId_ATTACK_F_X_E 0x00000147 -#define ItemId_ATTACK_F_X_C 0x00000148 -#define ItemId_ATTACK_F_X_F 0x00000149 -#define ItemId_H_P_PLUS_C 0x0000014A -#define ItemId_H_P_PLUS_X 0x0000014B -#define ItemId_H_P_PLUS_Y 0x0000014C -#define ItemId_F_P_PLUS_C 0x0000014D -#define ItemId_F_P_PLUS_X 0x0000014E -#define ItemId_F_P_PLUS_Y 0x0000014F -#define ItemId_HEALTHY_HEALTHY 0x00000150 -#define ItemId_ATTACK_F_X_F2 0x00000151 -#define ItemId_ATTACK_F_X_F3 0x00000152 -#define ItemId_ATTACK_F_X_F4 0x00000153 -#define ItemId_ATTACK_F_X_F5 0x00000154 -#define ItemId_PARTNER_ATTACK 0x00000155 -#define ItemId_HEART 0x00000156 -#define ItemId_COIN 0x00000157 -#define ItemId_HEART_PIECE 0x00000158 -#define ItemId_STAR_POINT 0x00000159 -#define ItemId_FULL_HEAL 0x0000015A -#define ItemId_FLOWER 0x0000015B -#define ItemId_STAR_PIECE 0x0000015C -#define ItemId_PRESENT 0x0000015D -#define ItemId_COMPLETE_CAKE 0x0000015E -#define ItemId_BARE_CAKE 0x0000015F -#define ItemId_EMPTY_CAKE_PAN 0x00000160 -#define ItemId_FULL_CAKE_PAN 0x00000161 -#define ItemId_EMPTY_MIXING_BOWL 0x00000162 -#define ItemId_FULL_MIXING_BOWL 0x00000163 -#define ItemId_CAKE_WITH_ICING 0x00000164 -#define ItemId_CAKE_WITH_BERRIES 0x00000165 -#define ItemId_HAMMER1_ICON 0x00000166 -#define ItemId_HAMMER2_ICON 0x00000167 -#define ItemId_HAMMER3_ICON 0x00000168 -#define ItemId_BOOTS1_ICON 0x00000169 -#define ItemId_BOOTS2_ICON 0x0000016A -#define ItemId_BOOTS3_ICON 0x0000016B -#define ItemId_ITEMS_ICON 0x0000016C +typedef s16 ItemID; +enum ItemIDs { + ITEM_JUMP = 1, + ITEM_SPIN_JUMP, + ITEM_TORNADO_JUMP, + ITEM_HAMMER, + ITEM_SUPER_HAMMER, + ITEM_ULTRA_HAMMER, + ITEM_LUCKY_STAR, + ITEM_MAP, + ITEM_BIG_MAP, + ITEM_FIRST_DEGREE_CARD, + ITEM_SECOND_DEGREE_CARD, + ITEM_THIRD_DEGREE_CARD, + ITEM_FOURTH_DEGREE_CARD, + ITEM_DIPLOMA, + ITEM_ULTRA_STONE, + ITEM_FORTRESS_KEY, + ITEM_RUINS_KEY, + ITEM_PULSE_STONE, + ITEM_CASTLE_KEY1, + ITEM_PALACE_KEY, + ITEM_LUNAR_STONE, + ITEM_PYRAMID_STONE, + ITEM_DIAMOND_STONE, + ITEM_GOLDEN_VASE, + ITEM_KOOPERS_SHELL, + ITEM_CASTLE_KEY2, + ITEM_FOREST_PASS, + ITEM_WEIGHT, + ITEM_BOOS_PORTRAIT, + ITEM_CRYSTAL_BERRY, + ITEM_MYSTICAL_KEY, + ITEM_STOREROOM_KEY, + ITEM_TOY_TRAIN, + ITEM_RECORD, + ITEM_FRYING_PAN, + ITEM_DICTIONARY, + ITEM_MYSTERY_NOTE, + ITEM_SUSPICIOUS_NOTE, + ITEM_CRYSTAL_BALL, + ITEM_SCREWDRIVER, + ITEM_COOKBOOK, + ITEM_JADE_RAVEN, + ITEM_MAGICAL_SEED1, + ITEM_MAGICAL_SEED2, + ITEM_MAGICAL_SEED3, + ITEM_MAGICAL_SEED4, + ITEM_TOAD_DOLL, + ITEM_CALCULATOR, + ITEM_BUCKET, + ITEM_SCARF, + ITEM_RED_KEY, + ITEM_BLUE_KEY, + ITEM_LETTER01 = 54, + ITEM_LETTER02, + ITEM_LETTER03, + ITEM_LETTER04, + ITEM_LETTER05, + ITEM_LETTER06, + ITEM_LETTER07, + ITEM_LETTER08, + ITEM_LETTER09, + ITEM_LETTER10 = 64, + ITEM_LETTER11, + ITEM_LETTER12 = 69, + ITEM_LETTER13, + ITEM_LETTER14, + ITEM_LETTER15, + ITEM_LETTER16, + ITEM_LETTER17, + ITEM_LETTER18, + ITEM_LETTER19, + ITEM_LETTER20 = 78, + ITEM_LETTER21, + ITEM_LETTER22, + ITEM_LETTER23, + ITEM_LETTER24, + ITEM_ARTIFACT, + ITEM_LETTER25, + ITEM_DOLLY = 86, + ITEM_WATER_STONE, + ITEM_MAGICAL_BEAN, + ITEM_FERTILE_SOIL, + ITEM_MIRACLE_WATER, + ITEM_VOLCANO_VASE, + ITEM_TAPE, + ITEM_SUGAR, + ITEM_SALT, + ITEM_EGG1, + ITEM_CREAM, + ITEM_STRAWBERRY, + ITEM_BUTTER, + ITEM_CLEANSER, + ITEM_WATER, + ITEM_FLOUR, + ITEM_MILK, + ITEM_LYRICS, + ITEM_MELODY, + ITEM_MAILBAG, + ITEM_CASTLE_KEY3, + ITEM_ODD_KEY, + ITEM_STAR_STONE, + ITEM_SNEAKY_PARASOL, + ITEM_KOOPA_LEGENDS, + ITEM_AUTOGRAPH1, + ITEM_EMPTY_WALLET, + ITEM_AUTOGRAPH2, + ITEM_KOOPA_SHELL, + ITEM_OLD_PHOTO, + ITEM_GLASSES, + ITEM_PHOTOGRAPH, + ITEM_PACKAGE, + ITEM_RED_JAR, + ITEM_CASTLE_KEY4, + ITEM_WAREHOUSE_KEY, + ITEM_PRISON_KEY1, + ITEM_SILVER_CREDIT, + ITEM_GOLD_CREDIT, + ITEM_PRISON_KEY2, + ITEM_PRISON_KEY3, + ITEM_PRISON_KEY4, + ITEM_FIRE_FLOWER, + ITEM_SNOWMAN_DOLL, + ITEM_THUNDER_RAGE, + ITEM_SHOOTING_STAR, + ITEM_THUNDER_BOLT, + ITEM_PEBBLE, + ITEM_DUSTY_HAMMER, + ITEM_INSECTICIDE_HERB, + ITEM_STONE_CAP, + ITEM_TASTY_TONIC, + ITEM_MUSHROOM, + ITEM_VOLT_SHROOM, + ITEM_SUPER_SHROOM, + ITEM_DRIED_SHROOM, + ITEM_ULTRA_SHROOM, + ITEM_SLEEPY_SHEEP, + ITEM_P_O_W_BLOCK, + ITEM_HUSTLE_DRINK, + ITEM_STOP_WATCH, + ITEM_WHACKAS_BUMP, + ITEM_APPLE, + ITEM_LIFE_SHROOM, + ITEM_MYSTERY, + ITEM_REPEL_GEL, + ITEM_FRIGHT_JAR, + ITEM_PLEASE_COME_BACK, + ITEM_DIZZY_DIAL, + ITEM_SUPER_SODA, + ITEM_LEMON, + ITEM_LIME, + ITEM_BLUE_BERRY, + ITEM_RED_BERRY, + ITEM_YELLOW_BERRY, + ITEM_BUBBLE_BERRY, + ITEM_JAMMIN_JELLY, + ITEM_MAPLE_SYRUP, + ITEM_HONEY_SYRUP, + ITEM_GOOMNUT, + ITEM_KOOPA_LEAF, + ITEM_DRIED_PASTA, + ITEM_DRIED_FRUIT, + ITEM_STRANGE_LEAF, + ITEM_CAKE_MIX, + ITEM_EGG2, + ITEM_COCONUT, + ITEM_MELON, + ITEM_STINKY_HERB, + ITEM_ICED_POTATO, + ITEM_SPICY_SOUP, + ITEM_APPLE_PIE, + ITEM_HONEY_ULTRA, + ITEM_MAPLE_ULTRA, + ITEM_JELLY_ULTRA, + ITEM_KOOPASTA, + ITEM_FRIED_SHROOM, + ITEM_SHROOM_CAKE, + ITEM_SHROOM_STEAK, + ITEM_HOT_SHROOM, + ITEM_SWEET_SHROOM, + ITEM_YUMMY_MEAL, + ITEM_HEALTHY_JUICE, + ITEM_BLAND_MEAL, + ITEM_DELUXE_FEAST, + ITEM_SPECIAL_SHAKE, + ITEM_BIG_COOKIE, + ITEM_CAKE, + ITEM_MISTAKE, + ITEM_KOOPA_TEA, + ITEM_HONEY_SUPER, + ITEM_MAPLE_SUPER, + ITEM_JELLY_SUPER, + ITEM_SPAGHETTI, + ITEM_EGG_MISSILE, + ITEM_FRIED_EGG, + ITEM_HONEY_SHROOM, + ITEM_HONEY_CANDY, + ITEM_ELECTRO_POP, + ITEM_FIRE_POP, + ITEM_LIME_CANDY, + ITEM_COCO_POP, + ITEM_LEMON_CANDY, + ITEM_JELLY_POP, + ITEM_STRANGE_CAKE, + ITEM_KOOKY_COOKIE, + ITEM_FROZEN_FRIES, + ITEM_POTATO_SALAD, + ITEM_NUTTY_CAKE, + ITEM_MAPLE_SHROOM, + ITEM_BOILED_EGG, + ITEM_YOSHI_COOKIE, + ITEM_JELLY_SHROOM1, + ITEM_JELLY_SHROOM2, + ITEM_JELLY_SHROOM3, + ITEM_JELLY_SHROOM4, + ITEM_JELLY_SHROOM5, + ITEM_JELLY_SHROOM6, + ITEM_SPIN_SMASH, + ITEM_MULTIBOUNCE, + ITEM_POWER_PLUS_A, + ITEM_DODGE_MASTER, + ITEM_POWER_BOUNCE, + ITEM_SPIKE_SHIELD, + ITEM_FIRST_ATTACK, + ITEM_H_P_PLUS_A, + ITEM_QUAKE_HAMMER, + ITEM_DOUBLE_DIP, + ITEM_MYSTERY_SCROLL, + ITEM_SLEEP_STOMP, + ITEM_FIRE_SHIELD, + ITEM_QUICK_CHANGE, + ITEM_D_DOWN_POUND, + ITEM_DIZZY_STOMP, + ITEM_SMASH_CHARGE0, + ITEM_PRETTY_LUCKY, + ITEM_FEELING_FINE, + ITEM_ATTACK_F_X_A, + ITEM_ALLOR_NOTHING, + ITEM_H_P_DRAIN, + ITEM_JUMP_CHARGE0, + ITEM_SLOW_GO, + ITEM_F_P_PLUS_A, + ITEM_MEGA_RUSH, + ITEM_ICE_POWER, + ITEM_DEFEND_PLUS_A, + ITEM_PAY_OFF, + ITEM_MONEY_MONEY, + ITEM_CHILL_OUT, + ITEM_HAPPY_HEART_A, + ITEM_ZAP_TAP, + ITEM_BERSERKER, + ITEM_RIGHT_ON, + ITEM_RUNAWAY_PAY, + ITEM_REFUND, + ITEM_FLOWER_SAVER_A, + ITEM_TRIPLE_DIP, + ITEM_HAMMER_THROW, + ITEM_MEGA_QUAKE, + ITEM_SMASH_CHARGE, + ITEM_JUMP_CHARGE, + ITEM_S_SMASH_CHG, + ITEM_S_JUMP_CHG, + ITEM_POWER_RUSH, + ITEM_AUTO_JUMP, + ITEM_AUTO_SMASH, + ITEM_CRAZY_HEART, + ITEM_LAST_STAND, + ITEM_CLOSE_CALL, + ITEM_P_UP_D_DOWN, + ITEM_LUCKY_DAY, + ITEM_MEGA_H_P_DRAIN, + ITEM_P_DOWN_D_UP, + ITEM_POWER_QUAKE, + ITEM_AUTO_MULTIBOUNCE, + ITEM_FLOWER_FANATIC, + ITEM_HEART_FINDER, + ITEM_FLOWER_FINDER, + ITEM_SPIN_ATTACK, + ITEM_DIZZY_ATTACK, + ITEM_I_SPY, + ITEM_SPEEDY_SPIN, + ITEM_BUMP_ATTACK, + ITEM_POWER_JUMP, + ITEM_SUPER_JUMP, + ITEM_MEGA_JUMP, + ITEM_POWER_SMASH1, + ITEM_SUPER_SMASH, + ITEM_MEGA_SMASH, + ITEM_POWER_SMASH2, + ITEM_POWER_SMASH3, + ITEM_DEEP_FOCUS1, + ITEM_SUPER_FOCUS, + ITEM_SHRINK_SMASH, + ITEM_SHELL_CRACK, + ITEM_KAIDEN, + ITEM_D_DOWN_JUMP, + ITEM_SHRINK_STOMP, + ITEM_DAMAGE_DODGE_A, + ITEM_EARTHQUAKE_JUMP, + ITEM_DEEP_FOCUS2, + ITEM_DEEP_FOCUS3, + ITEM_H_P_PLUS_B, + ITEM_F_P_PLUS_B, + ITEM_HAPPY_HEART_B, + ITEM_HAPPY_HEART_X, + ITEM_FLOWER_SAVER_B, + ITEM_FLOWER_SAVER_X, + ITEM_DAMAGE_DODGE_B, + ITEM_DAMAGE_DODGE_X, + ITEM_POWER_PLUS_B, + ITEM_POWER_PLUS_X, + ITEM_DEFEND_PLUS_X, + ITEM_DEFEND_PLUS_Y, + ITEM_HAPPY_FLOWER_A, + ITEM_HAPPY_FLOWER_B, + ITEM_HAPPY_FLOWER_X, + ITEM_GROUP_FOCUS, + ITEM_PEEKABOO, + ITEM_ATTACK_F_X_D, + ITEM_ATTACK_F_X_B, + ITEM_ATTACK_F_X_E, + ITEM_ATTACK_F_X_C, + ITEM_ATTACK_F_X_F, + ITEM_H_P_PLUS_C, + ITEM_H_P_PLUS_X, + ITEM_H_P_PLUS_Y, + ITEM_F_P_PLUS_C, + ITEM_F_P_PLUS_X, + ITEM_F_P_PLUS_Y, + ITEM_HEALTHY_HEALTHY, + ITEM_ATTACK_F_X_F2, + ITEM_ATTACK_F_X_F3, + ITEM_ATTACK_F_X_F4, + ITEM_ATTACK_F_X_F5, + ITEM_PARTNER_ATTACK, + ITEM_HEART, + ITEM_COIN, + ITEM_HEART_PIECE, + ITEM_STAR_POINT, + ITEM_FULL_HEAL, + ITEM_FLOWER, + ITEM_STAR_PIECE, + ITEM_PRESENT, + ITEM_COMPLETE_CAKE, + ITEM_BARE_CAKE, + ITEM_EMPTY_CAKE_PAN, + ITEM_FULL_CAKE_PAN, + ITEM_EMPTY_MIXING_BOWL, + ITEM_FULL_MIXING_BOWL, + ITEM_CAKE_WITH_ICING, + ITEM_CAKE_WITH_BERRIES, + ITEM_HAMMER1_ICON, + ITEM_HAMMER2_ICON, + ITEM_HAMMER3_ICON, + ITEM_BOOTS1_ICON, + ITEM_BOOTS2_ICON, + ITEM_BOOTS3_ICON, + ITEM_ITEMS_ICON, +}; typedef UNK_TYPE PlayerAnim; -#define PlayerAnim_STAND_STILL 0x00010000 -#define PlayerAnim_CROUCH_STILL 0x00010001 -#define PlayerAnim_2 0x00010002 // TODO -#define PlayerAnim_PANTING 0x00010003 -#define PlayerAnim_WALKING 0x00010004 -#define PlayerAnim_RUNNING 0x00010005 -#define PlayerAnim_BEFORE_JUMP 0x00010006 -#define PlayerAnim_MIDAIR_STILL 0x00010007 -#define PlayerAnim_MIDAIR 0x00010008 -#define PlayerAnim_9 0x00010009 // TODO -#define PlayerAnim_STUNNED_STILL 0x0001000E -#define PlayerAnim_DEAD_STILL 0x0001000F -#define PlayerAnim_SPINNING 0x00010011 -#define PlayerAnim_FLAILING 0x00010012 -#define PlayerAnim_SIT_STILL 0x00010013 -#define PlayerAnim_CROUCH 0x00010014 -#define PlayerAnim_STONE_STILL 0x00010015 -#define PlayerAnim_THROW 0x00010016 -#define PlayerAnim_FALL_BACK 0x00010017 -#define PlayerAnim_FALL_DOWN 0x00010018 -#define PlayerAnim_SCARED 0x00010019 -#define PlayerAnim_HURT_FOOT 0x0001001A -#define PlayerAnim_RUN_PANIC 0x0001001B -#define PlayerAnim_EAT 0x0001001C -#define PlayerAnim_STICK_OUT_TONGUE 0x0001001D -#define PlayerAnim_PLANT 0x0001001E -#define PlayerAnim_GOT_ITEM 0x0001001F -#define PlayerAnim_READY_JUMP 0x00010020 -#define PlayerAnim_THINKING 0x00010021 -#define PlayerAnim_LOST_BALANCE 0x00010022 -#define PlayerAnim_SHOCK_STILL 0x00010023 -#define PlayerAnim_DRINK 0x00010025 -#define PlayerAnim_SQUISH 0x00010026 -#define PlayerAnim_RUN_THINKING 0x00010027 -#define PlayerAnim_QUESTION 0x00010028 -#define PlayerAnim_NOD_YES 0x00010029 -#define PlayerAnim_1002B 0x0001002B // TODO -#define PlayerAnim_PRAY 0x0001002C -#define PlayerAnim_CHARRED 0x0001002F -#define PlayerAnim_GET_UP 0x00010030 -#define PlayerAnim_DUST_OFF 0x00010031 -#define PlayerAnim_THUMBS_UP 0x00010032 -#define PlayerAnim_30004 0x00030004 // TODO -#define PlayerAnim_30008 0x00030008 // TODO -#define PlayerAnim_30009 0x00030009 // TODO -#define PlayerAnim_8000B 0x0008000B // TODO +enum PlayerAnims { + ANIM_STAND_STILL = 0x10000, + ANIM_CROUCH_STILL, + ANIM_10002, + ANIM_PANTING, + ANIM_WALKING, + ANIM_RUNNING, + ANIM_BEFORE_JUMP, + ANIM_MIDAIR_STILL, + ANIM_MIDAIR, + ANIM_10009, + ANIM_STUNNED_STILL = 0x1000E, + ANIM_DEAD_STILL, + ANIM_SPINNING = 0x10011, + ANIM_FLAILING, + ANIM_SIT_STILL, + ANIM_CROUCH, + ANIM_STONE_STILL, + ANIM_THROW, + ANIM_FALL_BACK, + ANIM_FALL_DOWN, + ANIM_SCARED, + ANIM_HURT_FOOT, + ANIM_RUN_PANIC, + ANIM_EAT, + ANIM_STICK_OUT_TONGUE, + ANIM_PLANT, + ANIM_GOT_ITEM, + ANIM_READY_JUMP, + ANIM_THINKING, + ANIM_LOST_BALANCE, + ANIM_SHOCK_STILL, + ANIM_DRINK = 0x10025, + ANIM_SQUISH, + ANIM_RUN_THINKING, + ANIM_QUESTION, + ANIM_NOD_YES, + ANIM_1002B = 0x1002B, + ANIM_PRAY, + ANIM_CHARRED = 0x1002F, + ANIM_GET_UP, + ANIM_DUST_OFF, + ANIM_THUMBS_UP, + ANIM_30004 = 0x30004, + ANIM_30008 = 0x30008, + ANIM_30009, + ANIM_8000B = 0x8000B, +}; -typedef UNK_TYPE AmbientSounds; -#define AmbientSounds_SPOOKY 0x00000000 -#define AmbientSounds_WIND 0x00000001 -#define AmbientSounds_BEACH 0x00000002 -#define AmbientSounds_JUNGLE 0x00000003 -#define AmbientSounds_UNDER_SEA1 0x00000004 -#define AmbientSounds_UNDER_SEA2 0x00000005 -#define AmbientSounds_SILENCE 0x00000006 -#define AmbientSounds_UNDER_SEA3 0x00000007 -#define AmbientSounds_UNDER_SEA4 0x00000008 -#define AmbientSounds_EXIT_SEA 0x00000009 -#define AmbientSounds_UNDER_SEA5 0x0000000A -#define AmbientSounds_UNDER_SEA6 0x0000000B -#define AmbientSounds_BIRDS 0x0000000C -#define AmbientSounds_SEA 0x0000000D -#define AmbientSounds_MUSIC 0x00000010 +typedef UNK_TYPE AmbientSound; +enum AmbientSounds { + AMBIENT_SPOOKY = 0, + AMBIENT_WIND, + AMBIENT_BEACH, + AMBIENT_JUNGLE, + AMBIENT_UNDER_SEA1, + AMBIENT_UNDER_SEA2, + AMBIENT_SILENCE, + AMBIENT_UNDER_SEA3, + AMBIENT_UNDER_SEA4, + AMBIENT_EXIT_SEA, + AMBIENT_UNDER_SEA5, + AMBIENT_UNDER_SEA6, + AMBIENT_BIRDS, + AMBIENT_SEA, + AMBIENT_MUSIC = 16, +}; typedef UNK_TYPE EncounterOutcome; -#define EncounterOutcome_PLAYER_WON 0x00000000 -#define EncounterOutcome_PLAYER_LOST 0x00000001 -#define EncounterOutcome_PLAYER_FLED 0x00000002 -#define EncounterOutcome_ENEMY_FLED 0x00000003 +enum EncounterOutcomes { + OUTCOME_PLAYER_WON = 0, + OUTCOME_PLAYER_LOST, + OUTCOME_PLAYER_FLED, + OUTCOME_ENEMY_FLED, +}; -typedef UNK_TYPE DecorationId; -#define DecorationId_GOLDEN_FLAMES 0x00000001 -#define DecorationId_SWEAT 0x00000002 -#define DecorationId_SEEING_STARS 0x00000003 -#define DecorationId_RED_FLAMES 0x00000004 -#define DecorationId_GREY_SMOKE_TRAIL 0x00000005 -#define DecorationId_FIRE_SMOKE_TRAIL 0x00000006 -#define DecorationId_WHIRLWIND 0x00000007 -#define DecorationId_STEAM_EMITTER 0x00000008 -#define DecorationId_RADIAL_STAR_EMITTER 0x0000000B +typedef UNK_TYPE DecorationID; +enum DecorationIDs { + DECORATION_GOLDEN_FLAMES = 1, + DECORATION_SWEAT, + DECORATION_SEEING_STARS, + DECORATION_RED_FLAMES, + DECORATION_GREY_SMOKE_TRAIL, + DECORATION_FIRE_SMOKE_TRAIL, + DECORATION_WHIRLWIND, + DECORATION_STEAM_EMITTER, + DECORATION_RADIAL_STAR_EMITTER = 11, +}; typedef UNK_TYPE HitResult; -#define HitResult_HIT 0x00000000 -#define HitResult_LANDED_ON_SPIKE 0x00000004 -#define HitResult_LUCKY 0x00000005 -#define HitResult_MISS 0x00000006 -#define HitResult_HIT_STATIC 0x00000007 -#define HitResult_IMMUNE 0x00000008 +enum HitResults { + HIT_RESULT_TRIGGERED_EXPLODE = -1, + HIT_RESULT_HIT, + HIT_RESULT_LANDED_ON_SPIKE = 4, + HIT_RESULT_LUCKY, + HIT_RESULT_MISS, + HIT_RESULT_HIT_STATIC, + HIT_RESULT_IMMUNE, +}; typedef UNK_TYPE Iter; -#define Iter_FIRST 0xFFFFFFFF -#define Iter_NEXT 0x00000000 -#define Iter_PREV 0x00000001 -#define Iter_LAST 0x0000000A +enum Iters { + ITER_FIRST = -1, + ITER_NEXT, + ITER_PREV, + ITER_LAST = 10, +}; -typedef UNK_TYPE ActorSound; -#define ActorSound_WALK 0x00000000 -#define ActorSound_FLY 0x00000001 -#define ActorSound_JUMP 0x00000002 -#define ActorSound_HURT 0x00000003 -#define ActorSound_WALK_INCREMENT 0x00000004 -#define ActorSound_FLY_INCREMENT 0x00000005 +typedef UNK_TYPE ActorSoundID; +enum ActorSoundIDs { + ACTOR_SOUND_WALK = 0, + ACTOR_SOUND_FLY, + ACTOR_SOUND_JUMP, + ACTOR_SOUND_HURT, + ACTOR_SOUND_WALK_INCREMENT, + ACTOR_SOUND_FLY_INCREMENT, +}; typedef UNK_TYPE Phase; -#define Phase_EXECUTE_ACTION 0x00000000 -#define Phase_FIRST_STRIKE 0x00000001 -#define Phase_RUN_AWAY_START 0x00000003 -#define Phase_RUN_AWAY_RESET 0x00000004 -#define Phase_USE_DEFEND 0x00000006 -#define Phase_RUN_AWAY_FAIL 0x00000007 -#define Phase_USE_LIFE_SHROOM 0x00000008 -#define Phase_PLAYER_BEGIN 0x0000000A -#define Phase_ENEMY_END 0x0000000B -#define Phase_ENEMY_BEGIN 0x0000000C -#define Phase_PLAYER_END 0x0000000D -#define Phase_MERLEE_ATTACK_BONUS 0x00000014 -#define Phase_MERLEE_DEFENSE_BONUS 0x00000015 -#define Phase_MERLEE_EXP_BONUS 0x00000016 -#define Phase_PLAYER_HAPPY 0x0000001E +enum Phases { + PHASE_EXECUTE_ACTION = 0, + PHASE_FIRST_STRIKE, + PHASE_RUN_AWAY_START = 3, + PHASE_RUN_AWAY_RESET, + PHASE_USE_DEFEND = 6, + PHASE_RUN_AWAY_FAIL, + PHASE_USE_LIFE_SHROOM, + PHASE_PLAYER_BEGIN = 10, + PHASE_ENEMY_END, + PHASE_ENEMY_BEGIN, + PHASE_PLAYER_END, + PHASE_MERLEE_ATTACK_BONUS = 20, + PHASE_MERLEE_DEFENSE_BONUS, + PHASE_MERLEE_EXP_BONUS, + PHASE_PLAYER_HAPPY = 30, +}; typedef s32 ActorID; -#define ActorID_SELF 0xFFFFFF81 -#define ActorID_PLAYER 0x00000000 -#define ActorID_PARTNER 0x00000100 -#define ActorID_ENEMY0 0x00000200 -#define ActorID_ENEMY1 0x00000201 -#define ActorID_ENEMY2 0x00000202 -#define ActorID_ENEMY3 0x00000203 -#define ActorID_ENEMY4 0x00000204 -#define ActorID_ENEMY5 0x00000205 -#define ActorID_ENEMY6 0x00000206 -#define ActorID_ENEMY7 0x00000207 -#define ActorID_ENEMY8 0x00000208 -#define ActorID_ENEMY9 0x00000209 -#define ActorID_ENEMY10 0x0000020A -#define ActorID_ENEMY11 0x0000020B -#define ActorID_ENEMY12 0x0000020C -#define ActorID_ENEMY13 0x0000020D -#define ActorID_ENEMY14 0x0000020E -#define ActorID_ENEMY15 0x0000020F -#define ActorID_ENEMY16 0x00000210 -#define ActorID_ENEMY17 0x00000211 -#define ActorID_ENEMY18 0x00000212 -#define ActorID_ENEMY19 0x00000213 -#define ActorID_ENEMY20 0x00000214 -#define ActorID_ENEMY21 0x00000215 -#define ActorID_ENEMY22 0x00000216 -#define ActorID_ENEMY23 0x00000217 +enum ActorIDs { + ACTOR_SELF = 0xFFFFFF81, + ACTOR_PLAYER = 0x0, + ACTOR_PARTNER = 0x100, + ACTOR_ENEMY0 = 0x200, + ACTOR_ENEMY1, + ACTOR_ENEMY2, + ACTOR_ENEMY3, + ACTOR_ENEMY4, + ACTOR_ENEMY5, + ACTOR_ENEMY6, + ACTOR_ENEMY7, + ACTOR_ENEMY8, + ACTOR_ENEMY9, + ACTOR_ENEMY10, + ACTOR_ENEMY11, + ACTOR_ENEMY12, + ACTOR_ENEMY13, + ACTOR_ENEMY14, + ACTOR_ENEMY15, + ACTOR_ENEMY16, + ACTOR_ENEMY17, + ACTOR_ENEMY18, + ACTOR_ENEMY19, + ACTOR_ENEMY20, + ACTOR_ENEMY21, + ACTOR_ENEMY22, + ACTOR_ENEMY23, +}; typedef UNK_TYPE Element; -#define Element_END 0x00000000 -#define Element_NORMAL 0x00000001 -#define Element_FIRE 0x00000002 -#define Element_WATER 0x00000003 -#define Element_ICE 0x00000004 -#define Element_MYSTERY 0x00000005 -#define Element_MAGIC 0x00000007 -#define Element_HAMMER 0x00000008 -#define Element_JUMP 0x00000009 -#define Element_COSMIC 0x0000000A -#define Element_BLAST 0x0000000B -#define Element_SHOCK 0x0000000C -#define Element_QUAKE 0x0000000D -#define Element_THROW 0x0000000F +enum Elements { + ELEMENT_END = 0, + ELEMENT_NORMAL, + ELEMENT_FIRE, + ELEMENT_WATER, + ELEMENT_ICE, + ELEMENT_MYSTERY, + ELEMENT_MAGIC = 7, + ELEMENT_HAMMER, + ELEMENT_JUMP, + ELEMENT_COSMIC, + ELEMENT_BLAST, + ELEMENT_SHOCK, + ELEMENT_QUAKE, + ELEMENT_THROW = 15, +}; typedef UNK_TYPE Event; -#define Event_HIT_COMBO 0x00000009 -#define Event_HIT 0x0000000A -#define Event_SPIN_SMASH_HIT 0x0000000B -#define Event_FALL_TriggerFlags 0x0000000C -#define Event_FLIP_TriggerFlags 0x0000000D -#define Event_BURN_HIT 0x0000000E -#define Event_SPIN_SMASH_LAUNCH_HIT 0x00000011 -#define Event_STAR_BEAM 0x00000013 -#define Event_SPIN_SMASH_LAUNCH_DEATH 0x00000015 -#define Event_POWER_BOUNCE_HIT 0x00000015 -#define Event_BLOW_AWAY 0x00000016 -#define Event_IMMUNE 0x00000019 -#define Event_BLOCK 0x0000001A -#define Event_SPIKE_TAUNT 0x0000001B -#define Event_BURN_TAUNT 0x0000001C -#define Event_AIR_LIFT_FAILED 0x0000001F -#define Event_DEATH 0x00000020 -#define Event_SPIN_SMASH_DEATH 0x00000021 -#define Event_EXPLODE_TriggerFlags 0x00000022 -#define Event_BURN_DEATH 0x00000024 -#define Event_SHOCK_DEATH 0x00000026 -#define Event_SPIKE_DEATH 0x00000027 -#define Event_POWER_BOUNCE_DEATH 0x00000028 -#define Event_SPIKE_CONTACT 0x0000002A -#define Event_BURN_CONTACT 0x0000002C -#define Event_SHOCK_HIT 0x0000002F -#define Event_RECOVER_STATUS 0x00000031 -#define Event_END_FIRST_STRIKE 0x00000035 -#define Event_LUCKY 0x00000037 -#define Event_BEGIN_FIRST_STRIKE 0x00000038 -#define Event_SCARE_AWAY 0x00000039 -#define Event_BEGIN_AIR_LIFT 0x0000003A -#define Event_UP_AND_AWAY 0x0000003D -#define Event_SWAP_PARTNER 0x0000003F -#define Event_LIFE_SHROOM_PROC 0x00000040 -#define Event_REVIVE 0x00000041 +enum Events { + EVENT_HIT_COMBO = 9, + EVENT_HIT, + EVENT_SPIN_SMASH_HIT, + EVENT_FALL_TRIGGER, + EVENT_FLIP_TRIGGER, + EVENT_BURN_HIT, + EVENT_SPIN_SMASH_LAUNCH_HIT = 17, + EVENT_STAR_BEAM = 19, + EVENT_POWER_BOUNCE_HIT = 21, + EVENT_BLOW_AWAY, + EVENT_IMMUNE = 25, + EVENT_BLOCK, + EVENT_SPIKE_TAUNT, + EVENT_BURN_TAUNT, + EVENT_AIR_LIFT_FAILED = 31, + EVENT_DEATH, + EVENT_SPIN_SMASH_DEATH, + EVENT_EXPLODE_TRIGGER, + EVENT_BURN_DEATH = 36, + EVENT_SHOCK_DEATH = 38, + EVENT_SPIKE_DEATH, + EVENT_POWER_BOUNCE_DEATH, + EVENT_SPIKE_CONTACT = 42, + EVENT_BURN_CONTACT = 44, + EVENT_SHOCK_HIT = 47, + EVENT_RECOVER_STATUS = 49, + EVENT_END_FIRST_STRIKE = 53, + EVENT_LUCKY = 55, + EVENT_BEGIN_FIRST_STRIKE, + EVENT_SCARE_AWAY, + EVENT_BEGIN_AIR_LIFT, + EVENT_UP_AND_AWAY = 61, + EVENT_SWAP_PARTNER = 63, + EVENT_LIFE_SHROOM_PROC, + EVENT_REVIVE, +}; typedef UNK_TYPE HitSound; -#define HitSound_MISS 0x00000000 -#define HitSound_BONES 0x00000001 -#define HitSound_NORMAL 0x00000002 -#define HitSound_FIRE 0x00000003 -#define HitSound_ICE 0x00000004 -#define HitSound_SHOCK 0x00000005 +enum HitSounds { + HIT_SOUND_MISS = 0, + HIT_SOUND_BONES, + HIT_SOUND_NORMAL, + HIT_SOUND_FIRE, + HIT_SOUND_ICE, + HIT_SOUND_SHOCK, +}; -typedef s8 Debuff; -#define Debuff_END 0x00000000 -#define Debuff_NORMAL 0x00000001 -#define Debuff_DEFAULT 0x00000002 -#define Debuff_FEAR 0x00000003 -#define Debuff_DIZZY 0x00000004 -#define Debuff_PARALYZE 0x00000005 -#define Debuff_SLEEP 0x00000006 -#define Debuff_FROZEN 0x00000007 -#define Debuff_STOP 0x00000008 -#define Debuff_POISON 0x00000009 -#define Debuff_SHRINK 0x0000000A -#define Debuff_STATIC 0x0000000B -#define Debuff_STONE 0x0000000C -#define Debuff_DAZE 0x0000000D -#define Debuff_0xE 0x0000000E // TODO -#define Debuff_BERSERK 0x00000010 -#define Debuff_TURN_DONE 0x00000012 -#define Debuff_HUSTLE 0x00000019 -#define Debuff_DANGER 0x0000001A -#define Debuff_THINKING 0x0000001C -#define Debuff_WEARY 0x0000001D -#define Debuff_DEFAULT_TURN_MOD 0x0000001F -#define Debuff_SLEEP_TURN_MOD 0x00000020 -#define Debuff_STATIC_TURN_MOD 0x00000021 -#define Debuff_FROZEN_TURN_MOD 0x00000022 -#define Debuff_FEAR_TURN_MOD 0x00000023 -#define Debuff_DIZZY_TURN_MOD 0x00000024 -#define Debuff_POISON_TURN_MOD 0x00000025 -#define Debuff_PARALYZE_TURN_MOD 0x00000026 -#define Debuff_SHRINK_TURN_MOD 0x00000027 -#define Debuff_STOP_TURN_MOD 0x00000029 +typedef s8 Status; +enum Statuses { + STATUS_END = 0, + STATUS_NORMAL, + STATUS_DEFAULT, + STATUS_FEAR, + STATUS_DIZZY, + STATUS_PARALYZE, + STATUS_SLEEP, + STATUS_FROZEN, + STATUS_STOP, + STATUS_POISON, + STATUS_SHRINK, + STATUS_STATIC, + STATUS_STONE, + STATUS_DAZE, + STATUS_E, + STATUS_BERSERK = 16, + STATUS_TURN_DONE = 18, + STATUS_HUSTLE = 25, + STATUS_DANGER, + STATUS_THINKING = 28, + STATUS_WEARY, + STATUS_DEFAULT_TURN_MOD = 31, + STATUS_SLEEP_TURN_MOD, + STATUS_STATIC_TURN_MOD, + STATUS_FROZEN_TURN_MOD, + STATUS_FEAR_TURN_MOD, + STATUS_DIZZY_TURN_MOD, + STATUS_POISON_TURN_MOD, + STATUS_PARALYZE_TURN_MOD, + STATUS_SHRINK_TURN_MOD, + STATUS_STOP_TURN_MOD = 41, +}; typedef UNK_TYPE DoorSwing; -#define DoorSwing_IN 0x00000001 +enum DoorSwings { + DOOR_SWING_OUT = -1, + DOOR_SWING_IN = 1, +}; typedef UNK_TYPE ItemSpawnMode; -#define ItemSpawnMode_DECORATION 0x00000001 -#define ItemSpawnMode_TOSS__SPAWN_ALWAYS 0x00000003 -#define ItemSpawnMode_BATTLE_REWARD 0x00000004 -#define ItemSpawnMode_TOSS__NEVER_VANISH 0x00000005 -#define ItemSpawnMode_TOSS 0x00000006 -#define ItemSpawnMode_TOSS__SPAWN_ONCE 0x00000007 -#define ItemSpawnMode_TOSS__SPAWN_ONCE__NEVER_VANISH 0x00000008 -#define ItemSpawnMode_TOSS__SPAWN_ALWAYS__NEVER_VANISH 0x00000009 -#define ItemSpawnMode_ITEM_BLOCK__ITEM 0x0000000A -#define ItemSpawnMode_ITEM_BLOCK__BADGE 0x0000000B -#define ItemSpawnMode_FALL__SPAWN_ALWAYS 0x0000000C -#define ItemSpawnMode_FALL__NEVER_VANISH 0x0000000D -#define ItemSpawnMode_FALL 0x0000000E -#define ItemSpawnMode_FALL__SPAWN_ONCE 0x0000000F -#define ItemSpawnMode_FIXED__SPAWN_ALWAYS 0x00000010 -#define ItemSpawnMode_FIXED__NEVER_VANISH 0x00000011 -#define ItemSpawnMode_FIXED 0x00000012 -#define ItemSpawnMode_FIXED__SPAWN_ALWAYS__NEVER_VANISH 0x00000013 -#define ItemSpawnMode_ITEM_BLOCK__SPAWN_ALWAYS 0x00000014 -#define ItemSpawnMode_ITEM_BLOCK__COIN 0x00000015 -#define ItemSpawnMode_TOSS__HIGHER__NEVER_VANISH 0x00000016 -#define ItemSpawnMode_TOSS__SPAWN_ALWAYS__SMALL 0x0000001A +enum ItemSpawnModes { + ITEM_SPAWN_MODE_UNKNOWN_0 = 0, + ITEM_SPAWN_MODE_DECORATION, + ITEM_SPAWN_MODE_UNKNOWN_2, + ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, + ITEM_SPAWN_MODE_BATTLE_REWARD, + ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, + ITEM_SPAWN_MODE_TOSS, + ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE, + ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE_NEVER_VANISH, + ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_NEVER_VANISH, + ITEM_SPAWN_MODE_ITEM_BLOCK_ITEM, + ITEM_SPAWN_MODE_ITEM_BLOCK_BADGE, + ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, + ITEM_SPAWN_MODE_FALL_NEVER_VANISH, + ITEM_SPAWN_MODE_FALL, + ITEM_SPAWN_MODE_FALL_SPAWN_ONCE, + ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS, + ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, + ITEM_SPAWN_MODE_FIXED, + ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS_NEVER_VANISH, + ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS, + ITEM_SPAWN_MODE_ITEM_BLOCK_COIN, + ITEM_SPAWN_MODE_TOSS_HIGHER_NEVER_VANISH, + ITEM_SPAWN_MODE_UNKNOWN_17, + ITEM_SPAWN_MODE_UNKNOWN_18, + ITEM_SPAWN_MODE_UNKNOWN_19, + ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, + ITEM_SPAWN_MODE_UNKNOWN_1B, +}; typedef UNK_TYPE Location; -#define Location_TOAD_TOWN 0x00000001 -#define Location_TOAD_TOWN_TUNNELS 0x00000002 -#define Location_KOOPA_BROS_FORTRESS 0x00000007 -#define Location_MT_RUGGED 0x00000008 -#define Location_DRY_DRY_OUTPOST 0x00000009 -#define Location_DRY_DRY_DESERT 0x0000000A -#define Location_DRY_DRY_RUINS 0x0000000B -#define Location_FOREVER_FOREST 0x0000000C -#define Location_BOOS_MANSION 0x0000000D -#define Location_TUBBAS_MANOR 0x0000000F -#define Location_SHY_GUYS_TOYBOX 0x00000010 -#define Location_MT_LAVALAVA 0x00000012 -#define Location_CRYSTAL_PALACE 0x00000015 -#define Location_BOWSERS_CASTLE 0x00000016 -#define Location_TESTING 0x00000017 -#define Location_NONE 0x00000018 -#define Location_PEACH_CASTLE_GROUNDS 0x00000019 -#define Location_PEACHS_CASTLE 0x0000001A -#define Location_SHOOTING_STAR_SUMMIT 0x0000001B -#define Location_STAR_WAY 0x0000001C -#define Location_STAR_HAVEN 0x0000001D -#define Location_GOOMBA_VILLAGE 0x0000001E -#define Location_GOOMBA_ROAD 0x0000001F -#define Location_PLEASANT_PATH 0x00000020 -#define Location_KOOPA_VILLAGE 0x00000021 -#define Location_GUSTY_GULCH 0x00000022 -#define Location_WINDY_MILL 0x00000023 -#define Location_JADE_JUNGLE 0x00000024 -#define Location_YOSHIS_VILLAGE 0x00000025 -#define Location_FLOWER_FIELDS 0x00000026 -#define Location_CLOUDY_CLIMB 0x00000027 -#define Location_SHIVER_CITY 0x00000028 -#define Location_SHIVER_SNOWFIELD 0x00000029 -#define Location_STARBORN_VALLEY 0x0000002A -#define Location_SHIVER_MOUNTAIN 0x0000002B -#define Location_MARIOS_HOUSE 0x0000002C +enum Locations { + LOCATION_TOAD_TOWN = 1, + LOCATION_TOAD_TOWN_TUNNELS, + LOCATION_KOOPA_BROS_FORTRESS = 7, + LOCATION_MT_RUGGED, + LOCATION_DRY_DRY_OUTPOST, + LOCATION_DRY_DRY_DESERT, + LOCATION_DRY_DRY_RUINS, + LOCATION_FOREVER_FOREST, + LOCATION_BOOS_MANSION, + LOCATION_TUBBAS_MANOR = 15, + LOCATION_SHY_GUYS_TOYBOX, + LOCATION_MT_LAVALAVA = 18, + LOCATION_CRYSTAL_PALACE = 21, + LOCATION_BOWSERS_CASTLE, + LOCATION_TESTING, + LOCATION_NONE, + LOCATION_PEACH_CASTLE_GROUNDS, + LOCATION_PEACHS_CASTLE, + LOCATION_SHOOTING_STAR_SUMMIT, + LOCATION_STAR_WAY, + LOCATION_STAR_HAVEN, + LOCATION_GOOMBA_VILLAGE, + LOCATION_GOOMBA_ROAD, + LOCATION_PLEASANT_PATH, + LOCATION_KOOPA_VILLAGE, + LOCATION_GUSTY_GULCH, + LOCATION_WINDY_MILL, + LOCATION_JADE_JUNGLE, + LOCATION_YOSHIS_VILLAGE, + LOCATION_FLOWER_FIELDS, + LOCATION_CLOUDY_CLIMB, + LOCATION_SHIVER_CITY, + LOCATION_SHIVER_SNOWFIELD, + LOCATION_STARBORN_VALLEY, + LOCATION_SHIVER_MOUNTAIN, + LOCATION_MARIOS_HOUSE, +}; -typedef UNK_TYPE DoorSounds; -#define DoorSounds_BASIC 0x00000000 -#define DoorSounds_METAL 0x00000001 -#define DoorSounds_LARGE 0x00000002 -#define DoorSounds_CREAKY 0x00000003 -#define DoorSounds_GATE 0x00000004 +typedef UNK_TYPE DoorSound; +enum DoorSounds { + DOOR_SOUND_BASIC = 0, + DOOR_SOUND_METAL, + DOOR_SOUND_LARGE, + DOOR_SOUND_CREAKY, + DOOR_SOUND_GATE, + DOOR_SOUND_UNKNOWN_5, + DOOR_SOUND_UNKNOWN_6, +}; typedef s8 ActionState; -#define ActionState_IDLE 0x00000000 -#define ActionState_WALK 0x00000001 -#define ActionState_RUN 0x00000002 -#define ActionState_JUMP 0x00000003 -#define ActionState_BOUNCE 0x00000004 -#define ActionState_ABORTED_JUMP 0x00000005 -#define ActionState_LAUNCH 0x00000006 -#define ActionState_7 0x00000007 -#define ActionState_FALLING 0x00000008 -#define ActionState_STEP_DOWN 0x00000009 -#define ActionState_LAND 0x0000000A -#define ActionState_STEP_DOWN_LAND 0x0000000B -#define ActionState_CONVERSATION 0x0000000C // This and following states prohibit normal movement. -#define ActionState_SPIN_JUMP 0x0000000D -#define ActionState_GROUND_POUND 0x0000000E -#define ActionState_ULTRA_JUMP 0x0000000F -#define ActionState_ULTRA_POUND 0x00000010 -#define ActionState_SLIDING 0x00000011 -#define ActionState_HAMMER 0x00000012 -#define ActionState_HIT_HAZARD 0x00000015 -#define ActionState_HIT_LAVA 0x00000017 -#define ActionState_18 0x00000018 -#define ActionState_SPIN 0x0000001A -#define ActionState_ENEMY_FIRST_STRIKE 0x0000001B -#define ActionState_SPINNING_FLOWER 0x0000001D -#define ActionState_USE_TWEESTER 0x0000001F -#define ActionState_RIDE 0x00000021 -#define ActionState_STEP_UP 0x00000022 -#define ActionState_USE_SPRING 0x00000026 +enum ActionStates { + ACTION_STATE_IDLE = 0, + ACTION_STATE_WALK, + ACTION_STATE_RUN, + ACTION_STATE_JUMP, + ACTION_STATE_BOUNCE, + ACTION_STATE_ABORTED_JUMP, + ACTION_STATE_LAUNCH, + ACTION_STATE_7, + ACTION_STATE_FALLING, + ACTION_STATE_STEP_DOWN, + ACTION_STATE_LAND, + ACTION_STATE_STEP_DOWN_LAND, + ACTION_STATE_CONVERSATION, // This and following states prohibit normal movement. + ACTION_STATE_SPIN_JUMP, + ACTION_STATE_GROUND_POUND, + ACTION_STATE_ULTRA_JUMP, + ACTION_STATE_ULTRA_POUND, + ACTION_STATE_SLIDING, + ACTION_STATE_HAMMER, + ACTION_STATE_HIT_HAZARD = 21, + ACTION_STATE_UNKNOWN_16, + ACTION_STATE_HIT_LAVA, + ACTION_STATE_18, + ACTION_STATE_SPIN = 26, + ACTION_STATE_ENEMY_FIRST_STRIKE, + ACTION_STATE_SPINNING_FLOWER = 29, + ACTION_STATE_USE_TWEESTER = 31, + ACTION_STATE_RIDE = 33, + ACTION_STATE_STEP_UP, + ACTION_STATE_USE_SPRING = 38, +}; -typedef s32 NpcId; -#define NpcId_SELF -1 -#define NpcId_PLAYER -2 -#define NpcId_PARTNER -4 +typedef s32 NpcID; +enum NpcIDs { + NPC_SELF = -1, + NPC_PLAYER, + NPC_PARTNER = -4, +}; typedef UNK_TYPE TriggerFlag; -#define TriggerFlag_WALL_PUSH 0x00000040 -#define TriggerFlag_FLOOR_TOUCH 0x00000080 -#define TriggerFlag_WALL_INTERACT 0x00000100 -#define TriggerFlag_FLOOR_JUMP 0x00000200 -#define TriggerFlag_WALL_TOUCH 0x00000400 -#define TriggerFlag_FLOOR_INTERACT 0x00000800 -#define TriggerFlag_WALL_HAMMER 0x00001000 -#define TriggerFlag_SAVE_FLAG_SET 0x00010000 -#define TriggerFlag_AREA_FLAG_SET 0x00020000 -#define TriggerFlag_CEILING_TOUCH 0x00040000 -#define TriggerFlag_FLOOR_ABOVE 0x00080000 -#define TriggerFlag_BOMB 0x00100000 +enum TriggerFlags { + TRIGGER_WALL_PUSH = 0x40, + TRIGGER_FLOOR_TOUCH = 0x80, + TRIGGER_WALL_PRESS_A = 0x100, + TRIGGER_FLOOR_JUMP = 0x200, + TRIGGER_WALL_TOUCH = 0x400, + TRIGGER_FLOOR_PRESS_A = 0x800, + TRIGGER_WALL_HAMMER = 0x1000, + TRIGGER_GAME_FLAG_SET = 0x10000, + TRIGGER_AREA_FLAG_SET = 0x20000, + TRIGGER_CEILING_TOUCH = 0x40000, + TRIGGER_FLOOR_ABOVE = 0x80000, + TRIGGER_POINT_BOMB = 0x100000, +}; typedef UNK_TYPE Button; -#define Button_C_RIGHT 0x00000001 -#define Button_C_LEFT 0x00000002 -#define Button_C_DOWN 0x00000004 -#define Button_C_UP 0x00000008 -#define Button_R 0x00000010 -#define Button_L 0x00000020 -#define Button_D_RIGHT 0x00000100 -#define Button_D_LEFT 0x00000200 -#define Button_D_DOWN 0x00000400 -#define Button_D_UP 0x00000800 -#define Button_START 0x00001000 -#define Button_Z 0x00002000 -#define Button_B 0x00004000 -#define Button_A 0x00008000 +enum Buttons { + BUTTON_C_RIGHT = 0x1, + BUTTON_C_LEFT = 0x2, + BUTTON_C_DOWN = 0x4, + BUTTON_C_UP = 0x8, + BUTTON_R = 0x10, + BUTTON_L = 0x20, + BUTTON_D_RIGHT = 0x100, + BUTTON_D_LEFT = 0x200, + BUTTON_D_DOWN = 0x400, + BUTTON_D_UP = 0x800, + BUTTON_START = 0x1000, + BUTTON_Z = 0x2000, + BUTTON_B = 0x4000, + BUTTON_A = 0x8000, +}; typedef UNK_TYPE PlayerBuff; -#define PlayerBuff_JUMP_CHARGE 0x00000001 -#define PlayerBuff_HAMMER_CHARGE 0x00000002 -#define PlayerBuff_STONE 0x00000008 -#define PlayerBuff_HUSTLE 0x00000010 -#define PlayerBuff_STATIC 0x00000020 -#define PlayerBuff_TRANSPARENT 0x00000040 -#define PlayerBuff_CLOUD_NINE 0x00000080 -#define PlayerBuff_TURBO_CHARGE 0x00000100 -#define PlayerBuff_WATER_BLOCK 0x00000200 -#define PlayerBuff_PARTNER_GLOWING 0x00010000 -#define PlayerBuff_ALL 0x0FFFFFFF +enum PlayerBuffs { + PLAYER_BUFF_JUMP_CHARGE = 0x1, + PLAYER_BUFF_HAMMER_CHARGE = 0x2, + PLAYER_BUFF_STONE = 0x8, + PLAYER_BUFF_HUSTLE = 0x10, + PLAYER_BUFF_STATIC = 0x20, + PLAYER_BUFF_TRANSPARENT = 0x40, + PLAYER_BUFF_CLOUD_NINE = 0x80, + PLAYER_BUFF_TURBO_CHARGE = 0x100, + PLAYER_BUFF_WATER_BLOCK = 0x200, + PLAYER_BUFF_PARTNER_GLOWING = 0x10000, + PLAYER_BUFF_ALL = 0xFFFFFFF, +}; -typedef UNK_TYPE StatusFlags; -#define StatusFlags_SLEEP 0x00001000 -#define StatusFlags_STATIC 0x00002000 -#define StatusFlags_FROZEN 0x00004000 -#define StatusFlags_UNKNOWN_STATUS3 0x00008000 -#define StatusFlags_PARALYZE 0x00010000 -#define StatusFlags_POISON 0x00020000 -#define StatusFlags_DIZZY 0x00040000 -#define StatusFlags_SHRINK 0x00080000 -#define StatusFlags_STONE 0x00100000 -#define StatusFlags_STOP 0x00200000 -#define StatusFlags_KO 0x01000000 -#define StatusFlags_GLOWING 0x02000000 -#define StatusFlags_TRANSPARENT 0x04000000 -#define StatusFlags_ATTACK_BOOST 0x08000000 -#define StatusFlags_DEFENSE_BOOST 0x10000000 -#define StatusFlags_CHILL_OUT 0x20000000 -#define StatusFlags_RIGHT_ON 0x40000000 +typedef UNK_TYPE StatusFlag; +enum StatusFlags { + STATUS_FLAG_SLEEP = 0x1000, + STATUS_FLAG_STATIC = 0x2000, + STATUS_FLAG_FROZEN = 0x4000, + STATUS_FLAG_UNKNOWN_STATUS3 = 0x8000, + STATUS_FLAG_PARALYZE = 0x10000, + STATUS_FLAG_POISON = 0x20000, + STATUS_FLAG_DIZZY = 0x40000, + STATUS_FLAG_SHRINK = 0x80000, + STATUS_FLAG_STONE = 0x100000, + STATUS_FLAG_STOP = 0x200000, + STATUS_FLAG_K_O = 0x1000000, + STATUS_FLAG_GLOWING = 0x2000000, + STATUS_FLAG_TRANSPARENT = 0x4000000, + STATUS_FLAG_ATTACK_BOOST = 0x8000000, + STATUS_FLAG_DEFENSE_BOOST = 0x10000000, + STATUS_FLAG_CHILL_OUT = 0x20000000, + STATUS_FLAG_RIGHT_ON = 0x40000000, +}; typedef UNK_TYPE DamageType; -#define DamageType_TriggerFlags_LUCKY 0x80000000 -#define DamageType_FIRE 0x00000002 -#define DamageType_WATER 0x00000004 -#define DamageType_ICE 0x00000008 -#define DamageType_MAGIC 0x00000010 -#define DamageType_ELECTRIC 0x00000020 -#define DamageType_SMASH 0x00000040 -#define DamageType_JUMP 0x00000080 -#define DamageType_COSMIC 0x00000100 -#define DamageType_BLAST 0x00000200 -#define DamageType_POW 0x00000400 -#define DamageType_QUAKE 0x00000800 -#define DamageType_THROW 0x00040000 -#define DamageType_IGNORE_DEFENSE 0x08000000 -#define DamageType_NO_CONTACT 0x10000000 -#define DamageType_UNBLOCKABLE 0x20000000 +enum DamageTypes { + DAMAGE_TYPE_FIRE = 0x2, + DAMAGE_TYPE_WATER = 0x4, + DAMAGE_TYPE_ICE = 0x8, + DAMAGE_TYPE_MAGIC = 0x10, + DAMAGE_TYPE_ELECTRIC = 0x20, + DAMAGE_TYPE_SMASH = 0x40, + DAMAGE_TYPE_JUMP = 0x80, + DAMAGE_TYPE_COSMIC = 0x100, + DAMAGE_TYPE_BLAST = 0x200, + DAMAGE_TYPE_P_O_W = 0x400, + DAMAGE_TYPE_QUAKE = 0x800, + DAMAGE_TYPE_THROW = 0x40000, + DAMAGE_TYPE_IGNORE_DEFENSE = 0x8000000, + DAMAGE_TYPE_NO_CONTACT = 0x10000000, + DAMAGE_TYPE_UNBLOCKABLE = 0x20000000, + DAMAGE_TYPE_TRIGGER_LUCKY = 0x80000000, +}; typedef s8 PartnerID; -#define PartnerID_NONE 0 -#define PartnerID_GOOMBARIO 1 -#define PartnerID_KOOPER 2 -#define PartnerID_BOMBETTE 3 -#define PartnerID_PARAKARRY 4 -#define PartnerID_GOOMPA 5 -#define PartnerID_WATT 6 -#define PartnerID_SUSHIE 7 -#define PartnerID_LAKILESTER 8 -#define PartnerID_BOW 9 -#define PartnerID_GOOMBARIA 10 -#define PartnerID_TWINK 11 +enum PartnerIDs { + PARTNER_NONE = 0, + PARTNER_GOOMBARIO, + PARTNER_KOOPER, + PARTNER_BOMBETTE, + PARTNER_PARAKARRY, + PARTNER_GOOMPA, + PARTNER_WATT, + PARTNER_SUSHIE, + PARTNER_LAKILESTER, + PARTNER_BOW, + PARTNER_GOOMBARIA, + PARTNER_TWINK, +}; /// @see gAreas -enum { - AREA_KMR, +enum Areas { + AREA_KMR = 0, AREA_MAC, AREA_TIK, AREA_KGR, @@ -1405,4 +1501,240 @@ enum { AREA_TST, }; +enum Sprites { + SPRITE_WORLD_GOOMBARIO = 1, + SPRITE_WORLD_KOOPER, + SPRITE_WORLD_BOMBETTE, + SPRITE_WORLD_PARAKARRY, + SPRITE_WORLD_BOW, + SPRITE_WORLD_WATT, + SPRITE_WORLD_SUSHIE, + SPRITE_WORLD_LAKILESTER, + SPRITE_BATTLE_GOOMBARIO, + SPRITE_BATTLE_KOOPER, + SPRITE_BATTLE_BOMBETTE, + SPRITE_BATTLE_PARAKARRY, + SPRITE_BATTLE_BOW, + SPRITE_BATTLE_WATT, + SPRITE_BATTLE_SUSHIE, + SPRITE_BATTLE_LAKILESTER, + SPRITE_KOOPER_WITHOUT_SHELL, + SPRITE_WORLD_ELDSTAR, + SPRITE_WORLD_MAMAR, + SPRITE_WORLD_SKOLAR, + SPRITE_WORLD_MUSKULAR, + SPRITE_WORLD_MISSTAR, + SPRITE_WORLD_KLEVAR, + SPRITE_WORLD_KALMAR, + SPRITE_BATTLE_ELDSTAR, + SPRITE_BATTLE_MAMAR, + SPRITE_BATTLE_SKOLAR, + SPRITE_BATTLE_MUSKULAR, + SPRITE_BATTLE_MISSTAR, + SPRITE_BATTLE_KLEVAR, + SPRITE_BATTLE_KALMAR, + SPRITE_TWINK, + SPRITE_JR_TROOPA, + SPRITE_SPIKED_JR_TROOPA, + SPRITE_SPIKED_PARA_JR_TROOPA, + SPRITE_MAGE_JR_TROOPA, + SPRITE_PARA_JR_TROOPA, + SPRITE_GOOMBA, + SPRITE_SPIKED_GOOMBA, + SPRITE_PARAGOOMBA, + SPRITE_KOOPA_TROOPA, + SPRITE_PARA_TROOPA, + SPRITE_FUZZY, + SPRITE_BOMBOMB, + SPRITE_BULLET_BILL, + SPRITE_BILL_BLASTER, + SPRITE_MONTY_MOLE, + SPRITE_CLEFT, + SPRITE_POKEY, + SPRITE_BANDIT, + SPRITE_BUZZY_BEETLE, + SPRITE_SWOOPER, + SPRITE_STONE_CHOMP, + SPRITE_PUTRID_PIRANHA, + SPRITE_PIRANHA_PLANT, + SPRITE_SENTINEL, + SPRITE_WORLD_CLUBBA, + SPRITE_BATTLE_CLUBBA, + SPRITE_SHY_GUY, + SPRITE_GROOVE_GUY, + SPRITE_SKY_GUY, + SPRITE_PYRO_GUY, + SPRITE_SPY_GUY, + SPRITE_MEDI_GUY, + SPRITE_FUZZIPEDE, + SPRITE_JUNGLE_GUY, + SPRITE_HEART_PLANT, + SPRITE_HURT_PLANT, + SPRITE_M_BUSH, + SPRITE_BUBBLE, + SPRITE_KENT_C_KOOPA, + SPRITE_DAYZEE, + SPRITE_LAKITU, + SPRITE_SPINY, + SPRITE_BZZAP, + SPRITE_RUFF_PUFF, + SPRITE_SPIKE_TOP, + SPRITE_DUPLIGHOST, + SPRITE_ALBINO_DINO, + SPRITE_BLOOPER, + SPRITE_BABY_BLOOPER, + SPRITE_GULPIT, + SPRITE_DRY_BONES, + SPRITE_THROWN_BONE, + SPRITE_BONY_BEETLE, + SPRITE_MAGIKOOPA, + SPRITE_FLYING_MAGIKOOPA, + SPRITE_WORLD_KOOPATROL, + SPRITE_KOOPATROL, + SPRITE_HAMMER_BROS, + SPRITE_BUSH_BASIC, + SPRITE_BUSH_BLOCKY, + SPRITE_BUSH_DRY, + SPRITE_BUSH_LEAFY, + SPRITE_BUSH_MATTED, + SPRITE_WORLD_KAMMY, + SPRITE_BATTLE_KAMMY, + SPRITE_GOOMBA_BROS, + SPRITE_GOOMBA_KING, + SPRITE_SPIKY_GOOMNUT, + SPRITE_DARK_TOAD, + SPRITE_KOOPA_BROS, + SPRITE_BUZZAR, + SPRITE_TUTANKOOPA, + SPRITE_CHAIN_CHOMP, + SPRITE_WORLD_TUBBA, + SPRITE_BATTLE_TUBBA, + SPRITE_TUBBAS_HEART, + SPRITE_BIG_LANTERN_GHOST, + SPRITE_SHY_SQUAD_GUY, + SPRITE_MARSHAL_GUY, + SPRITE_STILT_GUY, + SPRITE_STILT_GUY_UNFOLD, + SPRITE_SHY_STACK_GUY, + SPRITE_SHY_STACK_UNFOLD, + SPRITE_SHY_STACK_DAMAGE, + SPRITE_SHY_STACK_ROCK, + SPRITE_GENERAL_GUY, + SPRITE_GENERAL_GUY_BOMB, + SPRITE_TANK_GUY, + SPRITE_LAVA_PIRANHA_HEAD, + SPRITE_PETIT_PIRANHA, + SPRITE_LAVA_BUD, + SPRITE_HUFF_N_PUFF, + SPRITE_TUFF_PUFF, + SPRITE_MONSTAR, + SPRITE_CRYSTAL_KING, + SPRITE_WORLD_BOWSER, + SPRITE_BATTLE_BOWSER, + SPRITE_LUIGI, + SPRITE_TOAD, + SPRITE_THREE_SISTERS, + SPRITE_VANNA_T, + SPRITE_TOAD_KID, + SPRITE_TOAD_GUARD, + SPRITE_HARRY_T, + SPRITE_TOAD_MINISTER, + SPRITE_POSTMASTER, + SPRITE_CONDUCTOR_TOAD, + SPRITE_TRAIN_STATION_TOAD, + SPRITE_FISHMAEL, + SPRITE_ARTIST_TOAD, + SPRITE_KOOPA, + SPRITE_KOOPA_WITHOUT_SHELL, + SPRITE_WORLD_BOMBOMB, + SPRITE_WHACKA, + SPRITE_DRYITE, + SPRITE_MOUSER, + SPRITE_BOO, + SPRITE_YOSHI, + SPRITE_YOSHI_KID, + SPRITE_RAVEN, + SPRITE_BUBULB, + SPRITE_PENGUIN, + SPRITE_SHIVER_TOAD, + SPRITE_ALT_BANDIT, + SPRITE_GOOMPA, + SPRITE_GOOMBARIA, + SPRITE_GOOMA, + SPRITE_GOOMPAPA, + SPRITE_GOOMAMA, + SPRITE_THE_MASTER, + SPRITE_CHAN, + SPRITE_LEE, + SPRITE_MERLON, + SPRITE_CHET_RIPPO, + SPRITE_ROWF, + SPRITE_MINH_T, + SPRITE_RUSS_T, + SPRITE_TAYCE_T, + SPRITE_FICE_T, + SPRITE_BARTENDER, + SPRITE_CHANTERELLE, + SPRITE_RIP_CHEATO, + SPRITE_CHUCK_QUIZMO, + SPRITE_MERLUVLEE, + SPRITE_MERLAR, + SPRITE_MERLOW, + SPRITE_STAR_KID, + SPRITE_KOLORADO_WIFE, + SPRITE_KOOPA_KOOT, + SPRITE_KOLORADO, + SPRITE_BATTLE_KOLORADO, + SPRITE_ARCHEOLOGIST, + SPRITE_NOMADIMOUSE, + SPRITE_WORLD_MERLEE, + SPRITE_BATTLE_MERLEE, + SPRITE_DISGUISED_MOUSTAFA, + SPRITE_MOUSTAFA, + SPRITE_OAKLIE, + SPRITE_BOOTLER, + SPRITE_YAKKEY, + SPRITE_GOURMET_GUY, + SPRITE_VILLAGE_LEADER, + SPRITE_LEADERS_FRIEND, + SPRITE_RAFAEL_RAVEN, + SPRITE_TOLIELUP, + SPRITE_GATE_FLOWER, + SPRITE_PETUNIA, + SPRITE_POSIE, + SPRITE_LILY, + SPRITE_ROSIE, + SPRITE_SUN, + SPRITE_LAKILULU, + SPRITE_NINJI, + SPRITE_MAYOR_PENGUIN, + SPRITE_MAYOR_PENGUIN_WIFE, + SPRITE_PENGUIN_PATROL, + SPRITE_HERRINGWAY, + SPRITE_MERLE, + SPRITE_STAR_ROD, + SPRITE_FIRE, + SPRITE_COIN, + SPRITE_PARADE_PEACH, + SPRITE_PARADE_KOOPAS, + SPRITE_PARADE_BURNT_BOWSER, + SPRITE_PARADE_LUIGI, + SPRITE_PARADE_PARTNERS, + SPRITE_PARADE_YOSHIS, + SPRITE_PARADE_KOLORADOS, + SPRITE_PARADE_CHICKS, + SPRITE_PARADE_ICE_SHOW, + SPRITE_PARADE_TOADS, + SPRITE_PARADE_BATONS, + SPRITE_PARADE_DRUMS, + SPRITE_PARADE_FLAGS, + SPRITE_PARADE_HORNS, + SPRITE_PARADE_TUBBA_BALLOON, + SPRITE_PARADE_WIZARDS, + SPRITE_PARADE_MARIO, + SPRITE_PARADE_SHY_GUYS, + SPRITE_PARADE_TWINK, + SPRITE_LEAF, +}; + #endif diff --git a/include/functions.h b/include/functions.h index 6147f324d8..2fc3add63f 100644 --- a/include/functions.h +++ b/include/functions.h @@ -219,9 +219,9 @@ void disable_player_shadow(void); void move_player(s32 duration, f32 heading, f32 speed); s32 enable_player_input(void); -Npc* get_npc_safe(NpcId npcId); -Npc* get_npc_unsafe(NpcId npcId); -Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr); +Npc* get_npc_safe(NpcID npcId); +Npc* get_npc_unsafe(NpcID npcId); +Npc* resolve_npc(ScriptInstance* script, NpcID npcIdOrPtr); void set_npc_yaw(Npc* npcPtr, f32 angle); void npc_move_heading(Npc* npc, f32 speed, f32 yaw); void disable_npc_blur(Npc* npc); @@ -246,8 +246,8 @@ void set_part_yaw(ActorID actorID, s32 partIndex, s32 value); ActorPart* get_actor_part(Actor* actor, s32 partIndex); -void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationId decorationType); -void add_actor_decoration(Actor* actor, s32 decorationIndex, DecorationId decorationType); +void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationID decorationType); +void add_actor_decoration(Actor* actor, s32 decorationIndex, DecorationID decorationType); void remove_part_decoration(ActorPart* part, s32 decorationIndex); void remove_actor_decoration(Actor* actor, s32 decorationIndex); @@ -283,8 +283,8 @@ s32 func_80071030(s32 a0, f32 a1, f32 a2, f32 a3, s32 a4); void func_80070CD0(s32, f32, f32, f32, f32, f32); // Dead functions: -Npc* func_8003E4BC(NpcId npcId); // get_npc_safe -Npc* func_8003E534(NpcId npcId); // get_npc_safe +Npc* func_8003E4BC(NpcID npcId); // get_npc_safe +Npc* func_8003E534(NpcID npcId); // get_npc_safe void func_80077BD0(s32, s32, s32, s32, s32, s32); void dead_func_8006FEF0(s32, f32, f32, f32, f32); diff --git a/include/map.h b/include/map.h index 0e4336cc3a..e62f288d0d 100644 --- a/include/map.h +++ b/include/map.h @@ -93,7 +93,7 @@ typedef struct NpcSettings { } NpcSettings; // size = 0x2C typedef struct ItemDrop { - /* 0x00 */ ItemId item; + /* 0x00 */ ItemID item; /* 0x02 */ s16 weight; /* 0x04 */ s16 unk_08; } ItemDrop; // size = 0x06 @@ -173,7 +173,7 @@ typedef struct StatDrop { #define NO_OVERRIDE_MOVEMENT_SPEED OVERRIDE_MOVEMENT_SPEED(-1) typedef struct StaticNpc { - /* 0x000 */ NpcId id; + /* 0x000 */ NpcID id; /* 0x004 */ NpcSettings* settings; /* 0x008 */ Vec3f pos; /* 0x014 */ s32 flags; @@ -275,7 +275,7 @@ typedef struct { #define NPC_GROUP(npcs, battle) { sizeof(npcs) / sizeof(StaticNpc), &npcs, battle } -Enemy* get_enemy(NpcId npcId); +Enemy* get_enemy(NpcID npcId); MapConfig* get_current_map_header(void); s32 func_800490B4(EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, s32 arg3, s32 arg4); diff --git a/include/variables.h b/include/variables.h index f820b6f460..6dafdf3b07 100644 --- a/include/variables.h +++ b/include/variables.h @@ -176,7 +176,7 @@ extern u8 gPauseMenuPageScrollInterpEasingLUT[16]; // Badges extern s32 gBadgeMenuCurrentScrollPos; extern s32 gBadgeMenuTargetScrollPos; -extern ItemId gBadgeMenuItemIDs[128]; +extern ItemID gBadgeMenuItemIDs[128]; extern s32 gBadgeMenuCurrentPage; extern PauseItemPage gBadgeMenuPages[20]; extern s32 gBadgeMenuSelectedIndex; diff --git a/src/battle/area_dig/6DE4A0.c b/src/battle/area_dig/6DE4A0.c index 38db28a433..7f2d39de6e 100644 --- a/src/battle/area_dig/6DE4A0.c +++ b/src/battle/area_dig/6DE4A0.c @@ -52,7 +52,7 @@ ApiStatus func_802187F0_6DE5B0(ScriptInstance* script, s32 isInitialCall) { SelectableTarget* selectableTarget; battleStatus->moveCategory = 2; - battleStatus->selectedItemID = ItemId_THUNDER_RAGE; + battleStatus->selectedItemID = ITEM_THUNDER_RAGE; selectedItemID = battleStatus->selectedItemID; battleStatus->selectedMoveID = 0; battleStatus->currentAttackElement = 0; diff --git a/src/battle/area_hos/47F0B0.c b/src/battle/area_hos/47F0B0.c index 7d4984694c..0ff4e7c078 100644 --- a/src/battle/area_hos/47F0B0.c +++ b/src/battle/area_hos/47F0B0.c @@ -5,6 +5,6 @@ ApiStatus func_80218000_47F0B0(ScriptInstance* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; - playerData->currentPartner = PartnerID_GOOMBARIO; + playerData->currentPartner = PARTNER_GOOMBARIO; return ApiStatus_DONE2; } diff --git a/src/battle/area_kmr_part_1/goomba.c b/src/battle/area_kmr_part_1/goomba.c index 5c3ba388e0..a3cb771ee3 100644 --- a/src/battle/area_kmr_part_1/goomba.c +++ b/src/battle/area_kmr_part_1/goomba.c @@ -17,33 +17,33 @@ Script goomba_idle; Script goomba_dispatch; s32 goomba_defense_table[] = { - Element_NORMAL, 0, - Element_END, + ELEMENT_NORMAL, 0, + ELEMENT_END, }; s32 goomba_status_table[] = { - Debuff_NORMAL, 0, - Debuff_DEFAULT, 0, - Debuff_SLEEP, 100, - Debuff_POISON, 100, - Debuff_FROZEN, 100, - Debuff_DIZZY, 100, - Debuff_FEAR, 100, - Debuff_STATIC, 100, - Debuff_PARALYZE, 100, - Debuff_SHRINK, 100, - Debuff_STOP, 100, - Debuff_DEFAULT_TURN_MOD, 0, - Debuff_SLEEP_TURN_MOD, 0, - Debuff_POISON_TURN_MOD, 0, - Debuff_FROZEN_TURN_MOD, 0, - Debuff_DIZZY_TURN_MOD, 0, - Debuff_FEAR_TURN_MOD, 0, - Debuff_STATIC_TURN_MOD, 0, - Debuff_PARALYZE_TURN_MOD, 0, - Debuff_SHRINK_TURN_MOD, 0, - Debuff_STOP_TURN_MOD, 0, - Debuff_END, + STATUS_NORMAL, 0, + STATUS_DEFAULT, 0, + STATUS_SLEEP, 100, + STATUS_POISON, 100, + STATUS_FROZEN, 100, + STATUS_DIZZY, 100, + STATUS_FEAR, 100, + STATUS_STATIC, 100, + STATUS_PARALYZE, 100, + STATUS_SHRINK, 100, + STATUS_STOP, 100, + STATUS_DEFAULT_TURN_MOD, 0, + STATUS_SLEEP_TURN_MOD, 0, + STATUS_POISON_TURN_MOD, 0, + STATUS_FROZEN_TURN_MOD, 0, + STATUS_DIZZY_TURN_MOD, 0, + STATUS_FEAR_TURN_MOD, 0, + STATUS_STATIC_TURN_MOD, 0, + STATUS_PARALYZE_TURN_MOD, 0, + STATUS_SHRINK_TURN_MOD, 0, + STATUS_STOP_TURN_MOD, 0, + STATUS_END, }; ActorPartDesc goomba_parts[] = { @@ -85,37 +85,37 @@ ActorDesc goomba = { }; s32 goomba_anims[] = { - Debuff_NORMAL, NPC_ANIM(goomba, normal, idle), - Debuff_STONE, NPC_ANIM(goomba, normal, still), - Debuff_SLEEP, NPC_ANIM(goomba, normal, asleep), - Debuff_POISON, NPC_ANIM(goomba, normal, idle), - Debuff_STOP, NPC_ANIM(goomba, normal, still), - Debuff_STATIC, NPC_ANIM(goomba, normal, idle), - Debuff_PARALYZE, NPC_ANIM(goomba, normal, still), - Debuff_DIZZY, NPC_ANIM(goomba, normal, dizzy), - Debuff_FEAR, NPC_ANIM(goomba, normal, dizzy), + STATUS_NORMAL, NPC_ANIM(goomba, normal, idle), + STATUS_STONE, NPC_ANIM(goomba, normal, still), + STATUS_SLEEP, NPC_ANIM(goomba, normal, asleep), + STATUS_POISON, NPC_ANIM(goomba, normal, idle), + STATUS_STOP, NPC_ANIM(goomba, normal, still), + STATUS_STATIC, NPC_ANIM(goomba, normal, idle), + STATUS_PARALYZE, NPC_ANIM(goomba, normal, still), + STATUS_DIZZY, NPC_ANIM(goomba, normal, dizzy), + STATUS_FEAR, NPC_ANIM(goomba, normal, dizzy), - Debuff_END, + STATUS_END, }; s32 goomba_anims_running[] = { - Debuff_NORMAL, NPC_ANIM(goomba, normal, run), - Debuff_STONE, NPC_ANIM(goomba, normal, still), - Debuff_SLEEP, NPC_ANIM(goomba, normal, asleep), - Debuff_POISON, NPC_ANIM(goomba, normal, idle), - Debuff_STOP, NPC_ANIM(goomba, normal, still), - Debuff_STATIC, NPC_ANIM(goomba, normal, run), - Debuff_PARALYZE, NPC_ANIM(goomba, normal, still), - Debuff_DIZZY, NPC_ANIM(goomba, normal, dizzy), - Debuff_FEAR, NPC_ANIM(goomba, normal, dizzy), + STATUS_NORMAL, NPC_ANIM(goomba, normal, run), + STATUS_STONE, NPC_ANIM(goomba, normal, still), + STATUS_SLEEP, NPC_ANIM(goomba, normal, asleep), + STATUS_POISON, NPC_ANIM(goomba, normal, idle), + STATUS_STOP, NPC_ANIM(goomba, normal, still), + STATUS_STATIC, NPC_ANIM(goomba, normal, run), + STATUS_PARALYZE, NPC_ANIM(goomba, normal, still), + STATUS_DIZZY, NPC_ANIM(goomba, normal, dizzy), + STATUS_FEAR, NPC_ANIM(goomba, normal, dizzy), - Debuff_END, + STATUS_END, }; Script goomba_init = SCRIPT({ - BindTakeTurn(ActorID_SELF, goomba_turn); - BindIdle(ActorID_SELF, goomba_idle); - BindHandleEvent(ActorID_SELF, goomba_dispatch); + BindTakeTurn(ACTOR_SELF, goomba_turn); + BindIdle(ACTOR_SELF, goomba_idle); + BindHandleEvent(ACTOR_SELF, goomba_dispatch); }); Script goomba_idle = SCRIPT({ @@ -124,39 +124,39 @@ Script goomba_idle = SCRIPT({ SI_VAR(0) += 80; loop SI_VAR(0) { 0: - GetStatusFlags(ActorID_SELF, SI_VAR(1)); + GetStatusFlags(ACTOR_SELF, SI_VAR(1)); if (SI_VAR(1) & 0x35D000) { sleep 1; goto 0; } sleep 1; } - GetActorPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 5; - SetActorIdleSpeed(ActorID_SELF, 1.0); - SetIdleAnimations(ActorID_SELF, 1, goomba_anims_running); - SetIdleGoal(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - IdleRunToGoal(ActorID_SELF, 0); - SetIdleAnimations(ActorID_SELF, 1, goomba_anims); + SetActorIdleSpeed(ACTOR_SELF, 1.0); + SetIdleAnimations(ACTOR_SELF, 1, goomba_anims_running); + SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + IdleRunToGoal(ACTOR_SELF, 0); + SetIdleAnimations(ACTOR_SELF, 1, goomba_anims); loop 20 { 1: - GetStatusFlags(ActorID_SELF, SI_VAR(1)); + GetStatusFlags(ACTOR_SELF, SI_VAR(1)); if (SI_VAR(1) & 0x35D000) { sleep 1; goto 1; } sleep 1; } - GetActorPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) -= 5; - SetActorIdleSpeed(ActorID_SELF, 1.0); - SetIdleAnimations(ActorID_SELF, 1, goomba_anims_running); - SetIdleGoal(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - IdleRunToGoal(ActorID_SELF, 0); - SetIdleAnimations(ActorID_SELF, 1, goomba_anims); + SetActorIdleSpeed(ACTOR_SELF, 1.0); + SetIdleAnimations(ACTOR_SELF, 1, goomba_anims_running); + SetIdleGoal(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + IdleRunToGoal(ACTOR_SELF, 0); + SetIdleAnimations(ACTOR_SELF, 1, goomba_anims); loop 80 { 2: - GetStatusFlags(ActorID_SELF, SI_VAR(1)); + GetStatusFlags(ACTOR_SELF, SI_VAR(1)); if (SI_VAR(1) & 0x35D000) { sleep 1; goto 2; @@ -167,23 +167,23 @@ Script goomba_idle = SCRIPT({ }); Script goomba_dispatch = SCRIPT({ - UseIdleAnimation(ActorID_SELF, 0); - EnableIdleScript(ActorID_SELF, 0); - SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); - GetLastEvent(ActorID_SELF, SI_VAR(0)); + UseIdleAnimation(ACTOR_SELF, 0); + EnableIdleScript(ACTOR_SELF, 0); + SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); + GetLastEvent(ACTOR_SELF, SI_VAR(0)); match SI_VAR(0) { - Event_HIT_COMBO, Event_HIT { + EVENT_HIT_COMBO, EVENT_HIT { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); await DoNormalHit; } - == Event_BURN_HIT { + == EVENT_BURN_HIT { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, burn_pain); SI_VAR(2) = c NPC_ANIM(goomba, normal, burn_dead); await DoBurnHit; } - == Event_BURN_DEATH { + == EVENT_BURN_DEATH { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, burn_pain); SI_VAR(2) = c NPC_ANIM(goomba, normal, burn_dead); @@ -193,12 +193,12 @@ Script goomba_dispatch = SCRIPT({ await DoDeath; return; } - == Event_SPIN_SMASH_HIT { + == EVENT_SPIN_SMASH_HIT { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); await DoSpinSmashHit; } - == Event_SPIN_SMASH_DEATH { + == EVENT_SPIN_SMASH_DEATH { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); await DoSpinSmashHit; @@ -207,26 +207,26 @@ Script goomba_dispatch = SCRIPT({ await DoDeath; return; } - == Event_SHOCK_HIT { + == EVENT_SHOCK_HIT { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, electrocute); await DoShockHit; SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); await DoJumpBack; - JumpToGoal(ActorID_SELF, 5, 0, 1, 0); - SetAnimationRate(ActorID_SELF, 1, 2.0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, dizzy)); - SetGoalToHome(ActorID_SELF); - SetActorSpeed(ActorID_SELF, 8.0); - RunToGoal(ActorID_SELF, 0, 0); - SetAnimationRate(ActorID_SELF, 1, 1.0); + JumpToGoal(ACTOR_SELF, 5, 0, 1, 0); + SetAnimationRate(ACTOR_SELF, 1, 2.0); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, dizzy)); + SetGoalToHome(ACTOR_SELF); + SetActorSpeed(ACTOR_SELF, 8.0); + RunToGoal(ACTOR_SELF, 0, 0); + SetAnimationRate(ACTOR_SELF, 1, 1.0); sleep 5; - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); - SetActorJumpGravity(ActorID_SELF, 1.6); - JumpToGoal(ActorID_SELF, 5, 0, 1, 0); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, idle)); + SetActorJumpGravity(ACTOR_SELF, 1.6); + JumpToGoal(ACTOR_SELF, 5, 0, 1, 0); } - == Event_SHOCK_DEATH { + == EVENT_SHOCK_DEATH { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, electrocute); await DoShockHit; @@ -235,12 +235,12 @@ Script goomba_dispatch = SCRIPT({ await DoDeath; return; } - == Event_STAR_BEAM, 23, Event_IMMUNE, Event_AIR_LIFT_FAILED { + == EVENT_STAR_BEAM, 23, EVENT_IMMUNE, EVENT_AIR_LIFT_FAILED { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, idle); await DoImmune; } - == Event_DEATH { + == EVENT_DEATH { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); await DoNormalHit; @@ -250,33 +250,33 @@ Script goomba_dispatch = SCRIPT({ await DoDeath; return; } - == Event_END_FIRST_STRIKE { - SetAnimationRate(ActorID_SELF, 1, 2.0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, run)); - SetGoalToHome(ActorID_SELF); - SetActorSpeed(ActorID_SELF, 4.0); - RunToGoal(ActorID_SELF, 0, 0); - SetAnimationRate(ActorID_SELF, 1, 1.0); - HPBarToHome(ActorID_SELF); + == EVENT_END_FIRST_STRIKE { + SetAnimationRate(ACTOR_SELF, 1, 2.0); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, run)); + SetGoalToHome(ACTOR_SELF); + SetActorSpeed(ACTOR_SELF, 4.0); + RunToGoal(ACTOR_SELF, 0, 0); + SetAnimationRate(ACTOR_SELF, 1, 1.0); + HPBarToHome(ACTOR_SELF); } - == Event_RECOVER_STATUS { + == EVENT_RECOVER_STATUS { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, idle); await DoRecover; } - == Event_SCARE_AWAY { + == EVENT_SCARE_AWAY { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, run); SI_VAR(2) = c NPC_ANIM(goomba, normal, pain); await DoScareAway; return; } - == Event_BEGIN_AIR_LIFT { + == EVENT_BEGIN_AIR_LIFT { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, run); await DoAirLift; } - == Event_BLOW_AWAY { + == EVENT_BLOW_AWAY { SI_VAR(0) = c 1; SI_VAR(1) = c NPC_ANIM(goomba, normal, pain); await DoBlowAway; @@ -284,9 +284,9 @@ Script goomba_dispatch = SCRIPT({ } else { } } - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); - EnableIdleScript(ActorID_SELF, 1); - UseIdleAnimation(ActorID_SELF, 1); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, idle)); + EnableIdleScript(ACTOR_SELF, 1); + UseIdleAnimation(ACTOR_SELF, 1); }); f32 D_8021A194_432B34[] = { @@ -305,42 +305,42 @@ f32 D_8021A194_432B34[] = { }; Script goomba_turn = SCRIPT({ - UseIdleAnimation(ActorID_SELF, 0); - EnableIdleScript(ActorID_SELF, 0); - SetTargetActor(ActorID_SELF, 0); + UseIdleAnimation(ACTOR_SELF, 0); + EnableIdleScript(ACTOR_SELF, 0); + SetTargetActor(ACTOR_SELF, 0); UseCamPreset(63); - BattleCamTargetActor(ActorID_SELF); + BattleCamTargetActor(ACTOR_SELF); 0x8024ECF8(-1, 1, 0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, run)); - SetGoalToTarget(ActorID_SELF); - AddGoalPos(ActorID_SELF, 50, 0, 0); - SetActorSpeed(ActorID_SELF, 6.0); - RunToGoal(ActorID_SELF, 0, 0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); - SetActorDispOffset(ActorID_SELF, 0, -1, 0); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, run)); + SetGoalToTarget(ACTOR_SELF); + AddGoalPos(ACTOR_SELF, 50, 0, 0); + SetActorSpeed(ACTOR_SELF, 6.0); + RunToGoal(ACTOR_SELF, 0, 0); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, idle)); + SetActorDispOffset(ACTOR_SELF, 0, -1, 0); sleep 1; - SetActorDispOffset(ActorID_SELF, 0, -2, 0); + SetActorDispOffset(ACTOR_SELF, 0, -2, 0); sleep 5; - SetActorDispOffset(ActorID_SELF, 0, 0, 0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); - EnemyTestTarget(ActorID_SELF, SI_VAR(0), 0, 0, 1, 16); + 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) { 6, 5 { SI_VAR(10) = SI_VAR(0); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetActorJumpGravity(ActorID_SELF, 1.2); + SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetActorJumpGravity(ACTOR_SELF, 1.2); spawn { - GetActorPos(ActorID_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); + GetActorPos(ACTOR_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); SI_VAR(0) = 0; loop 16 { - GetActorPos(ActorID_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); + GetActorPos(ACTOR_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); func_8021818C_430B2C(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0)); - SetActorRotation(ActorID_SELF, 0, 0, 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); @@ -349,73 +349,73 @@ Script goomba_turn = SCRIPT({ } spawn { sleep 6; - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); } - JumpToGoal(ActorID_SELF, 16, 0, 1, 0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, asleep)); - SetActorScale(ActorID_SELF, 1.1, 0.8, 1.0); - SetActorDispOffset(ActorID_SELF, 0, 5, 0); + JumpToGoal(ACTOR_SELF, 16, 0, 1, 0); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, asleep)); + SetActorScale(ACTOR_SELF, 1.1, 0.8, 1.0); + SetActorDispOffset(ACTOR_SELF, 0, 5, 0); sleep 1; - SetActorScale(ActorID_SELF, 1.3, 0.5, 1.0); - SetActorDispOffset(ActorID_SELF, 0, -2, 0); + SetActorScale(ACTOR_SELF, 1.3, 0.5, 1.0); + SetActorDispOffset(ACTOR_SELF, 0, -2, 0); sleep 1; - SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); - SetActorDispOffset(ActorID_SELF, 0, 7, 0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, pain)); + SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); + SetActorDispOffset(ACTOR_SELF, 0, 7, 0); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, pain)); sleep 5; if (SI_VAR(10) == 5) { - EnemyTestTarget(ActorID_SELF, SI_VAR(0), 0x80000000, 0, 0, 0); + EnemyTestTarget(ACTOR_SELF, SI_VAR(0), 0x80000000, 0, 0, 0); } sleep 5; - SetActorDispOffset(ActorID_SELF, 0, 0, 0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetActorJumpGravity(ActorID_SELF, 2.0); + SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetActorJumpGravity(ACTOR_SELF, 2.0); spawn { sleep 4; SI_VAR(0) = 180; loop 4 { SI_VAR(0) -= 45; - SetActorRotation(ActorID_SELF, 0, 0, SI_VAR(0)); + SetActorRotation(ACTOR_SELF, 0, 0, SI_VAR(0)); sleep 1; } - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); } - JumpToGoal(ActorID_SELF, 15, 0, 1, 0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, dizzy)); + JumpToGoal(ACTOR_SELF, 15, 0, 1, 0); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, dizzy)); sleep 5; UseCamPreset(2); YieldTurn(); - SetActorYaw(ActorID_SELF, 180); - AddActorDecoration(ActorID_SELF, 1, 0, 2); - SetAnimationRate(ActorID_SELF, 1, 2.0); - SetGoalToHome(ActorID_SELF); - SetActorSpeed(ActorID_SELF, 8.0); - RunToGoal(ActorID_SELF, 0, 0); - SetAnimationRate(ActorID_SELF, 1, 1.0); - SetActorYaw(ActorID_SELF, 0); + SetActorYaw(ACTOR_SELF, 180); + AddActorDecoration(ACTOR_SELF, 1, 0, 2); + SetAnimationRate(ACTOR_SELF, 1, 2.0); + SetGoalToHome(ACTOR_SELF); + SetActorSpeed(ACTOR_SELF, 8.0); + RunToGoal(ACTOR_SELF, 0, 0); + SetAnimationRate(ACTOR_SELF, 1, 1.0); + SetActorYaw(ACTOR_SELF, 0); sleep 5; - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); - SetActorJumpGravity(ActorID_SELF, 1.6); - JumpToGoal(ActorID_SELF, 5, 0, 1, 0); - RemoveActorDecoration(ActorID_SELF, 1, 0); - EnableIdleScript(ActorID_SELF, 1); - UseIdleAnimation(ActorID_SELF, 1); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, idle)); + SetActorJumpGravity(ACTOR_SELF, 1.6); + JumpToGoal(ACTOR_SELF, 5, 0, 1, 0); + RemoveActorDecoration(ACTOR_SELF, 1, 0); + EnableIdleScript(ACTOR_SELF, 1); + UseIdleAnimation(ACTOR_SELF, 1); return; } else { - SetGoalToTarget(ActorID_SELF); - SetActorJumpGravity(ActorID_SELF, 1.2); + SetGoalToTarget(ACTOR_SELF); + SetActorJumpGravity(ACTOR_SELF, 1.2); spawn { - GetActorPos(ActorID_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); + GetActorPos(ACTOR_SELF, SI_VAR(1), SI_VAR(2), SI_VAR(0)); SI_VAR(0) = 0; loop 16 { - GetActorPos(ActorID_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); + GetActorPos(ACTOR_SELF, SI_VAR(4), SI_VAR(5), SI_VAR(6)); func_8021818C_430B2C(SI_VAR(1), SI_VAR(2), SI_VAR(4), SI_VAR(5), SI_VAR(0)); - SetActorRotation(ActorID_SELF, 0, 0, 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); @@ -424,51 +424,51 @@ Script goomba_turn = SCRIPT({ } spawn { sleep 6; - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, headbonk)); } - JumpToGoal(ActorID_SELF, 16, 0, 1, 0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, pre_headbonk)); - SetActorScale(ActorID_SELF, 1.1, 0.8, 1.0); + JumpToGoal(ACTOR_SELF, 16, 0, 1, 0); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, pre_headbonk)); + SetActorScale(ACTOR_SELF, 1.1, 0.8, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.3, 0.5, 1.0); + SetActorScale(ACTOR_SELF, 1.3, 0.5, 1.0); sleep 1; } } - EnemyDamageTarget(ActorID_SELF, SI_VAR(0), 0, 0, 0, 1, 32); + EnemyDamageTarget(ACTOR_SELF, SI_VAR(0), 0, 0, 0, 1, 32); match SI_VAR(0) { 0, 2 { UseCamPreset(2); - SetActorScale(ActorID_SELF, 1.1, 0.8, 1.0); + SetActorScale(ACTOR_SELF, 1.1, 0.8, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); + SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); sleep 1; - SetActorRotation(ActorID_SELF, 0, 0, 0); - SetActorDispOffset(ActorID_SELF, 0, 0, 0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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; - SetActorJumpGravity(ActorID_SELF, 1.8); - SetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - JumpToGoal(ActorID_SELF, 10, 0, 1, 0); + SetActorJumpGravity(ACTOR_SELF, 1.8); + SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + JumpToGoal(ACTOR_SELF, 10, 0, 1, 0); SI_VAR(0) += 30; - SetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - JumpToGoal(ActorID_SELF, 8, 0, 1, 0); + SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + JumpToGoal(ACTOR_SELF, 8, 0, 1, 0); SI_VAR(0) += 20; - SetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - JumpToGoal(ActorID_SELF, 6, 0, 1, 0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, idle)); + SetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + JumpToGoal(ACTOR_SELF, 6, 0, 1, 0); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, idle)); sleep 3; YieldTurn(); - SetAnimationRate(ActorID_SELF, 1, 2.0); - SetAnimation(ActorID_SELF, 1, NPC_ANIM(goomba, normal, run)); - SetGoalToHome(ActorID_SELF); - SetActorSpeed(ActorID_SELF, 8.0); - RunToGoal(ActorID_SELF, 0, 0); - SetAnimationRate(ActorID_SELF, 1, 1.0); + SetAnimationRate(ACTOR_SELF, 1, 2.0); + SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, run)); + SetGoalToHome(ACTOR_SELF); + SetActorSpeed(ACTOR_SELF, 8.0); + RunToGoal(ACTOR_SELF, 0, 0); + SetAnimationRate(ACTOR_SELF, 1, 1.0); } } - EnableIdleScript(ActorID_SELF, 1); - UseIdleAnimation(ActorID_SELF, 1); + EnableIdleScript(ACTOR_SELF, 1); + UseIdleAnimation(ACTOR_SELF, 1); }); diff --git a/src/battle/item/coconut/coconut.c b/src/battle/item/coconut/coconut.c index 5c75d0f823..bb09cad37b 100644 --- a/src/battle/item/coconut/coconut.c +++ b/src/battle/item/coconut/coconut.c @@ -37,15 +37,15 @@ s32 N(modelCommandList)[] = { }; Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_COCONUT; + SI_VAR(10) = c ITEM_COCONUT; await N(UseItemWithEffect); UseCamPreset(3); MoveBattleCamOver(15); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); - PlaySound(SoundId_THROW); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); + PlaySound(SOUND_THROW); sleep 3; func_802D3474(SI_VAR(10), N(modelCommandList)); @@ -54,7 +54,7 @@ Script N(main) = SCRIPT({ MultiplyByActorScale($x); func_802D38EC(SI_VAR(10), $x, $x, $x); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); SI_VAR(3) = 20; SI_VAR(4) = 42; SI_VAR(5) = 5; @@ -65,8 +65,8 @@ Script N(main) = SCRIPT({ func_802D36E0(SI_VAR(10), $x, $y, $z); InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, $x, $y, $z); + SetGoalToTarget(ACTOR_SELF); + GetGoalPos(ACTOR_SELF, $x, $y, $z); spawn { $x = 0; @@ -81,7 +81,7 @@ Script N(main) = SCRIPT({ $z += 5; func_802D3C58(SI_VAR(10), $x, $y, $z, 18); - GetItemPower(ItemId_COCONUT, $damage, SI_VAR(4)); + GetItemPower(ITEM_COCONUT, $damage, SI_VAR(4)); ApplyShrinkFromOwner($damage); ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, $damage, 32); diff --git a/src/battle/item/coconut/lib.c b/src/battle/item/coconut/lib.c index 6fb422656e..b6b1587b62 100644 --- a/src/battle/item/coconut/lib.c +++ b/src/battle/item/coconut/lib.c @@ -14,7 +14,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 facingAngleSign = 0.0f; s32 sleepTime = 0; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 iconX; s32 iconY; s32 iconZ; @@ -27,7 +27,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, 1 + 3 * i, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, 1 + 3 * i, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; @@ -53,7 +53,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(battleStatus->playerActor, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(battleStatus->playerActor, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1E80); } @@ -66,12 +66,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); // Nice sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -92,9 +92,9 @@ Script N(UseItemWithEffect) = SCRIPT({ } else { // No refund. - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -118,8 +118,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -134,34 +134,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/dizzy_dial/dizzy_dial.c b/src/battle/item/dizzy_dial/dizzy_dial.c index 20005958a6..9c274c7dcd 100644 --- a/src/battle/item/dizzy_dial/dizzy_dial.c +++ b/src/battle/item/dizzy_dial/dizzy_dial.c @@ -1,7 +1,7 @@ #include "dizzy_dial.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_DIZZY_DIAL; + SI_VAR(10) = c ITEM_DIZZY_DIAL; await N(UseItemWithEffect); UseCamPreset(2); MoveBattleCamOver(20); @@ -32,12 +32,12 @@ Script N(main) = SCRIPT({ } InitTargetIterator(); 0: - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); if (SI_VAR(0) == 6) { goto 1; } - GetItemPower(ItemId_DIZZY_DIAL, SI_VAR(0), SI_VAR(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); 1: diff --git a/src/battle/item/dizzy_dial/lib.c b/src/battle/item/dizzy_dial/lib.c index 239c8b5a32..b65756d6ef 100644 --- a/src/battle/item/dizzy_dial/lib.c +++ b/src/battle/item/dizzy_dial/lib.c @@ -13,7 +13,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -23,7 +23,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -48,7 +48,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1CD4); } @@ -98,12 +98,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -122,9 +122,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -148,8 +148,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -164,35 +164,35 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/dried_shroom/dried_shroom.c b/src/battle/item/dried_shroom/dried_shroom.c index 453e6d14cb..dcbb483a52 100644 --- a/src/battle/item/dried_shroom/dried_shroom.c +++ b/src/battle/item/dried_shroom/dried_shroom.c @@ -1,24 +1,24 @@ #include "dried_shroom.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_DRIED_SHROOM; + SI_VAR(10) = c ITEM_DRIED_SHROOM; await N(UseItemWithEffect); await N(EatItem); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_STICK_OUT_TONGUE); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); N(func_802A12FC_71CFDC)(); sleep 30; - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); }); diff --git a/src/battle/item/dried_shroom/lib.c b/src/battle/item/dried_shroom/lib.c index b3e76efc5e..43a3ced6a0 100644 --- a/src/battle/item/dried_shroom/lib.c +++ b/src/battle/item/dried_shroom/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1A90); } @@ -81,12 +81,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -105,9 +105,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -131,8 +131,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -147,34 +147,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/dusty_hammer/dusty_hammer.c b/src/battle/item/dusty_hammer/dusty_hammer.c index 3f80b63bb1..602de8c382 100644 --- a/src/battle/item/dusty_hammer/dusty_hammer.c +++ b/src/battle/item/dusty_hammer/dusty_hammer.c @@ -40,14 +40,14 @@ Script N(main) = SCRIPT({ await N(UseItemWithEffect); UseCamPreset(3); MoveBattleCamOver(15); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); - PlaySound(SoundId_THROW); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); + PlaySound(SOUND_THROW); sleep 3; func_802D3474(SI_VAR(10), N(modelCommandList)); SI_VAR(0) = 1.0; MultiplyByActorScale(SI_VAR(0)); func_802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0)); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(3) = 20; SI_VAR(4) = 42; SI_VAR(5) = 5; @@ -57,8 +57,8 @@ Script N(main) = SCRIPT({ SI_VAR(2) += SI_VAR(5); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalToTarget(ACTOR_SELF); + GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); spawn { SI_VAR(0) = 0; loop 18 { @@ -70,7 +70,7 @@ Script N(main) = SCRIPT({ func_802D39FC(SI_VAR(10), 0.80078125); SI_VAR(2) += 5; func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); - GetItemPower(ItemId_DUSTY_HAMMER, SI_VAR(3), SI_VAR(4)); + 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; diff --git a/src/battle/item/dusty_hammer/lib.c b/src/battle/item/dusty_hammer/lib.c index 953484a92f..b027371500 100644 --- a/src/battle/item/dusty_hammer/lib.c +++ b/src/battle/item/dusty_hammer/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1E80); } @@ -59,12 +59,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -83,9 +83,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -109,8 +109,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -125,35 +125,35 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/egg_missile/egg_missile.c b/src/battle/item/egg_missile/egg_missile.c index f4ed0ef04c..df9e8ef91b 100644 --- a/src/battle/item/egg_missile/egg_missile.c +++ b/src/battle/item/egg_missile/egg_missile.c @@ -112,22 +112,22 @@ s32 N(modelCommandList)[] = { }; Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_EGG_MISSILE; + SI_VAR(10) = c ITEM_EGG_MISSILE; await N(UseItemWithEffect); UseCamPreset(3); MoveBattleCamOver(15); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); - PlaySound(SoundId_THROW); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); + PlaySound(SOUND_THROW); sleep 3; func_802D3474(SI_VAR(10), N(modelCommandList)); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 20; SI_VAR(1) += 42; SI_VAR(2) += 5; func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalToTarget(ACTOR_SELF); + GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); spawn { SI_VAR(0) = 0; loop 18 { @@ -140,7 +140,7 @@ Script N(main) = SCRIPT({ SI_VAR(2) += 5; func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); func_802D3624(SI_VAR(10)); - PlaySound(SoundId_2010); + PlaySound(SOUND_UNKNOWN_2010); N(func_802A123C_71CF1C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); spawn { StartRumble(5); @@ -149,7 +149,7 @@ Script N(main) = SCRIPT({ ShakeCam(1, 0, 4, 1.2001953125); ShakeCam(1, 0, 2, 0.4501953125); } - GetItemPower(ItemId_EGG_MISSILE, SI_VAR(0), SI_VAR(1)); + GetItemPower(ITEM_EGG_MISSILE, SI_VAR(0), SI_VAR(1)); ItemDamageEnemy(SI_VAR(0), 0x18000202, 0, SI_VAR(0), 32); await N(PlayerGoHome); }); diff --git a/src/battle/item/egg_missile/lib.c b/src/battle/item/egg_missile/lib.c index ff72699df6..17aafdbcdd 100644 --- a/src/battle/item/egg_missile/lib.c +++ b/src/battle/item/egg_missile/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A2890); } @@ -71,12 +71,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -95,9 +95,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -121,8 +121,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -137,34 +137,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/electro_pop/electro_pop.c b/src/battle/item/electro_pop/electro_pop.c index ce68dfe19b..c8f6fae970 100644 --- a/src/battle/item/electro_pop/electro_pop.c +++ b/src/battle/item/electro_pop/electro_pop.c @@ -1,31 +1,31 @@ #include "electro_pop.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_ELECTRO_POP; + SI_VAR(10) = c ITEM_ELECTRO_POP; await N(UseItemWithEffect); await N(EatItem); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); - PlaySound(SoundId_379); - GetItemPower(ItemId_VOLT_SHROOM, SI_VAR(0), SI_VAR(1)); + PlaySound(SOUND_UNKNOWN_379); + GetItemPower(ITEM_VOLT_SHROOM, SI_VAR(0), SI_VAR(1)); N(func_802A123C_7307DC)(); sleep 40; N(func_802A14F0_730A90)(); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; ShowMessageBox(16, 60); WaitForMessageBoxDone(); diff --git a/src/battle/item/electro_pop/lib.c b/src/battle/item/electro_pop/lib.c index 8f31870452..f3d9de7a37 100644 --- a/src/battle/item/electro_pop/lib.c +++ b/src/battle/item/electro_pop/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1D60); } @@ -58,7 +58,7 @@ ApiStatus N(func_802A123C_7307DC)(ScriptInstance* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; - inflict_status(player, Debuff_STATIC, script->varTable[0]); + inflict_status(player, STATUS_STATIC, script->varTable[0]); player->status = 0; return ApiStatus_DONE2; } @@ -90,7 +90,7 @@ ApiStatus N(func_802A133C_7308DC)(ScriptInstance* script, s32 isInitialCall) { #include "common/AddHP.inc.c" ApiStatus N(func_802A1450_7309F0)(ScriptInstance* script, s32 isInitialCall) { - StaticItem* item = &gItemTable[ItemId_ELECTRO_POP]; + StaticItem* item = &gItemTable[ITEM_ELECTRO_POP]; PlayerData* playerData = &gPlayerData; playerData->curHP += item->potencyA; @@ -120,7 +120,7 @@ ApiStatus N(AddFP)(ScriptInstance* script, s32 isInitialCall) { } ApiStatus N(func_802A14F0_730A90)(ScriptInstance* script, s32 isInitialCall) { - StaticItem* item = &gItemTable[ItemId_ELECTRO_POP]; + StaticItem* item = &gItemTable[ITEM_ELECTRO_POP]; PlayerData* playerData = &gPlayerData; playerData->curFP += item->potencyA; @@ -138,12 +138,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -162,9 +162,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -188,8 +188,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -204,34 +204,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/fire_flower/fire_flower.c b/src/battle/item/fire_flower/fire_flower.c index 9e7bd1d16e..1848a9ccee 100644 --- a/src/battle/item/fire_flower/fire_flower.c +++ b/src/battle/item/fire_flower/fire_flower.c @@ -1,40 +1,40 @@ #include "fire_flower.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_FIRE_FLOWER; + SI_VAR(10) = c ITEM_FIRE_FLOWER; await N(UseItemWithEffect); N(FadeBackgroundToBlack)(); - PlaySound(SoundId_377); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_PLANT); + PlaySound(SOUND_UNKNOWN_377); + SetAnimation(ACTOR_PLAYER, 0, ANIM_PLANT); spawn { sleep 50; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } sleep 35; UseCamPreset(2); MoveBattleCamOver(20); sleep 10; - GetActorPos(ActorID_PLAYER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); + 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); spawn { - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) -= 10; - SetActorSpeed(ActorID_PLAYER, 2.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); - SetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetActorSpeed(ACTOR_PLAYER, 2.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); + SetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } spawn { N(func_802A123C_716E9C)(SI_VAR(3), SI_VAR(4), SI_VAR(5)); sleep 25; loop 12 { sleep 1; - PlaySound(SoundId_202C); + PlaySound(SOUND_UNKNOWN_202C); sleep 2; - PlaySound(SoundId_202D); + PlaySound(SOUND_UNKNOWN_202D); sleep 1; } } @@ -43,13 +43,13 @@ Script N(main) = SCRIPT({ MoveBattleCamOver(20); InitTargetIterator(); 0: - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); if (SI_VAR(0) == 6) { goto 1; } - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - GetItemPower(ItemId_FIRE_FLOWER, SI_VAR(0), SI_VAR(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); 1: sleep 5; diff --git a/src/battle/item/fire_flower/lib.c b/src/battle/item/fire_flower/lib.c index 2edd9fae67..16086704af 100644 --- a/src/battle/item/fire_flower/lib.c +++ b/src/battle/item/fire_flower/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1D70); } @@ -88,12 +88,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -112,9 +112,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -138,8 +138,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -154,34 +154,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/food/food.c b/src/battle/item/food/food.c index 458a18c872..aa229db7d9 100644 --- a/src/battle/item/food/food.c +++ b/src/battle/item/food/food.c @@ -1,35 +1,35 @@ #include "food.h" Script N(script6) = SCRIPT({ - SetActorYaw(ActorID_PLAYER, 30); + SetActorYaw(ACTOR_PLAYER, 30); sleep 1; - SetActorYaw(ActorID_PLAYER, 60); + SetActorYaw(ACTOR_PLAYER, 60); sleep 1; - SetActorYaw(ActorID_PLAYER, 90); + SetActorYaw(ACTOR_PLAYER, 90); sleep 1; - SetActorYaw(ActorID_PLAYER, 120); + SetActorYaw(ACTOR_PLAYER, 120); sleep 1; - SetActorYaw(ActorID_PLAYER, 150); + SetActorYaw(ACTOR_PLAYER, 150); sleep 1; - SetActorYaw(ActorID_PLAYER, 180); + SetActorYaw(ACTOR_PLAYER, 180); sleep 10; SI_VAR(1) = SI_VAR(15); await N(UseItem); SI_VAR(14) = SI_VAR(10); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); spawn { sleep 20; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } func_802D3474(SI_VAR(10), 0x80283EE8); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 0; SI_VAR(1) += 30; SI_VAR(2) += 5; func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D3F74(SI_VAR(10), 32); spawn { - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); @@ -41,8 +41,8 @@ Script N(script6) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); } InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalToTarget(ACTOR_SELF); + GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamOffsetZ(41); SetBattleCamZoom(248); @@ -52,27 +52,27 @@ Script N(script6) = SCRIPT({ func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); AddBattleCamZoom(100); MoveBattleCamOver(30); - GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); } sleep 30; - GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); sleep 20; - SetActorYaw(ActorID_PLAYER, 150); + SetActorYaw(ACTOR_PLAYER, 150); sleep 1; - SetActorYaw(ActorID_PLAYER, 120); + SetActorYaw(ACTOR_PLAYER, 120); sleep 1; - SetActorYaw(ActorID_PLAYER, 90); + SetActorYaw(ACTOR_PLAYER, 90); sleep 1; - SetActorYaw(ActorID_PLAYER, 60); + SetActorYaw(ACTOR_PLAYER, 60); sleep 1; - SetActorYaw(ActorID_PLAYER, 30); + SetActorYaw(ACTOR_PLAYER, 30); sleep 1; - SetActorYaw(ActorID_PLAYER, 0); + SetActorYaw(ACTOR_PLAYER, 0); sleep 10; }); @@ -83,7 +83,7 @@ Script N(main) = SCRIPT({ N(func_802A15A0_733670)(SI_VAR(10)); InitTargetIterator(); GetOwnerTarget(SI_VAR(0), SI_VAR(1)); - if (SI_VAR(0) == ActorID_PARTNER) { + if (SI_VAR(0) == ACTOR_PARTNER) { await N(script6); return; } @@ -95,27 +95,27 @@ Script N(main) = SCRIPT({ await N(DrinkItem); } if (SI_VAR(15) == 1) { - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_STICK_OUT_TONGUE); + SetAnimation(ACTOR_PLAYER, 0, ANIM_STICK_OUT_TONGUE); } if (SI_VAR(11) > 0) { - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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 (SI_VAR(11) < 0) { - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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 (SI_VAR(12) > 0) { - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); } - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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) { @@ -126,14 +126,14 @@ Script N(main) = SCRIPT({ } if (SI_VAR(15) == 0) { sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; } else { sleep 30; } - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); }); diff --git a/src/battle/item/food/lib.c b/src/battle/item/food/lib.c index 3e66c0df0c..d89cb87afd 100644 --- a/src/battle/item/food/lib.c +++ b/src/battle/item/food/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A24D0); } @@ -145,12 +145,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -169,9 +169,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -195,8 +195,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -211,34 +211,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/fright_jar/fright_jar.c b/src/battle/item/fright_jar/fright_jar.c index b305eee0c7..819d9efc47 100644 --- a/src/battle/item/fright_jar/fright_jar.c +++ b/src/battle/item/fright_jar/fright_jar.c @@ -1,7 +1,7 @@ #include "fright_jar.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_FRIGHT_JAR; + SI_VAR(10) = c ITEM_FRIGHT_JAR; await N(UseItemWithEffect); N(FadeBackgroundToBlack)(); spawn { @@ -9,9 +9,9 @@ Script N(main) = SCRIPT({ UseCamPreset(2); MoveBattleCamOver(50); } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_CROUCH); - PlaySoundAtActor(ActorID_PLAYER, SoundId_367); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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; @@ -35,7 +35,7 @@ Script N(main) = SCRIPT({ MoveBattleCamOver(20); InitTargetIterator(); 0: - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); if (SI_VAR(0) == 6) { goto 1; @@ -48,7 +48,7 @@ Script N(main) = SCRIPT({ goto 0; } sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_WALKING); + SetAnimation(ACTOR_PLAYER, 0, ANIM_WALKING); N(func_802A12D4_72BBE4)(); sleep 20; await N(PlayerGoHome); diff --git a/src/battle/item/fright_jar/lib.c b/src/battle/item/fright_jar/lib.c index 244e002059..00f1f30e4c 100644 --- a/src/battle/item/fright_jar/lib.c +++ b/src/battle/item/fright_jar/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1CA0); } @@ -77,12 +77,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -101,9 +101,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -127,8 +127,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -143,34 +143,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/hustle_drink/hustle_drink.c b/src/battle/item/hustle_drink/hustle_drink.c index 7f6095b886..23cecf0473 100644 --- a/src/battle/item/hustle_drink/hustle_drink.c +++ b/src/battle/item/hustle_drink/hustle_drink.c @@ -1,77 +1,77 @@ #include "hustle_drink.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_HUSTLE_DRINK; + SI_VAR(10) = c ITEM_HUSTLE_DRINK; await N(UseItemWithEffect); await N(DrinkItem); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_SQUISH); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); N(func_802A12C4_726224)(); N(func_802A123C_72619C)(); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 20; UseCamPreset(13); - BattleCamTargetActor(ActorID_SELF); + BattleCamTargetActor(ACTOR_SELF); MoveBattleCamOver(20); - PlaySoundAtActor(ActorID_PLAYER, SoundId_369); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_369); spawn { loop 2 { - SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); + SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.1005859375, 1.0, 1.0); + SetActorScale(ACTOR_SELF, 1.1005859375, 1.0, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.2001953125, 0.9501953125, 1.0); + SetActorScale(ACTOR_SELF, 1.2001953125, 0.9501953125, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.30078125, 0.900390625, 1.0); + SetActorScale(ACTOR_SELF, 1.30078125, 0.900390625, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.3505859375, 0.8505859375, 1.0); + SetActorScale(ACTOR_SELF, 1.3505859375, 0.8505859375, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.380859375, 0.80078125, 1.0); + SetActorScale(ACTOR_SELF, 1.380859375, 0.80078125, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.400390625, 0.80078125, 1.0); + SetActorScale(ACTOR_SELF, 1.400390625, 0.80078125, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.30078125, 0.8505859375, 1.0); + SetActorScale(ACTOR_SELF, 1.30078125, 0.8505859375, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.2001953125, 0.900390625, 1.0); + SetActorScale(ACTOR_SELF, 1.2001953125, 0.900390625, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.1005859375, 0.9501953125, 1.0); + SetActorScale(ACTOR_SELF, 1.1005859375, 0.9501953125, 1.0); sleep 1; } - SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); + SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.1005859375, 1.0, 1.0); + SetActorScale(ACTOR_SELF, 1.1005859375, 1.0, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.2001953125, 0.9501953125, 1.0); + SetActorScale(ACTOR_SELF, 1.2001953125, 0.9501953125, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.30078125, 0.900390625, 1.0); + SetActorScale(ACTOR_SELF, 1.30078125, 0.900390625, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.3505859375, 0.8505859375, 1.0); + SetActorScale(ACTOR_SELF, 1.3505859375, 0.8505859375, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.380859375, 0.80078125, 1.0); + SetActorScale(ACTOR_SELF, 1.380859375, 0.80078125, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.400390625, 0.80078125, 1.0); + SetActorScale(ACTOR_SELF, 1.400390625, 0.80078125, 1.0); sleep 1; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208E); - SetActorScale(ActorID_SELF, 0.900390625, 1.30078125, 1.0); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208E); + SetActorScale(ACTOR_SELF, 0.900390625, 1.30078125, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 0.900390625, 1.2001953125, 1.0); + SetActorScale(ACTOR_SELF, 0.900390625, 1.2001953125, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 0.9501953125, 1.1005859375, 1.0); + SetActorScale(ACTOR_SELF, 0.9501953125, 1.1005859375, 1.0); sleep 1; - SetActorScale(ActorID_SELF, 1.0, 1.0, 1.0); + SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); sleep 1; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } loop 10 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_369); + 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); sleep 4; } sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); UseCamPreset(2); MoveBattleCamOver(20); sleep 20; diff --git a/src/battle/item/hustle_drink/lib.c b/src/battle/item/hustle_drink/lib.c index 69c9125345..827eae540e 100644 --- a/src/battle/item/hustle_drink/lib.c +++ b/src/battle/item/hustle_drink/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1E70); } @@ -91,12 +91,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -115,9 +115,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -141,8 +141,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -157,34 +157,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/insecticide_herb/insecticide_herb.c b/src/battle/item/insecticide_herb/insecticide_herb.c index 86947bed2e..6b5a9076af 100644 --- a/src/battle/item/insecticide_herb/insecticide_herb.c +++ b/src/battle/item/insecticide_herb/insecticide_herb.c @@ -36,18 +36,18 @@ s32 N(modelCommandList)[] = { }; Script script = SCRIPT({ - SI_VAR(10) = c ItemId_INSECTICIDE_HERB; + SI_VAR(10) = c ITEM_INSECTICIDE_HERB; await N(UseItemWithEffect); UseCamPreset(3); MoveBattleCamOver(15); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); - PlaySound(SoundId_THROW); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); + PlaySound(SOUND_THROW); sleep 3; func_802D3474(SI_VAR(10), N(modelCommandList)); SI_VAR(0) = 1.0; MultiplyByActorScale(SI_VAR(0)); func_802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0)); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(3) = 20; SI_VAR(4) = 42; SI_VAR(5) = 5; @@ -57,8 +57,8 @@ Script script = SCRIPT({ SI_VAR(2) += SI_VAR(5); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalToTarget(ACTOR_SELF); + GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); spawn { SI_VAR(0) = 0; loop 18 { @@ -83,14 +83,14 @@ Script script = SCRIPT({ N(func_802A12E0_72AA30)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); } InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); N(func_802A123C_72A98C)(); func_802D3624(SI_VAR(10)); if (SI_VAR(9) == 0) { ItemDamageEnemy(SI_VAR(0), 0, 0, 0, 32); } else { InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); N(func_802A1280_72A9D0)(); } await N(PlayerGoHome); diff --git a/src/battle/item/insecticide_herb/lib.c b/src/battle/item/insecticide_herb/lib.c index c1a1abab05..25def55bf9 100644 --- a/src/battle/item/insecticide_herb/lib.c +++ b/src/battle/item/insecticide_herb/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A21C0); } @@ -123,12 +123,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -147,9 +147,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -173,8 +173,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -189,34 +189,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/life_shroom/lib.c b/src/battle/item/life_shroom/lib.c index b793212cad..b25cb664ee 100644 --- a/src/battle/item/life_shroom/lib.c +++ b/src/battle/item/life_shroom/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A21F0); } @@ -105,7 +105,7 @@ ApiStatus N(func_802A1378_72E8A8)(ScriptInstance* script, s32 isInitialCall) { } ApiStatus N(func_802A1438_72E968)(ScriptInstance* script, s32 isInitialCall) { - StaticItem* item = &gItemTable[ItemId_LIFE_SHROOM]; + StaticItem* item = &gItemTable[ITEM_LIFE_SHROOM]; PlayerData* playerData = &gPlayerData; playerData->curHP += item->potencyA; @@ -138,12 +138,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -162,9 +162,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -188,8 +188,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -204,34 +204,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/life_shroom/life_shroom.c b/src/battle/item/life_shroom/life_shroom.c index 91a4f94226..477eca1f3c 100644 --- a/src/battle/item/life_shroom/life_shroom.c +++ b/src/battle/item/life_shroom/life_shroom.c @@ -1,35 +1,35 @@ #include "life_shroom.h" Script N(script6) = SCRIPT({ - SetActorYaw(ActorID_PLAYER, 30); + SetActorYaw(ACTOR_PLAYER, 30); sleep 1; - SetActorYaw(ActorID_PLAYER, 60); + SetActorYaw(ACTOR_PLAYER, 60); sleep 1; - SetActorYaw(ActorID_PLAYER, 90); + SetActorYaw(ACTOR_PLAYER, 90); sleep 1; - SetActorYaw(ActorID_PLAYER, 120); + SetActorYaw(ACTOR_PLAYER, 120); sleep 1; - SetActorYaw(ActorID_PLAYER, 150); + SetActorYaw(ACTOR_PLAYER, 150); sleep 1; - SetActorYaw(ActorID_PLAYER, 180); + SetActorYaw(ACTOR_PLAYER, 180); sleep 10; SI_VAR(1) = SI_VAR(15); await N(UseItem); SI_VAR(14) = SI_VAR(10); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); spawn { sleep 20; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } func_802D3474(SI_VAR(10), 0x80283EE8); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 0; SI_VAR(1) += 30; SI_VAR(2) += 5; func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D3F74(SI_VAR(10), 32); spawn { - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); @@ -41,8 +41,8 @@ Script N(script6) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); } InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalToTarget(ACTOR_SELF); + GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamOffsetZ(41); SetBattleCamZoom(248); @@ -52,27 +52,27 @@ Script N(script6) = SCRIPT({ func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); AddBattleCamZoom(100); MoveBattleCamOver(30); - GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); } sleep 30; - GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); sleep 20; - SetActorYaw(ActorID_PLAYER, 150); + SetActorYaw(ACTOR_PLAYER, 150); sleep 1; - SetActorYaw(ActorID_PLAYER, 120); + SetActorYaw(ACTOR_PLAYER, 120); sleep 1; - SetActorYaw(ActorID_PLAYER, 90); + SetActorYaw(ACTOR_PLAYER, 90); sleep 1; - SetActorYaw(ActorID_PLAYER, 60); + SetActorYaw(ACTOR_PLAYER, 60); sleep 1; - SetActorYaw(ActorID_PLAYER, 30); + SetActorYaw(ACTOR_PLAYER, 30); sleep 1; - SetActorYaw(ActorID_PLAYER, 0); + SetActorYaw(ACTOR_PLAYER, 0); sleep 10; }); @@ -83,28 +83,28 @@ Script N(main) = SCRIPT({ N(func_802A1484_72E9B4)(SI_VAR(10)); InitTargetIterator(); GetOwnerTarget(SI_VAR(0), SI_VAR(1)); - if (SI_VAR(0) == ActorID_PARTNER) { + if (SI_VAR(0) == ACTOR_PARTNER) { await N(script6); return; } - SI_VAR(10) = c ItemId_LIFE_SHROOM; + SI_VAR(10) = c ITEM_LIFE_SHROOM; SI_VAR(1) = SI_VAR(15); await N(UseItemWithEffect); await N(EatItem); N(func_802A1438_72E968)(); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); }); diff --git a/src/battle/item/mushroom/lib.c b/src/battle/item/mushroom/lib.c index 8a172fb347..01fd756663 100644 --- a/src/battle/item/mushroom/lib.c +++ b/src/battle/item/mushroom/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A2410); } @@ -137,12 +137,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -161,9 +161,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -187,8 +187,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -203,34 +203,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/mushroom/mushroom.c b/src/battle/item/mushroom/mushroom.c index 16fb9c457a..c2992aa778 100644 --- a/src/battle/item/mushroom/mushroom.c +++ b/src/battle/item/mushroom/mushroom.c @@ -1,35 +1,35 @@ #include "mushroom.h" Script N(script6) = SCRIPT({ - SetActorYaw(ActorID_PLAYER, 30); + SetActorYaw(ACTOR_PLAYER, 30); sleep 1; - SetActorYaw(ActorID_PLAYER, 60); + SetActorYaw(ACTOR_PLAYER, 60); sleep 1; - SetActorYaw(ActorID_PLAYER, 90); + SetActorYaw(ACTOR_PLAYER, 90); sleep 1; - SetActorYaw(ActorID_PLAYER, 120); + SetActorYaw(ACTOR_PLAYER, 120); sleep 1; - SetActorYaw(ActorID_PLAYER, 150); + SetActorYaw(ACTOR_PLAYER, 150); sleep 1; - SetActorYaw(ActorID_PLAYER, 180); + SetActorYaw(ACTOR_PLAYER, 180); sleep 10; SI_VAR(1) = SI_VAR(15); await N(UseItem); SI_VAR(14) = SI_VAR(10); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); spawn { sleep 20; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } func_802D3474(SI_VAR(10), 0x80283EE8); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 0; SI_VAR(1) += 30; SI_VAR(2) += 5; func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D3F74(SI_VAR(10), 32); spawn { - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); @@ -41,8 +41,8 @@ Script N(script6) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); } InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalToTarget(ACTOR_SELF); + GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamOffsetZ(41); SetBattleCamZoom(248); @@ -52,27 +52,27 @@ Script N(script6) = SCRIPT({ func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); AddBattleCamZoom(100); MoveBattleCamOver(30); - GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); } sleep 30; - GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); sleep 20; - SetActorYaw(ActorID_PLAYER, 150); + SetActorYaw(ACTOR_PLAYER, 150); sleep 1; - SetActorYaw(ActorID_PLAYER, 120); + SetActorYaw(ACTOR_PLAYER, 120); sleep 1; - SetActorYaw(ActorID_PLAYER, 90); + SetActorYaw(ACTOR_PLAYER, 90); sleep 1; - SetActorYaw(ActorID_PLAYER, 60); + SetActorYaw(ACTOR_PLAYER, 60); sleep 1; - SetActorYaw(ActorID_PLAYER, 30); + SetActorYaw(ACTOR_PLAYER, 30); sleep 1; - SetActorYaw(ActorID_PLAYER, 0); + SetActorYaw(ACTOR_PLAYER, 0); sleep 10; }); @@ -83,7 +83,7 @@ Script N(main) = SCRIPT({ N(func_802A15A0_715DF0)(SI_VAR(10)); InitTargetIterator(); GetOwnerTarget(SI_VAR(0), SI_VAR(1)); - if (SI_VAR(0) == ActorID_PARTNER) { + if (SI_VAR(0) == ACTOR_PARTNER) { await N(script6); return; } @@ -91,21 +91,21 @@ Script N(main) = SCRIPT({ await N(UseItemWithEffect); await N(EatItem); if (SI_VAR(15) == 1) { - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_STICK_OUT_TONGUE); + SetAnimation(ACTOR_PLAYER, 0, ANIM_STICK_OUT_TONGUE); } if (SI_VAR(11) > 0) { - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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 (SI_VAR(12) > 0) { - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); } - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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) { @@ -116,14 +116,14 @@ Script N(main) = SCRIPT({ } if (SI_VAR(15) == 0) { sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; } else { sleep 30; } - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); }); diff --git a/src/battle/item/mystery/lib.c b/src/battle/item/mystery/lib.c index 72d5d1c6b8..98b972d60f 100644 --- a/src/battle/item/mystery/lib.c +++ b/src/battle/item/mystery/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A25C0); } @@ -277,12 +277,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -301,9 +301,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -327,8 +327,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -343,34 +343,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/mystery/mystery.c b/src/battle/item/mystery/mystery.c index 0a6de289d0..f93ccca18d 100644 --- a/src/battle/item/mystery/mystery.c +++ b/src/battle/item/mystery/mystery.c @@ -46,26 +46,26 @@ s32 N(D_802A229C_72D84C)[8] = { }; Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_MYSTERY; + SI_VAR(10) = c ITEM_MYSTERY; await N(UseItemWithEffect); spawn { sleep 220; - PlaySoundAtActor(ActorID_PLAYER, SoundId_3F3); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_3F3); } - PlaySoundAtActor(ActorID_PLAYER, SoundId_368); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_368); N(func_802A13E4_72C994)(); sleep 2; - if (SI_VAR(0) != ItemId_PEBBLE) { + if (SI_VAR(0) != ITEM_PEBBLE) { jump UseMystery; return; } func_802D3474(SI_VAR(10), N(modelCommandList)); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 150; func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetOwnerTarget(0, 0); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalToTarget(ACTOR_SELF); + GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); spawn { SI_VAR(0) = 0; loop 18 { @@ -83,10 +83,10 @@ Script N(main) = SCRIPT({ func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 16); func_802D3624(SI_VAR(10)); } - SetTargetActor(ActorID_SELF, 0); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); SetBattleFlagBits(32, 1); - DispatchDamagePlayerEvent(1, Event_HIT); + DispatchDamagePlayerEvent(1, EVENT_HIT); }); diff --git a/src/battle/item/pebble/lib.c b/src/battle/item/pebble/lib.c index 0ca6b5e64b..ef34c35ac3 100644 --- a/src/battle/item/pebble/lib.c +++ b/src/battle/item/pebble/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1E80); } @@ -59,12 +59,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -83,9 +83,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -109,8 +109,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -125,35 +125,35 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/pebble/pebble.c b/src/battle/item/pebble/pebble.c index d73c0dd52a..45a2e85cf3 100644 --- a/src/battle/item/pebble/pebble.c +++ b/src/battle/item/pebble/pebble.c @@ -36,18 +36,18 @@ s32 N(modelCommandList)[] = { }; Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_PEBBLE; + SI_VAR(10) = c ITEM_PEBBLE; await N(UseItemWithEffect); UseCamPreset(3); MoveBattleCamOver(15); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); - PlaySound(SoundId_THROW); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); + PlaySound(SOUND_THROW); sleep 3; func_802D3474(SI_VAR(10), N(modelCommandList)); SI_VAR(0) = 1.0; MultiplyByActorScale(SI_VAR(0)); func_802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0)); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(3) = 20; SI_VAR(4) = 42; SI_VAR(5) = 5; @@ -57,8 +57,8 @@ Script N(main) = SCRIPT({ SI_VAR(2) += SI_VAR(5); func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalToTarget(ACTOR_SELF); + GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); spawn { SI_VAR(0) = 0; loop 18 { @@ -70,7 +70,7 @@ Script N(main) = SCRIPT({ func_802D39FC(SI_VAR(10), 0.80078125); SI_VAR(2) += 5; func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); - GetItemPower(ItemId_PEBBLE, SI_VAR(3), SI_VAR(4)); + 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; diff --git a/src/battle/item/please_come_back/lib.c b/src/battle/item/please_come_back/lib.c index 4516c130d9..ab8d134425 100644 --- a/src/battle/item/please_come_back/lib.c +++ b/src/battle/item/please_come_back/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A18E0); } @@ -59,12 +59,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -83,9 +83,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -109,8 +109,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -125,34 +125,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/please_come_back/please_come_back.c b/src/battle/item/please_come_back/please_come_back.c index 9ce0c0f6d2..203b3f8f0d 100644 --- a/src/battle/item/please_come_back/please_come_back.c +++ b/src/battle/item/please_come_back/please_come_back.c @@ -1,15 +1,15 @@ #include "please_come_back.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_DIZZY_DIAL; + SI_VAR(10) = c ITEM_DIZZY_DIAL; await N(UseItemWithEffect); SetGoalToHome(0); - SetJumpAnimations(ActorID_PLAYER, 0, PlayerAnim_MIDAIR_STILL, PlayerAnim_MIDAIR, PlayerAnim_9); - SetActorSpeed(ActorID_PLAYER, 4.0); - SetActorJumpGravity(ActorID_PLAYER, 1.80078125); + SetJumpAnimations(ACTOR_PLAYER, 0, ANIM_MIDAIR_STILL, ANIM_MIDAIR, ANIM_10009); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetActorJumpGravity(ACTOR_PLAYER, 1.80078125); func_80273444(4, 0, 0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_8000B); + SetAnimation(ACTOR_PLAYER, 0, ANIM_8000B); sleep 8; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); }); diff --git a/src/battle/item/pow_block/lib.c b/src/battle/item/pow_block/lib.c index 744a96ffbe..1e34196f75 100644 --- a/src/battle/item/pow_block/lib.c +++ b/src/battle/item/pow_block/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A2120); } @@ -102,12 +102,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -126,9 +126,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -152,8 +152,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -168,34 +168,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/pow_block/pow_block.c b/src/battle/item/pow_block/pow_block.c index 924f50288d..7aa92cbd30 100644 --- a/src/battle/item/pow_block/pow_block.c +++ b/src/battle/item/pow_block/pow_block.c @@ -1,7 +1,7 @@ #include "pow_block.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_P_O_W_BLOCK; + SI_VAR(10) = c ITEM_P_O_W_BLOCK; await N(UseItemWithEffect); sleep 10; MakeEntity(0x802EA2E0, 0xFFFFFFD8, 60, 0, 0, 0x80000000); @@ -11,13 +11,13 @@ Script N(main) = SCRIPT({ PlayEffect(0x7, 2, 0xFFFFFFE2, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x7, 2, 0xFFFFFFD8, 60, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x7, 2, 0xFFFFFFD8, 55, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; UseCamPreset(2); MoveBattleCamOver(20); spawn { sleep 15; - PlaySoundAtActor(ActorID_PLAYER, SoundId_HIT_BLOCK); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_HIT_BLOCK); N(func_802A123C_718A8C)(); PlayEffect(0x7, 2, 0xFFFFFFD8, 60, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x7, 2, 0xFFFFFFE2, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -29,35 +29,35 @@ Script N(main) = SCRIPT({ ShakeCam(1, 0, 2, 6.0); ShakeCam(1, 0, 2, 5.0); ShakeCam(1, 0, 2, 4.0); - PlaySoundAtActor(ActorID_PLAYER, SoundId_2030); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2030); ShakeCam(1, 0, 2, 3.0); ShakeCam(1, 0, 2, 2.0); ShakeCam(1, 0, 2, 1.0); ShakeCam(1, 0, 2, 0.5); ShakeCam(1, 0, 2, 0.2001953125); } - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 30; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); - SetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); + SetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); PlayerRunToGoal(0); sleep 5; - SetJumpAnimations(ActorID_PLAYER, 0, PlayerAnim_MIDAIR_STILL, PlayerAnim_MIDAIR, PlayerAnim_9); - SetActorJumpGravity(ActorID_PLAYER, 0.6005859375); - SetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); func_80273444(20, 0, 0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); UseCamPreset(3); MoveBattleCamOver(20); InitTargetIterator(); 0: - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); if (SI_VAR(0) == 6) { goto 1; } - GetItemPower(ItemId_P_O_W_BLOCK, SI_VAR(3), SI_VAR(4)); + GetItemPower(ITEM_P_O_W_BLOCK, SI_VAR(3), SI_VAR(4)); ApplyShrinkFromOwner(SI_VAR(3)); func_80269EAC(22); ItemDamageEnemy(SI_VAR(0), 0x38000400, 0, SI_VAR(3), 32); diff --git a/src/battle/item/repel_gel/lib.c b/src/battle/item/repel_gel/lib.c index 6e16fe5e4e..55eb2dfc1a 100644 --- a/src/battle/item/repel_gel/lib.c +++ b/src/battle/item/repel_gel/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A19C0); } @@ -59,7 +59,7 @@ ApiStatus N(func_802A123C_72DDAC)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; ActorPart* part = player->partsTable; - inflict_status(player, Debuff_0xE, script->varTable[0]); + inflict_status(player, STATUS_E, script->varTable[0]); player->status = 0; part->flags |= 0x100; @@ -71,12 +71,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -95,9 +95,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -121,8 +121,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -137,34 +137,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/repel_gel/repel_gel.c b/src/battle/item/repel_gel/repel_gel.c index df319e7d8a..cc46722671 100644 --- a/src/battle/item/repel_gel/repel_gel.c +++ b/src/battle/item/repel_gel/repel_gel.c @@ -1,17 +1,17 @@ #include "repel_gel.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_REPEL_GEL; + SI_VAR(10) = c ITEM_REPEL_GEL; await N(UseItemWithEffect); - PlaySoundAtActor(ActorID_PLAYER, SoundId_375); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_30008); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_375); + SetAnimation(ACTOR_PLAYER, 0, ANIM_30008); sleep 45; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); - PlaySoundAtActor(ActorID_PLAYER, SoundId_376); - GetItemPower(ItemId_REPEL_GEL, SI_VAR(0), SI_VAR(1)); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_376); + GetItemPower(ITEM_REPEL_GEL, SI_VAR(0), SI_VAR(1)); N(func_802A123C_72DDAC)(); sleep 20; ShowMessageBox(17, 60); diff --git a/src/battle/item/shooting_star/lib.c b/src/battle/item/shooting_star/lib.c index bb21bc4d72..7ab60e16fd 100644 --- a/src/battle/item/shooting_star/lib.c +++ b/src/battle/item/shooting_star/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1EE0); } @@ -150,12 +150,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -174,9 +174,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -200,8 +200,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -216,34 +216,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/shooting_star/shooting_star.c b/src/battle/item/shooting_star/shooting_star.c index 979d5d93ce..9cd7f8345b 100644 --- a/src/battle/item/shooting_star/shooting_star.c +++ b/src/battle/item/shooting_star/shooting_star.c @@ -1,7 +1,7 @@ #include "shooting_star.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_SHOOTING_STAR; + SI_VAR(10) = c ITEM_SHOOTING_STAR; await N(UseItemWithEffect); spawn { sleep 5; @@ -12,11 +12,11 @@ Script N(main) = SCRIPT({ spawn { SI_VAR(0) = 0; loop 10 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_259); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_259); N(func_802A123C_71D9AC)(); SI_VAR(0) += 1; sleep 5; - PlaySoundAtActor(ActorID_PLAYER, SoundId_25A); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_25A); N(func_802A123C_71D9AC)(); SI_VAR(0) += 1; sleep 5; @@ -26,10 +26,10 @@ Script N(main) = SCRIPT({ SI_VAR(0) = 0; sleep 50; loop 10 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_25C); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_25C); SI_VAR(0) += 1; sleep 5; - PlaySoundAtActor(ActorID_PLAYER, SoundId_25D); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_25D); SI_VAR(0) += 1; sleep 5; } @@ -46,14 +46,14 @@ Script N(main) = SCRIPT({ MoveBattleCamOver(20); InitTargetIterator(); 0: - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); if (SI_VAR(0) == 6) { goto 1; } - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ItemId_SHOOTING_STAR, SI_VAR(0), SI_VAR(1)); + GetItemPower(ITEM_SHOOTING_STAR, SI_VAR(0), SI_VAR(1)); ItemDamageEnemy(SI_VAR(0), 0x38000100, 0, SI_VAR(0), 32); 1: sleep 10; diff --git a/src/battle/item/sleepy_sheep/lib.c b/src/battle/item/sleepy_sheep/lib.c index eee5625d0d..4cd291fcce 100644 --- a/src/battle/item/sleepy_sheep/lib.c +++ b/src/battle/item/sleepy_sheep/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A3F50); } @@ -278,12 +278,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -302,9 +302,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -328,8 +328,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -344,34 +344,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/sleepy_sheep/sleepy_sheep.c b/src/battle/item/sleepy_sheep/sleepy_sheep.c index 5fb45178f2..207266d7a3 100644 --- a/src/battle/item/sleepy_sheep/sleepy_sheep.c +++ b/src/battle/item/sleepy_sheep/sleepy_sheep.c @@ -101,7 +101,7 @@ s32 N(modelCommandList)[] = { }; Script N(main) = SCRIPT({ - SI_VAR(10) =c ItemId_SLEEPY_SHEEP; + SI_VAR(10) =c ITEM_SLEEPY_SHEEP; await N(UseItemWithEffect); UseCamPreset(19); SetBattleCamTarget(0xFFFFFFBD, 0xFFFFFFF1, 0xFFFFFFFB); @@ -109,7 +109,7 @@ Script N(main) = SCRIPT({ SetBattleCamZoom(169); MoveBattleCamOver(50); spawn { - PlaySoundAtActor(ActorID_PLAYER, SoundId_364); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_364); loop 7 { StartRumble(2); ShakeCam(1, 0, 2, 0.5); @@ -130,22 +130,22 @@ Script N(main) = SCRIPT({ } } sleep 20; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 32; ShowEmote(0, 2, 0xFFFFFFD3, 20, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); sleep 30; - SetActorYaw(ActorID_PLAYER, 30); + SetActorYaw(ACTOR_PLAYER, 30); sleep 1; - SetActorYaw(ActorID_PLAYER, 60); + SetActorYaw(ACTOR_PLAYER, 60); sleep 1; - SetActorYaw(ActorID_PLAYER, 90); + SetActorYaw(ACTOR_PLAYER, 90); sleep 1; - SetActorYaw(ActorID_PLAYER, 120); + SetActorYaw(ACTOR_PLAYER, 120); sleep 1; - SetActorYaw(ActorID_PLAYER, 150); + SetActorYaw(ACTOR_PLAYER, 150); sleep 1; - SetActorYaw(ActorID_PLAYER, 180); + SetActorYaw(ACTOR_PLAYER, 180); spawn { N(func_802A123C_71E88C)(); } @@ -158,24 +158,24 @@ Script N(main) = SCRIPT({ UseCamPreset(2); MoveBattleCamOver(20); sleep 8; - SetJumpAnimations(ActorID_PLAYER, 0, PlayerAnim_1002B, PlayerAnim_1002B, PlayerAnim_MIDAIR); - SetActorJumpGravity(ActorID_PLAYER, 1.80078125); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); func_80273444(15, 0, 0); spawn { sleep 5; - SetActorYaw(ActorID_PLAYER, 150); + SetActorYaw(ACTOR_PLAYER, 150); sleep 1; - SetActorYaw(ActorID_PLAYER, 120); + SetActorYaw(ACTOR_PLAYER, 120); sleep 1; - SetActorYaw(ActorID_PLAYER, 90); + SetActorYaw(ACTOR_PLAYER, 90); sleep 1; - SetActorYaw(ActorID_PLAYER, 60); + SetActorYaw(ACTOR_PLAYER, 60); sleep 1; - SetActorYaw(ActorID_PLAYER, 30); + SetActorYaw(ACTOR_PLAYER, 30); sleep 1; - SetActorYaw(ActorID_PLAYER, 0); + SetActorYaw(ACTOR_PLAYER, 0); } sleep 40; func_802D3474(SI_VAR(10), N(modelCommandList)); @@ -187,31 +187,31 @@ Script N(main) = SCRIPT({ func_802D3998(SI_VAR(10), 7.0); func_802D39FC(SI_VAR(10), 1.400390625); SetOwnerTarget(0, 0); - SetGoalToTarget(ActorID_PLAYER); - GetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalToTarget(ACTOR_PLAYER); + GetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) -= 60; func_802D3A60(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); - GetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); - PlaySoundAtActor(ActorID_PLAYER, SoundId_HIT_BLOCK); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_HIT_BLOCK); spawn { - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_SHOCK_STILL); - SetActorScale(ActorID_PLAYER, 1.2001953125, 0.900390625, 1.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_SHOCK_STILL); + SetActorScale(ACTOR_PLAYER, 1.2001953125, 0.900390625, 1.0); sleep 1; - SetActorScale(ActorID_PLAYER, 1.30078125, 0.80078125, 1.0); + SetActorScale(ACTOR_PLAYER, 1.30078125, 0.80078125, 1.0); sleep 3; - SetActorScale(ActorID_PLAYER, 1.2001953125, 0.900390625, 1.0); + SetActorScale(ACTOR_PLAYER, 1.2001953125, 0.900390625, 1.0); sleep 1; - SetActorScale(ActorID_PLAYER, 1.0, 1.0, 1.0); + 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); sleep 2; func_802D39FC(SI_VAR(10), 1.400390625); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 60; func_802D3C58(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); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); SI_VAR(0) += 20; func_802D3C58(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); @@ -220,7 +220,7 @@ Script N(main) = SCRIPT({ PlayEffect(0x6, 2, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); sleep 5; spawn { - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 270; func_802D3A60(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 0); func_802D3624(SI_VAR(10)); @@ -230,12 +230,12 @@ Script N(main) = SCRIPT({ MoveBattleCamOver(20); InitTargetIterator(); 0: - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); if (SI_VAR(0) == 6) { goto 1; } - GetItemPower(ItemId_SLEEPY_SHEEP, SI_VAR(0), SI_VAR(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); 1: diff --git a/src/battle/item/snowman_doll/lib.c b/src/battle/item/snowman_doll/lib.c index 58f164611a..571f4e4904 100644 --- a/src/battle/item/snowman_doll/lib.c +++ b/src/battle/item/snowman_doll/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1EB0); } @@ -89,12 +89,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -113,9 +113,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -139,8 +139,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -155,34 +155,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/snowman_doll/snowman_doll.c b/src/battle/item/snowman_doll/snowman_doll.c index 6275ec4471..b87be7d3f2 100644 --- a/src/battle/item/snowman_doll/snowman_doll.c +++ b/src/battle/item/snowman_doll/snowman_doll.c @@ -1,10 +1,10 @@ #include "snowman_doll.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_SNOWMAN_DOLL; + SI_VAR(10) = c ITEM_SNOWMAN_DOLL; await N(UseItemWithEffect); N(FadeBackgroundToBlack)(); - PlaySoundAtActor(ActorID_PLAYER, SoundId_363); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_363); spawn { loop 45 { RandInt(300, SI_VAR(0)); @@ -23,19 +23,19 @@ Script N(main) = SCRIPT({ PlayEffect(0x60, 0, 0, 0, 20, 1.0, 160, 0, 0, 0, 0, 0, 0, 0); spawn { sleep 17; - PlaySoundAtActor(ActorID_PLAYER, SoundId_202E); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_202E); StartRumble(9); ShakeCam(1, 0, 5, 1.0); sleep 46; - PlaySoundAtActor(ActorID_PLAYER, SoundId_202E); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_202E); StartRumble(9); ShakeCam(1, 0, 5, 1.0); sleep 25; - PlaySoundAtActor(ActorID_PLAYER, SoundId_202E); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_202E); StartRumble(9); ShakeCam(1, 0, 5, 1.0); sleep 25; - PlaySoundAtActor(ActorID_PLAYER, SoundId_202E); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_202E); StartRumble(9); ShakeCam(1, 0, 5, 1.0); } @@ -47,14 +47,14 @@ Script N(main) = SCRIPT({ sleep 110; InitTargetIterator(); 0: - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); if (SI_VAR(0) == 6) { goto 1; } - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ItemId_SNOWMAN_DOLL, SI_VAR(0), SI_VAR(1)); + GetItemPower(ITEM_SNOWMAN_DOLL, SI_VAR(0), SI_VAR(1)); ItemDamageEnemy(SI_VAR(0), 0x38000008, 0, SI_VAR(0), 32); sleep 5; 1: @@ -62,7 +62,7 @@ Script N(main) = SCRIPT({ if (SI_VAR(0) != -1) { goto 0; } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 30; N(func_802A13B8_71C1E8)(); await N(PlayerGoHome); diff --git a/src/battle/item/stone_cap/lib.c b/src/battle/item/stone_cap/lib.c index f9b6e8516f..52c319d13f 100644 --- a/src/battle/item/stone_cap/lib.c +++ b/src/battle/item/stone_cap/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1A60); } @@ -65,7 +65,7 @@ ApiStatus N(func_802A123C_7217DC)(ScriptInstance* script, s32 isInitialCall) { switch (script->functionTemp[0].s) { case 0: - inflict_status(player, Debuff_STONE, script->varTable[0]); + inflict_status(player, STATUS_STONE, script->varTable[0]); player->status = 0; script->functionTemp[1].s = 3; script->functionTemp[0].s = 1; @@ -101,12 +101,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -125,9 +125,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -151,8 +151,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -167,34 +167,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/stone_cap/stone_cap.c b/src/battle/item/stone_cap/stone_cap.c index 641ac3a126..addeea8643 100644 --- a/src/battle/item/stone_cap/stone_cap.c +++ b/src/battle/item/stone_cap/stone_cap.c @@ -1,15 +1,15 @@ #include "stone_cap.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_STONE_CAP; + SI_VAR(10) = c ITEM_STONE_CAP; await N(UseItemWithEffect); - PlaySound(SoundId_361); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_30009); + PlaySound(SOUND_UNKNOWN_361); + SetAnimation(ACTOR_PLAYER, 0, ANIM_30009); sleep 30; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_CROUCH); - GetItemPower(ItemId_STONE_CAP, SI_VAR(0), SI_VAR(1)); - PlaySound(SoundId_362); + SetAnimation(ACTOR_PLAYER, 0, ANIM_CROUCH); + GetItemPower(ITEM_STONE_CAP, SI_VAR(0), SI_VAR(1)); + PlaySound(SOUND_UNKNOWN_362); N(func_802A123C_7217DC)(); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); sleep 20; }); diff --git a/src/battle/item/stop_watch/lib.c b/src/battle/item/stop_watch/lib.c index 9fb21ac274..f5db43f329 100644 --- a/src/battle/item/stop_watch/lib.c +++ b/src/battle/item/stop_watch/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1B40); } @@ -77,12 +77,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -101,9 +101,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -127,8 +127,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -143,34 +143,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/stop_watch/stop_watch.c b/src/battle/item/stop_watch/stop_watch.c index 7e2e596978..aafd0c0fe3 100644 --- a/src/battle/item/stop_watch/stop_watch.c +++ b/src/battle/item/stop_watch/stop_watch.c @@ -1,7 +1,7 @@ #include "stop_watch.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_STOP_WATCH; + SI_VAR(10) = c ITEM_STOP_WATCH; await N(UseItemWithEffect); spawn { sleep 5; @@ -10,18 +10,18 @@ Script N(main) = SCRIPT({ } N(FadeBackgroundToBlack)(); PlayEffect(0x62, 0, 0, 0, 0, 1.0, 200, 0, 0, 0, 0, 0, 0, 0); - PlaySoundAtActor(ActorID_PLAYER, SoundId_246); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_246); sleep 200; UseCamPreset(3); MoveBattleCamOver(20); InitTargetIterator(); 0: - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); if (SI_VAR(0) == 6) { goto 1; } - GetItemPower(ItemId_STOP_WATCH, SI_VAR(0), SI_VAR(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); 1: diff --git a/src/battle/item/strange_cake/lib.c b/src/battle/item/strange_cake/lib.c index 45bd434a0a..29c3eaf933 100644 --- a/src/battle/item/strange_cake/lib.c +++ b/src/battle/item/strange_cake/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A2DD0); } @@ -280,7 +280,7 @@ ApiStatus N(func_802A18D8_731BD8)(ScriptInstance* script, s32 isInitialCall) { #include "common/AddFP.inc.c" ApiStatus N(func_802A1A40_731D40)(ScriptInstance* script, s32 isInitialCall) { - StaticItem* item = &gItemTable[ItemId_KOOKY_COOKIE]; + StaticItem* item = &gItemTable[ITEM_KOOKY_COOKIE]; PlayerData* playerData = &gPlayerData; playerData->curHP += item->potencyA; @@ -294,7 +294,7 @@ ApiStatus N(func_802A1A40_731D40)(ScriptInstance* script, s32 isInitialCall) { } ApiStatus N(func_802A1A8C_731D8C)(ScriptInstance* script, s32 isInitialCall) { - StaticItem* item = &gItemTable[ItemId_KOOKY_COOKIE]; + StaticItem* item = &gItemTable[ITEM_KOOKY_COOKIE]; PlayerData* playerData = &gPlayerData; playerData->curFP += item->potencyB; @@ -311,7 +311,7 @@ ApiStatus N(func_802A1AD8_731DD8)(ScriptInstance* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; - inflict_status(player, Debuff_STATIC, 3); + inflict_status(player, STATUS_STATIC, 3); player->status = 0; return ApiStatus_DONE2; @@ -322,7 +322,7 @@ ApiStatus N(func_802A1B14_731E14)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; ActorPart* part = player->partsTable; - inflict_status(player, Debuff_0xE, 3); + inflict_status(player, STATUS_E, 3); player->status = 0; part->flags |= 0x100; @@ -333,7 +333,7 @@ ApiStatus N(func_802A1B68_731E68)(ScriptInstance* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; - inflict_status(player, Debuff_SLEEP, 3); + inflict_status(player, STATUS_SLEEP, 3); player->status = 0; return ApiStatus_DONE2; @@ -344,12 +344,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -368,9 +368,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -394,8 +394,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -410,34 +410,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/strange_cake/strange_cake.c b/src/battle/item/strange_cake/strange_cake.c index 91a2def687..e365b7da5b 100644 --- a/src/battle/item/strange_cake/strange_cake.c +++ b/src/battle/item/strange_cake/strange_cake.c @@ -25,40 +25,40 @@ s32 N(D_802A2858_732B58)[] = { Script N(script6) = SCRIPT({ GetMenuSelection(SI_VAR(0), SI_VAR(1), SI_VAR(2)); if (SI_VAR(1) == 211) { - SI_VAR(10) = c ItemId_KOOKY_COOKIE; + SI_VAR(10) = c ITEM_KOOKY_COOKIE; SI_VAR(1) = 0; await N(UseItemWithEffect); await N(EatItem); N(func_802A1A8C_731D8C)(); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); } else { - SI_VAR(10) = c ItemId_STRANGE_CAKE; + SI_VAR(10) = c ITEM_STRANGE_CAKE; SI_VAR(1) = 0; await N(UseItemWithEffect); await N(EatItem); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); } sleep 10; spawn { sleep 220; - PlaySoundAtActor(ActorID_PLAYER, SoundId_3F3); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_3F3); } - PlaySoundAtActor(ActorID_PLAYER, SoundId_368); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_368); N(func_802A13E4_7316E4)(); sleep 2; match SI_VAR(0) { @@ -76,8 +76,8 @@ Script N(script6) = SCRIPT({ }); Script N(script7) = SCRIPT({ - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); N(func_802A1AD8_731DD8)(); @@ -87,8 +87,8 @@ Script N(script7) = SCRIPT({ }); Script N(script8) = SCRIPT({ - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); N(func_802A1B14_731E14)(); @@ -98,9 +98,9 @@ Script N(script8) = SCRIPT({ }); Script N(script9) = SCRIPT({ - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_30004); - SetGoalToTarget(ActorID_PLAYER); - GetGoalPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetAnimation(ACTOR_PLAYER, 0, ANIM_30004); + SetGoalToTarget(ACTOR_PLAYER); + GetGoalPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); spawn DoSleepHit; N(func_802A1B68_731E68)(); sleep 20; diff --git a/src/battle/item/super_soda/lib.c b/src/battle/item/super_soda/lib.c index d363f282b4..06cac14836 100644 --- a/src/battle/item/super_soda/lib.c +++ b/src/battle/item/super_soda/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A2280); } @@ -97,7 +97,7 @@ ApiStatus N(func_802A1378_725058)(ScriptInstance* script, s32 isInitialCall) { Actor* actor = get_actor(actorId); s32 id = actor->actorID & 0x700; - if (actor->debuff != Debuff_END) { + if (actor->debuff != STATUS_END) { actor->debuffDuration = 0; actor->debuff = 0; func_80047898(actor->unk_436); @@ -137,12 +137,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -161,9 +161,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -187,8 +187,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -203,34 +203,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/super_soda/super_soda.c b/src/battle/item/super_soda/super_soda.c index 7174b3a659..d7df433246 100644 --- a/src/battle/item/super_soda/super_soda.c +++ b/src/battle/item/super_soda/super_soda.c @@ -1,35 +1,35 @@ #include "super_soda.h" Script N(script6) = SCRIPT({ - SetActorYaw(ActorID_PLAYER, 30); + SetActorYaw(ACTOR_PLAYER, 30); sleep 1; - SetActorYaw(ActorID_PLAYER, 60); + SetActorYaw(ACTOR_PLAYER, 60); sleep 1; - SetActorYaw(ActorID_PLAYER, 90); + SetActorYaw(ACTOR_PLAYER, 90); sleep 1; - SetActorYaw(ActorID_PLAYER, 120); + SetActorYaw(ACTOR_PLAYER, 120); sleep 1; - SetActorYaw(ActorID_PLAYER, 150); + SetActorYaw(ACTOR_PLAYER, 150); sleep 1; - SetActorYaw(ActorID_PLAYER, 180); + SetActorYaw(ACTOR_PLAYER, 180); sleep 10; SI_VAR(1) = SI_VAR(15); await N(UseItem); SI_VAR(14) = SI_VAR(10); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THROW); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); spawn { sleep 20; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); } func_802D3474(SI_VAR(10), 0x80283EE8); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) += 0; SI_VAR(1) += 30; SI_VAR(2) += 5; func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); func_802D3F74(SI_VAR(10), 32); spawn { - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); @@ -41,8 +41,8 @@ Script N(script6) = SCRIPT({ RemoveItemEntity(SI_VAR(14)); } InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); - GetGoalPos(ActorID_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + SetGoalToTarget(ACTOR_SELF); + GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetBattleCamTarget(0xFFFFFF83, 1, 0); SetBattleCamOffsetZ(41); SetBattleCamZoom(248); @@ -52,57 +52,57 @@ Script N(script6) = SCRIPT({ func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); AddBattleCamZoom(100); MoveBattleCamOver(30); - GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); } sleep 30; - GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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)); sleep 20; - SetActorYaw(ActorID_PLAYER, 150); + SetActorYaw(ACTOR_PLAYER, 150); sleep 1; - SetActorYaw(ActorID_PLAYER, 120); + SetActorYaw(ACTOR_PLAYER, 120); sleep 1; - SetActorYaw(ActorID_PLAYER, 90); + SetActorYaw(ACTOR_PLAYER, 90); sleep 1; - SetActorYaw(ActorID_PLAYER, 60); + SetActorYaw(ACTOR_PLAYER, 60); sleep 1; - SetActorYaw(ActorID_PLAYER, 30); + SetActorYaw(ACTOR_PLAYER, 30); sleep 1; - SetActorYaw(ActorID_PLAYER, 0); + SetActorYaw(ACTOR_PLAYER, 0); sleep 10; }); Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_SUPER_SODA; + SI_VAR(10) = c ITEM_SUPER_SODA; await N(UseItemWithEffect); InitTargetIterator(); GetOwnerTarget(SI_VAR(0), SI_VAR(1)); - if (SI_VAR(0) == ActorID_PLAYER) { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + if (SI_VAR(0) == ACTOR_PLAYER) { + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); N(AddFP)(5); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 20; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); InitTargetIterator(); GetOwnerTarget(SI_VAR(0), SI_VAR(1)); - N(func_802A1378_725058)(ActorID_PLAYER); + N(func_802A1378_725058)(ACTOR_PLAYER); sleep 20; } else { SI_VAR(11) = 0; diff --git a/src/battle/item/tasty_tonic/lib.c b/src/battle/item/tasty_tonic/lib.c index 266b6b4c0d..dcadc5e0bb 100644 --- a/src/battle/item/tasty_tonic/lib.c +++ b/src/battle/item/tasty_tonic/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1B40); } @@ -59,7 +59,7 @@ ApiStatus N(func_802A123C_72223C)(ScriptInstance* script, s32 isInitialCall) { Actor* actor = get_actor(actorId); s32 id = actor->actorID & 0x700; - if (actor->debuff != Debuff_END) { + if (actor->debuff != STATUS_END) { actor->debuffDuration = 0; actor->debuff = 0; func_80047898(actor->unk_436); @@ -84,12 +84,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -108,9 +108,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -134,8 +134,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -150,34 +150,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/tasty_tonic/tasty_tonic.c b/src/battle/item/tasty_tonic/tasty_tonic.c index e79ca5497a..26c7af67b7 100644 --- a/src/battle/item/tasty_tonic/tasty_tonic.c +++ b/src/battle/item/tasty_tonic/tasty_tonic.c @@ -1,38 +1,38 @@ #include "tasty_tonic.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_TASTY_TONIC; + SI_VAR(10) = c ITEM_TASTY_TONIC; await N(UseItemWithEffect); InitTargetIterator(); GetOwnerTarget(SI_VAR(0), SI_VAR(1)); if (SI_VAR(0) == 0) { await N(DrinkItem); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 20; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); - N(func_802A123C_72223C)(ActorID_PLAYER); + N(func_802A123C_72223C)(ACTOR_PLAYER); sleep 20; } else { - GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 20; sleep 30; - GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); - N(func_802A123C_72223C)(ActorID_PARTNER); + N(func_802A123C_72223C)(ACTOR_PARTNER); sleep 20; } await N(PlayerGoHome); diff --git a/src/battle/item/thunder_bolt/lib.c b/src/battle/item/thunder_bolt/lib.c index c8dd5e5a84..75567051dd 100644 --- a/src/battle/item/thunder_bolt/lib.c +++ b/src/battle/item/thunder_bolt/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1C40); } @@ -105,12 +105,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -129,9 +129,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -155,8 +155,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -171,34 +171,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/thunder_bolt/thunder_bolt.c b/src/battle/item/thunder_bolt/thunder_bolt.c index e45d0ef2c4..2429d2ff18 100644 --- a/src/battle/item/thunder_bolt/thunder_bolt.c +++ b/src/battle/item/thunder_bolt/thunder_bolt.c @@ -1,7 +1,7 @@ #include "thunder_bolt.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_THUNDER_BOLT; + SI_VAR(10) = c ITEM_THUNDER_BOLT; await N(UseItemWithEffect); spawn { sleep 5; @@ -9,10 +9,10 @@ Script N(main) = SCRIPT({ MoveBattleCamOver(20); } N(FadeBackgroundToBlack)(); - PlaySound(SoundId_365); + PlaySound(SOUND_UNKNOWN_365); sleep 10; InitTargetIterator(); - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); if (SI_VAR(0) == 6) { goto 1; @@ -21,13 +21,13 @@ Script N(main) = SCRIPT({ sleep 5; StartRumble(10); ShakeCam(1, 0, 5, 1.0); - GetItemPower(ItemId_THUNDER_RAGE, SI_VAR(0), SI_VAR(1)); + GetItemPower(ITEM_THUNDER_RAGE, SI_VAR(0), SI_VAR(1)); ItemDamageEnemy(SI_VAR(0), 0x38000020, 0, SI_VAR(0), 32); 1: sleep 5; UseCamPreset(3); MoveBattleCamOver(20); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 30; N(func_802A1420_722F60)(); await N(PlayerGoHome); diff --git a/src/battle/item/thunder_rage/lib.c b/src/battle/item/thunder_rage/lib.c index e26a4f2aa5..f9b2cedf5f 100644 --- a/src/battle/item/thunder_rage/lib.c +++ b/src/battle/item/thunder_rage/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1C90); } @@ -105,12 +105,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -129,9 +129,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -155,8 +155,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -171,34 +171,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/thunder_rage/thunder_rage.c b/src/battle/item/thunder_rage/thunder_rage.c index 38596d4038..014b30dfcd 100644 --- a/src/battle/item/thunder_rage/thunder_rage.c +++ b/src/battle/item/thunder_rage/thunder_rage.c @@ -1,7 +1,7 @@ #include "thunder_rage.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_THUNDER_RAGE; + SI_VAR(10) = c ITEM_THUNDER_RAGE; await N(UseItemWithEffect); parallel { sleep 5; @@ -9,11 +9,11 @@ Script N(main) = SCRIPT({ MoveBattleCamOver(20); } N(FadeBackgroundToBlack)(); - PlaySound(SoundId_365); + PlaySound(SOUND_UNKNOWN_365); sleep 10; InitTargetIterator(); 0: - SetGoalToTarget(ActorID_SELF); + SetGoalToTarget(ACTOR_SELF); ItemCheckHit(SI_VAR(0), 0x10000000, 0, SI_VAR(0), 0); if (SI_VAR(0) == 6) { goto 1; @@ -22,8 +22,8 @@ Script N(main) = SCRIPT({ sleep 5; StartRumble(10); ShakeCam(1, 0, 5, 1.0); - SetGoalToTarget(ActorID_SELF); - GetItemPower(ItemId_THUNDER_RAGE, SI_VAR(0), SI_VAR(1)); + SetGoalToTarget(ACTOR_SELF); + GetItemPower(ITEM_THUNDER_RAGE, SI_VAR(0), SI_VAR(1)); ItemDamageEnemy(SI_VAR(0), 0x38000020, 0, SI_VAR(0), 32); 1: sleep 5; @@ -33,7 +33,7 @@ Script N(main) = SCRIPT({ } UseCamPreset(3); MoveBattleCamOver(20); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 30; N(func_802A12D4_71B474)(); await N(PlayerGoHome); diff --git a/src/battle/item/ultra_shroom/lib.c b/src/battle/item/ultra_shroom/lib.c index bd3611843e..59b8f6a346 100644 --- a/src/battle/item/ultra_shroom/lib.c +++ b/src/battle/item/ultra_shroom/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1AC0); } @@ -80,12 +80,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -104,9 +104,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -130,8 +130,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -146,34 +146,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/ultra_shroom/ultra_shroom.c b/src/battle/item/ultra_shroom/ultra_shroom.c index 0432f86950..a1d725bab6 100644 --- a/src/battle/item/ultra_shroom/ultra_shroom.c +++ b/src/battle/item/ultra_shroom/ultra_shroom.c @@ -1,27 +1,27 @@ #include "ultra_shroom.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_SUPER_SHROOM; + SI_VAR(10) = c ITEM_SUPER_SHROOM; await N(UseItemWithEffect); AddBattleCamZoom(50); MoveBattleCamOver(20); await N(EatItem); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); N(func_802A12FC_723A7C)(); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); }); diff --git a/src/battle/item/unknown_item/lib.c b/src/battle/item/unknown_item/lib.c index 11c449b59f..8d81e2bfc7 100644 --- a/src/battle/item/unknown_item/lib.c +++ b/src/battle/item/unknown_item/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A1AA0); } @@ -80,12 +80,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -104,9 +104,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -130,8 +130,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -146,34 +146,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/unknown_item/unknown_item.c b/src/battle/item/unknown_item/unknown_item.c index f6d7576ac5..99a193f461 100644 --- a/src/battle/item/unknown_item/unknown_item.c +++ b/src/battle/item/unknown_item/unknown_item.c @@ -1,25 +1,25 @@ #include "unknown_item.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_ULTRA_SHROOM; + SI_VAR(10) = c ITEM_ULTRA_SHROOM; await N(UseItemWithEffect); await N(EatItem); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); N(func_802A12FC_72453C)(); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_THUMBS_UP); + SetAnimation(ACTOR_PLAYER, 0, ANIM_THUMBS_UP); sleep 30; - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); sleep 20; await N(PlayerGoHome); }); diff --git a/src/battle/item/volt_shroom/lib.c b/src/battle/item/volt_shroom/lib.c index a655ab2900..00c5a9f361 100644 --- a/src/battle/item/volt_shroom/lib.c +++ b/src/battle/item/volt_shroom/lib.c @@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { f32 posX, posY, posZ; posY = player->currentPos.y + player->size.y; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { s32 i; s32 iconPosX, iconPosY, iconPosZ; @@ -22,7 +22,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) { posX = player->currentPos.x; posZ = player->currentPos.z; - make_item_entity(ItemId_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); + make_item_entity(ITEM_COIN, posX, posY, posZ, 0x17, (i * 3) + 1, facingAngleSign, 0); add_coins(1); facingAngleSign += 30.0f; } @@ -47,7 +47,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { Actor* player = battleStatus->playerActor; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; - if (heroes_is_ability_active(player, Ability_REFUND) && sellValue > 0) { + if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { free_icon(D_802A19B0); } @@ -58,7 +58,7 @@ ApiStatus N(func_802A123C_71AA2C)(ScriptInstance* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; - inflict_status(player, Debuff_STATIC, script->varTable[0]); + inflict_status(player, STATUS_STATIC, script->varTable[0]); player->status = 0; return ApiStatus_DONE2; } @@ -68,12 +68,12 @@ Script N(UseItemWithEffect) = SCRIPT({ UseCamPreset(69); sleep 10; - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); $x += 18; - SetActorSpeed(ActorID_PLAYER, 4.0); - SetGoalPos(ActorID_PLAYER, $x, $y, $z); + SetActorSpeed(ACTOR_PLAYER, 4.0); + SetGoalPos(ACTOR_PLAYER, $x, $y, $z); PlayerRunToGoal(0); $y += 45; @@ -92,9 +92,9 @@ Script N(UseItemWithEffect) = SCRIPT({ N(GiveRefundCleanup)(); RemoveItemEntity(SI_VAR(10)); } else { - GetActorPos(ActorID_PLAYER, $x, $y, $z); - PlaySoundAtActor(ActorID_PLAYER, SoundId_208D); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); + GetActorPos(ACTOR_PLAYER, $x, $y, $z); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); + SetAnimation(ACTOR_PLAYER, 0, ANIM_GOT_ITEM); sleep 4; $y += 45; @@ -118,8 +118,8 @@ Script N(UseItem) = SCRIPT({ MoveBattleCamOver(30); sleep 10; - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_GOT_ITEM); - GetActorPos(ActorID_PLAYER, $x, $y, $z); + 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; @@ -134,34 +134,34 @@ Script N(UseItem) = SCRIPT({ }); Script N(PlayerGoHome) = SCRIPT({ - UseIdleAnimation(ActorID_PLAYER, 0); - SetGoalToHome(ActorID_PLAYER); - SetActorSpeed(ActorID_PLAYER, 8.0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_RUNNING); + UseIdleAnimation(ACTOR_PLAYER, 0); + SetGoalToHome(ACTOR_PLAYER); + SetActorSpeed(ACTOR_PLAYER, 8.0); + SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); PlayerRunToGoal(0); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - UseIdleAnimation(ActorID_PLAYER, 1); + SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); + UseIdleAnimation(ACTOR_PLAYER, 1); }); Script N(EatItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_EAT); + SetAnimation(ACTOR_PLAYER, 0, ANIM_EAT); sleep 45; }); Script N(DrinkItem) = SCRIPT({ spawn { loop 4 { - PlaySoundAtActor(ActorID_PLAYER, SoundId_2095); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_2095); sleep 10; } } - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_DRINK); + SetAnimation(ACTOR_PLAYER, 0, ANIM_DRINK); sleep 45; }); diff --git a/src/battle/item/volt_shroom/volt_shroom.c b/src/battle/item/volt_shroom/volt_shroom.c index b7ce5c41a4..0c19a565cf 100644 --- a/src/battle/item/volt_shroom/volt_shroom.c +++ b/src/battle/item/volt_shroom/volt_shroom.c @@ -1,19 +1,19 @@ #include "volt_shroom.h" Script N(main) = SCRIPT({ - SI_VAR(10) = c ItemId_VOLT_SHROOM; + SI_VAR(10) = c ITEM_VOLT_SHROOM; await N(UseItemWithEffect); await N(EatItem); - SetAnimation(ActorID_PLAYER, 0, PlayerAnim_2); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + 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); - PlaySound(SoundId_379); - GetItemPower(ItemId_VOLT_SHROOM, SI_VAR(0), SI_VAR(1)); + PlaySound(SOUND_UNKNOWN_379); + GetItemPower(ITEM_VOLT_SHROOM, SI_VAR(0), SI_VAR(1)); N(func_802A123C_71AA2C)(); sleep 20; ShowMessageBox(16, 60); diff --git a/src/battle/move/power_bounce_743DF0.c b/src/battle/move/power_bounce_743DF0.c index d98e2264ba..233c86d558 100644 --- a/src/battle/move/power_bounce_743DF0.c +++ b/src/battle/move/power_bounce_743DF0.c @@ -15,7 +15,7 @@ ApiStatus func_802A10E4_743ED4(ScriptInstance* script, s32 isInitialCall) { script->varTable[0] = 99; powerBounceChance = targetActor->staticActorData->powerBounceChance; - if (is_ability_active(Ability_DODGE_MASTER)) { + if (is_ability_active(ABILITY_DODGE_MASTER)) { powerBounceChance += 7; } diff --git a/src/battle/partner/bow_710EF0.c b/src/battle/partner/bow_710EF0.c index cba46197e0..55b37c1f0f 100644 --- a/src/battle/partner/bow_710EF0.c +++ b/src/battle/partner/bow_710EF0.c @@ -47,12 +47,12 @@ ApiStatus func_802380E4_710FD4(ScriptInstance* script, s32 isInitialCall) { ApiStatus N(IsPartnerImmobile)(ScriptInstance* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* playerActor = battleStatus->playerActor; - s32 isImmobile = playerActor->debuff == Debuff_FEAR - || playerActor->debuff == Debuff_DIZZY - || playerActor->debuff == Debuff_PARALYZE - || playerActor->debuff == Debuff_SLEEP - || playerActor->debuff == Debuff_FROZEN - || playerActor->debuff == Debuff_STOP; + s32 isImmobile = playerActor->debuff == STATUS_FEAR + || playerActor->debuff == STATUS_DIZZY + || playerActor->debuff == STATUS_PARALYZE + || playerActor->debuff == STATUS_SLEEP + || playerActor->debuff == STATUS_FROZEN + || playerActor->debuff == STATUS_STOP; if (playerActor->stoneStatus == 12) { isImmobile = TRUE; diff --git a/src/battle/partner/kooper_6F5E80.c b/src/battle/partner/kooper_6F5E80.c index 7e0552903d..e231e5a08b 100644 --- a/src/battle/partner/kooper_6F5E80.c +++ b/src/battle/partner/kooper_6F5E80.c @@ -52,7 +52,7 @@ ApiStatus N(AverageTargetDizzyChance)(ScriptInstance* script, s32 isInitialCall) for (i = 0; i < partnerActor->targetListLength; i++) { targetActor = get_actor(partnerActor->targetData[i].actorID); targetActorPart = get_actor_part(targetActor, partnerActor->targetData[i].partID); - targetActorDescBaseStatusChance = lookup_status_chance(targetActor->statusTable, Debuff_DIZZY); + targetActorDescBaseStatusChance = lookup_status_chance(targetActor->statusTable, STATUS_DIZZY); if (targetActor->transStatus == 14) { targetActorDescBaseStatusChance = 0; diff --git a/src/battle/partner/watt_703AF0.c b/src/battle/partner/watt_703AF0.c index a2e7aebda0..fd577890f9 100644 --- a/src/battle/partner/watt_703AF0.c +++ b/src/battle/partner/watt_703AF0.c @@ -51,7 +51,7 @@ ApiStatus N(AverageTargetParalyzeChance)(ScriptInstance* script, s32 isInitialCa for (i = 0; i < partnerActor->targetListLength; i++) { targetActor = get_actor(partnerActor->targetData[i].actorID); targetActorPart = get_actor_part(targetActor, partnerActor->targetData[i].partID); - targetActorDescBaseStatusChance = lookup_status_chance(targetActor->statusTable, Debuff_PARALYZE); + targetActorDescBaseStatusChance = lookup_status_chance(targetActor->statusTable, STATUS_PARALYZE); if (targetActor->transStatus == 14) { targetActorDescBaseStatusChance = 0; diff --git a/src/battle/star/focus_789E60.c b/src/battle/star/focus_789E60.c index 53c65ac531..43609eb249 100644 --- a/src/battle/star/focus_789E60.c +++ b/src/battle/star/focus_789E60.c @@ -27,8 +27,8 @@ ApiStatus func_802A1518_78A378(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } - deepFocusSP = is_ability_active(Ability_DEEP_FOCUS) * 64; - superFocusSP = is_ability_active(Ability_SUPER_FOCUS) * 128; + deepFocusSP = is_ability_active(ABILITY_DEEP_FOCUS) * 64; + superFocusSP = is_ability_active(ABILITY_SUPER_FOCUS) * 128; add_SP(deepFocusSP + superFocusSP + 128); diff --git a/src/battle/star/peach_dash_79D8A0.c b/src/battle/star/peach_dash_79D8A0.c index 77b0c26d4e..4f737176d5 100644 --- a/src/battle/star/peach_dash_79D8A0.c +++ b/src/battle/star/peach_dash_79D8A0.c @@ -18,10 +18,10 @@ ApiStatus func_802A1518_79DDB8(ScriptInstance* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; PlayerData* playerData2 = &gPlayerData; - if (is_ability_active(Ability_DEEP_FOCUS)) { + if (is_ability_active(ABILITY_DEEP_FOCUS)) { playerData->specialBarsFilled += 128; } - if (is_ability_active(Ability_SUPER_FOCUS)) { + if (is_ability_active(ABILITY_SUPER_FOCUS)) { playerData->specialBarsFilled += 256; } diff --git a/src/battle/star/refresh_78B600.c b/src/battle/star/refresh_78B600.c index 4e645b1365..f93973ce69 100644 --- a/src/battle/star/refresh_78B600.c +++ b/src/battle/star/refresh_78B600.c @@ -19,7 +19,7 @@ INCLUDE_ASM(s32, "battle/star/refresh_78B600", func_802A1518_78BB18); ApiStatus func_802A17D4_78BDD4(ScriptInstance* script, s32 isInitialCall) { Actor* actor = gBattleStatus.playerActor; - if (actor->debuff != Debuff_END) { + if (actor->debuff != STATUS_END) { actor->debuffDuration = 0; actor->debuff = 0; func_80047898(actor->unk_436); diff --git a/src/code_102C80.c b/src/code_102C80.c index 0a47839e23..0a262f9363 100644 --- a/src/code_102C80.c +++ b/src/code_102C80.c @@ -7,7 +7,7 @@ void func_802E1400(Entity* entity) { struct802E1400* temp = entity->dataBuf; if (entity->unk_06 & 1) { - if ((playerStatus->actionState == ActionState_GROUND_POUND) || (playerStatus->actionState == ActionState_ULTRA_POUND)) { + if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND) || (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) { exec_entity_updatecmd(entity); temp->unk_22 = 8; } @@ -67,8 +67,8 @@ void func_802E1614(Entity* entity) { PlayerStatus* playerStatus = &gPlayerStatus; if (entity->unk_06 & 1) { - if ((playerStatus->actionState == ActionState_GROUND_POUND) - || (playerStatus->actionState == ActionState_ULTRA_POUND)) { + if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND) + || (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) { exec_entity_updatecmd(entity); } } @@ -82,7 +82,7 @@ void func_802E1660(Entity* entity) { func_802E153C(entity); if (entity->unk_06 & 0x40) { - if (playerStatus->actionState == ActionState_HAMMER) { + if (playerStatus->actionState == ACTION_STATE_HAMMER) { if (gPlayerData.hammerLevel < 0) { return; } @@ -97,7 +97,7 @@ void func_802E1660(Entity* entity) { } } - if (playerStatus->actionState == ActionState_SPIN_JUMP) { + if (playerStatus->actionState == ACTION_STATE_SPIN_JUMP) { return; } diff --git a/src/code_109660_len_1270.c b/src/code_109660_len_1270.c index 189453efaa..f6781d54c8 100644 --- a/src/code_109660_len_1270.c +++ b/src/code_109660_len_1270.c @@ -53,8 +53,8 @@ s32 func_802E8858(Entity* entity) { s32 phi_a0 = FALSE; if (entity->unk_06 & 1) { - if ((playerStatus->actionState == ActionState_GROUND_POUND) || (playerStatus->actionState == ActionState_ULTRA_POUND)) { - set_action_state(ActionState_FALLING); + if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND) || (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) { + set_action_state(ACTION_STATE_FALLING); phi_a0 = TRUE; } } diff --git a/src/code_13870_len_6980.c b/src/code_13870_len_6980.c index 2bc0f017d6..b73646a877 100644 --- a/src/code_13870_len_6980.c +++ b/src/code_13870_len_6980.c @@ -84,9 +84,9 @@ void npc_move_heading(Npc* npc, f32 speed, f32 yaw) { npc->pos.z += -speed * cos; } -INCLUDE_ASM(Npc*, "code_13870_len_6980", get_npc_unsafe, NpcId npcId); +INCLUDE_ASM(Npc*, "code_13870_len_6980", get_npc_unsafe, NpcID npcId); -INCLUDE_ASM(Npc*, "code_13870_len_6980", get_npc_safe, NpcId npcId); +INCLUDE_ASM(Npc*, "code_13870_len_6980", get_npc_safe, NpcID npcId); void enable_npc_shadow(Npc* npc) { Shadow* shadow; @@ -326,6 +326,6 @@ INCLUDE_ASM(s32, "code_13870_len_6980", bind_npc_aux); INCLUDE_ASM(s32, "code_13870_len_6980", bind_npc_interact); -INCLUDE_ASM(Enemy*, "code_13870_len_6980", get_enemy, NpcId npcId); +INCLUDE_ASM(Enemy*, "code_13870_len_6980", get_enemy, NpcID npcId); INCLUDE_ASM(s32, "code_13870_len_6980", get_enemy_safe); diff --git a/src/code_16c8e0.c b/src/code_16c8e0.c index 3efa45c8da..8a9660925a 100644 --- a/src/code_16c8e0.c +++ b/src/code_16c8e0.c @@ -16,22 +16,22 @@ void* D_802809FC[] = { s32 D_80280A30 = 0xFF; Script BtlPutPartnerAway = SCRIPT({ - DispatchEvent(ActorID_PARTNER, 62); + DispatchEvent(ACTOR_PARTNER, 62); parallel { SI_VAR(0) = 1.0; loop 10 { - SetActorScale(ActorID_PARTNER, SI_VAR(0), SI_VAR(0), 1.0); + SetActorScale(ACTOR_PARTNER, SI_VAR(0), SI_VAR(0), 1.0); SI_VAR(0) -= 0.1005859375; sleep 1; } } EnablePartnerBlur(); - PlaySoundAtActor(ActorID_PLAYER, SoundId_E); - GetActorPos(ActorID_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_E); + GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(1) += 25; - SetActorJumpGravity(ActorID_PARTNER, 1.0); - SetGoalPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - JumpToGoal(ActorID_PARTNER, 10, 0, 0, 1); + SetActorJumpGravity(ACTOR_PARTNER, 1.0); + SetGoalPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + JumpToGoal(ACTOR_PARTNER, 10, 0, 0, 1); DisablePartnerBlur(); }); @@ -39,22 +39,22 @@ Script BtlBringPartnerOut = SCRIPT({ parallel { SI_VAR(0) = 0.1005859375; loop 20 { - SetActorScale(ActorID_PARTNER, SI_VAR(0), SI_VAR(0), 1.0); + SetActorScale(ACTOR_PARTNER, SI_VAR(0), SI_VAR(0), 1.0); SI_VAR(0) += 0.05078125; sleep 1; } - SetActorScale(ActorID_PARTNER, 1.0, 1.0, 1.0); + SetActorScale(ACTOR_PARTNER, 1.0, 1.0, 1.0); } - PlaySoundAtActor(ActorID_PLAYER, SoundId_D); + PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_D); GetGoalPos(256, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetActorJumpGravity(ActorID_PARTNER, 1.0); + SetActorJumpGravity(ACTOR_PARTNER, 1.0); if (SI_VAR(1) == 0) { - JumpToGoal(ActorID_PARTNER, 20, 0, 0, 1); + JumpToGoal(ACTOR_PARTNER, 20, 0, 0, 1); } else { - JumpToGoal(ActorID_PARTNER, 20, 0, 0, 1); + JumpToGoal(ACTOR_PARTNER, 20, 0, 0, 1); } - GetActorPos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - ForceHomePos(ActorID_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); + ForceHomePos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); }); s8 D_80280CE0[] = { 0, 0, 0, 0 }; @@ -120,16 +120,16 @@ Script D_80280E54 = SCRIPT({ }); Script D_80280EB8 = SCRIPT({ - SetCamPerspective(Cam_BATTLE, 6, 25, 16, 1024); - SetCamViewport(Cam_BATTLE, 12, 20, 296, 200); - SetCamBGColor(Cam_BATTLE, 0, 0, 0); - SetCamEnabled(Cam_BATTLE, TRUE); + SetCamPerspective(CAM_BATTLE, 6, 25, 16, 1024); + SetCamViewport(CAM_BATTLE, 12, 20, 296, 200); + SetCamBGColor(CAM_BATTLE, 0, 0, 0); + SetCamEnabled(CAM_BATTLE, TRUE); sleep 1; func_802D3398(); func_802CCCB0(); - func_802CABE8(Cam_BATTLE, 0, 240, 100, 8); - func_802CAE50(Cam_BATTLE, -75, 35, 0); - BattleCamTargetActor(ActorID_PLAYER); + func_802CABE8(CAM_BATTLE, 0, 240, 100, 8); + func_802CAE50(CAM_BATTLE, -75, 35, 0); + BattleCamTargetActor(ACTOR_PLAYER); func_8024CE9C(); }); diff --git a/src/code_17FEB0.c b/src/code_17FEB0.c index 29801416d2..f9545814b8 100644 --- a/src/code_17FEB0.c +++ b/src/code_17FEB0.c @@ -20,21 +20,21 @@ HitResult calc_item_check_hit(void) { if (!(actorPart->eventFlags & 0x20)) { if (actor->transStatus == 0xE) { - return HitResult_MISS; + return HIT_RESULT_MISS; } if (actor->stoneStatus == 0xC) { sfx_play_sound_at_position(0x10C, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); - return HitResult_IMMUNE; + return HIT_RESULT_IMMUNE; } if ((battleStatus->currentAttackElement & 0x80) && (actorPart->eventFlags & 0x10)) { sfx_play_sound_at_position(0xE9, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z); - return HitResult_LANDED_ON_SPIKE; + return HIT_RESULT_LANDED_ON_SPIKE; } } else { - return HitResult_MISS; + return HIT_RESULT_MISS; } } - return HitResult_HIT; + return HIT_RESULT_HIT; } INCLUDE_ASM(s32, "code_17FEB0", calc_item_damage_enemy); diff --git a/src/code_181810.c b/src/code_181810.c index 982e7f0a23..2604e3351a 100644 --- a/src/code_181810.c +++ b/src/code_181810.c @@ -32,7 +32,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) { gSpeakingActorIdleAnim = get_variable(script, *args++); stringID2 = stringID; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -49,7 +49,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) { headY = actor->currentPos.y + tmp + (actor->size.y / 2); } headZ = actor->currentPos.z + actor->headOffset.z; - get_screen_coords(Cam_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ); + get_screen_coords(CAM_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ); { s32* isPrintDone = &gSpeakingActorPrintIsDone; @@ -78,7 +78,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) { headY = actor->currentPos.y + actor->headOffset.y + (actor->size.y / 2); } headZ = actor->currentPos.z + actor->headOffset.z; - get_screen_coords(Cam_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ); + get_screen_coords(CAM_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ); printContext = &gSpeakingActorPrintCtx; clamp_printer_coords(*printContext, screenX, screenY); @@ -215,7 +215,7 @@ ApiStatus PlaySoundAtActor(ScriptInstance* script, s32 isInitialCall) { Bytecode soundID = *args++; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -232,7 +232,7 @@ ApiStatus PlaySoundAtPart(ScriptInstance* script, s32 isInitialCall) { Bytecode soundID = *args++; ActorPart* part; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -249,7 +249,7 @@ ApiStatus PlayLoopingSoundAtActor(ScriptInstance* script, s32 isInitialCall) { Bytecode soundID = *args++; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -266,7 +266,7 @@ ApiStatus StopLoopingSoundAtActor(ScriptInstance* script, s32 isInitialCall) { s32 idx = get_variable(script, *args++); Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -324,7 +324,7 @@ s32 is_actor_hp_bar_visible(Actor* actor) { BattleStatus* battleStatus = &gBattleStatus; s32 flags; - if (is_ability_active(Ability_PEEKABOO)) { + if (is_ability_active(ABILITY_PEEKABOO)) { return TRUE; } @@ -339,7 +339,7 @@ s32 is_actortype_hpbar_visible(s32 actorType) { BattleStatus* battleStatus = &gBattleStatus; s32 idx; - if (is_ability_active(Ability_PEEKABOO)) { + if (is_ability_active(ABILITY_PEEKABOO)) { return TRUE; } @@ -392,7 +392,7 @@ ApiStatus ApplyShrinkFromOwner(ScriptInstance* script, s32 isInitialCall) { Actor* actor = get_actor(script->owner1.actorID); s32 amt = get_variable(script, *args); - if (actor->debuff == Debuff_SHRINK && amt > 0) { + if (actor->debuff == STATUS_SHRINK && amt > 0) { amt /= 2; } diff --git a/src/code_18F340.c b/src/code_18F340.c index b04f04b66e..caaf059b07 100644 --- a/src/code_18F340.c +++ b/src/code_18F340.c @@ -5,12 +5,12 @@ INCLUDE_ASM(s32, "code_18F340", func_80260A60); ApiStatus IsPartnerImmobile(ScriptInstance* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* playerActor = battleStatus->playerActor; - s32 isImmobile = playerActor->debuff == Debuff_FEAR - || playerActor->debuff == Debuff_DIZZY - || playerActor->debuff == Debuff_PARALYZE - || playerActor->debuff == Debuff_SLEEP - || playerActor->debuff == Debuff_FROZEN - || playerActor->debuff == Debuff_STOP; + s32 isImmobile = playerActor->debuff == STATUS_FEAR + || playerActor->debuff == STATUS_DIZZY + || playerActor->debuff == STATUS_PARALYZE + || playerActor->debuff == STATUS_SLEEP + || playerActor->debuff == STATUS_FROZEN + || playerActor->debuff == STATUS_STOP; if (playerActor->stoneStatus == 12) { isImmobile = TRUE; @@ -83,7 +83,7 @@ ApiStatus func_80261388(ScriptInstance* script, s32 isInitialCall) { } ApiStatus func_802613A8(ScriptInstance* script, s32 isInitialCall) { - gBattleStatus.selectedItemID = ItemId_LIFE_SHROOM; + gBattleStatus.selectedItemID = ITEM_LIFE_SHROOM; return ApiStatus_DONE2; } diff --git a/src/code_190B20.c b/src/code_190B20.c index 2ac598728d..282ea2734a 100644 --- a/src/code_190B20.c +++ b/src/code_190B20.c @@ -869,108 +869,108 @@ ActorOffsets bActorOffsets[ACTOR_TYPE_COUNT] = { }; s32 bMarioIdleAnims[] = { - Debuff_NORMAL, PlayerAnim_WALKING, - Debuff_DANGER, PlayerAnim_PANTING, - Debuff_STONE, 0x00050001, - Debuff_SLEEP, 0x00030004, - Debuff_DIZZY, 0x00030006, - Debuff_STOP, PlayerAnim_STAND_STILL, - Debuff_HUSTLE, PlayerAnim_RUNNING, - Debuff_BERSERK, 0x00040028, - Debuff_PARALYZE, 0x00030004, - Debuff_FROZEN, 0x0001000E, + STATUS_NORMAL, ANIM_WALKING, + STATUS_DANGER, ANIM_PANTING, + STATUS_STONE, 0x00050001, + STATUS_SLEEP, 0x00030004, + STATUS_DIZZY, 0x00030006, + STATUS_STOP, ANIM_STAND_STILL, + STATUS_HUSTLE, ANIM_RUNNING, + STATUS_BERSERK, 0x00040028, + STATUS_PARALYZE, 0x00030004, + STATUS_FROZEN, 0x0001000E, 0xE, 0x00010002, - Debuff_TURN_DONE, PlayerAnim_STAND_STILL, + STATUS_TURN_DONE, ANIM_STAND_STILL, 0x13, 0x00040029, 0x14, 0x0004002A, 0x15, 0x00030003, 0x18, 0x00030005, 0x16, 0x0010001, - Debuff_THINKING, PlayerAnim_THINKING, - Debuff_WEARY, 0x0001000D, - Debuff_END, + STATUS_THINKING, ANIM_THINKING, + STATUS_WEARY, 0x0001000D, + STATUS_END, }; s32 bMarioDefendAnims[] = { - Debuff_NORMAL, PlayerAnim_CROUCH, - Debuff_DANGER, PlayerAnim_PANTING, - Debuff_STONE, 0x00050001, - Debuff_SLEEP, 0x00030004, - Debuff_DIZZY, 0x00030006, - Debuff_STOP, PlayerAnim_STAND_STILL, - Debuff_HUSTLE, PlayerAnim_CROUCH, - Debuff_BERSERK, PlayerAnim_CROUCH, - Debuff_PARALYZE, 0x00030004, - Debuff_FROZEN, 0x0001000E, + STATUS_NORMAL, ANIM_CROUCH, + STATUS_DANGER, ANIM_PANTING, + STATUS_STONE, 0x00050001, + STATUS_SLEEP, 0x00030004, + STATUS_DIZZY, 0x00030006, + STATUS_STOP, ANIM_STAND_STILL, + STATUS_HUSTLE, ANIM_CROUCH, + STATUS_BERSERK, ANIM_CROUCH, + STATUS_PARALYZE, 0x00030004, + STATUS_FROZEN, 0x0001000E, 0xE, 0x00010002, - Debuff_TURN_DONE, PlayerAnim_STAND_STILL, + STATUS_TURN_DONE, ANIM_STAND_STILL, 0x13, 0x00040029, 0x14, 0x0004002A, 0x15, 0x00030003, 0x18, 0x00030005, 0x16, 0x0010001, - Debuff_THINKING, PlayerAnim_THINKING, - Debuff_WEARY, 0x0001000D, - Debuff_END, + STATUS_THINKING, ANIM_THINKING, + STATUS_WEARY, 0x0001000D, + STATUS_END, }; s32 bMarioHideAnims[] = { - Debuff_NORMAL, PlayerAnim_CROUCH, - Debuff_DANGER, PlayerAnim_PANTING, - Debuff_STONE, 0x00050001, - Debuff_SLEEP, 0x00030004, - Debuff_DIZZY, 0x00030006, - Debuff_STOP, PlayerAnim_STAND_STILL, - Debuff_HUSTLE, 0x0008000E, - Debuff_BERSERK, 0x0008000E, - Debuff_PARALYZE, 0x00030004, - Debuff_FROZEN, 0x0001000E, + STATUS_NORMAL, ANIM_CROUCH, + STATUS_DANGER, ANIM_PANTING, + STATUS_STONE, 0x00050001, + STATUS_SLEEP, 0x00030004, + STATUS_DIZZY, 0x00030006, + STATUS_STOP, ANIM_STAND_STILL, + STATUS_HUSTLE, 0x0008000E, + STATUS_BERSERK, 0x0008000E, + STATUS_PARALYZE, 0x00030004, + STATUS_FROZEN, 0x0001000E, 0xE, 0x00010002, - Debuff_TURN_DONE, PlayerAnim_CROUCH, + STATUS_TURN_DONE, ANIM_CROUCH, 0x13, 0x00040029, 0x14, 0x0004002A, 0x15, 0x00030003, 0x18, 0x00030005, 0x16, 0x0010001, - Debuff_THINKING, PlayerAnim_THINKING, - Debuff_WEARY, 0x0001000D, - Debuff_END, + STATUS_THINKING, ANIM_THINKING, + STATUS_WEARY, 0x0001000D, + STATUS_END, }; s32 bPeachIdleAnims[] = { - Debuff_NORMAL, 0x000A0002, - Debuff_TURN_DONE, 0x000C0028, - Debuff_END, + STATUS_NORMAL, 0x000A0002, + STATUS_TURN_DONE, 0x000C0028, + STATUS_END, }; s32 bMarioDefenseTable[] = { - Element_NORMAL, 0, - Element_END, + ELEMENT_NORMAL, 0, + ELEMENT_END, }; s32 bPlayerStatusTable[] = { - Debuff_NORMAL, 100, - Debuff_DEFAULT, 100, - Debuff_SLEEP, 100, - Debuff_POISON, 100, - Debuff_FROZEN, 100, - Debuff_DIZZY, 100, - Debuff_FEAR, 100, - Debuff_STATIC, 100, - Debuff_PARALYZE, 100, - Debuff_SHRINK, 100, - Debuff_STOP, 100, - Debuff_DEFAULT_TURN_MOD, 0, - Debuff_SLEEP_TURN_MOD, 0, - Debuff_POISON_TURN_MOD, 0, - Debuff_FROZEN_TURN_MOD, 0, - Debuff_DIZZY_TURN_MOD, 0, - Debuff_FEAR_TURN_MOD, 0, - Debuff_STATIC_TURN_MOD, 0, - Debuff_PARALYZE_TURN_MOD, 0, - Debuff_SHRINK_TURN_MOD, 0, - Debuff_STOP_TURN_MOD, 0, - Debuff_END, + STATUS_NORMAL, 100, + STATUS_DEFAULT, 100, + STATUS_SLEEP, 100, + STATUS_POISON, 100, + STATUS_FROZEN, 100, + STATUS_DIZZY, 100, + STATUS_FEAR, 100, + STATUS_STATIC, 100, + STATUS_PARALYZE, 100, + STATUS_SHRINK, 100, + STATUS_STOP, 100, + STATUS_DEFAULT_TURN_MOD, 0, + STATUS_SLEEP_TURN_MOD, 0, + STATUS_POISON_TURN_MOD, 0, + STATUS_FROZEN_TURN_MOD, 0, + STATUS_DIZZY_TURN_MOD, 0, + STATUS_FEAR_TURN_MOD, 0, + STATUS_STATIC_TURN_MOD, 0, + STATUS_PARALYZE_TURN_MOD, 0, + STATUS_SHRINK_TURN_MOD, 0, + STATUS_STOP_TURN_MOD, 0, + STATUS_END, }; ActorDesc bPlayerActorDesc = { @@ -1149,8 +1149,8 @@ s32 lookup_defense(DefenseTableEntry* defenseTable, Element elementKey) { DefenseTableEntry* row; s32 normalDefense = 0; - for (row = defenseTable; row->element != Element_END; row++, defenseTable++) { - if (row->element == Element_NORMAL) { + for (row = defenseTable; row->element != ELEMENT_END; row++, defenseTable++) { + if (row->element == ELEMENT_NORMAL) { normalDefense = defenseTable->defense; } @@ -1171,9 +1171,9 @@ INCLUDE_ASM(s32, "code_190B20", lookup_status_duration_mod); // exactly (?) the INCLUDE_ASM(s32, "code_190B20", inflict_status); s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration) { - if (statusTypeKey == Debuff_DAZE) { + if (statusTypeKey == STATUS_DAZE) { if (statusTypeKey != target->koStatus) { - inflict_status(target, Debuff_DAZE, duration); + inflict_status(target, STATUS_DAZE, duration); sfx_play_sound(0x2107); } else { target->koDuration += duration; @@ -1192,68 +1192,68 @@ s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags) { if (defenseTable != NULL) { if (elementFlags & 2) { - defense = lookup_defense(defenseTable, Element_FIRE); + defense = lookup_defense(defenseTable, ELEMENT_FIRE); if (defense < minDefense) { minDefense = defense; } } if (elementFlags & 4) { - defense = lookup_defense(defenseTable, Element_WATER); + defense = lookup_defense(defenseTable, ELEMENT_WATER); if (defense < minDefense) { minDefense = defense; } } if (elementFlags & 8) { - defense = lookup_defense(defenseTable, Element_ICE); + defense = lookup_defense(defenseTable, ELEMENT_ICE); if (defense < minDefense) { minDefense = defense; } } - // Element_MYSTERY missing? + // ELEMENT_MYSTERY missing? if (elementFlags & 0x10) { - defense = lookup_defense(defenseTable, Element_MAGIC); + defense = lookup_defense(defenseTable, ELEMENT_MAGIC); if (defense < minDefense) { minDefense = defense; } } if (elementFlags & 0x40) { - defense = lookup_defense(defenseTable, Element_HAMMER); + defense = lookup_defense(defenseTable, ELEMENT_HAMMER); if (defense < minDefense) { minDefense = defense; } } if (elementFlags & 0x80) { - defense = lookup_defense(defenseTable, Element_JUMP); + defense = lookup_defense(defenseTable, ELEMENT_JUMP); if (defense < minDefense) { minDefense = defense; } } if (elementFlags & 0x100) { - defense = lookup_defense(defenseTable, Element_COSMIC); + defense = lookup_defense(defenseTable, ELEMENT_COSMIC); if (defense < minDefense) { minDefense = defense; } } if (elementFlags & 0x200) { - defense = lookup_defense(defenseTable, Element_BLAST); + defense = lookup_defense(defenseTable, ELEMENT_BLAST); if (defense < minDefense) { minDefense = defense; } } if (elementFlags & 0x20) { - defense = lookup_defense(defenseTable, Element_SHOCK); + defense = lookup_defense(defenseTable, ELEMENT_SHOCK); if (defense < minDefense) { minDefense = defense; } } if (elementFlags & 0x800) { - defense = lookup_defense(defenseTable, Element_QUAKE); + defense = lookup_defense(defenseTable, ELEMENT_QUAKE); if (defense < minDefense) { minDefense = defense; } } if (elementFlags & 0x40000) { - defense = lookup_defense(defenseTable, Element_THROW); + defense = lookup_defense(defenseTable, ELEMENT_THROW); if (defense < minDefense) { minDefense = defense; } @@ -1262,7 +1262,7 @@ s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags) { // If no element flags were set, fall back to normal defense. if (minDefense == 0xFF) { - defense = lookup_defense(defenseTable, Element_NORMAL); + defense = lookup_defense(defenseTable, ELEMENT_NORMAL); if (defense < 0xFF) { minDefense = defense; } @@ -1328,7 +1328,7 @@ INCLUDE_ASM(s32, "code_190B20", func_8026709C); INCLUDE_ASM(s32, "code_190B20", func_802670C8); -void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationId decorationType) { +void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationID decorationType) { if ((part->idleAnimations) && !(part->flags & 2)) { DecorationTable* decorationTable = part->decorationTable; @@ -1340,7 +1340,7 @@ void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationId deco } } -void add_actor_decoration(Actor* actor, s32 decorationIndex, DecorationId decorationType) { +void add_actor_decoration(Actor* actor, s32 decorationIndex, DecorationID decorationType) { ActorPart* part; for (part = actor->partsTable; part != NULL; part = part->nextPart) { if ((part->flags & 0x100001) == 0 && part->idleAnimations && (part->flags & 2) == 0) { diff --git a/src/code_197F40.c b/src/code_197F40.c index 4299f02a67..d5c6b2877a 100644 --- a/src/code_197F40.c +++ b/src/code_197F40.c @@ -127,7 +127,7 @@ ApiStatus SetGoalToHome(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -143,7 +143,7 @@ ApiStatus SetIdleGoalToHome(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -163,7 +163,7 @@ ApiStatus GetIndexFromPos(ScriptInstance* script, s32 isInitialCall) { s32 a1 = *args++; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -179,7 +179,7 @@ ApiStatus GetIndexFromHome(ScriptInstance* script, s32 isInitialCall) { s32 a1 = *args++; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -196,7 +196,7 @@ ApiStatus CountPlayerTargets(ScriptInstance* script, s32 isInitialCall) { s32 outVar = *args++; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -213,7 +213,7 @@ ApiStatus ForceHomePos(ScriptInstance* script, s32 isInitialCall) { f32 x, y, z; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -238,7 +238,7 @@ ApiStatus SetHomePos(ScriptInstance* script, s32 isInitialCall) { f32 x, y, z; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -259,7 +259,7 @@ ApiStatus SetGoalToTarget(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } actor = get_actor(actorID); @@ -275,7 +275,7 @@ ApiStatus SetPartGoalToTarget(ScriptInstance* script, s32 isInitialCall) { s32 partIndex = get_variable(script, *args++); Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } actor = get_actor(actorID); @@ -291,7 +291,7 @@ ApiStatus SetGoalToFirstTarget(ScriptInstance* script, s32 isInitialCall) { Actor* actor; SelectableTarget* target; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } actor = get_actor(actorID); @@ -309,7 +309,7 @@ ApiStatus SetGoalPos(ScriptInstance* script, s32 isInitialCall) { ActorMovement* walk; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } actor = get_actor(actorID); @@ -349,7 +349,7 @@ ApiStatus SetIdleGoal(ScriptInstance* script, s32 isInitialCall) { ActorMovement* fly; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } actor = get_actor(actorID); @@ -387,7 +387,7 @@ ApiStatus AddGoalPos(ScriptInstance* script, s32 isInitialCall) { Actor* actor; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -410,7 +410,7 @@ ApiStatus GetGoalPos(ScriptInstance* script, s32 isInitialCall) { s32 outX, outY, outZ; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -439,7 +439,7 @@ ApiStatus GetIdleGoal(ScriptInstance* script, s32 isInitialCall) { s32 outX, outY, outZ; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -469,7 +469,7 @@ ApiStatus GetPartTarget(ScriptInstance* script, s32 isInitialCall) { s32 outX, outY, outZ; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -498,7 +498,7 @@ ApiStatus GetActorPos(ScriptInstance* script, s32 isInitialCall) { s32 outX, outY, outZ; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -527,7 +527,7 @@ ApiStatus GetPartOffset(ScriptInstance* script, s32 isInitialCall) { s32 outX, outY, outZ; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -563,7 +563,7 @@ ApiStatus GetPartPos(ScriptInstance* script, s32 isInitialCall) { s32 outX, outY, outZ; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -592,7 +592,7 @@ ApiStatus GetHomePos(ScriptInstance* script, s32 isInitialCall) { s32 outX, outY, outZ; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -619,7 +619,7 @@ ApiStatus SetActorPos(ScriptInstance* script, s32 isInitialCall) { Actor* actor; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -643,7 +643,7 @@ ApiStatus SetPartPos(ScriptInstance* script, s32 isInitialCall) { f32 x, y, z; ActorPart* actorPart; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -687,7 +687,7 @@ ApiStatus SetEnemyTargetOffset(ScriptInstance* script, s32 isInitialCall) { f32 x, y; ActorPart* actorPart; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -716,7 +716,7 @@ ApiStatus SetAnimation(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -732,7 +732,7 @@ ApiStatus GetAnimation(ScriptInstance* script, s32 isInitialCall) { ActorPart* actorPart; s32 a1; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } var1 = get_variable(script, *args++); @@ -751,7 +751,7 @@ ApiStatus SetAnimationRate(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -764,7 +764,7 @@ ApiStatus SetActorYaw(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -777,7 +777,7 @@ ApiStatus GetActorYaw(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 a1; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -791,7 +791,7 @@ ApiStatus SetPartYaw(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -805,7 +805,7 @@ ApiStatus GetPartYaw(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; s32 a1; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -821,7 +821,7 @@ ApiStatus SetActorJumpGravity(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); f32 jumpAccel; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -835,7 +835,7 @@ ApiStatus SetActorIdleJumpGravity(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); f32 flyJumpAccel; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -849,7 +849,7 @@ ApiStatus SetActorSpeed(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); f32 moveSpeed; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -864,7 +864,7 @@ ApiStatus SetActorIdleSpeed(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); f32 flySpeed; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -879,7 +879,7 @@ ApiStatus SetPartJumpGravity(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; f32 jumpScale; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -896,7 +896,7 @@ ApiStatus SetPartMoveSpeed(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; f32 moveSpeed; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -916,7 +916,7 @@ ApiStatus SetJumpAnimations(ScriptInstance* script, s32 isInitialCall) { s32 animJumpFall; s32 animJumpLand; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -940,7 +940,7 @@ ApiStatus AddActorPos(ScriptInstance* script, s32 isInitialCall) { Actor* actor; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -962,7 +962,7 @@ ApiStatus SetActorDispOffset(ScriptInstance* script, s32 isInitialCall) { Actor* actor; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -986,7 +986,7 @@ ApiStatus GetPartDispOffset(ScriptInstance* script, s32 isInitialCall) { s32 outX, outY, outZ; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1021,7 +1021,7 @@ ApiStatus SetPartDispOffset(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1052,7 +1052,7 @@ ApiStatus AddPartDispOffset(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1096,7 +1096,7 @@ ApiStatus GetActorVar(ScriptInstance* script, s32 isInitialCall) { s32 var1; s32 a2; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1114,7 +1114,7 @@ ApiStatus SetActorVar(ScriptInstance* script, s32 isInitialCall) { s32 index; s32 val; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1133,7 +1133,7 @@ ApiStatus AddActorVar(ScriptInstance* script, s32 isInitialCall) { s32 index; s32 val; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1155,7 +1155,7 @@ ApiStatus GetPartMovementVar(ScriptInstance* script, s32 isInitialCall) { s32 tableIndex; s32 outVar; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1175,7 +1175,7 @@ ApiStatus SetPartMovementVar(ScriptInstance* script, s32 isInitialCall) { s32 tableIndex; s32 val; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1195,7 +1195,7 @@ ApiStatus AddPartMovementVar(ScriptInstance* script, s32 isInitialCall) { s32 tableIndex; s32 val; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1214,7 +1214,7 @@ ApiStatus SetActorRotation(ScriptInstance* script, s32 isInitialCall) { Actor* actor; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1245,7 +1245,7 @@ ApiStatus SetActorRotationOffset(ScriptInstance* script, s32 isInitialCall) { Actor* actor; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1268,7 +1268,7 @@ ApiStatus GetActorRotation(ScriptInstance* script, s32 isInitialCall) { Actor* actor; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1292,7 +1292,7 @@ ApiStatus SetPartRotation(ScriptInstance* script, s32 isInitialCall) { ActorPart* actorPart; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1316,7 +1316,7 @@ ApiStatus SetPartRotationOffset(ScriptInstance* script, s32 isInitialCall) { ActorPart* actorPart; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1340,7 +1340,7 @@ ApiStatus GetPartRotation(ScriptInstance* script, s32 isInitialCall) { ActorPart* actorPart; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1363,7 +1363,7 @@ ApiStatus SetActorScale(ScriptInstance* script, s32 isInitialCall) { Actor* actor; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1386,7 +1386,7 @@ ApiStatus SetActorScaleModifier(ScriptInstance* script, s32 isInitialCall) { Actor* actor; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1409,7 +1409,7 @@ ApiStatus GetActorScale(ScriptInstance* script, s32 isInitialCall) { Actor* actor; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1433,7 +1433,7 @@ ApiStatus SetPartScale(ScriptInstance* script, s32 isInitialCall) { ActorPart* actorPart; f32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1457,7 +1457,7 @@ ApiStatus GetPartScale(ScriptInstance* script, s32 isInitialCall) { ActorPart* actorPart; s32 x, y, z; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1517,7 +1517,7 @@ ApiStatus SetActorFlags(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 a1; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1534,7 +1534,7 @@ ApiStatus SetActorFlagBits(ScriptInstance* script, s32 isInitialCall) { s32 var1; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1556,7 +1556,7 @@ ApiStatus GetActorFlags(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 a1; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1573,7 +1573,7 @@ ApiStatus SetPartFlags(ScriptInstance* script, s32 isInitialCall) { s32 a1; s32 partIndex; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1593,7 +1593,7 @@ ApiStatus SetPartFlagBits(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; s32 cond; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1620,7 +1620,7 @@ ApiStatus SetPartTargetFlags(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; s32 cond; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1640,7 +1640,7 @@ ApiStatus SetPartTargetFlagBits(ScriptInstance* script, s32 isInitialCall) { s32 bits; s32 cond; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1666,7 +1666,7 @@ ApiStatus GetPartFlags(ScriptInstance* script, s32 isInitialCall) { ActorPart* actorPart; s32 a2; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1685,7 +1685,7 @@ ApiStatus GetPartTargetFlags(ScriptInstance* script, s32 isInitialCall) { ActorPart* actorPart; s32 a2; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1705,7 +1705,7 @@ ApiStatus SetPartEventFlags(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; s32 cond; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1725,7 +1725,7 @@ ApiStatus SetPartEventBits(ScriptInstance* script, s32 isInitialCall) { s32 bits; s32 cond; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1751,7 +1751,7 @@ ApiStatus GetPartEventFlags(ScriptInstance* script, s32 isInitialCall) { ActorPart* actorPart; s32 a2; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1771,7 +1771,7 @@ ApiStatus func_8026D51C(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; s32 cond; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1791,7 +1791,7 @@ ApiStatus func_8026D5A4(ScriptInstance* script, s32 isInitialCall) { s32 bits; s32 cond; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1815,7 +1815,7 @@ ApiStatus HPBarToHome(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1838,7 +1838,7 @@ ApiStatus HPBarToCurrent(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1860,7 +1860,7 @@ ApiStatus func_8026D8EC(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1875,7 +1875,7 @@ ApiStatus func_8026D940(ScriptInstance* script, s32 isInitialCall) { Actor* actor; s32 x, y; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1903,7 +1903,7 @@ ApiStatus func_8026DA94(ScriptInstance* script, s32 isInitialCall) { Actor* actor; s32 a, b, c, d; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1939,12 +1939,12 @@ ApiStatus ActorExists(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } isExist = get_actor(actorID) != NULL; - if ((actorID == ActorID_PARTNER) && (partner == NULL)) { + if ((actorID == ACTOR_PARTNER) && (partner == NULL)) { isExist = FALSE; } @@ -1958,7 +1958,7 @@ ApiStatus func_8026DEF0(ScriptInstance* script, s32 isInitialCall) { s32 partIndex = get_variable(script, *args++); s32 a2 = *args++; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -1973,7 +1973,7 @@ ApiStatus func_8026DF88(ScriptInstance* script, s32 isInitialCall) { s32 partIndex = get_variable(script, *args++); s32 a2 = *args++; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -2161,7 +2161,7 @@ INCLUDE_ASM(s32, "code_197F40", GetBattleVar); ApiStatus ResetAllActorSounds(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -2180,7 +2180,7 @@ INCLUDE_ASM(s32, "code_197F40", SetActorType); ApiStatus ShowShockEffect(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } diff --git a/src/code_19FAF0.c b/src/code_19FAF0.c index 92afcd76e7..58ac933a8e 100644 --- a/src/code_19FAF0.c +++ b/src/code_19FAF0.c @@ -39,7 +39,7 @@ INCLUDE_ASM(s32, "code_19FAF0", dispatch_damage_event_player); void dispatch_damage_event_player_0(s32 damageAmount, Event event) { BattleStatus* battleStatus = &gBattleStatus; - battleStatus->currentAttackElement = Element_END; + battleStatus->currentAttackElement = ELEMENT_END; battleStatus->unk_19A = 0; dispatch_damage_event_player(damageAmount, event, FALSE); } diff --git a/src/code_1A5830.c b/src/code_1A5830.c index 5db7c6b6d9..c7018aa019 100644 --- a/src/code_1A5830.c +++ b/src/code_1A5830.c @@ -21,13 +21,13 @@ s32 func_80276F50(Actor* actor) { void dispatch_event_general(Actor* actor, Event event) { switch (actor->actorID & 0x700) { - case ActorID_PLAYER: + case ACTOR_PLAYER: dispatch_event_player(event); break; - case ActorID_PARTNER: + case ACTOR_PARTNER: dispatch_event_partner(event); break; - case ActorID_ENEMY0: + case ACTOR_ENEMY0: dispatch_event_actor(actor, event); break; } @@ -79,7 +79,7 @@ ApiStatus BindTakeTurn(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 var1; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -92,7 +92,7 @@ ApiStatus PauseTakeTurn(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -105,7 +105,7 @@ ApiStatus ResumeTakeTurn(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -121,7 +121,7 @@ ApiStatus BindIdle(ScriptInstance* script, s32 isInitialCall) { Actor* actor; ScriptInstance* newScriptContext; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -147,7 +147,7 @@ ApiStatus EnableIdleScript(ScriptInstance* script, s32 isInitialCall) { s32 var1; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -177,7 +177,7 @@ ApiStatus BindHandleEvent(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 var1; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -191,7 +191,7 @@ ApiStatus BindNextTurn(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 var1; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -237,7 +237,7 @@ ApiStatus GetLastEvent(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 outVar; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -252,7 +252,7 @@ ApiStatus SetTargetActor(ScriptInstance* script, s32 isInitialCall) { s32 targetActorID; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -269,7 +269,7 @@ ApiStatus SetEnemyHP(ScriptInstance* script, s32 isInitialCall) { s8 newHP; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -294,7 +294,7 @@ ApiStatus GetActorHP(ScriptInstance* script, s32 isInitialCall) { s32 outVar; s32 outVal; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } outVar = *args++; @@ -302,10 +302,10 @@ ApiStatus GetActorHP(ScriptInstance* script, s32 isInitialCall) { actor = get_actor(actorID); switch (actorID & 0x700) { - case ActorID_PLAYER: + case ACTOR_PLAYER: outVal = playerData->curHP; break; - case ActorID_PARTNER: + case ACTOR_PARTNER: outVal = 99; break; default: @@ -322,7 +322,7 @@ ApiStatus GetEnemyMaxHP(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 outVar; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -341,7 +341,7 @@ ApiStatus SetDefenseTable(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; s32 var2; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -356,7 +356,7 @@ ApiStatus SetStatusTable(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 var1; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -371,7 +371,7 @@ ApiStatus SetIdleAnimations(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; s32 var2; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -386,7 +386,7 @@ ApiStatus func_8027CC10(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 partIndex; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -411,7 +411,7 @@ ApiStatus EnemyFollowupAfflictTarget(ScriptInstance* script, s32 isInitialCall) s32 hitResults; s32 outVar; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -450,7 +450,7 @@ ApiStatus DispatchDamageEvent(ScriptInstance* script, s32 isInitialCall) { s32 damageAmount; s32 scriptExists; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -469,7 +469,7 @@ ApiStatus DispatchEvent(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorID actorID = get_variable(script, *args++); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -480,7 +480,7 @@ ApiStatus DispatchEvent(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_8027D2D8(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -491,7 +491,7 @@ ApiStatus func_8027D2D8(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_8027D32C(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -507,7 +507,7 @@ ApiStatus SetTargetOffset(ScriptInstance* script, s32 isInitialCall) { s32 x; s32 y; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -529,7 +529,7 @@ ApiStatus func_8027D434(ScriptInstance* script, s32 isInitialCall) { s32 partIndex; ActorPart* part; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -547,7 +547,7 @@ ApiStatus func_8027D4C8(ScriptInstance* script, s32 isInitialCall) { s32 temp; s32 temp2; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -569,7 +569,7 @@ ApiStatus EnableActorBlur(ScriptInstance* script, s32 isInitialCall) { s32 enable = get_variable(script, *args++); Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -588,7 +588,7 @@ ApiStatus EnableActorBlur(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_8027D628(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -607,7 +607,7 @@ ApiStatus AfflictActor(ScriptInstance* script, s32 isInitialCall) { statusTypeKey = get_variable(script, *args++); duration = get_variable(script, *args++); - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } actor = get_actor(actorID); @@ -640,7 +640,7 @@ ApiStatus func_8027D75C(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 outVar = *args++; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -665,7 +665,7 @@ ApiStatus SetActorSize(ScriptInstance* script, s32 isInitialCall) { s32 x = get_variable(script, *args++); Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -689,7 +689,7 @@ ApiStatus GetActorSize(ScriptInstance* script, s32 isInitialCall) { s32 outX = *args++; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -706,7 +706,7 @@ ApiStatus GetOriginalActorType(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 outVar = *args++; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -719,7 +719,7 @@ ApiStatus GetCurrentActorType(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 outVar = *args++; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -732,7 +732,7 @@ ApiStatus GetLastDamage(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 outVar; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } outVar = *args++; @@ -747,7 +747,7 @@ ApiStatus EnableActorGlow(ScriptInstance* script, s32 isInitialCall) { s32 flag; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -795,13 +795,13 @@ ApiStatus CopyStatusEffects(ScriptInstance* script, s32 isInitialCall) { Actor* actorFrom; actorIDFrom = get_variable(script, *args++); - if (actorIDFrom == ActorID_SELF) { + if (actorIDFrom == ACTOR_SELF) { actorIDFrom = script->owner1.actorID; } actorFrom = get_actor(actorIDFrom); actorIDTo = get_variable(script, *args++); - if (actorIDTo == ActorID_SELF) { + if (actorIDTo == ACTOR_SELF) { actorIDTo = script->owner1.actorID; } actorTo = get_actor(actorIDTo); @@ -824,15 +824,15 @@ ApiStatus ClearStatusEffects(ScriptInstance* script, s32 isInitialCall) { s32 flag; Actor* actor; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } actor = get_actor(actorID); - if (actor->debuff != Debuff_END) { + if (actor->debuff != STATUS_END) { actor->debuffDuration = 0; - actor->debuff = Debuff_END; + actor->debuff = STATUS_END; func_80047898(actor->unk_436); } diff --git a/src/code_1AC760.c b/src/code_1AC760.c index 7b41a4483c..22177079f0 100644 --- a/src/code_1AC760.c +++ b/src/code_1AC760.c @@ -12,7 +12,7 @@ void dispatch_event_partner(s8 lastEventType) { script = start_script(partnerActor->onHitCode, 10, 0x20); partnerActor->onHitScript = script; partnerActor->onHitID = script->id; - script->owner1.actorID = ActorID_PARTNER; + script->owner1.actorID = ACTOR_PARTNER; if (partnerActor->takeTurnScript != NULL) { kill_script_by_ID(partnerActor->takeTurnID); @@ -35,7 +35,7 @@ void dispatch_event_partner_continue_turn(s8 lastEventType) { script = start_script(partnerActor->onHitCode, 10, 0x20); partnerActor->onHitScript = script; partnerActor->onHitID = script->id; - script->owner1.actorID = ActorID_PARTNER; + script->owner1.actorID = ACTOR_PARTNER; if (onHitScript != NULL) { kill_script_by_ID(onHitID); @@ -96,7 +96,7 @@ ApiStatus func_8027FC90(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); s32 outVar; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.enemyID; } @@ -117,7 +117,7 @@ ApiStatus GetActorLevel(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *args++); Bytecode* outVar; - if (actorID == ActorID_SELF) { + if (actorID == ACTOR_SELF) { actorID = script->owner1.enemyID; } diff --git a/src/code_1a1f0_len_5390.c b/src/code_1a1f0_len_5390.c index 379d089b74..2b9573d522 100644 --- a/src/code_1a1f0_len_5390.c +++ b/src/code_1a1f0_len_5390.c @@ -165,7 +165,7 @@ ApiStatus OnDefeatEnemy(ScriptInstance* script, s32 isInitialCall) { } if (script->functionTemp[1].s == 15) { - sfx_play_sound(SoundId_DEATH); + sfx_play_sound(SOUND_DEATH); func_80070190(1, npc->pos.x, npc->pos.y + (npc->collisionHeight / 2), npc->pos.z, 0, -1.0f, 0, 10); } @@ -202,7 +202,7 @@ ApiStatus OnFleeBattleDrops(ScriptInstance* script, s32 isInitialCall) { if (rand_int(100) < 50) { if (playerData->coins != 0) { playerData->coins--; - make_item_entity_delayed(ItemId_COIN, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, + make_item_entity_delayed(ITEM_COIN, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, 3, 0, 0); } } @@ -280,8 +280,8 @@ void update_encounters_conversation(void) { enable_player_input(); func_800EF600(); - if (playerStatus->actionState == ActionState_CONVERSATION) { - set_action_state(ActionState_IDLE); + if (playerStatus->actionState == ACTION_STATE_CONVERSATION) { + set_action_state(ACTION_STATE_IDLE); } func_800EF3D4(0); diff --git a/src/code_1f580_len_1940.c b/src/code_1f580_len_1940.c index ec6937ca8c..aec15adaae 100644 --- a/src/code_1f580_len_1940.c +++ b/src/code_1f580_len_1940.c @@ -128,10 +128,10 @@ INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcAI, ScriptInstance* script, s32 i ApiStatus BindNpcIdle(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* owner = script->owner1.enemy; - NpcId npcID = get_variable(script, *args++); + NpcID npcID = get_variable(script, *args++); Bytecode* aiBytecode = (Bytecode*)get_variable(script, *args); - if (npcID == NpcId_SELF) { + if (npcID == NPC_SELF) { npcID = owner->npcID; } @@ -144,11 +144,11 @@ ApiStatus BindNpcIdle(ScriptInstance* script, s32 isInitialCall) { ApiStatus RestartNpcAI(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); ScriptInstance* newScript; s32 groupFlags; - if (npcId == NpcId_SELF) { + if (npcId == NPC_SELF) { npcId = npc->npcID; } @@ -178,10 +178,10 @@ ApiStatus RestartNpcAI(ScriptInstance* script, s32 isInitialCall) { ApiStatus EnableNpcAI(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); s32 var2 = get_variable(script, *args); - if (npcId == NpcId_SELF) { + if (npcId == NPC_SELF) { npcId = npc->npcID; } @@ -203,10 +203,10 @@ INCLUDE_ASM(s32, "code_1f580_len_1940", SetNpcAux, ScriptInstance* script, s32 i ApiStatus BindNpcAux(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); Bytecode* auxBytecode = (Bytecode*)get_variable(script, *args); - if (npcId == NpcId_SELF) { + if (npcId == NPC_SELF) { npcId = npc->npcID; } @@ -219,11 +219,11 @@ ApiStatus BindNpcAux(ScriptInstance* script, s32 isInitialCall) { ApiStatus RestartNpcAux(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; - NpcId npcID = get_variable(script, *args++); + NpcID npcID = get_variable(script, *args++); ScriptInstance* newScript; s32 groupFlags; - if (npcID == NpcId_SELF) { + if (npcID == NPC_SELF) { npcID = npc->npcID; } @@ -252,10 +252,10 @@ ApiStatus RestartNpcAux(ScriptInstance* script, s32 isInitialCall) { ApiStatus EnableNpcAux(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); s32 var2 = get_variable(script, *args); - if (npcId == NpcId_SELF) { + if (npcId == NPC_SELF) { npcId = npc->npcID; } @@ -275,10 +275,10 @@ ApiStatus EnableNpcAux(ScriptInstance* script, s32 isInitialCall) { ApiStatus BindNpcInteract(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); Bytecode* interactBytecode = (Bytecode*)get_variable(script, *args); - if (npcId == NpcId_SELF) { + if (npcId == NPC_SELF) { npcId = npc->npcID; } @@ -295,10 +295,10 @@ ApiStatus BindNpcInteract(ScriptInstance* script, s32 isInitialCall) { ApiStatus BindNpcHit(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); Bytecode* hitBytecode = (Bytecode*)get_variable(script, *args); - if (npcId == NpcId_SELF) { + if (npcId == NPC_SELF) { npcId = npc->npcID; } @@ -348,11 +348,11 @@ ApiStatus GetSelfVar(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcVar(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); s32 varIdx = get_variable(script, *args++); s32 val = get_variable(script, *args); - if (npcId == NpcId_SELF) { + if (npcId == NPC_SELF) { npcId = npc->npcID; } @@ -365,11 +365,11 @@ ApiStatus SetNpcVar(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetNpcVar(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; - NpcId npcID = get_variable(script, *args++); + NpcID npcID = get_variable(script, *args++); s32 varIdx = get_variable(script, *args++); s32 var3 = *args; - if (npcID == NpcId_SELF) { + if (npcID == NPC_SELF) { npcID = npc->npcID; } @@ -445,11 +445,11 @@ ApiStatus ClearDefeatedEnemies(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetEnemyFlagBits(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Enemy* npc = script->owner1.enemy; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); s32 bits = *args++; s32 var2 = get_variable(script, *args); - if (npcId == NpcId_SELF) { + if (npcId == NPC_SELF) { npcId = npc->npcID; } @@ -554,7 +554,7 @@ ApiStatus func_80045900(ScriptInstance* script) { ApiStatus SetTattleString(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId enemyId = get_variable(script, *args++); + NpcID enemyId = get_variable(script, *args++); u32 tattleString = get_variable(script, *args); Enemy* npc = get_enemy(enemyId); diff --git a/src/code_23680.c b/src/code_23680.c index 623abf6e64..ae36c54f35 100644 --- a/src/code_23680.c +++ b/src/code_23680.c @@ -37,7 +37,7 @@ s32 get_coin_drop_amount(Enemy* enemy) { amt = 0; } - if (is_ability_active(Ability_PAY_OFF)) { + if (is_ability_active(ABILITY_PAY_OFF)) { amt += currentEncounter->damageTaken / 2; } @@ -45,7 +45,7 @@ s32 get_coin_drop_amount(Enemy* enemy) { amt *= 3; } - if (is_ability_active(Ability_MONEY_MONEY)) { + if (is_ability_active(ABILITY_MONEY_MONEY)) { amt *= 2; } diff --git a/src/code_415D90.c b/src/code_415D90.c index e9d4f434ca..f9a5fce56a 100644 --- a/src/code_415D90.c +++ b/src/code_415D90.c @@ -441,7 +441,7 @@ s32 func_802A58D0(void) { s8 partnerDebuff; s32 ret; - if (battleStatus->flags2 & 4 || partner == PartnerID_NONE || partner->flags & 0x200000) { + if (battleStatus->flags2 & 4 || partner == PARTNER_NONE || partner->flags & 0x200000) { return FALSE; } diff --git a/src/code_77480.c b/src/code_77480.c index 547049718e..0335949a22 100644 --- a/src/code_77480.c +++ b/src/code_77480.c @@ -53,7 +53,7 @@ void update_player(void) { Npc* partner; playerStatus->animFlags |= 0x20000004; - partner = get_npc_unsafe(NpcId_PARTNER); + partner = get_npc_unsafe(NPC_PARTNER); partner->pos.x = playerStatus->lastGoodPosition.x; partner->pos.y = playerStatus->lastGoodPosition.y + playerStatus->colliderHeight; partner->pos.z = playerStatus->lastGoodPosition.z; @@ -78,7 +78,7 @@ void update_player(void) { if (func_800E0208() == 0) { collision_main_lateral(); } - } else if (playerStatus->actionState != ActionState_HIT_LAVA) { + } else if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) { func_800DFAAC(); } else { func_800DFBE8(); @@ -145,7 +145,7 @@ void func_800DFAAC(void) { check_input_midair_jump(); - if (playerStatus->actionState != ActionState_SLIDING) { + if (playerStatus->actionState != ACTION_STATE_SLIDING) { collision_main_lateral(); func_800E4508(); @@ -153,8 +153,8 @@ void func_800DFAAC(void) { func_800E4F10(); } - if ((playerStatus->actionState != ActionState_ENEMY_FIRST_STRIKE) - && (playerStatus->actionState != ActionState_STEP_UP)) { + if ((playerStatus->actionState != ACTION_STATE_ENEMY_FIRST_STRIKE) + && (playerStatus->actionState != ACTION_STATE_STEP_UP)) { func_800E4744(); } } @@ -311,7 +311,7 @@ s32 func_800E0208(void) { if (gGameStatusPtr->disableScripts && (gGameStatusPtr->currentButtons & 0x10)) { if (D_8010EBB0.unk_00 == 0) { - set_action_state(ActionState_IDLE); + set_action_state(ACTION_STATE_IDLE); } ret = 1; } diff --git a/src/code_7bb60_len_41b0.c b/src/code_7bb60_len_41b0.c index 9a40f4f316..7ba5ff7bf1 100644 --- a/src/code_7bb60_len_41b0.c +++ b/src/code_7bb60_len_41b0.c @@ -19,16 +19,16 @@ s32 func_800E26C4(void) { s32 actionState = playerStatus->actionState; Temp8010EBB0* temp_8010EBB0 = &D_8010EBB0; - if (actionState == ActionState_IDLE || - actionState == ActionState_WALK || - actionState == ActionState_RUN || - actionState == ActionState_USE_TWEESTER || - actionState == ActionState_SPIN) { + if (actionState == ACTION_STATE_IDLE || + actionState == ACTION_STATE_WALK || + actionState == ACTION_STATE_RUN || + actionState == ACTION_STATE_USE_TWEESTER || + actionState == ACTION_STATE_SPIN) { return 1; } - if (actionState == ActionState_RIDE) { - if (playerData->currentPartner == PartnerID_LAKILESTER || playerData->currentPartner == PartnerID_BOW) { + if (actionState == ACTION_STATE_RIDE) { + if (playerData->currentPartner == PARTNER_LAKILESTER || playerData->currentPartner == PARTNER_BOW) { if (temp_8010EBB0->unk_00 != 0) { return 1; } else { @@ -59,7 +59,7 @@ void move_player(s32 duration, f32 heading, f32 speed) { playerStatus->currentSpeed = speed; if (!(playerStatus->animFlags & 0x400000)) { - set_action_state(speed > playerStatus->walkSpeed ? ActionState_RUN : ActionState_WALK); + set_action_state(speed > playerStatus->walkSpeed ? ACTION_STATE_RUN : ACTION_STATE_WALK); } } @@ -97,7 +97,7 @@ void gravity_use_fall_params(void) { void func_800E3100(void) { PlayerStatus* playerStatus = &gPlayerStatus; - if (playerStatus->actionState != ActionState_7 && playerStatus->actionState != ActionState_BOUNCE) { + if (playerStatus->actionState != ACTION_STATE_7 && playerStatus->actionState != ACTION_STATE_BOUNCE) { f32* temp; playerStatus->position.y = func_800E3514(func_800E34D8(), &temp); @@ -245,8 +245,8 @@ void func_800E4F10(void) { playerStatus->position.x = x; playerStatus->position.z = z; - if (tempB != 0 && temp < 0 && playerStatus->actionState != ActionState_18 && playerStatus->currentSpeed != 0.0f) { - set_action_state(ActionState_18); + if (tempB != 0 && temp < 0 && playerStatus->actionState != ACTION_STATE_18 && playerStatus->currentSpeed != 0.0f) { + set_action_state(ACTION_STATE_18); } } @@ -260,11 +260,11 @@ void check_input_midair_jump(void) { case 0: break; case 1: - set_action_state(ActionState_SPIN_JUMP); + set_action_state(ACTION_STATE_SPIN_JUMP); gPlayerStatus.flags |= 8; break; case 2: - set_action_state(ActionState_ULTRA_JUMP); + set_action_state(ACTION_STATE_ULTRA_JUMP); gPlayerStatus.flags |= 8; break; } @@ -286,8 +286,8 @@ void func_800E5098(s32 arg0) { soundID = 0x143; soundID2 = 0x144; } else { - soundID = SoundId_STEP1; - soundID2 = SoundId_STEP2; + soundID = SOUND_STEP1; + soundID2 = SOUND_STEP2; } temp_800F7B80 = &D_800F7B80; @@ -358,7 +358,7 @@ void set_action_state(s32 actionState) { } if (playerStatus->animFlags & 0x4000) { - if (actionState < ActionState_CONVERSATION) { + if (actionState < ACTION_STATE_CONVERSATION) { if (actionState >= 0) { playerStatus->prevActionState = playerStatus->actionState; playerStatus->actionState = actionState; @@ -368,17 +368,17 @@ void set_action_state(s32 actionState) { return; } - if (actionState == ActionState_HIT_HAZARD || actionState == ActionState_HIT_LAVA) { + if (actionState == ACTION_STATE_HIT_HAZARD || actionState == ACTION_STATE_HIT_LAVA) { PartnerID partner; if (playerStatus->unk_BF == 3) { - actionState = ActionState_HIT_HAZARD; + actionState = ACTION_STATE_HIT_HAZARD; } // Whilst Sushie, Lakilester, Parakarry's ability is active, hazards have no effect. partner = playerData->currentPartner; - if (partner == PartnerID_SUSHIE || partner == PartnerID_LAKILESTER || partner == PartnerID_PARAKARRY) { + if (partner == PARTNER_SUSHIE || partner == PARTNER_LAKILESTER || partner == PARTNER_PARAKARRY) { if (D_8010EBB0.unk_00 != 0) { playerStatus->animFlags |= 0x4; playerStatus->flags |= 0x800; @@ -387,24 +387,24 @@ void set_action_state(s32 actionState) { } } - if (actionState == ActionState_SLIDING) { + if (actionState == ACTION_STATE_SLIDING) { playerStatus->flags |= 0x10; playerStatus->moveFrames = 0; playerStatus->flags &= ~0x4000; } playerStatus->prevActionState = playerStatus->actionState; - if (actionState == ActionState_USE_TWEESTER) { - playerStatus->prevActionState = ActionState_IDLE; + if (actionState == ACTION_STATE_USE_TWEESTER) { + playerStatus->prevActionState = ACTION_STATE_IDLE; } - if (actionState == ActionState_ENEMY_FIRST_STRIKE) { + if (actionState == ACTION_STATE_ENEMY_FIRST_STRIKE) { playerStatus->animFlags |= 4; } playerStatus->actionState = actionState; playerStatus->flags |= 0x80000000; - if (playerStatus->actionState == ActionState_SPIN) { + if (playerStatus->actionState == ACTION_STATE_SPIN) { return; } @@ -425,14 +425,14 @@ void update_locomotion_state(void) { PlayerStatus* playerStatus = &gPlayerStatus; do { } while (0); // required to match - set_action_state((!is_ability_active(Ability_SLOW_GO) - && (SQ(playerStatus->stickAxis[0]) + SQ(playerStatus->stickAxis[1]) >= 0xBD2)) ? ActionState_RUN : ActionState_WALK); + set_action_state((!is_ability_active(ABILITY_SLOW_GO) + && (SQ(playerStatus->stickAxis[0]) + SQ(playerStatus->stickAxis[1]) >= 0xBD2)) ? ACTION_STATE_RUN : ACTION_STATE_WALK); } void start_falling(void) { PlayerStatus* playerStatus = &gPlayerStatus; - set_action_state(ActionState_FALLING); + set_action_state(ACTION_STATE_FALLING); playerStatus->gravityIntegrator[0] = 0.1143f; playerStatus->gravityIntegrator[1] = -0.2871f; playerStatus->gravityIntegrator[2] = -0.1823f; @@ -442,7 +442,7 @@ void start_falling(void) { void start_bounce_a(void) { PlayerStatus* playerStatus = &gPlayerStatus; - set_action_state(ActionState_BOUNCE); + set_action_state(ACTION_STATE_BOUNCE); playerStatus->gravityIntegrator[0] = 10.0f; playerStatus->gravityIntegrator[1] = -2.0f; playerStatus->gravityIntegrator[2] = 0.8f; @@ -452,7 +452,7 @@ void start_bounce_a(void) { void start_bounce_b(void) { PlayerStatus* playerStatus = &gPlayerStatus; - set_action_state(ActionState_BOUNCE); + set_action_state(ACTION_STATE_BOUNCE); playerStatus->gravityIntegrator[0] = 8.0f; playerStatus->gravityIntegrator[1] = -1.0f; playerStatus->gravityIntegrator[2] = 0; @@ -464,11 +464,11 @@ s32 check_input_hammer(void) { PlayerStatus* playerStatus = &gPlayerStatus; PlayerData* playerData = &gPlayerData; - if (playerStatus->pressedButtons & Button_B) { + if (playerStatus->pressedButtons & BUTTON_B) { if (!(playerStatus->flags & 4)) { - if (D_8010EBB0.unk_00 != 1 || playerData->currentPartner != PartnerID_WATT) { + if (D_8010EBB0.unk_00 != 1 || playerData->currentPartner != PARTNER_WATT) { if (playerData->hammerLevel != -1) { - set_action_state(ActionState_HAMMER); + set_action_state(ACTION_STATE_HAMMER); return TRUE; } } @@ -488,7 +488,7 @@ void check_input_spin(void) { if (!(playerStatus->flags & 0x5000) && !(playerStatus->animFlags & 1) && !(playerStatus->currentButtons & D_CBUTTONS) && - !is_ability_active(Ability_SLOW_GO)) { + !is_ability_active(ABILITY_SLOW_GO)) { s32 actionState = playerStatus->actionState; s32 btnPressed = playerStatus->pressedButtons & Z_TRIG; @@ -498,12 +498,12 @@ void check_input_spin(void) { if (actionState < 3) { if (actionState >= 0 && !(playerStatus->animFlags & 0x10000)) { if (btnPressed || temp_8010F250->unk_01) { - set_action_state(ActionState_SPIN); + set_action_state(ACTION_STATE_SPIN); if (temp_8010F250->unk_01 != 0) { if (temp_8010F250->unk_08 != 0 || temp_8010F250->unk_0C != 0) { playerStatus->prevActionState = temp2->unk_07; } else { - playerStatus->prevActionState = ActionState_IDLE; + playerStatus->prevActionState = ACTION_STATE_IDLE; } } } @@ -532,7 +532,7 @@ void func_800E63A4(s32 arg0) { gGameStatusPtr->peachFlags &= ~0x2; playerStatus->peachDisguise = 0; free_npc_by_index(D_8010C96C); - set_action_state(ActionState_IDLE); + set_action_state(ACTION_STATE_IDLE); playerStatus->colliderHeight = 55; playerStatus->colliderDiameter = 38; } @@ -544,7 +544,7 @@ void func_800E6428(void) { s32 actionState = playerStatus->actionState; Npc* disguiseNpc; - if (actionState == ActionState_IDLE || actionState == ActionState_WALK || actionState == ActionState_RUN) { + if (actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN) { s32* temp_8010C92C = &D_8010C92C; if (*temp_8010C92C != 0) { diff --git a/src/code_7fd10_len_b40.c b/src/code_7fd10_len_b40.c index a68c033b11..2f9616354b 100644 --- a/src/code_7fd10_len_b40.c +++ b/src/code_7fd10_len_b40.c @@ -4,7 +4,7 @@ void func_800E6860(void) { PlayerStatus* playerStatus = &gPlayerStatus; if (D_8010EBB0.unk_00 != 0 && D_8010EBB0.unk_03 == 9) { - Npc* partner = get_npc_unsafe(NpcId_PARTNER); + Npc* partner = get_npc_unsafe(NPC_PARTNER); func_802DDEE4(0, -1, 7, 0, 0, 0, playerStatus->unk_0E, 0); func_8003D624(partner, 7, playerStatus->unk_0E, 0, 0, 0, 0); @@ -22,7 +22,7 @@ s32 func_800E6904(void) { if (!(playerStatus->animFlags & 0x100000)) { if (temp_8010EBB0->unk_00 == 0) { if (!(playerStatus->flags & 0x1000)) { - if (actionState == ActionState_IDLE || actionState == ActionState_WALK || actionState == ActionState_RUN) { + if (actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN) { return 1; } } @@ -30,11 +30,11 @@ s32 func_800E6904(void) { if (temp_8010EBB0->unk_03 == 6) { return 1; } else if (temp_8010EBB0->unk_03 == 9) { - if (actionState == ActionState_RIDE) { + if (actionState == ACTION_STATE_RIDE) { return 1; } } else if (temp_8010EBB0->unk_03 == 8) { - if (actionState != ActionState_RIDE) { + if (actionState != ACTION_STATE_RIDE) { sfx_play_sound(0x21D); } else { return 1; @@ -66,7 +66,7 @@ void check_input_status_menu(void) { s32 pressedButtons; if (get_variable(NULL, SI_SAVE_VAR(0)) < STORY_EPILOGUE) { - if (playerStatus->actionState != ActionState_RIDE) { + if (playerStatus->actionState != ACTION_STATE_RIDE) { pressedButtons = playerStatus->pressedButtons; } else { pressedButtons = gGameStatusPtr->pressedButtons; diff --git a/src/code_E21870.c b/src/code_E21870.c index 8104c935cc..3e9e341e40 100644 --- a/src/code_E21870.c +++ b/src/code_E21870.c @@ -4,7 +4,7 @@ s32 func_802B7000_2(void) { Temp8010EBB0* something = &D_8010EBB0; ActionState* actionState = gPlayerActionState; - if (actionState != ActionState_USE_TWEESTER) { + if (actionState != ACTION_STATE_USE_TWEESTER) { if (something->unk_00 != 1 || (something->unk_03 != 9 && something->unk_03 != 4)) { return 0; } diff --git a/src/code_F5750.c b/src/code_F5750.c index d0a3229b58..4569adc957 100644 --- a/src/code_F5750.c +++ b/src/code_F5750.c @@ -52,7 +52,7 @@ ApiStatus DisablePlayerInput(ScriptInstance* script, s32 isInitialCall) { func_800EF628(); close_status_menu(); func_800E984C(); - if (playerStatus->actionState == ActionState_SPIN) { + if (playerStatus->actionState == ACTION_STATE_SPIN) { playerStatus->animFlags |= 0x40000; } OVERRIDE_FLAG_SET(0x40); diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index 6910b9ca9a..f24906f278 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -17,8 +17,8 @@ MusicPlayer D_8014F6F0 = { .unk_2C = 0 }; -SongID gSongsUsingVariationFlag[] = { Song_SPECIAL_BATTLE, Song_TUBBA_BLUBBA_BATTLE, Song_JR_TROOPA_BATTLE, - Song_YOSHI_KIDS_FOUND, Song_ITEM_UPGRADE, Song_NEW_PARTNER, +SongID gSongsUsingVariationFlag[] = { SONG_SPECIAL_BATTLE, SONG_TUBBA_BLUBBA_BATTLE, SONG_JR_TROOPA_BATTLE, + SONG_YOSHI_KIDS_FOUND, SONG_ITEM_UPGRADE, SONG_NEW_PARTNER, }; s16 D_8014F738 = 0; diff --git a/src/code_f2470_len_27f0.c b/src/code_f2470_len_27f0.c index 698de8c823..f1edc8c664 100644 --- a/src/code_f2470_len_27f0.c +++ b/src/code_f2470_len_27f0.c @@ -1,8 +1,8 @@ #include "common.h" #include "map.h" -Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr) { - if (npcIdOrPtr == NpcId_SELF) { +Npc* resolve_npc(ScriptInstance* script, NpcID npcIdOrPtr) { + if (npcIdOrPtr == NPC_SELF) { return get_npc_safe(script->owner2.npcID); } else if (npcIdOrPtr >= -270000000) { return get_npc_safe(npcIdOrPtr); @@ -40,7 +40,7 @@ ApiStatus DeleteNpc(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcID = get_variable(script, *args++); + NpcID npcID = get_variable(script, *args++); Bytecode varNPC = *args++; set_variable(script, varNPC, (s32)get_npc_safe(npcID)); @@ -49,7 +49,7 @@ ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcID = get_variable(script, *args++); + NpcID npcID = get_variable(script, *args++); f32 x = get_variable(script, *args++); f32 y = get_variable(script, *args++); f32 z = get_variable(script, *args++); @@ -72,7 +72,7 @@ ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcRotation(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcID = get_variable(script, *args++); + NpcID npcID = get_variable(script, *args++); f32 rotX = get_float_variable(script, *args++); f32 rotY = get_float_variable(script, *args++); f32 rotZ = get_float_variable(script, *args++); @@ -90,7 +90,7 @@ ApiStatus SetNpcRotation(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CDE68(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); f32 var1 = get_float_variable(script, *args++); Npc* npc; @@ -105,7 +105,7 @@ ApiStatus func_802CDE68(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcScale(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); f32 sizeX = get_float_variable(script, *ptrReadPos++); f32 sizeY = get_float_variable(script, *ptrReadPos++); f32 sizeZ = get_float_variable(script, *ptrReadPos++); @@ -123,7 +123,7 @@ ApiStatus SetNpcScale(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcCollisionSize(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); s32 height = get_variable(script, *ptrReadPos++); s32 radius = get_variable(script, *ptrReadPos++); Npc* npc = resolve_npc(script, npcID); @@ -139,7 +139,7 @@ ApiStatus SetNpcCollisionSize(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcSpeed(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); f32 speed = get_float_variable(script, *ptrReadPos); Npc* npc = resolve_npc(script, npcID); @@ -153,7 +153,7 @@ ApiStatus SetNpcSpeed(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcJumpscale(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); f32 jumpScale = get_float_variable(script, *ptrReadPos); Npc* npc = resolve_npc(script, npcID); @@ -167,7 +167,7 @@ ApiStatus SetNpcJumpscale(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcAnimation(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); s32 animation = get_variable(script, *ptrReadPos); Npc* npc = resolve_npc(script, npcID); @@ -181,7 +181,7 @@ ApiStatus SetNpcAnimation(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetNpcAnimation(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); Bytecode outVar = *ptrReadPos++; Npc* npc = resolve_npc(script, npcID); @@ -195,7 +195,7 @@ ApiStatus GetNpcAnimation(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcAnimationSpeed(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); f32 animationSpeed = get_float_variable(script, *ptrReadPos++); Npc* npc = resolve_npc(script, npcID); @@ -223,7 +223,7 @@ INCLUDE_ASM(s32, "code_f2470_len_27f0", NpcFlyTo, ScriptInstance* script, s32 is ApiStatus GetNpcYaw(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); Bytecode outVar = *ptrReadPos++; Npc* npc = resolve_npc(script, npcID); @@ -237,7 +237,7 @@ ApiStatus GetNpcYaw(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcYaw(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); Npc* npc = resolve_npc(script, npcID); if (npc == NULL) { @@ -256,7 +256,7 @@ INCLUDE_ASM(s32, "code_f2470_len_27f0", NpcFaceNpc, ScriptInstance* script, s32 ApiStatus SetNpcFlagBits(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcID = get_variable(script, *args++); + NpcID npcID = get_variable(script, *args++); s32 flagBits = *args++; s32 enable = get_variable(script, *args++); Npc* npc = resolve_npc(script, npcID); @@ -276,7 +276,7 @@ ApiStatus SetNpcFlagBits(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetNpcPos(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcID = get_variable(script, *args++); + NpcID npcID = get_variable(script, *args++); s32 a1 = *args++; s32 a2 = *args++; s32 a3 = *args++; @@ -294,7 +294,7 @@ ApiStatus GetNpcPos(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CF1B4(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); Bytecode arg1 = *args; Npc* npc = resolve_npc(script, npcId); @@ -308,7 +308,7 @@ ApiStatus func_802CF1B4(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcSprite(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); Bytecode arg1 = *args; Npc* npc = resolve_npc(script, npcId); @@ -322,7 +322,7 @@ ApiStatus SetNpcSprite(ScriptInstance* script, s32 isInitialCall) { ApiStatus EnableNpcShadow(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); s32 enableShadow = get_variable(script, *ptrReadPos++); Npc* npc = resolve_npc(script, npcID); @@ -340,7 +340,7 @@ ApiStatus EnableNpcShadow(ScriptInstance* script, s32 isInitialCall) { ApiStatus EnableNpcBlur(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); s32 enableBlur = get_variable(script, *ptrReadPos++); Npc* npc = resolve_npc(script, npcID); @@ -358,7 +358,7 @@ ApiStatus EnableNpcBlur(ScriptInstance* script, s32 isInitialCall) { ApiStatus ClearPartnerMoveHistory(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); Npc* npc = resolve_npc(script, npcID); if (npc == NULL) { @@ -457,7 +457,7 @@ ApiStatus PartnerIsFlying(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CFD30(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++); Bytecode var2 = get_variable(script, *args++); Bytecode var3 = get_variable(script, *args++); @@ -475,7 +475,7 @@ ApiStatus func_802CFD30(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CFE2C(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); Bytecode arg1 = *args; Npc* npc = resolve_npc(script, npcId); @@ -489,7 +489,7 @@ ApiStatus func_802CFE2C(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CFE80(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++); Npc* npc = resolve_npc(script, npcId); @@ -503,7 +503,7 @@ ApiStatus func_802CFE80(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CFEEC(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++); Bytecode var2 = get_variable(script, *args++); Bytecode var3 = get_variable(script, *args++); @@ -520,7 +520,7 @@ ApiStatus func_802CFEEC(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802CFFC0(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcId = get_variable(script, *args++); + NpcID npcId = get_variable(script, *args++); Bytecode var1 = get_variable(script, *args++); Bytecode var2 = get_variable(script, *args++); Bytecode var3 = get_variable(script, *args++); @@ -542,7 +542,7 @@ ApiStatus func_802CFFC0(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetNpcEffect(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); s32 value1 = get_variable(script, *ptrReadPos++); s32 value2 = get_variable(script, *ptrReadPos++); Npc* npc = resolve_npc(script, npcID); @@ -557,7 +557,7 @@ ApiStatus SetNpcEffect(ScriptInstance* script, s32 isInitialCall) { ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); SoundID soundID = get_variable(script, *ptrReadPos++); s32 value2 = get_variable(script, *ptrReadPos++); Npc* npc = resolve_npc(script, npcID); @@ -572,7 +572,7 @@ ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802D0244(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); u8 renderMode = get_variable(script, *ptrReadPos++); Npc* npc = resolve_npc(script, npcID); diff --git a/src/code_f8f60_len_1560.c b/src/code_f8f60_len_1560.c index 02001e0205..9943e69fa8 100644 --- a/src/code_f8f60_len_1560.c +++ b/src/code_f8f60_len_1560.c @@ -45,8 +45,8 @@ ApiStatus RandInt(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetAngleBetweenNPCs(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - NpcId aID = get_variable(script, *ptrReadPos++); - NpcId bID = get_variable(script, *ptrReadPos++); + NpcID aID = get_variable(script, *ptrReadPos++); + NpcID bID = get_variable(script, *ptrReadPos++); Bytecode outVar = *ptrReadPos++; Npc* a = resolve_npc(script, aID); @@ -60,7 +60,7 @@ ApiStatus GetAngleToNPC(ScriptInstance* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); Bytecode outVar = *ptrReadPos++; Npc* npc = resolve_npc(script, npcID); @@ -73,7 +73,7 @@ ApiStatus GetAngleToPlayer(ScriptInstance* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* ptrReadPos = script->ptrReadPos; - NpcId npcID = get_variable(script, *ptrReadPos++); + NpcID npcID = get_variable(script, *ptrReadPos++); Bytecode outVar = *ptrReadPos++; Npc* npc = resolve_npc(script, npcID); diff --git a/src/code_fa4c0_len_3bf0.c b/src/code_fa4c0_len_3bf0.c index ad398c425a..cbde892497 100644 --- a/src/code_fa4c0_len_3bf0.c +++ b/src/code_fa4c0_len_3bf0.c @@ -196,7 +196,7 @@ ApiStatus AddKeyItem(ScriptInstance* script, s32 isInitialCall) { s32 itemID = get_variable(script, value); s32 i; - if (itemID == ItemId_FORTRESS_KEY) { + if (itemID == ITEM_FORTRESS_KEY) { playerData->fortressKeyCount++; return ApiStatus_DONE2; } diff --git a/src/world/area_arn/arn_02/events.c b/src/world/area_arn/arn_02/events.c index 2411f3949e..74e5e2e14e 100644 --- a/src/world/area_arn/arn_02/events.c +++ b/src/world/area_arn/arn_02/events.c @@ -6,8 +6,8 @@ Script N(Exit1) = EXIT_WALK_SCRIPT(60, 0, "arn_05", 1); Script N(Exit2) = EXIT_WALK_SCRIPT(60, 1, "arn_04", 0); Script N(BindExits) = SCRIPT({ - bind N(Exit1) to TriggerFlag_FLOOR_ABOVE 1; - bind N(Exit2) to TriggerFlag_FLOOR_ABOVE 6; + bind N(Exit1) to TRIGGER_FLOOR_ABOVE 1; + bind N(Exit2) to TRIGGER_FLOOR_ABOVE 6; }); Script N(Main) = SCRIPT({ @@ -27,13 +27,13 @@ Script N(Main) = SCRIPT({ s32 N(padding2)[] = { 0, 0, 0 }; Script N(MakeEntities) = SCRIPT({ - MakeItemEntity(ItemId_DIZZY_DIAL, 0xFFFFFF08, 193, 45, 17, SI_SAVE_FLAG(1005)); - MakeItemEntity(ItemId_LETTER07, 536, 260, 227, 17, SI_SAVE_FLAG(1006)); - MakeEntity(0x802EA564, 0xFFFFFEA2, 172, 170, 0, ItemId_COIN, 0x80000000); + MakeItemEntity(ITEM_DIZZY_DIAL, 0xFFFFFF08, 193, 45, 17, SI_SAVE_FLAG(1005)); + MakeItemEntity(ITEM_LETTER07, 536, 260, 227, 17, SI_SAVE_FLAG(1006)); + MakeEntity(0x802EA564, 0xFFFFFEA2, 172, 170, 0, ITEM_COIN, 0x80000000); AssignBlockFlag(SI_SAVE_FLAG(1002)); - MakeEntity(0x802EA564, 225, 265, 30, 0, ItemId_COIN, 0x80000000); + MakeEntity(0x802EA564, 225, 265, 30, 0, ITEM_COIN, 0x80000000); AssignBlockFlag(SI_SAVE_FLAG(1003)); - MakeEntity(0x802EA564, 275, 265, 150, 0, ItemId_REPEL_GEL, 0x80000000); + MakeEntity(0x802EA564, 275, 265, 150, 0, ITEM_REPEL_GEL, 0x80000000); AssignBlockFlag(SI_SAVE_FLAG(1004)); }); @@ -191,7 +191,7 @@ StaticNpc N(GoombaNPC) = { .dropFlags = 0x80, .itemDropChance = 20, .itemDrops = { - { ItemId_DRIED_SHROOM, 10, 0 }, + { ITEM_DRIED_SHROOM, 10, 0 }, }, .heartDrops = STANDARD_HEART_DROPS(2), .flowerDrops = STANDARD_FLOWER_DROPS(2), diff --git a/src/world/area_arn/arn_02/header.c b/src/world/area_arn/arn_02/header.c index b95deecc5b..48110605a7 100644 --- a/src/world/area_arn/arn_02/header.c +++ b/src/world/area_arn/arn_02/header.c @@ -17,13 +17,13 @@ MapConfig N(config) = { Script N(PlayMusic) = SCRIPT({ match SI_SAVE_VAR(0) { < STORY_CH3_TUBBA_WOKE_UP { - SetMusicTrack(0, Song_GUSTY_GULCH, 0, 8); + SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); } < STORY_CH3_DEFEATED_TUBBA_BLUBBA { - SetMusicTrack(0, Song_TUBBA_ESCAPE, 0, 8); + SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } else { - SetMusicTrack(0, Song_GUSTY_GULCH, 0, 8); + SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); } } PlayAmbientSounds(1); diff --git a/src/world/area_kmr/kmr_03/8C7F90.c b/src/world/area_kmr/kmr_03/8C7F90.c index 0b47700f2f..eb9d2b57e4 100644 --- a/src/world/area_kmr/kmr_03/8C7F90.c +++ b/src/world/area_kmr/kmr_03/8C7F90.c @@ -7,12 +7,12 @@ Script N(Main); ApiStatus func_80240000_8C7F90(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerData* playerData = &gPlayerData; - NpcId npcID = get_variable(script, *args++); + NpcID npcID = get_variable(script, *args++); PartnerID partnerID = get_variable(script, *args++); Npc* npc = get_npc_safe(npcID); if (isInitialCall) { - if (gPlayerData.currentPartner == PartnerID_NONE) { + if (gPlayerData.currentPartner == PARTNER_NONE) { script->functionTemp[0].s = 2; } else { script->functionTemp[0].s = 0; @@ -39,7 +39,7 @@ ApiStatus func_80240000_8C7F90(ScriptInstance* script, s32 isInitialCall) { script->functionTemp[0].s = 3; break; case 3: - set_npc_yaw(get_npc_safe(NpcId_PARTNER), npc->yaw); + set_npc_yaw(get_npc_safe(NPC_PARTNER), npc->yaw); npc->flags &= ~4; disable_npc_shadow(npc); npc->pos.y = -1000.0f; diff --git a/src/world/area_kmr/kmr_03/8C83A0.c b/src/world/area_kmr/kmr_03/8C83A0.c index 8ed6f60f19..02c5dddfb1 100644 --- a/src/world/area_kmr/kmr_03/8C83A0.c +++ b/src/world/area_kmr/kmr_03/8C83A0.c @@ -230,9 +230,9 @@ s32 N(triggerCoord_802422A8)[] = { Script N(Script_802422B8) = SCRIPT({ SI_VAR(0) = N(searchBushEvent_Bush1); - bind N(SearchBush_802417F0) to TriggerFlag_WALL_INTERACT 53; + bind N(SearchBush_802417F0) to TRIGGER_WALL_PRESS_A 53; SI_VAR(0) = N(shakeTreeEvent_Tree1); - bind N(ShakeTree_80241B50) to TriggerFlag_WALL_HAMMER 52; - bind N(ShakeTree_80241B50) to TriggerFlag_BOMB N(triggerCoord_802422A8); + bind N(ShakeTree_80241B50) to TRIGGER_WALL_HAMMER 52; + bind N(ShakeTree_80241B50) to TRIGGER_POINT_BOMB N(triggerCoord_802422A8); }); diff --git a/src/world/area_kmr/kmr_12/events.c b/src/world/area_kmr/kmr_12/events.c index 5f138c1e4d..0c30bbdc85 100644 --- a/src/world/area_kmr/kmr_12/events.c +++ b/src/world/area_kmr/kmr_12/events.c @@ -6,8 +6,8 @@ Script N(ExitWest) = EXIT_WALK_SCRIPT(60, 0, "kmr_07", 1); Script N(ExitEast) = EXIT_WALK_SCRIPT(60, 1, "kmr_11", 0); Script N(BindExits) = SCRIPT({ - bind N(ExitWest) to TriggerFlag_FLOOR_ABOVE 0; // deili1 - bind N(ExitEast) to TriggerFlag_FLOOR_ABOVE 3; // deili2 + bind N(ExitWest) to TRIGGER_FLOOR_ABOVE 0; // deili1 + bind N(ExitEast) to TRIGGER_FLOOR_ABOVE 3; // deili2 }); Script N(Main) = SCRIPT({ @@ -22,7 +22,7 @@ Script N(Main) = SCRIPT({ SI_VAR(0) = N(BindExits); spawn EnterWalk; sleep 1; - bind N(ReadWestSign) to TriggerFlag_WALL_INTERACT 10; + bind N(ReadWestSign) to TRIGGER_WALL_PRESS_A 10; }); NpcAISettings N(goombaAISettings) = { @@ -66,10 +66,10 @@ Script N(ReadWestSign) = SCRIPT({ SI_FLAG(0) = FALSE; GetGoomba(); if (SI_VAR(0) != FALSE) { - GetNpcVar(NpcId_GOOMBA, 0, SI_VAR(0)); + GetNpcVar(NPC_GOOMBA, 0, SI_VAR(0)); if (SI_VAR(0) == FALSE) { // Trigger Goomba to peel off - SetNpcVar(NpcId_GOOMBA, 0, TRUE); + SetNpcVar(NPC_GOOMBA, 0, TRUE); SI_FLAG(0) = TRUE; sleep 10; } @@ -87,8 +87,8 @@ Script N(GoombaIdle) = SCRIPT({ sleep 1; SetSelfVar(0, FALSE); - SetNpcAnimation(NpcId_SELF, NPC_ANIM(goomba, normal, fake_mushroom)); // TODO: work out why palette 0 is used here - EnableNpcShadow(NpcId_SELF, FALSE); + SetNpcAnimation(NPC_SELF, NPC_ANIM(goomba, normal, fake_mushroom)); // TODO: work out why palette 0 is used here + EnableNpcShadow(NPC_SELF, FALSE); SetSelfEnemyFlagBits(0x00000020, TRUE); // Wait until read_sign sets NPC var 0 @@ -98,51 +98,51 @@ Script N(GoombaIdle) = SCRIPT({ } until(SI_VAR(0) == FALSE) // Peel and jump off the sign - SetNpcFlagBits(NpcId_SELF, 0x00240000, TRUE); + SetNpcFlagBits(NPC_SELF, 0x00240000, TRUE); sleep 3; SI_VAR(0) = 0.0; loop 9 { SI_VAR(0) += 10.0; - SetNpcRotation(NpcId_SELF, 0, SI_VAR(0), 0); + SetNpcRotation(NPC_SELF, 0, SI_VAR(0), 0); sleep 1; } - SetNpcAnimation(NpcId_SELF, NPC_ANIM(goomba, normal, still)); + SetNpcAnimation(NPC_SELF, NPC_ANIM(goomba, normal, still)); loop 9 { SI_VAR(0) += 10.0; - SetNpcRotation(NpcId_SELF, 0, SI_VAR(0), 0); + SetNpcRotation(NPC_SELF, 0, SI_VAR(0), 0); sleep 1; } - SetNpcAnimation(NpcId_SELF, NPC_ANIM(goomba, normal, dizzy)); + SetNpcAnimation(NPC_SELF, NPC_ANIM(goomba, normal, dizzy)); sleep 20; - SetNpcAnimation(NpcId_SELF, NPC_ANIM(goomba, normal, idle)); - PlaySoundAtNpc(NpcId_SELF, 248, 0); - func_802CFE2C(NpcId_SELF, 8192); - func_802CFD30(NpcId_SELF, 5, 6, 1, 1, 0); + SetNpcAnimation(NPC_SELF, NPC_ANIM(goomba, normal, idle)); + PlaySoundAtNpc(NPC_SELF, 248, 0); + func_802CFE2C(NPC_SELF, 8192); + func_802CFD30(NPC_SELF, 5, 6, 1, 1, 0); sleep 12; sleep 5; - PlaySoundAtNpc(NpcId_SELF, 812, 0); - EnableNpcShadow(NpcId_SELF, TRUE); - SetNpcJumpscale(NpcId_SELF, 0.6005859375); - NpcJump0(NpcId_SELF, -35, 0, 30, 23); - func_802CFD30(NpcId_SELF, 0, 0, 0, 0, 0); - InterpNpcYaw(NpcId_SELF, 90, 0); - SetNpcFlagBits(NpcId_SELF, 0x00240000, FALSE); + PlaySoundAtNpc(NPC_SELF, 812, 0); + EnableNpcShadow(NPC_SELF, TRUE); + SetNpcJumpscale(NPC_SELF, 0.6005859375); + NpcJump0(NPC_SELF, -35, 0, 30, 23); + func_802CFD30(NPC_SELF, 0, 0, 0, 0, 0); + InterpNpcYaw(NPC_SELF, 90, 0); + SetNpcFlagBits(NPC_SELF, 0x00240000, FALSE); SetSelfEnemyFlagBits(0x00000020, FALSE); SetSelfEnemyFlagBits(0x40000000, TRUE); // We're done jumping off; the player can read the sign again - bind N(ReadWestSign) to TriggerFlag_WALL_INTERACT 10; + bind N(ReadWestSign) to TRIGGER_WALL_PRESS_A 10; // Behave like a normal enemy from now on - BindNpcAI(NpcId_SELF, N(GoombaAI)); + BindNpcAI(NPC_SELF, N(GoombaAI)); }); Script N(GoombaInit) = SCRIPT({ - BindNpcIdle(NpcId_SELF, N(GoombaIdle)); + BindNpcIdle(NPC_SELF, N(GoombaIdle)); }); StaticNpc N(goombaNpc) = { - .id = NpcId_GOOMBA, + .id = NPC_GOOMBA, .settings = &N(goombaNpcSettings), .pos = { -33.0f, 30.0f, -25.0f }, .flags = 0x00000C00, @@ -150,7 +150,7 @@ StaticNpc N(goombaNpc) = { .yaw = 90, .dropFlags = 0x80, .itemDropChance = 5, - .itemDrops = { { ItemId_MUSHROOM, 10 } }, + .itemDrops = { { ITEM_MUSHROOM, 10 } }, .heartDrops = GENEROUS_WHEN_LOW_HEART_DROPS(2), .flowerDrops = GENEROUS_WHEN_LOW_FLOWER_DROPS(2), .movement = { diff --git a/src/world/area_kmr/kmr_12/header.c b/src/world/area_kmr/kmr_12/header.c index 3ff536959d..7f9ffc8944 100644 --- a/src/world/area_kmr/kmr_12/header.c +++ b/src/world/area_kmr/kmr_12/header.c @@ -15,10 +15,10 @@ MapConfig N(config) = { }; Script N(PlayMusic) = SCRIPT({ - SetMusicTrack(0, Song_PLEASANT_PATH, 0, 8); + SetMusicTrack(0, SONG_PLEASANT_PATH, 0, 8); }); ApiStatus GetGoomba(ScriptInstance* script, s32 isInitialCall) { - script->varTable[0] = get_enemy_safe(NpcId_GOOMBA); + script->varTable[0] = get_enemy_safe(NPC_GOOMBA); return ApiStatus_DONE2; } diff --git a/src/world/area_kmr/kmr_12/kmr_12.h b/src/world/area_kmr/kmr_12/kmr_12.h index 2226969567..796102e775 100644 --- a/src/world/area_kmr/kmr_12/kmr_12.h +++ b/src/world/area_kmr/kmr_12/kmr_12.h @@ -4,7 +4,7 @@ #define NAMESPACE kmr_12 -#define NpcId_GOOMBA 0 +#define NPC_GOOMBA 0 #define GetGoomba N(GetGoomba) ApiStatus GetGoomba(ScriptInstance* script, s32 isInitialCall); diff --git a/src/world/area_sbk/sbk_00/929270.c b/src/world/area_sbk/sbk_00/929270.c index ef46a92096..a5522bdfce 100644 --- a/src/world/area_sbk/sbk_00/929270.c +++ b/src/world/area_sbk/sbk_00/929270.c @@ -54,7 +54,7 @@ Script N(Main) = SCRIPT({ MakeNpcs(0, N(npcGroupList_80240768)); await N(MakeEntities); N(SpawnSunEffect)(); - SetMusicTrack(0, Song_DRY_DRY_DESERT, 0, 8); + SetMusicTrack(0, SONG_DRY_DRY_DESERT, 0, 8); SI_VAR(0) = N(Script_80240198); spawn EnterWalk; }); diff --git a/src/world/area_sbk/sbk_01/929A90.c b/src/world/area_sbk/sbk_01/929A90.c index 73f48a461c..a1203754da 100644 --- a/src/world/area_sbk/sbk_01/929A90.c +++ b/src/world/area_sbk/sbk_01/929A90.c @@ -62,7 +62,7 @@ Script N(Main) = SCRIPT({ SetCamLeadPlayer(0, 0); MakeNpcs(0, N(npcGroupList_802407D8)); N(SpawnSunEffect)(); - SetMusicTrack(0, Song_DRY_DRY_DESERT, 0, 8); + SetMusicTrack(0, SONG_DRY_DRY_DESERT, 0, 8); SI_VAR(0) = N(Script_802401F4); spawn EnterWalk; }); diff --git a/src/world/area_trd/trd_06/9B1AA0.c b/src/world/area_trd/trd_06/9B1AA0.c index b66c244563..e598ba8f07 100644 --- a/src/world/area_trd/trd_06/9B1AA0.c +++ b/src/world/area_trd/trd_06/9B1AA0.c @@ -13,7 +13,7 @@ INCLUDE_ASM(s32, "world/area_trd/trd_06/9B1AA0", func_8024093C_9B20CC); INCLUDE_ASM(s32, "world/area_trd/trd_06/9B1AA0", func_80240A5C_9B21EC); ApiStatus func_80240A70_9B2200(ScriptInstance* script, s32 isInitialCall) { - f32 partnerCollisionHeight = get_npc_unsafe(NpcId_PARTNER)->collisionHeight; + f32 partnerCollisionHeight = get_npc_unsafe(NPC_PARTNER)->collisionHeight; script->varTable[0] = ((partnerCollisionHeight * 2) / 3.0f) + 145.0f; return ApiStatus_DONE2; diff --git a/src/world/common/Bandit_DropCoin.inc.c b/src/world/common/Bandit_DropCoin.inc.c index 063a5965f9..2e2dd2f631 100644 --- a/src/world/common/Bandit_DropCoin.inc.c +++ b/src/world/common/Bandit_DropCoin.inc.c @@ -3,7 +3,7 @@ ApiStatus N(Bandit_DropCoin)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcID; + NpcID npcID; Npc* npc; s32 itemEntityIndex; s32 areaFlag; diff --git a/src/world/common/CheckPartnerFlags1000.inc.c b/src/world/common/CheckPartnerFlags1000.inc.c index 61847e7a48..dab6b49322 100644 --- a/src/world/common/CheckPartnerFlags1000.inc.c +++ b/src/world/common/CheckPartnerFlags1000.inc.c @@ -2,5 +2,5 @@ #include "map.h" ApiStatus N(CheckPartnerFlags1000)(ScriptInstance* script, s32 isInitialCall) { - return ((get_npc_unsafe(NpcId_PARTNER)->flags & 0x1000) != 0) * ApiStatus_DONE2; + return ((get_npc_unsafe(NPC_PARTNER)->flags & 0x1000) != 0) * ApiStatus_DONE2; } diff --git a/src/world/common/DeadUnkPartnerPosFuncs.inc.c b/src/world/common/DeadUnkPartnerPosFuncs.inc.c index afaa134e84..d732086711 100644 --- a/src/world/common/DeadUnkPartnerPosFuncs.inc.c +++ b/src/world/common/DeadUnkPartnerPosFuncs.inc.c @@ -1,14 +1,14 @@ #include "common.h" ApiStatus N(DeadUnkPartnerPosFunc)(ScriptInstance* script, s32 isInitialCall) { - Npc* partner = func_8003E534(NpcId_PARTNER); + Npc* partner = func_8003E534(NPC_PARTNER); dead_func_8006FEF0(2, partner->pos.x, partner->pos.y + 30.0f, partner->pos.z, 30.0f); return ApiStatus_DONE2; } ApiStatus N(DeadUnkPartnerPosFunc2)(ScriptInstance* script, s32 isInitialCall) { - Npc* partner = func_8003E534(NpcId_PARTNER); + Npc* partner = func_8003E534(NPC_PARTNER); dead_func_8006FEF0(4, partner->pos.x, partner->pos.y + 30.0f, partner->pos.z, 30.0f); return ApiStatus_DONE2; diff --git a/src/world/common/GetNpcCollisionHeight.inc.c b/src/world/common/GetNpcCollisionHeight.inc.c index bd75bf9d4a..a8de22f84c 100644 --- a/src/world/common/GetNpcCollisionHeight.inc.c +++ b/src/world/common/GetNpcCollisionHeight.inc.c @@ -3,7 +3,7 @@ ApiStatus N(GetNpcCollisionHeight)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - NpcId npcID = get_variable(script, *args++); + NpcID npcID = get_variable(script, *args++); Npc* npc = get_npc_safe(npcID); if (npc != NULL) { diff --git a/src/world/common/IsBerserkerEquipped.inc.c b/src/world/common/IsBerserkerEquipped.inc.c index 658794acdd..ede6ce6e81 100644 --- a/src/world/common/IsBerserkerEquipped.inc.c +++ b/src/world/common/IsBerserkerEquipped.inc.c @@ -5,7 +5,7 @@ ApiStatus N(IsBerserkerEquipped)(ScriptInstance* script, s32 isInitialCall) { script->varTable[0] = gBattleStatus.unk_83; script->varTable[1] = 15; - if (is_ability_active(Ability_BERSERKER)) { + if (is_ability_active(ABILITY_BERSERKER)) { script->varTable[0] = 0; script->varTable[1] = 40; } diff --git a/src/world/common/IsRightOnEquipped.inc.c b/src/world/common/IsRightOnEquipped.inc.c index 17da542eee..b2a75d21cf 100644 --- a/src/world/common/IsRightOnEquipped.inc.c +++ b/src/world/common/IsRightOnEquipped.inc.c @@ -4,7 +4,7 @@ ApiStatus N(IsRightOnEquipped)(ScriptInstance* script, s32 isInitialCall) { script->varTable[0] = FALSE; - if (is_ability_active(Ability_RIGHT_ON)) { + if (is_ability_active(ABILITY_RIGHT_ON)) { script->varTable[0] = TRUE; } diff --git a/src/world/common/PartnerToggleAbilityScript.inc.c b/src/world/common/PartnerToggleAbilityScript.inc.c index d9b8591996..5da23a5702 100644 --- a/src/world/common/PartnerToggleAbilityScript.inc.c +++ b/src/world/common/PartnerToggleAbilityScript.inc.c @@ -3,7 +3,7 @@ #include "map.h" ApiStatus N(PartnerSuspendAbilityScript)(ScriptInstance* script, s32 isInitialCall) { - if (gPlayerData.currentPartner == PartnerID_NONE) { + if (gPlayerData.currentPartner == PARTNER_NONE) { return ApiStatus_DONE2; } partner_suspend_ability_script(); diff --git a/src/world/common/SetPartnerFlags20000.inc.c b/src/world/common/SetPartnerFlags20000.inc.c index 92cefa4755..2445de3056 100644 --- a/src/world/common/SetPartnerFlags20000.inc.c +++ b/src/world/common/SetPartnerFlags20000.inc.c @@ -1,7 +1,7 @@ #include "common.h" void N(SetPartnerFlags20000)(void) { - Npc* partner = get_npc_safe(NpcId_PARTNER); + Npc* partner = get_npc_safe(NPC_PARTNER); if (partner != NULL) { partner->flags |= 0x20000; diff --git a/src/world/common/SetPartnerFlags80000.inc.c b/src/world/common/SetPartnerFlags80000.inc.c index c6a18e6c38..badbad0cd9 100644 --- a/src/world/common/SetPartnerFlags80000.inc.c +++ b/src/world/common/SetPartnerFlags80000.inc.c @@ -2,7 +2,7 @@ #include "map.h" void N(SetPartnerFlags80000)(void) { - Npc* partner = get_npc_safe(NpcId_PARTNER); + Npc* partner = get_npc_safe(NPC_PARTNER); if (partner != NULL) { partner->flags |= 0x80000; diff --git a/src/world/common/SetPartnerFlagsA0000.inc.c b/src/world/common/SetPartnerFlagsA0000.inc.c index e883dee72b..a2ef4fad75 100644 --- a/src/world/common/SetPartnerFlagsA0000.inc.c +++ b/src/world/common/SetPartnerFlagsA0000.inc.c @@ -2,7 +2,7 @@ #include "map.h" void N(SetPartnerFlagsA0000)(void) { - Npc* partner = get_npc_safe(NpcId_PARTNER); + Npc* partner = get_npc_safe(NPC_PARTNER); if (partner != NULL) { partner->flags |= 0xA0000; diff --git a/src/world/common/UnkAlphaFunc.inc.c b/src/world/common/UnkAlphaFunc.inc.c index bb00338329..4def2e7ad1 100644 --- a/src/world/common/UnkAlphaFunc.inc.c +++ b/src/world/common/UnkAlphaFunc.inc.c @@ -11,7 +11,7 @@ ApiStatus N(UnkAlphaFunc)(ScriptInstance* script, s32 isInitialCall) { for (i = 0; i < 64; i++) { Npc* npc = get_npc_by_index(i); - if (npc != NULL && npc->flags != 0 && npc->npcID != NpcId_PARTNER && npc->npcID != UNK_ALPHA_FUNC_NPC) { + if (npc != NULL && npc->flags != 0 && npc->npcID != NPC_PARTNER && npc->npcID != UNK_ALPHA_FUNC_NPC) { npc->flags |= 0x800000; } } diff --git a/src/world/common/UnkPartnerFuncs.inc.c b/src/world/common/UnkPartnerFuncs.inc.c index 771a4a3471..81770ce0df 100644 --- a/src/world/common/UnkPartnerFuncs.inc.c +++ b/src/world/common/UnkPartnerFuncs.inc.c @@ -2,7 +2,7 @@ #include "map.h" ApiStatus N(UnkRotatePartner)(ScriptInstance* script, s32 isInitialCall) { - Npc* partner = get_npc_unsafe(NpcId_PARTNER); + Npc* partner = get_npc_unsafe(NPC_PARTNER); if (isInitialCall) { script->functionTemp[0].s = 60; @@ -19,7 +19,7 @@ ApiStatus N(UnkRotatePartner)(ScriptInstance* script, s32 isInitialCall) { } ApiStatus N(UnkMovePartner)(ScriptInstance* script, s32 isInitialCall) { - Npc* npc = get_npc_unsafe(NpcId_PARTNER); + Npc* npc = get_npc_unsafe(NPC_PARTNER); if (isInitialCall) { script->functionTemp[1].f = get_float_variable(script, SI_VAR(0)) / 60.0f; diff --git a/src/world/common/UnkPartnerPosFuncs.inc.c b/src/world/common/UnkPartnerPosFuncs.inc.c index 4732069ee1..b1f1b8a289 100644 --- a/src/world/common/UnkPartnerPosFuncs.inc.c +++ b/src/world/common/UnkPartnerPosFuncs.inc.c @@ -1,14 +1,14 @@ #include "common.h" ApiStatus N(UnkPartnerPosFunc)(ScriptInstance* script, s32 isInitialCall) { - Npc* partner = get_npc_safe(NpcId_PARTNER); + Npc* partner = get_npc_safe(NPC_PARTNER); func_8006FEF0(2, partner->pos.x, partner->pos.y + 30.0f, partner->pos.z, 30.0f); return ApiStatus_DONE2; } ApiStatus N(UnkPartnerPosFunc2)(ScriptInstance* script, s32 isInitialCall) { - Npc* partner = get_npc_safe(NpcId_PARTNER); + Npc* partner = get_npc_safe(NPC_PARTNER); func_8006FEF0(4, partner->pos.x, partner->pos.y + 30.0f, partner->pos.z, 30.0f); return ApiStatus_DONE2; diff --git a/src/world/common/UnkYawFunc.inc.c b/src/world/common/UnkYawFunc.inc.c index 2ca53cd9df..a70a18948e 100644 --- a/src/world/common/UnkYawFunc.inc.c +++ b/src/world/common/UnkYawFunc.inc.c @@ -9,7 +9,7 @@ ApiStatus N(UnkYawFunc)(ScriptInstance* script, s32 isInitialCall) { f32 b = get_variable(script, a1); s32 a2 = *args++; f32 c = get_variable(script, a2); - Npc* partner = get_npc_unsafe(NpcId_PARTNER); + Npc* partner = get_npc_unsafe(NPC_PARTNER); f32 currentCamYaw = clamp_angle(CURRENT_CAM->currentYaw + 180.0f); add_vec2D_polar(&a, &c, 15.0f, partner->yaw); diff --git a/src/world/partner/goombaria.c b/src/world/partner/goombaria.c index 535ec80091..c14f0a307f 100644 --- a/src/world/partner/goombaria.c +++ b/src/world/partner/goombaria.c @@ -26,7 +26,7 @@ ApiStatus GoombariaUpdate(ScriptInstance* script, s32 isInitialCall) { func_800EBA3C(owner); func_800EBB40(owner); - playerData->unk_2F4[PartnerID_GOOMBARIA]++; + playerData->unk_2F4[PARTNER_GOOMBARIA]++; return ApiStatus_BLOCK; } diff --git a/src/world/partner/goombario.c b/src/world/partner/goombario.c index 159b12e4d8..b780258059 100644 --- a/src/world/partner/goombario.c +++ b/src/world/partner/goombario.c @@ -111,7 +111,7 @@ Script world_goombario_use_ability = SCRIPT({ } if (SI_VAR(1) == 0) { - SpeakToPlayer(NpcId_PARTNER, NPC_ANIM(world_goombario, normal, talk), NPC_ANIM(world_goombario, normal, idle), 0, + SpeakToPlayer(NPC_PARTNER, NPC_ANIM(world_goombario, normal, talk), NPC_ANIM(world_goombario, normal, idle), 0, SI_VAR(0)); } diff --git a/src/world/partner/twink.c b/src/world/partner/twink.c index 1e25b590e3..b5c75abfb6 100644 --- a/src/world/partner/twink.c +++ b/src/world/partner/twink.c @@ -26,7 +26,7 @@ ApiStatus TwinkUpdate(ScriptInstance* script, s32 isInitialCall) { update_player_move_history(owner); func_800ED5D0(owner); - playerData->unk_2F4[PartnerID_TWINK]++; + playerData->unk_2F4[PARTNER_TWINK]++; return ApiStatus_BLOCK; } diff --git a/src/world/partners.c b/src/world/partners.c index 287f22e2e1..6aef808b8c 100644 --- a/src/world/partners.c +++ b/src/world/partners.c @@ -254,7 +254,7 @@ f32 D_800F833C = 0; f32 D_800F8340 = 0; f32 D_800F8344 = 0; -NpcId create_basic_npc(NpcBlueprint* blueprint); +NpcID create_basic_npc(NpcBlueprint* blueprint); extern s32 D_802C0000; @@ -298,7 +298,7 @@ void load_partner_npc(void) { WorldPartner* partnerEntry = &wPartners[D_8010CFD8]; Npc** partnerNpcPtr = &wPartnerNpc; WorldPartner** partner = &wPartner; - NpcId npcIndex; + NpcID npcIndex; NpcBlueprint blueprint; NpcBlueprint* blueprintPtr; @@ -316,7 +316,7 @@ void load_partner_npc(void) { { Npc* npc = *partnerNpcPtr; - npc->npcID = NpcId_PARTNER; + npc->npcID = NPC_PARTNER; npc->collisionRadius = 10; npc->collisionHeight = 10; } @@ -535,7 +535,7 @@ void partner_handle_after_battle(void) { D_8010CFE8 = 1; - if (playerData->currentPartner != PartnerID_WATT && temp8010EBB0[3] == 6) { + if (playerData->currentPartner != PARTNER_WATT && temp8010EBB0[3] == 6) { gPlayerStatusPtr->animFlags &= ~1; gPlayerStatusPtr->animFlags &= ~2; temp8010EBB0[3] = 0; diff --git a/src/world/partners.h b/src/world/partners.h index 0d84ed761e..51cf510d88 100644 --- a/src/world/partners.h +++ b/src/world/partners.h @@ -37,7 +37,7 @@ extern s32 D_8010CFE8; extern WorldPartner wPartners[12]; extern WorldPartner* wPartner; -extern NpcId D_8010CFD0; // wPartnerNpcIndex +extern NpcID D_8010CFD0; // wPartnerNpcIndex extern Npc* wPartnerNpc; // wPartnerNpc #endif diff --git a/src/world/script_api/7E0E80.c b/src/world/script_api/7E0E80.c index 4bf33842e8..42a0ad8eed 100644 --- a/src/world/script_api/7E0E80.c +++ b/src/world/script_api/7E0E80.c @@ -17,8 +17,8 @@ ApiStatus func_802803C8(ScriptInstance* script, s32 isInitialCall) { script->varTable[2] = FALSE; - if (playerStatus->actionState == ActionState_BOUNCE || - playerStatus->actionState == ActionState_FALLING) { + if (playerStatus->actionState == ACTION_STATE_BOUNCE || + playerStatus->actionState == ACTION_STATE_FALLING) { return ApiStatus_DONE2; } diff --git a/src/world/script_api/7E4690.c b/src/world/script_api/7E4690.c index 41399faeeb..320a018fc5 100644 --- a/src/world/script_api/7E4690.c +++ b/src/world/script_api/7E4690.c @@ -23,11 +23,11 @@ ApiStatus TeleportPartnerToPlayer(ScriptInstance* script, s32 isInitialCall) { PlayerStatus* playerStatus2 = &gPlayerStatus; Npc* partner; - if (gPlayerData.currentPartner == PartnerID_NONE) { + if (gPlayerData.currentPartner == PARTNER_NONE) { return ApiStatus_DONE2; } - partner = get_npc_unsafe(NpcId_PARTNER); + partner = get_npc_unsafe(NPC_PARTNER); partner->pos.x = playerStatus->position.x; partner->pos.z = playerStatus->position.z; @@ -52,8 +52,8 @@ ApiStatus func_80283908(ScriptInstance* script, s32 isInitialCall) { playerStatus->position.y = gGameStatusPtr->savedPos.y; playerStatus->position.z = gGameStatusPtr->savedPos.z; - if (currentPartner != PartnerID_NONE) { - Npc* partner = get_npc_unsafe(NpcId_PARTNER); + if (currentPartner != PARTNER_NONE) { + Npc* partner = get_npc_unsafe(NPC_PARTNER); f32 angle = clamp_angle((playerStatus2->spriteFacingAngle < 180.0f) ? (90.0f) : (-90.0f)); partner->pos.x = playerStatus2->position.x; partner->pos.y = playerStatus2->position.y; diff --git a/tools/compile_dsl_macros.py b/tools/compile_dsl_macros.py index 071fee4a47..31621e7afb 100755 --- a/tools/compile_dsl_macros.py +++ b/tools/compile_dsl_macros.py @@ -297,7 +297,7 @@ class Compile(Transformer): return super().transform(tree) def c_identifier(self, tree): - if tree.children[0].startswith("STORY_"): + if "_" in tree.children[0] and tree.children[0].isupper(): return f"{tree.children[0]}" return f"(Bytecode)(&{tree.children[0]})"